InvokeAI/frontend/dist/assets/index-legacy-4585c87a.js
blessedcoolant 1d34405f4f
[WebUI] Localization Support (#2050)
* Initial Localization Implementation

* Fix Initial Spinner

* Language Picker Dropdown

* RU Localization Update

Co-Authored-By: Artur <83028930+netsvetaev@users.noreply.github.com>

* Fixed localization breaking themes

* useUpdateTranslation Hook

To force trigger translations for data objects

* Localize Tab Data

* Localize Prompt Input & Current Image Buttons

* Localize Gallery & Bug FIxes

Fix a bug where the delete image from the context menu wasn't working. Removed tooltips that were broken as they don't work in context menu.

* Fix localization breaking in production

* Add Toast Localization Support

* Localize Unified Canvas

* Localize WIP Tabs

* Localize Hotkeys

* Localize Settings

* RU Localization Update

Co-Authored-By: Artur <83028930+netsvetaev@users.noreply.github.com>

* Add Support for Italian and Portuguese

* Localize Toasts

* Fix width of language picker items

* Localize Backend Messages

* Disable Debug Messages

* Add Support for French

* Fix missing localization for a string in the SettingsModal

* Disable French

* Styling updates to normalize text and accommodate other langs

* Add Portuguese Brazilian

* Fix Hotkey headers not being localized.

* Fix styling issue on models tag in Settings

* Fix Slider Styling to accommodate different languages

* Fix slider styling in light mode.

* Add German

* Add Italian

* Add Polish

* Update Italian

* Localized Frontend Build

* Updated RU Translations

* Fresh Build with updated RU changes

* Bug Fixes and Loc Updates

* Updated Frontend Build

* Fresh Build

Co-authored-by: Artur <83028930+netsvetaev@users.noreply.github.com>
2022-12-24 18:23:21 +00:00

49 lines
1.5 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(){function e(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}System.register([],(function(t,n){"use strict";var r=document.createElement("style");return r.textContent="@font-face{font-family:Inter;src:url("+new URL("Inter.b9a8e5e2.ttf",n.meta.url).href+");font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url("+new URL("Inter-Bold.790c108b.ttf",n.meta.url).href+');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);--slider-mark-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: var(--accent-color);--slider-mark-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);--slider-mark-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)}@media (max-width: 600px){#root .app-content{padding:5px}#root .app-content .site-header{position:fixed;display:flex;height:100px;z-index:1}#root .app-content .site-header .site-header-left-side{position:absolute;display:flex;min-width:145px;float:left;padding-left:0}#root .app-content .site-header .site-header-right-side{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr;grid-template-rows:25px 25px 25px;grid-template-areas:"logoSpace logoSpace logoSpace sampler sampler sampler" "status status status status status status" "btn1 btn2 btn3 btn4 btn5 btn6";row-gap:15px}#root .app-content .site-header .site-header-right-side .chakra-popover__popper{grid-area:logoSpace}#root .app-content .site-header .site-header-right-side>:nth-child(1).chakra-text{grid-area:status;width:100%;display:flex;justify-content:center}#root .app-content .site-header .site-header-right-side>:nth-child(2){grid-area:sampler;display:flex;justify-content:center;align-items:center}#root .app-content .site-header .site-header-right-side>:nth-child(2) select{width:185px;margin-top:10px}#root .app-content .site-header .site-header-right-side>:nth-child(2) .chakra-select__icon-wrapper{right:10px}#root .app-content .site-header .site-header-right-side>:nth-child(2) .chakra-select__icon-wrapper svg{margin-top:10px}#root .app-content .site-header .site-header-right-side>:nth-child(3){grid-area:btn1}#root .app-content .site-header .site-header-right-side>:nth-child(4){grid-area:btn2}#root .app-content .site-header .site-header-right-side>:nth-child(6){grid-area:btn3}#root .app-content .site-header .site-header-right-side>:nth-child(7){grid-area:btn4}#root .app-content .site-header .site-header-right-side>:nth-child(8){grid-area:btn5}#root .app-content .site-header .site-header-right-side>:nth-child(9){grid-area:btn6}#root .app-content .app-tabs{position:fixed;display:flex;flex-direction:column;row-gap:15px;max-width:100%;overflow:hidden;margin-top:120px}#root .app-content .app-tabs .app-tabs-list{display:flex;justify-content:space-between}#root .app-content .app-tabs .app-tabs-panels{overflow:hidden;overflow-y:scroll}#root .app-content .app-tabs .app-tabs-panels .workarea-main{display:grid;grid-template-areas:"workarea" "options" "gallery";row-gap:15px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .options-panel-wrapper{grid-area:options;width:100%;max-width:100%;height:inherit;overflow:inherit;padding:0 10px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .options-panel-wrapper .main-options-row,#root .app-content .app-tabs .app-tabs-panels .workarea-main .options-panel-wrapper .advanced-settings-item{max-width:100%}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper{grid-area:workarea}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .workarea-split-view{display:flex;flex-direction:column}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .current-image-options{column-gap:3px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .text-to-image-area{padding:0}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .current-image-preview{height:430px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .image-upload-button{row-gap:10px;padding:5px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .image-upload-button svg{width:2rem;height:2rem;margin-top:10px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .inpainting-settings{display:flex;flex-wrap:wrap;row-gap:10px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .workarea-children-wrapper .inpainting-canvas-area .konvajs-content{height:400px!important}#root .app-content .app-tabs .app-tabs-panels .workarea-main .image-gallery-wrapper{grid-area:gallery;min-height:400px}#root .app-content .app-tabs .app-tabs-panels .workarea-main .image-gallery-wrapper .image-gallery-popup{width:100%!important;max-width:100%!important}}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}.site-header-right-side .lang-select-btn[data-selected=true],.site-header-right-side .lang-select-btn[data-selected=true]:hover{background-color:var(--accent-color)}.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}.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;animation:popIn .3s ease-in}.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}@keyframes popIn{0%{opacity:0;filter:blur(100)}to{opacity:1;filter:blur(0)}}.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-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content: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;position:relative;height:100%;width:100%;border-radius:.5rem}.inpainting-canvas-wrapper{position:relative}.inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.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)}.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)}.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{color:var(--text-color-secondary)}.invokeai__switch-form-control .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .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)}.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{padding-bottom:.5rem;border-radius:.5rem}.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-mark-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}\n',document.head.appendChild(r),{execute:function(){function t(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i={exports:{}},a={},s=Symbol.for("react.element"),l=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,w={};function k(e,t,n){this.props=e,this.context=t,this.refs=w,this.updater=n||b}function S(){}function C(e,t,n){this.props=e,this.context=t,this.refs=w,this.updater=n||b}k.prototype.isReactComponent={},k.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},k.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=k.prototype;var _=C.prototype=new S;_.constructor=C,x(_,k.prototype),_.isPureReactComponent=!0;var E=Array.isArray,L=Object.prototype.hasOwnProperty,P={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)L.call(t,r)&&!O.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:s,type:e,key:i,ref:a,props:o,_owner:P.current}}function M(e){return"object"==typeof e&&null!==e&&e.$$typeof===s}var A=/\/+/g;function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function R(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case s:case l:a=!0}}if(a)return o=o(a=e),e=""===r?"."+I(a,0):r,E(o)?(n="",null!=e&&(n=e.replace(A,"$&/")+"/"),R(o,t,n,"",(function(e){return e}))):null!=o&&(M(o)&&(o=function(e,t){return{$$typeof:s,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(A,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=""===r?".":r+":",E(e))for(var c=0;c<e.length;c++){var u=r+I(i=e[c],c);a+=R(i,t,n,u,o)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=y&&e[y]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(i=e.next()).done;)a+=R(i=i.value,t,n,u=r+I(i,c++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function N(e,t,n){if(null==e)return e;var r=[],o=0;return R(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function D(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var z={current:null},B={transition:null},j={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:B,ReactCurrentOwner:P};a.Children={map:N,forEach:function(e,t,n){N(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return N(e,(function(){t++})),t},toArray:function(e){return N(e,(function(e){return e}))||[]},only:function(e){if(!M(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},a.Component=k,a.Fragment=c,a.Profiler=d,a.PureComponent=C,a.StrictMode=u,a.Suspense=g,a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,a.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=x({},e.props),o=e.key,i=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,a=P.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)L.call(t,c)&&!O.hasOwnProperty(c)&&(r[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:s,type:e.type,key:o,ref:i,props:r,_owner:a}},a.createContext=function(e){return(e={$$typeof:f,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:h,_context:e},e.Consumer=e},a.createElement=T,a.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},a.createRef=function(){return{current:null}},a.forwardRef=function(e){return{$$typeof:p,render:e}},a.isValidElement=M,a.lazy=function(e){return{$$typeof:v,_payload:{_status:-1,_result:e},_init:D}},a.memo=function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},a.startTransition=function(e){var t=B.transition;B.transition={};try{e()}finally{B.transition=t}},a.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},a.useCallback=function(e,t){return z.current.useCallback(e,t)},a.useContext=function(e){return z.current.useContext(e)},a.useDebugValue=function(){},a.useDeferredValue=function(e){return z.current.useDeferredValue(e)},a.useEffect=function(e,t){return z.current.useEffect(e,t)},a.useId=function(){return z.current.useId()},a.useImperativeHandle=function(e,t,n){return z.current.useImperativeHandle(e,t,n)},a.useInsertionEffect=function(e,t){return z.current.useInsertionEffect(e,t)},a.useLayoutEffect=function(e,t){return z.current.useLayoutEffect(e,t)},a.useMemo=function(e,t){return z.current.useMemo(e,t)},a.useReducer=function(e,t,n){return z.current.useReducer(e,t,n)},a.useRef=function(e){return z.current.useRef(e)},a.useState=function(e){return z.current.useState(e)},a.useSyncExternalStore=function(e,t,n){return z.current.useSyncExternalStore(e,t,n)},a.useTransition=function(){return z.current.useTransition()},a.version="18.2.0",function(e){e.exports=a}(i);const F=o(i.exports),H=t({__proto__:null,default:F},[i.exports]);var W={},$={exports:{}},U={},V={exports:{}},G={};
/**
* @license React
* scheduler.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.
*/
!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,h=3,f=!1,p=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(c);null!==o;){if(null===o.callback)r(c);else{if(!(o.startTime<=e))break;r(c),o.sortIndex=o.expirationTime,t(l,o)}o=n(c)}}function x(e){if(g=!1,b(e),!p)if(null!==n(l))p=!0,A(w);else{var t=n(c);null!==t&&I(x,t.startTime-e)}}function w(t,o){p=!1,g&&(g=!1,v(_),_=-1),f=!0;var i=h;try{for(b(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!P());){var a=d.callback;if("function"==typeof a){d.callback=null,h=d.priorityLevel;var s=a(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(o)}else r(l);d=n(l)}if(null!==d)var u=!0;else{var m=n(c);null!==m&&I(x,m.startTime-o),u=!1}return u}finally{d=null,h=i,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,S=!1,C=null,_=-1,E=5,L=-1;function P(){return!(e.unstable_now()-L<E)}function O(){if(null!==C){var t=e.unstable_now();L=t;var n=!0;try{n=C(!0,t)}finally{n?k():(S=!1,C=null)}}else S=!1}if("function"==typeof y)k=function(){y(O)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,M=T.port2;T.port1.onmessage=O,k=function(){M.postMessage(null)}}else k=function(){m(O,0)};function A(e){C=e,S||(S=!0,k())}function I(t,n){_=m((function(){t(e.unstable_now())}),n)}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(e){e.callback=null},e.unstable_continueExecution=function(){p||f||(p=!0,A(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,o,i){var a=e.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0<i?a+i:a:i=a,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:u++,callback:o,priorityLevel:r,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(r.sortIndex=i,t(c,r),null===n(l)&&r===n(c)&&(g?(v(_),_=-1):g=!0,I(x,i-a))):(r.sortIndex=s,t(l,r),p||f||(p=!0,A(w))),r},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(G),function(e){e.exports=G}(V);
/**
* @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 q=i.exports,Z=V.exports;function Y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var X=new Set,K={};function Q(e,t){J(e,t),J(e+"Capture",t)}function J(e,t){for(K[e]=t,e=0;e<t.length;e++)X.add(t[e])}var ee=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),te=Object.prototype.hasOwnProperty,ne=/^[: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={},oe={};function ie(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){ae[e]=new ie(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];ae[t]=new ie(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){ae[e]=new ie(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){ae[e]=new ie(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){ae[e]=new ie(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){ae[e]=new ie(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){ae[e]=new ie(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){ae[e]=new ie(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){ae[e]=new ie(e,5,!1,e.toLowerCase(),null,!1,!1)}));var se=/[\-:]([a-z])/g;function le(e){return e[1].toUpperCase()}function ce(e,t,n,r){var o=ae.hasOwnProperty(t)?ae[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!te.call(oe,e)||!te.call(re,e)&&(ne.test(e)?oe[e]=!0:(re[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(se,le);ae[t]=new ie(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(se,le);ae[t]=new ie(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(se,le);ae[t]=new ie(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){ae[e]=new ie(e,1,!1,e.toLowerCase(),null,!1,!1)})),ae.xlinkHref=new ie("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){ae[e]=new ie(e,1,!1,e.toLowerCase(),null,!0,!0)}));var ue=q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,de=Symbol.for("react.element"),he=Symbol.for("react.portal"),fe=Symbol.for("react.fragment"),pe=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),me=Symbol.for("react.provider"),ve=Symbol.for("react.context"),ye=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),xe=Symbol.for("react.suspense_list"),we=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),Se=Symbol.for("react.offscreen"),Ce=Symbol.iterator;function _e(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Ce&&e[Ce]||e["@@iterator"])?e:null}var Ee,Le=Object.assign;function Pe(e){if(void 0===Ee)try{throw Error()}catch(tae){var t=tae.stack.trim().match(/\n( *(at )?)/);Ee=t&&t[1]||""}return"\n"+Ee+e}var Oe=!1;function Te(e,t){if(!e||Oe)return"";Oe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(N2){var r=N2}Reflect.construct(e,[],t)}else{try{t.call()}catch(N2){r=N2}e.call(t.prototype)}else{try{throw Error()}catch(N2){r=N2}e()}}catch(N2){if(N2&&r&&"string"==typeof N2.stack){for(var o=N2.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{Oe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Pe(e):""}function Me(e){switch(e.tag){case 5:return Pe(e.type);case 16:return Pe("Lazy");case 13:return Pe("Suspense");case 19:return Pe("SuspenseList");case 0:case 2:case 15:return e=Te(e.type,!1);case 11:return e=Te(e.type.render,!1);case 1:return e=Te(e.type,!0);default:return""}}function Ae(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case fe:return"Fragment";case he:return"Portal";case ge:return"Profiler";case pe:return"StrictMode";case be:return"Suspense";case xe:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ve:return(e.displayName||"Context")+".Consumer";case me:return(e._context.displayName||"Context")+".Provider";case ye:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case we:return null!==(t=e.displayName||null)?t:Ae(e.type)||"Memo";case ke:t=e._payload,e=e._init;try{return Ae(e(t))}catch(tae){}}return null}function Ie(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=(e=t.render).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 Ae(t);case 8:return t===pe?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Ne(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function De(e){e._valueTracker||(e._valueTracker=function(e){var t=Ne(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ze(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ne(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Be(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(dae){return e.body}}function je(e,t){var n=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Fe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Re(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function He(e,t){null!=(t=t.checked)&&ce(e,"checked",t,!1)}function We(e,t){He(e,t);var n=Re(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Ue(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ue(e,t.type,Re(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function $e(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Ue(e,t,n){"number"===t&&Be(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ve=Array.isArray;function Ge(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Re(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function qe(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(Y(91));return Le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ze(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(Y(92));if(Ve(n)){if(1<n.length)throw Error(Y(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Re(n)}}function Ye(e,t){var n=Re(t.value),r=Re(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Xe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Ke(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Qe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Ke(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Je,et=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Je=Je||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Je.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function tt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var nt={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},rt=["Webkit","ms","Moz","O"];function ot(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||nt.hasOwnProperty(e)&&nt[e]?(""+t).trim():t+"px"}function it(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ot(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(nt).forEach((function(e){rt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nt[t]=nt[e]}))}));var at=Le({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 st(e,t){if(t){if(at[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(Y(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(Y(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(Y(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(Y(62))}}function lt(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 ct=null;function ut(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var dt=null,ht=null,ft=null;function pt(e){if(e=ci(e)){if("function"!=typeof dt)throw Error(Y(280));var t=e.stateNode;t&&(t=di(t),dt(e.stateNode,e.type,t))}}function gt(e){ht?ft?ft.push(e):ft=[e]:ht=e}function mt(){if(ht){var e=ht,t=ft;if(ft=ht=null,pt(e),t)for(e=0;e<t.length;e++)pt(t[e])}}function vt(e,t){return e(t)}function yt(){}var bt=!1;function xt(e,t,n){if(bt)return e(t,n);bt=!0;try{return vt(e,t,n)}finally{bt=!1,(null!==ht||null!==ft)&&(yt(),mt())}}function wt(e,t){var n=e.stateNode;if(null===n)return null;var r=di(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(Y(231,t,typeof n));return n}var kt=!1;if(ee)try{var St={};Object.defineProperty(St,"passive",{get:function(){kt=!0}}),window.addEventListener("test",St,St),window.removeEventListener("test",St,St)}catch(Wle){kt=!1}function Ct(e,t,n,r,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(lae){this.onError(lae)}}var _t=!1,Et=null,Lt=!1,Pt=null,Ot={onError:function(e){_t=!0,Et=e}};function Tt(e,t,n,r,o,i,a,s,l){_t=!1,Et=null,Ct.apply(Ot,arguments)}function Mt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function At(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function It(e){if(Mt(e)!==e)throw Error(Y(188))}function Rt(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=Mt(e)))throw Error(Y(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return It(o),e;if(i===r)return It(o),t;i=i.sibling}throw Error(Y(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a)throw Error(Y(189))}}if(n.alternate!==r)throw Error(Y(190))}if(3!==n.tag)throw Error(Y(188));return n.stateNode.current===n?e:t}(e),null!==e?Nt(e):null}function Nt(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Nt(e);if(null!==t)return t;e=e.sibling}return null}var Dt=Z.unstable_scheduleCallback,zt=Z.unstable_cancelCallback,Bt=Z.unstable_shouldYield,jt=Z.unstable_requestPaint,Ft=Z.unstable_now,Ht=Z.unstable_getCurrentPriorityLevel,Wt=Z.unstable_ImmediatePriority,$t=Z.unstable_UserBlockingPriority,Ut=Z.unstable_NormalPriority,Vt=Z.unstable_LowPriority,Gt=Z.unstable_IdlePriority,qt=null,Zt=null;var Yt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(Xt(e)/Kt|0)|0},Xt=Math.log,Kt=Math.LN2;var Qt=64,Jt=4194304;function en(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function tn(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=en(s):0!==(i&=a)&&(r=en(i))}else 0!==(a=n&~o)?r=en(a):0!==i&&(r=en(i));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!=(4194240&i)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-Yt(t)),r|=e[n],t&=~o;return r}function nn(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;default:return-1}}function rn(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function on(){var e=Qt;return 0==(4194240&(Qt<<=1))&&(Qt=64),e}function an(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function sn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-Yt(t)]=n}function ln(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Yt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var cn=0;function un(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var dn,hn,fn,pn,gn,mn=!1,vn=[],yn=null,bn=null,xn=null,wn=new Map,kn=new Map,Sn=[],Cn="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function _n(e,t){switch(e){case"focusin":case"focusout":yn=null;break;case"dragenter":case"dragleave":bn=null;break;case"mouseover":case"mouseout":xn=null;break;case"pointerover":case"pointerout":wn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kn.delete(t.pointerId)}}function En(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=ci(t))&&hn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Ln(e){var t=li(e.target);if(null!==t){var n=Mt(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=At(n)))return e.blockedOn=t,void gn(e.priority,(function(){fn(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Pn(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=jn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ci(n))&&hn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);ct=r,n.target.dispatchEvent(r),ct=null,t.shift()}return!0}function On(e,t,n){Pn(e)&&n.delete(t)}function Tn(){mn=!1,null!==yn&&Pn(yn)&&(yn=null),null!==bn&&Pn(bn)&&(bn=null),null!==xn&&Pn(xn)&&(xn=null),wn.forEach(On),kn.forEach(On)}function Mn(e,t){e.blockedOn===t&&(e.blockedOn=null,mn||(mn=!0,Z.unstable_scheduleCallback(Z.unstable_NormalPriority,Tn)))}function An(e){function t(t){return Mn(t,e)}if(0<vn.length){Mn(vn[0],e);for(var n=1;n<vn.length;n++){var r=vn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==yn&&Mn(yn,e),null!==bn&&Mn(bn,e),null!==xn&&Mn(xn,e),wn.forEach(t),kn.forEach(t),n=0;n<Sn.length;n++)(r=Sn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Sn.length&&null===(n=Sn[0]).blockedOn;)Ln(n),null===n.blockedOn&&Sn.shift()}var In=ue.ReactCurrentBatchConfig,Rn=!0;function Nn(e,t,n,r){var o=cn,i=In.transition;In.transition=null;try{cn=1,zn(e,t,n,r)}finally{cn=o,In.transition=i}}function Dn(e,t,n,r){var o=cn,i=In.transition;In.transition=null;try{cn=4,zn(e,t,n,r)}finally{cn=o,In.transition=i}}function zn(e,t,n,r){if(Rn){var o=jn(e,t,n,r);if(null===o)Ro(e,t,r,Bn,n),_n(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return yn=En(yn,e,t,n,r,o),!0;case"dragenter":return bn=En(bn,e,t,n,r,o),!0;case"mouseover":return xn=En(xn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return wn.set(i,En(wn.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,kn.set(i,En(kn.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(_n(e,r),4&t&&-1<Cn.indexOf(e)){for(;null!==o;){var i=ci(o);if(null!==i&&dn(i),null===(i=jn(e,t,n,r))&&Ro(e,t,r,Bn,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Ro(e,t,r,null,n)}}var Bn=null;function jn(e,t,n,r){if(Bn=null,null!==(e=li(e=ut(r))))if(null===(t=Mt(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=At(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Bn=e,null}function Fn(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ht()){case Wt:return 1;case $t:return 4;case Ut:case Vt:return 16;case Gt:return 536870912;default:return 16}default:return 16}}var Hn=null,Wn=null,$n=null;function Un(){if($n)return $n;var e,t,n=Wn,r=n.length,o="value"in Hn?Hn.value:Hn.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return $n=o.slice(e,1<t?1-t:void 0)}function Vn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Gn(){return!0}function qn(){return!1}function Zn(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?Gn:qn,this.isPropagationStopped=qn,this}return Le(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Gn)},persist:function(){},isPersistent:Gn}),t}var Yn,Xn,Kn,Qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jn=Zn(Qn),er=Le({},Qn,{view:0,detail:0}),tr=Zn(er),nr=Le({},er,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Kn&&(Kn&&"mousemove"===e.type?(Yn=e.screenX-Kn.screenX,Xn=e.screenY-Kn.screenY):Xn=Yn=0,Kn=e),Yn)},movementY:function(e){return"movementY"in e?e.movementY:Xn}}),rr=Zn(nr),or=Zn(Le({},nr,{dataTransfer:0})),ir=Zn(Le({},er,{relatedTarget:0})),ar=Zn(Le({},Qn,{animationName:0,elapsedTime:0,pseudoElement:0})),sr=Le({},Qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lr=Zn(sr),cr=Zn(Le({},Qn,{data:0})),ur={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},hr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=hr[e])&&!!t[e]}function pr(){return fr}var gr=Le({},er,{key:function(e){if(e.key){var t=ur[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Vn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?dr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pr,charCode:function(e){return"keypress"===e.type?Vn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Vn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),mr=Zn(gr),vr=Zn(Le({},nr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),yr=Zn(Le({},er,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pr})),br=Zn(Le({},Qn,{propertyName:0,elapsedTime:0,pseudoElement:0})),xr=Le({},nr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),wr=Zn(xr),kr=[9,13,27,32],Sr=ee&&"CompositionEvent"in window,Cr=null;ee&&"documentMode"in document&&(Cr=document.documentMode);var _r=ee&&"TextEvent"in window&&!Cr,Er=ee&&(!Sr||Cr&&8<Cr&&11>=Cr),Lr=String.fromCharCode(32),Pr=!1;function Or(e,t){switch(e){case"keyup":return-1!==kr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Mr=!1;var Ar={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ar[e.type]:"textarea"===t}function Rr(e,t,n,r){gt(r),0<(t=Do(t,"onChange")).length&&(n=new Jn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Nr=null,Dr=null;function zr(e){Po(e,0)}function Br(e){if(ze(ui(e)))return e}function jr(e,t){if("change"===e)return t}var Fr=!1;if(ee){var Hr;if(ee){var Wr="oninput"in document;if(!Wr){var $r=document.createElement("div");$r.setAttribute("oninput","return;"),Wr="function"==typeof $r.oninput}Hr=Wr}else Hr=!1;Fr=Hr&&(!document.documentMode||9<document.documentMode)}function Ur(){Nr&&(Nr.detachEvent("onpropertychange",Vr),Dr=Nr=null)}function Vr(e){if("value"===e.propertyName&&Br(Dr)){var t=[];Rr(t,Dr,e,ut(e)),xt(zr,t)}}function Gr(e,t,n){"focusin"===e?(Ur(),Dr=n,(Nr=t).attachEvent("onpropertychange",Vr)):"focusout"===e&&Ur()}function qr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Br(Dr)}function Zr(e,t){if("click"===e)return Br(t)}function Yr(e,t){if("input"===e||"change"===e)return Br(t)}var Xr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Kr(e,t){if(Xr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!te.call(t,o)||!Xr(e[o],t[o]))return!1}return!0}function Qr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jr(e,t){var n,r=Qr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Qr(r)}}function eo(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?eo(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function to(){for(var e=window,t=Be();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(aae){n=!1}if(!n)break;t=Be((e=t.contentWindow).document)}return t}function no(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function ro(e){var t=to(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&eo(n.ownerDocument.documentElement,n)){if(null!==r&&no(n))if(t=r.start,void 0===(e=r.end)&&(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).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Jr(n,i);var a=Jr(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>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;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var oo=ee&&"documentMode"in document&&11>=document.documentMode,io=null,ao=null,so=null,lo=!1;function co(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;lo||null==io||io!==Be(r)||("selectionStart"in(r=io)&&no(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},so&&Kr(so,r)||(so=r,0<(r=Do(ao,"onSelect")).length&&(t=new Jn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=io)))}function uo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ho={animationend:uo("Animation","AnimationEnd"),animationiteration:uo("Animation","AnimationIteration"),animationstart:uo("Animation","AnimationStart"),transitionend:uo("Transition","TransitionEnd")},fo={},po={};function go(e){if(fo[e])return fo[e];if(!ho[e])return e;var t,n=ho[e];for(t in n)if(n.hasOwnProperty(t)&&t in po)return fo[e]=n[t];return e}ee&&(po=document.createElement("div").style,"AnimationEvent"in window||(delete ho.animationend.animation,delete ho.animationiteration.animation,delete ho.animationstart.animation),"TransitionEvent"in window||delete ho.transitionend.transition);var mo=go("animationend"),vo=go("animationiteration"),yo=go("animationstart"),bo=go("transitionend"),xo=new Map,wo="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ko(e,t){xo.set(e,t),Q(t,[e])}for(var So=0;So<wo.length;So++){var Co=wo[So];ko(Co.toLowerCase(),"on"+(Co[0].toUpperCase()+Co.slice(1)))}ko(mo,"onAnimationEnd"),ko(vo,"onAnimationIteration"),ko(yo,"onAnimationStart"),ko("dblclick","onDoubleClick"),ko("focusin","onFocus"),ko("focusout","onBlur"),ko(bo,"onTransitionEnd"),J("onMouseEnter",["mouseout","mouseover"]),J("onMouseLeave",["mouseout","mouseover"]),J("onPointerEnter",["pointerout","pointerover"]),J("onPointerLeave",["pointerout","pointerover"]),Q("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Q("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Q("onBeforeInput",["compositionend","keypress","textInput","paste"]),Q("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Q("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Q("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _o="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Eo=new Set("cancel close invalid load scroll toggle".split(" ").concat(_o));function Lo(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,a,s,l){if(Tt.apply(this,arguments),_t){if(!_t)throw Error(Y(198));var c=Et;_t=!1,Et=null,Lt||(Lt=!0,Pt=c)}}(r,t,void 0,e),e.currentTarget=null}function Po(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;Lo(o,s,c),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;Lo(o,s,c),i=l}}}if(Lt)throw e=Pt,Lt=!1,Pt=null,e}function Oo(e,t){var n=t[ii];void 0===n&&(n=t[ii]=new Set);var r=e+"__bubble";n.has(r)||(Io(t,e,2,!1),n.add(r))}function To(e,t,n){var r=0;t&&(r|=4),Io(n,e,r,t)}var Mo="_reactListening"+Math.random().toString(36).slice(2);function Ao(e){if(!e[Mo]){e[Mo]=!0,X.forEach((function(t){"selectionchange"!==t&&(Eo.has(t)||To(t,!1,e),To(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Mo]||(t[Mo]=!0,To("selectionchange",!1,t))}}function Io(e,t,n,r){switch(Fn(t)){case 1:var o=Nn;break;case 4:o=Dn;break;default:o=zn}n=o.bind(null,t,n,e),o=void 0,!kt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ro(e,t,n,r,o){var i=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=li(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}xt((function(){var r=i,o=ut(n),a=[];e:{var s=xo.get(e);if(void 0!==s){var l=Jn,c=e;switch(e){case"keypress":if(0===Vn(n))break e;case"keydown":case"keyup":l=mr;break;case"focusin":c="focus",l=ir;break;case"focusout":c="blur",l=ir;break;case"beforeblur":case"afterblur":l=ir;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=rr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=or;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=yr;break;case mo:case vo:case yo:l=ar;break;case bo:l=br;break;case"scroll":l=tr;break;case"wheel":l=wr;break;case"copy":case"cut":case"paste":l=lr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=vr}var u=0!=(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var g=(f=p).stateNode;if(5===f.tag&&null!==g&&(f=g,null!==h&&(null!=(g=wt(p,h))&&u.push(No(p,g,f)))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,o),a.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===ct||!(c=n.relatedTarget||n.fromElement)||!li(c)&&!c[oi])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?li(c):null)&&(c!==(d=Mt(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=rr,g="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=vr,g="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?s:ui(l),f=null==c?s:ui(c),(s=new u(g,p+"leave",l,n,o)).target=d,s.relatedTarget=f,g=null,li(o)===r&&((u=new u(h,p+"enter",c,n,o)).target=f,u.relatedTarget=d,g=u),d=g,l&&c)e:{for(h=c,p=0,f=u=l;f;f=zo(f))p++;for(f=0,g=h;g;g=zo(g))f++;for(;0<p-f;)u=zo(u),p--;for(;0<f-p;)h=zo(h),f--;for(;p--;){if(u===h||null!==h&&u===h.alternate)break e;u=zo(u),h=zo(h)}u=null}else u=null;null!==l&&Bo(a,s,l,u,!1),null!==c&&null!==d&&Bo(a,d,c,u,!0)}if("select"===(l=(s=r?ui(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=jr;else if(Ir(s))if(Fr)m=Yr;else{m=qr;var v=Gr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=Zr);switch(m&&(m=m(e,r))?Rr(a,m,n,o):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&Ue(s,"number",s.value)),v=r?ui(r):window,e){case"focusin":(Ir(v)||"true"===v.contentEditable)&&(io=v,ao=r,so=null);break;case"focusout":so=ao=io=null;break;case"mousedown":lo=!0;break;case"contextmenu":case"mouseup":case"dragend":lo=!1,co(a,n,o);break;case"selectionchange":if(oo)break;case"keydown":case"keyup":co(a,n,o)}var y;if(Sr)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Mr?Or(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Er&&"ko"!==n.locale&&(Mr||"onCompositionStart"!==b?"onCompositionEnd"===b&&Mr&&(y=Un()):(Wn="value"in(Hn=o)?Hn.value:Hn.textContent,Mr=!0)),0<(v=Do(r,b)).length&&(b=new cr(b,e,null,n,o),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=Tr(n))&&(b.data=y))),(y=_r?function(e,t){switch(e){case"compositionend":return Tr(t);case"keypress":return 32!==t.which?null:(Pr=!0,Lr);case"textInput":return(e=t.data)===Lr&&Pr?null:e;default:return null}}(e,n):function(e,t){if(Mr)return"compositionend"===e||!Sr&&Or(e,t)?(e=Un(),$n=Wn=Hn=null,Mr=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Er&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Do(r,"onBeforeInput")).length&&(o=new cr("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Po(a,t)}))}function No(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Do(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=wt(e,n))&&r.unshift(No(e,i,o)),null!=(i=wt(e,t))&&r.push(No(e,i,o))),e=e.return}return r}function zo(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Bo(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=wt(n,i))&&a.unshift(No(n,l,s)):o||null!=(l=wt(n,i))&&a.push(No(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var jo=/\r\n?/g,Fo=/\u0000|\uFFFD/g;function Ho(e){return("string"==typeof e?e:""+e).replace(jo,"\n").replace(Fo,"")}function Wo(e,t,n){if(t=Ho(t),Ho(e)!==t&&n)throw Error(Y(425))}function $o(){}var Uo=null,Vo=null;function Go(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var qo="function"==typeof setTimeout?setTimeout:void 0,Zo="function"==typeof clearTimeout?clearTimeout:void 0,Yo="function"==typeof Promise?Promise:void 0,Xo="function"==typeof queueMicrotask?queueMicrotask:void 0!==Yo?function(e){return Yo.resolve(null).then(e).catch(Ko)}:qo;function Ko(e){setTimeout((function(){throw e}))}function Qo(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void An(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);An(t)}function Jo(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ei(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ti=Math.random().toString(36).slice(2),ni="__reactFiber$"+ti,ri="__reactProps$"+ti,oi="__reactContainer$"+ti,ii="__reactEvents$"+ti,ai="__reactListeners$"+ti,si="__reactHandles$"+ti;function li(e){var t=e[ni];if(t)return t;for(var n=e.parentNode;n;){if(t=n[oi]||n[ni]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ei(e);null!==e;){if(n=e[ni])return n;e=ei(e)}return t}n=(e=n).parentNode}return null}function ci(e){return!(e=e[ni]||e[oi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ui(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(Y(33))}function di(e){return e[ri]||null}var hi=[],fi=-1;function pi(e){return{current:e}}function gi(e){0>fi||(e.current=hi[fi],hi[fi]=null,fi--)}function mi(e,t){fi++,hi[fi]=e.current,e.current=t}var vi={},yi=pi(vi),bi=pi(!1),xi=vi;function wi(e,t){var n=e.type.contextTypes;if(!n)return vi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ki(e){return null!=(e=e.childContextTypes)}function Si(){gi(bi),gi(yi)}function Ci(e,t,n){if(yi.current!==vi)throw Error(Y(168));mi(yi,t),mi(bi,n)}function _i(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(Y(108,Ie(e)||"Unknown",o));return Le({},n,r)}function Ei(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vi,xi=yi.current,mi(yi,e),mi(bi,bi.current),!0}function Li(e,t,n){var r=e.stateNode;if(!r)throw Error(Y(169));n?(e=_i(e,t,xi),r.__reactInternalMemoizedMergedChildContext=e,gi(bi),gi(yi),mi(yi,e)):gi(bi),mi(bi,n)}var Pi=null,Oi=!1,Ti=!1;function Mi(e){null===Pi?Pi=[e]:Pi.push(e)}function Ai(){if(!Ti&&null!==Pi){Ti=!0;var e=0,t=cn;try{var n=Pi;for(cn=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Pi=null,Oi=!1}catch(T2){throw null!==Pi&&(Pi=Pi.slice(e+1)),Dt(Wt,Ai),T2}finally{cn=t,Ti=!1}}return null}var Ii=[],Ri=0,Ni=null,Di=0,zi=[],Bi=0,ji=null,Fi=1,Hi="";function Wi(e,t){Ii[Ri++]=Di,Ii[Ri++]=Ni,Ni=e,Di=t}function $i(e,t,n){zi[Bi++]=Fi,zi[Bi++]=Hi,zi[Bi++]=ji,ji=e;var r=Fi;e=Hi;var o=32-Yt(r)-1;r&=~(1<<o),n+=1;var i=32-Yt(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Fi=1<<32-Yt(t)+o|n<<o|r,Hi=i+e}else Fi=1<<i|n<<o|r,Hi=e}function Ui(e){null!==e.return&&(Wi(e,1),$i(e,1,0))}function Vi(e){for(;e===Ni;)Ni=Ii[--Ri],Ii[Ri]=null,Di=Ii[--Ri],Ii[Ri]=null;for(;e===ji;)ji=zi[--Bi],zi[Bi]=null,Hi=zi[--Bi],zi[Bi]=null,Fi=zi[--Bi],zi[Bi]=null}var Gi=null,qi=null,Zi=!1,Yi=null;function Xi(e,t){var n=xu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Ki(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Gi=e,qi=Jo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Gi=e,qi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==ji?{id:Fi,overflow:Hi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=xu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Gi=e,qi=null,!0);default:return!1}}function Qi(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function Ji(e){if(Zi){var t=qi;if(t){var n=t;if(!Ki(e,t)){if(Qi(e))throw Error(Y(418));t=Jo(n.nextSibling);var r=Gi;t&&Ki(e,t)?Xi(r,n):(e.flags=-4097&e.flags|2,Zi=!1,Gi=e)}}else{if(Qi(e))throw Error(Y(418));e.flags=-4097&e.flags|2,Zi=!1,Gi=e}}}function ea(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Gi=e}function ta(e){if(e!==Gi)return!1;if(!Zi)return ea(e),Zi=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Go(e.type,e.memoizedProps)),t&&(t=qi)){if(Qi(e))throw na(),Error(Y(418));for(;t;)Xi(e,t),t=Jo(t.nextSibling)}if(ea(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(Y(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){qi=Jo(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}qi=null}}else qi=Gi?Jo(e.stateNode.nextSibling):null;return!0}function na(){for(var e=qi;e;)e=Jo(e.nextSibling)}function ra(){qi=Gi=null,Zi=!1}function oa(e){null===Yi?Yi=[e]:Yi.push(e)}var ia=ue.ReactCurrentBatchConfig;function aa(e,t){if(e&&e.defaultProps){for(var n in t=Le({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var sa=pi(null),la=null,ca=null,ua=null;function da(){ua=ca=la=null}function ha(e){var t=sa.current;gi(sa),e._currentValue=t}function fa(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function pa(e,t){la=e,ua=ca=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(cl=!0),e.firstContext=null)}function ga(e){var t=e._currentValue;if(ua!==e)if(e={context:e,memoizedValue:t,next:null},null===ca){if(null===la)throw Error(Y(308));ca=e,la.dependencies={lanes:0,firstContext:e}}else ca=ca.next=e;return t}var ma=null;function va(e){null===ma?ma=[e]:ma.push(e)}function ya(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,va(t)):(n.next=o.next,o.next=n),t.interleaved=n,ba(e,r)}function ba(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var xa=!1;function wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ka(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Sa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ca(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&vc)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ba(e,n)}return null===(o=r.interleaved)?(t.next=t,va(r)):(t.next=o.next,o.next=t),r.interleaved=t,ba(e,n)}function _a(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,ln(e,n)}}function Ea(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function La(e,t,n,r){var o=e.updateQueue;xa=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?i=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(a=0,u=c=l=null,s=i;;){var h=s.lane,f=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,g=s;switch(h=t,f=n,g.tag){case 1:if("function"==typeof(p=g.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=g.payload)?p.call(f,d,h):p))break e;d=Le({},d,h);break e;case 2:xa=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=o.effects)?o.effects=[s]:h.push(s))}else f={eventTime:f,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,a|=h;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(h=s).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);_c|=a,e.lanes=a,e.memoizedState=d}}function Pa(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(Y(191,o));o.call(r)}}}var Oa=(new q.Component).refs;function Ta(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Le({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Ma={isMounted:function(e){return!!(e=e._reactInternals)&&Mt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=$c(),o=Uc(e),i=Sa(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=Ca(e,i,o))&&(Vc(t,e,o,r),_a(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=$c(),o=Uc(e),i=Sa(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=Ca(e,i,o))&&(Vc(t,e,o,r),_a(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=$c(),r=Uc(e),o=Sa(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Ca(e,o,r))&&(Vc(t,e,r,n),_a(t,e,r))}};function Aa(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!Kr(n,r)||!Kr(o,i))}function Ia(e,t,n){var r=!1,o=vi,i=t.contextType;return"object"==typeof i&&null!==i?i=ga(i):(o=ki(t)?xi:yi.current,i=(r=null!=(r=t.contextTypes))?wi(e,o):vi),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ma,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Ra(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ma.enqueueReplaceState(t,t.state,null)}function Na(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Oa,wa(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=ga(i):(i=ki(t)?xi:yi.current,o.context=wi(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(Ta(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Ma.enqueueReplaceState(o,o.state,null),La(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function Da(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(Y(309));var r=n.stateNode}if(!r)throw Error(Y(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs;t===Oa&&(t=o.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(Y(284));if(!n._owner)throw Error(Y(290,e))}return e}function za(e,t){throw e=Object.prototype.toString.call(t),Error(Y(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ba(e){return(0,e._init)(e._payload)}function ja(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=ku(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Eu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var i=n.type;return i===fe?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===ke&&Ba(i)===t.type)?((r=o(t,n.props)).ref=Da(e,t,n),r.return=e,r):((r=Su(n.type,n.key,n.props,null,e.mode,r)).ref=Da(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Lu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function u(e,t,n,r,i){return null===t||7!==t.tag?((t=Cu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Eu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case de:return(n=Su(t.type,t.key,t.props,null,e.mode,n)).ref=Da(e,null,t),n.return=e,n;case he:return(t=Lu(t,e.mode,n)).return=e,t;case ke:return d(e,(0,t._init)(t._payload),n)}if(Ve(t)||_e(t))return(t=Cu(t,e.mode,n,null)).return=e,t;za(e,t)}return null}function h(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case de:return n.key===o?l(e,t,n,r):null;case he:return n.key===o?c(e,t,n,r):null;case ke:return h(e,t,(o=n._init)(n._payload),r)}if(Ve(n)||_e(n))return null!==o?null:u(e,t,n,r,null);za(e,n)}return null}function f(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case de:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case he:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case ke:return f(e,t,n,(0,r._init)(r._payload),o)}if(Ve(r)||_e(r))return u(t,e=e.get(n)||null,r,o,null);za(t,r)}return null}function p(o,a,s,l){for(var c=null,u=null,p=a,g=a=0,m=null;null!==p&&g<s.length;g++){p.index>g?(m=p,p=null):m=p.sibling;var v=h(o,p,s[g],l);if(null===v){null===p&&(p=m);break}e&&p&&null===v.alternate&&t(o,p),a=i(v,a,g),null===u?c=v:u.sibling=v,u=v,p=m}if(g===s.length)return n(o,p),Zi&&Wi(o,g),c;if(null===p){for(;g<s.length;g++)null!==(p=d(o,s[g],l))&&(a=i(p,a,g),null===u?c=p:u.sibling=p,u=p);return Zi&&Wi(o,g),c}for(p=r(o,p);g<s.length;g++)null!==(m=f(p,o,g,s[g],l))&&(e&&null!==m.alternate&&p.delete(null===m.key?g:m.key),a=i(m,a,g),null===u?c=m:u.sibling=m,u=m);return e&&p.forEach((function(e){return t(o,e)})),Zi&&Wi(o,g),c}function g(o,a,s,l){var c=_e(s);if("function"!=typeof c)throw Error(Y(150));if(null==(s=c.call(s)))throw Error(Y(151));for(var u=c=null,p=a,g=a=0,m=null,v=s.next();null!==p&&!v.done;g++,v=s.next()){p.index>g?(m=p,p=null):m=p.sibling;var y=h(o,p,v.value,l);if(null===y){null===p&&(p=m);break}e&&p&&null===y.alternate&&t(o,p),a=i(y,a,g),null===u?c=y:u.sibling=y,u=y,p=m}if(v.done)return n(o,p),Zi&&Wi(o,g),c;if(null===p){for(;!v.done;g++,v=s.next())null!==(v=d(o,v.value,l))&&(a=i(v,a,g),null===u?c=v:u.sibling=v,u=v);return Zi&&Wi(o,g),c}for(p=r(o,p);!v.done;g++,v=s.next())null!==(v=f(p,o,g,v.value,l))&&(e&&null!==v.alternate&&p.delete(null===v.key?g:v.key),a=i(v,a,g),null===u?c=v:u.sibling=v,u=v);return e&&p.forEach((function(e){return t(o,e)})),Zi&&Wi(o,g),c}return function e(r,i,s,l){if("object"==typeof s&&null!==s&&s.type===fe&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case de:e:{for(var c=s.key,u=i;null!==u;){if(u.key===c){if((c=s.type)===fe){if(7===u.tag){n(r,u.sibling),(i=o(u,s.props.children)).return=r,r=i;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===ke&&Ba(c)===u.type){n(r,u.sibling),(i=o(u,s.props)).ref=Da(r,u,s),i.return=r,r=i;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===fe?((i=Cu(s.props.children,r.mode,l,s.key)).return=r,r=i):((l=Su(s.type,s.key,s.props,null,r.mode,l)).ref=Da(r,i,s),l.return=r,r=l)}return a(r);case he:e:{for(u=s.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===s.containerInfo&&i.stateNode.implementation===s.implementation){n(r,i.sibling),(i=o(i,s.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=Lu(s,r.mode,l)).return=r,r=i}return a(r);case ke:return e(r,i,(u=s._init)(s._payload),l)}if(Ve(s))return p(r,i,s,l);if(_e(s))return g(r,i,s,l);za(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,s)).return=r,r=i):(n(r,i),(i=Eu(s,r.mode,l)).return=r,r=i),a(r)):n(r,i)}}var Fa=ja(!0),Ha=ja(!1),Wa={},$a=pi(Wa),Ua=pi(Wa),Va=pi(Wa);function Ga(e){if(e===Wa)throw Error(Y(174));return e}function qa(e,t){switch(mi(Va,t),mi(Ua,e),mi($a,Wa),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Qe(null,"");break;default:t=Qe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}gi($a),mi($a,t)}function Za(){gi($a),gi(Ua),gi(Va)}function Ya(e){Ga(Va.current);var t=Ga($a.current),n=Qe(t,e.type);t!==n&&(mi(Ua,e),mi($a,n))}function Xa(e){Ua.current===e&&(gi($a),gi(Ua))}var Ka=pi(0);function Qa(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ja=[];function es(){for(var e=0;e<Ja.length;e++)Ja[e]._workInProgressVersionPrimary=null;Ja.length=0}var ts=ue.ReactCurrentDispatcher,ns=ue.ReactCurrentBatchConfig,rs=0,os=null,is=null,as=null,ss=!1,ls=!1,cs=0,us=0;function ds(){throw Error(Y(321))}function hs(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xr(e[n],t[n]))return!1;return!0}function fs(e,t,n,r,o,i){if(rs=i,os=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ts.current=null===e||null===e.memoizedState?Xs:Ks,e=n(r,o),ls){i=0;do{if(ls=!1,cs=0,25<=i)throw Error(Y(301));i+=1,as=is=null,t.updateQueue=null,ts.current=Qs,e=n(r,o)}while(ls)}if(ts.current=Ys,t=null!==is&&null!==is.next,rs=0,as=is=os=null,ss=!1,t)throw Error(Y(300));return e}function ps(){var e=0!==cs;return cs=0,e}function gs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===as?os.memoizedState=as=e:as=as.next=e,as}function ms(){if(null===is){var e=os.alternate;e=null!==e?e.memoizedState:null}else e=is.next;var t=null===as?os.memoizedState:as.next;if(null!==t)as=t,is=e;else{if(null===e)throw Error(Y(310));e={memoizedState:(is=e).memoizedState,baseState:is.baseState,baseQueue:is.baseQueue,queue:is.queue,next:null},null===as?os.memoizedState=as=e:as=as.next=e}return as}function vs(e,t){return"function"==typeof t?t(e):t}function ys(e){var t=ms(),n=t.queue;if(null===n)throw Error(Y(311));n.lastRenderedReducer=e;var r=is,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var s=a=null,l=null,c=i;do{var u=c.lane;if((rs&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,os.lanes|=u,_c|=u}c=c.next}while(null!==c&&c!==i);null===l?a=r:l.next=s,Xr(r,t.memoizedState)||(cl=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,os.lanes|=i,_c|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function bs(e){var t=ms(),n=t.queue;if(null===n)throw Error(Y(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var a=o=o.next;do{i=e(i,a.action),a=a.next}while(a!==o);Xr(i,t.memoizedState)||(cl=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function xs(){}function ws(e,t){var n=os,r=ms(),o=t(),i=!Xr(r.memoizedState,o);if(i&&(r.memoizedState=o,cl=!0),r=r.queue,Is(Cs.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==as&&1&as.memoizedState.tag){if(n.flags|=2048,Ps(9,Ss.bind(null,n,r,o,t),void 0,null),null===yc)throw Error(Y(349));0!=(30&rs)||ks(n,t,o)}return o}function ks(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=os.updateQueue)?(t={lastEffect:null,stores:null},os.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ss(e,t,n,r){t.value=n,t.getSnapshot=r,_s(t)&&Es(e)}function Cs(e,t,n){return n((function(){_s(t)&&Es(e)}))}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xr(e,n)}catch(aae){return!0}}function Es(e){var t=ba(e,1);null!==t&&Vc(t,e,1,-1)}function Ls(e){var t=gs();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:e},t.queue=e,e=e.dispatch=Vs.bind(null,os,e),[t.memoizedState,e]}function Ps(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=os.updateQueue)?(t={lastEffect:null,stores:null},os.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Os(){return ms().memoizedState}function Ts(e,t,n,r){var o=gs();os.flags|=e,o.memoizedState=Ps(1|t,n,void 0,void 0===r?null:r)}function Ms(e,t,n,r){var o=ms();r=void 0===r?null:r;var i=void 0;if(null!==is){var a=is.memoizedState;if(i=a.destroy,null!==r&&hs(r,a.deps))return void(o.memoizedState=Ps(t,n,i,r))}os.flags|=e,o.memoizedState=Ps(1|t,n,i,r)}function As(e,t){return Ts(8390656,8,e,t)}function Is(e,t){return Ms(2048,8,e,t)}function Rs(e,t){return Ms(4,2,e,t)}function Ns(e,t){return Ms(4,4,e,t)}function Ds(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function zs(e,t,n){return n=null!=n?n.concat([e]):null,Ms(4,4,Ds.bind(null,t,e),n)}function Bs(){}function js(e,t){var n=ms();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&hs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Fs(e,t){var n=ms();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&hs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Hs(e,t,n){return 0==(21&rs)?(e.baseState&&(e.baseState=!1,cl=!0),e.memoizedState=n):(Xr(n,t)||(n=on(),os.lanes|=n,_c|=n,e.baseState=!0),t)}function Ws(e,t){var n=cn;cn=0!==n&&4>n?n:4,e(!0);var r=ns.transition;ns.transition={};try{e(!1),t()}finally{cn=n,ns.transition=r}}function $s(){return ms().memoizedState}function Us(e,t,n){var r=Uc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Gs(e))qs(t,n);else if(null!==(n=ya(e,t,n,r))){Vc(n,e,r,$c()),Zs(n,t,r)}}function Vs(e,t,n){var r=Uc(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Gs(e))qs(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,Xr(s,a)){var l=t.interleaved;return null===l?(o.next=o,va(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(N2){}null!==(n=ya(e,t,o,r))&&(Vc(n,e,r,o=$c()),Zs(n,t,r))}}function Gs(e){var t=e.alternate;return e===os||null!==t&&t===os}function qs(e,t){ls=ss=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zs(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,ln(e,n)}}var Ys={readContext:ga,useCallback:ds,useContext:ds,useEffect:ds,useImperativeHandle:ds,useInsertionEffect:ds,useLayoutEffect:ds,useMemo:ds,useReducer:ds,useRef:ds,useState:ds,useDebugValue:ds,useDeferredValue:ds,useTransition:ds,useMutableSource:ds,useSyncExternalStore:ds,useId:ds,unstable_isNewReconciler:!1},Xs={readContext:ga,useCallback:function(e,t){return gs().memoizedState=[e,void 0===t?null:t],e},useContext:ga,useEffect:As,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ts(4194308,4,Ds.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ts(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ts(4,2,e,t)},useMemo:function(e,t){var n=gs();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gs();return t=void 0!==n?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=Us.bind(null,os,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},gs().memoizedState=e},useState:Ls,useDebugValue:Bs,useDeferredValue:function(e){return gs().memoizedState=e},useTransition:function(){var e=Ls(!1),t=e[0];return e=Ws.bind(null,e[1]),gs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=os,o=gs();if(Zi){if(void 0===n)throw Error(Y(407));n=n()}else{if(n=t(),null===yc)throw Error(Y(349));0!=(30&rs)||ks(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,As(Cs.bind(null,r,i,e),[e]),r.flags|=2048,Ps(9,Ss.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=gs(),t=yc.identifierPrefix;if(Zi){var n=Hi;t=":"+t+"R"+(n=(Fi&~(1<<32-Yt(Fi)-1)).toString(32)+n),0<(n=cs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=us++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ks={readContext:ga,useCallback:js,useContext:ga,useEffect:Is,useImperativeHandle:zs,useInsertionEffect:Rs,useLayoutEffect:Ns,useMemo:Fs,useReducer:ys,useRef:Os,useState:function(){return ys(vs)},useDebugValue:Bs,useDeferredValue:function(e){return Hs(ms(),is.memoizedState,e)},useTransition:function(){return[ys(vs)[0],ms().memoizedState]},useMutableSource:xs,useSyncExternalStore:ws,useId:$s,unstable_isNewReconciler:!1},Qs={readContext:ga,useCallback:js,useContext:ga,useEffect:Is,useImperativeHandle:zs,useInsertionEffect:Rs,useLayoutEffect:Ns,useMemo:Fs,useReducer:bs,useRef:Os,useState:function(){return bs(vs)},useDebugValue:Bs,useDeferredValue:function(e){var t=ms();return null===is?t.memoizedState=e:Hs(t,is.memoizedState,e)},useTransition:function(){return[bs(vs)[0],ms().memoizedState]},useMutableSource:xs,useSyncExternalStore:ws,useId:$s,unstable_isNewReconciler:!1};function Js(e,t){try{var n="",r=t;do{n+=Me(r),r=r.return}while(r);var o=n}catch(oae){o="\nError generating stack: "+oae.message+"\n"+oae.stack}return{value:e,source:t,stack:o,digest:null}}function el(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function tl(e,t){try{console.error(t.value)}catch(tae){setTimeout((function(){throw tae}))}}var nl="function"==typeof WeakMap?WeakMap:Map;function rl(e,t,n){(n=Sa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ic||(Ic=!0,Rc=r),tl(0,t)},n}function ol(e,t,n){(n=Sa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){tl(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){tl(0,t),"function"!=typeof r&&(null===Nc?Nc=new Set([this]):Nc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function il(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new nl;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=pu.bind(null,e,t,n),t.then(e,e))}function al(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function sl(e,t,n,r,o){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Sa(-1,1)).tag=2,Ca(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var ll=ue.ReactCurrentOwner,cl=!1;function ul(e,t,n,r){t.child=null===e?Ha(t,null,n,r):Fa(t,e.child,n,r)}function dl(e,t,n,r,o){n=n.render;var i=t.ref;return pa(t,o),r=fs(e,t,n,r,i,o),n=ps(),null===e||cl?(Zi&&n&&Ui(t),t.flags|=1,ul(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Il(e,t,o))}function hl(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||wu(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Su(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,fl(e,t,i,r,o))}if(i=e.child,0==(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:Kr)(a,r)&&e.ref===t.ref)return Il(e,t,o)}return t.flags|=1,(e=ku(i,r)).ref=t.ref,e.return=t,t.child=e}function fl(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(Kr(i,r)&&e.ref===t.ref){if(cl=!1,t.pendingProps=r=i,0==(e.lanes&o))return t.lanes=e.lanes,Il(e,t,o);0!=(131072&e.flags)&&(cl=!0)}}return ml(e,t,n,r,o)}function pl(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},mi(kc,wc),wc|=n;else{if(0==(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,mi(kc,wc),wc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,mi(kc,wc),wc|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,mi(kc,wc),wc|=r;return ul(e,t,o,n),t.child}function gl(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ml(e,t,n,r,o){var i=ki(n)?xi:yi.current;return i=wi(t,i),pa(t,o),n=fs(e,t,n,r,i,o),r=ps(),null===e||cl?(Zi&&r&&Ui(t),t.flags|=1,ul(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Il(e,t,o))}function vl(e,t,n,r,o){if(ki(n)){var i=!0;Ei(t)}else i=!1;if(pa(t,o),null===t.stateNode)Al(e,t),Ia(t,n,r),Na(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=ga(c):c=wi(t,c=ki(n)?xi:yi.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&Ra(t,a,r,c),xa=!1;var h=t.memoizedState;a.state=h,La(t,r,a,o),l=t.memoizedState,s!==r||h!==l||bi.current||xa?("function"==typeof u&&(Ta(t,n,u,r),l=t.memoizedState),(s=xa||Aa(t,n,s,r,h,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ka(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:aa(t.type,s),a.props=c,d=t.pendingProps,h=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=ga(l):l=wi(t,l=ki(n)?xi:yi.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&Ra(t,a,r,l),xa=!1,h=t.memoizedState,a.state=h,La(t,r,a,o);var p=t.memoizedState;s!==d||h!==p||bi.current||xa?("function"==typeof f&&(Ta(t,n,f,r),p=t.memoizedState),(c=xa||Aa(t,n,c,r,h,p,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return yl(e,t,n,r,i,o)}function yl(e,t,n,r,o,i){gl(e,t);var a=0!=(128&t.flags);if(!r&&!a)return o&&Li(t,n,!1),Il(e,t,i);r=t.stateNode,ll.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Fa(t,e.child,null,i),t.child=Fa(t,null,s,i)):ul(e,t,s,i),t.memoizedState=r.state,o&&Li(t,n,!0),t.child}function bl(e){var t=e.stateNode;t.pendingContext?Ci(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ci(0,t.context,!1),qa(e,t.containerInfo)}function xl(e,t,n,r,o){return ra(),oa(o),t.flags|=256,ul(e,t,n,r),t.child}var wl,kl,Sl,Cl={dehydrated:null,treeContext:null,retryLane:0};function _l(e){return{baseLanes:e,cachePool:null,transitions:null}}function El(e,t,n){var r,o=t.pendingProps,i=Ka.current,a=!1,s=0!=(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!=(2&i)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),mi(Ka,1&i),null===e)return Ji(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(s=o.children,e=o.fallback,a?(o=t.mode,a=t.child,s={mode:"hidden",children:s},0==(1&o)&&null!==a?(a.childLanes=0,a.pendingProps=s):a=_u(s,o,0,null),e=Cu(e,o,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=_l(n),t.memoizedState=Cl,e):Ll(t,s));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,a){if(n)return 256&t.flags?(t.flags&=-257,Pl(e,t,a,r=el(Error(Y(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=_u({mode:"visible",children:r.children},o,0,null),(i=Cu(i,o,a,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,0!=(1&t.mode)&&Fa(t,e.child,null,a),t.child.memoizedState=_l(a),t.memoizedState=Cl,i);if(0==(1&t.mode))return Pl(e,t,a,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var s=r.dgst;return r=s,Pl(e,t,a,r=el(i=Error(Y(419)),r,void 0))}if(s=0!=(a&e.childLanes),cl||s){if(null!==(r=yc)){switch(a&-a){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|a))?0:o)&&o!==i.retryLane&&(i.retryLane=o,ba(e,o),Vc(r,e,o,-1))}return ou(),Pl(e,t,a,r=el(Error(Y(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=mu.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,qi=Jo(o.nextSibling),Gi=t,Zi=!0,Yi=null,null!==e&&(zi[Bi++]=Fi,zi[Bi++]=Hi,zi[Bi++]=ji,Fi=e.id,Hi=e.overflow,ji=t),t=Ll(t,r.children),t.flags|=4096,t)}(e,t,s,o,r,i,n);if(a){a=o.fallback,s=t.mode,r=(i=e.child).sibling;var l={mode:"hidden",children:o.children};return 0==(1&s)&&t.child!==i?((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null):(o=ku(i,l)).subtreeFlags=14680064&i.subtreeFlags,null!==r?a=ku(r,a):(a=Cu(a,s,n,null)).flags|=2,a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,s=null===(s=e.child.memoizedState)?_l(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Cl,o}return e=(a=e.child).sibling,o=ku(a,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Ll(e,t){return(t=_u({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Pl(e,t,n,r){return null!==r&&oa(r),Fa(t,e.child,null,n),(e=Ll(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ol(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),fa(e.return,t,n)}function Tl(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Ml(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ul(e,t,r.children,n),0!=(2&(r=Ka.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ol(e,n,t);else if(19===e.tag)Ol(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(mi(Ka,r),0==(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Qa(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Tl(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Qa(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Tl(t,!0,n,null,i);break;case"together":Tl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Al(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Il(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),_c|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(Y(153));if(null!==t.child){for(n=ku(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ku(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Rl(e,t){if(!Zi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Dl(e,t,n){var r=t.pendingProps;switch(Vi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nl(t),null;case 1:case 17:return ki(t.type)&&Si(),Nl(t),null;case 3:return r=t.stateNode,Za(),gi(bi),gi(yi),es(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ta(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==Yi&&(Yc(Yi),Yi=null))),Nl(t),null;case 5:Xa(t);var o=Ga(Va.current);if(n=t.type,null!==e&&null!=t.stateNode)kl(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(Y(166));return Nl(t),null}if(e=Ga($a.current),ta(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[ni]=t,r[ri]=i,e=0!=(1&t.mode),n){case"dialog":Oo("cancel",r),Oo("close",r);break;case"iframe":case"object":case"embed":Oo("load",r);break;case"video":case"audio":for(o=0;o<_o.length;o++)Oo(_o[o],r);break;case"source":Oo("error",r);break;case"img":case"image":case"link":Oo("error",r),Oo("load",r);break;case"details":Oo("toggle",r);break;case"input":Fe(r,i),Oo("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Oo("invalid",r);break;case"textarea":Ze(r,i),Oo("invalid",r)}for(var a in st(n,i),o=null,i)if(i.hasOwnProperty(a)){var s=i[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==i.suppressHydrationWarning&&Wo(r.textContent,s,e),o=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==i.suppressHydrationWarning&&Wo(r.textContent,s,e),o=["children",""+s]):K.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&Oo("scroll",r)}switch(n){case"input":De(r),$e(r,i,!0);break;case"textarea":De(r),Xe(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=$o)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=Ke(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ni]=t,e[ri]=r,wl(e,t),t.stateNode=e;e:{switch(a=lt(n,r),n){case"dialog":Oo("cancel",e),Oo("close",e),o=r;break;case"iframe":case"object":case"embed":Oo("load",e),o=r;break;case"video":case"audio":for(o=0;o<_o.length;o++)Oo(_o[o],e);o=r;break;case"source":Oo("error",e),o=r;break;case"img":case"image":case"link":Oo("error",e),Oo("load",e),o=r;break;case"details":Oo("toggle",e),o=r;break;case"input":Fe(e,r),o=je(e,r),Oo("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Le({},r,{value:void 0}),Oo("invalid",e);break;case"textarea":Ze(e,r),o=qe(e,r),Oo("invalid",e)}for(i in st(n,o),s=o)if(s.hasOwnProperty(i)){var l=s[i];"style"===i?it(e,l):"dangerouslySetInnerHTML"===i?null!=(l=l?l.__html:void 0)&&et(e,l):"children"===i?"string"==typeof l?("textarea"!==n||""!==l)&&tt(e,l):"number"==typeof l&&tt(e,""+l):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(K.hasOwnProperty(i)?null!=l&&"onScroll"===i&&Oo("scroll",e):null!=l&&ce(e,i,l,a))}switch(n){case"input":De(e),$e(e,r,!1);break;case"textarea":De(e),Xe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Re(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?Ge(e,!!r.multiple,i,!1):null!=r.defaultValue&&Ge(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=$o)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Nl(t),null;case 6:if(e&&null!=t.stateNode)Sl(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(Y(166));if(n=Ga(Va.current),Ga($a.current),ta(t)){if(r=t.stateNode,n=t.memoizedProps,r[ni]=t,(i=r.nodeValue!==n)&&null!==(e=Gi))switch(e.tag){case 3:Wo(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Wo(r.nodeValue,n,0!=(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ni]=t,t.stateNode=r}return Nl(t),null;case 13:if(gi(Ka),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(Zi&&null!==qi&&0!=(1&t.mode)&&0==(128&t.flags))na(),ra(),t.flags|=98560,i=!1;else if(i=ta(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(Y(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(Y(317));i[ni]=t}else ra(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Nl(t),i=!1}else null!==Yi&&(Yc(Yi),Yi=null),i=!0;if(!i)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&Ka.current)?0===Sc&&(Sc=3):ou())),null!==t.updateQueue&&(t.flags|=4),Nl(t),null);case 4:return Za(),null===e&&Ao(t.stateNode.containerInfo),Nl(t),null;case 10:return ha(t.type._context),Nl(t),null;case 19:if(gi(Ka),null===(i=t.memoizedState))return Nl(t),null;if(r=0!=(128&t.flags),null===(a=i.rendering))if(r)Rl(i,!1);else{if(0!==Sc||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=Qa(e))){for(t.flags|=128,Rl(i,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(a=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return mi(Ka,1&Ka.current|2),t.child}e=e.sibling}null!==i.tail&&Ft()>Mc&&(t.flags|=128,r=!0,Rl(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=Qa(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Rl(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!Zi)return Nl(t),null}else 2*Ft()-i.renderingStartTime>Mc&&1073741824!==n&&(t.flags|=128,r=!0,Rl(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=i.last)?n.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ft(),t.sibling=null,n=Ka.current,mi(Ka,r?1&n|2:1&n),t):(Nl(t),null);case 22:case 23:return eu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&wc)&&(Nl(t),6&t.subtreeFlags&&(t.flags|=8192)):Nl(t),null;case 24:case 25:return null}throw Error(Y(156,t.tag))}function zl(e,t){switch(Vi(t),t.tag){case 1:return ki(t.type)&&Si(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Za(),gi(bi),gi(yi),es(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Xa(t),null;case 13:if(gi(Ka),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(Y(340));ra()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return gi(Ka),null;case 4:return Za(),null;case 10:return ha(t.type._context),null;case 22:case 23:return eu(),null;default:return null}}wl=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},kl=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ga($a.current);var i,a=null;switch(n){case"input":o=je(e,o),r=je(e,r),a=[];break;case"select":o=Le({},o,{value:void 0}),r=Le({},r,{value:void 0}),a=[];break;case"textarea":o=qe(e,o),r=qe(e,r),a=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=$o)}for(c in st(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var s=o[c];for(i in s)s.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(K.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(K.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&Oo("scroll",e),a||s===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Sl=function(e,t,n,r){n!==r&&(t.flags|=4)};var Bl=!1,jl=!1,Fl="function"==typeof WeakSet?WeakSet:Set,Hl=null;function Wl(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(aae){fu(e,t,aae)}else n.current=null}function $l(e,t,n){try{n()}catch(aae){fu(e,t,aae)}}var Ul=!1;function Vl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&$l(t,n,i)}o=o.next}while(o!==r)}}function Gl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 ql(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function Zl(e){var t=e.alternate;null!==t&&(e.alternate=null,Zl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ni],delete t[ri],delete t[ii],delete t[ai],delete t[si])),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 Yl(e){return 5===e.tag||3===e.tag||4===e.tag}function Xl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Yl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Kl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=$o));else if(4!==r&&null!==(e=e.child))for(Kl(e,t,n),e=e.sibling;null!==e;)Kl(e,t,n),e=e.sibling}function Ql(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Ql(e,t,n),e=e.sibling;null!==e;)Ql(e,t,n),e=e.sibling}var Jl=null,ec=!1;function tc(e,t,n){for(n=n.child;null!==n;)nc(e,t,n),n=n.sibling}function nc(e,t,n){if(Zt&&"function"==typeof Zt.onCommitFiberUnmount)try{Zt.onCommitFiberUnmount(qt,n)}catch(sae){}switch(n.tag){case 5:jl||Wl(n,t);case 6:var r=Jl,o=ec;Jl=null,tc(e,t,n),ec=o,null!==(Jl=r)&&(ec?(e=Jl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):Jl.removeChild(n.stateNode));break;case 18:null!==Jl&&(ec?(e=Jl,n=n.stateNode,8===e.nodeType?Qo(e.parentNode,n):1===e.nodeType&&Qo(e,n),An(e)):Qo(Jl,n.stateNode));break;case 4:r=Jl,o=ec,Jl=n.stateNode.containerInfo,ec=!0,tc(e,t,n),Jl=r,ec=o;break;case 0:case 11:case 14:case 15:if(!jl&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!=(2&i)||0!=(4&i))&&$l(n,t,a),o=o.next}while(o!==r)}tc(e,t,n);break;case 1:if(!jl&&(Wl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(sae){fu(n,t,sae)}tc(e,t,n);break;case 21:tc(e,t,n);break;case 22:1&n.mode?(jl=(r=jl)||null!==n.memoizedState,tc(e,t,n),jl=r):tc(e,t,n);break;default:tc(e,t,n)}}function rc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Fl),t.forEach((function(t){var r=vu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function oc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:Jl=s.stateNode,ec=!1;break e;case 3:case 4:Jl=s.stateNode.containerInfo,ec=!0;break e}s=s.return}if(null===Jl)throw Error(Y(160));nc(i,a,o),Jl=null,ec=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(N2){fu(o,t,N2)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ic(t,e),t=t.sibling}function ic(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(oc(t,e),ac(e),4&r){try{Vl(3,e,e.return),Gl(3,e)}catch(F2){fu(e,e.return,F2)}try{Vl(5,e,e.return)}catch(F2){fu(e,e.return,F2)}}break;case 1:oc(t,e),ac(e),512&r&&null!==n&&Wl(n,n.return);break;case 5:if(oc(t,e),ac(e),512&r&&null!==n&&Wl(n,n.return),32&e.flags){var o=e.stateNode;try{tt(o,"")}catch(F2){fu(e,e.return,F2)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,a=null!==n?n.memoizedProps:i,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===i.type&&null!=i.name&&He(o,i),lt(s,a);var c=lt(s,i);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];"style"===u?it(o,d):"dangerouslySetInnerHTML"===u?et(o,d):"children"===u?tt(o,d):ce(o,u,d,c)}switch(s){case"input":We(o,i);break;case"textarea":Ye(o,i);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var f=i.value;null!=f?Ge(o,!!i.multiple,f,!1):h!==!!i.multiple&&(null!=i.defaultValue?Ge(o,!!i.multiple,i.defaultValue,!0):Ge(o,!!i.multiple,i.multiple?[]:"",!1))}o[ri]=i}catch(F2){fu(e,e.return,F2)}}break;case 6:if(oc(t,e),ac(e),4&r){if(null===e.stateNode)throw Error(Y(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(F2){fu(e,e.return,F2)}}break;case 3:if(oc(t,e),ac(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{An(t.containerInfo)}catch(F2){fu(e,e.return,F2)}break;case 4:default:oc(t,e),ac(e);break;case 13:oc(t,e),ac(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(Tc=Ft())),4&r&&rc(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(jl=(c=jl)||u,oc(t,e),jl=c):oc(t,e),ac(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&0!=(1&e.mode))for(Hl=e,u=e.child;null!==u;){for(d=Hl=u;null!==Hl;){switch(f=(h=Hl).child,h.tag){case 0:case 11:case 14:case 15:Vl(4,h,h.return);break;case 1:Wl(h,h.return);var p=h.stateNode;if("function"==typeof p.componentWillUnmount){r=h,n=h.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(F2){fu(r,n,F2)}}break;case 5:Wl(h,h.return);break;case 22:if(null!==h.memoizedState){uc(d);continue}}null!==f?(f.return=h,Hl=f):uc(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{o=d.stateNode,c?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=ot("display",a))}catch(F2){fu(e,e.return,F2)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(F2){fu(e,e.return,F2)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:oc(t,e),ac(e),4&r&&rc(e);case 21:}}function ac(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Yl(n)){var r=n;break e}n=n.return}throw Error(Y(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(tt(o,""),r.flags&=-33),Ql(e,Xl(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;Kl(e,Xl(e),i);break;default:throw Error(Y(161))}}catch(pae){fu(e,e.return,pae)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function sc(e,t,n){Hl=e,lc(e)}function lc(e,t,n){for(var r=0!=(1&e.mode);null!==Hl;){var o=Hl,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Bl;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||jl;s=Bl;var c=jl;if(Bl=a,(jl=l)&&!c)for(Hl=o;null!==Hl;)l=(a=Hl).child,22===a.tag&&null!==a.memoizedState?dc(o):null!==l?(l.return=a,Hl=l):dc(o);for(;null!==i;)Hl=i,lc(i),i=i.sibling;Hl=o,Bl=s,jl=c}cc(e)}else 0!=(8772&o.subtreeFlags)&&null!==i?(i.return=o,Hl=i):cc(e)}}function cc(e){for(;null!==Hl;){var t=Hl;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:jl||Gl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!jl)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:aa(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&Pa(t,i,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Pa(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&An(d)}}}break;default:throw Error(Y(163))}jl||512&t.flags&&ql(t)}catch(h2){fu(t,t.return,h2)}}if(t===e){Hl=null;break}if(null!==(n=t.sibling)){n.return=t.return,Hl=n;break}Hl=t.return}}function uc(e){for(;null!==Hl;){var t=Hl;if(t===e){Hl=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Hl=n;break}Hl=t.return}}function dc(e){for(;null!==Hl;){var t=Hl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Gl(4,t)}catch(pae){fu(t,n,pae)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(pae){fu(t,o,pae)}}var i=t.return;try{ql(t)}catch(pae){fu(t,i,pae)}break;case 5:var a=t.return;try{ql(t)}catch(pae){fu(t,a,pae)}}}catch(pae){fu(t,t.return,pae)}if(t===e){Hl=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Hl=s;break}Hl=t.return}}var hc,fc=Math.ceil,pc=ue.ReactCurrentDispatcher,gc=ue.ReactCurrentOwner,mc=ue.ReactCurrentBatchConfig,vc=0,yc=null,bc=null,xc=0,wc=0,kc=pi(0),Sc=0,Cc=null,_c=0,Ec=0,Lc=0,Pc=null,Oc=null,Tc=0,Mc=1/0,Ac=null,Ic=!1,Rc=null,Nc=null,Dc=!1,zc=null,Bc=0,jc=0,Fc=null,Hc=-1,Wc=0;function $c(){return 0!=(6&vc)?Ft():-1!==Hc?Hc:Hc=Ft()}function Uc(e){return 0==(1&e.mode)?1:0!=(2&vc)&&0!==xc?xc&-xc:null!==ia.transition?(0===Wc&&(Wc=on()),Wc):0!==(e=cn)?e:e=void 0===(e=window.event)?16:Fn(e.type)}function Vc(e,t,n,r){if(50<jc)throw jc=0,Fc=null,Error(Y(185));sn(e,n,r),0!=(2&vc)&&e===yc||(e===yc&&(0==(2&vc)&&(Ec|=n),4===Sc&&Xc(e,xc)),Gc(e,r),1===n&&0===vc&&0==(1&t.mode)&&(Mc=Ft()+500,Oi&&Ai()))}function Gc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Yt(i),s=1<<a,l=o[a];-1===l?0!=(s&n)&&0==(s&r)||(o[a]=nn(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=tn(e,e===yc?xc:0);if(0===r)null!==n&&zt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&zt(n),1===t)0===e.tag?function(e){Oi=!0,Mi(e)}(Kc.bind(null,e)):Mi(Kc.bind(null,e)),Xo((function(){0==(6&vc)&&Ai()})),n=null;else{switch(un(r)){case 1:n=Wt;break;case 4:n=$t;break;case 16:default:n=Ut;break;case 536870912:n=Gt}n=yu(n,qc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qc(e,t){if(Hc=-1,Wc=0,0!=(6&vc))throw Error(Y(327));var n=e.callbackNode;if(du()&&e.callbackNode!==n)return null;var r=tn(e,e===yc?xc:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=iu(e,r);else{t=r;var o=vc;vc|=2;var i=ru();for(yc===e&&xc===t||(Ac=null,Mc=Ft()+500,tu(e,t));;)try{su();break}catch(sae){nu(e,sae)}da(),pc.current=i,vc=o,null!==bc?t=0:(yc=null,xc=0,t=Sc)}if(0!==t){if(2===t&&(0!==(o=rn(e))&&(r=o,t=Zc(e,o))),1===t)throw n=Cc,tu(e,0),Xc(e,r),Gc(e,Ft()),n;if(6===t)Xc(e,r);else{if(o=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!Xr(i(),o))return!1}catch(a){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=iu(e,r))&&(0!==(i=rn(e))&&(r=i,t=Zc(e,i))),1===t))throw n=Cc,tu(e,0),Xc(e,r),Gc(e,Ft()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(Y(345));case 2:case 5:uu(e,Oc,Ac);break;case 3:if(Xc(e,r),(130023424&r)===r&&10<(t=Tc+500-Ft())){if(0!==tn(e,0))break;if(((o=e.suspendedLanes)&r)!==r){$c(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=qo(uu.bind(null,e,Oc,Ac),t);break}uu(e,Oc,Ac);break;case 4:if(Xc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-Yt(r);i=1<<a,(a=t[a])>o&&(o=a),r&=~i}if(r=o,10<(r=(120>(r=Ft()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*fc(r/1960))-r)){e.timeoutHandle=qo(uu.bind(null,e,Oc,Ac),r);break}uu(e,Oc,Ac);break;default:throw Error(Y(329))}}}return Gc(e,Ft()),e.callbackNode===n?qc.bind(null,e):null}function Zc(e,t){var n=Pc;return e.current.memoizedState.isDehydrated&&(tu(e,t).flags|=256),2!==(e=iu(e,t))&&(t=Oc,Oc=n,null!==t&&Yc(t)),e}function Yc(e){null===Oc?Oc=e:Oc.push.apply(Oc,e)}function Xc(e,t){for(t&=~Lc,t&=~Ec,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Yt(t),r=1<<n;e[n]=-1,t&=~r}}function Kc(e){if(0!=(6&vc))throw Error(Y(327));du();var t=tn(e,0);if(0==(1&t))return Gc(e,Ft()),null;var n=iu(e,t);if(0!==e.tag&&2===n){var r=rn(e);0!==r&&(t=r,n=Zc(e,r))}if(1===n)throw n=Cc,tu(e,0),Xc(e,t),Gc(e,Ft()),n;if(6===n)throw Error(Y(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,uu(e,Oc,Ac),Gc(e,Ft()),null}function Qc(e,t){var n=vc;vc|=1;try{return e(t)}finally{0===(vc=n)&&(Mc=Ft()+500,Oi&&Ai())}}function Jc(e){null!==zc&&0===zc.tag&&0==(6&vc)&&du();var t=vc;vc|=1;var n=mc.transition,r=cn;try{if(mc.transition=null,cn=1,e)return e()}finally{cn=r,mc.transition=n,0==(6&(vc=t))&&Ai()}}function eu(){wc=kc.current,gi(kc)}function tu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Zo(n)),null!==bc)for(n=bc.return;null!==n;){var r=n;switch(Vi(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Si();break;case 3:Za(),gi(bi),gi(yi),es();break;case 5:Xa(r);break;case 4:Za();break;case 13:case 19:gi(Ka);break;case 10:ha(r.type._context);break;case 22:case 23:eu()}n=n.return}if(yc=e,bc=e=ku(e.current,null),xc=wc=t,Sc=0,Cc=null,Lc=Ec=_c=0,Oc=Pc=null,null!==ma){for(t=0;t<ma.length;t++)if(null!==(r=(n=ma[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}ma=null}return e}function nu(e,t){for(;;){var n=bc;try{if(da(),ts.current=Ys,ss){for(var r=os.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ss=!1}if(rs=0,as=is=os=null,ls=!1,cs=0,gc.current=null,null===n||null===n.return){Sc=1,Cc=t,bc=null;break}e:{var i=e,a=n.return,s=n,l=t;if(t=xc,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=s,d=u.tag;if(0==(1&u.mode)&&(0===d||11===d||15===d)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=al(a);if(null!==f){f.flags&=-257,sl(f,a,s,0,t),1&f.mode&&il(i,c,t),l=c;var p=(t=f).updateQueue;if(null===p){var g=new Set;g.add(l),t.updateQueue=g}else p.add(l);break e}if(0==(1&t)){il(i,c,t),ou();break e}l=Error(Y(426))}else if(Zi&&1&s.mode){var m=al(a);if(null!==m){0==(65536&m.flags)&&(m.flags|=256),sl(m,a,s,0,t),oa(Js(l,s));break e}}i=l=Js(l,s),4!==Sc&&(Sc=2),null===Pc?Pc=[i]:Pc.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,Ea(i,rl(0,l,t));break e;case 1:s=l;var v=i.type,y=i.stateNode;if(0==(128&i.flags)&&("function"==typeof v.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===Nc||!Nc.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t,Ea(i,ol(i,s,t));break e}}i=i.return}while(null!==i)}cu(n)}catch(b){t=b,bc===n&&null!==n&&(bc=n=n.return);continue}break}}function ru(){var e=pc.current;return pc.current=Ys,null===e?Ys:e}function ou(){0!==Sc&&3!==Sc&&2!==Sc||(Sc=4),null===yc||0==(268435455&_c)&&0==(268435455&Ec)||Xc(yc,xc)}function iu(e,t){var n=vc;vc|=2;var r=ru();for(yc===e&&xc===t||(Ac=null,tu(e,t));;)try{au();break}catch(T2){nu(e,T2)}if(da(),vc=n,pc.current=r,null!==bc)throw Error(Y(261));return yc=null,xc=0,Sc}function au(){for(;null!==bc;)lu(bc)}function su(){for(;null!==bc&&!Bt();)lu(bc)}function lu(e){var t=hc(e.alternate,e,wc);e.memoizedProps=e.pendingProps,null===t?cu(e):bc=t,gc.current=null}function cu(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Dl(n,t,wc)))return void(bc=n)}else{if(null!==(n=zl(n,t)))return n.flags&=32767,void(bc=n);if(null===e)return Sc=6,void(bc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(bc=t);bc=t=e}while(null!==t);0===Sc&&(Sc=5)}function uu(e,t,n){var r=cn,o=mc.transition;try{mc.transition=null,cn=1,function(e,t,n,r){do{du()}while(null!==zc);if(0!=(6&vc))throw Error(Y(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Y(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(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<n;){var o=31-Yt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,i),e===yc&&(bc=yc=null,xc=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Dc||(Dc=!0,yu(Ut,(function(){return du(),null}))),i=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||i){i=mc.transition,mc.transition=null;var a=cn;cn=1;var s=vc;vc|=4,gc.current=null,function(e,t){if(Uo=Rn,no(e=to())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(vae){n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var f;d!==n||0!==o&&3!==d.nodeType||(s=a+o),d!==i||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(f=d.firstChild);)h=d,d=f;for(;;){if(d===e)break t;if(h===n&&++c===o&&(s=a),h===i&&++u===r&&(l=a),null!==(f=d.nextSibling))break;h=(d=h).parentNode}d=f}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vo={focusedElem:e,selectionRange:n},Rn=!1,Hl=t;null!==Hl;)if(e=(t=Hl).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Hl=e;else for(;null!==Hl;){t=Hl;try{var p=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==p){var g=p.memoizedProps,m=p.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:aa(t.type,g),m);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(Y(163))}}catch(vae){fu(t,t.return,vae)}if(null!==(e=t.sibling)){e.return=t.return,Hl=e;break}Hl=t.return}p=Ul,Ul=!1}(e,n),ic(n,e),ro(Vo),Rn=!!Uo,Vo=Uo=null,e.current=n,sc(n),jt(),vc=s,cn=a,mc.transition=i}else e.current=n;if(Dc&&(Dc=!1,zc=e,Bc=o),i=e.pendingLanes,0===i&&(Nc=null),function(e){if(Zt&&"function"==typeof Zt.onCommitFiberRoot)try{Zt.onCommitFiberRoot(qt,e,void 0,128==(128&e.current.flags))}catch(t){}}(n.stateNode),Gc(e,Ft()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ic)throw Ic=!1,e=Rc,Rc=null,e;0!=(1&Bc)&&0!==e.tag&&du(),i=e.pendingLanes,0!=(1&i)?e===Fc?jc++:(jc=0,Fc=e):jc=0,Ai()}(e,t,n,r)}finally{mc.transition=o,cn=r}return null}function du(){if(null!==zc){var e=un(Bc),t=mc.transition,n=cn;try{if(mc.transition=null,cn=16>e?16:e,null===zc)var r=!1;else{if(e=zc,zc=null,Bc=0,0!=(6&vc))throw Error(Y(331));var o=vc;for(vc|=4,Hl=e.current;null!==Hl;){var i=Hl,a=i.child;if(0!=(16&Hl.flags)){var s=i.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(Hl=c;null!==Hl;){var u=Hl;switch(u.tag){case 0:case 11:case 15:Vl(8,u,i)}var d=u.child;if(null!==d)d.return=u,Hl=d;else for(;null!==Hl;){var h=(u=Hl).sibling,f=u.return;if(Zl(u),u===c){Hl=null;break}if(null!==h){h.return=f,Hl=h;break}Hl=f}}}var p=i.alternate;if(null!==p){var g=p.child;if(null!==g){p.child=null;do{var m=g.sibling;g.sibling=null,g=m}while(null!==g)}}Hl=i}}if(0!=(2064&i.subtreeFlags)&&null!==a)a.return=i,Hl=a;else e:for(;null!==Hl;){if(0!=(2048&(i=Hl).flags))switch(i.tag){case 0:case 11:case 15:Vl(9,i,i.return)}var v=i.sibling;if(null!==v){v.return=i.return,Hl=v;break e}Hl=i.return}}var y=e.current;for(Hl=y;null!==Hl;){var b=(a=Hl).child;if(0!=(2064&a.subtreeFlags)&&null!==b)b.return=a,Hl=b;else e:for(a=y;null!==Hl;){if(0!=(2048&(s=Hl).flags))try{switch(s.tag){case 0:case 11:case 15:Gl(9,s)}}catch(w){fu(s,s.return,w)}if(s===a){Hl=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,Hl=x;break e}Hl=s.return}}if(vc=o,Ai(),Zt&&"function"==typeof Zt.onPostCommitFiberRoot)try{Zt.onPostCommitFiberRoot(qt,e)}catch(w){}r=!0}return r}finally{cn=n,mc.transition=t}}return!1}function hu(e,t,n){e=Ca(e,t=rl(0,t=Js(n,t),1),1),t=$c(),null!==e&&(sn(e,1,t),Gc(e,t))}function fu(e,t,n){if(3===e.tag)hu(e,e,n);else for(;null!==t;){if(3===t.tag){hu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Nc||!Nc.has(r))){t=Ca(t,e=ol(t,e=Js(n,e),1),1),e=$c(),null!==t&&(sn(t,1,e),Gc(t,e));break}}t=t.return}}function pu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=$c(),e.pingedLanes|=e.suspendedLanes&n,yc===e&&(xc&n)===n&&(4===Sc||3===Sc&&(130023424&xc)===xc&&500>Ft()-Tc?tu(e,0):Lc|=n),Gc(e,t)}function gu(e,t){0===t&&(0==(1&e.mode)?t=1:(t=Jt,0==(130023424&(Jt<<=1))&&(Jt=4194304)));var n=$c();null!==(e=ba(e,t))&&(sn(e,t,n),Gc(e,n))}function mu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),gu(e,n)}function vu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Y(314))}null!==r&&r.delete(t),gu(e,n)}function yu(e,t){return Dt(e,t)}function bu(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 xu(e,t,n,r){return new bu(e,t,n,r)}function wu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ku(e,t){var n=e.alternate;return null===n?((n=xu(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Su(e,t,n,r,o,i){var a=2;if(r=e,"function"==typeof e)wu(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case fe:return Cu(n.children,o,i,t);case pe:a=8,o|=8;break;case ge:return(e=xu(12,n,t,2|o)).elementType=ge,e.lanes=i,e;case be:return(e=xu(13,n,t,o)).elementType=be,e.lanes=i,e;case xe:return(e=xu(19,n,t,o)).elementType=xe,e.lanes=i,e;case Se:return _u(n,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case me:a=10;break e;case ve:a=9;break e;case ye:a=11;break e;case we:a=14;break e;case ke:a=16,r=null;break e}throw Error(Y(130,null==e?e:typeof e,""))}return(t=xu(a,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Cu(e,t,n,r){return(e=xu(7,e,r,t)).lanes=n,e}function _u(e,t,n,r){return(e=xu(22,e,r,t)).elementType=Se,e.lanes=n,e.stateNode={isHidden:!1},e}function Eu(e,t,n){return(e=xu(6,e,null,t)).lanes=n,e}function Lu(e,t,n){return(t=xu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pu(e,t,n,r,o){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=an(0),this.expirationTimes=an(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=an(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ou(e,t,n,r,o,i,a,s,l){return e=new Pu(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=xu(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wa(i),e}function Tu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:he,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Mu(e){if(!e)return vi;e:{if(Mt(e=e._reactInternals)!==e||1!==e.tag)throw Error(Y(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ki(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(Y(171))}if(1===e.tag){var n=e.type;if(ki(n))return _i(e,n,t)}return t}function Au(e,t,n,r,o,i,a,s,l){return(e=Ou(n,r,!0,e,0,i,0,s,l)).context=Mu(null),n=e.current,(i=Sa(r=$c(),o=Uc(n))).callback=null!=t?t:null,Ca(n,i,o),e.current.lanes=o,sn(e,o,r),Gc(e,r),e}function Iu(e,t,n,r){var o=t.current,i=$c(),a=Uc(o);return n=Mu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Sa(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ca(o,t,a))&&(Vc(e,o,a,i),_a(e,o,a)),a}function Ru(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Nu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Du(e,t){Nu(e,t),(e=e.alternate)&&Nu(e,t)}hc=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||bi.current)cl=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return cl=!1,function(e,t,n){switch(t.tag){case 3:bl(t),ra();break;case 5:Ya(t);break;case 1:ki(t.type)&&Ei(t);break;case 4:qa(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;mi(sa,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(mi(Ka,1&Ka.current),t.flags|=128,null):0!=(n&t.child.childLanes)?El(e,t,n):(mi(Ka,1&Ka.current),null!==(e=Il(e,t,n))?e.sibling:null);mi(Ka,1&Ka.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Ml(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),mi(Ka,Ka.current),r)break;return null;case 22:case 23:return t.lanes=0,pl(e,t,n)}return Il(e,t,n)}(e,t,n);cl=0!=(131072&e.flags)}else cl=!1,Zi&&0!=(1048576&t.flags)&&$i(t,Di,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Al(e,t),e=t.pendingProps;var o=wi(t,yi.current);pa(t,n),o=fs(null,t,r,e,o,n);var i=ps();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ki(r)?(i=!0,Ei(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,wa(t),o.updater=Ma,t.stateNode=o,o._reactInternals=t,Na(t,r,e,n),t=yl(null,t,r,!0,i,n)):(t.tag=0,Zi&&i&&Ui(t),ul(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Al(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return wu(e)?1:0;if(null!=e){if((e=e.$$typeof)===ye)return 11;if(e===we)return 14}return 2}(r),e=aa(r,e),o){case 0:t=ml(null,t,r,e,n);break e;case 1:t=vl(null,t,r,e,n);break e;case 11:t=dl(null,t,r,e,n);break e;case 14:t=hl(null,t,r,aa(r.type,e),n);break e}throw Error(Y(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,ml(e,t,r,o=t.elementType===r?o:aa(r,o),n);case 1:return r=t.type,o=t.pendingProps,vl(e,t,r,o=t.elementType===r?o:aa(r,o),n);case 3:e:{if(bl(t),null===e)throw Error(Y(387));r=t.pendingProps,o=(i=t.memoizedState).element,ka(e,t),La(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=xl(e,t,r,n,o=Js(Error(Y(423)),t));break e}if(r!==o){t=xl(e,t,r,n,o=Js(Error(Y(424)),t));break e}for(qi=Jo(t.stateNode.containerInfo.firstChild),Gi=t,Zi=!0,Yi=null,n=Ha(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ra(),r===o){t=Il(e,t,n);break e}ul(e,t,r,n)}t=t.child}return t;case 5:return Ya(t),null===e&&Ji(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,a=o.children,Go(r,o)?a=null:null!==i&&Go(r,i)&&(t.flags|=32),gl(e,t),ul(e,t,a,n),t.child;case 6:return null===e&&Ji(t),null;case 13:return El(e,t,n);case 4:return qa(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Fa(t,null,r,n):ul(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,dl(e,t,r,o=t.elementType===r?o:aa(r,o),n);case 7:return ul(e,t,t.pendingProps,n),t.child;case 8:case 12:return ul(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,mi(sa,r._currentValue),r._currentValue=a,null!==i)if(Xr(i.value,a)){if(i.children===o.children&&!bi.current){t=Il(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var s=i.dependencies;if(null!==s){a=i.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===i.tag){(l=Sa(-1,n&-n)).tag=2;var c=i.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),fa(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===i.tag)a=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(a=i.return))throw Error(Y(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),fa(a,n,t),a=i.sibling}else a=i.child;if(null!==a)a.return=i;else for(a=i;null!==a;){if(a===t){a=null;break}if(null!==(i=a.sibling)){i.return=a.return,a=i;break}a=a.return}i=a}ul(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,pa(t,n),r=r(o=ga(o)),t.flags|=1,ul(e,t,r,n),t.child;case 14:return o=aa(r=t.type,t.pendingProps),hl(e,t,r,o=aa(r.type,o),n);case 15:return fl(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:aa(r,o),Al(e,t),t.tag=1,ki(r)?(e=!0,Ei(t)):e=!1,pa(t,n),Ia(t,r,o),Na(t,r,o,n),yl(null,t,r,!0,e,n);case 19:return Ml(e,t,n);case 22:return pl(e,t,n)}throw Error(Y(156,t.tag))};var zu="function"==typeof reportError?reportError:function(e){console.error(e)};function Bu(e){this._internalRoot=e}function ju(e){this._internalRoot=e}function Fu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Hu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Wu(){}function $u(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"==typeof o){var s=o;o=function(){var e=Ru(a);s.call(e)}}Iu(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"==typeof r){var i=r;r=function(){var e=Ru(a);i.call(e)}}var a=Au(t,r,e,0,null,!1,0,"",Wu);return e._reactRootContainer=a,e[oi]=a.current,Ao(8===e.nodeType?e.parentNode:e),Jc(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=Ru(l);s.call(e)}}var l=Ou(e,0,!1,null,0,!1,0,"",Wu);return e._reactRootContainer=l,e[oi]=l.current,Ao(8===e.nodeType?e.parentNode:e),Jc((function(){Iu(t,l,n,r)})),l}(n,t,e,o,r);return Ru(a)}ju.prototype.render=Bu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(Y(409));Iu(e,t,null,null)},ju.prototype.unmount=Bu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Jc((function(){Iu(null,e,null,null)})),t[oi]=null}},ju.prototype.unstable_scheduleHydration=function(e){if(e){var t=pn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sn.length&&0!==t&&t<Sn[n].priority;n++);Sn.splice(n,0,e),0===n&&Ln(e)}},dn=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=en(t.pendingLanes);0!==n&&(ln(t,1|n),Gc(t,Ft()),0==(6&vc)&&(Mc=Ft()+500,Ai()))}break;case 13:Jc((function(){var t=ba(e,1);if(null!==t){var n=$c();Vc(t,e,1,n)}})),Du(e,1)}},hn=function(e){if(13===e.tag){var t=ba(e,134217728);if(null!==t)Vc(t,e,134217728,$c());Du(e,134217728)}},fn=function(e){if(13===e.tag){var t=Uc(e),n=ba(e,t);if(null!==n)Vc(n,e,t,$c());Du(e,t)}},pn=function(){return cn},gn=function(e,t){var n=cn;try{return cn=e,t()}finally{cn=n}},dt=function(e,t,n){switch(t){case"input":if(We(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=di(r);if(!o)throw Error(Y(90));ze(r),We(r,o)}}}break;case"textarea":Ye(e,n);break;case"select":null!=(t=n.value)&&Ge(e,!!n.multiple,t,!1)}},vt=Qc,yt=Jc;var Uu={usingClientEntryPoint:!1,Events:[ci,ui,di,gt,mt,Qc]},Vu={findFiberByHostInstance:li,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Gu={bundleType:Vu.bundleType,version:Vu.version,rendererPackageName:Vu.rendererPackageName,rendererConfig:Vu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ue.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Rt(e))?null:e.stateNode},findFiberByHostInstance:Vu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var qu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qu.isDisabled&&qu.supportsFiber)try{qt=qu.inject(Gu),Zt=qu}catch(Wle){}}U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Uu,U.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Fu(t))throw Error(Y(200));return Tu(e,t,null,n)},U.createRoot=function(e,t){if(!Fu(e))throw Error(Y(299));var n=!1,r="",o=zu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Ou(e,1,!1,null,0,n,0,r,o),e[oi]=t.current,Ao(8===e.nodeType?e.parentNode:e),new Bu(t)},U.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(Y(188));throw e=Object.keys(e).join(","),Error(Y(268,e))}return e=null===(e=Rt(t))?null:e.stateNode},U.flushSync=function(e){return Jc(e)},U.hydrate=function(e,t,n){if(!Hu(t))throw Error(Y(200));return $u(null,e,t,!0,n)},U.hydrateRoot=function(e,t,n){if(!Fu(e))throw Error(Y(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",a=zu;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=Au(t,null,e,1,null!=n?n:null,o,0,i,a),e[oi]=t.current,Ao(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new ju(t)},U.render=function(e,t,n){if(!Hu(t))throw Error(Y(200));return $u(null,e,t,!1,n)},U.unmountComponentAtNode=function(e){if(!Hu(e))throw Error(Y(40));return!!e._reactRootContainer&&(Jc((function(){$u(null,null,e,!1,(function(){e._reactRootContainer=null,e[oi]=null}))})),!0)},U.unstable_batchedUpdates=Qc,U.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Hu(n))throw Error(Y(200));if(null==e||void 0===e._reactInternals)throw Error(Y(38));return $u(e,t,n,!1,r)},U.version="18.2.0-next-9e3b772b8-20220608",function(e){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=U}($);const Zu=o($.exports);var Yu=$.exports;W.createRoot=Yu.createRoot,W.hydrateRoot=Yu.hydrateRoot;var Xu=Boolean(null==globalThis?void 0:globalThis.document)?i.exports.useLayoutEffect:i.exports.useEffect,Ku={exports:{}},Qu={},Ju=i.exports,ed=Symbol.for("react.element"),td=Symbol.for("react.fragment"),nd=Object.prototype.hasOwnProperty,rd=Ju.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,od={key:!0,ref:!0,__self:!0,__source:!0};function id(e,t,n){var r,o={},i=null,a=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)nd.call(t,r)&&!od.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:ed,type:e,key:i,ref:a,props:o,_owner:rd.current}}Qu.Fragment=td,Qu.jsx=id,Qu.jsxs=id,function(e){e.exports=Qu}(Ku);const ad=Ku.exports.Fragment,sd=Ku.exports.jsx,ld=Ku.exports.jsxs;var cd=i.exports.createContext({});function ud(){const e=i.exports.useContext(cd);if(void 0===e)throw new Error("useColorMode must be used within a ColorModeProvider");return e}cd.displayName="ColorModeContext";var dd="chakra-ui-light",hd="chakra-ui-dark";var fd,pd=(fd="chakra-ui-color-mode",{ssr:!1,type:"localStorage",get(e){if(!(null==globalThis?void 0:globalThis.document))return e;let t;try{t=localStorage.getItem(fd)||e}catch(T2){}return t||e},set(e){try{localStorage.setItem(fd,e)}catch(T2){}}}),gd=()=>{};function md(e,t){return"cookie"===e.type&&e.ssr?e.get(t):t}function vd(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:o,disableTransitionOnChange:a}={},colorModeManager:s=pd}=e,l="dark"===o?"dark":"light",[c,u]=i.exports.useState((()=>md(s,l))),[d,h]=i.exports.useState((()=>md(s))),{getSystemTheme:f,setClassName:p,setDataset:g,addListener:m}=i.exports.useMemo((()=>function(e={}){const{preventTransition:t=!0}=e,n={setDataset:e=>{const r=t?n.preventTransition():void 0;document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e,null==r||r()},setClassName(e){document.body.classList.add(e?hd:dd),document.body.classList.remove(e?dd:hd)},query:()=>window.matchMedia("(prefers-color-scheme: dark)"),getSystemTheme:e=>n.query().matches??"dark"===e?"dark":"light",addListener(e){const t=n.query(),r=t=>{e(t.matches?"dark":"light")};return"function"==typeof t.addListener?t.addListener(r):t.addEventListener("change",r),()=>{"function"==typeof t.removeListener?t.removeListener(r):t.removeEventListener("change",r)}},preventTransition(){const e=document.createElement("style");return e.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(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame((()=>{requestAnimationFrame((()=>{document.head.removeChild(e)}))}))}}};return n}({preventTransition:a})),[a]),v="system"!==o||c?c:d,y=i.exports.useCallback((e=>{const t="system"===e?f():e;u(t),p("dark"===t),g(t),s.set(t)}),[s,f,p,g]);Xu((()=>{"system"===o&&h(f())}),[]),i.exports.useEffect((()=>{const e=s.get();y(e||("system"!==o?l:"system"))}),[s,l,o,y]);const b=i.exports.useCallback((()=>{y("dark"===v?"light":"dark")}),[v,y]);i.exports.useEffect((()=>{if(r)return m(y)}),[r,m,y]);const x=i.exports.useMemo((()=>({colorMode:t??v,toggleColorMode:t?gd:b,setColorMode:t?gd:y,forced:void 0!==t})),[v,b,y,t]);return sd(cd.Provider,{value:x,children:n})}vd.displayName="ColorModeProvider";var yd={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Function]",s="[object Object]",l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[a]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var d="object"==typeof r&&r&&r.Object===Object&&r,h="object"==typeof self&&self&&self.Object===Object&&self,f=d||h||Function("return this")(),p=t&&!t.nodeType&&t,g=p&&e&&!e.nodeType&&e,m=g&&g.exports===p,v=m&&d.process,y=function(){try{var e=g&&g.require&&g.require("util").types;return e||v&&v.binding&&v.binding("util")}catch(T2){}}(),b=y&&y.isTypedArray;function x(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var w,k=Array.prototype,S=Function.prototype,C=Object.prototype,_=f["__core-js_shared__"],E=S.toString,L=C.hasOwnProperty,P=(w=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",O=C.toString,T=E.call(Object),M=RegExp("^"+E.call(L).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=m?f.Buffer:void 0,I=f.Symbol,R=f.Uint8Array,N=A?A.allocUnsafe:void 0,D=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),z=Object.create,B=C.propertyIsEnumerable,j=k.splice,F=I?I.toStringTag:void 0,H=function(){try{var e=fe(Object,"defineProperty");return e({},"",{}),e}catch(T2){}}(),W=A?A.isBuffer:void 0,$=Math.max,U=Date.now,V=fe(f,"Map"),G=fe(Object,"create"),q=function(){function e(){}return function(t){if(!Pe(t))return{};if(z)return z(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function K(e){var t=this.__data__=new Y(e);this.size=t.size}function Q(e,t){var n=Se(e),r=!n&&ke(e),o=!n&&!r&&_e(e),i=!n&&!r&&!o&&Te(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!L.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||pe(c,l))||s.push(c);return s}function J(e,t,n){(void 0!==n&&!we(e[t],n)||void 0===n&&!(t in e))&&ne(e,t,n)}function ee(e,t,n){var r=e[t];L.call(e,t)&&we(r,n)&&(void 0!==n||t in e)||ne(e,t,n)}function te(e,t){for(var n=e.length;n--;)if(we(e[n][0],t))return n;return-1}function ne(e,t,n){"__proto__"==t&&H?H(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}Z.prototype.clear=function(){this.__data__=G?G(null):{},this.size=0},Z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Z.prototype.get=function(e){var t=this.__data__;if(G){var r=t[e];return r===n?void 0:r}return L.call(t,e)?t[e]:void 0},Z.prototype.has=function(e){var t=this.__data__;return G?void 0!==t[e]:L.call(t,e)},Z.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=G&&void 0===t?n:t,this},Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=te(t,e);return!(n<0)&&(n==t.length-1?t.pop():j.call(t,n,1),--this.size,!0)},Y.prototype.get=function(e){var t=this.__data__,n=te(t,e);return n<0?void 0:t[n][1]},Y.prototype.has=function(e){return te(this.__data__,e)>-1},Y.prototype.set=function(e,t){var n=this.__data__,r=te(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},X.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(V||Y),string:new Z}},X.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},X.prototype.get=function(e){return he(this,e).get(e)},X.prototype.has=function(e){return he(this,e).has(e)},X.prototype.set=function(e,t){var n=he(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},K.prototype.clear=function(){this.__data__=new Y,this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},K.prototype.get=function(e){return this.__data__.get(e)},K.prototype.has=function(e){return this.__data__.has(e)},K.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!V||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new X(r)}return n.set(e,t),this.size=n.size,this};var re,oe=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[re?a:++r];if(!1===t(o[s],s,o))break}return e};function ie(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":F&&F in Object(e)?function(e){var t=L.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch(T2){}var o=O.call(e);r&&(t?e[F]=n:delete e[F]);return o}(e):function(e){return O.call(e)}(e)}function ae(e){return Oe(e)&&ie(e)==i}function se(e){return!(!Pe(e)||(t=e,P&&P in t))&&(Ee(e)?M:l).test(function(e){if(null!=e){try{return E.call(e)}catch(T2){}try{return e+""}catch(T2){}}return""}(e));var t}function le(e){if(!Pe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ge(e),n=[];for(var r in e)("constructor"!=r||!t&&L.call(e,r))&&n.push(r);return n}function ce(e,t,n,r,o){e!==t&&oe(t,(function(i,a){if(o||(o=new K),Pe(i))!function(e,t,n,r,o,i,a){var l=me(e,n),c=me(t,n),u=a.get(c);if(u)return void J(e,n,u);var d=i?i(l,c,n+"",e,t,a):void 0,h=void 0===d;if(h){var f=Se(c),p=!f&&_e(c),g=!f&&!p&&Te(c);d=c,f||p||g?Se(l)?d=l:!function(e){return Oe(e)&&Ce(e)}(l)?p?(h=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=N?N(n):new e.constructor(n);return e.copy(r),r}(c,!0)):g?(h=!1,m=c,v=!0?(y=m.buffer,b=new y.constructor(y.byteLength),new R(b).set(new R(y)),b):m.buffer,d=new m.constructor(v,m.byteOffset,m.length)):d=[]:d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(l):function(e){if(!Oe(e)||ie(e)!=s)return!1;var t=D(e);if(null===t)return!0;var n=L.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&E.call(n)==T}(c)||ke(c)?(d=l,ke(l)?d=function(e){return function(e,t,n,r){var o=!n;n||(n={});var i=-1,a=t.length;for(;++i<a;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?ne(n,s,l):ee(n,s,l)}return n}(e,Me(e))}(l):Pe(l)&&!Ee(l)||(d=function(e){return"function"!=typeof e.constructor||ge(e)?{}:q(D(e))}(c))):h=!1}var m,v,y,b;h&&(a.set(c,d),o(d,c,r,i,a),a.delete(c));J(e,n,d)}(e,t,a,n,ce,r,o);else{var l=r?r(me(e,a),i,a+"",e,t,o):void 0;void 0===l&&(l=i),J(e,a,l)}}),Me)}function ue(e,t){return xe(function(e,t,n){return t=$(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=$(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),x(e,this,s)}}(e,t,Ne),e+"")}var de=H?function(e,t){return H(e,"toString",{configurable:!0,enumerable:!1,value:Re(t),writable:!0})}:Ne;function he(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function fe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return se(n)?n:void 0}function pe(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&c.test(e))&&e>-1&&e%1==0&&e<t}function ge(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||C)}function me(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ve,ye,be,xe=(ve=de,ye=0,be=0,function(){var e=U(),t=16-(e-be);if(be=e,t>0){if(++ye>=800)return arguments[0]}else ye=0;return ve.apply(void 0,arguments)});function we(e,t){return e===t||e!=e&&t!=t}var ke=ae(function(){return arguments}())?ae:function(e){return Oe(e)&&L.call(e,"callee")&&!B.call(e,"callee")},Se=Array.isArray;function Ce(e){return null!=e&&Le(e.length)&&!Ee(e)}var _e=W||function(){return!1};function Ee(e){if(!Pe(e))return!1;var t=ie(e);return t==a||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Le(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Pe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Oe(e){return null!=e&&"object"==typeof e}var Te=b?function(e){return function(t){return e(t)}}(b):function(e){return Oe(e)&&Le(e.length)&&!!u[ie(e)]};function Me(e){return Ce(e)?Q(e,!0):le(e)}var Ae,Ie=(Ae=function(e,t,n,r){ce(e,t,n,r)},ue((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Ae.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!Pe(n))return!1;var r=typeof t;return!!("number"==r?Ce(n)&&pe(t,n.length):"string"==r&&t in n)&&we(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&Ae(e,a,n,o)}return e})));function Re(e){return function(){return e}}function Ne(e){return e}e.exports=Ie}(yd,yd.exports);const bd=yd.exports;function xd(e){const t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}function wd(e,...t){return kd(e)?e(...t):e}var kd=e=>"function"==typeof e,Sd=e=>"string"==typeof e?e.replace(/!(important)?$/,"").trim():e,Cd=(e,t)=>n=>{const r=String(t),o=(e=>/!(important)?$/.test(e))(r),i=Sd(r),a=e?`${e}.${i}`:i;let s=xd(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=Sd(s),o?`${s} !important`:s};function _d(e){const{scale:t,transform:n,compose:r}=e;return(e,o)=>{const i=Cd(t,e)(o);let a=(null==n?void 0:n(i,o))??i;return r&&(a=r(a,o)),a}}var Ed=(...e)=>t=>e.reduce(((e,t)=>t(e)),t);function Ld(e,t){return n=>{const r={property:n,scale:e};return r.transform=_d({scale:e,transform:t}),r}}var Pd=({rtl:e,ltr:t})=>n=>"rtl"===n.direction?e:t;var Od=["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))"];var Td={"--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(" ")},Md={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,/*!*/ /*!*/)"};var Ad={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Id="& > :not(style) ~ :not(style)",Rd={[Id]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},Nd={[Id]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Dd={"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"},zd=new Set(Object.values(Dd)),Bd=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),jd=e=>e.trim();var Fd=e=>"string"==typeof e&&e.includes("(")&&e.includes(")");var Hd=e=>t=>`${e}(${t})`,Wd={filter:e=>"auto"!==e?e:Td,backdropFilter:e=>"auto"!==e?e:Md,ring:e=>function(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(", ")}}(Wd.px(e)),bgClip:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e},transform:e=>"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...Od].join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...Od].join(" "):e,vh:e=>"$100vh"===e?"var(--chakra-vh)":e,px(e){if(null==e)return e;const{unitless:t}=(e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}})(e);return t||"number"==typeof e?`${e}px`:e},fraction:e=>"number"!=typeof e||e>1?e:100*e+"%",float:(e,t)=>"rtl"===t.direction?{left:"right",right:"left"}[e]:e,degree(e){if(function(e){return/^var\(--.+\)$/.test(e)}(e)||null==e)return e;const t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?`${e}deg`:e},gradient:(e,t)=>function(e,t){var n;if(null==e||Bd.has(e))return e;const{type:r,values:o}=(null==(n=/(?<type>^[a-z-A-Z]+)\((?<values>(.*))\)/g.exec(e))?void 0:n.groups)??{};if(!r||!o)return e;const i=r.includes("-gradient")?r:`${r}-gradient`,[a,...s]=o.split(",").map(jd).filter(Boolean);if(0===(null==s?void 0:s.length))return e;const l=a in Dd?Dd[a]:a;s.unshift(l);const c=s.map((e=>{if(zd.has(e))return e;const n=e.indexOf(" "),[r,o]=-1!==n?[e.substr(0,n),e.substr(n+1)]:[e],i=Fd(o)?o:o&&o.split(" "),a=`colors.${r}`,s=a in t.__cssMap?t.__cssMap[a].varRef:r;return i?[s,...Array.isArray(i)?i:[i]].join(" "):s}));return`${i}(${c.join(", ")})`}(e,t??{}),blur:Hd("blur"),opacity:Hd("opacity"),brightness:Hd("brightness"),contrast:Hd("contrast"),dropShadow:Hd("drop-shadow"),grayscale:Hd("grayscale"),hueRotate:Hd("hue-rotate"),invert:Hd("invert"),saturate:Hd("saturate"),sepia:Hd("sepia"),bgImage(e){if(null==e)return e;return Fd(e)||Bd.has(e)?e:`url(${e})`},outline(e){const t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=Ad[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},$d={borderWidths:Ld("borderWidths"),borderStyles:Ld("borderStyles"),colors:Ld("colors"),borders:Ld("borders"),radii:Ld("radii",Wd.px),space:Ld("space",Ed(Wd.vh,Wd.px)),spaceT:Ld("space",Ed(Wd.vh,Wd.px)),degreeT:e=>({property:e,transform:Wd.degree}),prop:(e,t,n)=>({property:e,scale:t,...t&&{transform:_d({scale:t,transform:n})}}),propT:(e,t)=>({property:e,transform:t}),sizes:Ld("sizes",Ed(Wd.vh,Wd.px)),sizesT:Ld("sizes",Ed(Wd.vh,Wd.fraction)),shadows:Ld("shadows"),logical:function(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:Pd(t),transform:n?_d({scale:n,compose:r}):r}},blur:Ld("blur",Wd.blur)},Ud={background:$d.colors("background"),backgroundColor:$d.colors("backgroundColor"),backgroundImage:$d.propT("backgroundImage",Wd.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Wd.bgClip},bgSize:$d.prop("backgroundSize"),bgPosition:$d.prop("backgroundPosition"),bg:$d.colors("background"),bgColor:$d.colors("backgroundColor"),bgPos:$d.prop("backgroundPosition"),bgRepeat:$d.prop("backgroundRepeat"),bgAttachment:$d.prop("backgroundAttachment"),bgGradient:$d.propT("backgroundImage",Wd.gradient),bgClip:{transform:Wd.bgClip}};Object.assign(Ud,{bgImage:Ud.backgroundImage,bgImg:Ud.backgroundImage});var Vd={border:$d.borders("border"),borderWidth:$d.borderWidths("borderWidth"),borderStyle:$d.borderStyles("borderStyle"),borderColor:$d.colors("borderColor"),borderRadius:$d.radii("borderRadius"),borderTop:$d.borders("borderTop"),borderBlockStart:$d.borders("borderBlockStart"),borderTopLeftRadius:$d.radii("borderTopLeftRadius"),borderStartStartRadius:$d.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:$d.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:$d.radii("borderTopRightRadius"),borderStartEndRadius:$d.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:$d.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:$d.borders("borderRight"),borderInlineEnd:$d.borders("borderInlineEnd"),borderBottom:$d.borders("borderBottom"),borderBlockEnd:$d.borders("borderBlockEnd"),borderBottomLeftRadius:$d.radii("borderBottomLeftRadius"),borderBottomRightRadius:$d.radii("borderBottomRightRadius"),borderLeft:$d.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:$d.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:$d.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:$d.borders(["borderLeft","borderRight"]),borderInline:$d.borders("borderInline"),borderY:$d.borders(["borderTop","borderBottom"]),borderBlock:$d.borders("borderBlock"),borderTopWidth:$d.borderWidths("borderTopWidth"),borderBlockStartWidth:$d.borderWidths("borderBlockStartWidth"),borderTopColor:$d.colors("borderTopColor"),borderBlockStartColor:$d.colors("borderBlockStartColor"),borderTopStyle:$d.borderStyles("borderTopStyle"),borderBlockStartStyle:$d.borderStyles("borderBlockStartStyle"),borderBottomWidth:$d.borderWidths("borderBottomWidth"),borderBlockEndWidth:$d.borderWidths("borderBlockEndWidth"),borderBottomColor:$d.colors("borderBottomColor"),borderBlockEndColor:$d.colors("borderBlockEndColor"),borderBottomStyle:$d.borderStyles("borderBottomStyle"),borderBlockEndStyle:$d.borderStyles("borderBlockEndStyle"),borderLeftWidth:$d.borderWidths("borderLeftWidth"),borderInlineStartWidth:$d.borderWidths("borderInlineStartWidth"),borderLeftColor:$d.colors("borderLeftColor"),borderInlineStartColor:$d.colors("borderInlineStartColor"),borderLeftStyle:$d.borderStyles("borderLeftStyle"),borderInlineStartStyle:$d.borderStyles("borderInlineStartStyle"),borderRightWidth:$d.borderWidths("borderRightWidth"),borderInlineEndWidth:$d.borderWidths("borderInlineEndWidth"),borderRightColor:$d.colors("borderRightColor"),borderInlineEndColor:$d.colors("borderInlineEndColor"),borderRightStyle:$d.borderStyles("borderRightStyle"),borderInlineEndStyle:$d.borderStyles("borderInlineEndStyle"),borderTopRadius:$d.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:$d.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:$d.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:$d.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Vd,{rounded:Vd.borderRadius,roundedTop:Vd.borderTopRadius,roundedTopLeft:Vd.borderTopLeftRadius,roundedTopRight:Vd.borderTopRightRadius,roundedTopStart:Vd.borderStartStartRadius,roundedTopEnd:Vd.borderStartEndRadius,roundedBottom:Vd.borderBottomRadius,roundedBottomLeft:Vd.borderBottomLeftRadius,roundedBottomRight:Vd.borderBottomRightRadius,roundedBottomStart:Vd.borderEndStartRadius,roundedBottomEnd:Vd.borderEndEndRadius,roundedLeft:Vd.borderLeftRadius,roundedRight:Vd.borderRightRadius,roundedStart:Vd.borderInlineStartRadius,roundedEnd:Vd.borderInlineEndRadius,borderStart:Vd.borderInlineStart,borderEnd:Vd.borderInlineEnd,borderTopStartRadius:Vd.borderStartStartRadius,borderTopEndRadius:Vd.borderStartEndRadius,borderBottomStartRadius:Vd.borderEndStartRadius,borderBottomEndRadius:Vd.borderEndEndRadius,borderStartRadius:Vd.borderInlineStartRadius,borderEndRadius:Vd.borderInlineEndRadius,borderStartWidth:Vd.borderInlineStartWidth,borderEndWidth:Vd.borderInlineEndWidth,borderStartColor:Vd.borderInlineStartColor,borderEndColor:Vd.borderInlineEndColor,borderStartStyle:Vd.borderInlineStartStyle,borderEndStyle:Vd.borderInlineEndStyle});var Gd={color:$d.colors("color"),textColor:$d.colors("color"),fill:$d.colors("fill"),stroke:$d.colors("stroke")},qd={boxShadow:$d.shadows("boxShadow"),mixBlendMode:!0,blendMode:$d.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:$d.prop("backgroundBlendMode"),opacity:!0};Object.assign(qd,{shadow:qd.boxShadow});var Zd={filter:{transform:Wd.filter},blur:$d.blur("--chakra-blur"),brightness:$d.propT("--chakra-brightness",Wd.brightness),contrast:$d.propT("--chakra-contrast",Wd.contrast),hueRotate:$d.degreeT("--chakra-hue-rotate"),invert:$d.propT("--chakra-invert",Wd.invert),saturate:$d.propT("--chakra-saturate",Wd.saturate),dropShadow:$d.propT("--chakra-drop-shadow",Wd.dropShadow),backdropFilter:{transform:Wd.backdropFilter},backdropBlur:$d.blur("--chakra-backdrop-blur"),backdropBrightness:$d.propT("--chakra-backdrop-brightness",Wd.brightness),backdropContrast:$d.propT("--chakra-backdrop-contrast",Wd.contrast),backdropHueRotate:$d.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:$d.propT("--chakra-backdrop-invert",Wd.invert),backdropSaturate:$d.propT("--chakra-backdrop-saturate",Wd.saturate)},Yd={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Wd.flexDirection},experimental_spaceX:{static:Rd,transform:_d({scale:"space",transform:e=>null!==e?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:Nd,transform:_d({scale:"space",transform:e=>null!=e?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:$d.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:$d.space("gap"),rowGap:$d.space("rowGap"),columnGap:$d.space("columnGap")};Object.assign(Yd,{flexDir:Yd.flexDirection});var Xd={gridGap:$d.space("gridGap"),gridColumnGap:$d.space("gridColumnGap"),gridRowGap:$d.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},Kd={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Wd.outline},outlineOffset:!0,outlineColor:$d.colors("outlineColor")},Qd={width:$d.sizesT("width"),inlineSize:$d.sizesT("inlineSize"),height:$d.sizes("height"),blockSize:$d.sizes("blockSize"),boxSize:$d.sizes(["width","height"]),minWidth:$d.sizes("minWidth"),minInlineSize:$d.sizes("minInlineSize"),minHeight:$d.sizes("minHeight"),minBlockSize:$d.sizes("minBlockSize"),maxWidth:$d.sizes("maxWidth"),maxInlineSize:$d.sizes("maxInlineSize"),maxHeight:$d.sizes("maxHeight"),maxBlockSize:$d.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:$d.propT("float",Wd.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Qd,{w:Qd.width,h:Qd.height,minW:Qd.minWidth,maxW:Qd.maxWidth,minH:Qd.minHeight,maxH:Qd.maxHeight,overscroll:Qd.overscrollBehavior,overscrollX:Qd.overscrollBehaviorX,overscrollY:Qd.overscrollBehaviorY});var Jd={listStyleType:!0,listStylePosition:!0,listStylePos:$d.prop("listStylePosition"),listStyleImage:!0,listStyleImg:$d.prop("listStyleImage")};var eh=(e=>{const t=new WeakMap;return(n,r,o,i)=>{if(void 0===n)return e(n,r,o);t.has(n)||t.set(n,new Map);const a=t.get(n);if(a.has(r))return a.get(r);const s=e(n,r,o,i);return a.set(r,s),s}})((function(e,t,n,r){const o="string"==typeof t?t.split("."):[t];for(r=0;r<o.length&&e;r+=1)e=e[o[r]];return void 0===e?n:e})),th={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},nh={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},rh=(e,t,n)=>{const r={},o=eh(e,t,{});for(const i in o){i in n&&null!=n[i]||(r[i]=o[i])}return r},oh={srOnly:{transform:e=>!0===e?th:"focusable"===e?nh:{}},layerStyle:{processResult:!0,transform:(e,t,n)=>rh(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>rh(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>rh(t,e,n)}},ih={position:!0,pos:$d.prop("position"),zIndex:$d.prop("zIndex","zIndices"),inset:$d.spaceT("inset"),insetX:$d.spaceT(["left","right"]),insetInline:$d.spaceT("insetInline"),insetY:$d.spaceT(["top","bottom"]),insetBlock:$d.spaceT("insetBlock"),top:$d.spaceT("top"),insetBlockStart:$d.spaceT("insetBlockStart"),bottom:$d.spaceT("bottom"),insetBlockEnd:$d.spaceT("insetBlockEnd"),left:$d.spaceT("left"),insetInlineStart:$d.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:$d.spaceT("right"),insetInlineEnd:$d.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(ih,{insetStart:ih.insetInlineStart,insetEnd:ih.insetInlineEnd});var ah={ring:{transform:Wd.ring},ringColor:$d.colors("--chakra-ring-color"),ringOffset:$d.prop("--chakra-ring-offset-width"),ringOffsetColor:$d.colors("--chakra-ring-offset-color"),ringInset:$d.prop("--chakra-ring-inset")},sh={margin:$d.spaceT("margin"),marginTop:$d.spaceT("marginTop"),marginBlockStart:$d.spaceT("marginBlockStart"),marginRight:$d.spaceT("marginRight"),marginInlineEnd:$d.spaceT("marginInlineEnd"),marginBottom:$d.spaceT("marginBottom"),marginBlockEnd:$d.spaceT("marginBlockEnd"),marginLeft:$d.spaceT("marginLeft"),marginInlineStart:$d.spaceT("marginInlineStart"),marginX:$d.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:$d.spaceT("marginInline"),marginY:$d.spaceT(["marginTop","marginBottom"]),marginBlock:$d.spaceT("marginBlock"),padding:$d.space("padding"),paddingTop:$d.space("paddingTop"),paddingBlockStart:$d.space("paddingBlockStart"),paddingRight:$d.space("paddingRight"),paddingBottom:$d.space("paddingBottom"),paddingBlockEnd:$d.space("paddingBlockEnd"),paddingLeft:$d.space("paddingLeft"),paddingInlineStart:$d.space("paddingInlineStart"),paddingInlineEnd:$d.space("paddingInlineEnd"),paddingX:$d.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:$d.space("paddingInline"),paddingY:$d.space(["paddingTop","paddingBottom"]),paddingBlock:$d.space("paddingBlock")};Object.assign(sh,{m:sh.margin,mt:sh.marginTop,mr:sh.marginRight,me:sh.marginInlineEnd,marginEnd:sh.marginInlineEnd,mb:sh.marginBottom,ml:sh.marginLeft,ms:sh.marginInlineStart,marginStart:sh.marginInlineStart,mx:sh.marginX,my:sh.marginY,p:sh.padding,pt:sh.paddingTop,py:sh.paddingY,px:sh.paddingX,pb:sh.paddingBottom,pl:sh.paddingLeft,ps:sh.paddingInlineStart,paddingStart:sh.paddingInlineStart,pr:sh.paddingRight,pe:sh.paddingInlineEnd,paddingEnd:sh.paddingInlineEnd});var lh={textDecorationColor:$d.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:$d.shadows("textShadow")},ch={clipPath:!0,transform:$d.propT("transform",Wd.transform),transformOrigin:!0,translateX:$d.spaceT("--chakra-translate-x"),translateY:$d.spaceT("--chakra-translate-y"),skewX:$d.degreeT("--chakra-skew-x"),skewY:$d.degreeT("--chakra-skew-y"),scaleX:$d.prop("--chakra-scale-x"),scaleY:$d.prop("--chakra-scale-y"),scale:$d.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:$d.degreeT("--chakra-rotate")},uh={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:$d.prop("transitionDuration","transition.duration"),transitionProperty:$d.prop("transitionProperty","transition.property"),transitionTimingFunction:$d.prop("transitionTimingFunction","transition.easing")},dh={fontFamily:$d.prop("fontFamily","fonts"),fontSize:$d.prop("fontSize","fontSizes",Wd.px),fontWeight:$d.prop("fontWeight","fontWeights"),lineHeight:$d.prop("lineHeight","lineHeights"),letterSpacing:$d.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"}},hh={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:$d.spaceT("scrollMargin"),scrollMarginTop:$d.spaceT("scrollMarginTop"),scrollMarginBottom:$d.spaceT("scrollMarginBottom"),scrollMarginLeft:$d.spaceT("scrollMarginLeft"),scrollMarginRight:$d.spaceT("scrollMarginRight"),scrollMarginX:$d.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:$d.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:$d.spaceT("scrollPadding"),scrollPaddingTop:$d.spaceT("scrollPaddingTop"),scrollPaddingBottom:$d.spaceT("scrollPaddingBottom"),scrollPaddingLeft:$d.spaceT("scrollPaddingLeft"),scrollPaddingRight:$d.spaceT("scrollPaddingRight"),scrollPaddingX:$d.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:$d.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function fh(e){return xd(e)&&e.reference?e.reference:String(e)}var ph=(e,...t)=>t.map(fh).join(` ${e} `).replace(/calc/g,""),gh=(...e)=>`calc(${ph("+",...e)})`,mh=(...e)=>`calc(${ph("-",...e)})`,vh=(...e)=>`calc(${ph("*",...e)})`,yh=(...e)=>`calc(${ph("/",...e)})`,bh=e=>{const t=fh(e);return null==t||Number.isNaN(parseFloat(t))?vh(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},xh=Object.assign((e=>({add:(...t)=>xh(gh(e,...t)),subtract:(...t)=>xh(mh(e,...t)),multiply:(...t)=>xh(vh(e,...t)),divide:(...t)=>xh(yh(e,...t)),negate:()=>xh(bh(e)),toString:()=>e.toString()})),{add:gh,subtract:mh,multiply:vh,divide:yh,negate:bh});function wh(e){return function(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}(function(e){if(e.includes("\\."))return e;const t=!Number.isInteger(parseFloat(e.toString()));return t?e.replace(".","\\."):e}(function(e,t="-"){return e.replace(/\s+/g,t)}(e.toString())))}function kh(e,t){return`var(${e}${t?`, ${t}`:""})`}function Sh(e,t=""){return wh(`--${function(e,t=""){return[t,e].filter(Boolean).join("-")}(e,t)}`)}function Ch(e,t,n){const r=Sh(e,n);return{variable:r,reference:kh(r,t)}}function _h(e){const t=null==e?0:e.length;return t?e[t-1]:void 0}function Eh(e){if(null==e)return e;const{unitless:t}=function(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}(e);return t||"number"==typeof e?`${e}px`:e}var Lh=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,Ph=e=>Object.fromEntries(Object.entries(e).sort(Lh));function Oh(e){const t=Ph(e);return Object.assign(Object.values(t),t)}function Th(e){if(!e)return e;const t=(e=Eh(e)??e).endsWith("px")?-1:-.0625;return"number"==typeof e?`${e+t}`:e.replace(/(\d+\.?\d*)/u,(e=>`${parseFloat(e)+t}`))}function Mh(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Eh(e)})`),t&&n.push("and",`(max-width: ${Eh(t)})`),n.join(" ")}function Ah(e){if(!e)return null;e.base=e.base??"0px";const t=Oh(e),n=Object.entries(e).sort(Lh).map((([e,t],n,r)=>{let[,o]=r[n+1]??[];return o=parseFloat(o)>0?Th(o):void 0,{_minW:Th(t),breakpoint:e,minW:t,maxW:o,maxWQuery:Mh(null,o),minWQuery:Mh(t),minMaxQuery:Mh(t,o)}})),r=function(e){const t=Object.keys(Ph(e));return new Set(t)}(e),o=Array.from(r.values());return{keys:r,normalized:t,isResponsive(e){const t=Object.keys(e);return t.length>0&&t.every((e=>r.has(e)))},asObject:Ph(e),asArray:Oh(e),details:n,media:[null,...t.map((e=>Mh(e))).slice(1)],toArrayValue(e){if(!xd(e))throw new Error("toArrayValue: value must be an object");const t=o.map((t=>e[t]??null));for(;null===_h(t);)t.pop();return t},toObjectValue(e){if(!Array.isArray(e))throw new Error("toObjectValue: value must be an array");return e.reduce(((e,t,n)=>{const r=o[n];return null!=r&&null!=t&&(e[r]=t),e}),{})}}}var Ih=(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,Rh=(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,Nh=(e,t)=>`${e}:focus-visible ${t}`,Dh=(e,t)=>`${e}:focus-within ${t}`,zh=(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,Bh=(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,jh=(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,Fh=(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,Hh=(e,t)=>`${e}:placeholder-shown ${t}`,Wh=e=>Uh((t=>e(t,"&")),"[role=group]","[data-group]",".group"),$h=e=>Uh((t=>e(t,"~ &")),"[data-peer]",".peer"),Uh=(e,...t)=>t.map(e).join(", "),Vh={_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:Wh(Ih),_peerHover:$h(Ih),_groupFocus:Wh(Rh),_peerFocus:$h(Rh),_groupFocusVisible:Wh(Nh),_peerFocusVisible:$h(Nh),_groupActive:Wh(zh),_peerActive:$h(zh),_groupDisabled:Wh(Bh),_peerDisabled:$h(Bh),_groupInvalid:Wh(jh),_peerInvalid:$h(jh),_groupChecked:Wh(Fh),_peerChecked:$h(Fh),_groupFocusWithin:Wh(Dh),_peerFocusWithin:$h(Dh),_peerPlaceholderShown:$h(Hh),_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]"},Gh=Object.keys(Vh);function qh(e,t){return Ch(String(e).replace(/\./g,"-"),void 0,t)}var Zh=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function Yh(e,t=1/0){return(xd(e)||Array.isArray(e))&&t?Object.entries(e).reduce(((e,[n,r])=>(xd(r)||Array.isArray(r)?Object.entries(Yh(r,t-1)).forEach((([t,r])=>{e[`${n}.${t}`]=r})):e[n]=r,e)),{}):e}function Xh(e){var t;const n=function(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...o}=e;return o}(e),r=function(e){return function(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}(e,Zh)}(n),o=function(e){return e.semanticTokens}(n),i=function({tokens:e,semanticTokens:t}){const n=Object.entries(Yh(e)??{}).map((([e,t])=>[e,{isSemantic:!1,value:t}])),r=Object.entries(Yh(t,1)??{}).map((([e,t])=>[e,{isSemantic:!0,value:t}]));return Object.fromEntries([...n,...r])}({tokens:r,semanticTokens:o}),a=null==(t=n.config)?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=function(e,t){let n={};const r={};for(const[o,i]of Object.entries(e)){const{isSemantic:a,value:s}=i,{variable:l,reference:c}=qh(o,null==t?void 0:t.cssVarPrefix);if(!a){if(o.startsWith("space")){const e=o.split("."),[t,...n]=e,i=`${t}.-${n.join(".")}`,a=xh.negate(s),u=xh.negate(c);r[i]={value:a,var:l,varRef:u}}n[l]=s,r[o]={value:s,var:l,varRef:c};continue}const u=n=>{const r=[String(o).split(".")[0],n].join(".");if(!e[r])return n;const{reference:i}=qh(r,null==t?void 0:t.cssVarPrefix);return i},d=xd(s)?s:{default:s};n=bd(n,Object.entries(d).reduce(((e,[t,n])=>{var r;const o=u(n);return"default"===t?(e[l]=o,e):(e[(null==(r=Vh)?void 0:r[t])??t]={[l]:o},e)}),{})),r[o]={value:c,var:l,varRef:c}}return{cssVars:n,cssMap:r}}(i,{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:Ah(n.breakpoints)}),n}var Kh=bd({},Ud,Vd,Gd,Yd,Qd,Zd,ah,Kd,Xd,oh,ih,qd,sh,hh,dh,lh,ch,Jd,uh),Qh=Object.assign({},sh,Qd,Yd,Xd,ih),Jh=Object.keys(Qh),ef=[...Object.keys(Kh),...Gh],tf={...Kh,...Vh},nf=e=>e in tf;var rf=(e,t)=>e.startsWith("--")&&"string"==typeof t&&!function(e){return/^var\(--.+\)$/.test(e)}(t),of=(e,t)=>{if(null==t)return t;const n=t=>{var n,r;return null==(r=null==(n=e.__cssMap)?void 0:n[t])?void 0:r.varRef},r=e=>n(e)??e,[o,i]=function(e){const t=[];let n="",r=!1;for(let o=0;o<e.length;o++){const i=e[o];"("===i?(r=!0,n+=i):")"===i?(r=!1,n+=i):","!==i||r?n+=i:(t.push(n),n="")}return n=n.trim(),n&&t.push(n),t}(t);return t=n(o)??r(i)??r(t)};function af(e){const{configs:t={},pseudos:n={},theme:r}=e,o=(e,i=!1)=>{var a;const s=wd(e,r),l=(e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:o}=t.__breakpoints,i={};for(const a in e){let s=wd(e[a],t);if(null==s)continue;if(s=xd(s)&&n(s)?r(s):s,!Array.isArray(s)){i[a]=s;continue}const l=s.slice(0,o.length).length;for(let e=0;e<l;e+=1){const t=null==o?void 0:o[e];t?(i[t]=i[t]||{},null!=s[e]&&(i[t][a]=s[e])):i[a]=s[e]}}return i})(s)(r);let c={};for(let u in l){let e=wd(l[u],r);u in n&&(u=n[u]),rf(u,e)&&(e=of(r,e));let d=t[u];if(!0===d&&(d={property:u}),xd(e)){c[u]=c[u]??{},c[u]=bd({},c[u],o(e,!0));continue}let h=(null==(a=null==d?void 0:d.transform)?void 0:a.call(d,e,r,s))??e;h=(null==d?void 0:d.processResult)?o(h,!0):h;const f=wd(null==d?void 0:d.property,r);if(!i&&(null==d?void 0:d.static)){const e=wd(d.static,r);c=bd({},c,e)}if(f&&Array.isArray(f))for(const t of f)c[t]=h;else f?"&"===f&&xd(h)?c=bd({},c,h):c[f]=h:xd(h)?c=bd({},c,h):c[u]=h}return c};return o}var sf=e=>t=>af({theme:t,pseudos:Vh,configs:Kh})(e);function lf(e){return{definePartsStyle:e=>e,defineMultiStyleConfig:t=>({parts:e,...t})}}function cf(e,t){for(let n=t+1;n<e.length;n++)if(null!=e[n])return n;return-1}function uf(e){const t=e.__breakpoints;return function(e,n,r,o){var i,a;if(!t)return;const s={},l=function(e,t){return Array.isArray(e)?e:xd(e)?t(e):null!=e?[e]:void 0}(r,t.toArrayValue);if(!l)return s;const c=l.length,u=1===c,d=!!e.parts;for(let h=0;h<c;h++){const r=t.details[h],c=t.details[cf(l,h)],f=Mh(r.minW,null==c?void 0:c._minW),p=wd(null==(i=e[n])?void 0:i[l[h]],o);p&&(d?null==(a=e.parts)||a.forEach((e=>{bd(s,{[e]:u?p[e]:{[f]:p[e]}})})):d?s[f]=p:u?bd(s,p):s[f]=p)}return s}}function df(e){return function(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}(e,["styleConfig","size","variant","colorScheme"])}var hf=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(T2){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),ff="-ms-",pf="-moz-",gf="-webkit-",mf="comm",vf="rule",yf="decl",bf="@keyframes",xf=Math.abs,wf=String.fromCharCode,kf=Object.assign;function Sf(e){return e.trim()}function Cf(e,t,n){return e.replace(t,n)}function _f(e,t){return e.indexOf(t)}function Ef(e,t){return 0|e.charCodeAt(t)}function Lf(e,t,n){return e.slice(t,n)}function Pf(e){return e.length}function Of(e){return e.length}function Tf(e,t){return t.push(e),e}var Mf=1,Af=1,If=0,Rf=0,Nf=0,Df="";function zf(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Mf,column:Af,length:a,return:""}}function Bf(e,t){return kf(zf("",null,null,"",null,null,0),e,{length:-e.length},t)}function jf(){return Nf=Rf>0?Ef(Df,--Rf):0,Af--,10===Nf&&(Af=1,Mf--),Nf}function Ff(){return Nf=Rf<If?Ef(Df,Rf++):0,Af++,10===Nf&&(Af=1,Mf++),Nf}function Hf(){return Ef(Df,Rf)}function Wf(){return Rf}function $f(e,t){return Lf(Df,e,t)}function Uf(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Vf(e){return Mf=Af=1,If=Pf(Df=e),Rf=0,[]}function Gf(e){return Df="",e}function qf(e){return Sf($f(Rf-1,Xf(91===e?e+2:40===e?e+1:e)))}function Zf(e){for(;(Nf=Hf())&&Nf<33;)Ff();return Uf(e)>2||Uf(Nf)>3?"":" "}function Yf(e,t){for(;--t&&Ff()&&!(Nf<48||Nf>102||Nf>57&&Nf<65||Nf>70&&Nf<97););return $f(e,Wf()+(t<6&&32==Hf()&&32==Ff()))}function Xf(e){for(;Ff();)switch(Nf){case e:return Rf;case 34:case 39:34!==e&&39!==e&&Xf(Nf);break;case 40:41===e&&Xf(e);break;case 92:Ff()}return Rf}function Kf(e,t){for(;Ff()&&e+Nf!==57&&(e+Nf!==84||47!==Hf()););return"/*"+$f(t,Rf-1)+"*"+wf(47===e?e:Ff())}function Qf(e){for(;!Uf(Hf());)Ff();return $f(e,Rf)}function Jf(e){return Gf(ep("",null,null,null,[""],e=Vf(e),0,[0],e))}function ep(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,h=0,f=0,p=0,g=1,m=1,v=1,y=0,b="",x=o,w=i,k=r,S=b;m;)switch(p=y,y=Ff()){case 40:if(108!=p&&58==Ef(S,d-1)){-1!=_f(S+=Cf(qf(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:S+=qf(y);break;case 9:case 10:case 13:case 32:S+=Zf(p);break;case 92:S+=Yf(Wf()-1,7);continue;case 47:switch(Hf()){case 42:case 47:Tf(np(Kf(Ff(),Wf()),t,n),l);break;default:S+="/"}break;case 123*g:s[c++]=Pf(S)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+u:f>0&&Pf(S)-d&&Tf(f>32?rp(S+";",r,n,d-1):rp(Cf(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Tf(k=tp(S,t,n,c,u,o,s,b,x=[],w=[],d),i),123===y)if(0===u)ep(S,t,k,k,x,i,d,s,w);else switch(99===h&&110===Ef(S,3)?100:h){case 100:case 109:case 115:ep(e,k,k,r&&Tf(tp(e,k,k,0,0,o,s,b,o,x=[],d),w),o,w,d,s,r?x:w);break;default:ep(S,k,k,k,[""],w,0,s,w)}}c=u=f=0,g=v=1,b=S="",d=a;break;case 58:d=1+Pf(S),f=p;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==jf())continue;switch(S+=wf(y),y*g){case 38:v=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(Pf(S)-1)*v,v=1;break;case 64:45===Hf()&&(S+=qf(Ff())),h=Hf(),u=d=Pf(b=S+=Qf(Wf())),y++;break;case 45:45===p&&2==Pf(S)&&(g=0)}}return i}function tp(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,h=0===o?i:[""],f=Of(h),p=0,g=0,m=0;p<r;++p)for(var v=0,y=Lf(e,d+1,d=xf(g=a[p])),b=e;v<f;++v)(b=Sf(g>0?h[v]+" "+y:Cf(y,/&\f/g,h[v])))&&(l[m++]=b);return zf(e,t,n,0===o?vf:s,l,c,u)}function np(e,t,n){return zf(e,t,n,mf,wf(Nf),Lf(e,2,-2),0)}function rp(e,t,n,r){return zf(e,t,n,yf,Lf(e,0,r),Lf(e,r+1,-1),r)}function op(e,t){for(var n="",r=Of(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function ip(e,t,n,r){switch(e.type){case"@import":case yf:return e.return=e.return||e.value;case mf:return"";case bf:return e.return=e.value+"{"+op(e.children,r)+"}";case vf:e.value=e.props.join(",")}return Pf(n=op(e.children,r))?e.return=e.value+"{"+n+"}":""}var ap=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}};function sp(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var lp=function(e,t,n){for(var r=0,o=0;r=o,o=Hf(),38===r&&12===o&&(t[n]=1),!Uf(o);)Ff();return $f(e,Rf)},cp=function(e,t){return Gf(function(e,t){var n=-1,r=44;do{switch(Uf(r)){case 0:38===r&&12===Hf()&&(t[n]=1),e[n]+=lp(Rf-1,t,n);break;case 2:e[n]+=qf(r);break;case 4:if(44===r){e[++n]=58===Hf()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=wf(r)}}while(r=Ff());return e}(Vf(e),t))},up=new WeakMap,dp=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||up.get(n))&&!r){up.set(e,!0);for(var o=[],i=cp(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},hp=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function fp(e,t){switch(function(e,t){return 45^Ef(e,0)?(((t<<2^Ef(e,0))<<2^Ef(e,1))<<2^Ef(e,2))<<2^Ef(e,3):0}(e,t)){case 5103:return gf+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return gf+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return gf+e+pf+e+ff+e+e;case 6828:case 4268:return gf+e+ff+e+e;case 6165:return gf+e+ff+"flex-"+e+e;case 5187:return gf+e+Cf(e,/(\w+).+(:[^]+)/,gf+"box-$1$2"+ff+"flex-$1$2")+e;case 5443:return gf+e+ff+"flex-item-"+Cf(e,/flex-|-self/,"")+e;case 4675:return gf+e+ff+"flex-line-pack"+Cf(e,/align-content|flex-|-self/,"")+e;case 5548:return gf+e+ff+Cf(e,"shrink","negative")+e;case 5292:return gf+e+ff+Cf(e,"basis","preferred-size")+e;case 6060:return gf+"box-"+Cf(e,"-grow","")+gf+e+ff+Cf(e,"grow","positive")+e;case 4554:return gf+Cf(e,/([^-])(transform)/g,"$1"+gf+"$2")+e;case 6187:return Cf(Cf(Cf(e,/(zoom-|grab)/,gf+"$1"),/(image-set)/,gf+"$1"),e,"")+e;case 5495:case 3959:return Cf(e,/(image-set\([^]*)/,gf+"$1$`$1");case 4968:return Cf(Cf(e,/(.+:)(flex-)?(.*)/,gf+"box-pack:$3"+ff+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gf+e+e;case 4095:case 3583:case 4068:case 2532:return Cf(e,/(.+)-inline(.+)/,gf+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Pf(e)-1-t>6)switch(Ef(e,t+1)){case 109:if(45!==Ef(e,t+4))break;case 102:return Cf(e,/(.+:)(.+)-([^]+)/,"$1"+gf+"$2-$3$1"+pf+(108==Ef(e,t+3)?"$3":"$2-$3"))+e;case 115:return~_f(e,"stretch")?fp(Cf(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ef(e,t+1))break;case 6444:switch(Ef(e,Pf(e)-3-(~_f(e,"!important")&&10))){case 107:return Cf(e,":",":"+gf)+e;case 101:return Cf(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gf+(45===Ef(e,14)?"inline-":"")+"box$3$1"+gf+"$2$3$1"+ff+"$2box$3")+e}break;case 5936:switch(Ef(e,t+11)){case 114:return gf+e+ff+Cf(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gf+e+ff+Cf(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gf+e+ff+Cf(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gf+e+ff+e+e}return e}var pp=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case yf:e.return=fp(e.value,e.length);break;case bf:return op([Bf(e,{value:Cf(e.value,"@","@"+gf)})],r);case vf:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return op([Bf(e,{props:[Cf(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return op([Bf(e,{props:[Cf(t,/:(plac\w+)/,":"+gf+"input-$1")]}),Bf(e,{props:[Cf(t,/:(plac\w+)/,":-moz-$1")]}),Bf(e,{props:[Cf(t,/:(plac\w+)/,ff+"input-$1")]})],r)}return""}))}}],gp=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||pp,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u=[ip,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=Of(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}([dp,hp].concat(i,u));o=function(e,t,n,r){l=n,function(e){op(Jf(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new hf({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return h.sheet.hydrate(s),h};function mp(){return mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mp.apply(this,arguments)}var vp={exports:{}},yp={},bp="function"==typeof Symbol&&Symbol.for,xp=bp?Symbol.for("react.element"):60103,wp=bp?Symbol.for("react.portal"):60106,kp=bp?Symbol.for("react.fragment"):60107,Sp=bp?Symbol.for("react.strict_mode"):60108,Cp=bp?Symbol.for("react.profiler"):60114,_p=bp?Symbol.for("react.provider"):60109,Ep=bp?Symbol.for("react.context"):60110,Lp=bp?Symbol.for("react.async_mode"):60111,Pp=bp?Symbol.for("react.concurrent_mode"):60111,Op=bp?Symbol.for("react.forward_ref"):60112,Tp=bp?Symbol.for("react.suspense"):60113,Mp=bp?Symbol.for("react.suspense_list"):60120,Ap=bp?Symbol.for("react.memo"):60115,Ip=bp?Symbol.for("react.lazy"):60116,Rp=bp?Symbol.for("react.block"):60121,Np=bp?Symbol.for("react.fundamental"):60117,Dp=bp?Symbol.for("react.responder"):60118,zp=bp?Symbol.for("react.scope"):60119;function Bp(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case xp:switch(e=e.type){case Lp:case Pp:case kp:case Cp:case Sp:case Tp:return e;default:switch(e=e&&e.$$typeof){case Ep:case Op:case Ip:case Ap:case _p:return e;default:return t}}case wp:return t}}}function jp(e){return Bp(e)===Pp}yp.AsyncMode=Lp,yp.ConcurrentMode=Pp,yp.ContextConsumer=Ep,yp.ContextProvider=_p,yp.Element=xp,yp.ForwardRef=Op,yp.Fragment=kp,yp.Lazy=Ip,yp.Memo=Ap,yp.Portal=wp,yp.Profiler=Cp,yp.StrictMode=Sp,yp.Suspense=Tp,yp.isAsyncMode=function(e){return jp(e)||Bp(e)===Lp},yp.isConcurrentMode=jp,yp.isContextConsumer=function(e){return Bp(e)===Ep},yp.isContextProvider=function(e){return Bp(e)===_p},yp.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===xp},yp.isForwardRef=function(e){return Bp(e)===Op},yp.isFragment=function(e){return Bp(e)===kp},yp.isLazy=function(e){return Bp(e)===Ip},yp.isMemo=function(e){return Bp(e)===Ap},yp.isPortal=function(e){return Bp(e)===wp},yp.isProfiler=function(e){return Bp(e)===Cp},yp.isStrictMode=function(e){return Bp(e)===Sp},yp.isSuspense=function(e){return Bp(e)===Tp},yp.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===kp||e===Pp||e===Cp||e===Sp||e===Tp||e===Mp||"object"==typeof e&&null!==e&&(e.$$typeof===Ip||e.$$typeof===Ap||e.$$typeof===_p||e.$$typeof===Ep||e.$$typeof===Op||e.$$typeof===Np||e.$$typeof===Dp||e.$$typeof===zp||e.$$typeof===Rp)},yp.typeOf=Bp,function(e){e.exports=yp}(vp);var Fp=vp.exports,Hp={};Hp[Fp.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Hp[Fp.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Wp(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var $p=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Up=function(e,t,n){$p(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var Vp={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},Gp=/[A-Z]|^ms/g,qp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zp=function(e){return 45===e.charCodeAt(1)},Yp=function(e){return null!=e&&"boolean"!=typeof e},Xp=sp((function(e){return Zp(e)?e:e.replace(Gp,"-$&").toLowerCase()})),Kp=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(qp,(function(e,t,n){return Jp={name:t,styles:n,next:Jp},t}))}return 1===Vp[e]||Zp(e)||"number"!=typeof t||0===t?t:t+"px"};function Qp(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Jp={name:n.name,styles:n.styles,next:Jp},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Jp={name:r.name,styles:r.styles,next:Jp},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Qp(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":Yp(a)&&(r+=Xp(i)+":"+Kp(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Qp(e,t,a);switch(i){case"animation":case"animationName":r+=Xp(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Yp(a[l])&&(r+=Xp(i)+":"+Kp(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Jp,i=n(e);return Jp=o,Qp(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Jp,eg=/label:\s*([^\s;\n{]+)\s*(;|$)/g,tg=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Jp=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Qp(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Qp(n,t,e[a]),r&&(o+=i[a]);eg.lastIndex=0;for(var s,l="";null!==(s=eg.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Jp}},ng=!!H.useInsertionEffect&&H.useInsertionEffect,rg=ng||function(e){return e()},og=ng||i.exports.useLayoutEffect,ig=i.exports.createContext("undefined"!=typeof HTMLElement?gp({key:"css"}):null),ag=ig.Provider,sg=function(e){return i.exports.forwardRef((function(t,n){var r=i.exports.useContext(ig);return e(t,r,n)}))},lg=i.exports.createContext({}),cg=ap((function(e){return ap((function(t){return function(e,t){return"function"==typeof t?t(e):mp({},e,t)}(e,t)}))})),ug=function(e){var t=i.exports.useContext(lg);return e.theme!==t&&(t=cg(t)(e.theme)),i.exports.createElement(lg.Provider,{value:t},e.children)},dg=sg((function(e,t){var n=e.styles,r=tg([n],void 0,i.exports.useContext(lg)),o=i.exports.useRef();return og((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,a=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==a&&(i=!0,a.setAttribute("data-emotion",e),n.hydrate([a])),o.current=[n,i],function(){n.flush()}}),[t]),og((function(){var e=o.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&Up(t,r.next,!0),n.tags.length){var i=n.tags[n.tags.length-1].nextElementSibling;n.before=i,n.flush()}t.insert("",r,n,!1)}}),[t,r.name]),null}));function hg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return tg(t)}var fg=function(){var e=hg.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},pg=1/60*1e3,gg="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},mg="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(gg())}),pg)};var vg=!0,yg=!1,bg=!1,xg={delta:0,timestamp:0},wg=["read","update","preRender","render","postRender"],kg=wg.reduce((function(e,t){return e[t]=function(e){var t=[],n=[],r=0,o=!1,i=new WeakSet,a={schedule:function(e,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var l=s&&o,c=l?t:n;return a&&i.add(e),-1===c.indexOf(e)&&(c.push(e),l&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),i.delete(e)},process:function(s){var l;if(o=!0,t=(l=[n,t])[0],(n=l[1]).length=0,r=t.length)for(var c=0;c<r;c++){var u=t[c];u(s),i.has(u)&&(a.schedule(u),e())}o=!1}};return a}((function(){return yg=!0})),e}),{}),Sg=wg.reduce((function(e,t){var n=kg[t];return e[t]=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),yg||Lg(),n.schedule(e,t,r)},e}),{}),Cg=wg.reduce((function(e,t){return e[t]=kg[t].cancel,e}),{}),_g=function(e){return kg[e].process(xg)},Eg=function(e){yg=!1,xg.delta=vg?pg:Math.max(Math.min(e-xg.timestamp,40),1),xg.timestamp=e,bg=!0,wg.forEach(_g),bg=!1,yg&&(vg=!1,mg(Eg))},Lg=function(){yg=!0,vg=!0,bg||mg(Eg)},Pg=function(){return xg};var Og=(e=>{const t=new WeakMap;return(n,r,o,i)=>{if(void 0===n)return e(n,r,o);t.has(n)||t.set(n,new Map);const a=t.get(n);if(a.has(r))return a.get(r);const s=e(n,r,o,i);return a.set(r,s),s}})((function(e,t,n,r){const o="string"==typeof t?t.split("."):[t];for(r=0;r<o.length&&e;r+=1)e=e[o[r]];return void 0===e?n:e}));function Tg(e,t){const n={};return Object.keys(e).forEach((r=>{const o=e[r];t(o,r,e)&&(n[r]=o)})),n}var Mg=e=>Tg(e,(e=>null!=e));function Ag(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var Ig=Ag();function Rg(e,...t){return function(e){return"function"==typeof e}(e)?e(...t):e}function Ng(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);var Dg=/^((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)-.*))$/,zg=sp((function(e){return Dg.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Bg=function(e){return"theme"!==e},jg=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?zg:Bg},Fg=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Hg=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return $p(t,n,r),rg((function(){return Up(t,n,r)})),null},Wg=function e(t,n){var r,o,a=t.__emotion_real===t,s=a&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=Fg(t,n,a),c=l||jg(s),u=!c("as");return function(){var d=arguments,h=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&h.push("label:"+r+";"),null==d[0]||void 0===d[0].raw)h.push.apply(h,d);else{h.push(d[0][0]);for(var f=d.length,p=1;p<f;p++)h.push(d[p],d[0][p])}var g=sg((function(e,t,n){var r=u&&e.as||s,a="",d=[],f=e;if(null==e.theme){for(var p in f={},e)f[p]=e[p];f.theme=i.exports.useContext(lg)}"string"==typeof e.className?a=Wp(t.registered,d,e.className):null!=e.className&&(a=e.className+" ");var g=tg(h.concat(d),t.registered,f);a+=t.key+"-"+g.name,void 0!==o&&(a+=" "+o);var m=u&&void 0===l?jg(r):c,v={};for(var y in e)u&&"as"===y||m(y)&&(v[y]=e[y]);return v.className=a,v.ref=n,i.exports.createElement(i.exports.Fragment,null,i.exports.createElement(Hg,{cache:t,serialized:g,isStringTag:"string"==typeof r}),i.exports.createElement(r,v))}));return g.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=h,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+o}}),g.withComponent=function(t,r){return e(t,mp({},n,r,{shouldForwardProp:Fg(g,r,!0)})).apply(void 0,h)},g}}.bind();function $g(e,t={}){let n=!1;function r(t){const n=`chakra-${(["container","root"].includes(t??"")?[e]:[e,t]).filter(Boolean).join("__")}`;return{className:n,selector:`.${n}`,toString:()=>t}}return{parts:function(...o){!function(){if(n)throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?");n=!0}();for(const e of o)t[e]=r(e);return $g(e,t)},toPart:r,extend:function(...n){for(const e of n)e in t||(t[e]=r(e));return $g(e,t)},selectors:function(){const e=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,t.selector])));return e},classnames:function(){const e=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,t.className])));return e},get keys(){return Object.keys(t)},__type:{}}}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Wg[e]=Wg(e)}));var Ug=$g("accordion").parts("root","container","button","panel").extend("icon"),Vg=$g("alert").parts("title","description","container").extend("icon","spinner"),Gg=$g("avatar").parts("label","badge","container").extend("excessLabel","group"),qg=$g("breadcrumb").parts("link","item","container").extend("separator");$g("button").parts();var Zg=$g("checkbox").parts("control","icon","container").extend("label");$g("progress").parts("track","filledTrack").extend("label");var Yg=$g("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Xg=$g("editable").parts("preview","input","textarea"),Kg=$g("form").parts("container","requiredIndicator","helperText"),Qg=$g("formError").parts("text","icon"),Jg=$g("input").parts("addon","field","element"),em=$g("list").parts("container","item","icon"),tm=$g("menu").parts("button","list","item").extend("groupTitle","command","divider"),nm=$g("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),rm=$g("numberinput").parts("root","field","stepperGroup","stepper");$g("pininput").parts("field");var om=$g("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),im=$g("progress").parts("label","filledTrack","track"),am=$g("radio").parts("container","control","label"),sm=$g("select").parts("field","icon"),lm=$g("slider").parts("container","track","thumb","filledTrack","mark"),cm=$g("stat").parts("container","label","helpText","number","icon"),um=$g("switch").parts("container","track","thumb"),dm=$g("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),hm=$g("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),fm=$g("tag").parts("container","label","closeButton"),pm=$g("card").parts("container","header","body","footer");function gm(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function mm(e){return Math.min(1,Math.max(0,e))}function vm(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ym(e){return e<=1?"".concat(100*Number(e),"%"):e}function bm(e){return 1===e.length?"0"+e:String(e)}function xm(e,t,n){e=gm(e,255),t=gm(t,255),n=gm(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i=0,a=0,s=(r+o)/2;if(r===o)a=0,i=0;else{var l=r-o;switch(a=s>.5?l/(2-r-o):l/(r+o),r){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4}i/=6}return{h:i,s:a,l:s}}function wm(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function km(e,t,n){e=gm(e,255),t=gm(t,255),n=gm(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i=0,a=r,s=r-o,l=0===r?0:s/r;if(r===o)i=0;else{switch(r){case e:i=(t-n)/s+(t<n?6:0);break;case t:i=(n-e)/s+2;break;case n:i=(e-t)/s+4}i/=6}return{h:i,s:l,v:a}}function Sm(e,t,n,r){var o=[bm(Math.round(e).toString(16)),bm(Math.round(t).toString(16)),bm(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Cm(e){return Math.round(255*parseFloat(e)).toString(16)}function _m(e){return Em(e)/255}function Em(e){return parseInt(e,16)}var Lm={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 Pm(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,s=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(Lm[e])e=Lm[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=Am.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=Am.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=Am.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=Am.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=Am.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=Am.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=Am.hex8.exec(e),n)return{r:Em(n[1]),g:Em(n[2]),b:Em(n[3]),a:_m(n[4]),format:t?"name":"hex8"};if(n=Am.hex6.exec(e),n)return{r:Em(n[1]),g:Em(n[2]),b:Em(n[3]),format:t?"name":"hex"};if(n=Am.hex4.exec(e),n)return{r:Em(n[1]+n[1]),g:Em(n[2]+n[2]),b:Em(n[3]+n[3]),a:_m(n[4]+n[4]),format:t?"name":"hex8"};if(n=Am.hex3.exec(e),n)return{r:Em(n[1]+n[1]),g:Em(n[2]+n[2]),b:Em(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(Im(e.r)&&Im(e.g)&&Im(e.b)?(t=function(e,t,n){return{r:255*gm(e,255),g:255*gm(t,255),b:255*gm(n,255)}}(e.r,e.g,e.b),a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):Im(e.h)&&Im(e.s)&&Im(e.v)?(r=ym(e.s),o=ym(e.v),t=function(e,t,n){e=6*gm(e,360),t=gm(t,100),n=gm(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6;return{r:255*[n,a,i,i,s,n][l],g:255*[s,n,n,a,i,i][l],b:255*[i,i,s,n,n,a][l]}}(e.h,r,o),a=!0,s="hsv"):Im(e.h)&&Im(e.s)&&Im(e.l)&&(r=ym(e.s),i=ym(e.l),t=function(e,t,n){var r,o,i;if(e=gm(e,360),t=gm(t,100),n=gm(n,100),0===t)o=n,i=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=wm(s,a,e+1/3),o=wm(s,a,e),i=wm(s,a,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,r,i),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=vm(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 Om="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),Tm="[\\s|\\(]+(".concat(Om,")[,|\\s]+(").concat(Om,")[,|\\s]+(").concat(Om,")\\s*\\)?"),Mm="[\\s|\\(]+(".concat(Om,")[,|\\s]+(").concat(Om,")[,|\\s]+(").concat(Om,")[,|\\s]+(").concat(Om,")\\s*\\)?"),Am={CSS_UNIT:new RegExp(Om),rgb:new RegExp("rgb"+Tm),rgba:new RegExp("rgba"+Mm),hsl:new RegExp("hsl"+Tm),hsla:new RegExp("hsla"+Mm),hsv:new RegExp("hsv"+Tm),hsva:new RegExp("hsva"+Mm),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 Im(e){return Boolean(Am.CSS_UNIT.exec(String(e)))}var Rm=function(){function e(t,n){var r;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"==typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var o=Pm(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(r=n.format)&&void 0!==r?r:o.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=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=vm(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var e=km(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=km(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=xm(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=xm(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),Sm(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,n,r,o){var i=[bm(Math.round(e).toString(16)),bm(Math.round(t).toString(16)),bm(Math.round(n).toString(16)),bm(Cm(r))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},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 e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*gm(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*gm(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+Sm(this.r,this.g,this.b,!1),t=0,n=Object.entries(Lm);t<n.length;t++){var r=n[t],o=r[0];if(e===r[1])return o}return!1},e.prototype.toString=function(e){var t=Boolean(e);e=null!=e?e:this.format;var n=!1,r=this.a<1&&this.a>=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},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){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=mm(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=mm(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=mm(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=mm(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){void 0===n&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),i=n/100;return new e({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),o=360/n,i=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(new e(r));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:o,v:i})),i=(i+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,o=[this],i=360/t,a=1;a<t;a++)o.push(new e({h:(r+a*i)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function Nm(e){if(void 0===e&&(e={}),void 0!==e.count&&null!==e.count){var t=e.count,n=[];for(e.count=void 0;t>n.length;)e.count=null,e.seed&&(e.seed+=1),n.push(Nm(e));return e.count=t,n}var r=function(e,t){var n=zm(function(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if("string"==typeof e){var n=jm.find((function(t){return t.name===e}));if(n){var r=Bm(n);if(r.hueRange)return r.hueRange}var o=new Rm(e);if(o.isValid){var i=o.toHsv().h;return[i,i]}}return[0,360]}(e),t);n<0&&(n=360+n);return n}(e.hue,e.seed),o=function(e,t){if("monochrome"===t.hue)return 0;if("random"===t.luminosity)return zm([0,100],t.seed);var n=Dm(e).saturationRange,r=n[0],o=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=o-10;break;case"light":o=55}return zm([r,o],t.seed)}(r,e),i=function(e,t,n){var r=function(e,t){for(var n=Dm(e).lowerBounds,r=0;r<n.length-1;r++){var o=n[r][0],i=n[r][1],a=n[r+1][0],s=n[r+1][1];if(t>=o&&t<=a){var l=(s-i)/(a-o);return l*t+(i-l*o)}}return 0}(e,t),o=100;switch(n.luminosity){case"dark":o=r+20;break;case"light":r=(o+r)/2;break;case"random":r=0,o=100}return zm([r,o],n.seed)}(r,o,e),a={h:r,s:o,v:i};return void 0!==e.alpha&&(a.a=e.alpha),new Rm(a)}function Dm(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=jm;t<n.length;t++){var r=Bm(n[t]);if(r.hueRange&&e>=r.hueRange[0]&&e<=r.hueRange[1])return r}throw Error("Color not found")}function zm(e,t){if(void 0===t)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0,o=(t=(9301*t+49297)%233280)/233280;return Math.floor(r+o*(n-r))}function Bm(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],o=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,o]}}var jm=[{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]]}];var Fm=(e,t,n)=>{const r=function(e,t,n,r,o){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:o;return e===o?n:e}(e,`colors.${t}`,t),{isValid:o}=new Rm(r);return o?r:n},Hm=e=>t=>"dark"===(e=>t=>{const n=Fm(t,e);return new Rm(n).isDark()?"dark":"light"})(e)(t),Wm=(e,t)=>n=>{const r=Fm(n,e);return new Rm(r).setAlpha(t).toRgbString()};function $m(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(\n 45deg,\n ${t} 25%,\n transparent 25%,\n transparent 50%,\n ${t} 50%,\n ${t} 75%,\n transparent 75%,\n transparent\n )`,backgroundSize:`${e} ${e}`}}function Um(e){const t=Nm().toHexString();return e&&(n=e,0!==Object.keys(n).length)?e.string&&e.colors?function(e,t){let n=0;if(0===e.length)return t[0];for(let r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n&=n;return n=(n%t.length+t.length)%t.length,t[n]}(e.string,e.colors):e.string&&!e.colors?function(e){let t=0;if(0===e.length)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t&=t;let n="#";for(let r=0;r<3;r+=1){n+=`00${(t>>8*r&255).toString(16)}`.substr(-2)}return n}(e.string):e.colors&&!e.string?function(e){return e[Math.floor(Math.random()*e.length)]}(e.colors):t:t;var n}function Vm(e,t){return n=>"dark"===n.colorMode?t:e}function Gm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?"vertical"===t?n:r:{}}function qm(e){return function(e){const t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}(e)&&e.reference?e.reference:String(e)}var Zm=(e,...t)=>t.map(qm).join(` ${e} `).replace(/calc/g,""),Ym=(...e)=>`calc(${Zm("+",...e)})`,Xm=(...e)=>`calc(${Zm("-",...e)})`,Km=(...e)=>`calc(${Zm("*",...e)})`,Qm=(...e)=>`calc(${Zm("/",...e)})`,Jm=e=>{const t=qm(e);return null==t||Number.isNaN(parseFloat(t))?Km(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},ev=Object.assign((e=>({add:(...t)=>ev(Ym(e,...t)),subtract:(...t)=>ev(Xm(e,...t)),multiply:(...t)=>ev(Km(e,...t)),divide:(...t)=>ev(Qm(e,...t)),negate:()=>ev(Jm(e)),toString:()=>e.toString()})),{add:Ym,subtract:Xm,multiply:Km,divide:Qm,negate:Jm});function tv(e){const t=function(e,t="-"){return e.replace(/\s+/g,t)}(e.toString());return t.includes("\\.")?e:function(e){return!Number.isInteger(parseFloat(e.toString()))}(e)?t.replace(".","\\."):e}function nv(e,t){return`var(${tv(e)}${t?`, ${t}`:""})`}function rv(e,t=""){return`--${function(e,t=""){return[t,tv(e)].filter(Boolean).join("-")}(e,t)}`}function ov(e,t){const n=rv(e,null==t?void 0:t.prefix);return{variable:n,reference:nv(n,iv(null==t?void 0:t.fallback))}}function iv(e){return"string"==typeof e?e:null==e?void 0:e.reference}var{definePartsStyle:av,defineMultiStyleConfig:sv}=lf(Ug.keys),lv=sv({baseStyle:av({container:{borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},button:{transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},panel:{pt:"2",px:"4",pb:"5"},icon:{fontSize:"1.25em"}})}),{definePartsStyle:cv,defineMultiStyleConfig:uv}=lf(Vg.keys),dv=Ch("alert-fg"),hv=Ch("alert-bg"),fv=cv({container:{bg:hv.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:dv.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:dv.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function pv(e){const{theme:t,colorScheme:n}=e;return{light:`colors.${n}.100`,dark:Wm(`${n}.200`,.16)(t)}}var gv=cv((e=>{const{colorScheme:t}=e,n=pv(e);return{container:{[dv.variable]:`colors.${t}.500`,[hv.variable]:n.light,_dark:{[dv.variable]:`colors.${t}.200`,[hv.variable]:n.dark}}}})),mv=cv((e=>{const{colorScheme:t}=e,n=pv(e);return{container:{[dv.variable]:`colors.${t}.500`,[hv.variable]:n.light,_dark:{[dv.variable]:`colors.${t}.200`,[hv.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:dv.reference}}})),vv=cv((e=>{const{colorScheme:t}=e,n=pv(e);return{container:{[dv.variable]:`colors.${t}.500`,[hv.variable]:n.light,_dark:{[dv.variable]:`colors.${t}.200`,[hv.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:dv.reference}}})),yv=cv((e=>{const{colorScheme:t}=e;return{container:{[dv.variable]:"colors.white",[hv.variable]:`colors.${t}.500`,_dark:{[dv.variable]:"colors.gray.900",[hv.variable]:`colors.${t}.200`},color:dv.reference}}})),bv=uv({baseStyle:fv,variants:{subtle:gv,"left-accent":mv,"top-accent":vv,solid:yv},defaultProps:{variant:"subtle",colorScheme:"blue"}}),xv={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"},wv={...xv,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",container:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px"}};function kv(e,...t){return(e=>"function"==typeof e)(e)?e(...t):e}var{definePartsStyle:Sv,defineMultiStyleConfig:Cv}=lf(Gg.keys),_v=Ch("avatar-border-color"),Ev=Ch("avatar-bg"),Lv={borderRadius:"full",border:"0.2em solid",[_v.variable]:"white",_dark:{[_v.variable]:"colors.gray.800"},borderColor:_v.reference},Pv={[Ev.variable]:"colors.gray.200",_dark:{[Ev.variable]:"colors.whiteAlpha.400"},bgColor:Ev.reference},Ov=Ch("avatar-background"),Tv=e=>{const{name:t,theme:n}=e,r=t?Um({string:t}):"colors.gray.400";let o="white";return Hm(r)(n)||(o="gray.800"),{bg:Ov.reference,"&:not([data-loaded])":{[Ov.variable]:r},color:o,[_v.variable]:"colors.white",_dark:{[_v.variable]:"colors.gray.800"},borderColor:_v.reference,verticalAlign:"top"}};function Mv(e){const t="100%"!==e?wv[e]:void 0;return Sv({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:"100%"!==e?t??e:void 0}})}var Av=Cv({baseStyle:Sv((e=>({badge:kv(Lv,e),excessLabel:kv(Pv,e),container:kv(Tv,e)}))),sizes:{"2xs":Mv(4),xs:Mv(6),sm:Mv(8),md:Mv(12),lg:Mv(16),xl:Mv(24),"2xl":Mv(32),full:Mv("100%")},defaultProps:{size:"md"}}),Iv={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},Rv=Ch("badge-bg"),Nv=Ch("badge-color"),Dv=e=>{const{colorScheme:t,theme:n}=e,r=Wm(`${t}.500`,.6)(n);return{[Rv.variable]:`colors.${t}.500`,[Nv.variable]:"colors.white",_dark:{[Rv.variable]:r,[Nv.variable]:"colors.whiteAlpha.800"},bg:Rv.reference,color:Nv.reference}},zv=e=>{const{colorScheme:t,theme:n}=e,r=Wm(`${t}.200`,.16)(n);return{[Rv.variable]:`colors.${t}.100`,[Nv.variable]:`colors.${t}.800`,_dark:{[Rv.variable]:r,[Nv.variable]:`colors.${t}.200`},bg:Rv.reference,color:Nv.reference}},Bv=e=>{const{colorScheme:t,theme:n}=e,r=Wm(`${t}.200`,.8)(n);return{[Nv.variable]:`colors.${t}.500`,_dark:{[Nv.variable]:r},color:Nv.reference,boxShadow:`inset 0 0 0px 1px ${Nv.reference}`}},jv={baseStyle:Iv,variants:{solid:Dv,subtle:zv,outline:Bv},defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Fv,definePartsStyle:Hv}=lf(qg.keys),Wv=Fv({baseStyle:Hv({link:{transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}})}),$v=e=>{const{colorScheme:t,theme:n}=e;if("gray"===t)return{color:Vm("inherit","whiteAlpha.900")(e),_hover:{bg:Vm("gray.100","whiteAlpha.200")(e)},_active:{bg:Vm("gray.200","whiteAlpha.300")(e)}};const r=Wm(`${t}.200`,.12)(n),o=Wm(`${t}.200`,.24)(n);return{color:Vm(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Vm(`${t}.50`,r)(e)},_active:{bg:Vm(`${t}.100`,o)(e)}}},Uv=e=>{const{colorScheme:t}=e,n=Vm("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:"gray"===t?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...kv($v,e)}},Vv={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Gv=e=>{const{colorScheme:t}=e;if("gray"===t){const t=Vm("gray.100","whiteAlpha.200")(e);return{bg:t,_hover:{bg:Vm("gray.200","whiteAlpha.300")(e),_disabled:{bg:t}},_active:{bg:Vm("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:o=`${t}.600`,activeBg:i=`${t}.700`}=Vv[t]??{},a=Vm(n,`${t}.200`)(e);return{bg:a,color:Vm(r,"gray.800")(e),_hover:{bg:Vm(o,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Vm(i,`${t}.400`)(e)}}},qv=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Vm(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Vm(`${t}.700`,`${t}.500`)(e)}}},Zv={baseStyle:{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"}}},variants:{ghost:$v,outline:Uv,solid:Gv,link:qv,unstyled:{bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"}},sizes:{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"}},defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Yv,defineMultiStyleConfig:Xv}=lf(pm.keys),Kv=Ch("card-bg"),Qv=Ch("card-padding"),Jv=Yv({container:{[Kv.variable]:"chakra-body-bg",backgroundColor:Kv.reference,color:"chakra-body-text"},body:{padding:Qv.reference,flex:"1 1 0%"},header:{padding:Qv.reference},footer:{padding:Qv.reference}}),ey={sm:Yv({container:{borderRadius:"base",[Qv.variable]:"space.3"}}),md:Yv({container:{borderRadius:"md",[Qv.variable]:"space.5"}}),lg:Yv({container:{borderRadius:"xl",[Qv.variable]:"space.7"}})},ty=Xv({baseStyle:Jv,variants:{elevated:Yv({container:{boxShadow:"base",_dark:{[Kv.variable]:"colors.gray.700"}}}),outline:Yv({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Yv({container:{[Kv.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},sizes:ey,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:ny,defineMultiStyleConfig:ry}=lf(Zg.keys),oy=Ch("checkbox-size"),iy=e=>{const{colorScheme:t}=e;return{w:oy.reference,h:oy.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Vm(`${t}.500`,`${t}.200`)(e),borderColor:Vm(`${t}.500`,`${t}.200`)(e),color:Vm("white","gray.900")(e),_hover:{bg:Vm(`${t}.600`,`${t}.300`)(e),borderColor:Vm(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Vm("gray.200","transparent")(e),bg:Vm("gray.200","whiteAlpha.300")(e),color:Vm("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Vm(`${t}.500`,`${t}.200`)(e),borderColor:Vm(`${t}.500`,`${t}.200`)(e),color:Vm("white","gray.900")(e)},_disabled:{bg:Vm("gray.100","whiteAlpha.100")(e),borderColor:Vm("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Vm("red.500","red.300")(e)}}},ay={_disabled:{cursor:"not-allowed"}},sy={userSelect:"none",_disabled:{opacity:.4}},ly={transitionProperty:"transform",transitionDuration:"normal"},cy=ry({baseStyle:ny((e=>({icon:ly,container:ay,control:kv(iy,e),label:sy}))),sizes:{sm:ny({control:{[oy.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:ny({control:{[oy.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:ny({control:{[oy.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},defaultProps:{size:"md",colorScheme:"blue"}}),uy=ov("close-button-size"),dy=ov("close-button-bg"),hy={baseStyle:{w:[uy.reference],h:[uy.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[dy.variable]:"colors.blackAlpha.100",_dark:{[dy.variable]:"colors.whiteAlpha.100"}},_active:{[dy.variable]:"colors.blackAlpha.200",_dark:{[dy.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:dy.reference},sizes:{lg:{[uy.variable]:"sizes.10",fontSize:"md"},md:{[uy.variable]:"sizes.8",fontSize:"xs"},sm:{[uy.variable]:"sizes.6",fontSize:"2xs"}},defaultProps:{size:"md"}},{variants:fy,defaultProps:py}=jv,gy={baseStyle:{fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},variants:fy,defaultProps:py},my={baseStyle:{w:"100%",mx:"auto",maxW:"prose",px:"4"}},vy={baseStyle:{opacity:.6,borderColor:"inherit"},variants:{solid:{borderStyle:"solid"},dashed:{borderStyle:"dashed"}},defaultProps:{variant:"solid"}},{definePartsStyle:yy,defineMultiStyleConfig:by}=lf(Yg.keys),xy=Ch("drawer-bg"),wy=Ch("drawer-box-shadow");function ky(e){return yy("full"===e?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Sy={bg:"blackAlpha.600",zIndex:"overlay"},Cy={display:"flex",zIndex:"modal",justifyContent:"center"},_y=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[xy.variable]:"colors.white",[wy.variable]:"shadows.lg",_dark:{[xy.variable]:"colors.gray.700",[wy.variable]:"shadows.dark-lg"},bg:xy.reference,boxShadow:wy.reference}},Ey={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Ly={position:"absolute",top:"2",insetEnd:"3"},Py={px:"6",py:"2",flex:"1",overflow:"auto"},Oy={px:"6",py:"4"},Ty=by({baseStyle:yy((e=>({overlay:Sy,dialogContainer:Cy,dialog:kv(_y,e),header:Ey,closeButton:Ly,body:Py,footer:Oy}))),sizes:{xs:ky("xs"),sm:ky("md"),md:ky("lg"),lg:ky("2xl"),xl:ky("4xl"),full:ky("full")},defaultProps:{size:"xs"}}),{definePartsStyle:My,defineMultiStyleConfig:Ay}=lf(Xg.keys),Iy=Ay({baseStyle:My({preview:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},input:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},textarea:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}})}),{definePartsStyle:Ry,defineMultiStyleConfig:Ny}=lf(Kg.keys),Dy=Ch("form-control-color"),zy=Ny({baseStyle:Ry({container:{width:"100%",position:"relative"},requiredIndicator:{marginStart:"1",[Dy.variable]:"colors.red.500",_dark:{[Dy.variable]:"colors.red.300"},color:Dy.reference},helperText:{mt:"2",[Dy.variable]:"colors.gray.600",_dark:{[Dy.variable]:"colors.whiteAlpha.600"},color:Dy.reference,lineHeight:"normal",fontSize:"sm"}})}),{definePartsStyle:By,defineMultiStyleConfig:jy}=lf(Qg.keys),Fy=Ch("form-error-color"),Hy=jy({baseStyle:By({text:{[Fy.variable]:"colors.red.500",_dark:{[Fy.variable]:"colors.red.300"},color:Fy.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},icon:{marginEnd:"0.5em",[Fy.variable]:"colors.red.500",_dark:{[Fy.variable]:"colors.red.300"},color:Fy.reference}})}),Wy={baseStyle:{fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}}},$y={baseStyle:{fontFamily:"heading",fontWeight:"bold"},sizes:{"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}},defaultProps:{size:"xl"}},{definePartsStyle:Uy,defineMultiStyleConfig:Vy}=lf(Jg.keys),Gy=Uy({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),qy={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"}},Zy={lg:Uy({field:qy.lg,addon:qy.lg}),md:Uy({field:qy.md,addon:qy.md}),sm:Uy({field:qy.sm,addon:qy.sm}),xs:Uy({field:qy.xs,addon:qy.xs})};function Yy(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Vm("blue.500","blue.300")(e),errorBorderColor:n||Vm("red.500","red.300")(e)}}var Xy=Uy((e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Yy(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Vm("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Fm(t,r),boxShadow:`0 0 0 1px ${Fm(t,r)}`},_focusVisible:{zIndex:1,borderColor:Fm(t,n),boxShadow:`0 0 0 1px ${Fm(t,n)}`}},addon:{border:"1px solid",borderColor:Vm("inherit","whiteAlpha.50")(e),bg:Vm("gray.100","whiteAlpha.300")(e)}}})),Ky=Uy((e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Yy(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Vm("gray.100","whiteAlpha.50")(e),_hover:{bg:Vm("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Fm(t,r)},_focusVisible:{bg:"transparent",borderColor:Fm(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Vm("gray.100","whiteAlpha.50")(e)}}})),Qy=Uy((e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Yy(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Fm(t,r),boxShadow:`0px 1px 0px 0px ${Fm(t,r)}`},_focusVisible:{borderColor:Fm(t,n),boxShadow:`0px 1px 0px 0px ${Fm(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}})),Jy=Vy({baseStyle:Gy,sizes:Zy,variants:{outline:Xy,filled:Ky,flushed:Qy,unstyled:Uy({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}})},defaultProps:{size:"md",variant:"outline"}}),eb=Ch("kbd-bg"),tb={baseStyle:{[eb.variable]:"colors.gray.100",_dark:{[eb.variable]:"colors.whiteAlpha.100"},bg:eb.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}},nb={baseStyle:{transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}},{defineMultiStyleConfig:rb,definePartsStyle:ob}=lf(em.keys),ib=rb({baseStyle:ob({icon:{marginEnd:"2",display:"inline",verticalAlign:"text-bottom"}})}),{defineMultiStyleConfig:ab,definePartsStyle:sb}=lf(tm.keys),lb=Ch("menu-bg"),cb=Ch("menu-shadow"),ub=ab({baseStyle:sb({button:{transitionProperty:"common",transitionDuration:"normal"},list:{[lb.variable]:"#fff",[cb.variable]:"shadows.sm",_dark:{[lb.variable]:"colors.gray.700",[cb.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:lb.reference,boxShadow:cb.reference},item:{py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[lb.variable]:"colors.gray.100",_dark:{[lb.variable]:"colors.whiteAlpha.100"}},_active:{[lb.variable]:"colors.gray.200",_dark:{[lb.variable]:"colors.whiteAlpha.200"}},_expanded:{[lb.variable]:"colors.gray.100",_dark:{[lb.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:lb.reference},groupTitle:{mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},command:{opacity:.6},divider:{border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6}})}),{defineMultiStyleConfig:db,definePartsStyle:hb}=lf(nm.keys),fb={bg:"blackAlpha.600",zIndex:"modal"},pb=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:"inside"===n?"hidden":"auto"}},gb=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Vm("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:"inside"===t?"calc(100% - 7.5rem)":void 0,boxShadow:Vm("lg","dark-lg")(e)}},mb={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},vb={position:"absolute",top:"2",insetEnd:"3"},yb=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:"inside"===t?"auto":void 0}},bb={px:"6",py:"4"};function xb(e){return hb("full"===e?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var wb=db({baseStyle:hb((e=>({overlay:fb,dialogContainer:kv(pb,e),dialog:kv(gb,e),header:mb,closeButton:vb,body:kv(yb,e),footer:bb}))),sizes:{xs:xb("xs"),sm:xb("sm"),md:xb("md"),lg:xb("lg"),xl:xb("xl"),"2xl":xb("2xl"),"3xl":xb("3xl"),"4xl":xb("4xl"),"5xl":xb("5xl"),"6xl":xb("6xl"),full:xb("full")},defaultProps:{size:"md"}}),kb={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"}},{defineMultiStyleConfig:Sb,definePartsStyle:Cb}=lf(rm.keys),_b=ov("number-input-stepper-width"),Eb=ov("number-input-input-padding"),Lb=ev(_b).add("0.5rem").toString(),Pb=ov("number-input-bg"),Ob=ov("number-input-color"),Tb=ov("number-input-border-color"),Mb={[_b.variable]:"sizes.6",[Eb.variable]:Lb},Ab=e=>{var t;return(null==(t=kv(Jy.baseStyle,e))?void 0:t.field)??{}},Ib={width:_b.reference},Rb={borderStart:"1px solid",borderStartColor:Tb.reference,color:Ob.reference,bg:Pb.reference,[Ob.variable]:"colors.chakra-body-text",[Tb.variable]:"colors.chakra-border-color",_dark:{[Ob.variable]:"colors.whiteAlpha.800",[Tb.variable]:"colors.whiteAlpha.300"},_active:{[Pb.variable]:"colors.gray.200",_dark:{[Pb.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}};function Nb(e){var t,n;const r=null==(t=Jy.sizes)?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},i=(null==(n=r.field)?void 0:n.fontSize)??"md",a=kb.fontSizes[i];return Cb({field:{...r.field,paddingInlineEnd:Eb.reference,verticalAlign:"top"},stepper:{fontSize:ev(a).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var Db,zb,Bb,jb,Fb,Hb,Wb,$b,Ub,Vb,Gb,qb,Zb,Yb,Xb,Kb,Qb,Jb=Sb({baseStyle:Cb((e=>({root:Mb,field:kv(Ab,e)??{},stepperGroup:Ib,stepper:Rb}))),sizes:{xs:Nb("xs"),sm:Nb("sm"),md:Nb("md"),lg:Nb("lg")},variants:Jy.variants,defaultProps:Jy.defaultProps}),ex={baseStyle:{...null==(Db=Jy.baseStyle)?void 0:Db.field,textAlign:"center"},sizes:{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"}},variants:{outline:e=>{var t,n;return(null==(n=kv(null==(t=Jy.variants)?void 0:t.outline,e))?void 0:n.field)??{}},flushed:e=>{var t,n;return(null==(n=kv(null==(t=Jy.variants)?void 0:t.flushed,e))?void 0:n.field)??{}},filled:e=>{var t,n;return(null==(n=kv(null==(t=Jy.variants)?void 0:t.filled,e))?void 0:n.field)??{}},unstyled:(null==(zb=Jy.variants)?void 0:zb.unstyled.field)??{}},defaultProps:Jy.defaultProps},{defineMultiStyleConfig:tx,definePartsStyle:nx}=lf(om.keys),rx=ov("popper-bg"),ox=ov("popper-arrow-bg"),ix=ov("popper-arrow-shadow-color"),ax=tx({baseStyle:nx({popper:{zIndex:10},content:{[rx.variable]:"colors.white",bg:rx.reference,[ox.variable]:rx.reference,[ix.variable]:"colors.gray.200",_dark:{[rx.variable]:"colors.gray.700",[ix.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},header:{px:3,py:2,borderBottomWidth:"1px"},body:{px:3,py:2},footer:{px:3,py:2,borderTopWidth:"1px"},closeButton:{position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2}})}),{defineMultiStyleConfig:sx,definePartsStyle:lx}=lf(im.keys),cx=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:o}=e,i=Vm($m(),$m("1rem","rgba(0,0,0,0.1)"))(e),a=Vm(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(\n to right,\n transparent 0%,\n ${Fm(n,a)} 50%,\n transparent 100%\n )`;return{...!r&&o&&i,...r?{bgImage:s}:{bgColor:a}}},ux={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},dx=e=>({bg:Vm("gray.100","whiteAlpha.300")(e)}),hx=e=>({transitionProperty:"common",transitionDuration:"slow",...cx(e)}),fx=lx((e=>({label:ux,filledTrack:hx(e),track:dx(e)}))),px=sx({sizes:{xs:lx({track:{h:"1"}}),sm:lx({track:{h:"2"}}),md:lx({track:{h:"3"}}),lg:lx({track:{h:"4"}})},baseStyle:fx,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:gx,definePartsStyle:mx}=lf(am.keys),vx=e=>{var t;const n=null==(t=kv(cy.baseStyle,e))?void 0:t.control;return{...n,borderRadius:"full",_checked:{...null==n?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},yx=gx({baseStyle:mx((e=>{var t,n,r,o;return{label:null==(n=(t=cy).baseStyle)?void 0:n.call(t,e).label,container:null==(o=(r=cy).baseStyle)?void 0:o.call(r,e).container,control:vx(e)}})),sizes:{md:mx({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:mx({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:mx({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:bx,definePartsStyle:xx}=lf(sm.keys),wx=Ch("select-bg"),kx={paddingInlineEnd:"8"},Sx=bx({baseStyle:xx({field:{...null==(Bb=Jy.baseStyle)?void 0:Bb.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:wx.reference,[wx.variable]:"colors.white",_dark:{[wx.variable]:"colors.gray.700"},"> option, > optgroup":{bg:wx.reference}},icon:{width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}}}),sizes:{lg:{...null==(jb=Jy.sizes)?void 0:jb.lg,field:{...null==(Fb=Jy.sizes)?void 0:Fb.lg.field,...kx}},md:{...null==(Hb=Jy.sizes)?void 0:Hb.md,field:{...null==(Wb=Jy.sizes)?void 0:Wb.md.field,...kx}},sm:{...null==($b=Jy.sizes)?void 0:$b.sm,field:{...null==(Ub=Jy.sizes)?void 0:Ub.sm.field,...kx}},xs:{...null==(Vb=Jy.sizes)?void 0:Vb.xs,field:{...null==(Gb=Jy.sizes)?void 0:Gb.xs.field,...kx},icon:{insetEnd:"1"}}},variants:Jy.variants,defaultProps:Jy.defaultProps}),Cx=Ch("skeleton-start-color"),_x=Ch("skeleton-end-color"),Ex={baseStyle:{[Cx.variable]:"colors.gray.100",[_x.variable]:"colors.gray.400",_dark:{[Cx.variable]:"colors.gray.800",[_x.variable]:"colors.gray.600"},background:Cx.reference,borderColor:_x.reference,opacity:.7,borderRadius:"sm"}},Lx=Ch("skip-link-bg"),Px={baseStyle:{borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Lx.variable]:"colors.white",_dark:{[Lx.variable]:"colors.gray.700"},bg:Lx.reference}}},{defineMultiStyleConfig:Ox,definePartsStyle:Tx}=lf(lm.keys),Mx=Ch("slider-thumb-size"),Ax=Ch("slider-track-size"),Ix=Ch("slider-bg"),Rx=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...Gm({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Nx=e=>({...Gm({orientation:e.orientation,horizontal:{h:Ax.reference},vertical:{w:Ax.reference}}),overflow:"hidden",borderRadius:"sm",[Ix.variable]:"colors.gray.200",_dark:{[Ix.variable]:"colors.whiteAlpha.200"},_disabled:{[Ix.variable]:"colors.gray.300",_dark:{[Ix.variable]:"colors.whiteAlpha.300"}},bg:Ix.reference}),Dx=e=>{const{orientation:t}=e;return{...Gm({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:Mx.reference,h:Mx.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"}}},zx=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Ix.variable]:`colors.${t}.500`,_dark:{[Ix.variable]:`colors.${t}.200`},bg:Ix.reference}},Bx=Ox({baseStyle:Tx((e=>({container:Rx(e),track:Nx(e),thumb:Dx(e),filledTrack:zx(e)}))),sizes:{lg:Tx({container:{[Mx.variable]:"sizes.4",[Ax.variable]:"sizes.1"}}),md:Tx({container:{[Mx.variable]:"sizes.3.5",[Ax.variable]:"sizes.1"}}),sm:Tx({container:{[Mx.variable]:"sizes.2.5",[Ax.variable]:"sizes.0.5"}})},defaultProps:{size:"md",colorScheme:"blue"}}),jx=ov("spinner-size"),Fx={baseStyle:{width:[jx.reference],height:[jx.reference]},sizes:{xs:{[jx.variable]:"sizes.3"},sm:{[jx.variable]:"sizes.4"},md:{[jx.variable]:"sizes.6"},lg:{[jx.variable]:"sizes.8"},xl:{[jx.variable]:"sizes.12"}},defaultProps:{size:"md"}},{defineMultiStyleConfig:Hx,definePartsStyle:Wx}=lf(cm.keys),$x=Hx({baseStyle:Wx({container:{},label:{fontWeight:"medium"},helpText:{opacity:.8,marginBottom:"2"},number:{verticalAlign:"baseline",fontWeight:"semibold"},icon:{marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"}}),sizes:{md:Wx({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},defaultProps:{size:"md"}}),{defineMultiStyleConfig:Ux,definePartsStyle:Vx}=lf(um.keys),Gx=ov("switch-track-width"),qx=ov("switch-track-height"),Zx=ov("switch-track-diff"),Yx=ev.subtract(Gx,qx),Xx=ov("switch-thumb-x"),Kx=ov("switch-bg"),Qx=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Gx.reference],height:[qx.reference],transitionProperty:"common",transitionDuration:"fast",[Kx.variable]:"colors.gray.300",_dark:{[Kx.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Kx.variable]:`colors.${t}.500`,_dark:{[Kx.variable]:`colors.${t}.200`}},bg:Kx.reference}},Jx={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qx.reference],height:[qx.reference],_checked:{transform:`translateX(${Xx.reference})`}},ew=Ux({baseStyle:Vx((e=>({container:{[Zx.variable]:Yx,[Xx.variable]:Zx.reference,_rtl:{[Xx.variable]:ev(Zx).negate().toString()}},track:Qx(e),thumb:Jx}))),sizes:{sm:Vx({container:{[Gx.variable]:"1.375rem",[qx.variable]:"sizes.3"}}),md:Vx({container:{[Gx.variable]:"1.875rem",[qx.variable]:"sizes.4"}}),lg:Vx({container:{[Gx.variable]:"2.875rem",[qx.variable]:"sizes.6"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:tw,definePartsStyle:nw}=lf(dm.keys),rw=nw({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"}}),ow={"&[data-is-numeric=true]":{textAlign:"end"}},iw=nw((e=>{const{colorScheme:t}=e;return{th:{color:Vm("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Vm(`${t}.100`,`${t}.700`)(e),...ow},td:{borderBottom:"1px",borderColor:Vm(`${t}.100`,`${t}.700`)(e),...ow},caption:{color:Vm("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}})),aw=nw((e=>{const{colorScheme:t}=e;return{th:{color:Vm("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Vm(`${t}.100`,`${t}.700`)(e),...ow},td:{borderBottom:"1px",borderColor:Vm(`${t}.100`,`${t}.700`)(e),...ow},caption:{color:Vm("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Vm(`${t}.100`,`${t}.700`)(e)},td:{background:Vm(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}})),sw=tw({baseStyle:rw,variants:{simple:iw,striped:aw,unstyled:{}},sizes:{sm:nw({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:nw({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:nw({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),lw=Ch("tabs-color"),cw=Ch("tabs-bg"),uw=Ch("tabs-border-color"),{defineMultiStyleConfig:dw,definePartsStyle:hw}=lf(hm.keys),fw=e=>{const{orientation:t}=e;return{display:"vertical"===t?"flex":"block"}},pw=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}}},gw=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:"vertical"===n?"column":"row"}},mw={p:4},vw=hw((e=>({root:fw(e),tab:pw(e),tablist:gw(e),tabpanel:mw}))),yw={sm:hw({tab:{py:1,px:4,fontSize:"sm"}}),md:hw({tab:{fontSize:"md",py:2,px:4}}),lg:hw({tab:{fontSize:"lg",py:3,px:4}})},bw=hw((e=>{const{colorScheme:t,orientation:n}=e,r="vertical"===n?"borderStart":"borderBottom";return{tablist:{[r]:"2px solid",borderColor:"inherit"},tab:{[r]:"2px solid",borderColor:"transparent",["vertical"===n?"marginStart":"marginBottom"]:"-2px",_selected:{[lw.variable]:`colors.${t}.600`,_dark:{[lw.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[cw.variable]:"colors.gray.200",_dark:{[cw.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:lw.reference,bg:cw.reference}}})),xw=hw((e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[uw.reference]:"transparent",_selected:{[lw.variable]:`colors.${t}.600`,[uw.variable]:"colors.white",_dark:{[lw.variable]:`colors.${t}.300`,[uw.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:uw.reference},color:lw.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}})),ww=hw((e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[cw.variable]:"colors.gray.50",_dark:{[cw.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[cw.variable]:"colors.white",[lw.variable]:`colors.${t}.600`,_dark:{[cw.variable]:"colors.gray.800",[lw.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:lw.reference,bg:cw.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}})),kw=hw((e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Fm(n,`${t}.700`),bg:Fm(n,`${t}.100`)}}}})),Sw=hw((e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[lw.variable]:"colors.gray.600",_dark:{[lw.variable]:"inherit"},_selected:{[lw.variable]:"colors.white",[cw.variable]:`colors.${t}.600`,_dark:{[lw.variable]:"colors.gray.800",[cw.variable]:`colors.${t}.300`}},color:lw.reference,bg:cw.reference}}})),Cw=dw({baseStyle:vw,sizes:yw,variants:{line:bw,enclosed:xw,"enclosed-colored":ww,"soft-rounded":kw,"solid-rounded":Sw,unstyled:hw({})},defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:_w,definePartsStyle:Ew}=lf(fm.keys),Lw=Ew({container:{fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},label:{lineHeight:1.2,overflow:"visible"},closeButton:{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}}}),Pw={sm:Ew({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ew({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Ew({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Ow=_w({variants:{subtle:Ew((e=>{var t;return{container:null==(t=jv.variants)?void 0:t.subtle(e)}})),solid:Ew((e=>{var t;return{container:null==(t=jv.variants)?void 0:t.solid(e)}})),outline:Ew((e=>{var t;return{container:null==(t=jv.variants)?void 0:t.outline(e)}}))},baseStyle:Lw,sizes:Pw,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),Tw={...null==(qb=Jy.baseStyle)?void 0:qb.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},Mw={outline:e=>{var t;return(null==(t=Jy.variants)?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return(null==(t=Jy.variants)?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return(null==(t=Jy.variants)?void 0:t.filled(e).field)??{}},unstyled:(null==(Zb=Jy.variants)?void 0:Zb.unstyled.field)??{}},Aw={baseStyle:Tw,sizes:{xs:(null==(Yb=Jy.sizes)?void 0:Yb.xs.field)??{},sm:(null==(Xb=Jy.sizes)?void 0:Xb.sm.field)??{},md:(null==(Kb=Jy.sizes)?void 0:Kb.md.field)??{},lg:(null==(Qb=Jy.sizes)?void 0:Qb.lg.field)??{}},variants:Mw,defaultProps:{size:"md",variant:"outline"}},Iw=ov("tooltip-bg"),Rw=ov("tooltip-fg"),Nw=ov("popper-arrow-bg"),Dw={bg:Iw.reference,color:Rw.reference,[Iw.variable]:"colors.gray.700",[Rw.variable]:"colors.whiteAlpha.900",_dark:{[Iw.variable]:"colors.gray.300",[Rw.variable]:"colors.gray.900"},[Nw.variable]:Iw.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},zw={Accordion:lv,Alert:bv,Avatar:Av,Badge:jv,Breadcrumb:Wv,Button:Zv,Checkbox:cy,CloseButton:hy,Code:gy,Container:my,Divider:vy,Drawer:Ty,Editable:Iy,Form:zy,FormError:Hy,FormLabel:Wy,Heading:$y,Input:Jy,Kbd:tb,Link:nb,List:ib,Menu:ub,Modal:wb,NumberInput:Jb,PinInput:ex,Popover:ax,Progress:px,Radio:yx,Select:Sx,Skeleton:Ex,SkipLink:Px,Slider:Bx,Spinner:Fx,Stat:$x,Switch:ew,Table:sw,Tabs:Cw,Tag:Ow,Textarea:Aw,Tooltip:{baseStyle:Dw},Card:ty},Bw={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},jw={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"},Fw={property:{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"},easing:{"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)"},duration:{"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"}},Hw={semanticTokens:{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"}}},direction:"ltr",...{breakpoints:{base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},zIndices:{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},radii:{none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},blur:{none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},colors:{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"}},...kb,sizes:wv,shadows:jw,space:xv,borders:Bw,transition:Fw},components:zw,styles:{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"}}},config:{useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"}},Ww="undefined"!=typeof Element,$w="function"==typeof Map,Uw="function"==typeof Set,Vw="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function Gw(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!Gw(e[r],t[r]))return!1;return!0}if($w&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Gw(r.value[1],t.get(r.value[0])))return!1;return!0}if(Uw&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Vw&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)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((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(Ww&&e instanceof Element)return!1;for(r=n;0!=r--;)if(("_owner"!==o[r]&&"__v"!==o[r]&&"__o"!==o[r]||!e.$$typeof)&&!Gw(e[o[r]],t[o[r]]))return!1;return!0}return e!=e&&t!=t}var qw=function(e,t){try{return Gw(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};function Zw(){const e=i.exports.useContext(lg);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}function Yw(){return{...ud(),theme:Zw()}}function Xw(e){const{cssVarsRoot:t,theme:n,children:r}=e,o=i.exports.useMemo((()=>Xh(n)),[n]);return ld(ug,{theme:o,children:[sd(Kw,{root:t}),r]})}function Kw({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return sd(dg,{styles:e=>({[t]:e.__cssVars})})}function Qw(){const{colorMode:e}=ud();return sd(dg,{styles:t=>{const n=Rg(Og(t,"styles.global"),{theme:t,colorMode:e});if(!n)return;return sf(n)(t)}})}!function(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,o=i.exports.createContext(void 0);o.displayName=r,o.Provider}({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});var Jw=new Set([...ef,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),ek=new Set(["htmlWidth","htmlHeight","htmlSize"]);function tk(e){return ek.has(e)||!Jw.has(e)}function nk(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=tk);const o=(({baseStyle:e})=>t=>{const{theme:n,css:r,__css:o,sx:i,...a}=t,s=Tg(a,((e,t)=>nf(t))),l=Rg(e,t),c=Object.assign({},o,l,Mg(s),i),u=sf(c)(t.theme);return r?[u,r]:u})({baseStyle:n}),i=Wg(e,r)(o);return F.forwardRef((function(e,t){const{colorMode:n,forced:r}=ud();return F.createElement(i,{ref:t,"data-theme":r?n:void 0,...e})}))}function rk(e){return i.exports.forwardRef(e)}function ok(e,t={}){const{styleConfig:n,...r}=t,{theme:o,colorMode:a}=Yw(),s=e?Og(o,`components.${e}`):void 0,l=n||s,c=bd({theme:o,colorMode:a},(null==l?void 0:l.defaultProps)??{},Mg(function(e,t){const n={};return Object.keys(e).forEach((r=>{t.includes(r)||(n[r]=e[r])})),n}(r,["children"]))),u=i.exports.useRef({});if(l){const e=function(e){return t=>{const{variant:n,size:r,theme:o}=t,i=uf(o);return bd({},wd(e.baseStyle??{},t),i(e,"sizes",r,t),i(e,"variants",n,t))}}(l),t=e(c);qw(u.current,t)||(u.current=t)}return u.current}function ik(e,t={}){return ok(e,t)}function ak(e,t={}){return ok(e,t)}var sk=function(){const e=new Map;return new Proxy(nk,{apply:(e,t,n)=>nk(...n),get:(t,n)=>(e.has(n)||e.set(n,nk(n)),e.get(n))})}();function lk(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a}=e,s=i.exports.createContext(void 0);return s.displayName=t,[s.Provider,function e(){var t;const l=i.exports.useContext(s);if(!l&&n){const n=new Error(a??`${r} returned \`undefined\`. Seems you forgot to wrap component within ${o}`);throw n.name="ContextError",null==(t=Error.captureStackTrace)||t.call(Error,n,e),n}return l},s]}function ck(...e){return t=>{e.forEach((e=>{!function(e,t){if(null!=e)if("function"!=typeof e)try{e.current=t}catch(n){throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}else e(t)}(e,t)}))}}function uk(...e){return i.exports.useMemo((()=>ck(...e)),e)}function dk(e){return e.sort(((e,t)=>{const n=e.compareDocumentPosition(t);if(n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0}))}function hk(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function fk(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var pk="undefined"!=typeof window?i.exports.useLayoutEffect:i.exports.useEffect;function gk(){const t=i.exports.useRef(new class{constructor(){e(this,"descendants",new Map),e(this,"register",(e=>{if(null!=e)return(e=>"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE)(e)?this.registerNode(e):t=>{this.registerNode(t,e)}})),e(this,"unregister",(e=>{this.descendants.delete(e);const t=dk(Array.from(this.descendants.keys()));this.assignIndex(t)})),e(this,"destroy",(()=>{this.descendants.clear()})),e(this,"assignIndex",(e=>{this.descendants.forEach((t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()}))})),e(this,"count",(()=>this.descendants.size)),e(this,"enabledCount",(()=>this.enabledValues().length)),e(this,"values",(()=>Array.from(this.descendants.values()).sort(((e,t)=>e.index-t.index)))),e(this,"enabledValues",(()=>this.values().filter((e=>!e.disabled)))),e(this,"item",(e=>{if(0!==this.count())return this.values()[e]})),e(this,"enabledItem",(e=>{if(0!==this.enabledCount())return this.enabledValues()[e]})),e(this,"first",(()=>this.item(0))),e(this,"firstEnabled",(()=>this.enabledItem(0))),e(this,"last",(()=>this.item(this.descendants.size-1))),e(this,"lastEnabled",(()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)})),e(this,"indexOf",(e=>{var t;return e?(null==(t=this.descendants.get(e))?void 0:t.index)??-1:-1})),e(this,"enabledIndexOf",(e=>null==e?-1:this.enabledValues().findIndex((t=>t.node.isSameNode(e))))),e(this,"next",((e,t=!0)=>{const n=hk(e,this.count(),t);return this.item(n)})),e(this,"nextEnabled",((e,t=!0)=>{const n=this.item(e);if(!n)return;const r=hk(this.enabledIndexOf(n.node),this.enabledCount(),t);return this.enabledItem(r)})),e(this,"prev",((e,t=!0)=>{const n=fk(e,this.count()-1,t);return this.item(n)})),e(this,"prevEnabled",((e,t=!0)=>{const n=this.item(e);if(!n)return;const r=fk(this.enabledIndexOf(n.node),this.enabledCount()-1,t);return this.enabledItem(r)})),e(this,"registerNode",((e,t)=>{if(!e||this.descendants.has(e))return;const n=dk(Array.from(this.descendants.keys()).concat(e));(null==t?void 0:t.disabled)&&(t.disabled=!!t.disabled);const r={node:e,index:-1,...t};this.descendants.set(e,r),this.assignIndex(n)}))}});return pk((()=>()=>t.current.destroy())),t.current}var[mk,vk]=lk({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function yk(){return[mk,()=>vk(),()=>gk(),e=>function(e){const t=vk(),[n,r]=i.exports.useState(-1),o=i.exports.useRef(null);pk((()=>()=>{o.current&&t.unregister(o.current)}),[]),pk((()=>{if(!o.current)return;const e=Number(o.current.dataset.index);n==e||Number.isNaN(e)||r(e)}));const a=e?t.register(e):t.register;return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(o.current),register:ck(a,o)}}(e)]}var bk=(...e)=>e.filter(Boolean).join(" "),xk={path:ld("g",{stroke:"currentColor",strokeWidth:"1.5",children:[sd("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"}),sd("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),sd("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},wk=rk(((e,t)=>{const{as:n,viewBox:r,color:o="currentColor",focusable:i=!1,children:a,className:s,__css:l,...c}=e,u={ref:t,focusable:i,className:bk("chakra-icon",s),__css:{w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...l}},d=r??xk.viewBox;if(n&&"string"!=typeof n)return F.createElement(sk.svg,{as:n,...u,...c});const h=a??xk.path;return F.createElement(sk.svg,{verticalAlign:"middle",viewBox:d,...u,...c},h)}));function kk(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,a=i.exports.Children.toArray(e.path),s=rk(((e,r)=>sd(wk,{ref:r,viewBox:t,...o,...e,children:a.length?a:sd("path",{fill:"currentColor",d:n})})));return s.displayName=r,s}function Sk(e,t=[]){const n=i.exports.useRef(e);return i.exports.useEffect((()=>{n.current=e})),i.exports.useCallback(((...e)=>{var t;return null==(t=n.current)?void 0:t.call(n,...e)}),t)}function Ck(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=((e,t)=>e!==t)}=e,a=Sk(r),s=Sk(o),[l,c]=i.exports.useState(n),u=void 0!==t,d=u?t:l,h=Sk((e=>{const t="function"==typeof e?e(d):e;s(d,t)&&(u||c(t),a(t))}),[u,a,d,s]);return[d,h]}wk.displayName="Icon";const _k=i.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ek=i.exports.createContext({});const Lk=i.exports.createContext(null),Pk="undefined"!=typeof document,Ok=Pk?i.exports.useLayoutEffect:i.exports.useEffect,Tk=i.exports.createContext({strict:!1});function Mk(e,t,n,r){const o=i.exports.useContext(Ek).visualElement,a=i.exports.useContext(Tk),s=i.exports.useContext(Lk),l=i.exports.useContext(_k).reducedMotion,c=i.exports.useRef();r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:o,props:n,presenceId:s?s.id:void 0,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:l}));const u=c.current;return Ok((()=>{u&&u.render()})),i.exports.useEffect((()=>{u&&u.animationState&&u.animationState.animateChanges()})),Ok((()=>()=>u&&u.notify("Unmount")),[]),u}function Ak(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Ik(e,t,n){return i.exports.useCallback((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Ak(n)&&(n.current=r))}),[t])}function Rk(e){return"string"==typeof e||Array.isArray(e)}function Nk(e){return"object"==typeof e&&"function"==typeof e.start}const Dk=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function zk(e){return Nk(e.animate)||Dk.some((t=>Rk(e[t])))}function Bk(e){return Boolean(zk(e)||e.variants)}function jk(e){const{initial:t,animate:n}=function(e,t){if(zk(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Rk(t)?t:void 0,animate:Rk(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,i.exports.useContext(Ek));return i.exports.useMemo((()=>({initial:t,animate:n})),[Fk(t),Fk(n)])}function Fk(e){return Array.isArray(e)?e.join(" "):e}const Hk=e=>({isEnabled:t=>e.some((e=>!!t[e]))}),Wk={measureLayout:Hk(["layout","layoutId","drag"]),animation:Hk(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Hk(["exit"]),drag:Hk(["drag","dragControls"]),focus:Hk(["whileFocus"]),hover:Hk(["whileHover","onHoverStart","onHoverEnd"]),tap:Hk(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Hk(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Hk(["whileInView","onViewportEnter","onViewportLeave"])};function $k(e){const t=i.exports.useRef(null);return null===t.current&&(t.current=e()),t.current}const Uk={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Vk=1;const Gk=i.exports.createContext({});class qk extends F.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:t}=this.props;return e&&e.setProps(t),null}componentDidUpdate(){}render(){return this.props.children}}const Zk=i.exports.createContext({}),Yk=Symbol.for("motionComponentSymbol");function Xk({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:o,Component:a}){e&&function(e){for(const t in e)"projectionNodeConstructor"===t?Wk.projectionNodeConstructor=e[t]:Wk[t].Component=e[t]}(e);const s=i.exports.forwardRef((function(s,l){const c={...i.exports.useContext(_k),...s,layoutId:Kk(s)},{isStatic:u}=c;let d=null;const h=jk(s),f=u?void 0:$k((()=>{if(Uk.hasEverUpdated)return Vk++})),p=o(s,u);if(!u&&Pk){h.visualElement=Mk(a,p,c,t);const r=i.exports.useContext(Tk).strict,o=i.exports.useContext(Zk);h.visualElement&&(d=h.visualElement.loadFeatures(c,r,e,f,n||Wk.projectionNodeConstructor,o))}return ld(qk,{visualElement:h.visualElement,props:c,children:[d,sd(Ek.Provider,{value:h,children:r(a,s,f,Ik(p,h.visualElement,l),p,u,h.visualElement)})]})}));return s[Yk]=a,s}function Kk({layoutId:e}){const t=i.exports.useContext(Gk).id;return t&&void 0!==e?t+"-"+e:e}function Qk(e){function t(t,n={}){return Xk(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const Jk=["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 eS(e){return"string"==typeof e&&!e.includes("-")&&!!(Jk.indexOf(e)>-1||/[A-Z]/.test(e))}const tS={};const nS=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rS=new Set(nS);function oS(e,{layout:t,layoutId:n}){return rS.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!tS[e]||"opacity"===e)}const iS=e=>!!(null==e?void 0:e.getVelocity),aS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sS=(e,t)=>nS.indexOf(e)-nS.indexOf(t);function lS(e){return e.startsWith("--")}const cS=(e,t)=>t&&"number"==typeof e?t.transform(e):e,uS=(e,t)=>n=>Math.max(Math.min(n,t),e),dS=e=>e%1?Number(e.toFixed(5)):e,hS=/(-)?([\d]*\.?[\d])+/g,fS=/(#[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,pS=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function gS(e){return"string"==typeof e}const mS={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},vS=Object.assign(Object.assign({},mS),{transform:uS(0,1)}),yS=Object.assign(Object.assign({},mS),{default:1}),bS=e=>({test:t=>gS(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),xS=bS("deg"),wS=bS("%"),kS=bS("px"),SS=bS("vh"),CS=bS("vw"),_S=Object.assign(Object.assign({},wS),{parse:e=>wS.parse(e)/100,transform:e=>wS.transform(100*e)}),ES=(e,t)=>n=>Boolean(gS(n)&&pS.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),LS=(e,t,n)=>r=>{if(!gS(r))return r;const[o,i,a,s]=r.match(hS);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},PS={test:ES("hsl","hue"),parse:LS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+wS.transform(dS(t))+", "+wS.transform(dS(n))+", "+dS(vS.transform(r))+")"},OS=uS(0,255),TS=Object.assign(Object.assign({},mS),{transform:e=>Math.round(OS(e))}),MS={test:ES("rgb","red"),parse:LS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+TS.transform(e)+", "+TS.transform(t)+", "+TS.transform(n)+", "+dS(vS.transform(r))+")"};const AS={test:ES("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),o=e.substr(4,1),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:MS.transform},IS={test:e=>MS.test(e)||AS.test(e)||PS.test(e),parse:e=>MS.test(e)?MS.parse(e):PS.test(e)?PS.parse(e):AS.parse(e),transform:e=>gS(e)?e:e.hasOwnProperty("red")?MS.transform(e):PS.transform(e)},RS="${c}",NS="${n}";function DS(e){"number"==typeof e&&(e=`${e}`);const t=[];let n=0;const r=e.match(fS);r&&(n=r.length,e=e.replace(fS,RS),t.push(...r.map(IS.parse)));const o=e.match(hS);return o&&(e=e.replace(hS,NS),t.push(...o.map(mS.parse))),{values:t,numColors:n,tokenised:e}}function zS(e){return DS(e).values}function BS(e){const{values:t,numColors:n,tokenised:r}=DS(e),o=t.length;return e=>{let t=r;for(let r=0;r<o;r++)t=t.replace(r<n?RS:NS,r<n?IS.transform(e[r]):dS(e[r]));return t}}const jS=e=>"number"==typeof e?0:e;const FS={test:function(e){var t,n,r,o;return isNaN(e)&&gS(e)&&(null!==(n=null===(t=e.match(hS))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(o=null===(r=e.match(fS))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:zS,createTransformer:BS,getAnimatableNone:function(e){const t=zS(e);return BS(e)(t.map(jS))}},HS=new Set(["brightness","contrast","saturate","opacity"]);function WS(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(hS)||[];if(!r)return e;const o=n.replace(r,"");let i=HS.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const $S=/([a-z-]*)\(.*?\)/g,US=Object.assign(Object.assign({},FS),{getAnimatableNone:e=>{const t=e.match($S);return t?t.map(WS).join(" "):e}}),VS={...mS,transform:Math.round},GS={borderWidth:kS,borderTopWidth:kS,borderRightWidth:kS,borderBottomWidth:kS,borderLeftWidth:kS,borderRadius:kS,radius:kS,borderTopLeftRadius:kS,borderTopRightRadius:kS,borderBottomRightRadius:kS,borderBottomLeftRadius:kS,width:kS,maxWidth:kS,height:kS,maxHeight:kS,size:kS,top:kS,right:kS,bottom:kS,left:kS,padding:kS,paddingTop:kS,paddingRight:kS,paddingBottom:kS,paddingLeft:kS,margin:kS,marginTop:kS,marginRight:kS,marginBottom:kS,marginLeft:kS,rotate:xS,rotateX:xS,rotateY:xS,rotateZ:xS,scale:yS,scaleX:yS,scaleY:yS,scaleZ:yS,skew:xS,skewX:xS,skewY:xS,distance:kS,translateX:kS,translateY:kS,translateZ:kS,x:kS,y:kS,z:kS,perspective:kS,transformPerspective:kS,opacity:vS,originX:_S,originY:_S,originZ:kS,zIndex:VS,fillOpacity:vS,strokeOpacity:vS,numOctaves:VS};function qS(e,t,n,r){const{style:o,vars:i,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let c=!1,u=!1,d=!0;for(const h in t){const e=t[h];if(lS(h)){i[h]=e;continue}const n=GS[h],r=cS(e,n);if(rS.has(h)){if(c=!0,a[h]=r,s.push(h),!d)continue;e!==(n.default||0)&&(d=!1)}else h.startsWith("origin")?(u=!0,l[h]=r):o[h]=r}if(t.transform||(c||r?o.transform=function({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},o,i){let a="";t.sort(sS);for(const s of t)a+=`${aS[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),i?a=i(e,o?"":a):r&&o&&(a="none"),a}(e,n,d,r):o.transform&&(o.transform="none")),u){const{originX:e="50%",originY:t="50%",originZ:n=0}=l;o.transformOrigin=`${e} ${t} ${n}`}}const ZS=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function YS(e,t,n){for(const r in t)iS(t[r])||oS(r,n)||(e[r]=t[r])}function XS(e,t,n){const r={};return YS(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return i.exports.useMemo((()=>{const r={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return qS(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(r):r}function KS(e,t,n){const r={},o=XS(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),r.style=o,r}const QS=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","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function JS(e){return QS.has(e)}let eC=e=>!JS(e);try{(tC=require("@emotion/is-prop-valid").default)&&(eC=e=>e.startsWith("on")?!JS(e):tC(e))}catch(Db){}var tC;function nC(e,t,n){return"string"==typeof e?e:kS.transform(t+n*e)}const rC={offset:"stroke-dashoffset",array:"stroke-dasharray"},oC={offset:"strokeDashoffset",array:"strokeDasharray"};function iC(e,{attrX:t,attrY:n,originX:r,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:s=0,...l},c,u){qS(e,l,c,u),e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:f}=e;d.transform&&(f&&(h.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==o||h.transform)&&(h.transformOrigin=function(e,t,n){return`${nC(t,e.x,e.width)} ${nC(n,e.y,e.height)}`}(f,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==i&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?rC:oC;e[i.offset]=kS.transform(-r);const a=kS.transform(t),s=kS.transform(n);e[i.array]=`${a} ${s}`}(d,i,a,s,!1)}const aC=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}});function sC(e,t){const n=i.exports.useMemo((()=>{const n={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return iC(n,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};YS(t,e.style,e),n.style={...t,...n.style}}return n}function lC(e=!1){return(t,n,r,o,{latestValues:a},s)=>{const l=(eS(t)?sC:KS)(n,a,s),c=function(e,t,n){const r={};for(const o in e)(eC(o)||!0===n&&JS(o)||!t&&!JS(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),u={...c,...l,ref:o};return r&&(u["data-projection-id"]=r),i.exports.createElement(t,u)}}const cC=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function uC(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const dC=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function hC(e,t,n,r){uC(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(dC.has(o)?o:cC(o),t.attrs[o])}function fC(e){const{style:t}=e,n={};for(const r in t)(iS(t[r])||oS(r,e))&&(n[r]=t[r]);return n}function pC(e){const t=fC(e);for(const n in e)if(iS(e[n])){t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]}return t}function gC(e,t,n,r={},o={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}const mC=e=>Array.isArray(e),vC=e=>mC(e)?e[e.length-1]||0:e;function yC(e){const t=iS(e)?e.get():e;return(e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue))(t)?t.toValue():t}const bC=e=>(t,n)=>{const r=i.exports.useContext(Ek),o=i.exports.useContext(Lk),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:xC(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,t,r,o);return n?a():$k(a)};function xC(e,t,n,r){const o={},i=r(e);for(const h in i)o[h]=yC(i[h]);let{initial:a,animate:s}=e;const l=zk(e),c=Bk(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!Nk(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=gC(e,t);if(!n)return;const{transitionEnd:r,transition:i,...a}=n;for(const e in a){let t=a[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const wC={useVisualState:bC({scrapeMotionValuesFromProps:pC,createRenderState:aC,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(T2){n.dimensions={x:0,y:0,width:0,height:0}}iC(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),hC(t,n)}})},kC={useVisualState:bC({scrapeMotionValuesFromProps:fC,createRenderState:ZS})};var SC;function CC(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function _C(e,t,n,r){i.exports.useEffect((()=>{const o=e.current;if(n&&o)return CC(o,t,n,r)}),[e,t,n,r])}function EC(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function LC(e){return!!e.touches}!function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"}(SC||(SC={}));const PC={pageX:0,pageY:0};function OC(e,t="page"){const n=e.touches[0]||e.changedTouches[0]||PC;return{x:n[t+"X"],y:n[t+"Y"]}}function TC(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function MC(e,t="page"){return{point:LC(e)?OC(e,t):TC(e,t)}}const AC=(e,t=!1)=>{const n=t=>e(t,MC(t));return t?(r=n,e=>{const t=e instanceof MouseEvent;(!t||t&&0===e.button)&&r(e)}):n;var r},IC={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},RC={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function NC(e){return Pk&&null===window.onpointerdown?e:Pk&&null===window.ontouchstart?RC[e]:Pk&&null===window.onmousedown?IC[e]:e}function DC(e,t,n,r){return CC(e,NC(t),AC(n,"pointerdown"===t),r)}function zC(e,t,n,r){return _C(e,NC(t),n&&AC(n,"pointerdown"===t),r)}function BC(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const jC=BC("dragHorizontal"),FC=BC("dragVertical");function HC(e){let t=!1;if("y"===e)t=FC();else if("x"===e)t=jC();else{const e=jC(),n=FC();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function WC(){const e=HC(!0);return!e||(e(),!1)}function $C(e,t,n){return(r,o)=>{EC(r)&&!WC()&&(e.animationState&&e.animationState.setActive(SC.Hover,t),n&&n(r,o))}}const UC=(e,t)=>!!t&&(e===t||UC(e,t.parentElement));function VC(e){return i.exports.useEffect((()=>()=>e()),[])}function GC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}const qC=(e,t,n)=>Math.min(Math.max(n,e),t),ZC=.001;function YC({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i,a=1-t;a=qC(.05,1,a),e=qC(.01,10,e/1e3),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=XC(t,a),l=Math.exp(-o);return ZC-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=XC(Math.pow(t,2),a);return(-o(t)+ZC>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let o=1;o<12;o++)r-=e(r)/t(r);return r}(o,i,5/e);if(e*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}function XC(e,t){return e*Math.sqrt(1-t*t)}const KC=["duration","bounce"],QC=["stiffness","damping","mass"];function JC(e,t){return t.some((t=>void 0!==e[t]))}function e_(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:o}=e,i=GC(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:c,velocity:u,duration:d,isResolvedFromDuration:h}=function(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!JC(e,QC)&&JC(e,KC)){const n=YC(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}(i),f=t_,p=t_;function g(){const e=u?-u/1e3:0,r=n-t,i=l/(2*Math.sqrt(s*c)),a=Math.sqrt(s/c)/1e3;if(void 0===o&&(o=Math.min(Math.abs(n-t)/100,.4)),i<1){const t=XC(a,i);f=o=>{const s=Math.exp(-i*a*o);return n-s*((e+i*a*r)/t*Math.sin(t*o)+r*Math.cos(t*o))},p=n=>{const o=Math.exp(-i*a*n);return i*a*o*(Math.sin(t*n)*(e+i*a*r)/t+r*Math.cos(t*n))-o*(Math.cos(t*n)*(e+i*a*r)-t*r*Math.sin(t*n))}}else if(1===i)f=t=>n-Math.exp(-a*t)*(r+(e+a*r)*t);else{const t=a*Math.sqrt(i*i-1);f=o=>{const s=Math.exp(-i*a*o),l=Math.min(t*o,300);return n-s*((e+i*a*r)*Math.sinh(l)+t*r*Math.cosh(l))/t}}}return g(),{next:e=>{const t=f(e);if(h)a.done=e>=d;else{const i=1e3*p(e),s=Math.abs(i)<=r,l=Math.abs(n-t)<=o;a.done=s&&l}return a.value=a.done?n:t,a},flipTarget:()=>{u=-u,[t,n]=[n,t],g()}}}e_.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;const t_=e=>0,n_=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},r_=(e,t,n)=>-n*e+n*t+e;function o_(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function i_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=o_(s,r,e+1/3),i=o_(s,r,e),a=o_(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}const a_=(e,t,n)=>{const r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},s_=[AS,MS,PS],l_=e=>s_.find((t=>t.test(e))),c_=(e,t)=>{let n=l_(e),r=l_(t),o=n.parse(e),i=r.parse(t);n===PS&&(o=i_(o),n=MS),r===PS&&(i=i_(i),r=MS);const a=Object.assign({},o);return e=>{for(const t in a)"alpha"!==t&&(a[t]=a_(o[t],i[t],e));return a.alpha=r_(o.alpha,i.alpha,e),n.transform(a)}},u_=e=>"number"==typeof e,d_=(e,t)=>n=>t(e(n)),h_=(...e)=>e.reduce(d_);function f_(e,t){return u_(e)?n=>r_(e,t,n):IS.test(e)?c_(e,t):v_(e,t)}const p_=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>f_(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}},g_=(e,t)=>{const n=Object.assign(Object.assign({},e),t),r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=f_(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}};function m_(e){const t=FS.parse(e),n=t.length;let r=0,o=0,i=0;for(let a=0;a<n;a++)r||"number"==typeof t[a]?r++:void 0!==t[a].hue?i++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:i}}const v_=(e,t)=>{const n=FS.createTransformer(t),r=m_(e),o=m_(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?h_(p_(r.parsed,o.parsed),n):n=>`${n>0?t:e}`},y_=(e,t)=>n=>r_(e,t,n);function b_(e,t,n){const r=[],o=n||function(e){return"number"==typeof e?y_:"string"==typeof e?IS.test(e)?c_:v_:Array.isArray(e)?p_:"object"==typeof e?g_:void 0}(e[0]),i=e.length-1;for(let a=0;a<i;a++){let n=o(e[a],e[a+1]);if(t){const e=Array.isArray(t)?t[a]:t;n=h_(e,n)}r.push(n)}return r}function x_(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;t.length,!r||!Array.isArray(r)||r.length,e[0]>e[i-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=b_(t,r,o),s=2===i?function([e,t],[n]){return r=>n(n_(e,t,r))}(e,a):function(e,t){const n=e.length,r=n-1;return o=>{let i=0,a=!1;if(o<=e[0]?a=!0:o>=e[r]&&(i=r-1,a=!0),!a){let t=1;for(;t<n&&!(e[t]>o||t===r);t++);i=t-1}const s=n_(e[i],e[i+1],o);return t[i](s)}}(e,a);return n?t=>s(qC(e[0],e[i-1],t)):s}const w_=e=>t=>1-e(1-t),k_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,S_=e=>t=>t*t*((e+1)*t-e),C_=e=>e,__=(E_=2,e=>Math.pow(e,E_));var E_;const L_=w_(__),P_=k_(__),O_=e=>1-Math.sin(Math.acos(e)),T_=w_(O_),M_=k_(T_),A_=S_(1.525),I_=w_(A_),R_=k_(A_),N_=(e=>{const t=S_(e);return e=>(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))})(1.525),D_=e=>{if(1===e||0===e)return e;const t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},z_=w_(D_);function B_(e,t){return e.map((()=>t||P_)).splice(0,e.length-1)}function j_({from:e=0,to:t=1,ease:n,offset:r,duration:o=300}){const i={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=function(e,t){return e.map((e=>e*t))}(r&&r.length===a.length?r:function(e){const t=e.length;return e.map(((e,n)=>0!==n?n/(t-1):0))}(a),o);function l(){return x_(s,a,{ease:Array.isArray(n)?n:B_(a,n)})}let c=l();return{next:e=>(i.value=c(e),i.done=e>=o,i),flipTarget:()=>{a.reverse(),c=l()}}}const F_={keyframes:j_,spring:e_,decay:function({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:t};let s=n*e;const l=t+s,c=void 0===i?l:i(l);return c!==l&&(s=c-t),{next:e=>{const t=-s*Math.exp(-e/r);return a.done=!(t>o||t<-o),a.value=a.done?c:c+t,a},flipTarget:()=>{}}}};const H_=1/60*1e3,W_="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),$_="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout((()=>e(W_())),H_);let U_=!0,V_=!1,G_=!1;const q_={delta:0,timestamp:0},Z_=["read","update","preRender","render","postRender"],Y_=Z_.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,c=l?t:n;return i&&a.add(e),-1===c.indexOf(e)&&(c.push(e),l&&o&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n<r;n++){const r=t[n];r(l),a.has(r)&&(s.schedule(r),e())}o=!1,i&&(i=!1,s.process(l))}}};return s}((()=>V_=!0)),e)),{}),X_=Z_.reduce(((e,t)=>{const n=Y_[t];return e[t]=(e,t=!1,r=!1)=>(V_||eE(),n.schedule(e,t,r)),e}),{}),K_=Z_.reduce(((e,t)=>(e[t]=Y_[t].cancel,e)),{});Z_.reduce(((e,t)=>(e[t]=()=>Y_[t].process(q_),e)),{});const Q_=e=>Y_[e].process(q_),J_=e=>{V_=!1,q_.delta=U_?H_:Math.max(Math.min(e-q_.timestamp,40),1),q_.timestamp=e,G_=!0,Z_.forEach(Q_),G_=!1,V_&&(U_=!1,$_(J_))},eE=()=>{V_=!0,U_=!0,G_||$_(J_)};function tE(e,t,n=0){return e-t-n}const nE=e=>{const t=({delta:t})=>e(t);return{start:()=>X_.update(t,!0),stop:()=>K_.update(t)}};function rE(e){var t,n,{from:r,autoplay:o=!0,driver:i=nE,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:d,onComplete:h,onRepeat:f,onUpdate:p}=e,g=GC(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let m,v,y,{to:b}=g,x=0,w=g.duration,k=!1,S=!0;const C=function(e){if(Array.isArray(e.to))return j_;if(F_[e.type])return F_[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?j_:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?e_:j_}(g);(null===(n=(t=C).needsInterpolation)||void 0===n?void 0:n.call(t,r,b))&&(y=x_([0,100],[r,b],{clamp:!1}),r=0,b=100);const _=C(Object.assign(Object.assign({},g),{from:r,to:b}));function E(){x++,"reverse"===l?(S=x%2==0,a=function(e,t,n=0,r=!0){return r?tE(t+-e,t,n):t-(e-t)+n}(a,w,c,S)):(a=tE(a,w,c),"mirror"===l&&_.flipTarget()),k=!1,f&&f()}function L(e){if(S||(e=-e),a+=e,!k){const e=_.next(Math.max(0,a));v=e.value,y&&(v=y(v)),k=S?e.done:a<=0}null==p||p(v),k&&(0===x&&(null!=w||(w=a)),x<s?function(e,t,n,r){return r?e>=t+n:e<=-n}(a,w,c,S)&&E():(m.stop(),h&&h()))}return o&&(null==u||u(),m=i(L),m.start()),{stop:()=>{null==d||d(),m.stop()}}}function oE(e,t){return t?e*(1e3/t):0}function iE({from:e=0,velocity:t=0,min:n,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:d,onComplete:h,onStop:f}){let p;function g(e){return void 0!==n&&e<n||void 0!==r&&e>r}function m(e){return void 0===n?r:void 0===r||Math.abs(n-e)<Math.abs(r-e)?n:r}function v(e){null==p||p.stop(),p=rE(Object.assign(Object.assign({},e),{driver:u,onUpdate:t=>{var n;null==d||d(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:h,onStop:f}))}function y(e){v(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},e))}if(g(e))y({from:e,velocity:t,to:m(e)});else{let r=o*t+e;void 0!==c&&(r=c(r));const a=m(r),s=a===n?-1:1;let u,d;const h=e=>{u=d,d=e,t=oE(e-u,q_.delta),(1===s&&e>a||-1===s&&e<a)&&y({from:e,to:a,velocity:t})};v({type:"decay",from:e,velocity:t,timeConstant:i,power:o,restDelta:l,modifyTarget:c,onUpdate:g(r)?h:void 0})}return{stop:()=>null==p?void 0:p.stop()}}const aE=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),sE=e=>aE(e)&&e.hasOwnProperty("z"),lE=(e,t)=>Math.abs(e-t);function cE(e,t){if(u_(e)&&u_(t))return lE(e,t);if(aE(e)&&aE(t)){const n=lE(e.x,t.x),r=lE(e.y,t.y),o=sE(e)&&sE(t)?lE(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}const uE=(e,t)=>1-3*t+3*e,dE=(e,t)=>3*t-6*e,hE=e=>3*e,fE=(e,t,n)=>((uE(t,n)*e+dE(t,n))*e+hE(t))*e,pE=(e,t,n)=>3*uE(t,n)*e*e+2*dE(t,n)*e+hE(t);const gE=.1;function mE(e,t,n,r){if(e===t&&n===r)return C_;const o=new Float32Array(11);for(let a=0;a<11;++a)o[a]=fE(a*gE,e,n);function i(t){let r=0,i=1;for(;10!==i&&o[i]<=t;++i)r+=gE;--i;const a=r+(t-o[i])/(o[i+1]-o[i])*gE,s=pE(a,e,n);return s>=.001?function(e,t,n,r){for(let o=0;o<8;++o){const o=pE(t,n,r);if(0===o)return t;t-=(fE(t,n,r)-e)/o}return t}(t,a,e,n):0===s?a:function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=fE(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,r,r+gE,e,n)}return e=>0===e||1===e?e:fE(i(e),t,r)}const vE=("undefined"==typeof process||process.env,"production"),yE=new Set;function bE(e,t,n){e||yE.has(t)||(console.warn(t),n&&console.warn(n),yE.add(t))}const xE=new WeakMap,wE=new WeakMap,kE=e=>{const t=xE.get(e.target);t&&t(e)},SE=e=>{e.forEach(kE)};function CE(e,t,n){const r=function({root:e,...t}){const n=e||document;wE.has(n)||wE.set(n,{});const r=wE.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(SE,{root:e,...t})),r[o]}(t);return xE.set(e,n),r.observe(e),()=>{xE.delete(e),r.unobserve(e)}}const _E={some:0,all:1};function EE(e,t,n,{root:r,margin:o,amount:a="some",once:s}){i.exports.useEffect((()=>{if(!e||!n.current)return;const i={root:null==r?void 0:r.current,rootMargin:o,threshold:"number"==typeof a?a:_E[a]};return CE(n.current,i,(e=>{const{isIntersecting:r}=e;if(t.isInView===r)return;if(t.isInView=r,s&&!r&&t.hasEnteredView)return;r&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(SC.InView,r);const o=n.getProps(),i=r?o.onViewportEnter:o.onViewportLeave;i&&i(e)}))}),[e,r,o,a])}function LE(e,t,n,{fallback:r=!0}){i.exports.useEffect((()=>{e&&r&&("production"!==vE&&bE(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame((()=>{t.hasEnteredView=!0;const{onViewportEnter:e}=n.getProps();e&&e(null),n.animationState&&n.animationState.setActive(SC.InView,!0)})))}),[e])}const PE=e=>t=>(e(t),null),OE={inView:PE((function({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:o={}}){const a=i.exports.useRef({hasEnteredView:!1,isInView:!1});let s=Boolean(t||n||r);o.once&&a.current.hasEnteredView&&(s=!1),("undefined"==typeof IntersectionObserver?LE:EE)(s,a.current,e,o)})),tap:PE((function({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:o}){const a=e||t||n||r,s=i.exports.useRef(!1),l=i.exports.useRef(null),c={passive:!(t||e||n||p)};function u(){l.current&&l.current(),l.current=null}function d(){return u(),s.current=!1,o.animationState&&o.animationState.setActive(SC.Tap,!1),!WC()}function h(t,r){d()&&(UC(o.current,t.target)?e&&e(t,r):n&&n(t,r))}function f(e,t){d()&&n&&n(e,t)}function p(e,n){u(),s.current||(s.current=!0,l.current=h_(DC(window,"pointerup",h,c),DC(window,"pointercancel",f,c)),o.animationState&&o.animationState.setActive(SC.Tap,!0),t&&t(e,n))}zC(o,"pointerdown",a?p:void 0,c),VC(u)})),focus:PE((function({whileFocus:e,visualElement:t}){const{animationState:n}=t;_C(t,"focus",e?()=>{n&&n.setActive(SC.Focus,!0)}:void 0),_C(t,"blur",e?()=>{n&&n.setActive(SC.Focus,!1)}:void 0)})),hover:PE((function({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){zC(r,"pointerenter",e||n?$C(r,!0,e):void 0,{passive:!e}),zC(r,"pointerleave",t||n?$C(r,!1,t):void 0,{passive:!t})}))};function TE(){const e=i.exports.useContext(Lk);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=i.exports.useId();i.exports.useEffect((()=>r(o)),[]);return!t&&n?[!1,()=>n&&n(o)]:[!0]}function ME(){return null===(e=i.exports.useContext(Lk))||e.isPresent;var e}function AE(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const IE=e=>1e3*e,RE={linear:C_,easeIn:__,easeInOut:P_,easeOut:L_,circIn:O_,circInOut:M_,circOut:T_,backIn:A_,backInOut:R_,backOut:I_,anticipate:N_,bounceIn:z_,bounceInOut:e=>e<.5?.5*(1-D_(1-2*e)):.5*D_(2*e-1)+.5,bounceOut:D_},NE=e=>{if(Array.isArray(e)){e.length;const[t,n,r,o]=e;return mE(t,n,r,o)}return"string"==typeof e?RE[e]:e},DE=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!FS.test(t)||t.startsWith("url("))),zE=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),BE=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),jE=()=>({type:"keyframes",ease:"linear",duration:.3}),FE=e=>({type:"keyframes",duration:.8,values:e}),HE={x:zE,y:zE,z:zE,rotate:zE,rotateX:zE,rotateY:zE,rotateZ:zE,scaleX:BE,scaleY:BE,scale:BE,opacity:jE,backgroundColor:jE,color:jE,default:BE},WE=(e,t)=>{let n;return n=mC(t)?FE:HE[e]||HE.default,{to:t,...n(t)}},$E={...GS,color:IS,backgroundColor:IS,outlineColor:IS,fill:IS,stroke:IS,borderColor:IS,borderTopColor:IS,borderRightColor:IS,borderBottomColor:IS,borderLeftColor:IS,filter:US,WebkitFilter:US},UE=e=>$E[e];function VE(e,t){var n;let r=UE(e);return r!==US&&(r=FS),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}const GE=!1,qE=1/60*1e3,ZE="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),YE="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout((()=>e(ZE())),qE);let XE=!0,KE=!1,QE=!1;const JE={delta:0,timestamp:0},eL=["read","update","preRender","render","postRender"],tL=eL.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,c=l?t:n;return i&&a.add(e),-1===c.indexOf(e)&&(c.push(e),l&&o&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n<r;n++){const r=t[n];r(l),a.has(r)&&(s.schedule(r),e())}o=!1,i&&(i=!1,s.process(l))}}};return s}((()=>KE=!0)),e)),{}),nL=eL.reduce(((e,t)=>{const n=tL[t];return e[t]=(e,t=!1,r=!1)=>(KE||sL(),n.schedule(e,t,r)),e}),{}),rL=eL.reduce(((e,t)=>(e[t]=tL[t].cancel,e)),{}),oL=eL.reduce(((e,t)=>(e[t]=()=>tL[t].process(JE),e)),{}),iL=e=>tL[e].process(JE),aL=e=>{KE=!1,JE.delta=XE?qE:Math.max(Math.min(e-JE.timestamp,40),1),JE.timestamp=e,QE=!0,eL.forEach(iL),QE=!1,KE&&(XE=!1,YE(aL))},sL=()=>{KE=!0,XE=!0,QE||YE(aL)},lL=()=>JE;function cL(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(rL.read(r),e(i-t))};return nL.read(r,!0),()=>rL.read(r)}function uL({ease:e,times:t,yoyo:n,flip:r,loop:o,...i}){const a={...i};return t&&(a.offset=t),i.duration&&(a.duration=IE(i.duration)),i.repeatDelay&&(a.repeatDelay=IE(i.repeatDelay)),e&&(a.ease=(e=>Array.isArray(e)&&"number"!=typeof e[0])(e)?e.map(NE):NE(e)),"tween"===i.type&&(a.type="keyframes"),(n||o||r)&&(n?a.repeatType="reverse":o?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=o||n||r||i.repeat),"spring"!==i.type&&(a.type="keyframes"),a}function dL(e,t,n){return Array.isArray(t.to)&&void 0===e.duration&&(e.duration=.8),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=[...e.to],e.to[0]=e.from)}(t),function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,...c}){return!!Object.keys(c).length}(e)||(e={...e,...WE(n,t.to)}),{...t,...uL(e)}}function hL(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function fL(e){return"number"==typeof e?0:VE("",e)}function pL(e,t){return e[t]||e.default||e}function gL(e,t,n,r={}){return GE&&(r={type:!1}),t.start((o=>{let i;const a=function(e,t,n,r,o){const i=pL(r,e)||{};let a=void 0!==i.from?i.from:t.get();const s=DE(e,n);return"none"===a&&s&&"string"==typeof n?a=VE(e,n):hL(a)&&"string"==typeof n?a=fL(n):!Array.isArray(n)&&hL(n)&&"string"==typeof a&&(n=fL(a)),DE(e,a)&&s&&!1!==i.type?function(){const r={from:a,to:n,velocity:t.getVelocity(),onComplete:o,onUpdate:e=>t.set(e)};return"inertia"===i.type||"decay"===i.type?iE({...r,...i}):rE({...dL(i,r,e),onUpdate:e=>{r.onUpdate(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{r.onComplete(),i.onComplete&&i.onComplete()}})}:function(){const e=vC(n);return t.set(e),o(),i.onUpdate&&i.onUpdate(e),i.onComplete&&i.onComplete(),{stop:()=>{}}}}(e,t,n,r,o),s=function(e,t){var n,r;return null!==(r=null!==(n=(pL(e,t)||{}).delay)&&void 0!==n?n:e.delay)&&void 0!==r?r:0}(r,e),l=()=>i=a();let c;return s?c=cL(l,IE(s)):l(),()=>{c&&c(),i&&i.stop()}}))}const mL=e=>/^\-?\d*\.?\d+$/.test(e),vL=e=>/^0[^.\s]+$/.test(e);function yL(e,t){-1===e.indexOf(t)&&e.push(t)}function bL(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class xL{constructor(){this.subscriptions=[]}add(e){return yL(this.subscriptions,e),()=>bL(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class wL{constructor(e){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new xL,this.velocityUpdateSubscribers=new xL,this.renderSubscribers=new xL,this.canTrackVelocity=!1,this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=lL();this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,nL.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),t&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>nL.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(e=>!isNaN(parseFloat(e)))(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(e){return e(this.get()),this.renderSubscribers.add(e)}attach(e){this.passiveEffect=e}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?oE(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.stopAnimation=e(t)})).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 kL(e){return new wL(e)}const SL=e=>t=>t.test(e),CL=[mS,kS,wS,xS,CS,SS,{test:e=>"auto"===e,parse:e=>e}],_L=e=>CL.find(SL(e)),EL=[...CL,IS,FS],LL=e=>EL.find(SL(e));function PL(e,t,n){const r=e.getProps();return gC(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}function OL(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,kL(n))}function TL(e,t){if(!t)return;return(t[e]||t.default||t).from}function ML(e){return Boolean(iS(e)&&e.add)}function AL(e,t,n={}){var r;const o=PL(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>IL(e,o,n):()=>Promise.resolve(),s=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(RL).forEach(((e,r)=>{a.push(AL(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then(t)}return Promise.all([a(),s(n.delay)])}function IL(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(a=r);const u=[],d=o&&(null===(i=e.animationState)||void 0===i?void 0:i.getState()[o]);for(const h in l){const t=e.getValue(h),r=l[h];if(!t||void 0===r||d&&NL(d,h))continue;let o={delay:n,...a};e.shouldReduceMotion&&rS.has(h)&&(o={...o,type:!1,delay:0});let i=gL(h,t,r,o);ML(c)&&(c.add(h),i=i.then((()=>c.remove(h)))),u.push(i)}return Promise.all(u).then((()=>{s&&function(e,t){const n=PL(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const a in i)OL(e,a,vC(i[a]))}(e,s)}))}function RL(e,t){return e.sortNodePosition(t)}function NL({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}const DL=[SC.Animate,SC.InView,SC.Focus,SC.Hover,SC.Tap,SC.Drag,SC.Exit],zL=[...DL].reverse(),BL=DL.length;function jL(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>AL(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=AL(e,t,n);else{const o="function"==typeof t?PL(e,t,n.custom):t;r=IL(e,o,n)}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}function FL(e){let t=jL(e);const n={[SC.Animate]:WL(!0),[SC.InView]:WL(),[SC.Hover]:WL(),[SC.Tap]:WL(),[SC.Drag]:WL(),[SC.Focus]:WL(),[SC.Exit]:WL()};let r=!0;const o=(t,n)=>{const r=PL(e,n);if(r){const{transition:e,transitionEnd:n,...o}=r;t={...t,...o,...n}}return t};function i(i,a){var s;const l=e.getProps(),c=e.getVariantContext(!0)||{},u=[],d=new Set;let h={},f=1/0;for(let t=0;t<BL;t++){const p=zL[t],g=n[p],m=null!==(s=l[p])&&void 0!==s?s:c[p],v=Rk(m),y=p===a?g.isActive:null;!1===y&&(f=t);let b=m===c[p]&&m!==l[p]&&v;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),g.protectedKeys={...h},!g.isActive&&null===y||!m&&!g.prevProp||Nk(m)||"boolean"==typeof m)continue;const x=HL(g.prevProp,m);let w=x||p===a&&g.isActive&&!b&&v||t>f&&v;const k=Array.isArray(m)?m:[m];let S=k.reduce(o,{});!1===y&&(S={});const{prevResolvedValues:C={}}=g,_={...C,...S},E=e=>{w=!0,d.delete(e),g.needsAnimating[e]=!0};for(const e in _){const t=S[e],n=C[e];h.hasOwnProperty(e)||(t!==n?mC(t)&&mC(n)?!AE(t,n)||x?E(e):g.protectedKeys[e]=!0:void 0!==t?E(e):d.add(e):void 0!==t&&d.has(e)?E(e):g.protectedKeys[e]=!0)}g.prevProp=m,g.prevResolvedValues=S,g.isActive&&(h={...h,...S}),r&&e.blockInitialAnimation&&(w=!1),w&&!b&&u.push(...k.map((e=>({animation:e,options:{type:p,...i}}))))}if(d.size){const t={};d.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),u.push({animation:t})}let p=Boolean(u.length);return r&&!1===l.initial&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(u):Promise.resolve()}return{animateChanges:i,setActive:function(t,r,o){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(o,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function HL(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!AE(t,e)}function WL(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const $L={animation:PE((({visualElement:e,animate:t})=>{e.animationState||(e.animationState=FL(e)),Nk(t)&&i.exports.useEffect((()=>t.subscribe(e)),[t])})),exit:PE((e=>{const{custom:t,visualElement:n}=e,[r,o]=TE(),a=i.exports.useContext(Lk);i.exports.useEffect((()=>{n.isPresent=r;const e=n.animationState&&n.animationState.setActive(SC.Exit,!r,{custom:a&&a.custom||t});e&&!r&&e.then(o)}),[r])}))};class UL{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=qL(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=cE(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=lL();this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=VL(t,this.transformPagePoint),EC(e)&&0===e.buttons?this.handlePointerUp(e,t):nL.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r}=this.handlers,o=qL(VL(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},LC(e)&&e.touches.length>1)return;this.handlers=t,this.transformPagePoint=n;const r=VL(MC(e),this.transformPagePoint),{point:o}=r,{timestamp:i}=lL();this.history=[{...o,timestamp:i}];const{onSessionStart:a}=t;a&&a(e,qL(r,this.history)),this.removeListeners=h_(DC(window,"pointermove",this.handlePointerMove),DC(window,"pointerup",this.handlePointerUp),DC(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),rL.update(this.updatePoint)}}function VL(e,t){return t?{point:t(e.point)}:e}function GL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qL({point:e},t){return{point:e,delta:GL(e,YL(t)),offset:GL(e,ZL(t)),velocity:XL(t,.1)}}function ZL(e){return e[0]}function YL(e){return e[e.length-1]}function XL(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=YL(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>IE(t)));)n--;if(!r)return{x:0,y:0};const i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function KL(e){return e.max-e.min}function QL(e,t=0,n=.01){return cE(e,t)<n}function JL(e,t,n,r=.5){e.origin=r,e.originPoint=r_(t.min,t.max,e.origin),e.scale=KL(n)/KL(t),(QL(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=r_(n.min,n.max,e.origin)-e.originPoint,(QL(e.translate)||isNaN(e.translate))&&(e.translate=0)}function eP(e,t,n,r){JL(e.x,t.x,n.x,null==r?void 0:r.originX),JL(e.y,t.y,n.y,null==r?void 0:r.originY)}function tP(e,t,n){e.min=n.min+t.min,e.max=e.min+KL(t)}function nP(e,t,n){e.min=t.min-n.min,e.max=e.min+KL(t)}function rP(e,t,n){nP(e.x,t.x,n.x),nP(e.y,t.y,n.y)}function oP(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function iP(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const aP=.35;function sP(e,t,n){return{min:lP(e,t),max:lP(e,n)}}function lP(e,t){var n;return"number"==typeof e?e:null!==(n=e[t])&&void 0!==n?n:0}function cP(e){return[e("x"),e("y")]}function uP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function dP(e){return void 0===e||1===e}function hP({scale:e,scaleX:t,scaleY:n}){return!dP(e)||!dP(t)||!dP(n)}function fP(e){return hP(e)||pP(e)||e.z||e.rotate||e.rotateX||e.rotateY}function pP(e){return gP(e.x)||gP(e.y)}function gP(e){return e&&"0%"!==e}function mP(e,t,n){return n+t*(e-n)}function vP(e,t,n,r,o){return void 0!==o&&(e=mP(e,o,r)),mP(e,n,r)+t}function yP(e,t=0,n=1,r,o){e.min=vP(e.min,t,n,r,o),e.max=vP(e.max,t,n,r,o)}function bP(e,{x:t,y:n}){yP(e.x,t.translate,t.scale,t.originPoint),yP(e.y,n.translate,n.scale,n.originPoint)}function xP(e,t){e.min=e.min+t,e.max=e.max+t}function wP(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,a=r_(e.min,e.max,i);yP(e,t[n],t[r],a,t.scale)}const kP=["x","scaleX","originX"],SP=["y","scaleY","originY"];function CP(e,t){wP(e.x,t,kP),wP(e.y,t,SP)}function _P(e,t){return uP(function(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}}(e.getBoundingClientRect(),t))}const EP=new WeakMap;class LP{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){if(!1===this.visualElement.isPresent)return;this.panSession=new UL(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(MC(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:o,onDragStart:i}=this.getProps();(!r||o||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=HC(r),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cP((e=>{var t,n;let r=this.getAxisMotionValue(e).get()||0;if(wS.test(r)){const o=null===(n=null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout)||void 0===n?void 0:n.layoutBox[e];if(o){r=KL(o)*(parseFloat(r)/100)}}this.originPoint[e]=r})),null==i||i(e,t),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(SC.Drag,!0))},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&(null==o||o(this.currentDirection)));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),null==i||i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();null==o||o(e,t)}cancel(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(SC.Drag,!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!PP(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?r_(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?r_(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&Ak(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:oP(e.x,n,o),y:oP(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=aP){return!1===e?e=0:!0===e&&(e=aP),{x:sP(e,"left","right"),y:sP(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&cP((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ak(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=_P(e,n),{scroll:o}=t;return o&&(xP(r.x,o.offset.x),xP(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:iP(e.x,t.x),y:iP(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=uP(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=cP((a=>{var l;if(!PP(a,t,this.currentDirection))return;let c=null!==(l=null==s?void 0:s[a])&&void 0!==l?l:{};i&&(c={min:0,max:0});const u=r?200:1e6,d=r?40:1e7,h={type:"inertia",velocity:n?e[a]:0,bounceStiffness:u,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...c};return this.startAxisValueAnimation(a,h)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){return gL(e,this.getAxisMotionValue(e),0,t)}stopAnimation(){cP((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){var t,n;const r="_drag"+e.toUpperCase(),o=this.visualElement.getProps()[r];return o||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)}snapToCursor(e){cP((t=>{const{drag:n}=this.getProps();if(!PP(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-r_(n,i,.5))}}))}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ak(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};cP((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();o[e]=function(e,t){let n=.5;const r=KL(e),o=KL(t);return o>r?n=n_(t.min,t.max-r,e.min):r>o&&(n=n_(e.min,e.max-o,t.min)),qC(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",null===(e=r.root)||void 0===e||e.updateScroll(),r.updateLayout(),this.resolveConstraints(),cP((e=>{if(!PP(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:i}=this.constraints[e];n.set(r_(r,i,o[e]))}))}addListeners(){var e;if(!this.visualElement.current)return;EP.set(this.visualElement,this);const t=DC(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),n=()=>{const{dragConstraints:e}=this.getProps();Ak(e)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",n);r&&!r.layout&&(null===(e=r.root)||void 0===e||e.updateScroll(),r.updateLayout()),n();const i=CC(window,"resize",(()=>this.scalePositionWithinConstraints())),a=r.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(cP((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),t(),o(),null==a||a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=aP,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function PP(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const OP={pan:PE((function({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:o}){const a=e||t||n||r,s=i.exports.useRef(null),{transformPagePoint:l}=i.exports.useContext(_k),c={onSessionStart:r,onStart:t,onMove:e,onEnd:(e,t)=>{s.current=null,n&&n(e,t)}};i.exports.useEffect((()=>{null!==s.current&&s.current.updateHandlers(c)})),zC(o,"pointerdown",a&&function(e){s.current=new UL(e,c,{transformPagePoint:l})}),VC((()=>s.current&&s.current.end()))})),drag:PE((function(e){const{dragControls:t,visualElement:n}=e,r=$k((()=>new LP(n)));i.exports.useEffect((()=>t&&t.subscribe(r)),[r,t]),i.exports.useEffect((()=>r.addListeners()),[r])}))};function TP(e){return"string"==typeof e&&e.startsWith("var(--")}const MP=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function AP(e,t,n=1){const[r,o]=function(e){const t=MP.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);return i?i.trim():TP(o)?AP(o,t,n+1):o}const IP=new Set(["width","height","top","left","right","bottom","x","y"]),RP=e=>IP.has(e),NP=(e,t)=>{e.set(t,!1),e.set(t)},DP=e=>e===mS||e===kS;var zP;!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(zP||(zP={}));const BP=(e,t)=>parseFloat(e.split(", ")[t]),jP=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return BP(o[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?BP(t[1],e):0}},FP=new Set(["x","y","z"]),HP=nS.filter((e=>!FP.has(e)));const WP={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:jP(4,13),y:jP(5,14)},$P=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(RP);let i=[],a=!1;const s=[];if(o.forEach((o=>{const l=e.getValue(o);if(!e.hasValue(o))return;let c=n[o],u=_L(c);const d=t[o];let h;if(mC(d)){const e=d.length,t=null===d[0]?1:0;c=d[t],u=_L(c);for(let n=t;n<e;n++)h?_L(d[n]):h=_L(d[n])}else h=_L(d);if(u!==h)if(DP(u)&&DP(h)){const e=l.get();"string"==typeof e&&l.set(parseFloat(e)),"string"==typeof d?t[o]=parseFloat(d):Array.isArray(d)&&h===kS&&(t[o]=d.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==h?void 0:h.transform)&&(0===c||0===d)?0===c?l.set(h.transform(c)):t[o]=u.transform(d):(a||(i=function(e){const t=[];return HP.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],NP(l,d))})),s.length){const n=s.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=WP[e](r,i)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);NP(r,s[n]),e[n]=WP[n](l,i)})),e})(t,e,s);return i.length&&i.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),Pk&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:t,transitionEnd:r}};function UP(e,t,n,r){return(e=>Object.keys(e).some(RP))(t)?$P(e,t,n,r):{target:t,transitionEnd:r}}const VP=(e,t,n,r)=>{const o=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!TP(t))return;const n=AP(t,r);n&&e.set(n)}));for(const o in t){const e=t[o];if(!TP(e))continue;const i=AP(e,r);i&&(t[o]=i,n&&void 0===n[o]&&(n[o]=e))}return{target:t,transitionEnd:n}}(e,t,r);return UP(e,t=o.target,n,r=o.transitionEnd)},GP={current:null},qP={current:!1};const ZP=Object.keys(Wk),YP=ZP.length,XP=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class KP{constructor({parent:e,props:t,reducedMotionConfig:n,visualState:r},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=()=>nL.render(this.render,!1,!0);const{latestValues:i,renderState:a}=r;this.latestValues=i,this.baseTarget={...i},this.initialValues=t.initial?{...i}:{},this.renderState=a,this.parent=e,this.props=t,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.isControllingVariants=zk(t),this.isVariantNode=Bk(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:s,...l}=this.scrapeMotionValuesFromProps(t);for(const c in l){const e=l[c];void 0!==i[c]&&iS(e)&&(e.set(i[c],!1),ML(s)&&s.add(c))}}scrapeMotionValuesFromProps(e){return{}}mount(e){var t;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(t=this.parent)||void 0===t?void 0:t.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),qP.current||function(){if(qP.current=!0,Pk)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>GP.current=e.matches;e.addListener(t),t()}else GP.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||GP.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,t,n;null===(e=this.projection)||void 0===e||e.unmount(),rL.update(this.notifyUpdate),rL.render(this.render),this.valueSubscriptions.forEach((e=>e())),null===(t=this.removeFromVariantTree)||void 0===t||t.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this);for(const r in this.events)this.events[r].clear();this.current=null}bindToMotionValue(e,t){const n=rS.has(e),r=t.onChange((t=>{this.latestValues[e]=t,this.props.onUpdate&&nL.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isProjectionDirty=!0)})),o=t.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures(e,t,n,r,o,a){const s=[];for(let l=0;l<YP;l++){const t=ZP[l],{isEnabled:n,Component:r}=Wk[t];n(e)&&r&&s.push(i.exports.createElement(r,{key:t,...e,visualElement:this}))}if(!this.projection&&o){this.projection=new o(r,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:i,dragConstraints:s,layoutScroll:l}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(i)||s&&Ak(s),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:a,layoutScroll:l})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=e;for(let t=0;t<XP.length;t++){const n=XP[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],a=n[o];if(iS(i))e.addValue(o,i),ML(r)&&r.add(o);else if(iS(a))e.addValue(o,kL(i)),ML(r)&&r.remove(o);else if(a!==i)if(e.hasValue(o)){const t=e.getValue(o);!t.hasAnimated&&t.set(i)}else{const t=e.getStaticValue(o);e.addValue(o,kL(void 0!==t?t:i))}}for(const o in n)void 0===t[o]&&e.removeValue(o);return t}(this,this.scrapeMotionValuesFromProps(e),this.prevMotionValues)}getProps(){return this.props}getVariant(e){var t;return null===(t=this.props.variants)||void 0===t?void 0:t[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var e;return this.isVariantNode?this:null===(e=this.parent)||void 0===e?void 0:e.getClosestVariantNode()}getVariantContext(e=!1){var t,n;if(e)return null===(t=this.parent)||void 0===t?void 0:t.getVariantContext();if(!this.isControllingVariants){const e=(null===(n=this.parent)||void 0===n?void 0:n.getVariantContext())||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const r={};for(let o=0;o<JP;o++){const e=QP[o],t=this.props[e];(Rk(t)||!1===t)&&(r[e]=t)}return r}addVariantChild(e){var t;const n=this.getClosestVariantNode();if(n)return null===(t=n.variantChildren)||void 0===t||t.add(e),()=>n.variantChildren.delete(e)}addValue(e,t){this.hasValue(e)&&this.removeValue(e),this.values.set(e,t),this.latestValues[e]=t.get(),this.bindToMotionValue(e,t)}removeValue(e){var t;this.values.delete(e),null===(t=this.valueSubscriptions.get(e))||void 0===t||t(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=kL(t),this.addValue(e,n)),n}readValue(e){return void 0===this.latestValues[e]&&this.current?this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=gC(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||iS(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new xL),this.events[e].add(t)}notify(e,...t){var n;null===(n=this.events[e])||void 0===n||n.notify(...t)}}const QP=["initial",...DL],JP=QP.length;class eO extends KP{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},o){let i=function(e,t,n){var r;const o={};for(const i in e){const e=TL(i,t);o[i]=void 0!==e?e:null===(r=n.getValue(i))||void 0===r?void 0:r.get()}return o}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),i&&(i=r(i))),o){!function(e,t,n){var r,o;const i=Object.keys(t).filter((t=>!e.hasValue(t))),a=i.length;if(a)for(let s=0;s<a;s++){const a=i[s],l=t[a];let c=null;Array.isArray(l)&&(c=l[0]),null===c&&(c=null!==(o=null!==(r=n[a])&&void 0!==r?r:e.readValue(a))&&void 0!==o?o:t[a]),null!=c&&("string"==typeof c&&(mL(c)||vL(c))?c=parseFloat(c):!LL(c)&&FS.test(l)&&(c=VE(a,l)),e.addValue(a,kL(c)),void 0===n[a]&&(n[a]=c),null!==c&&e.setBaseTarget(a,c))}}(this,n,i);const e=VP(this,n,i,t);t=e.transitionEnd,n=e.target}return{transition:e,transitionEnd:t,...n}}}class tO extends eO{readValueFromInstance(e,t){if(rS.has(t)){const e=UE(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(lS(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return _P(e,t)}build(e,t,n,r){qS(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e){return fC(e)}renderInstance(e,t,n,r){uC(e,t,n,r)}}class nO extends eO{getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){var n;return rS.has(t)?(null===(n=UE(t))||void 0===n?void 0:n.default)||0:(t=dC.has(t)?t:cC(t),e.getAttribute(t))}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(e){return pC(e)}build(e,t,n,r){iC(e,t,n,r.transformTemplate)}renderInstance(e,t,n,r){hC(e,t,0,r)}}const rO=(e,t)=>eS(e)?new nO(t,{enableHardwareAcceleration:!1}):new tO(t,{enableHardwareAcceleration:!0});function oO(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const iO={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!kS.test(e))return e;e=parseFloat(e)}return`${oO(e,t.target.x)}% ${oO(e,t.target.y)}%`}},aO="_$css",sO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=e.includes("var("),i=[];o&&(e=e.replace(MP,(e=>(i.push(e),aO))));const a=FS.parse(e);if(a.length>5)return r;const s=FS.createTransformer(e),l="number"!=typeof a[0]?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;a[0+l]/=c,a[1+l]/=u;const d=r_(c,u,.5);"number"==typeof a[2+l]&&(a[2+l]/=d),"number"==typeof a[3+l]&&(a[3+l]/=d);let h=s(a);if(o){let e=0;h=h.replace(aO,(()=>{const t=i[e];return e++,t}))}return h}};class lO extends F.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=cO,Object.assign(tS,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Uk.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||nL.postRender((()=>{var e;(null===(e=i.getStack())||void 0===e?void 0:e.members.length)||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),(null==t?void 0:t.group)&&t.group.remove(r),(null==n?void 0:n.deregister)&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;null==e||e()}render(){return null}}const cO={borderRadius:{...iO,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:iO,borderTopRightRadius:iO,borderBottomLeftRadius:iO,borderBottomRightRadius:iO,boxShadow:sO},uO={measureLayout:function(e){const[t,n]=TE(),r=i.exports.useContext(Gk);return sd(lO,{...e,layoutGroup:r,switchLayoutGroup:i.exports.useContext(Zk),isPresent:t,safeToRemove:n})}};const dO=["TopLeft","TopRight","BottomLeft","BottomRight"],hO=dO.length,fO=e=>"string"==typeof e?parseFloat(e):e,pO=e=>"number"==typeof e||kS.test(e);function gO(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e.borderRadius}const mO=yO(0,.5,T_),vO=yO(.5,.95,C_);function yO(e,t,n){return r=>r<e?0:r>t?1:n(n_(e,t,r))}function bO(e,t){e.min=t.min,e.max=t.max}function xO(e,t){bO(e.x,t.x),bO(e.y,t.y)}function wO(e,t,n,r,o){return e=mP(e-=t,1/n,r),void 0!==o&&(e=mP(e,1/o,r)),e}function kO(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){wS.test(t)&&(t=parseFloat(t),t=r_(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=r_(i.min,i.max,r);e===i&&(s-=t),e.min=wO(e.min,t,n,s,o),e.max=wO(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const SO=["x","scaleX","originX"],CO=["y","scaleY","originY"];function _O(e,t,n,r){kO(e.x,t,SO,null==n?void 0:n.x,null==r?void 0:r.x),kO(e.y,t,CO,null==n?void 0:n.y,null==r?void 0:r.y)}function EO(e){return 0===e.translate&&1===e.scale}function LO(e){return EO(e.x)&&EO(e.y)}function PO(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 OO(e){return KL(e.x)/KL(e.y)}class TO{constructor(){this.members=[]}add(e){yL(this.members,e),e.scheduleRender()}remove(e){if(bL(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){var n;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;!1===o&&r.hide()}}exitAnimationComplete(){this.members.forEach((e=>{var t,n,r,o,i;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(i=null===(r=e.resumingFrom)||void 0===r?void 0:(o=r.options).onExitComplete)||void 0===i||i.call(o)}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function MO(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:o}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),o&&(r+=`rotateY(${o}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return 1===a&&1===s||(r+=`scale(${a}, ${s})`),r||"none"}const AO=(e,t)=>e.depth-t.depth;class IO{constructor(){this.children=[],this.isDirty=!1}add(e){yL(this.children,e),this.isDirty=!0}remove(e){bL(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(AO),this.isDirty=!1,this.children.forEach(e)}}const RO=["","X","Y","Z"];let NO=0;function DO({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e,n={},r=(null==t?void 0:t())){this.id=NO++,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($O),this.nodes.forEach(UO)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=e,this.latestValues=n,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new IO)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new xL),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);null==n||n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}registerPotentialNode(e,t){this.potentialNodes.set(e,t)}mount(t,n=!1){var r;if(this.instance)return;this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),null===(r=this.parent)||void 0===r||r.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=cL(r,250),Uk.hasAnimatedSinceResize&&(Uk.hasAnimatedSinceResize=!1,this.nodes.forEach(WO))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{var o,i,s,l,c;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const u=null!==(i=null!==(o=this.options.transition)&&void 0!==o?o:a.getDefaultTransition())&&void 0!==i?i:XO,{onLayoutAnimationStart:d,onLayoutAnimationComplete:h}=a.getProps(),f=!this.targetLayout||!PO(this.targetLayout,r)||n,p=!t&&n;if((null===(s=this.resumeFrom)||void 0===s?void 0:s.instance)||p||t&&(f||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,p);const t={...pL(u,"layout"),onPlay:d,onComplete:h};a.shouldReduceMotion&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||0!==this.animationProgress||WO(this),this.isLead()&&(null===(c=(l=this.options).onExitComplete)||void 0===c||c.call(l));this.targetLayout=r}))}unmount(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,rL.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1}startUpdate(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(VO),this.animationId++)}willUpdate(e=!0){var t,n,r;if(this.root.isUpdateBlocked())return void(null===(n=(t=this.options).onExitComplete)||void 0===n||n.call(t));if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let s=0;s<this.path.length;s++){const e=this.path[s];e.shouldResetTransform=!0,e.updateScroll("snapshot")}const{layoutId:o,layout:i}=this.options;if(void 0===o&&!i)return;const a=null===(r=this.options.visualElement)||void 0===r?void 0:r.getProps().transformTemplate;this.prevTransformTemplateValue=null==a?void 0:a(this.latestValues,""),this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(FO);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(KO),this.potentialNodes.clear()),this.nodes.forEach(HO),this.nodes.forEach(zO),this.nodes.forEach(BO),this.clearAllSnapshots(),oL.update(),oL.preRender(),oL.render())}clearAllSnapshots(){this.nodes.forEach(jO),this.sharedNodes.forEach(GO)}scheduleUpdateProjection(){nL.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){nL.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){var e;if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),null===(e=this.options.visualElement)||void 0===e||e.notify("LayoutMeasure",this.layout.layoutBox,null==t?void 0:t.layoutBox)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){var e;if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!LO(this.projectionDelta),r=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate,i=null==r?void 0:r(this.latestValues,""),a=i!==this.prevTransformTemplateValue;t&&(n||fP(this.latestValues)||a)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;const n=this.measurePageBox();let r=this.removeElementScroll(n);var o;e&&(r=this.removeTransform(r)),QO((o=r).x),QO(o.y);const i=null===(t=this.options.visualElement)||void 0===t?void 0:t.readValue("position"),a="fixed"===i||"sticky"===i?i:"static";return{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id,position:a}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(xP(t.x,n.offset.x),xP(t.y,n.offset.y)),t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};xO(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;if(r!==this.root&&o&&i.layoutScroll){if(o.isRoot){xO(t,e);const{scroll:n}=this.root;n&&(xP(t.x,-n.offset.x),xP(t.y,-n.offset.y))}xP(t.x,o.offset.x),xP(t.y,o.offset.y)}}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};xO(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&CP(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),fP(e.latestValues)&&CP(n,e.latestValues)}return fP(this.latestValues)&&CP(n,this.latestValues),n}removeTransform(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};xO(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];if(!e.instance)continue;if(!fP(e.latestValues))continue;hP(e.latestValues)&&e.updateSnapshot();const o={x:{min:0,max:0},y:{min:0,max:0}};xO(o,e.measurePageBox()),_O(n,e.latestValues,null===(t=e.snapshot)||void 0===t?void 0:t.layoutBox,o)}return fP(this.latestValues)&&_O(n,this.latestValues),n}setTargetDelta(e){this.targetDelta=e,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var e;if(this.isProjectionDirty||(this.isProjectionDirty=this.getLead().isProjectionDirty||Boolean(this.parent&&this.parent.isProjectionDirty)),!this.isProjectionDirty)return;const{layout:t,layoutId:n}=this.options;if(this.layout&&(t||n)){if(!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout?(this.relativeParent=e,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},rP(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),xO(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var r,o,i;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&(null===(e=this.relativeParent)||void 0===e?void 0:e.target)?(r=this.target,o=this.relativeTarget,i=this.relativeParent.target,tP(r.x,o.x,i.x),tP(r.y,o.y,i.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):xO(this.target,this.layout.layoutBox),bP(this.target,this.targetDelta)):xO(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target?(this.relativeParent=e,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},rP(this.relativeTargetOrigin,this.target,e.target),xO(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!hP(this.parent.latestValues)&&!pP(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var e;if(!this.isProjectionDirty)return;this.isProjectionDirty=!1;const{layout:t,layoutId:n}=this.options;if(this.isTreeAnimating=Boolean((null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!t&&!n)return;const r=this.getLead();xO(this.layoutCorrected,this.layout.layoutBox),function(e,t,n,r=!1){var o,i;const a=n.length;if(!a)return;let s,l;t.x=t.y=1;for(let c=0;c<a;c++)s=n[c],l=s.projectionDelta,"contents"!==(null===(i=null===(o=s.instance)||void 0===o?void 0:o.style)||void 0===i?void 0:i.display)&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&CP(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,bP(e,l)),r&&fP(s.latestValues)&&CP(e,s.latestValues))}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==r);const{target:o}=r;if(!o)return;this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const i=this.treeScale.x,a=this.treeScale.y,s=this.projectionTransform;eP(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.projectionTransform=MO(this.projectionDelta,this.treeScale),this.projectionTransform===s&&this.treeScale.x===i&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t,n,r;null===(n=(t=this.options).scheduleRender)||void 0===n||n.call(t),e&&(null===(r=this.getStack())||void 0===r||r.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){var n,r;const o=this.snapshot,i=(null==o?void 0:o.latestValues)||{},a={...this.latestValues},s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!t;const l={x:{min:0,max:0},y:{min:0,max:0}},c=(null==o?void 0:o.source)!==(null===(n=this.layout)||void 0===n?void 0:n.source),u=((null===(r=this.getStack())||void 0===r?void 0:r.members.length)||0)<=1,d=Boolean(c&&!u&&!0===this.options.crossfade&&!this.path.some(YO));this.animationProgress=0,this.mixTargetDelta=t=>{var n;const r=t/1e3;qO(s.x,e.x,r),qO(s.y,e.y,r),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(rP(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){ZO(e.x,t.x,n.x,r),ZO(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,l,r)),c&&(this.animationValues=a,function(e,t,n,r,o,i){var a,s,l,c;o?(e.opacity=r_(0,null!==(a=n.opacity)&&void 0!==a?a:1,mO(r)),e.opacityExit=r_(null!==(s=t.opacity)&&void 0!==s?s:1,0,vO(r))):i&&(e.opacity=r_(null!==(l=t.opacity)&&void 0!==l?l:1,null!==(c=n.opacity)&&void 0!==c?c:1,r));for(let u=0;u<hO;u++){const o=`border${dO[u]}Radius`;let i=gO(t,o),a=gO(n,o);void 0===i&&void 0===a||(i||(i=0),a||(a=0),0===i||0===a||pO(i)===pO(a)?(e[o]=Math.max(r_(fO(i),fO(a),r),0),(wS.test(a)||wS.test(i))&&(e[o]+="%")):e[o]=a)}(t.rotate||n.rotate)&&(e.rotate=r_(t.rotate||0,n.rotate||0,r))}(a,i,this.latestValues,r,d,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(0)}startAnimation(e){var t,n;this.notifyListeners("animationStart"),null===(t=this.currentAnimation)||void 0===t||t.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(rL.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=nL.update((()=>{Uk.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n={}){const r=iS(e)?e:kL(e);return gL("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}(0,1e3,{...e,onUpdate:t=>{var n;this.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:()=>{var t;null===(t=e.onComplete)||void 0===t||t.call(e),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&JO(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=KL(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=KL(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}xO(t,n),CP(t,o),eP(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){var n,r,o;this.sharedNodes.has(e)||this.sharedNodes.set(e,new TO);this.sharedNodes.get(e).add(t),t.promote({transition:null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(o=null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===o?void 0:o.call(r,t)})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let o=0;o<RO.length;o++){const t="rotate"+RO[o];n[t]&&(r[t]=n[t],e.setStaticValue(t,0))}null==e||e.render();for(const o in r)e.setStaticValue(o,r[o]);e.scheduleRender()}getProjectionStyles(e={}){var t,n,r;const o={};if(!this.instance||this.isSVG)return o;if(!this.isVisible)return{visibility:"hidden"};o.visibility="";const i=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,o.opacity="",o.pointerEvents=yC(e.pointerEvents)||"",o.transform=i?i(this.latestValues,""):"none",o;const a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=yC(e.pointerEvents)||""),this.hasProjected&&!fP(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}const s=a.animationValues||a.latestValues;this.applyTransformsToTarget(),o.transform=MO(this.projectionDeltaWithTransform,this.treeScale,s),i&&(o.transform=i(s,o.transform));const{x:l,y:c}=this.projectionDelta;o.transformOrigin=`${100*l.origin}% ${100*c.origin}% 0`,a.animationValues?o.opacity=a===this?null!==(r=null!==(n=s.opacity)&&void 0!==n?n:this.latestValues.opacity)&&void 0!==r?r:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:o.opacity=a===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const u in tS){if(void 0===s[u])continue;const{correct:e,applyTo:t}=tS[u],n=e(s[u],a);if(t){const e=t.length;for(let r=0;r<e;r++)o[t[r]]=n}else o[u]=n}return this.options.layoutId&&(o.pointerEvents=a===this?yC(e.pointerEvents)||"":"none"),o}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(FO),this.root.sharedNodes.clear()}}}function zO(e){e.updateLayout()}function BO(e){var t,n,r;const o=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:r}=e.options,i=o.source!==e.layout.source;"size"===r?cP((e=>{const n=i?o.measuredBox[e]:o.layoutBox[e],r=KL(n);n.min=t[e].min,n.max=n.min+r})):JO(r,o.layoutBox,t)&&cP((e=>{const n=i?o.measuredBox[e]:o.layoutBox[e],r=KL(t[e]);n.max=n.min+r}));const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};eP(a,t,o.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?eP(s,e.applyTransform(n,!0),o.measuredBox):eP(s,t,o.layoutBox);const l=!LO(a);let c=!1;if(!e.resumeFrom){const n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:e,layout:r}=n;if(e&&r){const n={x:{min:0,max:0},y:{min:0,max:0}};rP(n,o.layoutBox,e.layoutBox);const i={x:{min:0,max:0},y:{min:0,max:0}};rP(i,t,r.layoutBox),PO(n,i)||(c=!0)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:o,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else e.isLead()&&(null===(r=(n=e.options).onExitComplete)||void 0===r||r.call(n));e.options.transition=void 0}function jO(e){e.clearSnapshot()}function FO(e){e.clearMeasurements()}function HO(e){const{visualElement:t}=e.options;(null==t?void 0:t.getProps().onBeforeLayoutMeasure)&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function WO(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function $O(e){e.resolveTargetDelta()}function UO(e){e.calcProjection()}function VO(e){e.resetRotation()}function GO(e){e.removeLeadSnapshot()}function qO(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 ZO(e,t,n,r){e.min=r_(t.min,n.min,r),e.max=r_(t.max,n.max,r)}function YO(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const XO={duration:.45,ease:[.4,0,.1,1]};function KO(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 r=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);r&&e.mount(r,!0)}function QO(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function JO(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t,n=.1){return cE(e,t)<=n}(OO(t),OO(n),.2)}const eT=DO({attachResizeListener:(e,t)=>CC(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),tT={current:void 0},nT=DO({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!tT.current){const e=new eT(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),tT.current=e}return tT.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),rT={...$L,...OE,...OP,...uO},oT=Qk(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r,o){return{...eS(e)?wC:kC,preloadedFeatures:n,useRender:lC(t),createVisualElement:r,projectionNodeConstructor:o,Component:e}}(e,t,rT,rO,nT)));function iT(){const e=i.exports.useRef(!1);return Ok((()=>(e.current=!0,()=>{e.current=!1})),[]),e}class aT extends i.exports.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function sT({children:e,isPresent:t}){const n=i.exports.useId(),r=i.exports.useRef(null),o=i.exports.useRef({width:0,height:0,top:0,left:0});return i.exports.useInsertionEffect((()=>{const{width:e,height:i,top:a,left:s}=o.current;if(t||!r.current||!e||!i)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${i}px !important;\n top: ${a}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[t]),sd(aT,{isPresent:t,childRef:r,sizeRef:o,children:i.exports.cloneElement(e,{ref:r})})}const lT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:a,mode:s})=>{const l=$k(cT),c=i.exports.useId(),u=i.exports.useMemo((()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:e=>{l.set(e,!0);for(const t of l.values())if(!t)return;r&&r()},register:e=>(l.set(e,!1),()=>l.delete(e))})),a?void 0:[n]);return i.exports.useMemo((()=>{l.forEach(((e,t)=>l.set(t,!1)))}),[n]),i.exports.useEffect((()=>{!n&&!l.size&&r&&r()}),[n]),"popLayout"===s&&(e=sd(sT,{isPresent:n,children:e})),sd(Lk.Provider,{value:u,children:e})};function cT(){return new Map}const uT=e=>e.key||"";const dT=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:a=!0,mode:s="sync"})=>{o&&(s="wait",bE(!1,"Replace exitBeforeEnter with mode='wait'"));let[l]=function(){const e=iT(),[t,n]=i.exports.useState(0),r=i.exports.useCallback((()=>{e.current&&n(t+1)}),[t]);return[i.exports.useCallback((()=>nL.postRender(r)),[r]),t]}();const c=i.exports.useContext(Gk).forceRender;c&&(l=c);const u=iT(),d=function(e){const t=[];return i.exports.Children.forEach(e,(e=>{i.exports.isValidElement(e)&&t.push(e)})),t}(e);let h=d;const f=new Set,p=i.exports.useRef(h),g=i.exports.useRef(new Map).current,m=i.exports.useRef(!0);if(Ok((()=>{m.current=!1,function(e,t){e.forEach((e=>{const n=uT(e);t.set(n,e)}))}(d,g),p.current=h})),VC((()=>{m.current=!0,g.clear(),f.clear()})),m.current)return sd(ad,{children:h.map((e=>sd(lT,{isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:a,mode:s,children:e},uT(e))))});h=[...h];const v=p.current.map(uT),y=d.map(uT),b=v.length;for(let i=0;i<b;i++){const e=v[i];-1===y.indexOf(e)&&f.add(e)}return"wait"===s&&f.size&&(h=[]),f.forEach((e=>{if(-1!==y.indexOf(e))return;const n=g.get(e);if(!n)return;const o=v.indexOf(e);h.splice(o,0,sd(lT,{isPresent:!1,onExitComplete:()=>{g.delete(e),f.delete(e);const t=p.current.findIndex((t=>t.key===e));if(p.current.splice(t,1),!f.size){if(p.current=d,!1===u.current)return;l(),r&&r()}},custom:t,presenceAffectsLayout:a,mode:s,children:n},uT(n)))})),h=h.map((e=>{const t=e.key;return f.has(t)?e:sd(lT,{isPresent:!0,presenceAffectsLayout:a,mode:s,children:e},uT(e))})),"production"!==vE&&"wait"===s&&h.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.'),sd(ad,{children:f.size?h:h.map((e=>i.exports.cloneElement(e)))})};var hT=function(){return hT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hT.apply(this,arguments)};function fT(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function pT(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(T2){i(T2)}}function s(e){try{l(r.throw(e))}catch(T2){i(T2)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function gT(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(T2){s=[6,T2],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function mT(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function vT(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var yT=(...e)=>e.filter(Boolean).join(" ");var bT={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},xT={position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},wT={position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},kT={position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},ST={position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}};function CT(e){switch((null==e?void 0:e.direction)??"right"){case"right":default:return wT;case"left":return xT;case"bottom":return ST;case"top":return kT}}var _T={enter:{duration:.2,ease:bT.easeOut},exit:{duration:.1,ease:bT.easeIn}},ET=(e,t)=>({...e,delay:"number"==typeof t?t:null==t?void 0:t.enter}),LT=(e,t)=>({...e,delay:"number"==typeof t?t:null==t?void 0:t.exit}),PT=e=>null!=e&&parseInt(e.toString(),10)>0,OT={exit:{height:{duration:.2,ease:bT.ease},opacity:{duration:.3,ease:bT.ease}},enter:{height:{duration:.3,ease:bT.ease},opacity:{duration:.4,ease:bT.ease}}},TT={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>({...e&&{opacity:PT(t)?1:0},height:t,transitionEnd:null==r?void 0:r.exit,transition:(null==n?void 0:n.exit)??LT(OT.exit,o)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>({...e&&{opacity:1},height:t,transitionEnd:null==r?void 0:r.enter,transition:(null==n?void 0:n.enter)??ET(OT.enter,o)})},MT=i.exports.forwardRef(((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:a=0,endingHeight:s="auto",style:l,className:c,transition:u,transitionEnd:d,...h}=e,[f,p]=i.exports.useState(!1);i.exports.useEffect((()=>{const e=setTimeout((()=>{p(!0)}));return()=>clearTimeout(e)}),[]),(e=>{const{condition:t,message:n}=e})({condition:Boolean(a>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const g=parseFloat(a.toString())>0,m={startingHeight:a,endingHeight:s,animateOpacity:o,transition:f?u:{enter:{duration:0}},transitionEnd:{enter:null==d?void 0:d.enter,exit:r?null==d?void 0:d.exit:{...null==d?void 0:d.exit,display:g?"block":"none"}}},v=n||r?"enter":"exit";return sd(dT,{initial:!1,custom:m,children:(!r||n)&&F.createElement(oT.div,{ref:t,...h,className:yT("chakra-collapse",c),style:{overflow:"hidden",display:"block",...l},custom:m,variants:TT,initial:!!r&&"exit",animate:v,exit:"exit"})})}));MT.displayName="Collapse";var AT={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:(null==e?void 0:e.enter)??ET(_T.enter,n),transitionEnd:null==t?void 0:t.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:(null==e?void 0:e.exit)??LT(_T.exit,n),transitionEnd:null==t?void 0:t.exit})},IT={initial:"exit",animate:"enter",exit:"exit",variants:AT},RT=i.exports.forwardRef((function(e,t){const{unmountOnExit:n,in:r,className:o,transition:i,transitionEnd:a,delay:s,...l}=e,c=r||n?"enter":"exit",u={transition:i,transitionEnd:a,delay:s};return sd(dT,{custom:u,children:(!n||r&&n)&&F.createElement(oT.div,{ref:t,className:yT("chakra-fade",o),custom:u,...IT,animate:c,...l})})}));RT.displayName="Fade";var NT={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>({opacity:0,...e?{scale:t,transitionEnd:null==r?void 0:r.exit}:{transitionEnd:{scale:t,...null==r?void 0:r.exit}},transition:(null==n?void 0:n.exit)??LT(_T.exit,o)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:(null==t?void 0:t.enter)??ET(_T.enter,n),transitionEnd:null==e?void 0:e.enter})},DT={initial:"exit",animate:"enter",exit:"exit",variants:NT},zT=i.exports.forwardRef((function(e,t){const{unmountOnExit:n,in:r,reverse:o=!0,initialScale:i=.95,className:a,transition:s,transitionEnd:l,delay:c,...u}=e,d=r||n?"enter":"exit",h={initialScale:i,reverse:o,transition:s,transitionEnd:l,delay:c};return sd(dT,{custom:h,children:(!n||r&&n)&&F.createElement(oT.div,{ref:t,className:yT("chakra-offset-slide",a),...DT,animate:d,custom:h,...u})})}));zT.displayName="ScaleFade";var BT={exit:{duration:.15,ease:bT.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},jT={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:o}=CT({direction:e});return{...o,transition:(null==t?void 0:t.exit)??LT(BT.exit,r),transitionEnd:null==n?void 0:n.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:o}=CT({direction:e});return{...o,transition:(null==n?void 0:n.enter)??ET(BT.enter,r),transitionEnd:null==t?void 0:t.enter}}},FT=i.exports.forwardRef((function(e,t){const{direction:n="right",style:r,unmountOnExit:o,in:i,className:a,transition:s,transitionEnd:l,delay:c,motionProps:u,...d}=e,h=CT({direction:n}),f=Object.assign({position:"fixed"},h.position,r),p=i||o?"enter":"exit",g={transitionEnd:l,transition:s,direction:n,delay:c};return sd(dT,{custom:g,children:(!o||i&&o)&&F.createElement(oT.div,{...d,ref:t,initial:"exit",className:yT("chakra-slide",a),animate:p,exit:"exit",custom:g,variants:jT,style:f,...u})})}));FT.displayName="Slide";var HT={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:o})=>({opacity:0,x:e,y:t,transition:(null==n?void 0:n.exit)??LT(_T.exit,o),transitionEnd:null==r?void 0:r.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:(null==e?void 0:e.enter)??ET(_T.enter,n),transitionEnd:null==t?void 0:t.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:o,delay:i})=>{const a={x:t,y:e};return{opacity:0,transition:(null==n?void 0:n.exit)??LT(_T.exit,i),...o?{...a,transitionEnd:null==r?void 0:r.exit}:{transitionEnd:{...a,...null==r?void 0:r.exit}}}}},WT={initial:"initial",animate:"enter",exit:"exit",variants:HT},$T=i.exports.forwardRef((function(e,t){const{unmountOnExit:n,in:r,reverse:o=!0,className:i,offsetX:a=0,offsetY:s=8,transition:l,transitionEnd:c,delay:u,...d}=e,h=r||n?"enter":"exit",f={offsetX:a,offsetY:s,reverse:o,transition:l,transitionEnd:c,delay:u};return sd(dT,{custom:f,children:(!n||r&&n)&&F.createElement(oT.div,{ref:t,className:yT("chakra-offset-slide",i),custom:f,...WT,animate:h,...d})})}));$T.displayName="SlideFade";var UT=(...e)=>e.filter(Boolean).join(" ");var VT=e=>{const{condition:t,message:n}=e};function GT(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}var[qT,ZT]=lk({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:"<Accordion />"}),[YT,XT]=lk({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:"<AccordionItem />"}),[KT,QT,JT,eM]=yk(),tM=rk((function(e,t){const{getButtonProps:n}=XT(),r=n(e,t),o={display:"flex",alignItems:"center",width:"100%",outline:0,...ZT().button};return F.createElement(sk.button,{...r,className:UT("chakra-accordion__button",e.className),__css:o})}));function nM(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:o,allowToggle:a,...s}=e;!function(e){const t=e.index||e.defaultIndex,n=null!=t&&!Array.isArray(t)&&e.allowMultiple;VT({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}(e),function(e){VT({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"})}(e);const l=JT(),[c,u]=i.exports.useState(-1);i.exports.useEffect((()=>()=>{u(-1)}),[]);const[d,h]=Ck({value:r,defaultValue:()=>o?n??[]:n??-1,onChange:t});return{index:d,setIndex:h,htmlProps:s,getAccordionItemProps:e=>{let t=!1;null!==e&&(t=Array.isArray(d)?d.includes(e):d===e);return{isOpen:t,onChange:t=>{if(null!==e)if(o&&Array.isArray(d)){const n=t?d.concat(e):d.filter((t=>t!==e));h(n)}else t?h(e):a&&h(-1)}}},focusedIndex:c,setFocusedIndex:u,descendants:l}}tM.displayName="AccordionButton";var[rM,oM]=lk({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function iM(e){const{isDisabled:t,isFocusable:n,id:r,...o}=e,{getAccordionItemProps:a,setFocusedIndex:s}=oM(),l=i.exports.useRef(null),c=i.exports.useId(),u=r??c,d=`accordion-button-${u}`,h=`accordion-panel-${u}`;!function(e){VT({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.\n "})}(e);const{register:f,index:p,descendants:g}=eM({disabled:t&&!n}),{isOpen:m,onChange:v}=a(-1===p?null:p);!function(e){VT({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}({isOpen:m,isDisabled:t});const y=i.exports.useCallback((()=>{null==v||v(!m),s(p)}),[p,s,m,v]),b=i.exports.useCallback((e=>{const t={ArrowDown:()=>{const e=g.nextEnabled(p);null==e||e.node.focus()},ArrowUp:()=>{const e=g.prevEnabled(p);null==e||e.node.focus()},Home:()=>{const e=g.firstEnabled();null==e||e.node.focus()},End:()=>{const e=g.lastEnabled();null==e||e.node.focus()}},n=t[e.key];n&&(e.preventDefault(),n(e))}),[g,p]),x=i.exports.useCallback((()=>{s(p)}),[s,p]),w=i.exports.useCallback((function(e={},n=null){return{...e,type:"button",ref:ck(f,l,n),id:d,disabled:!!t,"aria-expanded":!!m,"aria-controls":h,onClick:GT(e.onClick,y),onFocus:GT(e.onFocus,x),onKeyDown:GT(e.onKeyDown,b)}}),[d,t,m,y,x,b,h,f]),k=i.exports.useCallback((function(e={},t=null){return{...e,ref:t,role:"region",id:h,"aria-labelledby":d,hidden:!m}}),[d,m,h]);return{isOpen:m,isDisabled:t,isFocusable:n,onOpen:()=>{null==v||v(!0)},onClose:()=>{null==v||v(!1)},getButtonProps:w,getPanelProps:k,htmlProps:o}}function aM(e){const{isOpen:t,isDisabled:n}=XT(),{reduceMotion:r}=oM(),o=UT("chakra-accordion__icon",e.className),i={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...ZT().icon};return sd(wk,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:i,...e,children:sd("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}aM.displayName="AccordionIcon";var sM=rk((function(e,t){const{children:n,className:r}=e,{htmlProps:o,...a}=iM(e),s={...ZT().container,overflowAnchor:"none"},l=i.exports.useMemo((()=>a),[a]);return F.createElement(YT,{value:l},F.createElement(sk.div,{ref:t,...o,className:UT("chakra-accordion__item",r),__css:s},"function"==typeof n?n({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):n))}));sM.displayName="AccordionItem";var lM=rk((function(e,t){const{className:n,motionProps:r,...o}=e,{reduceMotion:i}=oM(),{getPanelProps:a,isOpen:s}=XT(),l=a(o,t),c=UT("chakra-accordion__panel",n),u=ZT();i||delete l.hidden;const d=F.createElement(sk.div,{...l,__css:u.panel,className:c});return i?d:sd(MT,{in:s,...r,children:d})}));lM.displayName="AccordionPanel";var cM=rk((function({children:e,reduceMotion:t,...n},r){const o=ak("Accordion",n),a=df(n),{htmlProps:s,descendants:l,...c}=nM(a),u=i.exports.useMemo((()=>({...c,reduceMotion:!!t})),[c,t]);return F.createElement(KT,{value:l},F.createElement(rM,{value:u},F.createElement(qT,{value:o},F.createElement(sk.div,{ref:r,...s,className:UT("chakra-accordion",n.className),__css:o.root},e))))}));cM.displayName="Accordion";var uM=fg({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),dM=rk(((e,t)=>{const n=ik("Spinner",e),{label:r="Loading...",thickness:o="2px",speed:i="0.45s",emptyColor:a="transparent",className:s,...l}=df(e),c=((...e)=>e.filter(Boolean).join(" "))("chakra-spinner",s),u={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:o,borderBottomColor:a,borderLeftColor:a,animation:`${uM} ${i} linear infinite`,...n};return F.createElement(sk.div,{ref:t,__css:u,className:c,...l},r&&F.createElement(sk.span,{srOnly:!0},r))}));dM.displayName="Spinner";var hM=(...e)=>e.filter(Boolean).join(" ");function fM(e){return sd(wk,{viewBox:"0 0 24 24",...e,children:sd("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[pM,gM]=lk({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[mM,vM]=lk({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),yM={info:{icon:function(e){return sd(wk,{viewBox:"0 0 24 24",...e,children:sd("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"})})},colorScheme:"blue"},warning:{icon:fM,colorScheme:"orange"},success:{icon:function(e){return sd(wk,{viewBox:"0 0 24 24",...e,children:sd("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"})})},colorScheme:"green"},error:{icon:fM,colorScheme:"red"},loading:{icon:dM,colorScheme:"blue"}};var bM=rk((function(e,t){const{status:n="info",addRole:r=!0,...o}=df(e),i=e.colorScheme??function(e){return yM[e].colorScheme}(n),a=ak("Alert",{...e,colorScheme:i}),s={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...a.container};return F.createElement(pM,{value:{status:n}},F.createElement(mM,{value:a},F.createElement(sk.div,{role:r?"alert":void 0,ref:t,...o,className:hM("chakra-alert",e.className),__css:s})))}));bM.displayName="Alert";var xM=rk((function(e,t){const n={display:"inline",...vM().description};return F.createElement(sk.div,{ref:t,...e,className:hM("chakra-alert__desc",e.className),__css:n})}));function wM(e){const{status:t}=gM(),n=function(e){return yM[e].icon}(t),r=vM(),o="loading"===t?r.spinner:r.icon;return F.createElement(sk.span,{display:"inherit",...e,className:hM("chakra-alert__icon",e.className),__css:o},e.children||sd(n,{h:"100%",w:"100%"}))}xM.displayName="AlertDescription",wM.displayName="AlertIcon";var kM=rk((function(e,t){const n=vM();return F.createElement(sk.div,{ref:t,...e,className:hM("chakra-alert__title",e.className),__css:n.title})}));function SM(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}kM.displayName="AlertTitle";var CM=rk((function(e,t){const{htmlWidth:n,htmlHeight:r,alt:o,...i}=e;return sd("img",{width:n,height:r,ref:t,alt:o,...i})}));CM.displayName="NativeImage";var _M=rk((function(e,t){const{fallbackSrc:n,fallback:r,src:o,srcSet:a,align:s,fit:l,loading:c,ignoreFallback:u,crossOrigin:d,fallbackStrategy:h="beforeLoadOrError",referrerPolicy:f,...p}=e,g=null!=c||u||!(void 0!==n||void 0!==r),m=function(e){const{loading:t,src:n,srcSet:r,onLoad:o,onError:a,crossOrigin:s,sizes:l,ignoreFallback:c}=e,[u,d]=i.exports.useState("pending");i.exports.useEffect((()=>{d(n?"loading":"pending")}),[n]);const h=i.exports.useRef(),f=i.exports.useCallback((()=>{if(!n)return;p();const e=new Image;e.src=n,s&&(e.crossOrigin=s),r&&(e.srcset=r),l&&(e.sizes=l),t&&(e.loading=t),e.onload=e=>{p(),d("loaded"),null==o||o(e)},e.onerror=e=>{p(),d("failed"),null==a||a(e)},h.current=e}),[n,s,r,l,o,a,t]),p=()=>{h.current&&(h.current.onload=null,h.current.onerror=null,h.current=null)};return Xu((()=>{if(!c)return"loading"===u&&f(),()=>{p()}}),[u,f,c]),c?"loaded":u}({...e,ignoreFallback:g}),v=((e,t)=>"loaded"!==e&&"beforeLoadOrError"===t||"failed"===e&&"onError"===t)(m,h),y={ref:t,objectFit:l,objectPosition:s,...g?p:SM(p,["onError","onLoad"])};return v?r||F.createElement(sk.img,{as:CM,className:"chakra-image__placeholder",src:n,...y}):F.createElement(sk.img,{as:CM,src:o,srcSet:a,crossOrigin:d,loading:c,referrerPolicy:f,className:"chakra-image",...y})}));function EM(e){return i.exports.Children.toArray(e).filter((e=>i.exports.isValidElement(e)))}_M.displayName="Image",rk(((e,t)=>F.createElement(sk.img,{ref:t,as:CM,className:"chakra-image",...e})));var LM=(...e)=>e.filter(Boolean).join(" "),PM=e=>e?"":void 0,[OM,TM]=lk({strict:!1,name:"ButtonGroupContext"});function MM(e){const{children:t,className:n,...r}=e,o=i.exports.isValidElement(t)?i.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,a=LM("chakra-button__icon",n);return F.createElement(sk.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:a},o)}function AM(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=sd(dM,{color:"currentColor",width:"1em",height:"1em"}),className:a,__css:s,...l}=e,c=LM("chakra-button__spinner",a),u="start"===n?"marginEnd":"marginStart",d=i.exports.useMemo((()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...s})),[s,t,u,r]);return F.createElement(sk.div,{className:c,...l,__css:d},o)}MM.displayName="ButtonIcon",AM.displayName="ButtonSpinner";var IM=rk(((e,t)=>{const n=TM(),r=ik("Button",{...n,...e}),{isDisabled:o=(null==n?void 0:n.isDisabled),isLoading:a,isActive:s,children:l,leftIcon:c,rightIcon:u,loadingText:d,iconSpacing:h="0.5rem",type:f,spinner:p,spinnerPlacement:g="start",className:m,as:v,...y}=df(e),b=i.exports.useMemo((()=>{const e={...null==r?void 0: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:e}}}),[r,n]),{ref:x,type:w}=function(e){const[t,n]=i.exports.useState(!e),r=i.exports.useCallback((e=>{e&&n("BUTTON"===e.tagName)}),[]);return{ref:r,type:t?"button":void 0}}(v),k={rightIcon:u,leftIcon:c,iconSpacing:h,children:l};return F.createElement(sk.button,{disabled:o||a,ref:uk(t,x),as:v,type:f??w,"data-active":PM(s),"data-loading":PM(a),__css:b,className:LM("chakra-button",m),...y},a&&"start"===g&&sd(AM,{className:"chakra-button__spinner--start",label:d,placement:"start",spacing:h,children:p}),a?d||F.createElement(sk.span,{opacity:0},sd(RM,{...k})):sd(RM,{...k}),a&&"end"===g&&sd(AM,{className:"chakra-button__spinner--end",label:d,placement:"end",spacing:h,children:p}))}));function RM(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o}=e;return ld(ad,{children:[t&&sd(MM,{marginEnd:o,children:t}),r,n&&sd(MM,{marginStart:o,children:n})]})}IM.displayName="Button";var NM=rk((function(e,t){const{size:n,colorScheme:r,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:c,...u}=e,d=LM("chakra-button__group",a),h=i.exports.useMemo((()=>({size:n,colorScheme:r,variant:o,isDisabled:c})),[n,r,o,c]);let f={display:"inline-flex"};return f=l?{...f,"> *: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}}:{...f,"& > *:not(style) ~ *:not(style)":{marginStart:s}},F.createElement(OM,{value:h},F.createElement(sk.div,{ref:t,role:"group",__css:f,className:d,"data-attached":l?"":void 0,...u}))}));NM.displayName="ButtonGroup";var DM=rk(((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":a,...s}=e,l=n||r,c=i.exports.isValidElement(l)?i.exports.cloneElement(l,{"aria-hidden":!0,focusable:!1}):null;return sd(IM,{padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":a,...s,children:c})}));DM.displayName="IconButton";var zM=(...e)=>e.filter(Boolean).join(" "),BM=e=>e?"":void 0,jM=e=>!!e||void 0;function FM(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}var[HM,WM]=lk({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormControl />\" "}),[$M,UM]=lk({strict:!1,name:"FormControlContext"});var VM=rk((function(e,t){const n=ak("Form",e),r=df(e),{getRootProps:o,htmlProps:a,...s}=function(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:o,isReadOnly:a,...s}=e,l=i.exports.useId(),c=t||`field-${l}`,u=`${c}-label`,d=`${c}-feedback`,h=`${c}-helptext`,[f,p]=i.exports.useState(!1),[g,m]=i.exports.useState(!1),[v,y]=i.exports.useState(!1),b=i.exports.useCallback(((e={},t=null)=>({id:h,...e,ref:ck(t,(e=>{e&&m(!0)}))})),[h]),x=i.exports.useCallback(((e={},t=null)=>({...e,ref:t,"data-focus":BM(v),"data-disabled":BM(o),"data-invalid":BM(r),"data-readonly":BM(a),id:e.id??u,htmlFor:e.htmlFor??c})),[c,o,v,r,a,u]),w=i.exports.useCallback(((e={},t=null)=>({id:d,...e,ref:ck(t,(e=>{e&&p(!0)})),"aria-live":"polite"})),[d]),k=i.exports.useCallback(((e={},t=null)=>({...e,...s,ref:t,role:"group"})),[s]),S=i.exports.useCallback(((e={},t=null)=>({...e,ref:t,role:"presentation","aria-hidden":!0,children:e.children||"*"})),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!a,isDisabled:!!o,isFocused:!!v,onFocus:()=>y(!0),onBlur:()=>y(!1),hasFeedbackText:f,setHasFeedbackText:p,hasHelpText:g,setHasHelpText:m,id:c,labelId:u,feedbackId:d,helpTextId:h,htmlProps:s,getHelpTextProps:b,getErrorMessageProps:w,getRootProps:k,getLabelProps:x,getRequiredIndicatorProps:S}}(r),l=zM("chakra-form-control",e.className);return F.createElement($M,{value:s},F.createElement(HM,{value:n},F.createElement(sk.div,{...o({},t),className:l,__css:n.container})))}));VM.displayName="FormControl";var GM=rk((function(e,t){const n=UM(),r=WM(),o=zM("chakra-form__helper-text",e.className);return F.createElement(sk.div,{...null==n?void 0:n.getHelpTextProps(e,t),__css:r.helperText,className:o})}));function qM(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:o,...i}=ZM(e);return{...i,disabled:t,readOnly:r,required:o,"aria-invalid":jM(n),"aria-required":jM(o),"aria-readonly":jM(r)}}function ZM(e){const t=UM(),{id:n,disabled:r,readOnly:o,required:i,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:c,onFocus:u,onBlur:d,...h}=e,f=e["aria-describedby"]?[e["aria-describedby"]]:[];return(null==t?void 0:t.hasFeedbackText)&&(null==t?void 0:t.isInvalid)&&f.push(t.feedbackId),(null==t?void 0:t.hasHelpText)&&f.push(t.helpTextId),{...h,"aria-describedby":f.join(" ")||void 0,id:n??(null==t?void 0:t.id),isDisabled:r??c??(null==t?void 0:t.isDisabled),isReadOnly:o??l??(null==t?void 0:t.isReadOnly),isRequired:i??a??(null==t?void 0:t.isRequired),isInvalid:s??(null==t?void 0:t.isInvalid),onFocus:FM(null==t?void 0:t.onFocus,u),onBlur:FM(null==t?void 0:t.onBlur,d)}}GM.displayName="FormHelperText";var[YM,XM]=lk({name:"FormErrorStylesContext",errorMessage:"useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormError />\" "}),KM=rk(((e,t)=>{const n=ak("FormError",e),r=df(e),o=UM();return(null==o?void 0:o.isInvalid)?F.createElement(YM,{value:n},F.createElement(sk.div,{...null==o?void 0:o.getErrorMessageProps(r,t),className:zM("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null}));KM.displayName="FormErrorMessage";var QM=rk(((e,t)=>{const n=XM(),r=UM();if(!(null==r?void 0:r.isInvalid))return null;const o=zM("chakra-form__error-icon",e.className);return sd(wk,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:o,children:sd("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"})})}));QM.displayName="FormErrorIcon";var JM=rk((function(e,t){const n=ik("FormLabel",e),r=df(e),{className:o,children:i,requiredIndicator:a=sd(eA,{}),optionalIndicator:s=null,...l}=r,c=UM(),u=(null==c?void 0:c.getLabelProps(l,t))??{ref:t,...l};return F.createElement(sk.label,{...u,className:zM("chakra-form__label",r.className),__css:{display:"block",textAlign:"start",...n}},i,(null==c?void 0:c.isRequired)?a:s)}));JM.displayName="FormLabel";var eA=rk((function(e,t){const n=UM(),r=WM();if(!(null==n?void 0:n.isRequired))return null;const o=zM("chakra-form__required-indicator",e.className);return F.createElement(sk.span,{...null==n?void 0:n.getRequiredIndicatorProps(e,t),__css:r.requiredIndicator,className:o})}));function tA(e,t){const n=i.exports.useRef(!1),r=i.exports.useRef(!1);i.exports.useEffect((()=>{if(n.current&&r.current)return e();r.current=!0}),t),i.exports.useEffect((()=>(n.current=!0,()=>{n.current=!1})),[])}eA.displayName="RequiredIndicator";var nA={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};sk("span",{baseStyle:nA}).displayName="VisuallyHidden",sk("input",{baseStyle:nA}).displayName="VisuallyHiddenInput";var rA=!1,oA=null,iA=!1,aA=new Set,sA="undefined"!=typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function lA(e,t){aA.forEach((n=>n(e,t)))}function cA(e){iA=!0,function(e){return!(e.metaKey||!sA&&e.altKey||e.ctrlKey)}(e)&&(oA="keyboard",lA("keyboard",e))}function uA(e){oA="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(iA=!0,lA("pointer",e))}function dA(e){e.target!==window&&e.target!==document&&(iA||(oA="keyboard",lA("keyboard",e)),iA=!1)}function hA(){iA=!1}function fA(){return"pointer"!==oA}function pA(e){!function(){if("undefined"==typeof window||rA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...t){iA=!0,e.apply(this,t)},document.addEventListener("keydown",cA,!0),document.addEventListener("keyup",cA,!0),window.addEventListener("focus",dA,!0),window.addEventListener("blur",hA,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",uA,!0),document.addEventListener("pointermove",uA,!0),document.addEventListener("pointerup",uA,!0)):(document.addEventListener("mousedown",uA,!0),document.addEventListener("mousemove",uA,!0),document.addEventListener("mouseup",uA,!0)),rA=!0}(),e(fA());const t=()=>e(fA());return aA.add(t),()=>{aA.delete(t)}}var[gA,mA]=lk({name:"CheckboxGroupContext",strict:!1}),vA=(...e)=>e.filter(Boolean).join(" "),yA=e=>e?"":void 0;function bA(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}function xA(e){return F.createElement(sk.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},sd("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function wA(e){return F.createElement(sk.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},sd("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function kA(e){const{isIndeterminate:t,isChecked:n,...r}=e,o=t?wA:xA;return n||t?F.createElement(sk.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},sd(o,{...r})):null}function SA(e={}){const t=ZM(e),{isDisabled:n,isReadOnly:r,isRequired:o,isInvalid:a,id:s,onBlur:l,onFocus:c,"aria-describedby":u}=t,{defaultChecked:d,isChecked:h,isFocusable:f,onChange:p,isIndeterminate:g,name:m,value:v,tabIndex:y,"aria-label":b,"aria-labelledby":x,"aria-invalid":w,...k}=e,S=function(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}(k,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),C=Sk(p),_=Sk(l),E=Sk(c),[L,P]=i.exports.useState(!1),[O,T]=i.exports.useState(!1),[M,A]=i.exports.useState(!1),[I,R]=i.exports.useState(!1);i.exports.useEffect((()=>pA(P)),[]);const N=i.exports.useRef(null),[D,z]=i.exports.useState(!0),[B,j]=i.exports.useState(!!d),F=void 0!==h,H=F?h:B,W=i.exports.useCallback((e=>{r||n?e.preventDefault():(F||j(H?e.target.checked:!!g||e.target.checked),null==C||C(e))}),[r,n,H,F,g,C]);Xu((()=>{N.current&&(N.current.indeterminate=Boolean(g))}),[g]),tA((()=>{n&&T(!1)}),[n,T]),Xu((()=>{const e=N.current;(null==e?void 0:e.form)&&(e.form.onreset=()=>{j(!!d)})}),[]);const $=n&&!f,U=i.exports.useCallback((e=>{" "===e.key&&R(!0)}),[R]),V=i.exports.useCallback((e=>{" "===e.key&&R(!1)}),[R]);Xu((()=>{if(!N.current)return;N.current.checked!==H&&j(N.current.checked)}),[N.current]);const G=i.exports.useCallback(((e={},t=null)=>({...e,ref:t,"data-active":yA(I),"data-hover":yA(M),"data-checked":yA(H),"data-focus":yA(O),"data-focus-visible":yA(O&&L),"data-indeterminate":yA(g),"data-disabled":yA(n),"data-invalid":yA(a),"data-readonly":yA(r),"aria-hidden":!0,onMouseDown:bA(e.onMouseDown,(e=>{O&&e.preventDefault(),R(!0)})),onMouseUp:bA(e.onMouseUp,(()=>R(!1))),onMouseEnter:bA(e.onMouseEnter,(()=>A(!0))),onMouseLeave:bA(e.onMouseLeave,(()=>A(!1)))})),[I,H,n,O,L,M,g,a,r]),q=i.exports.useCallback(((e={},t=null)=>({...S,...e,ref:ck(t,(e=>{e&&z("LABEL"===e.tagName)})),onClick:bA(e.onClick,(()=>{var e;D||(null==(e=N.current)||e.click(),requestAnimationFrame((()=>{var e;null==(e=N.current)||e.focus()})))})),"data-disabled":yA(n),"data-checked":yA(H),"data-invalid":yA(a)})),[S,n,H,a,D]),Z=i.exports.useCallback(((e={},t=null)=>({...e,ref:ck(N,t),type:"checkbox",name:m,value:v,id:s,tabIndex:y,onChange:bA(e.onChange,W),onBlur:bA(e.onBlur,_,(()=>T(!1))),onFocus:bA(e.onFocus,E,(()=>T(!0))),onKeyDown:bA(e.onKeyDown,U),onKeyUp:bA(e.onKeyUp,V),required:o,checked:H,disabled:$,readOnly:r,"aria-label":b,"aria-labelledby":x,"aria-invalid":w?Boolean(w):a,"aria-describedby":u,"aria-disabled":n,style:nA})),[m,v,s,W,_,E,U,V,o,H,$,r,b,x,w,a,u,n,y]),Y=i.exports.useCallback(((e={},t=null)=>({...e,ref:t,onMouseDown:bA(e.onMouseDown,CA),onTouchStart:bA(e.onTouchStart,CA),"data-disabled":yA(n),"data-checked":yA(H),"data-invalid":yA(a)})),[H,n,a]);return{state:{isInvalid:a,isFocused:O,isChecked:H,isActive:I,isHovered:M,isIndeterminate:g,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:q,getCheckboxProps:G,getInputProps:Z,getLabelProps:Y,htmlProps:S}}function CA(e){e.preventDefault(),e.stopPropagation()}var _A={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},EA={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},LA=fg({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),PA=fg({from:{opacity:0},to:{opacity:1}}),OA=fg({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),TA=rk((function(e,t){const n=mA(),r=ak("Checkbox",{...n,...e}),o=df(e),{spacing:a="0.5rem",className:s,children:l,iconColor:c,iconSize:u,icon:d=sd(kA,{}),isChecked:h,isDisabled:f=(null==n?void 0:n.isDisabled),onChange:p,inputProps:g,...m}=o;let v=h;(null==n?void 0:n.value)&&o.value&&(v=n.value.includes(o.value));let y=p;(null==n?void 0:n.onChange)&&o.value&&(y=function(...e){return function(t){e.forEach((e=>{null==e||e(t)}))}}(n.onChange,p));const{state:b,getInputProps:x,getCheckboxProps:w,getLabelProps:k,getRootProps:S}=SA({...m,isDisabled:f,isChecked:v,onChange:y}),C=i.exports.useMemo((()=>({animation:b.isIndeterminate?`${PA} 20ms linear, ${OA} 200ms linear`:`${LA} 200ms linear`,fontSize:u,color:c,...r.icon})),[c,u,,b.isIndeterminate,r.icon]),_=i.exports.cloneElement(d,{__css:C,isIndeterminate:b.isIndeterminate,isChecked:b.isChecked});return F.createElement(sk.label,{__css:{...EA,...r.container},className:vA("chakra-checkbox",s),...S()},sd("input",{className:"chakra-checkbox__input",...x(g,t)}),F.createElement(sk.span,{__css:{..._A,...r.control},className:"chakra-checkbox__control",...w()},_),l&&F.createElement(sk.span,{className:"chakra-checkbox__label",...k(),__css:{marginStart:a,...r.label}},l))}));function MA(e){return sd(wk,{focusable:"false","aria-hidden":!0,...e,children:sd("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"})})}TA.displayName="Checkbox";var AA=rk((function(e,t){const n=ik("CloseButton",e),{children:r,isDisabled:o,__css:i,...a}=df(e);return F.createElement(sk.button,{type:"button","aria-label":"Close",ref:t,disabled:o,__css:{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...n,...i},...a},r||sd(MA,{width:"1em",height:"1em"}))}));function IA(e,t){let n=function(e){const t=parseFloat(e);return"number"!=typeof t||Number.isNaN(t)?0:t}(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function RA(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 NA(e,t,n){return 100*(e-t)/(n-t)}function DA(e,t,n){return(n-t)*e+t}function zA(e,t,n){return IA(Math.round((e-t)/n)*n+t,RA(n))}function BA(e,t,n){return null==e?e:(n<t&&console.warn("clamp: max cannot be less than min"),Math.min(Math.max(e,t),n))}function jA(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function FA(e,t){return Math.max(RA(t),RA(e))}function HA(e,t,n){const r=jA(e);if(Number.isNaN(r))return;const o=FA(r,t);return IA(r,n??o)}AA.displayName="CloseButton";var WA="\n :root {\n --chakra-vh: 100vh;\n }\n\n @supports (height: -webkit-fill-available) {\n :root {\n --chakra-vh: -webkit-fill-available;\n }\n }\n\n @supports (height: -moz-fill-available) {\n :root {\n --chakra-vh: -moz-fill-available;\n }\n }\n\n @supports (height: 100dvh) {\n :root {\n --chakra-vh: 100dvh;\n }\n }\n",$A=()=>sd(dg,{styles:WA}),UA=()=>sd(dg,{styles:`\n html {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n font-family: system-ui, sans-serif;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n -moz-osx-font-smoothing: grayscale;\n touch-action: manipulation;\n }\n\n body {\n position: relative;\n min-height: 100%;\n font-feature-settings: 'kern';\n }\n\n *,\n *::before,\n *::after {\n border-width: 0;\n border-style: solid;\n box-sizing: border-box;\n }\n\n main {\n display: block;\n }\n\n hr {\n border-top-width: 1px;\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n pre,\n code,\n kbd,\n samp {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 1em;\n }\n\n a {\n background-color: transparent;\n color: inherit;\n text-decoration: inherit;\n }\n\n abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n\n b,\n strong {\n font-weight: bold;\n }\n\n small {\n font-size: 80%;\n }\n\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n\n sub {\n bottom: -0.25em;\n }\n\n sup {\n top: -0.5em;\n }\n\n img {\n border-style: none;\n }\n\n button,\n input,\n optgroup,\n select,\n textarea {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n\n button,\n input {\n overflow: visible;\n }\n\n button,\n select {\n text-transform: none;\n }\n\n button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n }\n\n fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n\n legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n\n progress {\n vertical-align: baseline;\n }\n\n textarea {\n overflow: auto;\n }\n\n [type="checkbox"],\n [type="radio"] {\n box-sizing: border-box;\n padding: 0;\n }\n\n [type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button {\n -webkit-appearance: none !important;\n }\n\n input[type="number"] {\n -moz-appearance: textfield;\n }\n\n [type="search"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n\n [type="search"]::-webkit-search-decoration {\n -webkit-appearance: none !important;\n }\n\n ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n\n details {\n display: block;\n }\n\n summary {\n display: list-item;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n body,\n blockquote,\n dl,\n dd,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n hr,\n figure,\n p,\n pre {\n margin: 0;\n }\n\n button {\n background: transparent;\n padding: 0;\n }\n\n fieldset {\n margin: 0;\n padding: 0;\n }\n\n ol,\n ul {\n margin: 0;\n padding: 0;\n }\n\n textarea {\n resize: vertical;\n }\n\n button,\n [role="button"] {\n cursor: pointer;\n }\n\n button::-moz-focus-inner {\n border: 0 !important;\n }\n\n table {\n border-collapse: collapse;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n\n button,\n input,\n optgroup,\n select,\n textarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n }\n\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n }\n\n img,\n video {\n max-width: 100%;\n height: auto;\n }\n\n [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) {\n outline: none;\n box-shadow: none;\n }\n\n select::-ms-expand {\n display: none;\n }\n\n ${WA}\n `});function VA(e,t,n,r){const o=Sk(n);return i.exports.useEffect((()=>{const i="function"==typeof e?e():e??document;if(n&&i)return i.addEventListener(t,o,r),()=>{i.removeEventListener(t,o,r)}}),[t,e,r,o,n]),()=>{const n="function"==typeof e?e():e??document;null==n||n.removeEventListener(t,o,r)}}var GA=()=>"undefined"!=typeof window;var qA=e=>GA()&&e.test(function(){const e=navigator.userAgentData;return(null==e?void 0:e.platform)??navigator.platform}()),ZA=()=>qA(/mac|iphone|ipad|ipod/i)&&(e=>GA()&&e.test(navigator.vendor))(/apple/i);var YA=Ig?i.exports.useLayoutEffect:i.exports.useEffect;function XA(e,t=[]){const n=i.exports.useRef(e);return YA((()=>{n.current=e})),i.exports.useCallback(((...e)=>{var t;return null==(t=n.current)?void 0:t.call(n,...e)}),t)}function KA(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,a=XA(n),s=XA(t),[l,c]=i.exports.useState(e.defaultIsOpen||!1),[u,d]=function(e,t){const n=void 0!==e;return[n,n&&void 0!==e?e:t]}(r,l),h=function(e,t){const n=i.exports.useId();return i.exports.useMemo((()=>e||[t,n].filter(Boolean).join("-")),[e,t,n])}(o,"disclosure"),f=i.exports.useCallback((()=>{u||c(!1),null==s||s()}),[u,s]),p=i.exports.useCallback((()=>{u||c(!0),null==a||a()}),[u,a]),g=i.exports.useCallback((()=>{(d?f:p)()}),[d,p,f]);return{isOpen:!!d,onOpen:p,onClose:f,onToggle:g,isControlled:u,getButtonProps:(e={})=>({...e,"aria-expanded":d,"aria-controls":h,onClick:Ng(e.onClick,g)}),getDisclosureProps:(e={})=>({...e,hidden:!d,id:h})}}function QA(e){const t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}var JA=rk((function(e,t){const{htmlSize:n,...r}=e,o=ak("Input",r),i=qM(df(r)),a=bk("chakra-input",e.className);return F.createElement(sk.input,{size:n,...i,__css:o.field,ref:t,className:a})}));JA.displayName="Input",JA.id="Input";var[eI,tI]=lk({name:"InputGroupStylesContext",errorMessage:"useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<InputGroup />\" "}),nI=rk((function(e,t){const n=ak("Input",e),{children:r,className:o,...a}=df(e),s=bk("chakra-input__group",o),l={},c=EM(r),u=n.field;c.forEach((e=>{n&&(u&&"InputLeftElement"===e.type.id&&(l.paddingStart=u.height??u.h),u&&"InputRightElement"===e.type.id&&(l.paddingEnd=u.height??u.h),"InputRightAddon"===e.type.id&&(l.borderEndRadius=0),"InputLeftAddon"===e.type.id&&(l.borderStartRadius=0))}));const d=c.map((t=>{var n,r;const o=QA({size:(null==(n=t.props)?void 0:n.size)||e.size,variant:(null==(r=t.props)?void 0:r.variant)||e.variant});return"Input"!==t.type.id?i.exports.cloneElement(t,o):i.exports.cloneElement(t,Object.assign(o,l,t.props))}));return F.createElement(sk.div,{className:s,ref:t,__css:{width:"100%",display:"flex",position:"relative"},...a},sd(eI,{value:n,children:d}))}));nI.displayName="InputGroup";var rI={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},oI=sk("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),iI=rk((function(e,t){const{placement:n="left",...r}=e,o=rI[n]??{},i=tI();return sd(oI,{ref:t,...r,__css:{...i.addon,...o}})}));iI.displayName="InputAddon";var aI=rk((function(e,t){return sd(iI,{ref:t,placement:"left",...e,className:bk("chakra-input__left-addon",e.className)})}));aI.displayName="InputLeftAddon",aI.id="InputLeftAddon";var sI=rk((function(e,t){return sd(iI,{ref:t,placement:"right",...e,className:bk("chakra-input__right-addon",e.className)})}));sI.displayName="InputRightAddon",sI.id="InputRightAddon";var lI=sk("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),cI=rk((function(e,t){const{placement:n="left",...r}=e,o=tI(),i=o.field,a={["left"===n?"insetStart":"insetEnd"]:"0",width:(null==i?void 0:i.height)??(null==i?void 0:i.h),height:(null==i?void 0:i.height)??(null==i?void 0:i.h),fontSize:null==i?void 0:i.fontSize,...o.element};return sd(lI,{ref:t,__css:a,...r})}));cI.id="InputElement",cI.displayName="InputElement";var uI=rk((function(e,t){const{className:n,...r}=e,o=bk("chakra-input__left-element",n);return sd(cI,{ref:t,placement:"left",className:o,...r})}));uI.id="InputLeftElement",uI.displayName="InputLeftElement";var dI=rk((function(e,t){const{className:n,...r}=e,o=bk("chakra-input__right-element",n);return sd(cI,{ref:t,placement:"right",className:o,...r})}));function hI(e,t){return Array.isArray(e)?e.map((e=>null===e?null:t(e))):function(e){const t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}(e)?Object.keys(e).reduce(((n,r)=>(n[r]=t(e[r]),n)),{}):null!=e?t(e):null}dI.id="InputRightElement",dI.displayName="InputRightElement",Object.freeze(["base","sm","md","lg","xl","2xl"]);var fI=rk((function(e,t){const{ratio:n=4/3,children:r,className:o,...a}=e,s=i.exports.Children.only(r),l=bk("chakra-aspect-ratio",o);return F.createElement(sk.div,{ref:t,position:"relative",className:l,_before:{height:0,content:'""',display:"block",paddingBottom:hI(n,(e=>1/e*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"}},...a},s)}));fI.displayName="AspectRatio";var pI=rk((function(e,t){const n=ik("Badge",e),{className:r,...o}=df(e);return F.createElement(sk.span,{ref:t,className:bk("chakra-badge",e.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...n}})}));pI.displayName="Badge";var gI=sk("div");gI.displayName="Box";var mI=rk((function(e,t){const{size:n,centerContent:r=!0,...o}=e;return sd(gI,{ref:t,boxSize:n,__css:{...r?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})}));mI.displayName="Square";var vI=rk((function(e,t){const{size:n,...r}=e;return sd(mI,{size:n,ref:t,borderRadius:"9999px",...r})}));vI.displayName="Circle";var yI=sk("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});yI.displayName="Center";var bI={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};rk((function(e,t){const{axis:n="both",...r}=e;return F.createElement(sk.div,{ref:t,__css:bI[n],...r,position:"absolute"})}));var xI=rk((function(e,t){const n=ik("Code",e),{className:r,...o}=df(e);return F.createElement(sk.code,{ref:t,className:bk("chakra-code",e.className),...o,__css:{display:"inline-block",...n}})}));xI.displayName="Code";var wI=rk((function(e,t){const{className:n,centerContent:r,...o}=df(e),i=ik("Container",e);return F.createElement(sk.div,{ref:t,className:bk("chakra-container",n),...o,__css:{...i,...r&&{display:"flex",flexDirection:"column",alignItems:"center"}}})}));wI.displayName="Container";var kI=rk((function(e,t){const{borderLeftWidth:n,borderBottomWidth:r,borderTopWidth:o,borderRightWidth:i,borderWidth:a,borderStyle:s,borderColor:l,...c}=ik("Divider",e),{className:u,orientation:d="horizontal",__css:h,...f}=df(e),p={vertical:{borderLeftWidth:n||i||a||"1px",height:"100%"},horizontal:{borderBottomWidth:r||o||a||"1px",width:"100%"}};return F.createElement(sk.hr,{ref:t,"aria-orientation":d,...f,__css:{...c,border:"0",borderColor:l,borderStyle:s,...p[d],...h},className:bk("chakra-divider",u)})}));kI.displayName="Divider";var SI=rk((function(e,t){const{direction:n,align:r,justify:o,wrap:i,basis:a,grow:s,shrink:l,...c}=e,u={display:"flex",flexDirection:n,alignItems:r,justifyContent:o,flexWrap:i,flexBasis:a,flexGrow:s,flexShrink:l};return F.createElement(sk.div,{ref:t,__css:u,...c})}));SI.displayName="Flex";var CI=rk((function(e,t){const{templateAreas:n,gap:r,rowGap:o,columnGap:i,column:a,row:s,autoFlow:l,autoRows:c,templateRows:u,autoColumns:d,templateColumns:h,...f}=e,p={display:"grid",gridTemplateAreas:n,gridGap:r,gridRowGap:o,gridColumnGap:i,gridAutoColumns:d,gridColumn:a,gridRow:s,gridAutoFlow:l,gridAutoRows:c,gridTemplateRows:u,gridTemplateColumns:h};return F.createElement(sk.div,{ref:t,__css:p,...f})}));function _I(e){return hI(e,(e=>"auto"===e?"auto":`span ${e}/span ${e}`))}CI.displayName="Grid";var EI=rk((function(e,t){const{area:n,colSpan:r,colStart:o,colEnd:i,rowEnd:a,rowSpan:s,rowStart:l,...c}=e,u=QA({gridArea:n,gridColumn:_I(r),gridRow:_I(s),gridColumnStart:o,gridColumnEnd:i,gridRowStart:l,gridRowEnd:a});return F.createElement(sk.div,{ref:t,__css:u,...c})}));EI.displayName="GridItem";var LI=rk((function(e,t){const n=ik("Heading",e),{className:r,...o}=df(e);return F.createElement(sk.h2,{ref:t,className:bk("chakra-heading",e.className),...o,__css:n})}));LI.displayName="Heading",rk((function(e,t){const n=ik("Mark",e),r=df(e);return sd(gI,{ref:t,...r,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...n}})}));var PI=rk((function(e,t){const n=ik("Kbd",e),{className:r,...o}=df(e);return F.createElement(sk.kbd,{ref:t,className:bk("chakra-kbd",r),...o,__css:{fontFamily:"mono",...n}})}));PI.displayName="Kbd";var OI=rk((function(e,t){const n=ik("Link",e),{className:r,isExternal:o,...i}=df(e);return F.createElement(sk.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:t,className:bk("chakra-link",r),...i,__css:n})}));OI.displayName="Link",rk((function(e,t){const{isExternal:n,target:r,rel:o,className:i,...a}=e;return F.createElement(sk.a,{...a,ref:t,className:bk("chakra-linkbox__overlay",i),rel:n?"noopener noreferrer":o,target:n?"_blank":r,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})})),rk((function(e,t){const{className:n,...r}=e;return F.createElement(sk.div,{ref:t,position:"relative",...r,className:bk("chakra-linkbox",n),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})}));var[TI,MI]=lk({name:"ListStylesContext",errorMessage:"useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<List />\" "}),AI=rk((function(e,t){const n=ak("List",e),{children:r,styleType:o="none",stylePosition:i,spacing:a,...s}=df(e),l=EM(r),c=a?{"& > *:not(style) ~ *:not(style)":{mt:a}}:{};return F.createElement(TI,{value:n},F.createElement(sk.ul,{ref:t,listStyleType:o,listStylePosition:i,role:"list",__css:{...n.container,...c},...s},l))}));AI.displayName="List",rk(((e,t)=>{const{as:n,...r}=e;return sd(AI,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})})).displayName="OrderedList",rk((function(e,t){const{as:n,...r}=e;return sd(AI,{ref:t,as:"ul",styleType:"initial",marginStart:"1em",...r})})).displayName="UnorderedList";var II=rk((function(e,t){const n=MI();return F.createElement(sk.li,{ref:t,...e,__css:n.item})}));II.displayName="ListItem";var RI=rk((function(e,t){const n=MI();return sd(wk,{ref:t,role:"presentation",...e,__css:n.icon})}));RI.displayName="ListIcon";var NI=rk((function(e,t){const{columns:n,spacingX:r,spacingY:o,spacing:i,minChildWidth:a,...s}=e,l=Zw(),c=a?function(e,t){return hI(e,(e=>{const n=function(e,t,n){const r=Array.isArray(t)?t:[t],o=Array.isArray(n)?n:[n];return n=>{const i=o.filter(Boolean),a=r.map(((t,r)=>"breakpoints"===e?function(e,t,n){if(null==t)return t;const r=t=>{var n,r;return null==(r=null==(n=e.__breakpoints)?void 0:n.asArray)?void 0:r[t]};return r(t)??r(n)??n}(n,t,i[r]??t):function(e,t,n){if(null==t)return t;const r=t=>{var n,r;return null==(r=null==(n=e.__cssMap)?void 0:n[t])?void 0:r.value};return r(t)??r(n)??n}(n,`${e}.${t}`,i[r]??t)));return Array.isArray(t)?a:a[0]}}("sizes",e,function(e){return"number"==typeof e?`${e}px`:e}(e))(t);return null===e?null:`repeat(auto-fit, minmax(${n}, 1fr))`}))}(a,l):hI(n,(e=>null===e?null:`repeat(${e}, minmax(0, 1fr))`));return sd(CI,{ref:t,gap:i,columnGap:r,rowGap:o,templateColumns:c,...s})}));NI.displayName="SimpleGrid";var DI=sk("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});DI.displayName="Spacer";var zI="& > *:not(style) ~ *:not(style)";var BI=e=>F.createElement(sk.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});BI.displayName="StackItem";var jI=rk(((e,t)=>{const{isInline:n,direction:r,align:o,justify:a,spacing:s="0.5rem",wrap:l,children:c,divider:u,className:d,shouldWrapChildren:h,...f}=e,p=n?"row":r??"column",g=i.exports.useMemo((()=>function(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,[zI]:hI(n,(e=>r[e]))}}({direction:p,spacing:s})),[p,s]),m=i.exports.useMemo((()=>function(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{"&":hI(n,(e=>r[e]))}}({spacing:s,direction:p})),[s,p]),v=!!u,y=!h&&!v,b=i.exports.useMemo((()=>{const e=EM(c);return y?e:e.map(((t,n)=>{const r=void 0!==t.key?t.key:n,o=n+1===e.length,a=h?sd(BI,{children:t},r):t;if(!v)return a;const s=i.exports.cloneElement(u,{__css:m}),l=o?null:s;return ld(i.exports.Fragment,{children:[a,l]},r)}))}),[u,m,v,y,h,c]),x=bk("chakra-stack",d);return F.createElement(sk.div,{ref:t,display:"flex",alignItems:o,justifyContent:a,flexDirection:g.flexDirection,flexWrap:l,className:x,__css:v?{}:{[zI]:g[zI]},...f},b)}));jI.displayName="Stack";var FI=rk(((e,t)=>sd(jI,{align:"center",...e,direction:"row",ref:t})));FI.displayName="HStack";var HI=rk(((e,t)=>sd(jI,{align:"center",...e,direction:"column",ref:t})));HI.displayName="VStack";var WI=rk((function(e,t){const n=ik("Text",e),{className:r,align:o,decoration:i,casing:a,...s}=df(e),l=QA({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return F.createElement(sk.p,{ref:t,className:bk("chakra-text",e.className),...l,...s,__css:n})}));function $I(e){return"number"==typeof e?`${e}px`:e}WI.displayName="Text";var UI=rk((function(e,t){const{spacing:n="0.5rem",spacingX:r,spacingY:o,children:a,justify:s,direction:l,align:c,className:u,shouldWrapChildren:d,...h}=e,f=i.exports.useMemo((()=>{const{spacingX:e=n,spacingY:t=n}={spacingX:r,spacingY:o};return{"--chakra-wrap-x-spacing":t=>hI(e,(e=>$I(Cd("space",e)(t)))),"--chakra-wrap-y-spacing":e=>hI(t,(t=>$I(Cd("space",t)(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)"}}}),[n,r,o,s,c,l]),p=i.exports.useMemo((()=>d?i.exports.Children.map(a,((e,t)=>sd(VI,{children:e},t))):a),[a,d]);return F.createElement(sk.div,{ref:t,className:bk("chakra-wrap",u),overflow:"hidden",...h},F.createElement(sk.ul,{className:"chakra-wrap__list",__css:f},p))}));UI.displayName="Wrap";var VI=rk((function(e,t){const{className:n,...r}=e;return F.createElement(sk.li,{ref:t,__css:{display:"flex",alignItems:"flex-start"},className:bk("chakra-wrap__listitem",n),...r})}));VI.displayName="WrapItem";var GI={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]})},qI=()=>{},ZI={document:GI,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:qI,removeEventListener:qI,getComputedStyle:()=>({getPropertyValue:()=>""}),matchMedia:()=>({matches:!1,addListener:qI,removeListener:qI}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)},setTimeout:()=>0,clearTimeout:qI,setInterval:()=>0,clearInterval:qI},YI="undefined"!=typeof window?{window:window,document:document}:{window:ZI,document:GI},XI=i.exports.createContext(YI);function KI(e){const{children:t,environment:n}=e,[r,o]=i.exports.useState(null),[a,s]=i.exports.useState(!1);i.exports.useEffect((()=>s(!0)),[]);const l=i.exports.useMemo((()=>{if(n)return n;const e=null==r?void 0:r.ownerDocument,t=null==r?void 0:r.ownerDocument.defaultView;return e?{document:e,window:t}:YI}),[r,n]);return ld(XI.Provider,{value:l,children:[t,!n&&a&&sd("span",{id:"__chakra_env",hidden:!0,ref:e=>{i.exports.startTransition((()=>{e&&o(e)}))}})]})}XI.displayName="EnvironmentContext",KI.displayName="EnvironmentProvider";function QI(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return"INPUT"!==n&&"TEXTAREA"!==n&&!0!==r}function JI(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:a=!0,onMouseDown:s,onMouseUp:l,onClick:c,onKeyDown:u,onKeyUp:d,tabIndex:h,onMouseOver:f,onMouseLeave:p,...g}=e,[m,v]=i.exports.useState(!0),[y,b]=i.exports.useState(!1),x=function(){const e=i.exports.useRef(new Map),t=e.current,n=i.exports.useCallback(((t,n,r,o)=>{e.current.set(r,{type:n,el:t,options:o}),t.addEventListener(n,r,o)}),[]),r=i.exports.useCallback(((t,n,r,o)=>{t.removeEventListener(n,r,o),e.current.delete(r)}),[]);return i.exports.useEffect((()=>()=>{t.forEach(((e,t)=>{r(e.el,e.type,t,e.options)}))}),[r,t]),{add:n,remove:r}}(),w=m?h:h||0,k=n&&!r,S=i.exports.useCallback((e=>{if(n)return e.stopPropagation(),void e.preventDefault();e.currentTarget.focus(),null==c||c(e)}),[n,c]),C=i.exports.useCallback((e=>{y&&QI(e)&&(e.preventDefault(),e.stopPropagation(),b(!1),x.remove(document,"keyup",C,!1))}),[y,x]),_=i.exports.useCallback((e=>{if(null==u||u(e),n||e.defaultPrevented||e.metaKey)return;if(!QI(e.nativeEvent)||m)return;const t=o&&"Enter"===e.key;if(a&&" "===e.key&&(e.preventDefault(),b(!0)),t){e.preventDefault();e.currentTarget.click()}x.add(document,"keyup",C,!1)}),[n,m,u,o,a,x,C]),E=i.exports.useCallback((e=>{if(null==d||d(e),n||e.defaultPrevented||e.metaKey)return;if(!QI(e.nativeEvent)||m)return;if(a&&" "===e.key){e.preventDefault(),b(!1);e.currentTarget.click()}}),[a,m,n,d]),L=i.exports.useCallback((e=>{0===e.button&&(b(!1),x.remove(document,"mouseup",L,!1))}),[x]),P=i.exports.useCallback((e=>{if(0!==e.button)return;if(n)return e.stopPropagation(),void e.preventDefault();m||b(!0);e.currentTarget.focus({preventScroll:!0}),x.add(document,"mouseup",L,!1),null==s||s(e)}),[n,m,s,x,L]),O=i.exports.useCallback((e=>{0===e.button&&(m||b(!1),null==l||l(e))}),[l,m]),T=i.exports.useCallback((e=>{n?e.preventDefault():null==f||f(e)}),[n,f]),M=i.exports.useCallback((e=>{y&&(e.preventDefault(),b(!1)),null==p||p(e)}),[y,p]),A=ck(t,(e=>{e&&"BUTTON"!==e.tagName&&v(!1)}));return m?{...g,ref:A,type:"button","aria-disabled":k?void 0:n,disabled:k,onClick:S,onMouseDown:s,onMouseUp:l,onKeyUp:d,onKeyDown:u,onMouseOver:f,onMouseLeave:p}:{...g,ref:A,role:"button","data-active":(I=y,I?"":void 0),"aria-disabled":n?"true":void 0,tabIndex:k?void 0:w,onClick:S,onMouseDown:P,onMouseUp:O,onKeyUp:E,onKeyDown:_,onMouseOver:T,onMouseLeave:M};var I}function eR(e){return null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function tR(e){if(!eR(e))return!1;return e instanceof(e.ownerDocument.defaultView??window).HTMLElement}function nR(e){return eR(e)?e.ownerDocument:document}var rR=e=>e.hasAttribute("tabindex");function oR(e){return!(!e.parentElement||!oR(e.parentElement))||e.hidden}function iR(e){if(!tR(e)||oR(e)||function(e){return!0===Boolean(e.getAttribute("disabled"))||!0===Boolean(e.getAttribute("aria-disabled"))}(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const n={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in n?n[t]():!!function(e){const t=e.getAttribute("contenteditable");return"false"!==t&&null!=t}(e)||rR(e)}function aR(e){return!!e&&(tR(e)&&iR(e)&&!(e=>rR(e)&&-1===e.tabIndex)(e))}var sR=["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]"].join();function lR(e){const t=Array.from(e.querySelectorAll(sR));return t.unshift(e),t.filter((e=>iR(e)&&(e=>e.offsetWidth>0&&e.offsetHeight>0)(e)))}function cR(e){const t=e.current;if(!t)return!1;const n=function(e){return nR(e).activeElement}(t);return!!n&&(!t.contains(n)&&!!aR(n))}var uR={preventScroll:!0,shouldFocus:!1};var dR="top",hR="bottom",fR="right",pR="left",gR="auto",mR=[dR,hR,fR,pR],vR="start",yR="end",bR="viewport",xR="popper",wR=mR.reduce((function(e,t){return e.concat([t+"-"+vR,t+"-"+yR])}),[]),kR=[].concat(mR,[gR]).reduce((function(e,t){return e.concat([t,t+"-"+vR,t+"-"+yR])}),[]),SR=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function CR(e){return e?(e.nodeName||"").toLowerCase():null}function _R(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ER(e){return e instanceof _R(e).Element||e instanceof Element}function LR(e){return e instanceof _R(e).HTMLElement||e instanceof HTMLElement}function PR(e){return"undefined"!=typeof ShadowRoot&&(e instanceof _R(e).ShadowRoot||e instanceof ShadowRoot)}const OR={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];LR(o)&&CR(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(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(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});LR(r)&&CR(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function TR(e){return e.split("-")[0]}var MR=Math.max,AR=Math.min,IR=Math.round;function RR(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function NR(){return!/^((?!chrome|android).)*safari/i.test(RR())}function DR(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&LR(e)&&(o=e.offsetWidth>0&&IR(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&IR(r.height)/e.offsetHeight||1);var a=(ER(e)?_R(e):window).visualViewport,s=!NR()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function zR(e){var t=DR(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 BR(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&PR(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function jR(e){return _R(e).getComputedStyle(e)}function FR(e){return["table","td","th"].indexOf(CR(e))>=0}function HR(e){return((ER(e)?e.ownerDocument:e.document)||window.document).documentElement}function WR(e){return"html"===CR(e)?e:e.assignedSlot||e.parentNode||(PR(e)?e.host:null)||HR(e)}function $R(e){return LR(e)&&"fixed"!==jR(e).position?e.offsetParent:null}function UR(e){for(var t=_R(e),n=$R(e);n&&FR(n)&&"static"===jR(n).position;)n=$R(n);return n&&("html"===CR(n)||"body"===CR(n)&&"static"===jR(n).position)?t:n||function(e){var t=/firefox/i.test(RR());if(/Trident/i.test(RR())&&LR(e)&&"fixed"===jR(e).position)return null;var n=WR(e);for(PR(n)&&(n=n.host);LR(n)&&["html","body"].indexOf(CR(n))<0;){var r=jR(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function VR(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function GR(e,t,n){return MR(e,AR(t,n))}function qR(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ZR(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const YR={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=TR(n.placement),l=VR(s),c=[pR,fR].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return qR("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ZR(e,mR))}(o.padding,n),d=zR(i),h="y"===l?dR:pR,f="y"===l?hR:fR,p=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],g=a[l]-n.rects.reference[l],m=UR(i),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=p/2-g/2,b=u[h],x=v-d[c]-u[f],w=v/2-d[c]/2+y,k=GR(b,w,x),S=l;n.modifiersData[r]=((t={})[S]=k,t.centerOffset=k-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&BR(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function XR(e){return e.split("-")[1]}var KR={top:"auto",right:"auto",bottom:"auto",left:"auto"};function QR(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=a.x,f=void 0===h?0:h,p=a.y,g=void 0===p?0:p,m="function"==typeof u?u({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=pR,x=dR,w=window;if(c){var k=UR(n),S="clientHeight",C="clientWidth";if(k===_R(n)&&"static"!==jR(k=HR(n)).position&&"absolute"===s&&(S="scrollHeight",C="scrollWidth"),o===dR||(o===pR||o===fR)&&i===yR)x=hR,g-=(d&&k===w&&w.visualViewport?w.visualViewport.height:k[S])-r.height,g*=l?1:-1;if(o===pR||(o===dR||o===hR)&&i===yR)b=fR,f-=(d&&k===w&&w.visualViewport?w.visualViewport.width:k[C])-r.width,f*=l?1:-1}var _,E=Object.assign({position:s},c&&KR),L=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:IR(t*r)/r||0,y:IR(n*r)/r||0}}({x:f,y:g}):{x:f,y:g};return f=L.x,g=L.y,l?Object.assign({},E,((_={})[x]=y?"0":"",_[b]=v?"0":"",_.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",_)):Object.assign({},E,((t={})[x]=y?g+"px":"",t[b]=v?f+"px":"",t.transform="",t))}const JR={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:TR(t.placement),variation:XR(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,QR(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,QR(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})},data:{}};var eN={passive:!0};const tN={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=_R(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,eN)})),s&&l.addEventListener("resize",n.update,eN),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,eN)})),s&&l.removeEventListener("resize",n.update,eN)}},data:{}};var nN={left:"right",right:"left",bottom:"top",top:"bottom"};function rN(e){return e.replace(/left|right|bottom|top/g,(function(e){return nN[e]}))}var oN={start:"end",end:"start"};function iN(e){return e.replace(/start|end/g,(function(e){return oN[e]}))}function aN(e){var t=_R(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function sN(e){return DR(HR(e)).left+aN(e).scrollLeft}function lN(e){var t=jR(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function cN(e){return["html","body","#document"].indexOf(CR(e))>=0?e.ownerDocument.body:LR(e)&&lN(e)?e:cN(WR(e))}function uN(e,t){var n;void 0===t&&(t=[]);var r=cN(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=_R(r),a=o?[i].concat(i.visualViewport||[],lN(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(uN(WR(a)))}function dN(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function hN(e,t,n){return t===bR?dN(function(e,t){var n=_R(e),r=HR(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=NR();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+sN(e),y:l}}(e,n)):ER(t)?function(e,t){var n=DR(e,!1,"fixed"===t);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}(t,n):dN(function(e){var t,n=HR(e),r=aN(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=MR(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=MR(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+sN(e),l=-r.scrollTop;return"rtl"===jR(o||n).direction&&(s+=MR(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(HR(e)))}function fN(e,t,n,r){var o="clippingParents"===t?function(e){var t=uN(WR(e)),n=["absolute","fixed"].indexOf(jR(e).position)>=0&&LR(e)?UR(e):e;return ER(n)?t.filter((function(e){return ER(e)&&BR(e,n)&&"body"!==CR(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=hN(e,n,r);return t.top=MR(o.top,t.top),t.right=AR(o.right,t.right),t.bottom=AR(o.bottom,t.bottom),t.left=MR(o.left,t.left),t}),hN(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 pN(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?TR(o):null,a=o?XR(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case dR:t={x:s,y:n.y-r.height};break;case hR:t={x:s,y:n.y+n.height};break;case fR:t={x:n.x+n.width,y:l};break;case pR:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?VR(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case vR:t[c]=t[c]-(n[u]/2-r[u]/2);break;case yR:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function gN(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?bR:c,d=n.elementContext,h=void 0===d?xR:d,f=n.altBoundary,p=void 0!==f&&f,g=n.padding,m=void 0===g?0:g,v=qR("number"!=typeof m?m:ZR(m,mR)),y=h===xR?"reference":xR,b=e.rects.popper,x=e.elements[p?y:h],w=fN(ER(x)?x:x.contextElement||HR(e.elements.popper),l,u,a),k=DR(e.elements.reference),S=pN({reference:k,element:b,strategy:"absolute",placement:o}),C=dN(Object.assign({},b,S)),_=h===xR?C:k,E={top:w.top-_.top+v.top,bottom:_.bottom-w.bottom+v.bottom,left:w.left-_.left+v.left,right:_.right-w.right+v.right},L=e.modifiersData.offset;if(h===xR&&L){var P=L[o];Object.keys(E).forEach((function(e){var t=[fR,hR].indexOf(e)>=0?1:-1,n=[dR,hR].indexOf(e)>=0?"y":"x";E[e]+=P[n]*t}))}return E}function mN(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?kR:l,u=XR(r),d=u?s?wR:wR.filter((function(e){return XR(e)===u})):mR,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var f=h.reduce((function(t,n){return t[n]=gN(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[TR(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}const vN={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,g=n.allowedAutoPlacements,m=t.options.placement,v=TR(m),y=l||(v===m||!p?[rN(m)]:function(e){if(TR(e)===gR)return[];var t=rN(e);return[iN(e),t,iN(t)]}(m)),b=[m].concat(y).reduce((function(e,n){return e.concat(TR(n)===gR?mN(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):n)}),[]),x=t.rects.reference,w=t.rects.popper,k=new Map,S=!0,C=b[0],_=0;_<b.length;_++){var E=b[_],L=TR(E),P=XR(E)===vR,O=[dR,hR].indexOf(L)>=0,T=O?"width":"height",M=gN(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),A=O?P?fR:pR:P?hR:dR;x[T]>w[T]&&(A=rN(A));var I=rN(A),R=[];if(i&&R.push(M[L]<=0),s&&R.push(M[A]<=0,M[I]<=0),R.every((function(e){return e}))){C=E,S=!1;break}k.set(E,R)}if(S)for(var N=function(e){var t=b.find((function(t){var n=k.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},D=p?3:1;D>0;D--){if("break"===N(D))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function yN(e,t,n){return void 0===n&&(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 bN(e){return[dR,fR,hR,pR].some((function(t){return e[t]>=0}))}const xN={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=gN(t,{elementContext:"reference"}),s=gN(t,{altBoundary:!0}),l=yN(a,r),c=yN(s,o,i),u=bN(l),d=bN(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const wN={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=kR.reduce((function(e,n){return e[n]=function(e,t,n){var r=TR(e),o=[pR,dR].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[pR,fR].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};const kN={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=pN({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const SN={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=void 0===h||h,p=n.tetherOffset,g=void 0===p?0:p,m=gN(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=TR(t.placement),y=XR(t.placement),b=!y,x=VR(v),w="x"===x?"y":"x",k=t.modifiersData.popperOffsets,S=t.rects.reference,C=t.rects.popper,_="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,E="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(k){if(i){var O,T="y"===x?dR:pR,M="y"===x?hR:fR,A="y"===x?"height":"width",I=k[x],R=I+m[T],N=I-m[M],D=f?-C[A]/2:0,z=y===vR?S[A]:C[A],B=y===vR?-C[A]:-S[A],j=t.elements.arrow,F=f&&j?zR(j):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=H[T],$=H[M],U=GR(0,S[A],F[A]),V=b?S[A]/2-D-U-W-E.mainAxis:z-U-W-E.mainAxis,G=b?-S[A]/2+D+U+$+E.mainAxis:B+U+$+E.mainAxis,q=t.elements.arrow&&UR(t.elements.arrow),Z=q?"y"===x?q.clientTop||0:q.clientLeft||0:0,Y=null!=(O=null==L?void 0:L[x])?O:0,X=I+G-Y,K=GR(f?AR(R,I+V-Y-Z):R,I,f?MR(N,X):N);k[x]=K,P[x]=K-I}if(s){var Q,J="x"===x?dR:pR,ee="x"===x?hR:fR,te=k[w],ne="y"===w?"height":"width",re=te+m[J],oe=te-m[ee],ie=-1!==[dR,pR].indexOf(v),ae=null!=(Q=null==L?void 0:L[w])?Q:0,se=ie?re:te-S[ne]-C[ne]-ae+E.altAxis,le=ie?te+S[ne]+C[ne]-ae-E.altAxis:oe,ce=f&&ie?function(e,t,n){var r=GR(e,t,n);return r>n?n:r}(se,te,le):GR(f?se:re,te,f?le:oe);k[w]=ce,P[w]=ce-te}t.modifiersData[r]=P}},requiresIfExists:["offset"]};function CN(e,t,n){void 0===n&&(n=!1);var r=LR(t),o=LR(t)&&function(e){var t=e.getBoundingClientRect(),n=IR(t.width)/e.offsetWidth||1,r=IR(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=HR(t),a=DR(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==CR(t)||lN(i))&&(s=function(e){return e!==_R(e)&&LR(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:aN(e);var t}(t)),LR(t)?((l=DR(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=sN(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function _N(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function EN(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var LN={placement:"bottom",modifiers:[],strategy:"absolute"};function PN(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ON(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?LN:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},LN,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:o,setOptions:function(n){var s="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:ER(e)?uN(e):e.contextElement?uN(e.contextElement):[],popper:uN(t)};var u,d,h=function(e){var t=_N(e);return SR.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((u=[].concat(r,o.options.modifiers),d=u.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(d).map((function(e){return d[e]}))));return o.orderedModifiers=h.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var s=i({state:o,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}})),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(PN(t,n)){o.rects={reference:CN(t,UR(n),"fixed"===o.options.strategy),popper:zR(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,u=void 0===c?{}:c,d=i.name;"function"==typeof a&&(o=a({state:o,options:u,name:d,instance:l})||o)}else o.reset=!1,r=-1}}},update:EN((function(){return new Promise((function(e){l.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!PN(e,t))return l;function c(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var TN=ON({defaultModifiers:[tN,kN,JR,OR,wN,vN,SN,YR,xN]}),MN=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),AN={arrowShadowColor:MN("--popper-arrow-shadow-color"),arrowSize:MN("--popper-arrow-size","8px"),arrowSizeHalf:MN("--popper-arrow-size-half"),arrowBg:MN("--popper-arrow-bg"),transformOrigin:MN("--popper-transform-origin"),arrowOffset:MN("--popper-arrow-offset")};var IN={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"},RN={scroll:!0,resize:!0};function NN(e){let t;return t="object"==typeof e?{enabled:!0,options:{...RN,...e}}:{enabled:e,options:RN},t}var DN={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`}},zN={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{BN(e)},effect:({state:e})=>()=>{BN(e)}},BN=e=>{var t;e.elements.popper.style.setProperty(AN.transformOrigin.var,(t=e.placement,IN[t]))},jN={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{FN(e)}},FN=e=>{var t;if(!e.placement)return;const n=HN(e.placement);if((null==(t=e.elements)?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:AN.arrowSize.varRef,height:AN.arrowSize.varRef,zIndex:-1});const t={[AN.arrowSizeHalf.var]:`calc(${AN.arrowSize.varRef} / 2)`,[AN.arrowOffset.var]:`calc(${AN.arrowSizeHalf.varRef} * -1)`};for(const n in t)e.elements.arrow.style.setProperty(n,t[n])}},HN=e=>e.startsWith("top")?{property:"bottom",value:AN.arrowOffset.varRef}:e.startsWith("bottom")?{property:"top",value:AN.arrowOffset.varRef}:e.startsWith("left")?{property:"right",value:AN.arrowOffset.varRef}:e.startsWith("right")?{property:"left",value:AN.arrowOffset.varRef}:void 0,WN={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{$N(e)},effect:({state:e})=>()=>{$N(e)}},$N=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");var n;t&&Object.assign(t.style,{transform:"rotate(45deg)",background:AN.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:(n=e.placement,n.includes("top")?"1px 1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("bottom")?"-1px -1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("right")?"-1px 1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("left")?"1px -1px 1px 0 var(--popper-arrow-shadow-color)":void 0)})},UN={"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"}},VN={"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 GN(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:o="absolute",arrowPadding:a=8,eventListeners:s=!0,offset:l,gutter:c=8,flip:u=!0,boundary:d="clippingParents",preventOverflow:h=!0,matchWidth:f,direction:p="ltr"}=e,g=i.exports.useRef(null),m=i.exports.useRef(null),v=i.exports.useRef(null),y=function(e,t="ltr"){var n;const r=(null==(n=UN[e])?void 0:n[t])||e;return"ltr"===t?r:VN[e]??r}(r,p),b=i.exports.useRef((()=>{})),x=i.exports.useCallback((()=>{var e;t&&g.current&&m.current&&(null==(e=b.current)||e.call(b),v.current=TN(g.current,m.current,{placement:y,modifiers:[WN,jN,zN,{...DN,enabled:!!f},{name:"eventListeners",...NN(s)},{name:"arrow",options:{padding:a}},{name:"offset",options:{offset:l??[0,c]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!h,options:{boundary:d}},...n??[]],strategy:o}),v.current.forceUpdate(),b.current=v.current.destroy)}),[y,t,n,f,s,a,l,c,u,h,d,o]);i.exports.useEffect((()=>()=>{var e;g.current||m.current||(null==(e=v.current)||e.destroy(),v.current=null)}),[]);const w=i.exports.useCallback((e=>{g.current=e,x()}),[x]),k=i.exports.useCallback(((e={},t=null)=>({...e,ref:ck(w,t)})),[w]),S=i.exports.useCallback((e=>{m.current=e,x()}),[x]),C=i.exports.useCallback(((e={},t=null)=>({...e,ref:ck(S,t),style:{...e.style,position:o,minWidth:f?void 0:"max-content",inset:"0 auto auto 0"}})),[o,S,f]),_=i.exports.useCallback(((e={},t=null)=>{const{size:n,shadowColor:r,bg:o,style:i,...a}=e;return{...a,ref:t,"data-popper-arrow":"",style:qN(e)}}),[]),E=i.exports.useCallback(((e={},t=null)=>({...e,ref:t,"data-popper-arrow-inner":""})),[]);return{update(){var e;null==(e=v.current)||e.update()},forceUpdate(){var e;null==(e=v.current)||e.forceUpdate()},transformOrigin:AN.transformOrigin.varRef,referenceRef:w,popperRef:S,getPopperProps:C,getArrowProps:_,getArrowInnerProps:E,getReferenceProps:k}}function qN(e){const{size:t,shadowColor:n,bg:r,style:o}=e,i={...o,position:"absolute"};return t&&(i["--popper-arrow-size"]=t),n&&(i["--popper-arrow-shadow-color"]=n),r&&(i["--popper-arrow-bg"]=r),i}function ZN(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,a=Sk(n),s=Sk(t),[l,c]=i.exports.useState(e.defaultIsOpen||!1),u=void 0!==r?r:l,d=void 0!==r,h=i.exports.useId(),f=o??`disclosure-${h}`,p=i.exports.useCallback((()=>{d||c(!1),null==s||s()}),[d,s]),g=i.exports.useCallback((()=>{d||c(!0),null==a||a()}),[d,a]),m=i.exports.useCallback((()=>{u?p():g()}),[u,g,p]);return{isOpen:u,onOpen:g,onClose:p,onToggle:m,isControlled:d,getButtonProps:function(e={}){return{...e,"aria-expanded":u,"aria-controls":f,onClick(t){var n;null==(n=e.onClick)||n.call(e,t),m()}}},getDisclosureProps:function(e={}){return{...e,hidden:!u,id:f}}}}function YN(e){const{isOpen:t,ref:n}=e,[r,o]=i.exports.useState(t),[a,s]=i.exports.useState(!1);i.exports.useEffect((()=>{a||(o(t),s(!0))}),[t,a,r]),VA((()=>n.current),"animationend",(()=>{o(t)}));return{present:!(!t&&!r),onComplete(){var e;const t=function(e){var t;return(null==(t=nR(e))?void 0:t.defaultView)??window}(n.current),r=new t.CustomEvent("animationend",{bubbles:!0});null==(e=n.current)||e.dispatchEvent(r)}}}function XN(e){const{wasSelected:t,enabled:n,isSelected:r,mode:o="unmount"}=e;return!n||(!!r||!("keepMounted"!==o||!t))}var[KN,QN]=lk({strict:!1,name:"PortalManagerContext"});function JN(e){const{children:t,zIndex:n}=e;return sd(KN,{value:{zIndex:n},children:t})}JN.displayName="PortalManager";var[eD,tD]=lk({strict:!1,name:"PortalContext"}),nD="chakra-portal",rD=e=>sd("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),oD=e=>{const{appendToParentPortal:t,children:n}=e,[r,o]=i.exports.useState(null),a=i.exports.useRef(null),[,s]=i.exports.useState({});i.exports.useEffect((()=>s({})),[]);const l=tD(),c=QN();Xu((()=>{if(!r)return;const e=r.ownerDocument,n=t?l??e.body:e.body;if(!n)return;a.current=e.createElement("div"),a.current.className=nD,n.appendChild(a.current),s({});const o=a.current;return()=>{n.contains(o)&&n.removeChild(o)}}),[r]);const u=(null==c?void 0:c.zIndex)?sd(rD,{zIndex:null==c?void 0:c.zIndex,children:n}):n;return a.current?$.exports.createPortal(sd(eD,{value:a.current,children:u}),a.current):sd("span",{ref:e=>{e&&o(e)}})},iD=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,o=n.current,a=o??("undefined"!=typeof window?document.body:void 0),s=i.exports.useMemo((()=>{const e=null==o?void 0:o.ownerDocument.createElement("div");return e&&(e.className=nD),e}),[o]),[,l]=i.exports.useState({});return Xu((()=>l({})),[]),Xu((()=>{if(s&&a)return a.appendChild(s),()=>{a.removeChild(s)}}),[s,a]),a&&s?$.exports.createPortal(sd(eD,{value:r?s:null,children:t}),s):null};function aD(e){const{containerRef:t,...n}=e;return t?sd(iD,{containerRef:t,...n}):sd(oD,{...n})}aD.defaultProps={appendToParentPortal:!0},aD.className=nD,aD.selector=".chakra-portal",aD.displayName="Portal";var sD=new WeakMap,lD=new WeakMap,cD={},uD=0,dD=function(e){return e&&(e.host||dD(e.parentNode))},hD=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=dD(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);cD[n]||(cD[n]=new WeakMap);var i=cD[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(sD.get(e)||0)+1,c=(i.get(e)||0)+1;sD.set(e,l),i.set(e,c),a.push(e),1===l&&o&&lD.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}}))};return u(t),s.clear(),uD++,function(){a.forEach((function(e){var t=sD.get(e)-1,o=i.get(e)-1;sD.set(e,t),i.set(e,o),t||(lD.has(e)||e.removeAttribute(r),lD.delete(e)),o||e.removeAttribute(n)})),--uD||(sD=new WeakMap,sD=new WeakMap,lD=new WeakMap,cD={})}},fD=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),hD(r,o,n,"aria-hidden")):function(){return null}};function pD(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var gD={exports:{}};function mD(){}function vD(){}vD.resetWarningCache=mD;gD.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=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 a.name="Invariant Violation",a}}function t(){return e}e.isRequired=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:vD,resetWarningCache:mD};return n.PropTypes=n,n}();var yD="data-focus-lock",bD="data-focus-lock-disabled";function xD(e,t){return n=t||null,r=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},o=i.exports.useState((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0],o.callback=r,o.facade;var n,r,o}var wD={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function kD(e){return e}function SD(e,t){void 0===t&&(t=kD);var n=[],r=!1,o={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(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return o}function CD(e,t){return void 0===t&&(t=kD),SD(e,t)}function _D(e){void 0===e&&(e={});var t=SD(null);return t.options=hT({async:!0,ssr:!1},e),t}var ED=function(e){var t=e.sideCar,n=fT(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 sd(r,{...hT({},n)})};ED.isSideCarExport=!0;var LD=CD({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),PD=CD(),OD=CD(),TD=_D({async:!0}),MD=[],AD=i.exports.forwardRef((function(e,t){var n,r=i.exports.useState(),o=r[0],a=r[1],s=i.exports.useRef(),l=i.exports.useRef(!1),c=i.exports.useRef(null),u=e.children,d=e.disabled,h=e.noFocusGuards,f=e.persistentFocus,p=e.crossFrame,g=e.autoFocus;e.allowTextSelection;var m=e.group,v=e.className,y=e.whiteList,b=e.hasPositiveIndices,x=e.shards,w=void 0===x?MD:x,k=e.as,S=void 0===k?"div":k,C=e.lockProps,_=void 0===C?{}:C,E=e.sideCar,L=e.returnFocus,P=e.focusOptions,O=e.onActivation,T=e.onDeactivation,M=i.exports.useState({})[0],A=i.exports.useCallback((function(){c.current=c.current||document&&document.activeElement,s.current&&O&&O(s.current),l.current=!0}),[O]),I=i.exports.useCallback((function(){l.current=!1,T&&T(s.current)}),[T]);i.exports.useEffect((function(){d||(c.current=null)}),[]);var R=i.exports.useCallback((function(e){var t=c.current;if(t&&t.focus){var n="function"==typeof L?L(t):L;if(n){var r="object"==typeof n?n:void 0;c.current=null,e?Promise.resolve().then((function(){return t.focus(r)})):t.focus(r)}}}),[L]),N=i.exports.useCallback((function(e){l.current&&LD.useMedium(e)}),[]),D=PD.useMedium,z=i.exports.useCallback((function(e){s.current!==e&&(s.current=e,a(e))}),[]),B=mp(((n={})[bD]=d&&"disabled",n[yD]=m,n),_),j=!0!==h,F=j&&"tail"!==h,H=xD([t,z]);return ld(ad,{children:[j&&[sd("div",{"data-focus-guard":!0,tabIndex:d?-1:0,style:wD},"guard-first"),b?sd("div",{"data-focus-guard":!0,tabIndex:d?-1:1,style:wD},"guard-nearest"):null],!d&&sd(E,{id:M,sideCar:TD,observed:o,disabled:d,persistentFocus:f,crossFrame:p,autoFocus:g,whiteList:y,shards:w,onActivation:A,onDeactivation:I,returnFocus:R,focusOptions:P}),sd(S,{ref:H,...B,className:v,onBlur:D,onFocus:N,children:u}),F&&sd("div",{"data-focus-guard":!0,tabIndex:d?-1:0,style:wD})]})}));AD.propTypes={},AD.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 ID=AD;function RD(e,t){return RD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},RD(e,t)}function ND(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,RD(e,t)}function DD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zD=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},BD=function(e){return Array.isArray(e)?e:[e]},jD=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},FD=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},HD=function(e,t){return!e||FD(e)||!function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!(!t||!t.getPropertyValue||"none"!==t.getPropertyValue("display")&&"hidden"!==t.getPropertyValue("visibility"))}(e)&&t(jD(e))},WD=function(e,t){var n=e.get(t);if(void 0!==n)return n;var r=HD(t,WD.bind(void 0,e));return e.set(t,r),r},$D=function(e,t){var n=e.get(t);if(void 0!==n)return n;var r=function(e,t){return!(e&&!FD(e))||!!qD(e)&&t(jD(e))}(t,$D.bind(void 0,e));return e.set(t,r),r},UD=function(e){return e.dataset},VD=function(e){return"INPUT"===e.tagName},GD=function(e){return VD(e)&&"radio"===e.type},qD=function(e){var t=e.getAttribute("data-no-autofocus");return![!0,"true",""].includes(t)},ZD=function(e){var t;return Boolean(e&&(null===(t=UD(e))||void 0===t?void 0:t.focusGuard))},YD=function(e){return!ZD(e)},XD=function(e){return Boolean(e)},KD=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},QD=function(e,t,n){return zD(e).map((function(e,t){return{node:e,index:t,tabIndex:n&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!t||e.tabIndex>=0})).sort(KD)},JD=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),ez="".concat(JD,", [data-focus-guard]"),tz=function(e,t){var n;return zD((null===(n=e.shadowRoot)||void 0===n?void 0:n.children)||e.children).reduce((function(e,n){return e.concat(n.matches(t?ez:JD)?[n]:[],tz(n))}),[])},nz=function(e,t){return e.reduce((function(e,n){return e.concat(tz(n,t),n.parentNode?zD(n.parentNode.querySelectorAll(JD)).filter((function(e){return e===n})):[])}),[])},rz=function(e,t){return zD(e).filter((function(e){return WD(t,e)})).filter((function(e){return function(e){return!((VD(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)}))},oz=function(e,t){return void 0===t&&(t=new Map),zD(e).filter((function(e){return $D(t,e)}))},iz=function(e,t,n){return QD(rz(nz(e,n),t),!0,n)},az=function(e,t){return QD(rz(nz(e),t),!1)},sz=function(e,t){return rz((n=e.querySelectorAll("[".concat("data-autofocus-inside","]")),zD(n).map((function(e){return nz([e])})).reduce((function(e,t){return e.concat(t)}),[])),t);var n},lz=function(e,t){return e.shadowRoot?lz(e.shadowRoot,t):!(void 0===Object.getPrototypeOf(e).contains||!Object.getPrototypeOf(e).contains.call(e,t))||zD(e.children).some((function(e){return lz(e,t)}))},cz=function(e){return e.parentNode?cz(e.parentNode):e},uz=function(e){return BD(e).filter(Boolean).reduce((function(e,t){var n=t.getAttribute(yD);return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var o=r+1;o<n;o+=1){var i=e[r].compareDocumentPosition(e[o]);(i&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}(zD(cz(t).querySelectorAll("[".concat(yD,'="').concat(n,'"]:not([').concat(bD,'="disabled"])')))):[t]),e}),[])},dz=function(e){return e.activeElement?e.activeElement.shadowRoot?dz(e.activeElement.shadowRoot):e.activeElement:void 0},hz=function(){return document.activeElement?document.activeElement.shadowRoot?dz(document.activeElement.shadowRoot):document.activeElement:void 0},fz=function(e){return Boolean(zD(e.querySelectorAll("iframe")).some((function(e){return function(e){return e===document.activeElement}(e)})))},pz=function(e){var t=document&&hz();return!(!t||t.dataset&&t.dataset.focusGuard)&&uz(e).some((function(e){return lz(e,t)||fz(e)}))},gz=function(e,t){return GD(e)&&e.name?function(e,t){return t.filter(GD).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},mz=function(e){return e[0]&&e.length>1?gz(e[0],e):e[0]},vz=function(e,t){return e.length>1?e.indexOf(gz(e[t],e)):t},yz="NEW_FOCUS",bz=function(e,t,n,r){var o=e.length,i=e[0],a=e[o-1],s=ZD(n);if(!(n&&e.indexOf(n)>=0)){var l,c,u=void 0!==n?t.indexOf(n):-1,d=r?t.indexOf(r):u,h=r?e.indexOf(r):-1,f=u-d,p=t.indexOf(i),g=t.indexOf(a),m=(l=t,c=new Set,l.forEach((function(e){return c.add(gz(e,l))})),l.filter((function(e){return c.has(e)}))),v=(void 0!==n?m.indexOf(n):-1)-(r?m.indexOf(r):u),y=vz(e,0),b=vz(e,o-1);return-1===u||-1===h?yz:!f&&h>=0?h:u<=p&&s&&Math.abs(f)>1?b:u>=g&&s&&Math.abs(f)>1?y:f&&Math.abs(v)>1?h:u<=p?b:u>g?y:f?Math.abs(f)>1?h:(o+h+f)%o:void 0}},xz=function(e,t,n){var r,o=e.map((function(e){return e.node})),i=oz(o.filter((r=n,function(e){var t,n=null===(t=UD(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==n&&"false"!==n||r.indexOf(e)>=0})));return i&&i.length?mz(i):mz(oz(t))},wz=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&wz(e.parentNode.host||e.parentNode,t),t},kz=function(e,t){for(var n=wz(e),r=wz(t),o=0;o<n.length;o+=1){var i=n[o];if(r.indexOf(i)>=0)return i}return!1},Sz=function(e,t,n){var r=BD(e),o=BD(t),i=r[0],a=!1;return o.filter(Boolean).forEach((function(e){a=kz(a||e,e)||a,n.filter(Boolean).forEach((function(e){var t=kz(i,e);t&&(a=!a||lz(t,a)?t:kz(t,a))}))})),a},Cz=function(e,t){return e.reduce((function(e,n){return e.concat(sz(n,t))}),[])},_z=function(e,t){var n=document&&hz(),r=uz(e).filter(YD),o=Sz(n||e,e,r),i=new Map,a=az(r,i),s=iz(r,i).filter((function(e){var t=e.node;return YD(t)}));if(s[0]||(s=a)[0]){var l=az([o],i).map((function(e){return e.node})),c=function(e,t){var n=new Map;return t.forEach((function(e){return n.set(e.node,e)})),e.map((function(e){return n.get(e)})).filter(XD)}(l,s),u=c.map((function(e){return e.node})),d=bz(u,l,n,t);return d===yz?{node:xz(a,u,Cz(r,i))}:void 0===d?d:c[d]}},Ez=0,Lz=!1;const Pz=function(e,t,n){void 0===n&&(n={});var r,o,i=_z(e,t);if(!Lz&&i){if(Ez>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Lz=!0,void setTimeout((function(){Lz=!1}),1);Ez++,r=i.node,o=n.focusOptions,"focus"in r&&r.focus(o),"contentWindow"in r&&r.contentWindow&&r.contentWindow.focus(),Ez--}};function Oz(e){var t=window.setImmediate;void 0!==t?t(e):setTimeout(e,1)}var Tz=function(){return document&&document.activeElement===document.body||!!(e=document&&hz())&&zD(document.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(t){return lz(t,e)}));var e},Mz=null,Az=null,Iz=null,Rz=!1,Nz=function(){return!0};function Dz(e,t,n,r){var o=null,i=e;do{var a=r[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else{if(!a.lockItem)break;if(i!==e)return;o=null}}while((i+=n)!==t);o&&(o.node.tabIndex=0)}var zz=function(e){return e&&"current"in e?e.current:e},Bz=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},jz=function(){var e,t,n,r,o,i,a,s=!1;if(Mz){var l=Mz,c=l.observed,u=l.persistentFocus,d=l.autoFocus,h=l.shards,f=l.crossFrame,p=l.focusOptions,g=c||Iz&&Iz.portaledElement,m=document&&document.activeElement;if(g){var v=[g].concat(h.map(zz).filter(Boolean));if(m&&!function(e){return(Mz.whiteList||Nz)(e)}(m)||(u||(f?Boolean(Rz):"meanwhile"===Rz)||!Tz()||!Az&&d)&&(g&&!(pz(v)||m&&function(e,t){return t.some((function(t){return Bz(e,t,t)}))}(m,v)||(a=m,Iz&&Iz.portaledElement===a))&&(document&&!Az&&m&&!d?(m.blur&&m.blur(),document.body.focus()):(s=Pz(v,Az,{focusOptions:p}),Iz={})),Rz=!1,Az=document&&document.activeElement),document){var y=document&&document.activeElement,b=(t=uz(e=v).filter(YD),n=Sz(e,e,t),r=new Map,o=iz([n],r,!0),i=iz(t,r).filter((function(e){var t=e.node;return YD(t)})).map((function(e){return e.node})),o.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:i.indexOf(t)>=0,guard:ZD(t)}}))),x=b.map((function(e){return e.node})).indexOf(y);x>-1&&(b.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),Dz(x,b.length,1,b),Dz(x,-1,-1,b))}}}return s},Fz=function(e){jz()&&e&&(e.stopPropagation(),e.preventDefault())},Hz=function(){return Oz(jz)},Wz=function(){Rz="just",setTimeout((function(){Rz="meanwhile"}),0)};LD.assignSyncMedium((function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(Iz={observerNode:n,portaledElement:t})})),PD.assignMedium(Hz),OD.assignMedium((function(e){return e({moveFocusInside:Pz,focusInside:pz})}));const $z=function(e,t){return function(n){var r,o=[];function a(){r=e(o.map((function(e){return e.props}))),t(r)}var s=function(e){function t(){return e.apply(this,arguments)||this}ND(t,e),t.peek=function(){return r};var i=t.prototype;return i.componentDidMount=function(){o.push(this),a()},i.componentDidUpdate=function(){a()},i.componentWillUnmount=function(){var e=o.indexOf(this);o.splice(e,1),a()},i.render=function(){return sd(n,{...this.props})},t}(i.exports.PureComponent);return DD(s,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(n)+")"),s}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!Mz&&(document.addEventListener("focusin",Fz),document.addEventListener("focusout",Hz),window.addEventListener("blur",Wz));var n=Mz,r=n&&t&&t.id===n.id;Mz=t,n&&!r&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?(Az=null,r&&n.observed===t.observed||t.onActivation(),jz(),Oz(jz)):(document.removeEventListener("focusin",Fz),document.removeEventListener("focusout",Hz),window.removeEventListener("blur",Wz),Az=null)}))((function(){return null}));var Uz=i.exports.forwardRef((function(e,t){return sd(ID,{sideCar:$z,ref:t,...e})})),Vz=ID.propTypes||{};Vz.sideCar,pD(Vz,["sideCar"]),Uz.propTypes={};const Gz=Uz;var qz=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:o,children:a,isDisabled:s,autoFocus:l,persistentFocus:c,lockFocusAcrossFrames:u}=e,d=i.exports.useCallback((()=>{if(null==t?void 0:t.current)t.current.focus();else if(null==r?void 0:r.current){0===lR(r.current).length&&requestAnimationFrame((()=>{var e;null==(e=r.current)||e.focus()}))}}),[t,r]),h=i.exports.useCallback((()=>{var e;null==(e=null==n?void 0:n.current)||e.focus()}),[n]);return sd(Gz,{crossFrame:u,persistentFocus:c,autoFocus:l,disabled:s,onActivation:d,onDeactivation:h,returnFocus:o&&!n,children:a})};qz.displayName="FocusLock";var Zz="right-scroll-bar-position",Yz="width-before-scroll-bar",Xz=_D(),Kz=function(){},Qz=i.exports.forwardRef((function(e,t){var n=i.exports.useRef(null),r=i.exports.useState({onScrollCapture:Kz,onWheelCapture:Kz,onTouchMoveCapture:Kz}),o=r[0],a=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,p=e.noIsolation,g=e.inert,m=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,b=fT(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=f,w=xD([n,t]),k=hT(hT({},b),o);return ld(ad,{children:[d&&sd(x,{sideCar:Xz,removeScrollBar:u,shards:h,noIsolation:p,inert:g,setCallbacks:a,allowPinchZoom:!!m,lockRef:n}),s?i.exports.cloneElement(i.exports.Children.only(l),hT(hT({},k),{ref:w})):sd(y,{...hT({},k,{className:c,ref:w}),children:l})]})}));Qz.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Qz.classNames={fullWidth:Yz,zeroRight:Zz};function Jz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var eB=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=Jz())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),r=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tB=function(){var e,t=(e=eB(),function(t,n){i.exports.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},nB={left:0,top:0,right:0,gap:0},rB=function(e){return parseInt(e||"",10)||0},oB=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return nB;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[rB(n),rB(r),rB(o)]}(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])}},iB=tB(),aB=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Zz," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Yz," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Zz," .").concat(Zz," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Yz," .").concat(Yz," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},sB=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r,a=i.exports.useMemo((function(){return oB(o)}),[o]);return sd(iB,{styles:aB(a,!t,o,n?"":"!important")})},lB=!1;if("undefined"!=typeof window)try{var cB=Object.defineProperty({},"passive",{get:function(){return lB=!0,!0}});window.addEventListener("test",cB,cB),window.removeEventListener("test",cB,cB)}catch($le){lB=!1}var uB=!!lB&&{passive:!1},dB=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},hB=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),fB(e,n)){var r=pB(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},fB=function(e,t){return"v"===e?function(e){return dB(e,"overflowY")}(t):function(e){return dB(e,"overflowX")}(t)},pB=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},gB=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mB=function(e){return[e.deltaX,e.deltaY]},vB=function(e){return e&&"current"in e?e.current:e},yB=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},bB=0,xB=[];const wB=(kB=function(e){var t=i.exports.useRef([]),n=i.exports.useRef([0,0]),r=i.exports.useRef(),o=i.exports.useState(bB++)[0],a=i.exports.useState((function(){return tB()}))[0],s=i.exports.useRef(e);i.exports.useEffect((function(){s.current=e}),[e]),i.exports.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=vT([e.lockRef.current],(e.shards||[]).map(vB),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=i.exports.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var o,i=gB(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var h=hB(d,u);if(!h)return!0;if(h?o=d:(o="v"===d?"h":"v",h=hB(d,u)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var f=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),c=!1,u=a>0,d=0,h=0;do{var f=pB(e,s),p=f[0],g=f[1]-f[2]-i*p;(p||g)&&fB(e,s)&&(d+=g,h+=p),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(o&&0===d||!o&&a>d)||!u&&(o&&0===h||!o&&-a>h))&&(c=!0),c}(f,t,e,"h"===f?l:c,!0)}),[]),c=i.exports.useCallback((function(e){var n=e;if(xB.length&&xB[xB.length-1]===a){var r="deltaY"in n?mB(n):gB(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(s.current.shards||[]).map(vB).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=i.exports.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=i.exports.useCallback((function(e){n.current=gB(e),r.current=void 0}),[]),h=i.exports.useCallback((function(t){u(t.type,mB(t),t.target,l(t,e.lockRef.current))}),[]),f=i.exports.useCallback((function(t){u(t.type,gB(t),t.target,l(t,e.lockRef.current))}),[]);i.exports.useEffect((function(){return xB.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,uB),document.addEventListener("touchmove",c,uB),document.addEventListener("touchstart",d,uB),function(){xB=xB.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,uB),document.removeEventListener("touchmove",c,uB),document.removeEventListener("touchstart",d,uB)}}),[]);var p=e.removeScrollBar,g=e.inert;return ld(ad,{children:[g?sd(a,{styles:yB(o)}):null,p?sd(sB,{gapMode:"margin"}):null]})},Xz.useMedium(kB),ED);var kB,SB=i.exports.forwardRef((function(e,t){return sd(Qz,{...hT({},e,{ref:t,sideCar:wB})})}));SB.classNames=Qz.classNames;const CB=SB;var _B=(...e)=>e.filter(Boolean).join(" ");function EB(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}var LB=new class{constructor(){e(this,"modals",void 0),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}};function PB(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:o=!0,closeOnEsc:a=!0,useInert:s=!0,onOverlayClick:l,onEsc:c}=e,u=i.exports.useRef(null),d=i.exports.useRef(null),[h,f,p]=function(e,...t){const n=i.exports.useId(),r=e||n;return i.exports.useMemo((()=>t.map((e=>`${e}-${r}`))),[r,t])}(r,"chakra-modal","chakra-modal--header","chakra-modal--body");!function(e,t){const n=e.current;i.exports.useEffect((()=>{if(e.current&&t)return fD(e.current)}),[t,e,n])}(u,t&&s),function(e,t){i.exports.useEffect((()=>(t&&LB.add(e),()=>{LB.remove(e)})),[t,e])}(u,t);const g=i.exports.useRef(null),m=i.exports.useCallback((e=>{g.current=e.target}),[]),v=i.exports.useCallback((e=>{"Escape"===e.key&&(e.stopPropagation(),a&&(null==n||n()),null==c||c())}),[a,n,c]),[y,b]=i.exports.useState(!1),[x,w]=i.exports.useState(!1),k=i.exports.useCallback(((e={},t=null)=>({role:"dialog",...e,ref:ck(t,u),id:h,tabIndex:-1,"aria-modal":!0,"aria-labelledby":y?f:void 0,"aria-describedby":x?p:void 0,onClick:EB(e.onClick,(e=>e.stopPropagation()))})),[p,x,h,f,y]),S=i.exports.useCallback((e=>{e.stopPropagation(),g.current===e.target&&LB.isTopModal(u)&&(o&&(null==n||n()),null==l||l())}),[n,o,l]),C=i.exports.useCallback(((e={},t=null)=>({...e,ref:ck(t,d),onClick:EB(e.onClick,S),onKeyDown:EB(e.onKeyDown,v),onMouseDown:EB(e.onMouseDown,m)})),[v,m,S]);return{isOpen:t,onClose:n,headerId:f,bodyId:p,setBodyMounted:w,setHeaderMounted:b,dialogRef:u,overlayRef:d,getDialogProps:k,getDialogContainerProps:C}}var[OB,TB]=lk({name:"ModalStylesContext",errorMessage:"useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" "}),[MB,AB]=lk({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),IB=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:o,initialFocusRef:i,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:c,preserveScrollBarGap:u,motionPreset:d,lockFocusAcrossFrames:h,onCloseComplete:f}=e,p=ak("Modal",e),g={...PB(e),autoFocus:r,trapFocus:o,initialFocusRef:i,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:c,preserveScrollBarGap:u,motionPreset:d,lockFocusAcrossFrames:h};return sd(MB,{value:g,children:sd(OB,{value:p,children:sd(dT,{onExitComplete:f,children:g.isOpen&&sd(aD,{...t,children:n})})})})};IB.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"},IB.displayName="Modal";var RB=rk(((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:a}=AB();i.exports.useEffect((()=>(a(!0),()=>a(!1))),[a]);const s=_B("chakra-modal__body",n),l=TB();return F.createElement(sk.div,{ref:t,className:s,id:o,...r,__css:l.body})}));RB.displayName="ModalBody";var NB=rk(((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:i}=AB(),a=_B("chakra-modal__close-btn",r),s=TB();return sd(AA,{ref:t,__css:s.closeButton,className:a,onClick:EB(n,(e=>{e.stopPropagation(),i()})),...o})}));function DB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:a,allowPinchZoom:s,finalFocusRef:l,returnFocusOnClose:c,preserveScrollBarGap:u,lockFocusAcrossFrames:d}=AB(),[h,f]=TE();return i.exports.useEffect((()=>{!h&&f&&setTimeout(f)}),[h,f]),sd(qz,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:l,restoreFocus:c,contentRef:r,lockFocusAcrossFrames:d,children:sd(CB,{removeScrollBar:!u,allowPinchZoom:s,enabled:a,forwardProps:!0,children:e.children})})}NB.displayName="ModalCloseButton";var zB={slideInBottom:{...WT,custom:{offsetY:16,reverse:!0}},slideInRight:{...WT,custom:{offsetX:16,reverse:!0}},scale:{...DT,custom:{initialScale:.95,reverse:!0}},none:{}},BB=sk(oT.section),jB=e=>zB[e||"none"],FB=i.exports.forwardRef(((e,t)=>{const{preset:n,motionProps:r=jB(n),...o}=e;return sd(BB,{ref:t,...r,...o})}));FB.displayName="ModalTransition";var HB=rk(((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:i,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=AB(),c=s(a,t),u=l(o),d=_B("chakra-modal__content",n),h=TB(),f={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...h.dialog},p={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...h.dialogContainer},{motionPreset:g}=AB();return F.createElement(DB,null,F.createElement(sk.div,{...u,className:"chakra-modal__content-container",tabIndex:-1,__css:p},sd(FB,{preset:g,motionProps:i,className:d,...c,__css:f,children:r})))}));HB.displayName="ModalContent";var WB=rk(((e,t)=>{const{className:n,...r}=e,o=_B("chakra-modal__footer",n),i={display:"flex",alignItems:"center",justifyContent:"flex-end",...TB().footer};return F.createElement(sk.footer,{ref:t,...r,__css:i,className:o})}));WB.displayName="ModalFooter";var $B=rk(((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:a}=AB();i.exports.useEffect((()=>(a(!0),()=>a(!1))),[a]);const s=_B("chakra-modal__header",n),l={flex:0,...TB().header};return F.createElement(sk.header,{ref:t,className:s,id:o,...r,__css:l})}));$B.displayName="ModalHeader";var UB=sk(oT.div),VB=rk(((e,t)=>{const{className:n,transition:r,motionProps:o,...i}=e,a=_B("chakra-modal__overlay",n),s={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...TB().overlay},{motionPreset:l}=AB();return sd(UB,{...o||("none"===l?{}:IT),__css:s,ref:t,className:a,...i})}));function GB(e){const{leastDestructiveRef:t,...n}=e;return sd(IB,{...n,initialFocusRef:t})}VB.displayName="ModalOverlay";var qB=rk(((e,t)=>sd(HB,{ref:t,role:"alertdialog",...e}))),[ZB,YB]=lk(),XB=sk(FT),KB=rk(((e,t)=>{const{className:n,children:r,motionProps:o,containerProps:i,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:c}=AB(),u=s(a,t),d=l(i),h=_B("chakra-modal__content",n),f=TB(),p={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...f.dialog},g={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...f.dialogContainer},{placement:m}=YB();return F.createElement(DB,null,F.createElement(sk.div,{...d,className:"chakra-modal__content-container",__css:g},sd(XB,{motionProps:o,direction:m,in:c,className:h,...u,__css:p,children:r})))}));KB.displayName="DrawerContent";var QB=(...e)=>e.filter(Boolean).join(" "),JB=e=>!!e||void 0;function ej(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}var tj=e=>sd(wk,{viewBox:"0 0 24 24",...e,children:sd("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"})}),nj=e=>sd(wk,{viewBox:"0 0 24 24",...e,children:sd("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 rj(e,t,n,r){i.exports.useEffect((()=>{if(!e.current||!r)return;const o=e.current.ownerDocument.defaultView??window,i=Array.isArray(t)?t:[t],a=new o.MutationObserver((e=>{for(const t of e)"attributes"===t.type&&t.attributeName&&i.includes(t.attributeName)&&n(t)}));return a.observe(e.current,{attributes:!0,attributeFilter:i}),()=>a.disconnect()}))}function oj(e,t){const[n,r]=i.exports.useState(!1),[o,a]=i.exports.useState(null),[s,l]=i.exports.useState(!0),c=i.exports.useRef(null),u=()=>clearTimeout(c.current);!function(e,t){const n=Sk(e);i.exports.useEffect((()=>{let e=null;const r=()=>n();return null!==t&&(e=window.setInterval(r,t)),()=>{e&&window.clearInterval(e)}}),[t,n])}((()=>{"increment"===o&&e(),"decrement"===o&&t()}),n?50:null);const d=i.exports.useCallback((()=>{s&&e(),c.current=setTimeout((()=>{l(!1),r(!0),a("increment")}),300)}),[e,s]),h=i.exports.useCallback((()=>{s&&t(),c.current=setTimeout((()=>{l(!1),r(!0),a("decrement")}),300)}),[t,s]),f=i.exports.useCallback((()=>{l(!0),r(!1),u()}),[]);return i.exports.useEffect((()=>()=>u()),[]),{up:d,down:h,stop:f,isSpinning:n}}var ij=/^[Ee0-9+\-.]$/;function aj(e){return ij.test(e)}function sj(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:o=Number.MIN_SAFE_INTEGER,max:a=Number.MAX_SAFE_INTEGER,step:s=1,isReadOnly:l,isDisabled:c,isRequired:u,isInvalid:d,pattern:h="[0-9]*(.[0-9]+)?",inputMode:f="decimal",allowMouseWheel:p,id:g,onChange:m,precision:v,name:y,"aria-describedby":b,"aria-label":x,"aria-labelledby":w,onFocus:k,onBlur:S,onInvalid:C,getAriaValueText:_,isValidCharacter:E,format:L,parse:P,...O}=e,T=Sk(k),M=Sk(S),A=Sk(C),I=Sk(E??aj),R=Sk(_),N=function(e={}){const{onChange:t,precision:n,defaultValue:r,value:o,step:a=1,min:s=Number.MIN_SAFE_INTEGER,max:l=Number.MAX_SAFE_INTEGER,keepWithinRange:c=!0}=e,u=Sk(t),[d,h]=i.exports.useState((()=>null==r?"":HA(r,a,n)??"")),f=void 0!==o,p=f?o:d,g=FA(jA(p),a),m=n??g,v=i.exports.useCallback((e=>{e!==p&&(f||h(e.toString()),null==u||u(e.toString(),jA(e)))}),[u,f,p]),y=i.exports.useCallback((e=>{let t=e;return c&&(t=BA(t,s,l)),IA(t,m)}),[m,c,l,s]),b=i.exports.useCallback(((e=a)=>{let t;t=""===p?jA(e):jA(p)+e,t=y(t),v(t)}),[y,a,v,p]),x=i.exports.useCallback(((e=a)=>{let t;t=""===p?jA(-e):jA(p)-e,t=y(t),v(t)}),[y,a,v,p]),w=i.exports.useCallback((()=>{let e;e=null==r?"":HA(r,a,n)??s,v(e)}),[r,n,a,v,s]),k=i.exports.useCallback((e=>{const t=HA(e,a,m)??s;v(t)}),[m,a,v,s]),S=jA(p);return{isOutOfRange:S>l||S<s,isAtMax:S===l,isAtMin:S===s,precision:m,value:p,valueAsNumber:S,update:v,reset:w,increment:b,decrement:x,clamp:y,cast:k,setValue:h}}(e),{update:D,increment:z,decrement:B}=N,[j,F]=i.exports.useState(!1),H=!(l||c),W=i.exports.useRef(null),$=i.exports.useRef(null),U=i.exports.useRef(null),V=i.exports.useRef(null),G=i.exports.useCallback((e=>e.split("").filter(I).join("")),[I]),q=i.exports.useCallback((e=>(null==P?void 0:P(e))??e),[P]),Z=i.exports.useCallback((e=>((null==L?void 0:L(e))??e).toString()),[L]);tA((()=>{(N.valueAsNumber>a||N.valueAsNumber<o)&&(null==A||A("rangeOverflow",Z(N.value),N.valueAsNumber))}),[N.valueAsNumber,N.value,Z,A]),Xu((()=>{if(!W.current)return;if(W.current.value!=N.value){const e=q(W.current.value);N.setValue(G(e))}}),[q,G]);const Y=i.exports.useCallback(((e=s)=>{H&&z(e)}),[z,H,s]),X=i.exports.useCallback(((e=s)=>{H&&B(e)}),[B,H,s]),K=oj(Y,X);rj(U,"disabled",K.stop,K.isSpinning),rj(V,"disabled",K.stop,K.isSpinning);const Q=i.exports.useCallback((e=>{if(e.nativeEvent.isComposing)return;const t=q(e.currentTarget.value);D(G(t)),$.current={start:e.currentTarget.selectionStart,end:e.currentTarget.selectionEnd}}),[D,G,q]),J=i.exports.useCallback((e=>{var t;null==T||T(e),$.current&&(e.target.selectionStart=$.current.start??(null==(t=e.currentTarget.value)?void 0:t.length),e.currentTarget.selectionEnd=$.current.end??e.currentTarget.selectionStart)}),[T]),ee=i.exports.useCallback((e=>{if(e.nativeEvent.isComposing)return;(function(e,t){if(null==e.key)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(1===e.key.length&&!n)||t(e.key)})(e,I)||e.preventDefault();const t=te(e)*s,n={ArrowUp:()=>Y(t),ArrowDown:()=>X(t),Home:()=>D(o),End:()=>D(a)}[e.key];n&&(e.preventDefault(),n(e))}),[I,s,Y,X,D,o,a]),te=e=>{let t=1;return(e.metaKey||e.ctrlKey)&&(t=.1),e.shiftKey&&(t=10),t},ne=i.exports.useMemo((()=>{const e=null==R?void 0:R(N.value);if(null!=e)return e;const t=N.value.toString();return t||void 0}),[N.value,R]),re=i.exports.useCallback((()=>{let e=N.value;if(""===N.value)return;/^[eE]/.test(N.value.toString())?N.setValue(""):(N.valueAsNumber<o&&(e=o),N.valueAsNumber>a&&(e=a),N.cast(e))}),[N,a,o]),oe=i.exports.useCallback((()=>{F(!1),n&&re()}),[n,F,re]),ie=i.exports.useCallback((()=>{t&&requestAnimationFrame((()=>{var e;null==(e=W.current)||e.focus()}))}),[t]),ae=i.exports.useCallback((e=>{e.preventDefault(),K.up(),ie()}),[ie,K]),se=i.exports.useCallback((e=>{e.preventDefault(),K.down(),ie()}),[ie,K]);VA((()=>W.current),"wheel",(e=>{var t;const n=((null==(t=W.current)?void 0:t.ownerDocument)??document).activeElement===W.current;if(!p||!n)return;e.preventDefault();const r=te(e)*s,o=Math.sign(e.deltaY);-1===o?Y(r):1===o&&X(r)}),{passive:!1});const le=i.exports.useCallback(((e={},t=null)=>{const n=c||r&&N.isAtMax;return{...e,ref:ck(t,U),role:"button",tabIndex:-1,onPointerDown:ej(e.onPointerDown,(e=>{0!==e.button||n||ae(e)})),onPointerLeave:ej(e.onPointerLeave,K.stop),onPointerUp:ej(e.onPointerUp,K.stop),disabled:n,"aria-disabled":JB(n)}}),[N.isAtMax,r,ae,K.stop,c]),ce=i.exports.useCallback(((e={},t=null)=>{const n=c||r&&N.isAtMin;return{...e,ref:ck(t,V),role:"button",tabIndex:-1,onPointerDown:ej(e.onPointerDown,(e=>{0!==e.button||n||se(e)})),onPointerLeave:ej(e.onPointerLeave,K.stop),onPointerUp:ej(e.onPointerUp,K.stop),disabled:n,"aria-disabled":JB(n)}}),[N.isAtMin,r,se,K.stop,c]),ue=i.exports.useCallback(((e={},t=null)=>({name:y,inputMode:f,type:"text",pattern:h,"aria-labelledby":w,"aria-label":x,"aria-describedby":b,id:g,disabled:c,...e,readOnly:e.readOnly??l,"aria-readonly":e.readOnly??l,"aria-required":e.required??u,required:e.required??u,ref:ck(W,t),value:Z(N.value),role:"spinbutton","aria-valuemin":o,"aria-valuemax":a,"aria-valuenow":Number.isNaN(N.valueAsNumber)?void 0:N.valueAsNumber,"aria-invalid":JB(d??N.isOutOfRange),"aria-valuetext":ne,autoComplete:"off",autoCorrect:"off",onChange:ej(e.onChange,Q),onKeyDown:ej(e.onKeyDown,ee),onFocus:ej(e.onFocus,J,(()=>F(!0))),onBlur:ej(e.onBlur,M,oe)})),[y,f,h,w,x,Z,b,g,c,u,l,d,N.value,N.valueAsNumber,N.isOutOfRange,o,a,ne,Q,ee,J,M,oe]);return{value:Z(N.value),valueAsNumber:N.valueAsNumber,isFocused:j,isDisabled:c,isReadOnly:l,getIncrementButtonProps:le,getDecrementButtonProps:ce,getInputProps:ue,htmlProps:O}}var[lj,cj]=lk({name:"NumberInputStylesContext",errorMessage:"useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<NumberInput />\" "}),[uj,dj]=lk({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),hj=rk((function(e,t){const n=ak("NumberInput",e),r=ZM(df(e)),{htmlProps:o,...a}=sj(r),s=i.exports.useMemo((()=>a),[a]);return F.createElement(uj,{value:s},F.createElement(lj,{value:n},F.createElement(sk.div,{...o,ref:t,className:QB("chakra-numberinput",e.className),__css:{position:"relative",zIndex:0,...n.root}})))}));hj.displayName="NumberInput";var fj=rk((function(e,t){const n=cj();return F.createElement(sk.div,{"aria-hidden":!0,ref:t,...e,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...n.stepperGroup}})}));fj.displayName="NumberInputStepper";var pj=rk((function(e,t){const{getInputProps:n}=dj(),r=n(e,t),o=cj();return F.createElement(sk.input,{...r,className:QB("chakra-numberinput__field",e.className),__css:{width:"100%",...o.field}})}));pj.displayName="NumberInputField";var gj=sk("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),mj=rk((function(e,t){const n=cj(),{getDecrementButtonProps:r}=dj(),o=r(e,t);return sd(gj,{...o,__css:n.stepper,children:e.children??sd(tj,{})})}));mj.displayName="NumberDecrementStepper";var vj=rk((function(e,t){const{getIncrementButtonProps:n}=dj(),r=n(e,t),o=cj();return sd(gj,{...r,__css:o.stepper,children:e.children??sd(nj,{})})}));vj.displayName="NumberIncrementStepper";var yj=(...e)=>e.filter(Boolean).join(" ");function bj(e,...t){return xj(e)?e(...t):e}var xj=e=>"function"==typeof e;function wj(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}function kj(...e){return function(t){e.forEach((e=>{null==e||e(t)}))}}var[Sj,Cj]=lk({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[_j,Ej]=lk({name:"PopoverStylesContext",errorMessage:"usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Popover />\" "}),Lj={click:"click",hover:"hover"};function Pj(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:o,returnFocusOnClose:a=!0,autoFocus:s=!0,arrowSize:l,arrowShadowColor:c,trigger:u=Lj.click,openDelay:d=200,closeDelay:h=200,isLazy:f,lazyBehavior:p="unmount",computePositionOnMount:g,...m}=e,{isOpen:v,onClose:y,onOpen:b,onToggle:x}=ZN(e),w=i.exports.useRef(null),k=i.exports.useRef(null),S=i.exports.useRef(null),C=i.exports.useRef(!1),_=i.exports.useRef(!1);v&&(_.current=!0);const[E,L]=i.exports.useState(!1),[P,O]=i.exports.useState(!1),T=i.exports.useId(),M=o??T,[A,I,R,N]=["popover-trigger","popover-content","popover-header","popover-body"].map((e=>`${e}-${M}`)),{referenceRef:D,getArrowProps:z,getPopperProps:B,getArrowInnerProps:j,forceUpdate:F}=GN({...m,enabled:v||!!g}),H=YN({isOpen:v,ref:S});!function(e){const{ref:t,elements:n,enabled:r}=e,o=()=>{var e;return(null==(e=t.current)?void 0:e.ownerDocument)??document};VA(o,"pointerdown",(e=>{if(!ZA()||!r)return;const i=e.target,a=(n??[t]).some((e=>{const t="current"in e?e.current:e;return(null==t?void 0:t.contains(i))||t===i}));o().activeElement!==i&&a&&(e.preventDefault(),i.focus())}))}({enabled:v,ref:k}),function(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,i=n&&!r;tA((()=>{if(!i)return;if(cR(e))return;const t=(null==o?void 0:o.current)||e.current;t&&requestAnimationFrame((()=>{t.focus()}))}),[i,e,o])}(S,{focusRef:k,visible:v,shouldFocus:a&&u===Lj.click}),function(e,t=uR){const{focusRef:n,preventScroll:r,shouldFocus:o,visible:a}=t,s="current"in e?e.current:e,l=o&&a,c=i.exports.useRef(l),u=i.exports.useRef(a);Xu((()=>{!u.current&&a&&(c.current=l),u.current=a}),[a,l]);const d=i.exports.useCallback((()=>{if(a&&s&&c.current&&(c.current=!1,!s.contains(document.activeElement)))if(null==n?void 0:n.current)requestAnimationFrame((()=>{var e;null==(e=n.current)||e.focus({preventScroll:r})}));else{const e=lR(s);e.length>0&&requestAnimationFrame((()=>{e[0].focus({preventScroll:r})}))}}),[a,r,s,n]);tA((()=>{d()}),[d]),VA(s,"transitionend",d)}(S,{focusRef:r,visible:v,shouldFocus:s&&u===Lj.click});const W=XN({wasSelected:_.current,enabled:f,mode:p,isSelected:H.present}),$=i.exports.useCallback(((e={},r=null)=>{const o={...e,style:{...e.style,transformOrigin:AN.transformOrigin.varRef,[AN.arrowSize.var]:l?`${l}px`:void 0,[AN.arrowShadowColor.var]:c},ref:ck(S,r),children:W?e.children:null,id:I,tabIndex:-1,role:"dialog",onKeyDown:wj(e.onKeyDown,(e=>{n&&"Escape"===e.key&&y()})),onBlur:wj(e.onBlur,(e=>{const n=Tj(e),r=Oj(S.current,n),o=Oj(k.current,n);v&&t&&(!r&&!o)&&y()})),"aria-labelledby":E?R:void 0,"aria-describedby":P?N:void 0};return u===Lj.hover&&(o.role="tooltip",o.onMouseEnter=wj(e.onMouseEnter,(()=>{C.current=!0})),o.onMouseLeave=wj(e.onMouseLeave,(e=>{null!==e.nativeEvent.relatedTarget&&(C.current=!1,setTimeout((()=>y()),h))}))),o}),[W,I,E,R,P,N,u,n,y,v,t,h,c,l]),U=i.exports.useCallback(((e={},t=null)=>B({...e,style:{visibility:v?"visible":"hidden",...e.style}},t)),[v,B]),V=i.exports.useCallback(((e,t=null)=>({...e,ref:ck(t,w,D)})),[w,D]),G=i.exports.useRef(),q=i.exports.useRef(),Z=i.exports.useCallback((e=>{null==w.current&&D(e)}),[D]),Y=i.exports.useCallback(((e={},n=null)=>{const r={...e,ref:ck(k,n,Z),id:A,"aria-haspopup":"dialog","aria-expanded":v,"aria-controls":I};return u===Lj.click&&(r.onClick=wj(e.onClick,x)),u===Lj.hover&&(r.onFocus=wj(e.onFocus,(()=>{void 0===G.current&&b()})),r.onBlur=wj(e.onBlur,(e=>{const n=Tj(e),r=!Oj(S.current,n);v&&t&&r&&y()})),r.onKeyDown=wj(e.onKeyDown,(e=>{"Escape"===e.key&&y()})),r.onMouseEnter=wj(e.onMouseEnter,(()=>{C.current=!0,G.current=window.setTimeout((()=>b()),d)})),r.onMouseLeave=wj(e.onMouseLeave,(()=>{C.current=!1,G.current&&(clearTimeout(G.current),G.current=void 0),q.current=window.setTimeout((()=>{!1===C.current&&y()}),h)}))),r}),[A,v,I,u,Z,x,b,t,y,d,h]);i.exports.useEffect((()=>()=>{G.current&&clearTimeout(G.current),q.current&&clearTimeout(q.current)}),[]);const X=i.exports.useCallback(((e={},t=null)=>({...e,id:R,ref:ck(t,(e=>{L(!!e)}))})),[R]),K=i.exports.useCallback(((e={},t=null)=>({...e,id:N,ref:ck(t,(e=>{O(!!e)}))})),[N]);return{forceUpdate:F,isOpen:v,onAnimationComplete:H.onComplete,onClose:y,getAnchorProps:V,getArrowProps:z,getArrowInnerProps:j,getPopoverPositionerProps:U,getPopoverProps:$,getTriggerProps:Y,getHeaderProps:X,getBodyProps:K}}function Oj(e,t){return e===t||(null==e?void 0:e.contains(t))}function Tj(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function Mj(e){const t=ak("Popover",e),{children:n,...r}=df(e),o=Pj({...r,direction:Zw().direction});return sd(Sj,{value:o,children:sd(_j,{value:t,children:bj(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}function Aj(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:o,getArrowInnerProps:i}=Cj(),a=Ej(),s=t??n??r;return F.createElement(sk.div,{...o(),className:"chakra-popover__arrow-positioner"},F.createElement(sk.div,{className:yj("chakra-popover__arrow",e.className),...i(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}Mj.displayName="Popover",Aj.displayName="PopoverArrow";var Ij=rk((function(e,t){const{getBodyProps:n}=Cj(),r=Ej();return F.createElement(sk.div,{...n(e,t),className:yj("chakra-popover__body",e.className),__css:r.body})}));Ij.displayName="PopoverBody";var Rj=rk((function(e,t){const{onClose:n}=Cj(),r=Ej();return sd(AA,{size:"sm",onClick:n,className:yj("chakra-popover__close-btn",e.className),__css:r.closeButton,ref:t,...e})}));function Nj(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}Rj.displayName="PopoverCloseButton";var Dj={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]}}},zj=sk(oT.section),Bj=rk((function(e,t){const{variants:n=Dj,...r}=e,{isOpen:o}=Cj();return F.createElement(zj,{ref:t,variants:Nj(n),initial:!1,animate:o?"enter":"exit",...r})}));Bj.displayName="PopoverTransition";var jj=rk((function(e,t){const{rootProps:n,motionProps:r,...o}=e,{getPopoverProps:i,getPopoverPositionerProps:a,onAnimationComplete:s}=Cj(),l=Ej(),c={position:"relative",display:"flex",flexDirection:"column",...l.content};return F.createElement(sk.div,{...a(n),__css:l.popper,className:"chakra-popover__popper"},sd(Bj,{...r,...i(o,t),onAnimationComplete:kj(s,o.onAnimationComplete),className:yj("chakra-popover__content",e.className),__css:c}))}));jj.displayName="PopoverContent";var Fj=rk((function(e,t){const{getHeaderProps:n}=Cj(),r=Ej();return F.createElement(sk.header,{...n(e,t),className:yj("chakra-popover__header",e.className),__css:r.header})}));function Hj(e){const t=i.exports.Children.only(e.children),{getTriggerProps:n}=Cj();return i.exports.cloneElement(t,n(t.props,t.ref))}Fj.displayName="PopoverHeader",Hj.displayName="PopoverTrigger";var Wj=fg({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),$j=fg({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Uj=fg({"0%":{left:"-40%"},"100%":{left:"100%"}}),Vj=fg({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function Gj(e){const{value:t=0,min:n,max:r,valueText:o,getValueText:i,isIndeterminate:a,role:s="progressbar"}=e,l=function(e,t,n){return 100*(e-t)/(n-t)}(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(null!=t)return"function"==typeof i?i(t,l):o})(),role:s},percent:l,value:t}}var qj=e=>{const{size:t,isIndeterminate:n,...r}=e;return F.createElement(sk.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${$j} 2s linear infinite`:void 0},...r})};qj.displayName="Shape";var Zj=e=>F.createElement(sk.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});Zj.displayName="Circle";var Yj=rk(((e,t)=>{const{size:n="48px",max:r=100,min:o=0,valueText:i,getValueText:a,value:s,capIsRound:l,children:c,thickness:u="10px",color:d="#0078d4",trackColor:h="#edebe9",isIndeterminate:f,...p}=e,g=Gj({min:o,max:r,value:s,valueText:i,getValueText:a,isIndeterminate:f}),m=f?void 0:2.64*(g.percent??0),v=f?{css:{animation:`${Wj} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:null==m?void 0:`${m} ${264-m}`,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},y={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return F.createElement(sk.div,{ref:t,className:"chakra-progress",...g.bind,...p,__css:y},ld(qj,{size:n,isIndeterminate:f,children:[sd(Zj,{stroke:h,strokeWidth:u,className:"chakra-progress__track"}),sd(Zj,{stroke:d,strokeWidth:u,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:0!==g.value||f?void 0:0,...v})]}),c)}));Yj.displayName="CircularProgress";var[Xj,Kj]=lk({name:"ProgressStylesContext",errorMessage:"useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Progress />\" "}),Qj=rk(((e,t)=>{const{min:n,max:r,value:o,isIndeterminate:i,role:a,...s}=e,l=Gj({value:o,min:n,max:r,isIndeterminate:i,role:a}),c={height:"100%",...Kj().filledTrack};return F.createElement(sk.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:c})})),Jj=rk(((e,t)=>{var n;const{value:r,min:o=0,max:i=100,hasStripe:a,isAnimated:s,children:l,borderRadius:c,isIndeterminate:u,"aria-label":d,"aria-labelledby":h,title:f,role:p,...g}=df(e),m=ak("Progress",e),v=c??(null==(n=m.track)?void 0:n.borderRadius),y={...!u&&a&&s&&{animation:`${Vj} 1s linear infinite`},...u&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${Uj} 1s ease infinite normal none running`}},b={overflow:"hidden",position:"relative",...m.track};return F.createElement(sk.div,{ref:t,borderRadius:v,__css:b,...g},ld(Xj,{value:m,children:[sd(Qj,{"aria-label":d,"aria-labelledby":h,min:o,max:i,value:r,isIndeterminate:u,css:y,borderRadius:v,title:f,role:p}),l]}))}));Jj.displayName="Progress",sk("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}}).displayName="CircularProgressLabel";var eF=(...e)=>e.filter(Boolean).join(" ");var tF=rk((function(e,t){const{children:n,placeholder:r,className:o,...i}=e;return F.createElement(sk.select,{...i,ref:t,className:eF("chakra-select",o)},r&&sd("option",{value:"",children:r}),n)}));tF.displayName="SelectField";var nF=rk(((e,t)=>{var n;const r=ak("Select",e),{rootProps:o,placeholder:i,icon:a,color:s,height:l,h:c,minH:u,minHeight:d,iconColor:h,iconSize:f,...p}=df(e),[g,m]=function(e,t){const n={},r={};for(const[o,i]of Object.entries(e))t.includes(o)?n[o]=i:r[o]=i;return[n,r]}(p,Jh),v=qM(m),y={width:"100%",height:"fit-content",position:"relative",color:s},b={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...null==(n=r.field)?void 0:n._focus}};return F.createElement(sk.div,{className:"chakra-select__wrapper",__css:y,...g,...o},sd(tF,{ref:t,height:c??l,minH:u??d,placeholder:i,...v,__css:b,children:e.children}),sd(iF,{"data-disabled":(x=v.disabled,x?"":void 0),...(h||s)&&{color:h||s},__css:r.icon,...f&&{fontSize:f},children:a}));var x}));nF.displayName="Select";var rF=e=>sd("svg",{viewBox:"0 0 24 24",...e,children:sd("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),oF=sk("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),iF=e=>{const{children:t=sd(rF,{}),...n}=e,r=i.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return sd(oF,{...n,className:"chakra-select__icon-wrapper",children:i.exports.isValidElement(t)?r:null})};function aF(e){const t=function(e){return e.view??window}(e);return void 0!==t.PointerEvent&&e instanceof t.PointerEvent?!("mouse"!==e.pointerType):e instanceof t.MouseEvent}function sF(e){return!!e.touches}function lF(e,t="page"){return sF(e)?function(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}(e,t):function(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}(e,t)}function cF(e,t=!1){function n(t){e(t,{point:lF(t)})}const r=t?function(e){return t=>{const n=aF(t);(!n||n&&0===t.button)&&e(t)}}(n):n;return r}function uF(e,t,n,r){return function(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}(e,t,cF(n,"pointerdown"===t),r)}function dF(e){const t=i.exports.useRef(null);return t.current=e,t}iF.displayName="SelectIcon";function hF(e,t){return{x:e.x-t.x,y:e.y-t.y}}function fF(e,t){return{point:e.point,delta:hF(e.point,t[t.length-1]),offset:hF(e.point,t[0]),velocity:gF(t,.1)}}var pF=e=>1e3*e;function gF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=e[e.length-1];for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>pF(t)));)n--;if(!r)return{x:0,y:0};const i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function mF(e,t){return Math.abs(e-t)}function vF(e){return"x"in e&&"y"in e}function yF(t,n){const{onPan:r,onPanStart:o,onPanEnd:a,onPanSessionStart:s,onPanSessionEnd:l,threshold:c}=n,u=Boolean(r||o||a||s||l),d=i.exports.useRef(null),h=dF({onSessionStart:s,onSessionEnd:l,onStart:o,onMove:r,onEnd(e,t){d.current=null,null==a||a(e,t)}});i.exports.useEffect((()=>{var e;null==(e=d.current)||e.updateHandlers(h.current)})),i.exports.useEffect((()=>{const n=t.current;if(n&&u)return uF(n,"pointerdown",(function(t){d.current=new class{constructor(t,n,r){if(e(this,"history",[]),e(this,"startEvent",null),e(this,"lastEvent",null),e(this,"lastEventInfo",null),e(this,"handlers",{}),e(this,"removeListeners",(()=>{})),e(this,"threshold",3),e(this,"win",void 0),e(this,"updatePoint",(()=>{if(!this.lastEvent||!this.lastEventInfo)return;const e=fF(this.lastEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){if("number"==typeof e&&"number"==typeof t)return mF(e,t);if(vF(e)&&vF(t)){const n=mF(e.x,t.x),r=mF(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=Pg();this.history.push({...e.point,timestamp:r});const{onStart:o,onMove:i}=this.handlers;t||(null==o||o(this.lastEvent,e),this.startEvent=this.lastEvent),null==i||i(this.lastEvent,e)})),e(this,"onPointerMove",((e,t)=>{this.lastEvent=e,this.lastEventInfo=t,Sg.update(this.updatePoint,!0)})),e(this,"onPointerUp",((e,t)=>{const n=fF(t,this.history),{onEnd:r,onSessionEnd:o}=this.handlers;null==o||o(e,n),this.end(),r&&this.startEvent&&(null==r||r(e,n))})),this.win=t.view??window,sF(o=t)&&o.touches.length>1)return;var o;this.handlers=n,r&&(this.threshold=r),t.stopPropagation(),t.preventDefault();const i={point:lF(t)},{timestamp:a}=Pg();this.history=[{...i.point,timestamp:a}];const{onSessionStart:s}=n;null==s||s(t,fF(i,this.history)),this.removeListeners=function(...e){return t=>e.reduce(((e,t)=>t(e)),t)}(uF(this.win,"pointermove",this.onPointerMove),uF(this.win,"pointerup",this.onPointerUp),uF(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;null==(e=this.removeListeners)||e.call(this),Cg.update(this.updatePoint)}}(t,h.current,c)}))}),[t,u,h,c]),i.exports.useEffect((()=>()=>{var e;null==(e=d.current)||e.end(),d.current=null}),[])}var bF=Boolean(null==globalThis?void 0:globalThis.document)?i.exports.useLayoutEffect:i.exports.useEffect;function xF({getNodes:e,observeMutation:t=!0}){const[n,r]=i.exports.useState([]),[o,a]=i.exports.useState(0);return bF((()=>{const n=e(),o=n.map(((e,t)=>function(e,t){if(!e)return void t(void 0);t({width:e.offsetWidth,height:e.offsetHeight});const n=new(e.ownerDocument.defaultView??window).ResizeObserver((n=>{if(!Array.isArray(n)||!n.length)return;const[r]=n;let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;t({width:o,height:i})}));return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}(e,(e=>{r((n=>[...n.slice(0,t),e,...n.slice(t+1)]))}))));if(t){const e=n[0];o.push(function(e,t){var n;if(!e||!e.parentElement)return;const r=new((null==(n=e.ownerDocument)?void 0:n.defaultView)??window).MutationObserver((()=>{t()}));return r.observe(e.parentElement,{childList:!0}),()=>{r.disconnect()}}(e,(()=>{a((e=>e+1))})))}return()=>{o.forEach((e=>{null==e||e()}))}}),[o]),n}var wF=Object.getOwnPropertyNames,kF=((e,t)=>function(){return e&&(t=(0,e[wF(e)[0]])(e=0)),t})({"../../../react-shim.js"(){}});kF(),kF(),kF();var SF=e=>e?"":void 0,CF=e=>!!e||void 0,_F=(...e)=>e.filter(Boolean).join(" ");function EF(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}function LF(e){const{orientation:t,vertical:n,horizontal:r}=e;return"vertical"===t?n:r}kF(),kF(),kF();var PF={width:0,height:0},OF=e=>e||PF;function TF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:o}=e,i="vertical"===t?r.reduce(((e,t)=>OF(e).height>OF(t).height?e:t),PF):r.reduce(((e,t)=>OF(e).width>OF(t).width?e:t),PF),a={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...LF({orientation:t,vertical:i?{paddingLeft:i.width/2,paddingRight:i.width/2}:{},horizontal:i?{paddingTop:i.height/2,paddingBottom:i.height/2}:{}})},s={position:"absolute",...LF({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},l=1===n.length,c=[0,o?100-n[0]:n[0]],u=l?c:n;let d=u[0];!l&&o&&(d=100-d);const h=Math.abs(u[u.length-1]-u[0]);return{trackStyle:s,innerTrackStyle:{...s,...LF({orientation:t,vertical:o?{height:`${h}%`,top:`${d}%`}:{height:`${h}%`,bottom:`${d}%`},horizontal:o?{width:`${h}%`,right:`${d}%`}:{width:`${h}%`,left:`${d}%`}})},rootStyle:a,getThumbStyle:e=>{const o=r[e]??PF;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...LF({orientation:t,vertical:{bottom:`calc(${n[e]}% - ${o.height/2}px)`},horizontal:{left:`calc(${n[e]}% - ${o.width/2}px)`}})}}}}function MF(e){const{isReversed:t,direction:n,orientation:r}=e;return"ltr"===n||"vertical"===r?t:!t}function AF(e){const{min:t=0,max:n=100,onChange:r,value:o,defaultValue:a,isReversed:s,direction:l="ltr",orientation:c="horizontal",id:u,isDisabled:d,isReadOnly:h,onChangeStart:f,onChangeEnd:p,step:g=1,getAriaValueText:m,"aria-valuetext":v,"aria-label":y,"aria-labelledby":b,name:x,focusThumbOnChange:w=!0,minStepsBetweenThumbs:k=0,...S}=e,C=Sk(f),_=Sk(p),E=Sk(m),L=MF({isReversed:s,direction:l,orientation:c}),[P,O]=Ck({value:o,defaultValue:a??[25,75],onChange:r});if(!Array.isArray(P))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof P}\``);const[T,M]=i.exports.useState(!1),[A,I]=i.exports.useState(!1),[R,N]=i.exports.useState(-1),D=!(d||h),z=i.exports.useRef(P),B=P.map((e=>BA(e,t,n))),j=function(e,t,n,r){return e.map(((o,i)=>({min:0===i?t:e[i-1]+r,max:i===e.length-1?n:e[i+1]-r})))}(B,t,n,k*g),F=i.exports.useRef({eventSource:null,value:[],valueBounds:[]});F.current.value=B,F.current.valueBounds=j;const H=B.map((e=>n-e+t)),W=(L?H:B).map((e=>NA(e,t,n))),$="vertical"===c,U=i.exports.useRef(null),V=i.exports.useRef(null),G=xF({getNodes(){const e=V.current,t=null==e?void 0:e.querySelectorAll("[role=slider]");return t?Array.from(t):[]}}),q=i.exports.useId(),Z=function(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}`}}(u??q),Y=i.exports.useCallback((e=>{var r;if(!U.current)return;F.current.eventSource="pointer";const o=U.current.getBoundingClientRect(),{clientX:i,clientY:a}=(null==(r=e.touches)?void 0:r[0])??e;let s=($?o.bottom-a:i-o.left)/($?o.height:o.width);return L&&(s=1-s),DA(s,t,n)}),[$,L,n,t]),X=(n-t)/10,K=g||(n-t)/100,Q=i.exports.useMemo((()=>({setValueAtIndex(e,t){if(!D)return;const n=F.current.valueBounds[e];t=BA(t=parseFloat(zA(t,n.min,K)),n.min,n.max);const r=[...F.current.value];r[e]=t,O(r)},setActiveIndex:N,stepUp(e,t=K){const n=F.current.value[e],r=L?n-t:n+t;Q.setValueAtIndex(e,r)},stepDown(e,t=K){const n=F.current.value[e],r=L?n+t:n-t;Q.setValueAtIndex(e,r)},reset(){O(z.current)}})),[K,L,O,D]),J=i.exports.useCallback((e=>{const t={ArrowRight:()=>Q.stepUp(R),ArrowUp:()=>Q.stepUp(R),ArrowLeft:()=>Q.stepDown(R),ArrowDown:()=>Q.stepDown(R),PageUp:()=>Q.stepUp(R,X),PageDown:()=>Q.stepDown(R,X),Home:()=>{const{min:e}=j[R];Q.setValueAtIndex(R,e)},End:()=>{const{max:e}=j[R];Q.setValueAtIndex(R,e)}}[e.key];t&&(e.preventDefault(),e.stopPropagation(),t(e),F.current.eventSource="keyboard")}),[Q,R,X,j]),{getThumbStyle:ee,rootStyle:te,trackStyle:ne,innerTrackStyle:re}=i.exports.useMemo((()=>TF({isReversed:L,orientation:c,thumbRects:G,thumbPercents:W})),[L,c,W,G]),oe=i.exports.useCallback((e=>{var t;const n=e??R;if(-1!==n&&w){const e=Z.getThumb(n),r=null==(t=V.current)?void 0:t.ownerDocument.getElementById(e);r&&setTimeout((()=>r.focus()))}}),[w,R,Z]);tA((()=>{"keyboard"===F.current.eventSource&&(null==_||_(F.current.value))}),[B,_]);yF(V,{onPanSessionStart(e){D&&(M(!0),(e=>{const t=Y(e)||0,n=F.current.value.map((e=>Math.abs(e-t))),r=Math.min(...n);let o=n.indexOf(r);const i=n.filter((e=>e===r));i.length>1&&t>F.current.value[o]&&(o=o+i.length-1),N(o),Q.setValueAtIndex(o,t),oe(o)})(e),null==C||C(F.current.value))},onPanSessionEnd(){D&&(M(!1),null==_||_(F.current.value))},onPan(e){D&&(e=>{if(-1==R)return;const t=Y(e)||0;N(R),Q.setValueAtIndex(R,t),oe(R)})(e)}});const ie=i.exports.useCallback(((e={},t=null)=>({...e,...S,id:Z.root,ref:ck(t,V),tabIndex:-1,"aria-disabled":CF(d),"data-focused":SF(A),style:{...e.style,...te}})),[S,d,A,te,Z]),ae=i.exports.useCallback(((e={},t=null)=>({...e,ref:ck(t,U),id:Z.track,"data-disabled":SF(d),style:{...e.style,...ne}})),[d,ne,Z]),se=i.exports.useCallback(((e={},t=null)=>({...e,ref:t,id:Z.innerTrack,style:{...e.style,...re}})),[re,Z]),le=i.exports.useCallback(((e,t=null)=>{const{index:n,...r}=e,o=B[n];if(null==o)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${n}\`. The \`value\` or \`defaultValue\` length is : ${B.length}`);const i=j[n];return{...r,ref:t,role:"slider",tabIndex:D?0:void 0,id:Z.getThumb(n),"data-active":SF(T&&R===n),"aria-valuetext":(null==E?void 0:E(o))??(null==v?void 0:v[n]),"aria-valuemin":i.min,"aria-valuemax":i.max,"aria-valuenow":o,"aria-orientation":c,"aria-disabled":CF(d),"aria-readonly":CF(h),"aria-label":null==y?void 0:y[n],"aria-labelledby":(null==y?void 0:y[n])||null==b?void 0:b[n],style:{...e.style,...ee(n)},onKeyDown:EF(e.onKeyDown,J),onFocus:EF(e.onFocus,(()=>{I(!0),N(n)})),onBlur:EF(e.onBlur,(()=>{I(!1),N(-1)}))}}),[Z,B,j,D,T,R,E,v,c,d,h,y,b,ee,J,I]),ce=i.exports.useCallback(((e={},t=null)=>({...e,ref:t,id:Z.output,htmlFor:B.map(((e,t)=>Z.getThumb(t))).join(" "),"aria-live":"off"})),[Z,B]),ue=i.exports.useCallback(((e,r=null)=>{const{value:o,...i}=e,a=!(o<t||o>n),s=o>=B[0]&&o<=B[B.length-1];let l=NA(o,t,n);l=L?100-l:l;const u={position:"absolute",pointerEvents:"none",...LF({orientation:c,vertical:{bottom:`${l}%`},horizontal:{left:`${l}%`}})};return{...i,ref:r,id:Z.getMarker(e.value),role:"presentation","aria-hidden":!0,"data-disabled":SF(d),"data-invalid":SF(!a),"data-highlighted":SF(s),style:{...e.style,...u}}}),[d,L,n,t,c,B,Z]),de=i.exports.useCallback(((e,t=null)=>{const{index:n,...r}=e;return{...r,ref:t,id:Z.getInput(n),type:"hidden",value:B[n],name:Array.isArray(x)?x[n]:`${x}-${n}`}}),[x,B,Z]);return{state:{value:B,isFocused:A,isDragging:T,getThumbPercent:e=>W[e],getThumbMinValue:e=>j[e].min,getThumbMaxValue:e=>j[e].max},actions:Q,getRootProps:ie,getTrackProps:ae,getInnerTrackProps:se,getThumbProps:le,getMarkerProps:ue,getInputProps:de,getOutputProps:ce}}var[IF,RF]=lk({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within <RangeSlider />"}),[NF,DF]=lk({name:"RangeSliderStylesContext",errorMessage:"useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<RangeSlider />\" "}),zF=rk((function(e,t){const n=ak("Slider",e),r=df(e),{direction:o}=Zw();r.direction=o;const{getRootProps:a,...s}=AF(r),l=i.exports.useMemo((()=>({...s,name:e.name})),[s,e.name]);return F.createElement(IF,{value:l},F.createElement(NF,{value:n},F.createElement(sk.div,{...a({},t),className:"chakra-slider",__css:n.container},e.children)))}));zF.defaultProps={orientation:"horizontal"},zF.displayName="RangeSlider";var BF=rk((function(e,t){const{getThumbProps:n,getInputProps:r,name:o}=RF(),i=DF(),a=n(e,t);return F.createElement(sk.div,{...a,className:_F("chakra-slider__thumb",e.className),__css:i.thumb},a.children,o&&sd("input",{...r({index:e.index})}))}));BF.displayName="RangeSliderThumb";var jF=rk((function(e,t){const{getTrackProps:n}=RF(),r=DF(),o=n(e,t);return F.createElement(sk.div,{...o,className:_F("chakra-slider__track",e.className),__css:r.track,"data-testid":"chakra-range-slider-track"})}));jF.displayName="RangeSliderTrack";var FF=rk((function(e,t){const{getInnerTrackProps:n}=RF(),r=DF(),o=n(e,t);return F.createElement(sk.div,{...o,className:"chakra-slider__filled-track",__css:r.filledTrack})}));function HF(e){const{min:t=0,max:n=100,onChange:r,value:o,defaultValue:a,isReversed:s,direction:l="ltr",orientation:c="horizontal",id:u,isDisabled:d,isReadOnly:h,onChangeStart:f,onChangeEnd:p,step:g=1,getAriaValueText:m,"aria-valuetext":v,"aria-label":y,"aria-labelledby":b,name:x,focusThumbOnChange:w=!0,...k}=e,S=Sk(f),C=Sk(p),_=Sk(m),E=MF({isReversed:s,direction:l,orientation:c}),[L,P]=Ck({value:o,defaultValue:a??$F(t,n),onChange:r}),[O,T]=i.exports.useState(!1),[M,A]=i.exports.useState(!1),I=!(d||h),R=(n-t)/10,N=g||(n-t)/100,D=BA(L,t,n),z=NA(E?n-D+t:D,t,n),B="vertical"===c,j=dF({min:t,max:n,step:g,isDisabled:d,value:D,isInteractive:I,isReversed:E,isVertical:B,eventSource:null,focusThumbOnChange:w,orientation:c}),F=i.exports.useRef(null),H=i.exports.useRef(null),W=i.exports.useRef(null),$=i.exports.useId(),U=u??$,[V,G]=[`slider-thumb-${U}`,`slider-track-${U}`],q=i.exports.useCallback((e=>{var t;if(!F.current)return;const n=j.current;n.eventSource="pointer";const r=F.current.getBoundingClientRect(),{clientX:o,clientY:i}=(null==(t=e.touches)?void 0:t[0])??e;let a=(B?r.bottom-i:o-r.left)/(B?r.height:r.width);E&&(a=1-a);let s=DA(a,n.min,n.max);return n.step&&(s=parseFloat(zA(s,n.min,n.step))),s=BA(s,n.min,n.max),s}),[B,E,j]),Z=i.exports.useCallback((e=>{const t=j.current;t.isInteractive&&(e=BA(e=parseFloat(zA(e,t.min,N)),t.min,t.max),P(e))}),[N,P,j]),Y=i.exports.useMemo((()=>({stepUp(e=N){Z(E?D-e:D+e)},stepDown(e=N){Z(E?D+e:D-e)},reset(){Z(a||0)},stepTo(e){Z(e)}})),[Z,E,D,N,a]),X=i.exports.useCallback((e=>{const t=j.current,n={ArrowRight:()=>Y.stepUp(),ArrowUp:()=>Y.stepUp(),ArrowLeft:()=>Y.stepDown(),ArrowDown:()=>Y.stepDown(),PageUp:()=>Y.stepUp(R),PageDown:()=>Y.stepDown(R),Home:()=>Z(t.min),End:()=>Z(t.max)}[e.key];n&&(e.preventDefault(),e.stopPropagation(),n(e),t.eventSource="keyboard")}),[Y,Z,R,j]),K=(null==_?void 0:_(D))??v,Q=function(e){const[t]=xF({observeMutation:!1,getNodes(){var t;return["object"==typeof(t=e)&&null!==t&&"current"in t?e.current:e]}});return t}(H),{getThumbStyle:J,rootStyle:ee,trackStyle:te,innerTrackStyle:ne}=i.exports.useMemo((()=>{const e=j.current,t=Q??{width:0,height:0};return TF({isReversed:E,orientation:e.orientation,thumbRects:[t],thumbPercents:[z]})}),[E,Q,z,j]),re=i.exports.useCallback((()=>{j.current.focusThumbOnChange&&setTimeout((()=>{var e;return null==(e=H.current)?void 0:e.focus()}))}),[j]);function oe(e){const t=q(e);null!=t&&t!==j.current.value&&P(t)}tA((()=>{const e=j.current;re(),"keyboard"===e.eventSource&&(null==C||C(e.value))}),[D,C]),yF(W,{onPanSessionStart(e){const t=j.current;t.isInteractive&&(T(!0),re(),oe(e),null==S||S(t.value))},onPanSessionEnd(){const e=j.current;e.isInteractive&&(T(!1),null==C||C(e.value))},onPan(e){j.current.isInteractive&&oe(e)}});const ie=i.exports.useCallback(((e={},t=null)=>({...e,...k,ref:ck(t,W),tabIndex:-1,"aria-disabled":CF(d),"data-focused":SF(M),style:{...e.style,...ee}})),[k,d,M,ee]),ae=i.exports.useCallback(((e={},t=null)=>({...e,ref:ck(t,F),id:G,"data-disabled":SF(d),style:{...e.style,...te}})),[d,G,te]),se=i.exports.useCallback(((e={},t=null)=>({...e,ref:t,style:{...e.style,...ne}})),[ne]),le=i.exports.useCallback(((e={},r=null)=>({...e,ref:ck(r,H),role:"slider",tabIndex:I?0:void 0,id:V,"data-active":SF(O),"aria-valuetext":K,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":D,"aria-orientation":c,"aria-disabled":CF(d),"aria-readonly":CF(h),"aria-label":y,"aria-labelledby":y?void 0:b,style:{...e.style,...J(0)},onKeyDown:EF(e.onKeyDown,X),onFocus:EF(e.onFocus,(()=>A(!0))),onBlur:EF(e.onBlur,(()=>A(!1)))})),[I,V,O,K,t,n,D,c,d,h,y,b,J,X]),ce=i.exports.useCallback(((e,r=null)=>{const o=!(e.value<t||e.value>n),i=D>=e.value,a=NA(e.value,t,n),s={position:"absolute",pointerEvents:"none",...WF({orientation:c,vertical:{bottom:E?100-a+"%":`${a}%`},horizontal:{left:E?100-a+"%":`${a}%`}})};return{...e,ref:r,role:"presentation","aria-hidden":!0,"data-disabled":SF(d),"data-invalid":SF(!o),"data-highlighted":SF(i),style:{...e.style,...s}}}),[d,E,n,t,c,D]),ue=i.exports.useCallback(((e={},t=null)=>({...e,ref:t,type:"hidden",value:D,name:x})),[x,D]);return{state:{value:D,isFocused:M,isDragging:O},actions:Y,getRootProps:ie,getTrackProps:ae,getInnerTrackProps:se,getThumbProps:le,getMarkerProps:ce,getInputProps:ue}}function WF(e){const{orientation:t,vertical:n,horizontal:r}=e;return"vertical"===t?n:r}function $F(e,t){return t<e?e:e+(t-e)/2}FF.displayName="RangeSliderFilledTrack",rk((function(e,t){const{getMarkerProps:n}=RF(),r=n(e,t);return F.createElement(sk.div,{...r,className:_F("chakra-slider__marker",e.className)})})).displayName="RangeSliderMark",kF(),kF();var[UF,VF]=lk({name:"SliderContext",hookName:"useSliderContext",providerName:"<Slider />"}),[GF,qF]=lk({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:"<Slider />"}),ZF=rk(((e,t)=>{const n=ak("Slider",e),r=df(e),{direction:o}=Zw();r.direction=o;const{getInputProps:i,getRootProps:a,...s}=HF(r),l=a(),c=i({},t);return F.createElement(UF,{value:s},F.createElement(GF,{value:n},F.createElement(sk.div,{...l,className:_F("chakra-slider",e.className),__css:n.container},e.children,sd("input",{...c}))))}));ZF.defaultProps={orientation:"horizontal"},ZF.displayName="Slider";var YF=rk(((e,t)=>{const{getThumbProps:n}=VF(),r=qF(),o=n(e,t);return F.createElement(sk.div,{...o,className:_F("chakra-slider__thumb",e.className),__css:r.thumb})}));YF.displayName="SliderThumb";var XF=rk(((e,t)=>{const{getTrackProps:n}=VF(),r=qF(),o=n(e,t);return F.createElement(sk.div,{...o,className:_F("chakra-slider__track",e.className),__css:r.track})}));XF.displayName="SliderTrack";var KF=rk(((e,t)=>{const{getInnerTrackProps:n}=VF(),r=qF(),o=n(e,t);return F.createElement(sk.div,{...o,className:_F("chakra-slider__filled-track",e.className),__css:r.filledTrack})}));KF.displayName="SliderFilledTrack";var QF=rk(((e,t)=>{const{getMarkerProps:n}=VF(),r=qF(),o=n(e,t);return F.createElement(sk.div,{...o,className:_F("chakra-slider__marker",e.className),__css:r.mark})}));QF.displayName="SliderMark";var JF=(...e)=>e.filter(Boolean).join(" "),eH=e=>e?"":void 0,tH=rk((function(e,t){const n=ak("Switch",e),{spacing:r="0.5rem",children:o,...a}=df(e),{state:s,getInputProps:l,getCheckboxProps:c,getRootProps:u,getLabelProps:d}=SA(a),h=i.exports.useMemo((()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...n.container})),[n.container]),f=i.exports.useMemo((()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...n.track})),[n.track]),p=i.exports.useMemo((()=>({userSelect:"none",marginStart:r,...n.label})),[r,n.label]);return F.createElement(sk.label,{...u(),className:JF("chakra-switch",e.className),__css:h},sd("input",{className:"chakra-switch__input",...l({},t)}),F.createElement(sk.span,{...c(),className:"chakra-switch__track",__css:f},F.createElement(sk.span,{__css:n.thumb,className:"chakra-switch__thumb","data-checked":eH(s.isChecked),"data-hover":eH(s.isHovered)})),o&&F.createElement(sk.span,{className:"chakra-switch__label",...d(),__css:p},o))}));tH.displayName="Switch";var nH=(...e)=>e.filter(Boolean).join(" ");function rH(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}var[oH,iH,aH,sH]=yk();var[lH,cH]=lk({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});var[uH,dH]=lk({});function hH(e,t){return`${e}--tab-${t}`}function fH(e,t){return`${e}--tabpanel-${t}`}var[pH,gH]=lk({name:"TabsStylesContext",errorMessage:"useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Tabs />\" "}),mH=rk((function(e,t){const n=ak("Tabs",e),{children:r,className:o,...a}=df(e),{htmlProps:s,descendants:l,...c}=function(e){const{defaultIndex:t,onChange:n,index:r,isManual:o,isLazy:a,lazyBehavior:s="unmount",orientation:l="horizontal",direction:c="ltr",...u}=e,[d,h]=i.exports.useState(t??0),[f,p]=Ck({defaultValue:t??0,value:r,onChange:n});i.exports.useEffect((()=>{null!=r&&h(r)}),[r]);const g=aH(),m=i.exports.useId();return{id:`tabs-${e.id??m}`,selectedIndex:f,focusedIndex:d,setSelectedIndex:p,setFocusedIndex:h,isManual:o,isLazy:a,lazyBehavior:s,orientation:l,descendants:g,direction:c,htmlProps:u}}(a),u=i.exports.useMemo((()=>c),[c]),{isFitted:d,...h}=s;return F.createElement(oH,{value:l},F.createElement(lH,{value:u},F.createElement(pH,{value:n},F.createElement(sk.div,{className:nH("chakra-tabs",o),ref:t,...h,__css:n.root},r))))}));mH.displayName="Tabs";var vH=rk((function(e,t){const n=function(){const e=cH(),t=iH(),{selectedIndex:n,orientation:r}=e,o="horizontal"===r,a="vertical"===r,[s,l]=i.exports.useState((()=>o?{left:0,width:0}:a?{top:0,height:0}:void 0)),[c,u]=i.exports.useState(!1);return Xu((()=>{if(null==n)return;const e=t.item(n);if(null==e)return;o&&l({left:e.node.offsetLeft,width:e.node.offsetWidth}),a&&l({top:e.node.offsetTop,height:e.node.offsetHeight});const r=requestAnimationFrame((()=>{u(!0)}));return()=>{r&&cancelAnimationFrame(r)}}),[n,o,a,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:c?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...s}}(),r={...e.style,...n},o=gH();return F.createElement(sk.div,{ref:t,...e,className:nH("chakra-tabs__tab-indicator",e.className),style:r,__css:o.indicator})}));vH.displayName="TabIndicator";var yH=rk((function(e,t){const n=function(e){const{focusedIndex:t,orientation:n,direction:r}=cH(),o=iH(),a=i.exports.useCallback((e=>{const i=()=>{var e;const n=o.nextEnabled(t);n&&(null==(e=n.node)||e.focus())},a=()=>{var e;const n=o.prevEnabled(t);n&&(null==(e=n.node)||e.focus())},s="horizontal"===n,l="vertical"===n,c=e.key,u={["ltr"===r?"ArrowLeft":"ArrowRight"]:()=>s&&a(),["ltr"===r?"ArrowRight":"ArrowLeft"]:()=>s&&i(),ArrowDown:()=>l&&i(),ArrowUp:()=>l&&a(),Home:()=>{var e;const t=o.firstEnabled();t&&(null==(e=t.node)||e.focus())},End:()=>{var e;const t=o.lastEnabled();t&&(null==(e=t.node)||e.focus())}},d=u[c];d&&(e.preventDefault(),d(e))}),[o,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:rH(e.onKeyDown,a)}}({...e,ref:t}),r={display:"flex",...gH().tablist};return F.createElement(sk.div,{...n,className:nH("chakra-tabs__tablist",e.className),__css:r})}));yH.displayName="TabList";var bH=rk((function(e,t){const n=function(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:o}=cH(),{isSelected:a,id:s,tabId:l}=dH(),c=i.exports.useRef(!1);return a&&(c.current=!0),{tabIndex:0,...n,children:XN({wasSelected:c.current,isSelected:a,enabled:r,mode:o})?t:null,role:"tabpanel","aria-labelledby":l,hidden:!a,id:s}}({...e,ref:t}),r=gH();return F.createElement(sk.div,{outline:"0",...n,className:nH("chakra-tabs__tab-panel",e.className),__css:r.tabpanel})}));bH.displayName="TabPanel";var xH=rk((function(e,t){const n=function(e){const t=cH(),{id:n,selectedIndex:r}=t,o=EM(e.children).map(((e,t)=>i.exports.createElement(uH,{key:t,value:{isSelected:t===r,id:fH(n,t),tabId:hH(n,t),selectedIndex:r}},e)));return{...e,children:o}}(e),r=gH();return F.createElement(sk.div,{...n,width:"100%",ref:t,className:nH("chakra-tabs__tab-panels",e.className),__css:r.tabpanels})}));xH.displayName="TabPanels";var wH=rk((function(e,t){const n=gH(),r=function(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:o,isManual:i,id:a,setFocusedIndex:s,selectedIndex:l}=cH(),{index:c,register:u}=sH({disabled:t&&!n}),d=c===l;return{...JI({...r,ref:ck(u,e.ref),isDisabled:t,isFocusable:n,onClick:rH(e.onClick,(()=>{o(c)}))}),id:hH(a,c),role:"tab",tabIndex:d?0:-1,type:"button","aria-selected":d,"aria-controls":fH(a,c),onFocus:t?void 0:rH(e.onFocus,(()=>{s(c),!i&&(!t||!n)&&o(c)}))}}({...e,ref:t}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...n.tab};return F.createElement(sk.button,{...r,className:nH("chakra-tabs__tab",e.className),__css:o})}));wH.displayName="Tab";var kH=(...e)=>e.filter(Boolean).join(" ");var SH=["h","minH","height","minHeight"],CH=rk(((e,t)=>{const n=ik("Textarea",e),{className:r,rows:o,...i}=df(e),a=qM(i),s=o?function(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}(n,SH):n;return F.createElement(sk.textarea,{ref:t,rows:o,...a,className:kH("chakra-textarea",r),__css:s})}));function _H(e,...t){return EH(e)?e(...t):e}CH.displayName="Textarea";var EH=e=>"function"==typeof e;function LH(e,t){const n=e??"bottom",r={"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(null==r?void 0:r[t])??n}var PH=(e,t)=>e.find((e=>e.id===t));function OH(e,t){const n=TH(e,t);return{position:n,index:n?e[n].findIndex((e=>e.id===t)):-1}}function TH(e,t){for(const[n,r]of Object.entries(e))if(PH(r,t))return n}function MH(e){return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:"top"===e||"bottom"===e?"0 auto":void 0,top:e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,bottom:e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,right:e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",left:e.includes("right")?void 0:"env(safe-area-inset-left, 0px)"}}var AH=function(e){let t=e;const n=new Set,r=e=>{t=e(t),n.forEach((e=>e()))};return{getState:()=>t,subscribe:t=>(n.add(t),()=>{r((()=>e)),n.delete(t)}),removeToast:(e,t)=>{r((n=>({...n,[t]:n[t].filter((t=>t.id!=e))})))},notify:(e,t)=>{const n=function(e,t={}){IH+=1;const n=t.id??IH,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>AH.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}(e,t),{position:o,id:i}=n;return r((e=>{const t=o.includes("top")?[n,...e[o]??[]]:[...e[o]??[],n];return{...e,[o]:t}})),i},update:(e,t)=>{e&&r((n=>{const r={...n},{position:o,index:i}=OH(r,e);return o&&-1!==i&&(r[o][i]={...r[o][i],...t,message:NH(t)}),r}))},closeAll:({positions:e}={})=>{r((t=>(e??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce(((e,n)=>(e[n]=t[n].map((e=>({...e,requestClose:!0}))),e)),{...t})))},close:e=>{r((t=>{const n=TH(t,e);return n?{...t,[n]:t[n].map((t=>t.id==e?{...t,requestClose:!0}:t))}:t}))},isActive:e=>Boolean(OH(AH.getState(),e).position)}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]});var IH=0;var RH=e=>{const{status:t,variant:n="solid",id:r,title:o,isClosable:i,onClose:a,description:s,icon:l}=e,c=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return F.createElement(bM,{addRole:!1,status:t,variant:n,id:null==c?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},sd(wM,{children:l}),F.createElement(sk.div,{flex:"1",maxWidth:"100%"},o&&sd(kM,{id:null==c?void 0:c.title,children:o}),s&&sd(xM,{id:null==c?void 0:c.description,display:"block",children:s})),i&&sd(AA,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function NH(e={}){const{render:t,toastComponent:n=RH}=e;return r=>"function"==typeof t?t({...r,...e}):sd(n,{...r,...e})}function DH(e){const{theme:t}=Yw();return i.exports.useMemo((()=>function(e,t){const n=n=>({...t,...n,position:LH((null==n?void 0:n.position)??(null==t?void 0:t.position),e)}),r=e=>{const t=n(e),r=NH(t);return AH.notify(r,t)};return r.update=(e,t)=>{AH.update(e,n(t))},r.promise=(e,t)=>{const n=r({...t.loading,status:"loading",duration:null});e.then((e=>r.update(n,{status:"success",duration:5e3,..._H(t.success,e)}))).catch((e=>r.update(n,{status:"error",duration:5e3,..._H(t.error,e)})))},r.closeAll=AH.closeAll,r.close=AH.close,r.isActive=AH.isActive,r}(t.direction,e)),[e,t.direction])}var zH={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return"bottom"===t&&(r=1),{opacity:0,[n]:24*r}},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]}}},BH=i.exports.memo((e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:o,requestClose:a=!1,position:s="bottom",duration:l=5e3,containerStyle:c,motionVariants:u=zH,toastSpacing:d="0.5rem"}=e,[h,f]=i.exports.useState(l),p=ME();tA((()=>{p||null==r||r()}),[p]),tA((()=>{f(l)}),[l]);const g=()=>{p&&o()};i.exports.useEffect((()=>{p&&a&&o()}),[p,a,o]),function(e,t){const n=Sk(e);i.exports.useEffect((()=>{if(null==t)return;let e=null;return e=window.setTimeout((()=>{n()}),t),()=>{e&&window.clearTimeout(e)}}),[t,n])}(g,h);const m=i.exports.useMemo((()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:d,...c})),[c,d]),v=i.exports.useMemo((()=>function(e){let t="center";return e.includes("right")&&(t="flex-end"),e.includes("left")&&(t="flex-start"),{display:"flex",flexDirection:"column",alignItems:t}}(s)),[s]);return F.createElement(oT.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:()=>f(null),onHoverEnd:()=>f(l),custom:{position:s},style:v},F.createElement(sk.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:m},_H(n,{id:t,onClose:g})))}));BH.displayName="ToastComponent";var jH=e=>{const t=i.exports.useSyncExternalStore(AH.subscribe,AH.getState,AH.getState),{children:n,motionVariants:r,component:o=BH,portalProps:a}=e,s=Object.keys(t).map((e=>{const n=t[e];return sd("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${e}`,style:MH(e),children:sd(dT,{initial:!1,children:n.map((e=>sd(o,{motionVariants:r,...e},e.id)))})},e)}));return ld(ad,{children:[n,sd(aD,{...a,children:s})]})};var FH={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 HH(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}var WH=e=>{var t;return(null==(t=e.current)?void 0:t.ownerDocument)||document},$H=e=>{var t,n;return(null==(n=null==(t=e.current)?void 0:t.ownerDocument)?void 0:n.defaultView)||window};function UH(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:o,closeOnScroll:a,closeOnPointerDown:s=o,closeOnEsc:l=!0,onOpen:c,onClose:u,placement:d,id:h,isOpen:f,defaultIsOpen:p,arrowSize:g=10,arrowShadowColor:m,arrowPadding:v,modifiers:y,isDisabled:b,gutter:x,offset:w,direction:k,...S}=e,{isOpen:C,onOpen:_,onClose:E}=ZN({isOpen:f,defaultIsOpen:p,onOpen:c,onClose:u}),{referenceRef:L,getPopperProps:P,getArrowInnerProps:O,getArrowProps:T}=GN({enabled:C,placement:d,arrowPadding:v,modifiers:y,gutter:x,offset:w,direction:k}),M=i.exports.useId(),A=`tooltip-${h??M}`,I=i.exports.useRef(null),R=i.exports.useRef(),N=i.exports.useCallback((()=>{R.current&&(clearTimeout(R.current),R.current=void 0)}),[]),D=i.exports.useRef(),z=i.exports.useCallback((()=>{D.current&&(clearTimeout(D.current),D.current=void 0)}),[]),B=i.exports.useCallback((()=>{z(),E()}),[E,z]),j=function(e,t){return i.exports.useEffect((()=>{const n=WH(e);return n.addEventListener(VH,t),()=>n.removeEventListener(VH,t)}),[t,e]),()=>{const t=WH(e),n=$H(e);t.dispatchEvent(new n.CustomEvent(VH))}}(I,B),F=i.exports.useCallback((()=>{if(!b&&!R.current){j();const e=$H(I);R.current=e.setTimeout(_,t)}}),[j,b,_,t]),H=i.exports.useCallback((()=>{N();const e=$H(I);D.current=e.setTimeout(B,n)}),[n,B,N]),W=i.exports.useCallback((()=>{C&&r&&H()}),[r,H,C]),$=i.exports.useCallback((()=>{C&&s&&H()}),[s,H,C]),U=i.exports.useCallback((e=>{C&&"Escape"===e.key&&H()}),[C,H]);VA((()=>WH(I)),"keydown",l?U:void 0),VA((()=>WH(I)),"scroll",(()=>{C&&a&&B()})),i.exports.useEffect((()=>{b&&(N(),C&&E())}),[b,C,E,N]),i.exports.useEffect((()=>()=>{N(),z()}),[N,z]),VA((()=>I.current),"pointerleave",H);const V=i.exports.useCallback(((e={},t=null)=>{const n={...e,ref:ck(I,t,L),onPointerEnter:HH(e.onPointerEnter,(e=>{"touch"!==e.pointerType&&F()})),onClick:HH(e.onClick,W),onPointerDown:HH(e.onPointerDown,$),onFocus:HH(e.onFocus,F),onBlur:HH(e.onBlur,H),"aria-describedby":C?A:void 0};return n}),[F,H,$,C,A,W,L]),G=i.exports.useCallback(((e={},t=null)=>P({...e,style:{...e.style,[AN.arrowSize.var]:g?`${g}px`:void 0,[AN.arrowShadowColor.var]:m}},t)),[P,g,m]),q=i.exports.useCallback(((e={},t=null)=>{const n={...e.style,position:"relative",transformOrigin:AN.transformOrigin.varRef};return{ref:t,...S,...e,id:A,role:"tooltip",style:n}}),[S,A]);return{isOpen:C,show:F,hide:H,getTriggerProps:V,getTooltipProps:q,getTooltipPositionerProps:G,getArrowProps:T,getArrowInnerProps:O}}var VH="chakra-ui:close-tooltip";var GH=sk(oT.div),qH=rk(((e,t)=>{const n=ik("Tooltip",e),r=df(e),o=Zw(),{children:a,label:s,shouldWrapChildren:l,"aria-label":c,hasArrow:u,bg:d,portalProps:h,background:f,backgroundColor:p,bgColor:g,motionProps:m,...v}=r,y=f??p??d??g;if(y){n.bg=y;const e=function(e,t,n){var r,o;return(null==(o=null==(r=e.__cssMap)?void 0:r[`${t}.${n}`])?void 0:o.varRef)??n}(o,"colors",y);n[AN.arrowBg.var]=e}const b=UH({...v,direction:o.direction});let x;if("string"==typeof a||l)x=F.createElement(sk.span,{display:"inline-block",tabIndex:0,...b.getTriggerProps()},a);else{const e=i.exports.Children.only(a);x=i.exports.cloneElement(e,b.getTriggerProps(e.props,e.ref))}const w=!!c,k=b.getTooltipProps({},t),S=w?function(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}(k,["role","id"]):k,C=function(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}(k,["role","id"]);return s?ld(ad,{children:[x,sd(dT,{children:b.isOpen&&F.createElement(aD,{...h},F.createElement(sk.div,{...b.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ld(GH,{variants:FH,initial:"exit",animate:"enter",exit:"exit",...m,...S,__css:n,children:[s,w&&F.createElement(sk.span,{srOnly:!0,...C},c),u&&F.createElement(sk.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},F.createElement(sk.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):sd(ad,{children:a})}));qH.displayName="Tooltip";var ZH=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:o=!0,theme:i={},environment:a,cssVarsRoot:s}=e,l=sd(KI,{environment:a,children:t});return sd(Xw,{theme:i,cssVarsRoot:s,children:ld(vd,{colorModeManager:n,options:i.config,children:[sd(o?UA:$A,{}),sd(Qw,{}),r?sd(JN,{zIndex:r,children:l}):l]})})};function YH({children:e,theme:t=Hw,toastOptions:n,...r}){return ld(ZH,{theme:t,...r,children:[e,sd(jH,{...n})]})}function XH(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function KH(e){return!!e&&!!e[zW]}function QH(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===BW}(e)||Array.isArray(e)||!!e[DW]||!!(null===(t=e.constructor)||void 0===t?void 0:t[DW])||oW(e)||iW(e))}function JH(e,t,n){void 0===n&&(n=!1),0===eW(e)?(n?Object.keys:jW)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function eW(e){var t=e[zW];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:oW(e)?2:iW(e)?3:0}function tW(e,t){return 2===eW(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function nW(e,t,n){var r=eW(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function rW(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function oW(e){return AW&&e instanceof Map}function iW(e){return IW&&e instanceof Set}function aW(e){return e.o||e.t}function sW(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=FW(e);delete t[zW];for(var n=jW(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function lW(e,t){return void 0===t&&(t=!1),uW(e)||KH(e)||!QH(e)||(eW(e)>1&&(e.set=e.add=e.clear=e.delete=cW),Object.freeze(e),t&&JH(e,(function(e,t){return lW(t,!0)}),!0)),e}function cW(){XH(2)}function uW(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function dW(e){var t=HW[e];return t||XH(18,e),t}function hW(){return TW}function fW(e,t){t&&(dW("Patches"),e.u=[],e.s=[],e.v=t)}function pW(e){gW(e),e.p.forEach(vW),e.p=null}function gW(e){e===TW&&(TW=e.l)}function mW(e){return TW={p:[],l:TW,h:e,m:!0,_:0}}function vW(e){var t=e[zW];0===t.i||1===t.i?t.j():t.O=!0}function yW(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||dW("ES5").S(t,e,r),r?(n[zW].P&&(pW(t),XH(4)),QH(e)&&(e=bW(t,e),t.l||wW(t,e)),t.u&&dW("Patches").M(n[zW].t,e,t.u,t.s)):e=bW(t,n,[]),pW(t),t.u&&t.v(t.u,t.s),e!==NW?e:void 0}function bW(e,t,n){if(uW(t))return t;var r=t[zW];if(!r)return JH(t,(function(o,i){return xW(e,r,t,o,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return wW(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=sW(r.k):r.o;JH(3===r.i?new Set(o):o,(function(t,i){return xW(e,r,o,t,i,n)})),wW(e,o,!1),n&&e.u&&dW("Patches").R(r,n,e.u,e.s)}return r.o}function xW(e,t,n,r,o,i){if(KH(o)){var a=bW(e,o,i&&t&&3!==t.i&&!tW(t.D,r)?i.concat(r):void 0);if(nW(n,r,a),!KH(a))return;e.m=!1}if(QH(o)&&!uW(o)){if(!e.h.F&&e._<1)return;bW(e,o),t&&t.A.l||wW(e,o)}}function wW(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&lW(t,n)}function kW(e,t){var n=e[zW];return(n?aW(n):e)[t]}function SW(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 CW(e){e.P||(e.P=!0,e.l&&CW(e.l))}function _W(e){e.o||(e.o=sW(e.t))}function EW(e,t,n){var r=oW(t)?dW("MapSet").N(t,n):iW(t)?dW("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:hW(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=WW;n&&(o=[r],i=$W);var a=Proxy.revocable(o,i),s=a.revoke,l=a.proxy;return r.k=l,r.j=s,l}(t,n):dW("ES5").J(t,n);return(n?n.A:hW()).p.push(r),r}function LW(e){return KH(e)||XH(22,e),function e(t){if(!QH(t))return t;var n,r=t[zW],o=eW(t);if(r){if(!r.P&&(r.i<4||!dW("ES5").K(r)))return r.t;r.I=!0,n=PW(t,o),r.I=!1}else n=PW(t,o);return JH(n,(function(t,o){r&&function(e,t){return 2===eW(e)?e.get(t):e[t]}(r.t,t)===o||nW(n,t,e(o))})),3===o?new Set(n):n}(e)}function PW(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return sW(e)}var OW,TW,MW="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),AW="undefined"!=typeof Map,IW="undefined"!=typeof Set,RW="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,NW=MW?Symbol.for("immer-nothing"):((OW={})["immer-nothing"]=!0,OW),DW=MW?Symbol.for("immer-draftable"):"__$immer_draftable",zW=MW?Symbol.for("immer-state"):"__$immer_state",BW=""+Object.prototype.constructor,jW="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,FW=Object.getOwnPropertyDescriptors||function(e){var t={};return jW(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},HW={},WW={get:function(e,t){if(t===zW)return e;var n=aW(e);if(!tW(n,t))return function(e,t,n){var r,o=SW(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!QH(r)?r:r===kW(e.t,t)?(_W(e),e.o[t]=EW(e.A.h,r,e)):r},has:function(e,t){return t in aW(e)},ownKeys:function(e){return Reflect.ownKeys(aW(e))},set:function(e,t,n){var r=SW(aW(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=kW(aW(e),t),i=null==o?void 0:o[zW];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(rW(n,o)&&(void 0!==n||tW(e.t,t)))return!0;_W(e),CW(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==kW(e.t,t)||t in e.t?(e.D[t]=!1,_W(e),CW(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=aW(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){XH(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){XH(12)}},$W={};JH(WW,(function(e,t){$W[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),$W.deleteProperty=function(e,t){return $W.set.call(this,e,t,void 0)},$W.set=function(e,t,n){return WW.set.call(this,e[0],t,n,e[0])};var UW=function(){function e(e){var t=this;this.g=RW,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var i=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return i.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(a))}))}}var a;if("function"!=typeof n&&XH(6),void 0!==r&&"function"!=typeof r&&XH(7),QH(e)){var s=mW(t),l=EW(t,e,void 0),c=!0;try{a=n(l),c=!1}finally{c?pW(s):gW(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return fW(s,r),yW(e,s)}),(function(e){throw pW(s),e})):(fW(s,r),yW(a,s))}if(!e||"object"!=typeof e){if(void 0===(a=n(e))&&(a=e),a===NW&&(a=void 0),t.F&&lW(a,!0),r){var u=[],d=[];dW("Patches").M(e,a,u,d),r(u,d)}return a}XH(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(o))}))};var r,o,i=t.produce(e,n,(function(e,t){r=e,o=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,r,o]})):[i,r,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){QH(e)||XH(8),KH(e)&&(e=LW(e));var t=mW(this),n=EW(this,e,void 0);return n[zW].C=!0,gW(t),n},t.finishDraft=function(e,t){var n=(e&&e[zW]).A;return fW(n,t),yW(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!RW&&XH(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=dW("Patches").$;return KH(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),VW=new UW,GW=VW.produce;function qW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qW(Object(n),!0).forEach((function(t){DD(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function YW(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}VW.produceWithPatches.bind(VW),VW.setAutoFreeze.bind(VW),VW.setUseProxies.bind(VW),VW.applyPatches.bind(VW),VW.createDraft.bind(VW),VW.finishDraft.bind(VW);var XW="function"==typeof Symbol&&Symbol.observable||"@@observable",KW=function(){return Math.random().toString(36).substring(7).split("").join(".")},QW={INIT:"@@redux/INIT"+KW(),REPLACE:"@@redux/REPLACE"+KW(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+KW()}};function JW(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function e$(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(YW(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(YW(1));return n(e$)(e,t)}if("function"!=typeof e)throw new Error(YW(2));var o=e,i=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function u(){if(l)throw new Error(YW(3));return i}function d(e){if("function"!=typeof e)throw new Error(YW(4));if(l)throw new Error(YW(5));var t=!0;return c(),s.push(e),function(){if(t){if(l)throw new Error(YW(6));t=!1,c();var n=s.indexOf(e);s.splice(n,1),a=null}}}function h(e){if(!JW(e))throw new Error(YW(7));if(void 0===e.type)throw new Error(YW(8));if(l)throw new Error(YW(9));try{l=!0,i=o(i,e)}finally{l=!1}for(var t=a=s,n=0;n<t.length;n++){(0,t[n])()}return e}function f(e){if("function"!=typeof e)throw new Error(YW(10));o=e,h({type:QW.REPLACE})}function p(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(YW(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[XW]=function(){return this},e}return h({type:QW.INIT}),(r={dispatch:h,subscribe:d,getState:u,replaceReducer:f})[XW]=p,r}function t$(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}var i,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:QW.INIT}))throw new Error(YW(12));if(void 0===n(void 0,{type:QW.PROBE_UNKNOWN_ACTION()}))throw new Error(YW(13))}))}(n)}catch(T2){i=T2}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var r=!1,o={},s=0;s<a.length;s++){var l=a[s],c=n[l],u=e[l],d=c(u,t);if(void 0===d)throw t&&t.type,new Error(YW(14));o[l]=d,r=r||d!==u}return(r=r||a.length!==Object.keys(e).length)?o:e}}function n$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function r$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(YW(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return r=n$.apply(void 0,i)(n.dispatch),ZW(ZW({},n),{},{dispatch:r})}}}var o$="NOT_FOUND";var i$=function(e,t){return e===t};function a$(e,t){var n,r,o="object"==typeof t?t:{equalityCheck:t},i=o.equalityCheck,a=void 0===i?i$:i,s=o.maxSize,l=void 0===s?1:s,c=o.resultEqualityCheck,u=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}(a),d=1===l?(n=u,{get:function(e){return r&&n(r.key,e)?r.value:o$},put:function(e,t){r={key:e,value:t}},getEntries:function(){return r?[r]:[]},clear:function(){r=void 0}}):function(e,t){var n=[];function r(e){var r=n.findIndex((function(n){return t(e,n.key)}));if(r>-1){var o=n[r];return r>0&&(n.splice(r,1),n.unshift(o)),o.value}return o$}return{get:r,put:function(t,o){r(t)===o$&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(l,u);function h(){var t=d.get(arguments);if(t===o$){if(t=e.apply(null,arguments),c){var n=d.getEntries(),r=n.find((function(e){return c(e.value,t)}));r&&(t=r.value)}d.put(arguments,t)}return t}return h.clearCache=function(){return d.clear()},h}function s$(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function l$(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var i,a=0,s={memoizeOptions:void 0},l=r.pop();if("object"==typeof l&&(s=l,l=r.pop()),"function"!=typeof l)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof l+"]");var c=s,u=c.memoizeOptions,d=void 0===u?n:u,h=Array.isArray(d)?d:[d],f=s$(r),p=e.apply(void 0,[function(){return a++,l.apply(null,arguments)}].concat(h)),g=e((function(){for(var e=[],t=f.length,n=0;n<t;n++)e.push(f[n].apply(null,arguments));return i=p.apply(null,e)}));return Object.assign(g,{resultFunc:l,memoizedResultFunc:p,dependencies:f,lastResult:function(){return i},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),g};return o}var c$=l$(a$);function u$(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var d$=u$();d$.withExtraArgument=u$;const h$=d$;var f$=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p$=globalThis&&globalThis.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(T2){i=[6,T2],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},g$=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},m$=Object.defineProperty,v$=Object.defineProperties,y$=Object.getOwnPropertyDescriptors,b$=Object.getOwnPropertySymbols,x$=Object.prototype.hasOwnProperty,w$=Object.prototype.propertyIsEnumerable,k$=function(e,t,n){return t in e?m$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},S$=function(e,t){for(var n in t||(t={}))x$.call(t,n)&&k$(e,n,t[n]);if(b$)for(var r=0,o=b$(t);r<o.length;r++){n=o[r];w$.call(t,n)&&k$(e,n,t[n])}return e},C$=function(e,t){return v$(e,y$(t))},_$="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?n$:n$.apply(null,arguments)};var E$=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return f$(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,g$([void 0],e[0].concat(this)))):new(t.bind.apply(t,g$([void 0],e.concat(this))))},t}(Array);function L$(e){return QH(e)?GW(e,(function(){})):e}function P$(){return function(e){return function(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t;e.immutableCheck,e.serializableCheck;var r=new E$;n&&(!function(e){return"boolean"==typeof e}(n)?r.push(h$.withExtraArgument(n.extraArgument)):r.push(h$));return r}(e)}}function O$(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var o=t.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return S$(S$({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:n[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(t){return t.type===e},n}function T$(e){var t,n={},r=[],o={addCase:function(e,t){var r="string"==typeof e?e:e.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=t,o},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),o},addDefaultCase:function(e){return t=e,o}};return e(o),[n,r,t]}function M$(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof e.initialState?e.initialState:L$(e.initialState),o=e.reducers||{},i=Object.keys(o),a={},s={},l={};function c(){var t="function"==typeof e.extraReducers?T$(e.extraReducers):[e.extraReducers],n=t[0],o=void 0===n?{}:n,i=t[1],a=void 0===i?[]:i,l=t[2],c=void 0===l?void 0:l,u=S$(S$({},o),s);return function(e,t,n,r){void 0===n&&(n=[]);var o,i="function"==typeof t?T$(t):[t,n,r],a=i[0],s=i[1],l=i[2];if(function(e){return"function"==typeof e}(e))o=function(){return L$(e())};else{var c=L$(e);o=function(){return c}}function u(e,t){void 0===e&&(e=o());var n=g$([a[t.type]],s.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return!!e})).length&&(n=[l]),n.reduce((function(e,n){if(n){var r;if(KH(e))return void 0===(r=n(e,t))?e:r;if(QH(e))return GW(e,(function(e){return n(e,t)}));if(void 0===(r=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return e}),e)}return u.getInitialState=o,u}(r,(function(e){for(var t in u)e.addCase(t,u[t]);for(var n=0,r=a;n<r.length;n++){var o=r[n];e.addMatcher(o.matcher,o.reducer)}c&&e.addDefaultCase(c)}))}return i.forEach((function(e){var n,r,i=o[e],c=function(e,t){return e+"/"+t}(t,e);"reducer"in i?(n=i.reducer,r=i.prepare):n=i,a[e]=n,s[c]=n,l[e]=r?O$(c,r):O$(c)})),{name:t,reducer:function(e,t){return n||(n=c()),n(e,t)},actions:l,caseReducers:a,getInitialState:function(){return n||(n=c()),n.getInitialState()}}}var A$=["name","message","stack","code"],I$=function(e,t){this.payload=e,this.meta=t},R$=function(e,t){this.payload=e,this.meta=t},N$=function(e){if("object"==typeof e&&null!==e){for(var t={},n=0,r=A$;n<r.length;n++){var o=r[n];"string"==typeof e[o]&&(t[o]=e[o])}return t}return{message:String(e)}};function D$(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}!function(){function e(e,t,n){var r=O$(e+"/fulfilled",(function(e,t,n,r){return{payload:e,meta:C$(S$({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),o=O$(e+"/pending",(function(e,t,n){return{payload:void 0,meta:C$(S$({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),i=O$(e+"/rejected",(function(e,t,r,o,i){return{payload:o,error:(n&&n.serializeError||N$)(e||"Rejected"),meta:C$(S$({},i||{}),{arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){},e}();return Object.assign((function(e){return function(s,l,c){var u,d=(null==n?void 0:n.idGenerator)?n.idGenerator(e):function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t}(),h=new a,f=new Promise((function(e,t){return h.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:u||"Aborted"})}))})),p=!1;function g(e){p&&(u=e,h.abort())}var m=function(){return a=this,u=null,m=function(){var a,u,m,v,y;return p$(this,(function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),function(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}(v=null==(a=null==n?void 0:n.condition)?void 0:a.call(n,e,{getState:l,extra:c}))?[4,v]:[3,2];case 1:v=b.sent(),b.label=2;case 2:if(!1===v)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return p=!0,s(o(d,e,null==(u=null==n?void 0:n.getPendingMeta)?void 0:u.call(n,{requestId:d,arg:e},{getState:l,extra:c}))),[4,Promise.race([f,Promise.resolve(t(e,{dispatch:s,getState:l,extra:c,requestId:d,signal:h.signal,abort:g,rejectWithValue:function(e,t){return new I$(e,t)},fulfillWithValue:function(e,t){return new R$(e,t)}})).then((function(t){if(t instanceof I$)throw t;return t instanceof R$?r(t.payload,d,e,t.meta):r(t,d,e)}))])];case 3:return m=b.sent(),[3,5];case 4:return y=b.sent(),m=y instanceof I$?i(null,d,e,y.payload,y.meta):i(y,d,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&i.match(m)&&m.meta.condition||s(m),[2,m]}}))},new Promise((function(e,t){var n=function(e){try{o(m.next(e))}catch(T2){t(T2)}},r=function(e){try{o(m.throw(e))}catch(T2){t(T2)}},o=function(t){return t.done?e(t.value):Promise.resolve(t.value).then(n,r)};o((m=m.apply(a,u)).next())}));var a,u,m}();return Object.assign(m,{abort:g,requestId:d,arg:e,unwrap:function(){return m.then(D$)}})}}),{pending:o,rejected:i,fulfilled:r,typePrefix:e})}e.withTypes=e}();var z$="listenerMiddleware";O$(z$+"/add"),O$(z$+"/removeAll"),O$(z$+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:global),function(){function e(e,t){var n=o[e];return n?n.enumerable=t:o[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[zW];return WW.get(t,e)},set:function(t){var n=this[zW];WW.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var o=e[t][zW];if(!o.P)switch(o.i){case 5:r(o)&&CW(o);break;case 4:n(o)&&CW(o)}}}function n(e){for(var t=e.t,n=e.k,r=jW(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==zW){var a=t[i];if(void 0===a&&!tW(t,i))return!0;var s=n[i],l=s&&s[zW];if(l?l.t!==a:!rW(s,a))return!0}}var c=!!t[zW];return r.length!==jW(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var o={};!function(e,t){HW[e]||(HW[e]=t)}("ES5",{J:function(t,n){var r=Array.isArray(t),o=function(t,n){if(t){for(var r=Array(n.length),o=0;o<n.length;o++)Object.defineProperty(r,""+o,e(o,!0));return r}var i=FW(n);delete i[zW];for(var a=jW(i),s=0;s<a.length;s++){var l=a[s];i[l]=e(l,t||!!i[l].enumerable)}return Object.create(Object.getPrototypeOf(n),i)}(r,t),i={i:r?5:4,A:n?n.A:hW(),P:!1,I:!1,D:{},l:n,t:t,k:o,o:null,O:!1,C:!1};return Object.defineProperty(o,zW,{value:i,writable:!0}),o},S:function(e,n,o){o?KH(n)&&n[zW].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[zW];if(n){var o=n.t,i=n.k,a=n.D,s=n.i;if(4===s)JH(i,(function(t){t!==zW&&(void 0!==o[t]||tW(o,t)?a[t]||e(i[t]):(a[t]=!0,CW(n)))})),JH(o,(function(e){void 0!==i[e]||tW(i,e)||(a[e]=!1,CW(n))}));else if(5===s){if(r(n)&&(CW(n),a.length=!0),i.length<o.length)for(var l=i.length;l<o.length;l++)a[l]=!1;else for(var c=o.length;c<i.length;c++)a[c]=!0;for(var u=Math.min(i.length,o.length),d=0;d<u;d++)i.hasOwnProperty(d)||(a[d]=!0),void 0===a[d]&&e(i[d])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}();var B$="persist:",j$="persist/FLUSH",F$="persist/REHYDRATE",H$="persist/PAUSE",W$="persist/PERSIST",$$="persist/PURGE",U$="persist/REGISTER";function V$(e){return V$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V$(e)}function G$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z$(e,t,n,r){r.debug;var o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G$(n,!0).forEach((function(t){q$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G$(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n);return e&&"object"===V$(e)&&Object.keys(e).forEach((function(r){"_persist"!==r&&t[r]===n[r]&&(o[r]=e[r])})),o}function Y$(e){var t,n=e.blacklist||null,r=e.whitelist||null,o=e.transforms||[],i=e.throttle||0,a=e.debounce||0,s="".concat(void 0!==e.keyPrefix?e.keyPrefix:B$).concat(e.key),l=e.storage;t=!1===e.serialize?function(e){return e}:"function"==typeof e.serialize?e.serialize:X$;var c=e.writeFailHandler||null,u={},d={},h=[],f=null,p=null;let g=0;function m(){if(0===h.length)return f&&clearInterval(f),void(f=null);var e=h.shift(),n=o.reduce((function(t,n){return n.in(t,e,u)}),u[e]);if(void 0!==n)try{d[e]=t(n)}catch($le){console.error("redux-persist/createPersistoid: error serializing state",$le)}else delete d[e];0===h.length&&(Object.keys(d).forEach((function(e){void 0===u[e]&&delete d[e]})),p=l.setItem(s,t(d)).catch(y))}function v(e){return(!r||-1!==r.indexOf(e)||"_persist"===e)&&(!n||-1===n.indexOf(e))}function y(e){c&&c(e)}return{update:function(e){clearTimeout(g),g=setTimeout((()=>{Object.keys(e).forEach((function(t){v(t)&&u[t]!==e[t]&&-1===h.indexOf(t)&&h.push(t)})),Object.keys(u).forEach((function(t){void 0===e[t]&&v(t)&&-1===h.indexOf(t)&&void 0!==u[t]&&h.push(t)})),null===f&&(f=setInterval(m,i)),u=e}),a)},flush:function(){for(;0!==h.length;)m();return p||Promise.resolve()}}}function X$(e){return JSON.stringify(e)}function K$(e){var t,n=e.transforms||[],r="".concat(void 0!==e.keyPrefix?e.keyPrefix:B$).concat(e.key),o=e.storage;return e.debug,t=!1===e.deserialize?function(e){return e}:"function"==typeof e.deserialize?e.deserialize:Q$,o.getItem(r).then((function(e){if(e)try{var r={},o=t(e);return Object.keys(o).forEach((function(e){r[e]=n.reduceRight((function(t,n){return n.out(t,e,o)}),t(o[e]))})),r}catch($le){throw $le}}))}function Q$(e){return JSON.parse(e)}function J$(e){0}function eU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eU(n,!0).forEach((function(t){nU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eU(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rU(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function oU(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function iU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iU(n,!0).forEach((function(t){sU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iU(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lU={registry:[],bootstrapped:!1},cU=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:lU,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case U$:return aU({},e,{registry:[].concat(oU(e.registry),[t.key])});case F$:var n=e.registry.indexOf(t.key),r=oU(e.registry);return r.splice(n,1),aU({},e,{registry:r,bootstrapped:0===r.length});default:return e}};var uU={},dU={};function hU(e){return hU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hU(e)}function fU(){}dU.__esModule=!0,dU.default=function(e){var t="".concat(e,"Storage");return function(e){if("object"!==("undefined"==typeof self?"undefined":hU(self))||!(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(T2){return!1}return!0}(t)?self[t]:pU};var pU={getItem:fU,setItem:fU,removeItem:fU};uU.__esModule=!0,uU.default=function(e){var t=(0,mU.default)(e);return{getItem:function(e){return new Promise((function(n,r){n(t.getItem(e))}))},setItem:function(e,n){return new Promise((function(r,o){r(t.setItem(e,n))}))},removeItem:function(e){return new Promise((function(n,r){n(t.removeItem(e))}))}}};var gU,mU=(gU=dU)&&gU.__esModule?gU:{default:gU};var vU,yU=function(e){return e&&e.__esModule?e:{default:e}}(uU);vU=(0,yU.default)("local");var bU={},xU={},wU={};Object.defineProperty(wU,"__esModule",{value:!0}),wU.PLACEHOLDER_UNDEFINED=wU.PACKAGE_NAME=void 0,wU.PACKAGE_NAME="redux-deep-persist",wU.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var kU={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,(t=e.ConfigType||(e.ConfigType={}))[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(kU),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=wU,n=kU;e.isObjectLike=function(e){return"object"==typeof e&&null!==e};e.isLength=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Number.MAX_SAFE_INTEGER},e.isArray=Array.isArray||function(t){return(0,e.isLength)(t&&t.length)&&"[object Array]"===Object.prototype.toString.call(t)};e.isPlainObject=function(t){return!!t&&"object"==typeof t&&!(0,e.isArray)(t)};e.isIntegerString=function(e){return String(~~e)===e&&Number(e)>=0};e.isString=function(e){return"[object String]"===Object.prototype.toString.call(e)};e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)};e.isEmpty=function(e){return 0===Object.keys(e).length};const r=Object.prototype.hasOwnProperty;e.getCircularPath=function(t,n,r){r||(r=new Set([t])),n||(n="");for(const o in t){const i=n?`${n}.${o}`:o,a=t[o];if((0,e.isObjectLike)(a))return r.has(a)?`${n}.${o}:<Circular>`:(r.add(a),(0,e.getCircularPath)(a,i,r))}return null};e._cloneDeep=function(t){if(!(0,e.isObjectLike)(t))return t;if((0,e.isDate)(t))return new Date(+t);const n=(0,e.isArray)(t)?[]:{};for(const r in t){const o=t[r];n[r]=(0,e._cloneDeep)(o)}return n};e.cloneDeep=function(n){const r=(0,e.getCircularPath)(n);if(r)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${r}' of object you're trying to persist: ${n}`);return(0,e._cloneDeep)(n)};e.difference=function(t,n){if(t===n)return{};if(!(0,e.isObjectLike)(t)||!(0,e.isObjectLike)(n))return n;const o=(0,e.cloneDeep)(t),i=(0,e.cloneDeep)(n),a=Object.keys(o).reduce(((e,t)=>(r.call(i,t)||(e[t]=void 0),e)),{});if((0,e.isDate)(o)||(0,e.isDate)(i))return o.valueOf()===i.valueOf()?{}:i;const s=Object.keys(i).reduce(((t,n)=>{if(!r.call(o,n))return t[n]=i[n],t;const a=(0,e.difference)(o[n],i[n]);return(0,e.isObjectLike)(a)&&(0,e.isEmpty)(a)&&!(0,e.isDate)(a)?(0,e.isArray)(o)&&!(0,e.isArray)(i)||!(0,e.isArray)(o)&&(0,e.isArray)(i)?i:t:(t[n]=a,t)}),a);return delete s._persist,s};e.path=function(t,n){return n.reduce(((t,n)=>{if(t){const r=parseInt(n,10),o=(0,e.isIntegerString)(n)&&r<0?t.length+r:n;return(0,e.isString)(t)?t.charAt(o):t[o]}}),t)};e.assocPath=function(t,n){const r=[...t].reverse().reduce(((t,r,o)=>{const i=(0,e.isIntegerString)(r)?[]:{};return i[r]=0===o?n:t,i}),{});return r};e.dissocPath=function(t,n){const r=(0,e.cloneDeep)(t);return n.reduce(((t,r,o)=>(o===n.length-1&&t&&(0,e.isObjectLike)(t)&&delete t[r],t&&t[r])),r),r};const o=function(n,r,...i){if(!i||!i.length)return r;const a=i.shift(),{preservePlaceholder:s,preserveUndefined:l}=n;if((0,e.isObjectLike)(r)&&(0,e.isObjectLike)(a))for(const c in a)if((0,e.isObjectLike)(a[c])&&(0,e.isObjectLike)(r[c]))r[c]||(r[c]={}),o(n,r[c],a[c]);else if((0,e.isArray)(r)){let e=a[c];const n=s?t.PLACEHOLDER_UNDEFINED:void 0;l||(e=void 0!==e?e:r[parseInt(c,10)]),e=e!==t.PLACEHOLDER_UNDEFINED?e:n,r[parseInt(c,10)]=e}else{const e=a[c]!==t.PLACEHOLDER_UNDEFINED?a[c]:void 0;r[c]=e}return o(n,r,...i)};e.mergeDeep=function(t,n,r){return o({preservePlaceholder:null==r?void 0:r.preservePlaceholder,preserveUndefined:null==r?void 0:r.preserveUndefined},(0,e.cloneDeep)(t),(0,e.cloneDeep)(n))};const i=function(r,o=[],a,s,l){if(!(0,e.isObjectLike)(r))return r;for(const c in r){const u=r[c],d=(0,e.isArray)(r),h=s?s+"."+c:c;null===u&&(a===n.ConfigType.WHITELIST&&-1===o.indexOf(h)||a===n.ConfigType.BLACKLIST&&-1!==o.indexOf(h))&&d&&(r[parseInt(c,10)]=void 0),void 0===u&&l&&a===n.ConfigType.BLACKLIST&&-1===o.indexOf(h)&&d&&(r[parseInt(c,10)]=t.PLACEHOLDER_UNDEFINED),i(u,o,a,h,l)}};e.preserveUndefined=function(t,n,r,o){const a=(0,e.cloneDeep)(t);return i(a,n,r,"",o),a};e.unique=function(e,t,n){return n.indexOf(e)===t};e.findDuplicatesAndSubsets=function(t){return t.reduce(((n,r)=>{const o=t.filter((e=>e===r)),i=t.filter((e=>0===(r+".").indexOf(e+"."))),{duplicates:a,subsets:s}=n,l=o.length>1&&-1===a.indexOf(r),c=i.length>1;return{duplicates:[...a,...l?o:[]],subsets:[...s,...c?i:[]].filter(e.unique).sort()}}),{duplicates:[],subsets:[]})};e.singleTransformValidator=function(r,o,i){const a=i===n.ConfigType.WHITELIST?"whitelist":"blacklist",s=`${t.PACKAGE_NAME}: incorrect ${a} configuration.`,l=`Check your create${i===n.ConfigType.WHITELIST?"White":"Black"}list arguments.\n\n`;if(!(0,e.isString)(o)||o.length<1)throw new Error(`${s} Name (key) of reducer is required. ${l}`);if(!r||!r.length)return;const{duplicates:c,subsets:u}=(0,e.findDuplicatesAndSubsets)(r);if(c.length>1)throw new Error(`${s} Duplicated paths.\n\n ${JSON.stringify(c)}\n\n ${l}`);if(u.length>1)throw new Error(`${s} You are trying to persist an entire property and also some of its subset.\n\n${JSON.stringify(u)}\n\n ${l}`)};e.transformsValidator=function(n){if(!(0,e.isArray)(n))return;const r=(null==n?void 0:n.map((e=>e.deepPersistKey)).filter((e=>e)))||[];if(r.length){const e=r.filter(((e,t)=>r.indexOf(e)!==t));if(e.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.\n\n Duplicates: ${JSON.stringify(e)}`)}};e.configValidator=function({whitelist:n,blacklist:r}){if(n&&n.length&&r&&r.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(n){const{duplicates:t,subsets:r}=(0,e.findDuplicatesAndSubsets)(n);(0,e.throwError)({duplicates:t,subsets:r},"whitelist")}if(r){const{duplicates:t,subsets:n}=(0,e.findDuplicatesAndSubsets)(r);(0,e.throwError)({duplicates:t,subsets:n},"blacklist")}};e.throwError=function({duplicates:e,subsets:n},r){if(e.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${r}.\n\n ${JSON.stringify(e)}`);if(n.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${r}. You must decide if you want to persist an entire path or its specific subset.\n\n ${JSON.stringify(n)}`)};e.getRootKeysGroup=function(t){return(0,e.isArray)(t)?t.filter(e.unique).reduce(((e,t)=>{const n=t.split("."),r=n[0],o=n.slice(1).join(".")||void 0,i=e.filter((e=>Object.keys(e)[0]===r))[0],a=i?Object.values(i)[0]:void 0;return i||e.push({[r]:o?[o]:void 0}),i&&!a&&o&&(i[r]=[o]),i&&a&&o&&a.push(o),e}),[]):[]}}(xU),function(e){var t=r&&r.__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(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.getPersistConfig=e.getTransforms=e.createBlacklist=e.createWhitelist=e.autoMergeDeep=void 0;const n=xU,o=wU,i=kU,a=function(e,t,n={}){const r=n.whitelist||null,o=n.blacklist||null;function i(e){return!(!r||-1!==r.indexOf(e))||!(!o||-1===o.indexOf(e))}return{in:(t,n,r)=>!i(n)&&e?e(t,n,r):t,out:(e,n,r)=>!i(n)&&t?t(e,n,r):e,deepPersistKey:r&&r[0]}};e.autoMergeDeep=(e,t,r,{debug:i,whitelist:a,blacklist:s,transforms:l})=>{if(a||s)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)(l);const c=(0,n.cloneDeep)(r);let u=e;if(u&&(0,n.isObjectLike)(u)){const a=(0,n.difference)(t,r);(0,n.isEmpty)(a)||(u=(0,n.mergeDeep)(e,a,{preserveUndefined:!0}),i&&console.log(`${o.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(a)}`)),Object.keys(u).forEach((e=>{"_persist"!==e&&((0,n.isObjectLike)(c[e])?c[e]=(0,n.mergeDeep)(c[e],u[e]):c[e]=u[e])}))}return i&&u&&(0,n.isObjectLike)(u)&&console.log(`${o.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(u)}`),c};e.createWhitelist=(e,t)=>((0,n.singleTransformValidator)(t,e,i.ConfigType.WHITELIST),a((e=>{if(!t||!t.length)return e;let r,i=null;return t.forEach((t=>{const a=t.split(".");r=(0,n.path)(e,a),void 0===r&&(0,n.isIntegerString)(a[a.length-1])&&(r=o.PLACEHOLDER_UNDEFINED);const s=(0,n.assocPath)(a,r),l=(0,n.isArray)(s)?[]:{};i=(0,n.mergeDeep)(i||l,s,{preservePlaceholder:!0})})),i||e}),(e=>(0,n.preserveUndefined)(e,t,i.ConfigType.WHITELIST)),{whitelist:[e]}));e.createBlacklist=(e,t)=>((0,n.singleTransformValidator)(t,e,i.ConfigType.BLACKLIST),a((e=>{if(!t||!t.length)return;const r=(0,n.preserveUndefined)(e,t,i.ConfigType.BLACKLIST,!0);return t.map((e=>e.split("."))).reduce(((e,t)=>(0,n.dissocPath)(e,t)),r)}),(e=>(0,n.preserveUndefined)(e,t,i.ConfigType.BLACKLIST)),{whitelist:[e]}));e.getTransforms=function(t,n){return n.map((n=>{const r=Object.keys(n)[0],o=n[r];return t===i.ConfigType.WHITELIST?(0,e.createWhitelist)(r,o):(0,e.createBlacklist)(r,o)}))};e.getPersistConfig=r=>{var{key:o,whitelist:a,blacklist:s,storage:l,transforms:c,rootReducer:u}=r,d=t(r,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:a,blacklist:s});const h=(0,n.getRootKeysGroup)(a),f=(0,n.getRootKeysGroup)(s),p=Object.keys(u(void 0,{type:""})),g=h.map((e=>Object.keys(e)[0])),m=f.map((e=>Object.keys(e)[0])),v=p.filter((e=>-1===g.indexOf(e)&&-1===m.indexOf(e))),y=(0,e.getTransforms)(i.ConfigType.WHITELIST,h),b=(0,e.getTransforms)(i.ConfigType.BLACKLIST,f),x=(0,n.isArray)(a)?v.map((t=>(0,e.createBlacklist)(t))):[];return Object.assign(Object.assign({},d),{key:o,storage:l,transforms:[...y,...b,...x,...c||[]],stateReconciler:e.autoMergeDeep})}}(bU);const SU=e=>1===e.length?e[0].prompt:e.map((e=>`${e.prompt}:${e.weight}`)).join(" "),CU=e=>"string"==typeof e?Boolean((e=>{const t=e.split(",").map((e=>e.split(":"))),n=t.map((e=>({seed:Number(e[0]),weight:Number(e[1])})));return!!CU(n)&&n})(e)):Boolean(e.length&&!e.some((e=>{const{seed:t,weight:n}=e,r=!isNaN(parseInt(t.toString(),10)),o=!isNaN(parseInt(n.toString(),10))&&n>=0&&n<=1;return!(r&&o)}))),_U=e=>e.reduce(((e,t,n,r)=>{const{seed:o,weight:i}=t;return e+=`${o}:${i}`,n!==r.length-1&&(e+=","),e}),""),EU=["txt2img","img2img","unifiedCanvas","nodes","postprocess","training"],LU={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,shouldUseCanvasBetaLayout:!1},PU=M$({name:"options",initialState:LU,reducers:{setPrompt:(e,t)=>{const n=t.payload;e.prompt="string"==typeof n?n:SU(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,o={...e,[n]:r};return"seed"===n&&(o.shouldRandomizeSeed=!1),o},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:o,variations:i,steps:a,cfg_scale:s,threshold:l,perlin:c,seamless:u,hires_fix:d,width:h,height:f}=t.payload.image;i&&i.length>0?(e.seedWeights=_U(i),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),r&&(e.prompt=SU(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),e.threshold=void 0===l?0:l,c&&(e.perlin=c),void 0===c&&(e.perlin=0),"boolean"==typeof u&&(e.seamless=u),"boolean"==typeof d&&(e.hiresFix=d),h&&(e.width=h),f&&(e.height=f)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:o,init_image_path:i,mask_image_path:a}=t.payload.image;"img2img"===n&&(i&&(e.initialImage=i),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),"boolean"==typeof o&&(e.shouldFitToWidthHeight=o))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:o,seed:i,variations:a,steps:s,cfg_scale:l,threshold:c,perlin:u,seamless:d,hires_fix:h,width:f,height:p,strength:g,fit:m,init_image_path:v,mask_image_path:y}=t.payload.image;"img2img"===n&&(v&&(e.initialImage=v),y&&(e.maskPath=y),g&&(e.img2imgStrength=g),"boolean"==typeof m&&(e.shouldFitToWidthHeight=m)),a&&a.length>0?(e.seedWeights=_U(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),o&&(e.prompt=SU(o)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),c&&(e.threshold=c),void 0===c&&(e.threshold=0),u&&(e.perlin=u),void 0===u&&(e.perlin=0),"boolean"==typeof d&&(e.seamless=d),"boolean"==typeof h&&(e.hiresFix=h),f&&(e.width=f),p&&(e.height=p),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...LU}),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)=>{"number"==typeof t.payload?e.activeTab=t.payload:e.activeTab=EU.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},setShouldUseCanvasBetaLayout:(e,t)=>{e.shouldUseCanvasBetaLayout=t.payload}}}),{clearInitialImage:OU,resetOptionsState:TU,resetSeed:MU,setActiveTab:AU,setAllImageToImageParameters:IU,setAllParameters:RU,setAllTextToImageParameters:NU,setCfgScale:DU,setCodeformerFidelity:zU,setCurrentTheme:BU,setFacetoolStrength:jU,setFacetoolType:FU,setHeight:HU,setHiresFix:WU,setImg2imgStrength:$U,setInfillMethod:UU,setInitialImage:VU,setIsLightBoxOpen:GU,setIterations:qU,setMaskPath:ZU,setOptionsPanelScrollPosition:YU,setParameter:XU,setPerlin:KU,setPrompt:QU,setSampler:JU,setSeamBlur:eV,setSeamless:tV,setSeamSize:nV,setSeamSteps:rV,setSeamStrength:oV,setSeed:iV,setSeedWeights:aV,setShouldFitToWidthHeight:sV,setShouldGenerateVariations:lV,setShouldHoldOptionsPanelOpen:cV,setShouldLoopback:uV,setShouldPinOptionsPanel:dV,setShouldRandomizeSeed:hV,setShouldRunESRGAN:fV,setShouldRunFacetool:pV,setShouldShowImageDetails:gV,setShouldShowOptionsPanel:mV,setShowAdvancedOptions:vV,setShowDualDisplay:yV,setSteps:bV,setThreshold:xV,setTileSize:wV,setUpscalingLevel:kV,setUpscalingStrength:SV,setVariationAmount:CV,setWidth:_V,setShouldUseCanvasBetaLayout:EV}=PU.actions,LV=PU.reducer;var PV={exports:{}};
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/!function(e,t){(function(){var n,o="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,l=32,c=64,u=128,d=256,h=1/0,f=9007199254740991,p=NaN,g=4294967295,m=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",l],["partialRight",c],["rearg",d]],v="[object Arguments]",y="[object Array]",b="[object Boolean]",x="[object Date]",w="[object Error]",k="[object Function]",S="[object GeneratorFunction]",C="[object Map]",_="[object Number]",E="[object Object]",L="[object Promise]",P="[object RegExp]",O="[object Set]",T="[object String]",M="[object Symbol]",A="[object WeakMap]",I="[object ArrayBuffer]",R="[object DataView]",N="[object Float32Array]",D="[object Float64Array]",z="[object Int8Array]",B="[object Int16Array]",j="[object Int32Array]",F="[object Uint8Array]",H="[object Uint8ClampedArray]",W="[object Uint16Array]",$="[object Uint32Array]",U=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,Y=RegExp(q.source),X=RegExp(Z.source),K=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(re.source),ie=/^\s+/,ae=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",Ce="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Le="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Oe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Te="[']",Me="["+Se+"]",Ae="["+Oe+"]",Ie="["+Ce+"]",Re="\\d+",Ne="["+_e+"]",De="["+Ee+"]",ze="[^"+Se+Oe+Re+_e+Ee+Le+"]",Be="\\ud83c[\\udffb-\\udfff]",je="[^"+Se+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",We="["+Le+"]",$e="\\u200d",Ue="(?:"+De+"|"+ze+")",Ve="(?:"+We+"|"+ze+")",Ge="(?:['](?:d|ll|m|re|s|t|ve))?",qe="(?:['](?:D|LL|M|RE|S|T|VE))?",Ze="(?:"+Ie+"|"+Be+")"+"?",Ye="["+Pe+"]?",Xe=Ye+Ze+("(?:"+$e+"(?:"+[je,Fe,He].join("|")+")"+Ye+Ze+")*"),Ke="(?:"+[Ne,Fe,He].join("|")+")"+Xe,Qe="(?:"+[je+Ie+"?",Ie,Fe,He,Me].join("|")+")",Je=RegExp(Te,"g"),et=RegExp(Ie,"g"),tt=RegExp(Be+"(?="+Be+")|"+Qe+Xe,"g"),nt=RegExp([We+"?"+De+"+"+Ge+"(?="+[Ae,We,"$"].join("|")+")",Ve+"+"+qe+"(?="+[Ae,We+Ue,"$"].join("|")+")",We+"?"+Ue+"+"+Ge,We+"+"+qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Ke].join("|"),"g"),rt=RegExp("["+$e+Se+Ce+Pe+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["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"],at=-1,st={};st[N]=st[D]=st[z]=st[B]=st[j]=st[F]=st[H]=st[W]=st[$]=!0,st[v]=st[y]=st[I]=st[b]=st[R]=st[x]=st[w]=st[k]=st[C]=st[_]=st[E]=st[P]=st[O]=st[T]=st[A]=!1;var lt={};lt[v]=lt[y]=lt[I]=lt[R]=lt[b]=lt[x]=lt[N]=lt[D]=lt[z]=lt[B]=lt[j]=lt[C]=lt[_]=lt[E]=lt[P]=lt[O]=lt[T]=lt[M]=lt[F]=lt[H]=lt[W]=lt[$]=!0,lt[w]=lt[k]=lt[A]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,dt=parseInt,ht="object"==typeof r&&r&&r.Object===Object&&r,ft="object"==typeof self&&self&&self.Object===Object&&self,pt=ht||ft||Function("return this")(),gt=t&&!t.nodeType&&t,mt=gt&&e&&!e.nodeType&&e,vt=mt&&mt.exports===gt,yt=vt&&ht.process,bt=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(T2){}}(),xt=bt&&bt.isArrayBuffer,wt=bt&&bt.isDate,kt=bt&&bt.isMap,St=bt&&bt.isRegExp,Ct=bt&&bt.isSet,_t=bt&&bt.isTypedArray;function Et(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Lt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ot(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Mt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function At(e,t){return!!(null==e?0:e.length)&&Wt(e,t,0)>-1}function It(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Nt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Dt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function zt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var jt=Gt("length");function Ft(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Ht(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Wt(e,t,n){return t==t?function(e,t,n){var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Ht(e,Ut,n)}function $t(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Ut(e){return e!=e}function Vt(e,t){var n=null==e?0:e.length;return n?Yt(e,t)/n:p}function Gt(e){return function(t){return null==t?n:t[e]}}function qt(e){return function(t){return null==e?n:e[t]}}function Zt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Yt(e,t){for(var r,o=-1,i=e.length;++o<i;){var a=t(e[o]);a!==n&&(r=r===n?a:r+a)}return r}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Kt(e){return e?e.slice(0,mn(e)+1).replace(ie,""):e}function Qt(e){return function(t){return e(t)}}function Jt(e,t){return Rt(t,(function(t){return e[t]}))}function en(e,t){return e.has(t)}function tn(e,t){for(var n=-1,r=e.length;++n<r&&Wt(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length;n--&&Wt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var on=qt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),an=qt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(e){return"\\"+ct[e]}function ln(e){return rt.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function un(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,i[o++]=n)}return i}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return ln(e)?function(e){var t=tt.lastIndex=0;for(;tt.test(e);)++t;return t}(e):jt(e)}function gn(e){return ln(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function mn(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var vn=qt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yn=function e(t){var r,ae=(t=null==t?pt:yn.defaults(pt.Object(),t,yn.pick(pt,it))).Array,Se=t.Date,Ce=t.Error,_e=t.Function,Ee=t.Math,Le=t.Object,Pe=t.RegExp,Oe=t.String,Te=t.TypeError,Me=ae.prototype,Ae=_e.prototype,Ie=Le.prototype,Re=t["__core-js_shared__"],Ne=Ae.toString,De=Ie.hasOwnProperty,ze=0,Be=(r=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",je=Ie.toString,Fe=Ne.call(Le),He=pt._,We=Pe("^"+Ne.call(De).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=vt?t.Buffer:n,Ue=t.Symbol,Ve=t.Uint8Array,Ge=$e?$e.allocUnsafe:n,qe=un(Le.getPrototypeOf,Le),Ze=Le.create,Ye=Ie.propertyIsEnumerable,Xe=Me.splice,Ke=Ue?Ue.isConcatSpreadable:n,Qe=Ue?Ue.iterator:n,tt=Ue?Ue.toStringTag:n,rt=function(){try{var e=pi(Le,"defineProperty");return e({},"",{}),e}catch(T2){}}(),ct=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ht=Se&&Se.now!==pt.Date.now&&Se.now,ft=t.setTimeout!==pt.setTimeout&&t.setTimeout,gt=Ee.ceil,mt=Ee.floor,yt=Le.getOwnPropertySymbols,bt=$e?$e.isBuffer:n,jt=t.isFinite,qt=Me.join,bn=un(Le.keys,Le),xn=Ee.max,wn=Ee.min,kn=Se.now,Sn=t.parseInt,Cn=Ee.random,_n=Me.reverse,En=pi(t,"DataView"),Ln=pi(t,"Map"),Pn=pi(t,"Promise"),On=pi(t,"Set"),Tn=pi(t,"WeakMap"),Mn=pi(Le,"create"),An=Tn&&new Tn,In={},Rn=Hi(En),Nn=Hi(Ln),Dn=Hi(Pn),zn=Hi(On),Bn=Hi(Tn),jn=Ue?Ue.prototype:n,Fn=jn?jn.valueOf:n,Hn=jn?jn.toString:n;function Wn(e){if(os(e)&&!qa(e)&&!(e instanceof Gn)){if(e instanceof Vn)return e;if(De.call(e,"__wrapped__"))return Wi(e)}return new Vn(e)}var $n=function(){function e(){}return function(t){if(!rs(t))return{};if(Ze)return Ze(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Un(){}function Vn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Gn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Xn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Yn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Zn(e);this.size=t.size}function Qn(e,t){var n=qa(e),r=!n&&Ga(e),o=!n&&!r&&Ka(e),i=!n&&!r&&!o&&hs(e),a=n||r||o||i,s=a?Xt(e.length,Oe):[],l=s.length;for(var c in e)!t&&!De.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||wi(c,l))||s.push(c);return s}function Jn(e){var t=e.length;return t?e[Xr(0,t-1)]:n}function er(e,t){return Bi(Ao(e),cr(t,0,e.length))}function tr(e){return Bi(Ao(e))}function nr(e,t,r){(r!==n&&!$a(e[t],r)||r===n&&!(t in e))&&sr(e,t,r)}function rr(e,t,r){var o=e[t];De.call(e,t)&&$a(o,r)&&(r!==n||t in e)||sr(e,t,r)}function or(e,t){for(var n=e.length;n--;)if($a(e[n][0],t))return n;return-1}function ir(e,t,n,r){return pr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function ar(e,t){return e&&Io(t,Rs(t),e)}function sr(e,t,n){"__proto__"==t&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function lr(e,t){for(var r=-1,o=t.length,i=ae(o),a=null==e;++r<o;)i[r]=a?n:Os(e,t[r]);return i}function cr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function ur(e,t,r,o,i,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=i?r(e,o,i,a):r(e)),s!==n)return s;if(!rs(e))return e;var d=qa(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Ao(e,s)}else{var h=vi(e),f=h==k||h==S;if(Ka(e))return Eo(e,l);if(h==E||h==v||f&&!i){if(s=c||f?{}:bi(e),!l)return c?function(e,t){return Io(e,mi(e),t)}(e,function(e,t){return e&&Io(t,Ns(t),e)}(s,e)):function(e,t){return Io(e,gi(e),t)}(e,ar(s,e))}else{if(!lt[h])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case I:return Lo(e);case b:case x:return new r(+e);case R:return function(e,t){var n=t?Lo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case D:case z:case B:case j:case F:case H:case W:case $:return Po(e,n);case C:return new r;case _:case T:return new r(e);case P:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return new r;case M:return o=e,Fn?Le(Fn.call(o)):{}}var o}(e,h,l)}}a||(a=new Kn);var p=a.get(e);if(p)return p;a.set(e,s),cs(e)?e.forEach((function(n){s.add(ur(n,t,r,n,e,a))})):is(e)&&e.forEach((function(n,o){s.set(o,ur(n,t,r,o,e,a))}));var g=d?n:(u?c?si:ai:c?Ns:Rs)(e);return Pt(g||e,(function(n,o){g&&(n=e[o=n]),rr(s,o,ur(n,t,r,o,e,a))})),s}function dr(e,t,r){var o=r.length;if(null==e)return!o;for(e=Le(e);o--;){var i=r[o],a=t[i],s=e[i];if(s===n&&!(i in e)||!a(s))return!1}return!0}function hr(e,t,r){if("function"!=typeof e)throw new Te(o);return Ri((function(){e.apply(n,r)}),t)}function fr(e,t,n,r){var o=-1,i=At,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Rt(t,Qt(n))),r?(i=It,a=!1):t.length>=200&&(i=en,a=!1,t=new Xn(t));e:for(;++o<s;){var u=e[o],d=null==n?u:n(u);if(u=r||0!==u?u:0,a&&d==d){for(var h=c;h--;)if(t[h]===d)continue e;l.push(u)}else i(t,d,r)||l.push(u)}return l}Wn.templateSettings={escape:K,evaluate:Q,interpolate:J,variable:"",imports:{_:Wn}},Wn.prototype=Un.prototype,Wn.prototype.constructor=Wn,Vn.prototype=$n(Un.prototype),Vn.prototype.constructor=Vn,Gn.prototype=$n(Un.prototype),Gn.prototype.constructor=Gn,qn.prototype.clear=function(){this.__data__=Mn?Mn(null):{},this.size=0},qn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qn.prototype.get=function(e){var t=this.__data__;if(Mn){var r=t[e];return r===i?n:r}return De.call(t,e)?t[e]:n},qn.prototype.has=function(e){var t=this.__data__;return Mn?t[e]!==n:De.call(t,e)},qn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Mn&&t===n?i:t,this},Zn.prototype.clear=function(){this.__data__=[],this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=or(t,e);return!(n<0)&&(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,!0)},Zn.prototype.get=function(e){var t=this.__data__,r=or(t,e);return r<0?n:t[r][1]},Zn.prototype.has=function(e){return or(this.__data__,e)>-1},Zn.prototype.set=function(e,t){var n=this.__data__,r=or(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(Ln||Zn),string:new qn}},Yn.prototype.delete=function(e){var t=hi(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return hi(this,e).get(e)},Yn.prototype.has=function(e){return hi(this,e).has(e)},Yn.prototype.set=function(e,t){var n=hi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Xn.prototype.add=Xn.prototype.push=function(e){return this.__data__.set(e,i),this},Xn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Zn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Zn){var r=n.__data__;if(!Ln||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yn(r)}return n.set(e,t),this.size=n.size,this};var pr=Do(kr),gr=Do(Sr,!0);function mr(e,t){var n=!0;return pr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function vr(e,t,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(l===n?s==s&&!ds(s):r(s,l)))var l=s,c=a}return c}function yr(e,t){var n=[];return pr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function br(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=xi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?br(s,t-1,n,r,o):Nt(o,s):r||(o[o.length]=s)}return o}var xr=zo(),wr=zo(!0);function kr(e,t){return e&&xr(e,t,Rs)}function Sr(e,t){return e&&wr(e,t,Rs)}function Cr(e,t){return Mt(t,(function(t){return es(e[t])}))}function _r(e,t){for(var r=0,o=(t=ko(t,e)).length;null!=e&&r<o;)e=e[Fi(t[r++])];return r&&r==o?e:n}function Er(e,t,n){var r=t(e);return qa(e)?r:Nt(r,n(e))}function Lr(e){return null==e?e===n?"[object Undefined]":"[object Null]":tt&&tt in Le(e)?function(e){var t=De.call(e,tt),r=e[tt];try{e[tt]=n;var o=!0}catch(T2){}var i=je.call(e);o&&(t?e[tt]=r:delete e[tt]);return i}(e):function(e){return je.call(e)}(e)}function Pr(e,t){return e>t}function Or(e,t){return null!=e&&De.call(e,t)}function Tr(e,t){return null!=e&&t in Le(e)}function Mr(e,t,r){for(var o=r?It:At,i=e[0].length,a=e.length,s=a,l=ae(a),c=1/0,u=[];s--;){var d=e[s];s&&t&&(d=Rt(d,Qt(t))),c=wn(d.length,c),l[s]=!r&&(t||i>=120&&d.length>=120)?new Xn(s&&d):n}d=e[0];var h=-1,f=l[0];e:for(;++h<i&&u.length<c;){var p=d[h],g=t?t(p):p;if(p=r||0!==p?p:0,!(f?en(f,g):o(u,g,r))){for(s=a;--s;){var m=l[s];if(!(m?en(m,g):o(e[s],g,r)))continue e}f&&f.push(g),u.push(p)}}return u}function Ar(e,t,r){var o=null==(e=Ti(e,t=ko(t,e)))?e:e[Fi(Ji(t))];return null==o?n:Et(o,e,r)}function Ir(e){return os(e)&&Lr(e)==v}function Rr(e,t,r,o,i){return e===t||(null==e||null==t||!os(e)&&!os(t)?e!=e&&t!=t:function(e,t,r,o,i,a){var s=qa(e),l=qa(t),c=s?y:vi(e),u=l?y:vi(t),d=(c=c==v?E:c)==E,h=(u=u==v?E:u)==E,f=c==u;if(f&&Ka(e)){if(!Ka(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new Kn),s||hs(e)?oi(e,t,r,o,i,a):function(e,t,n,r,o,i,a){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!i(new Ve(e),new Ve(t)));case b:case x:case _:return $a(+e,+t);case w:return e.name==t.name&&e.message==t.message;case P:case T:return e==t+"";case C:var s=cn;case O:var l=1&r;if(s||(s=hn),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=oi(s(e),s(t),r,o,i,a);return a.delete(e),u;case M:if(Fn)return Fn.call(e)==Fn.call(t)}return!1}(e,t,c,r,o,i,a);if(!(1&r)){var p=d&&De.call(e,"__wrapped__"),g=h&&De.call(t,"__wrapped__");if(p||g){var m=p?e.value():e,k=g?t.value():t;return a||(a=new Kn),i(m,k,r,o,a)}}if(!f)return!1;return a||(a=new Kn),function(e,t,r,o,i,a){var s=1&r,l=ai(e),c=l.length,u=ai(t),d=u.length;if(c!=d&&!s)return!1;var h=c;for(;h--;){var f=l[h];if(!(s?f in t:De.call(t,f)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);var v=s;for(;++h<c;){var y=e[f=l[h]],b=t[f];if(o)var x=s?o(b,y,f,t,e,a):o(y,b,f,e,t,a);if(!(x===n?y===b||i(y,b,r,o,a):x)){m=!1;break}v||(v="constructor"==f)}if(m&&!v){var w=e.constructor,k=t.constructor;w==k||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof k&&k instanceof k||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,r,o,i,a)}(e,t,r,o,Rr,i))}function Nr(e,t,r,o){var i=r.length,a=i,s=!o;if(null==e)return!a;for(e=Le(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){var c=(l=r[i])[0],u=e[c],d=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var h=new Kn;if(o)var f=o(u,d,c,e,t,h);if(!(f===n?Rr(d,u,3,o,h):f))return!1}}return!0}function Dr(e){return!(!rs(e)||(t=e,Be&&Be in t))&&(es(e)?We:ve).test(Hi(e));var t}function zr(e){return"function"==typeof e?e:null==e?al:"object"==typeof e?qa(e)?$r(e[0],e[1]):Wr(e):gl(e)}function Br(e){if(!Ei(e))return bn(e);var t=[];for(var n in Le(e))De.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e){if(!rs(e))return function(e){var t=[];if(null!=e)for(var n in Le(e))t.push(n);return t}(e);var t=Ei(e),n=[];for(var r in e)("constructor"!=r||!t&&De.call(e,r))&&n.push(r);return n}function Fr(e,t){return e<t}function Hr(e,t){var n=-1,r=Ya(e)?ae(e.length):[];return pr(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Wr(e){var t=fi(e);return 1==t.length&&t[0][2]?Pi(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function $r(e,t){return Si(e)&&Li(t)?Pi(Fi(e),t):function(r){var o=Os(r,e);return o===n&&o===t?Ts(r,e):Rr(t,o,3)}}function Ur(e,t,r,o,i){e!==t&&xr(t,(function(a,s){if(i||(i=new Kn),rs(a))!function(e,t,r,o,i,a,s){var l=Ai(e,r),c=Ai(t,r),u=s.get(c);if(u)return void nr(e,r,u);var d=a?a(l,c,r+"",e,t,s):n,h=d===n;if(h){var f=qa(c),p=!f&&Ka(c),g=!f&&!p&&hs(c);d=c,f||p||g?qa(l)?d=l:Xa(l)?d=Ao(l):p?(h=!1,d=Eo(c,!0)):g?(h=!1,d=Po(c,!0)):d=[]:ss(c)||Ga(c)?(d=l,Ga(l)?d=xs(l):rs(l)&&!es(l)||(d=bi(c))):h=!1}h&&(s.set(c,d),i(d,c,o,a,s),s.delete(c));nr(e,r,d)}(e,t,s,r,Ur,o,i);else{var l=o?o(Ai(e,s),a,s+"",e,t,i):n;l===n&&(l=a),nr(e,s,l)}}),Ns)}function Vr(e,t){var r=e.length;if(r)return wi(t+=t<0?r:0,r)?e[t]:n}function Gr(e,t,n){t=t.length?Rt(t,(function(e){return qa(e)?function(t){return _r(t,1===e.length?e[0]:e)}:e})):[al];var r=-1;t=Rt(t,Qt(di()));var o=Hr(e,(function(e,n,o){var i=Rt(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,(function(e,t){return function(e,t,n){var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;for(;++r<a;){var l=Oo(o[r],i[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function qr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=_r(e,a);n(s,a)&&to(i,ko(a,e),s)}return i}function Zr(e,t,n,r){var o=r?$t:Wt,i=-1,a=t.length,s=e;for(e===t&&(t=Ao(t)),n&&(s=Rt(e,Qt(n)));++i<a;)for(var l=0,c=t[i],u=n?n(c):c;(l=o(s,u,l,r))>-1;)s!==e&&Xe.call(s,l,1),Xe.call(e,l,1);return e}function Yr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;wi(o)?Xe.call(e,o,1):po(e,o)}}return e}function Xr(e,t){return e+mt(Cn()*(t-e+1))}function Kr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=mt(t/2))&&(e+=e)}while(t);return n}function Qr(e,t){return Ni(Oi(e,t,al),e+"")}function Jr(e){return Jn($s(e))}function eo(e,t){var n=$s(e);return Bi(n,cr(t,0,n.length))}function to(e,t,r,o){if(!rs(e))return e;for(var i=-1,a=(t=ko(t,e)).length,s=a-1,l=e;null!=l&&++i<a;){var c=Fi(t[i]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var d=l[c];(u=o?o(d,c,l):n)===n&&(u=rs(d)?d:wi(t[i+1])?[]:{})}rr(l,c,u),l=l[c]}return e}var no=An?function(e,t){return An.set(e,t),e}:al,ro=rt?function(e,t){return rt(e,"toString",{configurable:!0,enumerable:!1,value:rl(t),writable:!0})}:al;function oo(e){return Bi($s(e))}function io(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=ae(o);++r<o;)i[r]=e[r+t];return i}function ao(e,t){var n;return pr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function so(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!ds(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return lo(e,t,al,n)}function lo(e,t,r,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=ds(t),u=t===n;i<a;){var d=mt((i+a)/2),h=r(e[d]),f=h!==n,p=null===h,g=h==h,m=ds(h);if(s)var v=o||g;else v=u?g&&(o||f):l?g&&f&&(o||!p):c?g&&f&&!p&&(o||!m):!p&&!m&&(o?h<=t:h<t);v?i=d+1:a=d}return wn(a,4294967294)}function co(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!$a(s,l)){var l=s;i[o++]=0===a?0:a}}return i}function uo(e){return"number"==typeof e?e:ds(e)?p:+e}function ho(e){if("string"==typeof e)return e;if(qa(e))return Rt(e,ho)+"";if(ds(e))return Hn?Hn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function fo(e,t,n){var r=-1,o=At,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=It;else if(i>=200){var c=t?null:Qo(e);if(c)return hn(c);a=!1,o=en,l=new Xn}else l=t?[]:s;e:for(;++r<i;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}function po(e,t){return null==(e=Ti(e,t=ko(t,e)))||delete e[Fi(Ji(t))]}function go(e,t,n,r){return to(e,t,n(_r(e,t)),r)}function mo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?io(e,r?0:i,r?i+1:o):io(e,r?i+1:0,r?o:i)}function vo(e,t){var n=e;return n instanceof Gn&&(n=n.value()),Dt(t,(function(e,t){return t.func.apply(t.thisArg,Nt([e],t.args))}),n)}function yo(e,t,n){var r=e.length;if(r<2)return r?fo(e[0]):[];for(var o=-1,i=ae(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=fr(i[o]||a,e[s],t,n));return fo(br(i,1),t,n)}function bo(e,t,r){for(var o=-1,i=e.length,a=t.length,s={};++o<i;){var l=o<a?t[o]:n;r(s,e[o],l)}return s}function xo(e){return Xa(e)?e:[]}function wo(e){return"function"==typeof e?e:al}function ko(e,t){return qa(e)?e:Si(e,t)?[e]:ji(ws(e))}var So=Qr;function Co(e,t,r){var o=e.length;return r=r===n?o:r,!t&&r>=o?e:io(e,t,r)}var _o=ct||function(e){return pt.clearTimeout(e)};function Eo(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function Lo(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Po(e,t){var n=t?Lo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var r=e!==n,o=null===e,i=e==e,a=ds(e),s=t!==n,l=null===t,c=t==t,u=ds(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||o&&s&&c||!r&&c||!i)return 1;if(!o&&!a&&!u&&e<t||u&&r&&i&&!o&&!a||l&&r&&i||!s&&i||!c)return-1}return 0}function To(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,c=xn(i-a,0),u=ae(l+c),d=!r;++s<l;)u[s]=t[s];for(;++o<a;)(d||o<i)&&(u[n[o]]=e[o]);for(;c--;)u[s++]=e[o++];return u}function Mo(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,c=t.length,u=xn(i-s,0),d=ae(u+c),h=!r;++o<u;)d[o]=e[o];for(var f=o;++l<c;)d[f+l]=t[l];for(;++a<s;)(h||o<i)&&(d[f+n[a]]=e[o++]);return d}function Ao(e,t){var n=-1,r=e.length;for(t||(t=ae(r));++n<r;)t[n]=e[n];return t}function Io(e,t,r,o){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=o?o(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),i?sr(r,l,c):rr(r,l,c)}return r}function Ro(e,t){return function(n,r){var o=qa(n)?Lt:ir,i=t?t():{};return o(n,e,di(r,2),i)}}function No(e){return Qr((function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:n,s=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,s&&ki(r[0],r[1],s)&&(a=i<3?n:a,i=1),t=Le(t);++o<i;){var l=r[o];l&&e(t,l,o,a)}return t}))}function Do(e,t){return function(n,r){if(null==n)return n;if(!Ya(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Le(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function zo(e){return function(t,n,r){for(var o=-1,i=Le(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}function Bo(e){return function(t){var r=ln(t=ws(t))?gn(t):n,o=r?r[0]:t.charAt(0),i=r?Co(r,1).join(""):t.slice(1);return o[e]()+i}}function jo(e){return function(t){return Dt(el(Gs(t).replace(Je,"")),e,"")}}function Fo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=$n(e.prototype),r=e.apply(n,t);return rs(r)?r:n}}function Ho(e){return function(t,r,o){var i=Le(t);if(!Ya(t)){var a=di(r,3);t=Rs(t),r=function(e){return a(i[e],e,i)}}var s=e(t,r,o);return s>-1?i[a?t[s]:s]:n}}function Wo(e){return ii((function(t){var r=t.length,i=r,a=Vn.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new Te(o);if(a&&!l&&"wrapper"==ci(s))var l=new Vn([],!0)}for(i=l?i:r;++i<r;){var c=ci(s=t[i]),u="wrapper"==c?li(s):n;l=u&&Ci(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[ci(u[0])].apply(l,u[3]):1==s.length&&Ci(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&qa(n))return l.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}}))}function $o(e,t,r,o,i,a,s,l,c,d){var h=t&u,f=1&t,p=2&t,g=24&t,m=512&t,v=p?n:Fo(e);return function n(){for(var u=arguments.length,y=ae(u),b=u;b--;)y[b]=arguments[b];if(g)var x=ui(n),w=rn(y,x);if(o&&(y=To(y,o,i,g)),a&&(y=Mo(y,a,s,g)),u-=w,g&&u<d){var k=dn(y,x);return Xo(e,t,$o,n.placeholder,r,y,k,l,c,d-u)}var S=f?r:this,C=p?S[e]:e;return u=y.length,l?y=Mi(y,l):m&&u>1&&y.reverse(),h&&c<u&&(y.length=c),this&&this!==pt&&this instanceof n&&(C=v||Fo(C)),C.apply(S,y)}}function Uo(e,t){return function(n,r){return function(e,t,n,r){return kr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Vo(e,t){return function(r,o){var i;if(r===n&&o===n)return t;if(r!==n&&(i=r),o!==n){if(i===n)return o;"string"==typeof r||"string"==typeof o?(r=ho(r),o=ho(o)):(r=uo(r),o=uo(o)),i=e(r,o)}return i}}function Go(e){return ii((function(t){return t=Rt(t,Qt(di())),Qr((function(n){var r=this;return e(t,(function(e){return Et(e,r,n)}))}))}))}function qo(e,t){var r=(t=t===n?" ":ho(t)).length;if(r<2)return r?Kr(t,e):t;var o=Kr(t,gt(e/pn(t)));return ln(t)?Co(gn(o),0,e).join(""):o.slice(0,e)}function Zo(e){return function(t,r,o){return o&&"number"!=typeof o&&ki(t,r,o)&&(r=o=n),t=ms(t),r===n?(r=t,t=0):r=ms(r),function(e,t,n,r){for(var o=-1,i=xn(gt((t-e)/(n||1)),0),a=ae(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,r,o=o===n?t<r?1:-1:ms(o),e)}}function Yo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=bs(t),n=bs(n)),e(t,n)}}function Xo(e,t,r,o,i,a,s,u,d,h){var f=8&t;t|=f?l:c,4&(t&=~(f?c:l))||(t&=-4);var p=[e,t,i,f?a:n,f?s:n,f?n:a,f?n:s,u,d,h],g=r.apply(n,p);return Ci(e)&&Ii(g,p),g.placeholder=o,Di(g,e,t)}function Ko(e){var t=Ee[e];return function(e,n){if(e=bs(e),(n=null==n?0:wn(vs(n),292))&&jt(e)){var r=(ws(e)+"e").split("e");return+((r=(ws(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Qo=On&&1/hn(new On([,-0]))[1]==h?function(e){return new On(e)}:dl;function Jo(e){return function(t){var n=vi(t);return n==C?cn(t):n==O?fn(t):function(e,t){return Rt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function ei(e,t,r,i,h,f,p,g){var m=2&t;if(!m&&"function"!=typeof e)throw new Te(o);var v=i?i.length:0;if(v||(t&=-97,i=h=n),p=p===n?p:xn(vs(p),0),g=g===n?g:vs(g),v-=h?h.length:0,t&c){var y=i,b=h;i=h=n}var x=m?n:li(e),w=[e,t,r,i,h,y,b,f,p,g];if(x&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,s=r==u&&8==n||r==u&&n==d&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!s)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?To(c,l,t[4]):l,e[4]=c?dn(e[3],a):t[4]}l=t[5],l&&(c=e[5],e[5]=c?Mo(c,l,t[6]):l,e[6]=c?dn(e[5],a):t[6]);l=t[7],l&&(e[7]=l);r&u&&(e[8]=null==e[8]?t[8]:wn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(w,x),e=w[0],t=w[1],r=w[2],i=w[3],h=w[4],!(g=w[9]=w[9]===n?m?0:e.length:xn(w[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)k=8==t||t==s?function(e,t,r){var o=Fo(e);return function i(){for(var a=arguments.length,s=ae(a),l=a,c=ui(i);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:dn(s,c);return(a-=u.length)<r?Xo(e,t,$o,i.placeholder,n,s,u,n,n,r-a):Et(this&&this!==pt&&this instanceof i?o:e,this,s)}}(e,t,g):t!=l&&33!=t||h.length?$o.apply(n,w):function(e,t,n,r){var o=1&t,i=Fo(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=ae(c+s),d=this&&this!==pt&&this instanceof t?i:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return Et(d,o?n:this,u)}}(e,t,r,i);else var k=function(e,t,n){var r=1&t,o=Fo(e);return function t(){return(this&&this!==pt&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,r);return Di((x?no:Ii)(k,w),e,t)}function ti(e,t,r,o){return e===n||$a(e,Ie[r])&&!De.call(o,r)?t:e}function ni(e,t,r,o,i,a){return rs(e)&&rs(t)&&(a.set(t,e),Ur(e,t,n,ni,a),a.delete(t)),e}function ri(e){return ss(e)?n:e}function oi(e,t,r,o,i,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var h=-1,f=!0,p=2&r?new Xn:n;for(a.set(e,t),a.set(t,e);++h<l;){var g=e[h],m=t[h];if(o)var v=s?o(m,g,h,t,e,a):o(g,m,h,e,t,a);if(v!==n){if(v)continue;f=!1;break}if(p){if(!Bt(t,(function(e,t){if(!en(p,t)&&(g===e||i(g,e,r,o,a)))return p.push(t)}))){f=!1;break}}else if(g!==m&&!i(g,m,r,o,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function ii(e){return Ni(Oi(e,n,Zi),e+"")}function ai(e){return Er(e,Rs,gi)}function si(e){return Er(e,Ns,mi)}var li=An?function(e){return An.get(e)}:dl;function ci(e){for(var t=e.name+"",n=In[t],r=De.call(In,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ui(e){return(De.call(Wn,"placeholder")?Wn:e).placeholder}function di(){var e=Wn.iteratee||sl;return e=e===sl?zr:e,arguments.length?e(arguments[0],arguments[1]):e}function hi(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function fi(e){for(var t=Rs(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Li(o)]}return t}function pi(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Dr(r)?r:n}var gi=yt?function(e){return null==e?[]:(e=Le(e),Mt(yt(e),(function(t){return Ye.call(e,t)})))}:yl,mi=yt?function(e){for(var t=[];e;)Nt(t,gi(e)),e=qe(e);return t}:yl,vi=Lr;function yi(e,t,n){for(var r=-1,o=(t=ko(t,e)).length,i=!1;++r<o;){var a=Fi(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&ns(o)&&wi(a,o)&&(qa(e)||Ga(e))}function bi(e){return"function"!=typeof e.constructor||Ei(e)?{}:$n(qe(e))}function xi(e){return qa(e)||Ga(e)||!!(Ke&&e&&e[Ke])}function wi(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&be.test(e))&&e>-1&&e%1==0&&e<t}function ki(e,t,n){if(!rs(n))return!1;var r=typeof t;return!!("number"==r?Ya(n)&&wi(t,n.length):"string"==r&&t in n)&&$a(n[t],e)}function Si(e,t){if(qa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ds(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Le(t))}function Ci(e){var t=ci(e),n=Wn[t];if("function"!=typeof n||!(t in Gn.prototype))return!1;if(e===n)return!0;var r=li(n);return!!r&&e===r[0]}(En&&vi(new En(new ArrayBuffer(1)))!=R||Ln&&vi(new Ln)!=C||Pn&&vi(Pn.resolve())!=L||On&&vi(new On)!=O||Tn&&vi(new Tn)!=A)&&(vi=function(e){var t=Lr(e),r=t==E?e.constructor:n,o=r?Hi(r):"";if(o)switch(o){case Rn:return R;case Nn:return C;case Dn:return L;case zn:return O;case Bn:return A}return t});var _i=Re?es:bl;function Ei(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ie)}function Li(e){return e==e&&!rs(e)}function Pi(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in Le(r)))}}function Oi(e,t,r){return t=xn(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=xn(n.length-t,0),a=ae(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=ae(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),Et(e,this,s)}}function Ti(e,t){return t.length<2?e:_r(e,io(t,0,-1))}function Mi(e,t){for(var r=e.length,o=wn(t.length,r),i=Ao(e);o--;){var a=t[o];e[o]=wi(a,r)?i[a]:n}return e}function Ai(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ii=zi(no),Ri=ft||function(e,t){return pt.setTimeout(e,t)},Ni=zi(ro);function Di(e,t,n){var r=t+"";return Ni(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Pt(m,(function(n){var r="_."+n[0];t&n[1]&&!At(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ce):[]}(r),n)))}function zi(e){var t=0,r=0;return function(){var o=kn(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Bi(e,t){var r=-1,o=e.length,i=o-1;for(t=t===n?o:t;++r<t;){var a=Xr(r,i),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var ji=function(e){var t=za(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,n,r,o){t.push(r?o.replace(he,"$1"):n||e)})),t}));function Fi(e){if("string"==typeof e||ds(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Hi(e){if(null!=e){try{return Ne.call(e)}catch(T2){}try{return e+""}catch(T2){}}return""}function Wi(e){if(e instanceof Gn)return e.clone();var t=new Vn(e.__wrapped__,e.__chain__);return t.__actions__=Ao(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $i=Qr((function(e,t){return Xa(e)?fr(e,br(t,1,Xa,!0)):[]})),Ui=Qr((function(e,t){var r=Ji(t);return Xa(r)&&(r=n),Xa(e)?fr(e,br(t,1,Xa,!0),di(r,2)):[]})),Vi=Qr((function(e,t){var r=Ji(t);return Xa(r)&&(r=n),Xa(e)?fr(e,br(t,1,Xa,!0),n,r):[]}));function Gi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vs(n);return o<0&&(o=xn(r+o,0)),Ht(e,di(t,3),o)}function qi(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==n&&(i=vs(r),i=r<0?xn(o+i,0):wn(i,o-1)),Ht(e,di(t,3),i,!0)}function Zi(e){return(null==e?0:e.length)?br(e,1):[]}function Yi(e){return e&&e.length?e[0]:n}var Xi=Qr((function(e){var t=Rt(e,xo);return t.length&&t[0]===e[0]?Mr(t):[]})),Ki=Qr((function(e){var t=Ji(e),r=Rt(e,xo);return t===Ji(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Mr(r,di(t,2)):[]})),Qi=Qr((function(e){var t=Ji(e),r=Rt(e,xo);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Mr(r,n,t):[]}));function Ji(e){var t=null==e?0:e.length;return t?e[t-1]:n}var ea=Qr(ta);function ta(e,t){return e&&e.length&&t&&t.length?Zr(e,t):e}var na=ii((function(e,t){var n=null==e?0:e.length,r=lr(e,t);return Yr(e,Rt(t,(function(e){return wi(e,n)?+e:e})).sort(Oo)),r}));function ra(e){return null==e?e:_n.call(e)}var oa=Qr((function(e){return fo(br(e,1,Xa,!0))})),ia=Qr((function(e){var t=Ji(e);return Xa(t)&&(t=n),fo(br(e,1,Xa,!0),di(t,2))})),aa=Qr((function(e){var t=Ji(e);return t="function"==typeof t?t:n,fo(br(e,1,Xa,!0),n,t)}));function sa(e){if(!e||!e.length)return[];var t=0;return e=Mt(e,(function(e){if(Xa(e))return t=xn(e.length,t),!0})),Xt(t,(function(t){return Rt(e,Gt(t))}))}function la(e,t){if(!e||!e.length)return[];var r=sa(e);return null==t?r:Rt(r,(function(e){return Et(t,n,e)}))}var ca=Qr((function(e,t){return Xa(e)?fr(e,t):[]})),ua=Qr((function(e){return yo(Mt(e,Xa))})),da=Qr((function(e){var t=Ji(e);return Xa(t)&&(t=n),yo(Mt(e,Xa),di(t,2))})),ha=Qr((function(e){var t=Ji(e);return t="function"==typeof t?t:n,yo(Mt(e,Xa),n,t)})),fa=Qr(sa);var pa=Qr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,la(e,r)}));function ga(e){var t=Wn(e);return t.__chain__=!0,t}function ma(e,t){return t(e)}var va=ii((function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return lr(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Gn&&wi(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:ma,args:[i],thisArg:n}),new Vn(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(i)}));var ya=Ro((function(e,t,n){De.call(e,n)?++e[n]:sr(e,n,1)}));var ba=Ho(Gi),xa=Ho(qi);function wa(e,t){return(qa(e)?Pt:pr)(e,di(t,3))}function ka(e,t){return(qa(e)?Ot:gr)(e,di(t,3))}var Sa=Ro((function(e,t,n){De.call(e,n)?e[n].push(t):sr(e,n,[t])}));var Ca=Qr((function(e,t,n){var r=-1,o="function"==typeof t,i=Ya(e)?ae(e.length):[];return pr(e,(function(e){i[++r]=o?Et(t,e,n):Ar(e,t,n)})),i})),_a=Ro((function(e,t,n){sr(e,n,t)}));function Ea(e,t){return(qa(e)?Rt:Hr)(e,di(t,3))}var La=Ro((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Pa=Qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ki(e,t[0],t[1])?t=[]:n>2&&ki(t[0],t[1],t[2])&&(t=[t[0]]),Gr(e,br(t,1),[])})),Oa=ht||function(){return pt.Date.now()};function Ta(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,ei(e,u,n,n,n,n,t)}function Ma(e,t){var r;if("function"!=typeof t)throw new Te(o);return e=vs(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var Aa=Qr((function(e,t,n){var r=1;if(n.length){var o=dn(n,ui(Aa));r|=l}return ei(e,r,t,n,o)})),Ia=Qr((function(e,t,n){var r=3;if(n.length){var o=dn(n,ui(Ia));r|=l}return ei(t,r,e,n,o)}));function Ra(e,t,r){var i,a,s,l,c,u,d=0,h=!1,f=!1,p=!0;if("function"!=typeof e)throw new Te(o);function g(t){var r=i,o=a;return i=a=n,d=t,l=e.apply(o,r)}function m(e){return d=e,c=Ri(y,t),h?g(e):l}function v(e){var r=e-u;return u===n||r>=t||r<0||f&&e-d>=s}function y(){var e=Oa();if(v(e))return b(e);c=Ri(y,function(e){var n=t-(e-u);return f?wn(n,s-(e-d)):n}(e))}function b(e){return c=n,p&&i?g(e):(i=a=n,l)}function x(){var e=Oa(),r=v(e);if(i=arguments,a=this,u=e,r){if(c===n)return m(u);if(f)return _o(c),c=Ri(y,t),g(u)}return c===n&&(c=Ri(y,t)),l}return t=bs(t)||0,rs(r)&&(h=!!r.leading,s=(f="maxWait"in r)?xn(bs(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p),x.cancel=function(){c!==n&&_o(c),d=0,i=u=a=c=n},x.flush=function(){return c===n?l:b(Oa())},x}var Na=Qr((function(e,t){return hr(e,1,t)})),Da=Qr((function(e,t,n){return hr(e,bs(t)||0,n)}));function za(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(o);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(za.Cache||Yn),n}function Ba(e){if("function"!=typeof e)throw new Te(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}za.Cache=Yn;var ja=So((function(e,t){var n=(t=1==t.length&&qa(t[0])?Rt(t[0],Qt(di())):Rt(br(t,1),Qt(di()))).length;return Qr((function(r){for(var o=-1,i=wn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return Et(e,this,r)}))})),Fa=Qr((function(e,t){var r=dn(t,ui(Fa));return ei(e,l,n,t,r)})),Ha=Qr((function(e,t){var r=dn(t,ui(Ha));return ei(e,c,n,t,r)})),Wa=ii((function(e,t){return ei(e,d,n,n,n,t)}));function $a(e,t){return e===t||e!=e&&t!=t}var Ua=Yo(Pr),Va=Yo((function(e,t){return e>=t})),Ga=Ir(function(){return arguments}())?Ir:function(e){return os(e)&&De.call(e,"callee")&&!Ye.call(e,"callee")},qa=ae.isArray,Za=xt?Qt(xt):function(e){return os(e)&&Lr(e)==I};function Ya(e){return null!=e&&ns(e.length)&&!es(e)}function Xa(e){return os(e)&&Ya(e)}var Ka=bt||bl,Qa=wt?Qt(wt):function(e){return os(e)&&Lr(e)==x};function Ja(e){if(!os(e))return!1;var t=Lr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ss(e)}function es(e){if(!rs(e))return!1;var t=Lr(e);return t==k||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ts(e){return"number"==typeof e&&e==vs(e)}function ns(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function rs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function os(e){return null!=e&&"object"==typeof e}var is=kt?Qt(kt):function(e){return os(e)&&vi(e)==C};function as(e){return"number"==typeof e||os(e)&&Lr(e)==_}function ss(e){if(!os(e)||Lr(e)!=E)return!1;var t=qe(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ne.call(n)==Fe}var ls=St?Qt(St):function(e){return os(e)&&Lr(e)==P};var cs=Ct?Qt(Ct):function(e){return os(e)&&vi(e)==O};function us(e){return"string"==typeof e||!qa(e)&&os(e)&&Lr(e)==T}function ds(e){return"symbol"==typeof e||os(e)&&Lr(e)==M}var hs=_t?Qt(_t):function(e){return os(e)&&ns(e.length)&&!!st[Lr(e)]};var fs=Yo(Fr),ps=Yo((function(e,t){return e<=t}));function gs(e){if(!e)return[];if(Ya(e))return us(e)?gn(e):Ao(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=vi(e);return(t==C?cn:t==O?hn:$s)(e)}function ms(e){return e?(e=bs(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function vs(e){var t=ms(e),n=t%1;return t==t?n?t-n:t:0}function ys(e){return e?cr(vs(e),0,g):0}function bs(e){if("number"==typeof e)return e;if(ds(e))return p;if(rs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=rs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=me.test(e);return n||ye.test(e)?dt(e.slice(2),n?2:8):ge.test(e)?p:+e}function xs(e){return Io(e,Ns(e))}function ws(e){return null==e?"":ho(e)}var ks=No((function(e,t){if(Ei(t)||Ya(t))Io(t,Rs(t),e);else for(var n in t)De.call(t,n)&&rr(e,n,t[n])})),Ss=No((function(e,t){Io(t,Ns(t),e)})),Cs=No((function(e,t,n,r){Io(t,Ns(t),e,r)})),_s=No((function(e,t,n,r){Io(t,Rs(t),e,r)})),Es=ii(lr);var Ls=Qr((function(e,t){e=Le(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&ki(t[0],t[1],i)&&(o=1);++r<o;)for(var a=t[r],s=Ns(a),l=-1,c=s.length;++l<c;){var u=s[l],d=e[u];(d===n||$a(d,Ie[u])&&!De.call(e,u))&&(e[u]=a[u])}return e})),Ps=Qr((function(e){return e.push(n,ni),Et(zs,n,e)}));function Os(e,t,r){var o=null==e?n:_r(e,t);return o===n?r:o}function Ts(e,t){return null!=e&&yi(e,t,Tr)}var Ms=Uo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),e[t]=n}),rl(al)),As=Uo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),De.call(e,t)?e[t].push(n):e[t]=[n]}),di),Is=Qr(Ar);function Rs(e){return Ya(e)?Qn(e):Br(e)}function Ns(e){return Ya(e)?Qn(e,!0):jr(e)}var Ds=No((function(e,t,n){Ur(e,t,n)})),zs=No((function(e,t,n,r){Ur(e,t,n,r)})),Bs=ii((function(e,t){var n={};if(null==e)return n;var r=!1;t=Rt(t,(function(t){return t=ko(t,e),r||(r=t.length>1),t})),Io(e,si(e),n),r&&(n=ur(n,7,ri));for(var o=t.length;o--;)po(n,t[o]);return n}));var js=ii((function(e,t){return null==e?{}:function(e,t){return qr(e,t,(function(t,n){return Ts(e,n)}))}(e,t)}));function Fs(e,t){if(null==e)return{};var n=Rt(si(e),(function(e){return[e]}));return t=di(t),qr(e,n,(function(e,n){return t(e,n[0])}))}var Hs=Jo(Rs),Ws=Jo(Ns);function $s(e){return null==e?[]:Jt(e,Rs(e))}var Us=jo((function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)}));function Vs(e){return Js(ws(e).toLowerCase())}function Gs(e){return(e=ws(e))&&e.replace(xe,on).replace(et,"")}var qs=jo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Zs=jo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ys=Bo("toLowerCase");var Xs=jo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ks=jo((function(e,t,n){return e+(n?" ":"")+Js(t)}));var Qs=jo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Js=Bo("toUpperCase");function el(e,t,r){return e=ws(e),(t=r?n:t)===n?function(e){return ot.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var tl=Qr((function(e,t){try{return Et(e,n,t)}catch(T2){return Ja(T2)?T2:new Ce(T2)}})),nl=ii((function(e,t){return Pt(t,(function(t){t=Fi(t),sr(e,t,Aa(e[t],e))})),e}));function rl(e){return function(){return e}}var ol=Wo(),il=Wo(!0);function al(e){return e}function sl(e){return zr("function"==typeof e?e:ur(e,1))}var ll=Qr((function(e,t){return function(n){return Ar(n,e,t)}})),cl=Qr((function(e,t){return function(n){return Ar(e,n,t)}}));function ul(e,t,n){var r=Rs(t),o=Cr(t,r);null!=n||rs(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Cr(t,Rs(t)));var i=!(rs(n)&&"chain"in n&&!n.chain),a=es(e);return Pt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=Ao(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Nt([this.value()],arguments))})})),e}function dl(){}var hl=Go(Rt),fl=Go(Tt),pl=Go(Bt);function gl(e){return Si(e)?Gt(Fi(e)):function(e){return function(t){return _r(t,e)}}(e)}var ml=Zo(),vl=Zo(!0);function yl(){return[]}function bl(){return!1}var xl=Vo((function(e,t){return e+t}),0),wl=Ko("ceil"),kl=Vo((function(e,t){return e/t}),1),Sl=Ko("floor");var Cl,_l=Vo((function(e,t){return e*t}),1),El=Ko("round"),Ll=Vo((function(e,t){return e-t}),0);return Wn.after=function(e,t){if("function"!=typeof t)throw new Te(o);return e=vs(e),function(){if(--e<1)return t.apply(this,arguments)}},Wn.ary=Ta,Wn.assign=ks,Wn.assignIn=Ss,Wn.assignInWith=Cs,Wn.assignWith=_s,Wn.at=Es,Wn.before=Ma,Wn.bind=Aa,Wn.bindAll=nl,Wn.bindKey=Ia,Wn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qa(e)?e:[e]},Wn.chain=ga,Wn.chunk=function(e,t,r){t=(r?ki(e,t,r):t===n)?1:xn(vs(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=ae(gt(o/t));i<o;)s[a++]=io(e,i,i+=t);return s},Wn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Wn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ae(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Nt(qa(n)?Ao(n):[n],br(t,1))},Wn.cond=function(e){var t=null==e?0:e.length,n=di();return e=t?Rt(e,(function(e){if("function"!=typeof e[1])throw new Te(o);return[n(e[0]),e[1]]})):[],Qr((function(n){for(var r=-1;++r<t;){var o=e[r];if(Et(o[0],this,n))return Et(o[1],this,n)}}))},Wn.conforms=function(e){return function(e){var t=Rs(e);return function(n){return dr(n,e,t)}}(ur(e,1))},Wn.constant=rl,Wn.countBy=ya,Wn.create=function(e,t){var n=$n(e);return null==t?n:ar(n,t)},Wn.curry=function e(t,r,o){var i=ei(t,8,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Wn.curryRight=function e(t,r,o){var i=ei(t,s,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Wn.debounce=Ra,Wn.defaults=Ls,Wn.defaultsDeep=Ps,Wn.defer=Na,Wn.delay=Da,Wn.difference=$i,Wn.differenceBy=Ui,Wn.differenceWith=Vi,Wn.drop=function(e,t,r){var o=null==e?0:e.length;return o?io(e,(t=r||t===n?1:vs(t))<0?0:t,o):[]},Wn.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?io(e,0,(t=o-(t=r||t===n?1:vs(t)))<0?0:t):[]},Wn.dropRightWhile=function(e,t){return e&&e.length?mo(e,di(t,3),!0,!0):[]},Wn.dropWhile=function(e,t){return e&&e.length?mo(e,di(t,3),!0):[]},Wn.fill=function(e,t,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&ki(e,t,r)&&(r=0,o=i),function(e,t,r,o){var i=e.length;for((r=vs(r))<0&&(r=-r>i?0:i+r),(o=o===n||o>i?i:vs(o))<0&&(o+=i),o=r>o?0:ys(o);r<o;)e[r++]=t;return e}(e,t,r,o)):[]},Wn.filter=function(e,t){return(qa(e)?Mt:yr)(e,di(t,3))},Wn.flatMap=function(e,t){return br(Ea(e,t),1)},Wn.flatMapDeep=function(e,t){return br(Ea(e,t),h)},Wn.flatMapDepth=function(e,t,r){return r=r===n?1:vs(r),br(Ea(e,t),r)},Wn.flatten=Zi,Wn.flattenDeep=function(e){return(null==e?0:e.length)?br(e,h):[]},Wn.flattenDepth=function(e,t){return(null==e?0:e.length)?br(e,t=t===n?1:vs(t)):[]},Wn.flip=function(e){return ei(e,512)},Wn.flow=ol,Wn.flowRight=il,Wn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Wn.functions=function(e){return null==e?[]:Cr(e,Rs(e))},Wn.functionsIn=function(e){return null==e?[]:Cr(e,Ns(e))},Wn.groupBy=Sa,Wn.initial=function(e){return(null==e?0:e.length)?io(e,0,-1):[]},Wn.intersection=Xi,Wn.intersectionBy=Ki,Wn.intersectionWith=Qi,Wn.invert=Ms,Wn.invertBy=As,Wn.invokeMap=Ca,Wn.iteratee=sl,Wn.keyBy=_a,Wn.keys=Rs,Wn.keysIn=Ns,Wn.map=Ea,Wn.mapKeys=function(e,t){var n={};return t=di(t,3),kr(e,(function(e,r,o){sr(n,t(e,r,o),e)})),n},Wn.mapValues=function(e,t){var n={};return t=di(t,3),kr(e,(function(e,r,o){sr(n,r,t(e,r,o))})),n},Wn.matches=function(e){return Wr(ur(e,1))},Wn.matchesProperty=function(e,t){return $r(e,ur(t,1))},Wn.memoize=za,Wn.merge=Ds,Wn.mergeWith=zs,Wn.method=ll,Wn.methodOf=cl,Wn.mixin=ul,Wn.negate=Ba,Wn.nthArg=function(e){return e=vs(e),Qr((function(t){return Vr(t,e)}))},Wn.omit=Bs,Wn.omitBy=function(e,t){return Fs(e,Ba(di(t)))},Wn.once=function(e){return Ma(2,e)},Wn.orderBy=function(e,t,r,o){return null==e?[]:(qa(t)||(t=null==t?[]:[t]),qa(r=o?n:r)||(r=null==r?[]:[r]),Gr(e,t,r))},Wn.over=hl,Wn.overArgs=ja,Wn.overEvery=fl,Wn.overSome=pl,Wn.partial=Fa,Wn.partialRight=Ha,Wn.partition=La,Wn.pick=js,Wn.pickBy=Fs,Wn.property=gl,Wn.propertyOf=function(e){return function(t){return null==e?n:_r(e,t)}},Wn.pull=ea,Wn.pullAll=ta,Wn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Zr(e,t,di(n,2)):e},Wn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Zr(e,t,n,r):e},Wn.pullAt=na,Wn.range=ml,Wn.rangeRight=vl,Wn.rearg=Wa,Wn.reject=function(e,t){return(qa(e)?Mt:yr)(e,Ba(di(t,3)))},Wn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=di(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Yr(e,o),n},Wn.rest=function(e,t){if("function"!=typeof e)throw new Te(o);return Qr(e,t=t===n?t:vs(t))},Wn.reverse=ra,Wn.sampleSize=function(e,t,r){return t=(r?ki(e,t,r):t===n)?1:vs(t),(qa(e)?er:eo)(e,t)},Wn.set=function(e,t,n){return null==e?e:to(e,t,n)},Wn.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:to(e,t,r,o)},Wn.shuffle=function(e){return(qa(e)?tr:oo)(e)},Wn.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&ki(e,t,r)?(t=0,r=o):(t=null==t?0:vs(t),r=r===n?o:vs(r)),io(e,t,r)):[]},Wn.sortBy=Pa,Wn.sortedUniq=function(e){return e&&e.length?co(e):[]},Wn.sortedUniqBy=function(e,t){return e&&e.length?co(e,di(t,2)):[]},Wn.split=function(e,t,r){return r&&"number"!=typeof r&&ki(e,t,r)&&(t=r=n),(r=r===n?g:r>>>0)?(e=ws(e))&&("string"==typeof t||null!=t&&!ls(t))&&!(t=ho(t))&&ln(e)?Co(gn(e),0,r):e.split(t,r):[]},Wn.spread=function(e,t){if("function"!=typeof e)throw new Te(o);return t=null==t?0:xn(vs(t),0),Qr((function(n){var r=n[t],o=Co(n,0,t);return r&&Nt(o,r),Et(e,this,o)}))},Wn.tail=function(e){var t=null==e?0:e.length;return t?io(e,1,t):[]},Wn.take=function(e,t,r){return e&&e.length?io(e,0,(t=r||t===n?1:vs(t))<0?0:t):[]},Wn.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?io(e,(t=o-(t=r||t===n?1:vs(t)))<0?0:t,o):[]},Wn.takeRightWhile=function(e,t){return e&&e.length?mo(e,di(t,3),!1,!0):[]},Wn.takeWhile=function(e,t){return e&&e.length?mo(e,di(t,3)):[]},Wn.tap=function(e,t){return t(e),e},Wn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Te(o);return rs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ra(e,t,{leading:r,maxWait:t,trailing:i})},Wn.thru=ma,Wn.toArray=gs,Wn.toPairs=Hs,Wn.toPairsIn=Ws,Wn.toPath=function(e){return qa(e)?Rt(e,Fi):ds(e)?[e]:Ao(ji(ws(e)))},Wn.toPlainObject=xs,Wn.transform=function(e,t,n){var r=qa(e),o=r||Ka(e)||hs(e);if(t=di(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:rs(e)&&es(i)?$n(qe(e)):{}}return(o?Pt:kr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Wn.unary=function(e){return Ta(e,1)},Wn.union=oa,Wn.unionBy=ia,Wn.unionWith=aa,Wn.uniq=function(e){return e&&e.length?fo(e):[]},Wn.uniqBy=function(e,t){return e&&e.length?fo(e,di(t,2)):[]},Wn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?fo(e,n,t):[]},Wn.unset=function(e,t){return null==e||po(e,t)},Wn.unzip=sa,Wn.unzipWith=la,Wn.update=function(e,t,n){return null==e?e:go(e,t,wo(n))},Wn.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:go(e,t,wo(r),o)},Wn.values=$s,Wn.valuesIn=function(e){return null==e?[]:Jt(e,Ns(e))},Wn.without=ca,Wn.words=el,Wn.wrap=function(e,t){return Fa(wo(t),e)},Wn.xor=ua,Wn.xorBy=da,Wn.xorWith=ha,Wn.zip=fa,Wn.zipObject=function(e,t){return bo(e||[],t||[],rr)},Wn.zipObjectDeep=function(e,t){return bo(e||[],t||[],to)},Wn.zipWith=pa,Wn.entries=Hs,Wn.entriesIn=Ws,Wn.extend=Ss,Wn.extendWith=Cs,ul(Wn,Wn),Wn.add=xl,Wn.attempt=tl,Wn.camelCase=Us,Wn.capitalize=Vs,Wn.ceil=wl,Wn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=bs(r))==r?r:0),t!==n&&(t=(t=bs(t))==t?t:0),cr(bs(e),t,r)},Wn.clone=function(e){return ur(e,4)},Wn.cloneDeep=function(e){return ur(e,5)},Wn.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:n)},Wn.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:n)},Wn.conformsTo=function(e,t){return null==t||dr(e,t,Rs(t))},Wn.deburr=Gs,Wn.defaultTo=function(e,t){return null==e||e!=e?t:e},Wn.divide=kl,Wn.endsWith=function(e,t,r){e=ws(e),t=ho(t);var o=e.length,i=r=r===n?o:cr(vs(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},Wn.eq=$a,Wn.escape=function(e){return(e=ws(e))&&X.test(e)?e.replace(Z,an):e},Wn.escapeRegExp=function(e){return(e=ws(e))&&oe.test(e)?e.replace(re,"\\$&"):e},Wn.every=function(e,t,r){var o=qa(e)?Tt:mr;return r&&ki(e,t,r)&&(t=n),o(e,di(t,3))},Wn.find=ba,Wn.findIndex=Gi,Wn.findKey=function(e,t){return Ft(e,di(t,3),kr)},Wn.findLast=xa,Wn.findLastIndex=qi,Wn.findLastKey=function(e,t){return Ft(e,di(t,3),Sr)},Wn.floor=Sl,Wn.forEach=wa,Wn.forEachRight=ka,Wn.forIn=function(e,t){return null==e?e:xr(e,di(t,3),Ns)},Wn.forInRight=function(e,t){return null==e?e:wr(e,di(t,3),Ns)},Wn.forOwn=function(e,t){return e&&kr(e,di(t,3))},Wn.forOwnRight=function(e,t){return e&&Sr(e,di(t,3))},Wn.get=Os,Wn.gt=Ua,Wn.gte=Va,Wn.has=function(e,t){return null!=e&&yi(e,t,Or)},Wn.hasIn=Ts,Wn.head=Yi,Wn.identity=al,Wn.includes=function(e,t,n,r){e=Ya(e)?e:$s(e),n=n&&!r?vs(n):0;var o=e.length;return n<0&&(n=xn(o+n,0)),us(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Wt(e,t,n)>-1},Wn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vs(n);return o<0&&(o=xn(r+o,0)),Wt(e,t,o)},Wn.inRange=function(e,t,r){return t=ms(t),r===n?(r=t,t=0):r=ms(r),function(e,t,n){return e>=wn(t,n)&&e<xn(t,n)}(e=bs(e),t,r)},Wn.invoke=Is,Wn.isArguments=Ga,Wn.isArray=qa,Wn.isArrayBuffer=Za,Wn.isArrayLike=Ya,Wn.isArrayLikeObject=Xa,Wn.isBoolean=function(e){return!0===e||!1===e||os(e)&&Lr(e)==b},Wn.isBuffer=Ka,Wn.isDate=Qa,Wn.isElement=function(e){return os(e)&&1===e.nodeType&&!ss(e)},Wn.isEmpty=function(e){if(null==e)return!0;if(Ya(e)&&(qa(e)||"string"==typeof e||"function"==typeof e.splice||Ka(e)||hs(e)||Ga(e)))return!e.length;var t=vi(e);if(t==C||t==O)return!e.size;if(Ei(e))return!Br(e).length;for(var n in e)if(De.call(e,n))return!1;return!0},Wn.isEqual=function(e,t){return Rr(e,t)},Wn.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return o===n?Rr(e,t,n,r):!!o},Wn.isError=Ja,Wn.isFinite=function(e){return"number"==typeof e&&jt(e)},Wn.isFunction=es,Wn.isInteger=ts,Wn.isLength=ns,Wn.isMap=is,Wn.isMatch=function(e,t){return e===t||Nr(e,t,fi(t))},Wn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Nr(e,t,fi(t),r)},Wn.isNaN=function(e){return as(e)&&e!=+e},Wn.isNative=function(e){if(_i(e))throw new Ce("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(e)},Wn.isNil=function(e){return null==e},Wn.isNull=function(e){return null===e},Wn.isNumber=as,Wn.isObject=rs,Wn.isObjectLike=os,Wn.isPlainObject=ss,Wn.isRegExp=ls,Wn.isSafeInteger=function(e){return ts(e)&&e>=-9007199254740991&&e<=f},Wn.isSet=cs,Wn.isString=us,Wn.isSymbol=ds,Wn.isTypedArray=hs,Wn.isUndefined=function(e){return e===n},Wn.isWeakMap=function(e){return os(e)&&vi(e)==A},Wn.isWeakSet=function(e){return os(e)&&"[object WeakSet]"==Lr(e)},Wn.join=function(e,t){return null==e?"":qt.call(e,t)},Wn.kebabCase=qs,Wn.last=Ji,Wn.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==n&&(i=(i=vs(r))<0?xn(o+i,0):wn(i,o-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Ht(e,Ut,i,!0)},Wn.lowerCase=Zs,Wn.lowerFirst=Ys,Wn.lt=fs,Wn.lte=ps,Wn.max=function(e){return e&&e.length?vr(e,al,Pr):n},Wn.maxBy=function(e,t){return e&&e.length?vr(e,di(t,2),Pr):n},Wn.mean=function(e){return Vt(e,al)},Wn.meanBy=function(e,t){return Vt(e,di(t,2))},Wn.min=function(e){return e&&e.length?vr(e,al,Fr):n},Wn.minBy=function(e,t){return e&&e.length?vr(e,di(t,2),Fr):n},Wn.stubArray=yl,Wn.stubFalse=bl,Wn.stubObject=function(){return{}},Wn.stubString=function(){return""},Wn.stubTrue=function(){return!0},Wn.multiply=_l,Wn.nth=function(e,t){return e&&e.length?Vr(e,vs(t)):n},Wn.noConflict=function(){return pt._===this&&(pt._=He),this},Wn.noop=dl,Wn.now=Oa,Wn.pad=function(e,t,n){e=ws(e);var r=(t=vs(t))?pn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return qo(mt(o),n)+e+qo(gt(o),n)},Wn.padEnd=function(e,t,n){e=ws(e);var r=(t=vs(t))?pn(e):0;return t&&r<t?e+qo(t-r,n):e},Wn.padStart=function(e,t,n){e=ws(e);var r=(t=vs(t))?pn(e):0;return t&&r<t?qo(t-r,n)+e:e},Wn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Sn(ws(e).replace(ie,""),t||0)},Wn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&ki(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=ms(e),t===n?(t=e,e=0):t=ms(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var i=Cn();return wn(e+i*(t-e+ut("1e-"+((i+"").length-1))),t)}return Xr(e,t)},Wn.reduce=function(e,t,n){var r=qa(e)?Dt:Zt,o=arguments.length<3;return r(e,di(t,4),n,o,pr)},Wn.reduceRight=function(e,t,n){var r=qa(e)?zt:Zt,o=arguments.length<3;return r(e,di(t,4),n,o,gr)},Wn.repeat=function(e,t,r){return t=(r?ki(e,t,r):t===n)?1:vs(t),Kr(ws(e),t)},Wn.replace=function(){var e=arguments,t=ws(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Wn.result=function(e,t,r){var o=-1,i=(t=ko(t,e)).length;for(i||(i=1,e=n);++o<i;){var a=null==e?n:e[Fi(t[o])];a===n&&(o=i,a=r),e=es(a)?a.call(e):a}return e},Wn.round=El,Wn.runInContext=e,Wn.sample=function(e){return(qa(e)?Jn:Jr)(e)},Wn.size=function(e){if(null==e)return 0;if(Ya(e))return us(e)?pn(e):e.length;var t=vi(e);return t==C||t==O?e.size:Br(e).length},Wn.snakeCase=Xs,Wn.some=function(e,t,r){var o=qa(e)?Bt:ao;return r&&ki(e,t,r)&&(t=n),o(e,di(t,3))},Wn.sortedIndex=function(e,t){return so(e,t)},Wn.sortedIndexBy=function(e,t,n){return lo(e,t,di(n,2))},Wn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=so(e,t);if(r<n&&$a(e[r],t))return r}return-1},Wn.sortedLastIndex=function(e,t){return so(e,t,!0)},Wn.sortedLastIndexBy=function(e,t,n){return lo(e,t,di(n,2),!0)},Wn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=so(e,t,!0)-1;if($a(e[n],t))return n}return-1},Wn.startCase=Ks,Wn.startsWith=function(e,t,n){return e=ws(e),n=null==n?0:cr(vs(n),0,e.length),t=ho(t),e.slice(n,n+t.length)==t},Wn.subtract=Ll,Wn.sum=function(e){return e&&e.length?Yt(e,al):0},Wn.sumBy=function(e,t){return e&&e.length?Yt(e,di(t,2)):0},Wn.template=function(e,t,r){var o=Wn.templateSettings;r&&ki(e,t,r)&&(t=n),e=ws(e),t=Cs({},t,o,ti);var i,a,s=Cs({},t.imports,o.imports,ti),l=Rs(s),c=Jt(s,l),u=0,d=t.interpolate||we,h="__p += '",f=Pe((t.escape||we).source+"|"+d.source+"|"+(d===J?fe:we).source+"|"+(t.evaluate||we).source+"|$","g"),p="//# sourceURL="+(De.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";e.replace(f,(function(t,n,r,o,s,l){return r||(r=o),h+=e.slice(u,l).replace(ke,sn),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),h+="';\n";var g=De.call(t,"variable")&&t.variable;if(g){if(de.test(g))throw new Ce("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(U,""):h).replace(V,"$1").replace(G,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=tl((function(){return _e(l,p+"return "+h).apply(n,c)}));if(m.source=h,Ja(m))throw m;return m},Wn.times=function(e,t){if((e=vs(e))<1||e>f)return[];var n=g,r=wn(e,g);t=di(t),e-=g;for(var o=Xt(r,t);++n<e;)t(n);return o},Wn.toFinite=ms,Wn.toInteger=vs,Wn.toLength=ys,Wn.toLower=function(e){return ws(e).toLowerCase()},Wn.toNumber=bs,Wn.toSafeInteger=function(e){return e?cr(vs(e),-9007199254740991,f):0===e?e:0},Wn.toString=ws,Wn.toUpper=function(e){return ws(e).toUpperCase()},Wn.trim=function(e,t,r){if((e=ws(e))&&(r||t===n))return Kt(e);if(!e||!(t=ho(t)))return e;var o=gn(e),i=gn(t);return Co(o,tn(o,i),nn(o,i)+1).join("")},Wn.trimEnd=function(e,t,r){if((e=ws(e))&&(r||t===n))return e.slice(0,mn(e)+1);if(!e||!(t=ho(t)))return e;var o=gn(e);return Co(o,0,nn(o,gn(t))+1).join("")},Wn.trimStart=function(e,t,r){if((e=ws(e))&&(r||t===n))return e.replace(ie,"");if(!e||!(t=ho(t)))return e;var o=gn(e);return Co(o,tn(o,gn(t))).join("")},Wn.truncate=function(e,t){var r=30,o="...";if(rs(t)){var i="separator"in t?t.separator:i;r="length"in t?vs(t.length):r,o="omission"in t?ho(t.omission):o}var a=(e=ws(e)).length;if(ln(e)){var s=gn(e);a=s.length}if(r>=a)return e;var l=r-pn(o);if(l<1)return o;var c=s?Co(s,0,l).join(""):e.slice(0,l);if(i===n)return c+o;if(s&&(l+=c.length-l),ls(i)){if(e.slice(l).search(i)){var u,d=c;for(i.global||(i=Pe(i.source,ws(pe.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var h=u.index;c=c.slice(0,h===n?l:h)}}else if(e.indexOf(ho(i),l)!=l){var f=c.lastIndexOf(i);f>-1&&(c=c.slice(0,f))}return c+o},Wn.unescape=function(e){return(e=ws(e))&&Y.test(e)?e.replace(q,vn):e},Wn.uniqueId=function(e){var t=++ze;return ws(e)+t},Wn.upperCase=Qs,Wn.upperFirst=Js,Wn.each=wa,Wn.eachRight=ka,Wn.first=Yi,ul(Wn,(Cl={},kr(Wn,(function(e,t){De.call(Wn.prototype,t)||(Cl[t]=e)})),Cl),{chain:!1}),Wn.VERSION="4.17.21",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Wn[e].placeholder=Wn})),Pt(["drop","take"],(function(e,t){Gn.prototype[e]=function(r){r=r===n?1:xn(vs(r),0);var o=this.__filtered__&&!t?new Gn(this):this.clone();return o.__filtered__?o.__takeCount__=wn(r,o.__takeCount__):o.__views__.push({size:wn(r,g),type:e+(o.__dir__<0?"Right":"")}),o},Gn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Gn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:di(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Pt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Gn.prototype[e]=function(){return this[n](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Gn.prototype[e]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(al)},Gn.prototype.find=function(e){return this.filter(e).head()},Gn.prototype.findLast=function(e){return this.reverse().find(e)},Gn.prototype.invokeMap=Qr((function(e,t){return"function"==typeof e?new Gn(this):this.map((function(n){return Ar(n,e,t)}))})),Gn.prototype.reject=function(e){return this.filter(Ba(di(e)))},Gn.prototype.slice=function(e,t){e=vs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Gn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=vs(t))<0?r.dropRight(-t):r.take(t-e)),r)},Gn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Gn.prototype.toArray=function(){return this.take(g)},kr(Gn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=Wn[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(Wn.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,l=t instanceof Gn,c=s[0],u=l||qa(t),d=function(e){var t=i.apply(Wn,Nt([e],s));return o&&h?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,f=!!this.__actions__.length,p=a&&!h,g=l&&!f;if(!a&&u){t=g?t:new Gn(this);var m=e.apply(t,s);return m.__actions__.push({func:ma,args:[d],thisArg:n}),new Vn(m,h)}return p&&g?e.apply(this,s):(m=this.thru(d),p?o?m.value()[0]:m.value():m)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Me[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Wn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(qa(o)?o:[],e)}return this[n]((function(n){return t.apply(qa(n)?n:[],e)}))}})),kr(Gn.prototype,(function(e,t){var n=Wn[t];if(n){var r=n.name+"";De.call(In,r)||(In[r]=[]),In[r].push({name:t,func:n})}})),In[$o(n,2).name]=[{name:"wrapper",func:n}],Gn.prototype.clone=function(){var e=new Gn(this.__wrapped__);return e.__actions__=Ao(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ao(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ao(this.__views__),e},Gn.prototype.reverse=function(){if(this.__filtered__){var e=new Gn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Gn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qa(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=wn(t,e+a);break;case"takeRight":e=xn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,d=u.length,h=0,f=wn(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return vo(e,this.__actions__);var p=[];e:for(;l--&&h<f;){for(var g=-1,m=e[c+=t];++g<d;){var v=u[g],y=v.iteratee,b=v.type,x=y(m);if(2==b)m=x;else if(!x){if(1==b)continue e;break e}}p[h++]=m}return p},Wn.prototype.at=va,Wn.prototype.chain=function(){return ga(this)},Wn.prototype.commit=function(){return new Vn(this.value(),this.__chain__)},Wn.prototype.next=function(){this.__values__===n&&(this.__values__=gs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Wn.prototype.plant=function(e){for(var t,r=this;r instanceof Un;){var o=Wi(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},Wn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Gn){var t=e;return this.__actions__.length&&(t=new Gn(this)),(t=t.reverse()).__actions__.push({func:ma,args:[ra],thisArg:n}),new Vn(t,this.__chain__)}return this.thru(ra)},Wn.prototype.toJSON=Wn.prototype.valueOf=Wn.prototype.value=function(){return vo(this.__wrapped__,this.__actions__)},Wn.prototype.first=Wn.prototype.head,Qe&&(Wn.prototype[Qe]=function(){return this}),Wn}();mt?((mt.exports=yn)._=yn,gt._=yn):pt._=yn}).call(r)}(PV,PV.exports);const OV=PV.exports,TV=M$({name:"gallery",initialState:{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},reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,o=e.categories[r].images,i=o.filter((e=>e.uuid!==n));if(n===e.currentImageUuid){const t=o.findIndex((e=>e.uuid===n)),r=PV.exports.clamp(t,0,i.length-1);e.currentImage=i.length?i[r]:void 0,e.currentImageUuid=i.length?i[r].uuid:""}e.categories[r].images=i},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:o,url:i,mtime:a}=n,s=e.categories[r];s.images.find((e=>e.url===i&&e.mtime===a))||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=o,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((e=>e.uuid===t.uuid));if(r<n.length-1){const t=n[r+1];e.currentImage=t,e.currentImageUuid=t.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex((e=>e.uuid===t.uuid));if(r>0){const t=n[r-1];e.currentImage=t,e.currentImageUuid=t.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:o}=t.payload,i=e.categories[o].images;if(n.length>0){const t=n.filter((e=>!i.find((t=>t.url===e.url&&t.mtime===e.mtime))));if(e.categories[o].images=i.concat(t).sort(((e,t)=>t.mtime-e.mtime)),!e.currentImage){const t=n[0];e.currentImage=t,e.currentImageUuid=t.uuid}e.categories[o].latest_mtime=n[0].mtime,e.categories[o].earliest_mtime=n[n.length-1].mtime}void 0!==r&&(e.categories[o].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:MV,clearIntermediateImage:AV,removeImage:IV,setCurrentImage:RV,addGalleryImages:NV,setIntermediateImage:DV,selectNextImage:zV,selectPrevImage:BV,setShouldPinGallery:jV,setShouldShowGallery:FV,setGalleryScrollPosition:HV,setGalleryImageMinimumWidth:WV,setGalleryImageObjectFit:$V,setShouldHoldGalleryOpen:UV,setShouldAutoSwitchToNewImages:VV,setCurrentCategory:GV,setGalleryWidth:qV,setShouldUseSingleGalleryColumn:ZV}=TV.actions,YV=TV.reducer;function XV(e){return XV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XV(e)}function KV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QV(e){var t=function(e,t){if("object"!==XV(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==XV(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===XV(t)?t:String(t)}function JV(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QV(r.key),r)}}function eG(e,t,n){return t&&JV(e.prototype,t),n&&JV(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nG(e,t){return nG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nG(e,t)}function rG(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nG(e,t)}function oG(e,t){if(t&&("object"===XV(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tG(e)}function iG(e){return iG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},iG(e)}function aG(e,t,n){return(t=QV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lG(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return sG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sG(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cG(Object(n),!0).forEach((function(t){aG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dG={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},hG=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};KV(this,e),this.init(t,n)}return eG(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||dG,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,uG(uG({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),fG=new hG,pG=function(){function e(){KV(this,e),this.observers={}}return eG(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function gG(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function mG(e){return null==e?"":""+e}function vG(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function yG(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function bG(e,t,n){var r=yG(e,t,Object);r.obj[r.k]=n}function xG(e,t){var n=yG(e,t),r=n.obj,o=n.k;if(r)return r[o]}function wG(e,t,n){var r=xG(e,n);return void 0!==r?r:xG(t,n)}function kG(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):kG(e[r],t[r],n):e[r]=t[r]);return e}function SG(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var CG={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function _G(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return CG[e]})):e}var EG="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,LG=[" ",",","?","!",";"];function PG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function OG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PG(Object(n),!0).forEach((function(t){aG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(T2){return!1}}();return function(){var n,r=iG(e);if(t){var o=iG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return oG(this,n)}}function MG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o)return;if("string"==typeof o[r[i]]&&i+1<r.length)return;if(void 0===o[r[i]]){for(var a=2,s=r.slice(i,i+a).join(n),l=o[s];void 0===l&&r.length>i+a;)a++,l=o[s=r.slice(i,i+a).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(s)){if("string"==typeof l)return l;if(s&&"string"==typeof l[s])return l[s]}var c=r.slice(i+a).join(n);return c?MG(l,c,n):void 0}o=o[r[i]]}return o}}var AG=function(e){rG(n,e);var t=TG(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return KV(this,n),r=t.call(this),EG&&pG.call(tG(r)),r.data=e||{},r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return eG(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=xG(this.data,a);return s||!i||"string"!=typeof n?s:MG(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),bG(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=xG(this.data,a)||{};r?kG(s,n,o):s=OG(OG({},s),n),bG(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?OG(OG({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(pG),IG={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}};function RG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function NG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RG(Object(n),!0).forEach((function(t){aG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function DG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(T2){return!1}}();return function(){var n,r=iG(e);if(t){var o=iG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return oG(this,n)}}var zG={},BG=function(e){rG(n,e);var t=DG(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return KV(this,n),r=t.call(this),EG&&pG.call(tG(r)),vG(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,tG(r)),r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=fG.create("translator"),r}return eG(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=LG.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var o=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,n,r));if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),e=l.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==XV(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),l=s.key,c=s.namespaces,u=c[c.length-1],d=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(h){var f=t.nsSeparator||this.options.nsSeparator;return i?(p.res="".concat(u).concat(f).concat(l),p):"".concat(u).concat(f).concat(l)}return i?(p.res=l,p):l}var p=this.resolve(e,t),g=p&&p.res,m=p&&p.usedKey||l,v=p&&p.exactUsedKey||l,y=Object.prototype.toString.apply(g),b=["[object Number]","[object Function]","[object RegExp]"],x=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,k="string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g;if(w&&g&&k&&b.indexOf(y)<0&&("string"!=typeof x||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,g,NG(NG({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return i?(p.res=S,p):S}if(a){var C="[object Array]"===y,_=C?[]:{},E=C?v:m;for(var L in g)if(Object.prototype.hasOwnProperty.call(g,L)){var P="".concat(E).concat(a).concat(L);_[L]=this.translate(P,NG(NG({},t),{joinArrays:!1,ns:c})),_[L]===P&&(_[L]=g[L])}g=_}}else if(w&&"string"==typeof x&&"[object Array]"===y)(g=g.join(x))&&(g=this.extendTranslation(g,e,t,r));else{var O=!1,T=!1,M=void 0!==t.count&&"string"!=typeof t.count,A=n.hasDefaultValue(t),I=M?this.pluralResolver.getSuffix(d,t.count,t):"",R=t["defaultValue".concat(I)]||t.defaultValue;!this.isValidLookup(g)&&A&&(O=!0,g=R),this.isValidLookup(g)||(T=!0,g=l);var N=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,D=N&&T?void 0:g,z=A&&R!==g&&this.options.updateMissing;if(T||O||z){if(this.logger.log(z?"updateKey":"missingKey",d,u,l,z?R:g),a){var B=this.resolve(l,NG(NG({},t),{},{keySeparator:!1}));B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var j=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var H=0;H<F.length;H++)j.push(F[H]);else"all"===this.options.saveMissingTo?j=this.languageUtils.toResolveHierarchy(t.lng||this.language):j.push(t.lng||this.language);var W=function(e,n,r){var i=A&&r!==g?r:D;o.options.missingKeyHandler?o.options.missingKeyHandler(e,u,n,i,z,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,u,n,i,z,t),o.emit("missingKey",e,u,n,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&M?j.forEach((function(e){o.pluralResolver.getSuffixes(e,t).forEach((function(n){W([e],l+n,t["defaultValue".concat(n)]||R)}))})):W(j,l,R))}g=this.extendTranslation(g,e,t,p,r),T&&g===l&&this.options.appendNamespaceToMissingKey&&(g="".concat(u,":").concat(l)),(T||O)&&this.options.parseMissingKeyHandler&&(g="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,O?g:void 0):this.options.parseMissingKeyHandler(g))}return i?(p.res=g,p):g}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,NG(NG({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(NG(NG({},n),{interpolation:NG(NG({},this.options.interpolation),n.interpolation)}));var a,s="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);a=l&&l.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=NG(NG({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var u=e.match(this.interpolator.nestingRegexp);a<(u&&u.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,h="string"==typeof d?[d]:d;return null!=e&&h&&h.length&&!1!==n.applyPostProcessor&&(e=IG.handle(h,e,t,this.options&&this.options.postProcessPassResolved?NG({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,s),c=l.key;n=c;var u=l.namespaces;a.options.fallbackNS&&(u=u.concat(a.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,h=d&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),f=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);u.forEach((function(e){a.isValidLookup(t)||(i=e,!zG["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(zG["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,l=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(l,c,n,e,s);else{var u;d&&(u=a.pluralResolver.getSuffix(n,s.count,s));var p="".concat(a.options.pluralSeparator,"zero");if(d&&(l.push(c+u),h&&l.push(c+p)),f){var g="".concat(c).concat(a.options.contextSeparator).concat(s.context);l.push(g),d&&(l.push(g+u),h&&l.push(g+p))}}for(;i=l.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),n}(pG);function jG(e){return e.charAt(0).toUpperCase()+e.slice(1)}var FG=function(){function e(t){KV(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=fG.create("languageUtils")}return eG(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=jG(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=jG(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=jG(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),HG=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],WG={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},$G=["v1","v2","v3"],UG={zero:0,one:1,two:2,few:3,many:4,other:5};function VG(){var e={};return HG.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:WG[t.fc]}}))})),e}var GG=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};KV(this,e),this.languageUtils=t,this.options=n,this.logger=fG.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=VG()}return eG(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(n){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return UG[e]-UG[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!$G.includes(this.options.compatibilityJSON)}}]),e}();function qG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qG(Object(n),!0).forEach((function(t){aG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var YG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};KV(this,e),this.logger=fG.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return eG(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:_G,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?SG(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?SG(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?SG(t.nestingPrefix):t.nestingPrefixEscaped||SG("$t("),this.nestingSuffix=t.nestingSuffix?SG(t.nestingSuffix):t.nestingSuffixEscaped||SG(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(s.formatSeparator)<0){var o=wG(t,l,e);return s.alwaysFormat?s.format(o,void 0,n,ZG(ZG(ZG({},r),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(wG(t,l,a),c,n,ZG(ZG(ZG({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(i=u(n)))if("function"==typeof d){var l=d(e,o,r);i="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))i="";else{if(h){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=mG(i));var c=t.safeValue(i);if(e=e.replace(o[0],c),h?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0];var a=(i=this.interpolate(i,o)).match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o=ZG(ZG({},t),o))}catch(T2){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),T2),"".concat(e).concat(n).concat(i)}return delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){var l=[];(o=ZG({},a)).applyPostProcessor=!1,delete o.defaultValue;var c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=t(s.call(this,n[1].trim(),o),o))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=mG(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce((function(e,t){return i.format(e,t,a.lng,ZG(ZG({},a),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function XG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XG(Object(n),!0).forEach((function(t){aG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function QG(e){var t={};return function(n,r,o){var i=r+JSON.stringify(o),a=t[i];return a||(a=e(r,o),t[i]=a),a(n)}}var JG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};KV(this,e),this.logger=fG.create("formatter"),this.options=t,this.formats={number:QG((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:QG((function(e,t){var n=new Intl.NumberFormat(e,KG(KG({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:QG((function(e,t){var n=new Intl.DateTimeFormat(e,KG({},t));return function(e){return n.format(e)}})),relativetime:QG((function(e,t){var n=new Intl.RelativeTimeFormat(e,KG({},t));return function(e){return n.format(e,t.range||"day")}})),list:QG((function(e,t){var n=new Intl.ListFormat(e,KG({},t));return function(e){return n.format(e)}}))},this.init(t)}return eG(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=QG(t)}},{key:"format",value:function(e,t,n,r){var o=this,i=t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=lG(e.split(":")),r=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=o),"false"===o&&(n[r.trim()]=!1),"true"===o&&(n[r.trim()]=!0),isNaN(o)||(n[r.trim()]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}}(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var l=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},u=c.locale||c.lng||r.locale||r.lng||n;l=o.formats[a](e,u,KG(KG(KG({},s),r),c))}catch(d){o.logger.warn(d)}return l}return o.logger.warn("there was no format function for ".concat(a)),e}),e);return i}}]),e}();function eq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eq(Object(n),!0).forEach((function(t){aG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nq(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(T2){return!1}}();return function(){var n,r=iG(e);if(t){var o=iG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return oG(this,n)}}var rq=function(e){rG(n,e);var t=nq(n);function n(e,r,o){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return KV(this,n),i=t.call(this),EG&&pG.call(tG(i)),i.backend=e,i.store=r,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=fG.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,a.backend,a),i}return eG(n,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i={},a={},s={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,r=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(s[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){!function(e,t,n,r){var o=yG(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}(n.loaded,[o],i),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:i,callback:a});else{this.readingCalls++;var s=function(s,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}s&&l&&o<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,l)},l=this.backend[n].bind(this.backend);if(2!==l.length)return l(e,t,s);try{var c=l(e,t);c&&"function"==typeof c.then?c.then((function(e){return s(null,e)})).catch(s):s(null,c)}catch($le){s($le)}}}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){var s=tq(tq({},i),{},{isUpdate:o}),l=this.backend.create.bind(this.backend);if(l.length<6)try{var c;(c=5===l.length?l(e,t,n,r,s):l(e,t,n,r))&&"function"==typeof c.then?c.then((function(e){return a(null,e)})).catch(a):a(null,c)}catch($le){a($le)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}]),n}(pG);function oq(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===XV(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===XV(e[2])||"object"===XV(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function iq(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function aq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aq(Object(n),!0).forEach((function(t){aG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lq(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(T2){return!1}}();return function(){var n,r=iG(e);if(t){var o=iG(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return oG(this,n)}}function cq(){}function uq(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var dq=function(e){rG(n,e);var t=lq(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(KV(this,n),e=t.call(this),EG&&pG.call(tG(e)),e.options=iq(r),e.services={},e.logger=fG,e.modules={external:[]},uq(tG(e)),o&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,o),oG(e,tG(e));setTimeout((function(){e.init(r,o)}),0)}return e}return eG(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=oq();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=sq(sq(sq({},r),this.options),iq(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=sq(sq({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var i;this.modules.logger?fG.init(o(this.modules.logger),this.options):fG.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=JG);var a=new FG(this.options);this.store=new AG(this.options.resources,this.options);var s=this.services;s.logger=fG,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new GG(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new YG(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new rq(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new BG(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=cq),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var d=gG(),h=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cq,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=gG();return e||(e=this.languages),t||(t=this.options.ns),n||(n=cq),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&IG.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=gG();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(i){e||i||!n.services.languageDetector||(i=[]);var a="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||o(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,i){i?(o(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,o=function e(t,o){var i;if("object"!==XV(o)){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];i=r.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=sq({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||n||e.keyPrefix;var c=r.options.keySeparator||".",u=i.keyPrefix?"".concat(i.keyPrefix).concat(c).concat(t):t;return r.t(u,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(r,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=gG();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=gG();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";var t=this.services&&this.services.languageUtils||new FG(oq());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cq,o=sq(sq(sq({},this.options),t),{isClone:!0}),i=new n(o);void 0===t.debug&&void 0===t.prefix||(i.logger=i.logger.clone(t));var a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=sq({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new BG(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(pG);aG(dq,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new dq(e,t)}));var hq=dq.createInstance();function fq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pq(e){return pq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pq(e)}function gq(e){var t=function(e,t){if("object"!==pq(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==pq(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===pq(t)?t:String(t)}function mq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gq(r.key),r)}}hq.createInstance=dq.createInstance,hq.createInstance,hq.dir,hq.init,hq.loadResources,hq.reloadResources,hq.use,hq.changeLanguage,hq.getFixedT,hq.t,hq.exists,hq.setDefaultNamespace,hq.hasLoadedNamespace,hq.loadNamespaces,hq.loadLanguages;var vq=[],yq=vq.forEach,bq=vq.slice;function xq(e){return yq.call(bq.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}var wq=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,kq=function(e,t,n){var r=n||{};r.path=r.path||"/";var o=encodeURIComponent(t),i="".concat(e,"=").concat(o);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!wq.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain=".concat(r.domain)}if(r.path){if(!wq.test(r.path))throw new TypeError("option path is invalid");i+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");i+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},Sq=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=kq(e,encodeURIComponent(t),o)},Cq=function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},_q={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=Cq(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&Sq(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},Eq={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),o=0;o<r.length;o++){var i=r[o].indexOf("=");if(i>0)r[o].substring(0,i)===e.lookupQuerystring&&(t=r[o].substring(i+1))}}return t}},Lq=null,Pq=function(){if(null!==Lq)return Lq;try{Lq="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(T2){Lq=!1}return Lq},Oq={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&Pq()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&Pq()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Tq=null,Mq=function(){if(null!==Tq)return Tq;try{Tq="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(T2){Tq=!1}return Tq},Aq={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&Mq()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&Mq()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Iq={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},Rq={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},Nq={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},Dq={name:"subdomain",lookup:function(e){var t="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,n="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};var zq=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};fq(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}var t,n,r;return t=e,n=[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=xq(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(_q),this.addDetector(Eq),this.addDetector(Oq),this.addDetector(Aq),this.addDetector(Iq),this.addDetector(Rq),this.addDetector(Nq),this.addDetector(Dq)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}],n&&mq(t.prototype,n),r&&mq(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Bq(e){return Bq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bq(e)}zq.type="languageDetector";var jq=[],Fq=jq.forEach,Hq=jq.slice;function Wq(e){return Fq.call(Hq.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}function $q(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":Bq(XMLHttpRequest))}function Uq(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Vq,Gq={exports:{}},qq={exports:{}};function Zq(){return Vq||(Vq=1,function(e,t){var n="undefined"!=typeof self?self:r,o=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(T2){return!1}}(),i="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&o&&function(e){return e&&DataView.prototype.isPrototypeOf(e)}(e)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=p(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(x)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=c(e),t=u(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[c(e)]},h.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},h.prototype.set=function(e,t){this.map[c(e)]=u(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,o=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),y.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function x(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];w.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch($le){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,n){return new Promise((function(r,i){var a=new b(e,n);if(a.signal&&a.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;r(new w(o,n))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=h,e.Request=b,e.Response=w),t.Headers=h,t.Request=b,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(o),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var i=o;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(qq,qq.exports)),qq.exports}!function(e,t){var n;if("function"==typeof fetch&&(n=void 0!==r&&r.fetch?r.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),void 0!==Uq&&("undefined"==typeof window||void 0===window.document)){var o=n||Zq();o.default&&(o=o.default),t.default=o,e.exports=t.default}}(Gq,Gq.exports);const Yq=Gq.exports,Xq=t({__proto__:null,default:Yq},[Gq.exports]);function Kq(e){return Kq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kq(e)}var Qq,Jq,eZ;"function"==typeof fetch&&(Qq="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),$q()&&("undefined"!=typeof global&&global.XMLHttpRequest?Jq=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(Jq=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?eZ=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(eZ=window.ActiveXObject)),Qq||!Xq||Jq||eZ||(Qq=Yq||Xq),"function"!=typeof Qq&&(Qq=void 0);var tZ=function(e,t){if(t&&"object"===Kq(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},nZ=function(e,t,n){Qq(e,t).then((function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)})).catch(n)},rZ=!1,oZ=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},Qq&&0!==t.indexOf("file:")?function(e,t,n,r){e.queryStringParams&&(t=tZ(t,e.queryStringParams));var o=Wq({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=Wq({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},rZ?{}:i);try{nZ(t,a,r)}catch(T2){if(!i||0===Object.keys(i).length||!T2.message||T2.message.indexOf("not implemented")<0)return r(T2);try{Object.keys(i).forEach((function(e){delete a[e]})),nZ(t,a,r),rZ=!0}catch($le){r($le)}}}(e,t,n,r):$q()||"function"==typeof ActiveXObject?function(e,t,n,r){n&&"object"===Kq(n)&&(n=tZ("",n).slice(1)),e.queryStringParams&&(t=tZ(t,e.queryStringParams));try{var o;(o=Jq?new Jq:new eZ("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var i=e.customHeaders;if(i="function"==typeof i?i():i)for(var a in i)o.setRequestHeader(a,i[a]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(T2){console&&console.log(T2)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function iZ(e){return iZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iZ(e)}function aZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lZ(r.key),r)}}function lZ(e){var t=function(e,t){if("object"!==iZ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==iZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===iZ(t)?t:String(t)}var cZ=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return function(e,t,n){return(t=lZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n||"")},request:oZ,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},uZ=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};aZ(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}var t,n,r;return t=e,n=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=Wq(n,this.options||{},cZ()),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval((function(){return t.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var i,a=this,s=this.options.loadPath;"function"==typeof this.options.loadPath&&(s=this.options.loadPath(e,n)),(s=function(e){return!!e&&"function"==typeof e.then}(i=s)?i:Promise.resolve(i)).then((function(i){if(!i)return o(null,{});var s=a.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});a.loadUrl(s,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,r){var o=this;this.options.request(this.options,e,void 0,(function(i,a){if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&i&&i.message&&i.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+i.message,!0);if(i)return t(i,!1);var s,l;try{s="string"==typeof a.data?o.options.parse(a.data,n,r):a.data}catch(T2){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)}))}},{key:"create",value:function(e,t,n,r,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,r),s=0,l=[],c=[];e.forEach((function(n){var r=i.options.addPath;"function"==typeof i.options.addPath&&(r=i.options.addPath(n,t));var u=i.services.interpolator.interpolate(r,{lng:n,ns:t});i.options.request(i.options,u,a,(function(t,n){s+=1,l.push(t),c.push(n),s===e.length&&o&&o(l,c)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,o=t.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var a=[],s=function(e){r.toResolveHierarchy(e).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};s(i),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return s(e)})),a.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(r,i){r&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),n.loaded("".concat(t,"|").concat(e),r,i)}))}))}))}}}],n&&sZ(t.prototype,n),r&&sZ(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function dZ(e){return dZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dZ(e)}function hZ(e){var t=function(e,t){if("object"!==dZ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==dZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===dZ(t)?t:String(t)}function fZ(e,t,n){return(t=hZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pZ(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}uZ.type="backend";var gZ={};function mZ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&gZ[t[0]]||("string"==typeof t[0]&&(gZ[t[0]]=new Date),pZ.apply(void 0,t))}function vZ(e,t,n){e.loadNamespaces(t,(function(){if(e.isInitialized)n();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),n()}))}}))}function yZ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],o=!!t.options&&t.options.fallbackLng,i=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||(!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!a(r,e)||o&&!a(i,e))))}function bZ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return mZ("i18n.languages were undefined or empty",t.languages),!0;var r=void 0!==t.options.ignoreJSONStructure;return r?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):yZ(e,t,n)}var xZ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,wZ={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},kZ=function(e){return wZ[e]};function SZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function CZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SZ(Object(n),!0).forEach((function(t){fZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _Z,EZ={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(xZ,kZ)}};function LZ(){return EZ}function PZ(){return _Z}function OZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hZ(r.key),r)}}var TZ={type:"3rdParty",init:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};EZ=CZ(CZ({},EZ),e)}(e.options.react),function(e){_Z=e}(e)}},MZ=i.exports.createContext(),AZ=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var t,n,r;return t=e,(n=[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&OZ(t.prototype,n),r&&OZ(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function IZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RZ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch($le){c=!0,o=$le}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return IZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?IZ(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NZ(Object(n),!0).forEach((function(t){fZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zZ=function(e,t){var n=i.exports.useRef();return i.exports.useEffect((function(){n.current=t?n.current:e}),[e,t]),n.current};function BZ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=i.exports.useContext(MZ)||{},o=r.i18n,a=r.defaultNS,s=n||o||PZ();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new AZ),!s){mZ("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},c=[l,{},!1];return c.t=l,c.i18n={},c.ready=!1,c}s.options.react&&void 0!==s.options.react.wait&&mZ("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=DZ(DZ(DZ({},LZ()),s.options.react),t),d=u.useSuspense,h=u.keyPrefix,f=e||a||s.options&&s.options.defaultNS;f="string"==typeof f?[f]:f||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(f);var p=(s.isInitialized||s.initializedStoreOnce)&&f.every((function(e){return bZ(e,s,u)}));function g(){return s.getFixedT(null,"fallback"===u.nsMode?f:f[0],h)}var m=i.exports.useState(g),v=RZ(m,2),y=v[0],b=v[1],x=f.join(),w=zZ(x),k=i.exports.useRef(!0);i.exports.useEffect((function(){var e=u.bindI18n,t=u.bindI18nStore;function n(){k.current&&b(g)}return k.current=!0,p||d||vZ(s,f,(function(){k.current&&b(g)})),p&&w&&w!==x&&k.current&&b(g),e&&s&&s.on(e,n),t&&s&&s.store.on(t,n),function(){k.current=!1,e&&s&&e.split(" ").forEach((function(e){return s.off(e,n)})),t&&s&&t.split(" ").forEach((function(e){return s.store.off(e,n)}))}}),[s,x]);var S=i.exports.useRef(!0);i.exports.useEffect((function(){k.current&&!S.current&&b(g),S.current=!1}),[s,h]);var C=[y,s,p];if(C.t=y,C.i18n=s,C.ready=p,p)return C;if(!p&&!d)return C;throw new Promise((function(e){vZ(s,f,(function(){e()}))}))}hq.use(uZ).use(zq).use(TZ).init({fallbackLng:"en",debug:!1,ns:["common","options","unifiedcanvas","gallery","toast","hotkeys","settings"],backend:{loadPath:"/locales/{{ns}}/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const jZ=M$({name:"system",initialState:{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:hq.isInitialized?hq.t("common:statusDisconnected"):"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:[]},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=hq.t("common:statusError"),e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?hq.t("common:statusConnected"):hq.t("common:statusDisconnected")},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:o}=t.payload,i={timestamp:n,message:r,level:o||"info"};e.log.push(i)},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=hq.t("common:statusProcessingCanceled")},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=hq.t("common:statusPreparing")},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus=hq.t("common:statusLoadingModel"),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:FZ,setIsProcessing:HZ,addLogEntry:WZ,setShouldShowLogViewer:$Z,setIsConnected:UZ,setSocketId:VZ,setShouldConfirmOnDelete:GZ,setOpenAccordions:qZ,setSystemStatus:ZZ,setCurrentStatus:YZ,setSystemConfig:XZ,setShouldDisplayGuides:KZ,processingCanceled:QZ,errorOccurred:JZ,errorSeen:eY,setModelList:tY,setIsCancelable:nY,modelChangeRequested:rY,setSaveIntermediatesInterval:oY,setEnableImageDebugging:iY,generationRequested:aY,addToast:sY,clearToastQueue:lY,setProcessingIndeterminateTask:cY}=jZ.actions,uY=jZ.reducer,dY=(e,t)=>Math.floor(e/t)*t,hY=(e,t)=>Math.round(e/t)*t,fY=(e,t,n,r,o,i,a)=>({x:e/2-(n+o/2)*a,y:t/2-(r+i/2)*a}),pY=(e,t,n,r,o=.95)=>{const i=e*o/n,a=t*o/r;return Math.min(1,Math.min(i,a))},gY=.95,mY=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),vY=e=>{const{width:t,height:n}=e,r={width:t,height:n},o=t/n;let i=t*n,a=448;for(;i<262144;){if(a+=64,t===n){r.width=512,r.height=512;break}o>1?(r.width=a,r.height=hY(a/o,64)):o<1&&(r.height=a,r.width=hY(a*o,64)),i=r.width*r.height}return r},yY=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],bY=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],xY=e=>"line"===e.kind&&"mask"===e.layer,wY=e=>"image"===e.kind&&"base"===e.layer,kY=e=>"line"===e.kind,SY={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},CY=M$({name:"canvas",initialState:{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:SY,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,shouldRestrictStrokesToBox:!0,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"},reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,"move"!==n&&(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;"move"!==t&&(e.tool="brush"===t?"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(OV.cloneDeep(e.layerState)),e.layerState.objects=e.layerState.objects.filter((e=>!xY(e))),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,o={width:dY(OV.clamp(n.width,64,512),64),height:dY(OV.clamp(n.height,64,512),64)},i={x:hY(n.width/2-o.width/2,64),y:hY(n.height/2-o.height/2,64)};if("auto"===e.boundingBoxScaleMethod){const t=vY(o);e.scaledBoundingBoxDimensions=t}e.boundingBoxDimensions=o,e.boundingBoxCoordinates=i,e.pastLayerStates.push(OV.cloneDeep(e.layerState)),e.layerState={...SY,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=pY(r.width,r.height,n.width,n.height,gY),s=fY(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:(e,t)=>{const n=(r=t.payload,{width:hY(r.width,64),height:hY(r.height,64)});var r;if(e.boundingBoxDimensions=n,"auto"===e.boundingBoxScaleMethod){const t=vY(n);e.scaledBoundingBoxDimensions=t}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=mY(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(OV.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(OV.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...SY.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingOutline=!0},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(OV.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"fillRect",layer:"base",...t,...n,color:r}),e.futureLayerStates=[]},addEraseRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n}=e;e.pastLayerStates.push(OV.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"eraseRect",layer:"base",...t,...n}),e.futureLayerStates=[]},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:o,brushSize:i,shouldRestrictStrokesToBox:a}=e;if("move"===n||"colorPicker"===n)return;const s=i/2,l="base"===r&&"brush"===n?{color:o}:{};e.pastLayerStates.push(OV.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const c={kind:"line",layer:r,tool:n,strokeWidth:s,points:t.payload,...l};a&&(c.clip={...e.boundingBoxCoordinates,...e.boundingBoxDimensions}),e.layerState.objects.push(c),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(kY);n&&n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();t&&(e.futureLayerStates.unshift(OV.cloneDeep(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();t&&(e.pastLayerStates.push(OV.cloneDeep(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(OV.cloneDeep(e.layerState)),e.layerState=SY,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(wY),o={width:Math.floor(t),height:Math.floor(n)};if(!r){const t=pY(o.width,o.height,512,512,gY),n=fY(o.width,o.height,0,0,512,512,t),r={width:512,height:512};if(e.stageScale=t,e.stageCoordinates=n,e.stageDimensions=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=r,"auto"===e.boundingBoxScaleMethod){const t=vY(r);e.scaledBoundingBoxDimensions=t}return}const{width:i,height:a}=r,s=pY(t,n,i,a,.95),l=fY(o.width,o.height,0,0,i,a,s);e.minimumStageScale=s,e.stageScale=s,e.stageCoordinates=mY(l),e.stageDimensions=o,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(wY)){const t=pY(r.width,r.height,512,512,gY),n=fY(r.width,r.height,0,0,512,512,t),o={width:512,height:512};if(e.stageScale=t,e.stageCoordinates=n,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=o,"auto"===e.boundingBoxScaleMethod){const t=vY(o);e.scaledBoundingBoxDimensions=t}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:o}}=e,{x:i,y:a,width:s,height:l}=n;if(0!==s&&0!==l){const t=pY(r,o,s,l,gY),n=fY(r,o,i,a,s,l,t);e.stageScale=t,e.stageCoordinates=n}else{const t=pY(r,o,512,512,gY),n=fY(r,o,0,0,512,512,t),i={width:512,height:512};if(e.stageScale=t,e.stageCoordinates=n,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=i,"auto"===e.boundingBoxScaleMethod){const t=vY(i);e.scaledBoundingBoxDimensions=t}}},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(OV.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...SY.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:o}=e,i=r.width/o,a=r.height/o;if(n.x<0||n.x+t.width>i||n.y<0||n.y+t.height>a){const t={width:dY(OV.clamp(i,64,512),64),height:dY(OV.clamp(a,64,512),64)},n={x:hY(i/2-t.width/2,64),y:hY(a/2-t.height/2,64)};if(e.boundingBoxDimensions=t,e.boundingBoxCoordinates=n,"auto"===e.boundingBoxScaleMethod){const n=vY(t);e.scaledBoundingBoxDimensions=n}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,"auto"===t.payload){const t=vY(e.boundingBoxDimensions);e.scaledBoundingBoxDimensions=t}},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},setShouldRestrictStrokesToBox:(e,t)=>{e.shouldRestrictStrokesToBox=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(OV.cloneDeep(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},mouseLeftCanvas:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isTransformingBoundingBox=!1}}}),{addEraseRect:_Y,addFillRect:EY,addImageToStagingArea:LY,addLine:PY,addPointToCurrentLine:OY,clearCanvasHistory:TY,clearMask:MY,commitColorPickerColor:AY,commitStagingAreaImage:IY,discardStagedImages:RY,fitBoundingBoxToStage:NY,mouseLeftCanvas:DY,nextStagingAreaImage:zY,prevStagingAreaImage:BY,redo:jY,resetCanvas:FY,resetCanvasInteractionState:HY,resetCanvasView:WY,resizeAndScaleCanvas:$Y,resizeCanvas:UY,setBoundingBoxCoordinates:VY,setBoundingBoxDimensions:GY,setBoundingBoxPreviewFill:qY,setBoundingBoxScaleMethod:ZY,setBrushColor:YY,setBrushSize:XY,setCanvasContainerDimensions:KY,setColorPickerColor:QY,setCursorPosition:JY,setDoesCanvasNeedScaling:eX,setInitialCanvasImage:tX,setInpaintReplace:nX,setIsDrawing:rX,setIsMaskEnabled:oX,setIsMouseOverBoundingBox:iX,setIsMoveBoundingBoxKeyHeld:aX,setIsMoveStageKeyHeld:sX,setIsMovingBoundingBox:lX,setIsMovingStage:cX,setIsTransformingBoundingBox:uX,setLayer:dX,setMaskColor:hX,setMergedCanvas:fX,setShouldAutoSave:pX,setShouldCropToBoundingBoxOnSave:gX,setShouldDarkenOutsideBoundingBox:mX,setShouldLockBoundingBox:vX,setShouldPreserveMaskedArea:yX,setShouldShowBoundingBox:bX,setShouldShowBrush:xX,setShouldShowBrushPreview:wX,setShouldShowCanvasDebugInfo:kX,setShouldShowCheckboardTransparency:SX,setShouldShowGrid:CX,setShouldShowIntermediates:_X,setShouldShowStagingImage:EX,setShouldShowStagingOutline:LX,setShouldSnapToGrid:PX,setShouldUseInpaintReplace:OX,setStageCoordinates:TX,setStageScale:MX,setTool:AX,toggleShouldLockBoundingBox:IX,toggleTool:RX,undo:NX,setScaledBoundingBoxDimensions:DX,setShouldRestrictStrokesToBox:zX}=CY.actions,BX=CY.reducer,jX=Object.create(null);jX.open="0",jX.close="1",jX.ping="2",jX.pong="3",jX.message="4",jX.upgrade="5",jX.noop="6";const FX=Object.create(null);Object.keys(jX).forEach((e=>{FX[jX[e]]=e}));const HX={type:"error",data:"parser error"},WX="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),$X="function"==typeof ArrayBuffer,UX=({type:e,data:t},n,r)=>WX&&t instanceof Blob?n?r(t):VX(t,r):$X&&(t instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer)(t))?n?r(t):VX(new Blob([t]),r):r(jX[e]+(t||"")),VX=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+e)},n.readAsDataURL(e)},GX="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qX="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<GX.length;e++)qX[GX.charCodeAt(e)]=e;const ZX="function"==typeof ArrayBuffer,YX=(e,t)=>{if("string"!=typeof e)return{type:"message",data:KX(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:XX(e.substring(1),t)};return FX[n]?e.length>1?{type:FX[n],data:e.substring(1)}:{type:FX[n]}:HX},XX=(e,t)=>{if(ZX){const n=(e=>{let t,n,r,o,i,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);const c=new ArrayBuffer(a),u=new Uint8Array(c);for(t=0;t<s;t+=4)n=qX[e.charCodeAt(t)],r=qX[e.charCodeAt(t+1)],o=qX[e.charCodeAt(t+2)],i=qX[e.charCodeAt(t+3)],u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|o>>2,u[l++]=(3&o)<<6|63&i;return c})(e);return KX(n,t)}return{base64:!0,data:e}},KX=(e,t)=>"blob"===t&&e instanceof ArrayBuffer?new Blob([e]):e,QX=String.fromCharCode(30);function JX(e){if(e)return function(e){for(var t in JX.prototype)e[t]=JX.prototype[t];return e}(e)}JX.prototype.on=JX.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},JX.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},JX.prototype.off=JX.prototype.removeListener=JX.prototype.removeAllListeners=JX.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},JX.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},JX.prototype.emitReserved=JX.prototype.emit,JX.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},JX.prototype.hasListeners=function(e){return!!this.listeners(e).length};const eK="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function tK(e,...t){return t.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})}const nK=setTimeout,rK=clearTimeout;function oK(e,t){t.useNativeTimers?(e.setTimeoutFn=nK.bind(eK),e.clearTimeoutFn=rK.bind(eK)):(e.setTimeoutFn=setTimeout.bind(eK),e.clearTimeoutFn=clearTimeout.bind(eK))}function iK(e){return"string"==typeof e?function(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))}class aK extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class sK extends JX{constructor(e){super(),this.writable=!1,oK(this,e),this.opts=e,this.query=e.query,this.readyState="",this.socket=e.socket}onError(e,t,n){return super.emitReserved("error",new aK(e,t,n)),this}open(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=YX(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}}const lK="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),cK={};let uK,dK=0,hK=0;function fK(e){let t="";do{t=lK[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function pK(){const e=fK(+new Date);return e!==uK?(dK=0,uK=e):e+"."+fK(dK++)}for(;hK<64;hK++)cK[lK[hK]]=hK;function gK(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}let mK=!1;try{mK="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch($le){}const vK=mK;function yK(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||vK))return new XMLHttpRequest}catch(T2){}if(!t)try{return new(eK[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(T2){}}function bK(){}const xK=null!=new yK({xdomain:!1}).responseType;class wK extends JX{constructor(e,t){super(),oK(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.create()}create(){const e=tK(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const t=this.xhr=new yK(e);try{t.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&t.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(T2){}if("POST"===this.method)try{t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(T2){}try{t.setRequestHeader("Accept","*/*")}catch(T2){}"withCredentials"in t&&(t.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(t.timeout=this.opts.requestTimeout),t.onreadystatechange=()=>{4===t.readyState&&(200===t.status||1223===t.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof t.status?t.status:0)}),0))},t.send(this.data)}catch(T2){return void this.setTimeoutFn((()=>{this.onError(T2)}),0)}"undefined"!=typeof document&&(this.index=wK.requestsCount++,wK.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=bK,e)try{this.xhr.abort()}catch(T2){}"undefined"!=typeof document&&delete wK.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(wK.requestsCount=0,wK.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",kK);else if("function"==typeof addEventListener){addEventListener("onpagehide"in eK?"pagehide":"unload",kK,!1)}function kK(){for(let e in wK.requests)wK.requests.hasOwnProperty(e)&&wK.requests[e].abort()}const SK="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),CK=eK.WebSocket||eK.MozWebSocket,_K="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const EK={websocket:class extends sK{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,n=_K?{}:tK(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=_K?new CK(e,t,n):t?new CK(e,t):new CK(e)}catch($le){return this.emitReserved("error",$le)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;UX(n,this.supportsBinary,(e=>{try{this.ws.send(e)}catch(T2){}r&&SK((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let e=this.query||{};const t=this.opts.secure?"wss":"ws";let n="";this.opts.port&&("wss"===t&&443!==Number(this.opts.port)||"ws"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=pK()),this.supportsBinary||(e.b64=1);const r=gK(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}check(){return!!CK}},polling:class extends sK{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}const t=e&&e.forceBase64;this.supportsBinary=xK&&!t}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(QX),r=[];for(let o=0;o<n.length;o++){const e=YX(n[o],t);if(r.push(e),"error"===e.type)break}return r})(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach(((e,i)=>{UX(e,!1,(e=>{r[i]=e,++o===n&&t(r.join(QX))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let e=this.query||{};const t=this.opts.secure?"https":"http";let n="";!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=pK()),this.supportsBinary||e.sid||(e.b64=1),this.opts.port&&("https"===t&&443!==Number(this.opts.port)||"http"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port);const r=gK(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new wK(this.uri(),e)}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},LK=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,PK=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function OK(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=LK.exec(e||""),i={},a=14;for(;a--;)i[PK[a]]=o[a]||"";return-1!=n&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,i.path),i.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(n[t]=r)})),n}(0,i.query),i}class TK extends JX{constructor(e,t={}){super(),e&&"object"==typeof e&&(t=e,e=null),e?(e=OK(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=OK(t.host).host),oK(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.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},t),this.opts.path=this.opts.path.replace(/\/$/,"")+"/","string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let e=n[r].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts.transportOptions[e],this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new EK[e](n)}open(){let e;if(this.opts.rememberUpgrade&&TK.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(T2){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(e){let t=this.createTransport(e),n=!1;TK.priorWebsocketSuccess=!1;const r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",(e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;TK.priorWebsocketSuccess="websocket"===t.name,this.transport.pause((()=>{n||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}})))};function o(){n||(n=!0,c(),t.close(),t=null)}const i=e=>{const n=new Error("probe error: "+e);n.transport=t.name,o(),this.emitReserved("upgradeError",n)};function a(){i("transport closed")}function s(){i("socket closed")}function l(e){t&&e.name!==t.name&&o()}const c=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",a),this.off("close",s),this.off("upgrading",l)};t.once("open",r),t.once("error",i),t.once("close",a),this.once("close",s),this.once("upgrading",l),t.open()}onOpen(){if(this.readyState="open",TK.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const n=this.writeBuffer[t].data;if(n&&(e+=iK(n)),t>0&&e>this.maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}write(e,t,n){return this.sendPacket("message",e,t,n),this}send(e,t,n){return this.sendPacket("message",e,t,n),this}sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const o={type:e,data:t,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():e()})):this.upgrading?n():e()),this}onError(e){TK.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let n=0;const r=e.length;for(;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}TK.protocol=4;const MK="function"==typeof ArrayBuffer,AK=Object.prototype.toString,IK="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===AK.call(Blob),RK="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===AK.call(File);function NK(e){return MK&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||IK&&e instanceof Blob||RK&&e instanceof File}function DK(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(DK(e[t]))return!0;return!1}if(NK(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return DK(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&DK(e[n]))return!0;return!1}function zK(e){const t=[],n=e.data,r=e;return r.data=BK(n,t),r.attachments=t.length,{packet:r,buffers:t}}function BK(e,t){if(!e)return e;if(NK(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=BK(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=BK(e[r],t));return n}return e}function jK(e,t){return e.data=FK(e.data,t),e.attachments=void 0,e}function FK(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=FK(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=FK(e[n],t));return e}var HK;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(HK||(HK={}));class WK extends JX{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e),t.type===HK.BINARY_EVENT||t.type===HK.BINARY_ACK?(this.reconstructor=new $K(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!NK(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===HK[n.type])throw new Error("unknown packet type "+n.type);if(n.type===HK.BINARY_EVENT||n.type===HK.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const o=e.substring(r,t);if(o!=Number(o)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(o)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!WK.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(T2){return!1}}static isPayloadValid(e,t){switch(e){case HK.CONNECT:return"object"==typeof t;case HK.DISCONNECT:return void 0===t;case HK.CONNECT_ERROR:return"string"==typeof t||"object"==typeof t;case HK.EVENT:case HK.BINARY_EVENT:return Array.isArray(t)&&t.length>0;case HK.ACK:case HK.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class $K{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=jK(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const UK=Object.freeze(Object.defineProperty({__proto__:null,protocol:5,get PacketType(){return HK},Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==HK.EVENT&&e.type!==HK.ACK||!DK(e)?[this.encodeAsString(e)]:(e.type=e.type===HK.EVENT?HK.BINARY_EVENT:HK.BINARY_ACK,this.encodeAsBinary(e))}encodeAsString(e){let t=""+e.type;return e.type!==HK.BINARY_EVENT&&e.type!==HK.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=zK(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},Decoder:WK},Symbol.toStringTag,{value:"Module"}));function VK(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const GK=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class qK extends JX{constructor(e,t,n){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[VK(e,"open",this.onopen.bind(this)),VK(e,"packet",this.onpacket.bind(this)),VK(e,"error",this.onerror.bind(this)),VK(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(GK.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');t.unshift(e);const n={type:HK.EVENT,data:t,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){const n=this.flags.timeout;if(void 0===n)return void(this.acks[e]=t);const r=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))}),n);this.acks[e]=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,[null,...e])}}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this.packet({type:HK.CONNECT,data:e})})):this.packet({type:HK.CONNECT,data:this.auth})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case HK.CONNECT:if(e.data&&e.data.sid){const t=e.data.sid;this.onconnect(t)}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 HK.EVENT:case HK.BINARY_EVENT:this.onevent(e);break;case HK.ACK:case HK.BINARY_ACK:this.onack(e);break;case HK.DISCONNECT:this.ondisconnect();break;case HK.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e)}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:HK.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(t.apply(this,e.data),delete this.acks[e.id])}onconnect(e){this.id=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:HK.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function ZK(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}ZK.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=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},ZK.prototype.reset=function(){this.attempts=0},ZK.prototype.setMin=function(e){this.ms=e},ZK.prototype.setMax=function(e){this.max=e},ZK.prototype.setJitter=function(e){this.jitter=e};class YK extends JX{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,oK(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new ZK({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||UK;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new TK(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=VK(t,"open",(function(){n.onopen(),e&&e()})),o=VK(t,"error",(t=>{n.cleanup(),n._readyState="closed",this.emitReserved("error",t),e?e(t):n.maybeReconnectOnOpen()}));if(!1!==this._timeout){const e=this._timeout;0===e&&r();const n=this.setTimeoutFn((()=>{r(),t.close(),t.emit("error",new Error("timeout"))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}return this.subs.push(r),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(VK(e,"ping",this.onping.bind(this)),VK(e,"data",this.ondata.bind(this)),VK(e,"error",this.onerror.bind(this)),VK(e,"close",this.onclose.bind(this)),VK(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(T2){this.onclose("parse error",T2)}}ondecoded(e){SK((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n||(n=new qK(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t){if(this.nsps[n].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach((e=>e())),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(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const XK={};function KK(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=OK(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,o=n.id,i=n.path,a=XK[o]&&i in XK[o].nsps;let s;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?s=new YK(r,t):(XK[o]||(XK[o]=new YK(r,t)),s=XK[o]),n.query&&!t.query&&(t.query=n.queryKey),s.socket(n.path,t)}let QK;Object.assign(KK,{Manager:YK,Socket:qK,io:KK,connect:KK});const JK=new Uint8Array(16);function eQ(){if(!QK&&(QK="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!QK))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return QK(JK)}const tQ=[];for(let e=0;e<256;++e)tQ.push((e+256).toString(16).slice(1));const nQ={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function rQ(e,t,n){if(nQ.randomUUID&&!t&&!e)return nQ.randomUUID();const r=(e=e||{}).random||(e.rng||eQ)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(tQ[e[t+0]]+tQ[e[t+1]]+tQ[e[t+2]]+tQ[e[t+3]]+"-"+tQ[e[t+4]]+tQ[e[t+5]]+"-"+tQ[e[t+6]]+tQ[e[t+7]]+"-"+tQ[e[t+8]]+tQ[e[t+9]]+"-"+tQ[e[t+10]]+tQ[e[t+11]]+tQ[e[t+12]]+tQ[e[t+13]]+tQ[e[t+14]]+tQ[e[t+15]]).toLowerCase()}(r)}var oQ=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,iQ=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,aQ=/[^-+\dA-Z]/g;function sQ(e,t,n,r){if(1!==arguments.length||"string"!=typeof e||/\d/.test(e)||(t=e,e=void 0),(e=e||0===e?e:new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var o=(t=String(lQ[t]||t||lQ.default)).slice(0,4);"UTC:"!==o&&"GMT:"!==o||(t=t.slice(4),n=!0,"GMT:"===o&&(r=!0));var i=function(){return n?"getUTC":"get"},a=function(){return e[i()+"Date"]()},s=function(){return e[i()+"Day"]()},l=function(){return e[i()+"Month"]()},c=function(){return e[i()+"FullYear"]()},u=function(){return e[i()+"Hours"]()},d=function(){return e[i()+"Minutes"]()},h=function(){return e[i()+"Seconds"]()},f=function(){return e[i()+"Milliseconds"]()},p=function(){return n?0:e.getTimezoneOffset()},g=function(){return hQ(e)},m=function(){return fQ(e)},v={d:function(){return a()},dd:function(){return uQ(a())},ddd:function(){return cQ.dayNames[s()]},DDD:function(){return dQ({y:c(),m:l(),d:a(),_:i(),dayName:cQ.dayNames[s()],short:!0})},dddd:function(){return cQ.dayNames[s()+7]},DDDD:function(){return dQ({y:c(),m:l(),d:a(),_:i(),dayName:cQ.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return uQ(l()+1)},mmm:function(){return cQ.monthNames[l()]},mmmm:function(){return cQ.monthNames[l()+12]},yy:function(){return String(c()).slice(2)},yyyy:function(){return uQ(c(),4)},h:function(){return u()%12||12},hh:function(){return uQ(u()%12||12)},H:function(){return u()},HH:function(){return uQ(u())},M:function(){return d()},MM:function(){return uQ(d())},s:function(){return h()},ss:function(){return uQ(h())},l:function(){return uQ(f(),3)},L:function(){return uQ(Math.floor(f()/10))},t:function(){return u()<12?cQ.timeNames[0]:cQ.timeNames[1]},tt:function(){return u()<12?cQ.timeNames[2]:cQ.timeNames[3]},T:function(){return u()<12?cQ.timeNames[4]:cQ.timeNames[5]},TT:function(){return u()<12?cQ.timeNames[6]:cQ.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":pQ(e)},o:function(){return(p()>0?"-":"+")+uQ(100*Math.floor(Math.abs(p())/60)+Math.abs(p())%60,4)},p:function(){return(p()>0?"-":"+")+uQ(Math.floor(Math.abs(p())/60),2)+":"+uQ(Math.floor(Math.abs(p())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return g()},WW:function(){return uQ(g())},N:function(){return m()}};return t.replace(oQ,(function(e){return e in v?v[e]():e.slice(1,e.length-1)}))}var lQ={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"},cQ={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"]},uQ=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return String(e).padStart(t,"0")},dQ=function(e){var t=e.y,n=e.m,r=e.d,o=e._,i=e.dayName,a=e.short,s=void 0!==a&&a,l=new Date,c=new Date;c.setDate(c[o+"Date"]()-1);var u=new Date;u.setDate(u[o+"Date"]()+1);return l[o+"FullYear"]()===t&&l[o+"Month"]()===n&&l[o+"Date"]()===r?s?"Tdy":"Today":c[o+"FullYear"]()===t&&c[o+"Month"]()===n&&c[o+"Date"]()===r?s?"Ysd":"Yesterday":u[o+"FullYear"]()===t&&u[o+"Month"]()===n&&u[o+"Date"]()===r?s?"Tmw":"Tomorrow":i},hQ=function(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate());t.setDate(t.getDate()-(t.getDay()+6)%7+3);var n=new Date(t.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=t.getTimezoneOffset()-n.getTimezoneOffset();t.setHours(t.getHours()-r);var o=(t-n)/6048e5;return 1+Math.floor(o)},fQ=function(e){var t=e.getDay();return 0===t&&(t=7),t},pQ=function(e){return(String(e).match(iQ)||[""]).pop().replace(aQ,"").replace(/GMT\+0000/g,"UTC")};const gQ=O$("socketio/generateImage"),mQ=O$("socketio/runESRGAN"),vQ=O$("socketio/runFacetool"),yQ=O$("socketio/deleteImage"),bQ=O$("socketio/requestImages"),xQ=O$("socketio/requestNewImages"),wQ=O$("socketio/cancelProcessing"),kQ=O$("socketio/requestSystemConfig"),SQ=O$("socketio/requestModelChange"),CQ=O$("socketio/saveStagingAreaImageToGallery"),_Q=O$("socketio/requestEmptyTempFolder"),EQ=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_dpmpp_2","k_dpmpp_2_a","k_euler","k_euler_a","k_heun"],LQ=[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],PQ=[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],OQ=[{key:"2x",value:2},{key:"4x",value:4}],TQ=4294967295,MQ=["gfpgan","codeformer"],AQ=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],IQ=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);var RQ=Math.PI/180;const NQ="undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{},DQ={_global:NQ,version:"8.3.14",isBrowser:"undefined"!=typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window)),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle:e=>DQ.angleDeg?e*RQ: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:"undefined"!=typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>DQ.DD.isDragging,isDragReady:()=>!!DQ.DD.node,releaseCanvasOnDestroy:!0,document:NQ.document,_injectGlobal(e){NQ.Konva=e}},zQ=e=>{DQ[e.prototype.getClassName()]=e};DQ._injectGlobal(DQ);class BQ{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.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 BQ(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){var t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,o=this.m[1]*t+this.m[3]*n,i=this.m[0]*-n+this.m[2]*t,a=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=o,this.m[2]=i,this.m[3]=a,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){var n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,o=this.m[2]+this.m[0]*e,i=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=o,this.m[3]=i,this}multiply(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],o=this.m[1]*e.m[2]+this.m[3]*e.m[3],i=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],a=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=o,this.m[4]=i,this.m[5]=a,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,o=this.m[0]*e,i=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),a=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=o,this.m[4]=i,this.m[5]=a,this}getMatrix(){return this.m}decompose(){var e=this.m[0],t=this.m[1],n=this.m[2],r=this.m[3],o=e*r-t*n;let i={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=e||0!=t){var a=Math.sqrt(e*e+t*t);i.rotation=t>0?Math.acos(e/a):-Math.acos(e/a),i.scaleX=a,i.scaleY=o/a,i.skewX=(e*n+t*r)/o,i.skewY=0}else if(0!=n||0!=r){var s=Math.sqrt(n*n+r*r);i.rotation=Math.PI/2-(r>0?Math.acos(-n/s):-Math.acos(n/s)),i.scaleX=o/s,i.scaleY=s,i.skewX=0,i.skewY=(e*n+t*r)/o}return i.rotation=GQ._getRotation(i.rotation),i}}var jQ=Math.PI/180,FQ=180/Math.PI,HQ="Konva error: ",WQ={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]},$Q=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,UQ=[];const VQ="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(e){setTimeout(e,60)},GQ={_isElement:e=>!(!e||1!=e.nodeType),_isFunction:e=>!!(e&&e.constructor&&e.call&&e.apply),_isPlainObject:e=>!!e&&e.constructor===Object,_isArray:e=>"[object Array]"===Object.prototype.toString.call(e),_isNumber:e=>"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)&&isFinite(e),_isString:e=>"[object String]"===Object.prototype.toString.call(e),_isBoolean:e=>"[object Boolean]"===Object.prototype.toString.call(e),isObject:e=>e instanceof Object,isValidSelector(e){if("string"!=typeof e)return!1;var t=e[0];return"#"===t||"."===t||t===t.toUpperCase()},_sign:e=>0===e||e>0?1:-1,requestAnimFrame(e){UQ.push(e),1===UQ.length&&VQ((function(){const e=UQ;UQ=[],e.forEach((function(e){e()}))}))},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch(T2){}return e},createImageElement:()=>document.createElement("img"),_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=GQ.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex:(e,t,n)=>((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1),_hexToRgb(e){e=e.replace("#","");var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:255&t}},getRandomColor(){for(var e=(16777215*Math.random()<<0).toString(16);e.length<6;)e="0"+e;return"#"+e},getRGB(e){var t;return e in WQ?{r:(t=WQ[e])[0],g:t[1],b:t[2]}:"#"===e[0]?this._hexToRgb(e.substring(1)):"rgb("===e.substr(0,4)?(t=$Q.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=>(e=e||"black",GQ._namedColorToRBA(e)||GQ._hex3ColorToRGBA(e)||GQ._hex6ColorToRGBA(e)||GQ._rgbColorToRGBA(e)||GQ._rgbaColorToRGBA(e)||GQ._hslColorToRGBA(e)),_namedColorToRBA(e){var t=WQ[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(0===e.indexOf("rgb(")){var t=(e=e.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(0===e.indexOf("rgba(")){var t=(e=e.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map(((e,t)=>"%"===e.slice(-1)?3===t?parseInt(e)/100:parseInt(e)/100*255:Number(e)));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if("#"===e[0]&&7===e.length)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]&&4===e.length)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,o=Number(n[1])/100,i=Number(n[2])/100;let a,s,l;if(0===o)return l=255*i,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};a=i<.5?i*(1+o):i+o-i*o;const c=2*i-a,u=[0,0,0];for(let e=0;e<3;e++)s=r+1/3*-(e-1),s<0&&s++,s>1&&s--,l=6*s<1?c+6*(a-c)*s:2*s<1?a:3*s<2?c+(a-c)*(2/3-s)*6:c,u[e]=255*l;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection:(e,t)=>!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y),cloneObject(e){var t={};for(var n in e)this._isPlainObject(e[n])?t[n]=this.cloneObject(e[n]):this._isArray(e[n])?t[n]=this.cloneArray(e[n]):t[n]=e[n];return t},cloneArray:e=>e.slice(0),degToRad:e=>e*jQ,radToDeg:e=>e*FQ,_degToRad:e=>(GQ.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),GQ.degToRad(e)),_radToDeg:e=>(GQ.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),GQ.radToDeg(e)),_getRotation:e=>DQ.angleDeg?GQ.radToDeg(e):e,_capitalize:e=>e.charAt(0).toUpperCase()+e.slice(1),throw(e){throw new Error(HQ+e)},error(e){console.error(HQ+e)},warn(e){DQ.showWarnings&&console.warn("Konva warning: "+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange:(e,t,n)=>t<=e&&e<n,_getProjectionToSegment(e,t,n,r,o,i){var a,s,l,c=(e-n)*(e-n)+(t-r)*(t-r);if(0==c)a=e,s=t,l=(o-n)*(o-n)+(i-r)*(i-r);else{var u=((o-e)*(n-e)+(i-t)*(r-t))/c;u<0?(a=e,s=t,l=(e-o)*(e-o)+(t-i)*(t-i)):u>1?(a=n,s=r,l=(n-o)*(n-o)+(r-i)*(r-i)):l=((a=e+u*(n-e))-o)*(a-o)+((s=t+u*(r-t))-i)*(s-i)}return[a,s,l]},_getProjectionToLine(e,t,n){var r=GQ.cloneObject(e),o=Number.MAX_VALUE;return t.forEach((function(i,a){if(n||a!==t.length-1){var s=t[(a+1)%t.length],l=GQ._getProjectionToSegment(i.x,i.y,s.x,s.y,e.x,e.y),c=l[0],u=l[1],d=l[2];d<o&&(r.x=c,r.y=u,o=d)}})),r},_prepareArrayForTween(e,t,n){var r,o=[],i=[];if(e.length>t.length){var a=t;t=e,e=a}for(r=0;r<e.length;r+=2)o.push({x:e[r],y:e[r+1]});for(r=0;r<t.length;r+=2)i.push({x:t[r],y:t[r+1]});var s=[];return i.forEach((function(e){var t=GQ._getProjectionToLine(e,o,n);s.push(t.x),s.push(t.y)})),s},_prepareToStringify(e){var t;for(var n in e.visitedByCircularReferenceRemoval=!0,e)if(e.hasOwnProperty(n)&&e[n]&&"object"==typeof e[n])if(t=Object.getOwnPropertyDescriptor(e,n),e[n].visitedByCircularReferenceRemoval||GQ._isElement(e[n])){if(!t.configurable)return null;delete e[n]}else if(null===GQ._prepareToStringify(e[n])){if(!t.configurable)return null;delete e[n]}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var n in t)e[n]=t[n];return e},_getFirstPointerId:e=>e.touches?e.changedTouches[0].identifier:e.pointerId||999,releaseCanvas(...e){DQ.releaseCanvasOnDestroy&&e.forEach((e=>{e.width=0,e.height=0}))}};function qQ(e){return GQ._isString(e)?'"'+e+'"':"[object Number]"===Object.prototype.toString.call(e)||GQ._isBoolean(e)?e:Object.prototype.toString.call(e)}function ZQ(e){return e>255?255:e<0?0:Math.round(e)}function YQ(){if(DQ.isUnminified)return function(e,t){return GQ._isNumber(e)||GQ.warn(qQ(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function XQ(e){if(DQ.isUnminified)return function(t,n){let r=GQ._isNumber(t),o=GQ._isArray(t)&&t.length==e;return r||o||GQ.warn(qQ(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function KQ(){if(DQ.isUnminified)return function(e,t){return GQ._isNumber(e)||"auto"===e||GQ.warn(qQ(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function QQ(){if(DQ.isUnminified)return function(e,t){return GQ._isString(e)||GQ.warn(qQ(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function JQ(){if(DQ.isUnminified)return function(e,t){const n=GQ._isString(e),r="[object CanvasGradient]"===Object.prototype.toString.call(e)||e&&e.addColorStop;return n||r||GQ.warn(qQ(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function eJ(){if(DQ.isUnminified)return function(e,t){return!0===e||!1===e||GQ.warn(qQ(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}var tJ="get",nJ="set";const rJ={addGetterSetter(e,t,n,r,o){rJ.addGetter(e,t,n),rJ.addSetter(e,t,r,o),rJ.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=tJ+GQ._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var e=this.attrs[t];return void 0===e?n:e}},addSetter(e,t,n,r){var o=nJ+GQ._capitalize(t);e.prototype[o]||rJ.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var o=nJ+GQ._capitalize(t);e.prototype[o]=function(e){return n&&null!=e&&(e=n.call(this,e,t)),this._setAttr(t,e),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,o){var i,a,s=n.length,l=GQ._capitalize,c=tJ+l(t),u=nJ+l(t);e.prototype[c]=function(){var e={};for(i=0;i<s;i++)e[a=n[i]]=this.getAttr(t+l(a));return e};var d=function(e){if(DQ.isUnminified)return function(t,n){return null==t||GQ.isObject(t)||GQ.warn(qQ(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}(n);e.prototype[u]=function(e){var i,a=this.attrs[t];for(i in r&&(e=r.call(this,e)),d&&d.call(this,e,t),e)e.hasOwnProperty(i)&&this._setAttr(t+l(i),e[i]);return e||n.forEach((e=>{this._setAttr(t+l(e),void 0)})),this._fireChangeEvent(t,a,e),o&&o.call(this),this},rJ.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=GQ._capitalize(t),r=nJ+n,o=tJ+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[o]()}},addDeprecatedGetterSetter(e,t,n,r){GQ.error("Adding deprecated "+t);var o=tJ+GQ._capitalize(t),i=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[o]=function(){GQ.error(i);var e=this.attrs[t];return void 0===e?n:e},rJ.addSetter(e,t,r,(function(){GQ.error(i)})),rJ.addOverloadedGetterSetter(e,t)},backCompat(e,t){GQ.each(t,(function(t,n){var r=e.prototype[n],o=tJ+GQ._capitalize(t),i=nJ+GQ._capitalize(t);function a(){r.apply(this,arguments),GQ.error('"'+t+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}e.prototype[t]=a,e.prototype[o]=a,e.prototype[i]=a}))},afterSetFilter(){this._filterUpToDate=!1}};function oJ(e){var t,n,r=[],o=e.length,i=GQ;for(t=0;t<o;t++)n=e[t],i._isNumber(n)?n=Math.round(1e3*n)/1e3:i._isString(n)||(n+=""),r.push(n);return r}var iJ=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];class aJ{constructor(e){this.canvas=e,DQ.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,t){var n,r,o,i,a=this.traceArr,s=a.length,l="";for(n=0;n<s;n++)(o=(r=a[n]).method)?(i=r.args,l+=o,e?l+="()":GQ._isArray(i[0])?l+="(["+i.join(",")+"])":(t&&(i=i.map((e=>"number"==typeof e?Math.floor(e):e))),l+="("+i.join(",")+")")):(l+=r.property,e||(l+="="+r.val)),l+=";";return l}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr;t.push(e),t.length>=100&&t.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_applyLineCap(e){var t=e.getLineCap();t&&this.setAttr("lineCap",t)}_applyOpacity(e){var t=e.getAbsoluteOpacity();1!==t&&this.setAttr("globalAlpha",t)}_applyLineJoin(e){var t=e.attrs.lineJoin;t&&this.setAttr("lineJoin",t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,o,i){this._context.arc(e,t,n,r,o,i)}arcTo(e,t,n,r,o){this._context.arcTo(e,t,n,r,o)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,o,i){this._context.bezierCurveTo(e,t,n,r,o,i)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(e,t){var n=arguments;return 2===n.length?this._context.createImageData(e,t):1===n.length?this._context.createImageData(e):void 0}createLinearGradient(e,t,n,r){return this._context.createLinearGradient(e,t,n,r)}createPattern(e,t){return this._context.createPattern(e,t)}createRadialGradient(e,t,n,r,o,i){return this._context.createRadialGradient(e,t,n,r,o,i)}drawImage(e,t,n,r,o,i,a,s,l){var c=arguments,u=this._context;3===c.length?u.drawImage(e,t,n):5===c.length?u.drawImage(e,t,n,r,o):9===c.length&&u.drawImage(e,t,n,r,o,i,a,s,l)}ellipse(e,t,n,r,o,i,a,s){this._context.ellipse(e,t,n,r,o,i,a,s)}isPointInPath(e,t){return this._context.isPointInPath(e,t)}fill(e){e?this._context.fill(e):this._context.fill()}fillRect(e,t,n,r){this._context.fillRect(e,t,n,r)}strokeRect(e,t,n,r){this._context.strokeRect(e,t,n,r)}fillText(e,t,n,r){r?this._context.fillText(e,t,n,r):this._context.fillText(e,t,n)}measureText(e){return this._context.measureText(e)}getImageData(e,t,n,r){return this._context.getImageData(e,t,n,r)}lineTo(e,t){this._context.lineTo(e,t)}moveTo(e,t){this._context.moveTo(e,t)}rect(e,t,n,r){this._context.rect(e,t,n,r)}putImageData(e,t,n){this._context.putImageData(e,t,n)}quadraticCurveTo(e,t,n,r){this._context.quadraticCurveTo(e,t,n,r)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,t){this._context.scale(e,t)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,t,n,r,o,i){this._context.setTransform(e,t,n,r,o,i)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,t,n,r){this._context.strokeText(e,t,n,r)}transform(e,t,n,r,o,i){this._context.transform(e,t,n,r,o,i)}translate(e,t){this._context.translate(e,t)}_enableTrace(){var e,t,n=this,r=iJ.length,o=this.setAttr,i=function(e){var r,o=n[e];n[e]=function(){return t=oJ(Array.prototype.slice.call(arguments,0)),r=o.apply(n,arguments),n._trace({method:e,args:t}),r}};for(e=0;e<r;e++)i(iJ[e]);n.setAttr=function(){o.apply(n,arguments);var e=arguments[0],t=arguments[1];"shadowOffsetX"!==e&&"shadowOffsetY"!==e&&"shadowBlur"!==e||(t/=this.canvas.getPixelRatio()),n._trace({property:e,val:t})}}_applyGlobalCompositeOperation(e){const t=e.attrs.globalCompositeOperation;!t||"source-over"===t||this.setAttr("globalCompositeOperation",t)}}["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"].forEach((function(e){Object.defineProperty(aJ.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})}));class sJ extends aJ{constructor(e){super(e),this._context=e._canvas.getContext("2d")}_fillColor(e){var t=e.fill();this.setAttr("fillStyle",t),e._fillFunc(this)}_fillPattern(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){var t=e._getLinearGradient();t&&(this.setAttr("fillStyle",t),e._fillFunc(this))}_fillRadialGradient(e){var t=e._getRadialGradient();t&&(this.setAttr("fillStyle",t),e._fillFunc(this))}_fill(e){var t=e.fill(),n=e.getFillPriority();if(t&&"color"===n)this._fillColor(e);else{var r=e.getFillPatternImage();if(r&&"pattern"===n)this._fillPattern(e);else{var o=e.getFillLinearGradientColorStops();if(o&&"linear-gradient"===n)this._fillLinearGradient(e);else{var i=e.getFillRadialGradientColorStops();i&&"radial-gradient"===n?this._fillRadialGradient(e):t?this._fillColor(e):r?this._fillPattern(e):o?this._fillLinearGradient(e):i&&this._fillRadialGradient(e)}}}}_strokeLinearGradient(e){var t=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),r=e.getStrokeLinearGradientColorStops(),o=this.createLinearGradient(t.x,t.y,n.x,n.y);if(r){for(var i=0;i<r.length;i+=2)o.addColorStop(r[i],r[i+1]);this.setAttr("strokeStyle",o)}}_stroke(e){var t=e.dash(),n=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(e),t&&e.dashEnabled()&&(this.setLineDash(t),this.setAttr("lineDashOffset",e.dashOffset())),this.setAttr("lineWidth",e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),e.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(e):this.setAttr("strokeStyle",e.stroke()),e._strokeFunc(this),n||this.restore()}}_applyShadow(e){var t,n,r,o=null!==(t=e.getShadowRGBA())&&void 0!==t?t:"black",i=null!==(n=e.getShadowBlur())&&void 0!==n?n:5,a=null!==(r=e.getShadowOffset())&&void 0!==r?r:{x:0,y:0},s=e.getAbsoluteScale(),l=this.canvas.getPixelRatio(),c=s.x*l,u=s.y*l;this.setAttr("shadowColor",o),this.setAttr("shadowBlur",i*Math.min(Math.abs(c),Math.abs(u))),this.setAttr("shadowOffsetX",a.x*c),this.setAttr("shadowOffsetY",a.y*u)}}class lJ extends aJ{constructor(e){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:!0})}_fill(e){this.save(),this.setAttr("fillStyle",e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){var t=e.getStrokeScaleEnabled();if(!t){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(e);var r=e.hitStrokeWidth(),o="auto"===r?e.strokeWidth():r;this.setAttr("lineWidth",o),this.setAttr("strokeStyle",e.colorKey),e._strokeFuncHit(this),t||this.restore()}}}var cJ;class uJ{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var t=(e||{}).pixelRatio||DQ.pixelRatio||function(){if(cJ)return cJ;var e=GQ.createCanvasElement(),t=e.getContext("2d");return cJ=(DQ._global.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),GQ.releaseCanvas(e),cJ}();this.pixelRatio=t,this._canvas=GQ.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){var t=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/t,this.getHeight()/t)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";var t=this.pixelRatio;this.getContext()._context.scale(t,t)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";var t=this.pixelRatio;this.getContext()._context.scale(t,t)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,t){this.setWidth(e||0),this.setHeight(t||0)}toDataURL(e,t){try{return this._canvas.toDataURL(e,t)}catch(T2){try{return this._canvas.toDataURL()}catch($le){return GQ.error("Unable to get data URL. "+$le.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}rJ.addGetterSetter(uJ,"pixelRatio",void 0,YQ());class dJ extends uJ{constructor(e={width:0,height:0}){super(e),this.context=new sJ(this),this.setSize(e.width,e.height)}}class hJ extends uJ{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new lJ(this),this.setSize(e.width,e.height)}}const fJ={get isDragging(){var e=!1;return fJ._dragElements.forEach((t=>{"dragging"===t.dragStatus&&(e=!0)})),e},justDragged:!1,get node(){var e;return fJ._dragElements.forEach((t=>{e=t.node})),e},_dragElements:new Map,_drag(e){const t=[];fJ._dragElements.forEach(((n,r)=>{const{node:o}=n,i=o.getStage();i.setPointersPositions(e),void 0===n.pointerId&&(n.pointerId=GQ._getFirstPointerId(e));const a=i._changedPointerPositions.find((e=>e.id===n.pointerId));if(a){if("dragging"!==n.dragStatus){var s=o.dragDistance();if(Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y))<s)return;if(o.startDrag({evt:e}),!o.isDragging())return}o._setDragPosition(e,n),t.push(o)}})),t.forEach((t=>{t.fire("dragmove",{type:"dragmove",target:t,evt:e},!0)}))},_endDragBefore(e){const t=[];fJ._dragElements.forEach((n=>{const{node:r}=n,o=r.getStage();e&&o.setPointersPositions(e);if(!o._changedPointerPositions.find((e=>e.id===n.pointerId)))return;"dragging"!==n.dragStatus&&"stopped"!==n.dragStatus||(fJ.justDragged=!0,DQ._mouseListenClick=!1,DQ._touchListenClick=!1,DQ._pointerListenClick=!1,n.dragStatus="stopped");const i=n.node.getLayer()||n.node instanceof DQ.Stage&&n.node;i&&-1===t.indexOf(i)&&t.push(i)})),t.forEach((e=>{e.draw()}))},_endDragAfter(e){fJ._dragElements.forEach(((t,n)=>{"stopped"===t.dragStatus&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),"dragging"!==t.dragStatus&&fJ._dragElements.delete(n)}))}};DQ.isBrowser&&(window.addEventListener("mouseup",fJ._endDragBefore,!0),window.addEventListener("touchend",fJ._endDragBefore,!0),window.addEventListener("mousemove",fJ._drag),window.addEventListener("touchmove",fJ._drag),window.addEventListener("mouseup",fJ._endDragAfter,!1),window.addEventListener("touchend",fJ._endDragAfter,!1));var pJ="absoluteOpacity",gJ="allEventListeners",mJ="absoluteTransform",vJ="absoluteScale",yJ="canvas",bJ="listening",xJ="mouseenter",wJ="mouseleave",kJ="Shape",SJ=" ",CJ="stage",_J="transform",EJ="visible",LJ=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(SJ);let PJ=1;class OJ{constructor(e){this._id=PJ++,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(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){e!==_J&&e!==mJ||!this._cache.get(e)?e?this._cache.delete(e):this._cache.clear():this._cache.get(e).dirty=!0}_getCache(e,t){var n=this._cache.get(e);return(void 0===n||(e===_J||e===mJ)&&!0===n.dirty)&&(n=t.call(this),this._cache.set(e,n)),n}_calculate(e,t,n){if(!this._attachedDepsListeners.get(e)){const n=t.map((e=>e+"Change.konva")).join(SJ);this.on(n,(()=>{this._clearCache(e)})),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(yJ)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===mJ&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(yJ)){const{scene:e,filter:t,hit:n}=this._cache.get(yJ);GQ.releaseCanvas(e,t,n),this._cache.delete(yJ)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var t=e||{},n={};void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height||(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var r=Math.ceil(t.width||n.width),o=Math.ceil(t.height||n.height),i=t.pixelRatio,a=void 0===t.x?Math.floor(n.x):t.x,s=void 0===t.y?Math.floor(n.y):t.y,l=t.offset||0,c=t.drawBorder||!1,u=t.hitCanvasPixelRatio||1;if(r&&o){a-=l,s-=l;var d=new dJ({pixelRatio:i,width:r+=2*l+1,height:o+=2*l+1}),h=new dJ({pixelRatio:i,width:0,height:0}),f=new hJ({pixelRatio:u,width:r,height:o}),p=d.getContext(),g=f.getContext();return f.isCache=!0,d.isCache=!0,this._cache.delete(yJ),this._filterUpToDate=!1,!1===t.imageSmoothingEnabled&&(d.getContext()._context.imageSmoothingEnabled=!1,h.getContext()._context.imageSmoothingEnabled=!1),p.save(),g.save(),p.translate(-a,-s),g.translate(-a,-s),this._isUnderCache=!0,this._clearSelfAndDescendantCache(pJ),this._clearSelfAndDescendantCache(vJ),this.drawScene(d,this),this.drawHit(f,this),this._isUnderCache=!1,p.restore(),g.restore(),c&&(p.save(),p.beginPath(),p.rect(0,0,r,o),p.closePath(),p.setAttr("strokeStyle","red"),p.setAttr("lineWidth",5),p.stroke(),p.restore()),this._cache.set(yJ,{scene:d,filter:h,hit:f,x:a,y:s}),this._requestDraw(),this}GQ.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}isCached(){return this._cache.has(yJ)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,t){var n,r,o,i,a=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],s=this.getAbsoluteTransform(t);return a.forEach((function(e){var t=s.point(e);void 0===n&&(n=o=t.x,r=i=t.y),n=Math.min(n,t.x),r=Math.min(r,t.y),o=Math.max(o,t.x),i=Math.max(i,t.y)})),{x:n,y:r,width:o-n,height:i-r}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const t=this._getCanvasCache();e.translate(t.x,t.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}_drawCachedHitCanvas(e){var t=this._getCanvasCache(),n=t.hit;e.save(),e.translate(t.x,t.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e,t,n,r,o=this.filters(),i=this._getCanvasCache(),a=i.scene,s=i.filter,l=s.getContext();if(o){if(!this._filterUpToDate){var c=a.pixelRatio;s.setSize(a.width/a.pixelRatio,a.height/a.pixelRatio);try{for(e=o.length,l.clear(),l.drawImage(a._canvas,0,0,a.getWidth()/c,a.getHeight()/c),t=l.getImageData(0,0,s.getWidth(),s.getHeight()),n=0;n<e;n++)"function"==typeof(r=o[n])?(r.call(this,t),l.putImageData(t,0,0)):GQ.error("Filter should be type of function, but got "+typeof r+" instead. Please check correct filters")}catch(T2){GQ.error("Unable to apply filter. "+T2.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return s}return a}on(e,t){if(this._cache&&this._cache.delete(gJ),3===arguments.length)return this._delegate.apply(this,arguments);var n,r,o,i,a=e.split(SJ),s=a.length;for(n=0;n<s;n++)o=(r=a[n].split("."))[0],i=r[1]||"",this.eventListeners[o]||(this.eventListeners[o]=[]),this.eventListeners[o].push({name:i,handler:t});return this}off(e,t){var n,r,o,i,a,s=(e||"").split(SJ),l=s.length;if(this._cache&&this._cache.delete(gJ),!e)for(r in this.eventListeners)this._off(r);for(n=0;n<l;n++)if(i=(o=s[n].split("."))[0],a=o[1],i)this.eventListeners[i]&&this._off(i,a,t);else for(r in this.eventListeners)this._off(r,a,t);return this}dispatchEvent(e){var t={target:this,type:e.type,evt:e};return this.fire(e.type,t),this}addEventListener(e,t){return this.on(e,(function(e){t.call(this,e.evt)})),this}removeEventListener(e){return this.off(e),this}_delegate(e,t,n){var r=this;this.on(e,(function(e){for(var o=e.target.findAncestors(t,!0,r),i=0;i<o.length;i++)(e=GQ.cloneObject(e)).currentTarget=o[i],n.call(o[i],e)}))}remove(){return this.isDragging()&&this.stopDrag(),fJ._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(mJ),this._clearSelfAndDescendantCache(pJ),this._clearSelfAndDescendantCache(vJ),this._clearSelfAndDescendantCache(CJ),this._clearSelfAndDescendantCache(EJ),this._clearSelfAndDescendantCache(bJ)}_remove(){this._clearCaches();var e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(e){var t="get"+GQ._capitalize(e);return GQ._isFunction(this[t])?this[t]():this.attrs[e]}getAncestors(){for(var e=this.getParent(),t=[];e;)t.push(e),e=e.getParent();return t}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges((()=>{var t,n;if(!e)return this;for(t in e)"children"!==t&&(n="set"+GQ._capitalize(t),GQ._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))})),this}isListening(){return this._getCache(bJ,this._isListening)}_isListening(e){if(!this.listening())return!1;const t=this.getParent();return!t||t===e||this===e||t._isListening(e)}isVisible(){return this._getCache(EJ,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const t=this.getParent();return!t||t===e||this===e||t._isVisible(e)}shouldDrawHit(e,t=!1){if(e)return this._isVisible(e)&&this._isListening(e);var n=this.getLayer(),r=!1;fJ._dragElements.forEach((e=>{"dragging"===e.dragStatus&&("Stage"===e.node.nodeType||e.node.getLayer()===n)&&(r=!0)}));var o=!t&&!DQ.hitOnDragEnabled&&r;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 e,t,n,r,o=this.getDepth(),i=this,a=0;return"Stage"!==i.nodeType&&function s(l){for(e=[],t=l.length,n=0;n<t;n++)r=l[n],a++,r.nodeType!==kJ&&(e=e.concat(r.getChildren().slice())),r._id===i._id&&(n=t);e.length>0&&e[0].getDepth()<=o&&s(e)}(i.getStage().getChildren()),a}getDepth(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(_J),this._clearSelfAndDescendantCache(mJ)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges((()=>{this.x(e.x),this.y(e.y)})),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var e=this.getStage().getPointerPosition();if(!e)return null;var t=this.getAbsoluteTransform().copy();return t.invert(),t.point(e)}getAbsolutePosition(e){let t=!1,n=this.parent;for(;n;){if(n.isCached()){t=!0;break}n=n.parent}t&&!e&&(e=!0);var r=this.getAbsoluteTransform(e).getMatrix(),o=new BQ,i=this.offset();return o.m=r.slice(),o.translate(i.x,i.y),o.getTranslation()}setAbsolutePosition(e){var t=this._clearTransform();this.attrs.x=t.x,this.attrs.y=t.y,delete t.x,delete t.y,this._clearCache(_J);var n=this._getAbsoluteTransform().copy();return n.invert(),n.translate(e.x,e.y),e={x:this.attrs.x+n.getTranslation().x,y:this.attrs.y+n.getTranslation().y},this._setTransform(t),this.setPosition({x:e.x,y:e.y}),this._clearCache(_J),this._clearSelfAndDescendantCache(mJ),this}_setTransform(e){var t;for(t in e)this.attrs[t]=e[t]}_clearTransform(){var e={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,e}move(e){var t=e.x,n=e.y,r=this.x(),o=this.y();return void 0!==t&&(r+=t),void 0!==n&&(o+=n),this.setPosition({x:r,y:o}),this}_eachAncestorReverse(e,t){var n,r,o=[],i=this.getParent();if(!t||t._id!==this._id){for(o.unshift(this);i&&(!t||i._id!==t._id);)o.unshift(i),i=i.parent;for(n=o.length,r=0;r<n;r++)e(o[r])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return GQ.warn("Node has no parent. moveToTop function is ignored."),!1;var e=this.index;return e<this.parent.getChildren().length-1&&(this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}moveUp(){if(!this.parent)return GQ.warn("Node has no parent. moveUp function is ignored."),!1;var e=this.index;return e<this.parent.getChildren().length-1&&(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return GQ.warn("Node has no parent. moveDown function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return GQ.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(e){if(!this.parent)return GQ.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&GQ.warn("Unexpected value "+e+" 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 t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(pJ,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e,t,n,r,o={},i=this.getAttrs();for(e in o.attrs={},i)t=i[e],GQ.isObject(t)&&!GQ._isPlainObject(t)&&!GQ._isArray(t)||(n="function"==typeof this[e]&&this[e],delete i[e],r=n?n.call(this):null,i[e]=t,r!==t&&(o.attrs[e]=t));return o.className=this.getClassName(),GQ._prepareToStringify(o)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,t,n){var r=[];t&&this._isMatch(e)&&r.push(this);for(var o=this.parent;o;){if(o===n)return r;o._isMatch(e)&&r.push(o),o=o.parent}return r}isAncestorOf(e){return!1}findAncestor(e,t,n){return this.findAncestors(e,t,n)[0]}_isMatch(e){if(!e)return!1;if("function"==typeof e)return e(this);var t,n,r=e.replace(/ /g,"").split(","),o=r.length;for(t=0;t<o;t++)if(n=r[t],GQ.isValidSelector(n)||(GQ.warn('Selector "'+n+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),GQ.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),GQ.warn("Konva is awesome, right?")),"#"===n.charAt(0)){if(this.id()===n.slice(1))return!0}else if("."===n.charAt(0)){if(this.hasName(n.slice(1)))return!0}else if(this.className===n||this.nodeType===n)return!0;return!1}getLayer(){var e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(CJ,this._getStage)}_getStage(){var e=this.getParent();return e?e.getStage():void 0}fire(e,t={},n){return t.target=t.target||this,n?this._fireAndBubble(e,t):this._fire(e,t),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(mJ,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var t;if(e)return t=new BQ,this._eachAncestorReverse((function(e){var n=e.transformsEnabled();"all"===n?t.multiply(e.getTransform()):"position"===n&&t.translate(e.x()-e.offsetX(),e.y()-e.offsetY())}),e),t;t=this._cache.get(mJ)||new BQ,this.parent?this.parent.getAbsoluteTransform().copyInto(t):t.reset();var n=this.transformsEnabled();if("all"===n)t.multiply(this.getTransform());else if("position"===n){const e=this.attrs.x||0,n=this.attrs.y||0,r=this.attrs.offsetX||0,o=this.attrs.offsetY||0;t.translate(e-r,n-o)}return t.dirty=!1,t}getAbsoluteScale(e){for(var t=this;t;)t._isUnderCache&&(e=t),t=t.getParent();const n=this.getAbsoluteTransform(e).decompose();return{x:n.scaleX,y:n.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(_J,this._getTransform)}_getTransform(){var e,t,n=this._cache.get(_J)||new BQ;n.reset();var r=this.x(),o=this.y(),i=DQ.getAngle(this.rotation()),a=null!==(e=this.attrs.scaleX)&&void 0!==e?e:1,s=null!==(t=this.attrs.scaleY)&&void 0!==t?t:1,l=this.attrs.skewX||0,c=this.attrs.skewY||0,u=this.attrs.offsetX||0,d=this.attrs.offsetY||0;return 0===r&&0===o||n.translate(r,o),0!==i&&n.rotate(i),0===l&&0===c||n.skew(l,c),1===a&&1===s||n.scale(a,s),0===u&&0===d||n.translate(-1*u,-1*d),n.dirty=!1,n}clone(e){var t,n,r,o,i,a=GQ.cloneObject(this.attrs);for(t in e)a[t]=e[t];var s=new this.constructor(a);for(t in this.eventListeners)for(r=(n=this.eventListeners[t]).length,o=0;o<r;o++)(i=n[o]).name.indexOf("konva")<0&&(s.eventListeners[t]||(s.eventListeners[t]=[]),s.eventListeners[t].push(i));return s}_toKonvaCanvas(e){e=e||{};var t=this.getClientRect(),n=this.getStage(),r=void 0!==e.x?e.x:Math.floor(t.x),o=void 0!==e.y?e.y:Math.floor(t.y),i=e.pixelRatio||1,a=new dJ({width:e.width||Math.ceil(t.width)||(n?n.width():0),height:e.height||Math.ceil(t.height)||(n?n.height():0),pixelRatio:i}),s=a.getContext();return!1===e.imageSmoothingEnabled&&(s._context.imageSmoothingEnabled=!1),s.save(),(r||o)&&s.translate(-1*r,-1*o),this.drawScene(a),s.restore(),a}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){var t=(e=e||{}).mimeType||null,n=e.quality||null,r=this._toKonvaCanvas(e).toDataURL(t,n);return e.callback&&e.callback(r),r}toImage(e){return new Promise(((t,n)=>{try{const n=null==e?void 0:e.callback;n&&delete e.callback,GQ._urlToImage(this.toDataURL(e),(function(e){t(e),null==n||n(e)}))}catch($le){n($le)}}))}toBlob(e){return new Promise(((t,n)=>{try{const n=null==e?void 0:e.callback;n&&delete e.callback,this.toCanvas(e).toBlob((e=>{t(e),null==n||n(e)}))}catch($le){n($le)}}))}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():DQ.dragDistance}_off(e,t,n){var r,o,i,a=this.eventListeners[e];for(r=0;r<a.length;r++)if(o=a[r].name,i=a[r].handler,!("konva"===o&&"konva"!==t||t&&o!==t||n&&n!==i)){if(a.splice(r,1),0===a.length){delete this.eventListeners[e];break}r--}}_fireChangeEvent(e,t,n){this._fire(e+"Change",{oldVal:t,newVal:n})}addName(e){if(!this.hasName(e)){var t=this.name(),n=t?t+" "+e:e;this.name(n)}return this}hasName(e){if(!e)return!1;const t=this.name();return!!t&&-1!==(t||"").split(/\s/g).indexOf(e)}removeName(e){var t=(this.name()||"").split(/\s/g),n=t.indexOf(e);return-1!==n&&(t.splice(n,1),this.name(t.join(" "))),this}setAttr(e,t){var n=this["set"+GQ._capitalize(e)];return GQ._isFunction(n)?n.call(this,t):this._setAttr(e,t),this}_requestDraw(){if(DQ.autoDrawEnabled){const e=this.getLayer()||this.getStage();null==e||e.batchDraw()}}_setAttr(e,t){var n=this.attrs[e];(n!==t||GQ.isObject(t))&&(null==t?delete this.attrs[e]:this.attrs[e]=t,this._shouldFireChangeEvents&&this._fireChangeEvent(e,n,t),this._requestDraw())}_setComponentAttr(e,t,n){var r;void 0!==n&&((r=this.attrs[e])||(this.attrs[e]=this.getAttr(e)),this.attrs[e][t]=n,this._fireChangeEvent(e,r,n))}_fireAndBubble(e,t,n){if(t&&this.nodeType===kJ&&(t.target=this),!((e===xJ||e===wJ)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||"Stage"===this.nodeType&&!n))){this._fire(e,t);var r=(e===xJ||e===wJ)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(t&&!t.cancelBubble||!t)&&this.parent&&this.parent.isListening()&&!r&&(n&&n.parent?this._fireAndBubble.call(this.parent,e,t,n):this._fireAndBubble.call(this.parent,e,t))}}_getProtoListeners(e){let t=this._cache.get(gJ);if(!t){t={};let e=Object.getPrototypeOf(this);for(;e;)if(e.eventListeners){for(var n in e.eventListeners){const r=e.eventListeners[n],o=t[n]||[];t[n]=r.concat(o)}e=Object.getPrototypeOf(e)}else e=Object.getPrototypeOf(e);this._cache.set(gJ,t)}return t[e]}_fire(e,t){(t=t||{}).currentTarget=this,t.type=e;const n=this._getProtoListeners(e);if(n)for(var r=0;r<n.length;r++)n[r].handler.call(this,t);const o=this.eventListeners[e];if(o)for(r=0;r<o.length;r++)o[r].handler.call(this,t)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){var t=e?e.pointerId:void 0,n=this.getStage(),r=this.getAbsolutePosition(),o=n._getPointerById(t)||n._changedPointerPositions[0]||r;fJ._dragElements.set(this._id,{node:this,startPointerPos:o,offset:{x:o.x-r.x,y:o.y-r.y},dragStatus:"ready",pointerId:t})}startDrag(e,t=!0){fJ._dragElements.has(this._id)||this._createDragElement(e);fJ._dragElements.get(this._id).dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:e&&e.evt},t)}_setDragPosition(e,t){const n=this.getStage()._getPointerById(t.pointerId);if(n){var r={x:n.x-t.offset.x,y:n.y-t.offset.y},o=this.dragBoundFunc();if(void 0!==o){const t=o.call(this,r,e);t?r=t:GQ.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===r.x&&this._lastPos.y===r.y||(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}}stopDrag(e){const t=fJ._dragElements.get(this._id);t&&(t.dragStatus="stopped"),fJ._endDragBefore(e),fJ._endDragAfter(e)}setDraggable(e){this._setAttr("draggable",e),this._dragChange()}isDragging(){const e=fJ._dragElements.get(this._id);return!!e&&"dragging"===e.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",(function(e){if((!(void 0!==e.evt.button)||DQ.dragButtons.indexOf(e.evt.button)>=0)&&!this.isDragging()){var t=!1;fJ._dragElements.forEach((e=>{this.isAncestorOf(e.node)&&(t=!0)})),t||this._createDragElement(e)}}))}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const e=fJ._dragElements.get(this._id),t=e&&"dragging"===e.dragStatus,n=e&&"ready"===e.dragStatus;t?this.stopDrag():n&&fJ._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const t=this.getStage();if(!t)return!1;const n={x:-e.x,y:-e.y,width:t.width()+2*e.x,height:t.height()+2*e.y};return GQ.haveIntersection(n,this.getClientRect())}static create(e,t){return GQ._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}static _createNode(e,t){var n,r,o,i=OJ.prototype.getClassName.call(e),a=e.children;t&&(e.attrs.container=t),DQ[i]||(GQ.warn('Can not find a node with class name "'+i+'". Fallback to "Shape".'),i="Shape");if(n=new(0,DQ[i])(e.attrs),a)for(r=a.length,o=0;o<r;o++)n.add(OJ._createNode(a[o]));return n}}OJ.prototype.nodeType="Node",OJ.prototype._attrsAffectingSize=[],OJ.prototype.eventListeners={},OJ.prototype.on.call(OJ.prototype,LJ,(function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(_J),this._clearSelfAndDescendantCache(mJ))})),OJ.prototype.on.call(OJ.prototype,"visibleChange.konva",(function(){this._clearSelfAndDescendantCache(EJ)})),OJ.prototype.on.call(OJ.prototype,"listeningChange.konva",(function(){this._clearSelfAndDescendantCache(bJ)})),OJ.prototype.on.call(OJ.prototype,"opacityChange.konva",(function(){this._clearSelfAndDescendantCache(pJ)}));const TJ=rJ.addGetterSetter;TJ(OJ,"zIndex"),TJ(OJ,"absolutePosition"),TJ(OJ,"position"),TJ(OJ,"x",0,YQ()),TJ(OJ,"y",0,YQ()),TJ(OJ,"globalCompositeOperation","source-over",QQ()),TJ(OJ,"opacity",1,YQ()),TJ(OJ,"name","",QQ()),TJ(OJ,"id","",QQ()),TJ(OJ,"rotation",0,YQ()),rJ.addComponentsGetterSetter(OJ,"scale",["x","y"]),TJ(OJ,"scaleX",1,YQ()),TJ(OJ,"scaleY",1,YQ()),rJ.addComponentsGetterSetter(OJ,"skew",["x","y"]),TJ(OJ,"skewX",0,YQ()),TJ(OJ,"skewY",0,YQ()),rJ.addComponentsGetterSetter(OJ,"offset",["x","y"]),TJ(OJ,"offsetX",0,YQ()),TJ(OJ,"offsetY",0,YQ()),TJ(OJ,"dragDistance",null,YQ()),TJ(OJ,"width",0,YQ()),TJ(OJ,"height",0,YQ()),TJ(OJ,"listening",!0,eJ()),TJ(OJ,"preventDefault",!0,eJ()),TJ(OJ,"filters",null,(function(e){return this._filterUpToDate=!1,e})),TJ(OJ,"visible",!0,eJ()),TJ(OJ,"transformsEnabled","all",QQ()),TJ(OJ,"size"),TJ(OJ,"dragBoundFunc"),TJ(OJ,"draggable",!1,eJ()),rJ.backCompat(OJ,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class MJ extends OJ{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];const t=this.children||[];var n=[];return t.forEach((function(t){e(t)&&n.push(t)})),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach((e=>{e.parent=null,e.index=0,e.remove()})),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach((e=>{e.parent=null,e.index=0,e.destroy()})),this.children=[],this._requestDraw(),this}add(...e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}var n=e[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire("add",{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){var t=this._generalFind(e,!0);return t.length>0?t[0]:void 0}_generalFind(e,t){var n=[];return this._descendants((r=>{const o=r._isMatch(e);return o&&n.push(r),!(!o||!t)})),n}_descendants(e){let t=!1;const n=this.getChildren();for(const r of n){if(t=e(r),t)return!0;if(r.hasChildren()&&(t=r._descendants(e),t))return!0}return!1}toObject(){var e=OJ.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach((t=>{e.children.push(t.toObject())})),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var t=OJ.prototype.clone.call(this,e);return this.getChildren().forEach((function(e){t.add(e.clone())})),t}getAllIntersections(e){var t=[];return this.find("Shape").forEach((function(n){n.isVisible()&&n.intersects(e)&&t.push(n)})),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),this.isCached()||null===(t=this.children)||void 0===t||t.forEach((function(t){t._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;null===(e=this.children)||void 0===e||e.forEach((function(e,t){e.index=t})),this._requestDraw()}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas(),o=r&&r.getContext(),i=this._getCanvasCache(),a=i&&i.scene,s=r&&r.isCache;if(!this.isVisible()&&!s)return this;if(a){o.save();var l=this.getAbsoluteTransform(t).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",r,t);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,o=r&&r.getContext(),i=this._getCanvasCache();if(i&&i.hit){o.save();var a=this.getAbsoluteTransform(t).getMatrix();o.transform(a[0],a[1],a[2],a[3],a[4],a[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",r,t);return this}_drawChildren(e,t,n){var r,o=t&&t.getContext(),i=this.clipWidth(),a=this.clipHeight(),s=this.clipFunc(),l=i&&a||s;const c=n===this;if(l){o.save();var u=this.getAbsoluteTransform(n),d=u.getMatrix();if(o.transform(d[0],d[1],d[2],d[3],d[4],d[5]),o.beginPath(),s)s.call(this,o,this);else{var h=this.clipX(),f=this.clipY();o.rect(h,f,i,a)}o.clip(),d=u.copy().invert().getMatrix(),o.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var p=!c&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===e;p&&(o.save(),o._applyGlobalCompositeOperation(this)),null===(r=this.children)||void 0===r||r.forEach((function(r){r[e](t,n)})),p&&o.restore(),l&&o.restore()}getClientRect(e){var t,n,r,o,i,a=(e=e||{}).skipTransform,s=e.relativeTo,l={x:1/0,y:1/0,width:0,height:0},c=this;null===(t=this.children)||void 0===t||t.forEach((function(t){if(t.visible()){var a=t.getClientRect({relativeTo:c,skipShadow:e.skipShadow,skipStroke:e.skipStroke});0===a.width&&0===a.height||(void 0===n?(n=a.x,r=a.y,o=a.x+a.width,i=a.y+a.height):(n=Math.min(n,a.x),r=Math.min(r,a.y),o=Math.max(o,a.x+a.width),i=Math.max(i,a.y+a.height)))}}));for(var u=this.find("Shape"),d=!1,h=0;h<u.length;h++){if(u[h]._isVisible(this)){d=!0;break}}return l=d&&void 0!==n?{x:n,y:r,width:o-n,height:i-r}:{x:0,y:0,width:0,height:0},a?l:this._transformedRect(l,s)}}rJ.addComponentsGetterSetter(MJ,"clip",["x","y","width","height"]),rJ.addGetterSetter(MJ,"clipX",void 0,YQ()),rJ.addGetterSetter(MJ,"clipY",void 0,YQ()),rJ.addGetterSetter(MJ,"clipWidth",void 0,YQ()),rJ.addGetterSetter(MJ,"clipHeight",void 0,YQ()),rJ.addGetterSetter(MJ,"clipFunc");const AJ=new Map,IJ=void 0!==DQ._global.PointerEvent;function RJ(e){return AJ.get(e)}function NJ(e){return{evt:e,pointerId:e.pointerId}}function DJ(e,t){return AJ.get(e)===t}function zJ(e,t){BJ(e);t.getStage()&&(AJ.set(e,t),IJ&&t._fire("gotpointercapture",NJ(new PointerEvent("gotpointercapture"))))}function BJ(e,t){const n=AJ.get(e);if(!n)return;const r=n.getStage();r&&r.content,AJ.delete(e),IJ&&n._fire("lostpointercapture",NJ(new PointerEvent("lostpointercapture")))}var jJ="mouseleave",FJ="mouseover",HJ="mouseenter",WJ="mousemove",$J="mousedown",UJ="mouseup",VJ="pointermove",GJ="pointerdown",qJ="pointerup",ZJ="pointercancel",YJ="pointerout",XJ="pointerleave",KJ="pointerover",QJ="pointerenter",JJ="contextmenu",e0="touchstart",t0="touchend",n0="touchmove",r0="touchcancel",o0="wheel",i0=[[HJ,"_pointerenter"],[$J,"_pointerdown"],[WJ,"_pointermove"],[UJ,"_pointerup"],[jJ,"_pointerleave"],[e0,"_pointerdown"],[n0,"_pointermove"],[t0,"_pointerup"],[r0,"_pointercancel"],[FJ,"_pointerover"],[o0,"_wheel"],[JJ,"_contextmenu"],[GJ,"_pointerdown"],[VJ,"_pointermove"],[qJ,"_pointerup"],[ZJ,"_pointercancel"],["lostpointercapture","_lostpointercapture"]];const a0={mouse:{[YJ]:"mouseout",[XJ]:jJ,[KJ]:FJ,[QJ]:HJ,[VJ]:WJ,[GJ]:$J,[qJ]:UJ,[ZJ]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[YJ]:"touchout",[XJ]:"touchleave",[KJ]:"touchover",[QJ]:"touchenter",[VJ]:n0,[GJ]:e0,[qJ]:t0,[ZJ]:r0,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[YJ]:YJ,[XJ]:XJ,[KJ]:KJ,[QJ]:QJ,[VJ]:VJ,[GJ]:GJ,[qJ]:qJ,[ZJ]:ZJ,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},s0=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",l0=e=>{const t=s0(e);return"pointer"===t?DQ.pointerEventsEnabled&&a0.pointer:"touch"===t?a0.touch:"mouse"===t?a0.mouse:void 0};function c0(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&GQ.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const u0=[];class d0 extends MJ{constructor(e){super(c0(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),u0.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",(()=>{c0(this.attrs)})),this._checkVisibility()}_validateAdd(e){const t="Layer"===e.getType(),n="FastLayer"===e.getType();t||n||GQ.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const e=this.visible()?"":"none";this.content.style.display=e}setContainer(e){if("string"==typeof e){if("."===e.charAt(0)){var t=e.slice(1);e=document.getElementsByClassName(t)[0]}else{var n;n="#"!==e.charAt(0)?e:e.slice(1),e=document.getElementById(n)}if(!e)throw"Can not find container in document with id "+n}return this._setAttr("container",e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e,t=this.children,n=t.length;for(e=0;e<n;e++)t[e].clear();return this}clone(e){return e||(e={}),e.container="undefined"!=typeof document&&document.createElement("div"),MJ.prototype.clone.call(this,e)}destroy(){super.destroy();var e=this.content;e&&GQ._isInDocument(e)&&this.container().removeChild(e);var t=u0.indexOf(this);return t>-1&&u0.splice(t,1),GQ.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(GQ.warn("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);"),null)}_getPointerById(e){return this._pointerPositions.find((t=>t.id===e))}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){(e=e||{}).x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var t=new dJ({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach((function(t){if(t.isVisible()){var r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}})),t}getIntersection(e){if(!e)return null;var t,n=this.children;for(t=n.length-1;t>=0;t--){const r=n[t].getIntersection(e);if(r)return r}return null}_resizeDOM(){var e=this.width(),t=this.height();this.content&&(this.content.style.width=e+"px",this.content.style.height=t+"px"),this.bufferCanvas.setSize(e,t),this.bufferHitCanvas.setSize(e,t),this.children.forEach((n=>{n.setSize({width:e,height:t}),n.draw()}))}add(e,...t){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}super.add(e);var r=this.children.length;return r>5&&GQ.warn("The stage has "+r+" 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."),e.setSize({width:this.width(),height:this.height()}),e.draw(),DQ.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return DJ(e,this)}setPointerCapture(e){zJ(e,this)}releaseCapture(e){BJ(e)}getLayers(){return this.children}_bindContentEvents(){DQ.isBrowser&&i0.forEach((([e,t])=>{this.content.addEventListener(e,(e=>{this[t](e)}),{passive:!1})}))}_pointerenter(e){this.setPointersPositions(e);const t=l0(e.type);this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);const t=l0(e.type);this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let t=this[e+"targetShape"];return t&&!t.getStage()&&(t=null),t}_pointerleave(e){const t=l0(e.type),n=s0(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),o=!fJ.isDragging||DQ.hitOnDragEnabled;r&&o?(r._fireAndBubble(t.pointerout,{evt:e}),r._fireAndBubble(t.pointerleave,{evt:e}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this[n+"targetShape"]=null):o&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(e){const t=l0(e.type),n=s0(e.type);if(t){this.setPointersPositions(e);var r=!1;this._changedPointerPositions.forEach((o=>{var i=this.getIntersection(o);fJ.justDragged=!1,DQ["_"+n+"ListenClick"]=!0;if(!(i&&i.isListening()))return;DQ.capturePointerEventsEnabled&&i.setPointerCapture(o.id),this[n+"ClickStartShape"]=i,i._fireAndBubble(t.pointerdown,{evt:e,pointerId:o.id}),r=!0;const a=e.type.indexOf("touch")>=0;i.preventDefault()&&e.cancelable&&a&&e.preventDefault()})),r||this._fire(t.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){const t=l0(e.type),n=s0(e.type);if(!t)return;if(fJ.isDragging&&fJ.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),!(!fJ.isDragging||DQ.hitOnDragEnabled))return;var r={};let o=!1;var i=this._getTargetShape(n);this._changedPointerPositions.forEach((a=>{const s=RJ(a.id)||this.getIntersection(a),l=a.id,c={evt:e,pointerId:l};var u=i!==s;if(u&&i&&(i._fireAndBubble(t.pointerout,Object.assign({},c),s),i._fireAndBubble(t.pointerleave,Object.assign({},c),s)),s){if(r[s._id])return;r[s._id]=!0}s&&s.isListening()?(o=!0,u&&(s._fireAndBubble(t.pointerover,Object.assign({},c),i),s._fireAndBubble(t.pointerenter,Object.assign({},c),i),this[n+"targetShape"]=s),s._fireAndBubble(t.pointermove,Object.assign({},c))):i&&(this._fire(t.pointerover,{evt:e,target:this,currentTarget:this,pointerId:l}),this[n+"targetShape"]=null)})),o||this._fire(t.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){const t=l0(e.type),n=s0(e.type);if(!t)return;this.setPointersPositions(e);const r=this[n+"ClickStartShape"],o=this[n+"ClickEndShape"];var i={};let a=!1;this._changedPointerPositions.forEach((s=>{const l=RJ(s.id)||this.getIntersection(s);if(l){if(l.releaseCapture(s.id),i[l._id])return;i[l._id]=!0}const c=s.id,u={evt:e,pointerId:c};let d=!1;DQ["_"+n+"InDblClickWindow"]?(d=!0,clearTimeout(this[n+"DblTimeout"])):fJ.justDragged||(DQ["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout((function(){DQ["_"+n+"InDblClickWindow"]=!1}),DQ.dblClickWindow),l&&l.isListening()?(a=!0,this[n+"ClickEndShape"]=l,l._fireAndBubble(t.pointerup,Object.assign({},u)),DQ["_"+n+"ListenClick"]&&r&&r===l&&(l._fireAndBubble(t.pointerclick,Object.assign({},u)),d&&o&&o===l&&l._fireAndBubble(t.pointerdblclick,Object.assign({},u)))):(this[n+"ClickEndShape"]=null,DQ["_"+n+"ListenClick"]&&this._fire(t.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:c}),d&&this._fire(t.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:c}))})),a||this._fire(t.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),DQ["_"+n+"ListenClick"]=!1,e.cancelable&&"touch"!==n&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(JJ,{evt:e}):this._fire(JJ,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(o0,{evt:e}):this._fire(o0,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);const t=RJ(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(qJ,NJ(e)),BJ(e.pointerId)}_lostpointercapture(e){BJ(e.pointerId)}setPointersPositions(e){var t=this._getContentPosition(),n=null,r=null;void 0!==(e=e||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,(e=>{this._pointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})})),Array.prototype.forEach.call(e.changedTouches||e.touches,(e=>{this._changedPointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}))):(n=(e.clientX-t.left)/t.scaleX,r=(e.clientY-t.top)/t.scaleY,this.pointerPos={x:n,y:r},this._pointerPositions=[{x:n,y:r,id:GQ._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:r,id:GQ._getFirstPointerId(e)}])}_setPointerPosition(e){GQ.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new dJ({width:this.width(),height:this.height()}),this.bufferHitCanvas=new hJ({pixelRatio:1,width:this.width(),height:this.height()}),DQ.isBrowser){var e=this.container();if(!e)throw"Stage has no container. A container is required.";e.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"),e.appendChild(this.content),this._resizeDOM()}}cache(){return GQ.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(e){e.batchDraw()})),this}}d0.prototype.nodeType="Stage",zQ(d0),rJ.addGetterSetter(d0,"container");var h0="hasShadow",f0="shadowRGBA",p0="patternImage",g0="linearGradient",m0="radialGradient";let v0;function y0(){return v0||(v0=GQ.createCanvasElement().getContext("2d"),v0)}const b0={};class x0 extends OJ{constructor(e){let t;for(super(e);t=GQ.getRandomColor(),!t||t in b0;);this.colorKey=t,b0[t]=this}getContext(){return GQ.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return GQ.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(h0,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(p0,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const e=y0().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(e&&e.setTransform){const t=new BQ;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(DQ.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const n=t.getMatrix(),r="undefined"==typeof DOMMatrix?{a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]}:new DOMMatrix(n);e.setTransform(r)}return e}}_getLinearGradient(){return this._getCache(g0,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var t=y0(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),o=t.createLinearGradient(n.x,n.y,r.x,r.y),i=0;i<e.length;i+=2)o.addColorStop(e[i],e[i+1]);return o}}_getRadialGradient(){return this._getCache(m0,this.__getRadialGradient)}__getRadialGradient(){var e=this.fillRadialGradientColorStops();if(e){for(var t=y0(),n=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),o=t.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius()),i=0;i<e.length;i+=2)o.addColorStop(e[i],e[i+1]);return o}}getShadowRGBA(){return this._getCache(f0,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var e=GQ.colorToRGBA(this.shadowColor());return e?"rgba("+e.r+","+e.g+","+e.b+","+e.a*(this.shadowOpacity()||1)+")":void 0}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],(()=>this.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 e=this.hitStrokeWidth();return"auto"===e?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){var t=this.getStage().bufferHitCanvas;return t.getContext().clear(),this.drawHit(t,null,!0),t.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data[3]>0}destroy(){return OJ.prototype.destroy.call(this),delete b0[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){var t;if(!this.getStage())return!1;if(!(null===(t=this.attrs.perfectDrawEnabled)||void 0===t||t))return!1;const n=e||this.hasFill(),r=this.hasStroke(),o=1!==this.getAbsoluteOpacity();if(n&&r&&o)return!0;const i=this.hasShadow(),a=this.shadowForStrokeEnabled();return!!(n&&r&&i&&a)}setStrokeHitEnabled(e){GQ.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),e?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){const t=e.skipTransform,n=e.relativeTo,r=this.getSelfRect(),o=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,i=r.width+o,a=r.height+o,s=!e.skipShadow&&this.hasShadow(),l=s?this.shadowOffsetX():0,c=s?this.shadowOffsetY():0,u=i+Math.abs(l),d=a+Math.abs(c),h=s&&this.shadowBlur()||0,f={width:u+2*h,height:d+2*h,x:-(o/2+h)+Math.min(l,0)+r.x,y:-(o/2+h)+Math.min(c,0)+r.y};return t?f:this._transformedRect(f,n)}drawScene(e,t){var n,r,o=this.getLayer(),i=e||o.getCanvas(),a=i.getContext(),s=this._getCanvasCache(),l=this.getSceneFunc(),c=this.hasShadow(),u=i.isCache,d=t===this;if(!this.isVisible()&&!d)return this;if(s){a.save();var h=this.getAbsoluteTransform(t).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedSceneCanvas(a),a.restore(),this}if(!l)return this;if(a.save(),this._useBufferCanvas()&&!u){(r=(n=this.getStage().bufferCanvas).getContext()).clear(),r.save(),r._applyLineJoin(this);var f=this.getAbsoluteTransform(t).getMatrix();r.transform(f[0],f[1],f[2],f[3],f[4],f[5]),l.call(this,r,this),r.restore();var p=n.pixelRatio;c&&a._applyShadow(this),a._applyOpacity(this),a._applyGlobalCompositeOperation(this),a.drawImage(n._canvas,0,0,n.width/p,n.height/p)}else{if(a._applyLineJoin(this),!d){f=this.getAbsoluteTransform(t).getMatrix();a.transform(f[0],f[1],f[2],f[3],f[4],f[5]),a._applyOpacity(this),a._applyGlobalCompositeOperation(this)}c&&a._applyShadow(this),l.call(this,a,this)}return a.restore(),this}drawHit(e,t,n=!1){if(!this.shouldDrawHit(t,n))return this;var r=this.getLayer(),o=e||r.hitCanvas,i=o&&o.getContext(),a=this.hitFunc()||this.sceneFunc(),s=this._getCanvasCache(),l=s&&s.hit;if(this.colorKey||GQ.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()"),l){i.save();var c=this.getAbsoluteTransform(t).getMatrix();return i.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedHitCanvas(i),i.restore(),this}if(!a)return this;i.save(),i._applyLineJoin(this);if(!(this===t)){var u=this.getAbsoluteTransform(t).getMatrix();i.transform(u[0],u[1],u[2],u[3],u[4],u[5])}return a.call(this,i,this),i.restore(),this}drawHitFromCache(e=0){var t,n,r,o,i,a=this._getCanvasCache(),s=this._getCachedSceneCanvas(),l=a.hit,c=l.getContext(),u=l.getWidth(),d=l.getHeight();c.clear(),c.drawImage(s._canvas,0,0,u,d);try{for(r=(n=(t=c.getImageData(0,0,u,d)).data).length,o=GQ._hexToRgb(this.colorKey),i=0;i<r;i+=4)n[i+3]>e?(n[i]=o.r,n[i+1]=o.g,n[i+2]=o.b,n[i+3]=255):n[i+3]=0;c.putImageData(t,0,0)}catch(T2){GQ.error("Unable to draw hit graph from cached scene canvas. "+T2.message)}return this}hasPointerCapture(e){return DJ(e,this)}setPointerCapture(e){zJ(e,this)}releaseCapture(e){BJ(e)}}x0.prototype._fillFunc=function(e){e.fill()},x0.prototype._strokeFunc=function(e){e.stroke()},x0.prototype._fillFuncHit=function(e){e.fill()},x0.prototype._strokeFuncHit=function(e){e.stroke()},x0.prototype._centroid=!1,x0.prototype.nodeType="Shape",zQ(x0),x0.prototype.eventListeners={},x0.prototype.on.call(x0.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(h0)})),x0.prototype.on.call(x0.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(f0)})),x0.prototype.on.call(x0.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",(function(){this._clearCache(p0)})),x0.prototype.on.call(x0.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",(function(){this._clearCache(g0)})),x0.prototype.on.call(x0.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",(function(){this._clearCache(m0)})),rJ.addGetterSetter(x0,"stroke",void 0,JQ()),rJ.addGetterSetter(x0,"strokeWidth",2,YQ()),rJ.addGetterSetter(x0,"fillAfterStrokeEnabled",!1),rJ.addGetterSetter(x0,"hitStrokeWidth","auto",KQ()),rJ.addGetterSetter(x0,"strokeHitEnabled",!0,eJ()),rJ.addGetterSetter(x0,"perfectDrawEnabled",!0,eJ()),rJ.addGetterSetter(x0,"shadowForStrokeEnabled",!0,eJ()),rJ.addGetterSetter(x0,"lineJoin"),rJ.addGetterSetter(x0,"lineCap"),rJ.addGetterSetter(x0,"sceneFunc"),rJ.addGetterSetter(x0,"hitFunc"),rJ.addGetterSetter(x0,"dash"),rJ.addGetterSetter(x0,"dashOffset",0,YQ()),rJ.addGetterSetter(x0,"shadowColor",void 0,QQ()),rJ.addGetterSetter(x0,"shadowBlur",0,YQ()),rJ.addGetterSetter(x0,"shadowOpacity",1,YQ()),rJ.addComponentsGetterSetter(x0,"shadowOffset",["x","y"]),rJ.addGetterSetter(x0,"shadowOffsetX",0,YQ()),rJ.addGetterSetter(x0,"shadowOffsetY",0,YQ()),rJ.addGetterSetter(x0,"fillPatternImage"),rJ.addGetterSetter(x0,"fill",void 0,JQ()),rJ.addGetterSetter(x0,"fillPatternX",0,YQ()),rJ.addGetterSetter(x0,"fillPatternY",0,YQ()),rJ.addGetterSetter(x0,"fillLinearGradientColorStops"),rJ.addGetterSetter(x0,"strokeLinearGradientColorStops"),rJ.addGetterSetter(x0,"fillRadialGradientStartRadius",0),rJ.addGetterSetter(x0,"fillRadialGradientEndRadius",0),rJ.addGetterSetter(x0,"fillRadialGradientColorStops"),rJ.addGetterSetter(x0,"fillPatternRepeat","repeat"),rJ.addGetterSetter(x0,"fillEnabled",!0),rJ.addGetterSetter(x0,"strokeEnabled",!0),rJ.addGetterSetter(x0,"shadowEnabled",!0),rJ.addGetterSetter(x0,"dashEnabled",!0),rJ.addGetterSetter(x0,"strokeScaleEnabled",!0),rJ.addGetterSetter(x0,"fillPriority","color"),rJ.addComponentsGetterSetter(x0,"fillPatternOffset",["x","y"]),rJ.addGetterSetter(x0,"fillPatternOffsetX",0,YQ()),rJ.addGetterSetter(x0,"fillPatternOffsetY",0,YQ()),rJ.addComponentsGetterSetter(x0,"fillPatternScale",["x","y"]),rJ.addGetterSetter(x0,"fillPatternScaleX",1,YQ()),rJ.addGetterSetter(x0,"fillPatternScaleY",1,YQ()),rJ.addComponentsGetterSetter(x0,"fillLinearGradientStartPoint",["x","y"]),rJ.addComponentsGetterSetter(x0,"strokeLinearGradientStartPoint",["x","y"]),rJ.addGetterSetter(x0,"fillLinearGradientStartPointX",0),rJ.addGetterSetter(x0,"strokeLinearGradientStartPointX",0),rJ.addGetterSetter(x0,"fillLinearGradientStartPointY",0),rJ.addGetterSetter(x0,"strokeLinearGradientStartPointY",0),rJ.addComponentsGetterSetter(x0,"fillLinearGradientEndPoint",["x","y"]),rJ.addComponentsGetterSetter(x0,"strokeLinearGradientEndPoint",["x","y"]),rJ.addGetterSetter(x0,"fillLinearGradientEndPointX",0),rJ.addGetterSetter(x0,"strokeLinearGradientEndPointX",0),rJ.addGetterSetter(x0,"fillLinearGradientEndPointY",0),rJ.addGetterSetter(x0,"strokeLinearGradientEndPointY",0),rJ.addComponentsGetterSetter(x0,"fillRadialGradientStartPoint",["x","y"]),rJ.addGetterSetter(x0,"fillRadialGradientStartPointX",0),rJ.addGetterSetter(x0,"fillRadialGradientStartPointY",0),rJ.addComponentsGetterSetter(x0,"fillRadialGradientEndPoint",["x","y"]),rJ.addGetterSetter(x0,"fillRadialGradientEndPointX",0),rJ.addGetterSetter(x0,"fillRadialGradientEndPointY",0),rJ.addGetterSetter(x0,"fillPatternRotation",0),rJ.backCompat(x0,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var w0=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],k0=w0.length;class S0 extends MJ{constructor(e){super(e),this.canvas=new dJ,this.hitCanvas=new hJ({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(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[e+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){OJ.prototype.moveToTop.call(this);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!OJ.prototype.moveUp.call(this))return!1;var e=this.getStage();return!(!e||!e.content)&&(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(OJ.prototype.moveDown.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(OJ.prototype.moveToBottom.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var e=this.getNativeCanvasElement();return OJ.prototype.remove.call(this),e&&e.parentNode&&GQ._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:t}){return this.canvas.setSize(e,t),this.hitCanvas.setSize(e,t),this._setSmoothEnabled(),this}_validateAdd(e){var t=e.getType();"Group"!==t&&"Shape"!==t&&GQ.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(e){return(e=e||{}).width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=void 0!==e.x?e.x:this.x(),e.y=void 0!==e.y?e.y:this.y(),OJ.prototype._toKonvaCanvas.call(this,e)}_checkVisibility(){const e=this.visible();this.canvas._canvas.style.display=e?"block":"none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){GQ.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){GQ.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,GQ.requestAnimFrame((()=>{this.draw(),this._waitingForDraw=!1}))),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var t=1,n=!1;;){for(let r=0;r<k0;r++){const o=w0[r],i=this._getIntersection({x:e.x+o.x*t,y:e.y+o.y*t}),a=i.shape;if(a)return a;if(n=!!i.antialiased,!i.antialiased)break}if(!n)return null;t+=1}}_getIntersection(e){const t=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(e.x*t),Math.round(e.y*t),1,1).data,r=n[3];if(255===r){const e=GQ._rgbToHex(n[0],n[1],n[2]),t=b0["#"+e];return t?{shape:t}:{antialiased:!0}}return r>0?{antialiased:!0}:{}}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),MJ.prototype.drawScene.call(this,r,t),this._fire("draw",{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),MJ.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){GQ.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return GQ.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(this.parent&&this.parent.content){var e=this.parent;!!this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}destroy(){return GQ.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}S0.prototype.nodeType="Layer",zQ(S0),rJ.addGetterSetter(S0,"imageSmoothingEnabled",!0),rJ.addGetterSetter(S0,"clearBeforeDraw",!0),rJ.addGetterSetter(S0,"hitGraphEnabled",!0,eJ());class C0 extends S0{constructor(e){super(e),this.listening(!1),GQ.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}C0.prototype.nodeType="FastLayer",zQ(C0);class _0 extends MJ{_validateAdd(e){var t=e.getType();"Group"!==t&&"Shape"!==t&&GQ.throw("You may only add groups and shapes to groups.")}}_0.prototype.nodeType="Group",zQ(_0);var E0=NQ.performance&&NQ.performance.now?function(){return NQ.performance.now()}:function(){return(new Date).getTime()};class L0{constructor(e,t){this.id=L0.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:E0(),frameRate:0},this.func=e,this.setLayers(t)}setLayers(e){var t=[];return t=e?e.length>0?e:[e]:[],this.layers=t,this}getLayers(){return this.layers}addLayer(e){var t,n=this.layers,r=n.length;for(t=0;t<r;t++)if(n[t]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){var e,t=L0.animations,n=t.length;for(e=0;e<n;e++)if(t[e].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=E0(),L0._addAnimation(this),this}stop(){return L0._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){var t,n=e.id,r=this.animations,o=r.length;for(t=0;t<o;t++)if(r[t].id===n){this.animations.splice(t,1);break}}static _runFrames(){var e,t,n,r,o,i,a,s,l={},c=this.animations;for(r=0;r<c.length;r++)if(t=(e=c[r]).layers,n=e.func,e._updateFrameObject(E0()),i=t.length,!n||!1!==n.call(e,e.frame))for(o=0;o<i;o++)void 0!==(a=t[o])._id&&(l[a._id]=a);for(s in l)l.hasOwnProperty(s)&&l[s].batchDraw()}static _animationLoop(){var e=L0;e.animations.length?(e._runFrames(),GQ.requestAnimFrame(e._animationLoop)):e.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,GQ.requestAnimFrame(this._animationLoop))}}L0.animations=[],L0.animIdCounter=0,L0.animRunning=!1;var P0={node:1,duration:1,easing:1,onFinish:1,yoyo:1},O0=0,T0=["fill","stroke","shadowColor"];class M0{constructor(e,t,n,r,o,i,a){this.prop=e,this.propFunc=t,this.begin=r,this._pos=r,this.duration=i,this._change=0,this.prevPos=0,this.yoyo=a,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=o-this.begin,this.pause()}fire(e){var t=this[e];t&&t()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return void 0===e&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(e){this.pause(),this._time=e,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 e=this.getTimer()-this._startTime;2===this.state?this.setTime(e):3===this.state&&this.setTime(this.duration-e)}pause(){this.state=1,this.fire("onPause")}getTimer(){return(new Date).getTime()}}class A0{constructor(e){var t,n,r=this,o=e.node,i=o._id,a=e.easing||I0.Linear,s=!!e.yoyo;t=void 0===e.duration?.3:0===e.duration?.001:e.duration,this.node=o,this._id=O0++;var l=o.getLayer()||(o instanceof DQ.Stage?o.getLayers():null);for(n in l||GQ.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new L0((function(){r.tween.onEnterFrame()}),l),this.tween=new M0(n,(function(e){r._tweenFunc(e)}),a,0,1,1e3*t,s),this._addListeners(),A0.attrs[i]||(A0.attrs[i]={}),A0.attrs[i][this._id]||(A0.attrs[i][this._id]={}),A0.tweens[i]||(A0.tweens[i]={}),e)void 0===P0[n]&&this._addAttr(n,e[n]);this.reset(),this.onFinish=e.onFinish,this.onReset=e.onReset,this.onUpdate=e.onUpdate}_addAttr(e,t){var n,r,o,i,a,s,l,c,u=this.node,d=u._id;if((o=A0.tweens[d][e])&&delete A0.attrs[d][o][e],n=u.getAttr(e),GQ._isArray(t))if(r=[],a=Math.max(t.length,n.length),"points"===e&&t.length!==n.length&&(t.length>n.length?(l=n,n=GQ._prepareArrayForTween(n,t,u.closed())):(s=t,t=GQ._prepareArrayForTween(t,n,u.closed()))),0===e.indexOf("fill"))for(i=0;i<a;i++)if(i%2==0)r.push(t[i]-n[i]);else{var h=GQ.colorToRGBA(n[i]);c=GQ.colorToRGBA(t[i]),n[i]=h,r.push({r:c.r-h.r,g:c.g-h.g,b:c.b-h.b,a:c.a-h.a})}else for(i=0;i<a;i++)r.push(t[i]-n[i]);else-1!==T0.indexOf(e)?(n=GQ.colorToRGBA(n),r={r:(c=GQ.colorToRGBA(t)).r-n.r,g:c.g-n.g,b:c.b-n.b,a:c.a-n.a}):r=t-n;A0.attrs[d][this._id][e]={start:n,diff:r,end:t,trueEnd:s,trueStart:l},A0.tweens[d][e]=this._id}_tweenFunc(e){var t,n,r,o,i,a,s,l,c=this.node,u=A0.attrs[c._id][this._id];for(t in u){if(r=(n=u[t]).start,o=n.diff,l=n.end,GQ._isArray(r))if(i=[],s=Math.max(r.length,l.length),0===t.indexOf("fill"))for(a=0;a<s;a++)a%2==0?i.push((r[a]||0)+o[a]*e):i.push("rgba("+Math.round(r[a].r+o[a].r*e)+","+Math.round(r[a].g+o[a].g*e)+","+Math.round(r[a].b+o[a].b*e)+","+(r[a].a+o[a].a*e)+")");else for(a=0;a<s;a++)i.push((r[a]||0)+o[a]*e);else i=-1!==T0.indexOf(t)?"rgba("+Math.round(r.r+o.r*e)+","+Math.round(r.g+o.g*e)+","+Math.round(r.b+o.b*e)+","+(r.a+o.a*e)+")":r+o*e;c.setAttr(t,i)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var e=this.node,t=A0.attrs[e._id][this._id];t.points&&t.points.trueEnd&&e.setAttr("points",t.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var e=this.node,t=A0.attrs[e._id][this._id];t.points&&t.points.trueStart&&e.points(t.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(e){return this.tween.seek(1e3*e),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var e,t=this.node._id,n=this._id,r=A0.tweens[t];for(e in this.pause(),r)delete A0.tweens[t][e];delete A0.attrs[t][n]}}A0.attrs={},A0.tweens={},OJ.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new A0(e).play()};const I0={BackEaseIn(e,t,n,r){var o=1.70158;return n*(e/=r)*e*((o+1)*e-o)+t},BackEaseOut(e,t,n,r){var o=1.70158;return n*((e=e/r-1)*e*((o+1)*e+o)+1)+t},BackEaseInOut(e,t,n,r){var o=1.70158;return(e/=r/2)<1?n/2*(e*e*((1+(o*=1.525))*e-o))+t:n/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+t},ElasticEaseIn(e,t,n,r,o,i){var a=0;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),!o||o<Math.abs(n)?(o=n,a=i/4):a=i/(2*Math.PI)*Math.asin(n/o),-o*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/i)+t)},ElasticEaseOut(e,t,n,r,o,i){var a=0;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),!o||o<Math.abs(n)?(o=n,a=i/4):a=i/(2*Math.PI)*Math.asin(n/o),o*Math.pow(2,-10*e)*Math.sin((e*r-a)*(2*Math.PI)/i)+n+t)},ElasticEaseInOut(e,t,n,r,o,i){var a=0;return 0===e?t:2==(e/=r/2)?t+n:(i||(i=r*(.3*1.5)),!o||o<Math.abs(n)?(o=n,a=i/4):a=i/(2*Math.PI)*Math.asin(n/o),e<1?o*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/i)*-.5+t:o*Math.pow(2,-10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/i)*.5+n+t)},BounceEaseOut:(e,t,n,r)=>(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t,BounceEaseIn:(e,t,n,r)=>n-I0.BounceEaseOut(r-e,0,n,r)+t,BounceEaseInOut:(e,t,n,r)=>e<r/2?.5*I0.BounceEaseIn(2*e,0,n,r)+t:.5*I0.BounceEaseOut(2*e-r,0,n,r)+.5*n+t,EaseIn:(e,t,n,r)=>n*(e/=r)*e+t,EaseOut:(e,t,n,r)=>-n*(e/=r)*(e-2)+t,EaseInOut:(e,t,n,r)=>(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t,StrongEaseIn:(e,t,n,r)=>n*(e/=r)*e*e*e*e+t,StrongEaseOut:(e,t,n,r)=>n*((e=e/r-1)*e*e*e*e+1)+t,StrongEaseInOut:(e,t,n,r)=>(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t,Linear:(e,t,n,r)=>n*e/r+t},R0=GQ._assign(DQ,{Util:GQ,Transform:BQ,Node:OJ,Container:MJ,Stage:d0,stages:u0,Layer:S0,FastLayer:C0,Group:_0,DD:fJ,Shape:x0,shapes:b0,Animation:L0,Tween:A0,Easings:I0,Context:aJ,Canvas:uJ});class N0 extends x0{_sceneFunc(e){var t=DQ.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,t,n),e.arc(0,0,this.innerRadius(),t,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),t=this.outerRadius(),n=this.clockwise(),r=DQ.getAngle(n?360-this.angle():this.angle()),o=Math.cos(Math.min(r,Math.PI)),i=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),a=Math.sin(Math.min(r,Math.PI/2)),s=o*(o>0?e:t),l=i*(i>0?e:t),c=a*(a>0?t:e);return{x:s,y:n?-1*c:l,width:1*t-s,height:c-l}}}function D0(e,t,n,r,o,i,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(o-n,2)+Math.pow(i-r,2)),c=a*s/(s+l),u=a*l/(s+l);return[n-c*(o-e),r-c*(i-t),n+u*(o-e),r+u*(i-t)]}function z0(e,t){var n,r,o=e.length,i=[];for(n=2;n<o-2;n+=2)r=D0(e[n-2],e[n-1],e[n],e[n+1],e[n+2],e[n+3],t),isNaN(r[0])||(i.push(r[0]),i.push(r[1]),i.push(e[n]),i.push(e[n+1]),i.push(r[2]),i.push(r[3]));return i}N0.prototype._centroid=!0,N0.prototype.className="Arc",N0.prototype._attrsAffectingSize=["innerRadius","outerRadius"],zQ(N0),rJ.addGetterSetter(N0,"innerRadius",0,YQ()),rJ.addGetterSetter(N0,"outerRadius",0,YQ()),rJ.addGetterSetter(N0,"angle",0,YQ()),rJ.addGetterSetter(N0,"clockwise",!1,eJ());class B0 extends x0{constructor(e){super(e),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",(function(){this._clearCache("tensionPoints")}))}_sceneFunc(e){var t,n,r,o=this.points(),i=o.length,a=this.tension(),s=this.closed(),l=this.bezier();if(i){if(e.beginPath(),e.moveTo(o[0],o[1]),0!==a&&i>4){for(n=(t=this.getTensionPoints()).length,r=s?0:4,s||e.quadraticCurveTo(t[0],t[1],t[2],t[3]);r<n-2;)e.bezierCurveTo(t[r++],t[r++],t[r++],t[r++],t[r++],t[r++]);s||e.quadraticCurveTo(t[n-2],t[n-1],o[i-2],o[i-1])}else if(l)for(r=2;r<i;)e.bezierCurveTo(o[r++],o[r++],o[r++],o[r++],o[r++],o[r++]);else for(r=2;r<i;r+=2)e.lineTo(o[r],o[r+1]);s?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():z0(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),t=e.length,n=this.tension(),r=D0(e[t-2],e[t-1],e[0],e[1],e[2],e[3],n),o=D0(e[t-4],e[t-3],e[t-2],e[t-1],e[0],e[1],n),i=z0(e,n);return[r[2],r[3]].concat(i).concat([o[0],o[1],e[t-2],e[t-1],o[2],o[3],r[0],r[1],e[0],e[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};for(var t,n,r=(e=0!==this.tension()?[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]]:this.points())[0],o=e[0],i=e[1],a=e[1],s=0;s<e.length/2;s++)t=e[2*s],n=e[2*s+1],r=Math.min(r,t),o=Math.max(o,t),i=Math.min(i,n),a=Math.max(a,n);return{x:r,y:i,width:o-r,height:a-i}}}B0.prototype.className="Line",B0.prototype._attrsAffectingSize=["points","bezier","tension"],zQ(B0),rJ.addGetterSetter(B0,"closed",!1),rJ.addGetterSetter(B0,"bezier",!1),rJ.addGetterSetter(B0,"tension",0,YQ()),rJ.addGetterSetter(B0,"points",[],function(){if(DQ.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(GQ._isArray(e)?e.forEach((function(e){GQ._isNumber(e)||GQ.warn('"'+t+'" attribute has non numeric element '+e+". Make sure that all elements are numbers.")})):GQ.warn(qQ(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}());class j0 extends x0{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this.dataArray=j0.parsePathData(this.data()),this.pathLength=0;for(var t=0;t<this.dataArray.length;++t)this.pathLength+=this.dataArray[t].pathLength;this.on("dataChange.konva",(function(){this.dataArray=j0.parsePathData(this.data()),this.pathLength=0;for(var e=0;e<this.dataArray.length;++e)this.pathLength+=this.dataArray[e].pathLength}))}_sceneFunc(e){var t=this.dataArray;e.beginPath();for(var n=!1,r=0;r<t.length;r++){var o=t[r].command,i=t[r].points;switch(o){case"L":e.lineTo(i[0],i[1]);break;case"M":e.moveTo(i[0],i[1]);break;case"C":e.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5]);break;case"Q":e.quadraticCurveTo(i[0],i[1],i[2],i[3]);break;case"A":var a=i[0],s=i[1],l=i[2],c=i[3],u=i[4],d=i[5],h=i[6],f=i[7],p=l>c?l:c,g=l>c?1:l/c,m=l>c?c/l:1;e.translate(a,s),e.rotate(h),e.scale(g,m),e.arc(0,0,p,u,u+d,1-f),e.scale(1/g,1/m),e.rotate(-h),e.translate(-a,-s);break;case"z":n=!0,e.closePath()}}n||this.hasFill()?e.fillStrokeShape(this):e.strokeShape(this)}getSelfRect(){var e=[];this.dataArray.forEach((function(t){if("A"===t.command){var n=t.points[4],r=t.points[5],o=t.points[4]+r,i=Math.PI/180;if(Math.abs(n-o)<i&&(i=Math.abs(n-o)),r<0)for(let r=n-i;r>o;r-=i){const n=j0.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);e.push(n.x,n.y)}else for(let r=n+i;r<o;r+=i){const n=j0.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);e.push(n.x,n.y)}}else if("C"===t.command)for(let a=0;a<=1;a+=.01){const n=j0.getPointOnCubicBezier(a,t.start.x,t.start.y,t.points[0],t.points[1],t.points[2],t.points[3],t.points[4],t.points[5]);e.push(n.x,n.y)}else e=e.concat(t.points)}));for(var t,n,r=e[0],o=e[0],i=e[1],a=e[1],s=0;s<e.length/2;s++)t=e[2*s],n=e[2*s+1],isNaN(t)||(r=Math.min(r,t),o=Math.max(o,t)),isNaN(n)||(i=Math.min(i,n),a=Math.max(a,n));return{x:r,y:i,width:o-r,height:a-i}}getLength(){return this.pathLength}getPointAtLength(e){var t,n=0,r=this.dataArray.length;if(!r)return null;for(;n<r&&e>this.dataArray[n].pathLength;)e-=this.dataArray[n].pathLength,++n;if(n===r)return{x:(t=this.dataArray[n-1].points.slice(-2))[0],y:t[1]};if(e<.01)return{x:(t=this.dataArray[n].points.slice(0,2))[0],y:t[1]};var o=this.dataArray[n],i=o.points;switch(o.command){case"L":return j0.getPointOnLine(e,o.start.x,o.start.y,i[0],i[1]);case"C":return j0.getPointOnCubicBezier(e/o.pathLength,o.start.x,o.start.y,i[0],i[1],i[2],i[3],i[4],i[5]);case"Q":return j0.getPointOnQuadraticBezier(e/o.pathLength,o.start.x,o.start.y,i[0],i[1],i[2],i[3]);case"A":var a=i[0],s=i[1],l=i[2],c=i[3],u=i[4],d=i[5],h=i[6];return u+=d*e/o.pathLength,j0.getPointOnEllipticalArc(a,s,l,c,u,h)}return null}static getLineLength(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}static getPointOnLine(e,t,n,r,o,i,a){void 0===i&&(i=t),void 0===a&&(a=n);var s=(o-n)/(r-t+1e-8),l=Math.sqrt(e*e/(1+s*s));r<t&&(l*=-1);var c,u=s*l;if(r===t)c={x:i,y:a+u};else if((a-n)/(i-t+1e-8)===s)c={x:i+l,y:a+u};else{var d,h,f=this.getLineLength(t,n,r,o),p=(i-t)*(r-t)+(a-n)*(o-n);d=t+(p/=f*f)*(r-t),h=n+p*(o-n);var g=this.getLineLength(i,a,d,h),m=Math.sqrt(e*e-g*g);l=Math.sqrt(m*m/(1+s*s)),r<t&&(l*=-1),c={x:d+l,y:h+(u=s*l)}}return c}static getPointOnCubicBezier(e,t,n,r,o,i,a,s,l){function c(e){return e*e*e}function u(e){return 3*e*e*(1-e)}function d(e){return 3*e*(1-e)*(1-e)}function h(e){return(1-e)*(1-e)*(1-e)}return{x:s*c(e)+i*u(e)+r*d(e)+t*h(e),y:l*c(e)+a*u(e)+o*d(e)+n*h(e)}}static getPointOnQuadraticBezier(e,t,n,r,o,i,a){function s(e){return e*e}function l(e){return 2*e*(1-e)}function c(e){return(1-e)*(1-e)}return{x:i*s(e)+r*l(e)+t*c(e),y:a*s(e)+o*l(e)+n*c(e)}}static getPointOnEllipticalArc(e,t,n,r,o,i){var a=Math.cos(i),s=Math.sin(i),l=n*Math.cos(o),c=r*Math.sin(o);return{x:e+(l*a-c*s),y:t+(l*s+c*a)}}static parsePathData(e){if(!e)return[];var t=e,n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];t=t.replace(new RegExp(" ","g"),",");for(var r=0;r<n.length;r++)t=t.replace(new RegExp(n[r],"g"),"|"+n[r]);var o,i=t.split("|"),a=[],s=[],l=0,c=0,u=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(r=1;r<i.length;r++){var d=i[r],h=d.charAt(0);for(d=d.slice(1),s.length=0;o=u.exec(d);)s.push(o[0]);for(var f=[],p=0,g=s.length;p<g;p++)if("00"!==s[p]){var m=parseFloat(s[p]);isNaN(m)?f.push(0):f.push(m)}else f.push(0,0);for(;f.length>0&&!isNaN(f[0]);){var v,y,b,x,w,k,S,C,_,E,L=null,P=[],O=l,T=c;switch(h){case"l":l+=f.shift(),c+=f.shift(),L="L",P.push(l,c);break;case"L":l=f.shift(),c=f.shift(),P.push(l,c);break;case"m":var M=f.shift(),A=f.shift();if(l+=M,c+=A,L="M",a.length>2&&"z"===a[a.length-1].command)for(var I=a.length-2;I>=0;I--)if("M"===a[I].command){l=a[I].points[0]+M,c=a[I].points[1]+A;break}P.push(l,c),h="l";break;case"M":l=f.shift(),c=f.shift(),L="M",P.push(l,c),h="L";break;case"h":l+=f.shift(),L="L",P.push(l,c);break;case"H":l=f.shift(),L="L",P.push(l,c);break;case"v":c+=f.shift(),L="L",P.push(l,c);break;case"V":c=f.shift(),L="L",P.push(l,c);break;case"C":P.push(f.shift(),f.shift(),f.shift(),f.shift()),l=f.shift(),c=f.shift(),P.push(l,c);break;case"c":P.push(l+f.shift(),c+f.shift(),l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),L="C",P.push(l,c);break;case"S":y=l,b=c,"C"===(v=a[a.length-1]).command&&(y=l+(l-v.points[2]),b=c+(c-v.points[3])),P.push(y,b,f.shift(),f.shift()),l=f.shift(),c=f.shift(),L="C",P.push(l,c);break;case"s":y=l,b=c,"C"===(v=a[a.length-1]).command&&(y=l+(l-v.points[2]),b=c+(c-v.points[3])),P.push(y,b,l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),L="C",P.push(l,c);break;case"Q":P.push(f.shift(),f.shift()),l=f.shift(),c=f.shift(),P.push(l,c);break;case"q":P.push(l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),L="Q",P.push(l,c);break;case"T":y=l,b=c,"Q"===(v=a[a.length-1]).command&&(y=l+(l-v.points[0]),b=c+(c-v.points[1])),l=f.shift(),c=f.shift(),L="Q",P.push(y,b,l,c);break;case"t":y=l,b=c,"Q"===(v=a[a.length-1]).command&&(y=l+(l-v.points[0]),b=c+(c-v.points[1])),l+=f.shift(),c+=f.shift(),L="Q",P.push(y,b,l,c);break;case"A":x=f.shift(),w=f.shift(),k=f.shift(),S=f.shift(),C=f.shift(),_=l,E=c,l=f.shift(),c=f.shift(),L="A",P=this.convertEndpointToCenterParameterization(_,E,l,c,S,C,x,w,k);break;case"a":x=f.shift(),w=f.shift(),k=f.shift(),S=f.shift(),C=f.shift(),_=l,E=c,l+=f.shift(),c+=f.shift(),L="A",P=this.convertEndpointToCenterParameterization(_,E,l,c,S,C,x,w,k)}a.push({command:L||h,points:P,start:{x:O,y:T},pathLength:this.calcLength(O,T,L||h,P)})}"z"!==h&&"Z"!==h||a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(e,t,n,r){var o,i,a,s,l=j0;switch(n){case"L":return l.getLineLength(e,t,r[0],r[1]);case"C":for(o=0,i=l.getPointOnCubicBezier(0,e,t,r[0],r[1],r[2],r[3],r[4],r[5]),s=.01;s<=1;s+=.01)a=l.getPointOnCubicBezier(s,e,t,r[0],r[1],r[2],r[3],r[4],r[5]),o+=l.getLineLength(i.x,i.y,a.x,a.y),i=a;return o;case"Q":for(o=0,i=l.getPointOnQuadraticBezier(0,e,t,r[0],r[1],r[2],r[3]),s=.01;s<=1;s+=.01)a=l.getPointOnQuadraticBezier(s,e,t,r[0],r[1],r[2],r[3]),o+=l.getLineLength(i.x,i.y,a.x,a.y),i=a;return o;case"A":o=0;var c=r[4],u=r[5],d=r[4]+u,h=Math.PI/180;if(Math.abs(c-d)<h&&(h=Math.abs(c-d)),i=l.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],c,0),u<0)for(s=c-h;s>d;s-=h)a=l.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],s,0),o+=l.getLineLength(i.x,i.y,a.x,a.y),i=a;else for(s=c+h;s<d;s+=h)a=l.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],s,0),o+=l.getLineLength(i.x,i.y,a.x,a.y),i=a;return a=l.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],d,0),o+=l.getLineLength(i.x,i.y,a.x,a.y)}return 0}static convertEndpointToCenterParameterization(e,t,n,r,o,i,a,s,l){var c=l*(Math.PI/180),u=Math.cos(c)*(e-n)/2+Math.sin(c)*(t-r)/2,d=-1*Math.sin(c)*(e-n)/2+Math.cos(c)*(t-r)/2,h=u*u/(a*a)+d*d/(s*s);h>1&&(a*=Math.sqrt(h),s*=Math.sqrt(h));var f=Math.sqrt((a*a*(s*s)-a*a*(d*d)-s*s*(u*u))/(a*a*(d*d)+s*s*(u*u)));o===i&&(f*=-1),isNaN(f)&&(f=0);var p=f*a*d/s,g=f*-s*u/a,m=(e+n)/2+Math.cos(c)*p-Math.sin(c)*g,v=(t+r)/2+Math.sin(c)*p+Math.cos(c)*g,y=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},b=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(y(e)*y(t))},x=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(b(e,t))},w=x([1,0],[(u-p)/a,(d-g)/s]),k=[(u-p)/a,(d-g)/s],S=[(-1*u-p)/a,(-1*d-g)/s],C=x(k,S);return b(k,S)<=-1&&(C=Math.PI),b(k,S)>=1&&(C=0),0===i&&C>0&&(C-=2*Math.PI),1===i&&C<0&&(C+=2*Math.PI),[m,v,a,s,w,C,c,i]}}j0.prototype.className="Path",j0.prototype._attrsAffectingSize=["data"],zQ(j0),rJ.addGetterSetter(j0,"data");class F0 extends B0{_sceneFunc(e){super._sceneFunc(e);var t=2*Math.PI,n=this.points(),r=n,o=0!==this.tension()&&n.length>4;o&&(r=this.getTensionPoints());var i,a,s=this.pointerLength(),l=n.length;if(o){const e=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[l-2],n[l-1]],t=j0.calcLength(r[r.length-4],r[r.length-3],"C",e),o=j0.getPointOnQuadraticBezier(Math.min(1,1-s/t),e[0],e[1],e[2],e[3],e[4],e[5]);i=n[l-2]-o.x,a=n[l-1]-o.y}else i=n[l-2]-n[l-4],a=n[l-1]-n[l-3];var c=(Math.atan2(a,i)+t)%t,u=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[l-2],n[l-1]),e.rotate(c),e.moveTo(0,0),e.lineTo(-s,u/2),e.lineTo(-s,-u/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),o?(i=(r[0]+r[2])/2-n[0],a=(r[1]+r[3])/2-n[1]):(i=n[2]-n[0],a=n[3]-n[1]),e.rotate((Math.atan2(-a,-i)+t)%t),e.moveTo(0,0),e.lineTo(-s,u/2),e.lineTo(-s,-u/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+2*t,height:e.height+2*t}}}F0.prototype.className="Arrow",zQ(F0),rJ.addGetterSetter(F0,"pointerLength",10,YQ()),rJ.addGetterSetter(F0,"pointerWidth",10,YQ()),rJ.addGetterSetter(F0,"pointerAtBeginning",!1),rJ.addGetterSetter(F0,"pointerAtEnding",!0);class H0 extends x0{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}H0.prototype._centroid=!0,H0.prototype.className="Circle",H0.prototype._attrsAffectingSize=["radius"],zQ(H0),rJ.addGetterSetter(H0,"radius",0,YQ());class W0 extends x0{_sceneFunc(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,2*Math.PI,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}}W0.prototype.className="Ellipse",W0.prototype._centroid=!0,W0.prototype._attrsAffectingSize=["radiusX","radiusY"],zQ(W0),rJ.addComponentsGetterSetter(W0,"radius",["x","y"]),rJ.addGetterSetter(W0,"radiusX",0,YQ()),rJ.addGetterSetter(W0,"radiusY",0,YQ());class $0 extends x0{constructor(e){super(e),this.on("imageChange.konva",(()=>{this._setImageLoad()})),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&4===e.readyState||e&&e.addEventListener&&e.addEventListener("load",(()=>{this._requestDraw()}))}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){const t=this.getWidth(),n=this.getHeight(),r=this.attrs.image;let o;if(r){const e=this.attrs.cropWidth,i=this.attrs.cropHeight;o=e&&i?[r,this.cropX(),this.cropY(),e,i,0,0,t,n]:[r,0,0,t,n]}(this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)),r&&e.drawImage.apply(e,o)}_hitFunc(e){var t=this.width(),n=this.height();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,t;return null!==(e=this.attrs.width)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.width}getHeight(){var e,t;return null!==(e=this.attrs.height)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.height}static fromURL(e,t,n=null){var r=GQ.createImageElement();r.onload=function(){var e=new $0({image:r});t(e)},r.onerror=n,r.crossOrigin="Anonymous",r.src=e}}$0.prototype.className="Image",zQ($0),rJ.addGetterSetter($0,"image"),rJ.addComponentsGetterSetter($0,"crop",["x","y","width","height"]),rJ.addGetterSetter($0,"cropX",0,YQ()),rJ.addGetterSetter($0,"cropY",0,YQ()),rJ.addGetterSetter($0,"cropWidth",0,YQ()),rJ.addGetterSetter($0,"cropHeight",0,YQ());var U0=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],V0="up",G0="right",q0="down",Z0="left",Y0=U0.length;class X0 extends _0{constructor(e){super(e),this.on("add.konva",(function(e){this._addListeners(e.child),this._sync()}))}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){var t,n=this,r=function(){n._sync()};for(t=0;t<Y0;t++)e.on(U0[t]+"Change.konva",r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var e,t,n,r,o,i,a,s=this.getText(),l=this.getTag();if(s&&l){switch(e=s.width(),t=s.height(),n=l.pointerDirection(),r=l.pointerWidth(),a=l.pointerHeight(),o=0,i=0,n){case V0:o=e/2,i=-1*a;break;case G0:o=e+r,i=t/2;break;case q0:o=e/2,i=t+a;break;case Z0:o=-1*r,i=t/2}l.setAttrs({x:-1*o,y:-1*i,width:e,height:t}),s.setAttrs({x:-1*o,y:-1*i})}}}X0.prototype.className="Label",zQ(X0);class K0 extends x0{_sceneFunc(e){var t=this.width(),n=this.height(),r=this.pointerDirection(),o=this.pointerWidth(),i=this.pointerHeight(),a=this.cornerRadius();let s=0,l=0,c=0,u=0;"number"==typeof a?s=l=c=u=Math.min(a,t/2,n/2):(s=Math.min(a[0]||0,t/2,n/2),l=Math.min(a[1]||0,t/2,n/2),u=Math.min(a[2]||0,t/2,n/2),c=Math.min(a[3]||0,t/2,n/2)),e.beginPath(),e.moveTo(s,0),r===V0&&(e.lineTo((t-o)/2,0),e.lineTo(t/2,-1*i),e.lineTo((t+o)/2,0)),e.lineTo(t-l,0),e.arc(t-l,l,l,3*Math.PI/2,0,!1),r===G0&&(e.lineTo(t,(n-i)/2),e.lineTo(t+o,n/2),e.lineTo(t,(n+i)/2)),e.lineTo(t,n-u),e.arc(t-u,n-u,u,0,Math.PI/2,!1),r===q0&&(e.lineTo((t+o)/2,n),e.lineTo(t/2,n+i),e.lineTo((t-o)/2,n)),e.lineTo(c,n),e.arc(c,n-c,c,Math.PI/2,Math.PI,!1),r===Z0&&(e.lineTo(0,(n+i)/2),e.lineTo(-1*o,n/2),e.lineTo(0,(n-i)/2)),e.lineTo(0,s),e.arc(s,s,s,Math.PI,3*Math.PI/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){var e=0,t=0,n=this.pointerWidth(),r=this.pointerHeight(),o=this.pointerDirection(),i=this.width(),a=this.height();return o===V0?(t-=r,a+=r):o===q0?a+=r:o===Z0?(e-=1.5*n,i+=n):o===G0&&(i+=1.5*n),{x:e,y:t,width:i,height:a}}}K0.prototype.className="Tag",zQ(K0),rJ.addGetterSetter(K0,"pointerDirection","none"),rJ.addGetterSetter(K0,"pointerWidth",0,YQ()),rJ.addGetterSetter(K0,"pointerHeight",0,YQ()),rJ.addGetterSetter(K0,"cornerRadius",0,XQ(4));class Q0 extends x0{_sceneFunc(e){var t=this.cornerRadius(),n=this.width(),r=this.height();if(e.beginPath(),t){let o=0,i=0,a=0,s=0;"number"==typeof t?o=i=a=s=Math.min(t,n/2,r/2):(o=Math.min(t[0]||0,n/2,r/2),i=Math.min(t[1]||0,n/2,r/2),s=Math.min(t[2]||0,n/2,r/2),a=Math.min(t[3]||0,n/2,r/2)),e.moveTo(o,0),e.lineTo(n-i,0),e.arc(n-i,i,i,3*Math.PI/2,0,!1),e.lineTo(n,r-s),e.arc(n-s,r-s,s,0,Math.PI/2,!1),e.lineTo(a,r),e.arc(a,r-a,a,Math.PI/2,Math.PI,!1),e.lineTo(0,o),e.arc(o,o,o,Math.PI,3*Math.PI/2,!1)}else e.rect(0,0,n,r);e.closePath(),e.fillStrokeShape(this)}}Q0.prototype.className="Rect",zQ(Q0),rJ.addGetterSetter(Q0,"cornerRadius",0,XQ(4));class J0 extends x0{_sceneFunc(e){const t=this._getPoints();e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n<t.length;n++)e.lineTo(t[n].x,t[n].y);e.closePath(),e.fillStrokeShape(this)}_getPoints(){const e=this.attrs.sides,t=this.attrs.radius||0,n=[];for(var r=0;r<e;r++)n.push({x:t*Math.sin(2*r*Math.PI/e),y:-1*t*Math.cos(2*r*Math.PI/e)});return n}getSelfRect(){const e=this._getPoints();var t=e[0].x,n=e[0].y,r=e[0].x,o=e[0].y;return e.forEach((e=>{t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),o=Math.max(o,e.y)})),{x:t,y:r,width:n-t,height:o-r}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}J0.prototype.className="RegularPolygon",J0.prototype._centroid=!0,J0.prototype._attrsAffectingSize=["radius"],zQ(J0),rJ.addGetterSetter(J0,"radius",0,YQ()),rJ.addGetterSetter(J0,"sides",0,YQ());var e1=2*Math.PI;class t1 extends x0{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,e1,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),e1,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}t1.prototype.className="Ring",t1.prototype._centroid=!0,t1.prototype._attrsAffectingSize=["innerRadius","outerRadius"],zQ(t1),rJ.addGetterSetter(t1,"innerRadius",0,YQ()),rJ.addGetterSetter(t1,"outerRadius",0,YQ());class n1 extends x0{constructor(e){super(e),this._updated=!0,this.anim=new L0((()=>{var e=this._updated;return this._updated=!1,e})),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(e){var t=this.animation(),n=this.frameIndex(),r=4*n,o=this.animations()[t],i=this.frameOffsets(),a=o[r+0],s=o[r+1],l=o[r+2],c=o[r+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,l,c),e.closePath(),e.fillStrokeShape(this)),u)if(i){var d=i[t],h=2*n;e.drawImage(u,a,s,l,c,d[h+0],d[h+1],l,c)}else e.drawImage(u,a,s,l,c,0,0,l,c)}_hitFunc(e){var t=this.animation(),n=this.frameIndex(),r=4*n,o=this.animations()[t],i=this.frameOffsets(),a=o[r+2],s=o[r+3];if(e.beginPath(),i){var l=i[t],c=2*n;e.rect(l[c+0],l[c+1],a,s)}else e.rect(0,0,a,s);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval((function(){e._updateIndex()}),1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),t=this.animation();e<this.animations()[t].length/4-1?this.frameIndex(e+1):this.frameIndex(0)}}n1.prototype.className="Sprite",zQ(n1),rJ.addGetterSetter(n1,"animation"),rJ.addGetterSetter(n1,"animations"),rJ.addGetterSetter(n1,"frameOffsets"),rJ.addGetterSetter(n1,"image"),rJ.addGetterSetter(n1,"frameIndex",0,YQ()),rJ.addGetterSetter(n1,"frameRate",17,YQ()),rJ.backCompat(n1,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class r1 extends x0{_sceneFunc(e){var t=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(var o=1;o<2*r;o++){var i=o%2==0?n:t,a=i*Math.sin(o*Math.PI/r),s=-1*i*Math.cos(o*Math.PI/r);e.lineTo(a,s)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}function o1(e){return Array.from(e)}r1.prototype.className="Star",r1.prototype._centroid=!0,r1.prototype._attrsAffectingSize=["innerRadius","outerRadius"],zQ(r1),rJ.addGetterSetter(r1,"numPoints",5,YQ()),rJ.addGetterSetter(r1,"innerRadius",0,YQ()),rJ.addGetterSetter(r1,"outerRadius",0,YQ());var i1,a1="auto",s1="justify",l1="left",c1="middle",u1="normal",d1=" ",h1="none",f1=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],p1=f1.length;function g1(){return i1||(i1=GQ.createCanvasElement().getContext("2d"))}class m1 extends x0{constructor(e){super(function(e){return(e=e||{}).fillLinearGradientColorStops||e.fillRadialGradientColorStops||e.fillPatternImage||(e.fill=e.fill||"black"),e}(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t<p1;t++)this.on(f1[t]+"Change.konva",this._setTextData);this._setTextData()}_sceneFunc(e){var t=this.textArr,n=t.length;if(this.text()){var r,o=this.padding(),i=this.fontSize(),a=this.lineHeight()*i,s=this.verticalAlign(),l=0,c=this.align(),u=this.getWidth(),d=this.letterSpacing(),h=this.fill(),f=this.textDecoration(),p=-1!==f.indexOf("underline"),g=-1!==f.indexOf("line-through"),m=0,v=(m=a/2,0),y=0;for(e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",c1),e.setAttr("textAlign",l1),s===c1?l=(this.getHeight()-n*a-2*o)/2:"bottom"===s&&(l=this.getHeight()-n*a-2*o),e.translate(o,l+o),r=0;r<n;r++){v=0,y=0;var b,x,w,k=t[r],S=k.text,C=k.width,_=k.lastInParagraph;if(e.save(),"right"===c?v+=u-C-2*o:"center"===c&&(v+=(u-C-2*o)/2),p&&(e.save(),e.beginPath(),e.moveTo(v,m+y+Math.round(i/2)),x=0===(b=S.split(" ").length-1),w=c===s1&&_&&!x?u-2*o:C,e.lineTo(v+Math.round(w),m+y+Math.round(i/2)),e.lineWidth=i/15,e.strokeStyle=h,e.stroke(),e.restore()),g&&(e.save(),e.beginPath(),e.moveTo(v,m+y),x=0===(b=S.split(" ").length-1),w=c===s1&&_&&!x?u-2*o:C,e.lineTo(v+Math.round(w),m+y),e.lineWidth=i/15,e.strokeStyle=h,e.stroke(),e.restore()),0!==d||c===s1){b=S.split(" ").length-1;for(var E=o1(S),L=0;L<E.length;L++){var P=E[L];" "!==P||_||c!==s1||(v+=(u-2*o-C)/b),this._partialTextX=v,this._partialTextY=m+y,this._partialText=P,e.fillStrokeShape(this),v+=this.measureSize(P).width+d}}else this._partialTextX=v,this._partialTextY=m+y,this._partialText=S,e.fillStrokeShape(this);e.restore(),n>1&&(m+=a)}}}_hitFunc(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var t=GQ._isString(e)?e:null==e?"":e+"";return this._setAttr("text",t),this}getWidth(){return this.attrs.width===a1||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){return this.attrs.height===a1||void 0===this.attrs.height?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return GQ.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var t,n=g1(),r=this.fontSize();return n.save(),n.font=this._getContextFont(),t=n.measureText(e),n.restore(),{width:t.width,height:r}}_getContextFont(){return this.fontStyle()+d1+this.fontVariant()+d1+(this.fontSize()+"px ")+this.fontFamily().split(",").map((e=>{const t=(e=e.trim()).indexOf(" ")>=0,n=e.indexOf('"')>=0||e.indexOf("'")>=0;return t&&!n&&(e=`"${e}"`),e})).join(", ")}_addTextLine(e){this.align()===s1&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t,lastInParagraph:!1})}_getTextWidth(e){var t=this.letterSpacing(),n=e.length;return g1().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split("\n"),t=+this.fontSize(),n=0,r=this.lineHeight()*t,o=this.attrs.width,i=this.attrs.height,a=o!==a1&&void 0!==o,s=i!==a1&&void 0!==i,l=this.padding(),c=o-2*l,u=i-2*l,d=0,h=this.wrap(),f="char"!==h&&h!==h1,p=this.ellipsis();this.textArr=[],g1().font=this._getContextFont();for(var g=p?this._getTextWidth("…"):0,m=0,v=e.length;m<v;++m){var y=e[m],b=this._getTextWidth(y);if(a&&b>c)for(;y.length>0;){for(var x=0,w=y.length,k="",S=0;x<w;){var C=x+w>>>1,_=y.slice(0,C+1),E=this._getTextWidth(_)+g;E<=c?(x=C+1,k=_,S=E):w=C}if(!k)break;if(f){var L,P=y[k.length];(L=(P===d1||"-"===P)&&S<=c?k.length:Math.max(k.lastIndexOf(d1),k.lastIndexOf("-"))+1)>0&&(x=L,k=k.slice(0,x),S=this._getTextWidth(k))}if(k=k.trimRight(),this._addTextLine(k),n=Math.max(n,S),d+=r,this._shouldHandleEllipsis(d)){this._tryToAddEllipsisToLastLine();break}if((y=(y=y.slice(x)).trimLeft()).length>0&&(b=this._getTextWidth(y))<=c){this._addTextLine(y),d+=r,n=Math.max(n,b);break}}else this._addTextLine(y),d+=r,n=Math.max(n,b),this._shouldHandleEllipsis(d)&&m<v-1&&this._tryToAddEllipsisToLastLine();if(s&&d+r>u)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=t,this.textWidth=n}_shouldHandleEllipsis(e){var t=+this.fontSize(),n=this.lineHeight()*t,r=this.attrs.height,o=r!==a1&&void 0!==r,i=r-2*this.padding();return!(this.wrap()!==h1)||o&&e+n>i}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,t=e!==a1&&void 0!==e,n=e-2*this.padding(),r=this.ellipsis(),o=this.textArr[this.textArr.length-1];if(o&&r){if(t)this._getTextWidth(o.text+"…")<n||(o.text=o.text.slice(0,o.text.length-3));this.textArr.splice(this.textArr.length-1,1),this._addTextLine(o.text+"…")}}getStrokeScaleEnabled(){return!0}}m1.prototype._fillFunc=function(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)},m1.prototype._strokeFunc=function(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)},m1.prototype.className="Text",m1.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],zQ(m1),rJ.overWriteSetter(m1,"width",KQ()),rJ.overWriteSetter(m1,"height",KQ()),rJ.addGetterSetter(m1,"fontFamily","Arial"),rJ.addGetterSetter(m1,"fontSize",12,YQ()),rJ.addGetterSetter(m1,"fontStyle",u1),rJ.addGetterSetter(m1,"fontVariant",u1),rJ.addGetterSetter(m1,"padding",0,YQ()),rJ.addGetterSetter(m1,"align",l1),rJ.addGetterSetter(m1,"verticalAlign","top"),rJ.addGetterSetter(m1,"lineHeight",1,YQ()),rJ.addGetterSetter(m1,"wrap","word"),rJ.addGetterSetter(m1,"ellipsis",!1,eJ()),rJ.addGetterSetter(m1,"letterSpacing",0,YQ()),rJ.addGetterSetter(m1,"text","",QQ()),rJ.addGetterSetter(m1,"textDecoration","");var v1="normal";function y1(e){e.fillText(this.partialText,0,0)}function b1(e){e.strokeText(this.partialText,0,0)}class x1 extends x0{constructor(e){super(e),this.dummyCanvas=GQ.createCanvasElement(),this.dataArray=[],this.dataArray=j0.parsePathData(this.attrs.data),this.on("dataChange.konva",(function(){this.dataArray=j0.parsePathData(this.attrs.data),this._setTextData()})),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();var t=this.textDecoration(),n=this.fill(),r=this.fontSize(),o=this.glyphInfo;"underline"===t&&e.beginPath();for(var i=0;i<o.length;i++){e.save();var a=o[i].p0;e.translate(a.x,a.y),e.rotate(o[i].rotation),this.partialText=o[i].text,e.fillStrokeShape(this),"underline"===t&&(0===i&&e.moveTo(0,r/2+1),e.lineTo(r,r/2+1)),e.restore()}"underline"===t&&(e.strokeStyle=n,e.lineWidth=r/20,e.stroke()),e.restore()}_hitFunc(e){e.beginPath();var t=this.glyphInfo;if(t.length>=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r<t.length;r++){var o=t[r].p1;e.lineTo(o.x,o.y)}e.setAttr("lineWidth",this.fontSize()),e.setAttr("strokeStyle",this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return GQ.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(e){return m1.prototype.setText.call(this,e)}_getContextFont(){return m1.prototype._getContextFont.call(this)}_getTextSize(e){var t=this.dummyCanvas.getContext("2d");t.save(),t.font=this._getContextFont();var n=t.measureText(e);return t.restore(),{width:n.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var e=this,t=this._getTextSize(this.attrs.text),n=this.letterSpacing(),r=this.align(),o=this.kerningFunc();this.textWidth=t.width,this.textHeight=t.height;var i=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0);this.glyphInfo=[];for(var a=0,s=0;s<e.dataArray.length;s++)e.dataArray[s].pathLength>0&&(a+=e.dataArray[s].pathLength);var l=0;"center"===r&&(l=Math.max(0,a/2-i/2)),"right"===r&&(l=Math.max(0,a-i));for(var c,u,d,h=o1(this.text()),f=this.text().split(" ").length-1,p=-1,g=0,m=function(){g=0;for(var t=e.dataArray,n=p+1;n<t.length;n++){if(t[n].pathLength>0)return p=n,t[n];"M"===t[n].command&&(c={x:t[n].points[0],y:t[n].points[1]})}return{}},v=function(t){var o=e._getTextSize(t).width+n;" "===t&&"justify"===r&&(o+=(a-i)/f);var s=0,l=0;for(u=void 0;Math.abs(o-s)/o>.01&&l<20;){l++;for(var h=s;void 0===d;)(d=m())&&h+d.pathLength<o&&(h+=d.pathLength,d=void 0);if(0===Object.keys(d).length||void 0===c)return;var p=!1;switch(d.command){case"L":j0.getLineLength(c.x,c.y,d.points[0],d.points[1])>o?u=j0.getPointOnLine(o,c.x,c.y,d.points[0],d.points[1],c.x,c.y):d=void 0;break;case"A":var v=d.points[4],y=d.points[5],b=d.points[4]+y;0===g?g=v+1e-8:o>s?g+=Math.PI/180*y/Math.abs(y):g-=Math.PI/360*y/Math.abs(y),(y<0&&g<b||y>=0&&g>b)&&(g=b,p=!0),u=j0.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],g,d.points[6]);break;case"C":0===g?g=o>d.pathLength?1e-8:o/d.pathLength:o>s?g+=(o-s)/d.pathLength/2:g=Math.max(g-(s-o)/d.pathLength/2,0),g>1&&(g=1,p=!0),u=j0.getPointOnCubicBezier(g,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3],d.points[4],d.points[5]);break;case"Q":0===g?g=o/d.pathLength:o>s?g+=(o-s)/d.pathLength:g-=(s-o)/d.pathLength,g>1&&(g=1,p=!0),u=j0.getPointOnQuadraticBezier(g,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3])}void 0!==u&&(s=j0.getLineLength(c.x,c.y,u.x,u.y)),p&&(p=!1,d=void 0)}},y=l/(e._getTextSize("C").width+n)-1,b=0;b<y&&(v("C"),void 0!==c&&void 0!==u);b++)c=u;for(var x=0;x<h.length&&(v(h[x]),void 0!==c&&void 0!==u);x++){var w=j0.getLineLength(c.x,c.y,u.x,u.y),k=0;if(o)try{k=o(h[x-1],h[x])*this.fontSize()}catch(T2){k=0}c.x+=k,u.x+=k,this.textWidth+=k;var S=j0.getPointOnLine(k+w/2,c.x,c.y,u.x,u.y),C=Math.atan2(u.y-c.y,u.x-c.x);this.glyphInfo.push({transposeX:S.x,transposeY:S.y,text:h[x],rotation:C,p0:c,p1:u}),c=u}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var e=[];this.glyphInfo.forEach((function(t){e.push(t.p0.x),e.push(t.p0.y),e.push(t.p1.x),e.push(t.p1.y)}));for(var t,n,r=e[0]||0,o=e[0]||0,i=e[1]||0,a=e[1]||0,s=0;s<e.length/2;s++)t=e[2*s],n=e[2*s+1],r=Math.min(r,t),o=Math.max(o,t),i=Math.min(i,n),a=Math.max(a,n);var l=this.fontSize();return{x:r-l/2,y:i-l/2,width:o-r+l,height:a-i+l}}destroy(){return GQ.releaseCanvas(this.dummyCanvas),super.destroy()}}x1.prototype._fillFunc=y1,x1.prototype._strokeFunc=b1,x1.prototype._fillFuncHit=y1,x1.prototype._strokeFuncHit=b1,x1.prototype.className="TextPath",x1.prototype._attrsAffectingSize=["text","fontSize","data"],zQ(x1),rJ.addGetterSetter(x1,"data"),rJ.addGetterSetter(x1,"fontFamily","Arial"),rJ.addGetterSetter(x1,"fontSize",12,YQ()),rJ.addGetterSetter(x1,"fontStyle",v1),rJ.addGetterSetter(x1,"align","left"),rJ.addGetterSetter(x1,"letterSpacing",0,YQ()),rJ.addGetterSetter(x1,"textBaseline","middle"),rJ.addGetterSetter(x1,"fontVariant",v1),rJ.addGetterSetter(x1,"text",""),rJ.addGetterSetter(x1,"textDecoration",null),rJ.addGetterSetter(x1,"kerningFunc",null);var w1="tr-konva",k1=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map((e=>e+`.${w1}`)).join(" "),S1="nodesRect",C1=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],_1={"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 E1="ontouchstart"in DQ._global;var L1=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function P1(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),o=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:o})}function O1(e,t){const n=function(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)}}(e);return P1(e,t,n)}class T1 extends _0{constructor(e){super(e),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(k1,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return GQ.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return w1+this._id}setNodes(e=[]){return this._nodes&&this._nodes.length&&this.detach(),this._nodes=e,1===e.length&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach((e=>{const t=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()},n=e._attrsAffectingSize.map((e=>e+"Change."+this._getEventNamespace())).join(" ");e.on(n,t),e.on(C1.map((e=>e+`.${this._getEventNamespace()}`)).join(" "),t),e.on(`absoluteTransformChange.${this._getEventNamespace()}`,t),this._proxyDrag(e)})),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(e){let t;e.on(`dragstart.${this._getEventNamespace()}`,(n=>{t=e.getAbsolutePosition(),this.isDragging()||e===this.findOne(".back")||this.startDrag(n,!1)})),e.on(`dragmove.${this._getEventNamespace()}`,(n=>{if(!t)return;const r=e.getAbsolutePosition(),o=r.x-t.x,i=r.y-t.y;this.nodes().forEach((t=>{if(t===e)return;if(t.isDragging())return;const r=t.getAbsolutePosition();t.setAbsolutePosition({x:r.x+o,y:r.y+i}),t.startDrag(n)})),t=null}))}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach((e=>{e.off("."+this._getEventNamespace())})),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(S1),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(S1,this.__getNodeRect)}__getNodeShape(e,t=this.rotation(),n){var r=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=e.getAbsoluteScale(n),i=e.getAbsolutePosition(n),a=r.x*o.x-e.offsetX()*o.x,s=r.y*o.y-e.offsetY()*o.y;const l=(DQ.getAngle(e.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return P1({x:i.x+a*Math.cos(l)+s*Math.sin(-l),y:i.y+s*Math.cos(l)+a*Math.sin(l),width:r.width*o.x,height:r.height*o.y,rotation:l},-DQ.getAngle(t),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const e=[];this.nodes().map((t=>{const n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var r=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x+n.width,y:n.y+n.height},{x:n.x,y:n.y+n.height}],o=t.getAbsoluteTransform();r.forEach((function(t){var n=o.point(t);e.push(n)}))}));const t=new BQ;var n,r,o,i;t.rotate(-DQ.getAngle(this.rotation())),e.forEach((function(e){var a=t.point(e);void 0===n&&(n=o=a.x,r=i=a.y),n=Math.min(n,a.x),r=Math.min(r,a.y),o=Math.max(o,a.x),i=Math.max(i,a.y)})),t.invert();const a=t.point({x:n,y:r});return{x:a.x,y:a.y,width:o-n,height:i-r,rotation:DQ.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(),L1.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor("rotater")}_createAnchor(e){var t=new Q0({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:E1?10:"auto"}),n=this;t.on("mousedown touchstart",(function(e){n._handleMouseDown(e)})),t.on("dragstart",(e=>{t.stopDrag(),e.cancelBubble=!0})),t.on("dragend",(e=>{e.cancelBubble=!0})),t.on("mouseenter",(()=>{var n=DQ.getAngle(this.rotation()),r=function(e,t){if("rotater"===e)return"crosshair";t+=GQ.degToRad(_1[e]||0);var n=(GQ.radToDeg(t)%360+360)%360;return GQ._inRange(n,337.5,360)||GQ._inRange(n,0,22.5)?"ns-resize":GQ._inRange(n,22.5,67.5)?"nesw-resize":GQ._inRange(n,67.5,112.5)?"ew-resize":GQ._inRange(n,112.5,157.5)?"nwse-resize":GQ._inRange(n,157.5,202.5)?"ns-resize":GQ._inRange(n,202.5,247.5)?"nesw-resize":GQ._inRange(n,247.5,292.5)?"ew-resize":GQ._inRange(n,292.5,337.5)?"nwse-resize":(GQ.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}(e,n);t.getStage().content&&(t.getStage().content.style.cursor=r),this._cursorChange=!0})),t.on("mouseout",(()=>{t.getStage().content&&(t.getStage().content.style.cursor=""),this._cursorChange=!1})),this.add(t)}_createBack(){var e=new x0({name:"back",width:0,height:0,draggable:!0,sceneFunc(e){var t=this.getParent(),n=t.padding();e.beginPath(),e.rect(-n,-n,this.width()+2*n,this.height()+2*n),e.moveTo(this.width()/2,-n),t.rotateEnabled()&&e.lineTo(this.width()/2,-t.rotateAnchorOffset()*GQ._sign(this.height())-n),e.fillStrokeShape(this)},hitFunc:(e,t)=>{if(this.shouldOverdrawWholeArea()){var n=this.padding();e.beginPath(),e.rect(-n,-n,t.width()+2*n,t.height()+2*n),e.fillStrokeShape(t)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",(e=>{e.cancelBubble=!0})),e.on("dragmove",(e=>{e.cancelBubble=!0})),e.on("dragend",(e=>{e.cancelBubble=!0})),this.on("dragmove",(e=>{this.update()}))}_handleMouseDown(e){this._movingAnchorName=e.target.name().split(" ")[0];var t=this._getNodeRect(),n=t.width,r=t.height,o=Math.sqrt(Math.pow(n,2)+Math.pow(r,2));this.sin=Math.abs(r/o),this.cos=Math.abs(n/o),"undefined"!=typeof window&&(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 i=e.target.getAbsolutePosition(),a=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:a.x-i.x,y:a.y-i.y},this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach((t=>{t._fire("transformstart",{evt:e.evt,target:t})}))}_handleMouseMove(e){var t,n,r,o=this.findOne("."+this._movingAnchorName),i=o.getStage();i.setPointersPositions(e);const a=i.getPointerPosition();let s={x:a.x-this._anchorDragOffset.x,y:a.y-this._anchorDragOffset.y};const l=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(s=this.anchorDragBoundFunc()(l,s,e)),o.setAbsolutePosition(s);const c=o.getAbsolutePosition();if(l.x!==c.x||l.y!==c.y)if("rotater"!==this._movingAnchorName){var u=this.keepRatio()||e.shiftKey,d=this.centeredScaling()||e.altKey;if("top-left"===this._movingAnchorName){if(u){var h=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(h.x-o.x(),2)+Math.pow(h.y-o.y(),2));var f=this.findOne(".top-left").x()>h.x?-1:1,p=this.findOne(".top-left").y()>h.y?-1:1;t=r*this.cos*f,n=r*this.sin*p,this.findOne(".top-left").x(h.x-t),this.findOne(".top-left").y(h.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(o.y());else if("top-right"===this._movingAnchorName){if(u){h=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};r=Math.sqrt(Math.pow(o.x()-h.x,2)+Math.pow(h.y-o.y(),2));f=this.findOne(".top-right").x()<h.x?-1:1,p=this.findOne(".top-right").y()>h.y?-1:1;t=r*this.cos*f,n=r*this.sin*p,this.findOne(".top-right").x(h.x+t),this.findOne(".top-right").y(h.y-n)}var g=o.position();this.findOne(".top-left").y(g.y),this.findOne(".bottom-right").x(g.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(o.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(o.x());else if("bottom-left"===this._movingAnchorName){if(u){h=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(h.x-o.x(),2)+Math.pow(o.y()-h.y,2));f=h.x<o.x()?-1:1,p=o.y()<h.y?-1:1;t=r*this.cos*f,n=r*this.sin*p,o.x(h.x-t),o.y(h.y+n)}g=o.position(),this.findOne(".top-left").x(g.x),this.findOne(".bottom-right").y(g.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(o.y());else if("bottom-right"===this._movingAnchorName){if(u){h=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};r=Math.sqrt(Math.pow(o.x()-h.x,2)+Math.pow(o.y()-h.y,2));f=this.findOne(".bottom-right").x()<h.x?-1:1,p=this.findOne(".bottom-right").y()<h.y?-1:1;t=r*this.cos*f,n=r*this.sin*p,this.findOne(".bottom-right").x(h.x+t),this.findOne(".bottom-right").y(h.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(d=this.centeredScaling()||e.altKey){var m=this.findOne(".top-left"),v=this.findOne(".bottom-right"),y=m.x(),b=m.y(),x=this.getWidth()-v.x(),w=this.getHeight()-v.y();v.move({x:-y,y:-b}),m.move({x:x,y:w})}var k=this.findOne(".top-left").getAbsolutePosition();t=k.x,n=k.y;var S=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),C=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:t,y:n,width:S,height:C,rotation:DQ.getAngle(this.rotation())},e)}else{var _=this._getNodeRect();t=o.x()-_.width/2,n=-o.y()+_.height/2;let r=Math.atan2(-n,t)+Math.PI/2;_.height<0&&(r-=Math.PI);const i=DQ.getAngle(this.rotation())+r,a=DQ.getAngle(this.rotationSnapTolerance()),s=function(e,t,n){let r=t;for(let o=0;o<e.length;o++){const i=DQ.getAngle(e[o]),a=Math.abs(i-t)%(2*Math.PI);Math.min(a,2*Math.PI-a)<n&&(r=i)}return r}(this.rotationSnaps(),i,a),l=O1(_,s-_.rotation);this._fitNodesInto(l,e)}}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){if(this._transforming){this._transforming=!1,"undefined"!=typeof window&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var t=this.getNode();this._fire("transformend",{evt:e,target:t}),t&&this._nodes.forEach((t=>{t._fire("transformend",{evt:e,target:t})})),this._movingAnchorName=null}}_fitNodesInto(e,t){var n=this._getNodeRect();if(GQ._inRange(e.width,2*-this.padding()-1,1))return void this.update();if(GQ._inRange(e.height,2*-this.padding()-1,1))return void this.update();const r=this.flipEnabled();var o=new BQ;if(o.rotate(DQ.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const t=o.point({x:2*-this.padding(),y:0});if(e.x+=t.x,e.y+=t.y,e.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,!r)return void this.update()}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const t=o.point({x:2*this.padding(),y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.width+=2*this.padding(),!r)return void this.update()}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const t=o.point({x:0,y:2*-this.padding()});if(e.x+=t.x,e.y+=t.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding(),!r)return void this.update()}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const t=o.point({x:0,y:2*this.padding()});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding(),!r)return void this.update()}if(this.boundBoxFunc()){const t=this.boundBoxFunc()(n,e);t?e=t:GQ.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const i=1e7,a=new BQ;a.translate(n.x,n.y),a.rotate(n.rotation),a.scale(n.width/i,n.height/i);const s=new BQ;s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.width/i,e.height/i);const l=s.multiply(a.invert());this._nodes.forEach((e=>{var n;const r=e.getParent().getAbsoluteTransform(),o=e.getTransform().copy();o.translate(e.offsetX(),e.offsetY());const i=new BQ;i.multiply(r.copy().invert()).multiply(l).multiply(r).multiply(o);const a=i.decompose();e.setAttrs(a),this._fire("transform",{evt:t,target:e}),e._fire("transform",{evt:t,target:e}),null===(n=e.getLayer())||void 0===n||n.batchDraw()})),this.rotation(GQ._getRotation(e.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,t){this.findOne(e).setAttrs(t)}update(){var e,t=this._getNodeRect();this.rotation(GQ._getRotation(t.rotation));var n=t.width,r=t.height,o=this.enabledAnchors(),i=this.resizeEnabled(),a=this.padding(),s=this.anchorSize();this.find("._anchor").forEach((e=>{e.setAttrs({width:s,height:s,offsetX:s/2,offsetY:s/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})})),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:s/2+a,offsetY:s/2+a,visible:i&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:s/2+a,visible:i&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:s/2-a,offsetY:s/2+a,visible:i&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:r/2,offsetX:s/2+a,visible:i&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:r/2,offsetX:s/2-a,visible:i&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:r,offsetX:s/2+a,offsetY:s/2-a,visible:i&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:r,offsetY:s/2-a,visible:i&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:r,offsetX:s/2-a,offsetY:s/2-a,visible:i&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*GQ._sign(r)-a,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:r,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),null===(e=this.getLayer())||void 0===e||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.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 OJ.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}T1.prototype.className="Transformer",zQ(T1),rJ.addGetterSetter(T1,"enabledAnchors",L1,(function(e){return e instanceof Array||GQ.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach((function(e){-1===L1.indexOf(e)&&GQ.warn("Unknown anchor name: "+e+". Available names are: "+L1.join(", "))})),e||[]})),rJ.addGetterSetter(T1,"flipEnabled",!0,eJ()),rJ.addGetterSetter(T1,"resizeEnabled",!0),rJ.addGetterSetter(T1,"anchorSize",10,YQ()),rJ.addGetterSetter(T1,"rotateEnabled",!0),rJ.addGetterSetter(T1,"rotationSnaps",[]),rJ.addGetterSetter(T1,"rotateAnchorOffset",50,YQ()),rJ.addGetterSetter(T1,"rotationSnapTolerance",5,YQ()),rJ.addGetterSetter(T1,"borderEnabled",!0),rJ.addGetterSetter(T1,"anchorStroke","rgb(0, 161, 255)"),rJ.addGetterSetter(T1,"anchorStrokeWidth",1,YQ()),rJ.addGetterSetter(T1,"anchorFill","white"),rJ.addGetterSetter(T1,"anchorCornerRadius",0,YQ()),rJ.addGetterSetter(T1,"borderStroke","rgb(0, 161, 255)"),rJ.addGetterSetter(T1,"borderStrokeWidth",1,YQ()),rJ.addGetterSetter(T1,"borderDash"),rJ.addGetterSetter(T1,"keepRatio",!0),rJ.addGetterSetter(T1,"centeredScaling",!1),rJ.addGetterSetter(T1,"ignoreStroke",!1),rJ.addGetterSetter(T1,"padding",0,YQ()),rJ.addGetterSetter(T1,"node"),rJ.addGetterSetter(T1,"nodes"),rJ.addGetterSetter(T1,"boundBoxFunc"),rJ.addGetterSetter(T1,"anchorDragBoundFunc"),rJ.addGetterSetter(T1,"shouldOverdrawWholeArea",!1),rJ.addGetterSetter(T1,"useSingleNodeRotation",!0),rJ.backCompat(T1,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class M1 extends x0{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,DQ.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}function A1(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}M1.prototype.className="Wedge",M1.prototype._centroid=!0,M1.prototype._attrsAffectingSize=["radius"],zQ(M1),rJ.addGetterSetter(M1,"radius",0,YQ()),rJ.addGetterSetter(M1,"angle",0,YQ()),rJ.addGetterSetter(M1,"clockwise",!1),rJ.backCompat(M1,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var I1=[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],R1=[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];rJ.addGetterSetter(OJ,"blurRadius",0,YQ(),rJ.afterSetFilter);rJ.addGetterSetter(OJ,"brightness",0,YQ(),rJ.afterSetFilter);rJ.addGetterSetter(OJ,"contrast",0,YQ(),rJ.afterSetFilter);function N1(e,t,n,r,o){var i=n-t,a=o-r;return 0===i?r+a/2:0===a?r:a*((e-t)/i)+r}rJ.addGetterSetter(OJ,"embossStrength",.5,YQ(),rJ.afterSetFilter),rJ.addGetterSetter(OJ,"embossWhiteLevel",.5,YQ(),rJ.afterSetFilter),rJ.addGetterSetter(OJ,"embossDirection","top-left",null,rJ.afterSetFilter),rJ.addGetterSetter(OJ,"embossBlend",!1,null,rJ.afterSetFilter);rJ.addGetterSetter(OJ,"enhance",0,YQ(),rJ.afterSetFilter);rJ.addGetterSetter(OJ,"hue",0,YQ(),rJ.afterSetFilter),rJ.addGetterSetter(OJ,"saturation",0,YQ(),rJ.afterSetFilter),rJ.addGetterSetter(OJ,"luminance",0,YQ(),rJ.afterSetFilter);rJ.addGetterSetter(OJ,"hue",0,YQ(),rJ.afterSetFilter),rJ.addGetterSetter(OJ,"saturation",0,YQ(),rJ.afterSetFilter),rJ.addGetterSetter(OJ,"value",0,YQ(),rJ.afterSetFilter);function D1(e,t,n){var r=4*(n*e.width+t),o=[];return o.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),o}function z1(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}rJ.addGetterSetter(OJ,"kaleidoscopePower",2,YQ(),rJ.afterSetFilter),rJ.addGetterSetter(OJ,"kaleidoscopeAngle",0,YQ(),rJ.afterSetFilter);rJ.addGetterSetter(OJ,"threshold",0,YQ(),rJ.afterSetFilter);rJ.addGetterSetter(OJ,"noise",.2,YQ(),rJ.afterSetFilter);rJ.addGetterSetter(OJ,"pixelSize",8,YQ(),rJ.afterSetFilter);rJ.addGetterSetter(OJ,"levels",.5,YQ(),rJ.afterSetFilter);rJ.addGetterSetter(OJ,"red",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),rJ.addGetterSetter(OJ,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),rJ.addGetterSetter(OJ,"blue",0,ZQ,rJ.afterSetFilter);rJ.addGetterSetter(OJ,"red",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),rJ.addGetterSetter(OJ,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),rJ.addGetterSetter(OJ,"blue",0,ZQ,rJ.afterSetFilter),rJ.addGetterSetter(OJ,"alpha",1,(function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e}));rJ.addGetterSetter(OJ,"threshold",.5,YQ(),rJ.afterSetFilter);const B1=R0.Util._assign(R0,{Arc:N0,Arrow:F0,Circle:H0,Ellipse:W0,Image:$0,Label:X0,Tag:K0,Line:B0,Path:j0,Rect:Q0,RegularPolygon:J0,Ring:t1,Sprite:n1,Star:r1,Text:m1,TextPath:x1,Transformer:T1,Wedge:M1,Filters:{Blur:function(e){var t=Math.round(this.blurRadius());t>0&&function(e,t){var n,r,o,i,a,s,l,c,u,d,h,f,p,g,m,v,y,b,x,w,k,S,C,_,E=e.data,L=e.width,P=e.height,O=t+t+1,T=L-1,M=P-1,A=t+1,I=A*(A+1)/2,R=new A1,N=null,D=R,z=null,B=null,j=I1[t],F=R1[t];for(o=1;o<O;o++)D=D.next=new A1,o===A&&(N=D);for(D.next=R,l=s=0,r=0;r<P;r++){for(v=y=b=x=c=u=d=h=0,f=A*(w=E[s]),p=A*(k=E[s+1]),g=A*(S=E[s+2]),m=A*(C=E[s+3]),c+=I*w,u+=I*k,d+=I*S,h+=I*C,D=R,o=0;o<A;o++)D.r=w,D.g=k,D.b=S,D.a=C,D=D.next;for(o=1;o<A;o++)i=s+((T<o?T:o)<<2),c+=(D.r=w=E[i])*(_=A-o),u+=(D.g=k=E[i+1])*_,d+=(D.b=S=E[i+2])*_,h+=(D.a=C=E[i+3])*_,v+=w,y+=k,b+=S,x+=C,D=D.next;for(z=R,B=N,n=0;n<L;n++)E[s+3]=C=h*j>>F,0!==C?(C=255/C,E[s]=(c*j>>F)*C,E[s+1]=(u*j>>F)*C,E[s+2]=(d*j>>F)*C):E[s]=E[s+1]=E[s+2]=0,c-=f,u-=p,d-=g,h-=m,f-=z.r,p-=z.g,g-=z.b,m-=z.a,i=l+((i=n+t+1)<T?i:T)<<2,c+=v+=z.r=E[i],u+=y+=z.g=E[i+1],d+=b+=z.b=E[i+2],h+=x+=z.a=E[i+3],z=z.next,f+=w=B.r,p+=k=B.g,g+=S=B.b,m+=C=B.a,v-=w,y-=k,b-=S,x-=C,B=B.next,s+=4;l+=L}for(n=0;n<L;n++){for(y=b=x=v=u=d=h=c=0,f=A*(w=E[s=n<<2]),p=A*(k=E[s+1]),g=A*(S=E[s+2]),m=A*(C=E[s+3]),c+=I*w,u+=I*k,d+=I*S,h+=I*C,D=R,o=0;o<A;o++)D.r=w,D.g=k,D.b=S,D.a=C,D=D.next;for(a=L,o=1;o<=t;o++)s=a+n<<2,c+=(D.r=w=E[s])*(_=A-o),u+=(D.g=k=E[s+1])*_,d+=(D.b=S=E[s+2])*_,h+=(D.a=C=E[s+3])*_,v+=w,y+=k,b+=S,x+=C,D=D.next,o<M&&(a+=L);for(s=n,z=R,B=N,r=0;r<P;r++)E[3+(i=s<<2)]=C=h*j>>F,C>0?(C=255/C,E[i]=(c*j>>F)*C,E[i+1]=(u*j>>F)*C,E[i+2]=(d*j>>F)*C):E[i]=E[i+1]=E[i+2]=0,c-=f,u-=p,d-=g,h-=m,f-=z.r,p-=z.g,g-=z.b,m-=z.a,i=n+((i=r+A)<M?i:M)*L<<2,c+=v+=z.r=E[i],u+=y+=z.g=E[i+1],d+=b+=z.b=E[i+2],h+=x+=z.a=E[i+3],z=z.next,f+=w=B.r,p+=k=B.g,g+=S=B.b,m+=C=B.a,v-=w,y-=k,b-=S,x-=C,B=B.next,s+=L}}(e,t)},Brighten:function(e){var t,n=255*this.brightness(),r=e.data,o=r.length;for(t=0;t<o;t+=4)r[t]+=n,r[t+1]+=n,r[t+2]+=n},Contrast:function(e){var t,n=Math.pow((this.contrast()+100)/100,2),r=e.data,o=r.length,i=150,a=150,s=150;for(t=0;t<o;t+=4)i=r[t],a=r[t+1],s=r[t+2],i/=255,i-=.5,i*=n,i+=.5,a/=255,a-=.5,a*=n,a+=.5,s/=255,s-=.5,s*=n,s+=.5,i=(i*=255)<0?0:i>255?255:i,a=(a*=255)<0?0:a>255?255:a,s=(s*=255)<0?0:s>255?255:s,r[t]=i,r[t+1]=a,r[t+2]=s},Emboss:function(e){var t=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),o=this.embossBlend(),i=0,a=0,s=e.data,l=e.width,c=e.height,u=4*l,d=c;switch(r){case"top-left":i=-1,a=-1;break;case"top":i=-1,a=0;break;case"top-right":i=-1,a=1;break;case"right":i=0,a=1;break;case"bottom-right":i=1,a=1;break;case"bottom":i=1,a=0;break;case"bottom-left":i=1,a=-1;break;case"left":i=0,a=-1;break;default:GQ.error("Unknown emboss direction: "+r)}do{var h=(d-1)*u,f=i;d+f<1&&(f=0),d+f>c&&(f=0);var p=(d-1+f)*l*4,g=l;do{var m=h+4*(g-1),v=a;g+v<1&&(v=0),g+v>l&&(v=0);var y=p+4*(g-1+v),b=s[m]-s[y],x=s[m+1]-s[y+1],w=s[m+2]-s[y+2],k=b,S=k>0?k:-k;if((x>0?x:-x)>S&&(k=x),(w>0?w:-w)>S&&(k=w),k*=t,o){var C=s[m]+k,_=s[m+1]+k,E=s[m+2]+k;s[m]=C>255?255:C<0?0:C,s[m+1]=_>255?255:_<0?0:_,s[m+2]=E>255?255:E<0?0:E}else{var L=n-k;L<0?L=0:L>255&&(L=255),s[m]=s[m+1]=s[m+2]=L}}while(--g)}while(--d)},Enhance:function(e){var t,n,r,o,i=e.data,a=i.length,s=i[0],l=s,c=i[1],u=c,d=i[2],h=d,f=this.enhance();if(0!==f){for(o=0;o<a;o+=4)(t=i[o+0])<s?s=t:t>l&&(l=t),(n=i[o+1])<c?c=n:n>u&&(u=n),(r=i[o+2])<d?d=r:r>h&&(h=r);var p,g,m,v,y,b,x,w,k;for(l===s&&(l=255,s=0),u===c&&(u=255,c=0),h===d&&(h=255,d=0),f>0?(g=l+f*(255-l),m=s-f*(s-0),y=u+f*(255-u),b=c-f*(c-0),w=h+f*(255-h),k=d-f*(d-0)):(g=l+f*(l-(p=.5*(l+s))),m=s+f*(s-p),y=u+f*(u-(v=.5*(u+c))),b=c+f*(c-v),w=h+f*(h-(x=.5*(h+d))),k=d+f*(d-x)),o=0;o<a;o+=4)i[o+0]=N1(i[o+0],s,l,m,g),i[o+1]=N1(i[o+1],c,u,b,y),i[o+2]=N1(i[o+2],d,h,k,w)}},Grayscale:function(e){var t,n,r=e.data,o=r.length;for(t=0;t<o;t+=4)n=.34*r[t]+.5*r[t+1]+.16*r[t+2],r[t]=n,r[t+1]=n,r[t+2]=n},HSL:function(e){var t,n,r,o,i,a=e.data,s=a.length,l=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,u=127*this.luminance(),d=1*l*Math.cos(c*Math.PI/180),h=1*l*Math.sin(c*Math.PI/180),f=.299+.701*d+.167*h,p=.587-.587*d+.33*h,g=.114-.114*d-.497*h,m=.299-.299*d-.328*h,v=.587+.413*d+.035*h,y=.114-.114*d+.293*h,b=.299-.3*d+1.25*h,x=.587-.586*d-1.05*h,w=.114+.886*d-.2*h;for(t=0;t<s;t+=4)n=a[t+0],r=a[t+1],o=a[t+2],i=a[t+3],a[t+0]=f*n+p*r+g*o+u,a[t+1]=m*n+v*r+y*o+u,a[t+2]=b*n+x*r+w*o+u,a[t+3]=i},HSV:function(e){var t,n,r,o,i,a=e.data,s=a.length,l=Math.pow(2,this.value()),c=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,d=l*c*Math.cos(u*Math.PI/180),h=l*c*Math.sin(u*Math.PI/180),f=.299*l+.701*d+.167*h,p=.587*l-.587*d+.33*h,g=.114*l-.114*d-.497*h,m=.299*l-.299*d-.328*h,v=.587*l+.413*d+.035*h,y=.114*l-.114*d+.293*h,b=.299*l-.3*d+1.25*h,x=.587*l-.586*d-1.05*h,w=.114*l+.886*d-.2*h;for(t=0;t<s;t+=4)n=a[t+0],r=a[t+1],o=a[t+2],i=a[t+3],a[t+0]=f*n+p*r+g*o,a[t+1]=m*n+v*r+y*o,a[t+2]=b*n+x*r+w*o,a[t+3]=i},Invert:function(e){var t,n=e.data,r=n.length;for(t=0;t<r;t+=4)n[t]=255-n[t],n[t+1]=255-n[t+1],n[t+2]=255-n[t+2]},Kaleidoscope:function(e){var t,n,r,o,i,a,s,l,c,u=e.width,d=e.height,h=Math.round(this.kaleidoscopePower()),f=Math.round(this.kaleidoscopeAngle()),p=Math.floor(u*(f%360)/360);if(!(h<1)){var g=GQ.createCanvasElement();g.width=u,g.height=d;var m=g.getContext("2d").getImageData(0,0,u,d);GQ.releaseCanvas(g),function(e,t,n){var r,o,i,a,s=e.data,l=t.data,c=e.width,u=e.height,d=n.polarCenterX||c/2,h=n.polarCenterY||u/2,f=0,p=0,g=0,m=0,v=Math.sqrt(d*d+h*h);o=c-d,i=u-h,v=(a=Math.sqrt(o*o+i*i))>v?a:v;var y,b,x,w,k=u,S=c,C=360/S*Math.PI/180;for(b=0;b<S;b+=1)for(x=Math.sin(b*C),w=Math.cos(b*C),y=0;y<k;y+=1)o=Math.floor(d+v*y/k*w),f=s[0+(r=4*((i=Math.floor(h+v*y/k*x))*c+o))],p=s[r+1],g=s[r+2],m=s[r+3],l[0+(r=4*(b+y*c))]=f,l[r+1]=p,l[r+2]=g,l[r+3]=m}(e,m,{polarCenterX:u/2,polarCenterY:d/2});for(var v=u/Math.pow(2,h);v<=8;)v*=2,h-=1;var y=v=Math.ceil(v),b=0,x=y,w=1;for(p+v>u&&(b=y,x=0,w=-1),n=0;n<d;n+=1)for(t=b;t!==x;t+=w)l=4*(u*n+Math.round(t+p)%u),o=m.data[l+0],i=m.data[l+1],a=m.data[l+2],s=m.data[l+3],c=4*(u*n+t),m.data[c+0]=o,m.data[c+1]=i,m.data[c+2]=a,m.data[c+3]=s;for(n=0;n<d;n+=1)for(y=Math.floor(v),r=0;r<h;r+=1){for(t=0;t<y+1;t+=1)l=4*(u*n+t),o=m.data[l+0],i=m.data[l+1],a=m.data[l+2],s=m.data[l+3],c=4*(u*n+2*y-t-1),m.data[c+0]=o,m.data[c+1]=i,m.data[c+2]=a,m.data[c+3]=s;y*=2}!function(e,t,n){var r,o,i,a,s,l,c=e.data,u=t.data,d=e.width,h=e.height,f=n.polarCenterX||d/2,p=n.polarCenterY||h/2,g=0,m=0,v=0,y=0,b=Math.sqrt(f*f+p*p);o=d-f,i=h-p,b=(l=Math.sqrt(o*o+i*i))>b?l:b;var x,w,k,S=h,C=d,_=n.polarRotation||0;for(o=0;o<d;o+=1)for(i=0;i<h;i+=1)a=o-f,s=i-p,x=Math.sqrt(a*a+s*s)*S/b,w=(w=(180*Math.atan2(s,a)/Math.PI+360+_)%360)*C/360,k=Math.floor(w),g=c[0+(r=4*(Math.floor(x)*d+k))],m=c[r+1],v=c[r+2],y=c[r+3],u[0+(r=4*(i*d+o))]=g,u[r+1]=m,u[r+2]=v,u[r+3]=y}(m,e,{polarRotation:0})}},Mask:function(e){var t=function(e,t){var n=D1(e,0,0),r=D1(e,e.width-1,0),o=D1(e,0,e.height-1),i=D1(e,e.width-1,e.height-1),a=t||10;if(z1(n,r)<a&&z1(r,i)<a&&z1(i,o)<a&&z1(o,n)<a){for(var s=function(e){for(var t=[0,0,0],n=0;n<e.length;n++)t[0]+=e[n][0],t[1]+=e[n][1],t[2]+=e[n][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}([r,n,i,o]),l=[],c=0;c<e.width*e.height;c++){var u=z1(s,[e.data[4*c],e.data[4*c+1],e.data[4*c+2]]);l[c]=u<a?0:255}return l}}(e,this.threshold());return t&&(t=function(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var c=s*t+l,u=0,d=0;d<o;d++)for(var h=0;h<o;h++){var f=s+d-i,p=l+h-i;if(f>=0&&f<n&&p>=0&&p<t){var g=r[d*o+h];u+=e[f*t+p]*g}}a[c]=2040===u?255:0}return a}(t,e.width,e.height),t=function(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var c=s*t+l,u=0,d=0;d<o;d++)for(var h=0;h<o;h++){var f=s+d-i,p=l+h-i;if(f>=0&&f<n&&p>=0&&p<t){var g=r[d*o+h];u+=e[f*t+p]*g}}a[c]=u>=1020?255:0}return a}(t,e.width,e.height),t=function(e,t,n){for(var r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var c=s*t+l,u=0,d=0;d<o;d++)for(var h=0;h<o;h++){var f=s+d-i,p=l+h-i;if(f>=0&&f<n&&p>=0&&p<t){var g=r[d*o+h];u+=e[f*t+p]*g}}a[c]=u}return a}(t,e.width,e.height),function(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}(e,t)),e},Noise:function(e){var t,n=255*this.noise(),r=e.data,o=r.length,i=n/2;for(t=0;t<o;t+=4)r[t+0]+=i-2*i*Math.random(),r[t+1]+=i-2*i*Math.random(),r[t+2]+=i-2*i*Math.random()},Pixelate:function(e){var t,n,r,o,i,a,s,l,c,u,d,h,f,p,g=Math.ceil(this.pixelSize()),m=e.width,v=e.height,y=Math.ceil(m/g),b=Math.ceil(v/g),x=e.data;if(g<=0)GQ.error("pixelSize value can not be <= 0");else for(h=0;h<y;h+=1)for(f=0;f<b;f+=1){for(o=0,i=0,a=0,s=0,c=(l=h*g)+g,d=(u=f*g)+g,p=0,t=l;t<c;t+=1)if(!(t>=m))for(n=u;n<d;n+=1)n>=v||(o+=x[(r=4*(m*n+t))+0],i+=x[r+1],a+=x[r+2],s+=x[r+3],p+=1);for(o/=p,i/=p,a/=p,s/=p,t=l;t<c;t+=1)if(!(t>=m))for(n=u;n<d;n+=1)n>=v||(x[(r=4*(m*n+t))+0]=o,x[r+1]=i,x[r+2]=a,x[r+3]=s)}},Posterize:function(e){var t,n=Math.round(254*this.levels())+1,r=e.data,o=r.length,i=255/n;for(t=0;t<o;t+=1)r[t]=Math.floor(r[t]/i)*i},RGB:function(e){var t,n,r=e.data,o=r.length,i=this.red(),a=this.green(),s=this.blue();for(t=0;t<o;t+=4)n=(.34*r[t]+.5*r[t+1]+.16*r[t+2])/255,r[t]=n*i,r[t+1]=n*a,r[t+2]=n*s,r[t+3]=r[t+3]},RGBA:function(e){var t,n,r=e.data,o=r.length,i=this.red(),a=this.green(),s=this.blue(),l=this.alpha();for(t=0;t<o;t+=4)n=1-l,r[t]=i*l+r[t]*n,r[t+1]=a*l+r[t+1]*n,r[t+2]=s*l+r[t+2]*n},Sepia:function(e){var t,n,r,o,i=e.data,a=i.length;for(t=0;t<a;t+=4)n=i[t+0],r=i[t+1],o=i[t+2],i[t+0]=Math.min(255,.393*n+.769*r+.189*o),i[t+1]=Math.min(255,.349*n+.686*r+.168*o),i[t+2]=Math.min(255,.272*n+.534*r+.131*o)},Solarize:function(e){var t=e.data,n=e.width,r=4*n,o=e.height;do{var i=(o-1)*r,a=n;do{var s=i+4*(a-1),l=t[s],c=t[s+1],u=t[s+2];l>127&&(l=255-l),c>127&&(c=255-c),u>127&&(u=255-u),t[s]=l,t[s+1]=c,t[s+2]=u}while(--a)}while(--o)},Threshold:function(e){var t,n=255*this.threshold(),r=e.data,o=r.length;for(t=0;t<o;t+=1)r[t]=r[t]<n?0:255}}});let j1=null,F1=null;const H1=()=>j1,W1=()=>F1,$1=e=>{const t=H1(),{generationMode:n,optionsState:r,canvasState:o,systemState:i}=e,{cfgScale:a,codeformerFidelity:s,facetoolStrength:l,facetoolType:c,height:u,hiresFix:d,img2imgStrength:h,infillMethod:f,initialImage:p,iterations:g,perlin:m,prompt:v,sampler:y,seamBlur:b,seamless:x,seamSize:w,seamSteps:k,seamStrength:S,seed:C,seedWeights:_,shouldFitToWidthHeight:E,shouldGenerateVariations:L,shouldRandomizeSeed:P,shouldRunESRGAN:O,shouldRunFacetool:T,steps:M,threshold:A,tileSize:I,upscalingLevel:R,upscalingStrength:N,variationAmount:D,width:z}=r,{shouldDisplayInProgressType:B,saveIntermediatesInterval:j,enableImageDebugging:F}=i,H={prompt:v,iterations:g,steps:M,cfg_scale:a,threshold:A,perlin:m,height:u,width:z,sampler_name:y,seed:C,progress_images:"full-res"===B,progress_latents:"latents"===B,save_intermediates:j,generation_mode:n,init_mask:""};let W=!1,$=!1;if(H.seed=P?IQ(0,TQ):C,["txt2img","img2img"].includes(n)&&(H.seamless=x,H.hires_fix=d,O&&(W={level:R,strength:N}),T&&($={type:c,strength:l},"codeformer"===c&&($.codeformer_fidelity=s))),"img2img"===n&&p&&(H.init_img="string"==typeof p?p:p.url,H.strength=h,H.fit=E),"unifiedCanvas"===n&&t){const{layerState:{objects:e},boundingBoxCoordinates:n,boundingBoxDimensions:r,inpaintReplace:i,shouldUseInpaintReplace:a,stageScale:s,isMaskEnabled:l,shouldPreserveMaskedArea:c,boundingBoxScaleMethod:u,scaledBoundingBoxDimensions:d}=o,p={...n,...r},g=((e,t)=>{const{width:n,height:r}=t,o=document.createElement("div"),i=new B1.Stage({container:o,width:n,height:r}),a=new B1.Layer,s=new B1.Layer;a.add(new B1.Rect({...t,fill:"white"})),e.forEach((e=>s.add(new B1.Line({points:e.points,stroke:"black",strokeWidth:2*e.strokeWidth,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:"brush"===e.tool?"source-over":"destination-out"})))),i.add(a),i.add(s);const l=i.toDataURL({...t});return o.remove(),l})(l?e.filter(xY):[],p);H.init_mask=g,H.fit=!1,H.strength=h,H.invert_mask=c,a&&(H.inpaint_replace=i),H.bounding_box=p;const m=t.scale();t.scale({x:1/s,y:1/s});const v=t.getAbsolutePosition(),y=t.toDataURL({x:p.x+v.x,y:p.y+v.y,width:p.width,height:p.height});F&&(e=>{const t=window.open("");t&&e.forEach((e=>{const n=new Image;n.src=e.base64,t.document.write(e.caption),t.document.write("</br>"),t.document.write(n.outerHTML),t.document.write("</br></br>")}))})([{base64:g,caption:"mask sent as init_mask"},{base64:y,caption:"image sent as init_img"}]),t.scale(m),H.init_img=y,H.progress_images=!1,"none"!==u&&(H.inpaint_width=d.width,H.inpaint_height=d.height),H.seam_size=w,H.seam_blur=b,H.seam_strength=S,H.seam_steps=k,H.tile_size=I,H.infill_method=f,H.force_outpaint=!1}return L?(H.variation_amount=D,_&&(H.with_variations=(e=>{const t=e.split(",").map((e=>e.split(":")));return t.map((e=>[parseInt(e[0]),parseFloat(e[1])]))})(_))):H.variation_amount=0,F&&(H.enable_image_debugging=F),{generationParameters:H,esrganParameters:W,facetoolParameters:$}},U1=()=>{const{origin:e}=new URL(window.location.href),t=KK(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return e=>r=>o=>{const{onConnect:i,onDisconnect:a,onError:s,onPostprocessingResult:l,onGenerationResult:c,onIntermediateResult:u,onProgressUpdate:d,onGalleryImages:h,onProcessingCanceled:f,onImageDeleted:p,onSystemConfig:g,onModelChanged:m,onModelChangeFailed:v,onTempFolderEmptied:y}=(e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(UZ(!0)),t(YZ(hq.t("common:statusConnected"))),t(kQ());const e=n().gallery;e.categories.result.latest_mtime?t(xQ("result")):t(bQ("result")),e.categories.user.latest_mtime?t(xQ("user")):t(bQ("user"))}catch(T2){console.error(T2)}},onDisconnect:()=>{try{t(UZ(!1)),t(YZ(hq.t("common:statusDisconnected"))),t(WZ({timestamp:sQ(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(T2){console.error(T2)}},onGenerationResult:e=>{try{const r=n(),{shouldLoopback:o,activeTab:i}=r.options,{boundingBox:a,generationMode:s,...l}=e,c={uuid:rQ(),...l};if(["txt2img","img2img"].includes(s)&&t(MV({category:"result",image:{...c,category:"result"}})),"unifiedCanvas"===s&&e.boundingBox){const{boundingBox:n}=e;t(LY({image:{...c,category:"temp"},boundingBox:n})),r.canvas.shouldAutoSave&&t(MV({image:{...c,category:"result"},category:"result"}))}o&&"img2img"===EU[i]&&t(VU(c)),t(AV()),t(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`Image generated: ${e.url}`}))}catch(T2){console.error(T2)}},onIntermediateResult:e=>{try{t(DV({uuid:rQ(),...e,category:"result"})),e.isBase64||t(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`Intermediate image generated: ${e.url}`}))}catch(T2){console.error(T2)}},onPostprocessingResult:e=>{try{t(MV({category:"result",image:{uuid:rQ(),...e,category:"result"}})),t(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`Postprocessed: ${e.url}`}))}catch(T2){console.error(T2)}},onProgressUpdate:e=>{try{t(HZ(!0)),t(ZZ(e))}catch(T2){console.error(T2)}},onError:e=>{const{message:n,additionalData:r}=e;try{t(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`Server error: ${n}`,level:"error"})),t(JZ()),t(AV())}catch(T2){console.error(T2)}},onGalleryImages:e=>{const{images:n,areMoreImagesAvailable:r,category:o}=e,i=n.map((e=>({uuid:rQ(),...e})));t(NV({images:i,areMoreImagesAvailable:r,category:o})),t(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`Loaded ${n.length} images`}))},onProcessingCanceled:()=>{t(QZ());const{intermediateImage:e}=n().gallery;e&&(e.isBase64||(t(MV({category:"result",image:e})),t(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`Intermediate image saved: ${e.url}`}))),t(AV())),t(WZ({timestamp:sQ(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:e=>{const{url:r}=e;t(IV(e));const{initialImage:o,maskPath:i}=n().options;o!==r&&o?.url!==r||t(OU()),i===r&&t(ZU("")),t(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`Image deleted: ${r}`}))},onSystemConfig:e=>{t(XZ(e)),e.infill_methods.includes("patchmatch")||t(UU(e.infill_methods[0]))},onModelChanged:e=>{const{model_name:n,model_list:r}=e;t(tY(r)),t(YZ(hq.t("common:statusModelChanged"))),t(HZ(!1)),t(nY(!0)),t(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`Model changed: ${n}`,level:"info"}))},onModelChangeFailed:e=>{const{model_name:n,model_list:r}=e;t(tY(r)),t(HZ(!1)),t(nY(!0)),t(JZ()),t(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`Model change failed: ${n}`,level:"error"}))},onTempFolderEmptied:()=>{t(sY({title:hq.t("toast:tempFoldersEmptied"),status:"success",duration:2500,isClosable:!0}))}}})(e),{emitGenerateImage:b,emitRunESRGAN:x,emitRunFacetool:w,emitDeleteImage:k,emitRequestImages:S,emitRequestNewImages:C,emitCancelProcessing:_,emitRequestSystemConfig:E,emitRequestModelChange:L,emitSaveStagingAreaImageToGallery:P,emitRequestEmptyTempFolder:O}=((e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:e=>{n(HZ(!0));const o=r(),{options:i,system:a,canvas:s}=o,l={generationMode:e,optionsState:i,canvasState:s,systemState:a};n(aY());const{generationParameters:c,esrganParameters:u,facetoolParameters:d}=$1(l);t.emit("generateImage",c,u,d),c.init_mask&&(c.init_mask=c.init_mask.substr(0,64).concat("...")),c.init_img&&(c.init_img=c.init_img.substr(0,64).concat("...")),n(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...c,...u,...d})}`}))},emitRunESRGAN:e=>{n(HZ(!0));const o=r().options,{upscalingLevel:i,upscalingStrength:a}=o,s={upscale:[i,a]};t.emit("runPostprocessing",e,{type:"esrgan",...s}),n(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:e.url,...s})}`}))},emitRunFacetool:e=>{n(HZ(!0));const o=r().options,{facetoolType:i,facetoolStrength:a,codeformerFidelity:s}=o,l={facetool_strength:a};"codeformer"===i&&(l.codeformer_fidelity=s),t.emit("runPostprocessing",e,{type:i,...l}),n(WZ({timestamp:sQ(new Date,"isoDateTime"),message:`Face restoration (${i}) requested: ${JSON.stringify({file:e.url,...l})}`}))},emitDeleteImage:e=>{const{url:r,uuid:o,category:i,thumbnail:a}=e;n(IV(e)),t.emit("deleteImage",r,a,o,i)},emitRequestImages:e=>{const n=r().gallery,{earliest_mtime:o}=n.categories[e];t.emit("requestImages",e,o)},emitRequestNewImages:e=>{const n=r().gallery,{latest_mtime:o}=n.categories[e];t.emit("requestLatestImages",e,o)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:e=>{n(rY()),t.emit("requestModelChange",e)},emitSaveStagingAreaImageToGallery:e=>{t.emit("requestSaveStagingAreaImageToGallery",e)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}})(e,t);switch(n||(t.on("connect",(()=>i())),t.on("disconnect",(()=>a())),t.on("error",(e=>s(e))),t.on("generationResult",(e=>c(e))),t.on("postprocessingResult",(e=>l(e))),t.on("intermediateResult",(e=>u(e))),t.on("progressUpdate",(e=>d(e))),t.on("galleryImages",(e=>h(e))),t.on("processingCanceled",(()=>{f()})),t.on("imageDeleted",(e=>{p(e)})),t.on("systemConfig",(e=>{g(e)})),t.on("modelChanged",(e=>{m(e)})),t.on("modelChangeFailed",(e=>{v(e)})),t.on("tempFolderEmptied",(()=>{y()})),n=!0),o.type){case"socketio/generateImage":b(o.payload);break;case"socketio/runESRGAN":x(o.payload);break;case"socketio/runFacetool":w(o.payload);break;case"socketio/deleteImage":k(o.payload);break;case"socketio/requestImages":S(o.payload);break;case"socketio/requestNewImages":C(o.payload);break;case"socketio/cancelProcessing":_();break;case"socketio/requestSystemConfig":E();break;case"socketio/requestModelChange":L(o.payload);break;case"socketio/saveStagingAreaImageToGallery":P(o.payload);break;case"socketio/requestEmptyTempFolder":O()}r(o)}},V1=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map((e=>`canvas.${e}`)),G1=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map((e=>`system.${e}`)),q1=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map((e=>`gallery.${e}`)),Z1=t$({options:LV,gallery:YV,system:uY,canvas:BX}),Y1=function(e,t){var n=void 0!==e.version?e.version:-1;e.debug;var r=void 0===e.stateReconciler?Z$:e.stateReconciler,o=e.getStoredState||K$,i=void 0!==e.timeout?e.timeout:5e3,a=null,s=!1,l=!0,c=function(e){return e._persist.rehydrated&&a&&!l&&a.update(e),e};return function(u,d){var h=u||{},f=h._persist,p=rU(h,["_persist"]);if(d.type===W$){var g=!1,m=function(t,n){g||(d.rehydrate(e.key,t,n),g=!0)};if(i&&setTimeout((function(){!g&&m(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))}),i),l=!1,a||(a=Y$(e)),f)return tU({},t(p,d),{_persist:f});if("function"!=typeof d.rehydrate||"function"!=typeof d.register)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 d.register(e.key),o(e).then((function(t){var r=e.migrate||function(e,t){return Promise.resolve(e)};r(t,n).then((function(e){m(e)}),(function(e){m(void 0,e)}))}),(function(e){m(void 0,e)})),tU({},t(p,d),{_persist:{version:n,rehydrated:!1}})}if(d.type===$$)return s=!0,d.result(function(e){var t=e.storage,n="".concat(void 0!==e.keyPrefix?e.keyPrefix:B$).concat(e.key);return t.removeItem(n,J$)}(e)),tU({},t(p,d),{_persist:f});if(d.type===j$)return d.result(a&&a.flush()),tU({},t(p,d),{_persist:f});if(d.type===H$)l=!0;else if(d.type===F$){if(s)return tU({},p,{_persist:tU({},f,{rehydrated:!0})});if(d.key===e.key){var v=t(p,d),y=d.payload,b=tU({},!1!==r&&void 0!==y?r(y,u,v,e):v,{_persist:tU({},f,{rehydrated:!0})});return c(b)}}if(!f)return t(u,d);var x=t(p,d);return x===p?u:c(tU({},x,{_persist:f}))}}(bU.getPersistConfig({key:"root",storage:vU,rootReducer:Z1,blacklist:[...V1,...G1,...q1],debounce:300}),Z1),X1=function(e){var t,n=P$(),r=e||{},o=r.reducer,i=void 0===o?void 0:o,a=r.middleware,s=void 0===a?n():a,l=r.devTools,c=void 0===l||l,u=r.preloadedState,d=void 0===u?void 0:u,h=r.enhancers,f=void 0===h?void 0:h;if("function"==typeof i)t=i;else{if(!function(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}(i))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=t$(i)}var p=s;"function"==typeof p&&(p=p(n));var g=r$.apply(void 0,p),m=n$;c&&(m=_$(S$({trace:!1},"object"==typeof c&&c)));var v=[g];return Array.isArray(f)?v=g$([g],f):"function"==typeof f&&(v=f(v)),e$(t,d,m.apply(void 0,v))}({reducer:Y1,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(U1()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}});var K1={exports:{}},Q1={},J1=i.exports;var e2="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t2=J1.useState,n2=J1.useEffect,r2=J1.useLayoutEffect,o2=J1.useDebugValue;function i2(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!e2(e,n)}catch(oae){return!0}}var a2="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=t2({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return r2((function(){o.value=n,o.getSnapshot=t,i2(o)&&i({inst:o})}),[e,n,t]),n2((function(){return i2(o)&&i({inst:o}),e((function(){i2(o)&&i({inst:o})}))}),[e]),o2(n),n};Q1.useSyncExternalStore=void 0!==J1.useSyncExternalStore?J1.useSyncExternalStore:a2,function(e){e.exports=Q1}(K1);var s2={exports:{}},l2={},c2=i.exports,u2=K1.exports;var d2="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},h2=u2.useSyncExternalStore,f2=c2.useRef,p2=c2.useEffect,g2=c2.useMemo,m2=c2.useDebugValue;l2.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=f2(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=g2((function(){function e(e){if(!l){if(l=!0,i=e,e=r(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return s=t}return s=e}if(t=s,d2(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,s=n)}var i,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var s=h2(e,i[0],i[1]);return p2((function(){a.hasValue=!0,a.value=s}),[s]),m2(s),s},function(e){e.exports=l2}(s2);let v2=function(e){e()};const y2=()=>v2,b2=i.exports.createContext(null);function x2(){return i.exports.useContext(b2)}let w2=()=>{throw new Error("uSES not initialized!")};const k2=(e,t)=>e===t;function S2(e=b2){const t=e===b2?x2:()=>i.exports.useContext(e);return function(e,n=k2){const{store:r,subscription:o,getServerState:a}=t(),s=w2(o.addNestedSub,r.getState,a||r.getState,e,n);return i.exports.useDebugValue(s),s}}const C2=S2();var _2,E2={},L2=Symbol.for("react.element"),P2=Symbol.for("react.portal"),O2=Symbol.for("react.fragment"),T2=Symbol.for("react.strict_mode"),M2=Symbol.for("react.profiler"),A2=Symbol.for("react.provider"),I2=Symbol.for("react.context"),R2=Symbol.for("react.server_context"),N2=Symbol.for("react.forward_ref"),D2=Symbol.for("react.suspense"),z2=Symbol.for("react.suspense_list"),B2=Symbol.for("react.memo"),j2=Symbol.for("react.lazy"),F2=Symbol.for("react.offscreen");function H2(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case L2:switch(e=e.type){case O2:case M2:case T2:case D2:case z2:return e;default:switch(e=e&&e.$$typeof){case R2:case I2:case N2:case j2:case B2:case A2:return e;default:return t}}case P2:return t}}}_2=Symbol.for("react.module.reference"),E2.ContextConsumer=I2,E2.ContextProvider=A2,E2.Element=L2,E2.ForwardRef=N2,E2.Fragment=O2,E2.Lazy=j2,E2.Memo=B2,E2.Portal=P2,E2.Profiler=M2,E2.StrictMode=T2,E2.Suspense=D2,E2.SuspenseList=z2,E2.isAsyncMode=function(){return!1},E2.isConcurrentMode=function(){return!1},E2.isContextConsumer=function(e){return H2(e)===I2},E2.isContextProvider=function(e){return H2(e)===A2},E2.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===L2},E2.isForwardRef=function(e){return H2(e)===N2},E2.isFragment=function(e){return H2(e)===O2},E2.isLazy=function(e){return H2(e)===j2},E2.isMemo=function(e){return H2(e)===B2},E2.isPortal=function(e){return H2(e)===P2},E2.isProfiler=function(e){return H2(e)===M2},E2.isStrictMode=function(e){return H2(e)===T2},E2.isSuspense=function(e){return H2(e)===D2},E2.isSuspenseList=function(e){return H2(e)===z2},E2.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===O2||e===M2||e===T2||e===D2||e===z2||e===F2||"object"==typeof e&&null!==e&&(e.$$typeof===j2||e.$$typeof===B2||e.$$typeof===A2||e.$$typeof===I2||e.$$typeof===N2||e.$$typeof===_2||void 0!==e.getModuleId)},E2.typeOf=H2,function(e){e.exports=E2}({exports:{}});const W2={notify(){},get:()=>[]};function $2(e,t){let n,r=W2;function o(){a.onStateChange&&a.onStateChange()}function i(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){const e=y2();let t=null,n=null;return{clear(){t=null,n=null},notify(){e((()=>{let e=t;for(;e;)e.callback(),e=e.next}))},get(){let e=[],n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(e){let r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}const a={addNestedSub:function(e){return i(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(n)},trySubscribe:i,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=W2)},getListeners:()=>r};return a}const U2=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?i.exports.useLayoutEffect:i.exports.useEffect;function V2({store:e,context:t,children:n,serverState:r}){const o=i.exports.useMemo((()=>{const t=$2(e);return{store:e,subscription:t,getServerState:r?()=>r:void 0}}),[e,r]),a=i.exports.useMemo((()=>e.getState()),[e]);U2((()=>{const{subscription:t}=o;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),a!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}}),[o,a]);return sd((t||b2).Provider,{value:o,children:n})}function G2(e=b2){const t=e===b2?x2:()=>i.exports.useContext(e);return function(){const{store:e}=t();return e}}const q2=G2();function Z2(e=b2){const t=e===b2?q2:G2(e);return function(){return t().dispatch}}const Y2=Z2();var X2;function K2(e){return K2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K2(e)}function Q2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function e5(e,t){return!t||"object"!==K2(t)&&"function"!=typeof t?n5(e):t}function t5(e){return t5=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t5(e)}function n5(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r5(e,t){return r5=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r5(e,t)}function o5(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(e=>{w2=e})(s2.exports.useSyncExternalStoreWithSelector),X2=$.exports.unstable_batchedUpdates,v2=X2;var i5=function(e){function t(){var e,n;Q2(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o5(n5(n=e5(this,(e=t5(t)).call.apply(e,[this].concat(o)))),"state",{bootstrapped:!1}),o5(n5(n),"_unsubscribe",void 0),o5(n5(n),"handlePersistorState",(function(){n.props.persistor.getState().bootstrapped&&(n.props.onBeforeLift?Promise.resolve(n.props.onBeforeLift()).finally((function(){return n.setState({bootstrapped:!0})})):n.setState({bootstrapped:!0}),n._unsubscribe&&n._unsubscribe())})),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r5(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this._unsubscribe=this.props.persistor.subscribe(this.handlePersistorState),this.handlePersistorState()}},{key:"componentWillUnmount",value:function(){this._unsubscribe&&this._unsubscribe()}},{key:"render",value:function(){return"function"==typeof this.props.children?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}])&&J2(n.prototype,r),o&&J2(n,o),t}(i.exports.PureComponent);o5(i5,"defaultProps",{children:null,loading:null});const a5=function(e,t,n){var r=n||!1,o=e$(cU,lU,t&&t.enhancer?t.enhancer:void 0),i=function(e){o.dispatch({type:U$,key:e})},a=function(t,n,i){var a={type:F$,payload:n,err:i,key:t};e.dispatch(a),o.dispatch(a),r&&s.getState().bootstrapped&&(r(),r=!1)},s=aU({},o,{purge:function(){var t=[];return e.dispatch({type:$$,result:function(e){t.push(e)}}),Promise.all(t)},flush:function(){var t=[];return e.dispatch({type:j$,result:function(e){t.push(e)}}),Promise.all(t)},pause:function(){e.dispatch({type:H$})},persist:function(){e.dispatch({type:W$,register:i,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}(X1),s5=()=>sd(SI,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:sd(dM,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),l5=Y2,c5=C2,u5=c$((e=>e.system),(e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps})),{memoizeOptions:{resultEqualityCheck:PV.exports.isEqual}}),d5=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=c5(u5),o=t?Math.round(100*t/n):0;return sd(Jj,{value:o,isIndeterminate:e&&!r,className:"progress-bar"})};var h5={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},f5=F.createContext&&F.createContext(h5),p5=globalThis&&globalThis.__assign||function(){return p5=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p5.apply(this,arguments)},g5=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(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function m5(e){return e&&e.map((function(e,t){return F.createElement(e.tag,p5({key:t},e.attr),m5(e.child))}))}function v5(e){return function(t){return sd(y5,{...p5({attr:p5({},e.attr)},t),children:m5(e.child)})}}function y5(e){var t=function(t){var n,r=e.attr,o=e.size,i=e.title,a=g5(e,["attr","size","title"]),s=o||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),ld("svg",{...p5({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,a,{className:n,style:p5(p5({color:e.color||t.color},t.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),children:[i&&sd("title",{children:i}),e.children]})};return void 0!==f5?sd(f5.Consumer,{children:function(e){return t(e)}}):t(h5)}function b5(e){return v5({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 x5(e){return v5({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 w5(e){return v5({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 k5(e){return v5({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 S5(e){return v5({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 C5(e){return v5({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 _5(e){return v5({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 E5(e){return v5({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 L5(e){return v5({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 P5(e){return v5({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 O5(e){return v5({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 T5(e){return v5({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 M5(e){return v5({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 A5(e){return v5({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 I5(e){return v5({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 R5(e){return v5({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 N5(e){return v5({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 D5(e){return v5({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"}}]})(e)}function z5(e){return v5({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 B5(e){return v5({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 j5(e){return v5({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 F5(e){return v5({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z"}}]})(e)}function H5(e){return v5({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 W5(e){return v5({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 $5(e){return v5({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 U5(e){return v5({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M152.1 236.2c-3.5-12.1-7.8-33.2-7.8-33.2h-.5s-4.3 21.1-7.8 33.2l-11.1 37.5H163zM616 96H336v320h280c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm-24 120c0 6.6-5.4 12-12 12h-11.4c-6.9 23.6-21.7 47.4-42.7 69.9 8.4 6.4 17.1 12.5 26.1 18 5.5 3.4 7.3 10.5 4.1 16.2l-7.9 13.9c-3.4 5.9-10.9 7.8-16.7 4.3-12.6-7.8-24.5-16.1-35.4-24.9-10.9 8.7-22.7 17.1-35.4 24.9-5.8 3.5-13.3 1.6-16.7-4.3l-7.9-13.9c-3.2-5.6-1.4-12.8 4.2-16.2 9.3-5.7 18-11.7 26.1-18-7.9-8.4-14.9-17-21-25.7-4-5.7-2.2-13.6 3.7-17.1l6.5-3.9 7.3-4.3c5.4-3.2 12.4-1.7 16 3.4 5 7 10.8 14 17.4 20.9 13.5-14.2 23.8-28.9 30-43.2H412c-6.6 0-12-5.4-12-12v-16c0-6.6 5.4-12 12-12h64v-16c0-6.6 5.4-12 12-12h16c6.6 0 12 5.4 12 12v16h64c6.6 0 12 5.4 12 12zM0 120v272c0 13.3 10.7 24 24 24h280V96H24c-13.3 0-24 10.7-24 24zm58.9 216.1L116.4 167c1.7-4.9 6.2-8.1 11.4-8.1h32.5c5.1 0 9.7 3.3 11.4 8.1l57.5 169.1c2.6 7.8-3.1 15.9-11.4 15.9h-22.9a12 12 0 0 1-11.5-8.6l-9.4-31.9h-60.2l-9.1 31.8c-1.5 5.1-6.2 8.7-11.5 8.7H70.3c-8.2 0-14-8.1-11.4-15.9z"}}]})(e)}function V5(e){return v5({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 G5(e){return v5({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 q5(e){return v5({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 Z5(e){return v5({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 Y5(e){return v5({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 X5(e){return v5({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 K5(e){return v5({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 Q5(e){return v5({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 J5(e){return v5({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 e3(e){return v5({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 t3(e){return v5({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 n3(e){return v5({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 r3(e){return v5({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 o3(e){return v5({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 i3(e){return v5({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 a3(e){return v5({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 s3(e){return v5({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 l3(e){return v5({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 c3(e){return v5({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 u3(e){return v5({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 d3(e){return v5({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 h3=""+new URL("logo.13003d72.png",n.meta.url).href,f3=rk(((e,t)=>{const{tooltip:n="",styleClass:r,tooltipProps:o,asCheckbox:i,isChecked:a,...s}=e;return sd(qH,{label:n,hasArrow:!0,...o,...o?.placement?{placement:o.placement}:{placement:"top"},children:sd(DM,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":i,"data-selected":void 0!==a?a:void 0,...s})})}));function p3(e){const{title:t,hotkey:n,description:r}=e;return ld("div",{className:"hotkey-modal-item",children:[ld("div",{className:"hotkey-info",children:[sd("p",{className:"hotkey-title",children:t}),r&&sd("p",{className:"hotkey-description",children:r})]}),sd("div",{className:"hotkey-key",children:n})]})}function g3({children:e}){const{isOpen:t,onOpen:n,onClose:r}=KA(),{t:o}=BZ(),a=[{title:o("hotkeys:invoke.title"),desc:o("hotkeys:invoke.desc"),hotkey:"Ctrl+Enter"},{title:o("hotkeys:cancel.title"),desc:o("hotkeys:cancel.desc"),hotkey:"Shift+X"},{title:o("hotkeys:focusPrompt.title"),desc:o("hotkeys:focusPrompt.desc"),hotkey:"Alt+A"},{title:o("hotkeys:toggleOptions.title"),desc:o("hotkeys:toggleOptions.desc"),hotkey:"O"},{title:o("hotkeys:pinOptions.title"),desc:o("hotkeys:pinOptions.desc"),hotkey:"Shift+O"},{title:o("hotkeys:toggleViewer.title"),desc:o("hotkeys:toggleViewer.desc"),hotkey:"Z"},{title:o("hotkeys:toggleGallery.title"),desc:o("hotkeys:toggleGallery.desc"),hotkey:"G"},{title:o("hotkeys:maximizeWorkSpace.title"),desc:o("hotkeys:maximizeWorkSpace.desc"),hotkey:"F"},{title:o("hotkeys:changeTabs.title"),desc:o("hotkeys:changeTabs.desc"),hotkey:"1-5"},{title:o("hotkeys:consoleToggle.title"),desc:o("hotkeys:consoleToggle.desc"),hotkey:"`"}],s=[{title:o("hotkeys:setPrompt.title"),desc:o("hotkeys:setPrompt.desc"),hotkey:"P"},{title:o("hotkeys:setSeed.title"),desc:o("hotkeys:setSeed.desc"),hotkey:"S"},{title:o("hotkeys:setParameters.title"),desc:o("hotkeys:setParameters.desc"),hotkey:"A"},{title:o("hotkeys:restoreFaces.title"),desc:o("hotkeys:restoreFaces.desc"),hotkey:"Shift+R"},{title:o("hotkeys:upscale.title"),desc:o("hotkeys:upscale.desc"),hotkey:"Shift+U"},{title:o("hotkeys:showInfo.title"),desc:o("hotkeys:showInfo.desc"),hotkey:"I"},{title:o("hotkeys:sendToImageToImage.title"),desc:o("hotkeys:sendToImageToImage.desc"),hotkey:"Shift+I"},{title:o("hotkeys:deleteImage.title"),desc:o("hotkeys:deleteImage.desc"),hotkey:"Del"},{title:o("hotkeys:closePanels.title"),desc:o("hotkeys:closePanels.desc"),hotkey:"Esc"}],l=[{title:o("hotkeys:previousImage.title"),desc:o("hotkeys:previousImage.desc"),hotkey:"Arrow Left"},{title:o("hotkeys:nextImage.title"),desc:o("hotkeys:nextImage.desc"),hotkey:"Arrow Right"},{title:o("hotkeys:toggleGalleryPin.title"),desc:o("hotkeys:toggleGalleryPin.desc"),hotkey:"Shift+G"},{title:o("hotkeys:increaseGalleryThumbSize.title"),desc:o("hotkeys:increaseGalleryThumbSize.desc"),hotkey:"Shift+Up"},{title:o("hotkeys:decreaseGalleryThumbSize.title"),desc:o("hotkeys:decreaseGalleryThumbSize.desc"),hotkey:"Shift+Down"}],c=[{title:o("hotkeys:selectBrush.title"),desc:o("hotkeys:selectBrush.desc"),hotkey:"B"},{title:o("hotkeys:selectEraser.title"),desc:o("hotkeys:selectEraser.desc"),hotkey:"E"},{title:o("hotkeys:decreaseBrushSize.title"),desc:o("hotkeys:decreaseBrushSize.desc"),hotkey:"["},{title:o("hotkeys:increaseBrushSize.title"),desc:o("hotkeys:increaseBrushSize.desc"),hotkey:"]"},{title:o("hotkeys:decreaseBrushOpacity.title"),desc:o("hotkeys:decreaseBrushOpacity.desc"),hotkey:"Shift + ["},{title:o("hotkeys:increaseBrushOpacity.title"),desc:o("hotkeys:increaseBrushOpacity.desc"),hotkey:"Shift + ]"},{title:o("hotkeys:moveTool.title"),desc:o("hotkeys:moveTool.desc"),hotkey:"V"},{title:o("hotkeys:fillBoundingBox.title"),desc:o("hotkeys:fillBoundingBox.desc"),hotkey:"Shift + F"},{title:o("hotkeys:eraseBoundingBox.title"),desc:o("hotkeys:eraseBoundingBox.desc"),hotkey:"Delete / Backspace"},{title:o("hotkeys:colorPicker.title"),desc:o("hotkeys:colorPicker.desc"),hotkey:"C"},{title:o("hotkeys:toggleSnap.title"),desc:o("hotkeys:toggleSnap.desc"),hotkey:"N"},{title:o("hotkeys:quickToggleMove.title"),desc:o("hotkeys:quickToggleMove.desc"),hotkey:"Hold Space"},{title:o("hotkeys:toggleLayer.title"),desc:o("hotkeys:toggleLayer.desc"),hotkey:"Q"},{title:o("hotkeys:clearMask.title"),desc:o("hotkeys:clearMask.desc"),hotkey:"Shift+C"},{title:o("hotkeys:hideMask.title"),desc:o("hotkeys:hideMask.desc"),hotkey:"H"},{title:o("hotkeys:showHideBoundingBox.title"),desc:o("hotkeys:showHideBoundingBox.desc"),hotkey:"Shift+H"},{title:o("hotkeys:mergeVisible.title"),desc:o("hotkeys:mergeVisible.desc"),hotkey:"Shift+M"},{title:o("hotkeys:saveToGallery.title"),desc:o("hotkeys:saveToGallery.desc"),hotkey:"Shift+S"},{title:o("hotkeys:copyToClipboard.title"),desc:o("hotkeys:copyToClipboard.desc"),hotkey:"Ctrl+C"},{title:o("hotkeys:downloadImage.title"),desc:o("hotkeys:downloadImage.desc"),hotkey:"Shift+D"},{title:o("hotkeys:undoStroke.title"),desc:o("hotkeys:undoStroke.desc"),hotkey:"Ctrl+Z"},{title:o("hotkeys:redoStroke.title"),desc:o("hotkeys:redoStroke.desc"),hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:o("hotkeys:resetView.title"),desc:o("hotkeys:resetView.desc"),hotkey:"R"},{title:o("hotkeys:previousStagingImage.title"),desc:o("hotkeys:previousStagingImage.desc"),hotkey:"Arrow Left"},{title:o("hotkeys:nextStagingImage.title"),desc:o("hotkeys:nextStagingImage.desc"),hotkey:"Arrow Right"},{title:o("hotkeys:acceptStagingImage.title"),desc:o("hotkeys:acceptStagingImage.desc"),hotkey:"Enter"}],u=e=>{const t=[];return e.forEach(((e,n)=>{t.push(sd(p3,{title:e.title,description:e.desc,hotkey:e.hotkey},n))})),sd("div",{className:"hotkey-modal-category",children:t})};return ld(ad,{children:[i.exports.cloneElement(e,{onClick:n}),ld(IB,{isOpen:t,onClose:r,children:[sd(VB,{}),ld(HB,{className:" modal hotkeys-modal",children:[sd(NB,{className:"modal-close-btn"}),sd("h1",{children:"Keyboard Shorcuts"}),sd("div",{className:"hotkeys-modal-items",children:ld(cM,{allowMultiple:!0,children:[ld(sM,{children:[ld(tM,{className:"hotkeys-modal-button",children:[sd("h2",{children:o("hotkeys:appHotkeys")}),sd(aM,{})]}),sd(lM,{children:u(a)})]}),ld(sM,{children:[ld(tM,{className:"hotkeys-modal-button",children:[sd("h2",{children:o("hotkeys:generalHotkeys")}),sd(aM,{})]}),sd(lM,{children:u(s)})]}),ld(sM,{children:[ld(tM,{className:"hotkeys-modal-button",children:[sd("h2",{children:o("hotkeys:galleryHotkeys")}),sd(aM,{})]}),sd(lM,{children:u(l)})]}),ld(sM,{children:[ld(tM,{className:"hotkeys-modal-button",children:[sd("h2",{children:o("hotkeys:unifiedCanvasHotkeys")}),sd(aM,{})]}),sd(lM,{children:u(c)})]})]})})]})]})]})}const m3=e=>{const{isProcessing:t,isConnected:n}=c5((e=>e.system)),r=l5(),{name:o,status:i,description:a}=e,{t:s}=BZ();return ld("div",{className:"model-list-item",children:[sd(qH,{label:a,hasArrow:!0,placement:"bottom",children:sd("div",{className:"model-list-item-name",children:o})}),sd(DI,{}),sd("div",{className:`model-list-item-status ${i.split(" ").join("-")}`,children:i}),sd("div",{className:"model-list-item-load-btn",children:sd(IM,{size:"sm",onClick:()=>{r(SQ(o))},isDisabled:"active"===i||t||!n,children:s("common:load")})})]})},v3=c$((e=>e.system),(e=>{const t=OV.map(e.model_list,((e,t)=>({name:t,...e}))),n=t.find((e=>"active"===e.status));return{models:t,activeModel:n}})),y3=()=>{const{models:e}=c5(v3),{t:t}=BZ();return sd(cM,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ld(sM,{children:[sd(tM,{children:ld("div",{className:"model-list-button",children:[sd(WI,{fontSize:"sm",fontWeight:"bold",color:"var(--text-color-secondary)",children:t("settings:models")}),sd(aM,{})]})}),sd(lM,{children:sd("div",{className:"model-list-list",children:e.map(((e,t)=>sd(m3,{name:e.name,status:e.status,description:e.description},t)))})})]})})},b3=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:o,formLabelProps:i,styleClass:a,...s}=e;return ld(VM,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,display:"flex",columnGap:"1rem",alignItems:"center",justifyContent:"space-between",...o,children:[sd(JM,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",marginRight:0,marginTop:.5,marginBottom:.5,fontSize:"sm",fontWeight:"bold",width:"auto",...i,children:t}),sd(tH,{className:"invokeai__switch-root",...s})]})},x3=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:o,tooltipProps:i,size:a="sm",fontSize:s="sm",styleClass:l,...c}=e;return ld(VM,{isDisabled:n,className:`invokeai__select ${l}`,onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),e.nativeEvent.stopPropagation(),e.nativeEvent.cancelBubble=!0},children:[t&&sd(JM,{className:"invokeai__select-label",fontSize:s,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",children:t}),sd(qH,{label:o,...i,children:sd(nF,{className:"invokeai__select-picker",fontSize:s,size:a,...c,children:r.map((e=>"string"==typeof e||"number"==typeof e?sd("option",{value:e,className:"invokeai__select-option",children:e},e):sd("option",{value:e.value,className:"invokeai__select-option",children:e.key},e.value)))})})]})},w3=/^-?(0\.)?\.?$/,k3=e=>{const{label:t,labelFontSize:n="sm",styleClass:r,isDisabled:o=!1,showStepper:a=!0,width:s,textAlign:l,isInvalid:c,value:u,onChange:d,min:h,max:f,isInteger:p=!0,formControlProps:g,formLabelProps:m,numberInputFieldProps:v,numberInputStepperProps:y,tooltipProps:b,...x}=e,[w,k]=i.exports.useState(String(u));i.exports.useEffect((()=>{w.match(w3)||u===Number(w)||k(String(u))}),[u,w]);return sd(qH,{...b,children:ld(VM,{isDisabled:o,isInvalid:c,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...g,children:[t&&sd(JM,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",...m,children:t}),ld(hj,{className:"invokeai__number-input-root",value:w,keepWithinRange:!0,clampValueOnBlur:!1,onChange:e=>{k(e),e.match(w3)||d(p?Math.floor(Number(e)):Number(e))},onBlur:e=>{const t=OV.clamp(p?Math.floor(Number(e.target.value)):Number(e.target.value),h,f);k(String(t)),d(t)},width:s,...x,children:[sd(pj,{className:"invokeai__number-input-field",textAlign:l,...v}),a&&ld("div",{className:"invokeai__number-input-stepper",children:[sd(vj,{...y,className:"invokeai__number-input-stepper-button"}),sd(mj,{...y,className:"invokeai__number-input-stepper-button"})]})]})]})})},S3=e=>e.system,C3=e=>e.system.toastQueue,_3=c$((e=>e.options),(e=>EU[e.activeTab]),{memoizeOptions:{equalityCheck:OV.isEqual}});c$((e=>e.options),(e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});const E3=e=>e.options,L3=c$([S3,E3],((e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:o,model_list:i,saveIntermediatesInterval:a,enableImageDebugging:s}=e,{shouldUseCanvasBetaLayout:l}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:o,models:OV.map(i,((e,t)=>t)),saveIntermediatesInterval:a,enableImageDebugging:s,shouldUseCanvasBetaLayout:l}}),{memoizeOptions:{resultEqualityCheck:PV.exports.isEqual}}),P3=({children:e})=>{const t=l5(),{t:n}=BZ(),r=c5((e=>e.options.steps)),{isOpen:o,onOpen:a,onClose:s}=KA(),{isOpen:l,onOpen:c,onClose:u}=KA(),{shouldDisplayInProgressType:d,shouldConfirmOnDelete:h,shouldDisplayGuides:f,saveIntermediatesInterval:p,enableImageDebugging:g,shouldUseCanvasBetaLayout:m}=c5(L3);return ld(ad,{children:[i.exports.cloneElement(e,{onClick:a}),ld(IB,{isOpen:o,onClose:s,size:"lg",children:[sd(VB,{}),ld(HB,{className:"modal settings-modal",children:[sd($B,{className:"settings-modal-header",children:n("common:settingsLabel")}),sd(NB,{className:"modal-close-btn"}),ld(RB,{className:"settings-modal-content",children:[ld("div",{className:"settings-modal-items",children:[sd("div",{className:"settings-modal-item",children:sd(y3,{})}),ld("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[sd(x3,{label:n("settings:displayInProgress"),validValues:AQ,value:d,onChange:e=>t(FZ(e.target.value))}),"full-res"===d&&sd(k3,{label:n("settings:saveSteps"),min:1,max:r,step:1,onChange:e=>{e>r&&(e=r),e<1&&(e=1),t(oY(e))},value:p,width:"auto",textAlign:"center"})]}),sd(b3,{styleClass:"settings-modal-item",label:n("settings:confirmOnDelete"),isChecked:h,onChange:e=>t(GZ(e.target.checked))}),sd(b3,{styleClass:"settings-modal-item",label:n("settings:displayHelpIcons"),isChecked:f,onChange:e=>t(KZ(e.target.checked))}),sd(b3,{styleClass:"settings-modal-item",label:n("settings:useCanvasBeta"),isChecked:m,onChange:e=>t(EV(e.target.checked))})]}),ld("div",{className:"settings-modal-items",children:[sd("h2",{style:{fontWeight:"bold"},children:"Developer"}),sd(b3,{styleClass:"settings-modal-item",label:n("settings:enableImageDebugging"),isChecked:g,onChange:e=>t(iY(e.target.checked))})]}),ld("div",{className:"settings-modal-reset",children:[sd(LI,{size:"md",children:n("settings:resetWebUI")}),sd(IM,{colorScheme:"red",onClick:()=>{a5.purge().then((()=>{s(),c()}))},children:n("settings:resetWebUI")}),sd(WI,{children:n("settings:resetWebUIDesc1")}),sd(WI,{children:n("settings:resetWebUIDesc2")})]})]}),sd(WB,{children:sd(IM,{onClick:s,className:"modal-close-btn",children:n("common:close")})})]})]}),ld(IB,{closeOnOverlayClick:!1,isOpen:l,onClose:u,isCentered:!0,children:[sd(VB,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),sd(HB,{children:sd(RB,{pb:6,pt:6,children:sd(SI,{justifyContent:"center",children:sd(WI,{fontSize:"lg",children:sd(WI,{children:n("settings:resetComplete")})})})})})]})]})},O3=c$((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:PV.exports.isEqual}}),T3=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:o,hasError:i,wasErrorSeen:a}=c5(O3),s=l5(),{t:l}=BZ();let c;c=e&&!i?"status-good":"status-bad";let u=o;[l("common:statusGenerating"),l("common:statusPreparing"),l("common:statusSavingImage"),l("common:statusRestoringFaces"),l("common:statusUpscaling")].includes(u)&&(c="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`);return sd(qH,{label:i&&!a?"Click to clear, check logs for details":void 0,children:sd(WI,{cursor:i&&!a?"pointer":"initial",onClick:()=>{!i&&a||s(eY())},className:`status ${c}`,children:l(u)})})},M3=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:o=!0,...i}=e;return ld(Mj,{...i,children:[sd(Hj,{children:t}),ld(jj,{className:`invokeai__popover-content ${r}`,children:[o&&sd(Aj,{className:"invokeai__popover-arrow"}),n]})]})},A3=rk(((e,t)=>{const{children:n,tooltip:r="",tooltipProps:o,styleClass:i,...a}=e;return sd(qH,{label:r,...o,children:sd(IM,{ref:t,className:["invokeai__button",i].join(" "),...a,children:n})})}));function I3(){const{t:e}=BZ(),{setColorMode:t,colorMode:n}=ud(),r=l5(),o=c5((e=>e.options.currentTheme)),a={dark:e("common:darkTheme"),light:e("common:lightTheme"),green:e("common:greenTheme")};i.exports.useEffect((()=>{n!==o&&t(o)}),[t,n,o]);return sd(M3,{trigger:"hover",triggerComponent:sd(f3,{"aria-label":e("common:themeLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:sd(Y5,{})}),children:sd(HI,{align:"stretch",children:(()=>{const e=[];return Object.keys(a).forEach((t=>{e.push(sd(A3,{style:{width:"6rem"},leftIcon:o===t?sd(O5,{}):void 0,size:"sm",onClick:()=>(e=>{r(BU(e))})(t),children:a[t]},t))})),e})()})})}const R3=c$([S3],(e=>{const{isProcessing:t,model_list:n}=e,r=OV.map(n,((e,t)=>t)),o=OV.reduce(n,((e,t,n)=>("active"===t.status&&(e=n),e)),"");return{models:r,activeModel:o,isProcessing:t,activeDesc:n[o].description}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),N3=()=>{const e=l5(),{models:t,activeModel:n,isProcessing:r,activeDesc:o}=c5(R3);return sd(SI,{style:{paddingLeft:"0.3rem"},children:sd(x3,{style:{fontSize:"0.8rem"},tooltip:o,isDisabled:r,value:n,validValues:t,onChange:t=>{e(SQ(t.target.value))}})})};function D3(){const{t:e,i18n:t}=BZ(),n={en:e("common:langEnglish"),ru:e("common:langRussian"),it:e("common:langItalian"),pt_br:e("common:langBrPortuguese"),de:e("common:langGerman"),pl:e("common:langPolish")};return sd(M3,{trigger:"hover",triggerComponent:sd(f3,{"aria-label":e("common:languagePickerLabel"),tooltip:e("common:languagePickerLabel"),icon:sd(U5,{}),size:"sm",variant:"link","data-variant":"link",fontSize:26}),children:sd(HI,{children:(()=>{const e=[];return Object.keys(n).forEach((r=>{e.push(sd(A3,{"data-selected":localStorage.getItem("i18nextLng")===r,onClick:()=>t.changeLanguage(r),className:"modal-close-btn lang-select-btn","aria-label":n[r],tooltip:n[r],size:"sm",minWidth:"200px",children:n[r]},r))})),e})()})})}const z3=()=>{const{t:e}=BZ();return ld("div",{className:"site-header",children:[ld("div",{className:"site-header-left-side",children:[sd("img",{src:h3,alt:"invoke-ai-logo"}),ld("h1",{children:["invoke ",sd("strong",{children:"ai"})]})]}),ld("div",{className:"site-header-right-side",children:[sd(T3,{}),sd(N3,{}),sd(g3,{children:sd(f3,{"aria-label":e("common:hotkeysLabel"),tooltip:e("common:hotkeysLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:sd($5,{})})}),sd(I3,{}),sd(D3,{}),sd(f3,{"aria-label":e("common:reportBugLabel"),tooltip:e("common:reportBugLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:sd(OI,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:sd(P5,{})})}),sd(f3,{"aria-label":e("common:githubLabel"),tooltip:e("common:githubLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:sd(OI,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:sd(x5,{})})}),sd(f3,{"aria-label":e("common:discordLabel"),tooltip:e("common:discordLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:sd(OI,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:sd(b5,{})})}),sd(P3,{children:sd(f3,{"aria-label":e("common:settingsLabel"),tooltip:e("common:settingsLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:sd(d3,{})})})]})]})};var B3=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),j3=globalThis&&globalThis.__assign||function(){return j3=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},j3.apply(this,arguments)},F3={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},H3={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},W3={width:"20px",height:"20px",position:"absolute"},$3={top:j3(j3({},F3),{top:"-5px"}),right:j3(j3({},H3),{left:void 0,right:"-5px"}),bottom:j3(j3({},F3),{top:void 0,bottom:"-5px"}),left:j3(j3({},H3),{left:"-5px"}),topRight:j3(j3({},W3),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:j3(j3({},W3),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:j3(j3({},W3),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:j3(j3({},W3),{left:"-10px",top:"-10px",cursor:"nw-resize"})},U3=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return B3(t,e),t.prototype.render=function(){return sd("div",{className:this.props.className||"",style:j3(j3({position:"absolute",userSelect:"none"},$3[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(i.exports.PureComponent),V3=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),G3=globalThis&&globalThis.__assign||function(){return G3=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},G3.apply(this,arguments)},q3={width:"auto",height:"auto"},Z3=function(e,t,n){return Math.max(Math.min(e,n),t)},Y3=function(e,t){return Math.round(e/t)*t},X3=function(e,t){return new RegExp(e,"i").test(t)},K3=function(e){return Boolean(e.touches&&e.touches.length)},Q3=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},J3=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},e4=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},t4=["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"],n4="__resizable_base__",r4=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(n4):t.className+=n4,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.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},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return V3(t,e),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?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||q3},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return J3(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?J3(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?J3(t.height):n("height")}},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 e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},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 e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,a=o&&X3("left",i),s=o&&X3("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,a=o.original,s=this.props,l=s.lockAspectRatio,c=s.lockAspectRatioExtraHeight,u=s.lockAspectRatioExtraWidth,d=a.width,h=a.height,f=c||0,p=u||0;return X3("right",i)&&(d=a.width+(e-a.x)*r/n,l&&(h=(d-p)/this.ratio+f)),X3("left",i)&&(d=a.width-(e-a.x)*r/n,l&&(h=(d-p)/this.ratio+f)),X3("bottom",i)&&(h=a.height+(t-a.y)*r/n,l&&(d=(h-f)*this.ratio+p)),X3("top",i)&&(h=a.height-(t-a.y)*r/n,l&&(d=(h-f)*this.ratio+p)),{newWidth:d,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,h=a||0,f=s||0;if(i){var p=(u-h)*this.ratio+f,g=(d-h)*this.ratio+f,m=(l-f)/this.ratio+h,v=(c-f)/this.ratio+h,y=Math.max(l,p),b=Math.min(c,g),x=Math.max(u,m),w=Math.min(d,v);e=Z3(e,y,b),t=Z3(t,x,w)}else e=Z3(e,l,c),t=Z3(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,a=r.right,s=r.bottom;this.resizableLeft=o,this.resizableRight=a,this.resizableTop=i,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&K3(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:G3(G3({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&K3(e))try{e.preventDefault(),e.stopPropagation()}catch(T2){}var n=this.props,r=n.maxWidth,o=n.maxHeight,i=n.minWidth,a=n.minHeight,s=K3(e)?e.touches[0].clientX:e.clientX,l=K3(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,h=c.width,f=c.height,p=this.getParentSize(),g=function(e,t,n,r,o,i,a){return r=e4(r,e.width,t,n),o=e4(o,e.height,t,n),i=e4(i,e.width,t,n),a=e4(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}}(p,this.window.innerWidth,this.window.innerHeight,r,o,i,a);r=g.maxWidth,o=g.maxHeight,i=g.minWidth,a=g.minHeight;var m=this.calculateNewSizeFromDirection(s,l),v=m.newHeight,y=m.newWidth,b=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(y=Q3(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=Q3(v,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(y,v,{width:b.maxWidth,height:b.maxHeight},{width:i,height:a});if(y=x.newWidth,v=x.newHeight,this.props.grid){var w=Y3(y,this.props.grid[0]),k=Y3(v,this.props.grid[1]),S=this.props.snapGap||0;y=0===S||Math.abs(w-y)<=S?w:y,v=0===S||Math.abs(k-v)<=S?k:v}var C={width:y-d.width,height:v-d.height};if(h&&"string"==typeof h)if(h.endsWith("%"))y=y/p.width*100+"%";else if(h.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}if(f&&"string"==typeof f)if(f.endsWith("%"))v=v/p.height*100+"%";else if(f.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}var _={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?_.flexBasis=_.width:"column"===this.flexDir&&(_.flexBasis=_.height),$.exports.flushSync((function(){t.setState(_)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,C)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:G3(G3({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,i=t.handleWrapperStyle,a=t.handleWrapperClass,s=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?sd(U3,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t],children:s&&s[t]?s[t]:null},t):null}));return sd("div",{className:a,style:i,children:l})},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==t4.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=G3(G3(G3({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&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return ld(r,{...G3({ref:this.ref,style:n,className:this.props.className},t),children:[this.state.isResizing&&sd("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}(i.exports.PureComponent),o4=Object.create,i4=Object.defineProperty,a4=Object.getOwnPropertyDescriptor,s4=Object.getOwnPropertyNames,l4=Object.getPrototypeOf,c4=Object.prototype.hasOwnProperty,u4=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),d4=(e,t,n)=>(n=null!=e?o4(l4(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of s4(t))!c4.call(e,o)&&o!==n&&i4(e,o,{get:()=>t[o],enumerable:!(r=a4(t,o))||r.enumerable});return e})(!t&&e&&e.__esModule?n:i4(n,"default",{value:e,enumerable:!0}),e)),h4=u4(((e,t)=>{t.exports=function(){this.__data__=[],this.size=0}})),f4=u4(((e,t)=>{t.exports=function(e,t){return e===t||e!=e&&t!=t}})),p4=u4(((e,t)=>{var n=f4();t.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}})),g4=u4(((e,t)=>{var n=p4(),r=Array.prototype.splice;t.exports=function(e){var t=this.__data__,o=n(t,e);return!(o<0)&&(o==t.length-1?t.pop():r.call(t,o,1),--this.size,!0)}})),m4=u4(((e,t)=>{var n=p4();t.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}})),v4=u4(((e,t)=>{var n=p4();t.exports=function(e){return n(this.__data__,e)>-1}})),y4=u4(((e,t)=>{var n=p4();t.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}})),b4=u4(((e,t)=>{var n=h4(),r=g4(),o=m4(),i=v4(),a=y4();function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),x4=u4(((e,t)=>{var n=b4();t.exports=function(){this.__data__=new n,this.size=0}})),w4=u4(((e,t)=>{t.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}})),k4=u4(((e,t)=>{t.exports=function(e){return this.__data__.get(e)}})),S4=u4(((e,t)=>{t.exports=function(e){return this.__data__.has(e)}})),C4=u4(((e,t)=>{var n="object"==typeof global&&global&&global.Object===Object&&global;t.exports=n})),_4=u4(((e,t)=>{var n=C4(),r="object"==typeof self&&self&&self.Object===Object&&self,o=n||r||Function("return this")();t.exports=o})),E4=u4(((e,t)=>{var n=_4().Symbol;t.exports=n})),L4=u4(((e,t)=>{var n=E4(),r=Object.prototype,o=r.hasOwnProperty,i=r.toString,a=n?n.toStringTag:void 0;t.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch{}var s=i.call(e);return r&&(t?e[a]=n:delete e[a]),s}})),P4=u4(((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){return n.call(e)}})),O4=u4(((e,t)=>{var n=E4(),r=L4(),o=P4(),i=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?r(e):o(e)}})),T4=u4(((e,t)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}})),M4=u4(((e,t)=>{var n=O4(),r=T4();t.exports=function(e){if(!r(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}})),A4=u4(((e,t)=>{var n=_4()["__core-js_shared__"];t.exports=n})),I4=u4(((e,t)=>{var n=A4(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();t.exports=function(e){return!!r&&r in e}})),R4=u4(((e,t)=>{var n=Function.prototype.toString;t.exports=function(e){if(null!=e){try{return n.call(e)}catch{}try{return e+""}catch{}}return""}})),N4=u4(((e,t)=>{var n=M4(),r=I4(),o=T4(),i=R4(),a=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,u=l.hasOwnProperty,d=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(e){return!(!o(e)||r(e))&&(n(e)?d:a).test(i(e))}})),D4=u4(((e,t)=>{t.exports=function(e,t){return e?.[t]}})),z4=u4(((e,t)=>{var n=N4(),r=D4();t.exports=function(e,t){var o=r(e,t);return n(o)?o:void 0}})),B4=u4(((e,t)=>{var n=z4()(_4(),"Map");t.exports=n})),j4=u4(((e,t)=>{var n=z4()(Object,"create");t.exports=n})),F4=u4(((e,t)=>{var n=j4();t.exports=function(){this.__data__=n?n(null):{},this.size=0}})),H4=u4(((e,t)=>{t.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}})),W4=u4(((e,t)=>{var n=j4(),r=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;if(n){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(t,e)?t[e]:void 0}})),$4=u4(((e,t)=>{var n=j4(),r=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:r.call(t,e)}})),U4=u4(((e,t)=>{var n=j4();t.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}})),V4=u4(((e,t)=>{var n=F4(),r=H4(),o=W4(),i=$4(),a=U4();function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),G4=u4(((e,t)=>{var n=V4(),r=b4(),o=B4();t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||r),string:new n}}})),q4=u4(((e,t)=>{t.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}})),Z4=u4(((e,t)=>{var n=q4();t.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}})),Y4=u4(((e,t)=>{var n=Z4();t.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}})),X4=u4(((e,t)=>{var n=Z4();t.exports=function(e){return n(this,e).get(e)}})),K4=u4(((e,t)=>{var n=Z4();t.exports=function(e){return n(this,e).has(e)}})),Q4=u4(((e,t)=>{var n=Z4();t.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}})),J4=u4(((e,t)=>{var n=G4(),r=Y4(),o=X4(),i=K4(),a=Q4();function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=o,s.prototype.has=i,s.prototype.set=a,t.exports=s})),e6=u4(((e,t)=>{var n=b4(),r=B4(),o=J4();t.exports=function(e,t){var i=this.__data__;if(i instanceof n){var a=i.__data__;if(!r||a.length<199)return a.push([e,t]),this.size=++i.size,this;i=this.__data__=new o(a)}return i.set(e,t),this.size=i.size,this}})),t6=u4(((e,t)=>{var n=b4(),r=x4(),o=w4(),i=k4(),a=S4(),s=e6();function l(e){var t=this.__data__=new n(e);this.size=t.size}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=s,t.exports=l})),n6=u4(((e,t)=>{t.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}})),r6=u4(((e,t)=>{t.exports=function(e){return this.__data__.has(e)}})),o6=u4(((e,t)=>{var n=J4(),r=n6(),o=r6();function i(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}i.prototype.add=i.prototype.push=r,i.prototype.has=o,t.exports=i})),i6=u4(((e,t)=>{t.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}})),a6=u4(((e,t)=>{t.exports=function(e,t){return e.has(t)}})),s6=u4(((e,t)=>{var n=o6(),r=i6(),o=a6();t.exports=function(e,t,i,a,s,l){var c=1&i,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),f=l.get(t);if(h&&f)return h==t&&f==e;var p=-1,g=!0,m=2&i?new n:void 0;for(l.set(e,t),l.set(t,e);++p<u;){var v=e[p],y=t[p];if(a)var b=c?a(y,v,p,t,e,l):a(v,y,p,e,t,l);if(void 0!==b){if(b)continue;g=!1;break}if(m){if(!r(t,(function(e,t){if(!o(m,t)&&(v===e||s(v,e,i,a,l)))return m.push(t)}))){g=!1;break}}else if(v!==y&&!s(v,y,i,a,l)){g=!1;break}}return l.delete(e),l.delete(t),g}})),l6=u4(((e,t)=>{var n=_4().Uint8Array;t.exports=n})),c6=u4(((e,t)=>{t.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}})),u6=u4(((e,t)=>{t.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}})),d6=u4(((e,t)=>{var n=E4(),r=l6(),o=f4(),i=s6(),a=c6(),s=u6(),l=n?n.prototype:void 0,c=l?l.valueOf:void 0;t.exports=function(e,t,n,l,u,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new r(e),new r(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=a;case"[object Set]":var p=1&l;if(f||(f=s),e.size!=t.size&&!p)return!1;var g=h.get(e);if(g)return g==t;l|=2,h.set(e,t);var m=i(f(e),f(t),l,u,d,h);return h.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}})),h6=u4(((e,t)=>{t.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}})),f6=u4(((e,t)=>{var n=Array.isArray;t.exports=n})),p6=u4(((e,t)=>{var n=h6(),r=f6();t.exports=function(e,t,o){var i=t(e);return r(e)?i:n(i,o(e))}})),g6=u4(((e,t)=>{t.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}})),m6=u4(((e,t)=>{t.exports=function(){return[]}})),v6=u4(((e,t)=>{var n=g6(),r=m6(),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(e){return null==e?[]:(e=Object(e),n(i(e),(function(t){return o.call(e,t)})))}:r;t.exports=a})),y6=u4(((e,t)=>{t.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}})),b6=u4(((e,t)=>{t.exports=function(e){return null!=e&&"object"==typeof e}})),x6=u4(((e,t)=>{var n=O4(),r=b6();t.exports=function(e){return r(e)&&"[object Arguments]"==n(e)}})),w6=u4(((e,t)=>{var n=x6(),r=b6(),o=Object.prototype,i=o.hasOwnProperty,a=o.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(e){return r(e)&&i.call(e,"callee")&&!a.call(e,"callee")};t.exports=s})),k6=u4(((e,t)=>{t.exports=function(){return!1}})),S6=u4(((e,t)=>{var n=_4(),r=k6(),o="object"==typeof e&&e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;t.exports=s})),C6=u4(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;t.exports=function(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}})),_6=u4(((e,t)=>{t.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}})),E6=u4(((e,t)=>{var n=O4(),r=_6(),o=b6(),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,t.exports=function(e){return o(e)&&r(e.length)&&!!i[n(e)]}})),L6=u4(((e,t)=>{t.exports=function(e){return function(t){return e(t)}}})),P6=u4(((e,t)=>{var n=C4(),r="object"==typeof e&&e&&!e.nodeType&&e,o=r&&"object"==typeof t&&t&&!t.nodeType&&t,i=o&&o.exports===r&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch{}}();t.exports=a})),O6=u4(((e,t)=>{var n=E6(),r=L6(),o=P6(),i=o&&o.isTypedArray,a=i?r(i):n;t.exports=a})),T6=u4(((e,t)=>{var n=y6(),r=w6(),o=f6(),i=S6(),a=C6(),s=O6(),l=Object.prototype.hasOwnProperty;t.exports=function(e,t){var c=o(e),u=!c&&r(e),d=!c&&!u&&i(e),h=!c&&!u&&!d&&s(e),f=c||u||d||h,p=f?n(e.length,String):[],g=p.length;for(var m in e)(t||l.call(e,m))&&(!f||!("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g)))&&p.push(m);return p}})),M6=u4(((e,t)=>{var n=Object.prototype;t.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}})),A6=u4(((e,t)=>{t.exports=function(e,t){return function(n){return e(t(n))}}})),I6=u4(((e,t)=>{var n=A6()(Object.keys,Object);t.exports=n})),R6=u4(((e,t)=>{var n=M6(),r=I6(),o=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return r(e);var t=[];for(var i in Object(e))o.call(e,i)&&"constructor"!=i&&t.push(i);return t}})),N6=u4(((e,t)=>{var n=M4(),r=_6();t.exports=function(e){return null!=e&&r(e.length)&&!n(e)}})),D6=u4(((e,t)=>{var n=T6(),r=R6(),o=N6();t.exports=function(e){return o(e)?n(e):r(e)}})),z6=u4(((e,t)=>{var n=p6(),r=v6(),o=D6();t.exports=function(e){return n(e,o,r)}})),B6=u4(((e,t)=>{var n=z6(),r=Object.prototype.hasOwnProperty;t.exports=function(e,t,o,i,a,s){var l=1&o,c=n(e),u=c.length;if(u!=n(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:r.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=l;++d<u;){var v=e[h=c[d]],y=t[h];if(i)var b=l?i(y,v,h,t,e,s):i(v,y,h,e,t,s);if(!(void 0===b?v===y||a(v,y,o,i,s):b)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var x=e.constructor,w=t.constructor;x!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(e),s.delete(t),g}})),j6=u4(((e,t)=>{var n=z4()(_4(),"DataView");t.exports=n})),F6=u4(((e,t)=>{var n=z4()(_4(),"Promise");t.exports=n})),H6=u4(((e,t)=>{var n=z4()(_4(),"Set");t.exports=n})),W6=u4(((e,t)=>{var n=z4()(_4(),"WeakMap");t.exports=n})),$6=u4(((e,t)=>{var n=j6(),r=B4(),o=F6(),i=H6(),a=W6(),s=O4(),l=R4(),c="[object Map]",u="[object Promise]",d="[object Set]",h="[object WeakMap]",f="[object DataView]",p=l(n),g=l(r),m=l(o),v=l(i),y=l(a),b=s;(n&&b(new n(new ArrayBuffer(1)))!=f||r&&b(new r)!=c||o&&b(o.resolve())!=u||i&&b(new i)!=d||a&&b(new a)!=h)&&(b=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case p:return f;case g:return c;case m:return u;case v:return d;case y:return h}return t}),t.exports=b})),U6=u4(((e,t)=>{var n=t6(),r=s6(),o=d6(),i=B6(),a=$6(),s=f6(),l=S6(),c=O6(),u="[object Arguments]",d="[object Array]",h="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(e,t,p,g,m,v){var y=s(e),b=s(t),x=y?d:a(e),w=b?d:a(t),k=(x=x==u?h:x)==h,S=(w=w==u?h:w)==h,C=x==w;if(C&&l(e)){if(!l(t))return!1;y=!0,k=!1}if(C&&!k)return v||(v=new n),y||c(e)?r(e,t,p,g,m,v):o(e,t,x,p,g,m,v);if(!(1&p)){var _=k&&f.call(e,"__wrapped__"),E=S&&f.call(t,"__wrapped__");if(_||E){var L=_?e.value():e,P=E?t.value():t;return v||(v=new n),m(L,P,p,g,v)}}return!!C&&(v||(v=new n),i(e,t,p,g,m,v))}})),V6=u4(((e,t)=>{var n=U6(),r=b6();t.exports=function e(t,o,i,a,s){return t===o||(null==t||null==o||!r(t)&&!r(o)?t!=t&&o!=o:n(t,o,i,a,e,s))}})),G6=u4(((e,t)=>{var n=V6();t.exports=function(e,t){return n(e,t)}})),q6=["ctrl","shift","alt","meta","mod"],Z6={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Y6(e,t=","){return"string"==typeof e?e.split(t):e}function X6(e,t="+"){let n=e.toLocaleLowerCase().split(t).map((e=>e.trim())).map((e=>Z6[e]||e)),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},o=n.filter((e=>!q6.includes(e)));return{...r,keys:o}}function K6({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some((e=>e.toLowerCase()===n.toLowerCase()))):Boolean(n&&t&&!0===t)}var Q6=i.exports.createContext(void 0),J6=i.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),e7=d4(G6());var t7=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function n7(e,t,n,r){let o=i.exports.useRef(null),{current:a}=i.exports.useRef(new Set),s=n instanceof Array?r instanceof Array?void 0:r:n,l=n instanceof Array?n:r instanceof Array?r:[],c=i.exports.useCallback(t,[...l]),u=function(e){let t=i.exports.useRef(void 0);return(0,e7.default)(t.current,e)||(t.current=e),t.current}(s),{enabledScopes:d}=i.exports.useContext(J6),h=i.exports.useContext(Q6);return i.exports.useLayoutEffect((()=>{if(!1===u?.enabled||!function(e,t){return 0===e.length&&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 <HotkeysProvider>'),!0):!t||e.some((e=>t.includes(e)))||e.includes("*")}(d,u?.scopes))return;let t=t=>{if(!function(e){return K6(e,["input","textarea","select"])}(t)||K6(t,u?.enableOnFormTags)){if(null!==o.current&&document.activeElement!==o.current&&!o.current.contains(document.activeElement))return void t7(t);t.target?.isContentEditable&&!u?.enableOnContentEditable||Y6(e,u?.splitKey).forEach((e=>{let n=X6(e,u?.combinationKey);if(((e,t,n)=>{let{alt:r,ctrl:o,meta:i,mod:a,shift:s,keys:l}=t,{altKey:c,ctrlKey:u,metaKey:d,shiftKey:h,key:f,code:p}=e,g=p.toLowerCase().replace("key",""),m=f.toLowerCase();if(c!==r&&"alt"!==m||h!==s&&"shift"!==m)return!1;if(a){if(!d&&!u)return!1}else if(d!==i&&"meta"!==g||u!==o&&"ctrl"!==g)return!1;return!(!l||1!==l.length||!l.includes(m)&&!l.includes(g))||(l?l.every((e=>n.has(e))):!l)})(t,n,a)||n.keys?.includes("*")){if(function(e,t,n){("function"==typeof n&&n(e,t)||!0===n)&&e.preventDefault()}(t,n,u?.preventDefault),!function(e,t,n){return"function"==typeof n?n(e,t):!0===n||void 0===n}(t,n,u?.enabled))return void t7(t);c(t,n)}}))}},n=e=>{a.add(e.key.toLowerCase()),(void 0===u?.keydown&&!0!==u?.keyup||u?.keydown)&&t(e)},r=e=>{"meta"!==e.key.toLowerCase()?a.delete(e.key.toLowerCase()):a.clear(),u?.keyup&&t(e)};return(o.current||document).addEventListener("keyup",r),(o.current||document).addEventListener("keydown",n),h&&Y6(e,u?.splitKey).forEach((e=>h.addHotkey(X6(e,u?.combinationKey)))),()=>{(o.current||document).removeEventListener("keyup",r),(o.current||document).removeEventListener("keydown",n),h&&Y6(e,u?.splitKey).forEach((e=>h.removeHotkey(X6(e,u?.combinationKey))))}}),[e,c,u,d]),o}d4(G6());var r7=new Set;window.addEventListener("DOMContentLoaded",(()=>{document.addEventListener("keydown",(e=>{!function(e){(Array.isArray(e)?e:[e]).forEach((e=>r7.add(X6(e))))}(e.key)})),document.addEventListener("keyup",(e=>{!function(e){(Array.isArray(e)?e:[e]).forEach((e=>{let t=X6(e);for(let n of r7)n.keys?.every((e=>t.keys?.includes(e)))&&r7.delete(n)}))}(e.key)}))}));const o7=c$((e=>e.system),(e=>e.log),{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),i7=c$((e=>e.system),(e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen})),{memoizeOptions:{resultEqualityCheck:PV.exports.isEqual}}),a7=()=>{const e=l5(),t=c5(o7),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:o}=c5(i7),[a,s]=i.exports.useState(!0),l=i.exports.useRef(null);i.exports.useLayoutEffect((()=>{null!==l.current&&a&&(l.current.scrollTop=l.current.scrollHeight)}),[a,t,n]);n7("`",(()=>{e($Z(!n))}),[n]),n7("esc",(()=>{e($Z(!1))}));return ld(ad,{children:[n&&sd(r4,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:sd("div",{className:"console",ref:l,onScroll:()=>{l.current&&a&&l.current.scrollTop<l.current.scrollHeight-l.current.clientHeight&&s(!1)},children:t.map(((e,t)=>{const{timestamp:n,message:r,level:o}=e;return ld("div",{className:`console-entry console-${o}-color`,children:[ld("p",{className:"console-timestamp",children:[n,":"]}),sd("p",{className:"console-message",children:r})]},t)}))})}),n&&sd(qH,{hasArrow:!0,label:a?"Autoscroll On":"Autoscroll Off",children:sd(DM,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":a,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:sd(w5,{}),onClick:()=>s(!a)})}),sd(qH,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:sd(DM,{className:"console-toggle-icon-button","data-error-seen":r||!o,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:sd(n?q5:T5,{}),onClick:()=>{e(eY()),e($Z(!n))}})})]})};function s7(){const{t:e}=BZ();return ld("div",{className:"work-in-progress nodes-work-in-progress",children:[sd("h1",{children:e("common:nodes")}),sd("p",{children:e("common:nodesDesc")})]})}const l7=()=>{const{t:e}=BZ();return ld("div",{className:"work-in-progress post-processing-work-in-progress",children:[sd("h1",{children:e("common:postProcessing")}),sd("p",{children:e("common:postProcessDesc1")}),sd("p",{children:e("common:postProcessDesc2")}),sd("p",{children:e("common:postProcessDesc3")})]})},c7=kk({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:sd("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:sd("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"})})}),u7=kk({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:sd("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"})}),d7=kk({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:sd("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"})}),h7=kk({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:sd("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:sd("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 f7=(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))(f7||{});const p7={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"}},g7=c$((e=>e.options),(e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity})),{memoizeOptions:{resultEqualityCheck:PV.exports.isEqual}}),m7=c$((e=>e.system),(e=>({isGFPGANAvailable:e.isGFPGANAvailable})),{memoizeOptions:{resultEqualityCheck:PV.exports.isEqual}}),v7=()=>{const e=l5(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=c5(g7),{isGFPGANAvailable:o}=c5(m7),{t:i}=BZ();return ld(SI,{direction:"column",gap:2,children:[sd(x3,{label:i("options:type"),validValues:MQ.concat(),value:n,onChange:t=>e(FU(t.target.value))}),sd(k3,{isDisabled:!o,label:i("options:strength"),step:.05,min:0,max:1,onChange:t=>e(jU(t)),value:t,width:"90px",isInteger:!1}),"codeformer"===n&&sd(k3,{isDisabled:!o,label:i("options:codeformerFidelity"),step:.05,min:0,max:1,onChange:t=>e(zU(t)),value:r,width:"90px",isInteger:!1})]})};function y7(){const e=c5((e=>e.system.isGFPGANAvailable)),t=c5((e=>e.options.shouldRunFacetool)),n=l5();return sd(b3,{isDisabled:!e,isChecked:t,onChange:e=>n(pV(e.target.checked))})}function b7(){const e=l5(),t=c5((e=>e.options.shouldFitToWidthHeight)),{t:n}=BZ();return sd(b3,{label:n("options:imageFit"),isChecked:t,onChange:t=>e(sV(t.target.checked))})}function x7(e){return v5({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z"}},{tag:"path",attr:{d:"m11 16 5-4-5-4v3.001H3v2h8z"}}]})(e)}function w7(e){return v5({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 k7(e){return v5({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6.758 8.758 5.344 7.344a8.048 8.048 0 0 0-1.841 2.859l1.873.701a6.048 6.048 0 0 1 1.382-2.146zM19 12.999a7.935 7.935 0 0 0-2.344-5.655A7.917 7.917 0 0 0 12 5.069V2L7 6l5 4V7.089a5.944 5.944 0 0 1 3.242 1.669A5.956 5.956 0 0 1 17 13v.002c0 .33-.033.655-.086.977-.007.043-.011.088-.019.131a6.053 6.053 0 0 1-1.138 2.536c-.16.209-.331.412-.516.597a5.954 5.954 0 0 1-.728.613 5.906 5.906 0 0 1-2.277 1.015c-.142.03-.285.05-.43.069-.062.009-.122.021-.184.027a6.104 6.104 0 0 1-1.898-.103L9.3 20.819a8.087 8.087 0 0 0 2.534.136c.069-.007.138-.021.207-.03.205-.026.409-.056.61-.098l.053-.009-.001-.005a7.877 7.877 0 0 0 2.136-.795l.001.001.028-.019a7.906 7.906 0 0 0 1.01-.67c.27-.209.532-.43.777-.675.248-.247.47-.513.681-.785.021-.028.049-.053.07-.081l-.006-.004a7.899 7.899 0 0 0 1.093-1.997l.008.003c.029-.078.05-.158.076-.237.037-.11.075-.221.107-.333.04-.14.073-.281.105-.423.022-.099.048-.195.066-.295.032-.171.056-.344.076-.516.01-.076.023-.15.03-.227.023-.249.037-.5.037-.753.002-.002.002-.004.002-.008zM6.197 16.597l-1.6 1.201a8.045 8.045 0 0 0 2.569 2.225l.961-1.754a6.018 6.018 0 0 1-1.93-1.672zM5 13c0-.145.005-.287.015-.429l-1.994-.143a7.977 7.977 0 0 0 .483 3.372l1.873-.701A5.975 5.975 0 0 1 5 13z"}}]})(e)}function S7(e){return v5({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.242 17.242a6.04 6.04 0 0 1-1.37 1.027l.961 1.754a8.068 8.068 0 0 0 2.569-2.225l-1.6-1.201a5.938 5.938 0 0 1-.56.645zm1.743-4.671a5.975 5.975 0 0 1-.362 2.528l1.873.701a7.977 7.977 0 0 0 .483-3.371l-1.994.142zm1.512-2.368a8.048 8.048 0 0 0-1.841-2.859l-1.414 1.414a6.071 6.071 0 0 1 1.382 2.146l1.873-.701zm-8.128 8.763c-.047-.005-.094-.015-.141-.021a6.701 6.701 0 0 1-.468-.075 5.923 5.923 0 0 1-2.421-1.122 5.954 5.954 0 0 1-.583-.506 6.138 6.138 0 0 1-.516-.597 5.91 5.91 0 0 1-.891-1.634 6.086 6.086 0 0 1-.247-.902c-.008-.043-.012-.088-.019-.131A6.332 6.332 0 0 1 6 13.002V13c0-1.603.624-3.109 1.758-4.242A5.944 5.944 0 0 1 11 7.089V10l5-4-5-4v3.069a7.917 7.917 0 0 0-4.656 2.275A7.936 7.936 0 0 0 4 12.999v.009c0 .253.014.504.037.753.007.076.021.15.03.227.021.172.044.345.076.516.019.1.044.196.066.295.032.142.065.283.105.423.032.112.07.223.107.333.026.079.047.159.076.237l.008-.003A7.948 7.948 0 0 0 5.6 17.785l-.007.005c.021.028.049.053.07.081.211.272.433.538.681.785a8.236 8.236 0 0 0 .966.816c.265.192.537.372.821.529l.028.019.001-.001a7.877 7.877 0 0 0 2.136.795l-.001.005.053.009c.201.042.405.071.61.098.069.009.138.023.207.03a8.038 8.038 0 0 0 2.532-.137l-.424-1.955a6.11 6.11 0 0 1-1.904.102z"}}]})(e)}function C7(e){return v5({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11 6H9v3H6v2h3v3h2v-3h3V9h-3z"}},{tag:"path",attr:{d:"M10 2c-4.411 0-8 3.589-8 8s3.589 8 8 8a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8zm0 14c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"}}]})(e)}function _7(e){return v5({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6 9h8v2H6z"}},{tag:"path",attr:{d:"M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z"}}]})(e)}function E7(e){const[t,n]=i.exports.useState(!1),{label:r,value:o,min:a=1,max:s=100,step:l=1,onChange:c,width:u="100%",tooltipSuffix:d="",withSliderMarks:h=!1,sliderMarkLeftOffset:f=0,sliderMarkRightOffset:p=-7,withInput:g=!1,isInteger:m=!1,inputWidth:v="5rem",inputReadOnly:y=!0,withReset:b=!1,hideTooltip:x=!1,isCompact:w=!1,handleReset:k,isResetDisabled:S,isSliderDisabled:C,isInputDisabled:_,styleClass:E,sliderFormControlProps:L,sliderFormLabelProps:P,sliderMarkProps:O,sliderTrackProps:T,sliderThumbProps:M,sliderNumberInputProps:A,sliderNumberInputFieldProps:I,sliderNumberInputStepperProps:R,sliderTooltipProps:N,sliderIAIIconButtonProps:D,...z}=e,[B,j]=i.exports.useState(String(o)),F=i.exports.useMemo((()=>A?.max?A.max:s),[s,A?.max]);i.exports.useEffect((()=>{String(o)!==B&&""!==B&&j(String(o))}),[o,B,j]);const H=e=>{j(String(e)),c(Number(e))};return ld(VM,{className:E?`invokeai__slider-component ${E}`:"invokeai__slider-component","data-markers":h,style:w?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:"1rem",margin:0,padding:0}:{},...L,children:[sd(JM,{className:"invokeai__slider-component-label",...P,children:r}),ld(FI,{w:"100%",gap:2,alignItems:"center",children:[ld(ZF,{"aria-label":r,value:o,min:a,max:s,step:l,onChange:H,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:C,width:u,...z,children:[h&&ld(ad,{children:[sd(QF,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:f,...O,children:a}),sd(QF,{value:s,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:p,...O,children:s})]}),sd(XF,{className:"invokeai__slider_track",...T,children:sd(KF,{className:"invokeai__slider_track-filled"})}),sd(qH,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${o}${d}`,hidden:x,...N,children:sd(YF,{className:"invokeai__slider-thumb",...M})})]}),g&&ld(hj,{min:a,max:F,step:l,value:B,onChange:H,onBlur:e=>{const t=OV.clamp(m?Math.floor(Number(e.target.value)):Number(e.target.value),a,F);j(String(t)),c(t)},className:"invokeai__slider-number-field",isDisabled:_,...A,children:[sd(pj,{className:"invokeai__slider-number-input",width:v,readOnly:y,...I}),ld(fj,{...R,children:[sd(vj,{className:"invokeai__slider-number-stepper"}),sd(mj,{className:"invokeai__slider-number-stepper"})]})]}),b&&sd(f3,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:sd(w7,{}),onClick:()=>{k&&k()},isDisabled:S,...D})]})]})}function L7(e){const{t:t}=BZ(),{label:n=`${t("options:strength")}`,styleClass:r}=e,o=c5((e=>e.options.img2imgStrength)),i=l5();return sd(E7,{label:n,step:.01,min:.01,max:.99,onChange:e=>i($U(e)),value:o,isInteger:!1,styleClass:r,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i($U(.75))}})}const P7=()=>{const e=l5(),t=c5((e=>e.options.seamless)),{t:n}=BZ();return sd(SI,{gap:2,direction:"column",children:sd(b3,{label:n("options:seamlessTiling"),fontSize:"md",isChecked:t,onChange:t=>e(tV(t.target.checked))})})},O7=()=>sd(SI,{gap:2,direction:"column",children:sd(P7,{})});function T7(){const e=l5(),{t:t}=BZ(),n=c5((e=>e.options.shouldRandomizeSeed));return sd(b3,{label:t("options:randomizeSeed"),isChecked:n,onChange:t=>e(hV(t.target.checked))})}function M7(){const e=c5((e=>e.options.seed)),t=c5((e=>e.options.shouldRandomizeSeed)),n=c5((e=>e.options.shouldGenerateVariations)),{t:r}=BZ(),o=l5();return sd(k3,{label:r("options:seed"),step:1,precision:0,flexGrow:1,min:0,max:TQ,isDisabled:t,isInvalid:e<0&&n,onChange:e=>o(iV(e)),value:e,width:"10rem"})}function A7(){const e=l5(),t=c5((e=>e.options.shouldRandomizeSeed)),{t:n}=BZ();return sd(IM,{size:"sm",isDisabled:t,onClick:()=>e(iV(IQ(0,TQ))),children:sd("p",{children:n("options:shuffle")})})}function I7(){const e=l5(),t=c5((e=>e.options.threshold)),{t:n}=BZ();return sd(k3,{label:n("options:noiseThreshold"),min:0,max:1e3,step:.1,onChange:t=>e(xV(t)),value:t,isInteger:!1})}function R7(){const e=l5(),t=c5((e=>e.options.perlin)),{t:n}=BZ();return sd(k3,{label:n("options:perlinNoise"),min:0,max:1,step:.05,onChange:t=>e(KU(t)),value:t,isInteger:!1})}const N7=()=>ld(SI,{gap:2,direction:"column",children:[sd(T7,{}),ld(SI,{gap:2,children:[sd(M7,{}),sd(A7,{})]}),sd(SI,{gap:2,children:sd(I7,{})}),sd(SI,{gap:2,children:sd(R7,{})})]}),D7=c$((e=>e.options),(e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength})),{memoizeOptions:{resultEqualityCheck:PV.exports.isEqual}}),z7=c$((e=>e.system),(e=>({isESRGANAvailable:e.isESRGANAvailable})),{memoizeOptions:{resultEqualityCheck:PV.exports.isEqual}}),B7=()=>{const e=l5(),{upscalingLevel:t,upscalingStrength:n}=c5(D7),{isESRGANAvailable:r}=c5(z7),{t:o}=BZ();return ld("div",{className:"upscale-options",children:[sd(x3,{isDisabled:!r,label:o("options:scale"),value:t,onChange:t=>e(kV(Number(t.target.value))),validValues:OQ}),sd(k3,{isDisabled:!r,label:o("options:strength"),step:.05,min:0,max:1,onChange:t=>e(SV(t)),value:n,isInteger:!1})]})};function j7(){const e=c5((e=>e.system.isESRGANAvailable)),t=c5((e=>e.options.shouldRunESRGAN)),n=l5();return sd(b3,{isDisabled:!e,isChecked:t,onChange:e=>n(fV(e.target.checked))})}function F7(){const e=c5((e=>e.options.shouldGenerateVariations)),t=l5();return sd(b3,{isChecked:e,width:"auto",onChange:e=>t(lV(e.target.checked))})}function H7(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:o="sm",width:i,isInvalid:a,...s}=e;return ld(VM,{className:`input ${n}`,isInvalid:a,isDisabled:r,children:[sd(JM,{fontSize:o,fontWeight:"bold",alignItems:"center",whiteSpace:"nowrap",marginBottom:0,marginRight:0,className:"input-label",children:t}),sd(JA,{...s,className:"input-entry",size:"sm",width:i})]})}function W7(){const e=c5((e=>e.options.seedWeights)),t=c5((e=>e.options.shouldGenerateVariations)),{t:n}=BZ(),r=l5();return sd(H7,{label:n("options:seedWeights"),value:e,isInvalid:t&&!(CU(e)||""===e),isDisabled:!t,onChange:e=>r(aV(e.target.value))})}function $7(){const e=c5((e=>e.options.variationAmount)),t=c5((e=>e.options.shouldGenerateVariations)),{t:n}=BZ(),r=l5();return sd(k3,{label:n("options:variationAmount"),value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:e=>r(CV(e)),isInteger:!1})}const U7=()=>ld(SI,{gap:2,direction:"column",children:[sd($7,{}),sd(W7,{})]});function V7(){const e=l5(),t=c5((e=>e.options.cfgScale)),{t:n}=BZ();return sd(k3,{label:n("options:cfgScale"),step:.5,min:1.01,max:200,onChange:t=>e(DU(t)),value:t,width:"auto",styleClass:"main-option-block",textAlign:"center",isInteger:!1})}function G7(){const e=c5((e=>e.options.height)),t=c5(_3),n=l5(),{t:r}=BZ();return sd(x3,{isDisabled:"unifiedCanvas"===t,label:r("options:height"),value:e,flexGrow:1,onChange:e=>n(HU(Number(e.target.value))),validValues:PQ,styleClass:"main-option-block"})}const q7=c$([e=>e.options],(e=>{const{iterations:t}=e;return{iterations:t}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});function Z7(){const e=l5(),{iterations:t}=c5(q7),{t:n}=BZ();return sd(k3,{label:n("options:images"),step:1,min:1,max:9999,onChange:t=>e(qU(t)),value:t,width:"auto",labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function Y7(){const e=c5((e=>e.options.sampler)),t=l5(),{t:n}=BZ();return sd(x3,{label:n("options:sampler"),value:e,onChange:e=>t(JU(e.target.value)),validValues:EQ,styleClass:"main-option-block"})}function X7(){const e=l5(),t=c5((e=>e.options.steps)),{t:n}=BZ();return sd(k3,{label:n("options:steps"),min:1,max:9999,step:1,onChange:t=>e(bV(t)),value:t,width:"auto",styleClass:"main-option-block",textAlign:"center"})}function K7(){const e=c5((e=>e.options.width)),t=c5(_3),{t:n}=BZ(),r=l5();return sd(x3,{isDisabled:"unifiedCanvas"===t,label:n("options:width"),value:e,flexGrow:1,onChange:e=>r(_V(Number(e.target.value))),validValues:LQ,styleClass:"main-option-block"})}function Q7(){return sd("div",{className:"main-options",children:ld("div",{className:"main-options-list",children:[ld("div",{className:"main-options-row",children:[sd(Z7,{}),sd(X7,{}),sd(V7,{})]}),ld("div",{className:"main-options-row",children:[sd(K7,{}),sd(G7,{}),sd(Y7,{})]})]})})}function J7(e){return v5({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 e9(e){return v5({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 t9(e){return v5({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 n9(e){return v5({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 r9(e){return v5({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 o9=c$((e=>e.system),(e=>e.shouldDisplayGuides)),i9=({children:e,feature:t})=>{const n=c5(o9),{text:r}=p7[t];return n?ld(Mj,{trigger:"hover",children:[sd(Hj,{children:sd(gI,{children:e})}),ld(jj,{className:"guide-popover-content",maxWidth:"400px",onClick:e=>e.preventDefault(),cursor:"initial",children:[sd(Aj,{className:"guide-popover-arrow"}),sd("div",{className:"guide-popover-guide-content",children:r})]})]}):null},a9=rk((({feature:e,icon:t=J7},n)=>sd(i9,{feature:e,children:sd(gI,{ref:n,children:sd(wk,{marginBottom:"-.15rem",as:t})})})));function s9(e){const{header:t,feature:n,content:r,additionalHeaderComponents:o}=e;return ld(sM,{className:"advanced-settings-item",children:[sd(tM,{className:"advanced-settings-header",children:ld(SI,{width:"100%",gap:"0.5rem",align:"center",children:[sd(gI,{flexGrow:1,textAlign:"left",children:t}),o,n&&sd(a9,{feature:n}),sd(aM,{})]})}),sd(lM,{className:"advanced-settings-panel",children:r})]})}const l9=e=>{const{accordionInfo:t}=e,n=c5((e=>e.system.openAccordions)),r=l5();return sd(cM,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:e=>r(qZ(e)),className:"advanced-settings",children:(()=>{const e=[];return t&&Object.keys(t).forEach((n=>{const{header:r,feature:o,content:i,additionalHeaderComponents:a}=t[n];e.push(sd(s9,{header:r,feature:o,content:i,additionalHeaderComponents:a},n))})),e})()})},c9=e=>e.canvas,u9=c$([c9,_3,S3],((e,t,n)=>e.layerState.stagingArea.images.length>0||"unifiedCanvas"===t&&n.isProcessing)),d9=e=>e.canvas.layerState.objects.find(wY),h9=c$([e=>e.options,e=>e.system,d9,_3],((e,t,n,r)=>{const{prompt:o,shouldGenerateVariations:i,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:c,isConnected:u}=t;let d=!0;const h=[];return o&&!Boolean(o.match(/^[\s\r\n]+$/))||(d=!1,h.push("Missing prompt")),"img2img"!==r||s||(d=!1,h.push("No initial image selected")),c&&(d=!1,h.push("System Busy")),u||(d=!1,h.push("System Disconnected")),i&&(!CU(a)&&""!==a||-1===l)&&(d=!1,h.push("Seed-Weights badly formatted.")),{isReady:d,reasonsWhyNotReady:h}}),{memoizeOptions:{equalityCheck:OV.isEqual,resultEqualityCheck:OV.isEqual}});function f9(e){const{iconButton:t=!1,...n}=e,r=l5(),{isReady:o}=c5(h9),i=c5(_3),a=()=>{r(gQ(i))},{t:s}=BZ();return n7(["ctrl+enter","meta+enter"],(()=>{r(gQ(i))}),{enabled:()=>o,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[o,i]),sd("div",{style:{flexGrow:4},children:t?sd(f3,{"aria-label":s("options:invoke"),type:"submit",icon:sd(X5,{}),isDisabled:!o,onClick:a,className:"invoke-btn",tooltip:s("options:invoke"),tooltipProps:{placement:"bottom"},...n}):sd(A3,{"aria-label":s("options:invoke"),type:"submit",isDisabled:!o,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const p9=c$((e=>e.system),(e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable})),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});function g9(e){const{...t}=e,n=l5(),{isProcessing:r,isConnected:o,isCancelable:i}=c5(p9),a=()=>n(wQ()),{t:s}=BZ();return n7("shift+x",(()=>{(o||r)&&i&&a()}),[o,r,i]),sd(f3,{icon:sd(r9,{}),tooltip:s("options:cancel"),"aria-label":s("options:cancel"),isDisabled:!o||!r||!i,onClick:a,styleClass:"cancel-btn",...t})}const m9=c$((e=>e.options),(e=>e.shouldLoopback)),v9=()=>{const e=l5(),t=c5(m9),{t:n}=BZ();return sd(f3,{"aria-label":n("options:toggleLoopback"),tooltip:n("options:toggleLoopback"),styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:sd(J5,{}),onClick:()=>{e(uV(!t))}})},y9=()=>{const e=c5(_3);return ld("div",{className:"process-buttons",children:[sd(f9,{}),"img2img"===e&&sd(v9,{}),sd(g9,{})]})},b9=c$([e=>e.options,_3],((e,t)=>({prompt:e.prompt,activeTabName:t})),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),x9=()=>{const e=l5(),{prompt:t,activeTabName:n}=c5(b9),{isReady:r}=c5(h9),o=i.exports.useRef(null),{t:a}=BZ();n7("alt+a",(()=>{o.current?.focus()}),[]);return sd("div",{className:"prompt-bar",children:sd(VM,{isInvalid:0===t.length||Boolean(t.match(/^[\s\r\n]+$/)),children:sd(CH,{id:"prompt",name:"prompt",placeholder:a("options:promptPlaceholder"),size:"lg",value:t,onChange:t=>{e(QU(t.target.value))},onKeyDown:t=>{"Enter"===t.key&&!1===t.shiftKey&&r&&(t.preventDefault(),e(gQ(n)))},resize:"vertical",height:30,ref:o,_placeholder:{color:"var(--text-color-secondary)"}})})})};function w9(e){return v5({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 k9(e){return v5({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 S9(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const C9=!1,_9=F.createContext(null);var E9=function(e){return e.scrollTop},L9="unmounted",P9="exited",O9="entering",T9="entered",M9="exiting",A9=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=P9,r.appearStatus=O9):o=T9:o=t.unmountOnExit||t.mountOnEnter?L9:P9,r.state={status:o},r.nextCallback=null,r}ND(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===L9?{status:P9}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==O9&&n!==T9&&(t=O9):n!==O9&&n!==T9||(t=M9)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===O9){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Zu.findDOMNode(this);n&&E9(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===P9&&this.setState({status:L9})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Zu.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||C9?this.safeSetState({status:T9},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:O9},(function(){t.props.onEntering(i,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:T9},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Zu.findDOMNode(this);t&&!C9?(this.props.onExit(r),this.safeSetState({status:M9},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:P9},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:P9},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Zu.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===L9)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=pD(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return sd(_9.Provider,{value:null,children:"function"==typeof n?n(e,r):F.cloneElement(F.Children.only(n),r)})},t}(F.Component);function I9(){}A9.contextType=_9,A9.propTypes={},A9.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:I9,onEntering:I9,onEntered:I9,onExit:I9,onExiting:I9,onExited:I9},A9.UNMOUNTED=L9,A9.EXITED=P9,A9.ENTERING=O9,A9.ENTERED=T9,A9.EXITING=M9;const R9=A9;var N9=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))},D9=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=S9(n.className,r):n.setAttribute("class",S9(n.className&&n.className.baseVal||"",r)));var n,r}))},z9=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}ND(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&E9(e),r&&(this.appliedClasses[t][n]=r,N9(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&D9(e,r),o&&D9(e,o),i&&D9(e,i)},n.render=function(){var e=this.props;e.classNames;var t=pD(e,["classNames"]);return sd(R9,{...t,onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited})},t}(F.Component);z9.defaultProps={classNames:""},z9.propTypes={};const B9=z9,j9=c$((e=>e.options),(e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:o}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:o}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),F9=e=>{const t=l5(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:o}=c5(j9),a=i.exports.useRef(null),s=i.exports.useRef(null),l=i.exports.useRef(null),{children:c}=e;n7("o",(()=>{t(mV(!n)),o&&setTimeout((()=>t(eX(!0))),400)}),[n,o]),n7("esc",(()=>{t(mV(!1))}),{enabled:()=>!o,preventDefault:!0},[o]),n7("shift+o",(()=>{h(),t(eX(!0))}),[o]);const u=i.exports.useCallback((()=>{o||(t(YU(s.current?s.current.scrollTop:0)),t(mV(!1)),t(cV(!1)))}),[t,o]),d=()=>{l.current&&window.clearTimeout(l.current)},h=()=>{t(dV(!o)),t(eX(!0))};return i.exports.useEffect((()=>{function e(e){a.current&&!a.current.contains(e.target)&&u()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[u]),sd(B9,{nodeRef:a,in:n||r&&!o,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:sd("div",{className:"options-panel-wrapper","data-pinned":o,tabIndex:1,ref:a,onMouseEnter:o?void 0:d,onMouseOver:o?void 0:d,style:{borderRight:o?"":"0.3rem solid var(--tab-list-text-inactive)"},children:sd("div",{className:"options-panel-margin",children:ld("div",{className:"options-panel",ref:s,onMouseLeave:e=>{e.target!==s.current?d():!o&&(l.current=window.setTimeout((()=>u()),500))},children:[sd(qH,{label:"Pin Options Panel",children:sd("div",{className:"options-panel-pin-button","data-selected":o,onClick:h,children:sd(o?w9:k9,{})})}),!o&&ld("div",{className:"invoke-ai-logo-wrapper",children:[sd("img",{src:h3,alt:"invoke-ai-logo"}),ld("h1",{children:["invoke ",sd("strong",{children:"ai"})]})]}),c]})})})})};function H9(){const{t:e}=BZ(),t={seed:{header:`${e("options:seed")}`,feature:f7.SEED,content:sd(N7,{})},variations:{header:`${e("options:variations")}`,feature:f7.VARIATIONS,content:sd(U7,{}),additionalHeaderComponents:sd(F7,{})},face_restore:{header:`${e("options:faceRestoration")}`,feature:f7.FACE_CORRECTION,content:sd(v7,{}),additionalHeaderComponents:sd(y7,{})},upscale:{header:`${e("options:upscaling")}`,feature:f7.UPSCALE,content:sd(B7,{}),additionalHeaderComponents:sd(j7,{})},other:{header:`${e("options:otherOptions")}`,feature:f7.OTHER,content:sd(O7,{})}},n=l5(),r=c5(_3);return i.exports.useEffect((()=>{if("img2img"===r){(()=>n(WU(!1)))()}}),[r,n]),ld(F9,{children:[sd(x9,{}),sd(y9,{}),sd(Q7,{}),sd(L7,{label:e("options:img2imgStrength"),styleClass:"main-option-block image-to-image-strength-main-option"}),sd(b7,{}),sd(l9,{accordionInfo:t})]})}const W9=i.exports.createContext(null),$9=e=>{const{styleClass:t}=e,n=i.exports.useContext(W9);return sd("div",{className:`image-uploader-button-outer ${t}`,onClick:()=>{n&&n()},children:ld("div",{className:"image-upload-button",children:[sd(c3,{}),sd(LI,{size:"lg",children:"Click or Drag and Drop"})]})})},U9=c$((e=>e.system),(e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),V9=i.exports.forwardRef((({image:e,children:t},n)=>{const{isOpen:r,onOpen:o,onClose:a}=KA(),s=l5(),{shouldConfirmOnDelete:l,isConnected:c,isProcessing:u}=c5(U9),d=i.exports.useRef(null),h=()=>{c&&!u&&e&&s(yQ(e)),a()};n7("delete",(()=>{l?o():h()}),[e,l]);return ld(ad,{children:[i.exports.cloneElement(t,{onClick:e?e=>{e.stopPropagation(),l?o():h()}:void 0,ref:n}),sd(GB,{isOpen:r,leastDestructiveRef:d,onClose:a,children:sd(VB,{children:ld(qB,{className:"modal",children:[sd($B,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),sd(RB,{children:ld(SI,{direction:"column",gap:5,children:[sd(WI,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),sd(VM,{children:ld(SI,{alignItems:"center",children:[sd(JM,{mb:0,children:"Don't ask me again"}),sd(tH,{checked:!l,onChange:e=>s(GZ(!e.target.checked))})]})})]})}),ld(WB,{children:[sd(IM,{ref:d,onClick:a,className:"modal-close-btn",children:"Cancel"}),sd(IM,{colorScheme:"red",onClick:h,ml:3,children:"Delete"})]})]})})})]})})),G9=c$([e=>e.system,e=>e.options,e=>e.gallery,_3],((e,t,n,r)=>{const{isProcessing:o,isConnected:i,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:c,shouldShowImageDetails:u,isLightBoxOpen:d}=t,{intermediateImage:h,currentImage:f}=n;return{isProcessing:o,isConnected:i,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:c,shouldDisableToolbarButtons:Boolean(h)||!f,currentImage:f,shouldShowImageDetails:u,activeTabName:r,isLightBoxOpen:d}}),{memoizeOptions:{resultEqualityCheck:PV.exports.isEqual}}),q9=()=>{const e=l5(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:o,upscalingLevel:i,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:c,isLightBoxOpen:u,activeTabName:d}=c5(G9),h=DH(),{t:f}=BZ(),p=()=>{c&&(u&&e(GU(!1)),e(VU(c)),e(AU("img2img")))};n7("shift+i",(()=>{c?(p(),h({title:f("toast:sentToImageToImage"),status:"success",duration:2500,isClosable:!0})):h({title:f("toast:imageNotLoaded"),description:f("toast:imageNotLoadedDesc"),status:"error",duration:2500,isClosable:!0})}),[c]);const g=()=>{c&&(c.metadata&&e(RU(c.metadata)),"img2img"===c.metadata?.image.type?e(AU("img2img")):"txt2img"===c.metadata?.image.type&&e(AU("txt2img")))};n7("a",(()=>{["txt2img","img2img"].includes(c?.metadata?.image?.type)?(g(),h({title:f("toast:parametersSet"),status:"success",duration:2500,isClosable:!0})):h({title:f("toast:parametersNotSet"),description:f("toast:parametersNotSetDesc"),status:"error",duration:2500,isClosable:!0})}),[c]);const m=()=>{c?.metadata&&e(iV(c.metadata.image.seed))};n7("s",(()=>{c?.metadata?.image?.seed?(m(),h({title:f("toast:seedSet"),status:"success",duration:2500,isClosable:!0})):h({title:f("toast:seedNotSet"),description:f("toast:seedNotSetDesc"),status:"error",duration:2500,isClosable:!0})}),[c]);const v=()=>c?.metadata?.image?.prompt&&e(QU(c.metadata.image.prompt));n7("p",(()=>{c?.metadata?.image?.prompt?(v(),h({title:f("toast:promptSet"),status:"success",duration:2500,isClosable:!0})):h({title:f("toast:promptNotSet"),description:f("toast:promptNotSetDesc"),status:"error",duration:2500,isClosable:!0})}),[c]);const y=()=>{c&&e(mQ(c))};n7("Shift+U",(()=>{o&&!s&&n&&!t&&i?y():h({title:f("toast:upscalingFailed"),status:"error",duration:2500,isClosable:!0})}),[c,o,s,n,t,i]);const b=()=>{c&&e(vQ(c))};n7("Shift+R",(()=>{r&&!s&&n&&!t&&a?b():h({title:f("toast:faceRestoreFailed"),status:"error",duration:2500,isClosable:!0})}),[c,r,s,n,t,a]);const x=()=>e(gV(!l));n7("i",(()=>{c?x():h({title:f("toast:metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})}),[c,l]);return ld("div",{className:"current-image-options",children:[ld(NM,{isAttached:!0,children:[sd(M3,{trigger:"hover",triggerComponent:sd(f3,{"aria-label":`${f("options:sendTo")}...`,icon:sd(r3,{})}),children:ld("div",{className:"current-image-send-to-popover",children:[sd(A3,{size:"sm",onClick:p,leftIcon:sd(o3,{}),children:f("options:sendToImg2Img")}),sd(A3,{size:"sm",onClick:()=>{c&&(u&&e(GU(!1)),e(tX(c)),e(eX(!0)),"unifiedCanvas"!==d&&e(AU("unifiedCanvas")),h({title:f("toast:sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0}))},leftIcon:sd(o3,{}),children:f("options:sendToUnifiedCanvas")}),sd(A3,{size:"sm",onClick:()=>{navigator.clipboard.writeText(c?window.location.toString()+c.url:"").then((()=>{h({title:f("toast:imageLinkCopied"),status:"success",duration:2500,isClosable:!0})}))},leftIcon:sd(M5,{}),children:f("options:copyImageToLink")}),sd(A3,{leftIcon:sd(I5,{}),size:"sm",children:sd(OI,{download:!0,href:c?.url,children:f("options:downloadImage")})})]})}),sd(f3,{icon:sd(D5,{}),tooltip:u?`${f("options:closeViewer")} (Z)`:`${f("options:openInViewer")} (Z)`,"aria-label":u?`${f("options:closeViewer")} (Z)`:`${f("options:openInViewer")} (Z)`,"data-selected":u,onClick:()=>{e(GU(!u))}})]}),ld(NM,{isAttached:!0,children:[sd(f3,{icon:sd(Q5,{}),tooltip:`${f("options:usePrompt")} (P)`,"aria-label":`${f("options:usePrompt")} (P)`,isDisabled:!c?.metadata?.image?.prompt,onClick:v}),sd(f3,{icon:sd(n3,{}),tooltip:`${f("options:useSeed")} (S)`,"aria-label":`${f("options:useSeed")} (S)`,isDisabled:!c?.metadata?.image?.seed,onClick:m}),sd(f3,{icon:sd(L5,{}),tooltip:`${f("options:useAll")} (A)`,"aria-label":`${f("options:useAll")} (A)`,isDisabled:!["txt2img","img2img"].includes(c?.metadata?.image?.type),onClick:g})]}),ld(NM,{isAttached:!0,children:[sd(M3,{trigger:"hover",triggerComponent:sd(f3,{icon:sd(H5,{}),"aria-label":f("options:restoreFaces")}),children:ld("div",{className:"current-image-postprocessing-popover",children:[sd(v7,{}),sd(A3,{isDisabled:!(r&&c&&n&&!t&&a),onClick:b,children:f("options:restoreFaces")})]})}),sd(M3,{trigger:"hover",triggerComponent:sd(f3,{icon:sd(N5,{}),"aria-label":f("options:upscale")}),children:ld("div",{className:"current-image-postprocessing-popover",children:[sd(B7,{}),sd(A3,{isDisabled:!(o&&c&&n&&!t&&i),onClick:y,children:f("options:upscaleImage")})]})})]}),sd(NM,{isAttached:!0,children:sd(f3,{icon:sd(T5,{}),tooltip:`${f("options:info")} (I)`,"aria-label":`${f("options:info")} (I)`,"data-selected":l,onClick:x})}),sd(V9,{image:c,children:sd(f3,{icon:sd(s3,{}),tooltip:`${f("options:deleteImage")} (Del)`,"aria-label":`${f("options:deleteImage")} (Del)`,isDisabled:!c||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})};kk({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"}),kk({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"}),kk({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"}),kk({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"}),kk({displayName:"SunIcon",path:ld("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[sd("circle",{cx:"12",cy:"12",r:"5"}),sd("path",{d:"M12 1v2"}),sd("path",{d:"M12 21v2"}),sd("path",{d:"M4.22 4.22l1.42 1.42"}),sd("path",{d:"M18.36 18.36l1.42 1.42"}),sd("path",{d:"M1 12h2"}),sd("path",{d:"M21 12h2"}),sd("path",{d:"M4.22 19.78l1.42-1.42"}),sd("path",{d:"M18.36 5.64l1.42-1.42"})]})}),kk({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"}),kk({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:sd("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"})}),kk({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"}),kk({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"}),kk({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"}),kk({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"}),kk({displayName:"ViewIcon",path:ld("g",{fill:"currentColor",children:[sd("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"}),sd("circle",{cx:"12",cy:"12",r:"2"})]})}),kk({displayName:"ViewOffIcon",path:ld("g",{fill:"currentColor",children:[sd("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"}),sd("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"})]})}),kk({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"}),kk({displayName:"DeleteIcon",path:sd("g",{fill:"currentColor",children:sd("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"})})}),kk({displayName:"RepeatIcon",path:ld("g",{fill:"currentColor",children:[sd("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"}),sd("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"})]})}),kk({displayName:"RepeatClockIcon",path:ld("g",{fill:"currentColor",children:[sd("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"}),sd("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"})]})}),kk({displayName:"EditIcon",path:ld("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[sd("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),sd("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),kk({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"}),kk({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"}),kk({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}),kk({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),kk({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"}),kk({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"}),kk({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"}),kk({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"}),kk({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var Z9=kk({displayName:"ExternalLinkIcon",path:ld("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[sd("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),sd("path",{d:"M15 3h6v6"}),sd("path",{d:"M10 14L21 3"})]})});function Y9(e){return v5({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)}kk({displayName:"LinkIcon",path:ld("g",{fill:"currentColor",children:[sd("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"}),sd("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"})]})}),kk({displayName:"PlusSquareIcon",path:ld("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[sd("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),sd("path",{d:"M12 8v8"}),sd("path",{d:"M8 12h8"})]})}),kk({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"}),kk({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"}),kk({displayName:"TimeIcon",path:ld("g",{fill:"currentColor",children:[sd("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"}),sd("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"})]})}),kk({displayName:"ArrowRightIcon",path:ld("g",{fill:"currentColor",children:[sd("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"}),sd("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"})]})}),kk({displayName:"ArrowLeftIcon",path:ld("g",{fill:"currentColor",children:[sd("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"}),sd("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"})]})}),kk({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"}),kk({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"}),kk({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"}),kk({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"}),kk({displayName:"EmailIcon",path:ld("g",{fill:"currentColor",children:[sd("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"}),sd("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"})]})}),kk({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"}),kk({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"}),kk({displayName:"SpinnerIcon",path:ld(ad,{children:[sd("defs",{children:ld("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[sd("stop",{stopColor:"currentColor",offset:"0%"}),sd("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ld("g",{transform:"translate(2)",fill:"none",children:[sd("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),sd("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),sd("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})}),kk({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"}),kk({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:sd("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"})}),kk({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"}),kk({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"}),kk({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"}),kk({displayName:"InfoOutlineIcon",path:ld("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[sd("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),sd("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),sd("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})}),kk({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"}),kk({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"}),kk({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"}),kk({displayName:"QuestionOutlineIcon",path:ld("g",{stroke:"currentColor",strokeWidth:"1.5",children:[sd("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"}),sd("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),sd("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})}),kk({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"}),kk({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"}),kk({viewBox:"0 0 14 14",path:sd("g",{fill:"currentColor",children:sd("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})}),kk({displayName:"MinusIcon",path:sd("g",{fill:"currentColor",children:sd("rect",{height:"4",width:"20",x:"2",y:"10"})})}),kk({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"});const X9=({label:e,value:t,onClick:n,isLink:r,labelPosition:o,withCopy:i=!1})=>ld(SI,{gap:2,children:[n&&sd(qH,{label:`Recall ${e}`,children:sd(DM,{"aria-label":"Use this parameter",icon:sd(Y9,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),i&&sd(qH,{label:`Copy ${e}`,children:sd(DM,{"aria-label":`Copy ${e}`,icon:sd(M5,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ld(SI,{direction:o?"column":"row",children:[ld(WI,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ld(OI,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",sd(Z9,{mx:"2px"})]}):sd(WI,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),K9=i.exports.memo((({image:e,styleClass:t})=>{const n=l5();n7("esc",(()=>{n(gV(!1))}));const r=e?.metadata?.image||{},o=e?.dreamPrompt,{cfg_scale:i,fit:a,height:s,hires_fix:l,init_image_path:c,mask_image_path:u,orig_path:d,perlin:h,postprocessing:f,prompt:p,sampler:g,scale:m,seamless:v,seed:y,steps:b,strength:x,threshold:w,type:k,variations:S,width:C}=r,_=JSON.stringify(e.metadata,null,2);return sd("div",{className:`image-metadata-viewer ${t}`,children:ld(SI,{gap:1,direction:"column",width:"100%",children:[ld(SI,{gap:2,children:[sd(WI,{fontWeight:"semibold",children:"File:"}),ld(OI,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,sd(Z9,{mx:"2px"})]})]}),Object.keys(r).length>0?ld(ad,{children:[k&&sd(X9,{label:"Generation type",value:k}),e.metadata?.model_weights&&sd(X9,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(k)&&sd(X9,{label:"Original image",value:d}),"gfpgan"===k&&void 0!==x&&sd(X9,{label:"Fix faces strength",value:x,onClick:()=>n(jU(x))}),"esrgan"===k&&void 0!==m&&sd(X9,{label:"Upscaling scale",value:m,onClick:()=>n(kV(m))}),"esrgan"===k&&void 0!==x&&sd(X9,{label:"Upscaling strength",value:x,onClick:()=>n(SV(x))}),p&&sd(X9,{label:"Prompt",labelPosition:"top",value:SU(p),onClick:()=>n(QU(p))}),void 0!==y&&sd(X9,{label:"Seed",value:y,onClick:()=>n(iV(y))}),void 0!==w&&sd(X9,{label:"Noise Threshold",value:w,onClick:()=>n(xV(w))}),void 0!==h&&sd(X9,{label:"Perlin Noise",value:h,onClick:()=>n(KU(h))}),g&&sd(X9,{label:"Sampler",value:g,onClick:()=>n(JU(g))}),b&&sd(X9,{label:"Steps",value:b,onClick:()=>n(bV(b))}),void 0!==i&&sd(X9,{label:"CFG scale",value:i,onClick:()=>n(DU(i))}),S&&S.length>0&&sd(X9,{label:"Seed-weight pairs",value:_U(S),onClick:()=>n(aV(_U(S)))}),v&&sd(X9,{label:"Seamless",value:v,onClick:()=>n(tV(v))}),l&&sd(X9,{label:"High Resolution Optimization",value:l,onClick:()=>n(WU(l))}),C&&sd(X9,{label:"Width",value:C,onClick:()=>n(_V(C))}),s&&sd(X9,{label:"Height",value:s,onClick:()=>n(HU(s))}),c&&sd(X9,{label:"Initial image",value:c,isLink:!0,onClick:()=>n(VU(c))}),u&&sd(X9,{label:"Mask image",value:u,isLink:!0,onClick:()=>n(ZU(u))}),"img2img"===k&&x&&sd(X9,{label:"Image to image strength",value:x,onClick:()=>n($U(x))}),a&&sd(X9,{label:"Image to image fit",value:a,onClick:()=>n(sV(a))}),f&&f.length>0&&ld(ad,{children:[sd(LI,{size:"sm",children:"Postprocessing"}),f.map(((e,t)=>{if("esrgan"===e.type){const{scale:r,strength:o}=e;return ld(SI,{pl:"2rem",gap:1,direction:"column",children:[sd(WI,{size:"md",children:`${t+1}: Upscale (ESRGAN)`}),sd(X9,{label:"Scale",value:r,onClick:()=>n(kV(r))}),sd(X9,{label:"Strength",value:o,onClick:()=>n(SV(o))})]},t)}if("gfpgan"===e.type){const{strength:r}=e;return ld(SI,{pl:"2rem",gap:1,direction:"column",children:[sd(WI,{size:"md",children:`${t+1}: Face restoration (GFPGAN)`}),sd(X9,{label:"Strength",value:r,onClick:()=>{n(jU(r)),n(FU("gfpgan"))}})]},t)}if("codeformer"===e.type){const{strength:r,fidelity:o}=e;return ld(SI,{pl:"2rem",gap:1,direction:"column",children:[sd(WI,{size:"md",children:`${t+1}: Face restoration (Codeformer)`}),sd(X9,{label:"Strength",value:r,onClick:()=>{n(jU(r)),n(FU("codeformer"))}}),o&&sd(X9,{label:"Fidelity",value:o,onClick:()=>{n(zU(o)),n(FU("codeformer"))}})]},t)}}))]}),o&&sd(X9,{withCopy:!0,label:"Dream Prompt",value:o}),ld(SI,{gap:2,direction:"column",children:[ld(SI,{gap:2,children:[sd(qH,{label:"Copy metadata JSON",children:sd(DM,{"aria-label":"Copy metadata JSON",icon:sd(M5,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(_)})}),sd(WI,{fontWeight:"semibold",children:"Metadata JSON:"})]}),sd("div",{className:"image-json-viewer",children:sd("pre",{children:_})})]})]}):sd(yI,{width:"100%",pt:10,children:sd(WI,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})}),((e,t)=>e.image.uuid===t.image.uuid)),Q9=c$([e=>e.gallery,e=>e.options],((e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:o}=e,{shouldShowImageDetails:i}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex((t=>t.uuid===e?.currentImage?.uuid)),l=a.length;return{imageToDisplay:o||r,isIntermediate:Boolean(o),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:0===s,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:i,shouldShowPrevImageButton:0===s,shouldShowNextImageButton:!isNaN(s)&&s===l-1}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});function J9(){const e=l5(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:o,isIntermediate:a}=c5(Q9),[s,l]=i.exports.useState(!1),c=()=>{l(!0)},u=()=>{l(!1)};return ld("div",{className:"current-image-preview",children:[o&&sd(_M,{src:o.url,width:o.width,height:o.height,style:{imageRendering:a?"pixelated":"initial"}}),!r&&ld("div",{className:"current-image-next-prev-buttons",children:[sd("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:c,onMouseOut:u,children:s&&!t&&sd(DM,{"aria-label":"Previous image",icon:sd(k5,{className:"next-prev-button"}),variant:"unstyled",onClick:()=>{e(BV())}})}),sd("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:c,onMouseOut:u,children:s&&!n&&sd(DM,{"aria-label":"Next image",icon:sd(S5,{className:"next-prev-button"}),variant:"unstyled",onClick:()=>{e(zV())}})})]}),r&&o&&sd(K9,{image:o,styleClass:"current-image-metadata"})]})}const e8=c$([e=>e.gallery,e=>e.options,_3],((e,t,n)=>{const{currentImage:r,intermediateImage:o}=e,{shouldShowImageDetails:i}=t;return{activeTabName:n,shouldShowImageDetails:i,hasAnImageToDisplay:r||o}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),t8=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=c5(e8);return sd("div",{className:"current-image-area","data-tab-name":t,children:e?ld(ad,{children:[sd(q9,{}),sd(J9,{})]}):sd("div",{className:"current-image-display-placeholder",children:sd(n9,{})})})},n8=()=>{const e=i.exports.useContext(W9);return sd(f3,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:sd(c3,{}),onClick:e||void 0})};function r8(){const e=c5((e=>e.options.initialImage)),{t:t}=BZ(),n=l5(),r=DH();return ld(ad,{children:[ld("div",{className:"init-image-preview-header",children:[sd("h2",{children:t("options:initialImage")}),sd(n8,{})]}),e&&sd("div",{className:"init-image-preview",children:sd(_M,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:"string"==typeof e?e:e.url,onError:()=>{r({title:t("toast:parametersFailed"),description:t("toast:parametersFailedDesc"),status:"error",isClosable:!0}),n(OU())}})})]})}const o8=()=>{const e=c5((e=>e.options.initialImage)),{currentImage:t}=c5((e=>e.gallery));return ld("div",{className:"workarea-split-view",children:[sd("div",{className:"workarea-split-view-left",children:e?sd("div",{className:"image-to-image-area",children:sd(r8,{})}):sd($9,{})}),t&&sd("div",{className:"workarea-split-view-right",children:sd(t8,{})})]})};function i8(e){return v5({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)}function a8(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function s8(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>i.exports.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return i.exports.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=i.exports.createContext(r),a=n.length;function s(t){const{scope:n,children:r,...s}=t,l=(null==n?void 0:n[e][a])||o,c=i.exports.useMemo((()=>s),Object.values(s));return i.exports.createElement(l.Provider,{value:c},r)}return n=[...n,r],s.displayName=t+"Provider",[s,function(n,s){const l=(null==s?void 0:s[e][a])||o,c=i.exports.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},l8(r,...t)]}function l8(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return i.exports.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function c8(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function u8(...e){return i.exports.useCallback(c8(...e),e)}const d8=i.exports.forwardRef(((e,t)=>{const{children:n,...r}=e,o=i.exports.Children.toArray(n),a=o.find(p8);if(a){const e=a.props.children,n=o.map((t=>t===a?i.exports.Children.count(e)>1?i.exports.Children.only(null):i.exports.isValidElement(e)?e.props.children:null:t));return i.exports.createElement(h8,mp({},r,{ref:t}),i.exports.isValidElement(e)?i.exports.cloneElement(e,void 0,n):null)}return i.exports.createElement(h8,mp({},r,{ref:t}),n)}));d8.displayName="Slot";const h8=i.exports.forwardRef(((e,t)=>{const{children:n,...r}=e;return i.exports.isValidElement(n)?i.exports.cloneElement(n,{...g8(r,n.props),ref:c8(t,n.ref)}):i.exports.Children.count(n)>1?i.exports.Children.only(null):null}));h8.displayName="SlotClone";const f8=({children:e})=>i.exports.createElement(i.exports.Fragment,null,e);function p8(e){return i.exports.isValidElement(e)&&e.type===f8}function g8(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const m8=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=i.exports.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?d8:t;return i.exports.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),i.exports.createElement(a,mp({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function v8(e,t){e&&$.exports.flushSync((()=>e.dispatchEvent(t)))}function y8(e){const t=e+"CollectionProvider",[n,r]=s8(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=e+"CollectionItemSlot",l="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=F.useRef(null),i=F.useRef(new Map).current;return F.createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},Slot:F.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=u8(t,i(a,n).collectionRef);return F.createElement(d8,{ref:o},r)})),ItemSlot:F.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=F.useRef(null),c=u8(t,a),u=i(s,n);return F.useEffect((()=>(u.itemMap.set(a,{ref:a,...o}),()=>{u.itemMap.delete(a)}))),F.createElement(d8,{[l]:"",ref:c},r)}))},function(t){const n=i(e+"CollectionConsumer",t),r=F.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${l}]`)),r=Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return r}),[n.collectionRef,n.itemMap]);return r},r]}const b8=i.exports.createContext(void 0);function x8(e){const t=i.exports.useContext(b8);return e||t||"ltr"}function w8(e){const t=i.exports.useRef(e);return i.exports.useEffect((()=>{t.current=e})),i.exports.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}const k8="dismissableLayer.update",S8="dismissableLayer.pointerDownOutside",C8="dismissableLayer.focusOutside";let _8;const E8=i.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),L8=i.exports.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=i.exports.useContext(E8),[h,f]=i.exports.useState(null),p=null!==(n=null==h?void 0:h.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,g]=i.exports.useState({}),m=u8(t,(e=>f(e))),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=h?v.indexOf(h):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,k=x>=b,S=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=w8(e),r=i.exports.useRef(!1),o=i.exports.useRef((()=>{}));return i.exports.useEffect((()=>{const e=e=>{if(e.target&&!r.current){const i={originalEvent:e};function a(){O8(S8,n,i,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==l||l(e),e.defaultPrevented||null==c||c())}),p),C=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=w8(e),r=i.exports.useRef(!1);return i.exports.useEffect((()=>{const e=e=>{if(e.target&&!r.current){O8(C8,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==c||c())}),p);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=w8(e);i.exports.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}((e=>{x===d.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),p),i.exports.useEffect((()=>{if(h)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(_8=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),P8(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=_8)}}),[h,p,r,d]),i.exports.useEffect((()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),P8())}),[h,d]),i.exports.useEffect((()=>{const e=()=>g({});return document.addEventListener(k8,e),()=>document.removeEventListener(k8,e)}),[]),i.exports.createElement(m8.div,mp({},u,{ref:m,style:{pointerEvents:w?k?"auto":"none":void 0,...e.style},onFocusCapture:a8(e.onFocusCapture,C.onFocusCapture),onBlurCapture:a8(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:a8(e.onPointerDownCapture,S.onPointerDownCapture)}))}));function P8(){const e=new CustomEvent(k8);document.dispatchEvent(e)}function O8(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?v8(o,i):o.dispatchEvent(i)}let T8=0;function M8(){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 A8="focusScope.autoFocusOnMount",I8="focusScope.autoFocusOnUnmount",R8={bubbles:!1,cancelable:!0},N8=i.exports.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[l,c]=i.exports.useState(null),u=w8(o),d=w8(a),h=i.exports.useRef(null),f=u8(t,(e=>c(e))),p=i.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.exports.useEffect((()=>{if(r){function e(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?h.current=t:j8(h.current,{select:!0})}function t(e){!p.paused&&l&&(l.contains(e.relatedTarget)||j8(h.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,p.paused]),i.exports.useEffect((()=>{if(l){F8.add(p);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(A8,R8);l.addEventListener(A8,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(j8(r,{select:t}),document.activeElement!==n)return}((e=D8(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&j8(l))}return()=>{l.removeEventListener(A8,u),setTimeout((()=>{const e=new CustomEvent(I8,R8);l.addEventListener(I8,d),l.dispatchEvent(e),e.defaultPrevented||j8(null!=t?t:document.body,{select:!0}),l.removeEventListener(I8,d),F8.remove(p)}),0)}}var e}),[l,u,d,p]);const g=i.exports.useCallback((e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=D8(e),n=z8(t,e),r=z8(t.reverse(),e);return[n,r]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&j8(i,{select:!0})):(e.preventDefault(),n&&j8(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return i.exports.createElement(m8.div,mp({tabIndex:-1},s,{ref:f,onKeyDown:g}))}));function D8(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function z8(e,t){for(const n of e)if(!B8(n,{upTo:t}))return n}function B8(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function j8(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const F8=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=H8(e,t),e.unshift(t)},remove(t){var n;e=H8(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function H8(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const W8=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?i.exports.useLayoutEffect:()=>{},$8=H["useId".toString()]||(()=>{});let U8=0;function V8(e){return e.split("-")[0]}function G8(e){return e.split("-")[1]}function q8(e){return["top","bottom"].includes(V8(e))?"x":"y"}function Z8(e){return"y"===e?"height":"width"}function Y8(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,s=q8(t),l=Z8(s),c=r[l]/2-o[l]/2,u="x"===s;let d;switch(V8(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(G8(t)){case"start":d[s]-=c*(n&&u?-1:1);break;case"end":d[s]+=c*(n&&u?-1:1)}return d}function X8(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function K8(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Q8(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=t,p=X8(f),g=s[h?"floating"===d?"reference":"floating":d],m=K8(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v=K8(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...a.floating,x:r,y:o}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),strategy:l}):a[d]);return{top:m.top-v.top+p.top,bottom:v.bottom-m.bottom+p.bottom,left:m.left-v.left+p.left,right:v.right-m.right+p.right}}const J8=Math.min,eee=Math.max;function tee(e,t,n){return eee(e,J8(t,n))}const nee=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=null!=e?e:{},{x:o,y:i,placement:a,rects:s,platform:l}=t;if(null==n)return{};const c=X8(r),u={x:o,y:i},d=q8(a),h=G8(a),f=Z8(d),p=await l.getDimensions(n),g="y"===d?"top":"left",m="y"===d?"bottom":"right",v=s.reference[f]+s.reference[d]-u[d]-s.floating[f],y=u[d]-s.reference[d],b=await(null==l.getOffsetParent?void 0:l.getOffsetParent(n));let x=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===x&&(x=s.floating[f]);const w=v/2-y/2,k=c[g],S=x-p[f]-c[m],C=x/2-p[f]/2+w,_=tee(k,C,S),E=("start"===h?c[g]:c[m])>0&&C!==_&&s.reference[f]<=s.floating[f];return{[d]:u[d]-(E?C<k?k-C:S-C:0),data:{[d]:_,centerOffset:C-_}}}}),ree={left:"right",right:"left",bottom:"top",top:"bottom"};function oee(e){return e.replace(/left|right|bottom|top/g,(e=>ree[e]))}const iee={start:"end",end:"start"};function aee(e){return e.replace(/start|end/g,(e=>iee[e]))}const see=["top","right","bottom","left"];const lee=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",flipAlignment:f=!0,...p}=e,g=V8(r),m=d||(g===a||!f?[oee(a)]:function(e){const t=oee(e);return[aee(e),t,aee(t)]}(a)),v=[a,...m],y=await Q8(t,p),b=[];let x=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&b.push(y[g]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=G8(e),o=q8(e),i=Z8(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=oee(a)),{main:a,cross:oee(a)}}(r,i,await(null==s.isRTL?void 0:s.isRTL(l.floating)));b.push(y[e],y[t])}if(x=[...x,{placement:r,overflows:b}],!b.every((e=>e<=0))){var w,k;const e=(null!=(w=null==(k=o.flip)?void 0:k.index)?w:0)+1,t=v[e];if(t)return{data:{index:e,overflows:x},reset:{placement:t}};let n="bottom";switch(h){case"bestFit":{var S;const e=null==(S=x.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:S[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function cee(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uee(e){return see.some((t=>e[t]>=0))}const dee=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=cee(await Q8(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:uee(t)}}}case"escaped":{const t=cee(await Q8(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:uee(t)}}}default:return{}}}}};const hee=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=V8(n),s=G8(n),l="x"===q8(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:h,crossAxis:f,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof p&&(f="end"===s?-1*p:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function fee(e){return"x"===e?"y":"x"}const pee=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,c={x:n,y:r},u=await Q8(t,l),d=q8(V8(o)),h=fee(d);let f=c[d],p=c[h];if(i){const e="y"===d?"bottom":"right";f=tee(f+u["y"===d?"top":"left"],f,f-u[e])}if(a){const e="y"===h?"bottom":"right";p=tee(p+u["y"===h?"top":"left"],p,p-u[e])}const g=s.fn({...t,[d]:f,[h]:p});return{...g,data:{x:g.x-n,y:g.y-r}}}}},gee=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=e,u={x:n,y:r},d=q8(o),h=fee(d);let f=u[d],p=u[h];const g="function"==typeof s?s({...i,placement:o}):s,m="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+m.mainAxis,n=i.reference[d]+i.reference[e]-m.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var v,y,b,x;const e="y"===d?"width":"height",t=["top","left"].includes(V8(o)),n=i.reference[h]-i.floating[e]+(t&&null!=(v=null==(y=a.offset)?void 0:y[h])?v:0)+(t?0:m.crossAxis),r=i.reference[h]+i.reference[e]+(t?0:null!=(b=null==(x=a.offset)?void 0:x[h])?b:0)-(t?m.crossAxis:0);p<n?p=n:p>r&&(p=r)}return{[d]:f,[h]:p}}}};function mee(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function vee(e){if(null==e)return window;if(!mee(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function yee(e){return vee(e).getComputedStyle(e)}function bee(e){return mee(e)?"":e?(e.nodeName||"").toLowerCase():""}function xee(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function wee(e){return e instanceof vee(e).HTMLElement}function kee(e){return e instanceof vee(e).Element}function See(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof vee(e).ShadowRoot||e instanceof ShadowRoot}function Cee(e){const{overflow:t,overflowX:n,overflowY:r}=yee(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function _ee(e){return["table","td","th"].includes(bee(e))}function Eee(e){const t=/firefox/i.test(xee()),n=yee(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function Lee(){return!/^((?!chrome|android).)*safari/i.test(xee())}const Pee=Math.min,Oee=Math.max,Tee=Math.round;function Mee(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let l=1,c=1;t&&wee(e)&&(l=e.offsetWidth>0&&Tee(s.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Tee(s.height)/e.offsetHeight||1);const u=kee(e)?vee(e):window,d=!Lee()&&n,h=(s.left+(d&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/l,f=(s.top+(d&&null!=(i=null==(a=u.visualViewport)?void 0:a.offsetTop)?i:0))/c,p=s.width/l,g=s.height/c;return{width:p,height:g,top:f,right:h+p,bottom:f+g,left:h,x:h,y:f}}function Aee(e){return((function(e){return e instanceof vee(e).Node}(e)?e.ownerDocument:e.document)||window.document).documentElement}function Iee(e){return kee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ree(e){return Mee(Aee(e)).left+Iee(e).scrollLeft}function Nee(e,t,n){const r=wee(t),o=Aee(t),i=Mee(e,r&&function(e){const t=Mee(e);return Tee(t.width)!==e.offsetWidth||Tee(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==bee(t)||Cee(o))&&(a=Iee(t)),wee(t)){const e=Mee(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=Ree(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function Dee(e){return"html"===bee(e)?e:e.assignedSlot||e.parentNode||(See(e)?e.host:null)||Aee(e)}function zee(e){return wee(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Bee(e){const t=vee(e);let n=zee(e);for(;n&&_ee(n)&&"static"===getComputedStyle(n).position;)n=zee(n);return n&&("html"===bee(n)||"body"===bee(n)&&"static"===getComputedStyle(n).position&&!Eee(n))?t:n||function(e){let t=Dee(e);for(See(t)&&(t=t.host);wee(t)&&!["html","body"].includes(bee(t));){if(Eee(t))return t;t=t.parentNode}return null}(e)||t}function jee(e){if(wee(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Mee(e);return{width:t.width,height:t.height}}function Fee(e){const t=Dee(e);return["html","body","#document"].includes(bee(t))?e.ownerDocument.body:wee(t)&&Cee(t)?t:Fee(t)}function Hee(e,t){var n;void 0===t&&(t=[]);const r=Fee(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=vee(r),a=o?[i].concat(i.visualViewport||[],Cee(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Hee(a))}function Wee(e,t,n){return"viewport"===t?K8(function(e,t){const n=vee(e),r=Aee(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Lee();(e||!e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n)):kee(t)?function(e,t){const n=Mee(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):K8(function(e){var t;const n=Aee(e),r=Iee(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Oee(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Oee(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let s=-r.scrollLeft+Ree(e);const l=-r.scrollTop;return"rtl"===yee(o||n).direction&&(s+=Oee(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(Aee(e)))}function $ee(e){const t=Hee(e),n=["absolute","fixed"].includes(yee(e).position)&&wee(e)?Bee(e):e;return kee(n)?t.filter((e=>kee(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&See(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==bee(e))):[]}const Uee={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?$ee(t):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=Wee(t,n,o);return e.top=Oee(r.top,e.top),e.right=Pee(r.right,e.right),e.bottom=Pee(r.bottom,e.bottom),e.left=Oee(r.left,e.left),e}),Wee(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=wee(n),i=Aee(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==bee(n)||Cee(i))&&(a=Iee(n)),wee(n))){const e=Mee(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:kee,getDimensions:jee,getOffsetParent:Bee,getDocumentElement:Aee,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Nee(t,Bee(n),r),floating:{...jee(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===yee(e).direction};function Vee(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=o&&!s,c=i&&!s,u=l||c?[...kee(e)?Hee(e):[],...Hee(t)]:[];u.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)}));let d,h=null;if(a){let r=!0;h=new ResizeObserver((()=>{r||n(),r=!1})),kee(e)&&!s&&h.observe(e),h.observe(t)}let f=s?Mee(e):null;return s&&function t(){const r=Mee(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n();f=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{l&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)})),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(d)}}const Gee=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:u}=Y8(l,r,s),d=r,h={},f=0;for(let p=0;p<i.length;p++){const{name:n,fn:g}=i[p],{x:m,y:v,data:y,reset:b}=await g({x:c,y:u,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:l,platform:a,elements:{reference:e,floating:t}});c=null!=m?m:c,u=null!=v?v:u,h={...h,[n]:{...h[n],...y}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(l=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:u}=Y8(l,d,s))),p=-1)}return{x:c,y:u,placement:d,strategy:o,middlewareData:h}})(e,t,{platform:Uee,...n});var qee="undefined"!=typeof document?i.exports.useLayoutEffect:i.exports.useEffect;function Zee(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Zee(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Zee(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Yee(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const a=i.exports.useRef(null),s=i.exports.useRef(null),l=function(e){const t=i.exports.useRef(e);return qee((()=>{t.current=e})),t}(o),c=i.exports.useRef(null),[u,d]=i.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[h,f]=i.exports.useState(t);Zee(null==h?void 0:h.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=i.exports.useCallback((()=>{a.current&&s.current&&Gee(a.current,s.current,{middleware:h,placement:n,strategy:r}).then((e=>{g.current&&$.exports.flushSync((()=>{d(e)}))}))}),[h,n,r]);qee((()=>{g.current&&p()}),[p]);const g=i.exports.useRef(!1);qee((()=>(g.current=!0,()=>{g.current=!1})),[]);const m=i.exports.useCallback((()=>{if("function"==typeof c.current&&(c.current(),c.current=null),a.current&&s.current)if(l.current){const e=l.current(a.current,s.current,p);c.current=e}else p()}),[p,l]),v=i.exports.useCallback((e=>{a.current=e,m()}),[m]),y=i.exports.useCallback((e=>{s.current=e,m()}),[m]),b=i.exports.useMemo((()=>({reference:a,floating:s})),[]);return i.exports.useMemo((()=>({...u,update:p,refs:b,reference:v,floating:y})),[u,p,b,v,y])}const Xee=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?nee({element:t.current,padding:n}).fn(e):{}:t?nee({element:t,padding:n}).fn(e):{}}};const Kee="Popper",[Qee,Jee]=s8(Kee),[ete,tte]=Qee(Kee),nte=i.exports.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=tte("PopperAnchor",n),s=i.exports.useRef(null),l=u8(t,s);return i.exports.useEffect((()=>{a.onAnchorChange((null==r?void 0:r.current)||s.current)})),r?null:i.exports.createElement(m8.div,mp({},o,{ref:l}))})),rte="PopperContent",[ote,ite]=Qee(rte),[ate,ste]=Qee(rte,{hasParent:!1,positionUpdateFns:new Set}),lte=i.exports.forwardRef(((e,t)=>{var n,r,o,a,s,l,c,u;const{__scopePopper:d,side:h="bottom",sideOffset:f=0,align:p="center",alignOffset:g=0,arrowPadding:m=0,collisionBoundary:v=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:x=!1,avoidCollisions:w=!0,...k}=e,S=tte(rte,d),[C,_]=i.exports.useState(null),E=u8(t,(e=>_(e))),[L,P]=i.exports.useState(null),O=function(e){const[t,n]=i.exports.useState(void 0);return W8((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(L),T=null!==(n=null==O?void 0:O.width)&&void 0!==n?n:0,M=null!==(r=null==O?void 0:O.height)&&void 0!==r?r:0,A=h+("center"!==p?"-"+p:""),I="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},R=Array.isArray(v)?v:[v],N=R.length>0,D={padding:I,boundary:R.filter(ute),altBoundary:N},{reference:z,floating:B,strategy:j,x:F,y:H,placement:W,middlewareData:$,update:U}=Yee({strategy:"fixed",placement:A,whileElementsMounted:Vee,middleware:[hee({mainAxis:f+M,alignmentAxis:g}),w?pee({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?gee():void 0,...D}):void 0,L?Xee({element:L,padding:m}):void 0,w?lee({...D}):void 0,dte({arrowWidth:T,arrowHeight:M}),x?dee({strategy:"referenceHidden"}):void 0].filter(cte)});W8((()=>{z(S.anchor)}),[z,S.anchor]);const V=null!==F&&null!==H,[G,q]=hte(W),Z=null===(o=$.arrow)||void 0===o?void 0:o.x,Y=null===(a=$.arrow)||void 0===a?void 0:a.y,X=0!==(null===(s=$.arrow)||void 0===s?void 0:s.centerOffset),[K,Q]=i.exports.useState();W8((()=>{C&&Q(window.getComputedStyle(C).zIndex)}),[C]);const{hasParent:J,positionUpdateFns:ee}=ste(rte,d),te=!J;i.exports.useLayoutEffect((()=>{if(!te)return ee.add(U),()=>{ee.delete(U)}}),[te,ee,U]),i.exports.useLayoutEffect((()=>{te&&V&&Array.from(ee).reverse().forEach((e=>requestAnimationFrame(e)))}),[te,V,ee]);const ne={"data-side":G,"data-align":q,...k,ref:E,style:{...k.style,animation:V?void 0:"none",opacity:null!==(l=$.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return i.exports.createElement("div",{ref:B,"data-radix-popper-content-wrapper":"",style:{position:j,left:0,top:0,transform:V?`translate3d(${Math.round(F)}px, ${Math.round(H)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[null===(c=$.transformOrigin)||void 0===c?void 0:c.x,null===(u=$.transformOrigin)||void 0===u?void 0:u.y].join(" ")}},i.exports.createElement(ote,{scope:d,placedSide:G,onArrowChange:P,arrowX:Z,arrowY:Y,shouldHideArrow:X},te?i.exports.createElement(ate,{scope:d,hasParent:!0,positionUpdateFns:ee},i.exports.createElement(m8.div,ne)):i.exports.createElement(m8.div,ne)))}));function cte(e){return void 0!==e}function ute(e){return null!==e}const dte=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:c}=t,u=0!==(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[f,p]=hte(s),g={start:"0%",center:"50%",end:"100%"}[p],m=(null!==(r=null===(o=c.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,v=(null!==(i=null===(a=c.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+h/2;let y="",b="";return"bottom"===f?(y=u?g:`${m}px`,b=-h+"px"):"top"===f?(y=u?g:`${m}px`,b=`${l.floating.height+h}px`):"right"===f?(y=-h+"px",b=u?g:`${v}px`):"left"===f&&(y=`${l.floating.width+h}px`,b=u?g:`${v}px`),{data:{x:y,y:b}}}});function hte(e){const[t,n="center"]=e.split("-");return[t,n]}const fte=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.exports.useState(null);return i.exports.createElement(ete,{scope:t,anchor:r,onAnchorChange:o},n)},pte=nte,gte=lte;const mte=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=i.exports.useState(),r=i.exports.useRef({}),o=i.exports.useRef(e),a=i.exports.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return i.exports.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.exports.useEffect((()=>{const e=vte(r.current);a.current="mounted"===l?e:"none"}),[l]),W8((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=vte(t);if(e)c("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))c("UNMOUNT");else{c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,c]),W8((()=>{if(t){const e=e=>{const n=vte(r.current).includes(e.animationName);e.target===t&&n&&$.exports.flushSync((()=>c("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=vte(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.exports.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):i.exports.Children.only(n),a=u8(r.ref,o.ref);return"function"==typeof n||r.isPresent?i.exports.cloneElement(o,{ref:a}):null};function vte(e){return(null==e?void 0:e.animationName)||"none"}function yte({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=i.exports.useState(e),[r]=n,o=i.exports.useRef(r),a=w8(t);return i.exports.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}({defaultProp:t,onChange:n}),a=void 0!==e,s=a?e:r,l=w8(n),c=i.exports.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l]);return[s,c]}mte.displayName="Presence";const bte="rovingFocusGroup.onEntryFocus",xte={bubbles:!1,cancelable:!0},wte="RovingFocusGroup",[kte,Ste,Cte]=y8(wte),[_te,Ete]=s8(wte,[Cte]),[Lte,Pte]=_te(wte),Ote=i.exports.forwardRef(((e,t)=>i.exports.createElement(kte.Provider,{scope:e.__scopeRovingFocusGroup},i.exports.createElement(kte.Slot,{scope:e.__scopeRovingFocusGroup},i.exports.createElement(Tte,mp({},e,{ref:t})))))),Tte=i.exports.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=e,h=i.exports.useRef(null),f=u8(t,h),p=x8(a),[g=null,m]=yte({prop:s,defaultProp:l,onChange:c}),[v,y]=i.exports.useState(!1),b=w8(u),x=Ste(n),w=i.exports.useRef(!1),[k,S]=i.exports.useState(0);return i.exports.useEffect((()=>{const e=h.current;if(e)return e.addEventListener(bte,b),()=>e.removeEventListener(bte,b)}),[b]),i.exports.createElement(Lte,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:g,onItemFocus:i.exports.useCallback((e=>m(e)),[m]),onItemShiftTab:i.exports.useCallback((()=>y(!0)),[]),onFocusableItemAdd:i.exports.useCallback((()=>S((e=>e+1))),[]),onFocusableItemRemove:i.exports.useCallback((()=>S((e=>e-1))),[])},i.exports.createElement(m8.div,mp({tabIndex:v||0===k?-1:0,"data-orientation":r},d,{ref:f,style:{outline:"none",...e.style},onMouseDown:a8(e.onMouseDown,(()=>{w.current=!0})),onFocus:a8(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(bte,xte);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));Ite([e.find((e=>e.active)),e.find((e=>e.id===g)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:a8(e.onBlur,(()=>y(!1)))})))})),Mte=i.exports.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,...a}=e,s=function(e){const[t,n]=i.exports.useState($8());return W8((()=>{e||n((e=>null!=e?e:String(U8++)))}),[e]),e||(t?`radix-${t}`:"")}(),l=Pte("RovingFocusGroupItem",n),c=l.currentTabStopId===s,u=Ste(n),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return i.exports.useEffect((()=>{if(r)return d(),()=>h()}),[r,d,h]),i.exports.createElement(kte.ItemSlot,{scope:n,id:s,focusable:r,active:o},i.exports.createElement(m8.span,mp({tabIndex:c?0:-1,"data-orientation":l.orientation},a,{ref:t,onMouseDown:a8(e.onMouseDown,(e=>{r?l.onItemFocus(s):e.preventDefault()})),onFocus:a8(e.onFocus,(()=>l.onItemFocus(s))),onKeyDown:a8(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void l.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Ate[r]}(e,l.orientation,l.dir);if(void 0!==t){e.preventDefault();let o=u().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=l.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>Ite(o)))}var n,r}))})))})),Ate={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ite(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const Rte=Ote,Nte=Mte,Dte=["Enter"," "],zte=["ArrowUp","PageDown","End"],Bte=["ArrowDown","PageUp","Home",...zte],jte="Menu",[Fte,Hte,Wte]=y8(jte),[$te,Ute]=s8(jte,[Wte,Jee,Ete]),Vte=Jee(),Gte=Ete(),[qte,Zte]=$te(jte),[Yte,Xte]=$te(jte),Kte=i.exports.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Vte(n);return i.exports.createElement(pte,mp({},o,r,{ref:t}))})),[Qte,Jte]=$te("MenuPortal",{forceMount:void 0}),ene="MenuContent",[tne,nne]=$te(ene),rne=i.exports.forwardRef(((e,t)=>{const n=Jte(ene,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Zte(ene,e.__scopeMenu),s=Xte(ene,e.__scopeMenu);return i.exports.createElement(Fte.Provider,{scope:e.__scopeMenu},i.exports.createElement(mte,{present:r||a.open},i.exports.createElement(Fte.Slot,{scope:e.__scopeMenu},s.modal?i.exports.createElement(one,mp({},o,{ref:t})):i.exports.createElement(ine,mp({},o,{ref:t})))))})),one=i.exports.forwardRef(((e,t)=>{const n=Zte(ene,e.__scopeMenu),r=i.exports.useRef(null),o=u8(t,r);return i.exports.useEffect((()=>{const e=r.current;if(e)return fD(e)}),[]),i.exports.createElement(ane,mp({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:a8(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),ine=i.exports.forwardRef(((e,t)=>{const n=Zte(ene,e.__scopeMenu);return i.exports.createElement(ane,mp({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),ane=i.exports.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:f,disableOutsideScroll:p,...g}=e,m=Zte(ene,n),v=Xte(ene,n),y=Vte(n),b=Gte(n),x=Hte(n),[w,k]=i.exports.useState(null),S=i.exports.useRef(null),C=u8(t,S,m.onContentChange),_=i.exports.useRef(0),E=i.exports.useRef(""),L=i.exports.useRef(0),P=i.exports.useRef(null),O=i.exports.useRef("right"),T=i.exports.useRef(0),M=p?CB:i.exports.Fragment,A=p?{as:d8,allowPinchZoom:!0}:void 0,I=e=>{var t,n;const r=E.current+e,o=x().filter((e=>!e.disabled)),i=document.activeElement,a=null===(t=o.find((e=>e.ref.current===i)))||void 0===t?void 0:t.textValue,s=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),o=r?t[0]:t,i=n?e.indexOf(n):-1;let a=(s=e,l=Math.max(i,0),s.map(((e,t)=>s[(l+t)%s.length])));var s,l;1===o.length&&(a=a.filter((e=>e!==n)));const c=a.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return c!==n?c:void 0}(o.map((e=>e.textValue)),r,a),l=null===(n=o.find((e=>e.textValue===s)))||void 0===n?void 0:n.ref.current;!function e(t){E.current=t,window.clearTimeout(_.current),""!==t&&(_.current=window.setTimeout((()=>e("")),1e3))}(r),l&&setTimeout((()=>l.focus()))};i.exports.useEffect((()=>()=>window.clearTimeout(_.current)),[]),i.exports.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:M8()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:M8()),T8++,()=>{1===T8&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),T8--}}),[]);const R=i.exports.useCallback((e=>{var t,n;return O.current===(null===(t=P.current)||void 0===t?void 0:t.side)&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const e=t[i].x,s=t[i].y,l=t[a].x,c=t[a].y;s>r!=c>r&&n<(l-e)*(r-s)/(c-s)+e&&(o=!o)}return o}(n,t)}(e,null===(n=P.current)||void 0===n?void 0:n.area)}),[]);return i.exports.createElement(tne,{scope:n,searchRef:E,onItemEnter:i.exports.useCallback((e=>{R(e)&&e.preventDefault()}),[R]),onItemLeave:i.exports.useCallback((e=>{var t;R(e)||(null===(t=S.current)||void 0===t||t.focus(),k(null))}),[R]),onTriggerLeave:i.exports.useCallback((e=>{R(e)&&e.preventDefault()}),[R]),pointerGraceTimerRef:L,onPointerGraceIntentChange:i.exports.useCallback((e=>{P.current=e}),[])},i.exports.createElement(M,A,i.exports.createElement(N8,{asChild:!0,trapped:o,onMountAutoFocus:a8(a,(e=>{var t;e.preventDefault(),null===(t=S.current)||void 0===t||t.focus()})),onUnmountAutoFocus:s},i.exports.createElement(L8,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:f},i.exports.createElement(Rte,mp({asChild:!0},b,{dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:w,onCurrentTabStopIdChange:k,onEntryFocus:e=>{v.isUsingKeyboardRef.current||e.preventDefault()}}),i.exports.createElement(gte,mp({role:"menu","aria-orientation":"vertical","data-state":(N=m.open,N?"open":"closed"),"data-radix-menu-content":"",dir:v.dir},y,g,{ref:C,style:{outline:"none",...g.style},onKeyDown:a8(g.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&I(e.key));const o=S.current;if(e.target!==o)return;if(!Bte.includes(e.key))return;e.preventDefault();const i=x().filter((e=>!e.disabled)).map((e=>e.ref.current));zte.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)})),onBlur:a8(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(_.current),E.current="")})),onPointerMove:a8(e.onPointerMove,dne((e=>{const t=e.target,n=T.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>T.current?"right":"left";O.current=t,T.current=e.clientX}})))})))))));var N})),sne="MenuItem",lne="menu.itemSelect",cne=i.exports.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=i.exports.useRef(null),s=Xte(sne,e.__scopeMenu),l=nne(sne,e.__scopeMenu),c=u8(t,a),u=i.exports.useRef(!1);return i.exports.createElement(une,mp({},o,{ref:c,disabled:n,onClick:a8(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(lne,{bubbles:!0,cancelable:!0});e.addEventListener(lne,(e=>null==r?void 0:r(e)),{once:!0}),v8(e,t),t.defaultPrevented?u.current=!1:s.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),u.current=!0},onPointerUp:a8(e.onPointerUp,(e=>{var t;u.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:a8(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||Dte.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),une=i.exports.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=nne(sne,n),l=Gte(n),c=i.exports.useRef(null),u=u8(t,c),[d,h]=i.exports.useState(!1),[f,p]=i.exports.useState("");return i.exports.useEffect((()=>{const e=c.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),i.exports.createElement(Fte.ItemSlot,{scope:n,disabled:r,textValue:null!=o?o:f},i.exports.createElement(Nte,mp({asChild:!0},l,{focusable:!r}),i.exports.createElement(m8.div,mp({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:u,onPointerMove:a8(e.onPointerMove,dne((e=>{if(r)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus()}}))),onPointerLeave:a8(e.onPointerLeave,dne((e=>s.onItemLeave(e)))),onFocus:a8(e.onFocus,(()=>h(!0))),onBlur:a8(e.onBlur,(()=>h(!1)))}))))}));$te("MenuRadioGroup",{value:void 0,onValueChange:()=>{}});$te("MenuItemIndicator",{checked:!1});function dne(e){return t=>"mouse"===t.pointerType?e(t):void 0}$te("MenuSub");const hne=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,l=Vte(t),[c,u]=i.exports.useState(null),d=i.exports.useRef(!1),h=w8(a),f=x8(o);return i.exports.useEffect((()=>{const e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),i.exports.createElement(fte,l,i.exports.createElement(qte,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u},i.exports.createElement(Yte,{scope:t,onClose:i.exports.useCallback((()=>h(!1)),[h]),isUsingKeyboardRef:d,dir:f,modal:s},r)))},fne=Kte,pne=rne,gne=cne,mne="ContextMenu",[vne,yne]=s8(mne,[Ute]),bne=Ute(),[xne,wne]=vne(mne);function kne(e){return t=>"mouse"!==t.pointerType?e(t):void 0}const Sne=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:a=!0}=e,[s,l]=i.exports.useState(!1),c=bne(t),u=w8(r),d=i.exports.useCallback((e=>{l(e),u(e)}),[u]);return i.exports.createElement(xne,{scope:t,open:s,onOpenChange:d,modal:a},i.exports.createElement(hne,mp({},c,{dir:o,open:s,onOpenChange:d,modal:a}),n))},Cne=i.exports.forwardRef(((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=wne("ContextMenuTrigger",n),a=bne(n),s=i.exports.useRef({x:0,y:0}),l=i.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),c=i.exports.useRef(0),u=i.exports.useCallback((()=>window.clearTimeout(c.current)),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},o.onOpenChange(!0)};return i.exports.useEffect((()=>u),[u]),i.exports.createElement(i.exports.Fragment,null,i.exports.createElement(fne,mp({},a,{virtualRef:l})),i.exports.createElement(m8.span,mp({"data-state":o.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:a8(e.onContextMenu,(e=>{u(),d(e),e.preventDefault()})),onPointerDown:a8(e.onPointerDown,kne((e=>{u(),c.current=window.setTimeout((()=>d(e)),700)}))),onPointerMove:a8(e.onPointerMove,kne(u)),onPointerCancel:a8(e.onPointerCancel,kne(u)),onPointerUp:a8(e.onPointerUp,kne(u))})))})),_ne=i.exports.forwardRef(((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=wne("ContextMenuContent",n),a=bne(n),s=i.exports.useRef(!1);return i.exports.createElement(pne,mp({},a,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:t=>{var n;null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),!t.defaultPrevented&&s.current&&t.preventDefault(),s.current=!1},onInteractOutside:t=>{var n;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||o.modal||(s.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}}))})),Ene=i.exports.forwardRef(((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=bne(n);return i.exports.createElement(gne,mp({},o,r,{ref:t}))})),Lne=c$([e=>e.gallery,e=>e.options,u9,_3],((e,t,n,r)=>{const{categories:o,currentCategory:i,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:c,galleryImageMinimumWidth:u,galleryImageObjectFit:d,shouldHoldGalleryOpen:h,shouldAutoSwitchToNewImages:f,galleryWidth:p,shouldUseSingleGalleryColumn:g}=e,{isLightBoxOpen:m}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:c,galleryImageMinimumWidth:u,galleryImageObjectFit:d,galleryGridTemplateColumns:g?"auto":`repeat(auto-fill, minmax(${u}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:h,shouldAutoSwitchToNewImages:f,images:o[i].images,areMoreImagesAvailable:o[i].areMoreImagesAvailable,currentCategory:i,galleryWidth:p,isLightBoxOpen:m,isStaging:n,shouldEnableResize:!(m||"unifiedCanvas"===r&&s),shouldUseSingleGalleryColumn:g}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Pne=c$([e=>e.options,e=>e.gallery,e=>e.system,_3],((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:OV.isEqual}}),One=i.exports.memo((e=>{const t=l5(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:o,mayDeleteImage:a,isLightBoxOpen:s,shouldUseSingleGalleryColumn:l}=c5(Pne),{image:c,isSelected:u}=e,{url:d,thumbnail:h,uuid:f,metadata:p}=c,[g,m]=i.exports.useState(!1),v=DH(),{t:y}=BZ();return ld(Sne,{onOpenChange:e=>{t(UV(e))},children:[sd(Cne,{children:ld(gI,{position:"relative",className:"hoverable-image",onMouseOver:()=>m(!0),onMouseOut:()=>m(!1),userSelect:"none",draggable:!0,onDragStart:e=>{e.dataTransfer.setData("invokeai/imageUuid",f),e.dataTransfer.effectAllowed="move"},children:[sd(_M,{className:"hoverable-image-image",objectFit:l?"contain":r,rounded:"md",src:h||d,loading:"lazy"}),sd("div",{className:"hoverable-image-content",onClick:()=>t(RV(c)),children:u&&sd(wk,{width:"50%",height:"50%",as:O5,className:"hoverable-image-check"})}),g&&o>=64&&sd("div",{className:"hoverable-image-delete-button",children:sd(V9,{image:c,children:sd(DM,{"aria-label":y("options:deleteImage"),icon:sd(a3,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!a})})})]},f)}),ld(_ne,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:e=>{e.detail.originalEvent.preventDefault()},children:[sd(Ene,{onClickCapture:()=>{t(GU(!0)),t(RV(c))},children:y("options:openInViewer")}),sd(Ene,{onClickCapture:()=>{c.metadata&&t(QU(c.metadata.image.prompt)),v({title:y("toast:promptSet"),status:"success",duration:2500,isClosable:!0})},disabled:void 0===c?.metadata?.image?.prompt,children:y("options:usePrompt")}),sd(Ene,{onClickCapture:()=>{c.metadata&&t(iV(c.metadata.image.seed)),v({title:y("toast:seedSet"),status:"success",duration:2500,isClosable:!0})},disabled:void 0===c?.metadata?.image?.seed,children:y("options:useSeed")}),sd(Ene,{onClickCapture:()=>{p&&t(NU(p)),v({title:y("toast:parametersSet"),status:"success",duration:2500,isClosable:!0})},disabled:!["txt2img","img2img"].includes(c?.metadata?.image?.type),children:y("options:useAll")}),sd(Ene,{onClickCapture:async()=>{if(p?.image?.init_image_path){if((await fetch(p.image.init_image_path)).ok)return t(AU("img2img")),t(IU(p)),void v({title:y("toast:initialImageSet"),status:"success",duration:2500,isClosable:!0})}v({title:y("toast:initialImageNotSet"),description:y("toast:initialImageNotSetDesc"),status:"error",duration:2500,isClosable:!0})},disabled:"img2img"!==c?.metadata?.image?.type,children:y("options:useInitImg")}),sd(Ene,{onClickCapture:()=>{s&&t(GU(!1)),t(VU(c)),"img2img"!==n&&t(AU("img2img")),v({title:y("toast:sentToImageToImage"),status:"success",duration:2500,isClosable:!0})},children:y("options:sendToImg2Img")}),sd(Ene,{onClickCapture:()=>{s&&t(GU(!1)),t(tX(c)),t($Y()),"unifiedCanvas"!==n&&t(AU("unifiedCanvas")),v({title:y("toast:sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},children:y("options:sendToUnifiedCanvas")}),sd(Ene,{"data-warning":!0,children:sd(V9,{image:c,children:sd("p",{children:y("options:deleteImage")})})})]})]})}),((e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected)),Tne=e=>{const{label:t,styleClass:n,...r}=e;return sd(TA,{className:`invokeai__checkbox ${n}`,...r,children:t})},Mne=320,Ane={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},training:{galleryMinWidth:200,galleryMaxWidth:500}};function Ine(){const e=l5(),{t:t}=BZ(),{images:n,currentCategory:r,currentImageUuid:o,shouldPinGallery:a,shouldShowGallery:s,galleryScrollPosition:l,galleryImageMinimumWidth:c,galleryGridTemplateColumns:u,activeTabName:d,galleryImageObjectFit:h,shouldHoldGalleryOpen:f,shouldAutoSwitchToNewImages:p,areMoreImagesAvailable:g,galleryWidth:m,isLightBoxOpen:v,isStaging:y,shouldEnableResize:b,shouldUseSingleGalleryColumn:x}=c5(Lne),{galleryMinWidth:w,galleryMaxWidth:k}=v?{galleryMinWidth:400,galleryMaxWidth:400}:Ane[d],[S,C]=i.exports.useState(m>=Mne),[_,E]=i.exports.useState(!1),[L,P]=i.exports.useState(0),O=i.exports.useRef(null),T=i.exports.useRef(null),M=i.exports.useRef(null);i.exports.useEffect((()=>{m>=Mne&&C(!1)}),[m]);const A=()=>{e(jV(!a)),e(eX(!0))},I=()=>{e(FV(!0)),a&&e(eX(!0))},R=i.exports.useCallback((()=>{e(FV(!1)),e(UV(!1)),e(HV(T.current?T.current.scrollTop:0)),setTimeout((()=>a&&e(eX(!0))),400)}),[e,a]),N=()=>{M.current&&window.clearTimeout(M.current)};n7("g",(()=>{s?R():I()}),[s,a]),n7("left",(()=>{e(BV())}),{enabled:!y||"unifiedCanvas"!==d},[y]),n7("right",(()=>{e(zV())}),{enabled:!y||"unifiedCanvas"!==d},[y]),n7("shift+g",(()=>{A()}),[a]),n7("esc",(()=>{e(FV(!1))}),{enabled:()=>!a,preventDefault:!0},[a]);return n7("shift+up",(()=>{if(c<256){const t=OV.clamp(c+32,32,256);e(WV(t))}}),[c]),n7("shift+down",(()=>{if(c>32){const t=OV.clamp(c-32,32,256);e(WV(t))}}),[c]),i.exports.useEffect((()=>{T.current&&(T.current.scrollTop=l)}),[l,s]),i.exports.useEffect((()=>{function e(e){a||!O.current||O.current.contains(e.target)||R()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[R,a]),sd(B9,{nodeRef:O,in:s||f,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ld("div",{className:"image-gallery-wrapper",style:{zIndex:a?1:100},"data-pinned":a,ref:O,onMouseLeave:a?void 0:()=>{f||(M.current=window.setTimeout((()=>R()),500))},onMouseEnter:a?void 0:N,onMouseOver:a?void 0:N,children:[ld(r4,{minWidth:w,maxWidth:a?k:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:b},size:{width:m,height:a?"100%":"100vh"},onResizeStart:(e,t,n)=>{P(n.clientHeight),n.style.height=`${n.clientHeight}px`,a&&(n.style.position="fixed",n.style.right="1rem",E(!0))},onResizeStop:(t,n,r,o)=>{const i=a?OV.clamp(Number(m)+o.width,w,Number(k)):Number(m)+o.width;e(qV(i)),r.removeAttribute("data-resize-alert"),a&&(r.style.position="relative",r.style.removeProperty("right"),r.style.setProperty("height",a?"100%":"100vh"),E(!1),e(eX(!0)))},onResize:(t,n,r,o)=>{const i=OV.clamp(Number(m)+o.width,w,Number(a?k:.95*window.innerWidth));i>=Mne&&!S?C(!0):i<Mne&&S&&C(!1),c>i-40&&e(WV(i-40)),a&&(i>=k?r.setAttribute("data-resize-alert","true"):r.removeAttribute("data-resize-alert")),r.style.height=`${L}px`},children:[ld("div",{className:"image-gallery-header",children:[sd(NM,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:ld(ad,S?{children:[sd(A3,{size:"sm","data-selected":"result"===r,onClick:()=>e(GV("result")),children:t("gallery:generations")}),sd(A3,{size:"sm","data-selected":"user"===r,onClick:()=>e(GV("user")),children:t("gallery:uploads")})]}:{children:[sd(f3,{"aria-label":t("gallery:showGenerations"),tooltip:t("gallery:showGenerations"),"data-selected":"result"===r,icon:sd(W5,{}),onClick:()=>e(GV("result"))}),sd(f3,{"aria-label":t("gallery:showUploads"),tooltip:t("gallery:showUploads"),"data-selected":"user"===r,icon:sd(u3,{}),onClick:()=>e(GV("user"))})]})}),ld("div",{className:"image-gallery-header-right-icons",children:[sd(M3,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:sd(f3,{size:"sm","aria-label":t("gallery:gallerySettings"),icon:sd(d3,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ld("div",{className:"image-gallery-settings-popover",children:[ld("div",{children:[sd(E7,{value:c,onChange:t=>{e(WV(t))},min:32,max:256,hideTooltip:!0,label:t("gallery:galleryImageSize")}),sd(f3,{size:"sm","aria-label":t("gallery:galleryImageResetSize"),tooltip:t("gallery:galleryImageResetSize"),onClick:()=>e(WV(64)),icon:sd(w7,{}),"data-selected":a,styleClass:"image-gallery-icon-btn"})]}),sd("div",{children:sd(Tne,{label:t("gallery:maintainAspectRatio"),isChecked:"contain"===h,onChange:()=>e($V("contain"===h?"cover":"contain"))})}),sd("div",{children:sd(Tne,{label:t("gallery:autoSwitchNewImages"),isChecked:p,onChange:t=>e(VV(t.target.checked))})}),sd("div",{children:sd(Tne,{label:t("gallery:singleColumnLayout"),isChecked:x,onChange:t=>e(ZV(t.target.checked))})})]})}),sd(f3,{size:"sm",className:"image-gallery-icon-btn","aria-label":t("gallery:pinGallery"),tooltip:`${t("gallery:pinGallery")} (Shift+G)`,onClick:A,icon:sd(a?w9:k9,{})})]})]}),sd("div",{className:"image-gallery-container",ref:T,children:n.length||g?ld(ad,{children:[sd("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map((e=>{const{uuid:t}=e;return sd(One,{image:e,isSelected:o===t},t)}))}),sd(IM,{onClick:()=>{e(bQ(r))},isDisabled:!g,className:"image-gallery-load-more-btn",children:t(g?"gallery:loadMore":"gallery:allImagesLoaded")})]}):ld("div",{className:"image-gallery-container-placeholder",children:[sd(t9,{}),sd("p",{children:t("gallery:noImagesInGallery")})]})})]}),_&&sd("div",{style:{width:m+"px",height:"100%"}})]})})}const Rne=c$((e=>e.gallery),(e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images}))),Nne=c$([e=>e.options,_3],((e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:o}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:o,shouldShowDualDisplayButton:["inpainting"].includes(t),activeTabName:t}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Dne=e=>{const t=l5(),{optionsPanel:n,children:r,styleClass:o}=e,{activeTabName:i,showDualDisplay:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=c5(Nne),c=(()=>{const{resultImages:e,userImages:t}=c5(Rne);return n=>{const r=e.find((e=>e.uuid===n));if(r)return r;return t.find((e=>e.uuid===n))||void 0}})();return sd("div",{className:o?`workarea-wrapper ${o}`:"workarea-wrapper",children:ld("div",{className:"workarea-main",children:[n,ld("div",{className:"workarea-children-wrapper",onDrop:e=>{const n=e.dataTransfer.getData("invokeai/imageUuid"),r=c(n);r&&("img2img"===i?t(VU(r)):"unifiedCanvas"===i&&t(tX(r)))},children:[r,l&&sd(qH,{label:"Toggle Split View",children:sd("div",{className:"workarea-split-button","data-selected":a,onClick:()=>{t(yV(!a)),t(eX(!0))},children:sd(i8,{})})})]}),!s&&sd(Ine,{})]})})};function zne(){return sd(Dne,{optionsPanel:sd(H9,{}),children:sd(o8,{})})}const Bne=()=>{const e=l5(),t=c5((e=>e.options.hiresFix)),{t:n}=BZ();return sd(SI,{gap:2,direction:"column",children:sd(b3,{label:n("options:hiresOptim"),fontSize:"md",isChecked:t,onChange:t=>e(WU(t.target.checked))})})},jne=()=>ld(SI,{gap:2,direction:"column",children:[sd(P7,{}),sd(Bne,{})]});function Fne(){const{t:e}=BZ(),t={seed:{header:`${e("options:seed")}`,feature:f7.SEED,content:sd(N7,{})},variations:{header:`${e("options:variations")}`,feature:f7.VARIATIONS,content:sd(U7,{}),additionalHeaderComponents:sd(F7,{})},face_restore:{header:`${e("options:faceRestoration")}`,feature:f7.FACE_CORRECTION,content:sd(v7,{}),additionalHeaderComponents:sd(y7,{})},upscale:{header:`${e("options:upscaling")}`,feature:f7.UPSCALE,content:sd(B7,{}),additionalHeaderComponents:sd(j7,{})},other:{header:`${e("options:otherOptions")}`,feature:f7.OTHER,content:sd(jne,{})}};return ld(F9,{children:[sd(x9,{}),sd(y9,{}),sd(Q7,{}),sd(l9,{accordionInfo:t})]})}const Hne=()=>sd("div",{className:"workarea-single-view",children:sd("div",{className:"text-to-image-area",children:sd(t8,{})})});function Wne(){return sd(Dne,{optionsPanel:sd(Fne,{}),children:sd(Hne,{})})}var $ne=function(e,t){return $ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},$ne(e,t)};var Une=function(){return Une=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Une.apply(this,arguments)};function Vne(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||t)}var Gne=function(e,t){return Number(e.toFixed(t))},qne=function(e,t,n){n&&"function"==typeof n&&n(e,t)},Zne={easeOut:function(e){return-Math.cos(e*Math.PI)/2+.5},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}},Yne=function(e){"number"==typeof e&&cancelAnimationFrame(e)},Xne=function(e){e.mounted&&(Yne(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function Kne(e,t,n,r){if(e.mounted){var o=(new Date).getTime();Xne(e),e.animation=function(){if(!e.mounted)return Yne(e.animation);var i=(new Date).getTime()-o,a=(0,Zne[t])(i/n);i>=n?(r(1),e.animation=null):e.animation&&(r(a),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Qne(e,t,n,r){var o=function(e){var t=e.scale,n=e.positionX,r=e.positionY;if(isNaN(t)||isNaN(n)||isNaN(r))return!1;return!0}(t);if(e.mounted&&o){var i=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,c=a.positionY,u=t.scale-s,d=t.positionX-l,h=t.positionY-c;0===n?i(t.scale,t.positionX,t.positionY):Kne(e,r,n,(function(e){i(s+u*e,l+d*e,c+h*e)}))}}var Jne=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,o=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var i=function(e,t,n){var r=e.offsetWidth,o=e.offsetHeight,i=t.offsetWidth*n,a=t.offsetHeight*n;return{wrapperWidth:r,wrapperHeight:o,newContentWidth:i,newDiffWidth:r-i,newContentHeight:a,newDiffHeight:o-a}}(n,r,t),a=i.wrapperWidth,s=i.wrapperHeight,l=function(e,t,n,r,o,i,a){var s=e>t?n*(a?1:.5):0,l=r>o?i*(a?1:.5):0;return{minPositionX:e-t-s,maxPositionX:s,minPositionY:r-o-l,maxPositionY:l}}(a,i.newContentWidth,i.newDiffWidth,s,i.newContentHeight,i.newDiffHeight,Boolean(o));return l},ere=function(e,t){var n=Jne(e,t);return e.bounds=n,n};function tre(e,t,n,r,o,i,a){var s=n.minPositionX,l=n.minPositionY,c=n.maxPositionX,u=n.maxPositionY,d=0,h=0;return a&&(d=o,h=i),{x:nre(e,s-d,c+d,r),y:nre(t,l-h,u+h,r)}}var nre=function(e,t,n,r){return Gne(r?e<t?t:e>n?n:e:e,2)};function rre(e,t,n,r,o,i){var a=e.transformState,s=a.scale,l=a.positionX,c=a.positionY,u=r-s;return"number"!=typeof t||"number"!=typeof n?(console.error("Mouse X and Y position were not provided!"),{x:l,y:c}):tre(l-t*u,c-n*u,o,i,0,0,null)}function ore(e,t,n,r,o){var i=t-(o?r:0);return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=i?i:e}var ire=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,o=e.wrapperComponent,i=t.target,a=null==o?void 0:o.contains(i);return!!(r&&i&&a)&&!Are(i,n)},are=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup.panning.disabled;return!(!t||!n||r)};var sre=function(e,t){var n=e.setup,r=e.transformState.scale,o=n.minScale;return t>0&&r>=o?t:0};function lre(e,t,n,r,o,i,a,s,l,c){if(o){var u;if(t>a&&n>a)return(u=a+(e-a)*c)>l?l:u<a?a:u;if(t<i&&n<i)return(u=i+(e-i)*c)<s?s:u>i?i:u}return r?t:nre(e,i,a,o)}function cre(e,t){var n=function(e){var t=e.mounted,n=e.setup,r=n.disabled,o=n.velocityAnimation,i=e.transformState.scale;return!(o.disabled&&!(i>1)&&r&&!t)}(e);if(n){var r=e.lastMousePosition,o=e.velocityTime,i=e.setup,a=e.wrapperComponent,s=i.velocityAnimation.equalToMove,l=Date.now();if(r&&o&&a){var c=function(e,t){return t?Math.min(1,e.offsetWidth/window.innerWidth):1}(a,s),u=t.x-r.x,d=t.y-r.y,h=u/c,f=d/c,p=l-o,g=u*u+d*d,m=Math.sqrt(g)/p;e.velocity={velocityX:h,velocityY:f,total:m}}e.lastMousePosition=t,e.velocityTime=l}}function ure(e,t){var n=e.transformState.scale;Xne(e),ere(e,n),t.touches?function(e,t){var n=t.touches,r=e.transformState,o=r.positionX,i=r.positionY;if(e.isPanning=!0,1===n.length){var a=n[0].clientX,s=n[0].clientY;e.startCoords={x:a-o,y:s-i}}}(e,t):function(e,t){var n=e.transformState,r=n.positionX,o=n.positionY;e.isPanning=!0;var i=t.clientX,a=t.clientY;e.startCoords={x:i-r,y:a-o}}(e,t)}function dre(e,t,n){var r=e.startCoords,o=e.setup.alignmentAnimation,i=o.sizeX,a=o.sizeY;if(r){var s=function(e,t,n){var r=e.startCoords,o=e.transformState,i=e.setup.panning,a=i.lockAxisX,s=i.lockAxisY,l=o.positionX,c=o.positionY;if(!r)return{x:l,y:c};var u=t-r.x,d=n-r.y;return{x:a?l:u,y:s?c:d}}(e,t,n),l=s.x,c=s.y,u=sre(e,i),d=sre(e,a);cre(e,{x:l,y:c}),function(e,t,n,r,o){var i=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,c=l.scale,u=l.positionX,d=l.positionY;if(a&&t!==u&&n!==d&&s){var h=tre(t,n,s,i,r,o,a),f=h.x,p=h.y;e.setTransformState(c,f,p)}}(e,l,c,u,d)}}function hre(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,o=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var i=null==r?void 0:r.getBoundingClientRect(),a=null==o?void 0:o.getBoundingClientRect(),s=(null==i?void 0:i.width)||0,l=(null==i?void 0:i.height)||0,c=(null==a?void 0:a.width)||0,u=(null==a?void 0:a.height)||0,d=s<c||l<u;!t&&n&&(null==n?void 0:n.total)>.1&&d?function(e){var t=e.velocity,n=e.bounds,r=e.setup,o=e.wrapperComponent,i=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,o=e.setup,i=o.disabled,a=o.velocityAnimation,s=e.transformState.scale;return!(a.disabled&&!(s>1)&&i&&!t||!n||!r)}(e);if(i&&t&&n&&o){var a=t.velocityX,s=t.velocityY,l=t.total,c=n.maxPositionX,u=n.minPositionX,d=n.maxPositionY,h=n.minPositionY,f=r.limitToBounds,p=r.alignmentAnimation,g=r.zoomAnimation,m=r.panning,v=m.lockAxisY,y=m.lockAxisX,b=g.animationType,x=p.sizeX,w=p.sizeY,k=p.velocityAlignmentTime,S=function(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,o=n.animationTime,i=n.sensitivity;return r?o*t*i:o}(e,l),C=Math.max(S,k),_=sre(e,x),E=sre(e,w),L=_*o.offsetWidth/100,P=E*o.offsetHeight/100,O=c+L,T=u-L,M=d+P,A=h-P,I=e.transformState,R=(new Date).getTime();Kne(e,b,C,(function(t){var n=e.transformState,r=n.scale,o=n.positionX,i=n.positionY,l=((new Date).getTime()-R)/k,g=1-(0,Zne[p.animationType])(Math.min(1,l)),m=1-t,b=o+a*m,x=i+s*m,w=lre(b,I.positionX,o,y,f,u,c,T,O,g),S=lre(x,I.positionY,i,v,f,h,d,A,M,g);o===b&&i===x||e.setTransformState(r,w,S)}))}}(e):fre(e)}}function fre(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,o=n.alignmentAnimation,i=o.disabled,a=o.sizeX,s=o.sizeY,l=o.animationTime,c=o.animationType;if(!(i||t<r||!a&&!s)){var u=function(e){var t=e.transformState,n=t.positionX,r=t.positionY,o=t.scale,i=e.setup,a=i.disabled,s=i.limitToBounds,l=i.centerZoomedOut,c=e.wrapperComponent;if(!a&&c&&e.bounds){var u=e.bounds,d=u.maxPositionX,h=u.minPositionX,f=u.maxPositionY,p=u.minPositionY,g=n>d||n<h,m=r>f||r<p,v=rre(e,n>d?c.offsetWidth:e.setup.minPositionX||0,r>f?c.offsetHeight:e.setup.minPositionY||0,o,e.bounds,s||l),y=v.x,b=v.y;return{scale:o,positionX:g?y:n,positionY:m?b:r}}}(e);u&&Qne(e,u,l,c)}}function pre(e,t,n){var r=e.transformState.scale,o=e.wrapperComponent,i=e.setup,a=i.minScale,s=i.limitToBounds,l=i.zoomAnimation,c=l.disabled,u=l.animationTime,d=l.animationType,h=c||r>=a;if((r>=1||s)&&fre(e),!h&&o&&e.mounted){var f=gre(e,a,t||o.offsetWidth/2,n||o.offsetHeight/2);f&&Qne(e,f,u,d)}}function gre(e,t,n,r){var o=e.setup,i=o.minScale,a=o.maxScale,s=o.limitToBounds,l=ore(Gne(t,2),i,a,0,!1),c=rre(e,n,r,l,ere(e,l),s);return{scale:l,positionX:c.x,positionY:c.y}}var mre={previousScale:1,scale:1,positionX:0,positionY:0},vre=Une(Une({},mre),{setComponents:function(){},contextInstance:null}),yre={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}},bre=function(e){var t,n,r,o;return{previousScale:null!==(t=e.initialScale)&&void 0!==t?t:mre.scale,scale:null!==(n=e.initialScale)&&void 0!==n?n:mre.scale,positionX:null!==(r=e.initialPositionX)&&void 0!==r?r:mre.positionX,positionY:null!==(o=e.initialPositionY)&&void 0!==o?o:mre.positionY}},xre=function(e){var t=Une({},yre);return Object.keys(e).forEach((function(n){var r=void 0!==e[n];if(void 0!==yre[n]&&r){var o=Object.prototype.toString.call(yre[n]),i="[object Object]"===o,a="[object Array]"===o;t[n]=i?Une(Une({},yre[n]),e[n]):a?Vne(Vne([],yre[n]),e[n]):e[n]}})),t},wre=function(e,t,n){var r=e.transformState.scale,o=e.wrapperComponent,i=e.setup,a=i.maxScale,s=i.minScale,l=i.zoomAnimation.size;if(!o)throw new Error("Wrapper is not mounted");var c=r*Math.exp(t*n);return ore(Gne(c,3),s,a,l,!1)};function kre(e,t,n,r,o){var i=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,c=a.positionY;if(!i)return console.error("No WrapperComponent found");var u=(i.offsetWidth/2-l)/s,d=(i.offsetHeight/2-c)/s,h=gre(e,wre(e,t,n),u,d);if(!h)return console.error("Error during zoom event. New transformation state was not calculated.");Qne(e,h,r,o)}function Sre(e,t,n){var r=e.setup,o=e.wrapperComponent,i=r.limitToBounds,a=bre(e.props),s=e.transformState,l=s.scale,c=s.positionX,u=s.positionY;if(o){var d=Jne(e,a.scale),h=tre(a.positionX,a.positionY,d,i,0,0,o),f={scale:a.scale,positionX:h.x,positionY:h.y};l===a.scale&&c===a.positionX&&u===a.positionY||Qne(e,f,t,n)}}var Cre=function(e){return function(t,n,r){void 0===t&&(t=.5),void 0===n&&(n=300),void 0===r&&(r="easeOut"),kre(e,1,t,n,r)}},_re=function(e){return function(t,n,r){void 0===t&&(t=.5),void 0===n&&(n=300),void 0===r&&(r="easeOut"),kre(e,-1,t,n,r)}},Ere=function(e){return function(t,n,r,o,i){void 0===o&&(o=300),void 0===i&&(i="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,c=a.scale,u=e.wrapperComponent,d=e.contentComponent;if(!e.setup.disabled&&u&&d){var h={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?c:r};Qne(e,h,o,i)}}},Lre=function(e){return function(t,n){void 0===t&&(t=200),void 0===n&&(n="easeOut"),Sre(e,t,n)}},Pre=function(e){return function(t,n,r){void 0===n&&(n=200),void 0===r&&(r="easeOut");var o=e.transformState,i=e.wrapperComponent,a=e.contentComponent;if(i&&a){var s=Nre(t||o.scale,i,a);Qne(e,s,n,r)}}},Ore=function(e){return function(t,n,r,o){void 0===r&&(r=600),void 0===o&&(o="easeOut"),Xne(e);var i=e.wrapperComponent,a="string"==typeof t?document.getElementById(t):t;if(i&&function(e){return e?void 0!==(null==e?void 0:e.offsetWidth)&&void 0!==(null==e?void 0:e.offsetHeight)||(console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1):(console.error("Zoom node not found"),!1)}(a)&&a&&i.contains(a)){var s=function(e,t,n){var r=e.wrapperComponent,o=e.setup,i=o.limitToBounds,a=o.minScale,s=o.maxScale;if(!r)return mre;var l=r.getBoundingClientRect(),c=function(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}(t),u=c.x,d=c.y,h=t.offsetWidth,f=t.offsetHeight,p=r.offsetWidth/h,g=r.offsetHeight/f,m=ore(n||Math.min(p,g),a,s,0,!1),v=(l.width-h*m)/2,y=(l.height-f*m)/2,b=tre((l.left-u)*m+v,(l.top-d)*m+y,Jne(e,m),i,0,0,r);return{positionX:b.x,positionY:b.y,scale:m}}(e,a,n);Qne(e,s,r,o)}}},Tre=function(e){return{instance:e,state:e.transformState,zoomIn:Cre(e),zoomOut:_re(e),setTransform:Ere(e),resetTransform:Lre(e),centerView:Pre(e),zoomToElement:Ore(e)}};function Mre(){try{return{get passive(){return!0,!1}}}catch($le){return!1}}var Are=function(e,t){var n=e.tagName.toUpperCase();return!!t.find((function(e){return e.toUpperCase()===n}))||!!t.find((function(t){return e.classList.contains(t)}))},Ire=function(e){e&&clearTimeout(e)},Rre=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},Nre=function(e,t,n){var r=n.offsetWidth*e,o=n.offsetHeight*e;return{scale:e,positionX:(t.offsetWidth-r)/2,positionY:(t.offsetHeight-o)/2}},Dre=function(e,t){var n=e.setup.wheel,r=n.disabled,o=n.wheelDisabled,i=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,c=t.target;return!(!s||l||r||!c)&&(!(o&&!t.ctrlKey)&&((!i||!t.ctrlKey)&&!Are(c,a)))};function zre(e,t,n){var r=t.getBoundingClientRect(),o=0,i=0;if("clientX"in e)o=(e.clientX-r.left)/n,i=(e.clientY-r.top)/n;else{var a=e.touches[0];o=(a.clientX-r.left)/n,i=(a.clientY-r.top)/n}return(isNaN(o)||isNaN(i))&&console.error("No mouse or touch offset found"),{x:o,y:i}}var Bre=function(e,t){var n=e.setup.pinch,r=n.disabled,o=n.excluded,i=e.isInitialized,a=t.target;return!(!i||r||!a)&&!Are(a,o)},jre=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance;return!(!n||t||!r)},Fre=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))},Hre=function(e,t){var n=e.props,r=n.onWheelStart,o=n.onZoomStart;e.wheelStopEventTimer||(Xne(e),qne(Tre(e),t,r),qne(Tre(e),t,o))},Wre=function(e,t){var n=e.props,r=n.onWheel,o=n.onZoom,i=e.contentComponent,a=e.setup,s=e.transformState.scale,l=a.limitToBounds,c=a.centerZoomedOut,u=a.zoomAnimation,d=a.wheel,h=u.size,f=u.disabled,p=d.step;if(!i)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var g=function(e,t){var n,r,o=e?e.deltaY<0?1:-1:0;return r=o,"number"==typeof(n=t)?n:r}(t,null),m=function(e,t,n,r,o){var i=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,c=s.minScale,u=s.zoomAnimation,d=u.size,h=u.disabled;if(!a)throw new Error("Wrapper is not mounted");var f=i+t*(i-i*n)*n;if(o)return f;var p=!r&&!h;return ore(Gne(f,3),c,l,d,p)}(e,g,p,!t.ctrlKey);if(s!==m){var v=ere(e,m),y=zre(t,i,s),b=l&&(f||0===h||c),x=rre(e,y.x,y.y,m,v,b),w=x.x,k=x.y;e.previousWheelEvent=t,e.setTransformState(m,w,k),qne(Tre(e),t,r),qne(Tre(e),t,o)}},$re=function(e,t){var n=e.props,r=n.onWheelStop,o=n.onZoomStop;Ire(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout((function(){e.mounted&&(pre(e,t.x,t.y),e.wheelAnimationTimer=null)}),100);var i=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,o=e.setup,i=o.maxScale,a=o.minScale;return!!n&&(r<i||r>a||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaY<t.deltaY||n.deltaY<0&&n.deltaY>t.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY))}(e,t);i&&(Ire(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout((function(){e.mounted&&(e.wheelStopEventTimer=null,qne(Tre(e),t,r),qne(Tre(e),t,o))}),160))},Ure=function(e,t){var n=Fre(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,Xne(e)},Vre=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,o=e.transformState.scale,i=e.setup,a=i.limitToBounds,s=i.centerZoomedOut,l=i.zoomAnimation,c=l.disabled,u=l.size;if(null!==r&&n){var d=function(e,t,n){var r=n.getBoundingClientRect(),o=e.touches,i=Gne(o[0].clientX-r.left,5),a=Gne(o[0].clientY-r.top,5);return{x:(i+Gne(o[1].clientX-r.left,5))/2/t,y:(a+Gne(o[1].clientY-r.top,5))/2/t}}(t,o,n);if(isFinite(d.x)&&isFinite(d.y)){var h=Fre(t),f=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,o=e.setup,i=o.maxScale,a=o.minScale,s=o.zoomAnimation,l=s.size,c=s.disabled;if(!n||null===r||!t)throw new Error("Pinch touches distance was not provided");return t<0?e.transformState.scale:ore(Gne(t/r*n,2),a,i,l,!c)}(e,h);if(f!==o){var p=ere(e,f),g=a&&(c||0===u||s),m=rre(e,d.x,d.y,f,p,g),v=m.x,y=m.y;e.pinchMidpoint=d,e.lastDistance=h,e.setTransformState(f,v,y)}}}},Gre=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,pre(e,null==t?void 0:t.x,null==t?void 0:t.y)};function qre(e,t){var n=e.setup.doubleClick,r=n.disabled,o=n.mode,i=n.step,a=n.animationTime,s=n.animationType;if(!r){if("reset"===o)return Sre(e,a,s);var l=e.transformState.scale,c=e.contentComponent;if(!c)return console.error("No ContentComponent found");var u=wre(e,"zoomOut"===o?-1:1,i),d=zre(t,c,l),h=gre(e,u,d.x,d.y);if(!h)return console.error("Error during zoom event. New transformation state was not calculated.");Qne(e,h,a,s)}}var Zre=function(e,t){var n=e.isInitialized,r=e.setup,o=e.wrapperComponent,i=r.doubleClick,a=i.disabled,s=i.excluded,l=t.target,c=null==o?void 0:o.contains(l),u=n&&l&&c&&!a;return!!u&&(!Are(l,s)&&!!u)},Yre=F.createContext(vre),Xre=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mounted=!0,t.transformState=bre(t.props),t.setup=xre(t.props),t.wrapperComponent=null,t.contentComponent=null,t.isInitialized=!1,t.bounds=null,t.previousWheelEvent=null,t.wheelStopEventTimer=null,t.wheelAnimationTimer=null,t.isPanning=!1,t.startCoords=null,t.lastTouch=null,t.distance=null,t.lastDistance=null,t.pinchStartDistance=null,t.pinchStartScale=null,t.pinchMidpoint=null,t.velocity=null,t.velocityTime=null,t.lastMousePosition=null,t.animate=!1,t.animation=null,t.maxBounds=null,t.pressedKeys={},t.handleInitializeWrapperEvents=function(e){var n=Mre();e.addEventListener("wheel",t.onWheelZoom,n),e.addEventListener("dblclick",t.onDoubleClick,n),e.addEventListener("touchstart",t.onTouchPanningStart,n),e.addEventListener("touchmove",t.onTouchPanning,n),e.addEventListener("touchend",t.onTouchPanningStop,n)},t.handleInitialize=function(){var e=t.setup.centerOnInit;t.applyTransformation(),t.forceUpdate(),e&&(setTimeout((function(){t.mounted&&t.setCenter()}),50),setTimeout((function(){t.mounted&&t.setCenter()}),100),setTimeout((function(){t.mounted&&t.setCenter()}),200))},t.onWheelZoom=function(e){t.setup.disabled||Dre(t,e)&&t.isPressingKeys(t.setup.wheel.activationKeys)&&(Hre(t,e),Wre(t,e),$re(t,e))},t.onPanningStart=function(e){var n=t.setup.disabled,r=t.props.onPanningStart;n||ire(t,e)&&t.isPressingKeys(t.setup.panning.activationKeys)&&(e.preventDefault(),e.stopPropagation(),Xne(t),ure(t,e),qne(Tre(t),e,r))},t.onPanning=function(e){var n=t.setup.disabled,r=t.props.onPanning;n||are(t)&&t.isPressingKeys(t.setup.panning.activationKeys)&&(e.preventDefault(),e.stopPropagation(),dre(t,e.clientX,e.clientY),qne(Tre(t),e,r))},t.onPanningStop=function(e){var n=t.props.onPanningStop;t.isPanning&&(hre(t),qne(Tre(t),e,n))},t.onPinchStart=function(e){var n=t.setup.disabled,r=t.props,o=r.onPinchingStart,i=r.onZoomStart;n||Bre(t,e)&&(Ure(t,e),Xne(t),qne(Tre(t),e,o),qne(Tre(t),e,i))},t.onPinch=function(e){var n=t.setup.disabled,r=t.props,o=r.onPinching,i=r.onZoom;n||jre(t)&&(e.preventDefault(),e.stopPropagation(),Vre(t,e),qne(Tre(t),e,o),qne(Tre(t),e,i))},t.onPinchStop=function(e){var n=t.props,r=n.onPinchingStop,o=n.onZoomStop;t.pinchStartScale&&(Gre(t),qne(Tre(t),e,r),qne(Tre(t),e,o))},t.onTouchPanningStart=function(e){var n=t.setup.disabled,r=t.props.onPanningStart;if(!n&&ire(t,e))if(t.lastTouch&&+new Date-t.lastTouch<200&&1===e.touches.length)t.onDoubleClick(e);else{t.lastTouch=+new Date,Xne(t);var o=e.touches,i=1===o.length,a=2===o.length;i&&(Xne(t),ure(t,e),qne(Tre(t),e,r)),a&&t.onPinchStart(e)}},t.onTouchPanning=function(e){var n=t.setup.disabled,r=t.props.onPanning;if(t.isPanning&&1===e.touches.length){if(n)return;if(!are(t))return;e.preventDefault(),e.stopPropagation();var o=e.touches[0];dre(t,o.clientX,o.clientY),qne(Tre(t),e,r)}else e.touches.length>1&&t.onPinch(e)},t.onTouchPanningStop=function(e){t.onPanningStop(e),t.onPinchStop(e)},t.onDoubleClick=function(e){t.setup.disabled||Zre(t,e)&&qre(t,e)},t.clearPanning=function(e){t.isPanning&&t.onPanningStop(e)},t.setKeyPressed=function(e){t.pressedKeys[e.key]=!0},t.setKeyUnPressed=function(e){t.pressedKeys[e.key]=!1},t.isPressingKeys=function(e){return!e.length||Boolean(e.find((function(e){return t.pressedKeys[e]})))},t.setComponents=function(e,n){t.wrapperComponent=e,t.contentComponent=n,ere(t,t.transformState.scale),t.handleInitializeWrapperEvents(e),t.handleInitialize(),t.handleRef(),t.isInitialized=!0,qne(Tre(t),void 0,t.props.onInit)},t.setTransformState=function(e,n,r){isNaN(e)||isNaN(n)||isNaN(r)?console.error("Detected NaN set state values"):(e!==t.transformState.scale&&(t.transformState.previousScale=t.transformState.scale,t.transformState.scale=e),t.transformState.positionX=n,t.transformState.positionY=r,t.applyTransformation())},t.setCenter=function(){if(t.wrapperComponent&&t.contentComponent){var e=Nre(t.transformState.scale,t.wrapperComponent,t.contentComponent);t.setTransformState(e.scale,e.positionX,e.positionY)}},t.applyTransformation=function(){if(t.mounted&&t.contentComponent){var e=t.transformState,n=e.scale,r=e.positionX,o=e.positionY,i=Rre(r,o,n);t.contentComponent.style.transform=i,t.handleRef()}},t.handleRef=function(){t.props.setRef(Tre(t))},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}$ne(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){var e=Mre();window.addEventListener("mousedown",this.onPanningStart,e),window.addEventListener("mousemove",this.onPanning,e),window.addEventListener("mouseup",this.onPanningStop,e),document.addEventListener("mouseleave",this.clearPanning,e),window.addEventListener("keyup",this.setKeyUnPressed,e),window.addEventListener("keydown",this.setKeyPressed,e),this.handleRef()},t.prototype.componentWillUnmount=function(){var e=Mre();window.removeEventListener("mousedown",this.onPanningStart,e),window.removeEventListener("mousemove",this.onPanning,e),window.removeEventListener("mouseup",this.onPanningStop,e),window.removeEventListener("keyup",this.setKeyUnPressed,e),window.removeEventListener("keydown",this.setKeyPressed,e),Xne(this)},t.prototype.componentDidUpdate=function(e){e!==this.props&&(ere(this,this.transformState.scale),this.setup=xre(this.props))},t.prototype.render=function(){var e=Tre(this),t=this.props.children,n="function"==typeof t?t(e):t;return sd(Yre.Provider,{value:Une(Une({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:n})},t}(i.exports.Component),Kre=F.forwardRef((function(e,t){var n=i.exports.useState(null),r=n[0],o=n[1];return i.exports.useImperativeHandle(t,(function(){return r}),[r]),sd(Xre,{...Une({},e,{setRef:o})})}));var Qre="transform-component-module_wrapper__1_Fgj",Jre="transform-component-module_content__2jYgh";!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".transform-component-module_wrapper__1_Fgj {\n position: relative;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n overflow: hidden;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n margin: 0;\n padding: 0;\n}\n.transform-component-module_content__2jYgh {\n display: flex;\n flex-wrap: wrap;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n margin: 0;\n padding: 0;\n transform-origin: 0% 0%;\n}\n.transform-component-module_content__2jYgh img {\n pointer-events: none;\n}\n");var eoe=function(e){var t=e.children,n=e.wrapperClass,r=void 0===n?"":n,o=e.contentClass,a=void 0===o?"":o,s=e.wrapperStyle,l=e.contentStyle,c=i.exports.useContext(Yre).setComponents,u=i.exports.useRef(null),d=i.exports.useRef(null);return i.exports.useEffect((function(){var e=u.current,t=d.current;null!==e&&null!==t&&c&&c(e,t)}),[]),sd("div",{ref:u,className:"react-transform-wrapper "+Qre+" "+r,style:s,children:sd("div",{ref:d,className:"react-transform-component "+Jre+" "+a,style:l,children:t})})};function toe({image:e,alt:t,ref:n,styleClass:r}){const[o,a]=i.exports.useState(0),[s,l]=i.exports.useState(!1),c=()=>{a(-3===o?0:o-1)},u=()=>{a(3===o?0:o+1)},d=()=>{l(!s)};return sd(Kre,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:({zoomIn:i,zoomOut:h,resetTransform:f,centerView:p})=>ld(ad,{children:[ld("div",{className:"lightbox-image-options",children:[sd(f3,{icon:sd(C7,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>i(),fontSize:20}),sd(f3,{icon:sd(_7,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>h(),fontSize:20}),sd(f3,{icon:sd(k7,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:c,fontSize:20}),sd(f3,{icon:sd(S7,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),sd(f3,{icon:sd(e9,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:d,fontSize:20}),sd(f3,{icon:sd(w7,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{f(),a(0),l(!1)},fontSize:20})]}),sd(eoe,{wrapperStyle:{width:"100%",height:"100%"},children:sd("img",{style:{transform:`rotate(${90*o}deg) scaleX(${s?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>p(1,0,"easeOut")})})]})})}function noe(){const e=l5(),t=c5((e=>e.options.isLightBoxOpen)),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:o,isOnLastImage:a}=c5(Q9),[s,l]=i.exports.useState(!1),c=()=>{l(!0)},u=()=>{l(!1)};return n7("Esc",(()=>{t&&e(GU(!1))}),[t]),ld("div",{className:"lightbox-container",children:[sd(f3,{icon:sd(x7,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(GU(!1))},fontSize:20}),ld("div",{className:"lightbox-display-container",children:[ld("div",{className:"lightbox-preview-wrapper",children:[sd(q9,{}),!r&&ld("div",{className:"current-image-next-prev-buttons",children:[sd("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:c,onMouseOut:u,children:s&&!o&&sd(DM,{"aria-label":"Previous image",icon:sd(k5,{className:"next-prev-button"}),variant:"unstyled",onClick:()=>{e(BV())}})}),sd("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:c,onMouseOut:u,children:s&&!a&&sd(DM,{"aria-label":"Next image",icon:sd(S5,{className:"next-prev-button"}),variant:"unstyled",onClick:()=>{e(zV())}})})]}),n&&ld(ad,{children:[sd(toe,{image:n.url,styleClass:"lightbox-image"}),r&&sd(K9,{image:n})]})]}),sd(Ine,{})]})]})}const roe=c$([E3],(e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:o}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:o}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),ooe=()=>{const e=l5(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:o}=c5(roe),{t:i}=BZ();return ld(SI,{direction:"column",gap:"1rem",children:[sd(E7,{sliderMarkRightOffset:-6,label:i("options:seamSize"),min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:t=>{e(nV(t))},handleReset:()=>e(nV(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),sd(E7,{sliderMarkRightOffset:-4,label:i("options:seamBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:t=>{e(eV(t))},handleReset:()=>{e(eV(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),sd(E7,{sliderMarkRightOffset:-7,label:i("options:seamStrength"),min:.01,max:.99,step:.01,value:r,onChange:t=>{e(oV(t))},handleReset:()=>{e(oV(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),sd(E7,{sliderMarkRightOffset:-4,label:i("options:seamSteps"),min:1,max:32,sliderNumberInputProps:{max:100},value:o,onChange:t=>{e(rV(t))},handleReset:()=>{e(rV(10))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},ioe=c$(c9,(e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),aoe=()=>{const e=l5(),{boundingBoxDimensions:t}=c5(ioe),{t:n}=BZ();return ld(SI,{direction:"column",gap:"1rem",children:[sd(E7,{label:n("options:width"),min:64,max:1024,step:64,value:t.width,onChange:n=>{e(GY({...t,width:Math.floor(n)}))},handleReset:()=>{e(GY({...t,width:Math.floor(512)}))},sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),sd(E7,{label:n("options:height"),min:64,max:1024,step:64,value:t.height,onChange:n=>{e(GY({...t,height:Math.floor(n)}))},handleReset:()=>{e(GY({...t,height:Math.floor(512)}))},sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},soe=c$(c9,(e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});function loe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=c5(soe),n=l5(),{t:r}=BZ();return ld(SI,{alignItems:"center",columnGap:"1rem",children:[sd(E7,{label:r("options:inpaintReplace"),value:e,onChange:e=>{n(nX(e))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(nX(1)),isResetDisabled:!t}),sd(b3,{isChecked:t,onChange:e=>n(OX(e.target.checked)),marginTop:"1.25rem"})]})}const coe=c$([E3,S3,c9],((e,t,n)=>{const{tileSize:r,infillMethod:o}=e,{infill_methods:i}=t,{boundingBoxScaleMethod:a,scaledBoundingBoxDimensions:s}=n;return{boundingBoxScale:a,scaledBoundingBoxDimensions:s,tileSize:r,infillMethod:o,availableInfillMethods:i,isManual:"manual"===a}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),uoe=()=>{const e=l5(),{tileSize:t,infillMethod:n,availableInfillMethods:r,boundingBoxScale:o,isManual:i,scaledBoundingBoxDimensions:a}=c5(coe),{t:s}=BZ();return ld(SI,{direction:"column",gap:"1rem",children:[sd(x3,{label:s("options:scaleBeforeProcessing"),validValues:bY,value:o,onChange:t=>{e(ZY(t.target.value))}}),sd(E7,{isInputDisabled:!i,isResetDisabled:!i,isSliderDisabled:!i,label:s("options:scaledWidth"),min:64,max:1024,step:64,value:a.width,onChange:t=>{e(DX({...a,width:Math.floor(t)}))},handleReset:()=>{e(DX({...a,width:Math.floor(512)}))},sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),sd(E7,{isInputDisabled:!i,isResetDisabled:!i,isSliderDisabled:!i,label:s("options:scaledHeight"),min:64,max:1024,step:64,value:a.height,onChange:t=>{e(DX({...a,height:Math.floor(t)}))},handleReset:()=>{e(DX({...a,height:Math.floor(512)}))},sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),sd(loe,{}),sd(x3,{label:s("options:infillMethod"),value:n,validValues:r,onChange:t=>e(UU(t.target.value))}),sd(E7,{isInputDisabled:"tile"!==n,isResetDisabled:"tile"!==n,isSliderDisabled:"tile"!==n,sliderMarkRightOffset:-4,label:s("options:tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:t=>{e(wV(t))},handleReset:()=>{e(wV(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})};function doe(){const{t:e}=BZ(),t={boundingBox:{header:`${e("options:boundingBoxHeader")}`,feature:f7.BOUNDING_BOX,content:sd(aoe,{})},seamCorrection:{header:`${e("options:seamCorrectionHeader")}`,feature:f7.SEAM_CORRECTION,content:sd(ooe,{})},infillAndScaling:{header:`${e("options:infillScalingHeader")}`,feature:f7.INFILL_AND_SCALING,content:sd(uoe,{})},seed:{header:`${e("options:seed")}`,feature:f7.SEED,content:sd(N7,{})},variations:{header:`${e("options:variations")}`,feature:f7.VARIATIONS,content:sd(U7,{}),additionalHeaderComponents:sd(F7,{})}};return ld(F9,{children:[sd(x9,{}),sd(y9,{}),sd(Q7,{}),sd(L7,{label:e("options:img2imgStrength"),styleClass:"main-option-block image-to-image-strength-main-option"}),sd(l9,{accordionInfo:t})]})}const hoe=c$(c9,d9,_3,((e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:o}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:o}})),foe=()=>{const e=l5(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:o}=c5(hoe),a=i.exports.useRef(null);return i.exports.useLayoutEffect((()=>{window.setTimeout((()=>{if(!a.current)return;const{clientWidth:t,clientHeight:n}=a.current;e(KY({width:t,height:n})),e(o?UY():$Y()),e(eX(!1))}),0)}),[e,r,t,n,o]),sd("div",{ref:a,className:"inpainting-canvas-area",children:sd(dM,{thickness:"2px",speed:"1s",size:"xl"})})};var poe={exports:{}},goe=function(e){var t={},n=i.exports,r=V.exports,o=Object.assign;function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),w=Symbol.iterator;function k(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=w&&e[w]||e["@@iterator"])?e:null}function S(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case u:return"Fragment";case c:return"Portal";case h:return"Profiler";case d:return"StrictMode";case m:return"Suspense";case v:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case p:return(e.displayName||"Context")+".Consumer";case f:return(e._context.displayName||"Context")+".Provider";case g:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case y:return null!==(t=e.displayName||null)?t:S(e.type)||"Memo";case b:t=e._payload,e=e._init;try{return S(e(t))}catch(tae){}}return null}function C(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=(e=t.render).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 S(t);case 8:return t===d?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function _(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function E(e){if(_(e)!==e)throw Error(a(188))}function L(e){var t=e.alternate;if(!t){if(null===(t=_(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return E(o),e;if(i===r)return E(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}function P(e){return null!==(e=L(e))?O(e):null}function O(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=O(e);if(null!==t)return t;e=e.sibling}return null}function T(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){if(4!==e.tag){var t=T(e);if(null!==t)return t}e=e.sibling}return null}var M,A=Array.isArray,I=e.getPublicInstance,R=e.getRootHostContext,N=e.getChildHostContext,D=e.prepareForCommit,z=e.resetAfterCommit,B=e.createInstance,j=e.appendInitialChild,F=e.finalizeInitialChildren,H=e.prepareUpdate,W=e.shouldSetTextContent,$=e.createTextInstance,U=e.scheduleTimeout,G=e.cancelTimeout,q=e.noTimeout,Z=e.isPrimaryRenderer,Y=e.supportsMutation,X=e.supportsPersistence,K=e.supportsHydration,Q=e.getInstanceFromNode,J=e.preparePortalMount,ee=e.getCurrentEventPriority,te=e.detachDeletedInstance,ne=e.supportsMicrotasks,re=e.scheduleMicrotask,oe=e.supportsTestSelectors,ie=e.findFiberRoot,ae=e.getBoundingRect,se=e.getTextContent,le=e.isHiddenSubtree,ce=e.matchAccessibilityRole,ue=e.setFocusIfFocusable,de=e.setupIntersectionObserver,he=e.appendChild,fe=e.appendChildToContainer,pe=e.commitTextUpdate,ge=e.commitMount,me=e.commitUpdate,ve=e.insertBefore,ye=e.insertInContainerBefore,be=e.removeChild,xe=e.removeChildFromContainer,we=e.resetTextContent,ke=e.hideInstance,Se=e.hideTextInstance,Ce=e.unhideInstance,_e=e.unhideTextInstance,Ee=e.clearContainer,Le=e.cloneInstance,Pe=e.createContainerChildSet,Oe=e.appendChildToContainerChildSet,Te=e.finalizeContainerChildren,Me=e.replaceContainerChildren,Ae=e.cloneHiddenInstance,Ie=e.cloneHiddenTextInstance,Re=e.canHydrateInstance,Ne=e.canHydrateTextInstance,De=e.canHydrateSuspenseInstance,ze=e.isSuspenseInstancePending,Be=e.isSuspenseInstanceFallback,je=e.getSuspenseInstanceFallbackErrorDetails,Fe=e.registerSuspenseInstanceRetry,He=e.getNextHydratableSibling,We=e.getFirstHydratableChild,$e=e.getFirstHydratableChildWithinContainer,Ue=e.getFirstHydratableChildWithinSuspenseInstance,Ve=e.hydrateInstance,Ge=e.hydrateTextInstance,qe=e.hydrateSuspenseInstance,Ze=e.getNextHydratableInstanceAfterSuspenseInstance,Ye=e.commitHydratedContainer,Xe=e.commitHydratedSuspenseInstance,Ke=e.clearSuspenseBoundary,Qe=e.clearSuspenseBoundaryFromContainer,Je=e.shouldDeleteUnhydratedTailInstances,et=e.didNotMatchHydratedContainerTextInstance,tt=e.didNotMatchHydratedTextInstance;function nt(e){if(void 0===M)try{throw Error()}catch(tae){var t=tae.stack.trim().match(/\n( *(at )?)/);M=t&&t[1]||""}return"\n"+M+e}var rt=!1;function ot(e,t){if(!e||rt)return"";rt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(N2){var r=N2}Reflect.construct(e,[],t)}else{try{t.call()}catch(N2){r=N2}e.call(t.prototype)}else{try{throw Error()}catch(N2){r=N2}e()}}catch(N2){if(N2&&r&&"string"==typeof N2.stack){for(var o=N2.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{rt=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?nt(e):""}var it=Object.prototype.hasOwnProperty,at=[],st=-1;function lt(e){return{current:e}}function ct(e){0>st||(e.current=at[st],at[st]=null,st--)}function ut(e,t){st++,at[st]=e.current,e.current=t}var dt={},ht=lt(dt),ft=lt(!1),pt=dt;function gt(e,t){var n=e.type.contextTypes;if(!n)return dt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function mt(e){return null!=(e=e.childContextTypes)}function vt(){ct(ft),ct(ht)}function yt(e,t,n){if(ht.current!==dt)throw Error(a(168));ut(ht,t),ut(ft,n)}function bt(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,C(e)||"Unknown",i));return o({},n,r)}function xt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dt,pt=ht.current,ut(ht,e),ut(ft,ft.current),!0}function wt(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=bt(e,t,pt),r.__reactInternalMemoizedMergedChildContext=e,ct(ft),ct(ht),ut(ht,e)):ct(ft),ut(ft,n)}var kt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(St(e)/Ct|0)|0},St=Math.log,Ct=Math.LN2;var _t=64,Et=4194304;function Lt(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=Lt(s):0!==(i&=a)&&(r=Lt(i))}else 0!==(a=n&~o)?r=Lt(a):0!==i&&(r=Lt(i));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!=(4194240&i)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-kt(t)),r|=e[n],t&=~o;return r}function Ot(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;default:return-1}}function Tt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Mt(){var e=_t;return 0==(4194240&(_t<<=1))&&(_t=64),e}function At(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function It(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-kt(t)]=n}function Rt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Nt=0;function Dt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var zt=r.unstable_scheduleCallback,Bt=r.unstable_cancelCallback,jt=r.unstable_shouldYield,Ft=r.unstable_requestPaint,Ht=r.unstable_now,Wt=r.unstable_ImmediatePriority,$t=r.unstable_UserBlockingPriority,Ut=r.unstable_NormalPriority,Vt=r.unstable_IdlePriority,Gt=null,qt=null;var Zt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Yt=null,Xt=!1,Qt=!1;function Jt(e){null===Yt?Yt=[e]:Yt.push(e)}function en(){if(!Qt&&null!==Yt){Qt=!0;var e=0,t=Nt;try{var n=Yt;for(Nt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Yt=null,Xt=!1}catch(T2){throw null!==Yt&&(Yt=Yt.slice(e+1)),zt(Wt,en),T2}finally{Nt=t,Qt=!1}}return null}var tn=[],nn=0,rn=null,on=0,an=[],sn=0,ln=null,cn=1,un="";function dn(e,t){tn[nn++]=on,tn[nn++]=rn,rn=e,on=t}function hn(e,t,n){an[sn++]=cn,an[sn++]=un,an[sn++]=ln,ln=e;var r=cn;e=un;var o=32-kt(r)-1;r&=~(1<<o),n+=1;var i=32-kt(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,cn=1<<32-kt(t)+o|n<<o|r,un=i+e}else cn=1<<i|n<<o|r,un=e}function fn(e){null!==e.return&&(dn(e,1),hn(e,1,0))}function pn(e){for(;e===rn;)rn=tn[--nn],tn[nn]=null,on=tn[--nn],tn[nn]=null;for(;e===ln;)ln=an[--sn],an[sn]=null,un=an[--sn],an[sn]=null,cn=an[--sn],an[sn]=null}var gn=null,mn=null,vn=!1,yn=!1,bn=null;function xn(e,t){var n=cs(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function wn(e,t){switch(e.tag){case 5:return null!==(t=Re(t,e.type,e.pendingProps))&&(e.stateNode=t,gn=e,mn=We(t),!0);case 6:return null!==(t=Ne(t,e.pendingProps))&&(e.stateNode=t,gn=e,mn=null,!0);case 13:if(null!==(t=De(t))){var n=null!==ln?{id:cn,overflow:un}:null;return e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=cs(18,null,null,0)).stateNode=t,n.return=e,e.child=n,gn=e,mn=null,!0}return!1;default:return!1}}function kn(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function Sn(e){if(vn){var t=mn;if(t){var n=t;if(!wn(e,t)){if(kn(e))throw Error(a(418));t=He(n);var r=gn;t&&wn(e,t)?xn(r,n):(e.flags=-4097&e.flags|2,vn=!1,gn=e)}}else{if(kn(e))throw Error(a(418));e.flags=-4097&e.flags|2,vn=!1,gn=e}}}function Cn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;gn=e}function _n(e){if(!K||e!==gn)return!1;if(!vn)return Cn(e),vn=!0,!1;if(3!==e.tag&&(5!==e.tag||Je(e.type)&&!W(e.type,e.memoizedProps))){var t=mn;if(t){if(kn(e))throw En(),Error(a(418));for(;t;)xn(e,t),t=He(t)}}if(Cn(e),13===e.tag){if(!K)throw Error(a(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));mn=Ze(e)}else mn=gn?He(e.stateNode):null;return!0}function En(){for(var e=mn;e;)e=He(e)}function Ln(){K&&(mn=gn=null,yn=vn=!1)}function Pn(e){null===bn?bn=[e]:bn.push(e)}var On=s.ReactCurrentBatchConfig;function Tn(e,t){if(Zt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!it.call(t,o)||!Zt(e[o],t[o]))return!1}return!0}function Mn(e){switch(e.tag){case 5:return nt(e.type);case 16:return nt("Lazy");case 13:return nt("Suspense");case 19:return nt("SuspenseList");case 0:case 2:case 15:return e=ot(e.type,!1);case 11:return e=ot(e.type.render,!1);case 1:return e=ot(e.type,!0);default:return""}}function An(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var In=lt(null),Rn=null,Nn=null,Dn=null;function zn(){Dn=Nn=Rn=null}function Bn(e,t,n){Z?(ut(In,t._currentValue),t._currentValue=n):(ut(In,t._currentValue2),t._currentValue2=n)}function jn(e){var t=In.current;ct(In),Z?e._currentValue=t:e._currentValue2=t}function Fn(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Hn(e,t){Rn=e,Dn=Nn=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(zo=!0),e.firstContext=null)}function Wn(e){var t=Z?e._currentValue:e._currentValue2;if(Dn!==e)if(e={context:e,memoizedValue:t,next:null},null===Nn){if(null===Rn)throw Error(a(308));Nn=e,Rn.dependencies={lanes:0,firstContext:e}}else Nn=Nn.next=e;return t}var $n=null;function Un(e){null===$n?$n=[e]:$n.push(e)}function Vn(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Un(t)):(n.next=o.next,o.next=n),t.interleaved=n,Gn(e,r)}function Gn(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var qn=!1;function Zn(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yn(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Xn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Kn(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&ia)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Gn(e,n)}return null===(o=r.interleaved)?(t.next=t,Un(r)):(t.next=o.next,o.next=t),r.interleaved=t,Gn(e,n)}function Qn(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Rt(e,n)}}function Jn(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function er(e,t,n,r){var i=e.updateQueue;qn=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var c=l,u=c.next;c.next=null,null===s?a=u:s.next=u,s=c;var d=e.alternate;null!==d&&((l=(d=d.updateQueue).lastBaseUpdate)!==s&&(null===l?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(null!==a){var h=i.baseState;for(s=0,d=u=c=null,l=a;;){var f=l.lane,p=l.eventTime;if((r&f)===f){null!==d&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,m=l;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(g=m.payload)){h=g.call(p,h,f);break e}h=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(f="function"==typeof(g=m.payload)?g.call(p,h,f):g))break e;h=o({},h,f);break e;case 2:qn=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===d?(u=d=p,c=h):d=d.next=p,s|=f;if(null===(l=l.next)){if(null===(l=i.shared.pending))break;l=(f=l).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===d&&(c=h),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);fa|=s,e.lanes=s,e.memoizedState=h}}function tr(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(a(191,o));o.call(r)}}}var nr=(new n.Component).refs;function rr(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var or={isMounted:function(e){return!!(e=e._reactInternals)&&_(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ia(),o=Ra(e),i=Xn(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=Kn(e,i,o))&&(Na(t,e,o,r),Qn(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ia(),o=Ra(e),i=Xn(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=Kn(e,i,o))&&(Na(t,e,o,r),Qn(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ia(),r=Ra(e),o=Xn(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Kn(e,o,r))&&(Na(t,e,r,n),Qn(t,e,r))}};function ir(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!Tn(n,r)||!Tn(o,i))}function ar(e,t,n){var r=!1,o=dt,i=t.contextType;return"object"==typeof i&&null!==i?i=Wn(i):(o=mt(t)?pt:ht.current,i=(r=null!=(r=t.contextTypes))?gt(e,o):dt),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=or,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function sr(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&or.enqueueReplaceState(t,t.state,null)}function lr(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=nr,Zn(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=Wn(i):(i=mt(t)?pt:ht.current,o.context=gt(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(rr(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&or.enqueueReplaceState(o,o.state,null),er(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function cr(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs;t===nr&&(t=o.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ur(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function dr(e){return(0,e._init)(e._payload)}function hr(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=ds(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function d(e,t,n,r){return null===t||6!==t.tag?((t=gs(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function h(e,t,n,r){var i=n.type;return i===u?p(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===b&&dr(i)===t.type)?((r=o(t,n.props)).ref=cr(e,t,n),r.return=e,r):((r=hs(n.type,n.key,n.props,null,e.mode,r)).ref=cr(e,t,n),r.return=e,r)}function f(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=ms(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function p(e,t,n,r,i){return null===t||7!==t.tag?((t=fs(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function g(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=gs(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case l:return(n=hs(t.type,t.key,t.props,null,e.mode,n)).ref=cr(e,null,t),n.return=e,n;case c:return(t=ms(t,e.mode,n)).return=e,t;case b:return g(e,(0,t._init)(t._payload),n)}if(A(t)||k(t))return(t=fs(t,e.mode,n,null)).return=e,t;ur(e,t)}return null}function m(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:d(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case l:return n.key===o?h(e,t,n,r):null;case c:return n.key===o?f(e,t,n,r):null;case b:return m(e,t,(o=n._init)(n._payload),r)}if(A(n)||k(n))return null!==o?null:p(e,t,n,r,null);ur(e,n)}return null}function v(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return d(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case l:return h(t,e=e.get(null===r.key?n:r.key)||null,r,o);case c:return f(t,e=e.get(null===r.key?n:r.key)||null,r,o);case b:return v(e,t,n,(0,r._init)(r._payload),o)}if(A(r)||k(r))return p(t,e=e.get(n)||null,r,o,null);ur(t,r)}return null}function y(o,a,s,l){for(var c=null,u=null,d=a,h=a=0,f=null;null!==d&&h<s.length;h++){d.index>h?(f=d,d=null):f=d.sibling;var p=m(o,d,s[h],l);if(null===p){null===d&&(d=f);break}e&&d&&null===p.alternate&&t(o,d),a=i(p,a,h),null===u?c=p:u.sibling=p,u=p,d=f}if(h===s.length)return n(o,d),vn&&dn(o,h),c;if(null===d){for(;h<s.length;h++)null!==(d=g(o,s[h],l))&&(a=i(d,a,h),null===u?c=d:u.sibling=d,u=d);return vn&&dn(o,h),c}for(d=r(o,d);h<s.length;h++)null!==(f=v(d,o,h,s[h],l))&&(e&&null!==f.alternate&&d.delete(null===f.key?h:f.key),a=i(f,a,h),null===u?c=f:u.sibling=f,u=f);return e&&d.forEach((function(e){return t(o,e)})),vn&&dn(o,h),c}function x(o,s,l,c){var u=k(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,h=s,f=s=0,p=null,y=l.next();null!==h&&!y.done;f++,y=l.next()){h.index>f?(p=h,h=null):p=h.sibling;var b=m(o,h,y.value,c);if(null===b){null===h&&(h=p);break}e&&h&&null===b.alternate&&t(o,h),s=i(b,s,f),null===d?u=b:d.sibling=b,d=b,h=p}if(y.done)return n(o,h),vn&&dn(o,f),u;if(null===h){for(;!y.done;f++,y=l.next())null!==(y=g(o,y.value,c))&&(s=i(y,s,f),null===d?u=y:d.sibling=y,d=y);return vn&&dn(o,f),u}for(h=r(o,h);!y.done;f++,y=l.next())null!==(y=v(h,o,f,y.value,c))&&(e&&null!==y.alternate&&h.delete(null===y.key?f:y.key),s=i(y,s,f),null===d?u=y:d.sibling=y,d=y);return e&&h.forEach((function(e){return t(o,e)})),vn&&dn(o,f),u}return function e(r,i,a,d){if("object"==typeof a&&null!==a&&a.type===u&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case l:e:{for(var h=a.key,f=i;null!==f;){if(f.key===h){if((h=a.type)===u){if(7===f.tag){n(r,f.sibling),(i=o(f,a.props.children)).return=r,r=i;break e}}else if(f.elementType===h||"object"==typeof h&&null!==h&&h.$$typeof===b&&dr(h)===f.type){n(r,f.sibling),(i=o(f,a.props)).ref=cr(r,f,a),i.return=r,r=i;break e}n(r,f);break}t(r,f),f=f.sibling}a.type===u?((i=fs(a.props.children,r.mode,d,a.key)).return=r,r=i):((d=hs(a.type,a.key,a.props,null,r.mode,d)).ref=cr(r,i,a),d.return=r,r=d)}return s(r);case c:e:{for(f=a.key;null!==i;){if(i.key===f){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(r,i.sibling),(i=o(i,a.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=ms(a,r.mode,d)).return=r,r=i}return s(r);case b:return e(r,i,(f=a._init)(a._payload),d)}if(A(a))return y(r,i,a,d);if(k(a))return x(r,i,a,d);ur(r,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,a)).return=r,r=i):(n(r,i),(i=gs(a,r.mode,d)).return=r,r=i),s(r)):n(r,i)}}var fr=hr(!0),pr=hr(!1),gr={},mr=lt(gr),vr=lt(gr),yr=lt(gr);function br(e){if(e===gr)throw Error(a(174));return e}function xr(e,t){ut(yr,t),ut(vr,e),ut(mr,gr),e=R(t),ct(mr),ut(mr,e)}function wr(){ct(mr),ct(vr),ct(yr)}function kr(e){var t=br(yr.current),n=br(mr.current);n!==(t=N(n,e.type,t))&&(ut(vr,e),ut(mr,t))}function Sr(e){vr.current===e&&(ct(mr),ct(vr))}var Cr=lt(0);function _r(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||ze(n)||Be(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Er=[];function Lr(){for(var e=0;e<Er.length;e++){var t=Er[e];Z?t._workInProgressVersionPrimary=null:t._workInProgressVersionSecondary=null}Er.length=0}var Pr=s.ReactCurrentDispatcher,Or=s.ReactCurrentBatchConfig,Tr=0,Mr=null,Ar=null,Ir=null,Rr=!1,Nr=!1,Dr=0,zr=0;function Br(){throw Error(a(321))}function jr(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zt(e[n],t[n]))return!1;return!0}function Fr(e,t,n,r,o,i){if(Tr=i,Mr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pr.current=null===e||null===e.memoizedState?Co:_o,e=n(r,o),Nr){i=0;do{if(Nr=!1,Dr=0,25<=i)throw Error(a(301));i+=1,Ir=Ar=null,t.updateQueue=null,Pr.current=Eo,e=n(r,o)}while(Nr)}if(Pr.current=So,t=null!==Ar&&null!==Ar.next,Tr=0,Ir=Ar=Mr=null,Rr=!1,t)throw Error(a(300));return e}function Hr(){var e=0!==Dr;return Dr=0,e}function Wr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ir?Mr.memoizedState=Ir=e:Ir=Ir.next=e,Ir}function $r(){if(null===Ar){var e=Mr.alternate;e=null!==e?e.memoizedState:null}else e=Ar.next;var t=null===Ir?Mr.memoizedState:Ir.next;if(null!==t)Ir=t,Ar=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Ar=e).memoizedState,baseState:Ar.baseState,baseQueue:Ar.baseQueue,queue:Ar.queue,next:null},null===Ir?Mr.memoizedState=Ir=e:Ir=Ir.next=e}return Ir}function Ur(e,t){return"function"==typeof t?t(e):t}function Vr(e){var t=$r(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Ar,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var l=s=null,c=null,u=i;do{var d=u.lane;if((Tr&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,Mr.lanes|=d,fa|=d}u=u.next}while(null!==u&&u!==i);null===c?s=r:c.next=l,Zt(r,t.memoizedState)||(zo=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,Mr.lanes|=i,fa|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Gr(e){var t=$r(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);Zt(i,t.memoizedState)||(zo=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function qr(){}function Zr(e,t){var n=Mr,r=$r(),o=t(),i=!Zt(r.memoizedState,o);if(i&&(r.memoizedState=o,zo=!0),r=r.queue,ao(Kr.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==Ir&&1&Ir.memoizedState.tag){if(n.flags|=2048,to(9,Xr.bind(null,n,r,o,t),void 0,null),null===aa)throw Error(a(349));0!=(30&Tr)||Yr(n,t,o)}return o}function Yr(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Mr.updateQueue)?(t={lastEffect:null,stores:null},Mr.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Xr(e,t,n,r){t.value=n,t.getSnapshot=r,Qr(t)&&Jr(e)}function Kr(e,t,n){return n((function(){Qr(t)&&Jr(e)}))}function Qr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zt(e,n)}catch(aae){return!0}}function Jr(e){var t=Gn(e,1);null!==t&&Na(t,e,1,-1)}function eo(e){var t=Wr();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ur,lastRenderedState:e},t.queue=e,e=e.dispatch=bo.bind(null,Mr,e),[t.memoizedState,e]}function to(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Mr.updateQueue)?(t={lastEffect:null,stores:null},Mr.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function no(){return $r().memoizedState}function ro(e,t,n,r){var o=Wr();Mr.flags|=e,o.memoizedState=to(1|t,n,void 0,void 0===r?null:r)}function oo(e,t,n,r){var o=$r();r=void 0===r?null:r;var i=void 0;if(null!==Ar){var a=Ar.memoizedState;if(i=a.destroy,null!==r&&jr(r,a.deps))return void(o.memoizedState=to(t,n,i,r))}Mr.flags|=e,o.memoizedState=to(1|t,n,i,r)}function io(e,t){return ro(8390656,8,e,t)}function ao(e,t){return oo(2048,8,e,t)}function so(e,t){return oo(4,2,e,t)}function lo(e,t){return oo(4,4,e,t)}function co(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function uo(e,t,n){return n=null!=n?n.concat([e]):null,oo(4,4,co.bind(null,t,e),n)}function ho(){}function fo(e,t){var n=$r();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&jr(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function po(e,t){var n=$r();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&jr(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function go(e,t,n){return 0==(21&Tr)?(e.baseState&&(e.baseState=!1,zo=!0),e.memoizedState=n):(Zt(n,t)||(n=Mt(),Mr.lanes|=n,fa|=n,e.baseState=!0),t)}function mo(e,t){var n=Nt;Nt=0!==n&&4>n?n:4,e(!0);var r=Or.transition;Or.transition={};try{e(!1),t()}finally{Nt=n,Or.transition=r}}function vo(){return $r().memoizedState}function yo(e,t,n){var r=Ra(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xo(e))wo(t,n);else if(null!==(n=Vn(e,t,n,r))){Na(n,e,r,Ia()),ko(n,t,r)}}function bo(e,t,n){var r=Ra(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xo(e))wo(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,Zt(s,a)){var l=t.interleaved;return null===l?(o.next=o,Un(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(N2){}null!==(n=Vn(e,t,o,r))&&(Na(n,e,r,o=Ia()),ko(n,t,r))}}function xo(e){var t=e.alternate;return e===Mr||null!==t&&t===Mr}function wo(e,t){Nr=Rr=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ko(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Rt(e,n)}}var So={readContext:Wn,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},Co={readContext:Wn,useCallback:function(e,t){return Wr().memoizedState=[e,void 0===t?null:t],e},useContext:Wn,useEffect:io,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ro(4194308,4,co.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ro(4194308,4,e,t)},useInsertionEffect:function(e,t){return ro(4,2,e,t)},useMemo:function(e,t){var n=Wr();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wr();return t=void 0!==n?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=yo.bind(null,Mr,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Wr().memoizedState=e},useState:eo,useDebugValue:ho,useDeferredValue:function(e){return Wr().memoizedState=e},useTransition:function(){var e=eo(!1),t=e[0];return e=mo.bind(null,e[1]),Wr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Mr,o=Wr();if(vn){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===aa)throw Error(a(349));0!=(30&Tr)||Yr(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,io(Kr.bind(null,r,i,e),[e]),r.flags|=2048,to(9,Xr.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Wr(),t=aa.identifierPrefix;if(vn){var n=un;t=":"+t+"R"+(n=(cn&~(1<<32-kt(cn)-1)).toString(32)+n),0<(n=Dr++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=zr++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},_o={readContext:Wn,useCallback:fo,useContext:Wn,useEffect:ao,useImperativeHandle:uo,useInsertionEffect:so,useLayoutEffect:lo,useMemo:po,useReducer:Vr,useRef:no,useState:function(){return Vr(Ur)},useDebugValue:ho,useDeferredValue:function(e){return go($r(),Ar.memoizedState,e)},useTransition:function(){return[Vr(Ur)[0],$r().memoizedState]},useMutableSource:qr,useSyncExternalStore:Zr,useId:vo,unstable_isNewReconciler:!1},Eo={readContext:Wn,useCallback:fo,useContext:Wn,useEffect:ao,useImperativeHandle:uo,useInsertionEffect:so,useLayoutEffect:lo,useMemo:po,useReducer:Gr,useRef:no,useState:function(){return Gr(Ur)},useDebugValue:ho,useDeferredValue:function(e){var t=$r();return null===Ar?t.memoizedState=e:go(t,Ar.memoizedState,e)},useTransition:function(){return[Gr(Ur)[0],$r().memoizedState]},useMutableSource:qr,useSyncExternalStore:Zr,useId:vo,unstable_isNewReconciler:!1};function Lo(e,t){try{var n="",r=t;do{n+=Mn(r),r=r.return}while(r);var o=n}catch(oae){o="\nError generating stack: "+oae.message+"\n"+oae.stack}return{value:e,source:t,stack:o,digest:null}}function Po(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function Oo(e,t){try{console.error(t.value)}catch(tae){setTimeout((function(){throw tae}))}}var To="function"==typeof WeakMap?WeakMap:Map;function Mo(e,t,n){(n=Xn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Sa||(Sa=!0,Ca=r),Oo(0,t)},n}function Ao(e,t,n){(n=Xn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Oo(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){Oo(0,t),"function"!=typeof r&&(null===_a?_a=new Set([this]):_a.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Io(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new To;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=rs.bind(null,e,t,n),t.then(e,e))}function Ro(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function No(e,t,n,r,o){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Xn(-1,1)).tag=2,Kn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Do=s.ReactCurrentOwner,zo=!1;function Bo(e,t,n,r){t.child=null===e?pr(t,null,n,r):fr(t,e.child,n,r)}function jo(e,t,n,r,o){n=n.render;var i=t.ref;return Hn(t,o),r=Fr(e,t,n,r,i,o),n=Hr(),null===e||zo?(vn&&n&&fn(t),t.flags|=1,Bo(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,li(e,t,o))}function Fo(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||us(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=hs(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Ho(e,t,i,r,o))}if(i=e.child,0==(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:Tn)(a,r)&&e.ref===t.ref)return li(e,t,o)}return t.flags|=1,(e=ds(i,r)).ref=t.ref,e.return=t,t.child=e}function Ho(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(Tn(i,r)&&e.ref===t.ref){if(zo=!1,t.pendingProps=r=i,0==(e.lanes&o))return t.lanes=e.lanes,li(e,t,o);0!=(131072&e.flags)&&(zo=!0)}}return Uo(e,t,n,r,o)}function Wo(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ut(ua,ca),ca|=n;else{if(0==(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ut(ua,ca),ca|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,ut(ua,ca),ca|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,ut(ua,ca),ca|=r;return Bo(e,t,o,n),t.child}function $o(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Uo(e,t,n,r,o){var i=mt(n)?pt:ht.current;return i=gt(t,i),Hn(t,o),n=Fr(e,t,n,r,i,o),r=Hr(),null===e||zo?(vn&&r&&fn(t),t.flags|=1,Bo(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,li(e,t,o))}function Vo(e,t,n,r,o){if(mt(n)){var i=!0;xt(t)}else i=!1;if(Hn(t,o),null===t.stateNode)si(e,t),ar(t,n,r),lr(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=Wn(c):c=gt(t,c=mt(n)?pt:ht.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&sr(t,a,r,c),qn=!1;var h=t.memoizedState;a.state=h,er(t,r,a,o),l=t.memoizedState,s!==r||h!==l||ft.current||qn?("function"==typeof u&&(rr(t,n,u,r),l=t.memoizedState),(s=qn||ir(t,n,s,r,h,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Yn(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:An(t.type,s),a.props=c,d=t.pendingProps,h=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Wn(l):l=gt(t,l=mt(n)?pt:ht.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&sr(t,a,r,l),qn=!1,h=t.memoizedState,a.state=h,er(t,r,a,o);var p=t.memoizedState;s!==d||h!==p||ft.current||qn?("function"==typeof f&&(rr(t,n,f,r),p=t.memoizedState),(c=qn||ir(t,n,c,r,h,p,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Go(e,t,n,r,i,o)}function Go(e,t,n,r,o,i){$o(e,t);var a=0!=(128&t.flags);if(!r&&!a)return o&&wt(t,n,!1),li(e,t,i);r=t.stateNode,Do.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=fr(t,e.child,null,i),t.child=fr(t,null,s,i)):Bo(e,t,s,i),t.memoizedState=r.state,o&&wt(t,n,!0),t.child}function qo(e){var t=e.stateNode;t.pendingContext?yt(0,t.pendingContext,t.pendingContext!==t.context):t.context&&yt(0,t.context,!1),xr(e,t.containerInfo)}function Zo(e,t,n,r,o){return Ln(),Pn(o),t.flags|=256,Bo(e,t,n,r),t.child}var Yo,Xo,Ko,Qo,Jo={dehydrated:null,treeContext:null,retryLane:0};function ei(e){return{baseLanes:e,cachePool:null,transitions:null}}function ti(e,t,n){var r,o=t.pendingProps,i=Cr.current,s=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&i)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),ut(Cr,1&i),null===e)return Sn(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:Be(e)?t.lanes=8:t.lanes=1073741824,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},0==(1&o)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=ps(l,o,0,null),e=fs(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=ei(n),t.memoizedState=Jo,e):ni(t,l));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,s){if(n)return 256&t.flags?(t.flags&=-257,ri(e,t,s,r=Po(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=ps({mode:"visible",children:r.children},o,0,null),(i=fs(i,o,s,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,0!=(1&t.mode)&&fr(t,e.child,null,s),t.child.memoizedState=ei(s),t.memoizedState=Jo,i);if(0==(1&t.mode))return ri(e,t,s,null);if(Be(o))return r=je(o).digest,i=Error(a(419)),r=Po(i,r,void 0),ri(e,t,s,r);if(n=0!=(s&e.childLanes),zo||n){if(null!==(r=aa)){switch(s&-s){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|s))?0:o)&&o!==i.retryLane&&(i.retryLane=o,Gn(e,o),Na(r,e,o,-1))}return qa(),ri(e,t,s,r=Po(Error(a(421))))}return ze(o)?(t.flags|=128,t.child=e.child,t=is.bind(null,e),Fe(o,t),null):(e=i.treeContext,K&&(mn=Ue(o),gn=t,vn=!0,bn=null,yn=!1,null!==e&&(an[sn++]=cn,an[sn++]=un,an[sn++]=ln,cn=e.id,un=e.overflow,ln=t)),t=ni(t,r.children),t.flags|=4096,t)}(e,t,l,o,r,i,n);if(s){s=o.fallback,l=t.mode,r=(i=e.child).sibling;var c={mode:"hidden",children:o.children};return 0==(1&l)&&t.child!==i?((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null):(o=ds(i,c)).subtreeFlags=14680064&i.subtreeFlags,null!==r?s=ds(r,s):(s=fs(s,l,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?ei(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Jo,o}return e=(s=e.child).sibling,o=ds(s,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function ni(e,t){return(t=ps({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ri(e,t,n,r){return null!==r&&Pn(r),fr(t,e.child,null,n),(e=ni(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function oi(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Fn(e.return,t,n)}function ii(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function ai(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Bo(e,t,r.children,n),0!=(2&(r=Cr.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&oi(e,n,t);else if(19===e.tag)oi(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ut(Cr,r),0==(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===_r(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ii(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===_r(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ii(t,!0,n,null,i);break;case"together":ii(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function si(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function li(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),fa|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=ds(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ds(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ci(e){e.flags|=4}function ui(e,t){if(null!==e&&e.child===t.child)return!0;if(0!=(16&t.flags))return!1;for(e=t.child;null!==e;){if(0!=(12854&e.flags)||0!=(12854&e.subtreeFlags))return!1;e=e.sibling}return!0}if(Y)Yo=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)j(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Xo=function(){},Ko=function(e,t,n,r,o){if((e=e.memoizedProps)!==r){var i=t.stateNode,a=br(mr.current);n=H(i,n,e,r,o,a),(t.updateQueue=n)&&ci(t)}},Qo=function(e,t,n,r){n!==r&&ci(t)};else if(X){Yo=function(e,t,n,r){for(var o=t.child;null!==o;){if(5===o.tag){var i=o.stateNode;n&&r&&(i=Ae(i,o.type,o.memoizedProps,o)),j(e,i)}else if(6===o.tag)i=o.stateNode,n&&r&&(i=Ie(i,o.memoizedProps,o)),j(e,i);else if(4!==o.tag)if(22===o.tag&&null!==o.memoizedState)null!==(i=o.child)&&(i.return=o),Yo(e,o,!0,!0);else if(null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;o=o.return}o.sibling.return=o.return,o=o.sibling}};var di=function(e,t,n,r){for(var o=t.child;null!==o;){if(5===o.tag){var i=o.stateNode;n&&r&&(i=Ae(i,o.type,o.memoizedProps,o)),Oe(e,i)}else if(6===o.tag)i=o.stateNode,n&&r&&(i=Ie(i,o.memoizedProps,o)),Oe(e,i);else if(4!==o.tag)if(22===o.tag&&null!==o.memoizedState)null!==(i=o.child)&&(i.return=o),di(e,o,!0,!0);else if(null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;o=o.return}o.sibling.return=o.return,o=o.sibling}};Xo=function(e,t){var n=t.stateNode;if(!ui(e,t)){e=n.containerInfo;var r=Pe(e);di(r,t,!1,!1),n.pendingChildren=r,ci(t),Te(e,r)}},Ko=function(e,t,n,r,o){var i=e.stateNode,a=e.memoizedProps;if((e=ui(e,t))&&a===r)t.stateNode=i;else{var s=t.stateNode,l=br(mr.current),c=null;a!==r&&(c=H(s,n,a,r,o,l)),e&&null===c?t.stateNode=i:(i=Le(i,c,n,a,r,t,e,s),F(i,n,r,o,l)&&ci(t),t.stateNode=i,e?ci(t):Yo(i,t,!1,!1))}},Qo=function(e,t,n,r){n!==r?(e=br(yr.current),n=br(mr.current),t.stateNode=$(r,e,n,t),ci(t)):t.stateNode=e.stateNode}}else Xo=function(){},Ko=function(){},Qo=function(){};function hi(e,t){if(!vn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fi(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pi(e,t,n){var r=t.pendingProps;switch(pn(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:case 17:return mt(t.type)&&vt(),fi(t),null;case 3:return n=t.stateNode,wr(),ct(ft),ct(ht),Lr(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(_n(t)?ci(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==bn&&(ja(bn),bn=null))),Xo(e,t),fi(t),null;case 5:Sr(t),n=br(yr.current);var o=t.type;if(null!==e&&null!=t.stateNode)Ko(e,t,o,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return fi(t),null}if(e=br(mr.current),_n(t)){if(!K)throw Error(a(175));e=Ve(t.stateNode,t.type,t.memoizedProps,n,e,t,!yn),t.updateQueue=e,null!==e&&ci(t)}else{var i=B(o,r,n,e,t);Yo(i,t,!1,!1),t.stateNode=i,F(i,o,r,n,e)&&ci(t)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return fi(t),null;case 6:if(e&&null!=t.stateNode)Qo(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(e=br(yr.current),n=br(mr.current),_n(t)){if(!K)throw Error(a(176));if(e=t.stateNode,n=t.memoizedProps,(r=Ge(e,n,t,!yn))&&null!==(o=gn))switch(o.tag){case 3:et(o.stateNode.containerInfo,e,n,0!=(1&o.mode));break;case 5:tt(o.type,o.memoizedProps,o.stateNode,e,n,0!=(1&o.mode))}r&&ci(t)}else t.stateNode=$(r,e,n,t)}return fi(t),null;case 13:if(ct(Cr),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(vn&&null!==mn&&0!=(1&t.mode)&&0==(128&t.flags))En(),Ln(),t.flags|=98560,o=!1;else if(o=_n(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!K)throw Error(a(344));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));qe(o,t)}else Ln(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fi(t),o=!1}else null!==bn&&(ja(bn),bn=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((n=null!==r)!==(null!==e&&null!==e.memoizedState)&&n&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&Cr.current)?0===da&&(da=3):qa())),null!==t.updateQueue&&(t.flags|=4),fi(t),null);case 4:return wr(),Xo(e,t),null===e&&J(t.stateNode.containerInfo),fi(t),null;case 10:return jn(t.type._context),fi(t),null;case 19:if(ct(Cr),null===(o=t.memoizedState))return fi(t),null;if(r=0!=(128&t.flags),null===(i=o.rendering))if(r)hi(o,!1);else{if(0!==da||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(i=_r(e))){for(t.flags|=128,hi(o,!1),null!==(e=i.updateQueue)&&(t.updateQueue=e,t.flags|=4),t.subtreeFlags=0,e=n,n=t.child;null!==n;)o=e,(r=n).flags&=14680066,null===(i=r.alternate)?(r.childLanes=0,r.lanes=o,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=i.childLanes,r.lanes=i.lanes,r.child=i.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=i.memoizedProps,r.memoizedState=i.memoizedState,r.updateQueue=i.updateQueue,r.type=i.type,o=i.dependencies,r.dependencies=null===o?null:{lanes:o.lanes,firstContext:o.firstContext}),n=n.sibling;return ut(Cr,1&Cr.current|2),t.child}e=e.sibling}null!==o.tail&&Ht()>ba&&(t.flags|=128,r=!0,hi(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=_r(i))){if(t.flags|=128,r=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),hi(o,!0),null===o.tail&&"hidden"===o.tailMode&&!i.alternate&&!vn)return fi(t),null}else 2*Ht()-o.renderingStartTime>ba&&1073741824!==n&&(t.flags|=128,r=!0,hi(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(null!==(e=o.last)?e.sibling=i:t.child=i,o.last=i)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ht(),t.sibling=null,e=Cr.current,ut(Cr,r?1&e|2:1&e),t):(fi(t),null);case 22:case 23:return $a(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&0!=(1&t.mode)?0!=(1073741824&ca)&&(fi(t),Y&&6&t.subtreeFlags&&(t.flags|=8192)):fi(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function gi(e,t){switch(pn(t),t.tag){case 1:return mt(t.type)&&vt(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return wr(),ct(ft),ct(ht),Lr(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Sr(t),null;case 13:if(ct(Cr),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));Ln()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ct(Cr),null;case 4:return wr(),null;case 10:return jn(t.type._context),null;case 22:case 23:return $a(),null;default:return null}}var mi=!1,vi=!1,yi="function"==typeof WeakSet?WeakSet:Set,bi=null;function xi(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(aae){ns(e,t,aae)}else n.current=null}function wi(e,t,n){try{n()}catch(aae){ns(e,t,aae)}}var ki=!1;function Si(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&wi(t,n,i)}o=o.next}while(o!==r)}}function Ci(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 _i(e){var t=e.ref;if(null!==t){var n=e.stateNode;if(5===e.tag)e=I(n);else e=n;"function"==typeof t?t(e):t.current=e}}function Ei(e){var t=e.alternate;null!==t&&(e.alternate=null,Ei(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&te(t)),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 Li(e){return 5===e.tag||3===e.tag||4===e.tag}function Pi(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Li(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Oi(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ye(n,e,t):fe(n,e);else if(4!==r&&null!==(e=e.child))for(Oi(e,t,n),e=e.sibling;null!==e;)Oi(e,t,n),e=e.sibling}function Ti(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ve(n,e,t):he(n,e);else if(4!==r&&null!==(e=e.child))for(Ti(e,t,n),e=e.sibling;null!==e;)Ti(e,t,n),e=e.sibling}var Mi=null,Ai=!1;function Ii(e,t,n){for(n=n.child;null!==n;)Ri(e,t,n),n=n.sibling}function Ri(e,t,n){if(qt&&"function"==typeof qt.onCommitFiberUnmount)try{qt.onCommitFiberUnmount(Gt,n)}catch(sae){}switch(n.tag){case 5:vi||xi(n,t);case 6:if(Y){var r=Mi,o=Ai;Mi=null,Ii(e,t,n),Ai=o,null!==(Mi=r)&&(Ai?xe(Mi,n.stateNode):be(Mi,n.stateNode))}else Ii(e,t,n);break;case 18:Y&&null!==Mi&&(Ai?Qe(Mi,n.stateNode):Ke(Mi,n.stateNode));break;case 4:Y?(r=Mi,o=Ai,Mi=n.stateNode.containerInfo,Ai=!0,Ii(e,t,n),Mi=r,Ai=o):(X&&(r=n.stateNode.containerInfo,o=Pe(r),Me(r,o)),Ii(e,t,n));break;case 0:case 11:case 14:case 15:if(!vi&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!=(2&i)||0!=(4&i))&&wi(n,t,a),o=o.next}while(o!==r)}Ii(e,t,n);break;case 1:if(!vi&&(xi(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(sae){ns(n,t,sae)}Ii(e,t,n);break;case 21:Ii(e,t,n);break;case 22:1&n.mode?(vi=(r=vi)||null!==n.memoizedState,Ii(e,t,n),vi=r):Ii(e,t,n);break;default:Ii(e,t,n)}}function Ni(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new yi),t.forEach((function(t){var r=as.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Di(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t;if(Y){var l=s;e:for(;null!==l;){switch(l.tag){case 5:Mi=l.stateNode,Ai=!1;break e;case 3:case 4:Mi=l.stateNode.containerInfo,Ai=!0;break e}l=l.return}if(null===Mi)throw Error(a(160));Ri(i,s,o),Mi=null,Ai=!1}else Ri(i,s,o);var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(N2){ns(o,t,N2)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)zi(t,e),t=t.sibling}function zi(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Di(t,e),Bi(e),4&r){try{Si(3,e,e.return),Ci(3,e)}catch(uae){ns(e,e.return,uae)}try{Si(5,e,e.return)}catch(uae){ns(e,e.return,uae)}}break;case 1:Di(t,e),Bi(e),512&r&&null!==n&&xi(n,n.return);break;case 5:if(Di(t,e),Bi(e),512&r&&null!==n&&xi(n,n.return),Y){if(32&e.flags){var o=e.stateNode;try{we(o)}catch(uae){ns(e,e.return,uae)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps;if(n=null!==n?n.memoizedProps:i,r=e.type,t=e.updateQueue,e.updateQueue=null,null!==t)try{me(o,t,r,n,i,e)}catch(uae){ns(e,e.return,uae)}}}break;case 6:if(Di(t,e),Bi(e),4&r&&Y){if(null===e.stateNode)throw Error(a(162));o=e.stateNode,i=e.memoizedProps,n=null!==n?n.memoizedProps:i;try{pe(o,n,i)}catch(uae){ns(e,e.return,uae)}}break;case 3:if(Di(t,e),Bi(e),4&r){if(Y&&K&&null!==n&&n.memoizedState.isDehydrated)try{Ye(t.containerInfo)}catch(uae){ns(e,e.return,uae)}if(X){o=t.containerInfo,i=t.pendingChildren;try{Me(o,i)}catch(uae){ns(e,e.return,uae)}}}break;case 4:if(Di(t,e),Bi(e),4&r&&X){o=(i=e.stateNode).containerInfo,i=i.pendingChildren;try{Me(o,i)}catch(uae){ns(e,e.return,uae)}}break;case 13:Di(t,e),Bi(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(ya=Ht())),4&r&&Ni(e);break;case 22:var s=null!==n&&null!==n.memoizedState;if(1&e.mode?(vi=(n=vi)||s,Di(t,e),vi=n):Di(t,e),Bi(e),8192&r){if(n=null!==e.memoizedState,(e.stateNode.isHidden=n)&&!s&&0!=(1&e.mode))for(bi=e,r=e.child;null!==r;){for(t=bi=r;null!==bi;){var l=(s=bi).child;switch(s.tag){case 0:case 11:case 14:case 15:Si(4,s,s.return);break;case 1:xi(s,s.return);var c=s.stateNode;if("function"==typeof c.componentWillUnmount){var u=s,d=s.return;try{var h=u;c.props=h.memoizedProps,c.state=h.memoizedState,c.componentWillUnmount()}catch(uae){ns(u,d,uae)}}break;case 5:xi(s,s.return);break;case 22:if(null!==s.memoizedState){Wi(t);continue}}null!==l?(l.return=s,bi=l):Wi(t)}r=r.sibling}if(Y)e:if(r=null,Y)for(t=e;;){if(5===t.tag){if(null===r){r=t;try{o=t.stateNode,n?ke(o):Ce(t.stateNode,t.memoizedProps)}catch(uae){ns(e,e.return,uae)}}}else if(6===t.tag){if(null===r)try{i=t.stateNode,n?Se(i):_e(i,t.memoizedProps)}catch(uae){ns(e,e.return,uae)}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}}break;case 19:Di(t,e),Bi(e),4&r&&Ni(e);break;case 21:break;default:Di(t,e),Bi(e)}}function Bi(e){var t=e.flags;if(2&t){try{if(Y){e:{for(var n=e.return;null!==n;){if(Li(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(we(o),r.flags&=-33),Ti(e,Pi(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;Oi(e,Pi(e),i);break;default:throw Error(a(161))}}}catch(pae){ns(e,e.return,pae)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ji(e,t,n){bi=e,Fi(e)}function Fi(e,t,n){for(var r=0!=(1&e.mode);null!==bi;){var o=bi,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||mi;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||vi;s=mi;var c=vi;if(mi=a,(vi=l)&&!c)for(bi=o;null!==bi;)l=(a=bi).child,22===a.tag&&null!==a.memoizedState?$i(o):null!==l?(l.return=a,bi=l):$i(o);for(;null!==i;)bi=i,Fi(i),i=i.sibling;bi=o,mi=s,vi=c}Hi(e)}else 0!=(8772&o.subtreeFlags)&&null!==i?(i.return=o,bi=i):Hi(e)}}function Hi(e){for(;null!==bi;){var t=bi;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:vi||Ci(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!vi)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:An(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&tr(t,i,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:n=I(t.child.stateNode);break;case 1:n=t.child.stateNode}tr(t,s,n)}break;case 5:var l=t.stateNode;null===n&&4&t.flags&&ge(l,t.type,t.memoizedProps,t);break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(K&&null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&Xe(d)}}}break;default:throw Error(a(163))}vi||512&t.flags&&_i(t)}catch(F2){ns(t,t.return,F2)}}if(t===e){bi=null;break}if(null!==(n=t.sibling)){n.return=t.return,bi=n;break}bi=t.return}}function Wi(e){for(;null!==bi;){var t=bi;if(t===e){bi=null;break}var n=t.sibling;if(null!==n){n.return=t.return,bi=n;break}bi=t.return}}function $i(e){for(;null!==bi;){var t=bi;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ci(4,t)}catch(pae){ns(t,n,pae)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(pae){ns(t,o,pae)}}var i=t.return;try{_i(t)}catch(pae){ns(t,i,pae)}break;case 5:var a=t.return;try{_i(t)}catch(pae){ns(t,a,pae)}}}catch(pae){ns(t,t.return,pae)}if(t===e){bi=null;break}var s=t.sibling;if(null!==s){s.return=t.return,bi=s;break}bi=t.return}}var Ui=0,Vi=1,Gi=2,qi=3,Zi=4;if("function"==typeof Symbol&&Symbol.for){var Yi=Symbol.for;Ui=Yi("selector.component"),Vi=Yi("selector.has_pseudo_class"),Gi=Yi("selector.role"),qi=Yi("selector.test_id"),Zi=Yi("selector.text")}function Xi(e){var t=Q(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(a(364));return t}if(null===(e=ie(e)))throw Error(a(362));return e.stateNode.current}function Ki(e,t){switch(t.$$typeof){case Ui:if(e.type===t.value)return!0;break;case Vi:e:{t=t.value,e=[e,0];for(var n=0;n<e.length;){var r=e[n++],o=e[n++],i=t[o];if(5!==r.tag||!le(r)){for(;null!=i&&Ki(r,i);)i=t[++o];if(o===t.length){t=!0;break e}for(r=r.child;null!==r;)e.push(r,o),r=r.sibling}}t=!1}return t;case Gi:if(5===e.tag&&ce(e.stateNode,t.value))return!0;break;case Zi:if((5===e.tag||6===e.tag)&&(null!==(e=se(e))&&0<=e.indexOf(t.value)))return!0;break;case qi:if(5===e.tag&&("string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function Qi(e){switch(e.$$typeof){case Ui:return"<"+(S(e.value)||"Unknown")+">";case Vi:return":has("+(Qi(e)||"")+")";case Gi:return'[role="'+e.value+'"]';case Zi:return'"'+e.value+'"';case qi:return'[data-testname="'+e.value+'"]';default:throw Error(a(365))}}function Ji(e,t){var n=[];e=[e,0];for(var r=0;r<e.length;){var o=e[r++],i=e[r++],a=t[i];if(5!==o.tag||!le(o)){for(;null!=a&&Ki(o,a);)a=t[++i];if(i===t.length)n.push(o);else for(o=o.child;null!==o;)e.push(o,i),o=o.sibling}}return n}function ea(e,t){if(!oe)throw Error(a(363));e=Ji(e=Xi(e),t),t=[],e=Array.from(e);for(var n=0;n<e.length;){var r=e[n++];if(5===r.tag)le(r)||t.push(r.stateNode);else for(r=r.child;null!==r;)e.push(r),r=r.sibling}return t}var ta=Math.ceil,na=s.ReactCurrentDispatcher,ra=s.ReactCurrentOwner,oa=s.ReactCurrentBatchConfig,ia=0,aa=null,sa=null,la=0,ca=0,ua=lt(0),da=0,ha=null,fa=0,pa=0,ga=0,ma=null,va=null,ya=0,ba=1/0,xa=null;function wa(){ba=Ht()+500}var ka,Sa=!1,Ca=null,_a=null,Ea=!1,La=null,Pa=0,Oa=0,Ta=null,Ma=-1,Aa=0;function Ia(){return 0!=(6&ia)?Ht():-1!==Ma?Ma:Ma=Ht()}function Ra(e){return 0==(1&e.mode)?1:0!=(2&ia)&&0!==la?la&-la:null!==On.transition?(0===Aa&&(Aa=Mt()),Aa):0!==(e=Nt)?e:ee()}function Na(e,t,n,r){if(50<Oa)throw Oa=0,Ta=null,Error(a(185));It(e,n,r),0!=(2&ia)&&e===aa||(e===aa&&(0==(2&ia)&&(pa|=n),4===da&&Fa(e,la)),Da(e,r),1===n&&0===ia&&0==(1&t.mode)&&(wa(),Xt&&en()))}function Da(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-kt(i),s=1<<a,l=o[a];-1===l?0!=(s&n)&&0==(s&r)||(o[a]=Ot(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=Pt(e,e===aa?la:0);if(0===r)null!==n&&Bt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Bt(n),1===t)0===e.tag?function(e){Xt=!0,Jt(e)}(Ha.bind(null,e)):Jt(Ha.bind(null,e)),ne?re((function(){0==(6&ia)&&en()})):zt(Wt,en),n=null;else{switch(Dt(r)){case 1:n=Wt;break;case 4:n=$t;break;case 16:default:n=Ut;break;case 536870912:n=Vt}n=ss(n,za.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function za(e,t){if(Ma=-1,Aa=0,0!=(6&ia))throw Error(a(327));var n=e.callbackNode;if(es()&&e.callbackNode!==n)return null;var r=Pt(e,e===aa?la:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=Za(e,r);else{t=r;var o=ia;ia|=2;var i=Ga();for(aa===e&&la===t||(xa=null,wa(),Ua(e,t));;)try{Xa();break}catch(sae){Va(e,sae)}zn(),na.current=i,ia=o,null!==sa?t=0:(aa=null,la=0,t=da)}if(0!==t){if(2===t&&(0!==(o=Tt(e))&&(r=o,t=Ba(e,o))),1===t)throw n=ha,Ua(e,0),Fa(e,r),Da(e,Ht()),n;if(6===t)Fa(e,r);else{if(o=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!Zt(i(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=Za(e,r))&&(0!==(i=Tt(e))&&(r=i,t=Ba(e,i))),1===t))throw n=ha,Ua(e,0),Fa(e,r),Da(e,Ht()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:Ja(e,va,xa);break;case 3:if(Fa(e,r),(130023424&r)===r&&10<(t=ya+500-Ht())){if(0!==Pt(e,0))break;if(((o=e.suspendedLanes)&r)!==r){Ia(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=U(Ja.bind(null,e,va,xa),t);break}Ja(e,va,xa);break;case 4:if(Fa(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-kt(r);i=1<<s,(s=t[s])>o&&(o=s),r&=~i}if(r=o,10<(r=(120>(r=Ht()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ta(r/1960))-r)){e.timeoutHandle=U(Ja.bind(null,e,va,xa),r);break}Ja(e,va,xa);break;default:throw Error(a(329))}}}return Da(e,Ht()),e.callbackNode===n?za.bind(null,e):null}function Ba(e,t){var n=ma;return e.current.memoizedState.isDehydrated&&(Ua(e,t).flags|=256),2!==(e=Za(e,t))&&(t=va,va=n,null!==t&&ja(t)),e}function ja(e){null===va?va=e:va.push.apply(va,e)}function Fa(e,t){for(t&=~ga,t&=~pa,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-kt(t),r=1<<n;e[n]=-1,t&=~r}}function Ha(e){if(0!=(6&ia))throw Error(a(327));es();var t=Pt(e,0);if(0==(1&t))return Da(e,Ht()),null;var n=Za(e,t);if(0!==e.tag&&2===n){var r=Tt(e);0!==r&&(t=r,n=Ba(e,r))}if(1===n)throw n=ha,Ua(e,0),Fa(e,t),Da(e,Ht()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ja(e,va,xa),Da(e,Ht()),null}function Wa(e){null!==La&&0===La.tag&&0==(6&ia)&&es();var t=ia;ia|=1;var n=oa.transition,r=Nt;try{if(oa.transition=null,Nt=1,e)return e()}finally{Nt=r,oa.transition=n,0==(6&(ia=t))&&en()}}function $a(){ca=ua.current,ct(ua)}function Ua(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==q&&(e.timeoutHandle=q,G(n)),null!==sa)for(n=sa.return;null!==n;){var r=n;switch(pn(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&vt();break;case 3:wr(),ct(ft),ct(ht),Lr();break;case 5:Sr(r);break;case 4:wr();break;case 13:case 19:ct(Cr);break;case 10:jn(r.type._context);break;case 22:case 23:$a()}n=n.return}if(aa=e,sa=e=ds(e.current,null),la=ca=t,da=0,ha=null,ga=pa=fa=0,va=ma=null,null!==$n){for(t=0;t<$n.length;t++)if(null!==(r=(n=$n[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}$n=null}return e}function Va(e,t){for(;;){var n=sa;try{if(zn(),Pr.current=So,Rr){for(var r=Mr.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}Rr=!1}if(Tr=0,Ir=Ar=Mr=null,Nr=!1,Dr=0,ra.current=null,null===n||null===n.return){da=1,ha=t,sa=null;break}e:{var i=e,s=n.return,l=n,c=t;if(t=la,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(0==(1&d.mode)&&(0===h||11===h||15===h)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Ro(s);if(null!==p){p.flags&=-257,No(p,s,l,0,t),1&p.mode&&Io(i,u,t),c=u;var g=(t=p).updateQueue;if(null===g){var m=new Set;m.add(c),t.updateQueue=m}else g.add(c);break e}if(0==(1&t)){Io(i,u,t),qa();break e}c=Error(a(426))}else if(vn&&1&l.mode){var v=Ro(s);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),No(v,s,l,0,t),Pn(Lo(c,l));break e}}i=c=Lo(c,l),4!==da&&(da=2),null===ma?ma=[i]:ma.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,Jn(i,Mo(0,c,t));break e;case 1:l=c;var y=i.type,b=i.stateNode;if(0==(128&i.flags)&&("function"==typeof y.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===_a||!_a.has(b)))){i.flags|=65536,t&=-t,i.lanes|=t,Jn(i,Ao(i,l,t));break e}}i=i.return}while(null!==i)}Qa(n)}catch(Kt){t=Kt,sa===n&&null!==n&&(sa=n=n.return);continue}break}}function Ga(){var e=na.current;return na.current=So,null===e?So:e}function qa(){0!==da&&3!==da&&2!==da||(da=4),null===aa||0==(268435455&fa)&&0==(268435455&pa)||Fa(aa,la)}function Za(e,t){var n=ia;ia|=2;var r=Ga();for(aa===e&&la===t||(xa=null,Ua(e,t));;)try{Ya();break}catch(T2){Va(e,T2)}if(zn(),ia=n,na.current=r,null!==sa)throw Error(a(261));return aa=null,la=0,da}function Ya(){for(;null!==sa;)Ka(sa)}function Xa(){for(;null!==sa&&!jt();)Ka(sa)}function Ka(e){var t=ka(e.alternate,e,ca);e.memoizedProps=e.pendingProps,null===t?Qa(e):sa=t,ra.current=null}function Qa(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=pi(n,t,ca)))return void(sa=n)}else{if(null!==(n=gi(n,t)))return n.flags&=32767,void(sa=n);if(null===e)return da=6,void(sa=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(sa=t);sa=t=e}while(null!==t);0===da&&(da=5)}function Ja(e,t,n){var r=Nt,o=oa.transition;try{oa.transition=null,Nt=1,function(e,t,n,r){do{es()}while(null!==La);if(0!=(6&ia))throw Error(a(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(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<n;){var o=31-kt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,i),e===aa&&(sa=aa=null,la=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Ea||(Ea=!0,ss(Ut,(function(){return es(),null}))),i=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||i){i=oa.transition,oa.transition=null;var s=Nt;Nt=1;var l=ia;ia|=4,ra.current=null,function(e,t){for(D(e.containerInfo),bi=t;null!==bi;)if(t=(e=bi).child,0!=(1028&e.subtreeFlags)&&null!==t)t.return=e,bi=t;else for(;null!==bi;){e=bi;try{var n=e.alternate;if(0!=(1024&e.flags))switch(e.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==n){var r=n.memoizedProps,o=n.memoizedState,i=e.stateNode,s=i.getSnapshotBeforeUpdate(e.elementType===e.type?r:An(e.type,r),o);i.__reactInternalSnapshotBeforeUpdate=s}break;case 3:Y&&Ee(e.stateNode.containerInfo);break;default:throw Error(a(163))}}catch(l){ns(e,e.return,l)}if(null!==(t=e.sibling)){t.return=e.return,bi=t;break}bi=e.return}n=ki,ki=!1}(e,n),zi(n,e),z(e.containerInfo),e.current=n,ji(n),Ft(),ia=l,Nt=s,oa.transition=i}else e.current=n;if(Ea&&(Ea=!1,La=e,Pa=o),i=e.pendingLanes,0===i&&(_a=null),function(e){if(qt&&"function"==typeof qt.onCommitFiberRoot)try{qt.onCommitFiberRoot(Gt,e,void 0,128==(128&e.current.flags))}catch(t){}}(n.stateNode),Da(e,Ht()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Sa)throw Sa=!1,e=Ca,Ca=null,e;0!=(1&Pa)&&0!==e.tag&&es(),i=e.pendingLanes,0!=(1&i)?e===Ta?Oa++:(Oa=0,Ta=e):Oa=0,en()}(e,t,n,r)}finally{oa.transition=o,Nt=r}return null}function es(){if(null!==La){var e=Dt(Pa),t=oa.transition,n=Nt;try{if(oa.transition=null,Nt=16>e?16:e,null===La)var r=!1;else{if(e=La,La=null,Pa=0,0!=(6&ia))throw Error(a(331));var o=ia;for(ia|=4,bi=e.current;null!==bi;){var i=bi,s=i.child;if(0!=(16&bi.flags)){var l=i.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(bi=u;null!==bi;){var d=bi;switch(d.tag){case 0:case 11:case 15:Si(8,d,i)}var h=d.child;if(null!==h)h.return=d,bi=h;else for(;null!==bi;){var f=(d=bi).sibling,p=d.return;if(Ei(d),d===u){bi=null;break}if(null!==f){f.return=p,bi=f;break}bi=p}}}var g=i.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(null!==m)}}bi=i}}if(0!=(2064&i.subtreeFlags)&&null!==s)s.return=i,bi=s;else e:for(;null!==bi;){if(0!=(2048&(i=bi).flags))switch(i.tag){case 0:case 11:case 15:Si(9,i,i.return)}var y=i.sibling;if(null!==y){y.return=i.return,bi=y;break e}bi=i.return}}var b=e.current;for(bi=b;null!==bi;){var x=(s=bi).child;if(0!=(2064&s.subtreeFlags)&&null!==x)x.return=s,bi=x;else e:for(s=b;null!==bi;){if(0!=(2048&(l=bi).flags))try{switch(l.tag){case 0:case 11:case 15:Ci(9,l)}}catch(Kt){ns(l,l.return,Kt)}if(l===s){bi=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,bi=w;break e}bi=l.return}}if(ia=o,en(),qt&&"function"==typeof qt.onPostCommitFiberRoot)try{qt.onPostCommitFiberRoot(Gt,e)}catch(Kt){}r=!0}return r}finally{Nt=n,oa.transition=t}}return!1}function ts(e,t,n){e=Kn(e,t=Mo(0,t=Lo(n,t),1),1),t=Ia(),null!==e&&(It(e,1,t),Da(e,t))}function ns(e,t,n){if(3===e.tag)ts(e,e,n);else for(;null!==t;){if(3===t.tag){ts(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===_a||!_a.has(r))){t=Kn(t,e=Ao(t,e=Lo(n,e),1),1),e=Ia(),null!==t&&(It(t,1,e),Da(t,e));break}}t=t.return}}function rs(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Ia(),e.pingedLanes|=e.suspendedLanes&n,aa===e&&(la&n)===n&&(4===da||3===da&&(130023424&la)===la&&500>Ht()-ya?Ua(e,0):ga|=n),Da(e,t)}function os(e,t){0===t&&(0==(1&e.mode)?t=1:(t=Et,0==(130023424&(Et<<=1))&&(Et=4194304)));var n=Ia();null!==(e=Gn(e,t))&&(It(e,t,n),Da(e,n))}function is(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),os(e,n)}function as(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),os(e,n)}function ss(e,t){return zt(e,t)}function ls(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 cs(e,t,n,r){return new ls(e,t,n,r)}function us(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ds(e,t){var n=e.alternate;return null===n?((n=cs(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function hs(e,t,n,r,o,i){var s=2;if(r=e,"function"==typeof e)us(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case u:return fs(n.children,o,i,t);case d:s=8,o|=8;break;case h:return(e=cs(12,n,t,2|o)).elementType=h,e.lanes=i,e;case m:return(e=cs(13,n,t,o)).elementType=m,e.lanes=i,e;case v:return(e=cs(19,n,t,o)).elementType=v,e.lanes=i,e;case x:return ps(n,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case f:s=10;break e;case p:s=9;break e;case g:s=11;break e;case y:s=14;break e;case b:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=cs(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function fs(e,t,n,r){return(e=cs(7,e,r,t)).lanes=n,e}function ps(e,t,n,r){return(e=cs(22,e,r,t)).elementType=x,e.lanes=n,e.stateNode={isHidden:!1},e}function gs(e,t,n){return(e=cs(6,e,null,t)).lanes=n,e}function ms(e,t,n){return(t=cs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vs(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=q,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=At(0),this.expirationTimes=At(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=At(0),this.identifierPrefix=r,this.onRecoverableError=o,K&&(this.mutableSourceEagerHydrationData=null)}function ys(e,t,n,r,o,i,a,s,l){return e=new vs(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=cs(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zn(i),e}function bs(e){if(!e)return dt;e:{if(_(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(mt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(mt(n))return bt(e,n,t)}return t}function xs(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return null===(e=P(t))?null:e.stateNode}function ws(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ks(e,t){ws(e,t),(e=e.alternate)&&ws(e,t)}function Ss(e){return null===(e=P(e))?null:e.stateNode}function Cs(){return null}return ka=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||ft.current)zo=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return zo=!1,function(e,t,n){switch(t.tag){case 3:qo(t),Ln();break;case 5:kr(t);break;case 1:mt(t.type)&&xt(t);break;case 4:xr(t,t.stateNode.containerInfo);break;case 10:Bn(0,t.type._context,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(ut(Cr,1&Cr.current),t.flags|=128,null):0!=(n&t.child.childLanes)?ti(e,t,n):(ut(Cr,1&Cr.current),null!==(e=li(e,t,n))?e.sibling:null);ut(Cr,1&Cr.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return ai(e,t,n);t.flags|=128}var o=t.memoizedState;if(null!==o&&(o.rendering=null,o.tail=null,o.lastEffect=null),ut(Cr,Cr.current),r)break;return null;case 22:case 23:return t.lanes=0,Wo(e,t,n)}return li(e,t,n)}(e,t,n);zo=0!=(131072&e.flags)}else zo=!1,vn&&0!=(1048576&t.flags)&&hn(t,on,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;si(e,t),e=t.pendingProps;var o=gt(t,ht.current);Hn(t,n),o=Fr(null,t,r,e,o,n);var i=Hr();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,mt(r)?(i=!0,xt(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Zn(t),o.updater=or,t.stateNode=o,o._reactInternals=t,lr(t,r,e,n),t=Go(null,t,r,!0,i,n)):(t.tag=0,vn&&i&&fn(t),Bo(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(si(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return us(e)?1:0;if(null!=e){if((e=e.$$typeof)===g)return 11;if(e===y)return 14}return 2}(r),e=An(r,e),o){case 0:t=Uo(null,t,r,e,n);break e;case 1:t=Vo(null,t,r,e,n);break e;case 11:t=jo(null,t,r,e,n);break e;case 14:t=Fo(null,t,r,An(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Uo(e,t,r,o=t.elementType===r?o:An(r,o),n);case 1:return r=t.type,o=t.pendingProps,Vo(e,t,r,o=t.elementType===r?o:An(r,o),n);case 3:e:{if(qo(t),null===e)throw Error(a(387));r=t.pendingProps,o=(i=t.memoizedState).element,Yn(e,t),er(t,r,null,n);var s=t.memoizedState;if(r=s.element,K&&i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Zo(e,t,r,n,o=Lo(Error(a(423)),t));break e}if(r!==o){t=Zo(e,t,r,n,o=Lo(Error(a(424)),t));break e}for(K&&(mn=$e(t.stateNode.containerInfo),gn=t,vn=!0,bn=null,yn=!1),n=pr(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Ln(),r===o){t=li(e,t,n);break e}Bo(e,t,r,n)}t=t.child}return t;case 5:return kr(t),null===e&&Sn(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,W(r,o)?s=null:null!==i&&W(r,i)&&(t.flags|=32),$o(e,t),Bo(e,t,s,n),t.child;case 6:return null===e&&Sn(t),null;case 13:return ti(e,t,n);case 4:return xr(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=fr(t,null,r,n):Bo(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,jo(e,t,r,o=t.elementType===r?o:An(r,o),n);case 7:return Bo(e,t,t.pendingProps,n),t.child;case 8:case 12:return Bo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,Bn(0,r,s=o.value),null!==i)if(Zt(i.value,s)){if(i.children===o.children&&!ft.current){t=li(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var l=i.dependencies;if(null!==l){s=i.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===i.tag){(c=Xn(-1,n&-n)).tag=2;var u=i.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,null!==(c=i.alternate)&&(c.lanes|=n),Fn(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===i.tag)s=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(s=i.return))throw Error(a(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Fn(s,n,t),s=i.sibling}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===t){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}Bo(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hn(t,n),r=r(o=Wn(o)),t.flags|=1,Bo(e,t,r,n),t.child;case 14:return o=An(r=t.type,t.pendingProps),Fo(e,t,r,o=An(r.type,o),n);case 15:return Ho(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:An(r,o),si(e,t),t.tag=1,mt(r)?(e=!0,xt(t)):e=!1,Hn(t,n),ar(t,r,o),lr(t,r,o,n),Go(null,t,r,!0,e,n);case 19:return ai(e,t,n);case 22:return Wo(e,t,n)}throw Error(a(156,t.tag))},t.attemptContinuousHydration=function(e){if(13===e.tag){var t=Gn(e,134217728);if(null!==t)Na(t,e,134217728,Ia());ks(e,134217728)}},t.attemptDiscreteHydration=function(e){if(13===e.tag){var t=Gn(e,1);if(null!==t)Na(t,e,1,Ia());ks(e,1)}},t.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=Ra(e),n=Gn(e,t);if(null!==n)Na(n,e,t,Ia());ks(e,t)}},t.attemptSynchronousHydration=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Lt(t.pendingLanes);0!==n&&(Rt(t,1|n),Da(t,Ht()),0==(6&ia)&&(wa(),en()))}break;case 13:Wa((function(){var t=Gn(e,1);if(null!==t){var n=Ia();Na(t,e,1,n)}})),ks(e,1)}},t.batchedUpdates=function(e,t){var n=ia;ia|=1;try{return e(t)}finally{0===(ia=n)&&(wa(),Xt&&en())}},t.createComponentSelector=function(e){return{$$typeof:Ui,value:e}},t.createContainer=function(e,t,n,r,o,i,a){return ys(e,t,!1,null,0,r,0,i,a)},t.createHasPseudoClassSelector=function(e){return{$$typeof:Vi,value:e}},t.createHydrationContainer=function(e,t,n,r,o,i,a,s,l){return(e=ys(n,r,!0,e,0,i,0,s,l)).context=bs(null),n=e.current,(i=Xn(r=Ia(),o=Ra(n))).callback=null!=t?t:null,Kn(n,i,o),e.current.lanes=o,It(e,o,r),Da(e,r),e},t.createPortal=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:c,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},t.createRoleSelector=function(e){return{$$typeof:Gi,value:e}},t.createTestNameSelector=function(e){return{$$typeof:qi,value:e}},t.createTextSelector=function(e){return{$$typeof:Zi,value:e}},t.deferredUpdates=function(e){var t=Nt,n=oa.transition;try{return oa.transition=null,Nt=16,e()}finally{Nt=t,oa.transition=n}},t.discreteUpdates=function(e,t,n,r,o){var i=Nt,a=oa.transition;try{return oa.transition=null,Nt=1,e(t,n,r,o)}finally{Nt=i,oa.transition=a,0===ia&&wa()}},t.findAllNodes=ea,t.findBoundingRects=function(e,t){if(!oe)throw Error(a(363));t=ea(e,t),e=[];for(var n=0;n<t.length;n++)e.push(ae(t[n]));for(t=e.length-1;0<t;t--)for(var r=(n=e[t]).x,o=r+n.width,i=n.y,s=i+n.height,l=t-1;0<=l;l--)if(t!==l){var c=e[l],u=c.x,d=u+c.width,h=c.y,f=h+c.height;if(r>=u&&i>=h&&o<=d&&s<=f){e.splice(t,1);break}if(!(r!==u||n.width!==c.width||f<i||h>s)){h>i&&(c.height+=h-i,c.y=i),f<s&&(c.height=s-h),e.splice(t,1);break}if(!(i!==h||n.height!==c.height||d<r||u>o)){u>r&&(c.width+=u-r,c.x=r),d<o&&(c.width=o-u),e.splice(t,1);break}}return e},t.findHostInstance=xs,t.findHostInstanceWithNoPortals=function(e){return null===(e=null!==(e=L(e))?T(e):null)?null:e.stateNode},t.findHostInstanceWithWarning=function(e){return xs(e)},t.flushControlled=function(e){var t=ia;ia|=1;var n=oa.transition,r=Nt;try{oa.transition=null,Nt=1,e()}finally{Nt=r,oa.transition=n,0===(ia=t)&&(wa(),en())}},t.flushPassiveEffects=es,t.flushSync=Wa,t.focusWithin=function(e,t){if(!oe)throw Error(a(363));for(t=Ji(e=Xi(e),t),t=Array.from(t),e=0;e<t.length;){var n=t[e++];if(!le(n)){if(5===n.tag&&ue(n.stateNode))return!0;for(n=n.child;null!==n;)t.push(n),n=n.sibling}}return!1},t.getCurrentUpdatePriority=function(){return Nt},t.getFindAllNodesFailureDescription=function(e,t){if(!oe)throw Error(a(363));var n=0,r=[];e=[Xi(e),0];for(var o=0;o<e.length;){var i=e[o++],s=e[o++],l=t[s];if((5!==i.tag||!le(i))&&(Ki(i,l)&&(r.push(Qi(l)),++s>n&&(n=s)),s<t.length))for(i=i.child;null!==i;)e.push(i,s),i=i.sibling}if(n<t.length){for(e=[];n<t.length;n++)e.push(Qi(t[n]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},t.getPublicRootInstance=function(e){return(e=e.current).child?5===e.child.tag?I(e.child.stateNode):e.child.stateNode:null},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:Ss,findFiberByHostInstance:e.findFiberByHostInstance||Cs,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{Gt=t.inject(e),qt=t}catch(tae){}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!oe)throw Error(a(363));e=ea(e,t);var o=de(e,n,r).disconnect;return{disconnect:function(){o()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=Nt;try{return Nt=e,t()}finally{Nt=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var o=t.current,i=Ia(),a=Ra(o);return n=bs(n),null===t.context?t.context=n:t.pendingContext=n,(t=Xn(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Kn(o,t,a))&&(Na(e,o,a,i),Qn(e,o,a)),a},t};
/**
* @license React
* react-reconciler.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.
*/!function(e){e.exports=goe}(poe);const moe=o(poe.exports);var voe={exports:{}},yoe={
/**
* @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.
*/
ConcurrentRoot:1,ContinuousEventPriority:4,DefaultEventPriority:16,DiscreteEventPriority:1,IdleEventPriority:536870912,LegacyRoot:0};!function(e){e.exports=yoe}(voe);const boe={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let xoe=!1,woe=!1;const koe=".react-konva-event",Soe={};function Coe(e,t,n=Soe){if(!xoe&&"zIndex"in t&&(console.warn('ReactKonva: You are using "zIndex" attribute for a Konva node.\nreact-konva may get confused with ordering. Just define correct order of elements in your render function of a component.\nFor more info see: https://github.com/konvajs/react-konva/issues/194\n'),xoe=!0),!woe&&t.draggable){var r=void 0!==t.x||void 0!==t.y,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn("ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.\nPosition of a node will be changed during drag&drop, so you should update state of the react app as well.\nConsider to add onDragMove or onDragEnd events.\nFor more info see: https://github.com/konvajs/react-konva/issues/256\n"),woe=!0)}for(var i in n)if(!boe[i]){var a="on"===i.slice(0,2),s=n[i]!==t[i];if(a&&s)"content"===(f=i.substr(2).toLowerCase()).substr(0,7)&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),e.off(f,n[i]);!t.hasOwnProperty(i)&&e.setAttr(i,void 0)}var l=t._useStrictMode,c={},u=!1;const d={};for(var i in t)if(!boe[i]){a="on"===i.slice(0,2);var h=n[i]!==t[i];if(a&&h)"content"===(f=i.substr(2).toLowerCase()).substr(0,7)&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),t[i]&&(d[f]=t[i]);!a&&(t[i]!==n[i]||l&&t[i]!==e.getAttr(i))&&(u=!0,c[i]=t[i])}for(var f in u&&(e.setAttrs(c),_oe(e)),d)e.on(f+koe,d[f])}function _oe(e){if(!DQ.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const Eoe={},Loe={};R0.Node.prototype._applyProps=Coe;const Poe=setTimeout,Ooe=clearTimeout;function Toe(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),_oe(e)}const Moe=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:function(e,t){"string"!=typeof t?(e.add(t),_oe(e)):console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`)},createInstance:function(e,t,n){let r=R0[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=R0.Group);const o={},i={};for(var a in t){"on"===a.slice(0,2)?i[a]=t[a]:o[a]=t[a]}const s=new r(o);return Coe(s,i),s},createTextInstance:function(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)},finalizeInitialChildren:function(e,t,n){return!1},getPublicInstance:function(e){return e},prepareForCommit:function(){return null},preparePortalMount:function(){return null},prepareUpdate:function(e,t,n,r){return Loe},resetAfterCommit:function(){},resetTextContent:function(e){},shouldDeprioritizeSubtree:function(e,t){return!1},getRootHostContext:function(){return Eoe},getChildHostContext:function(){return Eoe},scheduleTimeout:Poe,cancelTimeout:Ooe,noTimeout:-1,shouldSetTextContent:function(e,t){return!1},isPrimaryRenderer:!1,warnsIfNotActing:!0,supportsMutation:!0,appendChild:function(e,t){t.parent===e?t.moveToTop():e.add(t),_oe(e)},appendChildToContainer:function(e,t){t.parent===e?t.moveToTop():e.add(t),_oe(e)},insertBefore:Toe,insertInContainerBefore:function(e,t,n){Toe(e,t,n)},removeChild:function(e,t){t.destroy(),t.off(koe),_oe(e)},removeChildFromContainer:function(e,t){t.destroy(),t.off(koe),_oe(e)},commitTextUpdate:function(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)},commitMount:function(e,t,n){},commitUpdate:function(e,t,n,r,o){Coe(e,o,r)},hideInstance:function(e){e.hide(),_oe(e)},hideTextInstance:function(e){},unhideInstance:function(e,t){(null==t.visible||t.visible)&&e.show()},unhideTextInstance:function(e,t){},clearContainer:function(e){},detachDeletedInstance:function(){},getCurrentEventPriority:()=>voe.exports.DefaultEventPriority,now:V.exports.unstable_now,idlePriority:V.exports.unstable_IdlePriority,run:V.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var Aoe=Object.defineProperty,Ioe=Object.defineProperties,Roe=Object.getOwnPropertyDescriptors,Noe=Object.getOwnPropertySymbols,Doe=Object.prototype.hasOwnProperty,zoe=Object.prototype.propertyIsEnumerable,Boe=(e,t,n)=>t in e?Aoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,joe=(e,t)=>{for(var n in t||(t={}))Doe.call(t,n)&&Boe(e,n,t[n]);if(Noe)for(var n of Noe(t))zoe.call(t,n)&&Boe(e,n,t[n]);return e};function Foe(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){const e=Foe(r,t,n);if(e)return e;r=t?null:r.sibling}}function Hoe(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(X6){return e}}const Woe=Hoe(i.exports.createContext(null));class $oe extends i.exports.Component{render(){return sd(Woe.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:Uoe,ReactCurrentDispatcher:Voe}=i.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;const Goe=[],qoe=new WeakMap;function Zoe(){var e;const t=function(){const e=i.exports.useContext(Woe);if(!e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=i.exports.useId(),n=i.exports.useMemo((()=>{var n;return null!=(n=Uoe.current)?n:Foe(e,!1,(e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}}))}),[e,t]);return n}();Goe.splice(0,Goe.length),Foe(t,!0,(e=>{var t;const n=null==(t=e.type)?void 0:t._context;n&&n!==Woe&&Goe.push(Hoe(n))}));for(const n of Goe){const t=null==(e=Voe.current)?void 0:e.readContext(n);qoe.set(n,t)}return i.exports.useMemo((()=>Goe.reduce(((e,t)=>n=>i.exports.createElement(e,null,i.exports.createElement(t.Provider,((e,t)=>Ioe(e,Roe(t)))(joe({},n),{value:qoe.get(t)})))),(e=>sd($oe,{...joe({},e)})))),[])}const Yoe=e=>{const t=F.useRef(),n=F.useRef(),r=F.useRef(),o=function(e){const t=F.useRef();return F.useLayoutEffect((()=>{t.current=e})),t.current}(e),i=Zoe(),a=t=>{const{forwardedRef:n}=e;n&&("function"==typeof n?n(t):n.current=t)};return F.useLayoutEffect((()=>(n.current=new R0.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=nie.createContainer(n.current,voe.exports.LegacyRoot,!1,null),nie.updateContainer(sd(i,{children:e.children}),r.current),()=>{R0.isBrowser&&(a(null),nie.updateContainer(null,r.current,null),n.current.destroy())})),[]),F.useLayoutEffect((()=>{a(n.current),Coe(n.current,e,o),nie.updateContainer(sd(i,{children:e.children}),r.current,null)})),sd("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Xoe="Layer",Koe="Group",Qoe="Rect",Joe="Circle",eie="Line",tie="Image",nie=moe(Moe);nie.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:F.version,rendererPackageName:"react-konva"});const rie=F.forwardRef(((e,t)=>sd($oe,{children:sd(Yoe,{...e,forwardedRef:t})}))),oie=c$([c9],(e=>({objects:e.layerState.objects})),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),iie=e=>{const{...t}=e,{objects:n}=c5(oie);return sd(Koe,{listening:!1,...t,children:n.filter(xY).map(((e,t)=>sd(eie,{points:e.points,stroke:"rgb(0,0,0)",strokeWidth:2*e.strokeWidth,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:"brush"===e.tool?"source-over":"destination-out"},t)))})},aie=e=>{const{r:t,g:n,b:r,a:o}=e;return`rgba(${t}, ${n}, ${r}, ${o})`},sie=c$(c9,(e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:o,brushColor:i,tool:a,layer:s,shouldShowBrush:l,isMovingBoundingBox:c,isTransformingBoundingBox:u,stageScale:d,stageDimensions:h,boundingBoxCoordinates:f,boundingBoxDimensions:p,shouldRestrictStrokesToBox:g}=e,m=g?{clipX:f.x,clipY:f.y,clipWidth:p.width,clipHeight:p.height}:{};return{cursorPosition:t,brushX:t?t.x:h.width/2,brushY:t?t.y:h.height/2,radius:n/2,colorPickerOuterRadius:30/d,colorPickerInnerRadius:21/d,maskColorString:aie({...o,a:.5}),brushColorString:aie(i),colorPickerColorString:aie(r),tool:a,layer:s,shouldShowBrush:l,shouldDrawBrushPreview:!(c||u||!t)&&l,strokeWidth:1.5/d,dotRadius:1.5/d,clip:m}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),lie=e=>{const{...t}=e,{brushX:n,brushY:r,radius:o,maskColorString:i,tool:a,layer:s,shouldDrawBrushPreview:l,dotRadius:c,strokeWidth:u,brushColorString:d,colorPickerColorString:h,colorPickerInnerRadius:f,colorPickerOuterRadius:p,clip:g}=c5(sie);return l?ld(Koe,{listening:!1,...g,...t,children:[ld(ad,"colorPicker"===a?{children:[sd(Joe,{x:n,y:r,radius:p,stroke:d,strokeWidth:10,strokeScaleEnabled:!1}),sd(Joe,{x:n,y:r,radius:f,stroke:h,strokeWidth:10,strokeScaleEnabled:!1})]}:{children:[sd(Joe,{x:n,y:r,radius:o,fill:"mask"===s?i:d,globalCompositeOperation:"eraser"===a?"destination-out":"source-out"}),sd(Joe,{x:n,y:r,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:2*u,strokeEnabled:!0,listening:!1}),sd(Joe,{x:n,y:r,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:u,strokeEnabled:!0,listening:!1})]}),sd(Joe,{x:n,y:r,radius:2*c,fill:"rgba(255,255,255,0.4)",listening:!1}),sd(Joe,{x:n,y:r,radius:c,fill:"rgba(0,0,0,1)",listening:!1})]}):null},cie=c$(c9,(e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageScale:r,isDrawing:o,isTransformingBoundingBox:i,isMovingBoundingBox:a,tool:s,shouldSnapToGrid:l}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMovingBoundingBox:a,isTransformingBoundingBox:i,stageScale:r,shouldSnapToGrid:l,tool:s,hitStrokeWidth:20/r}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),uie=e=>{const{...t}=e,n=l5(),{boundingBoxCoordinates:r,boundingBoxDimensions:o,isDrawing:a,isMovingBoundingBox:s,isTransformingBoundingBox:l,stageScale:c,shouldSnapToGrid:u,tool:d,hitStrokeWidth:h}=c5(cie),f=i.exports.useRef(null),p=i.exports.useRef(null),[g,m]=i.exports.useState(!1);i.exports.useEffect((()=>{f.current&&p.current&&(f.current.nodes([p.current]),f.current.getLayer()?.batchDraw())}),[]);const v=64*c,y=i.exports.useCallback((e=>{if(!u)return void n(VY({x:Math.floor(e.target.x()),y:Math.floor(e.target.y())}));const t=e.target.x(),r=e.target.y(),o=hY(t,64),i=hY(r,64);e.target.x(o),e.target.y(i),n(VY({x:o,y:i}))}),[n,u]),b=i.exports.useCallback((()=>{if(!p.current)return;const e=p.current,t=e.scaleX(),r=e.scaleY(),o=Math.round(e.width()*t),i=Math.round(e.height()*r),a=Math.round(e.x()),s=Math.round(e.y());n(GY({width:o,height:i})),n(VY({x:u?dY(a,64):a,y:u?dY(s,64):s})),e.scaleX(1),e.scaleY(1)}),[n,u]),x=i.exports.useCallback(((e,t,n)=>{const r=e.x%v,o=e.y%v;return{x:dY(t.x,v)+r,y:dY(t.y,v)+o}}),[v]),w=()=>{n(uX(!1)),n(lX(!1)),n(iX(!1)),m(!1)},k=()=>{n(lX(!0))},S=()=>{n(uX(!1)),n(lX(!1)),n(iX(!1)),m(!1)},C=()=>{m(!0)},_=()=>{n(iX(!0))},E=()=>{n(iX(!1))};return ld(Koe,{...t,children:[sd(Qoe,{height:o.height,width:o.width,x:r.x,y:r.y,onMouseEnter:_,onMouseOver:_,onMouseLeave:E,onMouseOut:E}),sd(Qoe,{draggable:!0,fillEnabled:!1,height:o.height,hitStrokeWidth:h,listening:!a&&"move"===d,onDragStart:k,onDragEnd:S,onDragMove:y,onMouseDown:k,onMouseOut:()=>{!l&&!s&&m(!1)},onMouseOver:C,onMouseEnter:C,onMouseUp:S,onTransform:b,onTransformEnd:w,ref:p,stroke:g?"rgba(255,255,255,0.7)":"white",strokeWidth:(g?8:1)/c,width:o.width,x:r.x,y:r.y}),sd("Transformer",{anchorCornerRadius:3,anchorDragBoundFunc:x,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:"move"===d?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!a&&"move"===d,onDragStart:k,onDragEnd:S,onMouseDown:()=>{n(uX(!0))},onMouseUp:w,onTransformEnd:w,ref:f,rotateEnabled:!1})]})},die=c$([c9,_3,u9],((e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:o,shouldShowBoundingBox:i,tool:a,isMaskEnabled:s,shouldSnapToGrid:l}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(r),shouldLockBoundingBox:o,shouldShowBoundingBox:i,tool:a,isStaging:n,isMaskEnabled:s,shouldSnapToGrid:l}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),hie=()=>{const e=l5(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:o,isMaskEnabled:a,shouldSnapToGrid:s}=c5(die),l=i.exports.useRef(null),c=W1();n7(["shift+c"],(()=>{e(MY())}),{enabled:()=>!o,preventDefault:!0},[]);n7(["h"],(()=>{e(oX(!a))}),{enabled:()=>!o,preventDefault:!0},[a]),n7(["n"],(()=>{e(PX(!s))}),{enabled:!0,preventDefault:!0},[s]),n7("esc",(()=>{e(HY())}),{enabled:()=>!0,preventDefault:!0}),n7("shift+h",(()=>{e(bX(!n))}),{enabled:()=>!o,preventDefault:!0},[t,n]),n7(["space"],(t=>{t.repeat||(c?.container().focus(),"move"!==r&&(l.current=r,e(AX("move"))),"move"===r&&l.current&&"move"!==l.current&&(e(AX(l.current)),l.current="move"))}),{keyup:!0,keydown:!0,preventDefault:!0},[r,l])},fie=c$(c9,(e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:o}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:o,maskColorString:aie(t)}})),pie=e=>'data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n <svg width="60px" height="60px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">\n <g transform="matrix(0.5,0,0,0.5,0,0)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,2.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,7.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,10)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,12.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,15)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,17.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,20)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,22.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,25)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,27.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,30)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-2.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-7.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-10)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-12.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-15)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-17.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-20)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-22.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-25)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-27.5)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n <g transform="matrix(0.5,0,0,0.5,0,-30)">\n <path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>\n </g>\n</svg>'.replaceAll("black",e),gie=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:a}=c5(fie),[s,l]=i.exports.useState(null),[c,u]=i.exports.useState(0),d=i.exports.useRef(null),h=i.exports.useCallback((()=>{u(c+1),setTimeout(h,500)}),[c]);return i.exports.useEffect((()=>{if(s)return;const e=new Image;e.onload=()=>{l(e)},e.src=pie(n)}),[s,n]),i.exports.useEffect((()=>{s&&(s.src=pie(n))}),[s,n]),i.exports.useEffect((()=>{const e=setInterval((()=>u((e=>(e+1)%5))),50);return()=>clearInterval(e)}),[]),s&&PV.exports.isNumber(r.x)&&PV.exports.isNumber(r.y)&&PV.exports.isNumber(a)&&PV.exports.isNumber(o.width)&&PV.exports.isNumber(o.height)?sd(Qoe,{ref:d,offsetX:r.x/a,offsetY:r.y/a,height:o.height/a,width:o.width/a,fillPatternImage:s,fillPatternOffsetY:PV.exports.isNumber(c)?c:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/a,y:1/a},listening:!0,globalCompositeOperation:"source-in",...t}):null},mie=c$([c9],(e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),vie=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}},yie=()=>{const e=l5(),t=H1(),n=W1();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const o=B1.pixelRatio,[i,a,s,l]=t.getContext().getImageData(r.x*o,r.y*o,1,1).data;e(QY({r:i,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(AY())}}},bie=c$([_3,c9,u9],((e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),xie=c$([_3,c9,u9],((e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),wie=c$([_3,c9,u9],((e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),kie=c$([c9,u9],((e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});var Sie=i.exports;const Cie=e=>{const{url:t,x:n,y:r}=e,[o]=function(e,t,n){const r=Sie.useRef("loading"),o=Sie.useRef(),[i,a]=Sie.useState(0),s=Sie.useRef(),l=Sie.useRef(),c=Sie.useRef();return s.current===e&&l.current===t&&c.current===n||(r.current="loading",o.current=void 0,s.current=e,l.current=t,c.current=n),Sie.useLayoutEffect((function(){if(e){var i=document.createElement("img");return i.addEventListener("load",s),i.addEventListener("error",l),t&&(i.crossOrigin=t),n&&(i.referrerpolicy=n),i.src=e,function(){i.removeEventListener("load",s),i.removeEventListener("error",l)}}function s(){r.current="loaded",o.current=i,a(Math.random())}function l(){r.current="failed",o.current=void 0,a(Math.random())}}),[e,t,n]),[o.current,r.current]}(t);return sd(tie,{x:n,y:r,image:o,listening:!1})},_ie=c$([c9],(e=>{const{layerState:{objects:t}}=e;return{objects:t}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Eie=()=>{const{objects:e}=c5(_ie);return e?sd(Koe,{name:"outpainting-objects",listening:!1,children:e.map(((e,t)=>{if(wY(e))return sd(Cie,{x:e.x,y:e.y,url:e.image.url},t);if((e=>"line"===e.kind&&"base"===e.layer)(e)){const n=sd(eie,{points:e.points,stroke:e.color?aie(e.color):"rgb(0,0,0)",strokeWidth:2*e.strokeWidth,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:"brush"===e.tool?"source-over":"destination-out"},t);return e.clip?sd(Koe,{clipX:e.clip.x,clipY:e.clip.y,clipWidth:e.clip.width,clipHeight:e.clip.height,children:n},t):n}return(e=>"fillRect"===e.kind&&"base"===e.layer)(e)?sd(Qoe,{x:e.x,y:e.y,width:e.width,height:e.height,fill:aie(e.color)},t):(e=>"eraseRect"===e.kind&&"base"===e.layer)(e)?sd(Qoe,{x:e.x,y:e.y,width:e.width,height:e.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},t):void 0}))}):null},Lie=c$([c9],(e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Pie={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},Oie=()=>{const{colorMode:e}=ud(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=c5(Lie),[o,a]=i.exports.useState([]),s=i.exports.useCallback((e=>e/t),[t]);return i.exports.useLayoutEffect((()=>{const t=Pie[e],{width:o,height:i}=r,{x:l,y:c}=n,u={x1:0,y1:0,x2:o,y2:i,offset:{x:s(l),y:s(c)}},d=64*Math.ceil(s(l)/64),h=64*Math.ceil(s(c)/64),f={x1:-d,y1:-h,x2:s(o)-d+64,y2:s(i)-h+64},p={x1:Math.min(u.x1,f.x1),y1:Math.min(u.y1,f.y1),x2:Math.max(u.x2,f.x2),y2:Math.max(u.y2,f.y2)},g=p.x2-p.x1,m=p.y2-p.y1,v=Math.round(g/64)+1,y=Math.round(m/64)+1,b=OV.range(0,v).map((e=>sd(eie,{x:p.x1+64*e,y:p.y1,points:[0,0,0,m],stroke:t,strokeWidth:1},`x_${e}`))),x=OV.range(0,y).map((e=>sd(eie,{x:p.x1,y:p.y1+64*e,points:[0,0,g,0],stroke:t,strokeWidth:1},`y_${e}`)));a(b.concat(x))}),[t,n,r,e,s]),sd(Koe,{children:o})},Tie=c$([e=>e.gallery],(e=>e.intermediateImage?e.intermediateImage:null),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Mie=e=>{const{...t}=e,n=c5(Tie),[r,o]=i.exports.useState(null);if(i.exports.useEffect((()=>{if(!n)return;const e=new Image;e.onload=()=>{o(e)},e.src=n.url}),[n]),!n?.boundingBox)return null;const{boundingBox:{x:a,y:s,width:l,height:c}}=n;return r?sd(tie,{x:a,y:s,width:l,height:c,image:r,listening:!1,...t}):null},Aie=e=>Math.round(100*e)/100,Iie=c$([c9],(e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${Aie(n)}, ${Aie(r)})`}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});function Rie(){const{cursorCoordinatesString:e}=c5(Iie),{t:t}=BZ();return sd("div",{children:`${t("unifiedcanvas:cursorPosition")}: ${e}`})}const Nie=c$([c9],(e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:o},boundingBoxDimensions:{width:i,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:c,y:u},stageScale:d,shouldShowCanvasDebugInfo:h,layer:f,boundingBoxScaleMethod:p}=e;let g="inherit";("none"===p&&(i<512||a<512)||"manual"===p&&s*l<262144)&&(g="var(--status-working-color)");return{activeLayerColor:"mask"===f?"var(--status-working-color)":"inherit",activeLayerString:f.charAt(0).toUpperCase()+f.slice(1),boundingBoxColor:g,boundingBoxCoordinatesString:`(${Aie(c)}, ${Aie(u)})`,boundingBoxDimensionsString:`${i}×${a}`,scaledBoundingBoxDimensionsString:`${s}×${l}`,canvasCoordinatesString:`${Aie(r)}×${Aie(o)}`,canvasDimensionsString:`${t}×${n}`,canvasScaleString:Math.round(100*d),shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:"auto"!==p,shouldShowScaledBoundingBox:"none"!==p}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Die=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:o,scaledBoundingBoxDimensionsString:i,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:c,shouldShowCanvasDebugInfo:u,shouldShowBoundingBox:d}=c5(Nie),{t:h}=BZ();return ld("div",{className:"canvas-status-text",children:[sd("div",{style:{color:e},children:`${h("unifiedcanvas:activeLayer")}: ${t}`}),sd("div",{children:`${h("unifiedcanvas:canvasScale")}: ${c}%`}),d&&sd("div",{style:{color:n},children:`${h("unifiedcanvas:boundingBox")}: ${o}`}),a&&sd("div",{style:{color:n},children:`${h("unifiedcanvas:scaledBoundingBox")}: ${i}`}),u&&ld(ad,{children:[sd("div",{children:`${h("unifiedcanvas:boundingBoxPosition")}: ${r}`}),sd("div",{children:`${h("unifiedcanvas:canvasDimensions")}: ${l}`}),sd("div",{children:`${h("unifiedcanvas:canvasPosition")}: ${s}`}),sd(Rie,{})]})]})},zie=c$([c9],(e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:o,boundingBoxCoordinates:{x:i,y:a},boundingBoxDimensions:{width:s,height:l}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:0===n,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:i,y:a,width:s,height:l}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Bie=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:i,y:a,width:s,height:l}=c5(zie);return ld(Koe,{...t,children:[r&&n&&sd(Cie,{url:n.image.url,x:i,y:a}),o&&ld(Koe,{children:[sd(Qoe,{x:i,y:a,width:s,height:l,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),sd(Qoe,{x:i,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},jie=c$([c9],(e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:o}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:0===n,isOnLastImage:n===t.length-1,shouldShowStagingImage:o,shouldShowStagingOutline:r}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Fie=()=>{const e=l5(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:o}=c5(jie),{t:a}=BZ(),s=i.exports.useCallback((()=>{e(LX(!0))}),[e]),l=i.exports.useCallback((()=>{e(LX(!1))}),[e]);n7(["left"],(()=>{c()}),{enabled:()=>!0,preventDefault:!0}),n7(["right"],(()=>{u()}),{enabled:()=>!0,preventDefault:!0}),n7(["enter"],(()=>{d()}),{enabled:()=>!0,preventDefault:!0});const c=()=>e(BY()),u=()=>e(zY()),d=()=>e(IY());return r?sd(SI,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:s,onMouseOut:l,children:ld(NM,{isAttached:!0,children:[sd(f3,{tooltip:`${a("unifiedcanvas:previous")} (Left)`,"aria-label":`${a("unifiedcanvas:previous")} (Left)`,icon:sd(C5,{}),onClick:c,"data-selected":!0,isDisabled:t}),sd(f3,{tooltip:`${a("unifiedcanvas:next")} (Right)`,"aria-label":`${a("unifiedcanvas:next")} (Right)`,icon:sd(_5,{}),onClick:u,"data-selected":!0,isDisabled:n}),sd(f3,{tooltip:`${a("unifiedcanvas:accept")} (Enter)`,"aria-label":`${a("unifiedcanvas:accept")} (Enter)`,icon:sd(O5,{}),onClick:d,"data-selected":!0}),sd(f3,{tooltip:a("unifiedcanvas:showHide"),"aria-label":a("unifiedcanvas:showHide"),"data-alert":!o,icon:sd(o?j5:B5,{}),onClick:()=>e(EX(!o)),"data-selected":!0}),sd(f3,{tooltip:a("unifiedcanvas:saveToGallery"),"aria-label":a("unifiedcanvas:saveToGallery"),icon:sd(t3,{}),onClick:()=>e(CQ(r.image.url)),"data-selected":!0}),sd(f3,{tooltip:a("unifiedcanvas:discardAll"),"aria-label":a("unifiedcanvas:discardAll"),icon:sd(K5,{style:{transform:"rotate(45deg)"}}),onClick:()=>e(RY()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"},fontSize:20})]})}):null},Hie=c$(c9,(e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:o,shouldDarkenOutsideBoundingBox:i,stageCoordinates:a}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:i,stageCoordinates:a,stageDimensions:r,stageScale:o}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Wie=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:o,stageScale:i}=c5(Hie);return ld(Koe,{children:[sd(Qoe,{offsetX:r.x/i,offsetY:r.y/i,height:o.height/i,width:o.width/i,fill:"rgba(0,0,0,0.4)",listening:!1,visible:n}),sd(Qoe,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},$ie=c$([c9,u9],((e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:o,isTransformingBoundingBox:i,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:c,tool:u,isMovingStage:d,shouldShowIntermediates:h,shouldShowGrid:f,shouldRestrictStrokesToBox:p}=e;let g="none";return"move"===u||t?g=d?"grabbing":"grab":i?g=void 0:p&&!a&&(g="default"),{isMaskEnabled:n,isModifyingBoundingBox:i||s,shouldShowBoundingBox:o,shouldShowGrid:f,stageCoordinates:c,stageCursor:g,stageDimensions:l,stageScale:r,tool:u,isStaging:t,shouldShowIntermediates:h}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Uie=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:o,stageCursor:a,stageDimensions:s,stageScale:l,tool:c,isStaging:u,shouldShowIntermediates:d}=c5($ie);hie();const h=i.exports.useRef(null),f=i.exports.useRef(null),p=i.exports.useCallback((e=>{F1=e,h.current=e}),[]),g=i.exports.useCallback((e=>{j1=e,f.current=e}),[]),m=i.exports.useRef({x:0,y:0}),v=i.exports.useRef(!1),y=(e=>{const t=l5(),{isMoveStageKeyHeld:n,stageScale:r}=c5(mie);return i.exports.useCallback((o=>{if(!e.current||n)return;o.evt.preventDefault();const i=e.current.getPointerPosition();if(!i)return;const a=(i.x-e.current.x())/r,s=(i.y-e.current.y())/r;let l=o.evt.deltaY;o.evt.ctrlKey&&(l=-l);const c=OV.clamp(r*.999**l,.1,20),u={x:i.x-a*c,y:i.y-s*c};t(MX(c)),t(TX(u))}),[e,n,r,t])})(h),b=(e=>{const t=l5(),{tool:n,isStaging:r}=c5(bie),{commitColorUnderCursor:o}=yie();return i.exports.useCallback((i=>{if(!e.current)return;if(e.current.container().focus(),"move"===n||r)return void t(cX(!0));if("colorPicker"===n)return void o();const a=vie(e.current);a&&(i.evt.preventDefault(),t(rX(!0)),t(PY([a.x,a.y])))}),[e,n,r,t,o])})(h),x=((e,t)=>{const n=l5(),{tool:r,isDrawing:o,isStaging:a}=c5(xie);return i.exports.useCallback((()=>{if("move"===r||a)n(cX(!1));else{if(!t.current&&o&&e.current){const t=vie(e.current);if(!t)return;n(OY([t.x,t.y]))}else t.current=!1;n(rX(!1))}}),[t,n,o,a,e,r])})(h,v),w=((e,t,n)=>{const r=l5(),{isDrawing:o,tool:a,isStaging:s}=c5(wie),{updateColorUnderCursor:l}=yie();return i.exports.useCallback((()=>{if(!e.current)return;const i=vie(e.current);i&&(r(JY(i)),n.current=i,"colorPicker"!==a?o&&"move"!==a&&!s&&(t.current=!0,r(OY([i.x,i.y]))):l())}),[t,r,o,s,n,e,a,l])})(h,v,m),k=(()=>{const e=l5();return i.exports.useCallback((()=>{e(DY())}),[e])})(),{handleDragStart:S,handleDragMove:C,handleDragEnd:_}=(()=>{const e=l5(),{tool:t,isStaging:n,isMovingBoundingBox:r}=c5(kie);return{handleDragStart:i.exports.useCallback((()=>{"move"!==t&&!n||r||e(cX(!0))}),[e,r,n,t]),handleDragMove:i.exports.useCallback((o=>{if("move"!==t&&!n||r)return;const i={x:o.target.x(),y:o.target.y()};e(TX(i))}),[e,r,n,t]),handleDragEnd:i.exports.useCallback((()=>{"move"!==t&&!n||r||e(cX(!1))}),[e,r,n,t])}})();return sd("div",{className:"inpainting-canvas-container",children:ld("div",{className:"inpainting-canvas-wrapper",children:[ld(rie,{tabIndex:-1,ref:p,className:"inpainting-canvas-stage",style:{...a?{cursor:a}:{}},x:o.x,y:o.y,width:s.width,height:s.height,scale:{x:l,y:l},onTouchStart:b,onTouchMove:w,onTouchEnd:x,onMouseDown:b,onMouseLeave:k,onMouseMove:w,onMouseUp:x,onDragStart:S,onDragMove:C,onDragEnd:_,onContextMenu:e=>e.evt.preventDefault(),onWheel:y,draggable:("move"===c||u)&&!t,children:[sd(Xoe,{id:"grid",visible:r,children:sd(Oie,{})}),sd(Xoe,{id:"base",ref:g,listening:!1,imageSmoothingEnabled:!1,children:sd(Eie,{})}),ld(Xoe,{id:"mask",visible:e,listening:!1,children:[sd(iie,{visible:!0,listening:!1}),sd(gie,{listening:!1})]}),sd(Xoe,{children:sd(Wie,{})}),ld(Xoe,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&sd(lie,{visible:"move"!==c,listening:!1}),sd(Bie,{visible:u}),d&&sd(Mie,{}),sd(uie,{visible:n&&!u})]})]}),sd(Die,{}),sd(Fie,{})]})})},Vie=c$([c9,_3,S3],((e,t,n)=>{const{pastLayerStates:r}=e;return{canUndo:r.length>0&&!n.isProcessing,activeTabName:t}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});function Gie(){const e=l5(),{t:t}=BZ(),{canUndo:n,activeTabName:r}=c5(Vie),o=()=>{e(NX())};return n7(["meta+z","ctrl+z"],(()=>{o()}),{enabled:()=>n,preventDefault:!0},[r,n]),sd(f3,{"aria-label":`${t("unifiedcanvas:undo")} (Ctrl+Z)`,tooltip:`${t("unifiedcanvas:undo")} (Ctrl+Z)`,icon:sd(l3,{}),onClick:o,isDisabled:!n})}const qie=c$([c9,_3,S3],((e,t,n)=>{const{futureLayerStates:r}=e;return{canRedo:r.length>0&&!n.isProcessing,activeTabName:t}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});function Zie(){const e=l5(),{canRedo:t,activeTabName:n}=c5(qie),{t:r}=BZ(),o=()=>{e(jY())};return n7(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],(()=>{o()}),{enabled:()=>t,preventDefault:!0},[n,t]),sd(f3,{"aria-label":`${r("unifiedcanvas:redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedcanvas:redo")} (Ctrl+Shift+Z)`,icon:sd(e3,{}),onClick:o,isDisabled:!t})}const Yie=rk(((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:o="Cancel",cancelCallback:a,children:s,title:l,triggerComponent:c}=e,{isOpen:u,onOpen:d,onClose:h}=KA(),f=i.exports.useRef(null);return ld(ad,{children:[i.exports.cloneElement(c,{onClick:d,ref:t}),sd(GB,{isOpen:u,leastDestructiveRef:f,onClose:h,children:sd(VB,{children:ld(qB,{className:"modal",children:[sd($B,{fontSize:"lg",fontWeight:"bold",children:l}),sd(RB,{children:s}),ld(WB,{children:[sd(IM,{ref:f,onClick:()=>{a&&a(),h()},className:"modal-close-btn",children:o}),sd(IM,{colorScheme:"red",onClick:()=>{r(),h()},ml:3,children:n})]})]})})})]})})),Xie=()=>{const e=c5(u9),t=l5(),{t:n}=BZ();return ld(Yie,{title:n("unifiedcanvas:emptyTempImageFolder"),acceptCallback:()=>{t(_Q()),t(FY()),t(TY())},acceptButtonText:n("unifiedcanvas:emptyFolder"),triggerComponent:sd(A3,{leftIcon:sd(s3,{}),size:"sm",isDisabled:e,children:n("unifiedcanvas:emptyTempImageFolder")}),children:[sd("p",{children:n("unifiedcanvas:emptyTempImagesFolderMessage")}),sd("br",{}),sd("p",{children:n("unifiedcanvas:emptyTempImagesFolderConfirm")})]})},Kie=()=>{const e=c5(u9),t=l5(),{t:n}=BZ();return ld(Yie,{title:n("unifiedcanvas:clearCanvasHistory"),acceptCallback:()=>t(TY()),acceptButtonText:n("unifiedcanvas:clearHistory"),triggerComponent:sd(A3,{size:"sm",leftIcon:sd(s3,{}),isDisabled:e,children:n("unifiedcanvas:clearCanvasHistory")}),children:[sd("p",{children:n("unifiedcanvas:clearCanvasHistoryMessage")}),sd("br",{}),sd("p",{children:n("unifiedcanvas:clearCanvasHistoryConfirm")})]})},Qie=c$([c9],(e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:i,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:i,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Jie=()=>{const e=l5(),{t:t}=BZ(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:o,shouldShowCanvasDebugInfo:i,shouldShowGrid:a,shouldShowIntermediates:s,shouldSnapToGrid:l,shouldRestrictStrokesToBox:c}=c5(Qie);n7(["n"],(()=>{e(PX(!l))}),{enabled:!0,preventDefault:!0},[l]);return sd(M3,{trigger:"hover",triggerComponent:sd(f3,{tooltip:t("unifiedcanvas:canvasSettings"),"aria-label":t("unifiedcanvas:canvasSettings"),icon:sd(d3,{})}),children:ld(SI,{direction:"column",gap:"0.5rem",children:[sd(Tne,{label:t("unifiedcanvas:showIntermediates"),isChecked:s,onChange:t=>e(_X(t.target.checked))}),sd(Tne,{label:t("unifiedcanvas:showGrid"),isChecked:a,onChange:t=>e(CX(t.target.checked))}),sd(Tne,{label:t("unifiedcanvas:snapToGrid"),isChecked:l,onChange:t=>e(PX(t.target.checked))}),sd(Tne,{label:t("unifiedcanvas:darkenOutsideSelection"),isChecked:o,onChange:t=>e(mX(t.target.checked))}),sd(Tne,{label:t("unifiedcanvas:autoSaveToGallery"),isChecked:n,onChange:t=>e(pX(t.target.checked))}),sd(Tne,{label:t("unifiedcanvas:saveBoxRegionOnly"),isChecked:r,onChange:t=>e(gX(t.target.checked))}),sd(Tne,{label:t("unifiedcanvas:limitStrokesToBox"),isChecked:c,onChange:t=>e(zX(t.target.checked))}),sd(Tne,{label:t("unifiedcanvas:showCanvasDebugInfo"),isChecked:i,onChange:t=>e(kX(t.target.checked))}),sd(Kie,{}),sd(Xie,{})]})})};function eae(){return(eae=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function tae(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function nae(e){var t=i.exports.useRef(e),n=i.exports.useRef((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var rae=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},oae=function(e){return"touches"in e},iae=function(e){return e&&e.ownerDocument.defaultView||self},aae=function(e,t,n){var r=e.getBoundingClientRect(),o=oae(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:rae((o.pageX-(r.left+iae(e).pageXOffset))/r.width),top:rae((o.pageY-(r.top+iae(e).pageYOffset))/r.height)}},sae=function(e){!oae(e)&&e.preventDefault()},lae=F.memo((function(e){var t=e.onMove,n=e.onKey,r=tae(e,["onMove","onKey"]),o=i.exports.useRef(null),a=nae(t),s=nae(n),l=i.exports.useRef(null),c=i.exports.useRef(!1),u=i.exports.useMemo((function(){var e=function(e){sae(e),(oae(e)?e.touches.length>0:e.buttons>0)&&o.current?a(aae(o.current,e,l.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=c.current,i=iae(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(sae(t),!function(e,t){return t&&!oae(e)}(t,c.current)&&r)){if(oae(t)){c.current=!0;var i=t.changedTouches||[];i.length&&(l.current=i[0].identifier)}r.focus(),a(aae(r,t,l.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[s,a]),d=u[0],h=u[1],f=u[2];return i.exports.useEffect((function(){return f}),[f]),sd("div",{...eae({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:h,tabIndex:0,role:"slider"})})})),cae=function(e){return e.filter(Boolean).join(" ")},uae=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=cae(["react-colorful__pointer",e.className]);return sd("div",{className:i,style:{top:100*o+"%",left:100*n+"%"},children:sd("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},dae=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},hae=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:dae(e.h),s:dae(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:dae(o/2),a:dae(r,2)}},fae=function(e){var t=hae(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},pae=function(e){var t=hae(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},gae=F.memo((function(e){var t=e.hue,n=e.onChange,r=cae(["react-colorful__hue",e.className]);return F.createElement("div",{className:r},F.createElement(lae,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:rae(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":dae(t),"aria-valuemax":"360","aria-valuemin":"0"},F.createElement(uae,{className:"react-colorful__hue-pointer",left:t/360,color:fae({h:t,s:100,v:100,a:1})})))})),mae=F.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:fae({h:t.h,s:100,v:100,a:1})};return F.createElement("div",{className:"react-colorful__saturation",style:r},F.createElement(lae,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:rae(t.s+100*e.left,0,100),v:rae(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+dae(t.s)+"%, Brightness "+dae(t.v)+"%"},F.createElement(uae,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:fae(t)})))})),vae=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function yae(e,t,n){var r=nae(n),o=i.exports.useState((function(){return e.toHsva(t)})),a=o[0],s=o[1],l=i.exports.useRef({color:t,hsva:a});i.exports.useEffect((function(){if(!e.equal(t,l.current.color)){var n=e.toHsva(t);l.current={hsva:n,color:t},s(n)}}),[t,e]),i.exports.useEffect((function(){var t;vae(a,l.current.hsva)||e.equal(t=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:t},r(t))}),[a,e,r]);var c=i.exports.useCallback((function(e){s((function(t){return Object.assign({},t,e)}))}),[]);return[a,c]}var bae="undefined"!=typeof window?i.exports.useLayoutEffect:i.exports.useEffect,xae=new Map,wae=function(e){bae((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!xae.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,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',xae.set(t,n);var r="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0;r&&n.setAttribute("nonce",r),t.head.appendChild(n)}}),[])},kae=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+pae(Object.assign({},n,{a:0}))+", "+pae(Object.assign({},n,{a:1}))+")"},i=cae(["react-colorful__alpha",t]),a=dae(100*n.a);return F.createElement("div",{className:i},sd("div",{className:"react-colorful__alpha-gradient",style:o}),F.createElement(lae,{onMove:function(e){r({a:e.left})},onKey:function(e){r({a:rae(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},F.createElement(uae,{className:"react-colorful__alpha-pointer",left:n.a,color:pae(n)})))},Sae=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,a=e.onChange,s=tae(e,["className","colorModel","color","onChange"]),l=i.exports.useRef(null);wae(l);var c=yae(n,o,a),u=c[0],d=c[1],h=cae(["react-colorful",t]);return F.createElement("div",eae({},s,{ref:l,className:h}),sd(mae,{hsva:u,onChange:d}),sd(gae,{hue:u.h,onChange:d}),F.createElement(kae,{hsva:u,onChange:d,className:"react-colorful__last-control"}))},Cae={defaultColor:{r:0,g:0,b:0,a:1},toHsva:function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:dae(60*(s<0?s+6:s)),s:dae(i?a/i*100:0),v:dae(i/255*100),a:o}},fromHsva:function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:dae(255*[r,s,a,a,l,r][c]),g:dae(255*[l,r,r,s,a,a][c]),b:dae(255*[a,a,l,r,r,s][c]),a:dae(o,2)}},equal:vae},_ae=function(e){return F.createElement(Sae,eae({},e,{colorModel:Cae}))};const Eae=e=>{const{styleClass:t,...n}=e;return sd(_ae,{className:`invokeai__color-picker ${t}`,...n})},Lae=c$([c9,u9],((e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:o,shouldPreserveMaskedArea:i}=e;return{layer:r,maskColor:n,maskColorString:aie(n),isMaskEnabled:o,shouldPreserveMaskedArea:i,isStaging:t}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Pae=()=>{const e=l5(),{t:t}=BZ(),{layer:n,maskColor:r,isMaskEnabled:o,shouldPreserveMaskedArea:i,isStaging:a}=c5(Lae);n7(["q"],(()=>{s()}),{enabled:()=>!a,preventDefault:!0},[n]),n7(["shift+c"],(()=>{l()}),{enabled:()=>!a,preventDefault:!0},[]),n7(["h"],(()=>{c()}),{enabled:()=>!a,preventDefault:!0},[o]);const s=()=>{e(dX("mask"===n?"base":"mask"))},l=()=>e(MY()),c=()=>e(oX(!o));return sd(M3,{trigger:"hover",triggerComponent:sd(NM,{children:sd(f3,{"aria-label":t("unifiedcanvas:maskingOptions"),tooltip:t("unifiedcanvas:maskingOptions"),icon:sd(G5,{}),style:"mask"===n?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"},isDisabled:a})}),children:ld(SI,{direction:"column",gap:"0.5rem",children:[sd(Tne,{label:`${t("unifiedcanvas:enableMask")} (H)`,isChecked:o,onChange:c}),sd(Tne,{label:t("unifiedcanvas:preserveMaskedArea"),isChecked:i,onChange:t=>e(yX(t.target.checked))}),sd(Eae,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:r,onChange:t=>e(hX(t))}),ld(A3,{size:"sm",leftIcon:sd(s3,{}),onClick:l,children:[t("unifiedcanvas:clearMask")," (Shift+C)"]})]})})},Oae={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},Tae=(e=Oae)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:o,shouldSaveToGallery:i,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(cY("Exporting Image")),t(nY(!1));const c=n(),{stageScale:u,boundingBoxCoordinates:d,boundingBoxDimensions:h,stageCoordinates:f}=c.canvas,p=H1();if(!p)return t(HZ(!1)),void t(nY(!0));const{dataURL:g,boundingBox:m}=((e,t,n,r)=>{const o=e.scale(),i=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:c}=e.getClientRect(),u=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(c)},d=e.toDataURL(u);return e.scale(o),{dataURL:d,boundingBox:{x:Math.round(i.x),y:Math.round(i.y),width:Math.round(l),height:Math.round(c)}}})(p,u,f,o?{...d,...h}:void 0);if(!g)return t(HZ(!1)),void t(nY(!0));const v=new FormData;v.append("data",JSON.stringify({dataURL:g,filename:"merged_canvas.png",kind:i?"result":"temp",cropVisible:r}));const y=await fetch(window.location.origin+"/upload",{method:"POST",body:v}),b=await y.json(),{url:x,width:w,height:k}=b,S={uuid:rQ(),category:i?"result":"user",...b};a&&((e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()})(x),t(sY({title:hq.t("toast:downloadImageStarted"),status:"success",duration:2500,isClosable:!0}))),s&&(((e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",(()=>{const e=document.createElement("canvas");e.width=t,e.height=n;const o=e.getContext("2d");o&&(o.drawImage(r,0,0),e.toBlob((e=>{e&&navigator.clipboard.write([new ClipboardItem({[e.type]:e})])})),e.remove(),r.remove())})),r.src=e})(x,w,k),t(sY({title:hq.t("toast:imageCopied"),status:"success",duration:2500,isClosable:!0}))),i&&(t(MV({image:S,category:"result"})),t(sY({title:hq.t("toast:imageSavedToGallery"),status:"success",duration:2500,isClosable:!0}))),l&&(t(fX({kind:"image",layer:"base",...m,image:S})),t(sY({title:hq.t("toast:canvasMerged"),status:"success",duration:2500,isClosable:!0}))),t(HZ(!1)),t(YZ(hq.t("common:statusConnected"))),t(nY(!0))},Mae=c$([c9,u9,S3],((e,t,n)=>{const{isProcessing:r}=n,{tool:o,brushColor:i,brushSize:a}=e;return{tool:o,isStaging:t,isProcessing:r,brushColor:i,brushSize:a}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Aae=()=>{const e=l5(),{tool:t,brushColor:n,brushSize:r,isStaging:o}=c5(Mae),{t:i}=BZ();n7(["b"],(()=>{a()}),{enabled:()=>!o,preventDefault:!0},[]),n7(["e"],(()=>{s()}),{enabled:()=>!o,preventDefault:!0},[t]),n7(["c"],(()=>{l()}),{enabled:()=>!o,preventDefault:!0},[t]),n7(["shift+f"],(()=>{c()}),{enabled:()=>!o,preventDefault:!0}),n7(["delete","backspace"],(()=>{u()}),{enabled:()=>!o,preventDefault:!0}),n7(["BracketLeft"],(()=>{e(XY(Math.max(r-5,5)))}),{enabled:()=>!o,preventDefault:!0},[r]),n7(["BracketRight"],(()=>{e(XY(Math.min(r+5,500)))}),{enabled:()=>!o,preventDefault:!0},[r]),n7(["shift+BracketLeft"],(()=>{e(YY({...n,a:OV.clamp(n.a-.05,.05,1)}))}),{enabled:()=>!o,preventDefault:!0},[n]),n7(["shift+BracketRight"],(()=>{e(YY({...n,a:OV.clamp(n.a+.05,.05,1)}))}),{enabled:()=>!o,preventDefault:!0},[n]);const a=()=>e(AX("brush")),s=()=>e(AX("eraser")),l=()=>e(AX("colorPicker")),c=()=>e(EY()),u=()=>e(_Y());return ld(NM,{isAttached:!0,children:[sd(f3,{"aria-label":`${i("unifiedcanvas:brush")} (B)`,tooltip:`${i("unifiedcanvas:brush")} (B)`,icon:sd(Z5,{}),"data-selected":"brush"===t&&!o,onClick:a,isDisabled:o}),sd(f3,{"aria-label":`${i("unifiedcanvas:eraser")} (E)`,tooltip:`${i("unifiedcanvas:eraser")} (E)`,icon:sd(R5,{}),"data-selected":"eraser"===t&&!o,isDisabled:o,onClick:s}),sd(f3,{"aria-label":`${i("unifiedcanvas:fillBoundingBox")} (Shift+F)`,tooltip:`${i("unifiedcanvas:fillBoundingBox")} (Shift+F)`,icon:sd(F5,{}),isDisabled:o,onClick:c}),sd(f3,{"aria-label":`${i("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,tooltip:`${i("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,icon:sd(K5,{style:{transform:"rotate(45deg)"}}),isDisabled:o,onClick:u}),sd(f3,{"aria-label":`${i("unifiedcanvas:colorPicker")} (C)`,tooltip:`${i("unifiedcanvas:colorPicker")} (C)`,icon:sd(z5,{}),"data-selected":"colorPicker"===t&&!o,isDisabled:o,onClick:l}),sd(M3,{trigger:"hover",triggerComponent:sd(f3,{"aria-label":i("unifiedcanvas:brushOptions"),tooltip:i("unifiedcanvas:brushOptions"),icon:sd(i3,{})}),children:ld(SI,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[sd(SI,{gap:"1rem",justifyContent:"space-between",children:sd(E7,{label:i("unifiedcanvas:brushSize"),value:r,withInput:!0,onChange:t=>e(XY(t)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),sd(Eae,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:t=>e(YY(t))})]})})]})};let Iae;const Rae=()=>({setOpenUploader:e=>{e&&(Iae=e)},openUploader:Iae}),Nae=c$([S3,c9,u9],((e,t,n)=>{const{isProcessing:r}=e,{tool:o,shouldCropToBoundingBoxOnSave:i,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:o,layer:a,shouldCropToBoundingBoxOnSave:i}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Dae=()=>{const e=l5(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:o,tool:i,shouldCropToBoundingBoxOnSave:a}=c5(Nae),s=H1(),{t:l}=BZ(),{openUploader:c}=Rae();n7(["v"],(()=>{u()}),{enabled:()=>!n,preventDefault:!0},[]),n7(["r"],(()=>{d()}),{enabled:()=>!0,preventDefault:!0},[s]),n7(["shift+m"],(()=>{h()}),{enabled:()=>!n,preventDefault:!0},[s,t]),n7(["shift+s"],(()=>{f()}),{enabled:()=>!n,preventDefault:!0},[s,t]),n7(["meta+c","ctrl+c"],(()=>{p()}),{enabled:()=>!n,preventDefault:!0},[s,t]),n7(["shift+d"],(()=>{g()}),{enabled:()=>!n,preventDefault:!0},[s,t]);const u=()=>e(AX("move")),d=()=>{const t=H1();if(!t)return;const n=t.getClientRect({skipTransform:!0});e(WY({contentRect:n}))},h=()=>{e(Tae({cropVisible:!1,shouldSetAsInitialImage:!0}))},f=()=>{e(Tae({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},p=()=>{e(Tae({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},g=()=>{e(Tae({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ld("div",{className:"inpainting-settings",children:[sd(x3,{tooltip:`${l("unifiedcanvas:layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:o,validValues:yY,onChange:t=>{const n=t.target.value;e(dX(n)),"mask"!==n||r||e(oX(!0))},isDisabled:n}),sd(Pae,{}),sd(Aae,{}),ld(NM,{isAttached:!0,children:[sd(f3,{"aria-label":`${l("unifiedcanvas:move")} (V)`,tooltip:`${l("unifiedcanvas:move")} (V)`,icon:sd(E5,{}),"data-selected":"move"===i||n,onClick:u}),sd(f3,{"aria-label":`${l("unifiedcanvas:resetView")} (R)`,tooltip:`${l("unifiedcanvas:resetView")} (R)`,icon:sd(A5,{}),onClick:d})]}),ld(NM,{isAttached:!0,children:[sd(f3,{"aria-label":`${l("unifiedcanvas:mergeVisible")} (Shift+M)`,tooltip:`${l("unifiedcanvas:mergeVisible")} (Shift+M)`,icon:sd(V5,{}),onClick:h,isDisabled:n}),sd(f3,{"aria-label":`${l("unifiedcanvas:saveToGallery")} (Shift+S)`,tooltip:`${l("unifiedcanvas:saveToGallery")} (Shift+S)`,icon:sd(t3,{}),onClick:f,isDisabled:n}),sd(f3,{"aria-label":`${l("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${l("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,icon:sd(M5,{}),onClick:p,isDisabled:n}),sd(f3,{"aria-label":`${l("unifiedcanvas:downloadAsImage")} (Shift+D)`,tooltip:`${l("unifiedcanvas:downloadAsImage")} (Shift+D)`,icon:sd(I5,{}),onClick:g,isDisabled:n})]}),ld(NM,{isAttached:!0,children:[sd(Gie,{}),sd(Zie,{})]}),ld(NM,{isAttached:!0,children:[sd(f3,{"aria-label":`${l("common:upload")}`,tooltip:`${l("common:upload")}`,icon:sd(c3,{}),onClick:c,isDisabled:n}),sd(f3,{"aria-label":`${l("unifiedcanvas:clearCanvas")}`,tooltip:`${l("unifiedcanvas:clearCanvas")}`,icon:sd(s3,{}),onClick:()=>{e(FY()),e($Y())},style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})]}),sd(NM,{isAttached:!0,children:sd(Jie,{})})]})},zae=c$([c9],(e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Bae=()=>{const e=l5(),{doesCanvasNeedScaling:t}=c5(zae);return i.exports.useLayoutEffect((()=>{e(eX(!0));const t=OV.debounce((()=>{e(eX(!0))}),250);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[e]),sd("div",{className:"workarea-single-view",children:sd("div",{className:"workarea-split-view-left",children:ld("div",{className:"inpainting-main-area",children:[sd(Dae,{}),sd("div",{className:"inpainting-canvas-area",children:sd(t?foe:Uie,{})})]})})})},jae=c$([c9,u9],((e,t)=>{const{layer:n,isMaskEnabled:r}=e;return{layer:n,isMaskEnabled:r,isStaging:t}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});function Fae(){const e=l5(),{t:t}=BZ(),{layer:n,isMaskEnabled:r,isStaging:o}=c5(jae);n7(["q"],(()=>{e(dX("mask"===n?"base":"mask"))}),{enabled:()=>!o,preventDefault:!0},[n]);return sd(x3,{tooltip:`${t("unifiedcanvas:layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:n,validValues:yY,onChange:t=>{const n=t.target.value;e(dX(n)),"mask"!==n||r||e(oX(!0))},isDisabled:o})}const Hae=c$([c9,u9,S3],((e,t,n)=>{const{isProcessing:r}=n,{tool:o}=e;return{tool:o,isStaging:t,isProcessing:r}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Wae=()=>{const e=l5(),{t:t}=BZ(),{tool:n,isStaging:r}=c5(Hae);n7(["b"],(()=>{o()}),{enabled:()=>!r,preventDefault:!0},[]),n7(["e"],(()=>{i()}),{enabled:()=>!r,preventDefault:!0},[n]),n7(["c"],(()=>{a()}),{enabled:()=>!r,preventDefault:!0},[n]),n7(["shift+f"],(()=>{s()}),{enabled:()=>!r,preventDefault:!0}),n7(["delete","backspace"],(()=>{l()}),{enabled:()=>!r,preventDefault:!0});const o=()=>e(AX("brush")),i=()=>e(AX("eraser")),a=()=>e(AX("colorPicker")),s=()=>e(EY()),l=()=>e(_Y());return ld(SI,{flexDirection:"column",gap:"0.5rem",children:[ld(NM,{children:[sd(f3,{"aria-label":`${t("unifiedcanvas:brush")} (B)`,tooltip:`${t("unifiedcanvas:brush")} (B)`,icon:sd(Z5,{}),"data-selected":"brush"===n&&!r,onClick:o,isDisabled:r}),sd(f3,{"aria-label":`${t("unifiedcanvas:eraser")} (E)`,tooltip:`${t("unifiedcanvas:eraser")} (B)`,icon:sd(R5,{}),"data-selected":"eraser"===n&&!r,isDisabled:r,onClick:i})]}),ld(NM,{children:[sd(f3,{"aria-label":`${t("unifiedcanvas:fillBoundingBox")} (Shift+F)`,tooltip:`${t("unifiedcanvas:fillBoundingBox")} (Shift+F)`,icon:sd(F5,{}),isDisabled:r,onClick:s}),sd(f3,{"aria-label":`${t("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,tooltip:`${t("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,icon:sd(K5,{style:{transform:"rotate(45deg)"}}),isDisabled:r,onClick:l})]}),sd(f3,{"aria-label":`${t("unifiedcanvas:colorPicker")} (C)`,tooltip:`${t("unifiedcanvas:colorPicker")} (C)`,icon:sd(z5,{}),"data-selected":"colorPicker"===n&&!r,isDisabled:r,onClick:a,width:"max-content"})]})},$ae=c$([c9],(e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:o}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:o}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Uae=()=>{const e=l5(),{t:t}=BZ(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldShowCanvasDebugInfo:o,shouldShowIntermediates:i}=c5($ae);return sd(M3,{trigger:"hover",triggerComponent:sd(f3,{tooltip:t("unifiedcanvas:canvasSettings"),tooltipProps:{placement:"bottom"},"aria-label":t("unifiedcanvas:canvasSettings"),icon:sd(d3,{})}),children:ld(SI,{direction:"column",gap:"0.5rem",children:[sd(Tne,{label:t("unifiedcanvas:showIntermediates"),isChecked:i,onChange:t=>e(_X(t.target.checked))}),sd(Tne,{label:t("unifiedcanvas:autoSaveToGallery"),isChecked:n,onChange:t=>e(pX(t.target.checked))}),sd(Tne,{label:t("unifiedcanvas:saveBoxRegionOnly"),isChecked:r,onChange:t=>e(gX(t.target.checked))}),sd(Tne,{label:t("unifiedcanvas:showCanvasDebugInfo"),isChecked:o,onChange:t=>e(kX(t.target.checked))}),sd(Kie,{}),sd(Xie,{})]})})};function Vae(){const e=c5((e=>e.canvas.tool)),t=c5(u9),n=l5(),{t:r}=BZ();n7(["v"],(()=>{o()}),{enabled:()=>!t,preventDefault:!0},[]);const o=()=>n(AX("move"));return sd(f3,{"aria-label":`${r("unifiedcanvas:move")} (V)`,tooltip:`${r("unifiedcanvas:move")} (V)`,icon:sd(E5,{}),"data-selected":"move"===e||t,onClick:o})}function Gae(){const e=H1(),t=l5(),{t:n}=BZ();n7(["r"],(()=>{r()}),{enabled:()=>!0,preventDefault:!0},[e]);const r=()=>{const e=H1();if(!e)return;const n=e.getClientRect({skipTransform:!0});t(WY({contentRect:n}))};return sd(f3,{"aria-label":`${n("unifiedcanvas:resetView")} (R)`,tooltip:`${n("unifiedcanvas:resetView")} (R)`,icon:sd(A5,{}),onClick:r})}function qae(){const e=l5(),{t:t}=BZ(),n=H1(),r=c5(u9),o=c5((e=>e.system.isProcessing));n7(["shift+m"],(()=>{i()}),{enabled:()=>!r,preventDefault:!0},[n,o]);const i=()=>{e(Tae({cropVisible:!1,shouldSetAsInitialImage:!0}))};return sd(f3,{"aria-label":`${t("unifiedcanvas:mergeVisible")} (Shift+M)`,tooltip:`${t("unifiedcanvas:mergeVisible")} (Shift+M)`,icon:sd(V5,{}),onClick:i,isDisabled:r})}function Zae(){const e=c5(u9),t=H1(),n=c5((e=>e.system.isProcessing)),r=c5((e=>e.canvas.shouldCropToBoundingBoxOnSave)),o=l5(),{t:i}=BZ();n7(["shift+s"],(()=>{a()}),{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{o(Tae({cropVisible:!r,cropToBoundingBox:r,shouldSaveToGallery:!0}))};return sd(f3,{"aria-label":`${i("unifiedcanvas:saveToGallery")} (Shift+S)`,tooltip:`${i("unifiedcanvas:saveToGallery")} (Shift+S)`,icon:sd(t3,{}),onClick:a,isDisabled:e})}function Yae(){const e=c5(u9),t=H1(),n=c5((e=>e.system.isProcessing)),r=c5((e=>e.canvas.shouldCropToBoundingBoxOnSave)),o=l5(),{t:i}=BZ();n7(["meta+c","ctrl+c"],(()=>{a()}),{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{o(Tae({cropVisible:!r,cropToBoundingBox:r,shouldCopy:!0}))};return sd(f3,{"aria-label":`${i("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${i("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,icon:sd(M5,{}),onClick:a,isDisabled:e})}function Xae(){const e=l5(),{t:t}=BZ(),n=H1(),r=c5(u9),o=c5((e=>e.system.isProcessing)),i=c5((e=>e.canvas.shouldCropToBoundingBoxOnSave));n7(["shift+d"],(()=>{a()}),{enabled:()=>!r,preventDefault:!0},[n,o]);const a=()=>{e(Tae({cropVisible:!i,cropToBoundingBox:i,shouldDownload:!0}))};return sd(f3,{"aria-label":`${t("unifiedcanvas:downloadAsImage")} (Shift+D)`,tooltip:`${t("unifiedcanvas:downloadAsImage")} (Shift+D)`,icon:sd(I5,{}),onClick:a,isDisabled:r})}function Kae(){const e=c5(u9),{openUploader:t}=Rae(),{t:n}=BZ();return sd(f3,{"aria-label":n("common:upload"),tooltip:n("common:upload"),icon:sd(c3,{}),onClick:t,isDisabled:e})}function Qae(){const e=l5(),{t:t}=BZ(),n=c5(u9);return sd(f3,{"aria-label":t("unifiedcanvas:clearCanvas"),tooltip:t("unifiedcanvas:clearCanvas"),icon:sd(s3,{}),onClick:()=>{e(FY()),e($Y())},style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})}function Jae(){const e=c5((e=>e.options.shouldPinOptionsPanel)),t=l5(),{t:n}=BZ();return ld(SI,{flexDirection:"column",gap:"0.5rem",children:[sd(f3,{tooltip:`${n("options:showOptionsPanel")} (O)`,tooltipProps:{placement:"top"},"aria-label":n("options:showOptionsPanel"),onClick:()=>{t(mV(!0)),e&&setTimeout((()=>t(eX(!0))),400)},children:sd(i3,{})}),sd(SI,{children:sd(f9,{iconButton:!0})}),sd(SI,{children:sd(g9,{width:"100%",height:"40px"})})]})}const ese=()=>{const e=c5((e=>e.options.shouldShowOptionsPanel));return ld(SI,{flexDirection:"column",rowGap:"0.5rem",width:"6rem",children:[sd(Fae,{}),sd(Wae,{}),ld(SI,{gap:"0.5rem",children:[sd(Vae,{}),sd(Gae,{})]}),ld(SI,{columnGap:"0.5rem",children:[sd(qae,{}),sd(Zae,{})]}),ld(SI,{columnGap:"0.5rem",children:[sd(Yae,{}),sd(Xae,{})]}),ld(SI,{gap:"0.5rem",children:[sd(Gie,{}),sd(Zie,{})]}),ld(SI,{gap:"0.5rem",children:[sd(Kae,{}),sd(Qae,{})]}),sd(Uae,{}),!e&&sd(Jae,{})]})};function tse(){const e=l5(),t=c5((e=>e.canvas.brushSize)),{t:n}=BZ(),r=c5(u9);return n7(["BracketLeft"],(()=>{e(XY(Math.max(t-5,5)))}),{enabled:()=>!r,preventDefault:!0},[t]),n7(["BracketRight"],(()=>{e(XY(Math.min(t+5,500)))}),{enabled:()=>!r,preventDefault:!0},[t]),sd(E7,{label:n("unifiedcanvas:brushSize"),value:t,withInput:!0,onChange:t=>e(XY(t)),sliderNumberInputProps:{max:500},inputReadOnly:!1,width:"100px",isCompact:!0})}const nse=c$([c9,u9],((e,t)=>{const{brushColor:n,maskColor:r,layer:o}=e;return{brushColor:n,maskColor:r,layer:o,isStaging:t}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});function rse(){const e=l5(),{brushColor:t,maskColor:n,layer:r,isStaging:o}=c5(nse);return n7(["shift+BracketLeft"],(()=>{e(YY({...t,a:OV.clamp(t.a-.05,.05,1)}))}),{enabled:()=>!o,preventDefault:!0},[t]),n7(["shift+BracketRight"],(()=>{e(YY({...t,a:OV.clamp(t.a+.05,.05,1)}))}),{enabled:()=>!o,preventDefault:!0},[t]),sd(M3,{trigger:"hover",triggerComponent:sd(gI,{style:{width:"30px",height:"30px",minWidth:"30px",minHeight:"30px",borderRadius:"99999999px",backgroundColor:"base"===r?`rgba(${t.r},${t.g},${t.b},${t.a})`:"mask"===r?`rgba(${n.r},${n.g},${n.b},${n.a})`:void 0,cursor:"pointer"}}),children:ld(SI,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:["base"===r&&sd(Eae,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:t,onChange:t=>e(YY(t))}),"mask"===r&&sd(Eae,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:t=>e(hX(t))})]})})}function ose(){return ld(SI,{columnGap:"1rem",alignItems:"center",children:[sd(tse,{}),sd(rse,{})]})}function ise(){const e=l5(),t=c5((e=>e.canvas.shouldRestrictStrokesToBox)),{t:n}=BZ();return sd(Tne,{label:n("unifiedcanvas:betaLimitToBox"),isChecked:t,onChange:t=>e(zX(t.target.checked))})}function ase(){return ld(SI,{gap:"1rem",alignItems:"center",children:[sd(ose,{}),sd(ise,{})]})}function sse(){const e=l5(),{t:t}=BZ();return sd(A3,{size:"sm",leftIcon:sd(s3,{}),onClick:()=>e(MY()),tooltip:`${t("unifiedcanvas:clearMask")} (Shift+C)`,children:t("unifiedcanvas:betaClear")})}function lse(){const e=c5((e=>e.canvas.isMaskEnabled)),t=l5(),{t:n}=BZ();return sd(Tne,{label:`${n("unifiedcanvas:enableMask")} (H)`,isChecked:e,onChange:()=>t(oX(!e))})}function cse(){const e=l5(),{t:t}=BZ(),n=c5((e=>e.canvas.shouldPreserveMaskedArea));return sd(Tne,{label:t("unifiedcanvas:betaPreserveMasked"),isChecked:n,onChange:t=>e(yX(t.target.checked))})}function use(){return ld(SI,{gap:"1rem",alignItems:"center",children:[sd(ose,{}),sd(lse,{}),sd(cse,{}),sd(sse,{})]})}function dse(){const e=c5((e=>e.canvas.shouldDarkenOutsideBoundingBox)),t=l5(),{t:n}=BZ();return sd(Tne,{label:n("unifiedcanvas:betaDarkenOutside"),isChecked:e,onChange:e=>t(mX(e.target.checked))})}function hse(){const e=c5((e=>e.canvas.shouldShowGrid)),t=l5(),{t:n}=BZ();return sd(Tne,{label:n("unifiedcanvas:showGrid"),isChecked:e,onChange:e=>t(CX(e.target.checked))})}function fse(){const e=c5((e=>e.canvas.shouldSnapToGrid)),t=l5(),{t:n}=BZ();return sd(Tne,{label:`${n("unifiedcanvas:snapToGrid")} (N)`,isChecked:e,onChange:e=>t(PX(e.target.checked))})}function pse(){return ld(SI,{alignItems:"center",gap:"1rem",children:[sd(hse,{}),sd(fse,{}),sd(dse,{})]})}const gse=c$([c9],(e=>{const{tool:t,layer:n}=e;return{tool:t,layer:n}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}});function mse(){const{tool:e,layer:t}=c5(gse);return ld(SI,{height:"2rem",minHeight:"2rem",maxHeight:"2rem",alignItems:"center",children:["base"==t&&["brush","eraser","colorPicker"].includes(e)&&sd(ase,{}),"mask"==t&&["brush","eraser","colorPicker"].includes(e)&&sd(use,{}),"move"==e&&sd(pse,{})]})}const vse=c$([c9],(e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),yse=()=>{const e=l5(),{doesCanvasNeedScaling:t}=c5(vse);return i.exports.useLayoutEffect((()=>{e(eX(!0));const t=OV.debounce((()=>{e(eX(!0))}),250);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[e]),sd("div",{className:"workarea-single-view",children:ld(SI,{flexDirection:"row",width:"100%",height:"100%",columnGap:"1rem",padding:"1rem",children:[sd(ese,{}),ld(SI,{width:"100%",height:"100%",flexDirection:"column",rowGap:"1rem",children:[sd(mse,{}),sd(t?foe:Uie,{})]})]})})};function bse(){const e=c5((e=>e.options.shouldUseCanvasBetaLayout));return sd(Dne,{optionsPanel:sd(doe,{}),styleClass:"inpainting-workarea-overrides",children:sd(e?yse:Bae,{})})}const xse=kk({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:sd("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 wse(){const{t:e}=BZ();return ld("div",{className:"work-in-progress nodes-work-in-progress",children:[sd("h1",{children:e("common:training")}),ld("p",{children:[e("common:trainingDesc1"),sd("br",{}),sd("br",{}),e("common:trainingDesc2")]})]})}const kse=kk({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:sd("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"})});const Sse={txt2img:{title:sd(h7,{fill:"black",boxSize:"2.5rem"}),workarea:sd(Wne,{}),tooltip:"Text To Image"},img2img:{title:sd(c7,{fill:"black",boxSize:"2.5rem"}),workarea:sd(zne,{}),tooltip:"Image To Image"},unifiedCanvas:{title:sd(xse,{fill:"black",boxSize:"2.5rem"}),workarea:sd(bse,{}),tooltip:"Unified Canvas"},nodes:{title:sd(u7,{fill:"black",boxSize:"2.5rem"}),workarea:sd(s7,{}),tooltip:"Nodes"},postprocess:{title:sd(d7,{fill:"black",boxSize:"2.5rem"}),workarea:sd(l7,{}),tooltip:"Post Processing"},training:{title:sd(kse,{fill:"black",boxSize:"2.5rem"}),workarea:sd(wse,{}),tooltip:"Training"}};function Cse(){Sse.txt2img.tooltip=hq.t("common:text2img"),Sse.img2img.tooltip=hq.t("common:img2img"),Sse.unifiedCanvas.tooltip=hq.t("common:unifiedCanvas"),Sse.nodes.tooltip=hq.t("common:nodes"),Sse.postprocess.tooltip=hq.t("common:postProcessing"),Sse.training.tooltip=hq.t("common:training")}function _se(){const e=c5((e=>e.options.activeTab)),t=c5((e=>e.options.isLightBoxOpen));!function(e){const{i18n:t}=BZ(),n=localStorage.getItem("i18nextLng");F.useEffect((()=>{e()}),[e]),F.useEffect((()=>{t.on("languageChanged",(()=>{e()}))}),[e,t,n])}(Cse);const n=l5();n7("1",(()=>{n(AU(0))})),n7("2",(()=>{n(AU(1))})),n7("3",(()=>{n(AU(2))})),n7("4",(()=>{n(AU(3))})),n7("5",(()=>{n(AU(4))})),n7("6",(()=>{n(AU(5))})),n7("z",(()=>{n(GU(!t))}),[t]);return ld(mH,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:e=>{n(AU(e))},children:[sd("div",{className:"app-tabs-list",children:(()=>{const e=[];return Object.keys(Sse).forEach((t=>{e.push(sd(qH,{hasArrow:!0,label:Sse[t].tooltip,placement:"right",children:sd(wH,{children:Sse[t].title})},t))})),e})()}),sd(xH,{className:"app-tabs-panels",children:t?sd(noe,{}):(()=>{const e=[];return Object.keys(Sse).forEach((t=>{e.push(sd(bH,{className:"app-tabs-panel",children:Sse[t].workarea},t))})),e})()})]})}var Ese=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 Lse(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=Ese.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var Pse=[".DS_Store","Thumbs.db"];function Ose(e){return"object"==typeof e&&null!==e}function Tse(e){return Rse(e.target.files).map((function(e){return Lse(e)}))}function Mse(e){return pT(this,void 0,void 0,(function(){return gT(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return Lse(e)}))]}}))}))}function Ase(e,t){return pT(this,void 0,void 0,(function(){var n;return gT(this,(function(r){switch(r.label){case 0:return e.items?(n=Rse(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(Nse))]):[3,2];case 1:return[2,Ise(Dse(r.sent()))];case 2:return[2,Ise(Rse(e.files).map((function(e){return Lse(e)})))]}}))}))}function Ise(e){return e.filter((function(e){return-1===Pse.indexOf(e.name)}))}function Rse(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Nse(e){if("function"!=typeof e.webkitGetAsEntry)return zse(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?jse(t):zse(e)}function Dse(e){return e.reduce((function(e,t){return vT(vT([],mT(e),!1),mT(Array.isArray(t)?Dse(t):[t]),!1)}),[])}function zse(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Lse(t);return Promise.resolve(n)}function Bse(e){return pT(this,void 0,void 0,(function(){return gT(this,(function(t){return[2,e.isDirectory?jse(e):Fse(e)]}))}))}function jse(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var i=this;t.readEntries((function(t){return pT(i,void 0,void 0,(function(){var i,a,s;return gT(this,(function(l){switch(l.label){case 0:if(t.length)return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return i=l.sent(),e(i),[3,4];case 3:return a=l.sent(),n(a),[3,4];case 4:return[3,6];case 5:s=Promise.all(t.map(Bse)),r.push(s),o(),l.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function Fse(e){return pT(this,void 0,void 0,(function(){return gT(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=Lse(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}function Hse(e){return function(e){if(Array.isArray(e))return qse(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Gse(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wse(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wse(Object(n),!0).forEach((function(t){Use(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wse(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Use(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vse(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch($le){s=!0,o=$le}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||Gse(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gse(e,t){if(e){if("string"==typeof e)return qse(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qse(e,t):void 0}}function qse(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Zse=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:"file-invalid-type",message:"File type must be ".concat(t)}},Yse=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},Xse=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},Kse={code:"too-many-files",message:"Too many files"};function Qse(e,t){var n="application/x-moz-file"===e.type||function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t}))}return!0}(e,t);return[n,n?null:Zse(t)]}function Jse(e,t,n){if(ele(e.size))if(ele(t)&&ele(n)){if(e.size>n)return[!1,Yse(n)];if(e.size<t)return[!1,Xse(t)]}else{if(ele(t)&&e.size<t)return[!1,Xse(t)];if(ele(n)&&e.size>n)return[!1,Yse(n)]}return[!0,null]}function ele(e){return null!=e}function tle(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=Vse(Qse(e,n),1)[0],i=Vse(Jse(e,r,o),1)[0],a=s?s(e):null;return t&&i&&!a}))}function nle(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function rle(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function ole(e){e.preventDefault()}function ile(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function ale(e){return-1!==e.indexOf("Edge/")}function sle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return ile(e)||ale(e)}function lle(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!nle(e)&&t&&t.apply(void 0,[e].concat(r)),nle(e)}))}}function cle(){return"showOpenFilePicker"in window}function ule(e){if(ele(e)){var t=Object.entries(e).filter((function(e){var t=Vse(e,2),n=t[0],r=t[1],o=!0;return ple(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(gle)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=Vse(t,2),r=n[0],o=n[1];return $se($se({},e),{},Use({},r,o))}),{});return[{description:"Files",accept:t}]}return e}function dle(e){if(ele(e))return Object.entries(e).reduce((function(e,t){var n=Vse(t,2),r=n[0],o=n[1];return[].concat(Hse(e),[r],Hse(o))}),[]).filter((function(e){return ple(e)||gle(e)})).join(",")}function hle(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}function fle(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}function ple(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function gle(e){return/^.*\.[\w]+$/.test(e)}var mle=["children"],vle=["open"],yle=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ble=["refKey","onChange","onClick"];function xle(e){return function(e){if(Array.isArray(e))return Sle(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||kle(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wle(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch($le){s=!0,o=$le}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||kle(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kle(e,t){if(e){if("string"==typeof e)return Sle(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sle(e,t):void 0}}function Sle(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cle(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cle(Object(n),!0).forEach((function(t){Ele(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cle(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ele(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lle(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ple=i.exports.forwardRef((function(e,t){var n=e.children,r=Mle(Lle(e,mle)),o=r.open,a=Lle(r,vle);return i.exports.useImperativeHandle(t,(function(){return{open:o}}),[o]),sd(i.exports.Fragment,{children:n(_le(_le({},a),{},{open:o}))})}));Ple.displayName="Dropzone";var Ole={disabled:!1,getFilesFromEvent:function(e){return pT(this,void 0,void 0,(function(){return gT(this,(function(t){return Ose(e)&&function(e){return Ose(e)}(e.dataTransfer)?[2,Ase(e.dataTransfer,e.type)]:function(e){return Ose(e)&&Ose(e.target)}(e)?[2,Tse(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,Mse(e)]:[2,[]]}))}))},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};Ple.defaultProps=Ole,Ple.propTypes={children:gD.exports.func,accept:gD.exports.objectOf(gD.exports.arrayOf(gD.exports.string)),multiple:gD.exports.bool,preventDropOnDocument:gD.exports.bool,noClick:gD.exports.bool,noKeyboard:gD.exports.bool,noDrag:gD.exports.bool,noDragEventsBubbling:gD.exports.bool,minSize:gD.exports.number,maxSize:gD.exports.number,maxFiles:gD.exports.number,disabled:gD.exports.bool,getFilesFromEvent:gD.exports.func,onFileDialogCancel:gD.exports.func,onFileDialogOpen:gD.exports.func,useFsAccessApi:gD.exports.bool,autoFocus:gD.exports.bool,onDragEnter:gD.exports.func,onDragLeave:gD.exports.func,onDragOver:gD.exports.func,onDrop:gD.exports.func,onDropAccepted:gD.exports.func,onDropRejected:gD.exports.func,onError:gD.exports.func,validator:gD.exports.func};var Tle={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Mle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=_le(_le({},Ole),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,l=t.multiple,c=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,h=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,g=t.onDropRejected,m=t.onFileDialogCancel,v=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,w=t.noClick,k=t.noKeyboard,S=t.noDrag,C=t.noDragEventsBubbling,_=t.onError,E=t.validator,L=i.exports.useMemo((function(){return dle(n)}),[n]),P=i.exports.useMemo((function(){return ule(n)}),[n]),O=i.exports.useMemo((function(){return"function"==typeof v?v:Ile}),[v]),T=i.exports.useMemo((function(){return"function"==typeof m?m:Ile}),[m]),M=i.exports.useRef(null),A=i.exports.useRef(null),I=i.exports.useReducer(Ale,Tle),R=wle(I,2),N=R[0],D=R[1],z=N.isFocused,B=N.isFileDialogActive,j=i.exports.useRef("undefined"!=typeof window&&window.isSecureContext&&y&&cle()),F=function(){!j.current&&B&&setTimeout((function(){A.current&&(A.current.files.length||(D({type:"closeDialog"}),T()))}),300)};i.exports.useEffect((function(){return window.addEventListener("focus",F,!1),function(){window.removeEventListener("focus",F,!1)}}),[A,B,T,j]);var H=i.exports.useRef([]),W=function(e){M.current&&M.current.contains(e.target)||(e.preventDefault(),H.current=[])};i.exports.useEffect((function(){return x&&(document.addEventListener("dragover",ole,!1),document.addEventListener("drop",W,!1)),function(){x&&(document.removeEventListener("dragover",ole),document.removeEventListener("drop",W))}}),[M,x]),i.exports.useEffect((function(){return!r&&b&&M.current&&M.current.focus(),function(){}}),[M,b,r]);var $=i.exports.useCallback((function(e){_?_(e):console.error(e)}),[_]),U=i.exports.useCallback((function(e){e.preventDefault(),e.persist(),re(e),H.current=[].concat(xle(H.current),[e.target]),rle(e)&&Promise.resolve(o(e)).then((function(t){if(!nle(e)||C){var n=t.length,r=n>0&&tle({files:t,accept:L,minSize:s,maxSize:a,multiple:l,maxFiles:c,validator:E});D({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e)}})).catch((function(e){return $(e)}))}),[o,u,$,C,L,s,a,l,c,E]),V=i.exports.useCallback((function(e){e.preventDefault(),e.persist(),re(e);var t=rle(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(n){}return t&&h&&h(e),!1}),[h,C]),G=i.exports.useCallback((function(e){e.preventDefault(),e.persist(),re(e);var t=H.current.filter((function(e){return M.current&&M.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),H.current=t,t.length>0||(D({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),rle(e)&&d&&d(e))}),[M,d,C]),q=i.exports.useCallback((function(e,t){var n=[],r=[];e.forEach((function(e){var t=wle(Qse(e,L),2),o=t[0],i=t[1],l=wle(Jse(e,s,a),2),c=l[0],u=l[1],d=E?E(e):null;if(o&&c&&!d)n.push(e);else{var h=[i,u];d&&(h=h.concat(d)),r.push({file:e,errors:h.filter((function(e){return e}))})}})),(!l&&n.length>1||l&&c>=1&&n.length>c)&&(n.forEach((function(e){r.push({file:e,errors:[Kse]})})),n.splice(0)),D({acceptedFiles:n,fileRejections:r,type:"setFiles"}),f&&f(n,r,t),r.length>0&&g&&g(r,t),n.length>0&&p&&p(n,t)}),[D,l,L,s,a,c,f,p,g,E]),Z=i.exports.useCallback((function(e){e.preventDefault(),e.persist(),re(e),H.current=[],rle(e)&&Promise.resolve(o(e)).then((function(t){nle(e)&&!C||q(t,e)})).catch((function(e){return $(e)})),D({type:"reset"})}),[o,q,$,C]),Y=i.exports.useCallback((function(){if(j.current){D({type:"openDialog"}),O();var e={multiple:l,types:P};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){q(e,null),D({type:"closeDialog"})})).catch((function(e){hle(e)?(T(e),D({type:"closeDialog"})):fle(e)?(j.current=!1,A.current?(A.current.value=null,A.current.click()):$(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 <input> was provided."))):$(e)}))}else A.current&&(D({type:"openDialog"}),O(),A.current.value=null,A.current.click())}),[D,O,T,y,q,$,P,l]),X=i.exports.useCallback((function(e){M.current&&M.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),Y()))}),[M,Y]),K=i.exports.useCallback((function(){D({type:"focus"})}),[]),Q=i.exports.useCallback((function(){D({type:"blur"})}),[]),J=i.exports.useCallback((function(){w||(sle()?setTimeout(Y,0):Y())}),[w,Y]),ee=function(e){return r?null:e},te=function(e){return k?null:ee(e)},ne=function(e){return S?null:ee(e)},re=function(e){C&&e.stopPropagation()},oe=i.exports.useMemo((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,a=e.onFocus,s=e.onBlur,l=e.onClick,c=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,h=e.onDrop,f=Lle(e,yle);return _le(_le(Ele({onKeyDown:te(lle(i,X)),onFocus:te(lle(a,K)),onBlur:te(lle(s,Q)),onClick:ee(lle(l,J)),onDragEnter:ne(lle(c,U)),onDragOver:ne(lle(u,V)),onDragLeave:ne(lle(d,G)),onDrop:ne(lle(h,Z)),role:"string"==typeof o&&""!==o?o:"presentation"},n,M),r||k?{}:{tabIndex:0}),f)}}),[M,X,K,Q,J,U,V,G,Z,k,S,r]),ie=i.exports.useCallback((function(e){e.stopPropagation()}),[]),ae=i.exports.useMemo((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,i=Lle(e,ble),a=Ele({accept:L,multiple:l,type:"file",style:{display:"none"},onChange:ee(lle(r,Z)),onClick:ee(lle(o,ie)),tabIndex:-1},n,A);return _le(_le({},a),i)}}),[A,n,l,Z,r]);return _le(_le({},N),{},{isFocused:z&&!r,getRootProps:oe,getInputProps:ae,rootRef:M,inputRef:A,open:ee(Y)})}function Ale(e,t){switch(t.type){case"focus":return _le(_le({},e),{},{isFocused:!0});case"blur":return _le(_le({},e),{},{isFocused:!1});case"openDialog":return _le(_le({},Tle),{},{isFileDialogActive:!0});case"closeDialog":return _le(_le({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _le(_le({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _le(_le({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return _le({},Tle);default:return e}}function Ile(){}const Rle=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:o}=e;return n7("esc",(()=>{o(!1)})),ld("div",{className:"dropzone-container",children:[t&&sd("div",{className:"dropzone-overlay is-drag-accept",children:ld(LI,{size:"lg",children:["Upload Image",r]})}),n&&ld("div",{className:"dropzone-overlay is-drag-reject",children:[sd(LI,{size:"lg",children:"Invalid Upload"}),sd(LI,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},Nle=e=>async(t,n)=>{const{imageFile:r}=e,o=n(),i=_3(o),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const s=await fetch(window.location.origin+"/upload",{method:"POST",body:a}),l=await s.json();console.log(l);const c={uuid:rQ(),category:"user",...l};t(MV({image:c,category:"user"})),"unifiedCanvas"===i?t(tX(c)):"img2img"===i&&t(VU(c))},Dle=e=>{const{children:t}=e,n=l5(),r=c5(_3),o=DH({}),{t:a}=BZ(),[s,l]=i.exports.useState(!1),{setOpenUploader:c}=Rae(),u=i.exports.useCallback((e=>{l(!0);const t=e.errors.reduce(((e,t)=>e+"\n"+t.message),"");o({title:a("toast:uploadFailed"),description:t,status:"error",isClosable:!0})}),[a,o]),d=i.exports.useCallback((async e=>{n(Nle({imageFile:e}))}),[n]),h=i.exports.useCallback(((e,t)=>{t.forEach((e=>{u(e)})),e.forEach((e=>{d(e)}))}),[d,u]),{getRootProps:f,getInputProps:p,isDragAccept:g,isDragReject:m,isDragActive:v,open:y}=Mle({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>l(!0),maxFiles:1});c(y),i.exports.useEffect((()=>{const e=e=>{const t=e.clipboardData?.items;if(!t)return;const r=[];for(const n of t)"file"===n.kind&&["image/png","image/jpg"].includes(n.type)&&r.push(n);if(!r.length)return;if(e.stopImmediatePropagation(),r.length>1)return void o({description:a("toast:uploadFailedMultipleImagesDesc"),status:"error",isClosable:!0});const i=r[0].getAsFile();i?n(Nle({imageFile:i})):o({description:a("toast:uploadFailedUnableToLoadDesc"),status:"error",isClosable:!0})};return document.addEventListener("paste",e),()=>{document.removeEventListener("paste",e)}}),[a,n,o,r]);const b=["img2img","unifiedCanvas"].includes(r)?` to ${Sse[r].tooltip}`:"";return sd(W9.Provider,{value:y,children:ld("div",{...f({style:{}}),onKeyDown:e=>{e.key},children:[sd("input",{...p()}),t,v&&s&&sd(Rle,{isDragAccept:g,isDragReject:m,overlaySecondaryText:b,setIsHandlingUpload:l})]})})},zle=c$([e=>e.options,e=>e.gallery,_3],((e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:o,shouldHoldOptionsPanelOpen:i,shouldUseCanvasBetaLayout:a}=e,{shouldShowGallery:s,shouldPinGallery:l,shouldHoldGalleryOpen:c}=t,u=a&&"unifiedCanvas"===n;return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!(u||r&&o),shouldShowOptionsPanelButton:!u&&!(o||i&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),shouldShowOptionsPanel:o,shouldShowGallery:s,shouldPinGallery:l,shouldShowGalleryButton:!(s||c&&!l)&&["txt2img","img2img","unifiedCanvas"].includes(n)}}),{memoizeOptions:{resultEqualityCheck:OV.isEqual}}),Ble=()=>{const e=l5(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:o,shouldShowGallery:i,shouldPinGallery:a}=c5(zle);return n7("f",(()=>{i||t?(e(mV(!1)),e(FV(!1))):(e(mV(!0)),e(FV(!0))),(a||o)&&setTimeout((()=>e(eX(!0))),400)}),[i,t]),n?ld("div",{className:"show-hide-button-options",children:[sd(f3,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(mV(!0)),o&&setTimeout((()=>e(eX(!0))),400)},children:sd(i3,{})}),r&&ld(ad,{children:[sd(f9,{iconButton:!0}),sd(g9,{})]})]}):null},jle=()=>{const e=l5(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:o,shouldPinOptionsPanel:i}=c5(zle);return n7("f",(()=>{t||o?(e(mV(!1)),e(FV(!1))):(e(mV(!0)),e(FV(!0))),(r||i)&&setTimeout((()=>e(eX(!0))),400)}),[t,o]),n?sd(f3,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(FV(!0)),r&&e(eX(!0))},children:sd(t9,{})}):null};!function(){const e=()=>{(async function(e=""){return await fetch(e,{method:"GET",cache:"no-cache"})})(document.location+"/flaskwebgui-keep-server-alive").then((e=>e))};({BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}).NODE_ENV&&"production"!=={BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||document.addEventListener("DOMContentLoaded",(()=>{e(),setInterval(e,3e3)}))}();const Fle=()=>((()=>{const e=l5(),t=c5(C3),n=DH();i.exports.useEffect((()=>{t.forEach((e=>{n(e)})),t.length>0&&e(lY())}),[e,n,t])})(),ld("div",{className:"App",children:[ld(Dle,{children:[sd(d5,{}),ld("div",{className:"app-content",children:[sd(z3,{}),sd(_se,{})]}),sd("div",{className:"app-console",children:sd(a7,{})})]}),sd(Ble,{}),sd(jle,{})]})),Hle=gp({key:"invokeai-style-cache",prepend:!0});W.createRoot(document.getElementById("root")).render(sd(F.StrictMode,{children:sd(V2,{store:X1,children:sd(i5,{loading:sd(s5,{}),persistor:a5,children:sd(ag,{value:Hle,children:sd(YH,{children:sd(F.Suspense,{fallback:sd(s5,{}),children:sd(Fle,{})})})})})})}))}}}))}();