mirror of https://github.com/Nevysha/Cozy-Nest.git
1769 lines
1.4 MiB
1769 lines
1.4 MiB
var c3=Object.defineProperty;var d3=(e,t,n)=>t in e?c3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Nd=(e,t,n)=>(d3(e,typeof t!="symbol"?t+"":t,n),n);function f3(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const h3=`:root{--nevysha-margin-left: 175px;--ae-primary-color: rgb(92, 175, 214);--secondary-accent-color: #b67ee1;--secondary-accent-color-from-luminance: white;--nevysha-gradiant-1: rgb(101,0,94);--nevysha-text-md: 12px;--nevysha-color-from-luminance: black;--extra-network-card-width: 13em;--extra-network-card-height: 8em;--nevysha-font-color: #d4d4d4;--nevysha-icon-fill: var(--nevysha-font-color);--nevysha-font-color-subdued: #9ca3af;--menu-top-height: 1px;--main-container-height: 1px}:root,.dark{--nevysha-gradiant-2: rgb(28 28 28);--body-background-fill: rgba(255, 255, 255, 0) !important;--button-primary-background-fill: var(--primary-500);--tab-nav-background-color: #262626ad;--tab-nav-background-color-selected: var(--input-background-fill);--vertical-line-bg-color: #ffffff59;--checkbox-background-color: var(--nevysha-dark);--button-border-width: 0px;--tabmenu-button-color: var(--nevysha-font-color);--nevysha-dark: #1c1c1c;--nevysha-light-dark: #292a2e;--nevysha-white: var(--nevysha-font-color);--nevysha-input-border-color: hsl(214deg 5% 30%);--nevysha-color2: #f0a6caff;--nevysha-color3: #efc3e6ff;--nevysha-color4: #f0e6efff;--main-tabs-background-color: #14141485;--background-fill-primary: var(--nevysha-light-dark);--ae-slider-bg-overlay: repeating-linear-gradient( 90deg, transparent, transparent max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(4px, calc(.671141% + 0px)) );--ae-subgroup-input-bg-color: hsl(225deg 6% 13%);--ae-input-border-color: hsl(214deg 5% 30%);--ae-panel-border-radius: 0px;--ae-input-bg-color: hsl(225deg 6% 13%);--ae-input-color: var(--nevysha-font-color);--block-title-text-color: var(--nevysha-font-color);--primary-50: var(--nevysha-color4);--primary-100: var(--nevysha-color4);--primary-200: var(--nevysha-color3);--primary-300: var(--nevysha-color3);--primary-400: var(--nevysha-light-dark);--primary-500: var(--nevysha-light-dark);--primary-600: var(--nevysha-dark);--primary-700: var(--nevysha-dark);--primary-800: var(--nevysha-dark);--primary-900: var(--nevysha-dark);--primary-950: var(--nevysha-dark);--secondary-50: var(--nevysha-color4);--secondary-100: var(--nevysha-color4);--secondary-200: var(--nevysha-color3);--secondary-300: var(--nevysha-color3);--secondary-400: var(--nevysha-light-dark);--secondary-500: var(--nevysha-light-dark);--secondary-600: var(--nevysha-dark);--secondary-700: var(--nevysha-dark);--secondary-800: var(--nevysha-dark);--secondary-900: var(--nevysha-dark);--secondary-950: var(--nevysha-dark);--neutral-50: #f9fafb;--neutral-100: #f3f4f6;--neutral-200: #e5e7eb;--neutral-300: #d1d5db;--neutral-400: #9ca3af;--neutral-500: #6b7280;--neutral-600: var(--nevysha-light-dark);--neutral-700: var(--nevysha-light-dark);--neutral-800: var(--nevysha-light-dark);--neutral-900: var(--nevysha-light-dark);--neutral-950: var(--nevysha-light-dark);--slider-color: var(--nevysha-dark);--button-secondary-background-fill: var(--nevysha-dark);--button-secondary-background-fill-hover: var(--nevysha-dark);--checkbox-border-color: var(--nevysha-white);--checkbox-border-color-hover: var(--ae-primary-color);--color-accent: var(--ae-primary-color);--link-text-color: var(--nevysha-white);--body-text-color: var(--nevysha-font-color);--color-accent-soft: var(--neutral-700);--background-fill-secondary: var(--neutral-900);--border-color-accent: var(--neutral-600);--border-color-primary: var(--neutral-700);--link-text-color-active: var(--secondary-500);--link-text-color-hover: var(--ae-primary-color);--link-text-color-visited: var(--secondary-600);--body-text-color-subdued: var(--nevysha-font-color-subdued);--shadow-drop: rgba(0,0,0,.05) 0px 1px 2px 0px;--shadow-drop-lg: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--shadow-inset: rgba(0,0,0,.05) 0px 2px 4px 0px inset;--block-background-fill: var(--neutral-800);--block-label-border-color: var(--nevysha-input-border-color);--block-label-text-color: var(--neutral-200);--checkbox-background-color-selected: var(--secondary-600);--checkbox-border-color-focus: var(--secondary-500);--checkbox-border-color-selected: var(--checkbox-border-color);--checkbox-label-background-fill: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--checkbox-label-background-fill-hover: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--error-background-fill: var(--background-fill-primary);--error-text-color: #ef4444;--input-background-fill: var(--nevysha-dark);--input-background-fill-focus: var(--secondary-600);--input-background-fill-hover: var(--input-background-fill);--input-border-color-focus: var(--neutral-700);--input-placeholder-color: var(--neutral-500);--input-shadow-focus: 0 0 0 var(--shadow-spread) var(--neutral-700), var(--shadow-inset);--stat-background-fill: linear-gradient(to right, var(--primary-400), var(--primary-600));--table-border-color: var(--neutral-700);--table-even-background-fill: var(--neutral-950);--table-odd-background-fill: var(--neutral-900);--button-cancel-background-fill: linear-gradient(to bottom right, #dc2626, #b91c1c);--button-cancel-background-fill-hover: linear-gradient(to bottom right, #dc2626, #dc2626);--button-cancel-border-color: #dc2626;--button-cancel-border-color-hover: var(--button-cancel-border-color);--button-cancel-text-color: white;--button-cancel-text-color-hover: var(--button-cancel-text-color);--button-primary-background-fill-hover: linear-gradient(to bottom right, var(--primary-500), var(--primary-500));--button-primary-border-color: var(--primary-500);--button-primary-text-color: white;--button-primary-text-color-hover: var(--button-primary-text-color);--button-secondary-border-color: var(--neutral-600);--button-secondary-text-color: var(--nevysha-font-color);--button-secondary-text-color-hover: var(--button-secondary-text-color);--shadow-spread: 1px;--block-border-color: var(--border-color-primary);--block_border_width: None;--block-info-text-color: var(--nevysha-font-color-subdued);--block-label-background-fill: var(--background-fill-secondary);--block_label_border_width: None;--block_shadow: None;--block_title_background_fill: None;--block_title_border_color: None;--block_title_border_width: None;--panel-background-fill: var(--background-fill-secondary);--panel-border-color: var(--border-color-primary);--panel_border_width: None;--checkbox-background-color-focus: var(--checkbox-background-color);--checkbox-background-color-hover: var(--checkbox-background-color);--checkbox-border-width: var(--input-border-width);--checkbox-label-background-fill-selected: var(--checkbox-label-background-fill);--checkbox-label-border-color: var(--border-color-primary);--checkbox-label-border-color-hover: var(--checkbox-label-border-color);--checkbox-label-border-width: var(--input-border-width);--checkbox-label-text-color: var(--body-text-color);--checkbox-label-text-color-selected: var(--checkbox-label-text-color);--error-border-color: var(--border-color-primary);--error_border_width: None;--input-border-color: var(--border-color-primary);--input-border-color-hover: var(--input-border-color);--input_border_width: None;--input_shadow: None;--loader_color: None;--slider_color: None;--table-row-focus: var(--color-accent-soft);--button-primary-border-color-hover: var(--button-primary-border-color);--button-secondary-border-color-hover: var(--button-secondary-border-color);--spacing-xxs: 1px;--spacing-xs: 2px;--spacing-sm: 3px;--spacing-md: 6px;--spacing-lg: 4px;--spacing-xl: 10px;--spacing-xxl: 16px;--radius-xxs: 1px;--radius-xs: 2px;--radius-sm: 0;--radius-md: 6px;--radius-lg: 2px !important;--radius-xl: 12px;--radius-xxl: 22px;--text-xxs: 9px;--text-xs: 10px;--text-sm: 12px;--text-lg: 12px;--text-xl: 22px;--text-xxl: 26px;--font: "Source Sans Pro", "ui-sans-serif", "system-ui", sans-serif;--font-mono: "IBM Plex Mono", "ui-monospace", "Consolas", monospace;--body-text-size: var(--nevysha-text-md);--body-text-weight: 400;--embed-radius: var(--radius-lg);--block-border-width: 1px;--block-info-text-size: var(--text-sm);--block-info-text-weight: 400;--block-label-border-width: 1px;--block-label-margin: 0;--block-label-padding: var(--spacing-sm) var(--spacing-lg);--block-label-radius: calc(var(--radius-lg) - 1px) 0 calc(var(--radius-lg) - 1px) 0;--block-label-right-radius: 0 calc(var(--radius-lg) - 1px) 0 calc(var(--radius-lg) - 1px);--block-label-text-size: var(--text-sm);--block-label-text-weight: 400;--block-padding: var(--spacing-xl) calc(var(--spacing-xl) + 2px);--block-radius: var(--radius-lg);--block-shadow: var(--shadow-drop);--block-title-background-fill: none;--block-title-border-color: none;--block-title-border-width: 1px;--block-title-padding: 0;--block-title-radius: none;--block-title-text-size: var(--nevysha-text-md);--block-title-text-weight: 400;--container-radius: var(--radius-lg);--form-gap-width: 1px;--layout-gap: var(--spacing-xxl);--panel-border-width: 0;--section-header-text-size: var(--nevysha-text-md);--section-header-text-weight: 400;--checkbox-border-radius: var(--radius-sm);--checkbox-label-gap: var(--spacing-lg);--checkbox-label-padding: var(--spacing-md) calc(2 * var(--spacing-md));--checkbox-label-shadow: var(--shadow-drop);--checkbox-label-text-size: var(--nevysha-text-md);--checkbox-label-text-weight: 400;--checkbox-check: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");--radio-circle: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");--checkbox-shadow: var(--input-shadow);--error-border-width: 1px;--input-border-width: 1px;--input-padding: var(--spacing-xl);--input-radius: var(--radius-lg);--input-shadow: 0 0 0 var(--shadow-spread) transparent, var(--shadow-inset);--input-text-size: var(--nevysha-text-md);--input-text-weight: 400;--loader-color: var(--color-accent);--prose-text-size: var(--nevysha-text-md);--prose-text-weight: 400;--prose-header-text-weight: 600;--table-radius: var(--radius-lg);--button-large-padding: 2px;--button-large-radius: var(--radius-lg);--button-large-text-size: var(--nevysha-text-md);--button-large-text-weight: 600;--button-shadow: var(--shadow-drop);--button-shadow-active: var(--shadow-inset);--button-shadow-hover: var(--shadow-drop-lg);--button-small-padding: var(--spacing-sm) calc(2 * var(--spacing-sm));--button-small-radius: var(--radius-lg);--button-small-text-size: var(--nevysha-text-md);--button-small-text-weight: 400;--button-transition: none}.nevysha-light{--nevysha-gradiant-2: #fefefe;--nevysha-white: var(--nevysha-font-color);--nevysha-dark: #fefefe;--nevysha-light-dark: #efefef;--neutral-50: var(--nevysha-white);--neutral-100: var(--nevysha-white);--neutral-200: var(--nevysha-white);--neutral-400: var(--nevysha-white);--neutral-600: var(--nevysha-light-dark);--neutral-700: var(--nevysha-light-dark);--neutral-800: var(--nevysha-light-dark);--neutral-900: var(--nevysha-light-dark);--neutral-950: var(--nevysha-light-dark);--link-text-color-hover: var(--ae-primary-color);--ae-slider-bg-overlay: repeating-linear-gradient( 90deg, transparent, transparent max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(4px, calc(.671141% + 0px)) );--ae-subgroup-input-bg-color: hsl(225deg 6% 13%);--ae-input-border-color: hsl(0deg 0% 84.25%);--ae-input-color: hsl(0, 0%, 0%);--ae-input-bg-color: hsl(0, 0%, 100%);--button-secondary-background-fill: var(--nevysha-dark);--block-label-background-fill: var(--background-fill-secondary);--checkbox-label-background-fill-hover: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--vertical-line-bg-color: #18181859;--checkbox-background-color: var(--nevysha-dark);--checkbox-background-color-focus: var(--checkbox-background-color);--checkbox-label-background-fill: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--checkbox-label-background-fill-selected: var(--checkbox-label-background-fill);--checkbox-label-text-color: var(--body-text-color);--checkbox-label-text-color-selected: var(--checkbox-label-text-color);--background-fill-secondary: var(--neutral-900);--panel-background-fill: var(--background-fill-secondary);--body-text-color-subdued: var(--nevysha-font-color-subdued);--block-label-text-color: var(--neutral-200);--button-secondary-text-color: var(--nevysha-white);--button-secondary-text-color-hover: var(--button-secondary-text-color);--checkbox-border-color-hover: var(--ae-primary-color);--checkbox-background-color-hover: var(--nevysha-dark);--button-secondary-background-fill-hover: var(--ae-primary-color);--body-background-fill: rgba(255, 255, 255, 0) !important;--tab-nav-background-color: var(--nevysha-light-dark);--tab-nav-background-color-selected: var(--nevysha-dark);--border-color-primary: #acacac;--input-border-color: #acacac;--block-border-color: var(--border-color-primary);--input-border-color-focus: var(--ae-primary-color);--ae-panel-border-radius: 0px;--tabnav-button-color: var(--nevysha-white);--input-background-fill: var(--nevysha-dark);--body-text-color: var(--neutral-100);--tabmenu-button-color: var(--nevysha-white);--background-fill-primary: var(--nevysha-light-dark);--block-background-fill: var(--neutral-800);--secondary-text-color: var(--nevysha-white);--block-title-text-color: var(--nevysha-font-color);--main-tabs-background-color: #e5e5e585}#kofi_nevysha_support{transform:rotate(360deg)}.gradio-button.secondary-down:hover{background:var(--button-secondary-background-fill-hover);color:var(--button-secondary-text-color-hover)}.gradio-dropdown ul.options li.item.selected{background-color:var(--ae-primary-color)!important}.gradio-dropdown ul.options li.item:hover{background-color:var(--color-accent)}.progressDiv .progress{background:var(--ae-primary-color)!important}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0;position:relative}input[type=number]::-webkit-inner-spin-button:before{content:"▲";display:block;position:absolute;top:0;left:0;right:0;bottom:50%;text-align:center;color:red;font-size:10px}input[type=number]::-webkit-inner-spin-button:after{content:"▼";display:block;position:absolute;top:50%;left:0;right:0;bottom:0;text-align:center;color:red;font-size:10px}.gradio-accordion{background-color:var(--nevysha-light-dark)!important;border-left:none!important;border-bottom:none!important;border-right:none!important;border-radius:3px!important;color:var(--secondary-text-color)!important;margin:6px 0!important}.gradio-slider input[type=range]{align-self:flex-start}.gradio-container.app{padding:2px!important;transform:rotate(360deg)}input[type=range]{overflow:hidden;width:100%;-webkit-appearance:none;background-color:var(--ae-input-bg-color);border:1px solid var(--ae-input-border-color);position:relative;accent-color:var(--ae-primary-color)!important}input[type=range]:after{content:"";position:absolute;height:13px;background-image:var(--ae-slider-bg-overlay);opacity:.15;width:100%}input[type=range]::-webkit-slider-runnable-track{height:14px;-webkit-appearance:none;color:var(--ae-primary-color);margin-top:-1px}input[type=range]::-moz-range-thumb,input[type=range]::-webkit-slider-thumb{color:var(--ae-primary-color);border-radius:0}.nevysha.nevysha-tabnav{display:flex;position:fixed;z-index:2;flex-direction:column;width:175px;background-color:var(--tab-nav-background-color);border-bottom:none!important}.nevysha.nevysha-tabnav.center-menu-items{justify-content:center}.nevysha.nevysha-tabnav.center-menu-items>button:nth-child(1){margin-left:auto}.nevysha.nevysha-tabnav>.selected{background-color:var(--tab-nav-background-color-selected)!important;border-top:2px solid var(--ae-primary-color);border-radius:0}.nevysha.nevysha-tabnav>button{color:var(--tabmenu-button-color)}#quicksettings_gap{display:none}#quicksettings_gap.nevysha-quicksettings-gap{display:block;flex:1;max-width:none}#tabs>.nevysha.tabitem{margin-left:calc(var(--nevysha-margin-left) + 10px);background-color:var(--main-tabs-background-color);border:none;border-radius:0;overflow-y:auto;height:var(--main-container-height);padding:0 10px}#tabs>.nevysha.tabitem::-webkit-scrollbar{width:5px}#tabs>.nevysha.tabitem::-webkit-scrollbar-track{background-color:transparent}#tabs>.nevysha.tabitem::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.nevysha.btn{display:inline-flex;justify-content:center;align-items:center;transition:var(--button-transition);padding:var(--size-0-5) var(--size-2);text-align:center;border:var(--button-border-width) solid var(--button-primary-border-color);background:var(--button-primary-background-fill);color:var(--button-primary-text-color);border-radius:var(--button-large-radius);padding:var(--button-large-padding);font-size:var(--button-large-text-size);--checkbox-background-color: var(--neutral-800)}.nevysha.btn.refresh{width:50px;max-width:50px;text-align:center;vertical-align:middle;height:50px;background-color:var(--nevysha-dark);display:none}.block.padded:not(.gradio-accordion){padding:10px!important}.nevysha.settings-child{background-color:var(--nevysha-light-dark)!important}.gradio-button.tool{border-radius:0!important;border:none!important}#quicksettings{width:auto;align-items:stretch;gap:20px}#quicksettings>.block.gradio-slider{display:flex;flex-direction:row;align-content:space-between}#quicksettings>div.block{padding:0!important;display:flex;flex-direction:row;align-content:space-between}#quicksettings>div.block>*{width:100%}#quicksettings>div.block>input[type=range]{margin-bottom:2px}#quicksettings>.gradio-button.tool{height:38px;margin-left:-20px}#quicksettings.centered-quicksettings{justify-content:center!important}#footer{text-align:center;position:fixed;bottom:0;left:0;display:flex;justify-content:center;width:100%}#footer>div{display:flex;position:fixed;left:10px;bottom:2px}#footer .versions{font-size:85%!important;opacity:.85!important;position:fixed!important;right:10px!important;left:auto!important;bottom:2px}.nevysha.svg-icon{height:20px;fill:var(--nevysha-icon-fill);margin:3px 0}.nevysha.svg-icon.rotate{transform:rotate(315deg)}/*!*versions*!*/.token-remove>svg{width:20px;height:20px;fill:var(--neutral-50)}html{overflow-y:hidden}body,#nevysha-loading{font-family:-apple-system,BlinkMacSystemFont,sans-serif;overflow:auto;background:linear-gradient(330deg,var(--nevysha-gradiant-1) 3%,var(--nevysha-gradiant-2) 38%);animation:gradient 35s ease infinite;background-size:400% 400%;background-attachment:fixed;display:flex;height:100vh}@keyframes gradient{0%{background-position:0% 0%}50%{background-position:75% 75%}to{background-position:0% 0%}}.wave{background:rgb(94 26 145 / 16%);border-radius:1000% 1000% 0 0;position:fixed;width:200%;height:3.5em;animation:wave 10s -3s linear infinite;transform:translateZ(0);opacity:.8;bottom:0;left:0;z-index:0}.wave:nth-of-type(2){bottom:-1.25em;animation:wave 18s linear reverse infinite;opacity:.8}.wave:nth-of-type(3){bottom:-2.5em;animation:wave 20s -1s reverse infinite;opacity:.9}@keyframes wave{2%{transform:translate(1)}25%{transform:translate(-25%)}50%{transform:translate(-50%)}75%{transform:translate(-25%)}to{transform:translate(1)}}.block{padding:10px!important}.block.padded:not(.gradio-accordion){padding:0!important}.block.token-counter span{background:var(--nevysha-dark)!important;box-shadow:none!important;border:none!important;border-radius:0!important}.gradio-group{margin-top:10px!important}button.secondary,button.primary{border:1px solid var(--ae-input-border-color)!important;border-radius:var(--ae-panel-border-radius)!important;background:var(--ae-input-bg-color)!important;color:var(--ae-input-color)!important}.nevysha.skip-interrupt-wrapper{display:flex!important;flex-direction:row}.nevysha.skip-interrupt-wrapper>button{position:relative}.nevysha.settings-wrapper{flex:1;margin-top:5px;overflow-y:scroll;padding:0 5px 15px 0}.nevysha.settings-wrapper::-webkit-scrollbar{width:5px}.nevysha.settings-wrapper::-webkit-scrollbar-track{background-color:transparent}.nevysha.settings-wrapper::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.nevysha.txt2img_toprow-wrapper{display:flex;flex-direction:column}#txt2img_settings,#img2img_settings{flex:1;height:100%;display:flex;flex-direction:column;flex-wrap:nowrap}#txt2img_script_container,#img2img_script_container{padding:0!important}#txt2img_tools,#img2img_tools{gap:0}#txt2img_tools>.form,#img2img_tools>.form{gap:0;justify-content:space-between}#txt2img_toprow,#img2img_toprow{background-color:var(--nevysha-light-dark)!important;padding:10px!important;margin-bottom:6px;display:flex;flex-direction:column}#txt2img_script_container,#img2img_script_container{background-color:transparent!important}#tab_txt2img>div,#tab_img2img>div,#tab_img2img>div>div{height:100%}.settings-gradio-parent{height:100%;padding:10px 0 0}#txt2img_results,#img2img_results{height:100%}#txt2img_gallery_container,#img2img_gallery_container{flex:1;max-height:100%;overflow-y:auto}.nevysha.nevysha-scrollable::-webkit-scrollbar{width:5px}.nevysha.nevysha-scrollable::-webkit-scrollbar-track{background-color:transparent}.nevysha.nevysha-scrollable::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.nevysha.nevysha-scrollable>div>div:nth-child(2){overflow-y:visible}#txt2img_gallery,#img2img_gallery{height:100%;display:flex;flex-direction:column}#txt2img_gallery>div:nth-child(2),#img2img_gallery>div:nth-child(2){flex:1;min-height:auto!important;max-height:none!important}#txt2img_settings,#img2img_settings,#txt2img_results,#img2img_results{flex-grow:1;flex-shrink:0}#txt2img_settings,#img2img_settings,#txt2img_results,#img2img_results{flex-basis:50%}#txt2img_seed_row,#img2img_seed_row{display:flex;align-content:center;align-items:center}#txt2img_seed_row>button,#img2img_seed_row>button{align-self:auto}#image_browser_tabs_container>:not(:nth-child(-n+2)){background-color:var(--nevysha-light-dark)!important}#tab_settings{background-color:var(--nevysha-light-dark)!important}#img2img_settings .tabs>:not(:first-child){background-color:var(--nevysha-light-dark)!important}.nevysha.resizable-children-container{flex-wrap:nowrap;width:calc(100% - 33px)!important;display:flex;flex-direction:row}.vertical-line-wrapper{width:10px!important;max-width:10px!important;min-width:10px!important;height:calc(100% - 30px);cursor:ew-resize;display:flex;justify-content:center;margin:15px -10px 0}.slide-right-browser-panel>.vertical-line-wrapper{position:absolute}.slide-right-browser-panel>.slide-right-browser-panel-container{flex:1;padding:10px;margin-left:15px}#cozy-img-browser_panel{border:1px solid var(--ae-input-border-color)!important}.vertical-line{width:2px!important;max-width:2px!important;min-width:2px!important;height:100%;cursor:ew-resize;background-image:linear-gradient(to bottom,var(--vertical-line-bg-color) 7px,transparent 0);background-size:100% 13px}.gradio-image{padding:0!important}#expendBtn{position:absolute;bottom:10px;right:35px;z-index:99999}#img2maskimg>div:nth-child(3)>div>div{display:flex;justify-content:center}canvas.nevysha{inset:auto}.brush>input[type=range]{min-width:200px}.block.gradio-checkbox{margin:0!important}.nevysha-accent{background-color:var(--ae-primary-color)!important}.slide-right-browser-panel>.vertical-line-wrapper{z-index:100;margin:15px 0 0 5px}.nevysha-right-button-wrapper{position:fixed;right:0;top:calc(75px + var(--menu-top-height));z-index:999;height:calc(100vh - (100px + var(--menu-top-height)));width:25px;min-width:25px!important;display:flex;flex-direction:column}.nevysha-right-button-wrapper>button{flex:1;min-height:auto!important;max-height:none!important;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0!important;margin:0!important}.nevysha-right-button-wrapper>button>div,.nevysha-extra-network-floating-btn>div{writing-mode:vertical-rl;width:25px;min-width:25px!important}.nevysha-extra-network-floating-btn{height:100px;position:absolute;top:calc(50% - 50px)}.extra-network-cards{overflow-x:hidden}.extra-network-cards>.card{width:var(--extra-network-card-width);height:var(--extra-network-card-height)}.extra-network-cards .card .actions .name{font-size:var(--nevysha-text-md);line-break:normal;text-overflow:ellipsis;width:100%;display:block}.slide-right-browser-panel{position:fixed;z-index:9999;background-color:var(--block-background-fill)!important;width:75vw;right:0;height:calc(100% - (100px + var(--menu-top-height)));top:calc(75px + var(--menu-top-height));padding-right:15px;display:flex;flex-direction:row}.extra-network-subdirs{overflow:scroll}[id$=_subdirs]{padding:0;margin:0;overflow:visible}[id$=cards_html]{display:flex;flex-direction:column;width:100%;padding:0;margin:0;align-items:stretch;overflow:auto}[id$=cards_html]::-webkit-scrollbar{width:5px}[id$=cards_html]::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}[id$=cards_html]::-webkit-scrollbar-track{background-color:transparent}[id$=_cards]{height:auto;overflow:visible;position:relative}input[type=number]{width:100px}.nevysha.settings-nevyui-title{position:absolute;top:0;width:100%;text-align:center}.nevysha.settings-nevyui-title>h2{font-size:1.8em;color:var(--ae-primary-color);font-family:Caveat Variable,sans-serif}.nevysha.settings-nevyui-title>.subtitle{font-size:10px;font-style:italic}.nevysha.settings-nevyui-top>.info{color:var(--body-text-color);margin-bottom:5px;font-style:italic}.nevysha-reporting{color:var(--body-text-color)!important;margin:15px 0!important;border-left:4px solid var(--ae-primary-color);padding-left:5px;display:flex;flex-wrap:wrap}.nevysha.settings-nevyui-top>.nevysha-reporting>a{color:var(--ae-primary-color);text-decoration:underline}#cozy_nest_settings_tabs .block{background-color:transparent}.nevysha-emphasis{margin-top:5px;font-weight:700;background-color:var(--ae-primary-color);color:var(--nevysha-color-from-luminance)!important;padding:8px;border-radius:2px}.nevysha-tabnav.nevysha-tabnav-settings>h2{font-size:1.6em;margin-top:20px}#nevyui_update_info_panel>article{border-left:4px solid var(--ae-primary-color);padding-left:15px;margin-left:5px}#nevysha-version-info{display:flex;justify-content:space-between}.nevysha-version-info-text{flex:1;margin-left:10px!important}.nevysha.settings-nevyui-bottom{position:absolute;bottom:0}.nevysha.settings-nevyui-bottom>p{font-size:.8em;color:var(--body-text-color)}#cozy_nest_settings_tabs{background-color:var(--tab-nav-background-color-selected)}#cozy_nest_settings_tabs>.tabitem{overflow-y:auto;height:520px}#cozy_nest_settings_tabs>.tab-nav{background-color:var(--tab-nav-background-color)}.tab-nav>*{border-radius:0}#cozy_nest_settings_tabs>.tab-nav>.selected{background-color:var(--tab-nav-background-color-selected)!important;border-top:2px solid var(--ae-primary-color)}[id$=_extra_tabs]{background-color:var(--tab-nav-background-color-selected)}[id$=_extra_tabs]>.tabitem{background-color:var(--tab-nav-background-color-selected)!important}[id$=_extra_tabs]>.tab-nav{background-color:var(--tab-nav-background-color)}[id$=_extra_tabs]>.tab-nav>.selected{background-color:var(--tab-nav-background-color-selected)!important;border-top:2px solid var(--ae-primary-color)}.nevysha-draggable-anchor-icon{cursor:pointer;position:relative;top:2px;left:2px;width:60px;height:35px;display:flex;align-content:center;justify-content:center;flex-wrap:wrap;background:var(--ae-input-bg-color);border:1px solid var(--ae-input-border-color)}.nevysha-draggable-anchor-icon>svg{height:15px;fill:var(--body-text-color)}.nevysha-draggable-anchor{position:absolute;top:0;left:0;cursor:pointer;z-index:9999;width:60px;height:35px}#img_browser_main_block{gap:0}#img_browser_main_block .form{align-items:center}textarea.nevysha-image-browser-folder{display:block;position:relative;outline:none!important;box-shadow:var(--input-shadow);border:var(--input-border-width) solid var(--input-border-color);resize:none}#cnib_output_folder>label>textarea{display:none}.nevysha-image-browser-folder-container{display:flex;flex-direction:row}.nevysha-image-browser-folder-btn{border:1px solid var(--ae-input-border-color)!important;border-radius:var(--ae-panel-border-radius)!important;background:var(--ae-input-bg-color)!important;color:var(--ae-input-color)!important;padding:0 10px!important;min-width:60px}.nevysha.nevysha-tabnav.menu-fix-top{position:fixed;flex-direction:row;width:100%;top:0}.gradio-container.app{z-index:1;height:100vh!important}.gradio-container.app.menu-fix-top{padding-top:0!important;padding-bottom:20px!important}#tab_nevyui>div{height:100%}#nevyui-ui-wrapper{background-color:var(--block-background-fill)}.nevysha-tab-settings{position:fixed;right:5px;top:30px;height:fit-content;width:max(800px,50vw);z-index:9999;background-color:var(--block-background-fill);border:1px solid var(--ae-input-border-color)}.nevysha-btn-menu-wrapper{display:flex;justify-content:center;margin:15px 0}.nevysha-btn-menu-wrapper.menu-fix-top{position:relative;right:20px;margin:0 0 0 auto;display:flex;gap:10px;justify-content:end}.nevysha-btn-menu-wrapper>button>svg{fill:var(--ae-primary-color);width:20px}#nevysha-saved-feedback-wrapper{height:1px}.nevysha-feedback{margin:auto;width:100%;text-align:center;margin-top:-15px!important;color:var(--ae-primary-color)!important}#nevyui_update_info_panel{padding:5px}.markdown-body{font-size:1em;color:var(--body-text-color);line-height:1.5;font-weight:400;letter-spacing:.00938em;word-wrap:break-word;padding:0 10px;max-height:400px;overflow-y:auto}.markdown-body code{font-family:monospace;font-size:.9em;background-color:var(--ae-input-bg-color);color:var(--body-text-color);padding:2px;border-radius:2px}.markdown-body>h1{font-size:medium;color:var(--body-text-color);margin-top:30px}.markdown-body>h2{font-size:1.4em;color:var(--body-text-color);margin-top:30px}.markdown-body>ul{margin-left:20px}.markdown-body>ul>li>ul{margin-left:20px}.markdown-body>ul>li{margin-bottom:10px}#nevysha_other_tabs:empty{height:200px;width:200px}#nevysha_other_tabs:empty:before{content:"Drop tabs here to hide them";display:flex;justify-content:center;align-items:center;height:100%;width:100%;color:var(--body-text-color);font-size:1.2em;font-weight:500;text-align:center}#nevysha_other_tabs{background-color:var(--block-background-fill);position:absolute;display:flex;flex-direction:column;border:1px solid var(--ae-input-border-color)}#nevysha_other_tabs>button{text-align:left}.nevysha-other-tab-text{padding:3px 10px;text-align:left}.remove-nevysha-other-tab{padding-right:4px;padding-left:4px}.nevysha-cozy-nest-app-name{font-size:4em;margin-bottom:30%;color:var(--ae-primary-color);font-family:Caveat Variable,sans-serif;text-transform:uppercase}#nevysha-loading>div.nevysha-loading-progress>div.subtext1{font-size:1em;color:var(--body-text-color);opacity:1;margin-top:30%}#nevysha-loading>div.nevysha-loading-progress>div.subtext2{font-size:.8em;color:var(--body-text-color);opacity:.2}#nevysha-loading-wrap{background-color:var(--nevysha-gradiant-2);position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9000}#nevysha-loading-wrap>#nevysha-loading>.footer{position:fixed;bottom:calc(3.5em + 25px);right:25px;color:var(--body-text-color);font-size:.7em;opacity:.3}#nevysha-loading{position:fixed;top:0;left:0;width:100vw;height:100vh;display:flex;z-index:9001}#loading_step_estimator{font-size:.8em}.nevysha-loading-progress{margin:auto;color:var(--ae-primary-color);text-align:center}.lds-roller{display:inline-block;position:relative;width:80px;height:80px}.lds-roller div{animation:lds-roller 1.2s cubic-bezier(.5,0,.5,1) infinite;transform-origin:40px 40px}.lds-roller div:after{content:" ";display:block;position:absolute;width:7px;height:7px;border-radius:50%;background:var(--ae-primary-color);margin:-4px 0 0 -4px}.lds-roller div:nth-child(1){animation-delay:-36ms}.lds-roller div:nth-child(1):after{top:63px;left:63px}.lds-roller div:nth-child(2){animation-delay:-72ms}.lds-roller div:nth-child(2):after{top:68px;left:56px}.lds-roller div:nth-child(3){animation-delay:-.108s}.lds-roller div:nth-child(3):after{top:71px;left:48px}.lds-roller div:nth-child(4){animation-delay:-.144s}.lds-roller div:nth-child(4):after{top:72px;left:40px}.lds-roller div:nth-child(5){animation-delay:-.18s}.lds-roller div:nth-child(5):after{top:71px;left:32px}.lds-roller div:nth-child(6){animation-delay:-.216s}.lds-roller div:nth-child(6):after{top:68px;left:24px}.lds-roller div:nth-child(7){animation-delay:-.252s}.lds-roller div:nth-child(7):after{top:63px;left:17px}.lds-roller div:nth-child(8){animation-delay:-.288s}.lds-roller div:nth-child(8):after{top:56px;left:12px}@keyframes lds-roller{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--ae-primary-color);animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 .6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 .6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 .6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 .6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}#kofi_nevysha_support>img{height:15px!important}.nevysha-kofi-tab{width:auto;height:auto}.livePreview{background-color:var(--background-fill-primary)!important}:root{--error-handler-white: #eeeeee}#dialog-message-wrap,#cozy-alert-wrap{font-size:12px;position:fixed;z-index:1000;width:100vw;height:100vh;top:0;backdrop-filter:blur(10px);display:flex;justify-content:center}#dialog-message{display:flex;flex-direction:column;padding:10px;margin:50px;background-color:var(--nevysha-gradiant-2)}#dialog-message>.header{display:flex;justify-content:space-between}#dialog-message>.header>h1{font-size:1.5em}#cozy-alert-wrap>div{height:fit-content;width:auto;margin:auto;background-color:var(--nevysha-gradiant-2);padding:15px;display:flex;flex-direction:column;border:1px solid var(--ae-input-border-color);color:var(--nevysha-font-color)}#cozy-alert-wrap>div>.header{display:flex;justify-content:space-between;flex-direction:row}#cozy-alert-title{font-size:1.5em;margin:0 auto}#cozy-alert-close{margin:auto}.ui-dialog-title,#cozy_nest_error_handling_display{color:var(--error-handler-white)}#cozy_nest_error_handling_display_stack{color:red;font-weight:700;font-family:monospace;white-space:pre-wrap;background-color:#222;padding:25px;border-radius:3px;border-color:red}#cozynest-error-extentions>table>tbody>tr>td>a{color:var(--error-handler-white);font-style:italic}#dialog-message>fieldset{color:var(--error-handler-white);margin-bottom:40px}#dialog-message>fieldset.extensions-list{height:100%;overflow-y:auto}#cozynest-error-instance-info>a{color:#0ff!important;text-decoration:underline;font-weight:700}.cozynest-error-tips{font-weight:700;color:var(--error-handler-white);background-color:#d57411;padding:10px;font-size:15px}.cozynest-error-tips>a{color:#0ff;text-decoration:underline;font-weight:700}.ui-dialog{background-color:#101010;border:none}.ui-dialog-titlebar,.ui-dialog-buttonpane{background-color:#000;border:none;color:var(--error-handler-white)}.ui-button{background-color:#222;border:none;color:var(--error-handler-white)}.ui-button:hover,.ui-widget.ui-widget-content{border:none}.blocInfo,textarea{display:block;position:relative;outline:none!important;box-shadow:var(--input-shadow);border:var(--input-border-width) solid var(--input-border-color);border-color:var(--input-border-color)!important;border-radius:var(--input-radius)!important;background:var(--input-background-fill)!important;background-color:var(--input-background-fill)!important;width:100%;color:var(--body-text-color)!important;font-weight:var(--input-text-weight)!important;font-size:var(--input-text-size)!important;line-height:var(--line-sm)!important;font-family:monospace!important}.infotext{max-height:200px;overflow-y:auto}.infotext::-webkit-scrollbar{width:5px}.infotext::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.infotext::-webkit-scrollbar-track{background-color:transparent}ul.options{overflow-y:auto;z-index:303;border:1px solid var(--ae-input-border-color)}ul.options::-webkit-scrollbar{width:5px}ul.options::-webkit-scrollbar-track{background-color:transparent}ul.options::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}button:hover,.nevysha-button:hover{filter:brightness(1.2)!important}body.nevysha-light button:hover,body.nevysha-light .nevysha-button:hover{filter:brightness(.95)!important}.nevysha-enhanced-prompt-field{padding:10px!important}.nevysha-enhanced-prompt-field>.prompt{height:289px;display:block;position:relative;outline:none!important;box-shadow:var(--input-shadow);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-radius);background:var(--input-background-fill);width:100%;color:var(--body-text-color)!important;font-weight:var(--input-text-weight)!important;font-size:var(--input-text-size)!important;line-height:var(--line-sm)!important;font-family:monospace!important;overflow:auto;min-height:45px;padding:10px}.nevysha-enhanced-prompt-field-bracket{font-weight:700;font-size:1.2em}#kofi_nevysha_support,#kofi_nevysha_support_img{display:none}[id$=_gallery_clear_button]{position:absolute;top:3px;right:10px;z-index:30;background-color:var(--block-background-fill)}[id$=_gallery_clear_button]>svg{height:15px;width:15px;fill:var(--body-text-color)}#nevyui_update_info_close_btn,#nevyui_update_btn{width:60px}#cozynest_others_settings_header>p:nth-child(1){font-style:italic}#nevysha_cozy_nest{display:none}body.nsfw img:not([id="kofi_nevysha_support_img"]){filter:blur(20px)}body.nsfw .infoModal>.image-wrapper>img{filter:blur(50px)}body.nsfw .card{filter:blur(10px)}[id$=_actions_column]{gap:0}[id$=_toprow]{gap:5px!important}.gradio-accordion{border-left:2px solid var(--block-background-fill)!important}.nevysha-accordion-open{border-top:2px solid var(--secondary-accent-color)!important;border-image:linear-gradient(to right,var(--secondary-accent-color) 100px,var(--block-background-fill) 70%) 1}[id$=_script_container] .gradio-accordion:before{content:""!important;background-color:var(--ae-input-border-color)!important;height:1px!important;position:absolute;top:0;width:100%;left:0;margin-top:-2px;margin-left:-2px}[id$=_script_container] .nevysha-accordion-open.gradio-accordion:before{margin-top:-3px}[id$=_script_container] .nevysha-accordion-open{border-left:2px solid var(--secondary-accent-color)!important}[id$=_script_container] .nevysha-accordion-open .nevysha-accordion-open{border-top:2px solid var(--secondary-accent-color)!important;border-left:2px solid var(--block-background-fill)!important;border-image:none}.gradio-accordion>.label-wrap.open{color:var(--ae-primary-color)!important;margin-bottom:20px}.nevysha-scripts{border-left:2px solid var(--secondary-accent-color)!important;background-color:var(--background-fill-primary);padding:15px;margin-top:-10px!important}.nevysha-script-selected{border-top:2px solid var(--secondary-accent-color)!important;border-left:2px solid var(--secondary-accent-color)!important;border-image:linear-gradient(to right,var(--secondary-accent-color) 100px,var(--block-background-fill) 70%) 1;color:var(--ae-primary-color)!important}.nevysha-script-selected label>span{color:var(--ae-primary-color)!important;margin-bottom:20px}.nevysha-script-selected input{color:var(--ae-primary-color)!important}[id$=_prompt_container]{gap:1px!important}.checkboxes-row,.gradio-group{margin-bottom:0!important;margin-top:0!important}.gradio-button.tool{height:3em}.tab-nav>button.selected{border-top:2px solid var(--secondary-accent-color)}.nevysha.settings-wrapper>:not([id$="_toprow"]):not([id$="_script_container"]){padding:5px!important}[id$=_container_aspect_ratio]{padding:5px!important}[id$=_script_container]>div{background-color:var(--block-background-fill)}.nevysha-prompt-tools{align-items:flex-end}.nevysha-interrogate-btn{max-width:55px;height:38px;width:20px;min-width:75px!important}button#interrogate{margin:0 3px 0 5px!important}[id$=_styles_row]{margin-right:5px}[id$=_styles_row] button{padding:0!important}[id$=_styles_row]>div{gap:0!important}#script_list{padding:5px!important}
|
||
`;var Be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Es(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hC={exports:{}};(function(e){(function(){function t(v){var w={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(v===!1)return JSON.parse(JSON.stringify(w));var y={};for(var m in w)w.hasOwnProperty(m)&&(y[m]=w[m].defaultValue);return y}function n(){var v=t(!0),w={};for(var y in v)v.hasOwnProperty(y)&&(w[y]=!0);return w}var r={},i={},o={},s=t(!0),d="vanilla",a={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};r.helper={},r.extensions={},r.setOption=function(v,w){return s[v]=w,this},r.getOption=function(v){return s[v]},r.getOptions=function(){return s},r.resetOptions=function(){s=t(!0)},r.setFlavor=function(v){if(!a.hasOwnProperty(v))throw Error(v+" flavor was not found");r.resetOptions();var w=a[v];d=v;for(var y in w)w.hasOwnProperty(y)&&(s[y]=w[y])},r.getFlavor=function(){return d},r.getFlavorOptions=function(v){if(a.hasOwnProperty(v))return a[v]},r.getDefaultOptions=function(v){return t(v)},r.subParser=function(v,w){if(r.helper.isString(v))if(typeof w<"u")i[v]=w;else{if(i.hasOwnProperty(v))return i[v];throw Error("SubParser named "+v+" not registered!")}},r.extension=function(v,w){if(!r.helper.isString(v))throw Error("Extension 'name' must be a string");if(v=r.helper.stdExtName(v),r.helper.isUndefined(w)){if(!o.hasOwnProperty(v))throw Error("Extension named "+v+" is not registered!");return o[v]}else{typeof w=="function"&&(w=w()),r.helper.isArray(w)||(w=[w]);var y=c(w,v);if(y.valid)o[v]=w;else throw Error(y.error)}},r.getAllExtensions=function(){return o},r.removeExtension=function(v){delete o[v]},r.resetExtensions=function(){o={}};function c(v,w){var y=w?"Error in "+w+" extension->":"Error in unnamed extension",m={valid:!0,error:""};r.helper.isArray(v)||(v=[v]);for(var E=0;E<v.length;++E){var A=y+" sub-extension "+E+": ",C=v[E];if(typeof C!="object")return m.valid=!1,m.error=A+"must be an object, but "+typeof C+" given",m;if(!r.helper.isString(C.type))return m.valid=!1,m.error=A+'property "type" must be a string, but '+typeof C.type+" given",m;var k=C.type=C.type.toLowerCase();if(k==="language"&&(k=C.type="lang"),k==="html"&&(k=C.type="output"),k!=="lang"&&k!=="output"&&k!=="listener")return m.valid=!1,m.error=A+"type "+k+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',m;if(k==="listener"){if(r.helper.isUndefined(C.listeners))return m.valid=!1,m.error=A+'. Extensions of type "listener" must have a property called "listeners"',m}else if(r.helper.isUndefined(C.filter)&&r.helper.isUndefined(C.regex))return m.valid=!1,m.error=A+k+' extensions must define either a "regex" property or a "filter" method',m;if(C.listeners){if(typeof C.listeners!="object")return m.valid=!1,m.error=A+'"listeners" property must be an object but '+typeof C.listeners+" given",m;for(var I in C.listeners)if(C.listeners.hasOwnProperty(I)&&typeof C.listeners[I]!="function")return m.valid=!1,m.error=A+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+I+" must be a function but "+typeof C.listeners[I]+" given",m}if(C.filter){if(typeof C.filter!="function")return m.valid=!1,m.error=A+'"filter" must be a function, but '+typeof C.filter+" given",m}else if(C.regex){if(r.helper.isString(C.regex)&&(C.regex=new RegExp(C.regex,"g")),!(C.regex instanceof RegExp))return m.valid=!1,m.error=A+'"regex" property must either be a string or a RegExp object, but '+typeof C.regex+" given",m;if(r.helper.isUndefined(C.replace))return m.valid=!1,m.error=A+'"regex" extensions must implement a replace string or function',m}}return m}r.validateExtension=function(v){var w=c(v,null);return w.valid?!0:(console.warn(w.error),!1)},r.hasOwnProperty("helper")||(r.helper={}),r.helper.isString=function(v){return typeof v=="string"||v instanceof String},r.helper.isFunction=function(v){var w={};return v&&w.toString.call(v)==="[object Function]"},r.helper.isArray=function(v){return Array.isArray(v)},r.helper.isUndefined=function(v){return typeof v>"u"},r.helper.forEach=function(v,w){if(r.helper.isUndefined(v))throw new Error("obj param is required");if(r.helper.isUndefined(w))throw new Error("callback param is required");if(!r.helper.isFunction(w))throw new Error("callback param must be a function/closure");if(typeof v.forEach=="function")v.forEach(w);else if(r.helper.isArray(v))for(var y=0;y<v.length;y++)w(v[y],y,v);else if(typeof v=="object")for(var m in v)v.hasOwnProperty(m)&&w(v[m],m,v);else throw new Error("obj does not seem to be an array or an iterable object")},r.helper.stdExtName=function(v){return v.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()};function l(v,w){var y=w.charCodeAt(0);return"¨E"+y+"E"}r.helper.escapeCharactersCallback=l,r.helper.escapeCharacters=function(v,w,y){var m="(["+w.replace(/([\[\]\\])/g,"\\$1")+"])";y&&(m="\\\\"+m);var E=new RegExp(m,"g");return v=v.replace(E,l),v},r.helper.unescapeHTMLEntities=function(v){return v.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")};var u=function(v,w,y,m){var E=m||"",A=E.indexOf("g")>-1,C=new RegExp(w+"|"+y,"g"+E.replace(/g/g,"")),k=new RegExp(w,E.replace(/g/g,"")),I=[],R,M,O,P,N;do for(R=0;O=C.exec(v);)if(k.test(O[0]))R++||(M=C.lastIndex,P=M-O[0].length);else if(R&&!--R){N=O.index+O[0].length;var B={left:{start:P,end:M},match:{start:M,end:O.index},right:{start:O.index,end:N},wholeMatch:{start:P,end:N}};if(I.push(B),!A)return I}while(R&&(C.lastIndex=M));return I};r.helper.matchRecursiveRegExp=function(v,w,y,m){for(var E=u(v,w,y,m),A=[],C=0;C<E.length;++C)A.push([v.slice(E[C].wholeMatch.start,E[C].wholeMatch.end),v.slice(E[C].match.start,E[C].match.end),v.slice(E[C].left.start,E[C].left.end),v.slice(E[C].right.start,E[C].right.end)]);return A},r.helper.replaceRecursiveRegExp=function(v,w,y,m,E){if(!r.helper.isFunction(w)){var A=w;w=function(){return A}}var C=u(v,y,m,E),k=v,I=C.length;if(I>0){var R=[];C[0].wholeMatch.start!==0&&R.push(v.slice(0,C[0].wholeMatch.start));for(var M=0;M<I;++M)R.push(w(v.slice(C[M].wholeMatch.start,C[M].wholeMatch.end),v.slice(C[M].match.start,C[M].match.end),v.slice(C[M].left.start,C[M].left.end),v.slice(C[M].right.start,C[M].right.end))),M<I-1&&R.push(v.slice(C[M].wholeMatch.end,C[M+1].wholeMatch.start));C[I-1].wholeMatch.end<v.length&&R.push(v.slice(C[I-1].wholeMatch.end)),k=R.join("")}return k},r.helper.regexIndexOf=function(v,w,y){if(!r.helper.isString(v))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(!(w instanceof RegExp))throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var m=v.substring(y||0).search(w);return m>=0?m+(y||0):m},r.helper.splitAtIndex=function(v,w){if(!r.helper.isString(v))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[v.substring(0,w),v.substring(w)]},r.helper.encodeEmailAddress=function(v){var w=[function(y){return"&#"+y.charCodeAt(0)+";"},function(y){return"&#x"+y.charCodeAt(0).toString(16)+";"},function(y){return y}];return v=v.replace(/./g,function(y){if(y==="@")y=w[Math.floor(Math.random()*2)](y);else{var m=Math.random();y=m>.9?w[2](y):m>.45?w[1](y):w[0](y)}return y}),v},r.helper.padEnd=function(w,y,m){return y=y>>0,m=String(m||" "),w.length>y?String(w):(y=y-w.length,y>m.length&&(m+=m.repeat(y/m.length)),String(w)+m.slice(0,y))},typeof console>"u"&&(console={warn:function(v){alert(v)},log:function(v){alert(v)},error:function(v){throw v}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:`<span style="font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;">S</span>`},r.Converter=function(v){var w={},y=[],m=[],E={},A=d,C={parsed:{},raw:"",format:""};k();function k(){v=v||{};for(var P in s)s.hasOwnProperty(P)&&(w[P]=s[P]);if(typeof v=="object")for(var N in v)v.hasOwnProperty(N)&&(w[N]=v[N]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof v+" was passed instead.");w.extensions&&r.helper.forEach(w.extensions,I)}function I(P,N){if(N=N||null,r.helper.isString(P))if(P=r.helper.stdExtName(P),N=P,r.extensions[P]){console.warn("DEPRECATION WARNING: "+P+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),R(r.extensions[P],P);return}else if(!r.helper.isUndefined(o[P]))P=o[P];else throw Error('Extension "'+P+'" could not be loaded. It was either not found or is not a valid extension.');typeof P=="function"&&(P=P()),r.helper.isArray(P)||(P=[P]);var B=c(P,N);if(!B.valid)throw Error(B.error);for(var W=0;W<P.length;++W){switch(P[W].type){case"lang":y.push(P[W]);break;case"output":m.push(P[W]);break}if(P[W].hasOwnProperty("listeners"))for(var K in P[W].listeners)P[W].listeners.hasOwnProperty(K)&&M(K,P[W].listeners[K])}}function R(P,N){typeof P=="function"&&(P=P(new r.Converter)),r.helper.isArray(P)||(P=[P]);var B=c(P,N);if(!B.valid)throw Error(B.error);for(var W=0;W<P.length;++W)switch(P[W].type){case"lang":y.push(P[W]);break;case"output":m.push(P[W]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}function M(P,N){if(!r.helper.isString(P))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof P+" given");if(typeof N!="function")throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof N+" given");E.hasOwnProperty(P)||(E[P]=[]),E[P].push(N)}function O(P){var N=P.match(/^\s*/)[0].length,B=new RegExp("^\\s{0,"+N+"}","gm");return P.replace(B,"")}this._dispatch=function(N,B,W,K){if(E.hasOwnProperty(N))for(var q=0;q<E[N].length;++q){var re=E[N][q](N,B,this,W,K);re&&typeof re<"u"&&(B=re)}return B},this.listen=function(P,N){return M(P,N),this},this.makeHtml=function(P){if(!P)return P;var N={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:y,outputModifiers:m,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return P=P.replace(/¨/g,"¨T"),P=P.replace(/\$/g,"¨D"),P=P.replace(/\r\n/g,`
|
||
`),P=P.replace(/\r/g,`
|
||
`),P=P.replace(/\u00A0/g," "),w.smartIndentationFix&&(P=O(P)),P=`
|
||
|
||
`+P+`
|
||
|
||
`,P=r.subParser("detab")(P,w,N),P=P.replace(/^[ \t]+$/mg,""),r.helper.forEach(y,function(B){P=r.subParser("runExtension")(B,P,w,N)}),P=r.subParser("metadata")(P,w,N),P=r.subParser("hashPreCodeTags")(P,w,N),P=r.subParser("githubCodeBlocks")(P,w,N),P=r.subParser("hashHTMLBlocks")(P,w,N),P=r.subParser("hashCodeTags")(P,w,N),P=r.subParser("stripLinkDefinitions")(P,w,N),P=r.subParser("blockGamut")(P,w,N),P=r.subParser("unhashHTMLSpans")(P,w,N),P=r.subParser("unescapeSpecialChars")(P,w,N),P=P.replace(/¨D/g,"$$"),P=P.replace(/¨T/g,"¨"),P=r.subParser("completeHTMLDocument")(P,w,N),r.helper.forEach(m,function(B){P=r.subParser("runExtension")(B,P,w,N)}),C=N.metadata,P},this.makeMarkdown=this.makeMd=function(P,N){if(P=P.replace(/\r\n/g,`
|
||
`),P=P.replace(/\r/g,`
|
||
`),P=P.replace(/>[ \t]+</,">¨NBSP;<"),!N)if(window&&window.document)N=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var B=N.createElement("div");B.innerHTML=P;var W={preList:Z(B)};Y(B);for(var K=B.childNodes,q="",re=0;re<K.length;re++)q+=r.subParser("makeMarkdown.node")(K[re],W);function Y(te){for(var ie=0;ie<te.childNodes.length;++ie){var ce=te.childNodes[ie];ce.nodeType===3?!/\S/.test(ce.nodeValue)&&!/^[ ]+$/.test(ce.nodeValue)?(te.removeChild(ce),--ie):(ce.nodeValue=ce.nodeValue.split(`
|
||
`).join(" "),ce.nodeValue=ce.nodeValue.replace(/(\s)+/g,"$1")):ce.nodeType===1&&Y(ce)}}function Z(te){for(var ie=te.querySelectorAll("pre"),ce=[],he=0;he<ie.length;++he)if(ie[he].childElementCount===1&&ie[he].firstChild.tagName.toLowerCase()==="code"){var ve=ie[he].firstChild.innerHTML.trim(),Ce=ie[he].firstChild.getAttribute("data-language")||"";if(Ce==="")for(var _e=ie[he].firstChild.className.split(" "),Re=0;Re<_e.length;++Re){var ot=_e[Re].match(/^language-(.+)$/);if(ot!==null){Ce=ot[1];break}}ve=r.helper.unescapeHTMLEntities(ve),ce.push(ve),ie[he].outerHTML='<precode language="'+Ce+'" precodenum="'+he.toString()+'"></precode>'}else ce.push(ie[he].innerHTML),ie[he].innerHTML="",ie[he].setAttribute("prenum",he.toString());return ce}return q},this.setOption=function(P,N){w[P]=N},this.getOption=function(P){return w[P]},this.getOptions=function(){return w},this.addExtension=function(P,N){N=N||null,I(P,N)},this.useExtension=function(P){I(P)},this.setFlavor=function(P){if(!a.hasOwnProperty(P))throw Error(P+" flavor was not found");var N=a[P];A=P;for(var B in N)N.hasOwnProperty(B)&&(w[B]=N[B])},this.getFlavor=function(){return A},this.removeExtension=function(P){r.helper.isArray(P)||(P=[P]);for(var N=0;N<P.length;++N){for(var B=P[N],W=0;W<y.length;++W)y[W]===B&&y.splice(W,1);for(var K=0;K<m.length;++K)m[K]===B&&m.splice(K,1)}},this.getAllExtensions=function(){return{language:y,output:m}},this.getMetadata=function(P){return P?C.raw:C.parsed},this.getMetadataFormat=function(){return C.format},this._setMetadataPair=function(P,N){C.parsed[P]=N},this._setMetadataFormat=function(P){C.format=P},this._setMetadataRaw=function(P){C.raw=P}},r.subParser("anchors",function(v,w,y){v=y.converter._dispatch("anchors.before",v,w,y);var m=function(E,A,C,k,I,R,M){if(r.helper.isUndefined(M)&&(M=""),C=C.toLowerCase(),E.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)k="";else if(!k)if(C||(C=A.toLowerCase().replace(/ ?\n/g," ")),k="#"+C,!r.helper.isUndefined(y.gUrls[C]))k=y.gUrls[C],r.helper.isUndefined(y.gTitles[C])||(M=y.gTitles[C]);else return E;k=k.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var O='<a href="'+k+'"';return M!==""&&M!==null&&(M=M.replace(/"/g,"""),M=M.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),O+=' title="'+M+'"'),w.openLinksInNewWindow&&!/^#/.test(k)&&(O+=' rel="noopener noreferrer" target="¨E95Eblank"'),O+=">"+A+"</a>",O};return v=v.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,m),v=v.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,m),v=v.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,m),v=v.replace(/\[([^\[\]]+)]()()()()()/g,m),w.ghMentions&&(v=v.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(E,A,C,k,I){if(C==="\\")return A+k;if(!r.helper.isString(w.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var R=w.ghMentionsLink.replace(/\{u}/g,I),M="";return w.openLinksInNewWindow&&(M=' rel="noopener noreferrer" target="¨E95Eblank"'),A+'<a href="'+R+'"'+M+">"+k+"</a>"})),v=y.converter._dispatch("anchors.after",v,w,y),v});var h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,p=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,g=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,b=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,x=function(v){return function(w,y,m,E,A,C,k){m=m.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var I=m,R="",M="",O=y||"",P=k||"";return/^www\./i.test(m)&&(m=m.replace(/^www\./i,"http://www.")),v.excludeTrailingPunctuationFromURLs&&C&&(R=C),v.openLinksInNewWindow&&(M=' rel="noopener noreferrer" target="¨E95Eblank"'),O+'<a href="'+m+'"'+M+">"+I+"</a>"+R+P}},S=function(v,w){return function(y,m,E){var A="mailto:";return m=m||"",E=r.subParser("unescapeSpecialChars")(E,v,w),v.encodeEmails?(A=r.helper.encodeEmailAddress(A+E),E=r.helper.encodeEmailAddress(E)):A=A+E,m+'<a href="'+A+'">'+E+"</a>"}};r.subParser("autoLinks",function(v,w,y){return v=y.converter._dispatch("autoLinks.before",v,w,y),v=v.replace(p,x(w)),v=v.replace(b,S(w,y)),v=y.converter._dispatch("autoLinks.after",v,w,y),v}),r.subParser("simplifiedAutoLinks",function(v,w,y){return w.simplifiedAutoLink&&(v=y.converter._dispatch("simplifiedAutoLinks.before",v,w,y),w.excludeTrailingPunctuationFromURLs?v=v.replace(f,x(w)):v=v.replace(h,x(w)),v=v.replace(g,S(w,y)),v=y.converter._dispatch("simplifiedAutoLinks.after",v,w,y)),v}),r.subParser("blockGamut",function(v,w,y){return v=y.converter._dispatch("blockGamut.before",v,w,y),v=r.subParser("blockQuotes")(v,w,y),v=r.subParser("headers")(v,w,y),v=r.subParser("horizontalRule")(v,w,y),v=r.subParser("lists")(v,w,y),v=r.subParser("codeBlocks")(v,w,y),v=r.subParser("tables")(v,w,y),v=r.subParser("hashHTMLBlocks")(v,w,y),v=r.subParser("paragraphs")(v,w,y),v=y.converter._dispatch("blockGamut.after",v,w,y),v}),r.subParser("blockQuotes",function(v,w,y){v=y.converter._dispatch("blockQuotes.before",v,w,y),v=v+`
|
||
|
||
`;var m=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return w.splitAdjacentBlockquotes&&(m=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),v=v.replace(m,function(E){return E=E.replace(/^[ \t]*>[ \t]?/gm,""),E=E.replace(/¨0/g,""),E=E.replace(/^[ \t]+$/gm,""),E=r.subParser("githubCodeBlocks")(E,w,y),E=r.subParser("blockGamut")(E,w,y),E=E.replace(/(^|\n)/g,"$1 "),E=E.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(A,C){var k=C;return k=k.replace(/^ /mg,"¨0"),k=k.replace(/¨0/g,""),k}),r.subParser("hashBlock")(`<blockquote>
|
||
`+E+`
|
||
</blockquote>`,w,y)}),v=y.converter._dispatch("blockQuotes.after",v,w,y),v}),r.subParser("codeBlocks",function(v,w,y){v=y.converter._dispatch("codeBlocks.before",v,w,y),v+="¨0";var m=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return v=v.replace(m,function(E,A,C){var k=A,I=C,R=`
|
||
`;return k=r.subParser("outdent")(k,w,y),k=r.subParser("encodeCode")(k,w,y),k=r.subParser("detab")(k,w,y),k=k.replace(/^\n+/g,""),k=k.replace(/\n+$/g,""),w.omitExtraWLInCodeBlocks&&(R=""),k="<pre><code>"+k+R+"</code></pre>",r.subParser("hashBlock")(k,w,y)+I}),v=v.replace(/¨0/,""),v=y.converter._dispatch("codeBlocks.after",v,w,y),v}),r.subParser("codeSpans",function(v,w,y){return v=y.converter._dispatch("codeSpans.before",v,w,y),typeof v>"u"&&(v=""),v=v.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(m,E,A,C){var k=C;return k=k.replace(/^([ \t]*)/g,""),k=k.replace(/[ \t]*$/g,""),k=r.subParser("encodeCode")(k,w,y),k=E+"<code>"+k+"</code>",k=r.subParser("hashHTMLSpans")(k,w,y),k}),v=y.converter._dispatch("codeSpans.after",v,w,y),v}),r.subParser("completeHTMLDocument",function(v,w,y){if(!w.completeHTMLDocument)return v;v=y.converter._dispatch("completeHTMLDocument.before",v,w,y);var m="html",E=`<!DOCTYPE HTML>
|
||
`,A="",C=`<meta charset="utf-8">
|
||
`,k="",I="";typeof y.metadata.parsed.doctype<"u"&&(E="<!DOCTYPE "+y.metadata.parsed.doctype+`>
|
||
`,m=y.metadata.parsed.doctype.toString().toLowerCase(),(m==="html"||m==="html5")&&(C='<meta charset="utf-8">'));for(var R in y.metadata.parsed)if(y.metadata.parsed.hasOwnProperty(R))switch(R.toLowerCase()){case"doctype":break;case"title":A="<title>"+y.metadata.parsed.title+`</title>
|
||
`;break;case"charset":m==="html"||m==="html5"?C='<meta charset="'+y.metadata.parsed.charset+`">
|
||
`:C='<meta name="charset" content="'+y.metadata.parsed.charset+`">
|
||
`;break;case"language":case"lang":k=' lang="'+y.metadata.parsed[R]+'"',I+='<meta name="'+R+'" content="'+y.metadata.parsed[R]+`">
|
||
`;break;default:I+='<meta name="'+R+'" content="'+y.metadata.parsed[R]+`">
|
||
`}return v=E+"<html"+k+`>
|
||
<head>
|
||
`+A+C+I+`</head>
|
||
<body>
|
||
`+v.trim()+`
|
||
</body>
|
||
</html>`,v=y.converter._dispatch("completeHTMLDocument.after",v,w,y),v}),r.subParser("detab",function(v,w,y){return v=y.converter._dispatch("detab.before",v,w,y),v=v.replace(/\t(?=\t)/g," "),v=v.replace(/\t/g,"¨A¨B"),v=v.replace(/¨B(.+?)¨A/g,function(m,E){for(var A=E,C=4-A.length%4,k=0;k<C;k++)A+=" ";return A}),v=v.replace(/¨A/g," "),v=v.replace(/¨B/g,""),v=y.converter._dispatch("detab.after",v,w,y),v}),r.subParser("ellipsis",function(v,w,y){return w.ellipsis&&(v=y.converter._dispatch("ellipsis.before",v,w,y),v=v.replace(/\.\.\./g,"…"),v=y.converter._dispatch("ellipsis.after",v,w,y)),v}),r.subParser("emoji",function(v,w,y){if(!w.emoji)return v;v=y.converter._dispatch("emoji.before",v,w,y);var m=/:([\S]+?):/g;return v=v.replace(m,function(E,A){return r.helper.emojis.hasOwnProperty(A)?r.helper.emojis[A]:E}),v=y.converter._dispatch("emoji.after",v,w,y),v}),r.subParser("encodeAmpsAndAngles",function(v,w,y){return v=y.converter._dispatch("encodeAmpsAndAngles.before",v,w,y),v=v.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),v=v.replace(/<(?![a-z\/?$!])/gi,"<"),v=v.replace(/</g,"<"),v=v.replace(/>/g,">"),v=y.converter._dispatch("encodeAmpsAndAngles.after",v,w,y),v}),r.subParser("encodeBackslashEscapes",function(v,w,y){return v=y.converter._dispatch("encodeBackslashEscapes.before",v,w,y),v=v.replace(/\\(\\)/g,r.helper.escapeCharactersCallback),v=v.replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,r.helper.escapeCharactersCallback),v=y.converter._dispatch("encodeBackslashEscapes.after",v,w,y),v}),r.subParser("encodeCode",function(v,w,y){return v=y.converter._dispatch("encodeCode.before",v,w,y),v=v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/([*_{}\[\]\\=~-])/g,r.helper.escapeCharactersCallback),v=y.converter._dispatch("encodeCode.after",v,w,y),v}),r.subParser("escapeSpecialCharsWithinTagAttributes",function(v,w,y){v=y.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",v,w,y);var m=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,E=/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return v=v.replace(m,function(A){return A.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),v=v.replace(E,function(A){return A.replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),v=y.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",v,w,y),v}),r.subParser("githubCodeBlocks",function(v,w,y){return w.ghCodeBlocks?(v=y.converter._dispatch("githubCodeBlocks.before",v,w,y),v+="¨0",v=v.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(m,E,A,C){var k=w.omitExtraWLInCodeBlocks?"":`
|
||
`;return C=r.subParser("encodeCode")(C,w,y),C=r.subParser("detab")(C,w,y),C=C.replace(/^\n+/g,""),C=C.replace(/\n+$/g,""),C="<pre><code"+(A?' class="'+A+" language-"+A+'"':"")+">"+C+k+"</code></pre>",C=r.subParser("hashBlock")(C,w,y),`
|
||
|
||
¨G`+(y.ghCodeBlocks.push({text:m,codeblock:C})-1)+`G
|
||
|
||
`}),v=v.replace(/¨0/,""),y.converter._dispatch("githubCodeBlocks.after",v,w,y)):v}),r.subParser("hashBlock",function(v,w,y){return v=y.converter._dispatch("hashBlock.before",v,w,y),v=v.replace(/(^\n+|\n+$)/g,""),v=`
|
||
|
||
¨K`+(y.gHtmlBlocks.push(v)-1)+`K
|
||
|
||
`,v=y.converter._dispatch("hashBlock.after",v,w,y),v}),r.subParser("hashCodeTags",function(v,w,y){v=y.converter._dispatch("hashCodeTags.before",v,w,y);var m=function(E,A,C,k){var I=C+r.subParser("encodeCode")(A,w,y)+k;return"¨C"+(y.gHtmlSpans.push(I)-1)+"C"};return v=r.helper.replaceRecursiveRegExp(v,m,"<code\\b[^>]*>","</code>","gim"),v=y.converter._dispatch("hashCodeTags.after",v,w,y),v}),r.subParser("hashElement",function(v,w,y){return function(m,E){var A=E;return A=A.replace(/\n\n/g,`
|
||
`),A=A.replace(/^\n/,""),A=A.replace(/\n+$/g,""),A=`
|
||
|
||
¨K`+(y.gHtmlBlocks.push(A)-1)+`K
|
||
|
||
`,A}}),r.subParser("hashHTMLBlocks",function(v,w,y){v=y.converter._dispatch("hashHTMLBlocks.before",v,w,y);var m=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],E=function(P,N,B,W){var K=P;return B.search(/\bmarkdown\b/)!==-1&&(K=B+y.converter.makeHtml(N)+W),`
|
||
|
||
¨K`+(y.gHtmlBlocks.push(K)-1)+`K
|
||
|
||
`};w.backslashEscapesHTMLTags&&(v=v.replace(/\\<(\/?[^>]+?)>/g,function(P,N){return"<"+N+">"}));for(var A=0;A<m.length;++A)for(var C,k=new RegExp("^ {0,3}(<"+m[A]+"\\b[^>]*>)","im"),I="<"+m[A]+"\\b[^>]*>",R="</"+m[A]+">";(C=r.helper.regexIndexOf(v,k))!==-1;){var M=r.helper.splitAtIndex(v,C),O=r.helper.replaceRecursiveRegExp(M[1],E,I,R,"im");if(O===M[1])break;v=M[0].concat(O)}return v=v.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(v,w,y)),v=r.helper.replaceRecursiveRegExp(v,function(P){return`
|
||
|
||
¨K`+(y.gHtmlBlocks.push(P)-1)+`K
|
||
|
||
`},"^ {0,3}<!--","-->","gm"),v=v.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(v,w,y)),v=y.converter._dispatch("hashHTMLBlocks.after",v,w,y),v}),r.subParser("hashHTMLSpans",function(v,w,y){v=y.converter._dispatch("hashHTMLSpans.before",v,w,y);function m(E){return"¨C"+(y.gHtmlSpans.push(E)-1)+"C"}return v=v.replace(/<[^>]+?\/>/gi,function(E){return m(E)}),v=v.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(E){return m(E)}),v=v.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(E){return m(E)}),v=v.replace(/<[^>]+?>/gi,function(E){return m(E)}),v=y.converter._dispatch("hashHTMLSpans.after",v,w,y),v}),r.subParser("unhashHTMLSpans",function(v,w,y){v=y.converter._dispatch("unhashHTMLSpans.before",v,w,y);for(var m=0;m<y.gHtmlSpans.length;++m){for(var E=y.gHtmlSpans[m],A=0;/¨C(\d+)C/.test(E);){var C=RegExp.$1;if(E=E.replace("¨C"+C+"C",y.gHtmlSpans[C]),A===10){console.error("maximum nesting of 10 spans reached!!!");break}++A}v=v.replace("¨C"+m+"C",E)}return v=y.converter._dispatch("unhashHTMLSpans.after",v,w,y),v}),r.subParser("hashPreCodeTags",function(v,w,y){v=y.converter._dispatch("hashPreCodeTags.before",v,w,y);var m=function(E,A,C,k){var I=C+r.subParser("encodeCode")(A,w,y)+k;return`
|
||
|
||
¨G`+(y.ghCodeBlocks.push({text:E,codeblock:I})-1)+`G
|
||
|
||
`};return v=r.helper.replaceRecursiveRegExp(v,m,"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),v=y.converter._dispatch("hashPreCodeTags.after",v,w,y),v}),r.subParser("headers",function(v,w,y){v=y.converter._dispatch("headers.before",v,w,y);var m=isNaN(parseInt(w.headerLevelStart))?1:parseInt(w.headerLevelStart),E=w.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,A=w.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;v=v.replace(E,function(I,R){var M=r.subParser("spanGamut")(R,w,y),O=w.noHeaderId?"":' id="'+k(R)+'"',P=m,N="<h"+P+O+">"+M+"</h"+P+">";return r.subParser("hashBlock")(N,w,y)}),v=v.replace(A,function(I,R){var M=r.subParser("spanGamut")(R,w,y),O=w.noHeaderId?"":' id="'+k(R)+'"',P=m+1,N="<h"+P+O+">"+M+"</h"+P+">";return r.subParser("hashBlock")(N,w,y)});var C=w.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;v=v.replace(C,function(I,R,M){var O=M;w.customizedHeaderId&&(O=M.replace(/\s?\{([^{]+?)}\s*$/,""));var P=r.subParser("spanGamut")(O,w,y),N=w.noHeaderId?"":' id="'+k(M)+'"',B=m-1+R.length,W="<h"+B+N+">"+P+"</h"+B+">";return r.subParser("hashBlock")(W,w,y)});function k(I){var R,M;if(w.customizedHeaderId){var O=I.match(/\{([^{]+?)}\s*$/);O&&O[1]&&(I=O[1])}return R=I,r.helper.isString(w.prefixHeaderId)?M=w.prefixHeaderId:w.prefixHeaderId===!0?M="section-":M="",w.rawPrefixHeaderId||(R=M+R),w.ghCompatibleHeaderId?R=R.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():w.rawHeaderId?R=R.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():R=R.replace(/[^\w]/g,"").toLowerCase(),w.rawPrefixHeaderId&&(R=M+R),y.hashLinkCounts[R]?R=R+"-"+y.hashLinkCounts[R]++:y.hashLinkCounts[R]=1,R}return v=y.converter._dispatch("headers.after",v,w,y),v}),r.subParser("horizontalRule",function(v,w,y){v=y.converter._dispatch("horizontalRule.before",v,w,y);var m=r.subParser("hashBlock")("<hr />",w,y);return v=v.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,m),v=v.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,m),v=v.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,m),v=y.converter._dispatch("horizontalRule.after",v,w,y),v}),r.subParser("images",function(v,w,y){v=y.converter._dispatch("images.before",v,w,y);var m=/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,E=/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,A=/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,C=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,k=/!\[([^\[\]]+)]()()()()()/g;function I(M,O,P,N,B,W,K,q){return N=N.replace(/\s/g,""),R(M,O,P,N,B,W,K,q)}function R(M,O,P,N,B,W,K,q){var re=y.gUrls,Y=y.gTitles,Z=y.gDimensions;if(P=P.toLowerCase(),q||(q=""),M.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)N="";else if(N===""||N===null)if((P===""||P===null)&&(P=O.toLowerCase().replace(/ ?\n/g," ")),N="#"+P,!r.helper.isUndefined(re[P]))N=re[P],r.helper.isUndefined(Y[P])||(q=Y[P]),r.helper.isUndefined(Z[P])||(B=Z[P].width,W=Z[P].height);else return M;O=O.replace(/"/g,""").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),N=N.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var te='<img src="'+N+'" alt="'+O+'"';return q&&r.helper.isString(q)&&(q=q.replace(/"/g,""").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),te+=' title="'+q+'"'),B&&W&&(B=B==="*"?"auto":B,W=W==="*"?"auto":W,te+=' width="'+B+'"',te+=' height="'+W+'"'),te+=" />",te}return v=v.replace(C,R),v=v.replace(A,I),v=v.replace(E,R),v=v.replace(m,R),v=v.replace(k,R),v=y.converter._dispatch("images.after",v,w,y),v}),r.subParser("italicsAndBold",function(v,w,y){v=y.converter._dispatch("italicsAndBold.before",v,w,y);function m(E,A,C){return A+E+C}return w.literalMidWordUnderscores?(v=v.replace(/\b___(\S[\s\S]*?)___\b/g,function(E,A){return m(A,"<strong><em>","</em></strong>")}),v=v.replace(/\b__(\S[\s\S]*?)__\b/g,function(E,A){return m(A,"<strong>","</strong>")}),v=v.replace(/\b_(\S[\s\S]*?)_\b/g,function(E,A){return m(A,"<em>","</em>")})):(v=v.replace(/___(\S[\s\S]*?)___/g,function(E,A){return/\S$/.test(A)?m(A,"<strong><em>","</em></strong>"):E}),v=v.replace(/__(\S[\s\S]*?)__/g,function(E,A){return/\S$/.test(A)?m(A,"<strong>","</strong>"):E}),v=v.replace(/_([^\s_][\s\S]*?)_/g,function(E,A){return/\S$/.test(A)?m(A,"<em>","</em>"):E})),w.literalMidWordAsterisks?(v=v.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(E,A,C){return m(C,A+"<strong><em>","</em></strong>")}),v=v.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(E,A,C){return m(C,A+"<strong>","</strong>")}),v=v.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(E,A,C){return m(C,A+"<em>","</em>")})):(v=v.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(E,A){return/\S$/.test(A)?m(A,"<strong><em>","</em></strong>"):E}),v=v.replace(/\*\*(\S[\s\S]*?)\*\*/g,function(E,A){return/\S$/.test(A)?m(A,"<strong>","</strong>"):E}),v=v.replace(/\*([^\s*][\s\S]*?)\*/g,function(E,A){return/\S$/.test(A)?m(A,"<em>","</em>"):E})),v=y.converter._dispatch("italicsAndBold.after",v,w,y),v}),r.subParser("lists",function(v,w,y){function m(C,k){y.gListLevel++,C=C.replace(/\n{2,}$/,`
|
||
`),C+="¨0";var I=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,R=/\n[ \t]*\n(?!¨0)/.test(C);return w.disableForced4SpacesIndentedSublists&&(I=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),C=C.replace(I,function(M,O,P,N,B,W,K){K=K&&K.trim()!=="";var q=r.subParser("outdent")(B,w,y),re="";return W&&w.tasklists&&(re=' class="task-list-item" style="list-style-type: none;"',q=q.replace(/^[ \t]*\[(x|X| )?]/m,function(){var Y='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return K&&(Y+=" checked"),Y+=">",Y})),q=q.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(Y){return"¨A"+Y}),O||q.search(/\n{2,}/)>-1?(q=r.subParser("githubCodeBlocks")(q,w,y),q=r.subParser("blockGamut")(q,w,y)):(q=r.subParser("lists")(q,w,y),q=q.replace(/\n$/,""),q=r.subParser("hashHTMLBlocks")(q,w,y),q=q.replace(/\n\n+/g,`
|
||
|
||
`),R?q=r.subParser("paragraphs")(q,w,y):q=r.subParser("spanGamut")(q,w,y)),q=q.replace("¨A",""),q="<li"+re+">"+q+`</li>
|
||
`,q}),C=C.replace(/¨0/g,""),y.gListLevel--,k&&(C=C.replace(/\s+$/,"")),C}function E(C,k){if(k==="ol"){var I=C.match(/^ *(\d+)\./);if(I&&I[1]!=="1")return' start="'+I[1]+'"'}return""}function A(C,k,I){var R=w.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,M=w.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,O=k==="ul"?R:M,P="";if(C.search(O)!==-1)(function B(W){var K=W.search(O),q=E(C,k);K!==-1?(P+=`
|
||
|
||
<`+k+q+`>
|
||
`+m(W.slice(0,K),!!I)+"</"+k+`>
|
||
`,k=k==="ul"?"ol":"ul",O=k==="ul"?R:M,B(W.slice(K))):P+=`
|
||
|
||
<`+k+q+`>
|
||
`+m(W,!!I)+"</"+k+`>
|
||
`})(C);else{var N=E(C,k);P=`
|
||
|
||
<`+k+N+`>
|
||
`+m(C,!!I)+"</"+k+`>
|
||
`}return P}return v=y.converter._dispatch("lists.before",v,w,y),v+="¨0",y.gListLevel?v=v.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,k,I){var R=I.search(/[*+-]/g)>-1?"ul":"ol";return A(k,R,!0)}):v=v.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,k,I,R){var M=R.search(/[*+-]/g)>-1?"ul":"ol";return A(I,M,!1)}),v=v.replace(/¨0/,""),v=y.converter._dispatch("lists.after",v,w,y),v}),r.subParser("metadata",function(v,w,y){if(!w.metadata)return v;v=y.converter._dispatch("metadata.before",v,w,y);function m(E){y.metadata.raw=E,E=E.replace(/&/g,"&").replace(/"/g,"""),E=E.replace(/\n {4}/g," "),E.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(A,C,k){return y.metadata.parsed[C]=k,""})}return v=v.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(E,A,C){return m(C),"¨M"}),v=v.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(E,A,C){return A&&(y.metadata.format=A),m(C),"¨M"}),v=v.replace(/¨M/g,""),v=y.converter._dispatch("metadata.after",v,w,y),v}),r.subParser("outdent",function(v,w,y){return v=y.converter._dispatch("outdent.before",v,w,y),v=v.replace(/^(\t|[ ]{1,4})/gm,"¨0"),v=v.replace(/¨0/g,""),v=y.converter._dispatch("outdent.after",v,w,y),v}),r.subParser("paragraphs",function(v,w,y){v=y.converter._dispatch("paragraphs.before",v,w,y),v=v.replace(/^\n+/g,""),v=v.replace(/\n+$/g,"");for(var m=v.split(/\n{2,}/g),E=[],A=m.length,C=0;C<A;C++){var k=m[C];k.search(/¨(K|G)(\d+)\1/g)>=0?E.push(k):k.search(/\S/)>=0&&(k=r.subParser("spanGamut")(k,w,y),k=k.replace(/^([ \t]*)/g,"<p>"),k+="</p>",E.push(k))}for(A=E.length,C=0;C<A;C++){for(var I="",R=E[C],M=!1;/¨(K|G)(\d+)\1/.test(R);){var O=RegExp.$1,P=RegExp.$2;O==="K"?I=y.gHtmlBlocks[P]:M?I=r.subParser("encodeCode")(y.ghCodeBlocks[P].text,w,y):I=y.ghCodeBlocks[P].codeblock,I=I.replace(/\$/g,"$$$$"),R=R.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,I),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(R)&&(M=!0)}E[C]=R}return v=E.join(`
|
||
`),v=v.replace(/^\n+/g,""),v=v.replace(/\n+$/g,""),y.converter._dispatch("paragraphs.after",v,w,y)}),r.subParser("runExtension",function(v,w,y,m){if(v.filter)w=v.filter(w,m.converter,y);else if(v.regex){var E=v.regex;E instanceof RegExp||(E=new RegExp(E,"g")),w=w.replace(E,v.replace)}return w}),r.subParser("spanGamut",function(v,w,y){return v=y.converter._dispatch("spanGamut.before",v,w,y),v=r.subParser("codeSpans")(v,w,y),v=r.subParser("escapeSpecialCharsWithinTagAttributes")(v,w,y),v=r.subParser("encodeBackslashEscapes")(v,w,y),v=r.subParser("images")(v,w,y),v=r.subParser("anchors")(v,w,y),v=r.subParser("autoLinks")(v,w,y),v=r.subParser("simplifiedAutoLinks")(v,w,y),v=r.subParser("emoji")(v,w,y),v=r.subParser("underline")(v,w,y),v=r.subParser("italicsAndBold")(v,w,y),v=r.subParser("strikethrough")(v,w,y),v=r.subParser("ellipsis")(v,w,y),v=r.subParser("hashHTMLSpans")(v,w,y),v=r.subParser("encodeAmpsAndAngles")(v,w,y),w.simpleLineBreaks?/\n\n¨K/.test(v)||(v=v.replace(/\n+/g,`<br />
|
||
`)):v=v.replace(/ +\n/g,`<br />
|
||
`),v=y.converter._dispatch("spanGamut.after",v,w,y),v}),r.subParser("strikethrough",function(v,w,y){function m(E){return w.simplifiedAutoLink&&(E=r.subParser("simplifiedAutoLinks")(E,w,y)),"<del>"+E+"</del>"}return w.strikethrough&&(v=y.converter._dispatch("strikethrough.before",v,w,y),v=v.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(E,A){return m(A)}),v=y.converter._dispatch("strikethrough.after",v,w,y)),v}),r.subParser("stripLinkDefinitions",function(v,w,y){var m=/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,E=/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;v+="¨0";var A=function(C,k,I,R,M,O,P){return k=k.toLowerCase(),v.toLowerCase().split(k).length-1<2?C:(I.match(/^data:.+?\/.+?;base64,/)?y.gUrls[k]=I.replace(/\s/g,""):y.gUrls[k]=r.subParser("encodeAmpsAndAngles")(I,w,y),O?O+P:(P&&(y.gTitles[k]=P.replace(/"|'/g,""")),w.parseImgDimensions&&R&&M&&(y.gDimensions[k]={width:R,height:M}),""))};return v=v.replace(E,A),v=v.replace(m,A),v=v.replace(/¨0/,""),v}),r.subParser("tables",function(v,w,y){if(!w.tables)return v;var m=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,E=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;function A(M){return/^:[ \t]*--*$/.test(M)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(M)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(M)?' style="text-align:center;"':""}function C(M,O){var P="";return M=M.trim(),(w.tablesHeaderId||w.tableHeaderId)&&(P=' id="'+M.replace(/ /g,"_").toLowerCase()+'"'),M=r.subParser("spanGamut")(M,w,y),"<th"+P+O+">"+M+`</th>
|
||
`}function k(M,O){var P=r.subParser("spanGamut")(M,w,y);return"<td"+O+">"+P+`</td>
|
||
`}function I(M,O){for(var P=`<table>
|
||
<thead>
|
||
<tr>
|
||
`,N=M.length,B=0;B<N;++B)P+=M[B];for(P+=`</tr>
|
||
</thead>
|
||
<tbody>
|
||
`,B=0;B<O.length;++B){P+=`<tr>
|
||
`;for(var W=0;W<N;++W)P+=O[B][W];P+=`</tr>
|
||
`}return P+=`</tbody>
|
||
</table>
|
||
`,P}function R(M){var O,P=M.split(`
|
||
`);for(O=0;O<P.length;++O)/^ {0,3}\|/.test(P[O])&&(P[O]=P[O].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(P[O])&&(P[O]=P[O].replace(/\|[ \t]*$/,"")),P[O]=r.subParser("codeSpans")(P[O],w,y);var N=P[0].split("|").map(function(te){return te.trim()}),B=P[1].split("|").map(function(te){return te.trim()}),W=[],K=[],q=[],re=[];for(P.shift(),P.shift(),O=0;O<P.length;++O)P[O].trim()!==""&&W.push(P[O].split("|").map(function(te){return te.trim()}));if(N.length<B.length)return M;for(O=0;O<B.length;++O)q.push(A(B[O]));for(O=0;O<N.length;++O)r.helper.isUndefined(q[O])&&(q[O]=""),K.push(C(N[O],q[O]));for(O=0;O<W.length;++O){for(var Y=[],Z=0;Z<K.length;++Z)r.helper.isUndefined(W[O][Z]),Y.push(k(W[O][Z],q[Z]));re.push(Y)}return I(K,re)}return v=y.converter._dispatch("tables.before",v,w,y),v=v.replace(/\\(\|)/g,r.helper.escapeCharactersCallback),v=v.replace(m,R),v=v.replace(E,R),v=y.converter._dispatch("tables.after",v,w,y),v}),r.subParser("underline",function(v,w,y){return w.underline&&(v=y.converter._dispatch("underline.before",v,w,y),w.literalMidWordUnderscores?(v=v.replace(/\b___(\S[\s\S]*?)___\b/g,function(m,E){return"<u>"+E+"</u>"}),v=v.replace(/\b__(\S[\s\S]*?)__\b/g,function(m,E){return"<u>"+E+"</u>"})):(v=v.replace(/___(\S[\s\S]*?)___/g,function(m,E){return/\S$/.test(E)?"<u>"+E+"</u>":m}),v=v.replace(/__(\S[\s\S]*?)__/g,function(m,E){return/\S$/.test(E)?"<u>"+E+"</u>":m})),v=v.replace(/(_)/g,r.helper.escapeCharactersCallback),v=y.converter._dispatch("underline.after",v,w,y)),v}),r.subParser("unescapeSpecialChars",function(v,w,y){return v=y.converter._dispatch("unescapeSpecialChars.before",v,w,y),v=v.replace(/¨E(\d+)E/g,function(m,E){var A=parseInt(E);return String.fromCharCode(A)}),v=y.converter._dispatch("unescapeSpecialChars.after",v,w,y),v}),r.subParser("makeMarkdown.blockquote",function(v,w){var y="";if(v.hasChildNodes())for(var m=v.childNodes,E=m.length,A=0;A<E;++A){var C=r.subParser("makeMarkdown.node")(m[A],w);C!==""&&(y+=C)}return y=y.trim(),y="> "+y.split(`
|
||
`).join(`
|
||
> `),y}),r.subParser("makeMarkdown.codeBlock",function(v,w){var y=v.getAttribute("language"),m=v.getAttribute("precodenum");return"```"+y+`
|
||
`+w.preList[m]+"\n```"}),r.subParser("makeMarkdown.codeSpan",function(v){return"`"+v.innerHTML+"`"}),r.subParser("makeMarkdown.emphasis",function(v,w){var y="";if(v.hasChildNodes()){y+="*";for(var m=v.childNodes,E=m.length,A=0;A<E;++A)y+=r.subParser("makeMarkdown.node")(m[A],w);y+="*"}return y}),r.subParser("makeMarkdown.header",function(v,w,y){var m=new Array(y+1).join("#"),E="";if(v.hasChildNodes()){E=m+" ";for(var A=v.childNodes,C=A.length,k=0;k<C;++k)E+=r.subParser("makeMarkdown.node")(A[k],w)}return E}),r.subParser("makeMarkdown.hr",function(){return"---"}),r.subParser("makeMarkdown.image",function(v){var w="";return v.hasAttribute("src")&&(w+="+">",v.hasAttribute("width")&&v.hasAttribute("height")&&(w+=" ="+v.getAttribute("width")+"x"+v.getAttribute("height")),v.hasAttribute("title")&&(w+=' "'+v.getAttribute("title")+'"'),w+=")"),w}),r.subParser("makeMarkdown.links",function(v,w){var y="";if(v.hasChildNodes()&&v.hasAttribute("href")){var m=v.childNodes,E=m.length;y="[";for(var A=0;A<E;++A)y+=r.subParser("makeMarkdown.node")(m[A],w);y+="](",y+="<"+v.getAttribute("href")+">",v.hasAttribute("title")&&(y+=' "'+v.getAttribute("title")+'"'),y+=")"}return y}),r.subParser("makeMarkdown.list",function(v,w,y){var m="";if(!v.hasChildNodes())return"";for(var E=v.childNodes,A=E.length,C=v.getAttribute("start")||1,k=0;k<A;++k)if(!(typeof E[k].tagName>"u"||E[k].tagName.toLowerCase()!=="li")){var I="";y==="ol"?I=C.toString()+". ":I="- ",m+=I+r.subParser("makeMarkdown.listItem")(E[k],w),++C}return m+=`
|
||
<!-- -->
|
||
`,m.trim()}),r.subParser("makeMarkdown.listItem",function(v,w){for(var y="",m=v.childNodes,E=m.length,A=0;A<E;++A)y+=r.subParser("makeMarkdown.node")(m[A],w);return/\n$/.test(y)?y=y.split(`
|
||
`).join(`
|
||
`).replace(/^ {4}$/gm,"").replace(/\n\n+/g,`
|
||
|
||
`):y+=`
|
||
`,y}),r.subParser("makeMarkdown.node",function(v,w,y){y=y||!1;var m="";if(v.nodeType===3)return r.subParser("makeMarkdown.txt")(v,w);if(v.nodeType===8)return"<!--"+v.data+`-->
|
||
|
||
`;if(v.nodeType!==1)return"";var E=v.tagName.toLowerCase();switch(E){case"h1":y||(m=r.subParser("makeMarkdown.header")(v,w,1)+`
|
||
|
||
`);break;case"h2":y||(m=r.subParser("makeMarkdown.header")(v,w,2)+`
|
||
|
||
`);break;case"h3":y||(m=r.subParser("makeMarkdown.header")(v,w,3)+`
|
||
|
||
`);break;case"h4":y||(m=r.subParser("makeMarkdown.header")(v,w,4)+`
|
||
|
||
`);break;case"h5":y||(m=r.subParser("makeMarkdown.header")(v,w,5)+`
|
||
|
||
`);break;case"h6":y||(m=r.subParser("makeMarkdown.header")(v,w,6)+`
|
||
|
||
`);break;case"p":y||(m=r.subParser("makeMarkdown.paragraph")(v,w)+`
|
||
|
||
`);break;case"blockquote":y||(m=r.subParser("makeMarkdown.blockquote")(v,w)+`
|
||
|
||
`);break;case"hr":y||(m=r.subParser("makeMarkdown.hr")(v,w)+`
|
||
|
||
`);break;case"ol":y||(m=r.subParser("makeMarkdown.list")(v,w,"ol")+`
|
||
|
||
`);break;case"ul":y||(m=r.subParser("makeMarkdown.list")(v,w,"ul")+`
|
||
|
||
`);break;case"precode":y||(m=r.subParser("makeMarkdown.codeBlock")(v,w)+`
|
||
|
||
`);break;case"pre":y||(m=r.subParser("makeMarkdown.pre")(v,w)+`
|
||
|
||
`);break;case"table":y||(m=r.subParser("makeMarkdown.table")(v,w)+`
|
||
|
||
`);break;case"code":m=r.subParser("makeMarkdown.codeSpan")(v,w);break;case"em":case"i":m=r.subParser("makeMarkdown.emphasis")(v,w);break;case"strong":case"b":m=r.subParser("makeMarkdown.strong")(v,w);break;case"del":m=r.subParser("makeMarkdown.strikethrough")(v,w);break;case"a":m=r.subParser("makeMarkdown.links")(v,w);break;case"img":m=r.subParser("makeMarkdown.image")(v,w);break;default:m=v.outerHTML+`
|
||
|
||
`}return m}),r.subParser("makeMarkdown.paragraph",function(v,w){var y="";if(v.hasChildNodes())for(var m=v.childNodes,E=m.length,A=0;A<E;++A)y+=r.subParser("makeMarkdown.node")(m[A],w);return y=y.trim(),y}),r.subParser("makeMarkdown.pre",function(v,w){var y=v.getAttribute("prenum");return"<pre>"+w.preList[y]+"</pre>"}),r.subParser("makeMarkdown.strikethrough",function(v,w){var y="";if(v.hasChildNodes()){y+="~~";for(var m=v.childNodes,E=m.length,A=0;A<E;++A)y+=r.subParser("makeMarkdown.node")(m[A],w);y+="~~"}return y}),r.subParser("makeMarkdown.strong",function(v,w){var y="";if(v.hasChildNodes()){y+="**";for(var m=v.childNodes,E=m.length,A=0;A<E;++A)y+=r.subParser("makeMarkdown.node")(m[A],w);y+="**"}return y}),r.subParser("makeMarkdown.table",function(v,w){var y="",m=[[],[]],E=v.querySelectorAll("thead>tr>th"),A=v.querySelectorAll("tbody>tr"),C,k;for(C=0;C<E.length;++C){var I=r.subParser("makeMarkdown.tableCell")(E[C],w),R="---";if(E[C].hasAttribute("style")){var M=E[C].getAttribute("style").toLowerCase().replace(/\s/g,"");switch(M){case"text-align:left;":R=":---";break;case"text-align:right;":R="---:";break;case"text-align:center;":R=":---:";break}}m[0][C]=I.trim(),m[1][C]=R}for(C=0;C<A.length;++C){var O=m.push([])-1,P=A[C].getElementsByTagName("td");for(k=0;k<E.length;++k){var N=" ";typeof P[k]<"u"&&(N=r.subParser("makeMarkdown.tableCell")(P[k],w)),m[O].push(N)}}var B=3;for(C=0;C<m.length;++C)for(k=0;k<m[C].length;++k){var W=m[C][k].length;W>B&&(B=W)}for(C=0;C<m.length;++C){for(k=0;k<m[C].length;++k)C===1?m[C][k].slice(-1)===":"?m[C][k]=r.helper.padEnd(m[C][k].slice(-1),B-1,"-")+":":m[C][k]=r.helper.padEnd(m[C][k],B,"-"):m[C][k]=r.helper.padEnd(m[C][k],B);y+="| "+m[C].join(" | ")+` |
|
||
`}return y.trim()}),r.subParser("makeMarkdown.tableCell",function(v,w){var y="";if(!v.hasChildNodes())return"";for(var m=v.childNodes,E=m.length,A=0;A<E;++A)y+=r.subParser("makeMarkdown.node")(m[A],w,!0);return y.trim()}),r.subParser("makeMarkdown.txt",function(v){var w=v.nodeValue;return w=w.replace(/ +/g," "),w=w.replace(/¨NBSP;/g," "),w=r.helper.unescapeHTMLEntities(w),w=w.replace(/([*_~|`])/g,"\\$1"),w=w.replace(/^(\s*)>/g,"\\$1>"),w=w.replace(/^#/gm,"\\#"),w=w.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),w=w.replace(/^( {0,3}\d+)\./gm,"$1\\."),w=w.replace(/^( {0,3})([+-])/gm,"$1\\$2"),w=w.replace(/]([\s]*)\(/g,"\\]$1\\("),w=w.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),w});var T=this;e.exports?e.exports=r:T.showdown=r}).call(Be)})(hC);var p3=hC.exports;const g3=Es(p3);var pC={exports:{}};/*!
|
||
* jQuery JavaScript Library v3.7.0
|
||
* https://jquery.com/
|
||
*
|
||
* Copyright OpenJS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://jquery.org/license
|
||
*
|
||
* Date: 2023-05-11T18:29Z
|
||
*/(function(e){(function(t,n){e.exports=t.document?n(t,!0):function(r){if(!r.document)throw new Error("jQuery requires a window with a document");return n(r)}})(typeof window<"u"?window:Be,function(t,n){var r=[],i=Object.getPrototypeOf,o=r.slice,s=r.flat?function(_){return r.flat.call(_)}:function(_){return r.concat.apply([],_)},d=r.push,a=r.indexOf,c={},l=c.toString,u=c.hasOwnProperty,h=u.toString,f=h.call(Object),p={},g=function(L){return typeof L=="function"&&typeof L.nodeType!="number"&&typeof L.item!="function"},b=function(L){return L!=null&&L===L.window},x=t.document,S={type:!0,src:!0,nonce:!0,noModule:!0};function T(_,L,F){F=F||x;var D,H,V=F.createElement("script");if(V.text=_,L)for(D in S)H=L[D]||L.getAttribute&&L.getAttribute(D),H&&V.setAttribute(D,H);F.head.appendChild(V).parentNode.removeChild(V)}function v(_){return _==null?_+"":typeof _=="object"||typeof _=="function"?c[l.call(_)]||"object":typeof _}var w="3.7.0",y=/HTML$/i,m=function(_,L){return new m.fn.init(_,L)};m.fn=m.prototype={jquery:w,constructor:m,length:0,toArray:function(){return o.call(this)},get:function(_){return _==null?o.call(this):_<0?this[_+this.length]:this[_]},pushStack:function(_){var L=m.merge(this.constructor(),_);return L.prevObject=this,L},each:function(_){return m.each(this,_)},map:function(_){return this.pushStack(m.map(this,function(L,F){return _.call(L,F,L)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(m.grep(this,function(_,L){return(L+1)%2}))},odd:function(){return this.pushStack(m.grep(this,function(_,L){return L%2}))},eq:function(_){var L=this.length,F=+_+(_<0?L:0);return this.pushStack(F>=0&&F<L?[this[F]]:[])},end:function(){return this.prevObject||this.constructor()},push:d,sort:r.sort,splice:r.splice},m.extend=m.fn.extend=function(){var _,L,F,D,H,V,G=arguments[0]||{},ne=1,ee=arguments.length,le=!1;for(typeof G=="boolean"&&(le=G,G=arguments[ne]||{},ne++),typeof G!="object"&&!g(G)&&(G={}),ne===ee&&(G=this,ne--);ne<ee;ne++)if((_=arguments[ne])!=null)for(L in _)D=_[L],!(L==="__proto__"||G===D)&&(le&&D&&(m.isPlainObject(D)||(H=Array.isArray(D)))?(F=G[L],H&&!Array.isArray(F)?V=[]:!H&&!m.isPlainObject(F)?V={}:V=F,H=!1,G[L]=m.extend(le,V,D)):D!==void 0&&(G[L]=D));return G},m.extend({expando:"jQuery"+(w+Math.random()).replace(/\D/g,""),isReady:!0,error:function(_){throw new Error(_)},noop:function(){},isPlainObject:function(_){var L,F;return!_||l.call(_)!=="[object Object]"?!1:(L=i(_),L?(F=u.call(L,"constructor")&&L.constructor,typeof F=="function"&&h.call(F)===f):!0)},isEmptyObject:function(_){var L;for(L in _)return!1;return!0},globalEval:function(_,L,F){T(_,{nonce:L&&L.nonce},F)},each:function(_,L){var F,D=0;if(E(_))for(F=_.length;D<F&&L.call(_[D],D,_[D])!==!1;D++);else for(D in _)if(L.call(_[D],D,_[D])===!1)break;return _},text:function(_){var L,F="",D=0,H=_.nodeType;if(H){if(H===1||H===9||H===11)return _.textContent;if(H===3||H===4)return _.nodeValue}else for(;L=_[D++];)F+=m.text(L);return F},makeArray:function(_,L){var F=L||[];return _!=null&&(E(Object(_))?m.merge(F,typeof _=="string"?[_]:_):d.call(F,_)),F},inArray:function(_,L,F){return L==null?-1:a.call(L,_,F)},isXMLDoc:function(_){var L=_&&_.namespaceURI,F=_&&(_.ownerDocument||_).documentElement;return!y.test(L||F&&F.nodeName||"HTML")},merge:function(_,L){for(var F=+L.length,D=0,H=_.length;D<F;D++)_[H++]=L[D];return _.length=H,_},grep:function(_,L,F){for(var D,H=[],V=0,G=_.length,ne=!F;V<G;V++)D=!L(_[V],V),D!==ne&&H.push(_[V]);return H},map:function(_,L,F){var D,H,V=0,G=[];if(E(_))for(D=_.length;V<D;V++)H=L(_[V],V,F),H!=null&&G.push(H);else for(V in _)H=L(_[V],V,F),H!=null&&G.push(H);return s(G)},guid:1,support:p}),typeof Symbol=="function"&&(m.fn[Symbol.iterator]=r[Symbol.iterator]),m.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(_,L){c["[object "+L+"]"]=L.toLowerCase()});function E(_){var L=!!_&&"length"in _&&_.length,F=v(_);return g(_)||b(_)?!1:F==="array"||L===0||typeof L=="number"&&L>0&&L-1 in _}function A(_,L){return _.nodeName&&_.nodeName.toLowerCase()===L.toLowerCase()}var C=r.pop,k=r.sort,I=r.splice,R="[\\x20\\t\\r\\n\\f]",M=new RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g");m.contains=function(_,L){var F=L&&L.parentNode;return _===F||!!(F&&F.nodeType===1&&(_.contains?_.contains(F):_.compareDocumentPosition&&_.compareDocumentPosition(F)&16))};var O=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function P(_,L){return L?_==="\0"?"<22>":_.slice(0,-1)+"\\"+_.charCodeAt(_.length-1).toString(16)+" ":"\\"+_}m.escapeSelector=function(_){return(_+"").replace(O,P)};var N=x,B=d;(function(){var _,L,F,D,H,V=B,G,ne,ee,le,ge,be=m.expando,fe=0,ke=0,nt=Pd(),yt=Pd(),lt=Pd(),_n=Pd(),dn=function(X,oe){return X===oe&&(H=!0),0},Ei="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",$i="(?:\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",pt="\\["+R+"*("+$i+")(?:"+R+"*([*^$|!~]?=)"+R+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+$i+"))|)"+R+"*\\]",Va=":("+$i+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+pt+")*)|.*)\\)|)",bt=new RegExp(R+"+","g"),Zt=new RegExp("^"+R+"*,"+R+"*"),Tu=new RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),Ng=new RegExp(R+"|>"),Ti=new RegExp(Va),Au=new RegExp("^"+$i+"$"),Ai={ID:new RegExp("^#("+$i+")"),CLASS:new RegExp("^\\.("+$i+")"),TAG:new RegExp("^("+$i+"|[*])"),ATTR:new RegExp("^"+pt),PSEUDO:new RegExp("^"+Va),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+Ei+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},Wo=/^(?:input|select|textarea|button)$/i,Uo=/^h\d$/i,Nr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,zg=/[+~]/,oo=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),ao=function(X,oe){var de="0x"+X.slice(1)-65536;return oe||(de<0?String.fromCharCode(de+65536):String.fromCharCode(de>>10|55296,de&1023|56320))},r3=function(){Go()},i3=Fd(function(X){return X.disabled===!0&&A(X,"fieldset")},{dir:"parentNode",next:"legend"});function o3(){try{return G.activeElement}catch{}}try{V.apply(r=o.call(N.childNodes),N.childNodes),r[N.childNodes.length].nodeType}catch{V={apply:function(oe,de){B.apply(oe,o.call(de))},call:function(oe){B.apply(oe,o.call(arguments,1))}}}function Ot(X,oe,de,pe){var ye,$e,Me,De,Le,dt,Je,rt=oe&&oe.ownerDocument,ft=oe?oe.nodeType:9;if(de=de||[],typeof X!="string"||!X||ft!==1&&ft!==9&&ft!==11)return de;if(!pe&&(Go(oe),oe=oe||G,ee)){if(ft!==11&&(Le=Nr.exec(X)))if(ye=Le[1]){if(ft===9)if(Me=oe.getElementById(ye)){if(Me.id===ye)return V.call(de,Me),de}else return de;else if(rt&&(Me=rt.getElementById(ye))&&Ot.contains(oe,Me)&&Me.id===ye)return V.call(de,Me),de}else{if(Le[2])return V.apply(de,oe.getElementsByTagName(X)),de;if((ye=Le[3])&&oe.getElementsByClassName)return V.apply(de,oe.getElementsByClassName(ye)),de}if(!_n[X+" "]&&(!le||!le.test(X))){if(Je=X,rt=oe,ft===1&&(Ng.test(X)||Tu.test(X))){for(rt=zg.test(X)&&Bg(oe.parentNode)||oe,(rt!=oe||!p.scope)&&((De=oe.getAttribute("id"))?De=m.escapeSelector(De):oe.setAttribute("id",De=be)),dt=Id(X),$e=dt.length;$e--;)dt[$e]=(De?"#"+De:":scope")+" "+Od(dt[$e]);Je=dt.join(",")}try{return V.apply(de,rt.querySelectorAll(Je)),de}catch{_n(X,!0)}finally{De===be&&oe.removeAttribute("id")}}}return Lw(X.replace(M,"$1"),oe,de,pe)}function Pd(){var X=[];function oe(de,pe){return X.push(de+" ")>L.cacheLength&&delete oe[X.shift()],oe[de+" "]=pe}return oe}function si(X){return X[be]=!0,X}function el(X){var oe=G.createElement("fieldset");try{return!!X(oe)}catch{return!1}finally{oe.parentNode&&oe.parentNode.removeChild(oe),oe=null}}function a3(X){return function(oe){return A(oe,"input")&&oe.type===X}}function s3(X){return function(oe){return(A(oe,"input")||A(oe,"button"))&&oe.type===X}}function Aw(X){return function(oe){return"form"in oe?oe.parentNode&&oe.disabled===!1?"label"in oe?"label"in oe.parentNode?oe.parentNode.disabled===X:oe.disabled===X:oe.isDisabled===X||oe.isDisabled!==!X&&i3(oe)===X:oe.disabled===X:"label"in oe?oe.disabled===X:!1}}function Wa(X){return si(function(oe){return oe=+oe,si(function(de,pe){for(var ye,$e=X([],de.length,oe),Me=$e.length;Me--;)de[ye=$e[Me]]&&(de[ye]=!(pe[ye]=de[ye]))})})}function Bg(X){return X&&typeof X.getElementsByTagName<"u"&&X}function Go(X){var oe,de=X?X.ownerDocument||X:N;return de==G||de.nodeType!==9||!de.documentElement||(G=de,ne=G.documentElement,ee=!m.isXMLDoc(G),ge=ne.matches||ne.webkitMatchesSelector||ne.msMatchesSelector,N!=G&&(oe=G.defaultView)&&oe.top!==oe&&oe.addEventListener("unload",r3),p.getById=el(function(pe){return ne.appendChild(pe).id=m.expando,!G.getElementsByName||!G.getElementsByName(m.expando).length}),p.disconnectedMatch=el(function(pe){return ge.call(pe,"*")}),p.scope=el(function(){return G.querySelectorAll(":scope")}),p.cssHas=el(function(){try{return G.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),p.getById?(L.filter.ID=function(pe){var ye=pe.replace(oo,ao);return function($e){return $e.getAttribute("id")===ye}},L.find.ID=function(pe,ye){if(typeof ye.getElementById<"u"&&ee){var $e=ye.getElementById(pe);return $e?[$e]:[]}}):(L.filter.ID=function(pe){var ye=pe.replace(oo,ao);return function($e){var Me=typeof $e.getAttributeNode<"u"&&$e.getAttributeNode("id");return Me&&Me.value===ye}},L.find.ID=function(pe,ye){if(typeof ye.getElementById<"u"&&ee){var $e,Me,De,Le=ye.getElementById(pe);if(Le){if($e=Le.getAttributeNode("id"),$e&&$e.value===pe)return[Le];for(De=ye.getElementsByName(pe),Me=0;Le=De[Me++];)if($e=Le.getAttributeNode("id"),$e&&$e.value===pe)return[Le]}return[]}}),L.find.TAG=function(pe,ye){return typeof ye.getElementsByTagName<"u"?ye.getElementsByTagName(pe):ye.querySelectorAll(pe)},L.find.CLASS=function(pe,ye){if(typeof ye.getElementsByClassName<"u"&&ee)return ye.getElementsByClassName(pe)},le=[],el(function(pe){var ye;ne.appendChild(pe).innerHTML="<a id='"+be+"' href='' disabled='disabled'></a><select id='"+be+"-\r\\' disabled='disabled'><option selected=''></option></select>",pe.querySelectorAll("[selected]").length||le.push("\\["+R+"*(?:value|"+Ei+")"),pe.querySelectorAll("[id~="+be+"-]").length||le.push("~="),pe.querySelectorAll("a#"+be+"+*").length||le.push(".#.+[+~]"),pe.querySelectorAll(":checked").length||le.push(":checked"),ye=G.createElement("input"),ye.setAttribute("type","hidden"),pe.appendChild(ye).setAttribute("name","D"),ne.appendChild(pe).disabled=!0,pe.querySelectorAll(":disabled").length!==2&&le.push(":enabled",":disabled"),ye=G.createElement("input"),ye.setAttribute("name",""),pe.appendChild(ye),pe.querySelectorAll("[name='']").length||le.push("\\["+R+"*name"+R+"*="+R+`*(?:''|"")`)}),p.cssHas||le.push(":has"),le=le.length&&new RegExp(le.join("|")),dn=function(pe,ye){if(pe===ye)return H=!0,0;var $e=!pe.compareDocumentPosition-!ye.compareDocumentPosition;return $e||($e=(pe.ownerDocument||pe)==(ye.ownerDocument||ye)?pe.compareDocumentPosition(ye):1,$e&1||!p.sortDetached&&ye.compareDocumentPosition(pe)===$e?pe===G||pe.ownerDocument==N&&Ot.contains(N,pe)?-1:ye===G||ye.ownerDocument==N&&Ot.contains(N,ye)?1:D?a.call(D,pe)-a.call(D,ye):0:$e&4?-1:1)}),G}Ot.matches=function(X,oe){return Ot(X,null,null,oe)},Ot.matchesSelector=function(X,oe){if(Go(X),ee&&!_n[oe+" "]&&(!le||!le.test(oe)))try{var de=ge.call(X,oe);if(de||p.disconnectedMatch||X.document&&X.document.nodeType!==11)return de}catch{_n(oe,!0)}return Ot(oe,G,null,[X]).length>0},Ot.contains=function(X,oe){return(X.ownerDocument||X)!=G&&Go(X),m.contains(X,oe)},Ot.attr=function(X,oe){(X.ownerDocument||X)!=G&&Go(X);var de=L.attrHandle[oe.toLowerCase()],pe=de&&u.call(L.attrHandle,oe.toLowerCase())?de(X,oe,!ee):void 0;return pe!==void 0?pe:X.getAttribute(oe)},Ot.error=function(X){throw new Error("Syntax error, unrecognized expression: "+X)},m.uniqueSort=function(X){var oe,de=[],pe=0,ye=0;if(H=!p.sortStable,D=!p.sortStable&&o.call(X,0),k.call(X,dn),H){for(;oe=X[ye++];)oe===X[ye]&&(pe=de.push(ye));for(;pe--;)I.call(X,de[pe],1)}return D=null,X},m.fn.uniqueSort=function(){return this.pushStack(m.uniqueSort(o.apply(this)))},L=m.expr={cacheLength:50,createPseudo:si,match:Ai,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(X){return X[1]=X[1].replace(oo,ao),X[3]=(X[3]||X[4]||X[5]||"").replace(oo,ao),X[2]==="~="&&(X[3]=" "+X[3]+" "),X.slice(0,4)},CHILD:function(X){return X[1]=X[1].toLowerCase(),X[1].slice(0,3)==="nth"?(X[3]||Ot.error(X[0]),X[4]=+(X[4]?X[5]+(X[6]||1):2*(X[3]==="even"||X[3]==="odd")),X[5]=+(X[7]+X[8]||X[3]==="odd")):X[3]&&Ot.error(X[0]),X},PSEUDO:function(X){var oe,de=!X[6]&&X[2];return Ai.CHILD.test(X[0])?null:(X[3]?X[2]=X[4]||X[5]||"":de&&Ti.test(de)&&(oe=Id(de,!0))&&(oe=de.indexOf(")",de.length-oe)-de.length)&&(X[0]=X[0].slice(0,oe),X[2]=de.slice(0,oe)),X.slice(0,3))}},filter:{TAG:function(X){var oe=X.replace(oo,ao).toLowerCase();return X==="*"?function(){return!0}:function(de){return A(de,oe)}},CLASS:function(X){var oe=nt[X+" "];return oe||(oe=new RegExp("(^|"+R+")"+X+"("+R+"|$)"))&&nt(X,function(de){return oe.test(typeof de.className=="string"&&de.className||typeof de.getAttribute<"u"&&de.getAttribute("class")||"")})},ATTR:function(X,oe,de){return function(pe){var ye=Ot.attr(pe,X);return ye==null?oe==="!=":oe?(ye+="",oe==="="?ye===de:oe==="!="?ye!==de:oe==="^="?de&&ye.indexOf(de)===0:oe==="*="?de&&ye.indexOf(de)>-1:oe==="$="?de&&ye.slice(-de.length)===de:oe==="~="?(" "+ye.replace(bt," ")+" ").indexOf(de)>-1:oe==="|="?ye===de||ye.slice(0,de.length+1)===de+"-":!1):!0}},CHILD:function(X,oe,de,pe,ye){var $e=X.slice(0,3)!=="nth",Me=X.slice(-4)!=="last",De=oe==="of-type";return pe===1&&ye===0?function(Le){return!!Le.parentNode}:function(Le,dt,Je){var rt,ft,We,Dt,nr,Fn=$e!==Me?"nextSibling":"previousSibling",zr=Le.parentNode,Mi=De&&Le.nodeName.toLowerCase(),tl=!Je&&!De,Hn=!1;if(zr){if($e){for(;Fn;){for(We=Le;We=We[Fn];)if(De?A(We,Mi):We.nodeType===1)return!1;nr=Fn=X==="only"&&!nr&&"nextSibling"}return!0}if(nr=[Me?zr.firstChild:zr.lastChild],Me&&tl){for(ft=zr[be]||(zr[be]={}),rt=ft[X]||[],Dt=rt[0]===fe&&rt[1],Hn=Dt&&rt[2],We=Dt&&zr.childNodes[Dt];We=++Dt&&We&&We[Fn]||(Hn=Dt=0)||nr.pop();)if(We.nodeType===1&&++Hn&&We===Le){ft[X]=[fe,Dt,Hn];break}}else if(tl&&(ft=Le[be]||(Le[be]={}),rt=ft[X]||[],Dt=rt[0]===fe&&rt[1],Hn=Dt),Hn===!1)for(;(We=++Dt&&We&&We[Fn]||(Hn=Dt=0)||nr.pop())&&!((De?A(We,Mi):We.nodeType===1)&&++Hn&&(tl&&(ft=We[be]||(We[be]={}),ft[X]=[fe,Hn]),We===Le)););return Hn-=ye,Hn===pe||Hn%pe===0&&Hn/pe>=0}}},PSEUDO:function(X,oe){var de,pe=L.pseudos[X]||L.setFilters[X.toLowerCase()]||Ot.error("unsupported pseudo: "+X);return pe[be]?pe(oe):pe.length>1?(de=[X,X,"",oe],L.setFilters.hasOwnProperty(X.toLowerCase())?si(function(ye,$e){for(var Me,De=pe(ye,oe),Le=De.length;Le--;)Me=a.call(ye,De[Le]),ye[Me]=!($e[Me]=De[Le])}):function(ye){return pe(ye,0,de)}):pe}},pseudos:{not:si(function(X){var oe=[],de=[],pe=Wg(X.replace(M,"$1"));return pe[be]?si(function(ye,$e,Me,De){for(var Le,dt=pe(ye,null,De,[]),Je=ye.length;Je--;)(Le=dt[Je])&&(ye[Je]=!($e[Je]=Le))}):function(ye,$e,Me){return oe[0]=ye,pe(oe,null,Me,de),oe[0]=null,!de.pop()}}),has:si(function(X){return function(oe){return Ot(X,oe).length>0}}),contains:si(function(X){return X=X.replace(oo,ao),function(oe){return(oe.textContent||m.text(oe)).indexOf(X)>-1}}),lang:si(function(X){return Au.test(X||"")||Ot.error("unsupported lang: "+X),X=X.replace(oo,ao).toLowerCase(),function(oe){var de;do if(de=ee?oe.lang:oe.getAttribute("xml:lang")||oe.getAttribute("lang"))return de=de.toLowerCase(),de===X||de.indexOf(X+"-")===0;while((oe=oe.parentNode)&&oe.nodeType===1);return!1}}),target:function(X){var oe=t.location&&t.location.hash;return oe&&oe.slice(1)===X.id},root:function(X){return X===ne},focus:function(X){return X===o3()&&G.hasFocus()&&!!(X.type||X.href||~X.tabIndex)},enabled:Aw(!1),disabled:Aw(!0),checked:function(X){return A(X,"input")&&!!X.checked||A(X,"option")&&!!X.selected},selected:function(X){return X.parentNode&&X.parentNode.selectedIndex,X.selected===!0},empty:function(X){for(X=X.firstChild;X;X=X.nextSibling)if(X.nodeType<6)return!1;return!0},parent:function(X){return!L.pseudos.empty(X)},header:function(X){return Uo.test(X.nodeName)},input:function(X){return Wo.test(X.nodeName)},button:function(X){return A(X,"input")&&X.type==="button"||A(X,"button")},text:function(X){var oe;return A(X,"input")&&X.type==="text"&&((oe=X.getAttribute("type"))==null||oe.toLowerCase()==="text")},first:Wa(function(){return[0]}),last:Wa(function(X,oe){return[oe-1]}),eq:Wa(function(X,oe,de){return[de<0?de+oe:de]}),even:Wa(function(X,oe){for(var de=0;de<oe;de+=2)X.push(de);return X}),odd:Wa(function(X,oe){for(var de=1;de<oe;de+=2)X.push(de);return X}),lt:Wa(function(X,oe,de){var pe;for(de<0?pe=de+oe:de>oe?pe=oe:pe=de;--pe>=0;)X.push(pe);return X}),gt:Wa(function(X,oe,de){for(var pe=de<0?de+oe:de;++pe<oe;)X.push(pe);return X})}},L.pseudos.nth=L.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})L.pseudos[_]=a3(_);for(_ in{submit:!0,reset:!0})L.pseudos[_]=s3(_);function Mw(){}Mw.prototype=L.filters=L.pseudos,L.setFilters=new Mw;function Id(X,oe){var de,pe,ye,$e,Me,De,Le,dt=yt[X+" "];if(dt)return oe?0:dt.slice(0);for(Me=X,De=[],Le=L.preFilter;Me;){(!de||(pe=Zt.exec(Me)))&&(pe&&(Me=Me.slice(pe[0].length)||Me),De.push(ye=[])),de=!1,(pe=Tu.exec(Me))&&(de=pe.shift(),ye.push({value:de,type:pe[0].replace(M," ")}),Me=Me.slice(de.length));for($e in L.filter)(pe=Ai[$e].exec(Me))&&(!Le[$e]||(pe=Le[$e](pe)))&&(de=pe.shift(),ye.push({value:de,type:$e,matches:pe}),Me=Me.slice(de.length));if(!de)break}return oe?Me.length:Me?Ot.error(X):yt(X,De).slice(0)}function Od(X){for(var oe=0,de=X.length,pe="";oe<de;oe++)pe+=X[oe].value;return pe}function Fd(X,oe,de){var pe=oe.dir,ye=oe.next,$e=ye||pe,Me=de&&$e==="parentNode",De=ke++;return oe.first?function(Le,dt,Je){for(;Le=Le[pe];)if(Le.nodeType===1||Me)return X(Le,dt,Je);return!1}:function(Le,dt,Je){var rt,ft,We=[fe,De];if(Je){for(;Le=Le[pe];)if((Le.nodeType===1||Me)&&X(Le,dt,Je))return!0}else for(;Le=Le[pe];)if(Le.nodeType===1||Me)if(ft=Le[be]||(Le[be]={}),ye&&A(Le,ye))Le=Le[pe]||Le;else{if((rt=ft[$e])&&rt[0]===fe&&rt[1]===De)return We[2]=rt[2];if(ft[$e]=We,We[2]=X(Le,dt,Je))return!0}return!1}}function jg(X){return X.length>1?function(oe,de,pe){for(var ye=X.length;ye--;)if(!X[ye](oe,de,pe))return!1;return!0}:X[0]}function l3(X,oe,de){for(var pe=0,ye=oe.length;pe<ye;pe++)Ot(X,oe[pe],de);return de}function Dd(X,oe,de,pe,ye){for(var $e,Me=[],De=0,Le=X.length,dt=oe!=null;De<Le;De++)($e=X[De])&&(!de||de($e,pe,ye))&&(Me.push($e),dt&&oe.push(De));return Me}function Hg(X,oe,de,pe,ye,$e){return pe&&!pe[be]&&(pe=Hg(pe)),ye&&!ye[be]&&(ye=Hg(ye,$e)),si(function(Me,De,Le,dt){var Je,rt,ft,We,Dt=[],nr=[],Fn=De.length,zr=Me||l3(oe||"*",Le.nodeType?[Le]:Le,[]),Mi=X&&(Me||!oe)?Dd(zr,Dt,X,Le,dt):zr;if(de?(We=ye||(Me?X:Fn||pe)?[]:De,de(Mi,We,Le,dt)):We=Mi,pe)for(Je=Dd(We,nr),pe(Je,[],Le,dt),rt=Je.length;rt--;)(ft=Je[rt])&&(We[nr[rt]]=!(Mi[nr[rt]]=ft));if(Me){if(ye||X){if(ye){for(Je=[],rt=We.length;rt--;)(ft=We[rt])&&Je.push(Mi[rt]=ft);ye(null,We=[],Je,dt)}for(rt=We.length;rt--;)(ft=We[rt])&&(Je=ye?a.call(Me,ft):Dt[rt])>-1&&(Me[Je]=!(De[Je]=ft))}}else We=Dd(We===De?We.splice(Fn,We.length):We),ye?ye(null,De,We,dt):V.apply(De,We)})}function Vg(X){for(var oe,de,pe,ye=X.length,$e=L.relative[X[0].type],Me=$e||L.relative[" "],De=$e?1:0,Le=Fd(function(rt){return rt===oe},Me,!0),dt=Fd(function(rt){return a.call(oe,rt)>-1},Me,!0),Je=[function(rt,ft,We){var Dt=!$e&&(We||ft!=F)||((oe=ft).nodeType?Le(rt,ft,We):dt(rt,ft,We));return oe=null,Dt}];De<ye;De++)if(de=L.relative[X[De].type])Je=[Fd(jg(Je),de)];else{if(de=L.filter[X[De].type].apply(null,X[De].matches),de[be]){for(pe=++De;pe<ye&&!L.relative[X[pe].type];pe++);return Hg(De>1&&jg(Je),De>1&&Od(X.slice(0,De-1).concat({value:X[De-2].type===" "?"*":""})).replace(M,"$1"),de,De<pe&&Vg(X.slice(De,pe)),pe<ye&&Vg(X=X.slice(pe)),pe<ye&&Od(X))}Je.push(de)}return jg(Je)}function u3(X,oe){var de=oe.length>0,pe=X.length>0,ye=function($e,Me,De,Le,dt){var Je,rt,ft,We=0,Dt="0",nr=$e&&[],Fn=[],zr=F,Mi=$e||pe&&L.find.TAG("*",dt),tl=fe+=zr==null?1:Math.random()||.1,Hn=Mi.length;for(dt&&(F=Me==G||Me||dt);Dt!==Hn&&(Je=Mi[Dt])!=null;Dt++){if(pe&&Je){for(rt=0,!Me&&Je.ownerDocument!=G&&(Go(Je),De=!ee);ft=X[rt++];)if(ft(Je,Me||G,De)){V.call(Le,Je);break}dt&&(fe=tl)}de&&((Je=!ft&&Je)&&We--,$e&&nr.push(Je))}if(We+=Dt,de&&Dt!==We){for(rt=0;ft=oe[rt++];)ft(nr,Fn,Me,De);if($e){if(We>0)for(;Dt--;)nr[Dt]||Fn[Dt]||(Fn[Dt]=C.call(Le));Fn=Dd(Fn)}V.apply(Le,Fn),dt&&!$e&&Fn.length>0&&We+oe.length>1&&m.uniqueSort(Le)}return dt&&(fe=tl,F=zr),nr};return de?si(ye):ye}function Wg(X,oe){var de,pe=[],ye=[],$e=lt[X+" "];if(!$e){for(oe||(oe=Id(X)),de=oe.length;de--;)$e=Vg(oe[de]),$e[be]?pe.push($e):ye.push($e);$e=lt(X,u3(ye,pe)),$e.selector=X}return $e}function Lw(X,oe,de,pe){var ye,$e,Me,De,Le,dt=typeof X=="function"&&X,Je=!pe&&Id(X=dt.selector||X);if(de=de||[],Je.length===1){if($e=Je[0]=Je[0].slice(0),$e.length>2&&(Me=$e[0]).type==="ID"&&oe.nodeType===9&&ee&&L.relative[$e[1].type]){if(oe=(L.find.ID(Me.matches[0].replace(oo,ao),oe)||[])[0],oe)dt&&(oe=oe.parentNode);else return de;X=X.slice($e.shift().value.length)}for(ye=Ai.needsContext.test(X)?0:$e.length;ye--&&(Me=$e[ye],!L.relative[De=Me.type]);)if((Le=L.find[De])&&(pe=Le(Me.matches[0].replace(oo,ao),zg.test($e[0].type)&&Bg(oe.parentNode)||oe))){if($e.splice(ye,1),X=pe.length&&Od($e),!X)return V.apply(de,pe),de;break}}return(dt||Wg(X,Je))(pe,oe,!ee,de,!oe||zg.test(X)&&Bg(oe.parentNode)||oe),de}p.sortStable=be.split("").sort(dn).join("")===be,Go(),p.sortDetached=el(function(X){return X.compareDocumentPosition(G.createElement("fieldset"))&1}),m.find=Ot,m.expr[":"]=m.expr.pseudos,m.unique=m.uniqueSort,Ot.compile=Wg,Ot.select=Lw,Ot.setDocument=Go,Ot.escape=m.escapeSelector,Ot.getText=m.text,Ot.isXML=m.isXMLDoc,Ot.selectors=m.expr,Ot.support=m.support,Ot.uniqueSort=m.uniqueSort})();var W=function(_,L,F){for(var D=[],H=F!==void 0;(_=_[L])&&_.nodeType!==9;)if(_.nodeType===1){if(H&&m(_).is(F))break;D.push(_)}return D},K=function(_,L){for(var F=[];_;_=_.nextSibling)_.nodeType===1&&_!==L&&F.push(_);return F},q=m.expr.match.needsContext,re=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Y(_,L,F){return g(L)?m.grep(_,function(D,H){return!!L.call(D,H,D)!==F}):L.nodeType?m.grep(_,function(D){return D===L!==F}):typeof L!="string"?m.grep(_,function(D){return a.call(L,D)>-1!==F}):m.filter(L,_,F)}m.filter=function(_,L,F){var D=L[0];return F&&(_=":not("+_+")"),L.length===1&&D.nodeType===1?m.find.matchesSelector(D,_)?[D]:[]:m.find.matches(_,m.grep(L,function(H){return H.nodeType===1}))},m.fn.extend({find:function(_){var L,F,D=this.length,H=this;if(typeof _!="string")return this.pushStack(m(_).filter(function(){for(L=0;L<D;L++)if(m.contains(H[L],this))return!0}));for(F=this.pushStack([]),L=0;L<D;L++)m.find(_,H[L],F);return D>1?m.uniqueSort(F):F},filter:function(_){return this.pushStack(Y(this,_||[],!1))},not:function(_){return this.pushStack(Y(this,_||[],!0))},is:function(_){return!!Y(this,typeof _=="string"&&q.test(_)?m(_):_||[],!1).length}});var Z,te=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,ie=m.fn.init=function(_,L,F){var D,H;if(!_)return this;if(F=F||Z,typeof _=="string")if(_[0]==="<"&&_[_.length-1]===">"&&_.length>=3?D=[null,_,null]:D=te.exec(_),D&&(D[1]||!L))if(D[1]){if(L=L instanceof m?L[0]:L,m.merge(this,m.parseHTML(D[1],L&&L.nodeType?L.ownerDocument||L:x,!0)),re.test(D[1])&&m.isPlainObject(L))for(D in L)g(this[D])?this[D](L[D]):this.attr(D,L[D]);return this}else return H=x.getElementById(D[2]),H&&(this[0]=H,this.length=1),this;else return!L||L.jquery?(L||F).find(_):this.constructor(L).find(_);else{if(_.nodeType)return this[0]=_,this.length=1,this;if(g(_))return F.ready!==void 0?F.ready(_):_(m)}return m.makeArray(_,this)};ie.prototype=m.fn,Z=m(x);var ce=/^(?:parents|prev(?:Until|All))/,he={children:!0,contents:!0,next:!0,prev:!0};m.fn.extend({has:function(_){var L=m(_,this),F=L.length;return this.filter(function(){for(var D=0;D<F;D++)if(m.contains(this,L[D]))return!0})},closest:function(_,L){var F,D=0,H=this.length,V=[],G=typeof _!="string"&&m(_);if(!q.test(_)){for(;D<H;D++)for(F=this[D];F&&F!==L;F=F.parentNode)if(F.nodeType<11&&(G?G.index(F)>-1:F.nodeType===1&&m.find.matchesSelector(F,_))){V.push(F);break}}return this.pushStack(V.length>1?m.uniqueSort(V):V)},index:function(_){return _?typeof _=="string"?a.call(m(_),this[0]):a.call(this,_.jquery?_[0]:_):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(_,L){return this.pushStack(m.uniqueSort(m.merge(this.get(),m(_,L))))},addBack:function(_){return this.add(_==null?this.prevObject:this.prevObject.filter(_))}});function ve(_,L){for(;(_=_[L])&&_.nodeType!==1;);return _}m.each({parent:function(_){var L=_.parentNode;return L&&L.nodeType!==11?L:null},parents:function(_){return W(_,"parentNode")},parentsUntil:function(_,L,F){return W(_,"parentNode",F)},next:function(_){return ve(_,"nextSibling")},prev:function(_){return ve(_,"previousSibling")},nextAll:function(_){return W(_,"nextSibling")},prevAll:function(_){return W(_,"previousSibling")},nextUntil:function(_,L,F){return W(_,"nextSibling",F)},prevUntil:function(_,L,F){return W(_,"previousSibling",F)},siblings:function(_){return K((_.parentNode||{}).firstChild,_)},children:function(_){return K(_.firstChild)},contents:function(_){return _.contentDocument!=null&&i(_.contentDocument)?_.contentDocument:(A(_,"template")&&(_=_.content||_),m.merge([],_.childNodes))}},function(_,L){m.fn[_]=function(F,D){var H=m.map(this,L,F);return _.slice(-5)!=="Until"&&(D=F),D&&typeof D=="string"&&(H=m.filter(D,H)),this.length>1&&(he[_]||m.uniqueSort(H),ce.test(_)&&H.reverse()),this.pushStack(H)}});var Ce=/[^\x20\t\r\n\f]+/g;function _e(_){var L={};return m.each(_.match(Ce)||[],function(F,D){L[D]=!0}),L}m.Callbacks=function(_){_=typeof _=="string"?_e(_):m.extend({},_);var L,F,D,H,V=[],G=[],ne=-1,ee=function(){for(H=H||_.once,D=L=!0;G.length;ne=-1)for(F=G.shift();++ne<V.length;)V[ne].apply(F[0],F[1])===!1&&_.stopOnFalse&&(ne=V.length,F=!1);_.memory||(F=!1),L=!1,H&&(F?V=[]:V="")},le={add:function(){return V&&(F&&!L&&(ne=V.length-1,G.push(F)),function ge(be){m.each(be,function(fe,ke){g(ke)?(!_.unique||!le.has(ke))&&V.push(ke):ke&&ke.length&&v(ke)!=="string"&&ge(ke)})}(arguments),F&&!L&&ee()),this},remove:function(){return m.each(arguments,function(ge,be){for(var fe;(fe=m.inArray(be,V,fe))>-1;)V.splice(fe,1),fe<=ne&&ne--}),this},has:function(ge){return ge?m.inArray(ge,V)>-1:V.length>0},empty:function(){return V&&(V=[]),this},disable:function(){return H=G=[],V=F="",this},disabled:function(){return!V},lock:function(){return H=G=[],!F&&!L&&(V=F=""),this},locked:function(){return!!H},fireWith:function(ge,be){return H||(be=be||[],be=[ge,be.slice?be.slice():be],G.push(be),L||ee()),this},fire:function(){return le.fireWith(this,arguments),this},fired:function(){return!!D}};return le};function Re(_){return _}function ot(_){throw _}function Te(_,L,F,D){var H;try{_&&g(H=_.promise)?H.call(_).done(L).fail(F):_&&g(H=_.then)?H.call(_,L,F):L.apply(void 0,[_].slice(D))}catch(V){F.apply(void 0,[V])}}m.extend({Deferred:function(_){var L=[["notify","progress",m.Callbacks("memory"),m.Callbacks("memory"),2],["resolve","done",m.Callbacks("once memory"),m.Callbacks("once memory"),0,"resolved"],["reject","fail",m.Callbacks("once memory"),m.Callbacks("once memory"),1,"rejected"]],F="pending",D={state:function(){return F},always:function(){return H.done(arguments).fail(arguments),this},catch:function(V){return D.then(null,V)},pipe:function(){var V=arguments;return m.Deferred(function(G){m.each(L,function(ne,ee){var le=g(V[ee[4]])&&V[ee[4]];H[ee[1]](function(){var ge=le&&le.apply(this,arguments);ge&&g(ge.promise)?ge.promise().progress(G.notify).done(G.resolve).fail(G.reject):G[ee[0]+"With"](this,le?[ge]:arguments)})}),V=null}).promise()},then:function(V,G,ne){var ee=0;function le(ge,be,fe,ke){return function(){var nt=this,yt=arguments,lt=function(){var dn,Ei;if(!(ge<ee)){if(dn=fe.apply(nt,yt),dn===be.promise())throw new TypeError("Thenable self-resolution");Ei=dn&&(typeof dn=="object"||typeof dn=="function")&&dn.then,g(Ei)?ke?Ei.call(dn,le(ee,be,Re,ke),le(ee,be,ot,ke)):(ee++,Ei.call(dn,le(ee,be,Re,ke),le(ee,be,ot,ke),le(ee,be,Re,be.notifyWith))):(fe!==Re&&(nt=void 0,yt=[dn]),(ke||be.resolveWith)(nt,yt))}},_n=ke?lt:function(){try{lt()}catch(dn){m.Deferred.exceptionHook&&m.Deferred.exceptionHook(dn,_n.error),ge+1>=ee&&(fe!==ot&&(nt=void 0,yt=[dn]),be.rejectWith(nt,yt))}};ge?_n():(m.Deferred.getErrorHook?_n.error=m.Deferred.getErrorHook():m.Deferred.getStackHook&&(_n.error=m.Deferred.getStackHook()),t.setTimeout(_n))}}return m.Deferred(function(ge){L[0][3].add(le(0,ge,g(ne)?ne:Re,ge.notifyWith)),L[1][3].add(le(0,ge,g(V)?V:Re)),L[2][3].add(le(0,ge,g(G)?G:ot))}).promise()},promise:function(V){return V!=null?m.extend(V,D):D}},H={};return m.each(L,function(V,G){var ne=G[2],ee=G[5];D[G[1]]=ne.add,ee&&ne.add(function(){F=ee},L[3-V][2].disable,L[3-V][3].disable,L[0][2].lock,L[0][3].lock),ne.add(G[3].fire),H[G[0]]=function(){return H[G[0]+"With"](this===H?void 0:this,arguments),this},H[G[0]+"With"]=ne.fireWith}),D.promise(H),_&&_.call(H,H),H},when:function(_){var L=arguments.length,F=L,D=Array(F),H=o.call(arguments),V=m.Deferred(),G=function(ne){return function(ee){D[ne]=this,H[ne]=arguments.length>1?o.call(arguments):ee,--L||V.resolveWith(D,H)}};if(L<=1&&(Te(_,V.done(G(F)).resolve,V.reject,!L),V.state()==="pending"||g(H[F]&&H[F].then)))return V.then();for(;F--;)Te(H[F],G(F),V.reject);return V.promise()}});var it=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;m.Deferred.exceptionHook=function(_,L){t.console&&t.console.warn&&_&&it.test(_.name)&&t.console.warn("jQuery.Deferred exception: "+_.message,_.stack,L)},m.readyException=function(_){t.setTimeout(function(){throw _})};var vt=m.Deferred();m.fn.ready=function(_){return vt.then(_).catch(function(L){m.readyException(L)}),this},m.extend({isReady:!1,readyWait:1,ready:function(_){(_===!0?--m.readyWait:m.isReady)||(m.isReady=!0,!(_!==!0&&--m.readyWait>0)&&vt.resolveWith(x,[m]))}}),m.ready.then=vt.then;function Qt(){x.removeEventListener("DOMContentLoaded",Qt),t.removeEventListener("load",Qt),m.ready()}x.readyState==="complete"||x.readyState!=="loading"&&!x.documentElement.doScroll?t.setTimeout(m.ready):(x.addEventListener("DOMContentLoaded",Qt),t.addEventListener("load",Qt));var Ut=function(_,L,F,D,H,V,G){var ne=0,ee=_.length,le=F==null;if(v(F)==="object"){H=!0;for(ne in F)Ut(_,L,ne,F[ne],!0,V,G)}else if(D!==void 0&&(H=!0,g(D)||(G=!0),le&&(G?(L.call(_,D),L=null):(le=L,L=function(ge,be,fe){return le.call(m(ge),fe)})),L))for(;ne<ee;ne++)L(_[ne],F,G?D:D.call(_[ne],ne,L(_[ne],F)));return H?_:le?L.call(_):ee?L(_[0],F):V},Lr=/^-ms-/,Ln=/-([a-z])/g;function Zn(_,L){return L.toUpperCase()}function Ht(_){return _.replace(Lr,"ms-").replace(Ln,Zn)}var me=function(_){return _.nodeType===1||_.nodeType===9||!+_.nodeType};function Ae(){this.expando=m.expando+Ae.uid++}Ae.uid=1,Ae.prototype={cache:function(_){var L=_[this.expando];return L||(L={},me(_)&&(_.nodeType?_[this.expando]=L:Object.defineProperty(_,this.expando,{value:L,configurable:!0}))),L},set:function(_,L,F){var D,H=this.cache(_);if(typeof L=="string")H[Ht(L)]=F;else for(D in L)H[Ht(D)]=L[D];return H},get:function(_,L){return L===void 0?this.cache(_):_[this.expando]&&_[this.expando][Ht(L)]},access:function(_,L,F){return L===void 0||L&&typeof L=="string"&&F===void 0?this.get(_,L):(this.set(_,L,F),F!==void 0?F:L)},remove:function(_,L){var F,D=_[this.expando];if(D!==void 0){if(L!==void 0)for(Array.isArray(L)?L=L.map(Ht):(L=Ht(L),L=L in D?[L]:L.match(Ce)||[]),F=L.length;F--;)delete D[L[F]];(L===void 0||m.isEmptyObject(D))&&(_.nodeType?_[this.expando]=void 0:delete _[this.expando])}},hasData:function(_){var L=_[this.expando];return L!==void 0&&!m.isEmptyObject(L)}};var we=new Ae,He=new Ae,ct=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,xe=/[A-Z]/g;function Fe(_){return _==="true"?!0:_==="false"?!1:_==="null"?null:_===+_+""?+_:ct.test(_)?JSON.parse(_):_}function Ne(_,L,F){var D;if(F===void 0&&_.nodeType===1)if(D="data-"+L.replace(xe,"-$&").toLowerCase(),F=_.getAttribute(D),typeof F=="string"){try{F=Fe(F)}catch{}He.set(_,L,F)}else F=void 0;return F}m.extend({hasData:function(_){return He.hasData(_)||we.hasData(_)},data:function(_,L,F){return He.access(_,L,F)},removeData:function(_,L){He.remove(_,L)},_data:function(_,L,F){return we.access(_,L,F)},_removeData:function(_,L){we.remove(_,L)}}),m.fn.extend({data:function(_,L){var F,D,H,V=this[0],G=V&&V.attributes;if(_===void 0){if(this.length&&(H=He.get(V),V.nodeType===1&&!we.get(V,"hasDataAttrs"))){for(F=G.length;F--;)G[F]&&(D=G[F].name,D.indexOf("data-")===0&&(D=Ht(D.slice(5)),Ne(V,D,H[D])));we.set(V,"hasDataAttrs",!0)}return H}return typeof _=="object"?this.each(function(){He.set(this,_)}):Ut(this,function(ne){var ee;if(V&&ne===void 0)return ee=He.get(V,_),ee!==void 0||(ee=Ne(V,_),ee!==void 0)?ee:void 0;this.each(function(){He.set(this,_,ne)})},null,L,arguments.length>1,null,!0)},removeData:function(_){return this.each(function(){He.remove(this,_)})}}),m.extend({queue:function(_,L,F){var D;if(_)return L=(L||"fx")+"queue",D=we.get(_,L),F&&(!D||Array.isArray(F)?D=we.access(_,L,m.makeArray(F)):D.push(F)),D||[]},dequeue:function(_,L){L=L||"fx";var F=m.queue(_,L),D=F.length,H=F.shift(),V=m._queueHooks(_,L),G=function(){m.dequeue(_,L)};H==="inprogress"&&(H=F.shift(),D--),H&&(L==="fx"&&F.unshift("inprogress"),delete V.stop,H.call(_,G,V)),!D&&V&&V.empty.fire()},_queueHooks:function(_,L){var F=L+"queueHooks";return we.get(_,F)||we.access(_,F,{empty:m.Callbacks("once memory").add(function(){we.remove(_,[L+"queue",F])})})}}),m.fn.extend({queue:function(_,L){var F=2;return typeof _!="string"&&(L=_,_="fx",F--),arguments.length<F?m.queue(this[0],_):L===void 0?this:this.each(function(){var D=m.queue(this,_,L);m._queueHooks(this,_),_==="fx"&&D[0]!=="inprogress"&&m.dequeue(this,_)})},dequeue:function(_){return this.each(function(){m.dequeue(this,_)})},clearQueue:function(_){return this.queue(_||"fx",[])},promise:function(_,L){var F,D=1,H=m.Deferred(),V=this,G=this.length,ne=function(){--D||H.resolveWith(V,[V])};for(typeof _!="string"&&(L=_,_=void 0),_=_||"fx";G--;)F=we.get(V[G],_+"queueHooks"),F&&F.empty&&(D++,F.empty.add(ne));return ne(),H.promise(L)}});var Xe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,tt=new RegExp("^(?:([+-])=|)("+Xe+")([a-z%]*)$","i"),kt=["Top","Right","Bottom","Left"],on=x.documentElement,Rn=function(_){return m.contains(_.ownerDocument,_)},Rr={composed:!0};on.getRootNode&&(Rn=function(_){return m.contains(_.ownerDocument,_)||_.getRootNode(Rr)===_.ownerDocument});var Pr=function(_,L){return _=L||_,_.style.display==="none"||_.style.display===""&&Rn(_)&&m.css(_,"display")==="none"};function Ps(_,L,F,D){var H,V,G=20,ne=D?function(){return D.cur()}:function(){return m.css(_,L,"")},ee=ne(),le=F&&F[3]||(m.cssNumber[L]?"":"px"),ge=_.nodeType&&(m.cssNumber[L]||le!=="px"&&+ee)&&tt.exec(m.css(_,L));if(ge&&ge[3]!==le){for(ee=ee/2,le=le||ge[3],ge=+ee||1;G--;)m.style(_,L,ge+le),(1-V)*(1-(V=ne()/ee||.5))<=0&&(G=0),ge=ge/V;ge=ge*2,m.style(_,L,ge+le),F=F||[]}return F&&(ge=+ge||+ee||0,H=F[1]?ge+(F[1]+1)*F[2]:+F[2],D&&(D.unit=le,D.start=ge,D.end=H)),H}var pr={};function Is(_){var L,F=_.ownerDocument,D=_.nodeName,H=pr[D];return H||(L=F.body.appendChild(F.createElement(D)),H=m.css(L,"display"),L.parentNode.removeChild(L),H==="none"&&(H="block"),pr[D]=H,H)}function ti(_,L){for(var F,D,H=[],V=0,G=_.length;V<G;V++)D=_[V],D.style&&(F=D.style.display,L?(F==="none"&&(H[V]=we.get(D,"display")||null,H[V]||(D.style.display="")),D.style.display===""&&Pr(D)&&(H[V]=Is(D))):F!=="none"&&(H[V]="none",we.set(D,"display",F)));for(V=0;V<G;V++)H[V]!=null&&(_[V].style.display=H[V]);return _}m.fn.extend({show:function(){return ti(this,!0)},hide:function(){return ti(this)},toggle:function(_){return typeof _=="boolean"?_?this.show():this.hide():this.each(function(){Pr(this)?m(this).show():m(this).hide()})}});var gr=/^(?:checkbox|radio)$/i,Io=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Pn=/^$|^module$|\/(?:java|ecma)script/i;(function(){var _=x.createDocumentFragment(),L=_.appendChild(x.createElement("div")),F=x.createElement("input");F.setAttribute("type","radio"),F.setAttribute("checked","checked"),F.setAttribute("name","t"),L.appendChild(F),p.checkClone=L.cloneNode(!0).cloneNode(!0).lastChild.checked,L.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!L.cloneNode(!0).lastChild.defaultValue,L.innerHTML="<option></option>",p.option=!!L.lastChild})();var mn={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};mn.tbody=mn.tfoot=mn.colgroup=mn.caption=mn.thead,mn.th=mn.td,p.option||(mn.optgroup=mn.option=[1,"<select multiple='multiple'>","</select>"]);function an(_,L){var F;return typeof _.getElementsByTagName<"u"?F=_.getElementsByTagName(L||"*"):typeof _.querySelectorAll<"u"?F=_.querySelectorAll(L||"*"):F=[],L===void 0||L&&A(_,L)?m.merge([_],F):F}function Qi(_,L){for(var F=0,D=_.length;F<D;F++)we.set(_[F],"globalEval",!L||we.get(L[F],"globalEval"))}var Zi=/<|&#?\w+;/;function Os(_,L,F,D,H){for(var V,G,ne,ee,le,ge,be=L.createDocumentFragment(),fe=[],ke=0,nt=_.length;ke<nt;ke++)if(V=_[ke],V||V===0)if(v(V)==="object")m.merge(fe,V.nodeType?[V]:V);else if(!Zi.test(V))fe.push(L.createTextNode(V));else{for(G=G||be.appendChild(L.createElement("div")),ne=(Io.exec(V)||["",""])[1].toLowerCase(),ee=mn[ne]||mn._default,G.innerHTML=ee[1]+m.htmlPrefilter(V)+ee[2],ge=ee[0];ge--;)G=G.lastChild;m.merge(fe,G.childNodes),G=be.firstChild,G.textContent=""}for(be.textContent="",ke=0;V=fe[ke++];){if(D&&m.inArray(V,D)>-1){H&&H.push(V);continue}if(le=Rn(V),G=an(be.appendChild(V),"script"),le&&Qi(G),F)for(ge=0;V=G[ge++];)Pn.test(V.type||"")&&F.push(V)}return be}var Jn=/^([^.]*)(?:\.(.+)|)/;function wi(){return!0}function Si(){return!1}function Ra(_,L,F,D,H,V){var G,ne;if(typeof L=="object"){typeof F!="string"&&(D=D||F,F=void 0);for(ne in L)Ra(_,ne,F,D,L[ne],V);return _}if(D==null&&H==null?(H=F,D=F=void 0):H==null&&(typeof F=="string"?(H=D,D=void 0):(H=D,D=F,F=void 0)),H===!1)H=Si;else if(!H)return _;return V===1&&(G=H,H=function(ee){return m().off(ee),G.apply(this,arguments)},H.guid=G.guid||(G.guid=m.guid++)),_.each(function(){m.event.add(this,L,H,D,F)})}m.event={global:{},add:function(_,L,F,D,H){var V,G,ne,ee,le,ge,be,fe,ke,nt,yt,lt=we.get(_);if(me(_))for(F.handler&&(V=F,F=V.handler,H=V.selector),H&&m.find.matchesSelector(on,H),F.guid||(F.guid=m.guid++),(ee=lt.events)||(ee=lt.events=Object.create(null)),(G=lt.handle)||(G=lt.handle=function(_n){return typeof m<"u"&&m.event.triggered!==_n.type?m.event.dispatch.apply(_,arguments):void 0}),L=(L||"").match(Ce)||[""],le=L.length;le--;)ne=Jn.exec(L[le])||[],ke=yt=ne[1],nt=(ne[2]||"").split(".").sort(),ke&&(be=m.event.special[ke]||{},ke=(H?be.delegateType:be.bindType)||ke,be=m.event.special[ke]||{},ge=m.extend({type:ke,origType:yt,data:D,handler:F,guid:F.guid,selector:H,needsContext:H&&m.expr.match.needsContext.test(H),namespace:nt.join(".")},V),(fe=ee[ke])||(fe=ee[ke]=[],fe.delegateCount=0,(!be.setup||be.setup.call(_,D,nt,G)===!1)&&_.addEventListener&&_.addEventListener(ke,G)),be.add&&(be.add.call(_,ge),ge.handler.guid||(ge.handler.guid=F.guid)),H?fe.splice(fe.delegateCount++,0,ge):fe.push(ge),m.event.global[ke]=!0)},remove:function(_,L,F,D,H){var V,G,ne,ee,le,ge,be,fe,ke,nt,yt,lt=we.hasData(_)&&we.get(_);if(!(!lt||!(ee=lt.events))){for(L=(L||"").match(Ce)||[""],le=L.length;le--;){if(ne=Jn.exec(L[le])||[],ke=yt=ne[1],nt=(ne[2]||"").split(".").sort(),!ke){for(ke in ee)m.event.remove(_,ke+L[le],F,D,!0);continue}for(be=m.event.special[ke]||{},ke=(D?be.delegateType:be.bindType)||ke,fe=ee[ke]||[],ne=ne[2]&&new RegExp("(^|\\.)"+nt.join("\\.(?:.*\\.|)")+"(\\.|$)"),G=V=fe.length;V--;)ge=fe[V],(H||yt===ge.origType)&&(!F||F.guid===ge.guid)&&(!ne||ne.test(ge.namespace))&&(!D||D===ge.selector||D==="**"&&ge.selector)&&(fe.splice(V,1),ge.selector&&fe.delegateCount--,be.remove&&be.remove.call(_,ge));G&&!fe.length&&((!be.teardown||be.teardown.call(_,nt,lt.handle)===!1)&&m.removeEvent(_,ke,lt.handle),delete ee[ke])}m.isEmptyObject(ee)&&we.remove(_,"handle events")}},dispatch:function(_){var L,F,D,H,V,G,ne=new Array(arguments.length),ee=m.event.fix(_),le=(we.get(this,"events")||Object.create(null))[ee.type]||[],ge=m.event.special[ee.type]||{};for(ne[0]=ee,L=1;L<arguments.length;L++)ne[L]=arguments[L];if(ee.delegateTarget=this,!(ge.preDispatch&&ge.preDispatch.call(this,ee)===!1)){for(G=m.event.handlers.call(this,ee,le),L=0;(H=G[L++])&&!ee.isPropagationStopped();)for(ee.currentTarget=H.elem,F=0;(V=H.handlers[F++])&&!ee.isImmediatePropagationStopped();)(!ee.rnamespace||V.namespace===!1||ee.rnamespace.test(V.namespace))&&(ee.handleObj=V,ee.data=V.data,D=((m.event.special[V.origType]||{}).handle||V.handler).apply(H.elem,ne),D!==void 0&&(ee.result=D)===!1&&(ee.preventDefault(),ee.stopPropagation()));return ge.postDispatch&&ge.postDispatch.call(this,ee),ee.result}},handlers:function(_,L){var F,D,H,V,G,ne=[],ee=L.delegateCount,le=_.target;if(ee&&le.nodeType&&!(_.type==="click"&&_.button>=1)){for(;le!==this;le=le.parentNode||this)if(le.nodeType===1&&!(_.type==="click"&&le.disabled===!0)){for(V=[],G={},F=0;F<ee;F++)D=L[F],H=D.selector+" ",G[H]===void 0&&(G[H]=D.needsContext?m(H,this).index(le)>-1:m.find(H,this,null,[le]).length),G[H]&&V.push(D);V.length&&ne.push({elem:le,handlers:V})}}return le=this,ee<L.length&&ne.push({elem:le,handlers:L.slice(ee)}),ne},addProp:function(_,L){Object.defineProperty(m.Event.prototype,_,{enumerable:!0,configurable:!0,get:g(L)?function(){if(this.originalEvent)return L(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[_]},set:function(F){Object.defineProperty(this,_,{enumerable:!0,configurable:!0,writable:!0,value:F})}})},fix:function(_){return _[m.expando]?_:new m.Event(_)},special:{load:{noBubble:!0},click:{setup:function(_){var L=this||_;return gr.test(L.type)&&L.click&&A(L,"input")&&Ji(L,"click",!0),!1},trigger:function(_){var L=this||_;return gr.test(L.type)&&L.click&&A(L,"input")&&Ji(L,"click"),!0},_default:function(_){var L=_.target;return gr.test(L.type)&&L.click&&A(L,"input")&&we.get(L,"click")||A(L,"a")}},beforeunload:{postDispatch:function(_){_.result!==void 0&&_.originalEvent&&(_.originalEvent.returnValue=_.result)}}}};function Ji(_,L,F){if(!F){we.get(_,L)===void 0&&m.event.add(_,L,wi);return}we.set(_,L,!1),m.event.add(_,L,{namespace:!1,handler:function(D){var H,V=we.get(this,L);if(D.isTrigger&1&&this[L]){if(V)(m.event.special[L]||{}).delegateType&&D.stopPropagation();else if(V=o.call(arguments),we.set(this,L,V),this[L](),H=we.get(this,L),we.set(this,L,!1),V!==H)return D.stopImmediatePropagation(),D.preventDefault(),H}else V&&(we.set(this,L,m.event.trigger(V[0],V.slice(1),this)),D.stopPropagation(),D.isImmediatePropagationStopped=wi)}})}m.removeEvent=function(_,L,F){_.removeEventListener&&_.removeEventListener(L,F)},m.Event=function(_,L){if(!(this instanceof m.Event))return new m.Event(_,L);_&&_.type?(this.originalEvent=_,this.type=_.type,this.isDefaultPrevented=_.defaultPrevented||_.defaultPrevented===void 0&&_.returnValue===!1?wi:Si,this.target=_.target&&_.target.nodeType===3?_.target.parentNode:_.target,this.currentTarget=_.currentTarget,this.relatedTarget=_.relatedTarget):this.type=_,L&&m.extend(this,L),this.timeStamp=_&&_.timeStamp||Date.now(),this[m.expando]=!0},m.Event.prototype={constructor:m.Event,isDefaultPrevented:Si,isPropagationStopped:Si,isImmediatePropagationStopped:Si,isSimulated:!1,preventDefault:function(){var _=this.originalEvent;this.isDefaultPrevented=wi,_&&!this.isSimulated&&_.preventDefault()},stopPropagation:function(){var _=this.originalEvent;this.isPropagationStopped=wi,_&&!this.isSimulated&&_.stopPropagation()},stopImmediatePropagation:function(){var _=this.originalEvent;this.isImmediatePropagationStopped=wi,_&&!this.isSimulated&&_.stopImmediatePropagation(),this.stopPropagation()}},m.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},m.event.addProp),m.each({focus:"focusin",blur:"focusout"},function(_,L){function F(D){if(x.documentMode){var H=we.get(this,"handle"),V=m.event.fix(D);V.type=D.type==="focusin"?"focus":"blur",V.isSimulated=!0,H(D),V.target===V.currentTarget&&H(V)}else m.event.simulate(L,D.target,m.event.fix(D))}m.event.special[_]={setup:function(){var D;if(Ji(this,_,!0),x.documentMode)D=we.get(this,L),D||this.addEventListener(L,F),we.set(this,L,(D||0)+1);else return!1},trigger:function(){return Ji(this,_),!0},teardown:function(){var D;if(x.documentMode)D=we.get(this,L)-1,D?we.set(this,L,D):(this.removeEventListener(L,F),we.remove(this,L));else return!1},_default:function(D){return we.get(D.target,_)},delegateType:L},m.event.special[L]={setup:function(){var D=this.ownerDocument||this.document||this,H=x.documentMode?this:D,V=we.get(H,L);V||(x.documentMode?this.addEventListener(L,F):D.addEventListener(_,F,!0)),we.set(H,L,(V||0)+1)},teardown:function(){var D=this.ownerDocument||this.document||this,H=x.documentMode?this:D,V=we.get(H,L)-1;V?we.set(H,L,V):(x.documentMode?this.removeEventListener(L,F):D.removeEventListener(_,F,!0),we.remove(H,L))}}}),m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(_,L){m.event.special[_]={delegateType:L,bindType:L,handle:function(F){var D,H=this,V=F.relatedTarget,G=F.handleObj;return(!V||V!==H&&!m.contains(H,V))&&(F.type=G.origType,D=G.handler.apply(this,arguments),F.type=L),D}}}),m.fn.extend({on:function(_,L,F,D){return Ra(this,_,L,F,D)},one:function(_,L,F,D){return Ra(this,_,L,F,D,1)},off:function(_,L,F){var D,H;if(_&&_.preventDefault&&_.handleObj)return D=_.handleObj,m(_.delegateTarget).off(D.namespace?D.origType+"."+D.namespace:D.origType,D.selector,D.handler),this;if(typeof _=="object"){for(H in _)this.off(H,L,_[H]);return this}return(L===!1||typeof L=="function")&&(F=L,L=void 0),F===!1&&(F=Si),this.each(function(){m.event.remove(this,_,F,L)})}});var Pa=/<script|<style|<link/i,In=/checked\s*(?:[^=]|=\s*.checked.)/i,_u=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Fs(_,L){return A(_,"table")&&A(L.nodeType!==11?L:L.firstChild,"tr")&&m(_).children("tbody")[0]||_}function Cu(_){return _.type=(_.getAttribute("type")!==null)+"/"+_.type,_}function ku(_){return(_.type||"").slice(0,5)==="true/"?_.type=_.type.slice(5):_.removeAttribute("type"),_}function Ds(_,L){var F,D,H,V,G,ne,ee;if(L.nodeType===1){if(we.hasData(_)&&(V=we.get(_),ee=V.events,ee)){we.remove(L,"handle events");for(H in ee)for(F=0,D=ee[H].length;F<D;F++)m.event.add(L,H,ee[H][F])}He.hasData(_)&&(G=He.access(_),ne=m.extend({},G),He.set(L,ne))}}function vn(_,L){var F=L.nodeName.toLowerCase();F==="input"&&gr.test(_.type)?L.checked=_.checked:(F==="input"||F==="textarea")&&(L.defaultValue=_.defaultValue)}function xi(_,L,F,D){L=s(L);var H,V,G,ne,ee,le,ge=0,be=_.length,fe=be-1,ke=L[0],nt=g(ke);if(nt||be>1&&typeof ke=="string"&&!p.checkClone&&In.test(ke))return _.each(function(yt){var lt=_.eq(yt);nt&&(L[0]=ke.call(this,yt,lt.html())),xi(lt,L,F,D)});if(be&&(H=Os(L,_[0].ownerDocument,!1,_,D),V=H.firstChild,H.childNodes.length===1&&(H=V),V||D)){for(G=m.map(an(H,"script"),Cu),ne=G.length;ge<be;ge++)ee=H,ge!==fe&&(ee=m.clone(ee,!0,!0),ne&&m.merge(G,an(ee,"script"))),F.call(_[ge],ee,ge);if(ne)for(le=G[G.length-1].ownerDocument,m.map(G,ku),ge=0;ge<ne;ge++)ee=G[ge],Pn.test(ee.type||"")&&!we.access(ee,"globalEval")&&m.contains(le,ee)&&(ee.src&&(ee.type||"").toLowerCase()!=="module"?m._evalUrl&&!ee.noModule&&m._evalUrl(ee.src,{nonce:ee.nonce||ee.getAttribute("nonce")},le):T(ee.textContent.replace(_u,""),ee,le))}return _}function Ns(_,L,F){for(var D,H=L?m.filter(L,_):_,V=0;(D=H[V])!=null;V++)!F&&D.nodeType===1&&m.cleanData(an(D)),D.parentNode&&(F&&Rn(D)&&Qi(an(D,"script")),D.parentNode.removeChild(D));return _}m.extend({htmlPrefilter:function(_){return _},clone:function(_,L,F){var D,H,V,G,ne=_.cloneNode(!0),ee=Rn(_);if(!p.noCloneChecked&&(_.nodeType===1||_.nodeType===11)&&!m.isXMLDoc(_))for(G=an(ne),V=an(_),D=0,H=V.length;D<H;D++)vn(V[D],G[D]);if(L)if(F)for(V=V||an(_),G=G||an(ne),D=0,H=V.length;D<H;D++)Ds(V[D],G[D]);else Ds(_,ne);return G=an(ne,"script"),G.length>0&&Qi(G,!ee&&an(_,"script")),ne},cleanData:function(_){for(var L,F,D,H=m.event.special,V=0;(F=_[V])!==void 0;V++)if(me(F)){if(L=F[we.expando]){if(L.events)for(D in L.events)H[D]?m.event.remove(F,D):m.removeEvent(F,D,L.handle);F[we.expando]=void 0}F[He.expando]&&(F[He.expando]=void 0)}}}),m.fn.extend({detach:function(_){return Ns(this,_,!0)},remove:function(_){return Ns(this,_)},text:function(_){return Ut(this,function(L){return L===void 0?m.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=L)})},null,_,arguments.length)},append:function(){return xi(this,arguments,function(_){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var L=Fs(this,_);L.appendChild(_)}})},prepend:function(){return xi(this,arguments,function(_){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var L=Fs(this,_);L.insertBefore(_,L.firstChild)}})},before:function(){return xi(this,arguments,function(_){this.parentNode&&this.parentNode.insertBefore(_,this)})},after:function(){return xi(this,arguments,function(_){this.parentNode&&this.parentNode.insertBefore(_,this.nextSibling)})},empty:function(){for(var _,L=0;(_=this[L])!=null;L++)_.nodeType===1&&(m.cleanData(an(_,!1)),_.textContent="");return this},clone:function(_,L){return _=_??!1,L=L??_,this.map(function(){return m.clone(this,_,L)})},html:function(_){return Ut(this,function(L){var F=this[0]||{},D=0,H=this.length;if(L===void 0&&F.nodeType===1)return F.innerHTML;if(typeof L=="string"&&!Pa.test(L)&&!mn[(Io.exec(L)||["",""])[1].toLowerCase()]){L=m.htmlPrefilter(L);try{for(;D<H;D++)F=this[D]||{},F.nodeType===1&&(m.cleanData(an(F,!1)),F.innerHTML=L);F=0}catch{}}F&&this.empty().append(L)},null,_,arguments.length)},replaceWith:function(){var _=[];return xi(this,arguments,function(L){var F=this.parentNode;m.inArray(this,_)<0&&(m.cleanData(an(this)),F&&F.replaceChild(L,this))},_)}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(_,L){m.fn[_]=function(F){for(var D,H=[],V=m(F),G=V.length-1,ne=0;ne<=G;ne++)D=ne===G?this:this.clone(!0),m(V[ne])[L](D),d.apply(H,D.get());return this.pushStack(H)}});var Ia=new RegExp("^("+Xe+")(?!px)[a-z%]+$","i"),Oa=/^--/,Oo=function(_){var L=_.ownerDocument.defaultView;return(!L||!L.opener)&&(L=t),L.getComputedStyle(_)},Ir=function(_,L,F){var D,H,V={};for(H in L)V[H]=_.style[H],_.style[H]=L[H];D=F.call(_);for(H in L)_.style[H]=V[H];return D},Fa=new RegExp(kt.join("|"),"i");(function(){function _(){if(le){ee.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",le.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",on.appendChild(ee).appendChild(le);var ge=t.getComputedStyle(le);F=ge.top!=="1%",ne=L(ge.marginLeft)===12,le.style.right="60%",V=L(ge.right)===36,D=L(ge.width)===36,le.style.position="absolute",H=L(le.offsetWidth/3)===12,on.removeChild(ee),le=null}}function L(ge){return Math.round(parseFloat(ge))}var F,D,H,V,G,ne,ee=x.createElement("div"),le=x.createElement("div");le.style&&(le.style.backgroundClip="content-box",le.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle=le.style.backgroundClip==="content-box",m.extend(p,{boxSizingReliable:function(){return _(),D},pixelBoxStyles:function(){return _(),V},pixelPosition:function(){return _(),F},reliableMarginLeft:function(){return _(),ne},scrollboxSize:function(){return _(),H},reliableTrDimensions:function(){var ge,be,fe,ke;return G==null&&(ge=x.createElement("table"),be=x.createElement("tr"),fe=x.createElement("div"),ge.style.cssText="position:absolute;left:-11111px;border-collapse:separate",be.style.cssText="border:1px solid",be.style.height="1px",fe.style.height="9px",fe.style.display="block",on.appendChild(ge).appendChild(be).appendChild(fe),ke=t.getComputedStyle(be),G=parseInt(ke.height,10)+parseInt(ke.borderTopWidth,10)+parseInt(ke.borderBottomWidth,10)===be.offsetHeight,on.removeChild(ge)),G}}))})();function eo(_,L,F){var D,H,V,G,ne=Oa.test(L),ee=_.style;return F=F||Oo(_),F&&(G=F.getPropertyValue(L)||F[L],ne&&G&&(G=G.replace(M,"$1")||void 0),G===""&&!Rn(_)&&(G=m.style(_,L)),!p.pixelBoxStyles()&&Ia.test(G)&&Fa.test(L)&&(D=ee.width,H=ee.minWidth,V=ee.maxWidth,ee.minWidth=ee.maxWidth=ee.width=G,G=F.width,ee.width=D,ee.minWidth=H,ee.maxWidth=V)),G!==void 0?G+"":G}function to(_,L){return{get:function(){if(_()){delete this.get;return}return(this.get=L).apply(this,arguments)}}}var Fo=["Webkit","Moz","ms"],zs=x.createElement("div").style,Or={};function Bs(_){for(var L=_[0].toUpperCase()+_.slice(1),F=Fo.length;F--;)if(_=Fo[F]+L,_ in zs)return _}function Da(_){var L=m.cssProps[_]||Or[_];return L||(_ in zs?_:Or[_]=Bs(_)||_)}var Fr=/^(none|table(?!-c[ea]).+)/,Eu={position:"absolute",visibility:"hidden",display:"block"},Na={letterSpacing:"0",fontWeight:"400"};function js(_,L,F){var D=tt.exec(L);return D?Math.max(0,D[2]-(F||0))+(D[3]||"px"):L}function za(_,L,F,D,H,V){var G=L==="width"?1:0,ne=0,ee=0,le=0;if(F===(D?"border":"content"))return 0;for(;G<4;G+=2)F==="margin"&&(le+=m.css(_,F+kt[G],!0,H)),D?(F==="content"&&(ee-=m.css(_,"padding"+kt[G],!0,H)),F!=="margin"&&(ee-=m.css(_,"border"+kt[G]+"Width",!0,H))):(ee+=m.css(_,"padding"+kt[G],!0,H),F!=="padding"?ee+=m.css(_,"border"+kt[G]+"Width",!0,H):ne+=m.css(_,"border"+kt[G]+"Width",!0,H));return!D&&V>=0&&(ee+=Math.max(0,Math.ceil(_["offset"+L[0].toUpperCase()+L.slice(1)]-V-ee-ne-.5))||0),ee+le}function Hs(_,L,F){var D=Oo(_),H=!p.boxSizingReliable()||F,V=H&&m.css(_,"boxSizing",!1,D)==="border-box",G=V,ne=eo(_,L,D),ee="offset"+L[0].toUpperCase()+L.slice(1);if(Ia.test(ne)){if(!F)return ne;ne="auto"}return(!p.boxSizingReliable()&&V||!p.reliableTrDimensions()&&A(_,"tr")||ne==="auto"||!parseFloat(ne)&&m.css(_,"display",!1,D)==="inline")&&_.getClientRects().length&&(V=m.css(_,"boxSizing",!1,D)==="border-box",G=ee in _,G&&(ne=_[ee])),ne=parseFloat(ne)||0,ne+za(_,L,F||(V?"border":"content"),G,D,ne)+"px"}m.extend({cssHooks:{opacity:{get:function(_,L){if(L){var F=eo(_,"opacity");return F===""?"1":F}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(_,L,F,D){if(!(!_||_.nodeType===3||_.nodeType===8||!_.style)){var H,V,G,ne=Ht(L),ee=Oa.test(L),le=_.style;if(ee||(L=Da(ne)),G=m.cssHooks[L]||m.cssHooks[ne],F!==void 0){if(V=typeof F,V==="string"&&(H=tt.exec(F))&&H[1]&&(F=Ps(_,L,H),V="number"),F==null||F!==F)return;V==="number"&&!ee&&(F+=H&&H[3]||(m.cssNumber[ne]?"":"px")),!p.clearCloneStyle&&F===""&&L.indexOf("background")===0&&(le[L]="inherit"),(!G||!("set"in G)||(F=G.set(_,F,D))!==void 0)&&(ee?le.setProperty(L,F):le[L]=F)}else return G&&"get"in G&&(H=G.get(_,!1,D))!==void 0?H:le[L]}},css:function(_,L,F,D){var H,V,G,ne=Ht(L),ee=Oa.test(L);return ee||(L=Da(ne)),G=m.cssHooks[L]||m.cssHooks[ne],G&&"get"in G&&(H=G.get(_,!0,F)),H===void 0&&(H=eo(_,L,D)),H==="normal"&&L in Na&&(H=Na[L]),F===""||F?(V=parseFloat(H),F===!0||isFinite(V)?V||0:H):H}}),m.each(["height","width"],function(_,L){m.cssHooks[L]={get:function(F,D,H){if(D)return Fr.test(m.css(F,"display"))&&(!F.getClientRects().length||!F.getBoundingClientRect().width)?Ir(F,Eu,function(){return Hs(F,L,H)}):Hs(F,L,H)},set:function(F,D,H){var V,G=Oo(F),ne=!p.scrollboxSize()&&G.position==="absolute",ee=ne||H,le=ee&&m.css(F,"boxSizing",!1,G)==="border-box",ge=H?za(F,L,H,le,G):0;return le&&ne&&(ge-=Math.ceil(F["offset"+L[0].toUpperCase()+L.slice(1)]-parseFloat(G[L])-za(F,L,"border",!1,G)-.5)),ge&&(V=tt.exec(D))&&(V[3]||"px")!=="px"&&(F.style[L]=D,D=m.css(F,L)),js(F,D,ge)}}}),m.cssHooks.marginLeft=to(p.reliableMarginLeft,function(_,L){if(L)return(parseFloat(eo(_,"marginLeft"))||_.getBoundingClientRect().left-Ir(_,{marginLeft:0},function(){return _.getBoundingClientRect().left}))+"px"}),m.each({margin:"",padding:"",border:"Width"},function(_,L){m.cssHooks[_+L]={expand:function(F){for(var D=0,H={},V=typeof F=="string"?F.split(" "):[F];D<4;D++)H[_+kt[D]+L]=V[D]||V[D-2]||V[0];return H}},_!=="margin"&&(m.cssHooks[_+L].set=js)}),m.fn.extend({css:function(_,L){return Ut(this,function(F,D,H){var V,G,ne={},ee=0;if(Array.isArray(D)){for(V=Oo(F),G=D.length;ee<G;ee++)ne[D[ee]]=m.css(F,D[ee],!1,V);return ne}return H!==void 0?m.style(F,D,H):m.css(F,D)},_,L,arguments.length>1)}});function yn(_,L,F,D,H){return new yn.prototype.init(_,L,F,D,H)}m.Tween=yn,yn.prototype={constructor:yn,init:function(_,L,F,D,H,V){this.elem=_,this.prop=F,this.easing=H||m.easing._default,this.options=L,this.start=this.now=this.cur(),this.end=D,this.unit=V||(m.cssNumber[F]?"":"px")},cur:function(){var _=yn.propHooks[this.prop];return _&&_.get?_.get(this):yn.propHooks._default.get(this)},run:function(_){var L,F=yn.propHooks[this.prop];return this.options.duration?this.pos=L=m.easing[this.easing](_,this.options.duration*_,0,1,this.options.duration):this.pos=L=_,this.now=(this.end-this.start)*L+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),F&&F.set?F.set(this):yn.propHooks._default.set(this),this}},yn.prototype.init.prototype=yn.prototype,yn.propHooks={_default:{get:function(_){var L;return _.elem.nodeType!==1||_.elem[_.prop]!=null&&_.elem.style[_.prop]==null?_.elem[_.prop]:(L=m.css(_.elem,_.prop,""),!L||L==="auto"?0:L)},set:function(_){m.fx.step[_.prop]?m.fx.step[_.prop](_):_.elem.nodeType===1&&(m.cssHooks[_.prop]||_.elem.style[Da(_.prop)]!=null)?m.style(_.elem,_.prop,_.now+_.unit):_.elem[_.prop]=_.now}}},yn.propHooks.scrollTop=yn.propHooks.scrollLeft={set:function(_){_.elem.nodeType&&_.elem.parentNode&&(_.elem[_.prop]=_.now)}},m.easing={linear:function(_){return _},swing:function(_){return .5-Math.cos(_*Math.PI)/2},_default:"swing"},m.fx=yn.prototype.init,m.fx.step={};var mr,Do,no=/^(?:toggle|show|hide)$/,Vs=/queueHooks$/;function No(){Do&&(x.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(No):t.setTimeout(No,m.fx.interval),m.fx.tick())}function Ws(){return t.setTimeout(function(){mr=void 0}),mr=Date.now()}function ni(_,L){var F,D=0,H={height:_};for(L=L?1:0;D<4;D+=2-L)F=kt[D],H["margin"+F]=H["padding"+F]=_;return L&&(H.opacity=H.width=_),H}function zo(_,L,F){for(var D,H=(On.tweeners[L]||[]).concat(On.tweeners["*"]),V=0,G=H.length;V<G;V++)if(D=H[V].call(F,L,_))return D}function $u(_,L,F){var D,H,V,G,ne,ee,le,ge,be="width"in L||"height"in L,fe=this,ke={},nt=_.style,yt=_.nodeType&&Pr(_),lt=we.get(_,"fxshow");F.queue||(G=m._queueHooks(_,"fx"),G.unqueued==null&&(G.unqueued=0,ne=G.empty.fire,G.empty.fire=function(){G.unqueued||ne()}),G.unqueued++,fe.always(function(){fe.always(function(){G.unqueued--,m.queue(_,"fx").length||G.empty.fire()})}));for(D in L)if(H=L[D],no.test(H)){if(delete L[D],V=V||H==="toggle",H===(yt?"hide":"show"))if(H==="show"&<&<[D]!==void 0)yt=!0;else continue;ke[D]=lt&<[D]||m.style(_,D)}if(ee=!m.isEmptyObject(L),!(!ee&&m.isEmptyObject(ke))){be&&_.nodeType===1&&(F.overflow=[nt.overflow,nt.overflowX,nt.overflowY],le=lt&<.display,le==null&&(le=we.get(_,"display")),ge=m.css(_,"display"),ge==="none"&&(le?ge=le:(ti([_],!0),le=_.style.display||le,ge=m.css(_,"display"),ti([_]))),(ge==="inline"||ge==="inline-block"&&le!=null)&&m.css(_,"float")==="none"&&(ee||(fe.done(function(){nt.display=le}),le==null&&(ge=nt.display,le=ge==="none"?"":ge)),nt.display="inline-block")),F.overflow&&(nt.overflow="hidden",fe.always(function(){nt.overflow=F.overflow[0],nt.overflowX=F.overflow[1],nt.overflowY=F.overflow[2]})),ee=!1;for(D in ke)ee||(lt?"hidden"in lt&&(yt=lt.hidden):lt=we.access(_,"fxshow",{display:le}),V&&(lt.hidden=!yt),yt&&ti([_],!0),fe.done(function(){yt||ti([_]),we.remove(_,"fxshow");for(D in ke)m.style(_,D,ke[D])})),ee=zo(yt?lt[D]:0,D,fe),D in lt||(lt[D]=ee.start,yt&&(ee.end=ee.start,ee.start=0))}}function Us(_,L){var F,D,H,V,G;for(F in _)if(D=Ht(F),H=L[D],V=_[F],Array.isArray(V)&&(H=V[1],V=_[F]=V[0]),F!==D&&(_[D]=V,delete _[F]),G=m.cssHooks[D],G&&"expand"in G){V=G.expand(V),delete _[D];for(F in V)F in _||(_[F]=V[F],L[F]=H)}else L[D]=H}function On(_,L,F){var D,H,V=0,G=On.prefilters.length,ne=m.Deferred().always(function(){delete ee.elem}),ee=function(){if(H)return!1;for(var be=mr||Ws(),fe=Math.max(0,le.startTime+le.duration-be),ke=fe/le.duration||0,nt=1-ke,yt=0,lt=le.tweens.length;yt<lt;yt++)le.tweens[yt].run(nt);return ne.notifyWith(_,[le,nt,fe]),nt<1&<?fe:(lt||ne.notifyWith(_,[le,1,0]),ne.resolveWith(_,[le]),!1)},le=ne.promise({elem:_,props:m.extend({},L),opts:m.extend(!0,{specialEasing:{},easing:m.easing._default},F),originalProperties:L,originalOptions:F,startTime:mr||Ws(),duration:F.duration,tweens:[],createTween:function(be,fe){var ke=m.Tween(_,le.opts,be,fe,le.opts.specialEasing[be]||le.opts.easing);return le.tweens.push(ke),ke},stop:function(be){var fe=0,ke=be?le.tweens.length:0;if(H)return this;for(H=!0;fe<ke;fe++)le.tweens[fe].run(1);return be?(ne.notifyWith(_,[le,1,0]),ne.resolveWith(_,[le,be])):ne.rejectWith(_,[le,be]),this}}),ge=le.props;for(Us(ge,le.opts.specialEasing);V<G;V++)if(D=On.prefilters[V].call(le,_,ge,le.opts),D)return g(D.stop)&&(m._queueHooks(le.elem,le.opts.queue).stop=D.stop.bind(D)),D;return m.map(ge,zo,le),g(le.opts.start)&&le.opts.start.call(_,le),le.progress(le.opts.progress).done(le.opts.done,le.opts.complete).fail(le.opts.fail).always(le.opts.always),m.fx.timer(m.extend(ee,{elem:_,anim:le,queue:le.opts.queue})),le}m.Animation=m.extend(On,{tweeners:{"*":[function(_,L){var F=this.createTween(_,L);return Ps(F.elem,_,tt.exec(L),F),F}]},tweener:function(_,L){g(_)?(L=_,_=["*"]):_=_.match(Ce);for(var F,D=0,H=_.length;D<H;D++)F=_[D],On.tweeners[F]=On.tweeners[F]||[],On.tweeners[F].unshift(L)},prefilters:[$u],prefilter:function(_,L){L?On.prefilters.unshift(_):On.prefilters.push(_)}}),m.speed=function(_,L,F){var D=_&&typeof _=="object"?m.extend({},_):{complete:F||!F&&L||g(_)&&_,duration:_,easing:F&&L||L&&!g(L)&&L};return m.fx.off?D.duration=0:typeof D.duration!="number"&&(D.duration in m.fx.speeds?D.duration=m.fx.speeds[D.duration]:D.duration=m.fx.speeds._default),(D.queue==null||D.queue===!0)&&(D.queue="fx"),D.old=D.complete,D.complete=function(){g(D.old)&&D.old.call(this),D.queue&&m.dequeue(this,D.queue)},D},m.fn.extend({fadeTo:function(_,L,F,D){return this.filter(Pr).css("opacity",0).show().end().animate({opacity:L},_,F,D)},animate:function(_,L,F,D){var H=m.isEmptyObject(_),V=m.speed(L,F,D),G=function(){var ne=On(this,m.extend({},_),V);(H||we.get(this,"finish"))&&ne.stop(!0)};return G.finish=G,H||V.queue===!1?this.each(G):this.queue(V.queue,G)},stop:function(_,L,F){var D=function(H){var V=H.stop;delete H.stop,V(F)};return typeof _!="string"&&(F=L,L=_,_=void 0),L&&this.queue(_||"fx",[]),this.each(function(){var H=!0,V=_!=null&&_+"queueHooks",G=m.timers,ne=we.get(this);if(V)ne[V]&&ne[V].stop&&D(ne[V]);else for(V in ne)ne[V]&&ne[V].stop&&Vs.test(V)&&D(ne[V]);for(V=G.length;V--;)G[V].elem===this&&(_==null||G[V].queue===_)&&(G[V].anim.stop(F),H=!1,G.splice(V,1));(H||!F)&&m.dequeue(this,_)})},finish:function(_){return _!==!1&&(_=_||"fx"),this.each(function(){var L,F=we.get(this),D=F[_+"queue"],H=F[_+"queueHooks"],V=m.timers,G=D?D.length:0;for(F.finish=!0,m.queue(this,_,[]),H&&H.stop&&H.stop.call(this,!0),L=V.length;L--;)V[L].elem===this&&V[L].queue===_&&(V[L].anim.stop(!0),V.splice(L,1));for(L=0;L<G;L++)D[L]&&D[L].finish&&D[L].finish.call(this);delete F.finish})}}),m.each(["toggle","show","hide"],function(_,L){var F=m.fn[L];m.fn[L]=function(D,H,V){return D==null||typeof D=="boolean"?F.apply(this,arguments):this.animate(ni(L,!0),D,H,V)}}),m.each({slideDown:ni("show"),slideUp:ni("hide"),slideToggle:ni("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(_,L){m.fn[_]=function(F,D,H){return this.animate(L,F,D,H)}}),m.timers=[],m.fx.tick=function(){var _,L=0,F=m.timers;for(mr=Date.now();L<F.length;L++)_=F[L],!_()&&F[L]===_&&F.splice(L--,1);F.length||m.fx.stop(),mr=void 0},m.fx.timer=function(_){m.timers.push(_),m.fx.start()},m.fx.interval=13,m.fx.start=function(){Do||(Do=!0,No())},m.fx.stop=function(){Do=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(_,L){return _=m.fx&&m.fx.speeds[_]||_,L=L||"fx",this.queue(L,function(F,D){var H=t.setTimeout(F,_);D.stop=function(){t.clearTimeout(H)}})},function(){var _=x.createElement("input"),L=x.createElement("select"),F=L.appendChild(x.createElement("option"));_.type="checkbox",p.checkOn=_.value!=="",p.optSelected=F.selected,_=x.createElement("input"),_.value="t",_.type="radio",p.radioValue=_.value==="t"}();var Gs,_i=m.expr.attrHandle;m.fn.extend({attr:function(_,L){return Ut(this,m.attr,_,L,arguments.length>1)},removeAttr:function(_){return this.each(function(){m.removeAttr(this,_)})}}),m.extend({attr:function(_,L,F){var D,H,V=_.nodeType;if(!(V===3||V===8||V===2)){if(typeof _.getAttribute>"u")return m.prop(_,L,F);if((V!==1||!m.isXMLDoc(_))&&(H=m.attrHooks[L.toLowerCase()]||(m.expr.match.bool.test(L)?Gs:void 0)),F!==void 0){if(F===null){m.removeAttr(_,L);return}return H&&"set"in H&&(D=H.set(_,F,L))!==void 0?D:(_.setAttribute(L,F+""),F)}return H&&"get"in H&&(D=H.get(_,L))!==null?D:(D=m.find.attr(_,L),D??void 0)}},attrHooks:{type:{set:function(_,L){if(!p.radioValue&&L==="radio"&&A(_,"input")){var F=_.value;return _.setAttribute("type",L),F&&(_.value=F),L}}}},removeAttr:function(_,L){var F,D=0,H=L&&L.match(Ce);if(H&&_.nodeType===1)for(;F=H[D++];)_.removeAttribute(F)}}),Gs={set:function(_,L,F){return L===!1?m.removeAttr(_,F):_.setAttribute(F,F),F}},m.each(m.expr.match.bool.source.match(/\w+/g),function(_,L){var F=_i[L]||m.find.attr;_i[L]=function(D,H,V){var G,ne,ee=H.toLowerCase();return V||(ne=_i[ee],_i[ee]=G,G=F(D,H,V)!=null?ee:null,_i[ee]=ne),G}});var Bo=/^(?:input|select|textarea|button)$/i,ri=/^(?:a|area)$/i;m.fn.extend({prop:function(_,L){return Ut(this,m.prop,_,L,arguments.length>1)},removeProp:function(_){return this.each(function(){delete this[m.propFix[_]||_]})}}),m.extend({prop:function(_,L,F){var D,H,V=_.nodeType;if(!(V===3||V===8||V===2))return(V!==1||!m.isXMLDoc(_))&&(L=m.propFix[L]||L,H=m.propHooks[L]),F!==void 0?H&&"set"in H&&(D=H.set(_,F,L))!==void 0?D:_[L]=F:H&&"get"in H&&(D=H.get(_,L))!==null?D:_[L]},propHooks:{tabIndex:{get:function(_){var L=m.find.attr(_,"tabindex");return L?parseInt(L,10):Bo.test(_.nodeName)||ri.test(_.nodeName)&&_.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(m.propHooks.selected={get:function(_){var L=_.parentNode;return L&&L.parentNode&&L.parentNode.selectedIndex,null},set:function(_){var L=_.parentNode;L&&(L.selectedIndex,L.parentNode&&L.parentNode.selectedIndex)}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this});function ii(_){var L=_.match(Ce)||[];return L.join(" ")}function oi(_){return _.getAttribute&&_.getAttribute("class")||""}function er(_){return Array.isArray(_)?_:typeof _=="string"?_.match(Ce)||[]:[]}m.fn.extend({addClass:function(_){var L,F,D,H,V,G;return g(_)?this.each(function(ne){m(this).addClass(_.call(this,ne,oi(this)))}):(L=er(_),L.length?this.each(function(){if(D=oi(this),F=this.nodeType===1&&" "+ii(D)+" ",F){for(V=0;V<L.length;V++)H=L[V],F.indexOf(" "+H+" ")<0&&(F+=H+" ");G=ii(F),D!==G&&this.setAttribute("class",G)}}):this)},removeClass:function(_){var L,F,D,H,V,G;return g(_)?this.each(function(ne){m(this).removeClass(_.call(this,ne,oi(this)))}):arguments.length?(L=er(_),L.length?this.each(function(){if(D=oi(this),F=this.nodeType===1&&" "+ii(D)+" ",F){for(V=0;V<L.length;V++)for(H=L[V];F.indexOf(" "+H+" ")>-1;)F=F.replace(" "+H+" "," ");G=ii(F),D!==G&&this.setAttribute("class",G)}}):this):this.attr("class","")},toggleClass:function(_,L){var F,D,H,V,G=typeof _,ne=G==="string"||Array.isArray(_);return g(_)?this.each(function(ee){m(this).toggleClass(_.call(this,ee,oi(this),L),L)}):typeof L=="boolean"&&ne?L?this.addClass(_):this.removeClass(_):(F=er(_),this.each(function(){if(ne)for(V=m(this),H=0;H<F.length;H++)D=F[H],V.hasClass(D)?V.removeClass(D):V.addClass(D);else(_===void 0||G==="boolean")&&(D=oi(this),D&&we.set(this,"__className__",D),this.setAttribute&&this.setAttribute("class",D||_===!1?"":we.get(this,"__className__")||""))}))},hasClass:function(_){var L,F,D=0;for(L=" "+_+" ";F=this[D++];)if(F.nodeType===1&&(" "+ii(oi(F))+" ").indexOf(L)>-1)return!0;return!1}});var Ba=/\r/g;m.fn.extend({val:function(_){var L,F,D,H=this[0];return arguments.length?(D=g(_),this.each(function(V){var G;this.nodeType===1&&(D?G=_.call(this,V,m(this).val()):G=_,G==null?G="":typeof G=="number"?G+="":Array.isArray(G)&&(G=m.map(G,function(ne){return ne==null?"":ne+""})),L=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],(!L||!("set"in L)||L.set(this,G,"value")===void 0)&&(this.value=G))})):H?(L=m.valHooks[H.type]||m.valHooks[H.nodeName.toLowerCase()],L&&"get"in L&&(F=L.get(H,"value"))!==void 0?F:(F=H.value,typeof F=="string"?F.replace(Ba,""):F??"")):void 0}}),m.extend({valHooks:{option:{get:function(_){var L=m.find.attr(_,"value");return L??ii(m.text(_))}},select:{get:function(_){var L,F,D,H=_.options,V=_.selectedIndex,G=_.type==="select-one",ne=G?null:[],ee=G?V+1:H.length;for(V<0?D=ee:D=G?V:0;D<ee;D++)if(F=H[D],(F.selected||D===V)&&!F.disabled&&(!F.parentNode.disabled||!A(F.parentNode,"optgroup"))){if(L=m(F).val(),G)return L;ne.push(L)}return ne},set:function(_,L){for(var F,D,H=_.options,V=m.makeArray(L),G=H.length;G--;)D=H[G],(D.selected=m.inArray(m.valHooks.option.get(D),V)>-1)&&(F=!0);return F||(_.selectedIndex=-1),V}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(_,L){if(Array.isArray(L))return _.checked=m.inArray(m(_).val(),L)>-1}},p.checkOn||(m.valHooks[this].get=function(_){return _.getAttribute("value")===null?"on":_.value})});var ro=t.location,Ks={guid:Date.now()},ja=/\?/;m.parseXML=function(_){var L,F;if(!_||typeof _!="string")return null;try{L=new t.DOMParser().parseFromString(_,"text/xml")}catch{}return F=L&&L.getElementsByTagName("parsererror")[0],(!L||F)&&m.error("Invalid XML: "+(F?m.map(F.childNodes,function(D){return D.textContent}).join(`
|
||
`):_)),L};var io=/^(?:focusinfocus|focusoutblur)$/,tr=function(_){_.stopPropagation()};m.extend(m.event,{trigger:function(_,L,F,D){var H,V,G,ne,ee,le,ge,be,fe=[F||x],ke=u.call(_,"type")?_.type:_,nt=u.call(_,"namespace")?_.namespace.split("."):[];if(V=be=G=F=F||x,!(F.nodeType===3||F.nodeType===8)&&!io.test(ke+m.event.triggered)&&(ke.indexOf(".")>-1&&(nt=ke.split("."),ke=nt.shift(),nt.sort()),ee=ke.indexOf(":")<0&&"on"+ke,_=_[m.expando]?_:new m.Event(ke,typeof _=="object"&&_),_.isTrigger=D?2:3,_.namespace=nt.join("."),_.rnamespace=_.namespace?new RegExp("(^|\\.)"+nt.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,_.result=void 0,_.target||(_.target=F),L=L==null?[_]:m.makeArray(L,[_]),ge=m.event.special[ke]||{},!(!D&&ge.trigger&&ge.trigger.apply(F,L)===!1))){if(!D&&!ge.noBubble&&!b(F)){for(ne=ge.delegateType||ke,io.test(ne+ke)||(V=V.parentNode);V;V=V.parentNode)fe.push(V),G=V;G===(F.ownerDocument||x)&&fe.push(G.defaultView||G.parentWindow||t)}for(H=0;(V=fe[H++])&&!_.isPropagationStopped();)be=V,_.type=H>1?ne:ge.bindType||ke,le=(we.get(V,"events")||Object.create(null))[_.type]&&we.get(V,"handle"),le&&le.apply(V,L),le=ee&&V[ee],le&&le.apply&&me(V)&&(_.result=le.apply(V,L),_.result===!1&&_.preventDefault());return _.type=ke,!D&&!_.isDefaultPrevented()&&(!ge._default||ge._default.apply(fe.pop(),L)===!1)&&me(F)&&ee&&g(F[ke])&&!b(F)&&(G=F[ee],G&&(F[ee]=null),m.event.triggered=ke,_.isPropagationStopped()&&be.addEventListener(ke,tr),F[ke](),_.isPropagationStopped()&&be.removeEventListener(ke,tr),m.event.triggered=void 0,G&&(F[ee]=G)),_.result}},simulate:function(_,L,F){var D=m.extend(new m.Event,F,{type:_,isSimulated:!0});m.event.trigger(D,null,L)}}),m.fn.extend({trigger:function(_,L){return this.each(function(){m.event.trigger(_,L,this)})},triggerHandler:function(_,L){var F=this[0];if(F)return m.event.trigger(_,L,F,!0)}});var jo=/\[\]$/,Ho=/\r?\n/g,Vo=/^(?:submit|button|image|reset|file)$/i,qs=/^(?:input|select|textarea|keygen)/i;function ai(_,L,F,D){var H;if(Array.isArray(L))m.each(L,function(V,G){F||jo.test(_)?D(_,G):ai(_+"["+(typeof G=="object"&&G!=null?V:"")+"]",G,F,D)});else if(!F&&v(L)==="object")for(H in L)ai(_+"["+H+"]",L[H],F,D);else D(_,L)}m.param=function(_,L){var F,D=[],H=function(V,G){var ne=g(G)?G():G;D[D.length]=encodeURIComponent(V)+"="+encodeURIComponent(ne??"")};if(_==null)return"";if(Array.isArray(_)||_.jquery&&!m.isPlainObject(_))m.each(_,function(){H(this.name,this.value)});else for(F in _)ai(F,_[F],L,H);return D.join("&")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var _=m.prop(this,"elements");return _?m.makeArray(_):this}).filter(function(){var _=this.type;return this.name&&!m(this).is(":disabled")&&qs.test(this.nodeName)&&!Vo.test(_)&&(this.checked||!gr.test(_))}).map(function(_,L){var F=m(this).val();return F==null?null:Array.isArray(F)?m.map(F,function(D){return{name:L.name,value:D.replace(Ho,`\r
|
||
`)}}):{name:L.name,value:F.replace(Ho,`\r
|
||
`)}}).get()}});var Ys=/%20/g,Dr=/#.*$/,Ci=/([?&])_=[^&]*/,Xs=/^(.*?):[ \t]*([^\r\n]*)$/mg,ki=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Qs=/^(?:GET|HEAD)$/,Zs=/^\/\//,Js={},Ha={},Q="*/".concat("*"),se=x.createElement("a");se.href=ro.href;function U(_){return function(L,F){typeof L!="string"&&(F=L,L="*");var D,H=0,V=L.toLowerCase().match(Ce)||[];if(g(F))for(;D=V[H++];)D[0]==="+"?(D=D.slice(1)||"*",(_[D]=_[D]||[]).unshift(F)):(_[D]=_[D]||[]).push(F)}}function J(_,L,F,D){var H={},V=_===Ha;function G(ne){var ee;return H[ne]=!0,m.each(_[ne]||[],function(le,ge){var be=ge(L,F,D);if(typeof be=="string"&&!V&&!H[be])return L.dataTypes.unshift(be),G(be),!1;if(V)return!(ee=be)}),ee}return G(L.dataTypes[0])||!H["*"]&&G("*")}function ue(_,L){var F,D,H=m.ajaxSettings.flatOptions||{};for(F in L)L[F]!==void 0&&((H[F]?_:D||(D={}))[F]=L[F]);return D&&m.extend(!0,_,D),_}function Se(_,L,F){for(var D,H,V,G,ne=_.contents,ee=_.dataTypes;ee[0]==="*";)ee.shift(),D===void 0&&(D=_.mimeType||L.getResponseHeader("Content-Type"));if(D){for(H in ne)if(ne[H]&&ne[H].test(D)){ee.unshift(H);break}}if(ee[0]in F)V=ee[0];else{for(H in F){if(!ee[0]||_.converters[H+" "+ee[0]]){V=H;break}G||(G=H)}V=V||G}if(V)return V!==ee[0]&&ee.unshift(V),F[V]}function ze(_,L,F,D){var H,V,G,ne,ee,le={},ge=_.dataTypes.slice();if(ge[1])for(G in _.converters)le[G.toLowerCase()]=_.converters[G];for(V=ge.shift();V;)if(_.responseFields[V]&&(F[_.responseFields[V]]=L),!ee&&D&&_.dataFilter&&(L=_.dataFilter(L,_.dataType)),ee=V,V=ge.shift(),V){if(V==="*")V=ee;else if(ee!=="*"&&ee!==V){if(G=le[ee+" "+V]||le["* "+V],!G){for(H in le)if(ne=H.split(" "),ne[1]===V&&(G=le[ee+" "+ne[0]]||le["* "+ne[0]],G)){G===!0?G=le[H]:le[H]!==!0&&(V=ne[0],ge.unshift(ne[1]));break}}if(G!==!0)if(G&&_.throws)L=G(L);else try{L=G(L)}catch(be){return{state:"parsererror",error:G?be:"No conversion from "+ee+" to "+V}}}}return{state:"success",data:L}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ro.href,type:"GET",isLocal:ki.test(ro.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Q,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(_,L){return L?ue(ue(_,m.ajaxSettings),L):ue(m.ajaxSettings,_)},ajaxPrefilter:U(Js),ajaxTransport:U(Ha),ajax:function(_,L){typeof _=="object"&&(L=_,_=void 0),L=L||{};var F,D,H,V,G,ne,ee,le,ge,be,fe=m.ajaxSetup({},L),ke=fe.context||fe,nt=fe.context&&(ke.nodeType||ke.jquery)?m(ke):m.event,yt=m.Deferred(),lt=m.Callbacks("once memory"),_n=fe.statusCode||{},dn={},Ei={},$i="canceled",pt={readyState:0,getResponseHeader:function(bt){var Zt;if(ee){if(!V)for(V={};Zt=Xs.exec(H);)V[Zt[1].toLowerCase()+" "]=(V[Zt[1].toLowerCase()+" "]||[]).concat(Zt[2]);Zt=V[bt.toLowerCase()+" "]}return Zt==null?null:Zt.join(", ")},getAllResponseHeaders:function(){return ee?H:null},setRequestHeader:function(bt,Zt){return ee==null&&(bt=Ei[bt.toLowerCase()]=Ei[bt.toLowerCase()]||bt,dn[bt]=Zt),this},overrideMimeType:function(bt){return ee==null&&(fe.mimeType=bt),this},statusCode:function(bt){var Zt;if(bt)if(ee)pt.always(bt[pt.status]);else for(Zt in bt)_n[Zt]=[_n[Zt],bt[Zt]];return this},abort:function(bt){var Zt=bt||$i;return F&&F.abort(Zt),Va(0,Zt),this}};if(yt.promise(pt),fe.url=((_||fe.url||ro.href)+"").replace(Zs,ro.protocol+"//"),fe.type=L.method||L.type||fe.method||fe.type,fe.dataTypes=(fe.dataType||"*").toLowerCase().match(Ce)||[""],fe.crossDomain==null){ne=x.createElement("a");try{ne.href=fe.url,ne.href=ne.href,fe.crossDomain=se.protocol+"//"+se.host!=ne.protocol+"//"+ne.host}catch{fe.crossDomain=!0}}if(fe.data&&fe.processData&&typeof fe.data!="string"&&(fe.data=m.param(fe.data,fe.traditional)),J(Js,fe,L,pt),ee)return pt;le=m.event&&fe.global,le&&m.active++===0&&m.event.trigger("ajaxStart"),fe.type=fe.type.toUpperCase(),fe.hasContent=!Qs.test(fe.type),D=fe.url.replace(Dr,""),fe.hasContent?fe.data&&fe.processData&&(fe.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(fe.data=fe.data.replace(Ys,"+")):(be=fe.url.slice(D.length),fe.data&&(fe.processData||typeof fe.data=="string")&&(D+=(ja.test(D)?"&":"?")+fe.data,delete fe.data),fe.cache===!1&&(D=D.replace(Ci,"$1"),be=(ja.test(D)?"&":"?")+"_="+Ks.guid+++be),fe.url=D+be),fe.ifModified&&(m.lastModified[D]&&pt.setRequestHeader("If-Modified-Since",m.lastModified[D]),m.etag[D]&&pt.setRequestHeader("If-None-Match",m.etag[D])),(fe.data&&fe.hasContent&&fe.contentType!==!1||L.contentType)&&pt.setRequestHeader("Content-Type",fe.contentType),pt.setRequestHeader("Accept",fe.dataTypes[0]&&fe.accepts[fe.dataTypes[0]]?fe.accepts[fe.dataTypes[0]]+(fe.dataTypes[0]!=="*"?", "+Q+"; q=0.01":""):fe.accepts["*"]);for(ge in fe.headers)pt.setRequestHeader(ge,fe.headers[ge]);if(fe.beforeSend&&(fe.beforeSend.call(ke,pt,fe)===!1||ee))return pt.abort();if($i="abort",lt.add(fe.complete),pt.done(fe.success),pt.fail(fe.error),F=J(Ha,fe,L,pt),!F)Va(-1,"No Transport");else{if(pt.readyState=1,le&&nt.trigger("ajaxSend",[pt,fe]),ee)return pt;fe.async&&fe.timeout>0&&(G=t.setTimeout(function(){pt.abort("timeout")},fe.timeout));try{ee=!1,F.send(dn,Va)}catch(bt){if(ee)throw bt;Va(-1,bt)}}function Va(bt,Zt,Tu,Ng){var Ti,Au,Ai,Wo,Uo,Nr=Zt;ee||(ee=!0,G&&t.clearTimeout(G),F=void 0,H=Ng||"",pt.readyState=bt>0?4:0,Ti=bt>=200&&bt<300||bt===304,Tu&&(Wo=Se(fe,pt,Tu)),!Ti&&m.inArray("script",fe.dataTypes)>-1&&m.inArray("json",fe.dataTypes)<0&&(fe.converters["text script"]=function(){}),Wo=ze(fe,Wo,pt,Ti),Ti?(fe.ifModified&&(Uo=pt.getResponseHeader("Last-Modified"),Uo&&(m.lastModified[D]=Uo),Uo=pt.getResponseHeader("etag"),Uo&&(m.etag[D]=Uo)),bt===204||fe.type==="HEAD"?Nr="nocontent":bt===304?Nr="notmodified":(Nr=Wo.state,Au=Wo.data,Ai=Wo.error,Ti=!Ai)):(Ai=Nr,(bt||!Nr)&&(Nr="error",bt<0&&(bt=0))),pt.status=bt,pt.statusText=(Zt||Nr)+"",Ti?yt.resolveWith(ke,[Au,Nr,pt]):yt.rejectWith(ke,[pt,Nr,Ai]),pt.statusCode(_n),_n=void 0,le&&nt.trigger(Ti?"ajaxSuccess":"ajaxError",[pt,fe,Ti?Au:Ai]),lt.fireWith(ke,[pt,Nr]),le&&(nt.trigger("ajaxComplete",[pt,fe]),--m.active||m.event.trigger("ajaxStop")))}return pt},getJSON:function(_,L,F){return m.get(_,L,F,"json")},getScript:function(_,L){return m.get(_,void 0,L,"script")}}),m.each(["get","post"],function(_,L){m[L]=function(F,D,H,V){return g(D)&&(V=V||H,H=D,D=void 0),m.ajax(m.extend({url:F,type:L,dataType:V,data:D,success:H},m.isPlainObject(F)&&F))}}),m.ajaxPrefilter(function(_){var L;for(L in _.headers)L.toLowerCase()==="content-type"&&(_.contentType=_.headers[L]||"")}),m._evalUrl=function(_,L,F){return m.ajax({url:_,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(D){m.globalEval(D,L,F)}})},m.fn.extend({wrapAll:function(_){var L;return this[0]&&(g(_)&&(_=_.call(this[0])),L=m(_,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&L.insertBefore(this[0]),L.map(function(){for(var F=this;F.firstElementChild;)F=F.firstElementChild;return F}).append(this)),this},wrapInner:function(_){return g(_)?this.each(function(L){m(this).wrapInner(_.call(this,L))}):this.each(function(){var L=m(this),F=L.contents();F.length?F.wrapAll(_):L.append(_)})},wrap:function(_){var L=g(_);return this.each(function(F){m(this).wrapAll(L?_.call(this,F):_)})},unwrap:function(_){return this.parent(_).not("body").each(function(){m(this).replaceWith(this.childNodes)}),this}}),m.expr.pseudos.hidden=function(_){return!m.expr.pseudos.visible(_)},m.expr.pseudos.visible=function(_){return!!(_.offsetWidth||_.offsetHeight||_.getClientRects().length)},m.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var Qe={0:200,1223:204},Ze=m.ajaxSettings.xhr();p.cors=!!Ze&&"withCredentials"in Ze,p.ajax=Ze=!!Ze,m.ajaxTransport(function(_){var L,F;if(p.cors||Ze&&!_.crossDomain)return{send:function(D,H){var V,G=_.xhr();if(G.open(_.type,_.url,_.async,_.username,_.password),_.xhrFields)for(V in _.xhrFields)G[V]=_.xhrFields[V];_.mimeType&&G.overrideMimeType&&G.overrideMimeType(_.mimeType),!_.crossDomain&&!D["X-Requested-With"]&&(D["X-Requested-With"]="XMLHttpRequest");for(V in D)G.setRequestHeader(V,D[V]);L=function(ne){return function(){L&&(L=F=G.onload=G.onerror=G.onabort=G.ontimeout=G.onreadystatechange=null,ne==="abort"?G.abort():ne==="error"?typeof G.status!="number"?H(0,"error"):H(G.status,G.statusText):H(Qe[G.status]||G.status,G.statusText,(G.responseType||"text")!=="text"||typeof G.responseText!="string"?{binary:G.response}:{text:G.responseText},G.getAllResponseHeaders()))}},G.onload=L(),F=G.onerror=G.ontimeout=L("error"),G.onabort!==void 0?G.onabort=F:G.onreadystatechange=function(){G.readyState===4&&t.setTimeout(function(){L&&F()})},L=L("abort");try{G.send(_.hasContent&&_.data||null)}catch(ne){if(L)throw ne}},abort:function(){L&&L()}}}),m.ajaxPrefilter(function(_){_.crossDomain&&(_.contents.script=!1)}),m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(_){return m.globalEval(_),_}}}),m.ajaxPrefilter("script",function(_){_.cache===void 0&&(_.cache=!1),_.crossDomain&&(_.type="GET")}),m.ajaxTransport("script",function(_){if(_.crossDomain||_.scriptAttrs){var L,F;return{send:function(D,H){L=m("<script>").attr(_.scriptAttrs||{}).prop({charset:_.scriptCharset,src:_.url}).on("load error",F=function(V){L.remove(),F=null,V&&H(V.type==="error"?404:200,V.type)}),x.head.appendChild(L[0])},abort:function(){F&&F()}}}});var Oe=[],at=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var _=Oe.pop()||m.expando+"_"+Ks.guid++;return this[_]=!0,_}}),m.ajaxPrefilter("json jsonp",function(_,L,F){var D,H,V,G=_.jsonp!==!1&&(at.test(_.url)?"url":typeof _.data=="string"&&(_.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&at.test(_.data)&&"data");if(G||_.dataTypes[0]==="jsonp")return D=_.jsonpCallback=g(_.jsonpCallback)?_.jsonpCallback():_.jsonpCallback,G?_[G]=_[G].replace(at,"$1"+D):_.jsonp!==!1&&(_.url+=(ja.test(_.url)?"&":"?")+_.jsonp+"="+D),_.converters["script json"]=function(){return V||m.error(D+" was not called"),V[0]},_.dataTypes[0]="json",H=t[D],t[D]=function(){V=arguments},F.always(function(){H===void 0?m(t).removeProp(D):t[D]=H,_[D]&&(_.jsonpCallback=L.jsonpCallback,Oe.push(D)),V&&g(H)&&H(V[0]),V=H=void 0}),"script"}),p.createHTMLDocument=function(){var _=x.implementation.createHTMLDocument("").body;return _.innerHTML="<form></form><form></form>",_.childNodes.length===2}(),m.parseHTML=function(_,L,F){if(typeof _!="string")return[];typeof L=="boolean"&&(F=L,L=!1);var D,H,V;return L||(p.createHTMLDocument?(L=x.implementation.createHTMLDocument(""),D=L.createElement("base"),D.href=x.location.href,L.head.appendChild(D)):L=x),H=re.exec(_),V=!F&&[],H?[L.createElement(H[1])]:(H=Os([_],L,V),V&&V.length&&m(V).remove(),m.merge([],H.childNodes))},m.fn.load=function(_,L,F){var D,H,V,G=this,ne=_.indexOf(" ");return ne>-1&&(D=ii(_.slice(ne)),_=_.slice(0,ne)),g(L)?(F=L,L=void 0):L&&typeof L=="object"&&(H="POST"),G.length>0&&m.ajax({url:_,type:H||"GET",dataType:"html",data:L}).done(function(ee){V=arguments,G.html(D?m("<div>").append(m.parseHTML(ee)).find(D):ee)}).always(F&&function(ee,le){G.each(function(){F.apply(this,V||[ee.responseText,le,ee])})}),this},m.expr.pseudos.animated=function(_){return m.grep(m.timers,function(L){return _===L.elem}).length},m.offset={setOffset:function(_,L,F){var D,H,V,G,ne,ee,le,ge=m.css(_,"position"),be=m(_),fe={};ge==="static"&&(_.style.position="relative"),ne=be.offset(),V=m.css(_,"top"),ee=m.css(_,"left"),le=(ge==="absolute"||ge==="fixed")&&(V+ee).indexOf("auto")>-1,le?(D=be.position(),G=D.top,H=D.left):(G=parseFloat(V)||0,H=parseFloat(ee)||0),g(L)&&(L=L.call(_,F,m.extend({},ne))),L.top!=null&&(fe.top=L.top-ne.top+G),L.left!=null&&(fe.left=L.left-ne.left+H),"using"in L?L.using.call(_,fe):be.css(fe)}},m.fn.extend({offset:function(_){if(arguments.length)return _===void 0?this:this.each(function(H){m.offset.setOffset(this,_,H)});var L,F,D=this[0];if(D)return D.getClientRects().length?(L=D.getBoundingClientRect(),F=D.ownerDocument.defaultView,{top:L.top+F.pageYOffset,left:L.left+F.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var _,L,F,D=this[0],H={top:0,left:0};if(m.css(D,"position")==="fixed")L=D.getBoundingClientRect();else{for(L=this.offset(),F=D.ownerDocument,_=D.offsetParent||F.documentElement;_&&(_===F.body||_===F.documentElement)&&m.css(_,"position")==="static";)_=_.parentNode;_&&_!==D&&_.nodeType===1&&(H=m(_).offset(),H.top+=m.css(_,"borderTopWidth",!0),H.left+=m.css(_,"borderLeftWidth",!0))}return{top:L.top-H.top-m.css(D,"marginTop",!0),left:L.left-H.left-m.css(D,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var _=this.offsetParent;_&&m.css(_,"position")==="static";)_=_.offsetParent;return _||on})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(_,L){var F=L==="pageYOffset";m.fn[_]=function(D){return Ut(this,function(H,V,G){var ne;if(b(H)?ne=H:H.nodeType===9&&(ne=H.defaultView),G===void 0)return ne?ne[L]:H[V];ne?ne.scrollTo(F?ne.pageXOffset:G,F?G:ne.pageYOffset):H[V]=G},_,D,arguments.length)}}),m.each(["top","left"],function(_,L){m.cssHooks[L]=to(p.pixelPosition,function(F,D){if(D)return D=eo(F,L),Ia.test(D)?m(F).position()[L]+"px":D})}),m.each({Height:"height",Width:"width"},function(_,L){m.each({padding:"inner"+_,content:L,"":"outer"+_},function(F,D){m.fn[D]=function(H,V){var G=arguments.length&&(F||typeof H!="boolean"),ne=F||(H===!0||V===!0?"margin":"border");return Ut(this,function(ee,le,ge){var be;return b(ee)?D.indexOf("outer")===0?ee["inner"+_]:ee.document.documentElement["client"+_]:ee.nodeType===9?(be=ee.documentElement,Math.max(ee.body["scroll"+_],be["scroll"+_],ee.body["offset"+_],be["offset"+_],be["client"+_])):ge===void 0?m.css(ee,le,ne):m.style(ee,le,ge,ne)},L,G?H:void 0,G)}})}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(_,L){m.fn[L]=function(F){return this.on(L,F)}}),m.fn.extend({bind:function(_,L,F){return this.on(_,null,L,F)},unbind:function(_,L){return this.off(_,null,L)},delegate:function(_,L,F,D){return this.on(L,_,F,D)},undelegate:function(_,L,F){return arguments.length===1?this.off(_,"**"):this.off(L,_||"**",F)},hover:function(_,L){return this.mouseenter(_).mouseleave(L||_)}}),m.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(_,L){m.fn[L]=function(F,D){return arguments.length>0?this.on(L,null,F,D):this.trigger(L)}});var Ft=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;m.proxy=function(_,L){var F,D,H;if(typeof L=="string"&&(F=_[L],L=_,_=F),!!g(_))return D=o.call(arguments,2),H=function(){return _.apply(L||this,D.concat(o.call(arguments)))},H.guid=_.guid=_.guid||m.guid++,H},m.holdReady=function(_){_?m.readyWait++:m.ready(!0)},m.isArray=Array.isArray,m.parseJSON=JSON.parse,m.nodeName=A,m.isFunction=g,m.isWindow=b,m.camelCase=Ht,m.type=v,m.now=Date.now,m.isNumeric=function(_){var L=m.type(_);return(L==="number"||L==="string")&&!isNaN(_-parseFloat(_))},m.trim=function(_){return _==null?"":(_+"").replace(Ft,"$1")};var xt=t.jQuery,sn=t.$;return m.noConflict=function(_){return t.$===m&&(t.$=sn),_&&t.jQuery===m&&(t.jQuery=xt),m},typeof n>"u"&&(t.jQuery=t.$=m),m})})(pC);var m3=pC.exports;const Kn=Es(m3);var Wr;let Lt=(Wr=class{static init(t){return Wr._instance||(Wr._instance=new Wr(t)),Wr._instance}static enable(){Wr._instance.enabled=!0}static disable(){Wr._instance.enabled=!1}static debug(...t){Wr._instance.enabled&&console.log("CozyNest:DEBUG:",...t)}static log(...t){console.log("CozyNest:",...t)}static error(...t){console.error("CozyNest:",...t)}constructor(t){this.enabled=t}},Nd(Wr,"_instance",null),Wr);Lt.init(!1);window.CozyLogger=Lt;const ts=class{static time(t){return ts.timers[t]=new ts(t),ts.timers[t]}static end(t){const n=ts.timers[t].end();return Lt.debug(`SimpleTimer: end ${t} in ${n}ms`),n}static last(t){return localStorage.getItem(t)&&Number(localStorage.getItem(t))}static get(t){return ts.timers[t].get()}constructor(t){this.timerName=t,this.startTime=new Date}get(){return new Date-this.startTime}end(){const n=new Date-this.startTime;return localStorage.setItem(this.timerName,`${n}`),n}};let yr=ts;Nd(yr,"timers",{});const wv=e=>(e=e||COZY_NEST_CONFIG.color_mode,e),fd=e=>{const t=parseInt(e.replace("#",""),16),n=t>>16&255,r=t>>8&255,i=t&255;return`${n} ${r} ${i}`},v3=(e,t)=>{const n=e.split("."),r=t.split(".");for(let i=0;i<Math.max(n.length,r.length);i++){const o=parseInt(n[i])||0,s=parseInt(r[i])||0;if(o<s)return!1;if(o>s)return!0}return!0},f0=e=>{const t=e.replace("#",""),n=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),i=parseInt(t.substr(4,2),16);return(.2126*n+.7152*r+.0722*i)/255};function Rw(e,t){let n=e.parentElement;for(;n!==null;){if(n.matches(t))return n;n=n.parentElement}return null}const Ug=.75,y3=e=>{e=e.replace("#","");const t=parseInt(e.substr(0,2),16),n=parseInt(e.substr(2,2),16),r=parseInt(e.substr(4,2),16),i=Math.floor(t*Ug),o=Math.floor(n*Ug),s=Math.floor(r*Ug);return`rgb(${i},${o},${s})`},b3=()=>new URLSearchParams(window.location.search).get("CozyNest")==="No"||window.location.hash.includes("CozyNest=No")?(Lt.log("Cozy Nest disabled by url param"),document.querySelectorAll("link").forEach(n=>{n.href.includes("Cozy-Nest")&&n.remove()}),!0):!1,w3=()=>{const e=document.querySelector("#txt2img_lora_cards"),t=e.firstChild;for(let n=0;n<100;n++){const r=e.querySelector(".card").cloneNode(!0);e.insertBefore(r,t)}},S3=()=>{const t=document.querySelector("#txt2img_controlnet").parentElement;for(let n=0;n<100;n++){const r=t.cloneNode(!0);t.parentElement.insertBefore(r,t)}},x3=()=>{const e=$("#txt2img_lora_subdirs");e.append(e.html())},hh="CozyNest:tweakLoadDuration",Ql="CozyNest:gradioLoadDuration",Pw=420,Iw=320,ph=200,_3="unknown",vs="sd.next",gC="auto1111",mC="<div id='nevy_waves'><div class='wave'></div> <div class='wave'></div><div class='wave'></div></div>",C3='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z"/></svg>',k3='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128H144zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39V184c0-13.3-10.7-24-24-24s-24 10.7-24 24V318.1l-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z"/></svg>',E3='<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>',$3='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>';function vC(e){COZY_NEST_CONFIG.waves_color=e;const t=fd(e);document.querySelectorAll(".wave").forEach(n=>{n.setAttribute("style",`background: rgb(${t} / 16%)`)})}function yC(e){COZY_NEST_CONFIG.color_mode==="dark"?COZY_NEST_CONFIG.font_color=e:COZY_NEST_CONFIG.font_color_light=e;const t=fd(e);document.querySelector(":root").style.setProperty("--nevysha-font-color",`rgb(${t})`),document.querySelector(":root").style.setProperty("--nevysha-font-color-subdued",y3(e))}function T3(e){COZY_NEST_CONFIG.color_mode=e,wv(e)==="light"?document.querySelector("body").classList.add("nevysha-light"):(document.querySelector("body").classList.remove("nevysha-light"),document.querySelector("body").classList.add("dark"))}function bC(e){COZY_NEST_CONFIG.bg_gradiant_color=e;const t=fd(e);document.querySelector(":root").style.setProperty("--nevysha-gradiant-1",`rgb(${t})`)}function wC(e,t){COZY_NEST_CONFIG.accent_color=e;const n=fd(e);document.querySelector(":root").style.setProperty("--ae-primary-color",`rgb(${n})`),f0(t)>.5?document.querySelector(":root").style.setProperty("--nevysha-color-from-luminance","black"):document.querySelector(":root").style.setProperty("--nevysha-color-from-luminance","white")}function A3(e){COZY_NEST_CONFIG.secondary_accent_color=e;const t=fd(e);document.querySelector(":root").style.setProperty("--secondary-accent-color",`rgb(${t})`),f0(e)>.5?document.querySelector(":root").style.setProperty("--secondary-accent-color-from-luminance","black"):document.querySelector(":root").style.setProperty("--secondary-accent-color-from-luminance","white")}const M3=e=>{COZY_NEST_CONFIG.disable_waves_and_gradiant=e;const t=Kn(".wave"),n=Kn("body");e?(t.css("animation","none"),n.css("animation","none"),n.css("background-position","75% 75%")):(t.css("animation",""),n.css("animation",""),n.css("background-position",""))},L3=(e,t)=>{COZY_NEST_CONFIG.accent_generate_button=e,document.querySelectorAll('button[id$="_generate"]').forEach(n=>{if(e){let r="";f0(t)>.5&&(r="color: black !important"),n.setAttribute("style",`background: var(--ae-primary-color) !important; ${r}`)}else n.setAttribute("style","")})},R3=e=>{COZY_NEST_CONFIG.font_size=e,document.querySelector(":root").style.setProperty("--nevysha-text-md",`${e}px`),kp()},P3=e=>{COZY_NEST_CONFIG.card_height=e,document.querySelector(":root").style.setProperty("--extra-network-card-height",`${e}em`)},I3=e=>{COZY_NEST_CONFIG.card_width=e,document.querySelector(":root").style.setProperty("--extra-network-card-width",`${e}em`)},O3=e=>{var t,n;COZY_NEST_CONFIG.main_menu_position=e,e==="top"||e==="top_centered"?(document.querySelector(".nevysha.nevysha-tabnav").classList.add("menu-fix-top"),document.querySelector(".gradio-container.app").classList.add("menu-fix-top"),(t=document.querySelector("#nevysha-btn-menu-wrapper"))==null||t.classList.add("menu-fix-top"),document.querySelector(":root").style.setProperty("--nevysha-margin-left","0"),document.querySelector(":root").style.setProperty("--menu-top-height","25px"),e==="top_centered"?document.querySelector(".nevysha.nevysha-tabnav").classList.add("center-menu-items"):document.querySelector(".nevysha.nevysha-tabnav").classList.remove("center-menu-items")):(document.querySelector(".nevysha.nevysha-tabnav").classList.remove("center-menu-items"),document.querySelector(".nevysha.nevysha-tabnav").classList.remove("menu-fix-top"),document.querySelector(".gradio-container.app").classList.remove("menu-fix-top"),(n=document.querySelector("#nevysha-btn-menu-wrapper"))==null||n.classList.remove("menu-fix-top"),document.querySelector(":root").style.setProperty("--nevysha-margin-left","175px"),document.querySelector(":root").style.setProperty("--menu-top-height","1px")),kp()},F3=e=>{COZY_NEST_CONFIG.quicksettings_position=e,e==="split"?(document.querySelector("#quicksettings_gap").classList.add("nevysha-quicksettings-gap"),document.querySelector("#quicksettings").classList.remove("centered-quicksettings")):e==="centered"?(document.querySelector("#quicksettings_gap").classList.remove("nevysha-quicksettings-gap"),document.querySelector("#quicksettings").classList.add("centered-quicksettings")):(document.querySelector("#quicksettings_gap").classList.remove("nevysha-quicksettings-gap"),document.querySelector("#quicksettings").classList.remove("centered-quicksettings"))},D3=e=>{COZY_NEST_CONFIG.sfw_mode=e,e?document.querySelector("body").classList.add("nsfw"):document.querySelector("body").classList.remove("nsfw")},kp=()=>{let e=0;const t=document.getElementById("tabs"),n=document.querySelector("#footer #footer");let r;if(n?r=n.offsetHeight:COZY_NEST_CONFIG.webui===vs?r=5:r=0,COZY_NEST_CONFIG.main_menu_position!=="left"){e=document.querySelector(".tab-nav.nevysha-tabnav").offsetHeight+2,document.querySelector(":root").style.setProperty("--menu-top-height",`${e}px`);const o=Kn(".gradio-container.app");o.attr("style",`${o.attr("style")} padding-top: ${e}px !important;`);const d=t.getBoundingClientRect().top;document.querySelector(":root").style.setProperty("--main-container-height",`${window.innerHeight-(d+r)}px`),window.troubleshootSize={menuHeight:e,footerHeight:r,tabsTop:d,WindowInnerHeight:window.innerHeight,bodyHeight:window.innerHeight-(d+r),"main-container-height":`${window.innerHeight-(d+r)}px`}}else{document.querySelector(":root").style.setProperty("--menu-top-height","1px");const i=Kn(".gradio-container.app");i.attr("style",`${i.attr("style")} padding-top: ${e}px !important;`);const s=t.getBoundingClientRect().top;document.querySelector(":root").style.setProperty("--main-container-height",`${window.innerHeight-(s+r)}px`),window.troubleshootSize={menuHeight:e,footerHeight:r,tabsTop:s,WindowInnerHeight:window.innerHeight,bodyHeight:window.innerHeight-(s+r),"main-container-height":`${window.innerHeight-(s+r)}px`}}},N3=({prefix:e})=>{const t=document.querySelectorAll(`#tab_${e} div#${e}_results > *:not(#${e}_results)`),n=t[1].querySelectorAll(`#html_info_${e}, #html_log_${e}`),r=document.createElement("div");r.classList.add("preview-block-wrapper");const i=document.createElement("button");i.id="toggleGenInfoButton",i.classList.add("nevysha","lg","primary","gradio-button","btn"),i.textContent="Show/Hide Generation Info",i.addEventListener("click",()=>{n.forEach(o=>o.style.display=o.style.display==="none"?"":"none")}),r.appendChild(i),n.forEach(o=>r.appendChild(o)),t[1].appendChild(r),n.forEach(o=>o.style.display="none"),t[1].style=""};function z3({prefix:e}){const t=document.getElementById(`${e}_settings`);t.parentElement.classList.add("nevysha","settings-gradio-parent");const n=document.getElementById(`${e}_toprow`),r=document.getElementById(`${e}_generate`),i=t.querySelectorAll(`:scope > :not(#${e}_toprow)`),o=document.createElement("div");o.classList.add("nevysha","settings-wrapper");for(let c of i)c.classList.add("nevysha","settings-child"),o.appendChild(c);t.appendChild(o),o.insertBefore(n,o.firstChild),r.classList.add("nevysha","generate-button"),t.insertBefore(r,t.firstChild);const s=document.getElementById(`${e}_skip`);s.classList.add("nevysha","skip-button");const d=document.getElementById(`${e}_interrupt`);d.classList.add("nevysha","interrupt-button");const a=document.createElement("div");a.classList.add("nevysha","skip-interrupt-wrapper"),a.appendChild(s),a.appendChild(d),t.insertBefore(a,t.firstChild)}function SC(){const e=document.createElement("div");e.classList.add("vertical-line-wrapper");const t=document.createElement("div");return t.classList.add("vertical-line"),e.appendChild(t),e}var Ur;let Ef=(Ur=class{static start(){Ur._instance||(Ur._instance=new Ur),Ur._instance.pushLoading(),Ur._instance.setupObserver()}static stop(){Ur._instance&&Ur._instance.observer.disconnect(),document.querySelector("#nevysha-loading-wrap").remove()}constructor(){this.observer=null}setupObserver(){const t=yr.last(Ql)+2e3,n=t||15e3;this.observer=new MutationObserver(i=>{if(i[0].target.id!=="loading_step_estimator"){const o=yr.get(Ql);if(o<n+1e3){const s=Math.min(Math.round(o/n*100),99);document.querySelector("#loading_step_estimator").innerText=`${s}%`}else document.querySelector("#loading_step_estimator").innerText="Woops, it's taking longer than expected...";this.pushLoading()}});const r={attributes:!0,childList:!0,subtree:!0};this.observer.observe(document.body,r)}pushLoading(){if(document.querySelector("#nevysha-loading"))return;const n=`<div id='nevysha-loading-wrap' class='nevysha ${wv()==="light"?"nevysha-light":""}'>
|
||
<div id='nevysha-loading' class='nevysha'>
|
||
<div class="nevysha-loading-progress">
|
||
<div class="nevysha-cozy-nest-app-name animate__animated animate__backInLeft">
|
||
Cozy Nest
|
||
</div>
|
||
${E3}
|
||
<div id="loading_step_estimator" class="subtext3 animate__animated animate__pulse animate__infinite">
|
||
1
|
||
</div>
|
||
<div class="subtext1 animate__animated animate__pulse animate__infinite">
|
||
Loading The Magic
|
||
</div>
|
||
<div class="subtext2 animate__animated animate__pulse animate__infinite">
|
||
(and gradio)
|
||
</div>
|
||
</div>
|
||
${mC}
|
||
<div class="footer">Made by Nevysha with <span class="heart">❤</span> and <span class="coffee">☕</span></div>
|
||
</div>
|
||
</div>`;document.querySelector("body").insertAdjacentHTML("beforeend",n);let r=JSON.parse(localStorage.getItem("COZY_NEST_CONFIG"));r={waves_color:"#ffffff",bg_gradiant_color:"#ffffff",accent_color:"#ffffff",font_color:"#ffffff",font_color_light:"#000000",...r},vC(r.waves_color),bC(r.bg_gradiant_color),wC(r.accent_color,r.accent_color),yC(wv()==="light"?r.font_color_light:r.font_color)}},Nd(Ur,"_instance",null),Ur);function B3(){const e=`
|
||
<div id="dialog-message-wrap" title="🥺 Woops - Cozy Nest Error ?" style="display:none;">
|
||
<div id="dialog-message">
|
||
<div class="header">
|
||
<h1>🥺 Woops - Cozy Nest Error ?</h1>
|
||
<button class="lg primary gradio-button svelte-1ipelgc nevysha" onClick="hideInstanceInfoDialog();return false;">Close</button>
|
||
</div>
|
||
|
||
<p class="cozynest-error-tips">Want to report an issue ? Screenshot me and post me on <a href="https://github.com/Nevysha/Cozy-Nest">Github</a></p>
|
||
<fieldset>
|
||
<legend>Instance info</legend>
|
||
<div class="versions cozyerror" id="cozynest-error-instance-info"></div>
|
||
</fieldset>
|
||
<fieldset class="extensions-list">
|
||
<legend>Extensions</legend>
|
||
<div class="cozyerror" id="cozynest-error-extentions"></div>
|
||
</fieldset>
|
||
<div id="cozy_nest_error_handling_display"></div>
|
||
<div id="cozy_nest_error_handling_display_stack" /></div>
|
||
</div>
|
||
</div>
|
||
`;document.querySelector("body").insertAdjacentHTML("beforeend",e)}function xC(){document.querySelector("#cozy_nest_error_handling_display").innerHTML="",document.querySelector("#cozy_nest_error_handling_display_stack").innerHTML="",document.querySelector("#cozy_nest_error_handling_display_stack").setAttribute("style","display: none;"),document.querySelector("#cozynest-error-instance-info").innerHTML=document.querySelector(".versions").innerHTML+`<br><br>Browser: <span>${navigator.userAgent}</span><br><br>Window size: <span>${window.innerWidth}x${window.innerHeight}</span><br><br>WebUI: <span>${COZY_NEST_CONFIG.webui}</span>`,document.querySelector("#cozynest-error-extentions").innerHTML=document.querySelector("#tabs_extensions").querySelector("#extensions").parentElement.innerHTML,document.querySelector("#cozynest-error-extentions > table").querySelectorAll("tr").forEach(e=>{var n;if(!e.querySelector("td"))return;let t=e.querySelector("td").querySelector("label > input");t||(t=e.querySelector("td").querySelector("input"),(n=e.querySelector("button"))==null||n.setAttribute("disabled","disabled")),t.checked?t.setAttribute("disabled","disabled"):e.setAttribute("style","display: none;")})}function _C(){Kn("#dialog-message-wrap").css("display","flex")}function j3(){Kn("#dialog-message-wrap").css("display","none")}window.hideInstanceInfoDialog=j3;function H3(){xC(),_C()}window.gatherInfoAndShowDialog=H3;function Ow({prefix:e}){if(!COZY_NEST_CONFIG.enable_clear_button){Lt.debug("Clear button is disabled");return}const t=document.querySelector(`#${e}_gallery`);function n(c){a.style.display="block"}const r={childList:!0,subtree:!0};function i(c,l){var u;for(const h of c)h.type==="childList"&&h.removedNodes.length>0&&(u=h.removedNodes[0].classList)!=null&&u.contains("empty")&&n()}new MutationObserver(i).observe(t,r);function s(){const c=document.createElement("button");return c.id=`${e}_gallery_clear_button`,c.classList.add("nevysha","lg","primary","gradio-button"),c.style.display="none",c.title="Clear generated images gallery",c.innerHTML=$3,c.addEventListener("click",()=>{t.querySelectorAll("img").forEach(l=>{l&&(l.parentNode.style.display="none",d(l))}),c.style.display="none"}),t.insertAdjacentElement("beforebegin",c),c}function d(c){function l(f,p){for(const g of f)g.type==="attributes"&&g.attributeName==="src"&&(c.parentNode.style.display="block",p.disconnect(),a.style.display="block")}const u={attributes:!0,attributeFilter:["src"]};new MutationObserver(l).observe(c,u)}const a=s()}let Sv,CC,kC;function V3(){const e=`
|
||
<div id="cozy-alert-wrap" title="Cozy Alert" style="display:none;">
|
||
<div>
|
||
<div class="header">
|
||
<h1 id="cozy-alert-title"></h1>
|
||
</div>
|
||
<p id="cozy-alert-msg"></p>
|
||
<button class="lg primary gradio-button svelte-1ipelgc nevysha" id="cozy-alert-close">Close</button>
|
||
</div>
|
||
</div>
|
||
`;document.querySelector("body").insertAdjacentHTML("beforeend",e),Sv=document.querySelector("#cozy-alert-wrap"),CC=document.querySelector("#cozy-alert-title"),kC=document.querySelector("#cozy-alert-msg"),document.querySelector("#cozy-alert-close").addEventListener("click",()=>{Sv.setAttribute("style","display: none;"),$f&&($f(),$f=null)})}let $f=null;function Zl(e,t,n){CC.innerHTML=e,kC.innerHTML=t,Sv.setAttribute("style","display: flex;"),$f=n}window.showAlert=Zl;const EC={clear_prompt(e){return`${e}_clear_prompt`},extra_networks_btn(e){return`${e}_extra_networks`}},$C={clear_prompt(e){return`${e}_clear_prompt_btn`},extra_networks_btn(e){return`${e}_extra_networks_btn`}},Tf=Object.keys(EC),Af=Object.keys($C),W3=Tf.length,U3=Af.length;W3!==U3?(console.warn("Cozy-Nest: a1111 and sdNext do not have the same number of keys."),console.warn("Cozy-Nest: a1111 keys: ",Tf),console.warn("Cozy-Nest: sdNext keys: ",Af)):Tf.forEach((e,t)=>{e!==Af[t]&&(console.warn("Cozy-Nest: a1111 and sdNext do not have the same keys."),console.warn("Cozy-Nest: a1111 keys: ",Tf),console.warn("Cozy-Nest: sdNext keys: ",Af))});const Lc={get(e){let t;return COZY_NEST_CONFIG.webui===vs?t=$C:t=EC,t[e]||console.warn(`Cozy-Nest: DOM ID ${e} not found.`),t[e]}};window.$=window.jQuery=Kn;const G3=({prefix:e})=>{const t=document.getElementById(`${e}_settings`);t.style.minWidth=`min(${Pw}px, 100%)`;const n=SC();t.insertAdjacentElement("afterend",n);const r=t.parentElement;r.classList.add("nevysha","resizable-children-container");const i=document.getElementById(`${e}_results`);t.style.minWidth=`min(${Iw}px, 100%)`;let o=localStorage.getItem(`${e}_linePosition`);o||(o=50,localStorage.setItem(`${e}_linePosition`,`${o}`)),t.style.flexBasis=`${o}%`,i.style.flexBasis=`${100-o}%`;let s=!1;n.addEventListener("mousedown",d=>{s=!0,d.preventDefault()}),document.addEventListener("mousemove",d=>{if(!s)return;const a=document.querySelector(`#tab_${e}`);let c=a.offsetLeft,l=a.offsetParent;for(;l;)c+=l.offsetLeft,l=l.offsetParent;const u=r.offsetWidth,f=(d.clientX-c)/u*100;f<=Pw/u*100||f>=(1-Iw/u)*100||(localStorage.setItem(`${e}_linePosition`,`${f}`),t.style.flexBasis=`${f}%`,i.style.flexBasis=`${100-f}%`)}),document.addEventListener("mouseup",()=>{s=!1})},K3=()=>{document.querySelectorAll("button").forEach(e=>{e.textContent.includes("📂")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"/></svg>'),e.textContent.includes("🔄")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"/></svg>'),e.textContent.includes("↙️")&&(e.innerHTML='<svg class="nevysha svg-icon rotate" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg>'),e.textContent.includes("🗑️")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg>'),e.textContent.includes("🎴")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"/></svg>'),e.textContent.includes("📋")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M280 64h40c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128C0 92.7 28.7 64 64 64h40 9.6C121 27.5 153.3 0 192 0s71 27.5 78.4 64H280zM64 112c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320c8.8 0 16-7.2 16-16V128c0-8.8-7.2-16-16-16H304v24c0 13.3-10.7 24-24 24H192 104c-13.3 0-24-10.7-24-24V112H64zm128-8a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"/></svg>'),e.textContent.includes("💾")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M48 96V416c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V170.5c0-4.2-1.7-8.3-4.7-11.3l33.9-33.9c12 12 18.7 28.3 18.7 45.3V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96C0 60.7 28.7 32 64 32H309.5c17 0 33.3 6.7 45.3 18.7l74.5 74.5-33.9 33.9L320.8 84.7c-.3-.3-.5-.5-.8-.8V184c0 13.3-10.7 24-24 24H104c-13.3 0-24-10.7-24-24V80H64c-8.8 0-16 7.2-16 16zm80-16v80H272V80H128zm32 240a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"/></svg>'),e.textContent.includes("🎲️")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!-- Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M592 192H473.26c12.69 29.59 7.12 65.2-17 89.32L320 417.58V464c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V240c0-26.51-21.49-48-48-48zM480 376c-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 24zm-46.37-186.7L258.7 14.37c-19.16-19.16-50.23-19.16-69.39 0L14.37 189.3c-19.16 19.16-19.16 50.23 0 69.39L189.3 433.63c19.16 19.16 50.23 19.16 69.39 0L433.63 258.7c19.16-19.17 19.16-50.24 0-69.4zM96 248c-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 24zm128 128c-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 24zm0-128c-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 24zm0-128c-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 24zm128 128c-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"/></svg>'),e.textContent.includes("♻️")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M174.7 45.1C192.2 17 223 0 256 0s63.8 17 81.3 45.1l38.6 61.7 27-15.6c8.4-4.9 18.9-4.2 26.6 1.7s11.1 15.9 8.6 25.3l-23.4 87.4c-3.4 12.8-16.6 20.4-29.4 17l-87.4-23.4c-9.4-2.5-16.3-10.4-17.6-20s3.4-19.1 11.8-23.9l28.4-16.4L283 79c-5.8-9.3-16-15-27-15s-21.2 5.7-27 15l-17.5 28c-9.2 14.8-28.6 19.5-43.6 10.5c-15.3-9.2-20.2-29.2-10.7-44.4l17.5-28zM429.5 251.9c15-9 34.4-4.3 43.6 10.5l24.4 39.1c9.4 15.1 14.4 32.4 14.6 50.2c.3 53.1-42.7 96.4-95.8 96.4L320 448v32c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-64-64c-9.4-9.4-9.4-24.6 0-33.9l64-64c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2v32l96.2 0c17.6 0 31.9-14.4 31.8-32c0-5.9-1.7-11.7-4.8-16.7l-24.4-39.1c-9.5-15.2-4.7-35.2 10.7-44.4zm-364.6-31L36 204.2c-8.4-4.9-13.1-14.3-11.8-23.9s8.2-17.5 17.6-20l87.4-23.4c12.8-3.4 26 4.2 29.4 17L182 241.2c2.5 9.4-.9 19.3-8.6 25.3s-18.2 6.6-26.6 1.7l-26.5-15.3L68.8 335.3c-3.1 5-4.8 10.8-4.8 16.7c-.1 17.6 14.2 32 31.8 32l32.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32.2 0C42.7 448-.3 404.8 0 351.6c.1-17.8 5.1-35.1 14.6-50.2l50.3-80.5z"/></svg>')})};function q3(){const e=document.getElementById("img2maskimg"),t=document.createElement("button");t.setAttribute("id","expendBtn"),t.setAttribute("class","nevysha lg primary gradio-button btn"),t.textContent="Expand",e.insertAdjacentElement("beforeend",t);const n=document.getElementById("img2maskimg");let r=n.getAttribute("style"),i=[],o=!1;t.addEventListener("click",()=>{if(document.querySelectorAll("canvas")){if(o)t.textContent="Expand",t.style.position="absolute",n.setAttribute("style",r),document.querySelector("#img2maskimg > .image-container").querySelector("button:nth-child(3)").style.display="block",i.forEach(s=>{document.getElementById(s.id).setAttribute("style",s.defaultStyle)});else{t.textContent="Reduce",t.style.position="fixed",n.style.position="fixed",n.style.zIndex=999,n.style.top="5px",n.style.left="5px",n.style.width="calc(100vw - 10px)",n.style.height="calc(100vh - 10px)",n.style.overflow="",document.querySelector("#img2maskimg > .image-container").querySelector("button:nth-child(3)").style.display="none";const s=document.querySelectorAll("canvas");i=[],s.forEach(d=>{let a=`nevysha-${d.getAttribute("key")}-canvas`;d.setAttribute("id",a),d.classList.add("nevysha"),i.push({id:a,defaultStyle:d.getAttribute("style")}),d.style.maxWidth="calc(100vw - 20px)",d.style.width="",d.style.maxHeight="calc(100vh - 20px)",d.style.height=""})}o=!o}})}function Y3(e){document.getElementById(`${e.prefix}_gallery_container`).classList.add("nevysha","nevysha-scrollable")}function X3(){const e=new MutationObserver((r,i)=>{for(const o of r)if(o.type==="childList"&&Array.from(o.addedNodes).find(a=>a.id==="AWQ-container")){i.disconnect(),n();break}}),t={childList:!0,subtree:!0};e.observe(document.documentElement,t);const n=()=>{const r=document.querySelector("#AWQ-container"),i=document.createElement("div");i.id="nevysha_awq_wrapper",i.style.zIndex="9999",i.style.display="none",i.style.position="fixed",i.style.bottom="30px",document.body.appendChild(i),i.appendChild(r);const o=document.createElement("button");o.classList.add("nevysha-btn-menu","nevysha-btn-menu-awq","gradio-button","primary","nevysha"),o.id="nevyui_awq_btn",o.innerHTML="Show/Hide AWQ",o.title="Show/Hide AWQ",o.setAttribute("style","position: fixed; bottom: 0; left: calc(50% - 75px); width: 150px;"),document.querySelector("div.app").insertAdjacentElement("beforeend",o),o.addEventListener("click",()=>{i.style.display==="none"?i.style.display="block":i.style.display="none"})}}const Q3=()=>{const e=document.createElement("div");e.classList.add("nevysha-btn-menu-wrapper"),e.id="nevysha-btn-menu-wrapper";const t=`<button class="nevysha-btn-menu" id="nevyui_update_info" title="Nevysha Cozy Nest Update Info">${k3}</button>`;e.insertAdjacentHTML("beforeend",t),document.querySelector("#tabs > div.tab-nav").insertAdjacentElement("beforeend",e);const n=document.createElement("div");n.classList.add("nevysha-update-tab","nevysha","nevysha-tab","nevysha-tab-settings"),n.id="nevyui_update_info_panel",n.style="display: none;",document.querySelector("#tabs").insertAdjacentElement("beforeend",n);function r(){let i=!1;document.querySelector("#nevyui_update_info").addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),document.querySelector("#tab_nevyui").style.display="block",i?Kn("#nevyui_update_info_panel").slideUp(ph):Kn("#nevyui_update_info_panel").slideDown(ph),i=!i})}r(),Z3().then(i=>i)};async function Z3(){const e=await(await fetch(`file=extensions/Cozy-Nest/version_data.json?${new Date}`)).json(),t=await(await fetch(`https://raw.githubusercontent.com/Nevysha/Cozy-Nest/main/version_data.json?${new Date}`)).json();let n=await(await fetch(`https://raw.githubusercontent.com/Nevysha/Cozy-Nest/main/PATCHNOTE.md?t=${new Date}`)).text(),r=`<div class="nevysha-tabnav nevysha-tabnav-settings"><h2 class="nevysha-tabnav-title">Patchnote [${t.version}]</h2></div>`;document.querySelector("#nevyui_update_info_panel").insertAdjacentHTML("beforeend",r);const i=/\[x\]/g;n=n.replace(i,"");const o=/\[ \]/g;n=n.replace(o,"");const d=`<article class="markdown-body nevysha nevysha-scrollable">${new g3.Converter().makeHtml(n)}</article>`;document.querySelector("#nevyui_update_info_panel").insertAdjacentHTML("beforeend",d);const a=document.createElement("div");a.classList.add("nevysha-version-info","nevysha-emphasis"),a.id="nevysha-version-info",document.querySelector("#nevyui_update_info_panel").insertAdjacentElement("afterbegin",a);const c='<button class="nevysha-btn-menu lg primary gradio-button nevysha generate-button" id="nevyui_update_btn" title="Update Cozy Nest">Update</button>';if(document.querySelector("#nevysha-version-info").insertAdjacentHTML("beforeend",c),document.querySelector("#nevyui_update_btn").addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),document.querySelector("#nevyui_sh_options_update").click(),document.querySelector("#nevyui_update_btn").innerHTML="Update in progress...",setTimeout(()=>{document.querySelector("#settings_restart_gradio").click()},5e3)}),v3(e.version,t.version)){const u=`<p class="nevysha-version-info-text">You are up to date! (installed: v${e.version})</p>`;document.querySelector("#nevysha-version-info").insertAdjacentHTML("afterbegin",u),document.querySelector("#nevyui_update_btn").style.display="none",document.getElementsByClassName("versions")[0].innerHTML+='⠀•⠀Cozy Nest: <a href="https://github.com/Nevysha/Cozy-Nest" target="_blank">⠀v'+e.version+"</a>"}else{const u=`<p class="nevysha-version-info-text">An update is available! (installed: v${e.version}, new : v${t.version})</p>`;document.querySelector("#nevysha-version-info").insertAdjacentHTML("afterbegin",u),document.querySelector("#nevyui_update_info > svg").style.fill="red",document.getElementsByClassName("versions")[0].innerHTML+=`⠀•⠀Cozy Nest:⠀<span style="color: #f9e02d; text-decoration: underline;" title="Nevysha's Cozy Nest Update Available! Latest version: v`+t.version+`.
|
||
View update info in the top-right corner for more details.">v`+e.version+"</span>"}const l='<button class="nevysha-btn-menu lg primary gradio-button nevysha generate-button" id="nevyui_update_info_close_btn" title="Close">Close</button>';document.querySelector("#nevysha-version-info").insertAdjacentHTML("afterbegin",l),document.querySelector("#nevyui_update_info_close_btn").addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),document.querySelector("#nevyui_update_info").click()})}const J3=()=>{const e=document.createElement("button"),t=document.querySelector("div#tabs > .tab-nav");e.setAttribute("id","nevysha_tab_wrapper"),e.classList.add("nevysha","tab-wrapper"),t.querySelector("button").classList.forEach(f=>{f.startsWith("svelte-")&&e.classList.add(f)}),e.innerHTML="Others",t.insertBefore(e,t.lastChild);const n=document.createElement("div");n.setAttribute("id","nevysha_other_tabs"),n.classList.add("nevysha","other-tabs"),n.style.display="none",e.appendChild(n);let r=!1;e.addEventListener("click",f=>{f.preventDefault(),f.stopPropagation(),r?Kn("#nevysha_other_tabs").slideUp(100):Kn("#nevysha_other_tabs").slideDown(200),r=!r});function i(f){f.dataTransfer.setData("text/plain",f.target.id)}function o(f){const p=JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[];p.includes(f.target.id)||(p.push(f.target.id),localStorage.setItem("nevysha_moved_tabs",JSON.stringify(p)))}function s(f){f.preventDefault()}function d(f){if(n.querySelector(`button #${f.id}`))return;const p=document.createElement("button");p.setAttribute("id",f.id),p.classList.add("nevysha","tab-nav","nevysha-other-tab"),p.setAttribute("draggable",!0),p.addEventListener("dragstart",i),p.addEventListener("dragend",o),p.addEventListener("click",x=>{x.preventDefault(),x.stopPropagation(),document.querySelector(`div#tabs > .tab-nav > #${f.id}`).click(),Kn("#nevysha_other_tabs").slideUp(),r=!r}),f.style.display="none",n.appendChild(p);const g=document.createElement("span");g.setAttribute("id",`remove-${f.id}`),g.classList.add("remove-nevysha-other-tab"),g.innerHTML="X",g.addEventListener("click",x=>{x.preventDefault(),x.stopPropagation(),n.removeChild(p),document.querySelector(`div#tabs > .tab-nav > #${f.id}`).style.display="block";const S=JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[],T=S.indexOf(f.id);T>-1&&S.splice(T,1),localStorage.setItem("nevysha_moved_tabs",JSON.stringify(S))}),p.appendChild(g);const b=document.createElement("span");b.classList.add("nevysha-other-tab-text"),b.innerHTML=f.innerHTML,p.appendChild(b)}function a(f){f.preventDefault();const p=document.querySelector(`button#${f.dataTransfer.getData("text/plain")}`);d(p),r=!r}n.addEventListener("dragover",s),n.addEventListener("drop",a);const c=t.querySelectorAll("button");function l(f){f.id||!f.innerText||(f.id=f.innerText.toLowerCase().replace(/\s/g,"_").replace(/[0-9]/g,""),f.setAttribute("draggable",!0),f.addEventListener("dragstart",i),f.addEventListener("dragend",o))}c.forEach(f=>{l(f),(JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[]).includes(f.id)&&d(f)});const u=new MutationObserver(f=>{f.forEach(p=>{if(p.type!=="childList"||p.addedNodes.length===0)return;const g=p.addedNodes[0];l(g),(JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[]).includes(g.id)&&(g.style.display="none",d(g))})}),h={attributes:!1,childList:!0,subtree:!1};u.observe(t,h)};function Gg(e,t,n,r){const i=document.createElement("button");i.setAttribute("id",`${e}_right_button`),i.classList.add("nevysha","lg","primary","gradio-button"),i.innerHTML=`<div>${t}</div>`,n.appendChild(i);const o=`<div id="${e}_panel" class="nevysha slide-right-browser-panel" style="display: none">
|
||
<div class="nevysha slide-right-browser-panel-container nevysha-scrollable">
|
||
<div class="nevysha" id="${e}-react"/>
|
||
</div>
|
||
</div>`;r.insertAdjacentHTML("beforeend",o);const s=SC(),d=document.querySelector(`#${e}_panel`),a=localStorage.getItem(`${e}_panelWidth`);a&&(d.style.width=a),d.appendChild(s);const c=document.createElement("button");c.setAttribute("id",`floating_close_${e}__panel_button`),c.classList.add("nevysha","lg","primary","gradio-button","nevysha-extra-network-floating-btn"),c.innerHTML="<div>Close</div>",c.addEventListener("click",f=>{i.click()}),s.insertBefore(c,s.firstChild),s.addEventListener("mousedown",function(f){f.preventDefault();let p=d.offsetWidth,g=f.clientX;document.addEventListener("mousemove",b),document.addEventListener("mouseup",x);function b(S){const T=S.clientX-g;d.style.width=p-T+"px"}function x(){localStorage.setItem(`${e}_panelWidth`,d.style.width),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",x)}});function l(){const f=document.querySelector(`#${e}_panel`);f.style.display==="none"?(f.style.display="flex",f.style.marginRight=`-${f.offsetWidth}px`,Kn(f).animate({"margin-right":`+=${f.offsetWidth}`},ph)):Kn(f).animate({"margin-right":`-=${f.offsetWidth}`},ph,()=>{f.style.display="none"})}function u(){const f=document.querySelector(`#${e}_panel`);f.style.display!=="none"&&Kn(f).animate({"margin-right":`-=${f.offsetWidth}`},1,()=>{f.style.display="none"})}function h(){return document.querySelector(`#${e}_panel`).style.display!=="none"}Rc[e]={toggle:l,close:u,isOpen:h},i.addEventListener("click",f=>{f.preventDefault(),f.stopPropagation(),l()})}let Rc={};function eL(){Rc={};const e=document.querySelector("div#tabs"),t=document.createElement("div");t.setAttribute("id","right_button_wrapper"),t.classList.add("nevysha","nevysha-right-button-wrapper"),e.insertAdjacentElement("beforeend",t),ar.enable_extra_network_tweaks===!0&&(Gg("cozy-txt2img-extra-network","Extra Network",t,e),document.getElementById("cozy-txt2img-extra-network-react").classList.add("cozy-extra-network"),Gg("cozy-img2img-extra-network","Extra Network",t,e),document.getElementById("cozy-img2img-extra-network-react").classList.add("cozy-extra-network"),document.querySelector("#cozy-img2img-extra-network_right_button").style.display="none"),ar.disable_image_browser!==!0&&Gg("cozy-img-browser","Cozy Image Browser",t,e),document.addEventListener("keydown",n=>{n.key==="Escape"&&Object.values(Rc).forEach(r=>{r.isOpen()&&(n.preventDefault(),n.stopPropagation(),r.close())})})}function tL(e){Lt.debug(`setButtonVisibilityFromCurrentTab(${e})`),document.querySelector("#cozy-txt2img-extra-network_right_button").style.display="none",document.querySelector("#cozy-img2img-extra-network_right_button").style.display="none",e==="tab_txt2img"?document.querySelector("#cozy-txt2img-extra-network_right_button").style.display="flex":e==="tab_img2img"&&(document.querySelector("#cozy-img2img-extra-network_right_button").style.display="flex")}function nL(e){xC(),document.querySelector("#cozy_nest_error_handling_display").innerHTML="An error in socket handler",document.querySelector("#cozy_nest_error_handling_display_stack").innerHTML=e.error,document.querySelector("#cozy_nest_error_handling_display_stack").setAttribute("style","display: block;"),_C()}window.errorPipe=nL;async function rL(e,t){class n{constructor(d){this.files=[d]}}let r=document.querySelector("#nevysha-send-to > #nevysha_pnginfo_image > div.image-container > div");const i=await fetch(t.src).then(s=>s.blob());let o=new DragEvent("drop",{bubbles:!0,cancelable:!0});Object.defineProperty(o,"dataTransfer",{value:new n(i)}),r.dispatchEvent(o),e==="txt2img"?document.querySelector("#tabs > div.tab-nav").querySelector("#txtimg").click():e==="img2img"?(document.querySelector("#tabs > div.tab-nav").querySelector("#imgimg").click(),document.querySelectorAll("#mode_img2img > div > button")[0].click()):e==="inpainting"&&(document.querySelector("#tabs > div.tab-nav").querySelector("#imgimg").click(),document.querySelectorAll("#mode_img2img > div > button")[2].click()),setTimeout(()=>{let s;e==="txt2img"?s=document.querySelector("#nevysha-send-to-button > button#txt2img_tab"):e==="img2img"?s=document.querySelector("#nevysha-send-to-button > button#img2img_tab"):e==="inpainting"&&(s=document.querySelector("#nevysha-send-to-button > button#inpaint_tab")),s.click()},1e3)}window.sendToPipe=rL;window.troubleshootSize={};function iL(){const e=document.body;function t(o){const s=o;s.style.position="fixed";const d=s.parentElement;s.style.width=d.offsetWidth+"px";const a=d.getBoundingClientRect(),c=window.innerHeight,l=a.top,u=c-a.bottom;l<u?s.style.top=a.top+a.height+"px":s.style.bottom=window.innerHeight-a.top+"px"}const n=function(o,s){for(const d of o)if(d.type==="childList")for(const a of d.addedNodes)a.nodeType===1&&a.classList.contains("options")&&t(a)},r=new MutationObserver(n),i={childList:!0,subtree:!0};r.observe(e,i)}const xv=(e,t)=>{try{sL(e,t)}catch(n){console.error("Failed to init Cozy Nest",n),t()}};function oL(){document.querySelectorAll(".gradio-accordion > .label-wrap").forEach(t=>{t.addEventListener("click",()=>{t.classList.contains("open")?(t.parentElement.classList.add("nevysha-accordion-open"),t.parentElement.setAttribute("style",`${t.parentElement.getAttribute("style")} border-width: 2px 2px 0px !important;`)):(t.parentElement.classList.remove("nevysha-accordion-open"),t.parentElement.setAttribute("style",`${t.parentElement.getAttribute("style").replace("border-width: 2px 2px 0px !important;","")}`))})})}function aL(){const e=document.querySelectorAll("#script_list");e.forEach(n=>{n.setAttribute("style",`${n.getAttribute("style")} border-width: 2px 2px 0px !important;`);let r=n.parentElement.nextElementSibling;for(;r!==null;)r.classList.add("nevysha-scripts"),r=r.nextElementSibling});const t=new MutationObserver(n=>{n.forEach(r=>{var i,o;if(r.type==="subtree"&&Lt.debug(`subtree mutation: ${r.removedNodes}`),r.type==="attributes"){let s=r.target;if(!r.target instanceof HTMLInputElement&&(s=r.target.querySelector("input")),!s)return;const d=s.value;d&&d!=="None"&&d.length>0?(Lt.debug("script: newValue",d),(i=Rw(s,"#script_list"))==null||i.classList.add("nevysha-script-selected")):d==="None"&&(Lt.debug("script deselected"),(o=Rw(s,"#script_list"))==null||o.classList.remove("nevysha-script-selected"))}})});e.forEach(n=>{t.observe(n,{attributes:!0,childList:!0,subtree:!0})})}const sL=(e,t)=>{let n=window.gradioApp;if(typeof n!="function"){setTimeout(()=>xv(e,t),200);return}if(!n().getElementById("quicksettings")){setTimeout(()=>xv(e,t),200);return}if(yr.time(hh),document.querySelector("#setting_gradio_theme input")){const b=document.querySelector("#setting_gradio_theme input").value;b!=="gradio/default"&&b!==""&&b!=="Default"&&Zl("Warning",'Cozy Nest may not be compatible with this theme. Please switch to the default theme. You can do this by going to the settings tab and selecting "gradio/default" or "Default" from the dropdown menu under "User interface > UI theme".')}const i=document.querySelector("#refresh_sd_model_checkpoint"),o="<div id='quicksettings_gap' class='nevysha' />";i.insertAdjacentHTML("afterend",o);const s=document.querySelector("body");s.style="",s.insertAdjacentHTML("beforeend",mC),document.querySelectorAll("#tabs > .tabitem").forEach(b=>b.setAttribute("class",`${b.getAttribute("class")} nevysha`)),document.querySelectorAll("#tabs > div.tab-nav").forEach(b=>b.setAttribute("class",`${b.getAttribute("class")} nevysha nevysha-tabnav`)),document.querySelectorAll('input[type="number"]').forEach(b=>b.setAttribute("class",`${b.getAttribute("class")} nevysha`)),document.querySelectorAll(".extra-network-cards").forEach(b=>b.setAttribute("class",`${b.getAttribute("class")} nevysha nevysha-scrollable`)),document.querySelectorAll("#cozy_nest_settings_tabs > .tabitem").forEach(b=>b.classList.add("nevysha","nevysha-scrollable")),document.querySelector("#nevysha-send-to").setAttribute("style","display: none;"),eL();let a=get_uiCurrentTabContent().id;onUiTabChange(()=>{Lt.debug(`onUiTabChange newTab:${get_uiCurrentTabContent().id}, lastTab:${a}`),a==="tab_txt2img"?Rc["cozy-txt2img-extra-network"].close():a==="tab_img2img"&&Rc["cozy-img2img-extra-network"].close(),ar.enable_extra_network_tweaks&&tL(get_uiCurrentTabContent().id),a=get_uiCurrentTabContent().id});const c=b=>{z3(b),N3(b),G3(b),Y3(b),Ow(b)};c({prefix:"txt2img"}),c({prefix:"img2img"}),Ow({prefix:"extras"}),K3();const l=document.querySelector(`#${Lc.get("clear_prompt")("img2img")}`).parentElement;l.classList.add("nevysha","nevysha-prompt-tools");const u=document.querySelector(`#${Lc.get("clear_prompt")("txt2img")}`).parentElement;u.classList.add("nevysha","nevysha-prompt-tools");const h=[],f=document.querySelector("#txt2img_styles_row"),p=document.querySelector("#img2img_styles_row");h.push(()=>{u.insertBefore(f,u.firstChild),l.insertBefore(p,l.firstChild)});const g=document.querySelector("#interrogate").parentElement;for(const b of g.children)h.push(()=>{b.classList.add("nevysha","nevysha-interrogate-btn"),b.id==="interrogate"?b.innerHTML="CLIP":b.id==="deepbooru"&&(b.innerHTML="DeepBooru"),l.appendChild(b)});h.forEach(b=>b()),q3(),Q3(),kp(),oL(),aL(),J3(),iL(),window.location.href.includes("__theme")&&Zl("Warning","The __theme parameter is deprecated. Please use Cozy Nest settings instead."),ar.extensions&&ar.extensions.length>0&&ar.extensions.includes("SDAtom-WebUi-client-queue-ext")&&X3(),e()};async function TC(e){e=e||ar,await fetch("/cozy-nest/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function lL(){var e;if(ar.webui===_3){Lt.debug("webui is UNKNOWN. Trying to detect it.");const t=(e=document.querySelector('meta[property="og:title"]'))==null?void 0:e.getAttribute("content");t&&t===vs?(ar.webui=vs,AC=!0):ar.webui=gC,await TC()}Lt.debug(`webui is ${ar.webui}`)}async function uL(e){if(new URLSearchParams(window.location.search).get("CozyNest")==="No"){Lt.log("disabled by url param"),document.querySelectorAll("link").forEach(r=>{r.href.includes("Cozy-Nest")&&r.remove()});return}return await MC(),await lL(),Ef.start(),V3(),B3(),cL(),new Promise(r=>{xv(async()=>{await e(),Ef.stop(),Lt.log("running."),yr.end(hh),yr.end(Ql),AC&&Zl("Warning","Cozy Nest detected that you are using SD.Next and running Cozy Nest for the first time. To ensure compatibility, please restart the server."),r()},()=>{Lt.error("ERROR loading CozyNest.");try{Ef.stop(),yr.end(hh),yr.end(Ql)}catch{}Zl("Error","There was an error while loading Cozy Nest. Ui will fallback to default.",()=>{window.location.replace(`${window.location.href}#CozyNest=No`),window.location.reload()}),r()})})}function cL(){window.addEventListener("error",function({message:e,filename:t,lineno:n,colno:r,error:i}){if(t.toLowerCase().includes("cozy-nest")){try{Ef.stop(),yr.end(hh),yr.end(Ql)}catch{}Zl("Error","There was an error while loading Cozy Nest. Ui will fallback to default.",()=>{window.location.replace(`${window.location.href}#CozyNest=No`),window.location.reload()})}})}let ar,AC=!1;async function MC(){const e=await fetch(`file=extensions/Cozy-Nest/nevyui_settings.json?t=${Date.now()}`);e.ok&&(ar=await e.json(),localStorage.setItem("COZY_NEST_CONFIG",JSON.stringify(ar)),window.COZY_NEST_CONFIG=ar)}var LC={exports:{}},Ep={},RC={exports:{}},gt={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var hd=Symbol.for("react.element"),dL=Symbol.for("react.portal"),fL=Symbol.for("react.fragment"),hL=Symbol.for("react.strict_mode"),pL=Symbol.for("react.profiler"),gL=Symbol.for("react.provider"),mL=Symbol.for("react.context"),vL=Symbol.for("react.forward_ref"),yL=Symbol.for("react.suspense"),bL=Symbol.for("react.memo"),wL=Symbol.for("react.lazy"),Fw=Symbol.iterator;function SL(e){return e===null||typeof e!="object"?null:(e=Fw&&e[Fw]||e["@@iterator"],typeof e=="function"?e:null)}var PC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},IC=Object.assign,OC={};function mu(e,t,n){this.props=e,this.context=t,this.refs=OC,this.updater=n||PC}mu.prototype.isReactComponent={};mu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};mu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function FC(){}FC.prototype=mu.prototype;function h0(e,t,n){this.props=e,this.context=t,this.refs=OC,this.updater=n||PC}var p0=h0.prototype=new FC;p0.constructor=h0;IC(p0,mu.prototype);p0.isPureReactComponent=!0;var Dw=Array.isArray,DC=Object.prototype.hasOwnProperty,g0={current:null},NC={key:!0,ref:!0,__self:!0,__source:!0};function zC(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)DC.call(t,r)&&!NC.hasOwnProperty(r)&&(i[r]=t[r]);var d=arguments.length-2;if(d===1)i.children=n;else if(1<d){for(var a=Array(d),c=0;c<d;c++)a[c]=arguments[c+2];i.children=a}if(e&&e.defaultProps)for(r in d=e.defaultProps,d)i[r]===void 0&&(i[r]=d[r]);return{$$typeof:hd,type:e,key:o,ref:s,props:i,_owner:g0.current}}function xL(e,t){return{$$typeof:hd,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function m0(e){return typeof e=="object"&&e!==null&&e.$$typeof===hd}function _L(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Nw=/\/+/g;function Kg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_L(""+e.key):t.toString(36)}function Mf(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case hd:case dL:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Kg(s,0):r,Dw(i)?(n="",e!=null&&(n=e.replace(Nw,"$&/")+"/"),Mf(i,t,n,"",function(c){return c})):i!=null&&(m0(i)&&(i=xL(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(Nw,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",Dw(e))for(var d=0;d<e.length;d++){o=e[d];var a=r+Kg(o,d);s+=Mf(o,t,n,a,i)}else if(a=SL(e),typeof a=="function")for(e=a.call(e),d=0;!(o=e.next()).done;)o=o.value,a=r+Kg(o,d++),s+=Mf(o,t,n,a,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function zd(e,t,n){if(e==null)return e;var r=[],i=0;return Mf(e,r,"","",function(o){return t.call(n,o,i++)}),r}function CL(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Xn={current:null},Lf={transition:null},kL={ReactCurrentDispatcher:Xn,ReactCurrentBatchConfig:Lf,ReactCurrentOwner:g0};gt.Children={map:zd,forEach:function(e,t,n){zd(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return zd(e,function(){t++}),t},toArray:function(e){return zd(e,function(t){return t})||[]},only:function(e){if(!m0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};gt.Component=mu;gt.Fragment=fL;gt.Profiler=pL;gt.PureComponent=h0;gt.StrictMode=hL;gt.Suspense=yL;gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kL;gt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=IC({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=g0.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var d=e.type.defaultProps;for(a in t)DC.call(t,a)&&!NC.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&d!==void 0?d[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){d=Array(a);for(var c=0;c<a;c++)d[c]=arguments[c+2];r.children=d}return{$$typeof:hd,type:e.type,key:i,ref:o,props:r,_owner:s}};gt.createContext=function(e){return e={$$typeof:mL,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:gL,_context:e},e.Consumer=e};gt.createElement=zC;gt.createFactory=function(e){var t=zC.bind(null,e);return t.type=e,t};gt.createRef=function(){return{current:null}};gt.forwardRef=function(e){return{$$typeof:vL,render:e}};gt.isValidElement=m0;gt.lazy=function(e){return{$$typeof:wL,_payload:{_status:-1,_result:e},_init:CL}};gt.memo=function(e,t){return{$$typeof:bL,type:e,compare:t===void 0?null:t}};gt.startTransition=function(e){var t=Lf.transition;Lf.transition={};try{e()}finally{Lf.transition=t}};gt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};gt.useCallback=function(e,t){return Xn.current.useCallback(e,t)};gt.useContext=function(e){return Xn.current.useContext(e)};gt.useDebugValue=function(){};gt.useDeferredValue=function(e){return Xn.current.useDeferredValue(e)};gt.useEffect=function(e,t){return Xn.current.useEffect(e,t)};gt.useId=function(){return Xn.current.useId()};gt.useImperativeHandle=function(e,t,n){return Xn.current.useImperativeHandle(e,t,n)};gt.useInsertionEffect=function(e,t){return Xn.current.useInsertionEffect(e,t)};gt.useLayoutEffect=function(e,t){return Xn.current.useLayoutEffect(e,t)};gt.useMemo=function(e,t){return Xn.current.useMemo(e,t)};gt.useReducer=function(e,t,n){return Xn.current.useReducer(e,t,n)};gt.useRef=function(e){return Xn.current.useRef(e)};gt.useState=function(e){return Xn.current.useState(e)};gt.useSyncExternalStore=function(e,t,n){return Xn.current.useSyncExternalStore(e,t,n)};gt.useTransition=function(){return Xn.current.useTransition()};gt.version="18.2.0";RC.exports=gt;var z=RC.exports;const st=Es(z),zw=f3({__proto__:null,default:st},[z]);/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var EL=z,$L=Symbol.for("react.element"),TL=Symbol.for("react.fragment"),AL=Object.prototype.hasOwnProperty,ML=EL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,LL={key:!0,ref:!0,__self:!0,__source:!0};function BC(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)AL.call(t,r)&&!LL.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:$L,type:e,key:o,ref:s,props:i,_owner:ML.current}}Ep.Fragment=TL;Ep.jsx=BC;Ep.jsxs=BC;LC.exports=Ep;var j=LC.exports,Jl={},jC={exports:{}},$r={},HC={exports:{}},VC={};/**
|
||
* @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(B,W){var K=B.length;B.push(W);e:for(;0<K;){var q=K-1>>>1,re=B[q];if(0<i(re,W))B[q]=W,B[K]=re,K=q;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var W=B[0],K=B.pop();if(K!==W){B[0]=K;e:for(var q=0,re=B.length,Y=re>>>1;q<Y;){var Z=2*(q+1)-1,te=B[Z],ie=Z+1,ce=B[ie];if(0>i(te,K))ie<re&&0>i(ce,te)?(B[q]=ce,B[ie]=K,q=ie):(B[q]=te,B[Z]=K,q=Z);else if(ie<re&&0>i(ce,K))B[q]=ce,B[ie]=K,q=ie;else break e}}return W}function i(B,W){var K=B.sortIndex-W.sortIndex;return K!==0?K:B.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,d=s.now();e.unstable_now=function(){return s.now()-d}}var a=[],c=[],l=1,u=null,h=3,f=!1,p=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(B){for(var W=n(c);W!==null;){if(W.callback===null)r(c);else if(W.startTime<=B)r(c),W.sortIndex=W.expirationTime,t(a,W);else break;W=n(c)}}function v(B){if(g=!1,T(B),!p)if(n(a)!==null)p=!0,P(w);else{var W=n(c);W!==null&&N(v,W.startTime-B)}}function w(B,W){p=!1,g&&(g=!1,x(E),E=-1),f=!0;var K=h;try{for(T(W),u=n(a);u!==null&&(!(u.expirationTime>W)||B&&!k());){var q=u.callback;if(typeof q=="function"){u.callback=null,h=u.priorityLevel;var re=q(u.expirationTime<=W);W=e.unstable_now(),typeof re=="function"?u.callback=re:u===n(a)&&r(a),T(W)}else r(a);u=n(a)}if(u!==null)var Y=!0;else{var Z=n(c);Z!==null&&N(v,Z.startTime-W),Y=!1}return Y}finally{u=null,h=K,f=!1}}var y=!1,m=null,E=-1,A=5,C=-1;function k(){return!(e.unstable_now()-C<A)}function I(){if(m!==null){var B=e.unstable_now();C=B;var W=!0;try{W=m(!0,B)}finally{W?R():(y=!1,m=null)}}else y=!1}var R;if(typeof S=="function")R=function(){S(I)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,O=M.port2;M.port1.onmessage=I,R=function(){O.postMessage(null)}}else R=function(){b(I,0)};function P(B){m=B,y||(y=!0,R())}function N(B,W){E=b(function(){B(e.unstable_now())},W)}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(B){B.callback=null},e.unstable_continueExecution=function(){p||f||(p=!0,P(w))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(B){switch(h){case 1:case 2:case 3:var W=3;break;default:W=h}var K=h;h=W;try{return B()}finally{h=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,W){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var K=h;h=B;try{return W()}finally{h=K}},e.unstable_scheduleCallback=function(B,W,K){var q=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?q+K:q):K=q,B){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=K+re,B={id:l++,callback:W,priorityLevel:B,startTime:K,expirationTime:re,sortIndex:-1},K>q?(B.sortIndex=K,t(c,B),n(a)===null&&B===n(c)&&(g?(x(E),E=-1):g=!0,N(v,K-q))):(B.sortIndex=re,t(a,B),p||f||(p=!0,P(w))),B},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(B){var W=h;return function(){var K=h;h=W;try{return B.apply(this,arguments)}finally{h=K}}}})(VC);HC.exports=VC;var RL=HC.exports;/**
|
||
* @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 WC=z,kr=RL;function Ee(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 UC=new Set,Pc={};function $s(e,t){eu(e,t),eu(e+"Capture",t)}function eu(e,t){for(Pc[e]=t,e=0;e<t.length;e++)UC.add(t[e])}var ko=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_v=Object.prototype.hasOwnProperty,PL=/^[: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]*$/,Bw={},jw={};function IL(e){return _v.call(jw,e)?!0:_v.call(Bw,e)?!1:PL.test(e)?jw[e]=!0:(Bw[e]=!0,!1)}function OL(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function FL(e,t,n,r){if(t===null||typeof t>"u"||OL(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Mn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mn[e]=new Qn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mn[t]=new Qn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mn[e]=new Qn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mn[e]=new Qn(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){Mn[e]=new Qn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mn[e]=new Qn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mn[e]=new Qn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mn[e]=new Qn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mn[e]=new Qn(e,5,!1,e.toLowerCase(),null,!1,!1)});var v0=/[\-:]([a-z])/g;function y0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v0,y0);Mn[t]=new Qn(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(v0,y0);Mn[t]=new Qn(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(v0,y0);Mn[t]=new Qn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mn[e]=new Qn(e,1,!1,e.toLowerCase(),null,!1,!1)});Mn.xlinkHref=new Qn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mn[e]=new Qn(e,1,!1,e.toLowerCase(),null,!0,!0)});function b0(e,t,n,r){var i=Mn.hasOwnProperty(t)?Mn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(FL(t,n,i,r)&&(n=null),r||i===null?IL(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Lo=WC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Bd=Symbol.for("react.element"),gl=Symbol.for("react.portal"),ml=Symbol.for("react.fragment"),w0=Symbol.for("react.strict_mode"),Cv=Symbol.for("react.profiler"),GC=Symbol.for("react.provider"),KC=Symbol.for("react.context"),S0=Symbol.for("react.forward_ref"),kv=Symbol.for("react.suspense"),Ev=Symbol.for("react.suspense_list"),x0=Symbol.for("react.memo"),na=Symbol.for("react.lazy"),qC=Symbol.for("react.offscreen"),Hw=Symbol.iterator;function Mu(e){return e===null||typeof e!="object"?null:(e=Hw&&e[Hw]||e["@@iterator"],typeof e=="function"?e:null)}var Xt=Object.assign,qg;function Ku(e){if(qg===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);qg=t&&t[1]||""}return`
|
||
`+qg+e}var Yg=!1;function Xg(e,t){if(!e||Yg)return"";Yg=!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()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
||
`),o=r.stack.split(`
|
||
`),s=i.length-1,d=o.length-1;1<=s&&0<=d&&i[s]!==o[d];)d--;for(;1<=s&&0<=d;s--,d--)if(i[s]!==o[d]){if(s!==1||d!==1)do if(s--,d--,0>d||i[s]!==o[d]){var a=`
|
||
`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=d);break}}}finally{Yg=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ku(e):""}function DL(e){switch(e.tag){case 5:return Ku(e.type);case 16:return Ku("Lazy");case 13:return Ku("Suspense");case 19:return Ku("SuspenseList");case 0:case 2:case 15:return e=Xg(e.type,!1),e;case 11:return e=Xg(e.type.render,!1),e;case 1:return e=Xg(e.type,!0),e;default:return""}}function $v(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ml:return"Fragment";case gl:return"Portal";case Cv:return"Profiler";case w0:return"StrictMode";case kv:return"Suspense";case Ev:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case KC:return(e.displayName||"Context")+".Consumer";case GC:return(e._context.displayName||"Context")+".Provider";case S0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case x0:return t=e.displayName||null,t!==null?t:$v(e.type)||"Memo";case na:t=e._payload,e=e._init;try{return $v(e(t))}catch{}}return null}function NL(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $v(t);case 8:return t===w0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _a(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function YC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zL(e){var t=YC(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jd(e){e._valueTracker||(e._valueTracker=zL(e))}function XC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=YC(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function gh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Tv(e,t){var n=t.checked;return Xt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_a(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function QC(e,t){t=t.checked,t!=null&&b0(e,"checked",t,!1)}function Av(e,t){QC(e,t);var n=_a(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Mv(e,t.type,n):t.hasOwnProperty("defaultValue")&&Mv(e,t.type,_a(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ww(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Mv(e,t,n){(t!=="number"||gh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qu=Array.isArray;function Fl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+_a(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Lv(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ee(91));return Xt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Uw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Ee(92));if(qu(n)){if(1<n.length)throw Error(Ee(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:_a(n)}}function ZC(e,t){var n=_a(t.value),r=_a(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Gw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function JC(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 Rv(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?JC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Hd,ek=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Hd=Hd||document.createElement("div"),Hd.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Hd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ic(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var uc={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},BL=["Webkit","ms","Moz","O"];Object.keys(uc).forEach(function(e){BL.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),uc[t]=uc[e]})});function tk(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||uc.hasOwnProperty(e)&&uc[e]?(""+t).trim():t+"px"}function nk(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=tk(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var jL=Xt({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 Pv(e,t){if(t){if(jL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ee(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ee(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ee(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ee(62))}}function Iv(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ov=null;function _0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fv=null,Dl=null,Nl=null;function Kw(e){if(e=md(e)){if(typeof Fv!="function")throw Error(Ee(280));var t=e.stateNode;t&&(t=Lp(t),Fv(e.stateNode,e.type,t))}}function rk(e){Dl?Nl?Nl.push(e):Nl=[e]:Dl=e}function ik(){if(Dl){var e=Dl,t=Nl;if(Nl=Dl=null,Kw(e),t)for(e=0;e<t.length;e++)Kw(t[e])}}function ok(e,t){return e(t)}function ak(){}var Qg=!1;function sk(e,t,n){if(Qg)return e(t,n);Qg=!0;try{return ok(e,t,n)}finally{Qg=!1,(Dl!==null||Nl!==null)&&(ak(),ik())}}function Oc(e,t){var n=e.stateNode;if(n===null)return null;var r=Lp(n);if(r===null)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)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Ee(231,t,typeof n));return n}var Dv=!1;if(ko)try{var Lu={};Object.defineProperty(Lu,"passive",{get:function(){Dv=!0}}),window.addEventListener("test",Lu,Lu),window.removeEventListener("test",Lu,Lu)}catch{Dv=!1}function HL(e,t,n,r,i,o,s,d,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var cc=!1,mh=null,vh=!1,Nv=null,VL={onError:function(e){cc=!0,mh=e}};function WL(e,t,n,r,i,o,s,d,a){cc=!1,mh=null,HL.apply(VL,arguments)}function UL(e,t,n,r,i,o,s,d,a){if(WL.apply(this,arguments),cc){if(cc){var c=mh;cc=!1,mh=null}else throw Error(Ee(198));vh||(vh=!0,Nv=c)}}function Ts(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function lk(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function qw(e){if(Ts(e)!==e)throw Error(Ee(188))}function GL(e){var t=e.alternate;if(!t){if(t=Ts(e),t===null)throw Error(Ee(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return qw(i),e;if(o===r)return qw(i),t;o=o.sibling}throw Error(Ee(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,d=i.child;d;){if(d===n){s=!0,n=i,r=o;break}if(d===r){s=!0,r=i,n=o;break}d=d.sibling}if(!s){for(d=o.child;d;){if(d===n){s=!0,n=o,r=i;break}if(d===r){s=!0,r=o,n=i;break}d=d.sibling}if(!s)throw Error(Ee(189))}}if(n.alternate!==r)throw Error(Ee(190))}if(n.tag!==3)throw Error(Ee(188));return n.stateNode.current===n?e:t}function uk(e){return e=GL(e),e!==null?ck(e):null}function ck(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ck(e);if(t!==null)return t;e=e.sibling}return null}var dk=kr.unstable_scheduleCallback,Yw=kr.unstable_cancelCallback,KL=kr.unstable_shouldYield,qL=kr.unstable_requestPaint,nn=kr.unstable_now,YL=kr.unstable_getCurrentPriorityLevel,C0=kr.unstable_ImmediatePriority,fk=kr.unstable_UserBlockingPriority,yh=kr.unstable_NormalPriority,XL=kr.unstable_LowPriority,hk=kr.unstable_IdlePriority,$p=null,ji=null;function QL(e){if(ji&&typeof ji.onCommitFiberRoot=="function")try{ji.onCommitFiberRoot($p,e,void 0,(e.current.flags&128)===128)}catch{}}var vi=Math.clz32?Math.clz32:eR,ZL=Math.log,JL=Math.LN2;function eR(e){return e>>>=0,e===0?32:31-(ZL(e)/JL|0)|0}var Vd=64,Wd=4194304;function Yu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function bh(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var d=s&~i;d!==0?r=Yu(d):(o&=s,o!==0&&(r=Yu(o)))}else s=n&~i,s!==0?r=Yu(s):o!==0&&(r=Yu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-vi(t),i=1<<n,r|=e[n],t&=~i;return r}function tR(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;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-vi(o),d=1<<s,a=i[s];a===-1?(!(d&n)||d&r)&&(i[s]=tR(d,t)):a<=t&&(e.expiredLanes|=d),o&=~d}}function zv(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function pk(){var e=Vd;return Vd<<=1,!(Vd&4194240)&&(Vd=64),e}function Zg(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pd(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vi(t),e[t]=n}function rR(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 i=31-vi(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function k0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-vi(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Pt=0;function gk(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var mk,E0,vk,yk,bk,Bv=!1,Ud=[],fa=null,ha=null,pa=null,Fc=new Map,Dc=new Map,aa=[],iR="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 Xw(e,t){switch(e){case"focusin":case"focusout":fa=null;break;case"dragenter":case"dragleave":ha=null;break;case"mouseover":case"mouseout":pa=null;break;case"pointerover":case"pointerout":Fc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dc.delete(t.pointerId)}}function Ru(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=md(t),t!==null&&E0(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function oR(e,t,n,r,i){switch(t){case"focusin":return fa=Ru(fa,e,t,n,r,i),!0;case"dragenter":return ha=Ru(ha,e,t,n,r,i),!0;case"mouseover":return pa=Ru(pa,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Fc.set(o,Ru(Fc.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Dc.set(o,Ru(Dc.get(o)||null,e,t,n,r,i)),!0}return!1}function wk(e){var t=ns(e.target);if(t!==null){var n=Ts(t);if(n!==null){if(t=n.tag,t===13){if(t=lk(n),t!==null){e.blockedOn=t,bk(e.priority,function(){vk(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=jv(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ov=r,n.target.dispatchEvent(r),Ov=null}else return t=md(n),t!==null&&E0(t),e.blockedOn=n,!1;t.shift()}return!0}function Qw(e,t,n){Rf(e)&&n.delete(t)}function aR(){Bv=!1,fa!==null&&Rf(fa)&&(fa=null),ha!==null&&Rf(ha)&&(ha=null),pa!==null&&Rf(pa)&&(pa=null),Fc.forEach(Qw),Dc.forEach(Qw)}function Pu(e,t){e.blockedOn===t&&(e.blockedOn=null,Bv||(Bv=!0,kr.unstable_scheduleCallback(kr.unstable_NormalPriority,aR)))}function Nc(e){function t(i){return Pu(i,e)}if(0<Ud.length){Pu(Ud[0],e);for(var n=1;n<Ud.length;n++){var r=Ud[n];r.blockedOn===e&&(r.blockedOn=null)}}for(fa!==null&&Pu(fa,e),ha!==null&&Pu(ha,e),pa!==null&&Pu(pa,e),Fc.forEach(t),Dc.forEach(t),n=0;n<aa.length;n++)r=aa[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<aa.length&&(n=aa[0],n.blockedOn===null);)wk(n),n.blockedOn===null&&aa.shift()}var zl=Lo.ReactCurrentBatchConfig,wh=!0;function sR(e,t,n,r){var i=Pt,o=zl.transition;zl.transition=null;try{Pt=1,$0(e,t,n,r)}finally{Pt=i,zl.transition=o}}function lR(e,t,n,r){var i=Pt,o=zl.transition;zl.transition=null;try{Pt=4,$0(e,t,n,r)}finally{Pt=i,zl.transition=o}}function $0(e,t,n,r){if(wh){var i=jv(e,t,n,r);if(i===null)lm(e,t,r,Sh,n),Xw(e,r);else if(oR(i,e,t,n,r))r.stopPropagation();else if(Xw(e,r),t&4&&-1<iR.indexOf(e)){for(;i!==null;){var o=md(i);if(o!==null&&mk(o),o=jv(e,t,n,r),o===null&&lm(e,t,r,Sh,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else lm(e,t,r,null,n)}}var Sh=null;function jv(e,t,n,r){if(Sh=null,e=_0(r),e=ns(e),e!==null)if(t=Ts(e),t===null)e=null;else if(n=t.tag,n===13){if(e=lk(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Sh=e,null}function Sk(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(YL()){case C0:return 1;case fk:return 4;case yh:case XL:return 16;case hk:return 536870912;default:return 16}default:return 16}}var ua=null,T0=null,Pf=null;function xk(){if(Pf)return Pf;var e,t=T0,n=t.length,r,i="value"in ua?ua.value:ua.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Pf=i.slice(e,1<r?1-r:void 0)}function If(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Gd(){return!0}function Zw(){return!1}function Tr(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(o):o[d]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Gd:Zw,this.isPropagationStopped=Zw,this}return Xt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Gd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Gd)},persist:function(){},isPersistent:Gd}),t}var vu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},A0=Tr(vu),gd=Xt({},vu,{view:0,detail:0}),uR=Tr(gd),Jg,em,Iu,Tp=Xt({},gd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:M0,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Iu&&(Iu&&e.type==="mousemove"?(Jg=e.screenX-Iu.screenX,em=e.screenY-Iu.screenY):em=Jg=0,Iu=e),Jg)},movementY:function(e){return"movementY"in e?e.movementY:em}}),Jw=Tr(Tp),cR=Xt({},Tp,{dataTransfer:0}),dR=Tr(cR),fR=Xt({},gd,{relatedTarget:0}),tm=Tr(fR),hR=Xt({},vu,{animationName:0,elapsedTime:0,pseudoElement:0}),pR=Tr(hR),gR=Xt({},vu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mR=Tr(gR),vR=Xt({},vu,{data:0}),e1=Tr(vR),yR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bR={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"},wR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wR[e])?!!t[e]:!1}function M0(){return SR}var xR=Xt({},gd,{key:function(e){if(e.key){var t=yR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=If(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:M0,charCode:function(e){return e.type==="keypress"?If(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?If(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_R=Tr(xR),CR=Xt({},Tp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),t1=Tr(CR),kR=Xt({},gd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:M0}),ER=Tr(kR),$R=Xt({},vu,{propertyName:0,elapsedTime:0,pseudoElement:0}),TR=Tr($R),AR=Xt({},Tp,{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}),MR=Tr(AR),LR=[9,13,27,32],L0=ko&&"CompositionEvent"in window,dc=null;ko&&"documentMode"in document&&(dc=document.documentMode);var RR=ko&&"TextEvent"in window&&!dc,_k=ko&&(!L0||dc&&8<dc&&11>=dc),n1=String.fromCharCode(32),r1=!1;function Ck(e,t){switch(e){case"keyup":return LR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vl=!1;function PR(e,t){switch(e){case"compositionend":return kk(t);case"keypress":return t.which!==32?null:(r1=!0,n1);case"textInput":return e=t.data,e===n1&&r1?null:e;default:return null}}function IR(e,t){if(vl)return e==="compositionend"||!L0&&Ck(e,t)?(e=xk(),Pf=T0=ua=null,vl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return _k&&t.locale!=="ko"?null:t.data;default:return null}}var OR={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 i1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!OR[e.type]:t==="textarea"}function Ek(e,t,n,r){rk(r),t=xh(t,"onChange"),0<t.length&&(n=new A0("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var fc=null,zc=null;function FR(e){Dk(e,0)}function Ap(e){var t=wl(e);if(XC(t))return e}function DR(e,t){if(e==="change")return t}var $k=!1;if(ko){var nm;if(ko){var rm="oninput"in document;if(!rm){var o1=document.createElement("div");o1.setAttribute("oninput","return;"),rm=typeof o1.oninput=="function"}nm=rm}else nm=!1;$k=nm&&(!document.documentMode||9<document.documentMode)}function a1(){fc&&(fc.detachEvent("onpropertychange",Tk),zc=fc=null)}function Tk(e){if(e.propertyName==="value"&&Ap(zc)){var t=[];Ek(t,zc,e,_0(e)),sk(FR,t)}}function NR(e,t,n){e==="focusin"?(a1(),fc=t,zc=n,fc.attachEvent("onpropertychange",Tk)):e==="focusout"&&a1()}function zR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ap(zc)}function BR(e,t){if(e==="click")return Ap(t)}function jR(e,t){if(e==="input"||e==="change")return Ap(t)}function HR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bi=typeof Object.is=="function"?Object.is:HR;function Bc(e,t){if(bi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)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 i=n[r];if(!_v.call(t,i)||!bi(e[i],t[i]))return!1}return!0}function s1(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function l1(e,t){var n=s1(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=s1(n)}}function Ak(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ak(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mk(){for(var e=window,t=gh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=gh(e.document)}return t}function R0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function VR(e){var t=Mk(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ak(n.ownerDocument.documentElement,n)){if(r!==null&&R0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=l1(n,o);var s=l1(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var WR=ko&&"documentMode"in document&&11>=document.documentMode,yl=null,Hv=null,hc=null,Vv=!1;function u1(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vv||yl==null||yl!==gh(r)||(r=yl,"selectionStart"in r&&R0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),hc&&Bc(hc,r)||(hc=r,r=xh(Hv,"onSelect"),0<r.length&&(t=new A0("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yl)))}function Kd(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bl={animationend:Kd("Animation","AnimationEnd"),animationiteration:Kd("Animation","AnimationIteration"),animationstart:Kd("Animation","AnimationStart"),transitionend:Kd("Transition","TransitionEnd")},im={},Lk={};ko&&(Lk=document.createElement("div").style,"AnimationEvent"in window||(delete bl.animationend.animation,delete bl.animationiteration.animation,delete bl.animationstart.animation),"TransitionEvent"in window||delete bl.transitionend.transition);function Mp(e){if(im[e])return im[e];if(!bl[e])return e;var t=bl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lk)return im[e]=t[n];return e}var Rk=Mp("animationend"),Pk=Mp("animationiteration"),Ik=Mp("animationstart"),Ok=Mp("transitionend"),Fk=new Map,c1="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 Ta(e,t){Fk.set(e,t),$s(t,[e])}for(var om=0;om<c1.length;om++){var am=c1[om],UR=am.toLowerCase(),GR=am[0].toUpperCase()+am.slice(1);Ta(UR,"on"+GR)}Ta(Rk,"onAnimationEnd");Ta(Pk,"onAnimationIteration");Ta(Ik,"onAnimationStart");Ta("dblclick","onDoubleClick");Ta("focusin","onFocus");Ta("focusout","onBlur");Ta(Ok,"onTransitionEnd");eu("onMouseEnter",["mouseout","mouseover"]);eu("onMouseLeave",["mouseout","mouseover"]);eu("onPointerEnter",["pointerout","pointerover"]);eu("onPointerLeave",["pointerout","pointerover"]);$s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$s("onBeforeInput",["compositionend","keypress","textInput","paste"]);$s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xu="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(" "),KR=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xu));function d1(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,UL(r,t,void 0,e),e.currentTarget=null}function Dk(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var d=r[s],a=d.instance,c=d.currentTarget;if(d=d.listener,a!==o&&i.isPropagationStopped())break e;d1(i,d,c),o=a}else for(s=0;s<r.length;s++){if(d=r[s],a=d.instance,c=d.currentTarget,d=d.listener,a!==o&&i.isPropagationStopped())break e;d1(i,d,c),o=a}}}if(vh)throw e=Nv,vh=!1,Nv=null,e}function zt(e,t){var n=t[qv];n===void 0&&(n=t[qv]=new Set);var r=e+"__bubble";n.has(r)||(Nk(t,e,2,!1),n.add(r))}function sm(e,t,n){var r=0;t&&(r|=4),Nk(n,e,r,t)}var qd="_reactListening"+Math.random().toString(36).slice(2);function jc(e){if(!e[qd]){e[qd]=!0,UC.forEach(function(n){n!=="selectionchange"&&(KR.has(n)||sm(n,!1,e),sm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qd]||(t[qd]=!0,sm("selectionchange",!1,t))}}function Nk(e,t,n,r){switch(Sk(t)){case 1:var i=sR;break;case 4:i=lR;break;default:i=$0}n=i.bind(null,t,n,e),i=void 0,!Dv||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function lm(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var d=r.stateNode.containerInfo;if(d===i||d.nodeType===8&&d.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;d!==null;){if(s=ns(d),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}d=d.parentNode}}r=r.return}sk(function(){var c=o,l=_0(n),u=[];e:{var h=Fk.get(e);if(h!==void 0){var f=A0,p=e;switch(e){case"keypress":if(If(n)===0)break e;case"keydown":case"keyup":f=_R;break;case"focusin":p="focus",f=tm;break;case"focusout":p="blur",f=tm;break;case"beforeblur":case"afterblur":f=tm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Jw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=dR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=ER;break;case Rk:case Pk:case Ik:f=pR;break;case Ok:f=TR;break;case"scroll":f=uR;break;case"wheel":f=MR;break;case"copy":case"cut":case"paste":f=mR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=t1}var g=(t&4)!==0,b=!g&&e==="scroll",x=g?h!==null?h+"Capture":null:h;g=[];for(var S=c,T;S!==null;){T=S;var v=T.stateNode;if(T.tag===5&&v!==null&&(T=v,x!==null&&(v=Oc(S,x),v!=null&&g.push(Hc(S,v,T)))),b)break;S=S.return}0<g.length&&(h=new f(h,p,null,n,l),u.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",h&&n!==Ov&&(p=n.relatedTarget||n.fromElement)&&(ns(p)||p[Eo]))break e;if((f||h)&&(h=l.window===l?l:(h=l.ownerDocument)?h.defaultView||h.parentWindow:window,f?(p=n.relatedTarget||n.toElement,f=c,p=p?ns(p):null,p!==null&&(b=Ts(p),p!==b||p.tag!==5&&p.tag!==6)&&(p=null)):(f=null,p=c),f!==p)){if(g=Jw,v="onMouseLeave",x="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(g=t1,v="onPointerLeave",x="onPointerEnter",S="pointer"),b=f==null?h:wl(f),T=p==null?h:wl(p),h=new g(v,S+"leave",f,n,l),h.target=b,h.relatedTarget=T,v=null,ns(l)===c&&(g=new g(x,S+"enter",p,n,l),g.target=T,g.relatedTarget=b,v=g),b=v,f&&p)t:{for(g=f,x=p,S=0,T=g;T;T=nl(T))S++;for(T=0,v=x;v;v=nl(v))T++;for(;0<S-T;)g=nl(g),S--;for(;0<T-S;)x=nl(x),T--;for(;S--;){if(g===x||x!==null&&g===x.alternate)break t;g=nl(g),x=nl(x)}g=null}else g=null;f!==null&&f1(u,h,f,g,!1),p!==null&&b!==null&&f1(u,b,p,g,!0)}}e:{if(h=c?wl(c):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var w=DR;else if(i1(h))if($k)w=jR;else{w=zR;var y=NR}else(f=h.nodeName)&&f.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(w=BR);if(w&&(w=w(e,c))){Ek(u,w,n,l);break e}y&&y(e,h,c),e==="focusout"&&(y=h._wrapperState)&&y.controlled&&h.type==="number"&&Mv(h,"number",h.value)}switch(y=c?wl(c):window,e){case"focusin":(i1(y)||y.contentEditable==="true")&&(yl=y,Hv=c,hc=null);break;case"focusout":hc=Hv=yl=null;break;case"mousedown":Vv=!0;break;case"contextmenu":case"mouseup":case"dragend":Vv=!1,u1(u,n,l);break;case"selectionchange":if(WR)break;case"keydown":case"keyup":u1(u,n,l)}var m;if(L0)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else vl?Ck(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(_k&&n.locale!=="ko"&&(vl||E!=="onCompositionStart"?E==="onCompositionEnd"&&vl&&(m=xk()):(ua=l,T0="value"in ua?ua.value:ua.textContent,vl=!0)),y=xh(c,E),0<y.length&&(E=new e1(E,e,null,n,l),u.push({event:E,listeners:y}),m?E.data=m:(m=kk(n),m!==null&&(E.data=m)))),(m=RR?PR(e,n):IR(e,n))&&(c=xh(c,"onBeforeInput"),0<c.length&&(l=new e1("onBeforeInput","beforeinput",null,n,l),u.push({event:l,listeners:c}),l.data=m))}Dk(u,t)})}function Hc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xh(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Oc(e,n),o!=null&&r.unshift(Hc(e,o,i)),o=Oc(e,t),o!=null&&r.push(Hc(e,o,i))),e=e.return}return r}function nl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function f1(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var d=n,a=d.alternate,c=d.stateNode;if(a!==null&&a===r)break;d.tag===5&&c!==null&&(d=c,i?(a=Oc(n,o),a!=null&&s.unshift(Hc(n,a,d))):i||(a=Oc(n,o),a!=null&&s.push(Hc(n,a,d)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var qR=/\r\n?/g,YR=/\u0000|\uFFFD/g;function h1(e){return(typeof e=="string"?e:""+e).replace(qR,`
|
||
`).replace(YR,"")}function Yd(e,t,n){if(t=h1(t),h1(e)!==t&&n)throw Error(Ee(425))}function _h(){}var Wv=null,Uv=null;function Gv(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Kv=typeof setTimeout=="function"?setTimeout:void 0,XR=typeof clearTimeout=="function"?clearTimeout:void 0,p1=typeof Promise=="function"?Promise:void 0,QR=typeof queueMicrotask=="function"?queueMicrotask:typeof p1<"u"?function(e){return p1.resolve(null).then(e).catch(ZR)}:Kv;function ZR(e){setTimeout(function(){throw e})}function um(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Nc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Nc(t)}function ga(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function g1(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var yu=Math.random().toString(36).slice(2),Ni="__reactFiber$"+yu,Vc="__reactProps$"+yu,Eo="__reactContainer$"+yu,qv="__reactEvents$"+yu,JR="__reactListeners$"+yu,eP="__reactHandles$"+yu;function ns(e){var t=e[Ni];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Eo]||n[Ni]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=g1(e);e!==null;){if(n=e[Ni])return n;e=g1(e)}return t}e=n,n=e.parentNode}return null}function md(e){return e=e[Ni]||e[Eo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function wl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ee(33))}function Lp(e){return e[Vc]||null}var Yv=[],Sl=-1;function Aa(e){return{current:e}}function jt(e){0>Sl||(e.current=Yv[Sl],Yv[Sl]=null,Sl--)}function Nt(e,t){Sl++,Yv[Sl]=e.current,e.current=t}var Ca={},jn=Aa(Ca),lr=Aa(!1),ys=Ca;function tu(e,t){var n=e.type.contextTypes;if(!n)return Ca;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ur(e){return e=e.childContextTypes,e!=null}function Ch(){jt(lr),jt(jn)}function m1(e,t,n){if(jn.current!==Ca)throw Error(Ee(168));Nt(jn,t),Nt(lr,n)}function zk(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ee(108,NL(e)||"Unknown",i));return Xt({},n,r)}function kh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ca,ys=jn.current,Nt(jn,e),Nt(lr,lr.current),!0}function v1(e,t,n){var r=e.stateNode;if(!r)throw Error(Ee(169));n?(e=zk(e,t,ys),r.__reactInternalMemoizedMergedChildContext=e,jt(lr),jt(jn),Nt(jn,e)):jt(lr),Nt(lr,n)}var ho=null,Rp=!1,cm=!1;function Bk(e){ho===null?ho=[e]:ho.push(e)}function tP(e){Rp=!0,Bk(e)}function Ma(){if(!cm&&ho!==null){cm=!0;var e=0,t=Pt;try{var n=ho;for(Pt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ho=null,Rp=!1}catch(i){throw ho!==null&&(ho=ho.slice(e+1)),dk(C0,Ma),i}finally{Pt=t,cm=!1}}return null}var xl=[],_l=0,Eh=null,$h=0,Gr=[],Kr=0,bs=null,mo=1,vo="";function Ga(e,t){xl[_l++]=$h,xl[_l++]=Eh,Eh=e,$h=t}function jk(e,t,n){Gr[Kr++]=mo,Gr[Kr++]=vo,Gr[Kr++]=bs,bs=e;var r=mo;e=vo;var i=32-vi(r)-1;r&=~(1<<i),n+=1;var o=32-vi(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,mo=1<<32-vi(t)+i|n<<i|r,vo=o+e}else mo=1<<o|n<<i|r,vo=e}function P0(e){e.return!==null&&(Ga(e,1),jk(e,1,0))}function I0(e){for(;e===Eh;)Eh=xl[--_l],xl[_l]=null,$h=xl[--_l],xl[_l]=null;for(;e===bs;)bs=Gr[--Kr],Gr[Kr]=null,vo=Gr[--Kr],Gr[Kr]=null,mo=Gr[--Kr],Gr[Kr]=null}var Sr=null,br=null,Vt=!1,fi=null;function Hk(e,t){var n=qr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function y1(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Sr=e,br=ga(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Sr=e,br=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=bs!==null?{id:mo,overflow:vo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=qr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Sr=e,br=null,!0):!1;default:return!1}}function Xv(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Qv(e){if(Vt){var t=br;if(t){var n=t;if(!y1(e,t)){if(Xv(e))throw Error(Ee(418));t=ga(n.nextSibling);var r=Sr;t&&y1(e,t)?Hk(r,n):(e.flags=e.flags&-4097|2,Vt=!1,Sr=e)}}else{if(Xv(e))throw Error(Ee(418));e.flags=e.flags&-4097|2,Vt=!1,Sr=e}}}function b1(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Sr=e}function Xd(e){if(e!==Sr)return!1;if(!Vt)return b1(e),Vt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Gv(e.type,e.memoizedProps)),t&&(t=br)){if(Xv(e))throw Vk(),Error(Ee(418));for(;t;)Hk(e,t),t=ga(t.nextSibling)}if(b1(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ee(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){br=ga(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}br=null}}else br=Sr?ga(e.stateNode.nextSibling):null;return!0}function Vk(){for(var e=br;e;)e=ga(e.nextSibling)}function nu(){br=Sr=null,Vt=!1}function O0(e){fi===null?fi=[e]:fi.push(e)}var nP=Lo.ReactCurrentBatchConfig;function ci(e,t){if(e&&e.defaultProps){t=Xt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Th=Aa(null),Ah=null,Cl=null,F0=null;function D0(){F0=Cl=Ah=null}function N0(e){var t=Th.current;jt(Th),e._currentValue=t}function Zv(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Bl(e,t){Ah=e,F0=Cl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(sr=!0),e.firstContext=null)}function Zr(e){var t=e._currentValue;if(F0!==e)if(e={context:e,memoizedValue:t,next:null},Cl===null){if(Ah===null)throw Error(Ee(308));Cl=e,Ah.dependencies={lanes:0,firstContext:e}}else Cl=Cl.next=e;return t}var rs=null;function z0(e){rs===null?rs=[e]:rs.push(e)}function Wk(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,z0(t)):(n.next=i.next,i.next=n),t.interleaved=n,$o(e,r)}function $o(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ra=!1;function B0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Uk(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 wo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ma(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,wt&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,$o(e,n)}return i=r.interleaved,i===null?(t.next=t,z0(r)):(t.next=i.next,i.next=t),r.interleaved=t,$o(e,n)}function Of(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,k0(e,n)}}function w1(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Mh(e,t,n,r){var i=e.updateQueue;ra=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,d=i.shared.pending;if(d!==null){i.shared.pending=null;var a=d,c=a.next;a.next=null,s===null?o=c:s.next=c,s=a;var l=e.alternate;l!==null&&(l=l.updateQueue,d=l.lastBaseUpdate,d!==s&&(d===null?l.firstBaseUpdate=c:d.next=c,l.lastBaseUpdate=a))}if(o!==null){var u=i.baseState;s=0,l=c=a=null,d=o;do{var h=d.lane,f=d.eventTime;if((r&h)===h){l!==null&&(l=l.next={eventTime:f,lane:0,tag:d.tag,payload:d.payload,callback:d.callback,next:null});e:{var p=e,g=d;switch(h=t,f=n,g.tag){case 1:if(p=g.payload,typeof p=="function"){u=p.call(f,u,h);break e}u=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(f,u,h):p,h==null)break e;u=Xt({},u,h);break e;case 2:ra=!0}}d.callback!==null&&d.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[d]:h.push(d))}else f={eventTime:f,lane:h,tag:d.tag,payload:d.payload,callback:d.callback,next:null},l===null?(c=l=f,a=u):l=l.next=f,s|=h;if(d=d.next,d===null){if(d=i.shared.pending,d===null)break;h=d,d=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(1);if(l===null&&(a=u),i.baseState=a,i.firstBaseUpdate=c,i.lastBaseUpdate=l,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ss|=s,e.lanes=s,e.memoizedState=u}}function S1(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Ee(191,i));i.call(r)}}}var Gk=new WC.Component().refs;function Jv(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Xt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Pp={isMounted:function(e){return(e=e._reactInternals)?Ts(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=qn(),i=ya(e),o=wo(r,i);o.payload=t,n!=null&&(o.callback=n),t=ma(e,o,i),t!==null&&(yi(t,e,i,r),Of(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=qn(),i=ya(e),o=wo(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=ma(e,o,i),t!==null&&(yi(t,e,i,r),Of(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=qn(),r=ya(e),i=wo(n,r);i.tag=2,t!=null&&(i.callback=t),t=ma(e,i,r),t!==null&&(yi(t,e,r,n),Of(t,e,r))}};function x1(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!Bc(n,r)||!Bc(i,o):!0}function Kk(e,t,n){var r=!1,i=Ca,o=t.contextType;return typeof o=="object"&&o!==null?o=Zr(o):(i=ur(t)?ys:jn.current,r=t.contextTypes,o=(r=r!=null)?tu(e,i):Ca),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Pp,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function _1(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Pp.enqueueReplaceState(t,t.state,null)}function ey(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Gk,B0(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Zr(o):(o=ur(t)?ys:jn.current,i.context=tu(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Jv(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Pp.enqueueReplaceState(i,i.state,null),Mh(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ou(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ee(309));var r=n.stateNode}if(!r)throw Error(Ee(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var d=i.refs;d===Gk&&(d=i.refs={}),s===null?delete d[o]:d[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(Ee(284));if(!n._owner)throw Error(Ee(290,e))}return e}function Qd(e,t){throw e=Object.prototype.toString.call(t),Error(Ee(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function C1(e){var t=e._init;return t(e._payload)}function qk(e){function t(x,S){if(e){var T=x.deletions;T===null?(x.deletions=[S],x.flags|=16):T.push(S)}}function n(x,S){if(!e)return null;for(;S!==null;)t(x,S),S=S.sibling;return null}function r(x,S){for(x=new Map;S!==null;)S.key!==null?x.set(S.key,S):x.set(S.index,S),S=S.sibling;return x}function i(x,S){return x=ba(x,S),x.index=0,x.sibling=null,x}function o(x,S,T){return x.index=T,e?(T=x.alternate,T!==null?(T=T.index,T<S?(x.flags|=2,S):T):(x.flags|=2,S)):(x.flags|=1048576,S)}function s(x){return e&&x.alternate===null&&(x.flags|=2),x}function d(x,S,T,v){return S===null||S.tag!==6?(S=vm(T,x.mode,v),S.return=x,S):(S=i(S,T),S.return=x,S)}function a(x,S,T,v){var w=T.type;return w===ml?l(x,S,T.props.children,v,T.key):S!==null&&(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===na&&C1(w)===S.type)?(v=i(S,T.props),v.ref=Ou(x,S,T),v.return=x,v):(v=jf(T.type,T.key,T.props,null,x.mode,v),v.ref=Ou(x,S,T),v.return=x,v)}function c(x,S,T,v){return S===null||S.tag!==4||S.stateNode.containerInfo!==T.containerInfo||S.stateNode.implementation!==T.implementation?(S=ym(T,x.mode,v),S.return=x,S):(S=i(S,T.children||[]),S.return=x,S)}function l(x,S,T,v,w){return S===null||S.tag!==7?(S=cs(T,x.mode,v,w),S.return=x,S):(S=i(S,T),S.return=x,S)}function u(x,S,T){if(typeof S=="string"&&S!==""||typeof S=="number")return S=vm(""+S,x.mode,T),S.return=x,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Bd:return T=jf(S.type,S.key,S.props,null,x.mode,T),T.ref=Ou(x,null,S),T.return=x,T;case gl:return S=ym(S,x.mode,T),S.return=x,S;case na:var v=S._init;return u(x,v(S._payload),T)}if(qu(S)||Mu(S))return S=cs(S,x.mode,T,null),S.return=x,S;Qd(x,S)}return null}function h(x,S,T,v){var w=S!==null?S.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return w!==null?null:d(x,S,""+T,v);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Bd:return T.key===w?a(x,S,T,v):null;case gl:return T.key===w?c(x,S,T,v):null;case na:return w=T._init,h(x,S,w(T._payload),v)}if(qu(T)||Mu(T))return w!==null?null:l(x,S,T,v,null);Qd(x,T)}return null}function f(x,S,T,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return x=x.get(T)||null,d(S,x,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Bd:return x=x.get(v.key===null?T:v.key)||null,a(S,x,v,w);case gl:return x=x.get(v.key===null?T:v.key)||null,c(S,x,v,w);case na:var y=v._init;return f(x,S,T,y(v._payload),w)}if(qu(v)||Mu(v))return x=x.get(T)||null,l(S,x,v,w,null);Qd(S,v)}return null}function p(x,S,T,v){for(var w=null,y=null,m=S,E=S=0,A=null;m!==null&&E<T.length;E++){m.index>E?(A=m,m=null):A=m.sibling;var C=h(x,m,T[E],v);if(C===null){m===null&&(m=A);break}e&&m&&C.alternate===null&&t(x,m),S=o(C,S,E),y===null?w=C:y.sibling=C,y=C,m=A}if(E===T.length)return n(x,m),Vt&&Ga(x,E),w;if(m===null){for(;E<T.length;E++)m=u(x,T[E],v),m!==null&&(S=o(m,S,E),y===null?w=m:y.sibling=m,y=m);return Vt&&Ga(x,E),w}for(m=r(x,m);E<T.length;E++)A=f(m,x,E,T[E],v),A!==null&&(e&&A.alternate!==null&&m.delete(A.key===null?E:A.key),S=o(A,S,E),y===null?w=A:y.sibling=A,y=A);return e&&m.forEach(function(k){return t(x,k)}),Vt&&Ga(x,E),w}function g(x,S,T,v){var w=Mu(T);if(typeof w!="function")throw Error(Ee(150));if(T=w.call(T),T==null)throw Error(Ee(151));for(var y=w=null,m=S,E=S=0,A=null,C=T.next();m!==null&&!C.done;E++,C=T.next()){m.index>E?(A=m,m=null):A=m.sibling;var k=h(x,m,C.value,v);if(k===null){m===null&&(m=A);break}e&&m&&k.alternate===null&&t(x,m),S=o(k,S,E),y===null?w=k:y.sibling=k,y=k,m=A}if(C.done)return n(x,m),Vt&&Ga(x,E),w;if(m===null){for(;!C.done;E++,C=T.next())C=u(x,C.value,v),C!==null&&(S=o(C,S,E),y===null?w=C:y.sibling=C,y=C);return Vt&&Ga(x,E),w}for(m=r(x,m);!C.done;E++,C=T.next())C=f(m,x,E,C.value,v),C!==null&&(e&&C.alternate!==null&&m.delete(C.key===null?E:C.key),S=o(C,S,E),y===null?w=C:y.sibling=C,y=C);return e&&m.forEach(function(I){return t(x,I)}),Vt&&Ga(x,E),w}function b(x,S,T,v){if(typeof T=="object"&&T!==null&&T.type===ml&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case Bd:e:{for(var w=T.key,y=S;y!==null;){if(y.key===w){if(w=T.type,w===ml){if(y.tag===7){n(x,y.sibling),S=i(y,T.props.children),S.return=x,x=S;break e}}else if(y.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===na&&C1(w)===y.type){n(x,y.sibling),S=i(y,T.props),S.ref=Ou(x,y,T),S.return=x,x=S;break e}n(x,y);break}else t(x,y);y=y.sibling}T.type===ml?(S=cs(T.props.children,x.mode,v,T.key),S.return=x,x=S):(v=jf(T.type,T.key,T.props,null,x.mode,v),v.ref=Ou(x,S,T),v.return=x,x=v)}return s(x);case gl:e:{for(y=T.key;S!==null;){if(S.key===y)if(S.tag===4&&S.stateNode.containerInfo===T.containerInfo&&S.stateNode.implementation===T.implementation){n(x,S.sibling),S=i(S,T.children||[]),S.return=x,x=S;break e}else{n(x,S);break}else t(x,S);S=S.sibling}S=ym(T,x.mode,v),S.return=x,x=S}return s(x);case na:return y=T._init,b(x,S,y(T._payload),v)}if(qu(T))return p(x,S,T,v);if(Mu(T))return g(x,S,T,v);Qd(x,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,S!==null&&S.tag===6?(n(x,S.sibling),S=i(S,T),S.return=x,x=S):(n(x,S),S=vm(T,x.mode,v),S.return=x,x=S),s(x)):n(x,S)}return b}var ru=qk(!0),Yk=qk(!1),vd={},Hi=Aa(vd),Wc=Aa(vd),Uc=Aa(vd);function is(e){if(e===vd)throw Error(Ee(174));return e}function j0(e,t){switch(Nt(Uc,t),Nt(Wc,e),Nt(Hi,vd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Rv(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Rv(t,e)}jt(Hi),Nt(Hi,t)}function iu(){jt(Hi),jt(Wc),jt(Uc)}function Xk(e){is(Uc.current);var t=is(Hi.current),n=Rv(t,e.type);t!==n&&(Nt(Wc,e),Nt(Hi,n))}function H0(e){Wc.current===e&&(jt(Hi),jt(Wc))}var Kt=Aa(0);function Lh(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var dm=[];function V0(){for(var e=0;e<dm.length;e++)dm[e]._workInProgressVersionPrimary=null;dm.length=0}var Ff=Lo.ReactCurrentDispatcher,fm=Lo.ReactCurrentBatchConfig,ws=0,Yt=null,fn=null,bn=null,Rh=!1,pc=!1,Gc=0,rP=0;function Dn(){throw Error(Ee(321))}function W0(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!bi(e[n],t[n]))return!1;return!0}function U0(e,t,n,r,i,o){if(ws=o,Yt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ff.current=e===null||e.memoizedState===null?sP:lP,e=n(r,i),pc){o=0;do{if(pc=!1,Gc=0,25<=o)throw Error(Ee(301));o+=1,bn=fn=null,t.updateQueue=null,Ff.current=uP,e=n(r,i)}while(pc)}if(Ff.current=Ph,t=fn!==null&&fn.next!==null,ws=0,bn=fn=Yt=null,Rh=!1,t)throw Error(Ee(300));return e}function G0(){var e=Gc!==0;return Gc=0,e}function Pi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bn===null?Yt.memoizedState=bn=e:bn=bn.next=e,bn}function Jr(){if(fn===null){var e=Yt.alternate;e=e!==null?e.memoizedState:null}else e=fn.next;var t=bn===null?Yt.memoizedState:bn.next;if(t!==null)bn=t,fn=e;else{if(e===null)throw Error(Ee(310));fn=e,e={memoizedState:fn.memoizedState,baseState:fn.baseState,baseQueue:fn.baseQueue,queue:fn.queue,next:null},bn===null?Yt.memoizedState=bn=e:bn=bn.next=e}return bn}function Kc(e,t){return typeof t=="function"?t(e):t}function hm(e){var t=Jr(),n=t.queue;if(n===null)throw Error(Ee(311));n.lastRenderedReducer=e;var r=fn,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var d=s=null,a=null,c=o;do{var l=c.lane;if((ws&l)===l)a!==null&&(a=a.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 u={lane:l,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};a===null?(d=a=u,s=r):a=a.next=u,Yt.lanes|=l,Ss|=l}c=c.next}while(c!==null&&c!==o);a===null?s=r:a.next=d,bi(r,t.memoizedState)||(sr=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Yt.lanes|=o,Ss|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function pm(e){var t=Jr(),n=t.queue;if(n===null)throw Error(Ee(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);bi(o,t.memoizedState)||(sr=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Qk(){}function Zk(e,t){var n=Yt,r=Jr(),i=t(),o=!bi(r.memoizedState,i);if(o&&(r.memoizedState=i,sr=!0),r=r.queue,K0(tE.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||bn!==null&&bn.memoizedState.tag&1){if(n.flags|=2048,qc(9,eE.bind(null,n,r,i,t),void 0,null),wn===null)throw Error(Ee(349));ws&30||Jk(n,t,i)}return i}function Jk(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Yt.updateQueue,t===null?(t={lastEffect:null,stores:null},Yt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function eE(e,t,n,r){t.value=n,t.getSnapshot=r,nE(t)&&rE(e)}function tE(e,t,n){return n(function(){nE(t)&&rE(e)})}function nE(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!bi(e,n)}catch{return!0}}function rE(e){var t=$o(e,1);t!==null&&yi(t,e,1,-1)}function k1(e){var t=Pi();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Kc,lastRenderedState:e},t.queue=e,e=e.dispatch=aP.bind(null,Yt,e),[t.memoizedState,e]}function qc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Yt.updateQueue,t===null?(t={lastEffect:null,stores:null},Yt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function iE(){return Jr().memoizedState}function Df(e,t,n,r){var i=Pi();Yt.flags|=e,i.memoizedState=qc(1|t,n,void 0,r===void 0?null:r)}function Ip(e,t,n,r){var i=Jr();r=r===void 0?null:r;var o=void 0;if(fn!==null){var s=fn.memoizedState;if(o=s.destroy,r!==null&&W0(r,s.deps)){i.memoizedState=qc(t,n,o,r);return}}Yt.flags|=e,i.memoizedState=qc(1|t,n,o,r)}function E1(e,t){return Df(8390656,8,e,t)}function K0(e,t){return Ip(2048,8,e,t)}function oE(e,t){return Ip(4,2,e,t)}function aE(e,t){return Ip(4,4,e,t)}function sE(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function lE(e,t,n){return n=n!=null?n.concat([e]):null,Ip(4,4,sE.bind(null,t,e),n)}function q0(){}function uE(e,t){var n=Jr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&W0(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function cE(e,t){var n=Jr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&W0(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function dE(e,t,n){return ws&21?(bi(n,t)||(n=pk(),Yt.lanes|=n,Ss|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,sr=!0),e.memoizedState=n)}function iP(e,t){var n=Pt;Pt=n!==0&&4>n?n:4,e(!0);var r=fm.transition;fm.transition={};try{e(!1),t()}finally{Pt=n,fm.transition=r}}function fE(){return Jr().memoizedState}function oP(e,t,n){var r=ya(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hE(e))pE(t,n);else if(n=Wk(e,t,n,r),n!==null){var i=qn();yi(n,e,r,i),gE(n,t,r)}}function aP(e,t,n){var r=ya(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hE(e))pE(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,d=o(s,n);if(i.hasEagerState=!0,i.eagerState=d,bi(d,s)){var a=t.interleaved;a===null?(i.next=i,z0(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Wk(e,t,i,r),n!==null&&(i=qn(),yi(n,e,r,i),gE(n,t,r))}}function hE(e){var t=e.alternate;return e===Yt||t!==null&&t===Yt}function pE(e,t){pc=Rh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gE(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,k0(e,n)}}var Ph={readContext:Zr,useCallback:Dn,useContext:Dn,useEffect:Dn,useImperativeHandle:Dn,useInsertionEffect:Dn,useLayoutEffect:Dn,useMemo:Dn,useReducer:Dn,useRef:Dn,useState:Dn,useDebugValue:Dn,useDeferredValue:Dn,useTransition:Dn,useMutableSource:Dn,useSyncExternalStore:Dn,useId:Dn,unstable_isNewReconciler:!1},sP={readContext:Zr,useCallback:function(e,t){return Pi().memoizedState=[e,t===void 0?null:t],e},useContext:Zr,useEffect:E1,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Df(4194308,4,sE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Df(4194308,4,e,t)},useInsertionEffect:function(e,t){return Df(4,2,e,t)},useMemo:function(e,t){var n=Pi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Pi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=oP.bind(null,Yt,e),[r.memoizedState,e]},useRef:function(e){var t=Pi();return e={current:e},t.memoizedState=e},useState:k1,useDebugValue:q0,useDeferredValue:function(e){return Pi().memoizedState=e},useTransition:function(){var e=k1(!1),t=e[0];return e=iP.bind(null,e[1]),Pi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Yt,i=Pi();if(Vt){if(n===void 0)throw Error(Ee(407));n=n()}else{if(n=t(),wn===null)throw Error(Ee(349));ws&30||Jk(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,E1(tE.bind(null,r,o,e),[e]),r.flags|=2048,qc(9,eE.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Pi(),t=wn.identifierPrefix;if(Vt){var n=vo,r=mo;n=(r&~(1<<32-vi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Gc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=rP++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lP={readContext:Zr,useCallback:uE,useContext:Zr,useEffect:K0,useImperativeHandle:lE,useInsertionEffect:oE,useLayoutEffect:aE,useMemo:cE,useReducer:hm,useRef:iE,useState:function(){return hm(Kc)},useDebugValue:q0,useDeferredValue:function(e){var t=Jr();return dE(t,fn.memoizedState,e)},useTransition:function(){var e=hm(Kc)[0],t=Jr().memoizedState;return[e,t]},useMutableSource:Qk,useSyncExternalStore:Zk,useId:fE,unstable_isNewReconciler:!1},uP={readContext:Zr,useCallback:uE,useContext:Zr,useEffect:K0,useImperativeHandle:lE,useInsertionEffect:oE,useLayoutEffect:aE,useMemo:cE,useReducer:pm,useRef:iE,useState:function(){return pm(Kc)},useDebugValue:q0,useDeferredValue:function(e){var t=Jr();return fn===null?t.memoizedState=e:dE(t,fn.memoizedState,e)},useTransition:function(){var e=pm(Kc)[0],t=Jr().memoizedState;return[e,t]},useMutableSource:Qk,useSyncExternalStore:Zk,useId:fE,unstable_isNewReconciler:!1};function ou(e,t){try{var n="",r=t;do n+=DL(r),r=r.return;while(r);var i=n}catch(o){i=`
|
||
Error generating stack: `+o.message+`
|
||
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function gm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ty(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var cP=typeof WeakMap=="function"?WeakMap:Map;function mE(e,t,n){n=wo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Oh||(Oh=!0,dy=r),ty(e,t)},n}function vE(e,t,n){n=wo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ty(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ty(e,t),typeof r!="function"&&(va===null?va=new Set([this]):va.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function $1(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new cP;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=CP.bind(null,e,t,n),t.then(e,e))}function T1(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function A1(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=wo(-1,1),t.tag=2,ma(n,t,1))),n.lanes|=1),e)}var dP=Lo.ReactCurrentOwner,sr=!1;function Un(e,t,n,r){t.child=e===null?Yk(t,null,n,r):ru(t,e.child,n,r)}function M1(e,t,n,r,i){n=n.render;var o=t.ref;return Bl(t,i),r=U0(e,t,n,r,o,i),n=G0(),e!==null&&!sr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,To(e,t,i)):(Vt&&n&&P0(t),t.flags|=1,Un(e,t,r,i),t.child)}function L1(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!nb(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,yE(e,t,o,r,i)):(e=jf(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Bc,n(s,r)&&e.ref===t.ref)return To(e,t,i)}return t.flags|=1,e=ba(o,r),e.ref=t.ref,e.return=t,t.child=e}function yE(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Bc(o,r)&&e.ref===t.ref)if(sr=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(sr=!0);else return t.lanes=e.lanes,To(e,t,i)}return ny(e,t,n,r,i)}function bE(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Nt(El,vr),vr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Nt(El,vr),vr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Nt(El,vr),vr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Nt(El,vr),vr|=r;return Un(e,t,i,n),t.child}function wE(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ny(e,t,n,r,i){var o=ur(n)?ys:jn.current;return o=tu(t,o),Bl(t,i),n=U0(e,t,n,r,o,i),r=G0(),e!==null&&!sr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,To(e,t,i)):(Vt&&r&&P0(t),t.flags|=1,Un(e,t,n,i),t.child)}function R1(e,t,n,r,i){if(ur(n)){var o=!0;kh(t)}else o=!1;if(Bl(t,i),t.stateNode===null)Nf(e,t),Kk(t,n,r),ey(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,d=t.memoizedProps;s.props=d;var a=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Zr(c):(c=ur(n)?ys:jn.current,c=tu(t,c));var l=n.getDerivedStateFromProps,u=typeof l=="function"||typeof s.getSnapshotBeforeUpdate=="function";u||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d!==r||a!==c)&&_1(t,s,r,c),ra=!1;var h=t.memoizedState;s.state=h,Mh(t,r,s,i),a=t.memoizedState,d!==r||h!==a||lr.current||ra?(typeof l=="function"&&(Jv(t,n,l,r),a=t.memoizedState),(d=ra||x1(t,n,d,r,h,a,c))?(u||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=c,r=d):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Uk(e,t),d=t.memoizedProps,c=t.type===t.elementType?d:ci(t.type,d),s.props=c,u=t.pendingProps,h=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=Zr(a):(a=ur(n)?ys:jn.current,a=tu(t,a));var f=n.getDerivedStateFromProps;(l=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d!==u||h!==a)&&_1(t,s,r,a),ra=!1,h=t.memoizedState,s.state=h,Mh(t,r,s,i);var p=t.memoizedState;d!==u||h!==p||lr.current||ra?(typeof f=="function"&&(Jv(t,n,f,r),p=t.memoizedState),(c=ra||x1(t,n,c,r,h,p,a)||!1)?(l||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=a,r=c):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return ry(e,t,n,r,o,i)}function ry(e,t,n,r,i,o){wE(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&v1(t,n,!1),To(e,t,o);r=t.stateNode,dP.current=t;var d=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=ru(t,e.child,null,o),t.child=ru(t,null,d,o)):Un(e,t,d,o),t.memoizedState=r.state,i&&v1(t,n,!0),t.child}function SE(e){var t=e.stateNode;t.pendingContext?m1(e,t.pendingContext,t.pendingContext!==t.context):t.context&&m1(e,t.context,!1),j0(e,t.containerInfo)}function P1(e,t,n,r,i){return nu(),O0(i),t.flags|=256,Un(e,t,n,r),t.child}var iy={dehydrated:null,treeContext:null,retryLane:0};function oy(e){return{baseLanes:e,cachePool:null,transitions:null}}function xE(e,t,n){var r=t.pendingProps,i=Kt.current,o=!1,s=(t.flags&128)!==0,d;if((d=s)||(d=e!==null&&e.memoizedState===null?!1:(i&2)!==0),d?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Nt(Kt,i&1),e===null)return Qv(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Dp(s,r,0,null),e=cs(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=oy(n),t.memoizedState=iy,e):Y0(t,s));if(i=e.memoizedState,i!==null&&(d=i.dehydrated,d!==null))return fP(e,t,s,r,d,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,d=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=ba(i,a),r.subtreeFlags=i.subtreeFlags&14680064),d!==null?o=ba(d,o):(o=cs(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?oy(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=iy,r}return o=e.child,e=o.sibling,r=ba(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Y0(e,t){return t=Dp({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Zd(e,t,n,r){return r!==null&&O0(r),ru(t,e.child,null,n),e=Y0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fP(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=gm(Error(Ee(422))),Zd(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Dp({mode:"visible",children:r.children},i,0,null),o=cs(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&ru(t,e.child,null,s),t.child.memoizedState=oy(s),t.memoizedState=iy,o);if(!(t.mode&1))return Zd(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var d=r.dgst;return r=d,o=Error(Ee(419)),r=gm(o,r,void 0),Zd(e,t,s,r)}if(d=(s&e.childLanes)!==0,sr||d){if(r=wn,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,$o(e,i),yi(r,e,i,-1))}return tb(),r=gm(Error(Ee(421))),Zd(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=kP.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,br=ga(i.nextSibling),Sr=t,Vt=!0,fi=null,e!==null&&(Gr[Kr++]=mo,Gr[Kr++]=vo,Gr[Kr++]=bs,mo=e.id,vo=e.overflow,bs=t),t=Y0(t,r.children),t.flags|=4096,t)}function I1(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zv(e.return,t,n)}function mm(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function _E(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Un(e,t,r.children,n),r=Kt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&I1(e,n,t);else if(e.tag===19)I1(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Nt(Kt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Lh(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),mm(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Lh(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}mm(t,!0,n,null,o);break;case"together":mm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Nf(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function To(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ss|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ee(153));if(t.child!==null){for(e=t.child,n=ba(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ba(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hP(e,t,n){switch(t.tag){case 3:SE(t),nu();break;case 5:Xk(t);break;case 1:ur(t.type)&&kh(t);break;case 4:j0(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Nt(Th,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Nt(Kt,Kt.current&1),t.flags|=128,null):n&t.child.childLanes?xE(e,t,n):(Nt(Kt,Kt.current&1),e=To(e,t,n),e!==null?e.sibling:null);Nt(Kt,Kt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return _E(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Nt(Kt,Kt.current),r)break;return null;case 22:case 23:return t.lanes=0,bE(e,t,n)}return To(e,t,n)}var CE,ay,kE,EE;CE=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ay=function(){};kE=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,is(Hi.current);var o=null;switch(n){case"input":i=Tv(e,i),r=Tv(e,r),o=[];break;case"select":i=Xt({},i,{value:void 0}),r=Xt({},r,{value:void 0}),o=[];break;case"textarea":i=Lv(e,i),r=Lv(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=_h)}Pv(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var d=i[c];for(s in d)d.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Pc.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var a=r[c];if(d=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&a!==d&&(a!=null||d!=null))if(c==="style")if(d){for(s in d)!d.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&d[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,d=d?d.__html:void 0,a!=null&&d!==a&&(o=o||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Pc.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&zt("scroll",e),o||d===a||(o=[])):(o=o||[]).push(c,a))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};EE=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fu(e,t){if(!Vt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pP(e,t,n){var r=t.pendingProps;switch(I0(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nn(t),null;case 1:return ur(t.type)&&Ch(),Nn(t),null;case 3:return r=t.stateNode,iu(),jt(lr),jt(jn),V0(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Xd(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,fi!==null&&(py(fi),fi=null))),ay(e,t),Nn(t),null;case 5:H0(t);var i=is(Uc.current);if(n=t.type,e!==null&&t.stateNode!=null)kE(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ee(166));return Nn(t),null}if(e=is(Hi.current),Xd(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Ni]=t,r[Vc]=o,e=(t.mode&1)!==0,n){case"dialog":zt("cancel",r),zt("close",r);break;case"iframe":case"object":case"embed":zt("load",r);break;case"video":case"audio":for(i=0;i<Xu.length;i++)zt(Xu[i],r);break;case"source":zt("error",r);break;case"img":case"image":case"link":zt("error",r),zt("load",r);break;case"details":zt("toggle",r);break;case"input":Vw(r,o),zt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},zt("invalid",r);break;case"textarea":Uw(r,o),zt("invalid",r)}Pv(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var d=o[s];s==="children"?typeof d=="string"?r.textContent!==d&&(o.suppressHydrationWarning!==!0&&Yd(r.textContent,d,e),i=["children",d]):typeof d=="number"&&r.textContent!==""+d&&(o.suppressHydrationWarning!==!0&&Yd(r.textContent,d,e),i=["children",""+d]):Pc.hasOwnProperty(s)&&d!=null&&s==="onScroll"&&zt("scroll",r)}switch(n){case"input":jd(r),Ww(r,o,!0);break;case"textarea":jd(r),Gw(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=_h)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=JC(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ni]=t,e[Vc]=r,CE(e,t,!1,!1),t.stateNode=e;e:{switch(s=Iv(n,r),n){case"dialog":zt("cancel",e),zt("close",e),i=r;break;case"iframe":case"object":case"embed":zt("load",e),i=r;break;case"video":case"audio":for(i=0;i<Xu.length;i++)zt(Xu[i],e);i=r;break;case"source":zt("error",e),i=r;break;case"img":case"image":case"link":zt("error",e),zt("load",e),i=r;break;case"details":zt("toggle",e),i=r;break;case"input":Vw(e,r),i=Tv(e,r),zt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Xt({},r,{value:void 0}),zt("invalid",e);break;case"textarea":Uw(e,r),i=Lv(e,r),zt("invalid",e);break;default:i=r}Pv(n,i),d=i;for(o in d)if(d.hasOwnProperty(o)){var a=d[o];o==="style"?nk(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&ek(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Ic(e,a):typeof a=="number"&&Ic(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Pc.hasOwnProperty(o)?a!=null&&o==="onScroll"&&zt("scroll",e):a!=null&&b0(e,o,a,s))}switch(n){case"input":jd(e),Ww(e,r,!1);break;case"textarea":jd(e),Gw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+_a(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Fl(e,!!r.multiple,o,!1):r.defaultValue!=null&&Fl(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=_h)}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)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Nn(t),null;case 6:if(e&&t.stateNode!=null)EE(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Ee(166));if(n=is(Uc.current),is(Hi.current),Xd(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ni]=t,(o=r.nodeValue!==n)&&(e=Sr,e!==null))switch(e.tag){case 3:Yd(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Yd(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ni]=t,t.stateNode=r}return Nn(t),null;case 13:if(jt(Kt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Vt&&br!==null&&t.mode&1&&!(t.flags&128))Vk(),nu(),t.flags|=98560,o=!1;else if(o=Xd(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Ee(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Ee(317));o[Ni]=t}else nu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nn(t),o=!1}else fi!==null&&(py(fi),fi=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Kt.current&1?pn===0&&(pn=3):tb())),t.updateQueue!==null&&(t.flags|=4),Nn(t),null);case 4:return iu(),ay(e,t),e===null&&jc(t.stateNode.containerInfo),Nn(t),null;case 10:return N0(t.type._context),Nn(t),null;case 17:return ur(t.type)&&Ch(),Nn(t),null;case 19:if(jt(Kt),o=t.memoizedState,o===null)return Nn(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)Fu(o,!1);else{if(pn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Lh(e),s!==null){for(t.flags|=128,Fu(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Nt(Kt,Kt.current&1|2),t.child}e=e.sibling}o.tail!==null&&nn()>au&&(t.flags|=128,r=!0,Fu(o,!1),t.lanes=4194304)}else{if(!r)if(e=Lh(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Vt)return Nn(t),null}else 2*nn()-o.renderingStartTime>au&&n!==1073741824&&(t.flags|=128,r=!0,Fu(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=nn(),t.sibling=null,n=Kt.current,Nt(Kt,r?n&1|2:n&1),t):(Nn(t),null);case 22:case 23:return eb(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?vr&1073741824&&(Nn(t),t.subtreeFlags&6&&(t.flags|=8192)):Nn(t),null;case 24:return null;case 25:return null}throw Error(Ee(156,t.tag))}function gP(e,t){switch(I0(t),t.tag){case 1:return ur(t.type)&&Ch(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return iu(),jt(lr),jt(jn),V0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return H0(t),null;case 13:if(jt(Kt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ee(340));nu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return jt(Kt),null;case 4:return iu(),null;case 10:return N0(t.type._context),null;case 22:case 23:return eb(),null;case 24:return null;default:return null}}var Jd=!1,Bn=!1,mP=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function kl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){en(e,t,r)}else n.current=null}function sy(e,t,n){try{n()}catch(r){en(e,t,r)}}var O1=!1;function vP(e,t){if(Wv=wh,e=Mk(),R0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,d=-1,a=-1,c=0,l=0,u=e,h=null;t:for(;;){for(var f;u!==n||i!==0&&u.nodeType!==3||(d=s+i),u!==o||r!==0&&u.nodeType!==3||(a=s+r),u.nodeType===3&&(s+=u.nodeValue.length),(f=u.firstChild)!==null;)h=u,u=f;for(;;){if(u===e)break t;if(h===n&&++c===i&&(d=s),h===o&&++l===r&&(a=s),(f=u.nextSibling)!==null)break;u=h,h=u.parentNode}u=f}n=d===-1||a===-1?null:{start:d,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Uv={focusedElem:e,selectionRange:n},wh=!1,Pe=t;Pe!==null;)if(t=Pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Pe=e;else for(;Pe!==null;){t=Pe;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,b=p.memoizedState,x=t.stateNode,S=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:ci(t.type,g),b);x.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ee(163))}}catch(v){en(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,Pe=e;break}Pe=t.return}return p=O1,O1=!1,p}function gc(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&sy(t,n,o)}i=i.next}while(i!==r)}}function Op(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ly(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $E(e){var t=e.alternate;t!==null&&(e.alternate=null,$E(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ni],delete t[Vc],delete t[qv],delete t[JR],delete t[eP])),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 TE(e){return e.tag===5||e.tag===3||e.tag===4}function F1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||TE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function uy(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_h));else if(r!==4&&(e=e.child,e!==null))for(uy(e,t,n),e=e.sibling;e!==null;)uy(e,t,n),e=e.sibling}function cy(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(cy(e,t,n),e=e.sibling;e!==null;)cy(e,t,n),e=e.sibling}var kn=null,di=!1;function Ko(e,t,n){for(n=n.child;n!==null;)AE(e,t,n),n=n.sibling}function AE(e,t,n){if(ji&&typeof ji.onCommitFiberUnmount=="function")try{ji.onCommitFiberUnmount($p,n)}catch{}switch(n.tag){case 5:Bn||kl(n,t);case 6:var r=kn,i=di;kn=null,Ko(e,t,n),kn=r,di=i,kn!==null&&(di?(e=kn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):kn.removeChild(n.stateNode));break;case 18:kn!==null&&(di?(e=kn,n=n.stateNode,e.nodeType===8?um(e.parentNode,n):e.nodeType===1&&um(e,n),Nc(e)):um(kn,n.stateNode));break;case 4:r=kn,i=di,kn=n.stateNode.containerInfo,di=!0,Ko(e,t,n),kn=r,di=i;break;case 0:case 11:case 14:case 15:if(!Bn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&sy(n,t,s),i=i.next}while(i!==r)}Ko(e,t,n);break;case 1:if(!Bn&&(kl(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(d){en(n,t,d)}Ko(e,t,n);break;case 21:Ko(e,t,n);break;case 22:n.mode&1?(Bn=(r=Bn)||n.memoizedState!==null,Ko(e,t,n),Bn=r):Ko(e,t,n);break;default:Ko(e,t,n)}}function D1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new mP),t.forEach(function(r){var i=EP.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function li(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,d=s;e:for(;d!==null;){switch(d.tag){case 5:kn=d.stateNode,di=!1;break e;case 3:kn=d.stateNode.containerInfo,di=!0;break e;case 4:kn=d.stateNode.containerInfo,di=!0;break e}d=d.return}if(kn===null)throw Error(Ee(160));AE(o,s,i),kn=null,di=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(c){en(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ME(t,e),t=t.sibling}function ME(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(li(t,e),Li(e),r&4){try{gc(3,e,e.return),Op(3,e)}catch(g){en(e,e.return,g)}try{gc(5,e,e.return)}catch(g){en(e,e.return,g)}}break;case 1:li(t,e),Li(e),r&512&&n!==null&&kl(n,n.return);break;case 5:if(li(t,e),Li(e),r&512&&n!==null&&kl(n,n.return),e.flags&32){var i=e.stateNode;try{Ic(i,"")}catch(g){en(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,d=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{d==="input"&&o.type==="radio"&&o.name!=null&&QC(i,o),Iv(d,s);var c=Iv(d,o);for(s=0;s<a.length;s+=2){var l=a[s],u=a[s+1];l==="style"?nk(i,u):l==="dangerouslySetInnerHTML"?ek(i,u):l==="children"?Ic(i,u):b0(i,l,u,c)}switch(d){case"input":Av(i,o);break;case"textarea":ZC(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var f=o.value;f!=null?Fl(i,!!o.multiple,f,!1):h!==!!o.multiple&&(o.defaultValue!=null?Fl(i,!!o.multiple,o.defaultValue,!0):Fl(i,!!o.multiple,o.multiple?[]:"",!1))}i[Vc]=o}catch(g){en(e,e.return,g)}}break;case 6:if(li(t,e),Li(e),r&4){if(e.stateNode===null)throw Error(Ee(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(g){en(e,e.return,g)}}break;case 3:if(li(t,e),Li(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Nc(t.containerInfo)}catch(g){en(e,e.return,g)}break;case 4:li(t,e),Li(e);break;case 13:li(t,e),Li(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Z0=nn())),r&4&&D1(e);break;case 22:if(l=n!==null&&n.memoizedState!==null,e.mode&1?(Bn=(c=Bn)||l,li(t,e),Bn=c):li(t,e),Li(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!l&&e.mode&1)for(Pe=e,l=e.child;l!==null;){for(u=Pe=l;Pe!==null;){switch(h=Pe,f=h.child,h.tag){case 0:case 11:case 14:case 15:gc(4,h,h.return);break;case 1:kl(h,h.return);var p=h.stateNode;if(typeof p.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){en(r,n,g)}}break;case 5:kl(h,h.return);break;case 22:if(h.memoizedState!==null){z1(u);continue}}f!==null?(f.return=h,Pe=f):z1(u)}l=l.sibling}e:for(l=null,u=e;;){if(u.tag===5){if(l===null){l=u;try{i=u.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(d=u.stateNode,a=u.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,d.style.display=tk("display",s))}catch(g){en(e,e.return,g)}}}else if(u.tag===6){if(l===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(g){en(e,e.return,g)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;l===u&&(l=null),u=u.return}l===u&&(l=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:li(t,e),Li(e),r&4&&D1(e);break;case 21:break;default:li(t,e),Li(e)}}function Li(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(TE(n)){var r=n;break e}n=n.return}throw Error(Ee(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ic(i,""),r.flags&=-33);var o=F1(e);cy(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,d=F1(e);uy(e,d,s);break;default:throw Error(Ee(161))}}catch(a){en(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yP(e,t,n){Pe=e,LE(e)}function LE(e,t,n){for(var r=(e.mode&1)!==0;Pe!==null;){var i=Pe,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Jd;if(!s){var d=i.alternate,a=d!==null&&d.memoizedState!==null||Bn;d=Jd;var c=Bn;if(Jd=s,(Bn=a)&&!c)for(Pe=i;Pe!==null;)s=Pe,a=s.child,s.tag===22&&s.memoizedState!==null?B1(i):a!==null?(a.return=s,Pe=a):B1(i);for(;o!==null;)Pe=o,LE(o),o=o.sibling;Pe=i,Jd=d,Bn=c}N1(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,Pe=o):N1(e)}}function N1(e){for(;Pe!==null;){var t=Pe;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Bn||Op(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Bn)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ci(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&S1(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}S1(t,s,n)}break;case 5:var d=t.stateNode;if(n===null&&t.flags&4){n=d;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var l=c.memoizedState;if(l!==null){var u=l.dehydrated;u!==null&&Nc(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ee(163))}Bn||t.flags&512&&ly(t)}catch(h){en(t,t.return,h)}}if(t===e){Pe=null;break}if(n=t.sibling,n!==null){n.return=t.return,Pe=n;break}Pe=t.return}}function z1(e){for(;Pe!==null;){var t=Pe;if(t===e){Pe=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Pe=n;break}Pe=t.return}}function B1(e){for(;Pe!==null;){var t=Pe;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Op(4,t)}catch(a){en(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){en(t,i,a)}}var o=t.return;try{ly(t)}catch(a){en(t,o,a)}break;case 5:var s=t.return;try{ly(t)}catch(a){en(t,s,a)}}}catch(a){en(t,t.return,a)}if(t===e){Pe=null;break}var d=t.sibling;if(d!==null){d.return=t.return,Pe=d;break}Pe=t.return}}var bP=Math.ceil,Ih=Lo.ReactCurrentDispatcher,X0=Lo.ReactCurrentOwner,Xr=Lo.ReactCurrentBatchConfig,wt=0,wn=null,cn=null,An=0,vr=0,El=Aa(0),pn=0,Yc=null,Ss=0,Fp=0,Q0=0,mc=null,ir=null,Z0=0,au=1/0,fo=null,Oh=!1,dy=null,va=null,ef=!1,ca=null,Fh=0,vc=0,fy=null,zf=-1,Bf=0;function qn(){return wt&6?nn():zf!==-1?zf:zf=nn()}function ya(e){return e.mode&1?wt&2&&An!==0?An&-An:nP.transition!==null?(Bf===0&&(Bf=pk()),Bf):(e=Pt,e!==0||(e=window.event,e=e===void 0?16:Sk(e.type)),e):1}function yi(e,t,n,r){if(50<vc)throw vc=0,fy=null,Error(Ee(185));pd(e,n,r),(!(wt&2)||e!==wn)&&(e===wn&&(!(wt&2)&&(Fp|=n),pn===4&&sa(e,An)),cr(e,r),n===1&&wt===0&&!(t.mode&1)&&(au=nn()+500,Rp&&Ma()))}function cr(e,t){var n=e.callbackNode;nR(e,t);var r=bh(e,e===wn?An:0);if(r===0)n!==null&&Yw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Yw(n),t===1)e.tag===0?tP(j1.bind(null,e)):Bk(j1.bind(null,e)),QR(function(){!(wt&6)&&Ma()}),n=null;else{switch(gk(r)){case 1:n=C0;break;case 4:n=fk;break;case 16:n=yh;break;case 536870912:n=hk;break;default:n=yh}n=zE(n,RE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function RE(e,t){if(zf=-1,Bf=0,wt&6)throw Error(Ee(327));var n=e.callbackNode;if(jl()&&e.callbackNode!==n)return null;var r=bh(e,e===wn?An:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Dh(e,r);else{t=r;var i=wt;wt|=2;var o=IE();(wn!==e||An!==t)&&(fo=null,au=nn()+500,us(e,t));do try{xP();break}catch(d){PE(e,d)}while(1);D0(),Ih.current=o,wt=i,cn!==null?t=0:(wn=null,An=0,t=pn)}if(t!==0){if(t===2&&(i=zv(e),i!==0&&(r=i,t=hy(e,i))),t===1)throw n=Yc,us(e,0),sa(e,r),cr(e,nn()),n;if(t===6)sa(e,r);else{if(i=e.current.alternate,!(r&30)&&!wP(i)&&(t=Dh(e,r),t===2&&(o=zv(e),o!==0&&(r=o,t=hy(e,o))),t===1))throw n=Yc,us(e,0),sa(e,r),cr(e,nn()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ee(345));case 2:Ka(e,ir,fo);break;case 3:if(sa(e,r),(r&130023424)===r&&(t=Z0+500-nn(),10<t)){if(bh(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){qn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Kv(Ka.bind(null,e,ir,fo),t);break}Ka(e,ir,fo);break;case 4:if(sa(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-vi(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*bP(r/1960))-r,10<r){e.timeoutHandle=Kv(Ka.bind(null,e,ir,fo),r);break}Ka(e,ir,fo);break;case 5:Ka(e,ir,fo);break;default:throw Error(Ee(329))}}}return cr(e,nn()),e.callbackNode===n?RE.bind(null,e):null}function hy(e,t){var n=mc;return e.current.memoizedState.isDehydrated&&(us(e,t).flags|=256),e=Dh(e,t),e!==2&&(t=ir,ir=n,t!==null&&py(t)),e}function py(e){ir===null?ir=e:ir.push.apply(ir,e)}function wP(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!bi(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function sa(e,t){for(t&=~Q0,t&=~Fp,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-vi(t),r=1<<n;e[n]=-1,t&=~r}}function j1(e){if(wt&6)throw Error(Ee(327));jl();var t=bh(e,0);if(!(t&1))return cr(e,nn()),null;var n=Dh(e,t);if(e.tag!==0&&n===2){var r=zv(e);r!==0&&(t=r,n=hy(e,r))}if(n===1)throw n=Yc,us(e,0),sa(e,t),cr(e,nn()),n;if(n===6)throw Error(Ee(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ka(e,ir,fo),cr(e,nn()),null}function J0(e,t){var n=wt;wt|=1;try{return e(t)}finally{wt=n,wt===0&&(au=nn()+500,Rp&&Ma())}}function xs(e){ca!==null&&ca.tag===0&&!(wt&6)&&jl();var t=wt;wt|=1;var n=Xr.transition,r=Pt;try{if(Xr.transition=null,Pt=1,e)return e()}finally{Pt=r,Xr.transition=n,wt=t,!(wt&6)&&Ma()}}function eb(){vr=El.current,jt(El)}function us(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,XR(n)),cn!==null)for(n=cn.return;n!==null;){var r=n;switch(I0(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ch();break;case 3:iu(),jt(lr),jt(jn),V0();break;case 5:H0(r);break;case 4:iu();break;case 13:jt(Kt);break;case 19:jt(Kt);break;case 10:N0(r.type._context);break;case 22:case 23:eb()}n=n.return}if(wn=e,cn=e=ba(e.current,null),An=vr=t,pn=0,Yc=null,Q0=Fp=Ss=0,ir=mc=null,rs!==null){for(t=0;t<rs.length;t++)if(n=rs[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}rs=null}return e}function PE(e,t){do{var n=cn;try{if(D0(),Ff.current=Ph,Rh){for(var r=Yt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Rh=!1}if(ws=0,bn=fn=Yt=null,pc=!1,Gc=0,X0.current=null,n===null||n.return===null){pn=1,Yc=t,cn=null;break}e:{var o=e,s=n.return,d=n,a=t;if(t=An,d.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,l=d,u=l.tag;if(!(l.mode&1)&&(u===0||u===11||u===15)){var h=l.alternate;h?(l.updateQueue=h.updateQueue,l.memoizedState=h.memoizedState,l.lanes=h.lanes):(l.updateQueue=null,l.memoizedState=null)}var f=T1(s);if(f!==null){f.flags&=-257,A1(f,s,d,o,t),f.mode&1&&$1(o,c,t),t=f,a=c;var p=t.updateQueue;if(p===null){var g=new Set;g.add(a),t.updateQueue=g}else p.add(a);break e}else{if(!(t&1)){$1(o,c,t),tb();break e}a=Error(Ee(426))}}else if(Vt&&d.mode&1){var b=T1(s);if(b!==null){!(b.flags&65536)&&(b.flags|=256),A1(b,s,d,o,t),O0(ou(a,d));break e}}o=a=ou(a,d),pn!==4&&(pn=2),mc===null?mc=[o]:mc.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var x=mE(o,a,t);w1(o,x);break e;case 1:d=a;var S=o.type,T=o.stateNode;if(!(o.flags&128)&&(typeof S.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(va===null||!va.has(T)))){o.flags|=65536,t&=-t,o.lanes|=t;var v=vE(o,d,t);w1(o,v);break e}}o=o.return}while(o!==null)}FE(n)}catch(w){t=w,cn===n&&n!==null&&(cn=n=n.return);continue}break}while(1)}function IE(){var e=Ih.current;return Ih.current=Ph,e===null?Ph:e}function tb(){(pn===0||pn===3||pn===2)&&(pn=4),wn===null||!(Ss&268435455)&&!(Fp&268435455)||sa(wn,An)}function Dh(e,t){var n=wt;wt|=2;var r=IE();(wn!==e||An!==t)&&(fo=null,us(e,t));do try{SP();break}catch(i){PE(e,i)}while(1);if(D0(),wt=n,Ih.current=r,cn!==null)throw Error(Ee(261));return wn=null,An=0,pn}function SP(){for(;cn!==null;)OE(cn)}function xP(){for(;cn!==null&&!KL();)OE(cn)}function OE(e){var t=NE(e.alternate,e,vr);e.memoizedProps=e.pendingProps,t===null?FE(e):cn=t,X0.current=null}function FE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=gP(n,t),n!==null){n.flags&=32767,cn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{pn=6,cn=null;return}}else if(n=pP(n,t,vr),n!==null){cn=n;return}if(t=t.sibling,t!==null){cn=t;return}cn=t=e}while(t!==null);pn===0&&(pn=5)}function Ka(e,t,n){var r=Pt,i=Xr.transition;try{Xr.transition=null,Pt=1,_P(e,t,n,r)}finally{Xr.transition=i,Pt=r}return null}function _P(e,t,n,r){do jl();while(ca!==null);if(wt&6)throw Error(Ee(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ee(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(rR(e,o),e===wn&&(cn=wn=null,An=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ef||(ef=!0,zE(yh,function(){return jl(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Xr.transition,Xr.transition=null;var s=Pt;Pt=1;var d=wt;wt|=4,X0.current=null,vP(e,n),ME(n,e),VR(Uv),wh=!!Wv,Uv=Wv=null,e.current=n,yP(n),qL(),wt=d,Pt=s,Xr.transition=o}else e.current=n;if(ef&&(ef=!1,ca=e,Fh=i),o=e.pendingLanes,o===0&&(va=null),QL(n.stateNode),cr(e,nn()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Oh)throw Oh=!1,e=dy,dy=null,e;return Fh&1&&e.tag!==0&&jl(),o=e.pendingLanes,o&1?e===fy?vc++:(vc=0,fy=e):vc=0,Ma(),null}function jl(){if(ca!==null){var e=gk(Fh),t=Xr.transition,n=Pt;try{if(Xr.transition=null,Pt=16>e?16:e,ca===null)var r=!1;else{if(e=ca,ca=null,Fh=0,wt&6)throw Error(Ee(331));var i=wt;for(wt|=4,Pe=e.current;Pe!==null;){var o=Pe,s=o.child;if(Pe.flags&16){var d=o.deletions;if(d!==null){for(var a=0;a<d.length;a++){var c=d[a];for(Pe=c;Pe!==null;){var l=Pe;switch(l.tag){case 0:case 11:case 15:gc(8,l,o)}var u=l.child;if(u!==null)u.return=l,Pe=u;else for(;Pe!==null;){l=Pe;var h=l.sibling,f=l.return;if($E(l),l===c){Pe=null;break}if(h!==null){h.return=f,Pe=h;break}Pe=f}}}var p=o.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}Pe=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Pe=s;else e:for(;Pe!==null;){if(o=Pe,o.flags&2048)switch(o.tag){case 0:case 11:case 15:gc(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,Pe=x;break e}Pe=o.return}}var S=e.current;for(Pe=S;Pe!==null;){s=Pe;var T=s.child;if(s.subtreeFlags&2064&&T!==null)T.return=s,Pe=T;else e:for(s=S;Pe!==null;){if(d=Pe,d.flags&2048)try{switch(d.tag){case 0:case 11:case 15:Op(9,d)}}catch(w){en(d,d.return,w)}if(d===s){Pe=null;break e}var v=d.sibling;if(v!==null){v.return=d.return,Pe=v;break e}Pe=d.return}}if(wt=i,Ma(),ji&&typeof ji.onPostCommitFiberRoot=="function")try{ji.onPostCommitFiberRoot($p,e)}catch{}r=!0}return r}finally{Pt=n,Xr.transition=t}}return!1}function H1(e,t,n){t=ou(n,t),t=mE(e,t,1),e=ma(e,t,1),t=qn(),e!==null&&(pd(e,1,t),cr(e,t))}function en(e,t,n){if(e.tag===3)H1(e,e,n);else for(;t!==null;){if(t.tag===3){H1(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(va===null||!va.has(r))){e=ou(n,e),e=vE(t,e,1),t=ma(t,e,1),e=qn(),t!==null&&(pd(t,1,e),cr(t,e));break}}t=t.return}}function CP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=qn(),e.pingedLanes|=e.suspendedLanes&n,wn===e&&(An&n)===n&&(pn===4||pn===3&&(An&130023424)===An&&500>nn()-Z0?us(e,0):Q0|=n),cr(e,t)}function DE(e,t){t===0&&(e.mode&1?(t=Wd,Wd<<=1,!(Wd&130023424)&&(Wd=4194304)):t=1);var n=qn();e=$o(e,t),e!==null&&(pd(e,t,n),cr(e,n))}function kP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),DE(e,n)}function EP(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ee(314))}r!==null&&r.delete(t),DE(e,n)}var NE;NE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||lr.current)sr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return sr=!1,hP(e,t,n);sr=!!(e.flags&131072)}else sr=!1,Vt&&t.flags&1048576&&jk(t,$h,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Nf(e,t),e=t.pendingProps;var i=tu(t,jn.current);Bl(t,n),i=U0(null,t,r,e,i,n);var o=G0();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ur(r)?(o=!0,kh(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,B0(t),i.updater=Pp,t.stateNode=i,i._reactInternals=t,ey(t,r,e,n),t=ry(null,t,r,!0,o,n)):(t.tag=0,Vt&&o&&P0(t),Un(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Nf(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=TP(r),e=ci(r,e),i){case 0:t=ny(null,t,r,e,n);break e;case 1:t=R1(null,t,r,e,n);break e;case 11:t=M1(null,t,r,e,n);break e;case 14:t=L1(null,t,r,ci(r.type,e),n);break e}throw Error(Ee(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ci(r,i),ny(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ci(r,i),R1(e,t,r,i,n);case 3:e:{if(SE(t),e===null)throw Error(Ee(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Uk(e,t),Mh(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=ou(Error(Ee(423)),t),t=P1(e,t,r,n,i);break e}else if(r!==i){i=ou(Error(Ee(424)),t),t=P1(e,t,r,n,i);break e}else for(br=ga(t.stateNode.containerInfo.firstChild),Sr=t,Vt=!0,fi=null,n=Yk(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(nu(),r===i){t=To(e,t,n);break e}Un(e,t,r,n)}t=t.child}return t;case 5:return Xk(t),e===null&&Qv(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Gv(r,i)?s=null:o!==null&&Gv(r,o)&&(t.flags|=32),wE(e,t),Un(e,t,s,n),t.child;case 6:return e===null&&Qv(t),null;case 13:return xE(e,t,n);case 4:return j0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ru(t,null,r,n):Un(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ci(r,i),M1(e,t,r,i,n);case 7:return Un(e,t,t.pendingProps,n),t.child;case 8:return Un(e,t,t.pendingProps.children,n),t.child;case 12:return Un(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Nt(Th,r._currentValue),r._currentValue=s,o!==null)if(bi(o.value,s)){if(o.children===i.children&&!lr.current){t=To(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var d=o.dependencies;if(d!==null){s=o.child;for(var a=d.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=wo(-1,n&-n),a.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var l=c.pending;l===null?a.next=a:(a.next=l.next,l.next=a),c.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Zv(o.return,n,t),d.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Ee(341));s.lanes|=n,d=s.alternate,d!==null&&(d.lanes|=n),Zv(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Un(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Bl(t,n),i=Zr(i),r=r(i),t.flags|=1,Un(e,t,r,n),t.child;case 14:return r=t.type,i=ci(r,t.pendingProps),i=ci(r.type,i),L1(e,t,r,i,n);case 15:return yE(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ci(r,i),Nf(e,t),t.tag=1,ur(r)?(e=!0,kh(t)):e=!1,Bl(t,n),Kk(t,r,i),ey(t,r,i,n),ry(null,t,r,!0,e,n);case 19:return _E(e,t,n);case 22:return bE(e,t,n)}throw Error(Ee(156,t.tag))};function zE(e,t){return dk(e,t)}function $P(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 qr(e,t,n,r){return new $P(e,t,n,r)}function nb(e){return e=e.prototype,!(!e||!e.isReactComponent)}function TP(e){if(typeof e=="function")return nb(e)?1:0;if(e!=null){if(e=e.$$typeof,e===S0)return 11;if(e===x0)return 14}return 2}function ba(e,t){var n=e.alternate;return n===null?(n=qr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jf(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")nb(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ml:return cs(n.children,i,o,t);case w0:s=8,i|=8;break;case Cv:return e=qr(12,n,t,i|2),e.elementType=Cv,e.lanes=o,e;case kv:return e=qr(13,n,t,i),e.elementType=kv,e.lanes=o,e;case Ev:return e=qr(19,n,t,i),e.elementType=Ev,e.lanes=o,e;case qC:return Dp(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case GC:s=10;break e;case KC:s=9;break e;case S0:s=11;break e;case x0:s=14;break e;case na:s=16,r=null;break e}throw Error(Ee(130,e==null?e:typeof e,""))}return t=qr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function cs(e,t,n,r){return e=qr(7,e,r,t),e.lanes=n,e}function Dp(e,t,n,r){return e=qr(22,e,r,t),e.elementType=qC,e.lanes=n,e.stateNode={isHidden:!1},e}function vm(e,t,n){return e=qr(6,e,null,t),e.lanes=n,e}function ym(e,t,n){return t=qr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function AP(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zg(0),this.expirationTimes=Zg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zg(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function rb(e,t,n,r,i,o,s,d,a){return e=new AP(e,t,n,d,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},B0(o),e}function MP(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:gl,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function BE(e){if(!e)return Ca;e=e._reactInternals;e:{if(Ts(e)!==e||e.tag!==1)throw Error(Ee(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ur(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ee(171))}if(e.tag===1){var n=e.type;if(ur(n))return zk(e,n,t)}return t}function jE(e,t,n,r,i,o,s,d,a){return e=rb(n,r,!0,e,i,o,s,d,a),e.context=BE(null),n=e.current,r=qn(),i=ya(n),o=wo(r,i),o.callback=t??null,ma(n,o,i),e.current.lanes=i,pd(e,i,r),cr(e,r),e}function Np(e,t,n,r){var i=t.current,o=qn(),s=ya(i);return n=BE(n),t.context===null?t.context=n:t.pendingContext=n,t=wo(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ma(i,t,s),e!==null&&(yi(e,i,s,o),Of(e,i,s)),s}function Nh(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function V1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ib(e,t){V1(e,t),(e=e.alternate)&&V1(e,t)}function LP(){return null}var HE=typeof reportError=="function"?reportError:function(e){console.error(e)};function ob(e){this._internalRoot=e}zp.prototype.render=ob.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ee(409));Np(e,t,null,null)};zp.prototype.unmount=ob.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xs(function(){Np(null,e,null,null)}),t[Eo]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=yk();e={blockedOn:null,target:e,priority:t};for(var n=0;n<aa.length&&t!==0&&t<aa[n].priority;n++);aa.splice(n,0,e),n===0&&wk(e)}};function ab(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function W1(){}function RP(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=Nh(s);o.call(c)}}var s=jE(t,r,e,0,null,!1,!1,"",W1);return e._reactRootContainer=s,e[Eo]=s.current,jc(e.nodeType===8?e.parentNode:e),xs(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var d=r;r=function(){var c=Nh(a);d.call(c)}}var a=rb(e,0,!1,null,null,!1,!1,"",W1);return e._reactRootContainer=a,e[Eo]=a.current,jc(e.nodeType===8?e.parentNode:e),xs(function(){Np(t,a,n,r)}),a}function jp(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var d=i;i=function(){var a=Nh(s);d.call(a)}}Np(t,s,e,i)}else s=RP(n,t,e,i,r);return Nh(s)}mk=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Yu(t.pendingLanes);n!==0&&(k0(t,n|1),cr(t,nn()),!(wt&6)&&(au=nn()+500,Ma()))}break;case 13:xs(function(){var r=$o(e,1);if(r!==null){var i=qn();yi(r,e,1,i)}}),ib(e,1)}};E0=function(e){if(e.tag===13){var t=$o(e,134217728);if(t!==null){var n=qn();yi(t,e,134217728,n)}ib(e,134217728)}};vk=function(e){if(e.tag===13){var t=ya(e),n=$o(e,t);if(n!==null){var r=qn();yi(n,e,t,r)}ib(e,t)}};yk=function(){return Pt};bk=function(e,t){var n=Pt;try{return Pt=e,t()}finally{Pt=n}};Fv=function(e,t,n){switch(t){case"input":if(Av(e,n),t=n.name,n.type==="radio"&&t!=null){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 i=Lp(r);if(!i)throw Error(Ee(90));XC(r),Av(r,i)}}}break;case"textarea":ZC(e,n);break;case"select":t=n.value,t!=null&&Fl(e,!!n.multiple,t,!1)}};ok=J0;ak=xs;var PP={usingClientEntryPoint:!1,Events:[md,wl,Lp,rk,ik,J0]},Du={findFiberByHostInstance:ns,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},IP={bundleType:Du.bundleType,version:Du.version,rendererPackageName:Du.rendererPackageName,rendererConfig:Du.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Lo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=uk(e),e===null?null:e.stateNode},findFiberByHostInstance:Du.findFiberByHostInstance||LP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tf.isDisabled&&tf.supportsFiber)try{$p=tf.inject(IP),ji=tf}catch{}}$r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=PP;$r.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ab(t))throw Error(Ee(200));return MP(e,t,null,n)};$r.createRoot=function(e,t){if(!ab(e))throw Error(Ee(299));var n=!1,r="",i=HE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=rb(e,1,!1,null,null,n,!1,r,i),e[Eo]=t.current,jc(e.nodeType===8?e.parentNode:e),new ob(t)};$r.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ee(188)):(e=Object.keys(e).join(","),Error(Ee(268,e)));return e=uk(t),e=e===null?null:e.stateNode,e};$r.flushSync=function(e){return xs(e)};$r.hydrate=function(e,t,n){if(!Bp(t))throw Error(Ee(200));return jp(null,e,t,!0,n)};$r.hydrateRoot=function(e,t,n){if(!ab(e))throw Error(Ee(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=HE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=jE(t,null,e,1,n??null,i,!1,o,s),e[Eo]=t.current,jc(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new zp(t)};$r.render=function(e,t,n){if(!Bp(t))throw Error(Ee(200));return jp(null,e,t,!1,n)};$r.unmountComponentAtNode=function(e){if(!Bp(e))throw Error(Ee(40));return e._reactRootContainer?(xs(function(){jp(null,null,e,!1,function(){e._reactRootContainer=null,e[Eo]=null})}),!0):!1};$r.unstable_batchedUpdates=J0;$r.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bp(n))throw Error(Ee(200));if(e==null||e._reactInternals===void 0)throw Error(Ee(38));return jp(e,t,n,!1,r)};$r.version="18.2.0-next-9e3b772b8-20220608";function VE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(VE)}catch(e){console.error(e)}}VE(),jC.exports=$r;var yd=jC.exports;const nf=Es(yd);var U1=yd;Jl.createRoot=U1.createRoot,Jl.hydrateRoot=U1.hydrateRoot;var Hr={},bu={},Ro={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isEventSourceSupported=e.isReactNative=e.ReadyState=e.UNPARSABLE_JSON_OBJECT=e.DEFAULT_RECONNECT_INTERVAL_MS=e.DEFAULT_RECONNECT_LIMIT=e.SOCKET_IO_PING_CODE=e.SOCKET_IO_PATH=e.SOCKET_IO_PING_INTERVAL=e.DEFAULT_EVENT_SOURCE_OPTIONS=e.EMPTY_EVENT_HANDLERS=e.DEFAULT_OPTIONS=void 0;var t=1,n=1e3*t;e.DEFAULT_OPTIONS={},e.EMPTY_EVENT_HANDLERS={},e.DEFAULT_EVENT_SOURCE_OPTIONS={withCredentials:!1,events:e.EMPTY_EVENT_HANDLERS},e.SOCKET_IO_PING_INTERVAL=25*n,e.SOCKET_IO_PATH="/socket.io/?EIO=3&transport=websocket",e.SOCKET_IO_PING_CODE="2",e.DEFAULT_RECONNECT_LIMIT=20,e.DEFAULT_RECONNECT_INTERVAL_MS=5e3,e.UNPARSABLE_JSON_OBJECT={},function(i){i[i.UNINSTANTIATED=-1]="UNINSTANTIATED",i[i.CONNECTING=0]="CONNECTING",i[i.OPEN=1]="OPEN",i[i.CLOSING=2]="CLOSING",i[i.CLOSED=3]="CLOSED"}(e.ReadyState||(e.ReadyState={}));var r=function(){try{return"EventSource"in globalThis}catch{return!1}};e.isReactNative=typeof navigator<"u"&&navigator.product==="ReactNative",e.isEventSourceSupported=!e.isReactNative&&r()})(Ro);var Hp={},Vp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetWebSockets=e.sharedWebSockets=void 0,e.sharedWebSockets={},e.resetWebSockets=function(t){if(t&&e.sharedWebSockets.hasOwnProperty(t))delete e.sharedWebSockets[t];else for(var n in e.sharedWebSockets)e.sharedWebSockets.hasOwnProperty(n)&&delete e.sharedWebSockets[n]}})(Vp);var Wp={},Vi={};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.setUpSocketIOPing=Vi.appendQueryParams=Vi.parseSocketIOUrl=void 0;var zh=Ro;Vi.parseSocketIOUrl=function(e){if(e){var t=/^https|wss/.test(e),n=e.replace(/^(https?|wss?)(:\/\/)?/,""),r=n.replace(/\/$/,""),i=t?"wss":"ws";return i+"://"+r+zh.SOCKET_IO_PATH}else if(e===""){var t=/^https/.test(window.location.protocol),i=t?"wss":"ws",o=window.location.port?":"+window.location.port:"";return i+"://"+window.location.hostname+o+zh.SOCKET_IO_PATH}return e};Vi.appendQueryParams=function(e,t){t===void 0&&(t={});var n=/\?([\w]+=[\w]+)/,r=n.test(e),i=""+Object.entries(t).reduce(function(o,s){var d=s[0],a=s[1];return o+(d+"="+a+"&")},"").slice(0,-1);return""+e+(r?"&":"?")+i};Vi.setUpSocketIOPing=function(e,t){t===void 0&&(t=zh.SOCKET_IO_PING_INTERVAL);var n=function(){return e(zh.SOCKET_IO_PING_CODE)};return setInterval(n,t)};var ka={},Up={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetSubscribers=e.removeSubscriber=e.addSubscriber=e.hasSubscribers=e.getSubscribers=void 0;var t={},n=[];e.getSubscribers=function(r){return e.hasSubscribers(r)?Array.from(t[r]):n},e.hasSubscribers=function(r){var i;return((i=t[r])===null||i===void 0?void 0:i.size)>0},e.addSubscriber=function(r,i){t[r]=t[r]||new Set,t[r].add(i)},e.removeSubscriber=function(r,i){t[r].delete(i)},e.resetSubscribers=function(r){if(r&&t.hasOwnProperty(r))delete t[r];else for(var i in t)t.hasOwnProperty(i)&&delete t[i]}})(Up);Object.defineProperty(ka,"__esModule",{value:!0});ka.resetGlobalState=ka.assertIsWebSocket=void 0;var OP=Vp,FP=Up;function DP(e){if(!(e instanceof WebSocket))throw new Error("")}ka.assertIsWebSocket=DP;function NP(e){FP.resetSubscribers(e),OP.resetWebSockets(e)}ka.resetGlobalState=NP;var Bh=Be&&Be.__assign||function(){return Bh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Bh.apply(this,arguments)};Object.defineProperty(Wp,"__esModule",{value:!0});Wp.attachListeners=void 0;var zP=Vi,Bi=Ro,BP=ka,jP=function(e,t,n){e.onmessage=function(r){t.current.onMessage&&t.current.onMessage(r),!(typeof t.current.filter=="function"&&t.current.filter(r)!==!0)&&n(r)}},HP=function(e,t,n,r){e.onopen=function(i){t.current.onOpen&&t.current.onOpen(i),r.current=0,n(Bi.ReadyState.OPEN)}},VP=function(e,t,n,r,i){if(Bi.isEventSourceSupported&&e instanceof EventSource)return function(){};BP.assertIsWebSocket(e);var o;return e.onclose=function(s){var d,a;if(t.current.onClose&&t.current.onClose(s),n(Bi.ReadyState.CLOSED),t.current.shouldReconnect&&t.current.shouldReconnect(s)){var c=(d=t.current.reconnectAttempts)!==null&&d!==void 0?d:Bi.DEFAULT_RECONNECT_LIMIT;i.current<c?o=window.setTimeout(function(){i.current++,r()},(a=t.current.reconnectInterval)!==null&&a!==void 0?a:Bi.DEFAULT_RECONNECT_INTERVAL_MS):(t.current.onReconnectStop&&t.current.onReconnectStop(c),console.warn("Max reconnect attempts of "+c+" exceeded"))}},function(){return o&&window.clearTimeout(o)}},WP=function(e,t,n,r,i){var o;return e.onerror=function(s){var d,a;t.current.onError&&t.current.onError(s),Bi.isEventSourceSupported&&e instanceof EventSource&&(t.current.onClose&&t.current.onClose(Bh(Bh({},s),{code:1006,reason:"An error occurred with the EventSource: "+s,wasClean:!1})),n(Bi.ReadyState.CLOSED),e.close()),t.current.retryOnError&&(i.current<((d=t.current.reconnectAttempts)!==null&&d!==void 0?d:Bi.DEFAULT_RECONNECT_LIMIT)?o=window.setTimeout(function(){i.current++,r()},(a=t.current.reconnectInterval)!==null&&a!==void 0?a:Bi.DEFAULT_RECONNECT_INTERVAL_MS):(t.current.onReconnectStop&&t.current.onReconnectStop(t.current.reconnectAttempts),console.warn("Max reconnect attempts of "+t.current.reconnectAttempts+" exceeded")))},function(){return o&&window.clearTimeout(o)}};Wp.attachListeners=function(e,t,n,r,i,o){var s=t.setLastMessage,d=t.setReadyState,a,c,l;return n.current.fromSocketIO&&(a=zP.setUpSocketIOPing(o)),jP(e,n,s),HP(e,n,d,i),c=VP(e,n,d,r,i),l=WP(e,n,d,r,i),function(){d(Bi.ReadyState.CLOSING),c(),l(),e.close(),a&&clearInterval(a)}};var Gp={},jh=Be&&Be.__assign||function(){return jh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},jh.apply(this,arguments)};Object.defineProperty(Gp,"__esModule",{value:!0});Gp.attachSharedListeners=void 0;var UP=Vp,ds=Ro,Xc=Up,GP=Vi,KP=function(e,t){e.onmessage=function(n){Xc.getSubscribers(t).forEach(function(r){r.optionsRef.current.onMessage&&r.optionsRef.current.onMessage(n),!(typeof r.optionsRef.current.filter=="function"&&r.optionsRef.current.filter(n)!==!0)&&r.setLastMessage(n)})}},qP=function(e,t){e.onopen=function(n){Xc.getSubscribers(t).forEach(function(r){r.reconnectCount.current=0,r.optionsRef.current.onOpen&&r.optionsRef.current.onOpen(n),r.setReadyState(ds.ReadyState.OPEN)})}},YP=function(e,t){e instanceof WebSocket&&(e.onclose=function(n){Xc.getSubscribers(t).forEach(function(r){r.optionsRef.current.onClose&&r.optionsRef.current.onClose(n),r.setReadyState(ds.ReadyState.CLOSED)}),delete UP.sharedWebSockets[t],Xc.getSubscribers(t).forEach(function(r){var i,o;if(r.optionsRef.current.shouldReconnect&&r.optionsRef.current.shouldReconnect(n)){var s=(i=r.optionsRef.current.reconnectAttempts)!==null&&i!==void 0?i:ds.DEFAULT_RECONNECT_LIMIT;r.reconnectCount.current<s?setTimeout(function(){r.reconnectCount.current++,r.reconnect.current()},(o=r.optionsRef.current.reconnectInterval)!==null&&o!==void 0?o:ds.DEFAULT_RECONNECT_INTERVAL_MS):(r.optionsRef.current.onReconnectStop&&r.optionsRef.current.onReconnectStop(r.optionsRef.current.reconnectAttempts),console.warn("Max reconnect attempts of "+s+" exceeded"))}})})},XP=function(e,t){e.onerror=function(n){Xc.getSubscribers(t).forEach(function(r){r.optionsRef.current.onError&&r.optionsRef.current.onError(n),ds.isEventSourceSupported&&e instanceof EventSource&&(r.optionsRef.current.onClose&&r.optionsRef.current.onClose(jh(jh({},n),{code:1006,reason:"An error occurred with the EventSource: "+n,wasClean:!1})),r.setReadyState(ds.ReadyState.CLOSED))}),ds.isEventSourceSupported&&e instanceof EventSource&&e.close()}};Gp.attachSharedListeners=function(e,t,n,r){var i;return n.current.fromSocketIO&&(i=GP.setUpSocketIOPing(r)),KP(e,t),YP(e,t),qP(e,t),XP(e,t),function(){i&&clearInterval(i)}};Object.defineProperty(Hp,"__esModule",{value:!0});Hp.createOrJoinSocket=void 0;var ia=Vp,Qu=Ro,QP=Wp,ZP=Gp,gy=Up,JP=function(e,t,n,r,i){return function(){if(gy.removeSubscriber(e,t),!gy.hasSubscribers(e)){try{var o=ia.sharedWebSockets[e];o instanceof WebSocket&&(o.onclose=function(s){n.current.onClose&&n.current.onClose(s),r(Qu.ReadyState.CLOSED)}),o.close()}catch{}i&&i(),delete ia.sharedWebSockets[e]}}};Hp.createOrJoinSocket=function(e,t,n,r,i,o,s,d){if(!Qu.isEventSourceSupported&&r.current.eventSourceOptions)throw Qu.isReactNative?new Error("EventSource is not supported in ReactNative"):new Error("EventSource is not supported");if(r.current.share){var a=null;ia.sharedWebSockets[t]===void 0?(ia.sharedWebSockets[t]=r.current.eventSourceOptions?new EventSource(t,r.current.eventSourceOptions):new WebSocket(t,r.current.protocols),e.current=ia.sharedWebSockets[t],n(Qu.ReadyState.CONNECTING),a=ZP.attachSharedListeners(ia.sharedWebSockets[t],t,r,d)):(e.current=ia.sharedWebSockets[t],n(ia.sharedWebSockets[t].readyState));var c={setLastMessage:i,setReadyState:n,optionsRef:r,reconnectCount:s,reconnect:o};return gy.addSubscriber(t,c),JP(t,c,r,n,a)}else{if(e.current=r.current.eventSourceOptions?new EventSource(t,r.current.eventSourceOptions):new WebSocket(t,r.current.protocols),n(Qu.ReadyState.CONNECTING),!e.current)throw new Error("WebSocket failed to be created");return QP.attachListeners(e.current,{setLastMessage:i,setReadyState:n},r,o.current,s,d)}};var Kp={},eI=Be&&Be.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function d(l){try{c(r.next(l))}catch(u){s(u)}}function a(l){try{c(r.throw(l))}catch(u){s(u)}}function c(l){l.done?o(l.value):i(l.value).then(d,a)}c((r=r.apply(e,t||[])).next())})},tI=Be&&Be.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function d(c){return function(l){return a([c,l])}}function a(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Kp,"__esModule",{value:!0});Kp.getUrl=void 0;var G1=Vi;Kp.getUrl=function(e,t){return eI(void 0,void 0,void 0,function(){var n,r,i;return tI(this,function(o){switch(o.label){case 0:return typeof e!="function"?[3,2]:[4,e()];case 1:return n=o.sent(),[3,3];case 2:n=e,o.label=3;case 3:return r=t.current.fromSocketIO?G1.parseSocketIOUrl(n):n,i=t.current.queryParams?G1.appendQueryParams(r,t.current.queryParams):r,[2,i]}})})};var WE={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.websocketWrapper=void 0,e.websocketWrapper=function(t,n){return new Proxy(t,{get:function(r,i){var o=r[i];return i==="reconnect"?n:typeof o=="function"?(console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."),function(){}):o},set:function(r,i,o){return/^on/.test(i)?(console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."),!1):(r[i]=o,!0)}})},e.default=e.websocketWrapper})(WE);var $l=Be&&Be.__assign||function(){return $l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},$l.apply(this,arguments)},nI=Be&&Be.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function d(l){try{c(r.next(l))}catch(u){s(u)}}function a(l){try{c(r.throw(l))}catch(u){s(u)}}function c(l){l.done?o(l.value):i(l.value).then(d,a)}c((r=r.apply(e,t||[])).next())})},rI=Be&&Be.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function d(c){return function(l){return a([c,l])}}function a(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},iI=Be&&Be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bu,"__esModule",{value:!0});bu.useWebSocket=void 0;var Vn=z,so=Ro,oI=Hp,aI=Kp,sI=iI(WE),K1=ka;bu.useWebSocket=function(e,t,n){t===void 0&&(t=so.DEFAULT_OPTIONS),n===void 0&&(n=!0);var r=Vn.useState(null),i=r[0],o=r[1],s=Vn.useState({}),d=s[0],a=s[1],c=Vn.useMemo(function(){if(i)try{return JSON.parse(i.data)}catch{return so.UNPARSABLE_JSON_OBJECT}return null},[i]),l=Vn.useRef(null),u=Vn.useRef(null),h=Vn.useRef(function(){}),f=Vn.useRef(0),p=Vn.useRef([]),g=Vn.useRef(null),b=Vn.useRef(t);b.current=t;var x=l.current&&d[l.current]!==void 0?d[l.current]:e!==null&&n===!0?so.ReadyState.CONNECTING:so.ReadyState.UNINSTANTIATED,S=t.queryParams?JSON.stringify(t.queryParams):null,T=Vn.useCallback(function(y,m){var E;if(m===void 0&&(m=!0),so.isEventSourceSupported&&u.current instanceof EventSource){console.warn("Unable to send a message from an eventSource");return}((E=u.current)===null||E===void 0?void 0:E.readyState)===so.ReadyState.OPEN?(K1.assertIsWebSocket(u.current),u.current.send(y)):m&&p.current.push(y)},[]),v=Vn.useCallback(function(y,m){m===void 0&&(m=!0),T(JSON.stringify(y),m)},[T]),w=Vn.useCallback(function(){return b.current.share!==!0||so.isEventSourceSupported&&u.current instanceof EventSource?u.current:(g.current===null&&u.current&&(K1.assertIsWebSocket(u.current),g.current=sI.default(u.current,h)),g.current)},[]);return Vn.useEffect(function(){if(e!==null&&n===!0){var y,m=!1,E=function(){return nI(void 0,void 0,void 0,function(){var A,C,k;return rI(this,function(I){switch(I.label){case 0:return A=l,[4,aI.getUrl(e,b)];case 1:return A.current=I.sent(),C=function(R){m||o(R)},k=function(R){m||a(function(M){var O;return $l($l({},M),l.current&&(O={},O[l.current]=R,O))})},y=oI.createOrJoinSocket(u,l.current,k,b,C,h,f,T),[2]}})})};return h.current=function(){m||(g.current&&(g.current=null),y==null||y(),E())},E(),function(){m=!0,g.current&&(g.current=null),y==null||y(),o(null)}}else(e===null||n===!1)&&(f.current=0,a(function(A){var C;return $l($l({},A),l.current&&(C={},C[l.current]=so.ReadyState.CLOSED,C))}))},[e,n,S,T]),Vn.useEffect(function(){x===so.ReadyState.OPEN&&p.current.splice(0).forEach(function(y){T(y)})},[x]),{sendMessage:T,sendJsonMessage:v,lastMessage:i,lastJsonMessage:c,readyState:x,getWebSocket:w}};var qp={},Hh=Be&&Be.__assign||function(){return Hh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Hh.apply(this,arguments)};Object.defineProperty(qp,"__esModule",{value:!0});qp.useSocketIO=void 0;var q1=z,lI=bu,uI=Ro,bm={type:"empty",payload:null},cI=function(e){if(!e||!e.data)return bm;var t=e.data.match(/\[.*]/);if(!t)return bm;var n=JSON.parse(t);return!Array.isArray(n)||!n[1]?bm:{type:n[0],payload:n[1]}};qp.useSocketIO=function(e,t,n){t===void 0&&(t=uI.DEFAULT_OPTIONS),n===void 0&&(n=!0);var r=q1.useMemo(function(){return Hh(Hh({},t),{fromSocketIO:!0})},[]),i=lI.useWebSocket(e,r,n),o=i.sendMessage,s=i.sendJsonMessage,d=i.lastMessage,a=i.readyState,c=i.getWebSocket,l=q1.useMemo(function(){return cI(d)},[d]);return{sendMessage:o,sendJsonMessage:s,lastMessage:l,lastJsonMessage:l,readyState:a,getWebSocket:c}};var Yp={},Vh=Be&&Be.__assign||function(){return Vh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Vh.apply(this,arguments)},dI=Be&&Be.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(Yp,"__esModule",{value:!0});Yp.useEventSource=void 0;var Y1=z,fI=bu,X1=Ro;Yp.useEventSource=function(e,t,n){t===void 0&&(t=X1.DEFAULT_EVENT_SOURCE_OPTIONS),n===void 0&&(n=!0);var r=t.withCredentials,i=t.events,o=dI(t,["withCredentials","events"]),s=Vh(Vh({},o),{eventSourceOptions:{withCredentials:r}}),d=Y1.useRef(X1.EMPTY_EVENT_HANDLERS);i&&(d.current=i);var a=fI.useWebSocket(e,s,n),c=a.lastMessage,l=a.readyState,u=a.getWebSocket;return Y1.useEffect(function(){c!=null&&c.type&&Object.entries(d.current).forEach(function(h){var f=h[0],p=h[1];f===c.type&&p(c)})},[c]),{lastEvent:c,readyState:l,getEventSource:u}};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=bu;Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.useWebSocket}});var n=qp;Object.defineProperty(e,"useSocketIO",{enumerable:!0,get:function(){return n.useSocketIO}});var r=Ro;Object.defineProperty(e,"ReadyState",{enumerable:!0,get:function(){return r.ReadyState}});var i=Yp;Object.defineProperty(e,"useEventSource",{enumerable:!0,get:function(){return i.useEventSource}});var o=ka;Object.defineProperty(e,"resetGlobalState",{enumerable:!0,get:function(){return o.resetGlobalState}})})(Hr);const hI=Es(Hr);function En(e){const t=e.className?e.className+" flex-row":"flex-row";return j.jsx("div",{...e,className:t,children:e.children})}const qo=e=>j.jsx(En,{...e,style:{width:"100%",justifyContent:"space-between",gap:"30px"}});function hi(e){const t=e.className?e.className+" flex-column":"flex-column";return j.jsx("div",{...e,className:t,children:e.children})}var UE={exports:{}};(function(e,t){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var i=function(l,u,h){if(typeof l!="string"){i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(h=u),i.modules[l]||(i.payloads[l]=h,i.modules[l]=null)};i.modules={},i.payloads={};var o=function(l,u,h){if(typeof u=="string"){var f=a(l,u);if(f!=null)return h&&h(),f}else if(Object.prototype.toString.call(u)==="[object Array]"){for(var p=[],g=0,b=u.length;g<b;++g){var x=a(l,u[g]);if(x==null&&s.original)return;p.push(x)}return h&&h.apply(null,p)||!0}},s=function(l,u){var h=o("",l,u);return h==null&&s.original?s.original.apply(this,arguments):h},d=function(l,u){if(u.indexOf("!")!==-1){var h=u.split("!");return d(l,h[0])+"!"+d(l,h[1])}if(u.charAt(0)=="."){var f=l.split("/").slice(0,-1).join("/");for(u=f+"/"+u;u.indexOf(".")!==-1&&p!=u;){var p=u;u=u.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return u},a=function(l,u){u=d(l,u);var h=i.modules[u];if(!h){if(h=i.payloads[u],typeof h=="function"){var f={},p={id:u,uri:"",exports:f,packaged:!0},g=function(x,S){return o(u,x,S)},b=h(g,f,p);f=b||p.exports,i.modules[u]=f,delete i.payloads[u]}h=i.modules[u]=f||h}return h};function c(l){var u=r;l&&(r[l]||(r[l]={}),u=r[l]),(!u.define||!u.define.packaged)&&(i.original=u.define,u.define=i,u.define.packaged=!0),(!u.require||!u.require.packaged)&&(s.original=u.require,u.require=s,u.require.packaged=!0)}c(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,i){function o(s,d,a){Object.defineProperty(s,d,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||o(String.prototype,"startsWith",function(s,d){return d=d||0,this.lastIndexOf(s,d)===d}),String.prototype.endsWith||o(String.prototype,"endsWith",function(s,d){var a=this;(d===void 0||d>a.length)&&(d=a.length),d-=s.length;var c=a.indexOf(s,d);return c!==-1&&c===d}),String.prototype.repeat||o(String.prototype,"repeat",function(s){for(var d="",a=this;s>0;)s&1&&(d+=a),(s>>=1)&&(a+=a);return d}),String.prototype.includes||o(String.prototype,"includes",function(s,d){return this.indexOf(s,d)!=-1}),Object.assign||(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(s),a=1;a<arguments.length;a++){var c=arguments[a];c!=null&&Object.keys(c).forEach(function(l){d[l]=c[l]})}return d}),Object.values||(Object.values=function(s){return Object.keys(s).map(function(d){return s[d]})}),Array.prototype.find||o(Array.prototype,"find",function(s){for(var d=this.length,a=arguments[1],c=0;c<d;c++){var l=this[c];if(s.call(a,l,c,this))return l}}),Array.prototype.findIndex||o(Array.prototype,"findIndex",function(s){for(var d=this.length,a=arguments[1],c=0;c<d;c++){var l=this[c];if(s.call(a,l,c,this))return c}}),Array.prototype.includes||o(Array.prototype,"includes",function(s,d){return this.indexOf(s,d)!=-1}),Array.prototype.fill||o(Array.prototype,"fill",function(s){for(var d=this,a=d.length>>>0,c=arguments[1],l=c>>0,u=l<0?Math.max(a+l,0):Math.min(l,a),h=arguments[2],f=h===void 0?a:h>>0,p=f<0?Math.max(a+f,0):Math.min(f,a);u<p;)d[u]=s,u++;return d}),Array.of||o(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,r,i){n("./es6-shim")}),ace.define("ace/lib/lang",["require","exports","module"],function(n,r,i){r.last=function(d){return d[d.length-1]},r.stringReverse=function(d){return d.split("").reverse().join("")},r.stringRepeat=function(d,a){for(var c="";a>0;)a&1&&(c+=d),(a>>=1)&&(d+=d);return c};var o=/^\s\s*/,s=/\s\s*$/;r.stringTrimLeft=function(d){return d.replace(o,"")},r.stringTrimRight=function(d){return d.replace(s,"")},r.copyObject=function(d){var a={};for(var c in d)a[c]=d[c];return a},r.copyArray=function(d){for(var a=[],c=0,l=d.length;c<l;c++)d[c]&&typeof d[c]=="object"?a[c]=this.copyObject(d[c]):a[c]=d[c];return a},r.deepCopy=function d(a){if(typeof a!="object"||!a)return a;var c;if(Array.isArray(a)){c=[];for(var l=0;l<a.length;l++)c[l]=d(a[l]);return c}if(Object.prototype.toString.call(a)!=="[object Object]")return a;c={};for(var l in a)c[l]=d(a[l]);return c},r.arrayToMap=function(d){for(var a={},c=0;c<d.length;c++)a[d[c]]=1;return a},r.createMap=function(d){var a=Object.create(null);for(var c in d)a[c]=d[c];return a},r.arrayRemove=function(d,a){for(var c=0;c<=d.length;c++)a===d[c]&&d.splice(c,1)},r.escapeRegExp=function(d){return d.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(d){return(""+d).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(d,a){var c=[];return d.replace(a,function(l){c.push({offset:arguments[arguments.length-2],length:l.length})}),c},r.deferredCall=function(d){var a=null,c=function(){a=null,d()},l=function(u){return l.cancel(),a=setTimeout(c,u||0),l};return l.schedule=l,l.call=function(){return this.cancel(),d(),l},l.cancel=function(){return clearTimeout(a),a=null,l},l.isPending=function(){return a},l},r.delayedCall=function(d,a){var c=null,l=function(){c=null,d()},u=function(h){c==null&&(c=setTimeout(l,h||a))};return u.delay=function(h){c&&clearTimeout(c),c=setTimeout(l,h||a)},u.schedule=u,u.call=function(){this.cancel(),d()},u.cancel=function(){c&&clearTimeout(c),c=null},u.isPending=function(){return c},u}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,i){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var o=typeof navigator=="object"?navigator:{},s=(/mac|win|linux/i.exec(o.platform)||["other"])[0].toLowerCase(),d=o.userAgent||"",a=o.appName||"";r.isWin=s=="win",r.isMac=s=="mac",r.isLinux=s=="linux",r.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((d.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((d.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=d.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,r.isEdge=parseFloat(d.split(" Edge/")[1])||void 0,r.isAIR=d.indexOf("AdobeAIR")>=0,r.isAndroid=d.indexOf("Android")>=0,r.isChromeOS=d.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(d)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,i){var o=n("./useragent"),s="http://www.w3.org/1999/xhtml";r.buildDom=function h(f,p,g){if(typeof f=="string"&&f){var b=document.createTextNode(f);return p&&p.appendChild(b),b}if(!Array.isArray(f))return f&&f.appendChild&&p&&p.appendChild(f),f;if(typeof f[0]!="string"||!f[0]){for(var x=[],S=0;S<f.length;S++){var T=h(f[S],p,g);T&&x.push(T)}return x}var v=document.createElement(f[0]),w=f[1],y=1;w&&typeof w=="object"&&!Array.isArray(w)&&(y=2);for(var S=y;S<f.length;S++)h(f[S],v,g);return y==2&&Object.keys(w).forEach(function(m){var E=w[m];m==="class"?v.className=Array.isArray(E)?E.join(" "):E:typeof E=="function"||m=="value"||m[0]=="$"?v[m]=E:m==="ref"?g&&(g[E]=v):m==="style"?typeof E=="string"&&(v.style.cssText=E):E!=null&&v.setAttribute(m,E)}),p&&p.appendChild(v),v},r.getDocumentHead=function(h){return h||(h=document),h.head||h.getElementsByTagName("head")[0]||h.documentElement},r.createElement=function(h,f){return document.createElementNS?document.createElementNS(f||s,h):document.createElement(h)},r.removeChildren=function(h){h.innerHTML=""},r.createTextNode=function(h,f){var p=f?f.ownerDocument:document;return p.createTextNode(h)},r.createFragment=function(h){var f=h?h.ownerDocument:document;return f.createDocumentFragment()},r.hasCssClass=function(h,f){var p=(h.className+"").split(/\s+/g);return p.indexOf(f)!==-1},r.addCssClass=function(h,f){r.hasCssClass(h,f)||(h.className+=" "+f)},r.removeCssClass=function(h,f){for(var p=h.className.split(/\s+/g);;){var g=p.indexOf(f);if(g==-1)break;p.splice(g,1)}h.className=p.join(" ")},r.toggleCssClass=function(h,f){for(var p=h.className.split(/\s+/g),g=!0;;){var b=p.indexOf(f);if(b==-1)break;g=!1,p.splice(b,1)}return g&&p.push(f),h.className=p.join(" "),g},r.setCssClass=function(h,f,p){p?r.addCssClass(h,f):r.removeCssClass(h,f)},r.hasCssString=function(h,f){var p=0,g;if(f=f||document,g=f.querySelectorAll("style")){for(;p<g.length;)if(g[p++].id===h)return!0}},r.removeElementById=function(h,f){f=f||document,f.getElementById(h)&&f.getElementById(h).remove()};var d,a=[];r.useStrictCSP=function(h){d=h,h==!1?c():a||(a=[])};function c(){var h=a;a=null,h&&h.forEach(function(f){l(f[0],f[1])})}function l(h,f,p){if(!(typeof document>"u")){if(a){if(p)c();else if(p===!1)return a.push([h,f])}if(!d){var g=p;!p||!p.getRootNode?g=document:(g=p.getRootNode(),(!g||g==p)&&(g=document));var b=g.ownerDocument||g;if(f&&r.hasCssString(f,g))return null;f&&(h+=`
|
||
/*# sourceURL=ace/css/`+f+" */");var x=r.createElement("style");x.appendChild(b.createTextNode(h)),f&&(x.id=f),g==b&&(g=r.getDocumentHead(b)),g.insertBefore(x,g.firstChild)}}}if(r.importCssString=l,r.importCssStylsheet=function(h,f){r.buildDom(["link",{rel:"stylesheet",href:h}],r.getDocumentHead(f))},r.scrollbarWidth=function(h){var f=r.createElement("ace_inner");f.style.width="100%",f.style.minWidth="0px",f.style.height="200px",f.style.display="block";var p=r.createElement("ace_outer"),g=p.style;g.position="absolute",g.left="-10000px",g.overflow="hidden",g.width="200px",g.minWidth="0px",g.height="150px",g.display="block",p.appendChild(f);var b=h&&h.documentElement||document&&document.documentElement;if(!b)return 0;b.appendChild(p);var x=f.offsetWidth;g.overflow="scroll";var S=f.offsetWidth;return x===S&&(S=p.clientWidth),b.removeChild(p),x-S},r.computedStyle=function(h,f){return window.getComputedStyle(h,"")||{}},r.setStyle=function(h,f,p){h[f]!==p&&(h[f]=p)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=o.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,o.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var u=document.createElement("div");r.HI_DPI&&u.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!o.isEdge&&typeof u.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),u=null}r.HAS_CSS_TRANSFORMS?r.translate=function(h,f,p){h.style.transform="translate("+Math.round(f)+"px, "+Math.round(p)+"px)"}:r.translate=function(h,f,p){h.style.top=Math.round(p)+"px",h.style.left=Math.round(f)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,i){/*
|
||
* based on code from:
|
||
*
|
||
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
||
* Available via the MIT or new BSD license.
|
||
* see: http://github.com/jrburke/requirejs for details
|
||
*/var o=n("./dom");r.get=function(s,d){var a=new XMLHttpRequest;a.open("GET",s,!0),a.onreadystatechange=function(){a.readyState===4&&d(a.responseText)},a.send(null)},r.loadScript=function(s,d){var a=o.getDocumentHead(),c=document.createElement("script");c.src=s,a.appendChild(c),c.onload=c.onreadystatechange=function(l,u){(u||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,u||d())}},r.qualifyURL=function(s){var d=document.createElement("a");return d.href=s,d.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,r,i){r.inherits=function(o,s){o.super_=s,o.prototype=Object.create(s.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(o,s){for(var d in s)o[d]=s[d];return o},r.implement=function(o,s){r.mixin(o,s)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,r,i){var o={},s=function(){this.propagationStopped=!0},d=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(a,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var l=this._eventRegistry[a]||[],u=this._defaultHandlers[a];if(!(!l.length&&!u)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=a),c.stopPropagation||(c.stopPropagation=s),c.preventDefault||(c.preventDefault=d),l=l.slice();for(var h=0;h<l.length&&(l[h](c,this),!c.propagationStopped);h++);if(u&&!c.defaultPrevented)return u(c,this)}},o._signal=function(a,c){var l=(this._eventRegistry||{})[a];if(l){l=l.slice();for(var u=0;u<l.length;u++)l[u](c,this)}},o.once=function(a,c){var l=this;if(this.on(a,function u(){l.off(a,u),c.apply(null,arguments)}),!c)return new Promise(function(u){c=u})},o.setDefaultHandler=function(a,c){var l=this._defaultHandlers;if(l||(l=this._defaultHandlers={_disabled_:{}}),l[a]){var u=l[a],h=l._disabled_[a];h||(l._disabled_[a]=h=[]),h.push(u);var f=h.indexOf(c);f!=-1&&h.splice(f,1)}l[a]=c},o.removeDefaultHandler=function(a,c){var l=this._defaultHandlers;if(l){var u=l._disabled_[a];if(l[a]==c)u&&this.setDefaultHandler(a,u.pop());else if(u){var h=u.indexOf(c);h!=-1&&u.splice(h,1)}}},o.on=o.addEventListener=function(a,c,l){this._eventRegistry=this._eventRegistry||{};var u=this._eventRegistry[a];return u||(u=this._eventRegistry[a]=[]),u.indexOf(c)==-1&&u[l?"unshift":"push"](c),c},o.off=o.removeListener=o.removeEventListener=function(a,c){this._eventRegistry=this._eventRegistry||{};var l=this._eventRegistry[a];if(l){var u=l.indexOf(c);u!==-1&&l.splice(u,1)}},o.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},r.EventEmitter=o}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,i){"no use strict";var o=n("./oop"),s=n("./event_emitter").EventEmitter,d={setOptions:function(h){Object.keys(h).forEach(function(f){this.setOption(f,h[f])},this)},getOptions:function(h){var f={};if(h)Array.isArray(h)||(f=h,h=Object.keys(f));else{var p=this.$options;h=Object.keys(p).filter(function(g){return!p[g].hidden})}return h.forEach(function(g){f[g]=this.getOption(g)},this),f},setOption:function(h,f){if(this["$"+h]!==f){var p=this.$options[h];if(!p)return a('misspelled option "'+h+'"');if(p.forwardTo)return this[p.forwardTo]&&this[p.forwardTo].setOption(h,f);p.handlesSet||(this["$"+h]=f),p&&p.set&&p.set.call(this,f)}},getOption:function(h){var f=this.$options[h];return f?f.forwardTo?this[f.forwardTo]&&this[f.forwardTo].getOption(h):f&&f.get?f.get.call(this):this["$"+h]:a('misspelled option "'+h+'"')}};function a(h){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}function c(h,f){var p=new Error(h);p.data=f,typeof console=="object"&&console.error&&console.error(p),setTimeout(function(){throw p})}var l,u=function(){function h(){this.$defaultOptions={}}return h.prototype.defineOptions=function(f,p,g){return f.$options||(this.$defaultOptions[p]=f.$options={}),Object.keys(g).forEach(function(b){var x=g[b];typeof x=="string"&&(x={forwardTo:x}),x.name||(x.name=b),f.$options[x.name]=x,"initialValue"in x&&(f["$"+x.name]=x.initialValue)}),o.implement(f,d),this},h.prototype.resetOptions=function(f){Object.keys(f.$options).forEach(function(p){var g=f.$options[p];"value"in g&&f.setOption(p,g.value)})},h.prototype.setDefaultValue=function(f,p,g){if(!f){for(f in this.$defaultOptions)if(this.$defaultOptions[f][p])break;if(!this.$defaultOptions[f][p])return!1}var b=this.$defaultOptions[f]||(this.$defaultOptions[f]={});b[p]&&(b.forwardTo?this.setDefaultValue(b.forwardTo,p,g):b[p].value=g)},h.prototype.setDefaultValues=function(f,p){Object.keys(p).forEach(function(g){this.setDefaultValue(f,g,p[g])},this)},h.prototype.setMessages=function(f){l=f},h.prototype.nls=function(f,p){var g=l&&l[f]||f;return p&&(g=g.replace(/\$(\$|[\d]+)/g,function(b,x){return x=="$"?"$":p[x]})),g},h}();u.prototype.warn=a,u.prototype.reportError=c,o.implement(u.prototype,s),r.AppConfig=u}),ace.define("ace/theme/textmate.css",["require","exports","module"],function(n,r,i){i.exports=`.ace-tm .ace_gutter {
|
||
background: #f0f0f0;
|
||
color: #333;
|
||
}
|
||
|
||
.ace-tm .ace_print-margin {
|
||
width: 1px;
|
||
background: #e8e8e8;
|
||
}
|
||
|
||
.ace-tm .ace_fold {
|
||
background-color: #6B72E6;
|
||
}
|
||
|
||
.ace-tm {
|
||
background-color: #FFFFFF;
|
||
color: black;
|
||
}
|
||
|
||
.ace-tm .ace_cursor {
|
||
color: black;
|
||
}
|
||
|
||
.ace-tm .ace_invisible {
|
||
color: rgb(191, 191, 191);
|
||
}
|
||
|
||
.ace-tm .ace_storage,
|
||
.ace-tm .ace_keyword {
|
||
color: blue;
|
||
}
|
||
|
||
.ace-tm .ace_constant {
|
||
color: rgb(197, 6, 11);
|
||
}
|
||
|
||
.ace-tm .ace_constant.ace_buildin {
|
||
color: rgb(88, 72, 246);
|
||
}
|
||
|
||
.ace-tm .ace_constant.ace_language {
|
||
color: rgb(88, 92, 246);
|
||
}
|
||
|
||
.ace-tm .ace_constant.ace_library {
|
||
color: rgb(6, 150, 14);
|
||
}
|
||
|
||
.ace-tm .ace_invalid {
|
||
background-color: rgba(255, 0, 0, 0.1);
|
||
color: red;
|
||
}
|
||
|
||
.ace-tm .ace_support.ace_function {
|
||
color: rgb(60, 76, 114);
|
||
}
|
||
|
||
.ace-tm .ace_support.ace_constant {
|
||
color: rgb(6, 150, 14);
|
||
}
|
||
|
||
.ace-tm .ace_support.ace_type,
|
||
.ace-tm .ace_support.ace_class {
|
||
color: rgb(109, 121, 222);
|
||
}
|
||
|
||
.ace-tm .ace_keyword.ace_operator {
|
||
color: rgb(104, 118, 135);
|
||
}
|
||
|
||
.ace-tm .ace_string {
|
||
color: rgb(3, 106, 7);
|
||
}
|
||
|
||
.ace-tm .ace_comment {
|
||
color: rgb(76, 136, 107);
|
||
}
|
||
|
||
.ace-tm .ace_comment.ace_doc {
|
||
color: rgb(0, 102, 255);
|
||
}
|
||
|
||
.ace-tm .ace_comment.ace_doc.ace_tag {
|
||
color: rgb(128, 159, 191);
|
||
}
|
||
|
||
.ace-tm .ace_constant.ace_numeric {
|
||
color: rgb(0, 0, 205);
|
||
}
|
||
|
||
.ace-tm .ace_variable {
|
||
color: rgb(49, 132, 149);
|
||
}
|
||
|
||
.ace-tm .ace_xml-pe {
|
||
color: rgb(104, 104, 91);
|
||
}
|
||
|
||
.ace-tm .ace_entity.ace_name.ace_function {
|
||
color: #0000A2;
|
||
}
|
||
|
||
|
||
.ace-tm .ace_heading {
|
||
color: rgb(12, 7, 255);
|
||
}
|
||
|
||
.ace-tm .ace_list {
|
||
color:rgb(185, 6, 144);
|
||
}
|
||
|
||
.ace-tm .ace_meta.ace_tag {
|
||
color:rgb(0, 22, 142);
|
||
}
|
||
|
||
.ace-tm .ace_string.ace_regex {
|
||
color: rgb(255, 0, 0)
|
||
}
|
||
|
||
.ace-tm .ace_marker-layer .ace_selection {
|
||
background: rgb(181, 213, 255);
|
||
}
|
||
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
||
box-shadow: 0 0 3px 0px white;
|
||
}
|
||
.ace-tm .ace_marker-layer .ace_step {
|
||
background: rgb(252, 255, 0);
|
||
}
|
||
|
||
.ace-tm .ace_marker-layer .ace_stack {
|
||
background: rgb(164, 229, 101);
|
||
}
|
||
|
||
.ace-tm .ace_marker-layer .ace_bracket {
|
||
margin: -1px 0 0 -1px;
|
||
border: 1px solid rgb(192, 192, 192);
|
||
}
|
||
|
||
.ace-tm .ace_marker-layer .ace_active-line {
|
||
background: rgba(0, 0, 0, 0.07);
|
||
}
|
||
|
||
.ace-tm .ace_gutter-active-line {
|
||
background-color : #dcdcdc;
|
||
}
|
||
|
||
.ace-tm .ace_marker-layer .ace_selected-word {
|
||
background: rgb(250, 250, 255);
|
||
border: 1px solid rgb(200, 200, 250);
|
||
}
|
||
|
||
.ace-tm .ace_indent-guide {
|
||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
||
}
|
||
|
||
.ace-tm .ace_indent-guide-active {
|
||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
||
}
|
||
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate.css","ace/lib/dom"],function(n,r,i){r.isDark=!1,r.cssClass="ace-tm",r.cssText=n("./textmate.css"),r.$id="ace/theme/textmate";var o=n("../lib/dom");o.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(n,r,i){"no use strict";var o=n("./lib/lang"),s=n("./lib/net"),d=n("./lib/dom"),a=n("./lib/app_config").AppConfig;i.exports=r=new a;var c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(h){if(!c.hasOwnProperty(h))throw new Error("Unknown config key: "+h);return c[h]},r.set=function(h,f){if(c.hasOwnProperty(h))c[h]=f;else if(this.setDefaultValue("",h,f)==!1)throw new Error("Unknown config key: "+h);h=="useStrictCSP"&&d.useStrictCSP(f)},r.all=function(){return o.copyObject(c)},r.$modes={},r.moduleUrl=function(h,f){if(c.$moduleUrls[h])return c.$moduleUrls[h];var p=h.split("/");f=f||p[p.length-2]||"";var g=f=="snippets"?"/":"-",b=p[p.length-1];if(f=="worker"&&g=="-"){var x=new RegExp("^"+f+"[\\-_]|[\\-_]"+f+"$","g");b=b.replace(x,"")}(!b||b==f)&&p.length>1&&(b=p[p.length-2]);var S=c[f+"Path"];return S==null?S=c.basePath:g=="/"&&(f=g=""),S&&S.slice(-1)!="/"&&(S+="/"),S+f+g+b+this.get("suffix")},r.setModuleUrl=function(h,f){return c.$moduleUrls[h]=f};var l=function(h,f){return h==="ace/theme/textmate"||h==="./theme/textmate"?f(null,n("./theme/textmate")):console.error("loader is not configured")};r.setLoader=function(h){l=h},r.dynamicModules=Object.create(null),r.$loading={},r.loadModule=function(h,f){var p,g;Array.isArray(h)&&(g=h[0],h=h[1]);var b=function(x){if(x&&!r.$loading[h])return f&&f(x);if(r.$loading[h]||(r.$loading[h]=[]),r.$loading[h].push(f),!(r.$loading[h].length>1)){var S=function(){l(h,function(T,v){r._emit("load.module",{name:h,module:v});var w=r.$loading[h];r.$loading[h]=null,w.forEach(function(y){y&&y(v)})})};if(!r.get("packaged"))return S();s.loadScript(r.moduleUrl(h,g),S),u()}};if(r.dynamicModules[h])r.dynamicModules[h]().then(function(x){x.default?b(x.default):b(x)});else{try{p=n(h)}catch{}b(p)}},r.setModuleLoader=function(h,f){r.dynamicModules[h]=f};var u=function(){!c.basePath&&!c.workerPath&&!c.modePath&&!c.themePath&&!Object.keys(c.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};r.version="1.22.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,i){n("./lib/fixoldbrowsers");var o=n("./config");o.setLoader(function(c,l){n([c],function(u){l(null,u)})});var s=function(){return this||typeof window<"u"&&window}();i.exports=function(c){o.init=d,c.require=n},d(!0);function d(c){if(!(!s||!s.document)){o.set("packaged",c||n.packaged||i.packaged||s.define&&(void 0).packaged);var l={},u="",h=document.currentScript||document._currentScript,f=h&&h.ownerDocument||document;h&&h.src&&(u=h.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var p=f.getElementsByTagName("script"),g=0;g<p.length;g++){var b=p[g],x=b.src||b.getAttribute("src");if(x){for(var S=b.attributes,T=0,v=S.length;T<v;T++){var w=S[T];w.name.indexOf("data-ace-")===0&&(l[a(w.name.replace(/^data-ace-/,""))]=w.value)}var y=x.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);y&&(u=y[1])}}u&&(l.base=l.base||u,l.packaged=!0),l.basePath=l.base,l.workerPath=l.workerPath||l.base,l.modePath=l.modePath||l.base,l.themePath=l.themePath||l.base,delete l.base;for(var m in l)typeof l[m]<"u"&&o.set(m,l[m])}}function a(c){return c.replace(/-(.)/g,function(l,u){return u.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,r,i){var o=function(d,a){return d.row-a.row||d.column-a.column},s=function(){function d(a,c,l,u){this.start={row:a,column:c},this.end={row:l,column:u}}return d.prototype.isEqual=function(a){return this.start.row===a.start.row&&this.end.row===a.end.row&&this.start.column===a.start.column&&this.end.column===a.end.column},d.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},d.prototype.contains=function(a,c){return this.compare(a,c)==0},d.prototype.compareRange=function(a){var c,l=a.end,u=a.start;return c=this.compare(l.row,l.column),c==1?(c=this.compare(u.row,u.column),c==1?2:c==0?1:0):c==-1?-2:(c=this.compare(u.row,u.column),c==-1?-1:c==1?42:0)},d.prototype.comparePoint=function(a){return this.compare(a.row,a.column)},d.prototype.containsRange=function(a){return this.comparePoint(a.start)==0&&this.comparePoint(a.end)==0},d.prototype.intersects=function(a){var c=this.compareRange(a);return c==-1||c==0||c==1},d.prototype.isEnd=function(a,c){return this.end.row==a&&this.end.column==c},d.prototype.isStart=function(a,c){return this.start.row==a&&this.start.column==c},d.prototype.setStart=function(a,c){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=c)},d.prototype.setEnd=function(a,c){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=c)},d.prototype.inside=function(a,c){return this.compare(a,c)==0?!(this.isEnd(a,c)||this.isStart(a,c)):!1},d.prototype.insideStart=function(a,c){return this.compare(a,c)==0?!this.isEnd(a,c):!1},d.prototype.insideEnd=function(a,c){return this.compare(a,c)==0?!this.isStart(a,c):!1},d.prototype.compare=function(a,c){return!this.isMultiLine()&&a===this.start.row?c<this.start.column?-1:c>this.end.column?1:0:a<this.start.row?-1:a>this.end.row?1:this.start.row===a?c>=this.start.column?0:-1:this.end.row===a?c<=this.end.column?0:1:0},d.prototype.compareStart=function(a,c){return this.start.row==a&&this.start.column==c?-1:this.compare(a,c)},d.prototype.compareEnd=function(a,c){return this.end.row==a&&this.end.column==c?1:this.compare(a,c)},d.prototype.compareInside=function(a,c){return this.end.row==a&&this.end.column==c?1:this.start.row==a&&this.start.column==c?-1:this.compare(a,c)},d.prototype.clipRows=function(a,c){if(this.end.row>c)var l={row:c+1,column:0};else if(this.end.row<a)var l={row:a,column:0};if(this.start.row>c)var u={row:c+1,column:0};else if(this.start.row<a)var u={row:a,column:0};return d.fromPoints(u||this.start,l||this.end)},d.prototype.extend=function(a,c){var l=this.compare(a,c);if(l==0)return this;if(l==-1)var u={row:a,column:c};else var h={row:a,column:c};return d.fromPoints(u||this.start,h||this.end)},d.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},d.prototype.isMultiLine=function(){return this.start.row!==this.end.row},d.prototype.clone=function(){return d.fromPoints(this.start,this.end)},d.prototype.collapseRows=function(){return this.end.column==0?new d(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new d(this.start.row,0,this.end.row,0)},d.prototype.toScreenRange=function(a){var c=a.documentToScreenPosition(this.start),l=a.documentToScreenPosition(this.end);return new d(c.row,c.column,l.row,l.column)},d.prototype.moveBy=function(a,c){this.start.row+=a,this.start.column+=c,this.end.row+=a,this.end.column+=c},d}();s.fromPoints=function(d,a){return new s(d.row,d.column,a.row,a.column)},s.comparePoints=o,s.comparePoints=function(d,a){return d.row-a.row||d.column-a.column},r.Range=s}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,r,i){/*! @license
|
||
==========================================================================
|
||
SproutCore -- JavaScript Application Framework
|
||
copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.
|
||
|
||
Permission is hereby granted, free of charge, to any person obtaining a
|
||
copy of this software and associated documentation files (the "Software"),
|
||
to deal in the Software without restriction, including without limitation
|
||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||
and/or sell copies of the Software, and to permit persons to whom the
|
||
Software is furnished to do so, subject to the following conditions:
|
||
|
||
The above copyright notice and this permission notice shall be included in
|
||
all copies or substantial portions of the Software.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||
DEALINGS IN THE SOFTWARE.
|
||
|
||
SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.
|
||
|
||
For more information about SproutCore, visit http://www.sproutcore.com
|
||
|
||
|
||
==========================================================================
|
||
@license */var o=n("./oop"),s=function(){var d={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",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"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};d.PRINTABLE_KEYS[173]="-";var a,c;for(c in d.FUNCTION_KEYS)a=d.FUNCTION_KEYS[c].toLowerCase(),d[a]=parseInt(c,10);for(c in d.PRINTABLE_KEYS)a=d.PRINTABLE_KEYS[c].toLowerCase(),d[a]=parseInt(c,10);return o.mixin(d,d.MODIFIER_KEYS),o.mixin(d,d.PRINTABLE_KEYS),o.mixin(d,d.FUNCTION_KEYS),d.enter=d.return,d.escape=d.esc,d.del=d.delete,function(){for(var l=["cmd","ctrl","alt","shift"],u=Math.pow(2,l.length);u--;)d.KEY_MODS[u]=l.filter(function(h){return u&d.KEY_MODS[h]}).join("-")+"-"}(),d.KEY_MODS[0]="",d.KEY_MODS[-1]="input-",d}();o.mixin(r,s),r.keyCodeToString=function(d){var a=s[d];return typeof a!="string"&&(a=String.fromCharCode(d)),a.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,i){var o=n("./keys"),s=n("./useragent"),d=null,a=0,c;function l(){c=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){c={passive:!1}}})}catch{}}function u(){return c==null&&l(),c}function h(T,v,w){this.elem=T,this.type=v,this.callback=w}h.prototype.destroy=function(){p(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var f=r.addListener=function(T,v,w,y){T.addEventListener(v,w,u()),y&&y.$toDestroy.push(new h(T,v,w))},p=r.removeListener=function(T,v,w){T.removeEventListener(v,w,u())};r.stopEvent=function(T){return r.stopPropagation(T),r.preventDefault(T),!1},r.stopPropagation=function(T){T.stopPropagation&&T.stopPropagation()},r.preventDefault=function(T){T.preventDefault&&T.preventDefault()},r.getButton=function(T){return T.type=="dblclick"?0:T.type=="contextmenu"||s.isMac&&T.ctrlKey&&!T.altKey&&!T.shiftKey?2:T.button},r.capture=function(T,v,w){var y=T&&T.ownerDocument||document;function m(E){v&&v(E),w&&w(E),p(y,"mousemove",v),p(y,"mouseup",m),p(y,"dragstart",m)}return f(y,"mousemove",v),f(y,"mouseup",m),f(y,"dragstart",m),m},r.addMouseWheelListener=function(T,v,w){f(T,"wheel",function(y){var m=.15,E=y.deltaX||0,A=y.deltaY||0;switch(y.deltaMode){case y.DOM_DELTA_PIXEL:y.wheelX=E*m,y.wheelY=A*m;break;case y.DOM_DELTA_LINE:var C=15;y.wheelX=E*C,y.wheelY=A*C;break;case y.DOM_DELTA_PAGE:var k=150;y.wheelX=E*k,y.wheelY=A*k;break}v(y)},w)},r.addMultiMouseDownListener=function(T,v,w,y,m){var E=0,A,C,k,I={2:"dblclick",3:"tripleclick",4:"quadclick"};function R(M){if(r.getButton(M)!==0?E=0:M.detail>1?(E++,E>4&&(E=1)):E=1,s.isIE){var O=Math.abs(M.clientX-A)>5||Math.abs(M.clientY-C)>5;(!k||O)&&(E=1),k&&clearTimeout(k),k=setTimeout(function(){k=null},v[E-1]||600),E==1&&(A=M.clientX,C=M.clientY)}if(M._clicks=E,w[y]("mousedown",M),E>4)E=0;else if(E>1)return w[y](I[E],M)}Array.isArray(T)||(T=[T]),T.forEach(function(M){f(M,"mousedown",R,m)})};var g=function(T){return 0|(T.ctrlKey?1:0)|(T.altKey?2:0)|(T.shiftKey?4:0)|(T.metaKey?8:0)};r.getModifierString=function(T){return o.KEY_MODS[g(T)]};function b(T,v,w){var y=g(v);if(!s.isMac&&d){if(v.getModifierState&&(v.getModifierState("OS")||v.getModifierState("Win"))&&(y|=8),d.altGr)if((3&y)!=3)d.altGr=0;else return;if(w===18||w===17){var m="location"in v?v.location:v.keyLocation;if(w===17&&m===1)d[w]==1&&(a=v.timeStamp);else if(w===18&&y===3&&m===2){var E=v.timeStamp-a;E<50&&(d.altGr=!0)}}}if(w in o.MODIFIER_KEYS&&(w=-1),!y&&w===13){var m="location"in v?v.location:v.keyLocation;if(m===3&&(T(v,y,-w),v.defaultPrevented))return}if(s.isChromeOS&&y&8){if(T(v,y,w),v.defaultPrevented)return;y&=-9}return!y&&!(w in o.FUNCTION_KEYS)&&!(w in o.PRINTABLE_KEYS)?!1:T(v,y,w)}r.addCommandKeyListener=function(T,v,w){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var y=null;f(T,"keydown",function(E){y=E.keyCode},w),f(T,"keypress",function(E){return b(v,E,y)},w)}else{var m=null;f(T,"keydown",function(E){d[E.keyCode]=(d[E.keyCode]||0)+1;var A=b(v,E,E.keyCode);return m=E.defaultPrevented,A},w),f(T,"keypress",function(E){m&&(E.ctrlKey||E.altKey||E.shiftKey||E.metaKey)&&(r.stopEvent(E),m=null)},w),f(T,"keyup",function(E){d[E.keyCode]=null},w),d||(x(),f(window,"focus",x))}};function x(){d=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!s.isOldIE){var S=1;r.nextTick=function(T,v){v=v||window;var w="zero-timeout-message-"+S++,y=function(m){m.data==w&&(r.stopPropagation(m),p(v,"message",y),T())};f(v,"message",y),v.postMessage(w,"*")}}r.$idleBlocked=!1,r.onIdle=function(T,v){return setTimeout(function w(){r.$idleBlocked?setTimeout(w,100):T()},v)},r.$idleBlockId=null,r.blockIdle=function(T){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},T||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(T){setTimeout(T,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,i){var o;i.exports={lineMode:!1,pasteCancelled:function(){return o&&o>Date.now()-50?!0:o=!1},cancel:function(){o=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,r,i){var o=n("../lib/event"),s=n("../config").nls,d=n("../lib/useragent"),a=n("../lib/dom"),c=n("../lib/lang"),l=n("../clipboard"),u=d.isChrome<18,h=d.isIE,f=d.isChrome>63,p=400,g=n("../lib/keys"),b=g.KEY_MODS,x=d.isIOS,S=x?/\s/:/\n/,T=d.isMobile,v=function(w,y){var m=a.createElement("textarea");m.className="ace_text-input",m.setAttribute("wrap","off"),m.setAttribute("autocorrect","off"),m.setAttribute("autocapitalize","off"),m.setAttribute("spellcheck",!1),m.style.opacity="0",w.insertBefore(m,w.firstChild);var E=!1,A=!1,C=!1,k=!1,I="";T||(m.style.fontSize="1px");var R=!1,M=!1,O="",P=0,N=0,B=0;try{var W=document.activeElement===m}catch{}this.setAriaOptions=function(me){me.activeDescendant?(m.setAttribute("aria-haspopup","true"),m.setAttribute("aria-autocomplete",me.inline?"both":"list"),m.setAttribute("aria-activedescendant",me.activeDescendant)):(m.setAttribute("aria-haspopup","false"),m.setAttribute("aria-autocomplete","both"),m.removeAttribute("aria-activedescendant")),me.role&&m.setAttribute("role",me.role)},this.setAriaLabel=function(){if(y.session&&y.renderer.enableKeyboardAccessibility){var me=y.session.selection.cursor.row;m.setAttribute("aria-roledescription",s("editor")),m.setAttribute("aria-label",s("Cursor at row $0",[me+1]))}else m.removeAttribute("aria-roledescription"),m.removeAttribute("aria-label")},this.setAriaOptions({role:"textbox"}),this.setAriaLabel(),o.addListener(m,"blur",function(me){M||(y.onBlur(me),W=!1,T&&!x&&document.removeEventListener("selectionchange",Y))},y),o.addListener(m,"focus",function(me){if(!M){if(W=!0,d.isEdge)try{if(!document.hasFocus())return}catch{}y.onFocus(me),d.isEdge?setTimeout(K):K(),T&&!x&&document.addEventListener("selectionchange",Y)}},y),this.$focusScroll=!1,this.focus=function(){if(this.setAriaLabel(),I||f||this.$focusScroll=="browser")return m.focus({preventScroll:!0});var me=m.style.top;m.style.position="fixed",m.style.top="0px";try{var Ae=m.getBoundingClientRect().top!=0}catch{return}var we=[];if(Ae)for(var He=m.parentElement;He&&He.nodeType==1;)we.push(He),He.setAttribute("ace_nocontext",!0),!He.parentElement&&He.getRootNode?He=He.getRootNode().host:He=He.parentElement;m.focus({preventScroll:!0}),Ae&&we.forEach(function(ct){ct.removeAttribute("ace_nocontext")}),setTimeout(function(){m.style.position="",m.style.top=="0px"&&(m.style.top=me)},0)},this.blur=function(){m.blur()},this.isFocused=function(){return W},y.on("beforeEndOperation",function(){var me=y.curOp,Ae=me&&me.command&&me.command.name;if(Ae!="insertstring"){var we=Ae&&(me.docChanged||me.selectionChanged);C&&we&&(O=m.value="",it()),K()}});var K=x?function(me){if(!(!W||E&&!me||k)){me||(me="");var Ae=`
|
||
ab`+me+`cde fg
|
||
`;Ae!=m.value&&(m.value=O=Ae);var we=4,He=4+(me.length||(y.selection.isEmpty()?0:1));(P!=we||N!=He)&&m.setSelectionRange(we,He),P=we,N=He}}:function(){if(!(C||k)&&!(!W&&!te)){C=!0;var me=0,Ae=0,we="";if(y.session){var He=y.selection,ct=He.getRange(),xe=He.cursor.row;if(me=ct.start.column,Ae=ct.end.column,we=y.session.getLine(xe),ct.start.row!=xe){var Fe=y.session.getLine(xe-1);me=ct.start.row<xe-1?0:me,Ae+=Fe.length+1,we=Fe+`
|
||
`+we}else if(ct.end.row!=xe){var Ne=y.session.getLine(xe+1);Ae=ct.end.row>xe+1?Ne.length:Ae,Ae+=we.length+1,we=we+`
|
||
`+Ne}else T&&xe>0&&(we=`
|
||
`+we,Ae+=1,me+=1);we.length>p&&(me<p&&Ae<p?we=we.slice(0,p):(we=`
|
||
`,me==Ae?me=Ae=0:(me=0,Ae=1)))}var Xe=we+`
|
||
|
||
`;if(Xe!=O&&(m.value=O=Xe,P=N=Xe.length),te&&(P=m.selectionStart,N=m.selectionEnd),N!=Ae||P!=me||m.selectionEnd!=N)try{m.setSelectionRange(me,Ae),P=me,N=Ae}catch{}C=!1}};this.resetSelection=K,W&&y.onFocus();var q=function(me){return me.selectionStart===0&&me.selectionEnd>=O.length&&me.value===O&&O&&me.selectionEnd!==N},re=function(me){C||(E?E=!1:q(m)?(y.selectAll(),K()):T&&m.selectionStart!=P&&K())};function Y(me){if((!m||!m.parentNode)&&document.removeEventListener("selectionchange",Y),!C&&m.selectionStart===m.selectionEnd){var Ae=m.selectionStart-P,we=N-P;Ae>0?Ae=Math.max(Ae-we,1):Ae===0&&we&&(Ae=-1);for(var He=Math.abs(Ae),ct=Ae>0?g.right:g.left,xe=0;xe<He;xe++)y.onCommandKey({},0,ct)}}var Z=null;this.setInputHandler=function(me){Z=me},this.getInputHandler=function(){return Z};var te=!1,ie=function(me,Ae){if(te&&(te=!1),A)return K(),me&&y.onPaste(me),A=!1,"";for(var we=m.selectionStart,He=m.selectionEnd,ct=P,xe=O.length-N,Fe=me,Ne=me.length-we,Xe=me.length-He,tt=0;ct>0&&O[tt]==me[tt];)tt++,ct--;for(Fe=Fe.slice(tt),tt=1;xe>0&&O.length-tt>P-1&&O[O.length-tt]==me[me.length-tt];)tt++,xe--;Ne-=tt-1,Xe-=tt-1;var kt=Fe.length-tt+1;if(kt<0&&(ct=-kt,kt=0),Fe=Fe.slice(0,kt),!Ae&&!Fe&&!Ne&&!ct&&!xe&&!Xe)return"";k=!0;var on=!1;return d.isAndroid&&Fe==". "&&(Fe=" ",on=!0),Fe&&!ct&&!xe&&!Ne&&!Xe||R?y.onTextInput(Fe):y.onTextInput(Fe,{extendLeft:ct,extendRight:xe,restoreStart:Ne,restoreEnd:Xe}),k=!1,O=me,P=we,N=He,B=Xe,on?`
|
||
`:Fe},ce=function(me){if(C)return Te();if(me&&me.inputType){if(me.inputType=="historyUndo")return y.execCommand("undo");if(me.inputType=="historyRedo")return y.execCommand("redo")}var Ae=m.value,we=ie(Ae,!0);(Ae.length>p+100||S.test(we)||T&&P<1&&P==N)&&K()},he=function(me,Ae,we){var He=me.clipboardData||window.clipboardData;if(!(!He||u)){var ct=h||we?"Text":"text/plain";try{return Ae?He.setData(ct,Ae)!==!1:He.getData(ct)}catch(xe){if(!we)return he(xe,Ae,!0)}}},ve=function(me,Ae){var we=y.getCopyText();if(!we)return o.preventDefault(me);he(me,we)?(x&&(K(we),E=we,setTimeout(function(){E=!1},10)),Ae?y.onCut():y.onCopy(),o.preventDefault(me)):(E=!0,m.value=we,m.select(),setTimeout(function(){E=!1,K(),Ae?y.onCut():y.onCopy()}))},Ce=function(me){ve(me,!0)},_e=function(me){ve(me,!1)},Re=function(me){var Ae=he(me);l.pasteCancelled()||(typeof Ae=="string"?(Ae&&y.onPaste(Ae,me),d.isIE&&setTimeout(K),o.preventDefault(me)):(m.value="",A=!0))};o.addCommandKeyListener(m,y.onCommandKey.bind(y),y),o.addListener(m,"select",re,y),o.addListener(m,"input",ce,y),o.addListener(m,"cut",Ce,y),o.addListener(m,"copy",_e,y),o.addListener(m,"paste",Re,y),(!("oncut"in m)||!("oncopy"in m)||!("onpaste"in m))&&o.addListener(w,"keydown",function(me){if(!(d.isMac&&!me.metaKey||!me.ctrlKey))switch(me.keyCode){case 67:_e(me);break;case 86:Re(me);break;case 88:Ce(me);break}},y);var ot=function(me){if(!(C||!y.onCompositionStart||y.$readOnly)&&(C={},!R)){me.data&&(C.useTextareaForIME=!1),setTimeout(Te,0),y._signal("compositionStart"),y.on("mousedown",vt);var Ae=y.getSelectionRange();Ae.end.row=Ae.start.row,Ae.end.column=Ae.start.column,C.markerRange=Ae,C.selectionStart=P,y.onCompositionStart(C),C.useTextareaForIME?(O=m.value="",P=0,N=0):(m.msGetInputContext&&(C.context=m.msGetInputContext()),m.getInputContext&&(C.context=m.getInputContext()))}},Te=function(){if(!(!C||!y.onCompositionUpdate||y.$readOnly)){if(R)return vt();if(C.useTextareaForIME)y.onCompositionUpdate(m.value);else{var me=m.value;ie(me),C.markerRange&&(C.context&&(C.markerRange.start.column=C.selectionStart=C.context.compositionStartOffset),C.markerRange.end.column=C.markerRange.start.column+N-C.selectionStart+B)}}},it=function(me){!y.onCompositionEnd||y.$readOnly||(C=!1,y.onCompositionEnd(),y.off("mousedown",vt),me&&ce())};function vt(){M=!0,m.blur(),m.focus(),M=!1}var Qt=c.delayedCall(Te,50).schedule.bind(null,null);function Ut(me){me.keyCode==27&&m.value.length<m.selectionStart&&(C||(O=m.value),P=N=-1,K()),Qt()}o.addListener(m,"compositionstart",ot,y),o.addListener(m,"compositionupdate",Te,y),o.addListener(m,"keyup",Ut,y),o.addListener(m,"keydown",Qt,y),o.addListener(m,"compositionend",it,y),this.getElement=function(){return m},this.setCommandMode=function(me){R=me,m.readOnly=!1},this.setReadOnly=function(me){R||(m.readOnly=me)},this.setCopyWithEmptySelection=function(me){},this.onContextMenu=function(me){te=!0,K(),y._emit("nativecontextmenu",{target:y,domEvent:me}),this.moveToMouse(me,!0)},this.moveToMouse=function(me,Ae){I||(I=m.style.cssText),m.style.cssText=(Ae?"z-index:100000;":"")+(d.isIE?"opacity:0.1;":"")+"text-indent: -"+(P+N)*y.renderer.characterWidth*.5+"px;";var we=y.container.getBoundingClientRect(),He=a.computedStyle(y.container),ct=we.top+(parseInt(He.borderTopWidth)||0),xe=we.left+(parseInt(we.borderLeftWidth)||0),Fe=we.bottom-ct-m.clientHeight-2,Ne=function(Xe){a.translate(m,Xe.clientX-xe-2,Math.min(Xe.clientY-ct-2,Fe))};Ne(me),me.type=="mousedown"&&(y.renderer.$isMousePressed=!0,clearTimeout(Lr),d.isWin&&o.capture(y.container,Ne,Ln))},this.onContextMenuClose=Ln;var Lr;function Ln(){clearTimeout(Lr),Lr=setTimeout(function(){I&&(m.style.cssText=I,I=""),y.renderer.$isMousePressed=!1,y.renderer.$keepTextAreaAtCursor&&y.renderer.$moveTextAreaToCursor()},0)}var Zn=function(me){y.textInput.onContextMenu(me),Ln()};o.addListener(m,"mouseup",Zn,y),o.addListener(m,"mousedown",function(me){me.preventDefault(),Ln()},y),o.addListener(y.renderer.scroller,"contextmenu",Zn,y),o.addListener(m,"contextmenu",Zn,y),x&&Ht(w,y,m);function Ht(me,Ae,we){var He=null,ct=!1;we.addEventListener("keydown",function(Fe){He&&clearTimeout(He),ct=!0},!0),we.addEventListener("keyup",function(Fe){He=setTimeout(function(){ct=!1},100)},!0);var xe=function(Fe){if(document.activeElement===we&&!(ct||C||Ae.$mouseHandler.isMousePressed)&&!E){var Ne=we.selectionStart,Xe=we.selectionEnd,tt=null,kt=0;if(Ne==0?tt=g.up:Ne==1?tt=g.home:Xe>N&&O[Xe]==`
|
||
`?tt=g.end:Ne<P&&O[Ne-1]==" "?(tt=g.left,kt=b.option):Ne<P||Ne==P&&N!=P&&Ne==Xe?tt=g.left:Xe>N&&O.slice(0,Xe).split(`
|
||
`).length>2?tt=g.down:Xe>N&&O[Xe-1]==" "?(tt=g.right,kt=b.option):(Xe>N||Xe==N&&N!=P&&Ne==Xe)&&(tt=g.right),Ne!==Xe&&(kt|=b.shift),tt){var on=Ae.onCommandKey({},kt,tt);if(!on&&Ae.commands){tt=g.keyCodeToString(tt);var Rn=Ae.commands.findKeyCommand(kt,tt);Rn&&Ae.execCommand(Rn)}P=Ne,N=Xe,K("")}}};document.addEventListener("selectionchange",xe),Ae.on("destroy",function(){document.removeEventListener("selectionchange",xe)})}this.destroy=function(){m.parentElement&&m.parentElement.removeChild(m)}};r.TextInput=v,r.$setUserAgentForTests=function(w,y){T=w,x=y}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,i){var o=n("../lib/useragent"),s=0,d=550,a=function(){function u(h){h.$clickSelection=null;var f=h.editor;f.setDefaultHandler("mousedown",this.onMouseDown.bind(h)),f.setDefaultHandler("dblclick",this.onDoubleClick.bind(h)),f.setDefaultHandler("tripleclick",this.onTripleClick.bind(h)),f.setDefaultHandler("quadclick",this.onQuadClick.bind(h)),f.setDefaultHandler("mousewheel",this.onMouseWheel.bind(h));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(g){h[g]=this[g]},this),h.selectByLines=this.extendSelectionBy.bind(h,"getLineRange"),h.selectByWords=this.extendSelectionBy.bind(h,"getWordRange")}return u.prototype.onMouseDown=function(h){var f=h.inSelection(),p=h.getDocumentPosition();this.mousedownEvent=h;var g=this.editor,b=h.getButton();if(b!==0){var x=g.getSelectionRange(),S=x.isEmpty();(S||b==1)&&g.selection.moveToPosition(p),b==2&&(g.textInput.onContextMenu(h.domEvent),o.isMozilla||h.preventDefault());return}if(this.mousedownEvent.time=Date.now(),f&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(h);return}return this.captureMouse(h),this.startSelect(p,h.domEvent._clicks>1),h.preventDefault()},u.prototype.startSelect=function(h,f){h=h||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(h):f||p.selection.moveToPosition(h),f||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},u.prototype.select=function(){var h,f=this.editor,p=f.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(p);if(g==-1)h=this.$clickSelection.end;else if(g==1)h=this.$clickSelection.start;else{var b=l(this.$clickSelection,p);p=b.cursor,h=b.anchor}f.selection.setSelectionAnchor(h.row,h.column)}f.selection.selectToPosition(p),f.renderer.scrollCursorIntoView()},u.prototype.extendSelectionBy=function(h){var f,p=this.editor,g=p.renderer.screenToTextCoordinates(this.x,this.y),b=p.selection[h](g.row,g.column);if(this.$clickSelection){var x=this.$clickSelection.comparePoint(b.start),S=this.$clickSelection.comparePoint(b.end);if(x==-1&&S<=0)f=this.$clickSelection.end,(b.end.row!=g.row||b.end.column!=g.column)&&(g=b.start);else if(S==1&&x>=0)f=this.$clickSelection.start,(b.start.row!=g.row||b.start.column!=g.column)&&(g=b.end);else if(x==-1&&S==1)g=b.end,f=b.start;else{var T=l(this.$clickSelection,g);g=T.cursor,f=T.anchor}p.selection.setSelectionAnchor(f.row,f.column)}p.selection.selectToPosition(g),p.renderer.scrollCursorIntoView()},u.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},u.prototype.focusWait=function(){var h=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),f=Date.now();(h>s||f-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},u.prototype.onDoubleClick=function(h){var f=h.getDocumentPosition(),p=this.editor,g=p.session,b=g.getBracketRange(f);b?(b.isEmpty()&&(b.start.column--,b.end.column++),this.setState("select")):(b=p.selection.getWordRange(f.row,f.column),this.setState("selectByWords")),this.$clickSelection=b,this.select()},u.prototype.onTripleClick=function(h){var f=h.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var g=p.getSelectionRange();g.isMultiLine()&&g.contains(f.row,f.column)?(this.$clickSelection=p.selection.getLineRange(g.start.row),this.$clickSelection.end=p.selection.getLineRange(g.end.row).end):this.$clickSelection=p.selection.getLineRange(f.row),this.select()},u.prototype.onQuadClick=function(h){var f=this.editor;f.selectAll(),this.$clickSelection=f.getSelectionRange(),this.setState("selectAll")},u.prototype.onMouseWheel=function(h){if(!h.getAccelKey()){h.getShiftKey()&&h.wheelY&&!h.wheelX&&(h.wheelX=h.wheelY,h.wheelY=0);var f=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,g=h.domEvent.timeStamp,b=g-p.t,x=b?h.wheelX/b:p.vx,S=b?h.wheelY/b:p.vy;b<d&&(x=(x+p.vx)/2,S=(S+p.vy)/2);var T=Math.abs(x/S),v=!1;if(T>=1&&f.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(v=!0),T<=1&&f.renderer.isScrollableBy(0,h.wheelY*h.speed)&&(v=!0),v)p.allowed=g;else if(g-p.allowed<d){var w=Math.abs(x)<=1.5*Math.abs(p.vx)&&Math.abs(S)<=1.5*Math.abs(p.vy);w?(v=!0,p.allowed=g):p.allowed=0}if(p.t=g,p.vx=x,p.vy=S,v)return f.renderer.scrollBy(h.wheelX*h.speed,h.wheelY*h.speed),h.stop()}},u}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,r.DefaultHandlers=a;function c(u,h,f,p){return Math.sqrt(Math.pow(f-u,2)+Math.pow(p-h,2))}function l(u,h){if(u.start.row==u.end.row)var f=2*h.column-u.start.column-u.end.column;else if(u.start.row==u.end.row-1&&!u.start.column&&!u.end.column)var f=h.column-4;else var f=2*h.row-u.start.row-u.end.row;return f<0?{cursor:u.start,anchor:u.end}:{cursor:u.end,anchor:u.start}}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/range"],function(n,r,i){var o=this&&this.__extends||function(){var p=function(g,b){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var T in S)Object.prototype.hasOwnProperty.call(S,T)&&(x[T]=S[T])},p(g,b)};return function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");p(g,b);function x(){this.constructor=g}g.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x)}}(),s=this&&this.__values||function(p){var g=typeof Symbol=="function"&&Symbol.iterator,b=g&&p[g],x=0;if(b)return b.call(p);if(p&&typeof p.length=="number")return{next:function(){return p&&x>=p.length&&(p=void 0),{value:p&&p[x++],done:!p}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},d=n("./lib/dom"),a=n("./range").Range,c="ace_tooltip",l=function(){function p(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}return p.prototype.$init=function(){return this.$element=d.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},p.prototype.getElement=function(){return this.$element||this.$init()},p.prototype.setText=function(g){this.getElement().textContent=g},p.prototype.setHtml=function(g){this.getElement().innerHTML=g},p.prototype.setPosition=function(g,b){this.getElement().style.left=g+"px",this.getElement().style.top=b+"px"},p.prototype.setClassName=function(g){d.addCssClass(this.getElement(),g)},p.prototype.setTheme=function(g){this.$element.className=c+" "+(g.isDark?"ace_dark ":"")+(g.cssClass||"")},p.prototype.show=function(g,b,x){g!=null&&this.setText(g),b!=null&&x!=null&&this.setPosition(b,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},p.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},p.prototype.getHeight=function(){return this.getElement().offsetHeight},p.prototype.getWidth=function(){return this.getElement().offsetWidth},p.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},p}(),u=function(){function p(){this.popups=[]}return p.prototype.addPopup=function(g){this.popups.push(g),this.updatePopups()},p.prototype.removePopup=function(g){var b=this.popups.indexOf(g);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},p.prototype.updatePopups=function(){var g,b,x,S;this.popups.sort(function(k,I){return I.priority-k.priority});var T=[];try{for(var v=s(this.popups),w=v.next();!w.done;w=v.next()){var y=w.value,m=!0;try{for(var E=(x=void 0,s(T)),A=E.next();!A.done;A=E.next()){var C=A.value;if(this.doPopupsOverlap(C,y)){m=!1;break}}}catch(k){x={error:k}}finally{try{A&&!A.done&&(S=E.return)&&S.call(E)}finally{if(x)throw x.error}}m?T.push(y):y.hide()}}catch(k){g={error:k}}finally{try{w&&!w.done&&(b=v.return)&&b.call(v)}finally{if(g)throw g.error}}},p.prototype.doPopupsOverlap=function(g,b){var x=g.getElement().getBoundingClientRect(),S=b.getElement().getBoundingClientRect();return x.left<S.right&&x.right>S.left&&x.top<S.bottom&&x.bottom>S.top},p}(),h=new u;r.popupManager=h,r.Tooltip=l;var f=function(p){o(g,p);function g(b){b===void 0&&(b=document.body);var x=p.call(this,b)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var S=x.getElement();return S.style.whiteSpace="pre-wrap",S.style.pointerEvents="auto",S.addEventListener("mouseout",x.onMouseOut),S.tabIndex=-1,S.addEventListener("blur",function(){S.contains(document.activeElement)||this.hide()}.bind(x)),x}return g.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide),b.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},g.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide),b.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},g.prototype.onMouseMove=function(b,x){this.lastEvent=b,this.lastT=Date.now();var S=x.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||S||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||S||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},g.prototype.isOutsideOfText=function(b){var x=b.editor,S=b.getDocumentPosition(),T=x.session.getLine(S.row);if(S.column==T.length){var v=x.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),w=x.session.documentToScreenPosition(S.row,S.column);if(w.column!=v.column||w.row!=v.row)return!0}return!1},g.prototype.setDataProvider=function(b){this.$gatherData=b},g.prototype.showForRange=function(b,x,S,T){if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var v=b.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(v.theme)),this.isOpen=!0,this.addMarker(x,b.session),this.range=a.fromPoints(x.start,x.end);var w=this.getElement();w.innerHTML="",w.appendChild(S),w.style.display="block";var y=v.textToScreenCoordinates(x.start.row,x.start.column),m=b.getCursorPosition(),E=w.clientHeight,A=v.scroller.getBoundingClientRect(),C=!0;this.row>m.row?C=!0:this.row<m.row&&(C=!1),y.pageY-E+v.lineHeight<A.top?C=!0:y.pageY+E>A.bottom&&(C=!1),C?y.pageY+=v.lineHeight:y.pageY-=E,w.style.maxWidth=A.width-(y.pageX-A.left)+"px",this.setPosition(y.pageX,y.pageY)}},g.prototype.addMarker=function(b,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(b,"ace_highlight-marker","text")},g.prototype.hide=function(b){!b&&document.activeElement==this.getElement()||b&&b.target&&(b.type!="keydown"||b.ctrlKey||b.metaKey)&&this.$element.contains(b.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,h.removePopup(this)))},g.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},g.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},g.prototype.onMouseOut=function(b){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!b.relatedTarget||b.relatedTarget==this.getElement()||b&&b.currentTarget.contains(b.relatedTarget)||b.relatedTarget.classList.contains("ace_content")||this.hide())},g}(l);r.HoverTooltip=f}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,i){var o=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(b[S]=x[S])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function b(){this.constructor=p}p.prototype=g===null?Object.create(g):(b.prototype=g.prototype,new b)}}(),s=this&&this.__values||function(f){var p=typeof Symbol=="function"&&Symbol.iterator,g=p&&f[p],b=0;if(g)return g.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&b>=f.length&&(f=void 0),{value:f&&f[b++],done:!f}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},d=n("../lib/dom"),a=n("../lib/event"),c=n("../tooltip").Tooltip,l=n("../config").nls;function u(f){var p=f.editor,g=p.renderer.$gutterLayer,b=new h(p);f.editor.setDefaultHandler("guttermousedown",function(y){if(!(!p.isFocused()||y.getButton()!=0)){var m=g.getRegion(y);if(m!="foldWidgets"){var E=y.getDocumentPosition().row,A=p.session.selection;if(y.getShiftKey())A.selectTo(E,0);else{if(y.domEvent.detail==2)return p.selectAll(),y.preventDefault();f.$clickSelection=p.selection.getLineRange(E)}return f.setState("selectByLines"),f.captureMouse(y),y.preventDefault()}}});var x,S;function T(){var y=S.getDocumentPosition().row,m=p.session.getLength();if(y==m){var E=p.renderer.pixelToScreenCoordinates(0,S.y).row,A=S.$pos;if(E>p.session.documentToScreenRow(A.row,A.column))return v()}if(b.showTooltip(y),!!b.isOpen)if(p.on("mousewheel",v),f.$tooltipFollowsMouse)w(S);else{var C=g.$lines.cells[y].element.querySelector("[class*=ace_icon]"),k=C.getBoundingClientRect(),I=b.getElement().style;I.left=k.right+"px",I.top=k.bottom+"px"}}function v(){x&&(x=clearTimeout(x)),b.isOpen&&(b.hide(),p._signal("hideGutterTooltip",b),p.off("mousewheel",v))}function w(y){b.setPosition(y.x,y.y)}f.editor.setDefaultHandler("guttermousemove",function(y){var m=y.domEvent.target||y.domEvent.srcElement;if(d.hasCssClass(m,"ace_fold-widget"))return v();b.isOpen&&f.$tooltipFollowsMouse&&w(y),S=y,!x&&(x=setTimeout(function(){x=null,S&&!f.isMousePressed?T():v()},50))}),a.addListener(p.renderer.$gutter,"mouseout",function(y){S=null,!(!b.isOpen||x)&&(x=setTimeout(function(){x=null,v()},50))},p),p.on("changeSession",v),p.on("input",v)}r.GutterHandler=u;var h=function(f){o(p,f);function p(g){var b=f.call(this,g.container)||this;return b.editor=g,b}return p.prototype.setPosition=function(g,b){var x=window.innerWidth||document.documentElement.clientWidth,S=window.innerHeight||document.documentElement.clientHeight,T=this.getWidth(),v=this.getHeight();g+=15,b+=15,g+T>x&&(g-=g+T-x),b+v>S&&(b-=20+v),c.prototype.setPosition.call(this,g,b)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:l("error"),plural:l("errors")},warning:{singular:l("warning"),plural:l("warnings")},info:{singular:l("information message"),plural:l("information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(g){var b=this.editor.renderer.$gutterLayer,x=b.$annotations[g],S;x?S={text:Array.from(x.text),type:Array.from(x.type)}:S={text:[],type:[]};var T=b.session.getFoldLine(g);if(T&&b.$showFoldedAnnotations){for(var v={error:[],warning:[],info:[]},w,y=g+1;y<=T.end.row;y++)if(b.$annotations[y])for(var m=0;m<b.$annotations[y].text.length;m++){var E=b.$annotations[y].type[m];if(v[E].push(b.$annotations[y].text[m]),E==="error"){w="error_fold";continue}if(E==="warning"){w="warning_fold";continue}}if(w==="error_fold"||w==="warning_fold"){var A="".concat(p.annotationsToSummaryString(v)," in folded code.");S.text.push(A),S.type.push(w)}}if(S.text.length===0)return this.hide();for(var C={error:[],warning:[],info:[]},k=b.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",y=0;y<S.text.length;y++){var I="<span class='ace_".concat(S.type[y]," ").concat(k,"' aria-label='").concat(p.annotationLabels[S.type[y].replace("_fold","")].singular,"' role=img> </span> ").concat(S.text[y]);C[S.type[y].replace("_fold","")].push(I)}var R=[].concat(C.error,C.warning,C.info).join("<br>");this.setHtml(R),this.setClassName("ace_gutter-tooltip"),this.$element.setAttribute("aria-live","polite"),this.isOpen||this.setTheme(this.editor.renderer.theme),this.editor._signal("showGutterTooltip",this),this.show()},p.annotationsToSummaryString=function(g){var b,x,S=[],T=["error","warning","info"];try{for(var v=s(T),w=v.next();!w.done;w=v.next()){var y=w.value;if(g[y].length){var m=g[y].length===1?p.annotationLabels[y].singular:p.annotationLabels[y].plural;S.push("".concat(g[y].length," ").concat(m))}}}catch(E){b={error:E}}finally{try{w&&!w.done&&(x=v.return)&&x.call(v)}finally{if(b)throw b.error}}return S.join(", ")},p}(c);r.GutterTooltip=h}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,i){var o=n("../lib/event"),s=n("../lib/useragent"),d=function(){function a(c,l){this.domEvent=c,this.editor=l,this.x=this.clientX=c.clientX,this.y=this.clientY=c.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){o.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){o.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var c=this.editor,l=c.getSelectionRange();if(l.isEmpty())this.$inSelection=!1;else{var u=this.getDocumentPosition();this.$inSelection=l.contains(u.row,u.column)}return this.$inSelection},a.prototype.getButton=function(){return o.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return s.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();r.MouseEvent=d}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,i){var o=n("../lib/dom"),s=n("../lib/event"),d=n("../lib/useragent"),a=200,c=200,l=5;function u(f){var p=f.editor,g=o.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent=" ";var b=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];b.forEach(function(Y){f[Y]=this[Y]},this),p.on("mousedown",this.onMouseDown.bind(f));var x=p.container,S,T,v,w,y,m,E=0,A,C,k,I,R;this.onDragStart=function(Y){if(this.cancelDrag||!x.draggable){var Z=this;return setTimeout(function(){Z.startSelect(),Z.captureMouse(Y)},0),Y.preventDefault()}y=p.getSelectionRange();var te=Y.dataTransfer;te.effectAllowed=p.getReadOnly()?"copy":"copyMove",p.container.appendChild(g),te.setDragImage&&te.setDragImage(g,0,0),setTimeout(function(){p.container.removeChild(g)}),te.clearData(),te.setData("Text",p.session.getTextRange()),C=!0,this.setState("drag")},this.onDragEnd=function(Y){if(x.draggable=!1,C=!1,this.setState(null),!p.getReadOnly()){var Z=Y.dataTransfer.dropEffect;!A&&Z=="move"&&p.session.remove(p.getSelectionRange()),p.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(Y){if(!(p.getReadOnly()||!q(Y.dataTransfer)))return T=Y.clientX,v=Y.clientY,S||N(),E++,Y.dataTransfer.dropEffect=A=re(Y),s.preventDefault(Y)},this.onDragOver=function(Y){if(!(p.getReadOnly()||!q(Y.dataTransfer)))return T=Y.clientX,v=Y.clientY,S||(N(),E++),W!==null&&(W=null),Y.dataTransfer.dropEffect=A=re(Y),s.preventDefault(Y)},this.onDragLeave=function(Y){if(E--,E<=0&&S)return B(),A=null,s.preventDefault(Y)},this.onDrop=function(Y){if(m){var Z=Y.dataTransfer;if(C)switch(A){case"move":y.contains(m.row,m.column)?y={start:m,end:m}:y=p.moveText(y,m);break;case"copy":y=p.moveText(y,m,!0);break}else{var te=Z.getData("Text");y={start:m,end:p.session.insert(m,te)},p.focus(),A=null}return B(),s.preventDefault(Y)}},s.addListener(x,"dragstart",this.onDragStart.bind(f),p),s.addListener(x,"dragend",this.onDragEnd.bind(f),p),s.addListener(x,"dragenter",this.onDragEnter.bind(f),p),s.addListener(x,"dragover",this.onDragOver.bind(f),p),s.addListener(x,"dragleave",this.onDragLeave.bind(f),p),s.addListener(x,"drop",this.onDrop.bind(f),p);function M(Y,Z){var te=Date.now(),ie=!Z||Y.row!=Z.row,ce=!Z||Y.column!=Z.column;if(!I||ie||ce)p.moveCursorToPosition(Y),I=te,R={x:T,y:v};else{var he=h(R.x,R.y,T,v);he>l?I=null:te-I>=c&&(p.renderer.scrollCursorIntoView(),I=null)}}function O(Y,Z){var te=Date.now(),ie=p.renderer.layerConfig.lineHeight,ce=p.renderer.layerConfig.characterWidth,he=p.renderer.scroller.getBoundingClientRect(),ve={x:{left:T-he.left,right:he.right-T},y:{top:v-he.top,bottom:he.bottom-v}},Ce=Math.min(ve.x.left,ve.x.right),_e=Math.min(ve.y.top,ve.y.bottom),Re={row:Y.row,column:Y.column};Ce/ce<=2&&(Re.column+=ve.x.left<ve.x.right?-3:2),_e/ie<=1&&(Re.row+=ve.y.top<ve.y.bottom?-1:1);var ot=Y.row!=Re.row,Te=Y.column!=Re.column,it=!Z||Y.row!=Z.row;ot||Te&&!it?k?te-k>=a&&p.renderer.scrollCursorIntoView(Re):k=te:k=null}function P(){var Y=m;m=p.renderer.screenToTextCoordinates(T,v),M(m,Y),O(m,Y)}function N(){y=p.selection.toOrientedRange(),S=p.session.addMarker(y,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),P(),w=setInterval(P,20),E=0,s.addListener(document,"mousemove",K)}function B(){clearInterval(w),p.session.removeMarker(S),S=null,p.selection.fromOrientedRange(y),p.isFocused()&&!C&&p.$resetCursorStyle(),y=null,m=null,E=0,k=null,I=null,s.removeListener(document,"mousemove",K)}var W=null;function K(){W==null&&(W=setTimeout(function(){W!=null&&S&&B()},20))}function q(Y){var Z=Y.types;return!Z||Array.prototype.some.call(Z,function(te){return te=="text/plain"||te=="Text"})}function re(Y){var Z=["copy","copymove","all","uninitialized"],te=["move","copymove","linkmove","all","uninitialized"],ie=d.isMac?Y.altKey:Y.ctrlKey,ce="uninitialized";try{ce=Y.dataTransfer.effectAllowed.toLowerCase()}catch{}var he="none";return ie&&Z.indexOf(ce)>=0?he="copy":te.indexOf(ce)>=0?he="move":Z.indexOf(ce)>=0&&(he="copy"),he}}(function(){this.dragWait=function(){var f=Date.now()-this.mousedownEvent.time;f>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var f=this.editor.container;f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(f){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var f=this.editor,p=f.container;p.draggable=!0,f.renderer.$cursorLayer.setBlinking(!1),f.setStyle("ace_dragging");var g=d.isWin?"default":"move";f.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(f){var p=this.editor.container;if(d.isIE&&this.state=="dragReady"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&p.dragDrop()}if(this.state==="dragWait"){var g=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(f){if(this.$dragEnabled){this.mousedownEvent=f;var p=this.editor,g=f.inSelection(),b=f.getButton(),x=f.domEvent.detail||1;if(x===1&&b===0&&g){if(f.editor.inMultiSelectMode&&(f.getAccelKey()||f.getShiftKey()))return;this.mousedownEvent.time=Date.now();var S=f.domEvent.target||f.domEvent.srcElement;if("unselectable"in S&&(S.unselectable="on"),p.getDragDelay()){if(d.isWebKit){this.cancelDrag=!0;var T=p.container;T.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(f,this.onMouseDrag.bind(this)),f.defaultPrevented=!0}}}}).call(u.prototype);function h(f,p,g,b){return Math.sqrt(Math.pow(g-f,2)+Math.pow(b-p,2))}r.DragdropHandler=u}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,i){var o=n("./mouse_event").MouseEvent,s=n("../lib/event"),d=n("../lib/dom");r.addTouchListeners=function(a,c){var l="scroll",u,h,f,p,g,b,x=0,S,T=0,v=0,w=0,y,m;function E(){var M=window.navigator&&window.navigator.clipboard,O=!1,P=function(){var B=c.getCopyText(),W=c.session.getUndoManager().hasUndo();m.replaceChild(d.buildDom(O?["span",!B&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],B&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],B&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],M&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],W&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),m.firstChild)},N=function(B){var W=B.target.getAttribute("action");if(W=="more"||!O)return O=!O,P();W=="paste"?M.readText().then(function(K){c.execCommand(W,K)}):W&&((W=="cut"||W=="copy")&&(M?M.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(W)),m.firstChild.style.display="none",O=!1,W!="openCommandPallete"&&c.focus()};m=d.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(B){l="menu",B.stopPropagation(),B.preventDefault(),c.textInput.focus()},ontouchend:function(B){B.stopPropagation(),B.preventDefault(),N(B)},onclick:N},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function A(){m||E();var M=c.selection.cursor,O=c.renderer.textToScreenCoordinates(M.row,M.column),P=c.renderer.textToScreenCoordinates(0,0).pageX,N=c.renderer.scrollLeft,B=c.container.getBoundingClientRect();m.style.top=O.pageY-B.top-3+"px",O.pageX-B.left<B.width-70?(m.style.left="",m.style.right="10px"):(m.style.right="",m.style.left=P+N-B.left+"px"),m.style.display="",m.firstChild.style.display="none",c.on("input",C)}function C(M){m&&(m.style.display="none"),c.off("input",C)}function k(){g=null,clearTimeout(g);var M=c.selection.getRange(),O=M.contains(S.row,S.column);(M.isEmpty()||!O)&&(c.selection.moveToPosition(S),c.selection.selectWord()),l="wait",A()}function I(){g=null,clearTimeout(g),c.selection.moveToPosition(S);var M=T>=2?c.selection.getLineRange(S.row):c.session.getBracketRange(S);M&&!M.isEmpty()?c.selection.setRange(M):c.selection.selectWord(),l="wait"}s.addListener(a,"contextmenu",function(M){if(y){var O=c.textInput.getElement();O.focus()}},c),s.addListener(a,"touchstart",function(M){var O=M.touches;if(g||O.length>1){clearTimeout(g),g=null,f=-1,l="zoom";return}y=c.$mouseHandler.isMousePressed=!0;var P=c.renderer.layerConfig.lineHeight,N=c.renderer.layerConfig.lineHeight,B=M.timeStamp;p=B;var W=O[0],K=W.clientX,q=W.clientY;Math.abs(u-K)+Math.abs(h-q)>P&&(f=-1),u=M.clientX=K,h=M.clientY=q,v=w=0;var re=new o(M,c);if(S=re.getDocumentPosition(),B-f<500&&O.length==1&&!x)T++,M.preventDefault(),M.button=0,I();else{T=0;var Y=c.selection.cursor,Z=c.selection.isEmpty()?Y:c.selection.anchor,te=c.renderer.$cursorLayer.getPixelPosition(Y,!0),ie=c.renderer.$cursorLayer.getPixelPosition(Z,!0),ce=c.renderer.scroller.getBoundingClientRect(),he=c.renderer.layerConfig.offset,ve=c.renderer.scrollLeft,Ce=function(ot,Te){return ot=ot/N,Te=Te/P-.75,ot*ot+Te*Te};if(M.clientX<ce.left){l="zoom";return}var _e=Ce(M.clientX-ce.left-te.left+ve,M.clientY-ce.top-te.top+he),Re=Ce(M.clientX-ce.left-ie.left+ve,M.clientY-ce.top-ie.top+he);_e<3.5&&Re<3.5&&(l=_e>Re?"cursor":"anchor"),Re<3.5?l="anchor":_e<3.5?l="cursor":l="scroll",g=setTimeout(k,450)}f=B},c),s.addListener(a,"touchend",function(M){y=c.$mouseHandler.isMousePressed=!1,b&&clearInterval(b),l=="zoom"?(l="",x=0):g?(c.selection.moveToPosition(S),x=0,A()):l=="scroll"?(R(),C()):A(),clearTimeout(g),g=null},c),s.addListener(a,"touchmove",function(M){g&&(clearTimeout(g),g=null);var O=M.touches;if(!(O.length>1||l=="zoom")){var P=O[0],N=u-P.clientX,B=h-P.clientY;if(l=="wait")if(N*N+B*B>4)l="cursor";else return M.preventDefault();u=P.clientX,h=P.clientY,M.clientX=P.clientX,M.clientY=P.clientY;var W=M.timeStamp,K=W-p;if(p=W,l=="scroll"){var q=new o(M,c);q.speed=1,q.wheelX=N,q.wheelY=B,10*Math.abs(N)<Math.abs(B)&&(N=0),10*Math.abs(B)<Math.abs(N)&&(B=0),K!=0&&(v=N/K,w=B/K),c._emit("mousewheel",q),q.propagationStopped||(v=w=0)}else{var re=new o(M,c),Y=re.getDocumentPosition();l=="cursor"?c.selection.moveCursorToPosition(Y):l=="anchor"&&c.selection.setSelectionAnchor(Y.row,Y.column),c.renderer.scrollCursorIntoView(Y),M.preventDefault()}}},c);function R(){x+=60,b=setInterval(function(){x--<=0&&(clearInterval(b),b=null),Math.abs(v)<.01&&(v=0),Math.abs(w)<.01&&(w=0),x<20&&(v=.9*v),x<20&&(w=.9*w);var M=c.session.getScrollTop();c.renderer.scrollBy(10*v,10*w),M==c.session.getScrollTop()&&(x=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(n,r,i){var o=n("../lib/event"),s=n("../lib/useragent"),d=n("./default_handlers").DefaultHandlers,a=n("./default_gutter_handler").GutterHandler,c=n("./mouse_event").MouseEvent,l=n("./dragdrop_handler").DragdropHandler,u=n("./touch_handler").addTouchListeners,h=n("../config"),f=function(){function p(g){var b=this;this.editor=g,new d(this),new a(this),new l(this);var x=function(v){var w=!document.hasFocus||!document.hasFocus()||!g.isFocused()&&document.activeElement==(g.textInput&&g.textInput.getElement());w&&window.focus(),g.focus(),setTimeout(function(){g.isFocused()||g.focus()})},S=g.renderer.getMouseEventTarget();o.addListener(S,"click",this.onMouseEvent.bind(this,"click"),g),o.addListener(S,"mousemove",this.onMouseMove.bind(this,"mousemove"),g),o.addMultiMouseDownListener([S,g.renderer.scrollBarV&&g.renderer.scrollBarV.inner,g.renderer.scrollBarH&&g.renderer.scrollBarH.inner,g.textInput&&g.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",g),o.addMouseWheelListener(g.container,this.onMouseWheel.bind(this,"mousewheel"),g),u(g.container,g);var T=g.renderer.$gutter;o.addListener(T,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),g),o.addListener(T,"click",this.onMouseEvent.bind(this,"gutterclick"),g),o.addListener(T,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),g),o.addListener(T,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),g),o.addListener(S,"mousedown",x,g),o.addListener(T,"mousedown",x,g),s.isIE&&g.renderer.scrollBarV&&(o.addListener(g.renderer.scrollBarV.element,"mousedown",x,g),o.addListener(g.renderer.scrollBarH.element,"mousedown",x,g)),g.on("mousemove",function(v){if(!(b.state||b.$dragDelay||!b.$dragEnabled)){var w=g.renderer.screenToTextCoordinates(v.x,v.y),y=g.session.selection.getRange(),m=g.renderer;!y.isEmpty()&&y.insideStart(w.row,w.column)?m.setCursorStyle("default"):m.setCursorStyle("")}},g)}return p.prototype.onMouseEvent=function(g,b){this.editor.session&&this.editor._emit(g,new c(b,this.editor))},p.prototype.onMouseMove=function(g,b){var x=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!x||!x.length||this.editor._emit(g,new c(b,this.editor))},p.prototype.onMouseWheel=function(g,b){var x=new c(b,this.editor);x.speed=this.$scrollSpeed*2,x.wheelX=b.wheelX,x.wheelY=b.wheelY,this.editor._emit(g,x)},p.prototype.setState=function(g){this.state=g},p.prototype.captureMouse=function(g,b){this.x=g.x,this.y=g.y,this.isMousePressed=!0;var x=this.editor,S=this.editor.renderer;S.$isMousePressed=!0;var T=this,v=function(A){if(A){if(s.isWebKit&&!A.which&&T.releaseMouse)return T.releaseMouse();T.x=A.clientX,T.y=A.clientY,b&&b(A),T.mouseEvent=new c(A,T.editor),T.$mouseMoved=!0}},w=function(A){x.off("beforeEndOperation",m),clearInterval(E),x.session&&y(),T[T.state+"End"]&&T[T.state+"End"](A),T.state="",T.isMousePressed=S.$isMousePressed=!1,S.$keepTextAreaAtCursor&&S.$moveTextAreaToCursor(),T.$onCaptureMouseMove=T.releaseMouse=null,A&&T.onMouseEvent("mouseup",A),x.endOperation()},y=function(){T[T.state]&&T[T.state](),T.$mouseMoved=!1};if(s.isOldIE&&g.domEvent.type=="dblclick")return setTimeout(function(){w(g)});var m=function(A){T.releaseMouse&&x.curOp.command.name&&x.curOp.selectionChanged&&(T[T.state+"End"]&&T[T.state+"End"](),T.state="",T.releaseMouse())};x.on("beforeEndOperation",m),x.startOperation({command:{name:"mouse"}}),T.$onCaptureMouseMove=v,T.releaseMouse=o.capture(this.editor.container,v,w);var E=setInterval(y,20)},p.prototype.cancelContextMenu=function(){var g=function(b){b&&b.domEvent&&b.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",g),b&&b.domEvent&&o.stopEvent(b.domEvent))}.bind(this);setTimeout(g,10),this.editor.on("nativecontextmenu",g)},p.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},p}();f.prototype.releaseMouse=null,h.defineOptions(f.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:s.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=f}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("../lib/dom"),s=function(){function d(a){a.on("click",function(c){var l=c.getDocumentPosition(),u=a.session,h=u.getFoldAt(l.row,l.column,1);h&&(c.getAccelKey()?u.removeFold(h):u.expandFold(h),c.stop());var f=c.domEvent&&c.domEvent.target;f&&o.hasCssClass(f,"ace_inline_button")&&o.hasCssClass(f,"ace_toggle_wrap")&&(u.setOption("wrap",!u.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(c){var l=a.renderer.$gutterLayer.getRegion(c);if(l=="foldWidgets"){var u=c.getDocumentPosition().row,h=a.session;h.foldWidgets&&h.foldWidgets[u]&&a.session.onFoldWidgetClick(u,c),a.isFocused()||a.focus(),c.stop()}}),a.on("gutterdblclick",function(c){var l=a.renderer.$gutterLayer.getRegion(c);if(l=="foldWidgets"){var u=c.getDocumentPosition().row,h=a.session,f=h.getParentFoldRangeData(u,!0),p=f.range||f.firstRange;if(p){u=p.start.row;var g=h.getFoldAt(u,h.getLine(u).length,1);g?h.removeFold(g):(h.addFold("...",p),a.renderer.scrollCursorIntoView({row:p.start.row,column:0}))}c.stop()}})}return d}();r.FoldHandler=s}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,i){var o=n("../lib/keys"),s=n("../lib/event"),d=function(){function a(c){this.$editor=c,this.$data={editor:c},this.$handlers=[],this.setDefaultHandler(c.commands)}return a.prototype.setDefaultHandler=function(c){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=c,this.addKeyboardHandler(c,0)},a.prototype.setKeyboardHandler=function(c){var l=this.$handlers;if(l[l.length-1]!=c){for(;l[l.length-1]&&l[l.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(l[l.length-1]);this.addKeyboardHandler(c,1)}},a.prototype.addKeyboardHandler=function(c,l){if(c){typeof c=="function"&&!c.handleKeyboard&&(c.handleKeyboard=c);var u=this.$handlers.indexOf(c);u!=-1&&this.$handlers.splice(u,1),l==null?this.$handlers.push(c):this.$handlers.splice(l,0,c),u==-1&&c.attach&&c.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(c){var l=this.$handlers.indexOf(c);return l==-1?!1:(this.$handlers.splice(l,1),c.detach&&c.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var c=this.$data,l=c.editor;return this.$handlers.map(function(u){return u.getStatusText&&u.getStatusText(l,c)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(c,l,u,h){for(var f,p=!1,g=this.$editor.commands,b=this.$handlers.length;b--&&(f=this.$handlers[b].handleKeyboard(this.$data,c,l,u,h),!(!(!f||!f.command)&&(f.command=="null"?p=!0:p=g.exec(f.command,this.$editor,f.args,h),p&&h&&c!=-1&&f.passEvent!=!0&&f.command.passEvent!=!0&&s.stopEvent(h),p))););return!p&&c==-1&&(f={command:"insertstring"},p=g.exec("insertstring",this.$editor,l)),p&&this.$editor._signal&&this.$editor._signal("keyboardActivity",f),p},a.prototype.onCommandKey=function(c,l,u){var h=o.keyCodeToString(u);return this.$callKeyboardHandlers(l,h,u,c)},a.prototype.onTextInput=function(c){return this.$callKeyboardHandlers(-1,c)},a}();r.KeyBinding=d}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,i){var o=0,s=0,d=!1,a=!1,c=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],u=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h=0,f=1,p=0,g=1,b=2,x=3,S=4,T=5,v=6,w=7,y=8,m=9,E=10,A=11,C=12,k=13,I=14,R=15,M=16,O=17,P=18,N=[P,P,P,P,P,P,P,P,P,v,T,v,y,T,P,P,P,P,P,P,P,P,P,P,P,P,P,P,T,T,T,v,y,S,S,A,A,A,S,S,S,S,S,E,m,E,m,m,b,b,b,b,b,b,b,b,b,b,m,S,S,S,S,S,S,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,S,S,S,S,S,S,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,S,S,S,S,P,P,P,P,P,P,T,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,m,S,A,A,A,A,S,S,S,S,p,S,S,P,S,S,A,A,b,b,S,p,S,S,S,b,p,S,S,S,S,S],B=[y,y,y,y,y,y,y,y,y,y,y,P,P,P,p,g,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,y,T,k,I,R,M,O,m,A,A,A,A,A,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,m,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,y];function W(Y,Z,te,ie){var ce=o?u:l,he=null,ve=null,Ce=null,_e=0,Re=null,ot=null,Te=-1,it=null,vt=null,Qt=[];if(!ie)for(it=0,ie=[];it<te;it++)ie[it]=re(Y[it]);for(s=o,d=!1,a=!1,c=!1,vt=0;vt<te;vt++){if(he=_e,Qt[vt]=ve=q(Y,ie,Qt,vt),_e=ce[he][ve],Re=_e&240,_e&=15,Z[vt]=Ce=ce[_e][5],Re>0)if(Re==16){for(it=Te;it<vt;it++)Z[it]=1;Te=-1}else Te=-1;if(ot=ce[_e][6],ot)Te==-1&&(Te=vt);else if(Te>-1){for(it=Te;it<vt;it++)Z[it]=Ce;Te=-1}ie[vt]==T&&(Z[vt]=0),s|=Ce}if(c){for(it=0;it<te;it++)if(ie[it]==v){Z[it]=o;for(var Ut=it-1;Ut>=0&&ie[Ut]==y;Ut--)Z[Ut]=o}}}function K(Y,Z,te){if(!(s<Y)){if(Y==1&&o==f&&!a){te.reverse();return}for(var ie=te.length,ce=0,he,ve,Ce,_e;ce<ie;){if(Z[ce]>=Y){for(he=ce+1;he<ie&&Z[he]>=Y;)he++;for(ve=ce,Ce=he-1;ve<Ce;ve++,Ce--)_e=te[ve],te[ve]=te[Ce],te[Ce]=_e;ce=he}ce++}}}function q(Y,Z,te,ie){var ce=Z[ie],he,ve,Ce,_e;switch(ce){case p:case g:d=!1;case S:case x:return ce;case b:return d?x:b;case w:return d=!0,g;case y:return S;case m:return ie<1||ie+1>=Z.length||(he=te[ie-1])!=b&&he!=x||(ve=Z[ie+1])!=b&&ve!=x?S:(d&&(ve=x),ve==he?ve:S);case E:return he=ie>0?te[ie-1]:T,he==b&&ie+1<Z.length&&Z[ie+1]==b?b:S;case A:if(ie>0&&te[ie-1]==b)return b;if(d)return S;for(_e=ie+1,Ce=Z.length;_e<Ce&&Z[_e]==A;)_e++;return _e<Ce&&Z[_e]==b?b:S;case C:for(Ce=Z.length,_e=ie+1;_e<Ce&&Z[_e]==C;)_e++;if(_e<Ce){var Re=Y[ie],ot=Re>=1425&&Re<=2303||Re==64286;if(he=Z[_e],ot&&(he==g||he==w))return g}return ie<1||(he=Z[ie-1])==T?S:te[ie-1];case T:return d=!1,a=!0,o;case v:return c=!0,S;case k:case I:case M:case O:case R:d=!1;case P:return S}}function re(Y){var Z=Y.charCodeAt(0),te=Z>>8;return te==0?Z>191?p:N[Z]:te==5?/[\u0591-\u05f4]/.test(Y)?g:p:te==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(Y)?C:/[\u0660-\u0669\u066b-\u066c]/.test(Y)?x:Z==1642?A:/[\u06f0-\u06f9]/.test(Y)?b:w:te==32&&Z<=8287?B[Z&255]:te==254&&Z>=65136?w:S}r.L=p,r.R=g,r.EN=b,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(Y,Z,te){if(Y.length<2)return{};var ie=Y.split(""),ce=new Array(ie.length),he=new Array(ie.length),ve=[];o=te?f:h,W(ie,ve,ie.length,Z);for(var Ce=0;Ce<ce.length;ce[Ce]=Ce,Ce++);K(2,ve,ce),K(1,ve,ce);for(var Ce=0;Ce<ce.length-1;Ce++)Z[Ce]===x?ve[Ce]=r.AN:ve[Ce]===g&&(Z[Ce]>w&&Z[Ce]<k||Z[Ce]===S||Z[Ce]===P)?ve[Ce]=r.ON_R:Ce>0&&ie[Ce-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ie[Ce])&&(ve[Ce-1]=ve[Ce]=r.R_H,Ce++);ie[ie.length-1]===r.DOT&&(ve[ie.length-1]=r.B),ie[0]===""&&(ve[0]=r.RLE);for(var Ce=0;Ce<ce.length;Ce++)he[Ce]=ve[ce[Ce]];return{logicalFromVisual:ce,bidiLevels:he}},r.hasBidiCharacters=function(Y,Z){for(var te=!1,ie=0;ie<Y.length;ie++)Z[ie]=re(Y.charAt(ie)),!te&&(Z[ie]==g||Z[ie]==w||Z[ie]==x)&&(te=!0);return te},r.getVisualFromLogicalIdx=function(Y,Z){for(var te=0;te<Z.logicalFromVisual.length;te++)if(Z.logicalFromVisual[te]==Y)return te;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,r,i){var o=n("./lib/bidiutil"),s=n("./lib/lang"),d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function c(l){this.session=l,this.bidiMap={},this.currentRow=null,this.bidiUtil=o,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=d.test(l.getValue())}return c.prototype.isBidiRow=function(l,u,h){return this.seenBidi?(l!==this.currentRow&&(this.currentRow=l,this.updateRowLine(u,h),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},c.prototype.onChange=function(l){this.seenBidi?this.currentRow=null:l.action=="insert"&&d.test(l.lines.join(`
|
||
`))&&(this.seenBidi=!0,this.currentRow=null)},c.prototype.getDocumentRow=function(){var l=0,u=this.session.$screenRowCache;if(u.length){var h=this.session.$getRowCacheIndex(u,this.currentRow);h>=0&&(l=this.session.$docRowCache[h])}return l},c.prototype.getSplitIndex=function(){var l=0,u=this.session.$screenRowCache;if(u.length)for(var h,f=this.session.$getRowCacheIndex(u,this.currentRow);this.currentRow-l>0&&(h=this.session.$getRowCacheIndex(u,this.currentRow-l-1),h===f);)f=h,l++;else l=this.currentRow;return l},c.prototype.updateRowLine=function(l,u){l===void 0&&(l=this.getDocumentRow());var h=l===this.session.getLength()-1,f=h?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(l),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[l];p&&(u===void 0&&(u=this.getSplitIndex()),u>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[o.L],this.line=u<p.length?this.line.substring(p[u-1],p[u]):this.line.substring(p[p.length-1])):this.line=this.line.substring(0,p[u]),u==p.length&&(this.line+=this.showInvisibles?f:o.DOT))}else this.line+=this.showInvisibles?f:o.DOT;var g=this.session,b=0,x;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(S,T){return S===" "||g.isFullWidth(S.charCodeAt(0))?(x=S===" "?g.getScreenTabSize(T+b):2,b+=x-1,s.stringRepeat(o.DOT,x)):S}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==o.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},c.prototype.updateBidiMap=function(){var l=[];o.hasBidiCharacters(this.line,l)||this.isRtlDir?this.bidiMap=o.doBidiReorder(this.line,l,this.isRtlDir):this.bidiMap={}},c.prototype.markAsDirty=function(){this.currentRow=null},c.prototype.updateCharacterWidths=function(l){if(this.characterWidth!==l.$characterSize.width){this.fontMetrics=l;var u=this.characterWidth=l.$characterSize.width,h=l.$measureCharWidth("ה");this.charWidths[o.L]=this.charWidths[o.EN]=this.charWidths[o.ON_R]=u,this.charWidths[o.R]=this.charWidths[o.AN]=h,this.charWidths[o.R_H]=h*.45,this.charWidths[o.B]=this.charWidths[o.RLE]=0,this.currentRow=null}},c.prototype.setShowInvisibles=function(l){this.showInvisibles=l,this.currentRow=null},c.prototype.setEolChar=function(l){this.EOL=l},c.prototype.setContentWidth=function(l){this.contentWidth=l},c.prototype.isRtlLine=function(l){return this.$isRtl?!0:l!=null?this.session.getLine(l).charAt(0)==this.RLE:this.isRtlDir},c.prototype.setRtlDirection=function(l,u){for(var h=l.getCursorPosition(),f=l.selection.getSelectionAnchor().row;f<=h.row;f++)!u&&l.session.getLine(f).charAt(0)===l.session.$bidiHandler.RLE?l.session.doc.removeInLine(f,0,1):u&&l.session.getLine(f).charAt(0)!==l.session.$bidiHandler.RLE&&l.session.doc.insert({column:0,row:f},l.session.$bidiHandler.RLE)},c.prototype.getPosLeft=function(l){l-=this.wrapIndent;var u=this.line.charAt(0)===this.RLE?1:0,h=l>u?this.session.getOverwrite()?l:l-1:u,f=o.getVisualFromLogicalIdx(h,this.bidiMap),p=this.bidiMap.bidiLevels,g=0;!this.session.getOverwrite()&&l<=u&&p[f]%2!==0&&f++;for(var b=0;b<f;b++)g+=this.charWidths[p[b]];return!this.session.getOverwrite()&&l>u&&p[f]%2===0&&(g+=this.charWidths[p[f]]),this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(g+=this.rtlLineOffset),g},c.prototype.getSelections=function(l,u){var h=this.bidiMap,f=h.bidiLevels,p,g=[],b=0,x=Math.min(l,u)-this.wrapIndent,S=Math.max(l,u)-this.wrapIndent,T=!1,v=!1,w=0;this.wrapIndent&&(b+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var y,m=0;m<f.length;m++)y=h.logicalFromVisual[m],p=f[m],T=y>=x&&y<S,T&&!v?w=b:!T&&v&&g.push({left:w,width:b-w}),b+=this.charWidths[p],v=T;if(T&&m===f.length&&g.push({left:w,width:b-w}),this.isRtlDir)for(var E=0;E<g.length;E++)g[E].left+=this.rtlLineOffset;return g},c.prototype.offsetToCol=function(h){this.isRtlDir&&(h-=this.rtlLineOffset);var u=0,h=Math.max(h,0),f=0,p=0,g=this.bidiMap.bidiLevels,b=this.charWidths[g[p]];for(this.wrapIndent&&(h-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);h>f+b/2;){if(f+=b,p===g.length-1){b=0;break}b=this.charWidths[g[++p]]}return p>0&&g[p-1]%2!==0&&g[p]%2===0?(h<f&&p--,u=this.bidiMap.logicalFromVisual[p]):p>0&&g[p-1]%2===0&&g[p]%2!==0?u=1+(h>f?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===g.length-1&&b===0&&g[p-1]%2===0||!this.isRtlDir&&p===0&&g[p]%2!==0?u=1+this.bidiMap.logicalFromVisual[p]:(p>0&&g[p-1]%2!==0&&b!==0&&p--,u=this.bidiMap.logicalFromVisual[p]),u===0&&this.isRtlDir&&u++,u+this.wrapIndent},c}();r.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,i){var o=n("./lib/oop"),s=n("./lib/lang"),d=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,c=function(l){this.session=l,this.doc=l.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(h){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&h.old.column!=h.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})};(function(){o.implement(this,d),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setAnchor=function(l,u){this.$isEmpty=!1,this.anchor.setPosition(l,u)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var l=this.anchor,u=this.lead;return l.row>u.row||l.row==u.row&&l.column>u.column},this.getRange=function(){var l=this.anchor,u=this.lead;return this.$isEmpty?a.fromPoints(u,u):this.isBackwards()?a.fromPoints(u,l):a.fromPoints(l,u)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(l,u){var h=u?l.end:l.start,f=u?l.start:l.end;this.$setSelection(h.row,h.column,f.row,f.column)},this.$setSelection=function(l,u,h,f){if(!this.$silent){var p=this.$isEmpty,g=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(l,u),this.cursor.setPosition(h,f),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||p!=this.$isEmpty||g)&&this._emit("changeSelection")}},this.$moveSelection=function(l){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),l.call(this)},this.selectTo=function(l,u){this.$moveSelection(function(){this.moveCursorTo(l,u)})},this.selectToPosition=function(l){this.$moveSelection(function(){this.moveCursorToPosition(l)})},this.moveTo=function(l,u){this.clearSelection(),this.moveCursorTo(l,u)},this.moveToPosition=function(l){this.clearSelection(),this.moveCursorToPosition(l)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(l,u){if(typeof u>"u"){var h=l||this.lead;l=h.row,u=h.column}return this.session.getWordRange(l,u)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var l=this.getCursor(),u=this.session.getAWordRange(l.row,l.column);this.setSelectionRange(u)},this.getLineRange=function(l,u){var h=typeof l=="number"?l:this.lead.row,f,p=this.session.getFoldLine(h);return p?(h=p.start.row,f=p.end.row):f=h,u===!0?new a(h,0,f,this.session.getLine(f).length):new a(h,0,f+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(l,u,h){var f=l.column,p=l.column+u;return h<0&&(f=l.column-u,p=l.column),this.session.isTabStop(l)&&this.doc.getLine(l.row).slice(f,p).split(" ").length-1==u},this.moveCursorLeft=function(){var l=this.lead.getPosition(),u;if(u=this.session.getFoldAt(l.row,l.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(l.column===0)l.row>0&&this.moveCursorTo(l.row-1,this.doc.getLine(l.row-1).length);else{var h=this.session.getTabSize();this.wouldMoveIntoSoftTab(l,h,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-h):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var l=this.lead.getPosition(),u;if(u=this.session.getFoldAt(l.row,l.column,1))this.moveCursorTo(u.end.row,u.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var h=this.session.getTabSize(),l=this.lead;this.wouldMoveIntoSoftTab(l,h,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,h):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var l=this.lead.row,u=this.lead.column,h=this.session.documentToScreenRow(l,u),f=this.session.screenToDocumentPosition(h,0),p=this.session.getDisplayLine(l,null,f.row,f.column),g=p.match(/^\s*/);g[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(f.column+=g[0].length),this.moveCursorToPosition(f)},this.moveCursorLineEnd=function(){var l=this.lead,u=this.session.getDocumentLastRowColumnPosition(l.row,l.column);if(this.lead.column==u.column){var h=this.session.getLine(u.row);if(u.column==h.length){var f=h.search(/\s+$/);f>0&&(u.column=f)}}this.moveCursorTo(u.row,u.column)},this.moveCursorFileEnd=function(){var l=this.doc.getLength()-1,u=this.doc.getLine(l).length;this.moveCursorTo(l,u)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var l=this.lead.row,u=this.lead.column,h=this.doc.getLine(l),f=h.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var p=this.session.getFoldAt(l,u,1);if(p){this.moveCursorTo(p.end.row,p.end.column);return}if(this.session.nonTokenRe.exec(f)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,f=h.substring(u)),u>=h.length){this.moveCursorTo(l,h.length),this.moveCursorRight(),l<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(f)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,u)},this.moveCursorLongWordLeft=function(){var l=this.lead.row,u=this.lead.column,h;if(h=this.session.getFoldAt(l,u,-1)){this.moveCursorTo(h.start.row,h.start.column);return}var f=this.session.getFoldStringAt(l,u,-1);f==null&&(f=this.doc.getLine(l).substring(0,u));var p=s.stringReverse(f);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(p)&&(u-=this.session.nonTokenRe.lastIndex,p=p.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(l,0),this.moveCursorLeft(),l>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(p)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,u)},this.$shortWordEndIndex=function(l){var u=0,h,f=/\s/,p=this.session.tokenRe;if(p.lastIndex=0,this.session.tokenRe.exec(l))u=this.session.tokenRe.lastIndex;else{for(;(h=l[u])&&f.test(h);)u++;if(u<1){for(p.lastIndex=0;(h=l[u])&&!p.test(h);)if(p.lastIndex=0,u++,f.test(h))if(u>2){u--;break}else{for(;(h=l[u])&&f.test(h);)u++;if(u>2)break}}}return p.lastIndex=0,u},this.moveCursorShortWordRight=function(){var l=this.lead.row,u=this.lead.column,h=this.doc.getLine(l),f=h.substring(u),p=this.session.getFoldAt(l,u,1);if(p)return this.moveCursorTo(p.end.row,p.end.column);if(u==h.length){var g=this.doc.getLength();do l++,f=this.doc.getLine(l);while(l<g&&/^\s*$/.test(f));/^\s+/.test(f)||(f=""),u=0}var b=this.$shortWordEndIndex(f);this.moveCursorTo(l,u+b)},this.moveCursorShortWordLeft=function(){var l=this.lead.row,u=this.lead.column,h;if(h=this.session.getFoldAt(l,u,-1))return this.moveCursorTo(h.start.row,h.start.column);var f=this.session.getLine(l).substring(0,u);if(u===0){do l--,f=this.doc.getLine(l);while(l>0&&/^\s*$/.test(f));u=f.length,/\s+$/.test(f)||(f="")}var p=s.stringReverse(f),g=this.$shortWordEndIndex(p);return this.moveCursorTo(l,u-g)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(l,u){var h=this.session.documentToScreenPosition(this.lead.row,this.lead.column),f;if(u===0&&(l!==0&&(this.session.$bidiHandler.isBidiRow(h.row,this.lead.row)?(f=this.session.$bidiHandler.getPosLeft(h.column),h.column=Math.round(f/this.session.$bidiHandler.charWidths[0])):f=h.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?h.column=this.$desiredColumn:this.$desiredColumn=h.column),l!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var p=this.session.lineWidgets[this.lead.row];l<0?l-=p.rowsAbove||0:l>0&&(l+=p.rowCount-(p.rowsAbove||0))}var g=this.session.screenToDocumentPosition(h.row+l,h.column,f);l!==0&&u===0&&g.row===this.lead.row&&(g.column,this.lead.column),this.moveCursorTo(g.row,g.column+u,u===0)},this.moveCursorToPosition=function(l){this.moveCursorTo(l.row,l.column)},this.moveCursorTo=function(l,u,h){var f=this.session.getFoldAt(l,u,1);f&&(l=f.start.row,u=f.start.column),this.$keepDesiredColumnOnChange=!0;var p=this.session.getLine(l);/[\uDC00-\uDFFF]/.test(p.charAt(u))&&p.charAt(u-1)&&(this.lead.row==l&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(l,u),this.$keepDesiredColumnOnChange=!1,h||(this.$desiredColumn=null)},this.moveCursorToScreen=function(l,u,h){var f=this.session.screenToDocumentPosition(l,u);this.moveCursorTo(f.row,f.column,h)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(l){this.setSelectionRange(l,l.cursor==l.start),this.$desiredColumn=l.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(l){var u=this.getRange();return l?(l.start.column=u.start.column,l.start.row=u.start.row,l.end.column=u.end.column,l.end.row=u.end.row):l=u,l.cursor=this.isBackwards()?l.start:l.end,l.desiredColumn=this.$desiredColumn,l},this.getRangeOfMovements=function(l){var u=this.getCursor();try{l(this);var h=this.getCursor();return a.fromPoints(u,h)}catch{return a.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},this.toJSON=function(){if(this.rangeCount)var l=this.ranges.map(function(u){var h=u.clone();return h.isBackwards=u.cursor==u.start,h});else{var l=this.getRange();l.isBackwards=this.isBackwards()}return l},this.fromJSON=function(l){if(l.start==null)if(this.rangeList&&l.length>1){this.toSingleRange(l[0]);for(var u=l.length;u--;){var h=a.fromPoints(l[u].start,l[u].end);l[u].isBackwards&&(h.cursor=h.start),this.addRange(h,!0)}return}else l=l[0];this.rangeList&&this.toSingleRange(l),this.setSelectionRange(l,l.isBackwards)},this.isEqual=function(l){if((l.length||this.rangeCount)&&l.length!=this.rangeCount)return!1;if(!l.length||!this.ranges)return this.getRange().isEqual(l);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(l[u]))return!1;return!0}}).call(c.prototype),r.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(n,r,i){var o=n("./config"),s=2e3,d=function(){function a(c){this.states=c,this.regExps={},this.matchMappings={};for(var l in this.states){for(var u=this.states[l],h=[],f=0,p=this.matchMappings[l]={defaultToken:"text"},g="g",b=[],x=0;x<u.length;x++){var S=u[x];if(S.defaultToken&&(p.defaultToken=S.defaultToken),S.caseInsensitive&&g.indexOf("i")===-1&&(g+="i"),S.unicode&&g.indexOf("u")===-1&&(g+="u"),S.regex!=null){S.regex instanceof RegExp&&(S.regex=S.regex.toString().slice(1,-1));var T=S.regex,v=new RegExp("(?:("+T+")|(.))").exec("a").length-2;Array.isArray(S.token)?S.token.length==1||v==1?S.token=S.token[0]:v-1!=S.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:S,groupCount:v-1}),S.token=S.token[0]):(S.tokenArray=S.token,S.token=null,S.onMatch=this.$arrayTokens):typeof S.token=="function"&&!S.onMatch&&(v>1?S.onMatch=this.$applyToken:S.onMatch=S.token),v>1&&(/\\\d/.test(S.regex)?T=S.regex.replace(/\\([0-9]+)/g,function(w,y){return"\\"+(parseInt(y,10)+f+1)}):(v=1,T=this.removeCapturingGroups(S.regex)),!S.splitRegex&&typeof S.token!="string"&&b.push(S)),p[f]=x,f+=v,h.push(T),S.onMatch||(S.onMatch=null)}}h.length||(p[0]=0,h.push("$")),b.forEach(function(w){w.splitRegex=this.createSplitterRegexp(w.regex,g)},this),this.regExps[l]=new RegExp("("+h.join(")|(")+")|($)",g)}}return a.prototype.$setMaxTokenCount=function(c){s=c|0},a.prototype.$applyToken=function(c){var l=this.splitRegex.exec(c).slice(1),u=this.token.apply(this,l);if(typeof u=="string")return[{type:u,value:c}];for(var h=[],f=0,p=u.length;f<p;f++)l[f]&&(h[h.length]={type:u[f],value:l[f]});return h},a.prototype.$arrayTokens=function(c){if(!c)return[];var l=this.splitRegex.exec(c);if(!l)return"text";for(var u=[],h=this.tokenArray,f=0,p=h.length;f<p;f++)l[f+1]&&(u[u.length]={type:h[f],value:l[f+1]});return u},a.prototype.removeCapturingGroups=function(c){var l=c.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(u,h){return h?"(?:":u});return l},a.prototype.createSplitterRegexp=function(c,l){if(c.indexOf("(?=")!=-1){var u=0,h=!1,f={};c.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(p,g,b,x,S,T){return h?h=S!="]":S?h=!0:x?(u==f.stack&&(f.end=T+1,f.stack=-1),u--):b&&(u++,b.length!=1&&(f.stack=u,f.start=T)),p}),f.end!=null&&/^\)*$/.test(c.substr(f.end))&&(c=c.substring(0,f.start)+c.substr(f.end))}return c.charAt(0)!="^"&&(c="^"+c),c.charAt(c.length-1)!="$"&&(c+="$"),new RegExp(c,(l||"").replace("g",""))},a.prototype.getLineTokens=function(c,l){if(l&&typeof l!="string"){var u=l.slice(0);l=u[0],l==="#tmp"&&(u.shift(),l=u.shift())}else var u=[];var h=l||"start",f=this.states[h];f||(h="start",f=this.states[h]);var p=this.matchMappings[h],g=this.regExps[h];g.lastIndex=0;for(var b,x=[],S=0,T=0,v={type:null,value:""};b=g.exec(c);){var w=p.defaultToken,y=null,m=b[0],E=g.lastIndex;if(E-m.length>S){var A=c.substring(S,E-m.length);v.type==w?v.value+=A:(v.type&&x.push(v),v={type:w,value:A})}for(var C=0;C<b.length-2;C++)if(b[C+1]!==void 0){y=f[p[C]],y.onMatch?w=y.onMatch(m,h,u,c):w=y.token,y.next&&(typeof y.next=="string"?h=y.next:h=y.next(h,u),f=this.states[h],f||(this.reportError("state doesn't exist",h),h="start",f=this.states[h]),p=this.matchMappings[h],S=E,g=this.regExps[h],g.lastIndex=E),y.consumeLineEnd&&(S=E);break}if(m){if(typeof w=="string")(!y||y.merge!==!1)&&v.type===w?v.value+=m:(v.type&&x.push(v),v={type:w,value:m});else if(w){v.type&&x.push(v),v={type:null,value:""};for(var C=0;C<w.length;C++)x.push(w[C])}}if(S==c.length)break;if(S=E,T++>s){for(T>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:l,line:c});S<c.length;)v.type&&x.push(v),v={value:c.substring(S,S+=500),type:"overflow"};h="start",u=[];break}}return v.type&&x.push(v),u.length>1&&u[0]!==h&&u.unshift("#tmp",h),{tokens:x,state:u.length?u:h}},a}();d.prototype.reportError=o.reportError,r.Tokenizer=d}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(n,r,i){var o=n("../lib/lang"),s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(c,l){if(!l){for(var u in c)this.$rules[u]=c[u];return}for(var u in c){for(var h=c[u],f=0;f<h.length;f++){var p=h[f];(p.next||p.onMatch)&&(typeof p.next=="string"&&p.next.indexOf(l)!==0&&(p.next=l+p.next),p.nextState&&p.nextState.indexOf(l)!==0&&(p.nextState=l+p.nextState))}this.$rules[l+u]=h}},this.getRules=function(){return this.$rules},this.embedRules=function(c,l,u,h,f){var p=typeof c=="function"?new c().getRules():c;if(h)for(var g=0;g<h.length;g++)h[g]=l+h[g];else{h=[];for(var b in p)h.push(l+b)}if(this.addRules(p,l),u)for(var x=Array.prototype[f?"push":"unshift"],g=0;g<h.length;g++)x.apply(this.$rules[h[g]],o.deepCopy(u));this.$embeds||(this.$embeds=[]),this.$embeds.push(l)},this.getEmbeds=function(){return this.$embeds};var d=function(c,l){return(c!="start"||l.length)&&l.unshift(this.nextState,c),this.nextState},a=function(c,l){return l.shift(),l.shift()||"start"};this.normalizeRules=function(){var c=0,l=this.$rules;function u(h){var f=l[h];f.processed=!0;for(var p=0;p<f.length;p++){var g=f[p],b=null;Array.isArray(g)&&(b=g,g={}),!g.regex&&g.start&&(g.regex=g.start,g.next||(g.next=[]),g.next.push({defaultToken:g.token},{token:g.token+".end",regex:g.end||g.start,next:"pop"}),g.token=g.token+".start",g.push=!0);var x=g.next||g.push;if(x&&Array.isArray(x)){var S=g.stateName;S||(S=g.token,typeof S!="string"&&(S=S[0]||""),l[S]&&(S+=c++)),l[S]=x,g.next=S,u(S)}else x=="pop"&&(g.next=a);if(g.push&&(g.nextState=g.next||g.push,g.next=d,delete g.push),g.rules)for(var T in g.rules)l[T]?l[T].push&&l[T].push.apply(l[T],g.rules[T]):l[T]=g.rules[T];var v=typeof g=="string"?g:g.include;if(v&&(v==="$self"&&(v="start"),Array.isArray(v)?b=v.map(function(y){return l[y]}):b=l[v]),b){var w=[p,1].concat(b);g.noEscape&&(w=w.filter(function(y){return!y.next})),f.splice.apply(f,w),p--}g.keywordMap&&(g.token=this.createKeywordMapper(g.keywordMap,g.defaultToken||"text",g.caseInsensitive),delete g.defaultToken)}}Object.keys(l).forEach(u,this)},this.createKeywordMapper=function(c,l,u,h){var f=Object.create(null);return this.$keywordList=[],Object.keys(c).forEach(function(p){for(var g=c[p],b=g.split(h||"|"),x=b.length;x--;){var S=b[x];this.$keywordList.push(S),u&&(S=S.toLowerCase()),f[S]=p}},this),c=null,u?function(p){return f[p.toLowerCase()]||l}:function(p){return f[p]||l}},this.getKeywords=function(){return this.$keywords}}).call(s.prototype),r.TextHighlightRules=s}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,i){var o=function(){this.$behaviours={}};(function(){this.add=function(s,d,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[s]:this.$behaviours[s]={}}this.$behaviours[s][d]=a},this.addBehaviours=function(s){for(var d in s)for(var a in s[d])this.add(d,a,s[d][a])},this.remove=function(s){this.$behaviours&&this.$behaviours[s]&&delete this.$behaviours[s]},this.inherit=function(s,d){if(typeof s=="function")var a=new s().getBehaviours(d);else var a=s.getBehaviours(d);this.addBehaviours(a)},this.getBehaviours=function(s){if(s){for(var d={},a=0;a<s.length;a++)this.$behaviours[s[a]]&&(d[s[a]]=this.$behaviours[s[a]]);return d}else return this.$behaviours}}).call(o.prototype),r.Behaviour=o}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,r,i){var o=n("./range").Range,s=function(){function d(a,c,l){this.$session=a,this.$row=c,this.$rowTokens=a.getTokens(c);var u=a.getTokenAt(c,l);this.$tokenIndex=u?u.index:-1}return d.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},d.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentTokenRow=function(){return this.$row},d.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,c=this.$tokenIndex,l=a[c].start;if(l!==void 0)return l;for(l=0;c>0;)c-=1,l+=a[c].value.length;return l},d.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},d.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new o(this.$row,c,this.$row,c+a.value.length)},d}();r.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,i){var o=n("../../lib/oop"),s=n("../behaviour").Behaviour,d=n("../../token_iterator").TokenIterator,a=n("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],l=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u,h={},f={'"':'"',"'":"'"},p=function(x){var S=-1;if(x.multiSelect&&(S=x.selection.index,h.rangeCount!=x.multiSelect.rangeCount&&(h={rangeCount:x.multiSelect.rangeCount})),h[S])return u=h[S];u=h[S]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(x,S,T,v){var w=x.end.row-x.start.row;return{text:T+S+v,selection:[0,x.start.column+1,w,x.end.column+(w?0:1)]}},b=function(x){x=x||{},this.add("braces","insertion",function(S,T,v,w,y){var m=v.getCursorPosition(),E=w.doc.getLine(m.row);if(y=="{"){p(v);var A=v.getSelectionRange(),C=w.doc.getTextRange(A);if(C!==""&&C!=="{"&&v.getWrapBehavioursEnabled())return g(A,C,"{","}");if(b.isSaneInsertion(v,w))return/[\]\}\)]/.test(E[m.column])||v.inMultiSelectMode||x.braces?(b.recordAutoInsert(v,w,"}"),{text:"{}",selection:[1,1]}):(b.recordMaybeInsert(v,w,"{"),{text:"{",selection:[1,1]})}else if(y=="}"){p(v);var k=E.substring(m.column,m.column+1);if(k=="}"){var I=w.$findOpeningBracket("}",{column:m.column+1,row:m.row});if(I!==null&&b.isAutoInsertedClosing(m,E,y))return b.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(y==`
|
||
`||y==`\r
|
||
`){p(v);var R="";b.isMaybeInsertedClosing(m,E)&&(R=a.stringRepeat("}",u.maybeInsertedBrackets),b.clearMaybeInsertedClosing());var k=E.substring(m.column,m.column+1);if(k==="}"){var M=w.findMatchingBracket({row:m.row,column:m.column+1},"}");if(!M)return null;var O=this.$getIndent(w.getLine(M.row))}else if(R)var O=this.$getIndent(E);else{b.clearMaybeInsertedClosing();return}var P=O+w.getTabString();return{text:`
|
||
`+P+`
|
||
`+O+R,selection:[1,P.length,1,P.length]}}else b.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(S,T,v,w,y){var m=w.doc.getTextRange(y);if(!y.isMultiLine()&&m=="{"){p(v);var E=w.doc.getLine(y.start.row),A=E.substring(y.end.column,y.end.column+1);if(A=="}")return y.end.column++,y;u.maybeInsertedBrackets--}}),this.add("parens","insertion",function(S,T,v,w,y){if(y=="("){p(v);var m=v.getSelectionRange(),E=w.doc.getTextRange(m);if(E!==""&&v.getWrapBehavioursEnabled())return g(m,E,"(",")");if(b.isSaneInsertion(v,w))return b.recordAutoInsert(v,w,")"),{text:"()",selection:[1,1]}}else if(y==")"){p(v);var A=v.getCursorPosition(),C=w.doc.getLine(A.row),k=C.substring(A.column,A.column+1);if(k==")"){var I=w.$findOpeningBracket(")",{column:A.column+1,row:A.row});if(I!==null&&b.isAutoInsertedClosing(A,C,y))return b.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(S,T,v,w,y){var m=w.doc.getTextRange(y);if(!y.isMultiLine()&&m=="("){p(v);var E=w.doc.getLine(y.start.row),A=E.substring(y.start.column+1,y.start.column+2);if(A==")")return y.end.column++,y}}),this.add("brackets","insertion",function(S,T,v,w,y){if(y=="["){p(v);var m=v.getSelectionRange(),E=w.doc.getTextRange(m);if(E!==""&&v.getWrapBehavioursEnabled())return g(m,E,"[","]");if(b.isSaneInsertion(v,w))return b.recordAutoInsert(v,w,"]"),{text:"[]",selection:[1,1]}}else if(y=="]"){p(v);var A=v.getCursorPosition(),C=w.doc.getLine(A.row),k=C.substring(A.column,A.column+1);if(k=="]"){var I=w.$findOpeningBracket("]",{column:A.column+1,row:A.row});if(I!==null&&b.isAutoInsertedClosing(A,C,y))return b.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(S,T,v,w,y){var m=w.doc.getTextRange(y);if(!y.isMultiLine()&&m=="["){p(v);var E=w.doc.getLine(y.start.row),A=E.substring(y.start.column+1,y.start.column+2);if(A=="]")return y.end.column++,y}}),this.add("string_dquotes","insertion",function(S,T,v,w,y){var m=w.$mode.$quotes||f;if(y.length==1&&m[y]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(y)!=-1)return;p(v);var E=y,A=v.getSelectionRange(),C=w.doc.getTextRange(A);if(C!==""&&(C.length!=1||!m[C])&&v.getWrapBehavioursEnabled())return g(A,C,E,E);if(!C){var k=v.getCursorPosition(),I=w.doc.getLine(k.row),R=I.substring(k.column-1,k.column),M=I.substring(k.column,k.column+1),O=w.getTokenAt(k.row,k.column),P=w.getTokenAt(k.row,k.column+1);if(R=="\\"&&O&&/escape/.test(O.type))return null;var N=O&&/string|escape/.test(O.type),B=!P||/string|escape/.test(P.type),W;if(M==E)W=N!==B,W&&/string\.end/.test(P.type)&&(W=!1);else{if(N&&!B||N&&B)return null;var K=w.$mode.tokenRe;K.lastIndex=0;var q=K.test(R);K.lastIndex=0;var re=K.test(M),Y=w.$mode.$pairQuotesAfter,Z=Y&&Y[E]&&Y[E].test(R);if(!Z&&q||re||M&&!/[\s;,.})\]\\]/.test(M))return null;var te=I[k.column-2];if(R==E&&(te==E||K.test(te)))return null;W=!0}return{text:W?E+E:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(S,T,v,w,y){var m=w.$mode.$quotes||f,E=w.doc.getTextRange(y);if(!y.isMultiLine()&&m.hasOwnProperty(E)){p(v);var A=w.doc.getLine(y.start.row),C=A.substring(y.start.column+1,y.start.column+2);if(C==E)return y.end.column++,y}}),x.closeDocComment!==!1&&this.add("doc comment end","insertion",function(S,T,v,w,y){if(S==="doc-start"&&(y===`
|
||
`||y===`\r
|
||
`)&&v.selection.isEmpty()){var m=v.getCursorPosition(),E=w.doc.getLine(m.row),A=w.doc.getLine(m.row+1),C=this.$getIndent(E);if(/\s*\*/.test(A))return/^\s*\*/.test(E)?{text:y+C+"* ",selection:[1,3+C.length,1,3+C.length]}:{text:y+C+" * ",selection:[1,3+C.length,1,3+C.length]};if(/\/\*\*/.test(E.substring(0,m.column)))return{text:y+C+" * "+y+" "+C+"*/",selection:[1,4+C.length,1,4+C.length]}}})};b.isSaneInsertion=function(x,S){var T=x.getCursorPosition(),v=new d(S,T.row,T.column);if(!this.$matchTokenType(v.getCurrentToken()||"text",c)){if(/[)}\]]/.test(x.session.getLine(T.row)[T.column]))return!0;var w=new d(S,T.row,T.column+1);if(!this.$matchTokenType(w.getCurrentToken()||"text",c))return!1}return v.stepForward(),v.getCurrentTokenRow()!==T.row||this.$matchTokenType(v.getCurrentToken()||"text",l)},b.$matchTokenType=function(x,S){return S.indexOf(x.type||x)>-1},b.recordAutoInsert=function(x,S,T){var v=x.getCursorPosition(),w=S.doc.getLine(v.row);this.isAutoInsertedClosing(v,w,u.autoInsertedLineEnd[0])||(u.autoInsertedBrackets=0),u.autoInsertedRow=v.row,u.autoInsertedLineEnd=T+w.substr(v.column),u.autoInsertedBrackets++},b.recordMaybeInsert=function(x,S,T){var v=x.getCursorPosition(),w=S.doc.getLine(v.row);this.isMaybeInsertedClosing(v,w)||(u.maybeInsertedBrackets=0),u.maybeInsertedRow=v.row,u.maybeInsertedLineStart=w.substr(0,v.column)+T,u.maybeInsertedLineEnd=w.substr(v.column),u.maybeInsertedBrackets++},b.isAutoInsertedClosing=function(x,S,T){return u.autoInsertedBrackets>0&&x.row===u.autoInsertedRow&&T===u.autoInsertedLineEnd[0]&&S.substr(x.column)===u.autoInsertedLineEnd},b.isMaybeInsertedClosing=function(x,S){return u.maybeInsertedBrackets>0&&x.row===u.maybeInsertedRow&&S.substr(x.column)===u.maybeInsertedLineEnd&&S.substr(0,x.column)==u.maybeInsertedLineStart},b.popAutoInsertedClosing=function(){u.autoInsertedLineEnd=u.autoInsertedLineEnd.substr(1),u.autoInsertedBrackets--},b.clearMaybeInsertedClosing=function(){u&&(u.maybeInsertedBrackets=0,u.maybeInsertedRow=-1)},o.inherits(b,s),r.CstyleBehaviour=b}),ace.define("ace/unicode",["require","exports","module"],function(n,r,i){for(var o=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],s=0,d=[],a=0;a<o.length;a+=2)d.push(s+=o[a]),o[a+1]&&d.push(45,s+=o[a+1]);r.wordChars=String.fromCharCode.apply(null,d)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(n,r,i){var o=n("../config"),s=n("../tokenizer").Tokenizer,d=n("./text_highlight_rules").TextHighlightRules,a=n("./behaviour/cstyle").CstyleBehaviour,c=n("../unicode"),l=n("../lib/lang"),u=n("../token_iterator").TokenIterator,h=n("../range").Range,f=function(){this.HighlightRules=d};(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+c.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+c.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new s(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(p,g,b,x){var S=g.doc,T=!0,v=!0,w=1/0,y=g.getTabSize(),m=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var C=this.lineCommentStart.map(l.escapeRegExp).join("|"),E=this.lineCommentStart[0];else var C=l.escapeRegExp(this.lineCommentStart),E=this.lineCommentStart;C=new RegExp("^(\\s*)(?:"+C+") ?"),m=g.getUseSoftTabs();var R=function(re,Y){var Z=re.match(C);if(Z){var te=Z[1].length,ie=Z[0].length;!P(re,te,ie)&&Z[0][ie-1]==" "&&ie--,S.removeInLine(Y,te,ie)}},O=E+" ",I=function(re,Y){(!T||/\S/.test(re))&&(P(re,w,w)?S.insertInLine({row:Y,column:w},O):S.insertInLine({row:Y,column:w},E))},M=function(re,Y){return C.test(re)},P=function(re,Y,Z){for(var te=0;Y--&&re.charAt(Y)==" ";)te++;if(te%y!=0)return!1;for(var te=0;re.charAt(Z++)==" ";)te++;return y>2?te%y!=y-1:te%y==0}}else{if(!this.blockComment)return!1;var E=this.blockComment.start,A=this.blockComment.end,C=new RegExp("^(\\s*)(?:"+l.escapeRegExp(E)+")"),k=new RegExp("(?:"+l.escapeRegExp(A)+")\\s*$"),I=function(W,K){M(W,K)||(!T||/\S/.test(W))&&(S.insertInLine({row:K,column:W.length},A),S.insertInLine({row:K,column:w},E))},R=function(W,K){var q;(q=W.match(k))&&S.removeInLine(K,W.length-q[0].length,W.length),(q=W.match(C))&&S.removeInLine(K,q[1].length,q[0].length)},M=function(W,K){if(C.test(W))return!0;for(var q=g.getTokens(K),re=0;re<q.length;re++)if(q[re].type==="comment")return!0}}function N(W){for(var K=b;K<=x;K++)W(S.getLine(K),K)}var B=1/0;N(function(W,K){var q=W.search(/\S/);q!==-1?(q<w&&(w=q),v&&!M(W,K)&&(v=!1)):B>W.length&&(B=W.length)}),w==1/0&&(w=B,T=!1,v=!1),m&&w%y!=0&&(w=Math.floor(w/y)*y),N(v?R:I)},this.toggleBlockComment=function(p,g,b,x){var S=this.blockComment;if(S){!S.start&&S[0]&&(S=S[0]);var T=new u(g,x.row,x.column),v=T.getCurrentToken();g.selection;var w=g.selection.toOrientedRange(),y,m;if(v&&/comment/.test(v.type)){for(var E,A;v&&/comment/.test(v.type);){var C=v.value.indexOf(S.start);if(C!=-1){var k=T.getCurrentTokenRow(),I=T.getCurrentTokenColumn()+C;E=new h(k,I,k,I+S.start.length);break}v=T.stepBackward()}for(var T=new u(g,x.row,x.column),v=T.getCurrentToken();v&&/comment/.test(v.type);){var C=v.value.indexOf(S.end);if(C!=-1){var k=T.getCurrentTokenRow(),I=T.getCurrentTokenColumn()+C;A=new h(k,I,k,I+S.end.length);break}v=T.stepForward()}A&&g.remove(A),E&&(g.remove(E),y=E.start.row,m=-S.start.length)}else m=S.start.length,y=b.start.row,g.insert(b.end,S.end),g.insert(b.start,S.start);w.start.row==y&&(w.start.column+=m),w.end.row==y&&(w.end.column+=m),g.selection.fromOrientedRange(w)}},this.getNextLineIndent=function(p,g,b){return this.$getIndent(g)},this.checkOutdent=function(p,g,b){return!1},this.autoOutdent=function(p,g,b){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var g in p)if(p[g]){var b=p[g],x=b.prototype.$id,S=o.$modes[x];S||(o.$modes[x]=S=new b),o.$modes[g]||(o.$modes[g]=S),this.$embeds.push(g),this.$modes[g]=S}for(var T=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],g=0;g<T.length;g++)(function(w){var y=T[g],m=w[y];w[T[g]]=function(){return this.$delegator(y,arguments,m)}})(this)},this.$delegator=function(p,g,b){var x=g[0]||"start";if(typeof x!="string"){if(Array.isArray(x[2])){var S=x[2][x[2].length-1],T=this.$modes[S];if(T)return T[p].apply(T,[x[1]].concat([].slice.call(g,1)))}x=x[0]||"start"}for(var v=0;v<this.$embeds.length;v++)if(this.$modes[this.$embeds[v]]){var w=x.split(this.$embeds[v]);if(!w[0]&&w[1]){g[0]=w[1];var T=this.$modes[this.$embeds[v]];return T[p].apply(T,g)}}var y=b.apply(this,g);return b?y:void 0},this.transformAction=function(p,g,b,x,S){if(this.$behaviour){var T=this.$behaviour.getBehaviours();for(var v in T)if(T[v][g]){var w=T[v][g].apply(this,arguments);if(w)return w}}},this.getKeywords=function(p){if(!this.completionKeywords){var g=this.$tokenizer.rules,b=[];for(var x in g)for(var S=g[x],T=0,v=S.length;T<v;T++)if(typeof S[T].token=="string")/keyword|support|storage/.test(S[T].token)&&b.push(S[T].regex);else if(typeof S[T].token=="object"){for(var w=0,y=S[T].token.length;w<y;w++)if(/keyword|support|storage/.test(S[T].token[w])){var x=S[T].regex.match(/\(.+?\)/g)[w];b.push(x.substr(1,x.length-2))}}this.completionKeywords=b}return p?b.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(p,g,b,x){var S=this.$keywordList||this.$createKeywordList();return S.map(function(T){return{name:T,value:T,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(f.prototype),r.Mode=f}),ace.define("ace/apply_delta",["require","exports","module"],function(n,r,i){r.applyDelta=function(o,s,d){var a=s.start.row,c=s.start.column,l=o[a]||"";switch(s.action){case"insert":var u=s.lines;if(u.length===1)o[a]=l.substring(0,c)+s.lines[0]+l.substring(c);else{var h=[a,1].concat(s.lines);o.splice.apply(o,h),o[a]=l.substring(0,c)+o[a],o[a+s.lines.length-1]+=l.substring(c)}break;case"remove":var f=s.end.column,p=s.end.row;a===p?o[a]=l.substring(0,c)+l.substring(f):o.splice(a,p-a+1,l.substring(0,c)+o[p].substring(f));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,i){var o=n("./lib/oop"),s=n("./lib/event_emitter").EventEmitter,d=function(){function l(u,h,f){this.$onChange=this.onChange.bind(this),this.attach(u),typeof f>"u"?this.setPosition(h.row,h.column):this.setPosition(h,f)}return l.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},l.prototype.getDocument=function(){return this.document},l.prototype.onChange=function(u){if(!(u.start.row==u.end.row&&u.start.row!=this.row)&&!(u.start.row>this.row)){var h=c(u,{row:this.row,column:this.column},this.$insertRight);this.setPosition(h.row,h.column,!0)}},l.prototype.setPosition=function(u,h,f){var p;if(f?p={row:u,column:h}:p=this.$clipPositionToDocument(u,h),!(this.row==p.row&&this.column==p.column)){var g={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:g,value:p})}},l.prototype.detach=function(){this.document.off("change",this.$onChange)},l.prototype.attach=function(u){this.document=u||this.document,this.document.on("change",this.$onChange)},l.prototype.$clipPositionToDocument=function(u,h){var f={};return u>=this.document.getLength()?(f.row=Math.max(0,this.document.getLength()-1),f.column=this.document.getLine(f.row).length):u<0?(f.row=0,f.column=0):(f.row=u,f.column=Math.min(this.document.getLine(f.row).length,Math.max(0,h))),h<0&&(f.column=0),f},l}();d.prototype.$insertRight=!1,o.implement(d.prototype,s);function a(l,u,h){var f=h?l.column<=u.column:l.column<u.column;return l.row<u.row||l.row==u.row&&f}function c(l,u,h){var f=l.action=="insert",p=(f?1:-1)*(l.end.row-l.start.row),g=(f?1:-1)*(l.end.column-l.start.column),b=l.start,x=f?b:l.end;return a(u,b,h)?{row:u.row,column:u.column}:a(x,u,!h)?{row:u.row+p,column:u.column+(u.row==x.row?g:0)}:{row:b.row,column:b.column}}r.Anchor=d}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,r,i){var o=n("./lib/oop"),s=n("./apply_delta").applyDelta,d=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,c=n("./anchor").Anchor,l=function(){function u(h){this.$lines=[""],h.length===0?this.$lines=[""]:Array.isArray(h)?this.insertMergedLines({row:0,column:0},h):this.insert({row:0,column:0},h)}return u.prototype.setValue=function(h){var f=this.getLength()-1;this.remove(new a(0,0,f,this.getLine(f).length)),this.insert({row:0,column:0},h||"")},u.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},u.prototype.createAnchor=function(h,f){return new c(this,h,f)},u.prototype.$detectNewLine=function(h){var f=h.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=f?f[1]:`
|
||
`,this._signal("changeNewLineMode")},u.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
||
`;case"unix":return`
|
||
`;default:return this.$autoNewLine||`
|
||
`}},u.prototype.setNewLineMode=function(h){this.$newLineMode!==h&&(this.$newLineMode=h,this._signal("changeNewLineMode"))},u.prototype.getNewLineMode=function(){return this.$newLineMode},u.prototype.isNewLine=function(h){return h==`\r
|
||
`||h=="\r"||h==`
|
||
`},u.prototype.getLine=function(h){return this.$lines[h]||""},u.prototype.getLines=function(h,f){return this.$lines.slice(h,f+1)},u.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},u.prototype.getLength=function(){return this.$lines.length},u.prototype.getTextRange=function(h){return this.getLinesForRange(h).join(this.getNewLineCharacter())},u.prototype.getLinesForRange=function(h){var f;if(h.start.row===h.end.row)f=[this.getLine(h.start.row).substring(h.start.column,h.end.column)];else{f=this.getLines(h.start.row,h.end.row),f[0]=(f[0]||"").substring(h.start.column);var p=f.length-1;h.end.row-h.start.row==p&&(f[p]=f[p].substring(0,h.end.column))}return f},u.prototype.insertLines=function(h,f){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(h,f)},u.prototype.removeLines=function(h,f){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(h,f)},u.prototype.insertNewLine=function(h){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(h,["",""])},u.prototype.insert=function(h,f){return this.getLength()<=1&&this.$detectNewLine(f),this.insertMergedLines(h,this.$split(f))},u.prototype.insertInLine=function(h,f){var p=this.clippedPos(h.row,h.column),g=this.pos(h.row,h.column+f.length);return this.applyDelta({start:p,end:g,action:"insert",lines:[f]},!0),this.clonePos(g)},u.prototype.clippedPos=function(h,f){var p=this.getLength();h===void 0?h=p:h<0?h=0:h>=p&&(h=p-1,f=void 0);var g=this.getLine(h);return f==null&&(f=g.length),f=Math.min(Math.max(f,0),g.length),{row:h,column:f}},u.prototype.clonePos=function(h){return{row:h.row,column:h.column}},u.prototype.pos=function(h,f){return{row:h,column:f}},u.prototype.$clipPosition=function(h){var f=this.getLength();return h.row>=f?(h.row=Math.max(0,f-1),h.column=this.getLine(f-1).length):(h.row=Math.max(0,h.row),h.column=Math.min(Math.max(h.column,0),this.getLine(h.row).length)),h},u.prototype.insertFullLines=function(h,f){h=Math.min(Math.max(h,0),this.getLength());var p=0;h<this.getLength()?(f=f.concat([""]),p=0):(f=[""].concat(f),h--,p=this.$lines[h].length),this.insertMergedLines({row:h,column:p},f)},u.prototype.insertMergedLines=function(h,f){var p=this.clippedPos(h.row,h.column),g={row:p.row+f.length-1,column:(f.length==1?p.column:0)+f[f.length-1].length};return this.applyDelta({start:p,end:g,action:"insert",lines:f}),this.clonePos(g)},u.prototype.remove=function(h){var f=this.clippedPos(h.start.row,h.start.column),p=this.clippedPos(h.end.row,h.end.column);return this.applyDelta({start:f,end:p,action:"remove",lines:this.getLinesForRange({start:f,end:p})}),this.clonePos(f)},u.prototype.removeInLine=function(h,f,p){var g=this.clippedPos(h,f),b=this.clippedPos(h,p);return this.applyDelta({start:g,end:b,action:"remove",lines:this.getLinesForRange({start:g,end:b})},!0),this.clonePos(g)},u.prototype.removeFullLines=function(h,f){h=Math.min(Math.max(0,h),this.getLength()-1),f=Math.min(Math.max(0,f),this.getLength()-1);var p=f==this.getLength()-1&&h>0,g=f<this.getLength()-1,b=p?h-1:h,x=p?this.getLine(b).length:0,S=g?f+1:f,T=g?0:this.getLine(S).length,v=new a(b,x,S,T),w=this.$lines.slice(h,f+1);return this.applyDelta({start:v.start,end:v.end,action:"remove",lines:this.getLinesForRange(v)}),w},u.prototype.removeNewLine=function(h){h<this.getLength()-1&&h>=0&&this.applyDelta({start:this.pos(h,this.getLine(h).length),end:this.pos(h+1,0),action:"remove",lines:["",""]})},u.prototype.replace=function(h,f){if(h instanceof a||(h=a.fromPoints(h.start,h.end)),f.length===0&&h.isEmpty())return h.start;if(f==this.getTextRange(h))return h.end;this.remove(h);var p;return f?p=this.insert(h.start,f):p=h.start,p},u.prototype.applyDeltas=function(h){for(var f=0;f<h.length;f++)this.applyDelta(h[f])},u.prototype.revertDeltas=function(h){for(var f=h.length-1;f>=0;f--)this.revertDelta(h[f])},u.prototype.applyDelta=function(h,f){var p=h.action=="insert";(p?h.lines.length<=1&&!h.lines[0]:!a.comparePoints(h.start,h.end))||(p&&h.lines.length>2e4?this.$splitAndapplyLargeDelta(h,2e4):(s(this.$lines,h,f),this._signal("change",h)))},u.prototype.$safeApplyDelta=function(h){var f=this.$lines.length;(h.action=="remove"&&h.start.row<f&&h.end.row<f||h.action=="insert"&&h.start.row<=f)&&this.applyDelta(h)},u.prototype.$splitAndapplyLargeDelta=function(h,f){for(var p=h.lines,g=p.length-f+1,b=h.start.row,x=h.start.column,S=0,T=0;S<g;S=T){T+=f-1;var v=p.slice(S,T);v.push(""),this.applyDelta({start:this.pos(b+S,x),end:this.pos(b+T,x=0),action:h.action,lines:v},!0)}h.lines=p.slice(S),h.start.row=b+S,h.start.column=x,this.applyDelta(h,!0)},u.prototype.revertDelta=function(h){this.$safeApplyDelta({start:this.clonePos(h.start),end:this.clonePos(h.end),action:h.action=="insert"?"remove":"insert",lines:h.lines.slice()})},u.prototype.indexToPosition=function(h,f){for(var p=this.$lines||this.getAllLines(),g=this.getNewLineCharacter().length,b=f||0,x=p.length;b<x;b++)if(h-=p[b].length+g,h<0)return{row:b,column:h+p[b].length+g};return{row:x-1,column:h+p[x-1].length+g}},u.prototype.positionToIndex=function(h,f){for(var p=this.$lines||this.getAllLines(),g=this.getNewLineCharacter().length,b=0,x=Math.min(h.row,p.length),S=f||0;S<x;++S)b+=p[S].length+g;return b+h.column},u.prototype.$split=function(h){return h.split(/\r\n|\r|\n/)},u}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",o.implement(l.prototype,d),r.Document=l}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,i){var o=n("./lib/oop"),s=n("./lib/event_emitter").EventEmitter,d=function(){function a(c,l){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=c;var u=this;this.$worker=function(){if(u.running){for(var h=new Date,f=u.currentLine,p=-1,g=u.doc,b=f;u.lines[f];)f++;var x=g.getLength(),S=0;for(u.running=!1;f<x;){u.$tokenizeRow(f),p=f;do f++;while(u.lines[f]);if(S++,S%5===0&&new Date-h>20){u.running=setTimeout(u.$worker,20);break}}u.currentLine=f,p==-1&&(p=f),b<=p&&u.fireUpdateEvent(b,p)}}}return a.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(c,l){var u={first:c,last:l};this._signal("update",{data:u})},a.prototype.start=function(c){this.currentLine=Math.min(c||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(c){var l=c.start.row,u=c.end.row-l;if(u===0)this.lines[l]=null;else if(c.action=="remove")this.lines.splice(l,u+1,null),this.states.splice(l,u+1,null);else{var h=Array(u+1);h.unshift(l,1),this.lines.splice.apply(this.lines,h),this.states.splice.apply(this.states,h)}this.currentLine=Math.min(l,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},a.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},a.prototype.$tokenizeRow=function(c){var l=this.doc.getLine(c),u=this.states[c-1],h=this.tokenizer.getLineTokens(l,u,c);return this.states[c]+""!=h.state+""?(this.states[c]=h.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=h.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();o.implement(d.prototype,s),r.BackgroundTokenizer=d}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,i){var o=n("./lib/lang"),s=n("./range").Range,d=function(){function a(c,l,u){u===void 0&&(u="text"),this.setRegexp(c),this.clazz=l,this.type=u}return a.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},a.prototype.update=function(c,l,u,h){if(this.regExp)for(var f=h.firstRow,p=h.lastRow,g={},b=f;b<=p;b++){var x=this.cache[b];x==null&&(x=o.getMatchOffsets(u.getLine(b),this.regExp),x.length>this.MAX_RANGES&&(x=x.slice(0,this.MAX_RANGES)),x=x.map(function(w){return new s(b,w.offset,b,w.offset+w.length)}),this.cache[b]=x.length?x:"");for(var S=x.length;S--;){var T=x[S].toScreenRange(u),v=T.toString();g[v]||(g[v]=!0,l.drawSingleLineMarker(c,T,this.clazz,h))}}},a}();d.prototype.MAX_RANGES=500,r.SearchHighlight=d}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,r,i){var o=n("../range").Range,s=function(){function d(a,c){this.foldData=a,Array.isArray(c)?this.folds=c:c=this.folds=[c];var l=c[c.length-1];this.range=new o(c[0].start.row,c[0].start.column,l.end.row,l.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(u){u.setFoldLine(this)},this)}return d.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(c){c.start.row+=a,c.end.row+=a})},d.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(c,l){return-c.range.compareEnd(l.start.row,l.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},d.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},d.prototype.walk=function(a,c,l){var u=0,h=this.folds,f,p,g,b=!0;c==null&&(c=this.end.row,l=this.end.column);for(var x=0;x<h.length;x++){if(f=h[x],p=f.range.compareStart(c,l),p==-1){a(null,c,l,u,b);return}if(g=a(null,f.start.row,f.start.column,u,b),g=!g&&a(f.placeholder,f.start.row,f.start.column,u),g||p===0)return;b=!f.sameRow,u=f.end.column}a(null,c,l,u,b)},d.prototype.getNextFoldTo=function(a,c){for(var l,u,h=0;h<this.folds.length;h++){if(l=this.folds[h],u=l.range.compareEnd(a,c),u==-1)return{fold:l,kind:"after"};if(u===0)return{fold:l,kind:"inside"}}return null},d.prototype.addRemoveChars=function(a,c,l){var u=this.getNextFoldTo(a,c),h,f;if(u){if(h=u.fold,u.kind=="inside"&&h.start.column!=c&&h.start.row!=a)window.console&&window.console.log(a,c,h);else if(h.start.row==a){f=this.folds;var p=f.indexOf(h);for(p===0&&(this.start.column+=l),p;p<f.length;p++){if(h=f[p],h.start.column+=l,!h.sameRow)return;h.end.column+=l}this.end.column+=l}}},d.prototype.split=function(a,c){var l=this.getNextFoldTo(a,c);if(!l||l.kind=="inside")return null;var u=l.fold,h=this.folds,f=this.foldData,p=h.indexOf(u),g=h[p-1];this.end.row=g.end.row,this.end.column=g.end.column,h=h.splice(p,h.length-p);var b=new d(f,h);return f.splice(f.indexOf(this)+1,0,b),b},d.prototype.merge=function(a){for(var c=a.folds,l=0;l<c.length;l++)this.addFold(c[l]);var u=this.foldData;u.splice(u.indexOf(a),1)},d.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(c){a.push(" "+c.toString())}),a.push("]"),a.join(`
|
||
`)},d.prototype.idxToPosition=function(a){for(var c=0,l=0;l<this.folds.length;l++){var u=this.folds[l];if(a-=u.start.column-c,a<0)return{row:u.start.row,column:u.start.column+a};if(a-=u.placeholder.length,a<0)return u.start;c=u.end.column}return{row:this.end.row,column:this.end.column+a}},d}();r.FoldLine=s}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,r,i){var o=n("./range").Range,s=o.comparePoints,d=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(c,l,u){for(var h=this.ranges,f=u||0;f<h.length;f++){var p=h[f],g=s(c,p.end);if(!(g>0)){var b=s(c,p.start);return g===0?l&&b!==0?-f-2:f:b>0||b===0&&!l?f:-f-1}}return-f-1},a.prototype.add=function(c){var l=!c.isEmpty(),u=this.pointIndex(c.start,l);u<0&&(u=-u-1);var h=this.pointIndex(c.end,l,u);return h<0?h=-h-1:h++,this.ranges.splice(u,h-u,c)},a.prototype.addList=function(c){for(var l=[],u=c.length;u--;)l.push.apply(l,this.add(c[u]));return l},a.prototype.substractPoint=function(c){var l=this.pointIndex(c);if(l>=0)return this.ranges.splice(l,1)},a.prototype.merge=function(){var c=[],l=this.ranges;l=l.sort(function(g,b){return s(g.start,b.start)});for(var u=l[0],h,f=1;f<l.length;f++){h=u,u=l[f];var p=s(h.end,u.start);p<0||p==0&&!h.isEmpty()&&!u.isEmpty()||(s(h.end,u.end)<0&&(h.end.row=u.end.row,h.end.column=u.end.column),l.splice(f,1),c.push(u),u=h,f--)}return this.ranges=l,c},a.prototype.contains=function(c,l){return this.pointIndex({row:c,column:l})>=0},a.prototype.containsPoint=function(c){return this.pointIndex(c)>=0},a.prototype.rangeAtPoint=function(c){var l=this.pointIndex(c);if(l>=0)return this.ranges[l]},a.prototype.clipRows=function(c,l){var u=this.ranges;if(u[0].start.row>l||u[u.length-1].start.row<c)return[];var h=this.pointIndex({row:c,column:0});h<0&&(h=-h-1);var f=this.pointIndex({row:l,column:0},h);f<0&&(f=-f-1);for(var p=[],g=h;g<f;g++)p.push(u[g]);return p},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(c){this.session&&this.detach(),this.session=c,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(c){for(var l=c.start,u=c.end,h=l.row,f=u.row,p=this.ranges,g=0,b=p.length;g<b;g++){var x=p[g];if(x.end.row>=h)break}if(c.action=="insert")for(var S=f-h,T=-l.column+u.column;g<b;g++){var x=p[g];if(x.start.row>h)break;if(x.start.row==h&&x.start.column>=l.column&&(x.start.column==l.column&&this.$bias<=0||(x.start.column+=T,x.start.row+=S)),x.end.row==h&&x.end.column>=l.column){if(x.end.column==l.column&&this.$bias<0)continue;x.end.column==l.column&&T>0&&g<b-1&&x.end.column>x.start.column&&x.end.column==p[g+1].start.column&&(x.end.column-=T),x.end.column+=T,x.end.row+=S}}else for(var S=h-f,T=l.column-u.column;g<b;g++){var x=p[g];if(x.start.row>f)break;x.end.row<f&&(h<x.end.row||h==x.end.row&&l.column<x.end.column)?(x.end.row=h,x.end.column=l.column):x.end.row==f?x.end.column<=u.column?(S||x.end.column>l.column)&&(x.end.column=l.column,x.end.row=l.row):(x.end.column+=T,x.end.row+=S):x.end.row>f&&(x.end.row+=S),x.start.row<f&&(h<x.start.row||h==x.start.row&&l.column<x.start.column)?(x.start.row=h,x.start.column=l.column):x.start.row==f?x.start.column<=u.column?(S||x.start.column>l.column)&&(x.start.column=l.column,x.start.row=l.row):(x.start.column+=T,x.start.row+=S):x.start.row>f&&(x.start.row+=S)}if(S!=0&&g<b)for(;g<b;g++){var x=p[g];x.start.row+=S,x.end.row+=S}},a}();d.prototype.comparePoints=s,r.RangeList=d}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,r,i){var o=this&&this.__extends||function(){var h=function(f,p){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,b){g.__proto__=b}||function(g,b){for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(g[x]=b[x])},h(f,p)};return function(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");h(f,p);function g(){this.constructor=f}f.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),s=n("../range_list").RangeList,d=function(h){o(f,h);function f(p,g){var b=h.call(this)||this;return b.foldLine=null,b.placeholder=g,b.range=p,b.start=p.start,b.end=p.end,b.sameRow=p.start.row==p.end.row,b.subFolds=b.ranges=[],b}return f.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},f.prototype.setFoldLine=function(p){this.foldLine=p,this.subFolds.forEach(function(g){g.setFoldLine(p)})},f.prototype.clone=function(){var p=this.range.clone(),g=new f(p,this.placeholder);return this.subFolds.forEach(function(b){g.subFolds.push(b.clone())}),g.collapseChildren=this.collapseChildren,g},f.prototype.addSubFold=function(p){if(!this.range.isEqual(p)){c(p,this.start);for(var T=p.start.row,v=p.start.column,g=0,b=-1;g<this.subFolds.length&&(b=this.subFolds[g].range.compare(T,v),b==1);g++);var x=this.subFolds[g],S=0;if(b==0){if(x.range.containsRange(p))return x.addSubFold(p);S=1}for(var T=p.range.end.row,v=p.range.end.column,w=g,b=-1;w<this.subFolds.length&&(b=this.subFolds[w].range.compare(T,v),b==1);w++);b==0&&w++;for(var y=this.subFolds.splice(g,w-g,p),m=b==0?y.length-1:y.length,E=S;E<m;E++)p.addSubFold(y[E]);return p.setFoldLine(this.foldLine),p}},f.prototype.restoreRange=function(p){return u(p,this.start)},f}(s);function a(h,f){h.row-=f.row,h.row==0&&(h.column-=f.column)}function c(h,f){a(h.start,f),a(h.end,f)}function l(h,f){h.row==0&&(h.column+=f.column),h.row+=f.row}function u(h,f){l(h.start,f),l(h.end,f)}r.Fold=d}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(n,r,i){var o=n("../range").Range,s=n("./fold_line").FoldLine,d=n("./fold").Fold,a=n("../token_iterator").TokenIterator,c=n("../mouse/mouse_event").MouseEvent;function l(){this.getFoldAt=function(u,h,f){var p=this.getFoldLine(u);if(!p)return null;for(var g=p.folds,b=0;b<g.length;b++){var x=g[b].range;if(x.contains(u,h)){if(f==1&&x.isEnd(u,h)&&!x.isEmpty())continue;if(f==-1&&x.isStart(u,h)&&!x.isEmpty())continue;return g[b]}}},this.getFoldsInRange=function(u){var h=u.start,f=u.end,p=this.$foldData,g=[];h.column+=1,f.column-=1;for(var b=0;b<p.length;b++){var x=p[b].range.compareRange(u);if(x!=2){if(x==-2)break;for(var S=p[b].folds,T=0;T<S.length;T++){var v=S[T];if(x=v.range.compareRange(u),x==-2)break;if(x==2)continue;if(x==42)break;g.push(v)}}}return h.column-=1,f.column+=1,g},this.getFoldsInRangeList=function(u){if(Array.isArray(u)){var h=[];u.forEach(function(f){h=h.concat(this.getFoldsInRange(f))},this)}else var h=this.getFoldsInRange(u);return h},this.getAllFolds=function(){for(var u=[],h=this.$foldData,f=0;f<h.length;f++)for(var p=0;p<h[f].folds.length;p++)u.push(h[f].folds[p]);return u},this.getFoldStringAt=function(u,h,f,p){if(p=p||this.getFoldLine(u),!p)return null;for(var g={end:{column:0}},b,x,S=0;S<p.folds.length;S++){x=p.folds[S];var T=x.range.compareEnd(u,h);if(T==-1){b=this.getLine(x.start.row).substring(g.end.column,x.start.column);break}else if(T===0)return null;g=x}return b||(b=this.getLine(x.start.row).substring(g.end.column)),f==-1?b.substring(0,h-g.end.column):f==1?b.substring(h-g.end.column):b},this.getFoldLine=function(u,h){var f=this.$foldData,p=0;for(h&&(p=f.indexOf(h)),p==-1&&(p=0),p;p<f.length;p++){var g=f[p];if(g.start.row<=u&&g.end.row>=u)return g;if(g.end.row>u)return null}return null},this.getNextFoldLine=function(u,h){var f=this.$foldData,p=0;for(h&&(p=f.indexOf(h)),p==-1&&(p=0),p;p<f.length;p++){var g=f[p];if(g.end.row>=u)return g}return null},this.getFoldedRowCount=function(u,h){for(var f=this.$foldData,p=h-u+1,g=0;g<f.length;g++){var b=f[g],x=b.end.row,S=b.start.row;if(x>=h){S<h&&(S>=u?p-=h-S:p=0);break}else x>=u&&(S>=u?p-=x-S:p-=x-u+1)}return p},this.$addFoldLine=function(u){return this.$foldData.push(u),this.$foldData.sort(function(h,f){return h.start.row-f.start.row}),u},this.addFold=function(u,h){var f=this.$foldData,p=!1,g;u instanceof d?g=u:(g=new d(h,u),g.collapseChildren=h.collapseChildren),this.$clipRangeToDocument(g.range);var b=g.start.row,x=g.start.column,S=g.end.row,T=g.end.column,v=this.getFoldAt(b,x,1),w=this.getFoldAt(S,T,-1);if(v&&w==v)return v.addSubFold(g);v&&!v.range.isStart(b,x)&&this.removeFold(v),w&&!w.range.isEnd(S,T)&&this.removeFold(w);var y=this.getFoldsInRange(g.range);y.length>0&&(this.removeFolds(y),g.collapseChildren||y.forEach(function(C){g.addSubFold(C)}));for(var m=0;m<f.length;m++){var E=f[m];if(S==E.start.row){E.addFold(g),p=!0;break}else if(b==E.end.row){if(E.addFold(g),p=!0,!g.sameRow){var A=f[m+1];if(A&&A.start.row==S){E.merge(A);break}}break}else if(S<=E.start.row)break}return p||(E=this.$addFoldLine(new s(this.$foldData,g))),this.$useWrapMode?this.$updateWrapData(E.start.row,E.start.row):this.$updateRowLengthCache(E.start.row,E.start.row),this.$modified=!0,this._signal("changeFold",{data:g,action:"add"}),g},this.addFolds=function(u){u.forEach(function(h){this.addFold(h)},this)},this.removeFold=function(u){var h=u.foldLine,f=h.start.row,p=h.end.row,g=this.$foldData,b=h.folds;if(b.length==1)g.splice(g.indexOf(h),1);else if(h.range.isEnd(u.end.row,u.end.column))b.pop(),h.end.row=b[b.length-1].end.row,h.end.column=b[b.length-1].end.column;else if(h.range.isStart(u.start.row,u.start.column))b.shift(),h.start.row=b[0].start.row,h.start.column=b[0].start.column;else if(u.sameRow)b.splice(b.indexOf(u),1);else{var x=h.split(u.start.row,u.start.column);b=x.folds,b.shift(),x.start.row=b[0].start.row,x.start.column=b[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(f,p):this.$updateRowLengthCache(f,p)),this.$modified=!0,this._signal("changeFold",{data:u,action:"remove"})},this.removeFolds=function(u){for(var h=[],f=0;f<u.length;f++)h.push(u[f]);h.forEach(function(p){this.removeFold(p)},this),this.$modified=!0},this.expandFold=function(u){this.removeFold(u),u.subFolds.forEach(function(h){u.restoreRange(h),this.addFold(h)},this),u.collapseChildren>0&&this.foldAll(u.start.row+1,u.end.row,u.collapseChildren-1),u.subFolds=[]},this.expandFolds=function(u){u.forEach(function(h){this.expandFold(h)},this)},this.unfold=function(u,h){var f,p;if(u==null)f=new o(0,0,this.getLength(),0),h==null&&(h=!0);else if(typeof u=="number")f=new o(u,0,u,this.getLine(u).length);else if("row"in u)f=o.fromPoints(u,u);else{if(Array.isArray(u))return p=[],u.forEach(function(b){p=p.concat(this.unfold(b))},this),p;f=u}p=this.getFoldsInRangeList(f);for(var g=p;p.length==1&&o.comparePoints(p[0].start,f.start)<0&&o.comparePoints(p[0].end,f.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(f);if(h!=!1?this.removeFolds(p):this.expandFolds(p),g.length)return g},this.isRowFolded=function(u,h){return!!this.getFoldLine(u,h)},this.getRowFoldEnd=function(u,h){var f=this.getFoldLine(u,h);return f?f.end.row:u},this.getRowFoldStart=function(u,h){var f=this.getFoldLine(u,h);return f?f.start.row:u},this.getFoldDisplayLine=function(u,h,f,p,g){p==null&&(p=u.start.row),g==null&&(g=0),h==null&&(h=u.end.row),f==null&&(f=this.getLine(h).length);var b=this.doc,x="";return u.walk(function(S,T,v,w){if(!(T<p)){if(T==p){if(v<g)return;w=Math.max(g,w)}S!=null?x+=S:x+=b.getLine(T).substring(w,v)}},h,f),x},this.getDisplayLine=function(u,h,f,p){var g=this.getFoldLine(u);if(g)return this.getFoldDisplayLine(g,u,h,f,p);var b;return b=this.doc.getLine(u),b.substring(p||0,h||b.length)},this.$cloneFoldData=function(){var u=[];return u=this.$foldData.map(function(h){var f=h.folds.map(function(p){return p.clone()});return new s(u,f)}),u},this.toggleFold=function(u){var h=this.selection,f=h.getRange(),p,g;if(f.isEmpty()){var b=f.start;if(p=this.getFoldAt(b.row,b.column),p){this.expandFold(p);return}else(g=this.findMatchingBracket(b))?f.comparePoint(g)==1?f.end=g:(f.start=g,f.start.column++,f.end.column--):(g=this.findMatchingBracket({row:b.row,column:b.column+1}))?(f.comparePoint(g)==1?f.end=g:f.start=g,f.start.column++):f=this.getCommentFoldRange(b.row,b.column)||f}else{var x=this.getFoldsInRange(f);if(u&&x.length){this.expandFolds(x);return}else x.length==1&&(p=x[0])}if(p||(p=this.getFoldAt(f.start.row,f.start.column)),p&&p.range.toString()==f.toString()){this.expandFold(p);return}var S="...";if(!f.isMultiLine()){if(S=this.getTextRange(f),S.length<4)return;S=S.trim().substring(0,2)+".."}this.addFold(S,f)},this.getCommentFoldRange=function(u,h,f){var p=new a(this,u,h),g=p.getCurrentToken(),b=g&&g.type;if(g&&/^comment|string/.test(b)){b=b.match(/comment|string/)[0],b=="comment"&&(b+="|doc-start");var x=new RegExp(b),S=new o;if(f!=1){do g=p.stepBackward();while(g&&x.test(g.type)&&!/^comment.end/.test(g.type));g=p.stepForward()}if(S.start.row=p.getCurrentTokenRow(),S.start.column=p.getCurrentTokenColumn()+(/^comment.start/.test(g.type)?g.value.length:2),p=new a(this,u,h),f!=-1){var T=-1;do if(g=p.stepForward(),T==-1){var v=this.getState(p.$row);x.test(v)||(T=p.$row)}else if(p.$row>T)break;while(g&&x.test(g.type)&&!/^comment.start/.test(g.type));g=p.stepBackward()}else g=p.getCurrentToken();return S.end.row=p.getCurrentTokenRow(),S.end.column=p.getCurrentTokenColumn(),/^comment.end/.test(g.type)||(S.end.column+=g.value.length-2),S}},this.foldAll=function(u,h,f,p){f==null&&(f=1e5);var g=this.foldWidgets;if(g){h=h||this.getLength(),u=u||0;for(var b=u;b<h;b++)if(g[b]==null&&(g[b]=this.getFoldWidget(b)),g[b]=="start"&&!(p&&!p(b))){var x=this.getFoldWidgetRange(b);x&&x.isMultiLine()&&x.end.row<=h&&x.start.row>=u&&(b=x.end.row,x.collapseChildren=f,this.addFold("...",x))}}},this.foldToLevel=function(u){for(this.foldAll();u-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var u=this;this.foldAll(null,null,null,function(h){for(var f=u.getTokens(h),p=0;p<f.length;p++){var g=f[p];if(!(g.type=="text"&&/^\s+$/.test(g.value)))return!!/comment/.test(g.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(u){if(!this.$foldStyles[u])throw new Error("invalid fold style: "+u+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=u){this.$foldStyle=u,u=="manual"&&this.unfold();var h=this.$foldMode;this.$setFolding(null),this.$setFolding(h)}},this.$setFolding=function(u){if(this.$foldMode!=u){if(this.$foldMode=u,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!u||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=u.getFoldWidget.bind(u,this,this.$foldStyle),this.getFoldWidgetRange=u.getFoldWidgetRange.bind(u,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(u,h){var f=this.foldWidgets;if(!f||h&&f[u])return{};for(var p=u-1,g;p>=0;){var b=f[p];if(b==null&&(b=f[p]=this.getFoldWidget(p)),b=="start"){var x=this.getFoldWidgetRange(p);if(g||(g=x),x&&x.end.row>=u)break}p--}return{range:p!==-1&&x,firstRange:g}},this.onFoldWidgetClick=function(u,h){h instanceof c&&(h=h.domEvent);var f={children:h.shiftKey,all:h.ctrlKey||h.metaKey,siblings:h.altKey},p=this.$toggleFoldWidget(u,f);if(!p){var g=h.target||h.srcElement;g&&/ace_fold-widget/.test(g.className)&&(g.className+=" ace_invalid")}},this.$toggleFoldWidget=function(u,h){if(this.getFoldWidget){var f=this.getFoldWidget(u),p=this.getLine(u),g=f==="end"?-1:1,b=this.getFoldAt(u,g===-1?0:p.length,g);if(b)return h.children||h.all?this.removeFold(b):this.expandFold(b),b;var x=this.getFoldWidgetRange(u,!0);if(x&&!x.isMultiLine()&&(b=this.getFoldAt(x.start.row,x.start.column,1),b&&x.isEqual(b.range)))return this.removeFold(b),b;if(h.siblings){var S=this.getParentFoldRangeData(u);if(S.range)var T=S.range.start.row+1,v=S.range.end.row;this.foldAll(T,v,h.all?1e4:0)}else h.children?(v=x?x.end.row:this.getLength(),this.foldAll(u+1,v,h.all?1e4:0)):x&&(h.all&&(x.collapseChildren=1e4),this.addFold("...",x));return x}},this.toggleFoldWidget=function(u){var h=this.selection.getCursor().row;h=this.getRowFoldStart(h);var f=this.$toggleFoldWidget(h,{});if(!f){var p=this.getParentFoldRangeData(h,!0);if(f=p.range||p.firstRange,f){h=f.start.row;var g=this.getFoldAt(h,this.getLine(h).length,1);g?this.removeFold(g):this.addFold("...",f)}}},this.updateFoldWidgets=function(u){var h=u.start.row,f=u.end.row-h;if(f===0)this.foldWidgets[h]=null;else if(u.action=="remove")this.foldWidgets.splice(h,f+1,null);else{var p=Array(f+1);p.unshift(h,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(u){var h=u.data;h.first!=h.last&&this.foldWidgets.length>h.first&&this.foldWidgets.splice(h.first,this.foldWidgets.length)}}r.Folding=l}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,i){var o=n("../token_iterator").TokenIterator,s=n("../range").Range;function d(){this.findMatchingBracket=function(a,c){if(a.column==0)return null;var l=c||this.getLine(a.row).charAt(a.column-1);if(l=="")return null;var u=l.match(/([\(\[\{])|([\)\]\}])/);return u?u[1]?this.$findClosingBracket(u[1],a):this.$findOpeningBracket(u[2],a):null},this.getBracketRange=function(a){var c=this.getLine(a.row),l=!0,u,h=c.charAt(a.column-1),f=h&&h.match(/([\(\[\{])|([\)\]\}])/);if(f||(h=c.charAt(a.column),a={row:a.row,column:a.column+1},f=h&&h.match(/([\(\[\{])|([\)\]\}])/),l=!1),!f)return null;if(f[1]){var p=this.$findClosingBracket(f[1],a);if(!p)return null;u=s.fromPoints(a,p),l||(u.end.column++,u.start.column--),u.cursor=u.end}else{var p=this.$findOpeningBracket(f[2],a);if(!p)return null;u=s.fromPoints(p,a),l||(u.start.column++,u.end.column--),u.cursor=u.start}return u},this.getMatchingBracketRanges=function(a,c){var l=this.getLine(a.row),u=/([\(\[\{])|([\)\]\}])/,h=!c&&l.charAt(a.column-1),f=h&&h.match(u);if(f||(h=(c===void 0||c)&&l.charAt(a.column),a={row:a.row,column:a.column+1},f=h&&h.match(u)),!f)return null;var p=new s(a.row,a.column-1,a.row,a.column),g=f[1]?this.$findClosingBracket(f[1],a):this.$findOpeningBracket(f[2],a);if(!g)return[p];var b=new s(g.row,g.column,g.row,g.column+1);return[p,b]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,c,l){var u=this.$brackets[a],h=1,f=new o(this,c.row,c.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){l||(l=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var g=c.column-f.getCurrentTokenColumn()-2,b=p.value;;){for(;g>=0;){var x=b.charAt(g);if(x==u){if(h-=1,h==0)return{row:f.getCurrentTokenRow(),column:g+f.getCurrentTokenColumn()}}else x==a&&(h+=1);g-=1}do p=f.stepBackward();while(p&&!l.test(p.type));if(p==null)break;b=p.value,g=b.length-1}return null}},this.$findClosingBracket=function(a,c,l){var u=this.$brackets[a],h=1,f=new o(this,c.row,c.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){l||(l=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var g=c.column-f.getCurrentTokenColumn();;){for(var b=p.value,x=b.length;g<x;){var S=b.charAt(g);if(S==u){if(h-=1,h==0)return{row:f.getCurrentTokenRow(),column:g+f.getCurrentTokenColumn()}}else S==a&&(h+=1);g+=1}do p=f.stepForward();while(p&&!l.test(p.type));if(p==null)break;g=0}return null}},this.getMatchingTags=function(a){var c=new o(this,a.row,a.column),l=this.$findTagName(c);if(l){var u=c.stepBackward();return u.value==="<"?this.$findClosingTag(c,l):this.$findOpeningTag(c,l)}},this.$findTagName=function(a){var c=a.getCurrentToken(),l=!1,u=!1;if(c&&c.type.indexOf("tag-name")===-1)do u?c=a.stepBackward():c=a.stepForward(),c&&(c.value==="/>"?u=!0:c.type.indexOf("tag-name")!==-1&&(l=!0));while(c&&!l);return c},this.$findClosingTag=function(a,c){var l,u=c.value,h=c.value,f=0,p=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=a.stepForward();var g=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length),b=!1;do if(l=c,c=a.stepForward(),c){if(c.value===">"&&!b){var x=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);b=!0}if(c.type.indexOf("tag-name")!==-1){if(u=c.value,h===u){if(l.value==="<")f++;else if(l.value==="</"&&(f--,f<0)){a.stepBackward();var S=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);c=a.stepForward();var T=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c=a.stepForward(),c&&c.value===">")var v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(h===u&&c.value==="/>"&&(f--,f<0))var S=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),T=S,v=T,x=new s(g.end.row,g.end.column,g.end.row,g.end.column+1)}while(c&&f>=0);if(p&&x&&S&&v&&g&&T)return{openTag:new s(p.start.row,p.start.column,x.end.row,x.end.column),closeTag:new s(S.start.row,S.start.column,v.end.row,v.end.column),openTagName:g,closeTagName:T}},this.$findOpeningTag=function(a,c){var l=a.getCurrentToken(),u=c.value,h=0,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+2,b=new s(f,p,f,g);a.stepForward();var x=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c=a.stepForward(),!(!c||c.value!==">")){var S=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(c=l,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+c.value.length,l=a.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(u===c.value)if(l.value==="<"){if(h++,h>0){var T=new s(f,p,f,g),v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do c=a.stepForward();while(c&&c.value!==">");var w=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else l.value==="</"&&h--}else if(c.value==="/>"){for(var y=0,m=l;m;){if(m.type.indexOf("tag-name")!==-1&&m.value===u){h--;break}else if(m.value==="<")break;m=a.stepBackward(),y++}for(var E=0;E<y;E++)a.stepForward()}}while(l&&h<=0);if(v&&w&&b&&S&&T&&x)return{openTag:new s(v.start.row,v.start.column,w.end.row,w.end.column),closeTag:new s(b.start.row,b.start.column,S.end.row,S.end.column),openTagName:T,closeTagName:x}}}}r.BracketMatch=d}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(n,r,i){var o=n("./lib/oop"),s=n("./lib/lang"),d=n("./bidihandler").BidiHandler,a=n("./config"),c=n("./lib/event_emitter").EventEmitter,l=n("./selection").Selection,u=n("./mode/text").Mode,h=n("./range").Range,f=n("./document").Document,p=n("./background_tokenizer").BackgroundTokenizer,g=n("./search_highlight").SearchHighlight,b=function(){function C(k,I){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++C.$uid,this.$foldData.toString=function(){return this.join(`
|
||
`)},this.bgTokenizer=new p(new u().getTokenizer(),this);var R=this;this.bgTokenizer.on("update",function(M){R._signal("tokenizerUpdate",M)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof k!="object"||!k.getLine)&&(k=new f(k)),this.setDocument(k),this.selection=new l(this),this.$bidiHandler=new d(this),a.resetOptions(this),this.setMode(I),a._signal("session",this),this.destroyed=!1}return C.prototype.setDocument=function(k){this.doc&&this.doc.off("change",this.$onChange),this.doc=k,k.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},C.prototype.getDocument=function(){return this.doc},C.prototype.$resetRowCache=function(k){if(!k){this.$docRowCache=[],this.$screenRowCache=[];return}var I=this.$docRowCache.length,R=this.$getRowCacheIndex(this.$docRowCache,k)+1;I>R&&(this.$docRowCache.splice(R,I),this.$screenRowCache.splice(R,I))},C.prototype.$getRowCacheIndex=function(k,I){for(var R=0,M=k.length-1;R<=M;){var O=R+M>>1,P=k[O];if(I>P)R=O+1;else if(I<P)M=O-1;else return O}return R-1},C.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},C.prototype.onChangeFold=function(k){var I=k.data;this.$resetRowCache(I.start.row)},C.prototype.onChange=function(k){this.$modified=!0,this.$bidiHandler.onChange(k),this.$resetRowCache(k.start.row);var I=this.$updateInternalDataOnChange(k);!this.$fromUndo&&this.$undoManager&&(I&&I.length&&(this.$undoManager.add({action:"removeFolds",folds:I},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(k,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(k),this._signal("change",k)},C.prototype.setValue=function(k){this.doc.setValue(k),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},C.prototype.toString=function(){return this.doc.getValue()},C.prototype.getSelection=function(){return this.selection},C.prototype.getState=function(k){return this.bgTokenizer.getState(k)},C.prototype.getTokens=function(k){return this.bgTokenizer.getTokens(k)},C.prototype.getTokenAt=function(k,I){var R=this.bgTokenizer.getTokens(k),M,O=0;if(I==null){var P=R.length-1;O=this.getLine(k).length}else for(var P=0;P<R.length&&(O+=R[P].value.length,!(O>=I));P++);return M=R[P],M?(M.index=P,M.start=O-M.value.length,M):null},C.prototype.setUndoManager=function(k){if(this.$undoManager=k,this.$informUndoManager&&this.$informUndoManager.cancel(),k){var I=this;k.addSession(this),this.$syncInformUndoManager=function(){I.$informUndoManager.cancel(),I.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},C.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},C.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},C.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},C.prototype.setUseSoftTabs=function(k){this.setOption("useSoftTabs",k)},C.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},C.prototype.setTabSize=function(k){this.setOption("tabSize",k)},C.prototype.getTabSize=function(){return this.$tabSize},C.prototype.isTabStop=function(k){return this.$useSoftTabs&&k.column%this.$tabSize===0},C.prototype.setNavigateWithinSoftTabs=function(k){this.setOption("navigateWithinSoftTabs",k)},C.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},C.prototype.setOverwrite=function(k){this.setOption("overwrite",k)},C.prototype.getOverwrite=function(){return this.$overwrite},C.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},C.prototype.addGutterDecoration=function(k,I){this.$decorations[k]||(this.$decorations[k]=""),this.$decorations[k]+=" "+I,this._signal("changeBreakpoint",{})},C.prototype.removeGutterDecoration=function(k,I){this.$decorations[k]=(this.$decorations[k]||"").replace(" "+I,""),this._signal("changeBreakpoint",{})},C.prototype.getBreakpoints=function(){return this.$breakpoints},C.prototype.setBreakpoints=function(k){this.$breakpoints=[];for(var I=0;I<k.length;I++)this.$breakpoints[k[I]]="ace_breakpoint";this._signal("changeBreakpoint",{})},C.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},C.prototype.setBreakpoint=function(k,I){I===void 0&&(I="ace_breakpoint"),I?this.$breakpoints[k]=I:delete this.$breakpoints[k],this._signal("changeBreakpoint",{})},C.prototype.clearBreakpoint=function(k){delete this.$breakpoints[k],this._signal("changeBreakpoint",{})},C.prototype.addMarker=function(k,I,R,M){var O=this.$markerId++,P={range:k,type:R||"line",renderer:typeof R=="function"?R:null,clazz:I,inFront:!!M,id:O};return M?(this.$frontMarkers[O]=P,this._signal("changeFrontMarker")):(this.$backMarkers[O]=P,this._signal("changeBackMarker")),O},C.prototype.addDynamicMarker=function(k,I){if(k.update){var R=this.$markerId++;return k.id=R,k.inFront=!!I,I?(this.$frontMarkers[R]=k,this._signal("changeFrontMarker")):(this.$backMarkers[R]=k,this._signal("changeBackMarker")),k}},C.prototype.removeMarker=function(k){var I=this.$frontMarkers[k]||this.$backMarkers[k];if(I){var R=I.inFront?this.$frontMarkers:this.$backMarkers;delete R[k],this._signal(I.inFront?"changeFrontMarker":"changeBackMarker")}},C.prototype.getMarkers=function(k){return k?this.$frontMarkers:this.$backMarkers},C.prototype.highlight=function(k){if(!this.$searchHighlight){var I=new g(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(I)}this.$searchHighlight.setRegexp(k)},C.prototype.highlightLines=function(k,I,R,M){typeof I!="number"&&(R=I,I=k),R||(R="ace_step");var O=new h(k,0,I,1/0);return O.id=this.addMarker(O,R,"fullLine",M),O},C.prototype.setAnnotations=function(k){this.$annotations=k,this._signal("changeAnnotation",{})},C.prototype.getAnnotations=function(){return this.$annotations||[]},C.prototype.clearAnnotations=function(){this.setAnnotations([])},C.prototype.$detectNewLine=function(k){var I=k.match(/^.*?(\r?\n)/m);I?this.$autoNewLine=I[1]:this.$autoNewLine=`
|
||
`},C.prototype.getWordRange=function(k,I){var R=this.getLine(k),M=!1;if(I>0&&(M=!!R.charAt(I-1).match(this.tokenRe)),M||(M=!!R.charAt(I).match(this.tokenRe)),M)var O=this.tokenRe;else if(/^\s+$/.test(R.slice(I-1,I+1)))var O=/\s/;else var O=this.nonTokenRe;var P=I;if(P>0){do P--;while(P>=0&&R.charAt(P).match(O));P++}for(var N=I;N<R.length&&R.charAt(N).match(O);)N++;return new h(k,P,k,N)},C.prototype.getAWordRange=function(k,I){for(var R=this.getWordRange(k,I),M=this.getLine(R.end.row);M.charAt(R.end.column).match(/[ \t]/);)R.end.column+=1;return R},C.prototype.setNewLineMode=function(k){this.doc.setNewLineMode(k)},C.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},C.prototype.setUseWorker=function(k){this.setOption("useWorker",k)},C.prototype.getUseWorker=function(){return this.$useWorker},C.prototype.onReloadTokenizer=function(k){var I=k.data;this.bgTokenizer.start(I.first),this._signal("tokenizerUpdate",k)},C.prototype.setMode=function(k,I){if(k&&typeof k=="object"){if(k.getTokenizer)return this.$onChangeMode(k);var R=k,M=R.path}else M=k||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new u),this.$modes[M]&&!R){this.$onChangeMode(this.$modes[M]),I&&I();return}this.$modeId=M,a.loadModule(["mode",M],function(O){if(this.$modeId!==M)return I&&I();this.$modes[M]&&!R?this.$onChangeMode(this.$modes[M]):O&&O.Mode&&(O=new O.Mode(R),R||(this.$modes[M]=O,O.$id=M),this.$onChangeMode(O)),I&&I()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},C.prototype.$onChangeMode=function(k,I){if(I||(this.$modeId=k.$id),this.$mode!==k){var R=this.$mode;this.$mode=k,this.$stopWorker(),this.$useWorker&&this.$startWorker();var M=k.getTokenizer();if(M.on!==void 0){var O=this.onReloadTokenizer.bind(this);M.on("update",O)}this.bgTokenizer.setTokenizer(M),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=k.tokenRe,this.nonTokenRe=k.nonTokenRe,I||(k.attachToSession&&k.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(k.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:R,mode:k}))}},C.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},C.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(k){a.warn("Could not load worker",k),this.$worker=null}},C.prototype.getMode=function(){return this.$mode},C.prototype.setScrollTop=function(k){this.$scrollTop===k||isNaN(k)||(this.$scrollTop=k,this._signal("changeScrollTop",k))},C.prototype.getScrollTop=function(){return this.$scrollTop},C.prototype.setScrollLeft=function(k){this.$scrollLeft===k||isNaN(k)||(this.$scrollLeft=k,this._signal("changeScrollLeft",k))},C.prototype.getScrollLeft=function(){return this.$scrollLeft},C.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},C.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var k=0;return this.lineWidgets.forEach(function(I){I&&I.screenWidth>k&&(k=I.screenWidth)}),this.lineWidgetWidth=k},C.prototype.$computeWidth=function(k){if(this.$modified||k){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var I=this.doc.getAllLines(),R=this.$rowLengthCache,M=0,O=0,P=this.$foldData[O],N=P?P.start.row:1/0,B=I.length,W=0;W<B;W++){if(W>N){if(W=P.end.row+1,W>=B)break;P=this.$foldData[O++],N=P?P.start.row:1/0}R[W]==null&&(R[W]=this.$getStringScreenWidth(I[W])[0]),R[W]>M&&(M=R[W])}this.screenWidth=M}},C.prototype.getLine=function(k){return this.doc.getLine(k)},C.prototype.getLines=function(k,I){return this.doc.getLines(k,I)},C.prototype.getLength=function(){return this.doc.getLength()},C.prototype.getTextRange=function(k){return this.doc.getTextRange(k||this.selection.getRange())},C.prototype.insert=function(k,I){return this.doc.insert(k,I)},C.prototype.remove=function(k){return this.doc.remove(k)},C.prototype.removeFullLines=function(k,I){return this.doc.removeFullLines(k,I)},C.prototype.undoChanges=function(k,I){if(k.length){this.$fromUndo=!0;for(var R=k.length-1;R!=-1;R--){var M=k[R];M.action=="insert"||M.action=="remove"?this.doc.revertDelta(M):M.folds&&this.addFolds(M.folds)}!I&&this.$undoSelect&&(k.selectionBefore?this.selection.fromJSON(k.selectionBefore):this.selection.setRange(this.$getUndoSelection(k,!0))),this.$fromUndo=!1}},C.prototype.redoChanges=function(k,I){if(k.length){this.$fromUndo=!0;for(var R=0;R<k.length;R++){var M=k[R];(M.action=="insert"||M.action=="remove")&&this.doc.$safeApplyDelta(M)}!I&&this.$undoSelect&&(k.selectionAfter?this.selection.fromJSON(k.selectionAfter):this.selection.setRange(this.$getUndoSelection(k,!1))),this.$fromUndo=!1}},C.prototype.setUndoSelect=function(k){this.$undoSelect=k},C.prototype.$getUndoSelection=function(k,I){function R(B){return I?B.action!=="insert":B.action==="insert"}for(var M,O,P=0;P<k.length;P++){var N=k[P];if(N.start){if(!M){R(N)?M=h.fromPoints(N.start,N.end):M=h.fromPoints(N.start,N.start);continue}R(N)?(O=N.start,M.compare(O.row,O.column)==-1&&M.setStart(O),O=N.end,M.compare(O.row,O.column)==1&&M.setEnd(O)):(O=N.start,M.compare(O.row,O.column)==-1&&(M=h.fromPoints(N.start,N.start)))}}return M},C.prototype.replace=function(k,I){return this.doc.replace(k,I)},C.prototype.moveText=function(k,I,R){var M=this.getTextRange(k),O=this.getFoldsInRange(k),P=h.fromPoints(I,I);if(!R){this.remove(k);var N=k.start.row-k.end.row,B=N?-k.end.column:k.start.column-k.end.column;B&&(P.start.row==k.end.row&&P.start.column>k.end.column&&(P.start.column+=B),P.end.row==k.end.row&&P.end.column>k.end.column&&(P.end.column+=B)),N&&P.start.row>=k.end.row&&(P.start.row+=N,P.end.row+=N)}if(P.end=this.insert(P.start,M),O.length){var W=k.start,K=P.start,N=K.row-W.row,B=K.column-W.column;this.addFolds(O.map(function(Y){return Y=Y.clone(),Y.start.row==W.row&&(Y.start.column+=B),Y.end.row==W.row&&(Y.end.column+=B),Y.start.row+=N,Y.end.row+=N,Y}))}return P},C.prototype.indentRows=function(k,I,R){R=R.replace(/\t/g,this.getTabString());for(var M=k;M<=I;M++)this.doc.insertInLine({row:M,column:0},R)},C.prototype.outdentRows=function(k){for(var I=k.collapseRows(),R=new h(0,0,0,0),M=this.getTabSize(),O=I.start.row;O<=I.end.row;++O){var P=this.getLine(O);R.start.row=O,R.end.row=O;for(var N=0;N<M&&P.charAt(N)==" ";++N);N<M&&P.charAt(N)==" "?(R.start.column=N,R.end.column=N+1):(R.start.column=0,R.end.column=N),this.remove(R)}},C.prototype.$moveLines=function(k,I,R){if(k=this.getRowFoldStart(k),I=this.getRowFoldEnd(I),R<0){var M=this.getRowFoldStart(k+R);if(M<0)return 0;var O=M-k}else if(R>0){var M=this.getRowFoldEnd(I+R);if(M>this.doc.getLength()-1)return 0;var O=M-I}else{k=this.$clipRowToDocument(k),I=this.$clipRowToDocument(I);var O=I-k+1}var P=new h(k,0,I,Number.MAX_VALUE),N=this.getFoldsInRange(P).map(function(W){return W=W.clone(),W.start.row+=O,W.end.row+=O,W}),B=R==0?this.doc.getLines(k,I):this.doc.removeFullLines(k,I);return this.doc.insertFullLines(k+O,B),N.length&&this.addFolds(N),O},C.prototype.moveLinesUp=function(k,I){return this.$moveLines(k,I,-1)},C.prototype.moveLinesDown=function(k,I){return this.$moveLines(k,I,1)},C.prototype.duplicateLines=function(k,I){return this.$moveLines(k,I,0)},C.prototype.$clipRowToDocument=function(k){return Math.max(0,Math.min(k,this.doc.getLength()-1))},C.prototype.$clipColumnToRow=function(k,I){return I<0?0:Math.min(this.doc.getLine(k).length,I)},C.prototype.$clipPositionToDocument=function(k,I){if(I=Math.max(0,I),k<0)k=0,I=0;else{var R=this.doc.getLength();k>=R?(k=R-1,I=this.doc.getLine(R-1).length):I=Math.min(this.doc.getLine(k).length,I)}return{row:k,column:I}},C.prototype.$clipRangeToDocument=function(k){k.start.row<0?(k.start.row=0,k.start.column=0):k.start.column=this.$clipColumnToRow(k.start.row,k.start.column);var I=this.doc.getLength()-1;return k.end.row>I?(k.end.row=I,k.end.column=this.doc.getLine(I).length):k.end.column=this.$clipColumnToRow(k.end.row,k.end.column),k},C.prototype.setUseWrapMode=function(k){if(k!=this.$useWrapMode){if(this.$useWrapMode=k,this.$modified=!0,this.$resetRowCache(0),k){var I=this.getLength();this.$wrapData=Array(I),this.$updateWrapData(0,I-1)}this._signal("changeWrapMode")}},C.prototype.getUseWrapMode=function(){return this.$useWrapMode},C.prototype.setWrapLimitRange=function(k,I){(this.$wrapLimitRange.min!==k||this.$wrapLimitRange.max!==I)&&(this.$wrapLimitRange={min:k,max:I},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},C.prototype.adjustWrapLimit=function(k,I){var R=this.$wrapLimitRange;R.max<0&&(R={min:I,max:I});var M=this.$constrainWrapLimit(k,R.min,R.max);return M!=this.$wrapLimit&&M>1?(this.$wrapLimit=M,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},C.prototype.$constrainWrapLimit=function(k,I,R){return I&&(k=Math.max(I,k)),R&&(k=Math.min(R,k)),k},C.prototype.getWrapLimit=function(){return this.$wrapLimit},C.prototype.setWrapLimit=function(k){this.setWrapLimitRange(k,k)},C.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},C.prototype.$updateInternalDataOnChange=function(k){var I=this.$useWrapMode,R=k.action,M=k.start,O=k.end,P=M.row,N=O.row,B=N-P,W=null;if(this.$updating=!0,B!=0)if(R==="remove"){this[I?"$wrapData":"$rowLengthCache"].splice(P,B);var K=this.$foldData;W=this.getFoldsInRange(k),this.removeFolds(W);var q=this.getFoldLine(O.row),re=0;if(q){q.addRemoveChars(O.row,O.column,M.column-O.column),q.shiftRow(-B);var Y=this.getFoldLine(P);Y&&Y!==q&&(Y.merge(q),q=Y),re=K.indexOf(q)+1}for(re;re<K.length;re++){var q=K[re];q.start.row>=O.row&&q.shiftRow(-B)}N=P}else{var Z=Array(B);Z.unshift(P,0);var te=I?this.$wrapData:this.$rowLengthCache;te.splice.apply(te,Z);var K=this.$foldData,q=this.getFoldLine(P),re=0;if(q){var ie=q.range.compareInside(M.row,M.column);ie==0?(q=q.split(M.row,M.column),q&&(q.shiftRow(B),q.addRemoveChars(N,0,O.column-M.column))):ie==-1&&(q.addRemoveChars(P,0,O.column-M.column),q.shiftRow(B)),re=K.indexOf(q)+1}for(re;re<K.length;re++){var q=K[re];q.start.row>=P&&q.shiftRow(B)}}else{B=Math.abs(k.start.column-k.end.column),R==="remove"&&(W=this.getFoldsInRange(k),this.removeFolds(W),B=-B);var q=this.getFoldLine(P);q&&q.addRemoveChars(P,M.column,B)}return I&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,I?this.$updateWrapData(P,N):this.$updateRowLengthCache(P,N),W},C.prototype.$updateRowLengthCache=function(k,I,R){this.$rowLengthCache[k]=null,this.$rowLengthCache[I]=null},C.prototype.$updateWrapData=function(k,I){var R=this.doc.getAllLines(),M=this.getTabSize(),O=this.$wrapData,P=this.$wrapLimit,N,B,W=k;for(I=Math.min(I,R.length-1);W<=I;)B=this.getFoldLine(W,B),B?(N=[],B.walk(function(K,q,re,Y){var Z;if(K!=null){Z=this.$getDisplayTokens(K,N.length),Z[0]=T;for(var te=1;te<Z.length;te++)Z[te]=v}else Z=this.$getDisplayTokens(R[q].substring(Y,re),N.length);N=N.concat(Z)}.bind(this),B.end.row,R[B.end.row].length+1),O[B.start.row]=this.$computeWrapSplits(N,P,M),W=B.end.row+1):(N=this.$getDisplayTokens(R[W]),O[W]=this.$computeWrapSplits(N,P,M),W++)},C.prototype.$computeWrapSplits=function(k,I,R){if(k.length==0)return[];var M=[],O=k.length,P=0,N=0,B=this.$wrapAsCode,W=this.$indentedSoftWrap,K=I<=Math.max(2*R,8)||W===!1?0:Math.floor(I/2);function q(){var ie=0;if(K===0)return ie;if(W)for(var ce=0;ce<k.length;ce++){var he=k[ce];if(he==y)ie+=1;else if(he==m)ie+=R;else{if(he==E)continue;break}}return B&&W!==!1&&(ie+=R),Math.min(ie,K)}function re(ie){for(var ce=ie-P,he=P;he<ie;he++){var ve=k[he];(ve===12||ve===2)&&(ce-=1)}M.length||(Y=q(),M.indent=Y),N+=ce,M.push(N),P=ie}for(var Y=0;O-P>I-Y;){var Z=P+I-Y;if(k[Z-1]>=y&&k[Z]>=y){re(Z);continue}if(k[Z]==T||k[Z]==v){for(Z;Z!=P-1&&k[Z]!=T;Z--);if(Z>P){re(Z);continue}for(Z=P+I,Z;Z<k.length&&k[Z]==v;Z++);if(Z==k.length)break;re(Z);continue}for(var te=Math.max(Z-(I-(I>>2)),P-1);Z>te&&k[Z]<T;)Z--;if(B){for(;Z>te&&k[Z]<T;)Z--;for(;Z>te&&k[Z]==w;)Z--}else for(;Z>te&&k[Z]<y;)Z--;if(Z>te){re(++Z);continue}Z=P+I,k[Z]==S&&Z--,re(Z-Y)}return M},C.prototype.$getDisplayTokens=function(k,I){var R=[],M;I=I||0;for(var O=0;O<k.length;O++){var P=k.charCodeAt(O);if(P==9){M=this.getScreenTabSize(R.length+I),R.push(m);for(var N=1;N<M;N++)R.push(E)}else P==32?R.push(y):P>39&&P<48||P>57&&P<64?R.push(w):P>=4352&&A(P)?R.push(x,S):R.push(x)}return R},C.prototype.$getStringScreenWidth=function(k,I,R){if(I==0)return[0,0];I==null&&(I=1/0),R=R||0;var M,O;for(O=0;O<k.length&&(M=k.charCodeAt(O),M==9?R+=this.getScreenTabSize(R):M>=4352&&A(M)?R+=2:R+=1,!(R>I));O++);return[R,O]},C.prototype.getRowLength=function(k){var I=1;return this.lineWidgets&&(I+=this.lineWidgets[k]&&this.lineWidgets[k].rowCount||0),!this.$useWrapMode||!this.$wrapData[k]?I:this.$wrapData[k].length+I},C.prototype.getRowLineCount=function(k){return!this.$useWrapMode||!this.$wrapData[k]?1:this.$wrapData[k].length+1},C.prototype.getRowWrapIndent=function(k){if(this.$useWrapMode){var I=this.screenToDocumentPosition(k,Number.MAX_VALUE),R=this.$wrapData[I.row];return R.length&&R[0]<I.column?R.indent:0}else return 0},C.prototype.getScreenLastRowColumn=function(k){var I=this.screenToDocumentPosition(k,Number.MAX_VALUE);return this.documentToScreenColumn(I.row,I.column)},C.prototype.getDocumentLastRowColumn=function(k,I){var R=this.documentToScreenRow(k,I);return this.getScreenLastRowColumn(R)},C.prototype.getDocumentLastRowColumnPosition=function(k,I){var R=this.documentToScreenRow(k,I);return this.screenToDocumentPosition(R,Number.MAX_VALUE/10)},C.prototype.getRowSplitData=function(k){if(this.$useWrapMode)return this.$wrapData[k]},C.prototype.getScreenTabSize=function(k){return this.$tabSize-(k%this.$tabSize|0)},C.prototype.screenToDocumentRow=function(k,I){return this.screenToDocumentPosition(k,I).row},C.prototype.screenToDocumentColumn=function(k,I){return this.screenToDocumentPosition(k,I).column},C.prototype.screenToDocumentPosition=function(k,I,R){if(k<0)return{row:0,column:0};var M,O=0,P=0,N,B=0,W=0,K=this.$screenRowCache,q=this.$getRowCacheIndex(K,k),re=K.length;if(re&&q>=0)var B=K[q],O=this.$docRowCache[q],Y=k>K[re-1];else var Y=!re;for(var Z=this.getLength()-1,te=this.getNextFoldLine(O),ie=te?te.start.row:1/0;B<=k&&(W=this.getRowLength(O),!(B+W>k||O>=Z));)B+=W,O++,O>ie&&(O=te.end.row+1,te=this.getNextFoldLine(O,te),ie=te?te.start.row:1/0),Y&&(this.$docRowCache.push(O),this.$screenRowCache.push(B));if(te&&te.start.row<=O)M=this.getFoldDisplayLine(te),O=te.start.row;else{if(B+W<=k||O>Z)return{row:Z,column:this.getLine(Z).length};M=this.getLine(O),te=null}var ce=0,he=Math.floor(k-B);if(this.$useWrapMode){var ve=this.$wrapData[O];ve&&(N=ve[he],he>0&&ve.length&&(ce=ve.indent,P=ve[he-1]||ve[ve.length-1],M=M.substring(P)))}return R!==void 0&&this.$bidiHandler.isBidiRow(B+he,O,he)&&(I=this.$bidiHandler.offsetToCol(R)),P+=this.$getStringScreenWidth(M,I-ce)[1],this.$useWrapMode&&P>=N&&(P=N-1),te?te.idxToPosition(P):{row:O,column:P}},C.prototype.documentToScreenPosition=function(k,I){if(typeof I>"u")var R=this.$clipPositionToDocument(k.row,k.column);else R=this.$clipPositionToDocument(k,I);k=R.row,I=R.column;var M=0,O=null,P=null;P=this.getFoldAt(k,I,1),P&&(k=P.start.row,I=P.start.column);var N,B=0,W=this.$docRowCache,K=this.$getRowCacheIndex(W,k),q=W.length;if(q&&K>=0)var B=W[K],M=this.$screenRowCache[K],re=k>W[q-1];else var re=!q;for(var Y=this.getNextFoldLine(B),Z=Y?Y.start.row:1/0;B<k;){if(B>=Z){if(N=Y.end.row+1,N>k)break;Y=this.getNextFoldLine(N,Y),Z=Y?Y.start.row:1/0}else N=B+1;M+=this.getRowLength(B),B=N,re&&(this.$docRowCache.push(B),this.$screenRowCache.push(M))}var te="";Y&&B>=Z?(te=this.getFoldDisplayLine(Y,k,I),O=Y.start.row):(te=this.getLine(k).substring(0,I),O=k);var ie=0;if(this.$useWrapMode){var ce=this.$wrapData[O];if(ce){for(var he=0;te.length>=ce[he];)M++,he++;te=te.substring(ce[he-1]||0,te.length),ie=he>0?ce.indent:0}}return this.lineWidgets&&this.lineWidgets[B]&&this.lineWidgets[B].rowsAbove&&(M+=this.lineWidgets[B].rowsAbove),{row:M,column:ie+this.$getStringScreenWidth(te)[0]}},C.prototype.documentToScreenColumn=function(k,I){return this.documentToScreenPosition(k,I).column},C.prototype.documentToScreenRow=function(k,I){return this.documentToScreenPosition(k,I).row},C.prototype.getScreenLength=function(){var k=0,I=null;if(this.$useWrapMode)for(var O=this.$wrapData.length,P=0,M=0,I=this.$foldData[M++],N=I?I.start.row:1/0;P<O;){var B=this.$wrapData[P];k+=B?B.length+1:1,P++,P>N&&(P=I.end.row+1,I=this.$foldData[M++],N=I?I.start.row:1/0)}else{k=this.getLength();for(var R=this.$foldData,M=0;M<R.length;M++)I=R[M],k-=I.end.row-I.start.row}return this.lineWidgets&&(k+=this.$getWidgetScreenLength()),k},C.prototype.$setFontMetrics=function(k){this.$enableVarChar&&(this.$getStringScreenWidth=function(I,R,M){if(R===0)return[0,0];R||(R=1/0),M=M||0;var O,P;for(P=0;P<I.length&&(O=I.charAt(P),O===" "?M+=this.getScreenTabSize(M):M+=k.getCharacterWidth(O),!(M>R));P++);return[M,P]})},C.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},C}();b.$uid=0,b.prototype.$modes=a.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=A,o.implement(b.prototype,c);var x=1,S=2,T=3,v=4,w=9,y=10,m=11,E=12;function A(C){return C<4352?!1:C>=4352&&C<=4447||C>=4515&&C<=4519||C>=4602&&C<=4607||C>=9001&&C<=9002||C>=11904&&C<=11929||C>=11931&&C<=12019||C>=12032&&C<=12245||C>=12272&&C<=12283||C>=12288&&C<=12350||C>=12353&&C<=12438||C>=12441&&C<=12543||C>=12549&&C<=12589||C>=12593&&C<=12686||C>=12688&&C<=12730||C>=12736&&C<=12771||C>=12784&&C<=12830||C>=12832&&C<=12871||C>=12880&&C<=13054||C>=13056&&C<=19903||C>=19968&&C<=42124||C>=42128&&C<=42182||C>=43360&&C<=43388||C>=44032&&C<=55203||C>=55216&&C<=55238||C>=55243&&C<=55291||C>=63744&&C<=64255||C>=65040&&C<=65049||C>=65072&&C<=65106||C>=65108&&C<=65126||C>=65128&&C<=65131||C>=65281&&C<=65376||C>=65504&&C<=65510}n("./edit_session/folding").Folding.call(b.prototype),n("./edit_session/bracket_match").BracketMatch.call(b.prototype),a.defineOptions(b.prototype,"session",{wrap:{set:function(C){if(!C||C=="off"?C=!1:C=="free"?C=!0:C=="printMargin"?C=-1:typeof C=="string"&&(C=parseInt(C,10)||!1),this.$wrap!=C)if(this.$wrap=C,!C)this.setUseWrapMode(!1);else{var k=typeof C=="number"?C:null;this.setWrapLimitRange(k,k),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(C){C=C=="auto"?this.$mode.type!="text":C!="text",C!=this.$wrapAsCode&&(this.$wrapAsCode=C,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(C){this.$useWorker=C,this.$stopWorker(),C&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(C){C=parseInt(C),C>0&&this.$tabSize!==C&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=C,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(C){this.setFoldStyle(C)},handlesSet:!0},overwrite:{set:function(C){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(C){this.doc.setNewLineMode(C)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(C){this.setMode(C)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,i){var o=n("./lib/lang"),s=n("./lib/oop"),d=n("./range").Range,a=function(){function l(){this.$options={}}return l.prototype.set=function(u){return s.mixin(this.$options,u),this},l.prototype.getOptions=function(){return o.copyObject(this.$options)},l.prototype.setOptions=function(u){this.$options=u},l.prototype.find=function(u){var h=this.$options,f=this.$matchIterator(u,h);if(!f)return!1;var p=null;return f.forEach(function(g,b,x,S){return p=new d(g,b,x,S),b==S&&h.start&&h.start.start&&h.skipCurrent!=!1&&p.isEqual(h.start)?(p=null,!1):!0}),p},l.prototype.findAll=function(u){var h=this.$options;if(!h.needle)return[];this.$assembleRegExp(h);var f=h.range,p=f?u.getLines(f.start.row,f.end.row):u.doc.getAllLines(),g=[],b=h.re;if(h.$isMultiLine){var x=b.length,S=p.length-x,T;e:for(var v=b.offset||0;v<=S;v++){for(var w=0;w<x;w++)if(p[v+w].search(b[w])==-1)continue e;var y=p[v],m=p[v+x-1],E=y.length-y.match(b[0])[0].length,A=m.match(b[x-1])[0].length;T&&T.end.row===v&&T.end.column>E||(g.push(T=new d(v,E,v+x-1,A)),x>2&&(v=v+x-2))}}else for(var C=0;C<p.length;C++)for(var k=o.getMatchOffsets(p[C],b),w=0;w<k.length;w++){var I=k[w];g.push(new d(C,I.offset,C,I.offset+I.length))}if(f){for(var R=f.start.column,M=f.end.column,C=0,w=g.length-1;C<w&&g[C].start.column<R&&g[C].start.row==0;)C++;for(var O=f.end.row-f.start.row;C<w&&g[w].end.column>M&&g[w].end.row==O;)w--;for(g=g.slice(C,w+1),C=0,w=g.length;C<w;C++)g[C].start.row+=f.start.row,g[C].end.row+=f.start.row}return g},l.prototype.replace=function(u,h){var f=this.$options,p=this.$assembleRegExp(f);if(f.$isMultiLine)return h;if(p){var g=p.exec(u);if(!g||g[0].length!=u.length)return null;if(h=u.replace(p,h),f.preserveCase){h=h.split("");for(var b=Math.min(u.length,u.length);b--;){var x=u[b];x&&x.toLowerCase()!=x?h[b]=h[b].toUpperCase():h[b]=h[b].toLowerCase()}h=h.join("")}return h}},l.prototype.$assembleRegExp=function(u,h){if(u.needle instanceof RegExp)return u.re=u.needle;var f=u.needle;if(!u.needle)return u.re=!1;u.regExp||(f=o.escapeRegExp(f)),u.wholeWord&&(f=c(f,u));var p=u.caseSensitive?"gm":"gmi";if(u.$isMultiLine=!h&&/[\n\r]/.test(f),u.$isMultiLine)return u.re=this.$assembleMultilineRegExp(f,p);try{var g=new RegExp(f,p)}catch{g=!1}return u.re=g},l.prototype.$assembleMultilineRegExp=function(u,h){for(var f=u.replace(/\r\n|\r|\n/g,`$
|
||
^`).split(`
|
||
`),p=[],g=0;g<f.length;g++)try{p.push(new RegExp(f[g],h))}catch{return!1}return p},l.prototype.$matchIterator=function(u,h){var f=this.$assembleRegExp(h);if(!f)return!1;var p=h.backwards==!0,g=h.skipCurrent!=!1,b=h.range,x=h.start;x||(x=b?b[p?"end":"start"]:u.selection.getRange()),x.start&&(x=x[g!=p?"end":"start"]);var S=b?b.start.row:0,T=b?b.end.row:u.getLength()-1;if(p)var v=function(m){var E=x.row;if(!y(E,x.column,m)){for(E--;E>=S;E--)if(y(E,Number.MAX_VALUE,m))return;if(h.wrap!=!1){for(E=T,S=x.row;E>=S;E--)if(y(E,Number.MAX_VALUE,m))return}}};else var v=function(E){var A=x.row;if(!y(A,x.column,E)){for(A=A+1;A<=T;A++)if(y(A,0,E))return;if(h.wrap!=!1){for(A=S,T=x.row;A<=T;A++)if(y(A,0,E))return}}};if(h.$isMultiLine)var w=f.length,y=function(m,E,A){var C=p?m-w+1:m;if(!(C<0||C+w>u.getLength())){var k=u.getLine(C),I=k.search(f[0]);if(!(!p&&I<E||I===-1)){for(var R=1;R<w;R++)if(k=u.getLine(C+R),k.search(f[R])==-1)return;var M=k.match(f[w-1])[0].length;if(!(p&&M>E)&&A(C,I,C+w-1,M))return!0}}};else if(p)var y=function(E,A,C){var k=u.getLine(E),I=[],R,M=0;for(f.lastIndex=0;R=f.exec(k);){var O=R[0].length;if(M=R.index,!O){if(M>=k.length)break;f.lastIndex=M+=1}if(R.index+O>A)break;I.push(R.index,O)}for(var P=I.length-1;P>=0;P-=2){var N=I[P-1],O=I[P];if(C(E,N,E,N+O))return!0}};else var y=function(E,A,C){var k=u.getLine(E),I,R;for(f.lastIndex=A;R=f.exec(k);){var M=R[0].length;if(I=R.index,C(E,I,E,I+M))return!0;if(!M&&(f.lastIndex=I+=1,I>=k.length))return!1}};return{forEach:v}},l}();function c(l,u){function h(f){return/\w/.test(f)||u.regExp?"\\b":""}return h(l[0])+l+h(l[l.length-1])}r.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,i){var o=n("../lib/keys"),s=n("../lib/useragent"),d=o.KEY_MODS;function a(l,u){this.platform=u||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(l),this.$singleCommand=!0}function c(l,u){a.call(this,l,u),this.$singleCommand=!1}c.prototype=a.prototype,function(){this.addCommand=function(u){this.commands[u.name]&&this.removeCommand(u),this.commands[u.name]=u,u.bindKey&&this._buildKeyHash(u)},this.removeCommand=function(u,h){var f=u&&(typeof u=="string"?u:u.name);u=this.commands[f],h||delete this.commands[f];var p=this.commandKeyBinding;for(var g in p){var b=p[g];if(b==u)delete p[g];else if(Array.isArray(b)){var x=b.indexOf(u);x!=-1&&(b.splice(x,1),b.length==1&&(p[g]=b[0]))}}},this.bindKey=function(u,h,f){if(typeof u=="object"&&u&&(f==null&&(f=u.position),u=u[this.platform]),!!u){if(typeof h=="function")return this.addCommand({exec:h,bindKey:u,name:h.name||u});u.split("|").forEach(function(p){var g="";if(p.indexOf(" ")!=-1){var b=p.split(/\s+/);p=b.pop(),b.forEach(function(T){var v=this.parseKeys(T),w=d[v.hashId]+v.key;g+=(g?" ":"")+w,this._addCommandToBinding(g,"chainKeys")},this),g+=" "}var x=this.parseKeys(p),S=d[x.hashId]+x.key;this._addCommandToBinding(g+S,h,f)},this)}};function l(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}this._addCommandToBinding=function(u,h,f){var p=this.commandKeyBinding,g;if(!h)delete p[u];else if(!p[u]||this.$singleCommand)p[u]=h;else{Array.isArray(p[u])?(g=p[u].indexOf(h))!=-1&&p[u].splice(g,1):p[u]=[p[u]],typeof f!="number"&&(f=l(h));var b=p[u];for(g=0;g<b.length;g++){var x=b[g],S=l(x);if(S>f)break}b.splice(g,0,h)}},this.addCommands=function(u){u&&Object.keys(u).forEach(function(h){var f=u[h];if(f){if(typeof f=="string")return this.bindKey(f,h);typeof f=="function"&&(f={exec:f}),typeof f=="object"&&(f.name||(f.name=h),this.addCommand(f))}},this)},this.removeCommands=function(u){Object.keys(u).forEach(function(h){this.removeCommand(u[h])},this)},this.bindKeys=function(u){Object.keys(u).forEach(function(h){this.bindKey(h,u[h])},this)},this._buildKeyHash=function(u){this.bindKey(u.bindKey,u)},this.parseKeys=function(u){var h=u.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(S){return S}),f=h.pop(),p=o[f];if(o.FUNCTION_KEYS[p])f=o.FUNCTION_KEYS[p].toLowerCase();else if(h.length){if(h.length==1&&h[0]=="shift")return{key:f.toUpperCase(),hashId:-1}}else return{key:f,hashId:-1};for(var g=0,b=h.length;b--;){var x=o.KEY_MODS[h[b]];if(x==null)return typeof console<"u"&&console.error("invalid modifier "+h[b]+" in "+u),!1;g|=x}return{key:f,hashId:g}},this.findKeyCommand=function(h,f){var p=d[h]+f;return this.commandKeyBinding[p]},this.handleKeyboard=function(u,h,f,p){if(!(p<0)){var g=d[h]+f,b=this.commandKeyBinding[g];return u.$keyChain&&(u.$keyChain+=" "+g,b=this.commandKeyBinding[u.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(u.$keyChain=u.$keyChain||g,{command:"null"}):(u.$keyChain&&((!h||h==4)&&f.length==1?u.$keyChain=u.$keyChain.slice(0,-g.length-1):(h==-1||p>0)&&(u.$keyChain="")),{command:b})}},this.getStatusText=function(u,h){return h.$keyChain||""}}.call(a.prototype),r.HashHandler=a,r.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,i){var o=this&&this.__extends||function(){var l=function(u,h){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])},l(u,h)};return function(u,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");l(u,h);function f(){this.constructor=u}u.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}(),s=n("../lib/oop"),d=n("../keyboard/hash_handler").MultiHashHandler,a=n("../lib/event_emitter").EventEmitter,c=function(l){o(u,l);function u(h,f){var p=l.call(this,f,h)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(g){return g.args?g.command.exec(g.editor,g.args,g.event,!1):g.command.exec(g.editor,{},g.event,!0)}),p}return u.prototype.exec=function(h,f,p){if(Array.isArray(h)){for(var g=h.length;g--;)if(this.exec(h[g],f,p))return!0;return!1}if(typeof h=="string"&&(h=this.commands[h]),!h||f&&f.$readOnly&&!h.readOnly||this.$checkCommandState!=!1&&h.isAvailable&&!h.isAvailable(f))return!1;var b={editor:f,command:h,args:p};return b.returnValue=this._emit("exec",b),this._signal("afterExec",b),b.returnValue!==!1},u.prototype.toggleRecording=function(h){if(!this.$inReplay)return h&&h._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(f){this.macro.push([f.command,f.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},u.prototype.replay=function(h){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(h);try{this.$inReplay=!0,this.macro.forEach(function(f){typeof f=="string"?this.exec(f,h):this.exec(f[0],h,f[1])},this)}finally{this.$inReplay=!1}}},u.prototype.trimMacro=function(h){return h.map(function(f){return typeof f[0]!="string"&&(f[0]=f[0].name),f[1]||(f=f[0]),f})},u}(d);s.implement(c.prototype,a),r.CommandManager=c}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,i){var o=n("../lib/lang"),s=n("../config"),d=n("../range").Range;function a(l,u){return{win:l,mac:u}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(l){s.loadModule("ace/ext/settings_menu",function(u){u.init(l),l.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(l){s.loadModule("ace/ext/error_marker",function(u){u.showErrorMarker(l,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(l){s.loadModule("ace/ext/error_marker",function(u){u.showErrorMarker(l,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(l){l.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(l){l.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(l,u){typeof u=="number"&&!isNaN(u)&&l.gotoLine(u),l.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(l){l.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(l){l.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(l){l.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(l){l.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(l){l.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(l){l.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(l){l.session.foldAll(),l.session.unfold(l.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(l){l.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(l){l.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(l){l.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(l){l.selection.isEmpty()?l.selection.selectWord():l.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(l){l.selection.isEmpty()?l.selection.selectWord():l.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(l){s.loadModule("ace/ext/searchbox",function(u){u.Search(l)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(l){l.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(l){l.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(l){l.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(l){l.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(l,u){l.navigateUp(u.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(l){l.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(l){l.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(l){l.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(l,u){l.navigateDown(u.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(l){l.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(l){l.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(l){l.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(l){l.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(l){l.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(l,u){l.navigateLeft(u.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(l){l.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(l){l.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(l){l.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(l){l.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(l){l.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(l,u){l.navigateRight(u.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(l){l.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(l){l.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(l){l.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(l){l.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(l){l.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(l){l.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(l){l.renderer.scrollBy(0,-2*l.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(l){l.renderer.scrollBy(0,2*l.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(l){l.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(l){l.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(l){l.commands.toggleRecording(l)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(l){l.commands.replay(l)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(l){l.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(l){l.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(l){l.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(l){},readOnly:!0},{name:"cut",description:"Cut",exec:function(l){var u=l.$copyWithEmptySelection&&l.selection.isEmpty(),h=u?l.selection.getLineRange():l.selection.getRange();l._emit("cut",h),h.isEmpty()||l.session.remove(h),l.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(l,u){l.$handlePaste(u)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(l){l.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(l){l.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(l){l.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(l){l.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(l){l.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(l){l.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(l){l.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(l){s.loadModule("ace/ext/searchbox",function(u){u.Search(l,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(l){l.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(l){l.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(l){l.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(l){l.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(l){l.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(l){l.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(l){l.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(l){l.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(l){if(l.selection.isEmpty())l.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(l){l.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(l){l.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(l){var u=l.selection.getRange();u.start.column=0,l.session.remove(u)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(l){var u=l.selection.getRange();u.end.column=Number.MAX_VALUE,l.session.remove(u)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(l){l.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(l){l.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(l){l.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(l){l.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(l){l.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(l){l.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(l,u){l.insert(u)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(l,u){l.insert(o.stringRepeat(u.text||"",u.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(l){l.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(l){l.transposeLetters()},multiSelectAction:function(l){l.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(l){l.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(l){l.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(l){l.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(l){var u=l.selection.getRange();u.start.column=u.end.column=0,u.end.row++,l.selection.setRange(u,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(l){l.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(l){for(var u=l.selection.isBackwards(),h=u?l.selection.getSelectionLead():l.selection.getSelectionAnchor(),f=u?l.selection.getSelectionAnchor():l.selection.getSelectionLead(),p=l.session.doc.getLine(h.row).length,g=l.session.doc.getTextRange(l.selection.getRange()),b=g.replace(/\n\s*/," ").length,x=l.session.doc.getLine(h.row),S=h.row+1;S<=f.row+1;S++){var T=o.stringTrimLeft(o.stringTrimRight(l.session.doc.getLine(S)));T.length!==0&&(T=" "+T),x+=T}f.row+1<l.session.doc.getLength()-1&&(x+=l.session.doc.getNewLineCharacter()),l.clearSelection(),l.session.doc.replace(new d(h.row,0,f.row+2,0),x),b>0?(l.selection.moveCursorTo(h.row,h.column),l.selection.selectTo(h.row,h.column+b)):(p=l.session.doc.getLine(h.row).length>p?p+1:p,l.selection.moveCursorTo(h.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(l){var u=l.session.doc.getLength()-1,h=l.session.doc.getLine(u).length,f=l.selection.rangeList.ranges,p=[];f.length<1&&(f=[l.selection.getRange()]);for(var g=0;g<f.length;g++)g==f.length-1&&(f[g].end.row===u&&f[g].end.column===h||p.push(new d(f[g].end.row,f[g].end.column,u,h))),g===0?f[g].start.row===0&&f[g].start.column===0||p.push(new d(0,0,f[g].start.row,f[g].start.column)):p.push(new d(f[g-1].end.row,f[g-1].end.column,f[g].start.row,f[g].start.column));l.exitMultiSelectMode(),l.clearSelection();for(var g=0;g<p.length;g++)l.selection.addRange(p[g],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(l){l.selection.clearSelection(),l.navigateLineEnd(),l.insert(`
|
||
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(l){l.selection.clearSelection();var u=l.getCursorPosition();l.selection.moveTo(u.row-1,Number.MAX_VALUE),l.insert(`
|
||
`),u.row===0&&l.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:a("F1","F1"),exec:function(l){l.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(l){l.prompt({$type:"modes"})},readOnly:!0}];for(var c=1;c<9;c++)r.commands.push({name:"foldToLevel"+c,description:"Fold To Level "+c,level:c,exec:function(l){l.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("./lib/dom"),s=function(){function d(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return d.prototype.getRowLength=function(a){var c;return this.lineWidgets?c=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:c=0,!this.$useWrapMode||!this.$wrapData[a]?1+c:this.$wrapData[a].length+1+c},d.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(c){c&&c.rowCount&&!c.hidden&&(a+=c.rowCount)}),a},d.prototype.$onChangeEditor=function(a){this.attach(a.editor)},d.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},d.prototype.detach=function(a){var c=this.editor;if(c){this.editor=null,c.widgetManager=null,c.renderer.off("beforeRender",this.measureWidgets),c.renderer.off("afterRender",this.renderWidgets);var l=this.session.lineWidgets;l&&l.forEach(function(u){u&&u.el&&u.el.parentNode&&(u._inDocument=!1,u.el.parentNode.removeChild(u.el))})}},d.prototype.updateOnFold=function(a,c){var l=c.lineWidgets;if(!(!l||!a.action)){for(var u=a.data,h=u.start.row,f=u.end.row,p=a.action=="add",g=h+1;g<f;g++)l[g]&&(l[g].hidden=p);l[f]&&(p?l[h]?l[f].hidden=p:l[h]=l[f]:(l[h]==l[f]&&(l[h]=void 0),l[f].hidden=p))}},d.prototype.updateOnChange=function(a){var c=this.session.lineWidgets;if(c){var l=a.start.row,u=a.end.row-l;if(u!==0)if(a.action=="remove"){var h=c.splice(l+1,u);!c[l]&&h[h.length-1]&&(c[l]=h.pop()),h.forEach(function(p){p&&this.removeLineWidget(p)},this),this.$updateRows()}else{var f=new Array(u);c[l]&&c[l].column!=null&&a.start.column>c[l].column&&l++,f.unshift(l,0),c.splice.apply(c,f),this.$updateRows()}}},d.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var c=!0;a.forEach(function(l,u){if(l)for(c=!1,l.row=u;l.$oldWidget;)l.$oldWidget.row=u,l=l.$oldWidget}),c&&(this.session.lineWidgets=null)}},d.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[a.row];return c&&(a.$oldWidget=c,c.el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},d.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var c=this.editor.renderer;a.html&&!a.el&&(a.el=o.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=o.createElement("div"),a.el.textContent=a.text),a.el&&(o.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&o.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex=5,c.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex=3),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/c.layerConfig.lineHeight);var l=this.session.getFoldAt(a.row,0);if(a.$fold=l,l){var u=this.session.lineWidgets;a.row==l.end.row&&!u[l.start.row]?u[l.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(a),a},d.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var c=this.session.lineWidgets[a.row];if(c==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;c;){if(c.$oldWidget==a){c.$oldWidget=a.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},d.prototype.getWidgetsAtRow=function(a){for(var c=this.session.lineWidgets,l=c&&c[a],u=[];l;)u.push(l),l=l.$oldWidget;return u},d.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},d.prototype.measureWidgets=function(a,c){var l=this.session._changedWidgets,u=c.layerConfig;if(!(!l||!l.length)){for(var h=1/0,f=0;f<l.length;f++){var p=l[f];if(!(!p||!p.el)&&p.session==this.session){if(!p._inDocument){if(this.session.lineWidgets[p.row]!=p)continue;p._inDocument=!0,c.container.appendChild(p.el)}p.h=p.el.offsetHeight,p.fixedWidth||(p.w=p.el.offsetWidth,p.screenWidth=Math.ceil(p.w/u.characterWidth));var g=p.h/u.lineHeight;p.coverLine&&(g-=this.session.getRowLineCount(p.row),g<0&&(g=0)),p.rowCount!=g&&(p.rowCount=g,p.row<h&&(h=p.row))}}h!=1/0&&(this.session._emit("changeFold",{data:{start:{row:h}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},d.prototype.renderWidgets=function(a,c){var l=c.layerConfig,u=this.session.lineWidgets;if(u){for(var h=Math.min(this.firstRow,l.firstRow),f=Math.max(this.lastRow,l.lastRow,u.length);h>0&&!u[h];)h--;this.firstRow=l.firstRow,this.lastRow=l.lastRow,c.$cursorLayer.config=l;for(var p=h;p<=f;p++){var g=u[p];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,c.container.appendChild(g.el));var b=c.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;g.coverLine||(b+=l.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=b-l.offset+"px";var x=g.coverGutter?0:c.gutterWidth;g.fixedWidth||(x-=c.scrollLeft),g.el.style.left=x+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=l.width+2*l.padding+"px"),g.fixedWidth?g.el.style.right=c.scrollBar.getWidth()+"px":g.el.style.right=""}}}},d}();r.LineWidgets=s}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,i){var o=n("../lib/keys"),s=n("../mouse/default_gutter_handler").GutterTooltip,d=function(){function a(c){this.editor=c,this.gutterLayer=c.renderer.$gutterLayer,this.element=c.renderer.$gutter,this.lines=c.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new s(this.editor)}return a.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},a.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},a.prototype.$onGutterKeyDown=function(c){if(this.annotationTooltip.isOpen){c.preventDefault(),c.keyCode===o.escape&&this.annotationTooltip.hide();return}if(c.target===this.element){if(c.keyCode!=o.enter)return;c.preventDefault();var l=this.editor.getCursorPosition().row;this.editor.isRowVisible(l)||this.editor.scrollToLine(l,!0,!0),setTimeout(function(){var g=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),b=this.$findNearestFoldWidget(g),x=this.$findNearestAnnotation(g);if(!(b===null&&x===null)){if(b===null&&x!==null){this.activeRowIndex=x,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(b!==null&&x===null){this.activeRowIndex=b,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(x-g)<Math.abs(b-g)){this.activeRowIndex=x,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=b,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}.bind(this),10);return}if(c.keyCode===o.tab){c.preventDefault();return}if(c.keyCode===o.escape){c.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(c.keyCode===o.up){switch(c.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(c.keyCode===o.down){switch(c.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(c.keyCode===o.left&&(c.preventDefault(),this.$switchLane("annotation")),c.keyCode===o.right&&(c.preventDefault(),this.$switchLane("fold")),c.keyCode===o.enter||c.keyCode===o.space){switch(c.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var u=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),c),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==u&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(u),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var h=this.lines.cells[this.activeRowIndex].element.childNodes[2],f=h.getBoundingClientRect(),p=this.annotationTooltip.getElement().style;p.left=f.right+"px",p.top=f.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},a.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},a.prototype.$isFoldWidgetVisible=function(c){var l=this.editor.isRowFullyVisible(this.$rowIndexToRow(c)),u=this.$getFoldWidget(c).style.display!=="none";return l&&u},a.prototype.$isAnnotationVisible=function(c){var l=this.editor.isRowFullyVisible(this.$rowIndexToRow(c)),u=this.$getAnnotation(c).style.display!=="none";return l&&u},a.prototype.$getFoldWidget=function(c){var l=this.lines.get(c),u=l.element;return u.childNodes[1]},a.prototype.$getAnnotation=function(c){var l=this.lines.get(c),u=l.element;return u.childNodes[2]},a.prototype.$findNearestFoldWidget=function(c){if(this.$isFoldWidgetVisible(c))return c;for(var l=0;c-l>0||c+l<this.lines.getLength()-1;){if(l++,c-l>=0&&this.$isFoldWidgetVisible(c-l))return c-l;if(c+l<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+l))return c+l}return null},a.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var l=0;c-l>0||c+l<this.lines.getLength()-1;){if(l++,c-l>=0&&this.$isAnnotationVisible(c-l))return c-l;if(c+l<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+l))return c+l}return null},a.prototype.$focusFoldWidget=function(c){if(c!=null){var l=this.$getFoldWidget(c);l.classList.add(this.editor.renderer.keyboardFocusClassName),l.focus()}},a.prototype.$focusAnnotation=function(c){if(c!=null){var l=this.$getAnnotation(c);l.classList.add(this.editor.renderer.keyboardFocusClassName),l.setAttribute("role","button"),l.focus()}},a.prototype.$blurFoldWidget=function(c){var l=this.$getFoldWidget(c);l.classList.remove(this.editor.renderer.keyboardFocusClassName),l.blur()},a.prototype.$blurAnnotation=function(c){var l=this.$getAnnotation(c);l.classList.remove(this.editor.renderer.keyboardFocusClassName),l.removeAttribute("role"),l.blur()},a.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},a.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c<this.lines.getLength()-1;)if(c++,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},a.prototype.$moveAnnotationUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c<this.lines.getLength()-1;)if(c++,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$switchLane=function(c){switch(c){case"annotation":if(this.activeLane==="annotation")break;var l=this.$findNearestAnnotation(this.activeRowIndex);if(l==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=l,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var u=this.$findNearestFoldWidget(this.activeRowIndex);if(u==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$focusFoldWidget(this.activeRowIndex);break}},a.prototype.$rowIndexToRow=function(c){var l=this.lines.get(c);return l?l.row:null},a.prototype.$rowToRowIndex=function(c){for(var l=0;l<this.lines.getLength();l++){var u=this.lines.get(l);if(u.row==c)return l}return null},a}();r.GutterKeyboardHandler=d}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(n,r,i){var o=this&&this.__values||function(R){var M=typeof Symbol=="function"&&Symbol.iterator,O=M&&R[M],P=0;if(O)return O.call(R);if(R&&typeof R.length=="number")return{next:function(){return R&&P>=R.length&&(R=void 0),{value:R&&R[P++],done:!R}}};throw new TypeError(M?"Object is not iterable.":"Symbol.iterator is not defined.")},s=n("./lib/oop"),d=n("./lib/dom"),a=n("./lib/lang"),c=n("./lib/useragent"),l=n("./keyboard/textinput").TextInput,u=n("./mouse/mouse_handler").MouseHandler,h=n("./mouse/fold_handler").FoldHandler,f=n("./keyboard/keybinding").KeyBinding,p=n("./edit_session").EditSession,g=n("./search").Search,b=n("./range").Range,x=n("./lib/event_emitter").EventEmitter,S=n("./commands/command_manager").CommandManager,T=n("./commands/default_commands").commands,v=n("./config"),w=n("./token_iterator").TokenIterator,y=n("./line_widgets").LineWidgets,m=n("./keyboard/gutter_handler").GutterKeyboardHandler,E=n("./config").nls,A=n("./clipboard"),C=n("./lib/keys"),k=function(){function R(M,O,P){this.$toDestroy=[];var N=M.getContainerElement();this.container=N,this.renderer=M,this.id="editor"+ ++R.$uid,this.commands=new S(c.isMac?"mac":"win",T),typeof document=="object"&&(this.textInput=new l(M.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new u(this),new h(this)),this.keyBinding=new f(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(B,W){W._$emitInputEvent.schedule(31)}),this.setSession(O||P&&P.session||new p("")),v.resetOptions(this),P&&this.setOptions(P),v._signal("editor",this)}return R.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},R.prototype.startOperation=function(M){if(this.curOp){if(!M||this.curOp.command)return;this.prevOp=this.curOp}M||(this.previousCommand=null,M={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:M.command||{},args:M.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},R.prototype.endOperation=function(M){if(this.curOp&&this.session){if(M&&M.returnValue===!1||!this.session)return this.curOp=null;if(M==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var O=this.curOp.command,P=O&&O.scrollIntoView;if(P){switch(P){case"center-animate":P="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var N=this.selection.getRange(),B=this.renderer.layerConfig;(N.start.row>=B.lastRow||N.end.row<=B.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}P=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var W=this.selection.toJSON();this.curOp.selectionAfter=W,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(W),this.prevOp=this.curOp,this.curOp=null}},R.prototype.$historyTracker=function(M){if(this.$mergeUndoDeltas){var O=this.prevOp,P=this.$mergeableCommands,N=O.command&&M.command.name==O.command.name;if(M.command.name=="insertstring"){var B=M.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),N=N&&this.mergeNextCommand&&(!/\s/.test(B)||/\s/.test(O.args)),this.mergeNextCommand=!0}else N=N&&P.indexOf(M.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(N=!1),N?this.session.mergeUndoDeltas=!0:P.indexOf(M.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},R.prototype.setKeyboardHandler=function(M,O){if(M&&typeof M=="string"&&M!="ace"){this.$keybindingId=M;var P=this;v.loadModule(["keybinding",M],function(N){P.$keybindingId==M&&P.keyBinding.setKeyboardHandler(N&&N.handler),O&&O()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(M),O&&O()},R.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},R.prototype.setSession=function(M){if(this.session!=M){this.curOp&&this.endOperation(),this.curOp={};var O=this.session;if(O){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var P=this.session.getSelection();P.off("changeCursor",this.$onCursorChange),P.off("changeSelection",this.$onSelectionChange)}this.session=M,M?(this.$onDocumentChange=this.onDocumentChange.bind(this),M.on("change",this.$onDocumentChange),this.renderer.setSession(M),this.$onChangeMode=this.onChangeMode.bind(this),M.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),M.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),M.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),M.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),M.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),M.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=M.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(M)),this._signal("changeSession",{session:M,oldSession:O}),this.curOp=null,O&&O._signal("changeEditor",{oldEditor:this}),M&&M._signal("changeEditor",{editor:this}),M&&!M.destroyed&&M.bgTokenizer.scheduleStart()}},R.prototype.getSession=function(){return this.session},R.prototype.setValue=function(M,O){return this.session.doc.setValue(M),O?O==1?this.navigateFileEnd():O==-1&&this.navigateFileStart():this.selectAll(),M},R.prototype.getValue=function(){return this.session.getValue()},R.prototype.getSelection=function(){return this.selection},R.prototype.resize=function(M){this.renderer.onResize(M)},R.prototype.setTheme=function(M,O){this.renderer.setTheme(M,O)},R.prototype.getTheme=function(){return this.renderer.getTheme()},R.prototype.setStyle=function(M){this.renderer.setStyle(M)},R.prototype.unsetStyle=function(M){this.renderer.unsetStyle(M)},R.prototype.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container).fontSize},R.prototype.setFontSize=function(M){this.setOption("fontSize",M)},R.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var M=this;this.$highlightPending=!0,setTimeout(function(){M.$highlightPending=!1;var O=M.session;if(!(!O||O.destroyed)){O.$bracketHighlight&&(O.$bracketHighlight.markerIds.forEach(function(Z){O.removeMarker(Z)}),O.$bracketHighlight=null);var P=M.getCursorPosition(),N=M.getKeyboardHandler(),B=N&&N.$getDirectionForHighlight&&N.$getDirectionForHighlight(M),W=O.getMatchingBracketRanges(P,B);if(!W){var K=new w(O,P.row,P.column),q=K.getCurrentToken();if(q&&/\b(?:tag-open|tag-name)/.test(q.type)){var re=O.getMatchingTags(P);re&&(W=[re.openTagName,re.closeTagName])}}if(!W&&O.$mode.getMatching&&(W=O.$mode.getMatching(M.session)),!W){M.getHighlightIndentGuides()&&M.renderer.$textLayer.$highlightIndentGuide();return}var Y="ace_bracket";Array.isArray(W)?W.length==1&&(Y="ace_error_bracket"):W=[W],W.length==2&&(b.comparePoints(W[0].end,W[1].start)==0?W=[b.fromPoints(W[0].start,W[1].end)]:b.comparePoints(W[0].start,W[1].end)==0&&(W=[b.fromPoints(W[1].start,W[0].end)])),O.$bracketHighlight={ranges:W,markerIds:W.map(function(Z){return O.addMarker(Z,Y,"text")})},M.getHighlightIndentGuides()&&M.renderer.$textLayer.$highlightIndentGuide()}},50)}},R.prototype.focus=function(){this.textInput.focus()},R.prototype.isFocused=function(){return this.textInput.isFocused()},R.prototype.blur=function(){this.textInput.blur()},R.prototype.onFocus=function(M){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",M))},R.prototype.onBlur=function(M){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",M))},R.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},R.prototype.onDocumentChange=function(M){var O=this.session.$useWrapMode,P=M.start.row==M.end.row?M.end.row:1/0;this.renderer.updateLines(M.start.row,P,O),this._signal("change",M),this.$cursorChange()},R.prototype.onTokenizerUpdate=function(M){var O=M.data;this.renderer.updateLines(O.first,O.last)},R.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},R.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},R.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},R.prototype.$updateHighlightActiveLine=function(){var M=this.getSession(),O;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(O=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(O=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(O=!1)),M.$highlightLineMarker&&!O)M.removeMarker(M.$highlightLineMarker.id),M.$highlightLineMarker=null;else if(!M.$highlightLineMarker&&O){var P=new b(O.row,O.column,O.row,1/0);P.id=M.addMarker(P,"ace_active-line","screenLine"),M.$highlightLineMarker=P}else O&&(M.$highlightLineMarker.start.row=O.row,M.$highlightLineMarker.end.row=O.row,M.$highlightLineMarker.start.column=O.column,M._signal("changeBackMarker"))},R.prototype.onSelectionChange=function(M){var O=this.session;if(O.$selectionMarker&&O.removeMarker(O.$selectionMarker),O.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var P=this.selection.getRange(),N=this.getSelectionStyle();O.$selectionMarker=O.addMarker(P,"ace_selection",N)}var B=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(B),this._signal("changeSelection")},R.prototype.$getSelectionHighLightRegexp=function(){var M=this.session,O=this.getSelectionRange();if(!(O.isEmpty()||O.isMultiLine())){var P=O.start.column,N=O.end.column,B=M.getLine(O.start.row),W=B.substring(P,N);if(!(W.length>5e3||!/[\w\d]/.test(W))){var K=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:W}),q=B.substring(P-1,N+1);if(K.test(q))return K}}},R.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},R.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},R.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},R.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},R.prototype.onChangeMode=function(M){this.renderer.updateText(),this._emit("changeMode",M)},R.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},R.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},R.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},R.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},R.prototype.getCopyText=function(){var M=this.getSelectedText(),O=this.session.doc.getNewLineCharacter(),P=!1;if(!M&&this.$copyWithEmptySelection){P=!0;for(var N=this.selection.getAllRanges(),B=0;B<N.length;B++){var W=N[B];B&&N[B-1].start.row==W.start.row||(M+=this.session.getLine(W.start.row)+O)}}var K={text:M};return this._signal("copy",K),A.lineMode=P?K.text:!1,K.text},R.prototype.onCopy=function(){this.commands.exec("copy",this)},R.prototype.onCut=function(){this.commands.exec("cut",this)},R.prototype.onPaste=function(M,O){var P={text:M,event:O};this.commands.exec("paste",this,P)},R.prototype.$handlePaste=function(M){typeof M=="string"&&(M={text:M}),this._signal("paste",M);var O=M.text,P=O===A.lineMode,N=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)P?N.insert({row:this.selection.lead.row,column:0},O):this.insert(O);else if(P)this.selection.rangeList.ranges.forEach(function(Y){N.insert({row:Y.start.row,column:0},O)});else{var B=O.split(/\r\n|\r|\n/),W=this.selection.rangeList.ranges,K=B.length==2&&(!B[0]||!B[1]);if(B.length!=W.length||K)return this.commands.exec("insertstring",this,O);for(var q=W.length;q--;){var re=W[q];re.isEmpty()||N.remove(re),N.insert(re.start,B[q])}}},R.prototype.execCommand=function(M,O){return this.commands.exec(M,this,O)},R.prototype.insert=function(M,O){var P=this.session,N=P.getMode(),B=this.getCursorPosition();if(this.getBehavioursEnabled()&&!O){var W=N.transformAction(P.getState(B.row),"insertion",this,P,M);W&&(M!==W.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),M=W.text)}if(M==" "&&(M=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&M.indexOf(`
|
||
`)==-1){var K=new b.fromPoints(B,B);K.end.column+=M.length,this.session.remove(K)}}else{var K=this.getSelectionRange();B=this.session.remove(K),this.clearSelection()}if(M==`
|
||
`||M==`\r
|
||
`){var Z=P.getLine(B.row);if(B.column>Z.search(/\S|$/)){var q=Z.substr(B.column).search(/\S|$/);P.doc.removeInLine(B.row,B.column,B.column+q)}}this.clearSelection();var re=B.column,Y=P.getState(B.row),Z=P.getLine(B.row),te=N.checkOutdent(Y,Z,M);if(P.insert(B,M),W&&W.selection&&(W.selection.length==2?this.selection.setSelectionRange(new b(B.row,re+W.selection[0],B.row,re+W.selection[1])):this.selection.setSelectionRange(new b(B.row+W.selection[0],W.selection[1],B.row+W.selection[2],W.selection[3]))),this.$enableAutoIndent){if(P.getDocument().isNewLine(M)){var ie=N.getNextLineIndent(Y,Z.slice(0,B.column),P.getTabString());P.insert({row:B.row+1,column:0},ie)}te&&N.autoOutdent(Y,P,B.row)}},R.prototype.autoIndent=function(){var M=this.session,O=M.getMode(),P,N;if(this.selection.isEmpty())P=0,N=M.doc.getLength()-1;else{var B=this.getSelectionRange();P=B.start.row,N=B.end.row}for(var W="",K="",q="",re,Y,Z,te=M.getTabString(),ie=P;ie<=N;ie++)ie>0&&(W=M.getState(ie-1),K=M.getLine(ie-1),q=O.getNextLineIndent(W,K,te)),re=M.getLine(ie),Y=O.$getIndent(re),q!==Y&&(Y.length>0&&(Z=new b(ie,0,ie,Y.length),M.remove(Z)),q.length>0&&M.insert({row:ie,column:0},q)),O.autoOutdent(W,M,ie)},R.prototype.onTextInput=function(M,O){if(!O)return this.keyBinding.onTextInput(M);this.startOperation({command:{name:"insertstring"}});var P=this.applyComposition.bind(this,M,O);this.selection.rangeCount?this.forEachSelection(P):P(),this.endOperation()},R.prototype.applyComposition=function(M,O){if(O.extendLeft||O.extendRight){var P=this.selection.getRange();P.start.column-=O.extendLeft,P.end.column+=O.extendRight,P.start.column<0&&(P.start.row--,P.start.column+=this.session.getLine(P.start.row).length+1),this.selection.setRange(P),!M&&!P.isEmpty()&&this.remove()}if((M||!this.selection.isEmpty())&&this.insert(M,!0),O.restoreStart||O.restoreEnd){var P=this.selection.getRange();P.start.column-=O.restoreStart,P.end.column-=O.restoreEnd,this.selection.setRange(P)}},R.prototype.onCommandKey=function(M,O,P){return this.keyBinding.onCommandKey(M,O,P)},R.prototype.setOverwrite=function(M){this.session.setOverwrite(M)},R.prototype.getOverwrite=function(){return this.session.getOverwrite()},R.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},R.prototype.setScrollSpeed=function(M){this.setOption("scrollSpeed",M)},R.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},R.prototype.setDragDelay=function(M){this.setOption("dragDelay",M)},R.prototype.getDragDelay=function(){return this.getOption("dragDelay")},R.prototype.setSelectionStyle=function(M){this.setOption("selectionStyle",M)},R.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},R.prototype.setHighlightActiveLine=function(M){this.setOption("highlightActiveLine",M)},R.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},R.prototype.setHighlightGutterLine=function(M){this.setOption("highlightGutterLine",M)},R.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},R.prototype.setHighlightSelectedWord=function(M){this.setOption("highlightSelectedWord",M)},R.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},R.prototype.setAnimatedScroll=function(M){this.renderer.setAnimatedScroll(M)},R.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},R.prototype.setShowInvisibles=function(M){this.renderer.setShowInvisibles(M)},R.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},R.prototype.setDisplayIndentGuides=function(M){this.renderer.setDisplayIndentGuides(M)},R.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},R.prototype.setHighlightIndentGuides=function(M){this.renderer.setHighlightIndentGuides(M)},R.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},R.prototype.setShowPrintMargin=function(M){this.renderer.setShowPrintMargin(M)},R.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},R.prototype.setPrintMarginColumn=function(M){this.renderer.setPrintMarginColumn(M)},R.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},R.prototype.setReadOnly=function(M){this.setOption("readOnly",M)},R.prototype.getReadOnly=function(){return this.getOption("readOnly")},R.prototype.setBehavioursEnabled=function(M){this.setOption("behavioursEnabled",M)},R.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},R.prototype.setWrapBehavioursEnabled=function(M){this.setOption("wrapBehavioursEnabled",M)},R.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},R.prototype.setShowFoldWidgets=function(M){this.setOption("showFoldWidgets",M)},R.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},R.prototype.setFadeFoldWidgets=function(M){this.setOption("fadeFoldWidgets",M)},R.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},R.prototype.remove=function(M){this.selection.isEmpty()&&(M=="left"?this.selection.selectLeft():this.selection.selectRight());var O=this.getSelectionRange();if(this.getBehavioursEnabled()){var P=this.session,N=P.getState(O.start.row),B=P.getMode().transformAction(N,"deletion",this,P,O);if(O.end.column===0){var W=P.getTextRange(O);if(W[W.length-1]==`
|
||
`){var K=P.getLine(O.end.row);/^\s+$/.test(K)&&(O.end.column=K.length)}}B&&(O=B)}this.session.remove(O),this.clearSelection()},R.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},R.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},R.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},R.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var M=this.getSelectionRange();M.start.column==M.end.column&&M.start.row==M.end.row&&(M.end.column=0,M.end.row++),this.session.remove(M),this.clearSelection()},R.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var M=this.getCursorPosition();this.insert(`
|
||
`),this.moveCursorToPosition(M)},R.prototype.setGhostText=function(M,O){this.session.widgetManager||(this.session.widgetManager=new y(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(M,O)},R.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},R.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var M=this.getCursorPosition(),O=M.column;if(O!==0){var P=this.session.getLine(M.row),N,B;O<P.length?(N=P.charAt(O)+P.charAt(O-1),B=new b(M.row,O-1,M.row,O+1)):(N=P.charAt(O-1)+P.charAt(O-2),B=new b(M.row,O-2,M.row,O)),this.session.replace(B,N),this.session.selection.moveToPosition(B.end)}}},R.prototype.toLowerCase=function(){var M=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var O=this.getSelectionRange(),P=this.session.getTextRange(O);this.session.replace(O,P.toLowerCase()),this.selection.setSelectionRange(M)},R.prototype.toUpperCase=function(){var M=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var O=this.getSelectionRange(),P=this.session.getTextRange(O);this.session.replace(O,P.toUpperCase()),this.selection.setSelectionRange(M)},R.prototype.indent=function(){var M=this.session,O=this.getSelectionRange();if(O.start.row<O.end.row){var P=this.$getSelectedRows();M.indentRows(P.first,P.last," ");return}else if(O.start.column<O.end.column){var N=M.getTextRange(O);if(!/^\s+$/.test(N)){var P=this.$getSelectedRows();M.indentRows(P.first,P.last," ");return}}var B=M.getLine(O.start.row),W=O.start,K=M.getTabSize(),q=M.documentToScreenColumn(W.row,W.column);if(this.session.getUseSoftTabs())var re=K-q%K,Y=a.stringRepeat(" ",re);else{for(var re=q%K;B[O.start.column-1]==" "&&re;)O.start.column--,re--;this.selection.setSelectionRange(O),Y=" "}return this.insert(Y)},R.prototype.blockIndent=function(){var M=this.$getSelectedRows();this.session.indentRows(M.first,M.last," ")},R.prototype.blockOutdent=function(){var M=this.session.getSelection();this.session.outdentRows(M.getRange())},R.prototype.sortLines=function(){for(var M=this.$getSelectedRows(),O=this.session,P=[],N=M.first;N<=M.last;N++)P.push(O.getLine(N));P.sort(function(K,q){return K.toLowerCase()<q.toLowerCase()?-1:K.toLowerCase()>q.toLowerCase()?1:0});for(var B=new b(0,0,0,0),N=M.first;N<=M.last;N++){var W=O.getLine(N);B.start.row=N,B.end.row=N,B.end.column=W.length,O.replace(B,P[N-M.first])}},R.prototype.toggleCommentLines=function(){var M=this.session.getState(this.getCursorPosition().row),O=this.$getSelectedRows();this.session.getMode().toggleCommentLines(M,this.session,O.first,O.last)},R.prototype.toggleBlockComment=function(){var M=this.getCursorPosition(),O=this.session.getState(M.row),P=this.getSelectionRange();this.session.getMode().toggleBlockComment(O,this.session,P,M)},R.prototype.getNumberAt=function(M,O){var P=/[\-]?[0-9]+(?:\.[0-9]+)?/g;P.lastIndex=0;for(var N=this.session.getLine(M);P.lastIndex<O;){var B=P.exec(N);if(B.index<=O&&B.index+B[0].length>=O){var W={value:B[0],start:B.index,end:B.index+B[0].length};return W}}return null},R.prototype.modifyNumber=function(M){var O=this.selection.getCursor().row,P=this.selection.getCursor().column,N=new b(O,P-1,O,P),B=this.session.getTextRange(N);if(!isNaN(parseFloat(B))&&isFinite(B)){var W=this.getNumberAt(O,P);if(W){var K=W.value.indexOf(".")>=0?W.start+W.value.indexOf(".")+1:W.end,q=W.start+W.value.length-K,re=parseFloat(W.value);re*=Math.pow(10,q),K!==W.end&&P<K?M*=Math.pow(10,W.end-P-1):M*=Math.pow(10,W.end-P),re+=M,re/=Math.pow(10,q);var Y=re.toFixed(q),Z=new b(O,W.start,O,W.end);this.session.replace(Z,Y),this.moveCursorTo(O,Math.max(W.start+1,P+Y.length-W.value.length))}}else this.toggleWord()},R.prototype.toggleWord=function(){var M=this.selection.getCursor().row,O=this.selection.getCursor().column;this.selection.selectWord();var P=this.getSelectedText(),N=this.selection.getWordRange().start.column,B=P.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),W=O-N-1;W<0&&(W=0);var K=0,q=0,re=this;P.match(/[A-Za-z0-9_]+/)&&B.forEach(function(_e,Re){q=K+_e.length,W>=K&&W<=q&&(P=_e,re.selection.clearSelection(),re.moveCursorTo(M,K+N),re.selection.selectTo(M,q+N)),K=q});for(var Y=this.$toggleWordPairs,Z,te=0;te<Y.length;te++)for(var ie=Y[te],ce=0;ce<=1;ce++){var he=+!ce,ve=P.match(new RegExp("^\\s?_?("+a.escapeRegExp(ie[ce])+")\\s?$","i"));if(ve){var Ce=P.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(ve[1])+")($|\\s)","g"));Ce&&(Z=P.replace(new RegExp(a.escapeRegExp(ie[ce]),"i"),function(_e){var Re=ie[he];return _e.toUpperCase()==_e?Re=Re.toUpperCase():_e.charAt(0).toUpperCase()==_e.charAt(0)&&(Re=Re.substr(0,0)+ie[he].charAt(0).toUpperCase()+Re.substr(1)),Re}),this.insert(Z),Z="")}}},R.prototype.findLinkAt=function(M,O){var P,N,B=this.session.getLine(M),W=B.split(/((?:https?|ftp):\/\/[\S]+)/),K=O;K<0&&(K=0);var q=0,re=0,Y;try{for(var Z=o(W),te=Z.next();!te.done;te=Z.next()){var ie=te.value;if(re=q+ie.length,K>=q&&K<=re&&ie.match(/((?:https?|ftp):\/\/[\S]+)/)){Y=ie.replace(/[\s:.,'";}\]]+$/,"");break}q=re}}catch(ce){P={error:ce}}finally{try{te&&!te.done&&(N=Z.return)&&N.call(Z)}finally{if(P)throw P.error}}return Y},R.prototype.openLink=function(){var M=this.selection.getCursor(),O=this.findLinkAt(M.row,M.column);return O&&window.open(O,"_blank"),O!=null},R.prototype.removeLines=function(){var M=this.$getSelectedRows();this.session.removeFullLines(M.first,M.last),this.clearSelection()},R.prototype.duplicateSelection=function(){var M=this.selection,O=this.session,P=M.getRange(),N=M.isBackwards();if(P.isEmpty()){var B=P.start.row;O.duplicateLines(B,B)}else{var W=N?P.start:P.end,K=O.insert(W,O.getTextRange(P),!1);P.start=W,P.end=K,M.setSelectionRange(P,N)}},R.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},R.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},R.prototype.moveText=function(M,O,P){return this.session.moveText(M,O,P)},R.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},R.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},R.prototype.$moveLines=function(M,O){var P,N,B=this.selection;if(!B.inMultiSelectMode||this.inVirtualSelectionMode){var W=B.toOrientedRange();P=this.$getSelectedRows(W),N=this.session.$moveLines(P.first,P.last,O?0:M),O&&M==-1&&(N=0),W.moveBy(N,0),B.fromOrientedRange(W)}else{var K=B.rangeList.ranges;B.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var q=0,re=0,Y=K.length,Z=0;Z<Y;Z++){var te=Z;K[Z].moveBy(q,0),P=this.$getSelectedRows(K[Z]);for(var ie=P.first,ce=P.last;++Z<Y;){re&&K[Z].moveBy(re,0);var he=this.$getSelectedRows(K[Z]);if(O&&he.first!=ce)break;if(!O&&he.first>ce+1)break;ce=he.last}for(Z--,q=this.session.$moveLines(ie,ce,O?0:M),O&&M==-1&&(te=Z+1);te<=Z;)K[te].moveBy(q,0),te++;O||(q=0),re+=q}B.fromOrientedRange(B.ranges[0]),B.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},R.prototype.$getSelectedRows=function(M){return M=(M||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(M.start.row),last:this.session.getRowFoldEnd(M.end.row)}},R.prototype.onCompositionStart=function(M){this.renderer.showComposition(M)},R.prototype.onCompositionUpdate=function(M){this.renderer.setCompositionText(M)},R.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},R.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},R.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},R.prototype.isRowVisible=function(M){return M>=this.getFirstVisibleRow()&&M<=this.getLastVisibleRow()},R.prototype.isRowFullyVisible=function(M){return M>=this.renderer.getFirstFullyVisibleRow()&&M<=this.renderer.getLastFullyVisibleRow()},R.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},R.prototype.$moveByPage=function(M,O){var P=this.renderer,N=this.renderer.layerConfig,B=M*Math.floor(N.height/N.lineHeight);O===!0?this.selection.$moveSelection(function(){this.moveCursorBy(B,0)}):O===!1&&(this.selection.moveCursorBy(B,0),this.selection.clearSelection());var W=P.scrollTop;P.scrollBy(0,B*N.lineHeight),O!=null&&P.scrollCursorIntoView(null,.5),P.animateScrolling(W)},R.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},R.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},R.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},R.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},R.prototype.scrollPageDown=function(){this.$moveByPage(1)},R.prototype.scrollPageUp=function(){this.$moveByPage(-1)},R.prototype.scrollToRow=function(M){this.renderer.scrollToRow(M)},R.prototype.scrollToLine=function(M,O,P,N){this.renderer.scrollToLine(M,O,P,N)},R.prototype.centerSelection=function(){var M=this.getSelectionRange(),O={row:Math.floor(M.start.row+(M.end.row-M.start.row)/2),column:Math.floor(M.start.column+(M.end.column-M.start.column)/2)};this.renderer.alignCursor(O,.5)},R.prototype.getCursorPosition=function(){return this.selection.getCursor()},R.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},R.prototype.getSelectionRange=function(){return this.selection.getRange()},R.prototype.selectAll=function(){this.selection.selectAll()},R.prototype.clearSelection=function(){this.selection.clearSelection()},R.prototype.moveCursorTo=function(M,O){this.selection.moveCursorTo(M,O)},R.prototype.moveCursorToPosition=function(M){this.selection.moveCursorToPosition(M)},R.prototype.jumpToMatching=function(M,O){var P=this.getCursorPosition(),N=new w(this.session,P.row,P.column),B=N.getCurrentToken(),W=0;B&&B.type.indexOf("tag-name")!==-1&&(B=N.stepBackward());var K=B||N.stepForward();if(K){var q,re=!1,Y={},Z=P.column-K.start,te,ie={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(K.value.match(/[{}()\[\]]/g)){for(;Z<K.value.length&&!re;Z++)if(ie[K.value[Z]])switch(te=ie[K.value[Z]]+"."+K.type.replace("rparen","lparen"),isNaN(Y[te])&&(Y[te]=0),K.value[Z]){case"(":case"[":case"{":Y[te]++;break;case")":case"]":case"}":Y[te]--,Y[te]===-1&&(q="bracket",re=!0);break}}else K.type.indexOf("tag-name")!==-1&&(isNaN(Y[K.value])&&(Y[K.value]=0),B.value==="<"&&W>1?Y[K.value]++:B.value==="</"&&Y[K.value]--,Y[K.value]===-1&&(q="tag",re=!0));re||(B=K,W++,K=N.stepForward(),Z=0)}while(K&&!re);if(q){var ce,he;if(q==="bracket")ce=this.session.getBracketRange(P),ce||(ce=new b(N.getCurrentTokenRow(),N.getCurrentTokenColumn()+Z-1,N.getCurrentTokenRow(),N.getCurrentTokenColumn()+Z-1),he=ce.start,(O||he.row===P.row&&Math.abs(he.column-P.column)<2)&&(ce=this.session.getBracketRange(he)));else if(q==="tag"){if(!K||K.type.indexOf("tag-name")===-1)return;if(ce=new b(N.getCurrentTokenRow(),N.getCurrentTokenColumn()-2,N.getCurrentTokenRow(),N.getCurrentTokenColumn()-2),ce.compare(P.row,P.column)===0){var ve=this.session.getMatchingTags(P);ve&&(ve.openTag.contains(P.row,P.column)?(ce=ve.closeTag,he=ce.start):(ce=ve.openTag,ve.closeTag.start.row===P.row&&ve.closeTag.start.column===P.column?he=ce.end:he=ce.start))}he=he||ce.start}he=ce&&ce.cursor||he,he&&(M?ce&&O?this.selection.setRange(ce):ce&&ce.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(he.row,he.column):this.selection.moveTo(he.row,he.column))}}},R.prototype.gotoLine=function(M,O,P){this.selection.clearSelection(),this.session.unfold({row:M-1,column:O||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(M-1,O||0),this.isRowFullyVisible(M-1)||this.scrollToLine(M-1,!0,P)},R.prototype.navigateTo=function(M,O){this.selection.moveTo(M,O)},R.prototype.navigateUp=function(M){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var O=this.selection.anchor.getPosition();return this.moveCursorToPosition(O)}this.selection.clearSelection(),this.selection.moveCursorBy(-M||-1,0)},R.prototype.navigateDown=function(M){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var O=this.selection.anchor.getPosition();return this.moveCursorToPosition(O)}this.selection.clearSelection(),this.selection.moveCursorBy(M||1,0)},R.prototype.navigateLeft=function(M){if(this.selection.isEmpty())for(M=M||1;M--;)this.selection.moveCursorLeft();else{var O=this.getSelectionRange().start;this.moveCursorToPosition(O)}this.clearSelection()},R.prototype.navigateRight=function(M){if(this.selection.isEmpty())for(M=M||1;M--;)this.selection.moveCursorRight();else{var O=this.getSelectionRange().end;this.moveCursorToPosition(O)}this.clearSelection()},R.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},R.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},R.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},R.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},R.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},R.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},R.prototype.replace=function(M,O){O&&this.$search.set(O);var P=this.$search.find(this.session),N=0;return P&&(this.$tryReplace(P,M)&&(N=1),this.selection.setSelectionRange(P),this.renderer.scrollSelectionIntoView(P.start,P.end)),N},R.prototype.replaceAll=function(M,O){O&&this.$search.set(O);var P=this.$search.findAll(this.session),N=0;if(!P.length)return N;var B=this.getSelectionRange();this.selection.moveTo(0,0);for(var W=P.length-1;W>=0;--W)this.$tryReplace(P[W],M)&&N++;return this.selection.setSelectionRange(B),N},R.prototype.$tryReplace=function(M,O){var P=this.session.getTextRange(M);return O=this.$search.replace(P,O),O!==null?(M.end=this.session.replace(M,O),M):null},R.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},R.prototype.find=function(M,O,P){O||(O={}),typeof M=="string"||M instanceof RegExp?O.needle=M:typeof M=="object"&&s.mixin(O,M);var N=this.selection.getRange();O.needle==null&&(M=this.session.getTextRange(N)||this.$search.$options.needle,M||(N=this.session.getWordRange(N.start.row,N.start.column),M=this.session.getTextRange(N)),this.$search.set({needle:M})),this.$search.set(O),O.start||this.$search.set({start:N});var B=this.$search.find(this.session);if(O.preventScroll)return B;if(B)return this.revealRange(B,P),B;O.backwards?N.start=N.end:N.end=N.start,this.selection.setRange(N)},R.prototype.findNext=function(M,O){this.find({skipCurrent:!0,backwards:!1},M,O)},R.prototype.findPrevious=function(M,O){this.find(M,{skipCurrent:!0,backwards:!0},O)},R.prototype.revealRange=function(M,O){this.session.unfold(M),this.selection.setSelectionRange(M);var P=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(M.start,M.end,.5),O!==!1&&this.renderer.animateScrolling(P)},R.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},R.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},R.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(M){M.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},R.prototype.setAutoScrollEditorIntoView=function(M){if(M){var O,P=this,N=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var B=this.$scrollAnchor;B.style.cssText="position:absolute",this.container.insertBefore(B,this.container.firstChild);var W=this.on("changeSelection",function(){N=!0}),K=this.renderer.on("beforeRender",function(){N&&(O=P.renderer.container.getBoundingClientRect())}),q=this.renderer.on("afterRender",function(){if(N&&O&&(P.isFocused()||P.searchBox&&P.searchBox.isFocused())){var re=P.renderer,Y=re.$cursorLayer.$pixelPos,Z=re.layerConfig,te=Y.top-Z.offset;Y.top>=0&&te+O.top<0?N=!0:Y.top<Z.height&&Y.top+O.top+Z.lineHeight>window.innerHeight?N=!1:N=null,N!=null&&(B.style.top=te+"px",B.style.left=Y.left+"px",B.style.height=Z.lineHeight+"px",B.scrollIntoView(N)),N=O=null}});this.setAutoScrollEditorIntoView=function(re){re||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",W),this.renderer.off("afterRender",q),this.renderer.off("beforeRender",K))}}},R.prototype.$resetCursorStyle=function(){var M=this.$cursorStyle||"ace",O=this.renderer.$cursorLayer;O&&(O.setSmoothBlinking(/smooth/.test(M)),O.isBlinking=!this.$readOnly&&M!="wide",d.setCssClass(O.element,"ace_slim-cursors",/slim/.test(M)))},R.prototype.prompt=function(M,O,P){var N=this;v.loadModule("ace/ext/prompt",function(B){B.prompt(N,M,O,P)})},R}();k.$uid=0,k.prototype.curOp=null,k.prototype.prevOp={},k.prototype.$mergeableCommands=["backspace","del","insertstring"],k.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(k.prototype,x),v.defineOptions(k.prototype,"editor",{selectionStyle:{set:function(R){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:R})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(R){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(R){this.textInput.setReadOnly(R),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(R){this.textInput.setCopyWithEmptySelection(R)},initialValue:!1},cursorStyle:{set:function(R){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(R){this.setAutoScrollEditorIntoView(R)}},keyboardHandler:{set:function(R){this.setKeyboardHandler(R)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(R){this.session.setValue(R)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(R){this.setSession(R)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(R){this.renderer.$gutterLayer.setShowLineNumbers(R),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),R&&this.$relativeLineNumbers?I.attach(this):I.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(R){this.$showLineNumbers&&R?I.attach(this):I.detach(this)}},placeholder:{set:function(R){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var M=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(M&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),d.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!M&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),d.addCssClass(this.container,"ace_hasPlaceholder");var O=d.createElement("div");O.className="ace_placeholder",O.textContent=this.$placeholder||"",this.renderer.placeholderNode=O,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!M&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(R){var M={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(N){N.blur(),N.renderer.scroller.focus()},readOnly:!0},O=function(N){if(N.target==this.renderer.scroller&&N.keyCode===C.enter){N.preventDefault();var B=this.getCursorPosition().row;this.isRowVisible(B)||this.scrollToLine(B,!0,!0),this.focus()}},P;R?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",E("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",E("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",O.bind(this)),this.commands.addCommand(M),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",E("editor")),this.renderer.$gutter.setAttribute("aria-label",E("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),P||(P=new m(this)),P.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",O.bind(this)),this.commands.removeCommand(M),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),P&&P.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var I={getText:function(R,M){return(Math.abs(R.selection.lead.row-M)||M+1+(M<9?"·":""))+""},getWidth:function(R,M,O){return Math.max(M.toString().length,(O.lastRow+1).toString().length,2)*O.characterWidth},update:function(R,M){M.renderer.$loop.schedule(M.renderer.CHANGE_GUTTER)},attach:function(R){R.renderer.$gutterLayer.$renderer=this,R.on("changeSelection",this.update),this.update(null,R)},detach:function(R){R.renderer.$gutterLayer.$renderer==this&&(R.renderer.$gutterLayer.$renderer=null),R.off("changeSelection",this.update),this.update(null,R)}};r.Editor=k}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,i){var o=function(){function w(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return w.prototype.addSession=function(y){this.$session=y},w.prototype.add=function(y,m,E){if(!this.$fromUndo&&y!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),m===!1||!this.lastDeltas){this.lastDeltas=[];var A=this.$undoStack.length;A>this.$undoDepth-1&&this.$undoStack.splice(0,A-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),y.id=this.$rev=++this.$maxRev}(y.action=="remove"||y.action=="insert")&&(this.$lastDelta=y),this.lastDeltas.push(y)}},w.prototype.addSelection=function(y,m){this.selections.push({value:y,rev:m||this.$rev})},w.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},w.prototype.markIgnored=function(y,m){m==null&&(m=this.$rev+1);for(var E=this.$undoStack,A=E.length;A--;){var C=E[A][0];if(C.id<=y)break;C.id<m&&(C.ignore=!0)}this.lastDeltas=null},w.prototype.getSelection=function(y,m){for(var E=this.selections,A=E.length;A--;){var C=E[A];if(C.rev<y)return m&&(C=E[A+1]),C}},w.prototype.getRevision=function(){return this.$rev},w.prototype.getDeltas=function(y,m){m==null&&(m=this.$rev+1);for(var E=this.$undoStack,A=null,C=0,k=E.length;k--;){var I=E[k][0];if(I.id<m&&!A&&(A=k+1),I.id<=y){C=k+1;break}}return E.slice(C,A)},w.prototype.getChangedRanges=function(y,m){m==null&&(m=this.$rev+1)},w.prototype.getChangedLines=function(y,m){m==null&&(m=this.$rev+1)},w.prototype.undo=function(y,m){this.lastDeltas=null;var E=this.$undoStack;if(s(E,E.length)){y||(y=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var A=E.pop(),C=null;return A&&(C=y.undoChanges(A,m),this.$redoStack.push(A),this.$syncRev()),this.$fromUndo=!1,C}},w.prototype.redo=function(y,m){if(this.lastDeltas=null,y||(y=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var E=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);v(this.$redoStack,E),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(k){k[0].id=++this.$maxRev},this)}var A=this.$redoStack.pop(),C=null;return A&&(C=y.redoChanges(A,m),this.$undoStack.push(A),this.$syncRev()),this.$fromUndo=!1,C},w.prototype.$syncRev=function(){var y=this.$undoStack,m=y[y.length-1],E=m&&m[0].id||0;this.$redoStackBaseRev=E,this.$rev=E},w.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},w.prototype.canUndo=function(){return this.$undoStack.length>0},w.prototype.canRedo=function(){return this.$redoStack.length>0},w.prototype.bookmark=function(y){y==null&&(y=this.$rev),this.mark=y},w.prototype.isAtBookmark=function(){return this.$rev===this.mark},w.prototype.toJSON=function(){},w.prototype.fromJSON=function(){},w.prototype.$prettyPrint=function(y){return y?u(y):u(this.$undoStack)+`
|
||
---
|
||
`+u(this.$redoStack)},w}();o.prototype.hasUndo=o.prototype.canUndo,o.prototype.hasRedo=o.prototype.canRedo,o.prototype.isClean=o.prototype.isAtBookmark,o.prototype.markClean=o.prototype.bookmark;function s(w,y){for(var m=y;m--;){var E=w[m];if(E&&!E[0].ignore){for(;m<y-1;){var A=p(w[m],w[m+1]);w[m]=A[0],w[m+1]=A[1],m++}return!0}}}var d=n("./range").Range,a=d.comparePoints;d.comparePoints;function c(w){return{row:w.row,column:w.column}}function l(w){return{start:c(w.start),end:c(w.end),action:w.action,lines:w.lines.slice()}}function u(w){if(w=w||this,Array.isArray(w))return w.map(u).join(`
|
||
`);var y="";return w.action?(y=w.action=="insert"?"+":"-",y+="["+w.lines+"]"):w.value&&(Array.isArray(w.value)?y=w.value.map(h).join(`
|
||
`):y=h(w.value)),w.start&&(y+=h(w)),(w.id||w.rev)&&(y+=" ("+(w.id||w.rev)+")"),y}function h(w){return w.start.row+":"+w.start.column+"=>"+w.end.row+":"+w.end.column}function f(w,y){var m=w.action=="insert",E=y.action=="insert";if(m&&E)if(a(y.start,w.end)>=0)b(y,w,-1);else if(a(y.start,w.start)<=0)b(w,y,1);else return null;else if(m&&!E)if(a(y.start,w.end)>=0)b(y,w,-1);else if(a(y.end,w.start)<=0)b(w,y,-1);else return null;else if(!m&&E)if(a(y.start,w.start)>=0)b(y,w,1);else if(a(y.start,w.start)<=0)b(w,y,1);else return null;else if(!m&&!E)if(a(y.start,w.start)>=0)b(y,w,1);else if(a(y.end,w.start)<=0)b(w,y,-1);else return null;return[y,w]}function p(w,y){for(var m=w.length;m--;)for(var E=0;E<y.length;E++)if(!f(w[m],y[E])){for(;m<w.length;){for(;E--;)f(y[E],w[m]);E=y.length,m++}return[w,y]}return w.selectionBefore=y.selectionBefore=w.selectionAfter=y.selectionAfter=null,[y,w]}function g(w,y){var m=w.action=="insert",E=y.action=="insert";if(m&&E)a(w.start,y.start)<0?b(y,w,1):b(w,y,1);else if(m&&!E)a(w.start,y.end)>=0?b(w,y,-1):(a(w.start,y.start)<=0||b(w,d.fromPoints(y.start,w.start),-1),b(y,w,1));else if(!m&&E)a(y.start,w.end)>=0?b(y,w,-1):(a(y.start,w.start)<=0||b(y,d.fromPoints(w.start,y.start),-1),b(w,y,1));else if(!m&&!E)if(a(y.start,w.end)>=0)b(y,w,-1);else if(a(y.end,w.start)<=0)b(w,y,-1);else{var A,C;return a(w.start,y.start)<0&&(A=w,w=S(w,y.start)),a(w.end,y.end)>0&&(C=S(w,y.end)),x(y.end,w.start,w.end,-1),C&&!A&&(w.lines=C.lines,w.start=C.start,w.end=C.end,C=w),[y,A,C].filter(Boolean)}return[y,w]}function b(w,y,m){x(w.start,y.start,y.end,m),x(w.end,y.start,y.end,m)}function x(w,y,m,E){w.row==(E==1?y:m).row&&(w.column+=E*(m.column-y.column)),w.row+=E*(m.row-y.row)}function S(w,y){var m=w.lines,E=w.end;w.end=c(y);var A=w.end.row-w.start.row,C=m.splice(A,m.length),k=A?y.column:y.column-w.start.column;m.push(C[0].substring(0,k)),C[0]=C[0].substr(k);var I={start:c(y),end:E,lines:C,action:w.action};return I}function T(w,y){y=l(y);for(var m=w.length;m--;){for(var E=w[m],A=0;A<E.length;A++){var C=E[A],k=g(C,y);y=k[0],k.length!=2&&(k[2]?(E.splice(A+1,1,k[1],k[2]),A++):k[1]||(E.splice(A,1),A--))}E.length||w.splice(m,1)}return w}function v(w,y){for(var m=0;m<y.length;m++)for(var E=y[m],A=0;A<E.length;A++)T(w,E[A])}r.UndoManager=o}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("../lib/dom"),s=function(){function d(a,c){this.element=a,this.canvasHeight=c||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return d.prototype.moveContainer=function(a){o.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},d.prototype.pageChanged=function(a,c){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},d.prototype.computeLineTop=function(a,c,l){var u=c.firstRowScreen*c.lineHeight,h=Math.floor(u/this.canvasHeight),f=l.documentToScreenRow(a,0)*c.lineHeight;return f-h*this.canvasHeight},d.prototype.computeLineHeight=function(a,c,l){return c.lineHeight*l.getRowLineCount(a)},d.prototype.getLength=function(){return this.cells.length},d.prototype.get=function(a){return this.cells[a]},d.prototype.shift=function(){this.$cacheCell(this.cells.shift())},d.prototype.pop=function(){this.$cacheCell(this.cells.pop())},d.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var c=o.createFragment(this.element),l=0;l<a.length;l++)c.appendChild(a[l].element);this.element.appendChild(c)}else this.cells.push(a),this.element.appendChild(a.element)},d.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var c=o.createFragment(this.element),l=0;l<a.length;l++)c.appendChild(a[l].element);this.element.firstChild?this.element.insertBefore(c,this.element.firstChild):this.element.appendChild(c)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},d.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},d.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},d.prototype.createCell=function(a,c,l,u){var h=this.cellCache.pop();if(!h){var f=o.createElement("div");u&&u(f),this.element.appendChild(f),h={element:f,text:"",row:a}}return h.row=a,h},d}();r.Lines=s}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(n,r,i){var o=n("../lib/dom"),s=n("../lib/oop"),d=n("../lib/lang"),a=n("../lib/event_emitter").EventEmitter,c=n("./lines").Lines,l=n("../config").nls,u=function(){function f(p){this.element=o.createElement("div"),this.element.className="ace_layer ace_gutter-layer",p.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new c(this.element),this.$lines.$offsetCoefficient=1}return f.prototype.setSession=function(p){this.session&&this.session.off("change",this.$updateAnnotations),this.session=p,p&&p.on("change",this.$updateAnnotations)},f.prototype.addGutterDecoration=function(p,g){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(p,g)},f.prototype.removeGutterDecoration=function(p,g){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(p,g)},f.prototype.setAnnotations=function(p){this.$annotations=[];for(var g=0;g<p.length;g++){var b=p[g],x=b.row,S=this.$annotations[x];S||(S=this.$annotations[x]={text:[],type:[]});var T=b.text,v=b.type;T=T?d.escapeHTML(T):b.html||"",S.text.indexOf(T)===-1&&(S.text.push(T),S.type.push(v));var w=b.className;w?S.className=w:v=="error"?S.className=" ace_error":v=="warning"&&S.className!=" ace_error"?S.className=" ace_warning":v=="info"&&!S.className&&(S.className=" ace_info")}},f.prototype.$updateAnnotations=function(p){if(this.$annotations.length){var g=p.start.row,b=p.end.row-g;if(b!==0)if(p.action=="remove")this.$annotations.splice(g,b+1,null);else{var x=new Array(b+1);x.unshift(g,1),this.$annotations.splice.apply(this.$annotations,x)}}},f.prototype.update=function(p){this.config=p;var g=this.session,b=p.firstRow,x=Math.min(p.lastRow+p.gutterOffset,g.getLength()-1);this.oldLastRow=x,this.config=p,this.$lines.moveContainer(p),this.$updateCursorRow();for(var S=g.getNextFoldLine(b),T=S?S.start.row:1/0,v=null,w=-1,y=b;;){if(y>T&&(y=S.end.row+1,S=g.getNextFoldLine(y,S),T=S?S.start.row:1/0),y>x){for(;this.$lines.getLength()>w+1;)this.$lines.pop();break}v=this.$lines.get(++w),v?v.row=y:(v=this.$lines.createCell(y,p,this.session,h),this.$lines.push(v)),this.$renderCell(v,p,S,y),y++}this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$updateGutterWidth=function(p){var g=this.session,b=g.gutterRenderer||this.$renderer,x=g.$firstLineNumber,S=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(S=g.getLength()+x-1);var T=b?b.getWidth(g,S,p):S.toString().length*p.characterWidth,v=this.$padding||this.$computePadding();T+=v.left+v.right,T!==this.gutterWidth&&!isNaN(T)&&(this.gutterWidth=T,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",T))},f.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},f.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var b=0;b<g.length;b++){var x=g[b];if(x.row>=this.$cursorRow){if(x.row>this.$cursorRow){var S=this.session.getFoldLine(this.$cursorRow);if(b>0&&S&&S.start.row==g[b-1].row)x=g[b-1];else break}x.element.className="ace_gutter-active-line "+x.element.className,this.$cursorCell=x;break}}}}},f.prototype.scrollLines=function(p){var g=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(g,p))return this.update(p);this.$lines.moveContainer(p);var b=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),x=this.oldLastRow;if(this.oldLastRow=b,!g||x<p.firstRow)return this.update(p);if(b<g.firstRow)return this.update(p);if(g.firstRow<p.firstRow)for(var S=this.session.getFoldedRowCount(g.firstRow,p.firstRow-1);S>0;S--)this.$lines.shift();if(x>b)for(var S=this.session.getFoldedRowCount(b+1,x);S>0;S--)this.$lines.pop();p.firstRow<g.firstRow&&this.$lines.unshift(this.$renderLines(p,p.firstRow,g.firstRow-1)),b>x&&this.$lines.push(this.$renderLines(p,x+1,b)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$renderLines=function(p,g,b){for(var x=[],S=g,T=this.session.getNextFoldLine(S),v=T?T.start.row:1/0;S>v&&(S=T.end.row+1,T=this.session.getNextFoldLine(S,T),v=T?T.start.row:1/0),!(S>b);){var w=this.$lines.createCell(S,p,this.session,h);this.$renderCell(w,p,T,S),x.push(w),S++}return x},f.prototype.$renderCell=function(p,g,b,x){var S=p.element,T=this.session,v=S.childNodes[0],w=S.childNodes[1],y=S.childNodes[2],m=y.firstChild,E=T.$firstLineNumber,A=T.$breakpoints,C=T.$decorations,k=T.gutterRenderer||this.$renderer,I=this.$showFoldWidgets&&T.foldWidgets,R=b?b.start.row:Number.MAX_VALUE,M=g.lineHeight+"px",O=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",P=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",N=(k?k.getText(T,x):x+E).toString();if(this.$highlightGutterLine&&(x==this.$cursorRow||b&&x<this.$cursorRow&&x>=R&&this.$cursorRow<=b.end.row)&&(O+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),A[x]&&(O+=A[x]),C[x]&&(O+=C[x]),this.$annotations[x]&&x!==R&&(O+=this.$annotations[x].className),S.className!=O&&(S.className=O),I){var B=I[x];B==null&&(B=I[x]=T.getFoldWidget(x))}if(B){var O="ace_fold-widget ace_"+B;if(B=="start"&&x==R&&x<b.end.row){O+=" ace_closed";for(var W,K=!1,q=x+1;q<=b.end.row;q++)if(this.$annotations[q]){if(this.$annotations[q].className===" ace_error"){K=!0,W=" ace_error_fold";break}if(this.$annotations[q].className===" ace_warning"){K=!0,W=" ace_warning_fold";continue}}S.className+=W}else O+=" ace_open";w.className!=O&&(w.className=O),o.setStyle(w.style,"height",M),o.setStyle(w.style,"display","inline-block"),w.setAttribute("role","button"),w.setAttribute("tabindex","-1");var b=T.getFoldLine(N-1);b?(w.setAttribute("aria-label",l("Unfold rows $0 to $1",[N,b.end.row+1])),w.setAttribute("title",l("Unfold code"))):(w.setAttribute("aria-label",l("Fold at row $0",[N])),w.setAttribute("title",l("Fold code")))}else w&&(o.setStyle(w.style,"display","none"),w.setAttribute("tabindex","0"),w.removeAttribute("role"),w.removeAttribute("aria-label"));return K&&this.$showFoldedAnnotations?(y.className="ace_gutter_annotation",m.className=P,m.className+=W,o.setStyle(m.style,"height",M),o.setStyle(y.style,"display","block"),o.setStyle(y.style,"height",M),y.setAttribute("aria-label",l("Read annotations row $0",[N])),y.setAttribute("tabindex","-1"),y.setAttribute("role","button")):this.$annotations[x]?(y.className="ace_gutter_annotation",m.className=P,this.$useSvgGutterIcons?m.className+=this.$annotations[x].className:S.classList.add(this.$annotations[x].className.replace(" ","")),o.setStyle(m.style,"height",M),o.setStyle(y.style,"display","block"),o.setStyle(y.style,"height",M),y.setAttribute("aria-label",l("Read annotations row $0",[N])),y.setAttribute("tabindex","-1"),y.setAttribute("role","button")):(o.setStyle(y.style,"display","none"),y.removeAttribute("aria-label"),y.removeAttribute("role"),y.setAttribute("tabindex","0")),N!==v.data&&(v.data=N),o.setStyle(p.element.style,"height",this.$lines.computeLineHeight(x,g,T)+"px"),o.setStyle(p.element.style,"top",this.$lines.computeLineTop(x,g,T)+"px"),p.text=N,y.style.display==="none"&&w.style.display==="none"?p.element.setAttribute("aria-hidden",!0):p.element.setAttribute("aria-hidden",!1),p},f.prototype.setHighlightGutterLine=function(p){this.$highlightGutterLine=p},f.prototype.setShowLineNumbers=function(p){this.$renderer=!p&&{getWidth:function(){return 0},getText:function(){return""}}},f.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},f.prototype.setShowFoldWidgets=function(p){p?o.addCssClass(this.element,"ace_folding-enabled"):o.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=p,this.$padding=null},f.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},f.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var p=o.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(p.borderLeftWidth)||0)+(parseInt(p.paddingLeft)||0)+1,this.$padding.right=(parseInt(p.borderRightWidth)||0)+(parseInt(p.paddingRight)||0),this.$padding},f.prototype.getRegion=function(p){var g=this.$padding||this.$computePadding(),b=this.element.getBoundingClientRect();if(p.x<g.left+b.left)return"markers";if(this.$showFoldWidgets&&p.x>b.right-g.right)return"foldWidgets"},f}();u.prototype.$fixedWidth=!1,u.prototype.$highlightGutterLine=!0,u.prototype.$renderer="",u.prototype.$showLineNumbers=!0,u.prototype.$showFoldWidgets=!0,s.implement(u.prototype,a);function h(f){var p=document.createTextNode("");f.appendChild(p);var g=o.createElement("span");f.appendChild(g);var b=o.createElement("span");f.appendChild(b);var x=o.createElement("span");return b.appendChild(x),f}r.Gutter=u}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,i){var o=n("../range").Range,s=n("../lib/dom"),d=function(){function c(l){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",l.appendChild(this.element)}return c.prototype.setPadding=function(l){this.$padding=l},c.prototype.setSession=function(l){this.session=l},c.prototype.setMarkers=function(l){this.markers=l},c.prototype.elt=function(l,u){var h=this.i!=-1&&this.element.childNodes[this.i];h?this.i++:(h=document.createElement("div"),this.element.appendChild(h),this.i=-1),h.style.cssText=u,h.className=l},c.prototype.update=function(l){if(l){this.config=l,this.i=0;var u;for(var h in this.markers){var f=this.markers[h];if(!f.range){f.update(u,this,this.session,l);continue}var p=f.range.clipRows(l.firstRow,l.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),f.renderer){var g=this.$getTop(p.start.row,l),b=this.$padding+p.start.column*l.characterWidth;f.renderer(u,p,b,g,l)}else f.type=="fullLine"?this.drawFullLineMarker(u,p,f.clazz,l):f.type=="screenLine"?this.drawScreenLineMarker(u,p,f.clazz,l):p.isMultiLine()?f.type=="text"?this.drawTextMarker(u,p,f.clazz,l):this.drawMultiLineMarker(u,p,f.clazz,l):this.drawSingleLineMarker(u,p,f.clazz+" ace_start ace_br15",l)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},c.prototype.$getTop=function(l,u){return(l-u.firstRowScreen)*u.lineHeight},c.prototype.drawTextMarker=function(l,u,h,f,p){for(var g=this.session,b=u.start.row,x=u.end.row,S=b,T=0,v=0,w=g.getScreenLastRowColumn(S),y=new o(S,u.start.column,S,v);S<=x;S++)y.start.row=y.end.row=S,y.start.column=S==b?u.start.column:g.getRowWrapIndent(S),y.end.column=w,T=v,v=w,w=S+1<x?g.getScreenLastRowColumn(S+1):S==x?0:u.end.column,this.drawSingleLineMarker(l,y,h+(S==b?" ace_start":"")+" ace_br"+a(S==b||S==b+1&&u.start.column,T<v,v>w,S==x),f,S==x?0:1,p)},c.prototype.drawMultiLineMarker=function(l,u,h,f,p){var g=this.$padding,b=f.lineHeight,x=this.$getTop(u.start.row,f),S=g+u.start.column*f.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(u.start.row)){var T=u.clone();T.end.row=T.start.row,T.end.column=this.session.getLine(T.start.row).length,this.drawBidiSingleLineMarker(l,T,h+" ace_br1 ace_start",f,null,p)}else this.elt(h+" ace_br1 ace_start","height:"+b+"px;right:0;top:"+x+"px;left:"+S+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(u.end.row)){var T=u.clone();T.start.row=T.end.row,T.start.column=0,this.drawBidiSingleLineMarker(l,T,h+" ace_br12",f,null,p)}else{x=this.$getTop(u.end.row,f);var v=u.end.column*f.characterWidth;this.elt(h+" ace_br12","height:"+b+"px;width:"+v+"px;top:"+x+"px;left:"+g+"px;"+(p||""))}if(b=(u.end.row-u.start.row-1)*f.lineHeight,!(b<=0)){x=this.$getTop(u.start.row+1,f);var w=(u.start.column?1:0)|(u.end.column?0:8);this.elt(h+(w?" ace_br"+w:""),"height:"+b+"px;right:0;top:"+x+"px;left:"+g+"px;"+(p||""))}},c.prototype.drawSingleLineMarker=function(l,u,h,f,p,g){if(this.session.$bidiHandler.isBidiRow(u.start.row))return this.drawBidiSingleLineMarker(l,u,h,f,p,g);var b=f.lineHeight,x=(u.end.column+(p||0)-u.start.column)*f.characterWidth,S=this.$getTop(u.start.row,f),T=this.$padding+u.start.column*f.characterWidth;this.elt(h,"height:"+b+"px;width:"+x+"px;top:"+S+"px;left:"+T+"px;"+(g||""))},c.prototype.drawBidiSingleLineMarker=function(l,u,h,f,p,g){var b=f.lineHeight,x=this.$getTop(u.start.row,f),S=this.$padding,T=this.session.$bidiHandler.getSelections(u.start.column,u.end.column);T.forEach(function(v){this.elt(h,"height:"+b+"px;width:"+(v.width+(p||0))+"px;top:"+x+"px;left:"+(S+v.left)+"px;"+(g||""))},this)},c.prototype.drawFullLineMarker=function(l,u,h,f,p){var g=this.$getTop(u.start.row,f),b=f.lineHeight;u.start.row!=u.end.row&&(b+=this.$getTop(u.end.row,f)-g),this.elt(h,"height:"+b+"px;top:"+g+"px;left:0;right:0;"+(p||""))},c.prototype.drawScreenLineMarker=function(l,u,h,f,p){var g=this.$getTop(u.start.row,f),b=f.lineHeight;this.elt(h,"height:"+b+"px;top:"+g+"px;left:0;right:0;"+(p||""))},c}();d.prototype.$padding=0;function a(c,l,u,h){return(c?1:0)|(l?2:0)|(u?4:0)|(h?8:0)}r.Marker=d}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config"],function(n,r,i){var o=n("../lib/oop"),s=n("../lib/dom"),d=n("../lib/lang"),a=n("./lines").Lines,c=n("../lib/event_emitter").EventEmitter,l=n("../config").nls,u=function(){function h(f){this.dom=s,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",f.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return h.prototype.$updateEolChar=function(){var f=this.session.doc,p=f.getNewLineCharacter()==`
|
||
`&&f.getNewLineMode()!="windows",g=p?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=g)return this.EOL_CHAR=g,!0},h.prototype.setPadding=function(f){this.$padding=f,this.element.style.margin="0 "+f+"px"},h.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},h.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},h.prototype.$setFontMetrics=function(f){this.$fontMetrics=f,this.$fontMetrics.on("changeCharacterSize",function(p){this._signal("changeCharacterSize",p)}.bind(this)),this.$pollSizeChanges()},h.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},h.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},h.prototype.setSession=function(f){this.session=f,f&&this.$computeTabString()},h.prototype.setShowInvisibles=function(f){return this.showInvisibles==f?!1:(this.showInvisibles=f,typeof f=="string"?(this.showSpaces=/tab/i.test(f),this.showTabs=/space/i.test(f),this.showEOL=/eol/i.test(f)):this.showSpaces=this.showTabs=this.showEOL=f,this.$computeTabString(),!0)},h.prototype.setDisplayIndentGuides=function(f){return this.displayIndentGuides==f?!1:(this.displayIndentGuides=f,this.$computeTabString(),!0)},h.prototype.setHighlightIndentGuides=function(f){return this.$highlightIndentGuides===f?!1:(this.$highlightIndentGuides=f,f)},h.prototype.$computeTabString=function(){var f=this.session.getTabSize();this.tabSize=f;for(var p=this.$tabStrings=[0],g=1;g<f+1;g++)if(this.showTabs){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_tab",b.textContent=d.stringRepeat(this.TAB_CHAR,g),p.push(b)}else p.push(this.dom.createTextNode(d.stringRepeat(" ",g),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",S=this.showSpaces?" ace_invisible ace_invisible_space":"",T=this.showSpaces?d.stringRepeat(this.SPACE_CHAR,this.tabSize):d.stringRepeat(" ",this.tabSize),v=this.showTabs?" ace_invisible ace_invisible_tab":"",w=this.showTabs?d.stringRepeat(this.TAB_CHAR,this.tabSize):T,b=this.dom.createElement("span");b.className=x+S,b.textContent=T,this.$tabStrings[" "]=b;var b=this.dom.createElement("span");b.className=x+v,b.textContent=w,this.$tabStrings[" "]=b}},h.prototype.updateLines=function(f,p,g){if(this.config.lastRow!=f.lastRow||this.config.firstRow!=f.firstRow)return this.update(f);this.config=f;for(var b=Math.max(p,f.firstRow),x=Math.min(g,f.lastRow),S=this.element.childNodes,T=0,w=f.firstRow;w<b;w++){var y=this.session.getFoldLine(w);if(y)if(y.containsRow(b)){b=y.start.row;break}else w=y.end.row;T++}for(var v=!1,w=b,y=this.session.getNextFoldLine(w),m=y?y.start.row:1/0;w>m&&(w=y.end.row+1,y=this.session.getNextFoldLine(w,y),m=y?y.start.row:1/0),!(w>x);){var E=S[T++];if(E){this.dom.removeChildren(E),this.$renderLine(E,w,w==m?y:!1),v&&(E.style.top=this.$lines.computeLineTop(w,f,this.session)+"px");var A=f.lineHeight*this.session.getRowLength(w)+"px";E.style.height!=A&&(v=!0,E.style.height=A)}w++}if(v)for(;T<this.$lines.cells.length;){var C=this.$lines.cells[T++];C.element.style.top=this.$lines.computeLineTop(C.row,f,this.session)+"px"}},h.prototype.scrollLines=function(f){var p=this.config;if(this.config=f,this.$lines.pageChanged(p,f))return this.update(f);this.$lines.moveContainer(f);var g=f.lastRow,b=p?p.lastRow:-1;if(!p||b<f.firstRow)return this.update(f);if(g<p.firstRow)return this.update(f);if(!p||p.lastRow<f.firstRow)return this.update(f);if(f.lastRow<p.firstRow)return this.update(f);if(p.firstRow<f.firstRow)for(var x=this.session.getFoldedRowCount(p.firstRow,f.firstRow-1);x>0;x--)this.$lines.shift();if(p.lastRow>f.lastRow)for(var x=this.session.getFoldedRowCount(f.lastRow+1,p.lastRow);x>0;x--)this.$lines.pop();f.firstRow<p.firstRow&&this.$lines.unshift(this.$renderLinesFragment(f,f.firstRow,p.firstRow-1)),f.lastRow>p.lastRow&&this.$lines.push(this.$renderLinesFragment(f,p.lastRow+1,f.lastRow)),this.$highlightIndentGuide()},h.prototype.$renderLinesFragment=function(f,p,g){for(var b=[],x=p,S=this.session.getNextFoldLine(x),T=S?S.start.row:1/0;x>T&&(x=S.end.row+1,S=this.session.getNextFoldLine(x,S),T=S?S.start.row:1/0),!(x>g);){var v=this.$lines.createCell(x,f,this.session),w=v.element;this.dom.removeChildren(w),s.setStyle(w.style,"height",this.$lines.computeLineHeight(x,f,this.session)+"px"),s.setStyle(w.style,"top",this.$lines.computeLineTop(x,f,this.session)+"px"),this.$renderLine(w,x,x==T?S:!1),this.$useLineGroups()?w.className="ace_line_group":w.className="ace_line",b.push(v),x++}return b},h.prototype.update=function(f){this.$lines.moveContainer(f),this.config=f;for(var p=f.firstRow,g=f.lastRow,b=this.$lines;b.getLength();)b.pop();b.push(this.$renderLinesFragment(f,p,g))},h.prototype.$renderToken=function(f,p,g,b){for(var x=this,S=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,T=this.dom.createFragment(this.element),v,w=0;v=S.exec(b);){var y=v[1],m=v[2],E=v[3],A=v[4],C=v[5];if(!(!x.showSpaces&&m)){var k=w!=v.index?b.slice(w,v.index):"";if(w=v.index+v[0].length,k&&T.appendChild(this.dom.createTextNode(k,this.element)),y){var I=x.session.getScreenTabSize(p+v.index);T.appendChild(x.$tabStrings[I].cloneNode(!0)),p+=I-1}else if(m)if(x.showSpaces){var R=this.dom.createElement("span");R.className="ace_invisible ace_invisible_space",R.textContent=d.stringRepeat(x.SPACE_CHAR,m.length),T.appendChild(R)}else T.appendChild(this.com.createTextNode(m,this.element));else if(E){var R=this.dom.createElement("span");R.className="ace_invisible ace_invisible_space ace_invalid",R.textContent=d.stringRepeat(x.SPACE_CHAR,E.length),T.appendChild(R)}else if(A){p+=1;var R=this.dom.createElement("span");R.style.width=x.config.characterWidth*2+"px",R.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",R.textContent=x.showSpaces?x.SPACE_CHAR:A,T.appendChild(R)}else if(C){p+=1;var R=this.dom.createElement("span");R.style.width=x.config.characterWidth*2+"px",R.className="ace_cjk",R.textContent=C,T.appendChild(R)}}}if(T.appendChild(this.dom.createTextNode(w?b.slice(w):b,this.element)),this.$textToken[g.type])f.appendChild(T);else{var M="ace_"+g.type.replace(/\./g," ace_"),R=this.dom.createElement("span");g.type=="fold"&&(R.style.width=g.value.length*this.config.characterWidth+"px",R.setAttribute("title",l("Unfold code"))),R.className=M,R.appendChild(T),f.appendChild(R)}return p+b.length},h.prototype.renderIndentGuide=function(f,p,g){var b=p.search(this.$indentGuideRe);if(b<=0||b>=g)return p;if(p[0]==" "){b-=b%this.tabSize;for(var x=b/this.tabSize,S=0;S<x;S++)f.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),p.substr(b)}else if(p[0]==" "){for(var S=0;S<b;S++)f.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),p.substr(b)}return this.$highlightIndentGuide(),p},h.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var f=this.session.doc.$lines;if(f){var p=this.session.selection.getCursor(),g=/^\s*/.exec(this.session.doc.getLine(p.row))[0].length,b=Math.floor(g/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:b,start:p.row};var x=this.session.$bracketHighlight;if(x){for(var S=this.session.$bracketHighlight.ranges,T=0;T<S.length;T++)if(p.row!==S[T].start.row){this.$highlightIndentGuideMarker.end=S[T].start.row,p.row>S[T].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&f[p.row]!==""&&p.column===f[p.row].length){this.$highlightIndentGuideMarker.dir=1;for(var T=p.row+1;T<f.length;T++){var v=f[T],w=/^\s*/.exec(v)[0].length;if(v!==""&&(this.$highlightIndentGuideMarker.end=T,w<=g))break}}this.$renderHighlightIndentGuide()}}},h.prototype.$clearActiveIndentGuide=function(){for(var f=this.$lines.cells,p=0;p<f.length;p++){var g=f[p],b=g.element.childNodes;if(b.length>0){for(var x=0;x<b.length;x++)if(b[x].classList&&b[x].classList.contains("ace_indent-guide-active")){b[x].classList.remove("ace_indent-guide-active");break}}}},h.prototype.$setIndentGuideActive=function(f,p){var g=this.session.doc.getLine(f.row);if(g!==""){var b=f.element.childNodes;if(b){var x=b[p-1];x&&x.classList&&x.classList.contains("ace_indent-guide")&&x.classList.add("ace_indent-guide-active")}}},h.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var f=this.$lines.cells;this.$clearActiveIndentGuide();var p=this.$highlightIndentGuideMarker.indentLevel;if(p!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var g=0;g<f.length;g++){var b=f[g];if(this.$highlightIndentGuideMarker.end&&b.row>=this.$highlightIndentGuideMarker.start+1){if(b.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,p)}}else for(var g=f.length-1;g>=0;g--){var b=f[g];if(this.$highlightIndentGuideMarker.end&&b.row<this.$highlightIndentGuideMarker.start){if(b.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,p)}}}},h.prototype.$createLineElement=function(f){var p=this.dom.createElement("div");return p.className="ace_line",p.style.height=this.config.lineHeight+"px",p},h.prototype.$renderWrappedLine=function(f,p,g){var b=0,x=0,S=g[0],T=0,v=this.$createLineElement();f.appendChild(v);for(var w=0;w<p.length;w++){var y=p[w],m=y.value;if(w==0&&this.displayIndentGuides){if(b=m.length,m=this.renderIndentGuide(v,m,S),!m)continue;b-=m.length}if(b+m.length<S)T=this.$renderToken(v,T,y,m),b+=m.length;else{for(;b+m.length>=S;)T=this.$renderToken(v,T,y,m.substring(0,S-b)),m=m.substring(S-b),b=S,v=this.$createLineElement(),f.appendChild(v),v.appendChild(this.dom.createTextNode(d.stringRepeat(" ",g.indent),this.element)),x++,T=0,S=g[x]||Number.MAX_VALUE;m.length!=0&&(b+=m.length,T=this.$renderToken(v,T,y,m))}}g[g.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(v,T,null,"",!0)},h.prototype.$renderSimpleLine=function(f,p){for(var g=0,b=0;b<p.length;b++){var x=p[b],S=x.value;if(!(b==0&&this.displayIndentGuides&&(S=this.renderIndentGuide(f,S),!S))){if(g+S.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(f,g,x,S);g=this.$renderToken(f,g,x,S)}}},h.prototype.$renderOverflowMessage=function(f,p,g,b,x){g&&this.$renderToken(f,p,g,b.slice(0,this.MAX_LINE_LENGTH-p));var S=this.dom.createElement("span");S.className="ace_inline_button ace_keyword ace_toggle_wrap",S.textContent=x?"<hide>":"<click to see more...>",f.appendChild(S)},h.prototype.$renderLine=function(f,p,g){if(!g&&g!=!1&&(g=this.session.getFoldLine(p)),g)var b=this.$getFoldLineTokens(p,g);else var b=this.session.getTokens(p);var x=f;if(b.length){var S=this.session.getRowSplitData(p);if(S&&S.length){this.$renderWrappedLine(f,b,S);var x=f.lastChild}else{var x=f;this.$useLineGroups()&&(x=this.$createLineElement(),f.appendChild(x)),this.$renderSimpleLine(x,b)}}else this.$useLineGroups()&&(x=this.$createLineElement(),f.appendChild(x));if(this.showEOL&&x){g&&(p=g.end.row);var T=this.dom.createElement("span");T.className="ace_invisible ace_invisible_eol",T.textContent=p==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(T)}},h.prototype.$getFoldLineTokens=function(f,p){var g=this.session,b=[];function x(T,v,w){for(var y=0,m=0;m+T[y].value.length<v;)if(m+=T[y].value.length,y++,y==T.length)return;if(m!=v){var E=T[y].value.substring(v-m);E.length>w-v&&(E=E.substring(0,w-v)),b.push({type:T[y].type,value:E}),m=v+E.length,y+=1}for(;m<w&&y<T.length;){var E=T[y].value;E.length+m>w?b.push({type:T[y].type,value:E.substring(0,w-m)}):b.push(T[y]),m+=E.length,y+=1}}var S=g.getTokens(f);return p.walk(function(T,v,w,y,m){T!=null?b.push({type:"fold",value:T}):(m&&(S=g.getTokens(v)),S.length&&x(S,y,w))},p.end.row,this.session.getLine(p.end.row).length),b},h.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},h}();u.prototype.$textToken={text:!0,rparen:!0,lparen:!0},u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,o.implement(u.prototype,c),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("../lib/dom"),s=function(){function d(a){this.element=o.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),o.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return d.prototype.$updateOpacity=function(a){for(var c=this.cursors,l=c.length;l--;)o.setStyle(c[l].style,"opacity",a?"":"0")},d.prototype.$startCssAnimation=function(){for(var a=this.cursors,c=a.length;c--;)a[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&o.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},d.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,o.removeCssClass(this.element,"ace_animate-blinking")},d.prototype.setPadding=function(a){this.$padding=a},d.prototype.setSession=function(a){this.session=a},d.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},d.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},d.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,o.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},d.prototype.addCursor=function(){var a=o.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},d.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},d.prototype.hideCursor=function(){this.isVisible=!1,o.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.showCursor=function(){this.isVisible=!0,o.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,o.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&o.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),o.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var c=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),c()},this.blinkInterval),c()}},d.prototype.getPixelPosition=function(a,c){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var l=this.session.documentToScreenPosition(a),u=this.$padding+(this.session.$bidiHandler.isBidiRow(l.row,a.row)?this.session.$bidiHandler.getPosLeft(l.column):l.column*this.config.characterWidth),h=(l.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:u,top:h}},d.prototype.isCursorInView=function(a,c){return a.top>=0&&a.top<c.maxHeight},d.prototype.update=function(a){this.config=a;var c=this.session.$selectionMarkers,l=0,u=0;(c===void 0||c.length===0)&&(c=[{cursor:null}]);for(var l=0,h=c.length;l<h;l++){var f=this.getPixelPosition(c[l].cursor,!0);if(!((f.top>a.height+a.offset||f.top<0)&&l>1)){var p=this.cursors[u++]||this.addCursor(),g=p.style;this.drawCursor?this.drawCursor(p,f,a,c[l],this.session):this.isCursorInView(f,a)?(o.setStyle(g,"display","block"),o.translate(p,f.left,f.top),o.setStyle(g,"width",Math.round(a.characterWidth)+"px"),o.setStyle(g,"height",a.lineHeight+"px")):o.setStyle(g,"display","none")}}for(;this.cursors.length>u;)this.removeCursor();var b=this.session.getOverwrite();this.$setOverwrite(b),this.$pixelPos=f,this.restartTimer()},d.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?o.addCssClass(this.element,"ace_overwrite-cursors"):o.removeCssClass(this.element,"ace_overwrite-cursors"))},d.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},d}();s.prototype.$padding=0,s.prototype.drawCursor=null,r.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,i){var o=this&&this.__extends||function(){var p=function(g,b){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var T in S)Object.prototype.hasOwnProperty.call(S,T)&&(x[T]=S[T])},p(g,b)};return function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");p(g,b);function x(){this.constructor=g}g.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x)}}(),s=n("./lib/oop"),d=n("./lib/dom"),a=n("./lib/event"),c=n("./lib/event_emitter").EventEmitter,l=32768,u=function(){function p(g,b){this.element=d.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+b,this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),g.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return p.prototype.setVisible=function(g){this.element.style.display=g?"":"none",this.isVisible=g,this.coeff=1},p}();s.implement(u.prototype,c);var h=function(p){o(g,p);function g(b,x){var S=p.call(this,b,"-v")||this;return S.scrollTop=0,S.scrollHeight=0,x.$scrollbarWidth=S.width=d.scrollbarWidth(b.ownerDocument),S.inner.style.width=S.element.style.width=(S.width||15)+5+"px",S.$minWidth=0,S}return g.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var b=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-b)/(this.coeff-b)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},g.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},g.prototype.setHeight=function(b){this.element.style.height=b+"px"},g.prototype.setScrollHeight=function(b){this.scrollHeight=b,b>l?(this.coeff=l/b,b=l):this.coeff!=1&&(this.coeff=1),this.inner.style.height=b+"px"},g.prototype.setScrollTop=function(b){this.scrollTop!=b&&(this.skipEvent=!0,this.scrollTop=b,this.element.scrollTop=b*this.coeff)},g}(u);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var f=function(p){o(g,p);function g(b,x){var S=p.call(this,b,"-h")||this;return S.scrollLeft=0,S.height=x.$scrollbarWidth,S.inner.style.height=S.element.style.height=(S.height||15)+5+"px",S}return g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(b){this.element.style.width=b+"px"},g.prototype.setInnerWidth=function(b){this.inner.style.width=b+"px"},g.prototype.setScrollWidth=function(b){this.inner.style.width=b+"px"},g.prototype.setScrollLeft=function(b){this.scrollLeft!=b&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=b)},g}(u);r.ScrollBar=h,r.ScrollBarV=h,r.ScrollBarH=f,r.VScrollBar=h,r.HScrollBar=f}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,i){var o=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(b[S]=x[S])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function b(){this.constructor=p}p.prototype=g===null?Object.create(g):(b.prototype=g.prototype,new b)}}(),s=n("./lib/oop"),d=n("./lib/dom"),a=n("./lib/event"),c=n("./lib/event_emitter").EventEmitter;d.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
||
position: absolute;
|
||
background: rgba(128, 128, 128, 0.6);
|
||
-moz-box-sizing: border-box;
|
||
box-sizing: border-box;
|
||
border: 1px solid #bbb;
|
||
border-radius: 2px;
|
||
z-index: 8;
|
||
}
|
||
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
||
position: absolute;
|
||
z-index: 6;
|
||
background: none;
|
||
overflow: hidden!important;
|
||
}
|
||
.ace_editor>.ace_sb-v {
|
||
z-index: 6;
|
||
right: 0;
|
||
top: 0;
|
||
width: 12px;
|
||
}
|
||
.ace_editor>.ace_sb-v div {
|
||
z-index: 8;
|
||
right: 0;
|
||
width: 100%;
|
||
}
|
||
.ace_editor>.ace_sb-h {
|
||
bottom: 0;
|
||
left: 0;
|
||
height: 12px;
|
||
}
|
||
.ace_editor>.ace_sb-h div {
|
||
bottom: 0;
|
||
height: 100%;
|
||
}
|
||
.ace_editor>.ace_sb_grabbed {
|
||
z-index: 8;
|
||
background: #000;
|
||
}`,"ace_scrollbar.css",!1);var l=function(){function f(p,g){this.element=d.createElement("div"),this.element.className="ace_sb"+g,this.inner=d.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return f.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},f}();s.implement(l.prototype,c);var u=function(f){o(p,f);function p(g,b){var x=f.call(this,g,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,x.parent=g,x.width=x.VScrollWidth,x.renderer=b,x.inner.style.width=x.element.style.width=(x.width||15)+"px",x.$minWidth=0,x}return p.prototype.onMouseDown=function(g,b){if(g==="mousedown"&&!(a.getButton(b)!==0||b.detail===2)){if(b.target===this.inner){var x=this,S=b.clientY,T=function(C){S=C.clientY},v=function(){clearInterval(E)},w=b.clientY,y=this.thumbTop,m=function(){if(S!==void 0){var C=x.scrollTopFromThumbTop(y+S-w);C!==x.scrollTop&&x._emit("scroll",{data:C})}};a.capture(this.inner,T,v);var E=setInterval(m,20);return a.preventDefault(b)}var A=b.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(A)}),a.preventDefault(b)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(g){var b=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return b=b>>0,b<0?b=0:b>this.pageHeight-this.viewHeight&&(b=this.pageHeight-this.viewHeight),b},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(g,b){this.pageHeight===g&&!b||(this.pageHeight=g,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},p.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(l);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var h=function(f){o(p,f);function p(g,b){var x=f.call(this,g,"-h")||this;return x.scrollLeft=0,x.scrollWidth=0,x.height=x.HScrollHeight,x.inner.style.height=x.element.style.height=(x.height||12)+"px",x.renderer=b,x}return p.prototype.onMouseDown=function(g,b){if(g==="mousedown"&&!(a.getButton(b)!==0||b.detail===2)){if(b.target===this.inner){var x=this,S=b.clientX,T=function(C){S=C.clientX},v=function(){clearInterval(E)},w=b.clientX,y=this.thumbLeft,m=function(){if(S!==void 0){var C=x.scrollLeftFromThumbLeft(y+S-w);C!==x.scrollLeft&&x._emit("scroll",{data:C})}};a.capture(this.inner,T,v);var E=setInterval(m,20);return a.preventDefault(b)}var A=b.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(A)}),a.preventDefault(b)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(g){var b=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return b=b>>0,b<0?b=0:b>this.pageWidth-this.viewWidth&&(b=this.pageWidth-this.viewWidth),b},p.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(g,b){this.pageWidth===g&&!b||(this.pageWidth=g,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},p.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(l);h.prototype.setInnerWidth=h.prototype.setScrollWidth,r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=h,r.VScrollBar=u,r.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,i){var o=n("./lib/event"),s=function(){function d(a,c){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var l=this;this._flush=function(u){l.pending=!1;var h=l.changes;if(h&&(o.blockIdle(100),l.changes=0,l.onRender(h)),l.changes){if(l.$recursionLimit--<0)return;l.schedule()}else l.$recursionLimit=2}}return d.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(o.nextFrame(this._flush),this.pending=!0)},d.prototype.clear=function(a){var c=this.changes;return this.changes=0,c},d}();r.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,i){var o=n("../lib/oop"),s=n("../lib/dom"),d=n("../lib/lang"),a=n("../lib/event"),c=n("../lib/useragent"),l=n("../lib/event_emitter").EventEmitter,u=512,h=typeof ResizeObserver=="function",f=200,p=function(){function g(b){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),b.appendChild(this.el),this.$measureNode.textContent=d.stringRepeat("X",u),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(b,x){b.width=b.height="auto",b.left=b.top="0px",b.visibility="hidden",b.position="absolute",b.whiteSpace="pre",c.isIE<8?b["font-family"]="inherit":b.font="inherit",b.overflow=x?"hidden":"visible"},g.prototype.checkForSizeChanges=function(b){if(b===void 0&&(b=this.$measureSizes()),b&&(this.$characterSize.width!==b.width||this.$characterSize.height!==b.height)){this.$measureNode.style.fontWeight="bold";var x=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=b,this.charSizes=Object.create(null),this.allowBoldFonts=x&&x.width===b.width&&x.height===b.height,this._emit("changeCharacterSize",{data:b})}},g.prototype.$addObserver=function(){var b=this;this.$observer=new window.ResizeObserver(function(x){b.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var b=this;return this.$pollSizeChangesTimer=a.onIdle(function x(){b.checkForSizeChanges(),a.onIdle(x,500)},500)},g.prototype.setPolling=function(b){b?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(b){var x={height:(b||this.$measureNode).clientHeight,width:(b||this.$measureNode).clientWidth/u};return x.width===0||x.height===0?null:x},g.prototype.$measureCharWidth=function(b){this.$main.textContent=d.stringRepeat(b,u);var x=this.$main.getBoundingClientRect();return x.width/u},g.prototype.getCharacterWidth=function(b){var x=this.charSizes[b];return x===void 0&&(x=this.charSizes[b]=this.$measureCharWidth(b)/this.$characterSize.width),x},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(b){return!b||!b.parentElement?1:(window.getComputedStyle(b).zoom||1)*this.$getZoom(b.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var b=function(x,S){return["div",{style:"position: absolute;top:"+x+"px;left:"+S+"px;"}]};this.els=s.buildDom([b(0,0),b(f,0),b(0,f),b(f,f)],this.el)},g.prototype.transformCoordinates=function(b,x){if(b){var S=this.$getZoom(this.el);b=y(1/S,b)}function T(K,q,re){var Y=K[1]*q[0]-K[0]*q[1];return[(-q[1]*re[0]+q[0]*re[1])/Y,(+K[1]*re[0]-K[0]*re[1])/Y]}function v(K,q){return[K[0]-q[0],K[1]-q[1]]}function w(K,q){return[K[0]+q[0],K[1]+q[1]]}function y(K,q){return[K*q[0],K*q[1]]}this.els||this.$initTransformMeasureNodes();function m(K){var q=K.getBoundingClientRect();return[q.left,q.top]}var E=m(this.els[0]),A=m(this.els[1]),C=m(this.els[2]),k=m(this.els[3]),I=T(v(k,A),v(k,C),v(w(A,C),w(k,E))),R=y(1+I[0],v(A,E)),M=y(1+I[1],v(C,E));if(x){var O=x,P=I[0]*O[0]/f+I[1]*O[1]/f+1,N=w(y(O[0],R),y(O[1],M));return w(y(1/P/f,N),E)}var B=v(b,E),W=T(v(R,y(I[0],B)),v(M,y(I[1],B)),B);return y(f,W)},g}();p.prototype.$characterSize={width:0,height:0},o.implement(p.prototype,l),r.FontMetrics=p}),ace.define("ace/css/editor.css",["require","exports","module"],function(n,r,i){i.exports=`
|
||
.ace_br1 {border-top-left-radius : 3px;}
|
||
.ace_br2 {border-top-right-radius : 3px;}
|
||
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
||
.ace_br4 {border-bottom-right-radius: 3px;}
|
||
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
||
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
||
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
||
.ace_br8 {border-bottom-left-radius : 3px;}
|
||
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
||
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
||
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
||
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
||
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
||
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
||
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
||
|
||
|
||
.ace_editor {
|
||
position: relative;
|
||
overflow: hidden;
|
||
padding: 0;
|
||
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
||
direction: ltr;
|
||
text-align: left;
|
||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||
}
|
||
|
||
.ace_scroller {
|
||
position: absolute;
|
||
overflow: hidden;
|
||
top: 0;
|
||
bottom: 0;
|
||
background-color: inherit;
|
||
-ms-user-select: none;
|
||
-moz-user-select: none;
|
||
-webkit-user-select: none;
|
||
user-select: none;
|
||
cursor: text;
|
||
}
|
||
|
||
.ace_content {
|
||
position: absolute;
|
||
box-sizing: border-box;
|
||
min-width: 100%;
|
||
contain: style size layout;
|
||
font-variant-ligatures: no-common-ligatures;
|
||
}
|
||
|
||
.ace_keyboard-focus:focus {
|
||
box-shadow: inset 0 0 0 2px #5E9ED6;
|
||
outline: none;
|
||
}
|
||
|
||
.ace_dragging .ace_scroller:before{
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
content: '';
|
||
background: rgba(250, 250, 250, 0.01);
|
||
z-index: 1000;
|
||
}
|
||
.ace_dragging.ace_dark .ace_scroller:before{
|
||
background: rgba(0, 0, 0, 0.01);
|
||
}
|
||
|
||
.ace_gutter {
|
||
position: absolute;
|
||
overflow : hidden;
|
||
width: auto;
|
||
top: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
cursor: default;
|
||
z-index: 4;
|
||
-ms-user-select: none;
|
||
-moz-user-select: none;
|
||
-webkit-user-select: none;
|
||
user-select: none;
|
||
contain: style size layout;
|
||
}
|
||
|
||
.ace_gutter-active-line {
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
}
|
||
|
||
.ace_scroller.ace_scroll-left:after {
|
||
content: "";
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
padding-left: 19px;
|
||
padding-right: 6px;
|
||
background-repeat: no-repeat;
|
||
}
|
||
|
||
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
||
margin-left: -14px;
|
||
float: left;
|
||
}
|
||
|
||
.ace_gutter-cell .ace_gutter_annotation {
|
||
margin-left: -19px;
|
||
float: left;
|
||
}
|
||
|
||
.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
|
||
background-repeat: no-repeat;
|
||
background-position: 2px center;
|
||
}
|
||
|
||
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
|
||
background-repeat: no-repeat;
|
||
background-position: 2px center;
|
||
}
|
||
|
||
.ace_gutter-cell.ace_info, .ace_icon.ace_info {
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
||
background-repeat: no-repeat;
|
||
background-position: 2px center;
|
||
}
|
||
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
||
}
|
||
|
||
.ace_icon_svg.ace_error {
|
||
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
||
background-color: crimson;
|
||
}
|
||
.ace_icon_svg.ace_warning {
|
||
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
||
background-color: darkorange;
|
||
}
|
||
.ace_icon_svg.ace_info {
|
||
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
||
background-color: royalblue;
|
||
}
|
||
|
||
.ace_icon_svg.ace_error_fold {
|
||
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
||
background-color: crimson;
|
||
}
|
||
.ace_icon_svg.ace_warning_fold {
|
||
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
||
background-color: darkorange;
|
||
}
|
||
|
||
.ace_scrollbar {
|
||
contain: strict;
|
||
position: absolute;
|
||
right: 0;
|
||
bottom: 0;
|
||
z-index: 6;
|
||
}
|
||
|
||
.ace_scrollbar-inner {
|
||
position: absolute;
|
||
cursor: text;
|
||
left: 0;
|
||
top: 0;
|
||
}
|
||
|
||
.ace_scrollbar-v{
|
||
overflow-x: hidden;
|
||
overflow-y: scroll;
|
||
top: 0;
|
||
}
|
||
|
||
.ace_scrollbar-h {
|
||
overflow-x: scroll;
|
||
overflow-y: hidden;
|
||
left: 0;
|
||
}
|
||
|
||
.ace_print-margin {
|
||
position: absolute;
|
||
height: 100%;
|
||
}
|
||
|
||
.ace_text-input {
|
||
position: absolute;
|
||
z-index: 0;
|
||
width: 0.5em;
|
||
height: 1em;
|
||
opacity: 0;
|
||
background: transparent;
|
||
-moz-appearance: none;
|
||
appearance: none;
|
||
border: none;
|
||
resize: none;
|
||
outline: none;
|
||
overflow: hidden;
|
||
font: inherit;
|
||
padding: 0 1px;
|
||
margin: 0 -1px;
|
||
contain: strict;
|
||
-ms-user-select: text;
|
||
-moz-user-select: text;
|
||
-webkit-user-select: text;
|
||
user-select: text;
|
||
/*with \`pre-line\` chrome inserts instead of space*/
|
||
white-space: pre!important;
|
||
}
|
||
.ace_text-input.ace_composition {
|
||
background: transparent;
|
||
color: inherit;
|
||
z-index: 1000;
|
||
opacity: 1;
|
||
}
|
||
.ace_composition_placeholder { color: transparent }
|
||
.ace_composition_marker {
|
||
border-bottom: 1px solid;
|
||
position: absolute;
|
||
border-radius: 0;
|
||
margin-top: 1px;
|
||
}
|
||
|
||
[ace_nocontext=true] {
|
||
transform: none!important;
|
||
filter: none!important;
|
||
clip-path: none!important;
|
||
mask : none!important;
|
||
contain: none!important;
|
||
perspective: none!important;
|
||
mix-blend-mode: initial!important;
|
||
z-index: auto;
|
||
}
|
||
|
||
.ace_layer {
|
||
z-index: 1;
|
||
position: absolute;
|
||
overflow: hidden;
|
||
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
||
word-wrap: normal;
|
||
white-space: pre;
|
||
height: 100%;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
/* setting pointer-events: auto; on node under the mouse, which changes
|
||
during scroll, will break mouse wheel scrolling in Safari */
|
||
pointer-events: none;
|
||
}
|
||
|
||
.ace_gutter-layer {
|
||
position: relative;
|
||
width: auto;
|
||
text-align: right;
|
||
pointer-events: auto;
|
||
height: 1000000px;
|
||
contain: style size layout;
|
||
}
|
||
|
||
.ace_text-layer {
|
||
font: inherit !important;
|
||
position: absolute;
|
||
height: 1000000px;
|
||
width: 1000000px;
|
||
contain: style size layout;
|
||
}
|
||
|
||
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
||
contain: style size layout;
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
}
|
||
|
||
.ace_hidpi .ace_text-layer,
|
||
.ace_hidpi .ace_gutter-layer,
|
||
.ace_hidpi .ace_content,
|
||
.ace_hidpi .ace_gutter {
|
||
contain: strict;
|
||
}
|
||
.ace_hidpi .ace_text-layer > .ace_line,
|
||
.ace_hidpi .ace_text-layer > .ace_line_group {
|
||
contain: strict;
|
||
}
|
||
|
||
.ace_cjk {
|
||
display: inline-block;
|
||
text-align: center;
|
||
}
|
||
|
||
.ace_cursor-layer {
|
||
z-index: 4;
|
||
}
|
||
|
||
.ace_cursor {
|
||
z-index: 4;
|
||
position: absolute;
|
||
box-sizing: border-box;
|
||
border-left: 2px solid;
|
||
/* workaround for smooth cursor repaintng whole screen in chrome */
|
||
transform: translatez(0);
|
||
}
|
||
|
||
.ace_multiselect .ace_cursor {
|
||
border-left-width: 1px;
|
||
}
|
||
|
||
.ace_slim-cursors .ace_cursor {
|
||
border-left-width: 1px;
|
||
}
|
||
|
||
.ace_overwrite-cursors .ace_cursor {
|
||
border-left-width: 0;
|
||
border-bottom: 1px solid;
|
||
}
|
||
|
||
.ace_hidden-cursors .ace_cursor {
|
||
opacity: 0.2;
|
||
}
|
||
|
||
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
||
opacity: 0;
|
||
}
|
||
|
||
.ace_smooth-blinking .ace_cursor {
|
||
transition: opacity 0.18s;
|
||
}
|
||
|
||
.ace_animate-blinking .ace_cursor {
|
||
animation-duration: 1000ms;
|
||
animation-timing-function: step-end;
|
||
animation-name: blink-ace-animate;
|
||
animation-iteration-count: infinite;
|
||
}
|
||
|
||
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
||
animation-duration: 1000ms;
|
||
animation-timing-function: ease-in-out;
|
||
animation-name: blink-ace-animate-smooth;
|
||
}
|
||
|
||
@keyframes blink-ace-animate {
|
||
from, to { opacity: 1; }
|
||
60% { opacity: 0; }
|
||
}
|
||
|
||
@keyframes blink-ace-animate-smooth {
|
||
from, to { opacity: 1; }
|
||
45% { opacity: 1; }
|
||
60% { opacity: 0; }
|
||
85% { opacity: 0; }
|
||
}
|
||
|
||
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
||
position: absolute;
|
||
z-index: 3;
|
||
}
|
||
|
||
.ace_marker-layer .ace_selection {
|
||
position: absolute;
|
||
z-index: 5;
|
||
}
|
||
|
||
.ace_marker-layer .ace_bracket {
|
||
position: absolute;
|
||
z-index: 6;
|
||
}
|
||
|
||
.ace_marker-layer .ace_error_bracket {
|
||
position: absolute;
|
||
border-bottom: 1px solid #DE5555;
|
||
border-radius: 0;
|
||
}
|
||
|
||
.ace_marker-layer .ace_active-line {
|
||
position: absolute;
|
||
z-index: 2;
|
||
}
|
||
|
||
.ace_marker-layer .ace_selected-word {
|
||
position: absolute;
|
||
z-index: 4;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.ace_line .ace_fold {
|
||
box-sizing: border-box;
|
||
|
||
display: inline-block;
|
||
height: 11px;
|
||
margin-top: -2px;
|
||
vertical-align: middle;
|
||
|
||
background-image:
|
||
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
||
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
||
background-repeat: no-repeat, repeat-x;
|
||
background-position: center center, top left;
|
||
color: transparent;
|
||
|
||
border: 1px solid black;
|
||
border-radius: 2px;
|
||
|
||
cursor: pointer;
|
||
pointer-events: auto;
|
||
}
|
||
|
||
.ace_dark .ace_fold {
|
||
}
|
||
|
||
.ace_fold:hover{
|
||
background-image:
|
||
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
||
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
||
}
|
||
|
||
.ace_tooltip {
|
||
background-color: #f5f5f5;
|
||
border: 1px solid gray;
|
||
border-radius: 1px;
|
||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
||
color: black;
|
||
max-width: 100%;
|
||
padding: 3px 4px;
|
||
position: fixed;
|
||
z-index: 999999;
|
||
box-sizing: border-box;
|
||
cursor: default;
|
||
white-space: pre;
|
||
word-wrap: break-word;
|
||
line-height: normal;
|
||
font-style: normal;
|
||
font-weight: normal;
|
||
letter-spacing: normal;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.ace_tooltip.ace_dark {
|
||
background-color: #636363;
|
||
color: #fff;
|
||
}
|
||
|
||
.ace_tooltip:focus {
|
||
outline: 1px solid #5E9ED6;
|
||
}
|
||
|
||
.ace_icon {
|
||
display: inline-block;
|
||
width: 18px;
|
||
vertical-align: top;
|
||
}
|
||
|
||
.ace_icon_svg {
|
||
display: inline-block;
|
||
width: 12px;
|
||
vertical-align: top;
|
||
-webkit-mask-repeat: no-repeat;
|
||
-webkit-mask-size: 12px;
|
||
-webkit-mask-position: center;
|
||
}
|
||
|
||
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
||
padding-right: 13px;
|
||
}
|
||
|
||
.ace_fold-widget {
|
||
box-sizing: border-box;
|
||
|
||
margin: 0 -12px 0 1px;
|
||
display: none;
|
||
width: 11px;
|
||
vertical-align: top;
|
||
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
||
background-repeat: no-repeat;
|
||
background-position: center;
|
||
|
||
border-radius: 3px;
|
||
|
||
border: 1px solid transparent;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ace_folding-enabled .ace_fold-widget {
|
||
display: inline-block;
|
||
}
|
||
|
||
.ace_fold-widget.ace_end {
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
||
}
|
||
|
||
.ace_fold-widget.ace_closed {
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
||
}
|
||
|
||
.ace_fold-widget:hover {
|
||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||
background-color: rgba(255, 255, 255, 0.2);
|
||
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
||
}
|
||
|
||
.ace_fold-widget:active {
|
||
border: 1px solid rgba(0, 0, 0, 0.4);
|
||
background-color: rgba(0, 0, 0, 0.05);
|
||
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
||
}
|
||
/**
|
||
* Dark version for fold widgets
|
||
*/
|
||
.ace_dark .ace_fold-widget {
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
||
}
|
||
.ace_dark .ace_fold-widget.ace_end {
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
||
}
|
||
.ace_dark .ace_fold-widget.ace_closed {
|
||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
||
}
|
||
.ace_dark .ace_fold-widget:hover {
|
||
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
||
background-color: rgba(255, 255, 255, 0.1);
|
||
}
|
||
.ace_dark .ace_fold-widget:active {
|
||
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
||
}
|
||
|
||
.ace_inline_button {
|
||
border: 1px solid lightgray;
|
||
display: inline-block;
|
||
margin: -1px 8px;
|
||
padding: 0 5px;
|
||
pointer-events: auto;
|
||
cursor: pointer;
|
||
}
|
||
.ace_inline_button:hover {
|
||
border-color: gray;
|
||
background: rgba(200,200,200,0.2);
|
||
display: inline-block;
|
||
pointer-events: auto;
|
||
}
|
||
|
||
.ace_fold-widget.ace_invalid {
|
||
background-color: #FFB4B4;
|
||
border-color: #DE5555;
|
||
}
|
||
|
||
.ace_fade-fold-widgets .ace_fold-widget {
|
||
transition: opacity 0.4s ease 0.05s;
|
||
opacity: 0;
|
||
}
|
||
|
||
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
||
transition: opacity 0.05s ease 0.05s;
|
||
opacity:1;
|
||
}
|
||
|
||
.ace_underline {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
.ace_bold {
|
||
font-weight: bold;
|
||
}
|
||
|
||
.ace_nobold .ace_bold {
|
||
font-weight: normal;
|
||
}
|
||
|
||
.ace_italic {
|
||
font-style: italic;
|
||
}
|
||
|
||
|
||
.ace_error-marker {
|
||
background-color: rgba(255, 0, 0,0.2);
|
||
position: absolute;
|
||
z-index: 9;
|
||
}
|
||
|
||
.ace_highlight-marker {
|
||
background-color: rgba(255, 255, 0,0.2);
|
||
position: absolute;
|
||
z-index: 8;
|
||
}
|
||
|
||
.ace_mobile-menu {
|
||
position: absolute;
|
||
line-height: 1.5;
|
||
border-radius: 4px;
|
||
-ms-user-select: none;
|
||
-moz-user-select: none;
|
||
-webkit-user-select: none;
|
||
user-select: none;
|
||
background: white;
|
||
box-shadow: 1px 3px 2px grey;
|
||
border: 1px solid #dcdcdc;
|
||
color: black;
|
||
}
|
||
.ace_dark > .ace_mobile-menu {
|
||
background: #333;
|
||
color: #ccc;
|
||
box-shadow: 1px 3px 2px grey;
|
||
border: 1px solid #444;
|
||
|
||
}
|
||
.ace_mobile-button {
|
||
padding: 2px;
|
||
cursor: pointer;
|
||
overflow: hidden;
|
||
}
|
||
.ace_mobile-button:hover {
|
||
background-color: #eee;
|
||
opacity:1;
|
||
}
|
||
.ace_mobile-button:active {
|
||
background-color: #ddd;
|
||
}
|
||
|
||
.ace_placeholder {
|
||
font-family: arial;
|
||
transform: scale(0.9);
|
||
transform-origin: left;
|
||
white-space: pre;
|
||
opacity: 0.7;
|
||
margin: 0 10px;
|
||
}
|
||
|
||
.ace_ghost_text {
|
||
opacity: 0.5;
|
||
font-style: italic;
|
||
white-space: pre;
|
||
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,i){var o=n("../lib/dom"),s=n("../lib/oop"),d=n("../lib/event_emitter").EventEmitter,a=function(){function c(l,u){this.canvas=o.createElement("canvas"),this.renderer=u,this.pixelRatio=1,this.maxHeight=u.layerConfig.maxHeight,this.lineHeight=u.layerConfig.lineHeight,this.canvasHeight=l.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=l.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},l.element.appendChild(this.canvas)}return c.prototype.$updateDecorators=function(l){var u=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(l){this.maxHeight=l.maxHeight,this.lineHeight=l.lineHeight,this.canvasHeight=l.height;var h=(l.lastRow+1)*this.lineHeight;h<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var f=this.canvas.getContext("2d");function p(k,I){return k.priority<I.priority?-1:k.priority>I.priority?1:0}var g=this.renderer.session.$annotations;if(f.clearRect(0,0,this.canvas.width,this.canvas.height),g){var b={info:1,warning:2,error:3};g.forEach(function(k){k.priority=b[k.type]||null}),g=g.sort(p);for(var x=this.renderer.session.$foldData,S=0;S<g.length;S++){var T=g[S].row,v=this.compensateFoldRows(T,x),w=Math.round((T-v)*this.lineHeight*this.heightRatio),y=Math.round((T-v)*this.lineHeight*this.heightRatio),m=Math.round(((T-v)*this.lineHeight+this.lineHeight)*this.heightRatio),E=m-y;if(E<this.minDecorationHeight){var A=(y+m)/2|0;A<this.halfMinDecorationHeight?A=this.halfMinDecorationHeight:A+this.halfMinDecorationHeight>this.canvasHeight&&(A=this.canvasHeight-this.halfMinDecorationHeight),y=Math.round(A-this.halfMinDecorationHeight),m=Math.round(A+this.halfMinDecorationHeight)}f.fillStyle=u[g[S].type]||null,f.fillRect(0,w,this.canvasWidth,m-y)}}var C=this.renderer.session.selection.getCursor();if(C){var v=this.compensateFoldRows(C.row,x),w=Math.round((C.row-v)*this.lineHeight*this.heightRatio);f.fillStyle="rgba(0, 0, 0, 0.5)",f.fillRect(0,w,this.canvasWidth,2)}},c.prototype.compensateFoldRows=function(l,u){var h=0;if(u&&u.length>0)for(var f=0;f<u.length;f++)l>u[f].start.row&&l<u[f].end.row?h+=l-u[f].start.row:l>=u[f].end.row&&(h+=u[f].end.row-u[f].start.row);return h},c}();s.implement(a.prototype,d),r.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],function(n,r,i){var o=n("./lib/oop"),s=n("./lib/dom"),d=n("./lib/lang"),a=n("./config"),c=n("./layer/gutter").Gutter,l=n("./layer/marker").Marker,u=n("./layer/text").Text,h=n("./layer/cursor").Cursor,f=n("./scrollbar").HScrollBar,p=n("./scrollbar").VScrollBar,g=n("./scrollbar_custom").HScrollBar,b=n("./scrollbar_custom").VScrollBar,x=n("./renderloop").RenderLoop,S=n("./layer/font_metrics").FontMetrics,T=n("./lib/event_emitter").EventEmitter,v=n("./css/editor.css"),w=n("./layer/decorators").Decorator,y=n("./lib/useragent");s.importCssString(v,"ace_editor.css",!1);var m=function(){function E(A,C){var k=this;this.container=A||s.createElement("div"),s.addCssClass(this.container,"ace_editor"),s.HI_DPI&&s.addCssClass(this.container,"ace_hidpi"),this.setTheme(C),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var I=this.$textLayer=new u(this.content);this.canvas=I.element,this.$markerFront=new l(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.on("scroll",function(R){k.$scrollAnimation||k.session.setScrollTop(R.data-k.scrollMargin.top)}),this.scrollBarH.on("scroll",function(R){k.$scrollAnimation||k.session.setScrollLeft(R.data-k.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new S(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(R){k.updateCharacterSize(),k.onResize(!0,k.gutterWidth,k.$size.width,k.$size.height),k._signal("changeCharacterSize",R)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!y.isIOS,this.$loop=new x(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return E.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),s.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},E.prototype.setSession=function(A){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=A,A&&this.scrollMargin.top&&A.getScrollTop()<=0&&A.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(A),this.$markerBack.setSession(A),this.$markerFront.setSession(A),this.$gutterLayer.setSession(A),this.$textLayer.setSession(A),A&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},E.prototype.updateLines=function(A,C,k){if(C===void 0&&(C=1/0),this.$changedLines?(this.$changedLines.firstRow>A&&(this.$changedLines.firstRow=A),this.$changedLines.lastRow<C&&(this.$changedLines.lastRow=C)):this.$changedLines={firstRow:A,lastRow:C},this.$changedLines.lastRow<this.layerConfig.firstRow)if(k)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},E.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},E.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},E.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},E.prototype.updateFull=function(A){A?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},E.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},E.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},E.prototype.onResize=function(A,C,k,I){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=A?1:0;var R=this.container;I||(I=R.clientHeight||R.scrollHeight),k||(k=R.clientWidth||R.scrollWidth);var M=this.$updateCachedSize(A,C,k,I);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!k&&!I)return this.resizing=0;A&&(this.$gutterLayer.$padding=null),A?this.$renderChanges(M|this.$changes,!0):this.$loop.schedule(M|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},E.prototype.$updateCachedSize=function(A,C,k,I){I-=this.$extraHeight||0;var R=0,M=this.$size,O={width:M.width,height:M.height,scrollerHeight:M.scrollerHeight,scrollerWidth:M.scrollerWidth};if(I&&(A||M.height!=I)&&(M.height=I,R|=this.CHANGE_SIZE,M.scrollerHeight=M.height,this.$horizScroll&&(M.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(M.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",R=R|this.CHANGE_SCROLL),k&&(A||M.width!=k)){R|=this.CHANGE_SIZE,M.width=k,C==null&&(C=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=C,s.setStyle(this.scrollBarH.element.style,"left",C+"px"),s.setStyle(this.scroller.style,"left",C+this.margin.left+"px"),M.scrollerWidth=Math.max(0,k-C-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var P=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",P),s.setStyle(this.scroller.style,"right",P),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(M.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||A)&&(R|=this.CHANGE_FULL)}return M.$dirty=!k||!I,R&&this._signal("resize",O),R},E.prototype.onGutterResize=function(A){var C=this.$showGutter?A:0;C!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,C,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},E.prototype.adjustWrapLimit=function(){var A=this.$size.scrollerWidth-this.$padding*2,C=Math.floor(A/this.characterWidth);return this.session.adjustWrapLimit(C,this.$showPrintMargin&&this.$printMarginColumn)},E.prototype.setAnimatedScroll=function(A){this.setOption("animatedScroll",A)},E.prototype.getAnimatedScroll=function(){return this.$animatedScroll},E.prototype.setShowInvisibles=function(A){this.setOption("showInvisibles",A),this.session.$bidiHandler.setShowInvisibles(A)},E.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},E.prototype.getDisplayIndentGuide=function(){return this.getOption("displayIndentGuides")},E.prototype.setDisplayIndentGuides=function(A){this.setOption("displayIndentGuides",A)},E.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},E.prototype.setHighlightIndentGuides=function(A){this.setOption("highlightIndentGuides",A)},E.prototype.setShowPrintMargin=function(A){this.setOption("showPrintMargin",A)},E.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},E.prototype.setPrintMarginColumn=function(A){this.setOption("printMarginColumn",A)},E.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},E.prototype.getShowGutter=function(){return this.getOption("showGutter")},E.prototype.setShowGutter=function(A){return this.setOption("showGutter",A)},E.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},E.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},E.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},E.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},E.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var A=s.createElement("div");A.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",A.appendChild(this.$printMarginEl),this.content.insertBefore(A,this.content.firstChild)}var C=this.$printMarginEl.style;C.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",C.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},E.prototype.getContainerElement=function(){return this.container},E.prototype.getMouseEventTarget=function(){return this.scroller},E.prototype.getTextAreaContainer=function(){return this.container},E.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var A=this.textarea.style,C=this.$composition;if(!this.$keepTextAreaAtCursor&&!C){s.translate(this.textarea,-100,0);return}var k=this.$cursorLayer.$pixelPos;if(k){C&&C.markerRange&&(k=this.$cursorLayer.getPixelPosition(C.markerRange.start,!0));var I=this.layerConfig,R=k.top,M=k.left;R-=I.offset;var O=C&&C.useTextareaForIME||y.isMobile?this.lineHeight:1;if(R<0||R>I.height-O){s.translate(this.textarea,0,0);return}var P=1,N=this.$size.height-O;if(!C)R+=this.lineHeight;else if(C.useTextareaForIME){var B=this.textarea.value;P=this.characterWidth*this.session.$getStringScreenWidth(B)[0]}else R+=this.lineHeight+2;M-=this.scrollLeft,M>this.$size.scrollerWidth-P&&(M=this.$size.scrollerWidth-P),M+=this.gutterWidth+this.margin.left,s.setStyle(A,"height",O+"px"),s.setStyle(A,"width",P+"px"),s.translate(this.textarea,Math.min(M,this.$size.scrollerWidth-P),Math.min(R,N))}}},E.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},E.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},E.prototype.getLastFullyVisibleRow=function(){var A=this.layerConfig,C=A.lastRow,k=this.session.documentToScreenRow(C,0)*A.lineHeight;return k-this.session.getScrollTop()>A.height-A.lineHeight?C-1:C},E.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},E.prototype.setPadding=function(A){this.$padding=A,this.$textLayer.setPadding(A),this.$cursorLayer.setPadding(A),this.$markerFront.setPadding(A),this.$markerBack.setPadding(A),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},E.prototype.setScrollMargin=function(A,C,k,I){var R=this.scrollMargin;R.top=A|0,R.bottom=C|0,R.right=I|0,R.left=k|0,R.v=R.top+R.bottom,R.h=R.left+R.right,R.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-R.top),this.updateFull()},E.prototype.setMargin=function(A,C,k,I){var R=this.margin;R.top=A|0,R.bottom=C|0,R.right=I|0,R.left=k|0,R.v=R.top+R.bottom,R.h=R.left+R.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},E.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},E.prototype.setHScrollBarAlwaysVisible=function(A){this.setOption("hScrollBarAlwaysVisible",A)},E.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},E.prototype.setVScrollBarAlwaysVisible=function(A){this.setOption("vScrollBarAlwaysVisible",A)},E.prototype.$updateScrollBarV=function(){var A=this.layerConfig.maxHeight,C=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(A-=(C-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>A-C&&(A=this.scrollTop+C,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(A+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},E.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},E.prototype.freeze=function(){this.$frozen=!0},E.prototype.unfreeze=function(){this.$frozen=!1},E.prototype.$renderChanges=function(A,C){if(this.$changes&&(A|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!A&&!C){this.$changes|=A;return}if(this.$size.$dirty)return this.$changes|=A,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",A),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var k=this.layerConfig;if(A&this.CHANGE_FULL||A&this.CHANGE_SIZE||A&this.CHANGE_TEXT||A&this.CHANGE_LINES||A&this.CHANGE_SCROLL||A&this.CHANGE_H_SCROLL){if(A|=this.$computeLayerConfig()|this.$loop.clear(),k.firstRow!=this.layerConfig.firstRow&&k.firstRowScreen==this.layerConfig.firstRowScreen){var I=this.scrollTop+(k.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;I>0&&(this.scrollTop=I,A=A|this.CHANGE_SCROLL,A|=this.$computeLayerConfig()|this.$loop.clear())}k=this.layerConfig,this.$updateScrollBarV(),A&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-k.offset);var R=k.width+2*this.$padding+"px",M=k.minHeight+"px";s.setStyle(this.content.style,"width",R),s.setStyle(this.content.style,"height",M)}if(A&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-k.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),A&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(k),this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k),this.$markerBack.update(k),this.$markerFront.update(k),this.$cursorLayer.update(k),this.$moveTextAreaToCursor(),this._signal("afterRender",A);return}if(A&this.CHANGE_SCROLL){this.$changedLines=null,A&this.CHANGE_TEXT||A&this.CHANGE_LINES?this.$textLayer.update(k):this.$textLayer.scrollLines(k),this.$showGutter&&(A&this.CHANGE_GUTTER||A&this.CHANGE_LINES?this.$gutterLayer.update(k):this.$gutterLayer.scrollLines(k)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k),this.$markerBack.update(k),this.$markerFront.update(k),this.$cursorLayer.update(k),this.$moveTextAreaToCursor(),this._signal("afterRender",A);return}A&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(k),this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):A&this.CHANGE_LINES?((this.$updateLines()||A&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):A&this.CHANGE_TEXT||A&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):A&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)),A&this.CHANGE_CURSOR&&(this.$cursorLayer.update(k),this.$moveTextAreaToCursor()),A&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(k),A&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(k),this._signal("afterRender",A)},E.prototype.$autosize=function(){var A=this.session.getScreenLength()*this.lineHeight,C=this.$maxLines*this.lineHeight,k=Math.min(C,Math.max((this.$minLines||1)*this.lineHeight,A))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(k+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&k>this.$maxPixelHeight&&(k=this.$maxPixelHeight);var I=k<=2*this.lineHeight,R=!I&&A>C;if(k!=this.desiredHeight||this.$size.height!=this.desiredHeight||R!=this.$vScroll){R!=this.$vScroll&&(this.$vScroll=R,this.scrollBarV.setVisible(R));var M=this.container.clientWidth;this.container.style.height=k+"px",this.$updateCachedSize(!0,this.$gutterWidth,M,k),this.desiredHeight=k,this._signal("autosize")}},E.prototype.$computeLayerConfig=function(){var A=this.session,C=this.$size,k=C.height<=2*this.lineHeight,I=this.session.getScreenLength(),R=I*this.lineHeight,M=this.$getLongestLine(),O=!k&&(this.$hScrollBarAlwaysVisible||C.scrollerWidth-M-2*this.$padding<0),P=this.$horizScroll!==O;P&&(this.$horizScroll=O,this.scrollBarH.setVisible(O));var N=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var B=C.scrollerHeight+this.lineHeight,W=!this.$maxLines&&this.$scrollPastEnd?(C.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;R+=W;var K=this.scrollMargin;this.session.setScrollTop(Math.max(-K.top,Math.min(this.scrollTop,R-C.scrollerHeight+K.bottom))),this.session.setScrollLeft(Math.max(-K.left,Math.min(this.scrollLeft,M+2*this.$padding-C.scrollerWidth+K.right)));var q=!k&&(this.$vScrollBarAlwaysVisible||C.scrollerHeight-R+W<0||this.scrollTop>K.top),re=N!==q;re&&(this.$vScroll=q,this.scrollBarV.setVisible(q));var Y=this.scrollTop%this.lineHeight,Z=Math.ceil(B/this.lineHeight)-1,te=Math.max(0,Math.round((this.scrollTop-Y)/this.lineHeight)),ie=te+Z,ce,he,ve=this.lineHeight;te=A.screenToDocumentRow(te,0);var Ce=A.getFoldLine(te);Ce&&(te=Ce.start.row),ce=A.documentToScreenRow(te,0),he=A.getRowLength(te)*ve,ie=Math.min(A.screenToDocumentRow(ie,0),A.getLength()-1),B=C.scrollerHeight+A.getRowLength(ie)*ve+he,Y=this.scrollTop-ce*ve;var _e=0;return(this.layerConfig.width!=M||P)&&(_e=this.CHANGE_H_SCROLL),(P||re)&&(_e|=this.$updateCachedSize(!0,this.gutterWidth,C.width,C.height),this._signal("scrollbarVisibilityChanged"),re&&(M=this.$getLongestLine())),this.layerConfig={width:M,padding:this.$padding,firstRow:te,firstRowScreen:ce,lastRow:ie,lineHeight:ve,characterWidth:this.characterWidth,minHeight:B,maxHeight:R,offset:Y,gutterOffset:ve?Math.max(0,Math.ceil((Y+C.height-C.scrollerHeight)/ve)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(M-this.$padding),_e},E.prototype.$updateLines=function(){if(this.$changedLines){var A=this.$changedLines.firstRow,C=this.$changedLines.lastRow;this.$changedLines=null;var k=this.layerConfig;if(!(A>k.lastRow+1)&&!(C<k.firstRow)){if(C===1/0){this.$showGutter&&this.$gutterLayer.update(k),this.$textLayer.update(k);return}return this.$textLayer.updateLines(k,A,C),!0}}},E.prototype.$getLongestLine=function(){var A=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(A+=1),this.$textLayer&&A>this.$textLayer.MAX_LINE_LENGTH&&(A=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(A*this.characterWidth))},E.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},E.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},E.prototype.addGutterDecoration=function(A,C){this.$gutterLayer.addGutterDecoration(A,C)},E.prototype.removeGutterDecoration=function(A,C){this.$gutterLayer.removeGutterDecoration(A,C)},E.prototype.updateBreakpoints=function(A){this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.setAnnotations=function(A){this.$gutterLayer.setAnnotations(A),this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},E.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},E.prototype.showCursor=function(){this.$cursorLayer.showCursor()},E.prototype.scrollSelectionIntoView=function(A,C,k){this.scrollCursorIntoView(A,k),this.scrollCursorIntoView(C,k)},E.prototype.scrollCursorIntoView=function(A,C,k){if(this.$size.scrollerHeight!==0){var I=this.$cursorLayer.getPixelPosition(A),R=I.left,M=I.top,O=k&&k.top||0,P=k&&k.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var N=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;N+O>M?(C&&N+O>M+this.lineHeight&&(M-=C*this.$size.scrollerHeight),M===0&&(M=-this.scrollMargin.top),this.session.setScrollTop(M)):N+this.$size.scrollerHeight-P<M+this.lineHeight&&(C&&N+this.$size.scrollerHeight-P<M-this.lineHeight&&(M+=C*this.$size.scrollerHeight),this.session.setScrollTop(M+this.lineHeight+P-this.$size.scrollerHeight));var B=this.scrollLeft,W=2*this.layerConfig.characterWidth;R-W<B?(R-=W,R<this.$padding+W&&(R=-this.scrollMargin.left),this.session.setScrollLeft(R)):(R+=W,B+this.$size.scrollerWidth<R+this.characterWidth?this.session.setScrollLeft(Math.round(R+this.characterWidth-this.$size.scrollerWidth)):B<=this.$padding&&R-B<this.characterWidth&&this.session.setScrollLeft(0))}},E.prototype.getScrollTop=function(){return this.session.getScrollTop()},E.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},E.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},E.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},E.prototype.scrollToRow=function(A){this.session.setScrollTop(A*this.lineHeight)},E.prototype.alignCursor=function(A,C){typeof A=="number"&&(A={row:A,column:0});var k=this.$cursorLayer.getPixelPosition(A),I=this.$size.scrollerHeight-this.lineHeight,R=k.top-I*(C||0);return this.session.setScrollTop(R),R},E.prototype.$calcSteps=function(A,C){var k=0,I=this.STEPS,R=[],M=function(O,P,N){return N*(Math.pow(O-1,3)+1)+P};for(k=0;k<I;++k)R.push(M(k/this.STEPS,A,C-A));return R},E.prototype.scrollToLine=function(A,C,k,I){var R=this.$cursorLayer.getPixelPosition({row:A,column:0}),M=R.top;C&&(M-=this.$size.scrollerHeight/2);var O=this.scrollTop;this.session.setScrollTop(M),k!==!1&&this.animateScrolling(O,I)},E.prototype.animateScrolling=function(A,C){var k=this.scrollTop;if(!this.$animatedScroll)return;var I=this;if(A==k)return;if(this.$scrollAnimation){var R=this.$scrollAnimation.steps;if(R.length&&(A=R[0],A==k))return}var M=I.$calcSteps(A,k);this.$scrollAnimation={from:A,to:k,steps:M},clearInterval(this.$timer),I.session.setScrollTop(M.shift()),I.session.$scrollTop=k;function O(){I.$timer=clearInterval(I.$timer),I.$scrollAnimation=null,I.$stopAnimation=!1,C&&C()}this.$timer=setInterval(function(){if(I.$stopAnimation){O();return}if(!I.session)return clearInterval(I.$timer);M.length?(I.session.setScrollTop(M.shift()),I.session.$scrollTop=k):k!=null?(I.session.$scrollTop=-1,I.session.setScrollTop(k),k=null):O()},10)},E.prototype.scrollToY=function(A){this.scrollTop!==A&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=A)},E.prototype.scrollToX=function(A){this.scrollLeft!==A&&(this.scrollLeft=A),this.$loop.schedule(this.CHANGE_H_SCROLL)},E.prototype.scrollTo=function(A,C){this.session.setScrollTop(C),this.session.setScrollLeft(A)},E.prototype.scrollBy=function(A,C){C&&this.session.setScrollTop(this.session.getScrollTop()+C),A&&this.session.setScrollLeft(this.session.getScrollLeft()+A)},E.prototype.isScrollableBy=function(A,C){if(C<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||C>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||A<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||A>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},E.prototype.pixelToScreenCoordinates=function(A,C){var k;if(this.$hasCssTransforms){k={top:0,left:0};var I=this.$fontMetrics.transformCoordinates([A,C]);A=I[1]-this.gutterWidth-this.margin.left,C=I[0]}else k=this.scroller.getBoundingClientRect();var R=A+this.scrollLeft-k.left-this.$padding,M=R/this.characterWidth,O=Math.floor((C+this.scrollTop-k.top)/this.lineHeight),P=this.$blockCursor?Math.floor(M):Math.round(M);return{row:O,column:P,side:M-P>0?1:-1,offsetX:R}},E.prototype.screenToTextCoordinates=function(A,C){var k;if(this.$hasCssTransforms){k={top:0,left:0};var I=this.$fontMetrics.transformCoordinates([A,C]);A=I[1]-this.gutterWidth-this.margin.left,C=I[0]}else k=this.scroller.getBoundingClientRect();var R=A+this.scrollLeft-k.left-this.$padding,M=R/this.characterWidth,O=this.$blockCursor?Math.floor(M):Math.round(M),P=Math.floor((C+this.scrollTop-k.top)/this.lineHeight);return this.session.screenToDocumentPosition(P,Math.max(O,0),R)},E.prototype.textToScreenCoordinates=function(A,C){var k=this.scroller.getBoundingClientRect(),I=this.session.documentToScreenPosition(A,C),R=this.$padding+(this.session.$bidiHandler.isBidiRow(I.row,A)?this.session.$bidiHandler.getPosLeft(I.column):Math.round(I.column*this.characterWidth)),M=I.row*this.lineHeight;return{pageX:k.left+R-this.scrollLeft,pageY:k.top+M-this.scrollTop}},E.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},E.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},E.prototype.showComposition=function(A){this.$composition=A,A.cssText||(A.cssText=this.textarea.style.cssText),A.useTextareaForIME==null&&(A.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):A.markerId=this.session.addMarker(A.markerRange,"ace_composition_marker","text")},E.prototype.setCompositionText=function(A){var C=this.session.selection.cursor;this.addToken(A,"composition_placeholder",C.row,C.column),this.$moveTextAreaToCursor()},E.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var A=this.session.selection.cursor;this.removeExtraToken(A.row,A.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},E.prototype.setGhostText=function(A,C){var k=this.session.selection.cursor,I=C||{row:k.row,column:k.column};this.removeGhostText();var R=A.split(`
|
||
`);this.addToken(R[0],"ghost_text",I.row,I.column),this.$ghostText={text:A,position:{row:I.row,column:I.column}},R.length>1&&(this.$ghostTextWidget={text:R.slice(1).join(`
|
||
`),row:I.row,column:I.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},E.prototype.removeGhostText=function(){if(this.$ghostText){var A=this.$ghostText.position;this.removeExtraToken(A.row,A.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},E.prototype.addToken=function(A,C,k,I){var R=this.session;R.bgTokenizer.lines[k]=null;var M={type:C,value:A},O=R.getTokens(k);if(I==null||!O.length)O.push(M);else for(var P=0,N=0;N<O.length;N++){var B=O[N];if(P+=B.value.length,I<=P){var W=B.value.length-(P-I),K=B.value.slice(0,W),q=B.value.slice(W);O.splice(N,1,{type:B.type,value:K},M,{type:B.type,value:q});break}}this.updateLines(k,k)},E.prototype.removeExtraToken=function(A,C){this.session.bgTokenizer.lines[A]=null,this.updateLines(A,A)},E.prototype.setTheme=function(A,C){var k=this;if(this.$themeId=A,k._dispatchEvent("themeChange",{theme:A}),!A||typeof A=="string"){var I=A||this.$options.theme.initialValue;a.loadModule(["theme",I],R)}else R(A);function R(M){if(k.$themeId!=A)return C&&C();if(!M||!M.cssClass)throw new Error("couldn't load module "+A+" or it didn't call define");M.$id&&(k.$themeId=M.$id),s.importCssString(M.cssText,M.cssClass,k.container),k.theme&&s.removeCssClass(k.container,k.theme.cssClass);var O="padding"in M?M.padding:"padding"in(k.theme||{})?4:k.$padding;k.$padding&&O!=k.$padding&&k.setPadding(O),k.$theme=M.cssClass,k.theme=M,s.addCssClass(k.container,M.cssClass),s.setCssClass(k.container,"ace_dark",M.isDark),k.$size&&(k.$size.width=0,k.$updateSizeAsync()),k._dispatchEvent("themeLoaded",{theme:M}),C&&C()}},E.prototype.getTheme=function(){return this.$themeId},E.prototype.setStyle=function(A,C){s.setCssClass(this.container,A,C!==!1)},E.prototype.unsetStyle=function(A){s.removeCssClass(this.container,A)},E.prototype.setCursorStyle=function(A){s.setStyle(this.scroller.style,"cursor",A)},E.prototype.setMouseCursor=function(A){s.setStyle(this.scroller.style,"cursor",A)},E.prototype.attachToShadowRoot=function(){s.importCssString(v,"ace_editor.css",this.container)},E.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},E.prototype.$updateCustomScrollbar=function(A){var C=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,A===!0?(this.scrollBarV=new b(this.container,this),this.scrollBarH=new g(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollTop(k.data-C.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollLeft(k.data-C.scrollMargin.left)}),this.$scrollDecorator=new w(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollTop(k.data-C.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollLeft(k.data-C.scrollMargin.left)}))},E.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var A=this;this.$resizeTimer=d.delayedCall(function(){A.destroyed||A.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(C){var k=C[0].contentRect.width,I=C[0].contentRect.height;Math.abs(A.$size.width-k)>1||Math.abs(A.$size.height-I)>1?A.$resizeTimer.delay():A.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},E}();m.prototype.CHANGE_CURSOR=1,m.prototype.CHANGE_MARKER=2,m.prototype.CHANGE_GUTTER=4,m.prototype.CHANGE_SCROLL=8,m.prototype.CHANGE_LINES=16,m.prototype.CHANGE_TEXT=32,m.prototype.CHANGE_SIZE=64,m.prototype.CHANGE_MARKER_BACK=128,m.prototype.CHANGE_MARKER_FRONT=256,m.prototype.CHANGE_FULL=512,m.prototype.CHANGE_H_SCROLL=1024,m.prototype.$changes=0,m.prototype.$padding=null,m.prototype.$frozen=!1,m.prototype.STEPS=8,o.implement(m.prototype,T),a.defineOptions(m.prototype,"renderer",{useResizeObserver:{set:function(E){!E&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):E&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(E){this.$textLayer.setShowInvisibles(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(E){typeof E=="number"&&(this.$printMarginColumn=E),this.$showPrintMargin=!!E,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(E){this.$gutter.style.display=E?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(E){this.$gutterLayer.$useSvgGutterIcons=E},initialValue:!1},showFoldedAnnotations:{set:function(E){this.$gutterLayer.$showFoldedAnnotations=E},initialValue:!1},fadeFoldWidgets:{set:function(E){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",E)},initialValue:!1},showFoldWidgets:{set:function(E){this.$gutterLayer.setShowFoldWidgets(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(E){this.$textLayer.setDisplayIndentGuides(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(E){this.$textLayer.setHighlightIndentGuides(E)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(E){this.$gutterLayer.setHighlightGutterLine(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(E){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(E){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(E){typeof E=="number"&&(E=E+"px"),this.container.style.fontSize=E,this.updateFontSize()},initialValue:12},fontFamily:{set:function(E){this.container.style.fontFamily=E,this.updateFontSize()}},maxLines:{set:function(E){this.updateFull()}},minLines:{set:function(E){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(E){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(E){E=+E||0,this.$scrollPastEnd!=E&&(this.$scrollPastEnd=E,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(E){this.$gutterLayer.$fixedWidth=!!E,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(E){this.$updateCustomScrollbar(E)},initialValue:!1},theme:{set:function(E){this.setTheme(E)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!y.isMobile&&!y.isIE}}),r.VirtualRenderer=m}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,i){var o=n("../lib/oop"),s=n("../lib/net"),d=n("../lib/event_emitter").EventEmitter,a=n("../config");function c(f){var p="importScripts('"+s.qualifyURL(f)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,b=new g;return b.append(p),b.getBlob("application/javascript")}}function l(f){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var p=c(f),g=window.URL||window.webkitURL,b=g.createObjectURL(p);return new Worker(b)}return new Worker(f)}var u=function(f){f.postMessage||(f=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=f,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){o.implement(this,d),this.$createWorkerFromOldConfig=function(f,p,g,b,x){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),a.get("packaged")||!n.toUrl)b=b||a.moduleUrl(p,"worker");else{var S=this.$normalizePath;b=b||S(n.toUrl("ace/worker/worker.js",null,"_"));var T={};f.forEach(function(v){T[v]=S(n.toUrl(v,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=l(b),x&&this.send("importScripts",x),this.$worker.postMessage({init:!0,tlns:T,module:p,classname:g}),this.$worker},this.onMessage=function(f){var p=f.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var g=this.callbacks[p.id];g&&(g(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(f){window.console&&console.error&&console.error(f)},this.$normalizePath=function(f){return s.qualifyURL(f)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(f,p){this.$worker.postMessage({command:f,args:p})},this.call=function(f,p,g){if(g){var b=this.callbackId++;this.callbacks[b]=g,p.push(b)}this.send(f,p)},this.emit=function(f,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:f,data:{data:p.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(f){this.$doc&&this.terminate(),this.$doc=f,this.call("setValue",[f.getValue()]),f.on("change",this.changeListener,!0)},this.changeListener=function(f){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),f.action=="insert"?this.deltaQueue.push(f.start,f.lines):this.deltaQueue.push(f.start,f.end)},this.$sendDeltaQueue=function(){var f=this.deltaQueue;f&&(this.deltaQueue=null,f.length>50&&f.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:f}))}}).call(u.prototype);var h=function(f,p,g){var b=null,x=!1,S=Object.create(d),T=[],v=new u({messageBuffer:T,terminate:function(){},postMessage:function(y){T.push(y),b&&(x?setTimeout(w):w())}});v.setEmitSync=function(y){x=y};var w=function(){var y=T.shift();y.command?b[y.command].apply(b,y.args):y.event&&S._signal(y.event,y.data)};return S.postMessage=function(y){v.onMessage({data:y})},S.callback=function(y,m){this.postMessage({type:"call",id:m,data:y})},S.emit=function(y,m){this.postMessage({type:"event",name:y,data:m})},a.loadModule(["worker",p],function(y){for(b=new y[g](S);T.length;)w()}),v};r.UIWorkerClient=h,r.WorkerClient=u,r.createWorker=l}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,i){var o=n("./range").Range,s=n("./lib/event_emitter").EventEmitter,d=n("./lib/oop"),a=function(){function c(l,u,h,f,p,g){var b=this;this.length=u,this.session=l,this.doc=l.getDocument(),this.mainClass=p,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=f,this.$onCursorChange=function(){setTimeout(function(){b.onCursorChange()})},this.$pos=h;var x=l.getUndoManager().$undoStack||l.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=x.length,this.setup(),l.selection.on("changeCursor",this.$onCursorChange)}return c.prototype.setup=function(){var l=this,u=this.doc,h=this.session;this.selectionBefore=h.selection.toJSON(),h.selection.inMultiSelectMode&&h.selection.toSingleRange(),this.pos=u.createAnchor(this.$pos.row,this.$pos.column);var f=this.pos;f.$insertRight=!0,f.detach(),f.markerId=h.addMarker(new o(f.row,f.column,f.row,f.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var g=u.createAnchor(p.row,p.column);g.$insertRight=!0,g.detach(),l.others.push(g)}),h.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){if(!this.othersActive){var l=this.session,u=this;this.othersActive=!0,this.others.forEach(function(h){h.markerId=l.addMarker(new o(h.row,h.column,h.row,h.column+u.length),u.othersClass,null,!1)})}},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var l=0;l<this.others.length;l++)this.session.removeMarker(this.others[l].markerId)}},c.prototype.onUpdate=function(l){if(this.$updating)return this.updateAnchors(l);var u=l;if(u.start.row===u.end.row&&u.start.row===this.pos.row){this.$updating=!0;var h=l.action==="insert"?u.end.column-u.start.column:u.start.column-u.end.column,f=u.start.column>=this.pos.column&&u.start.column<=this.pos.column+this.length+1,p=u.start.column-this.pos.column;if(this.updateAnchors(l),f&&(this.length+=h),f&&!this.session.$fromUndo){if(l.action==="insert")for(var g=this.others.length-1;g>=0;g--){var b=this.others[g],x={row:b.row,column:b.column+p};this.doc.insertMergedLines(x,l.lines)}else if(l.action==="remove")for(var g=this.others.length-1;g>=0;g--){var b=this.others[g],x={row:b.row,column:b.column+p};this.doc.remove(new o(x.row,x.column,x.row,x.column-h))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(l){this.pos.onChange(l);for(var u=this.others.length;u--;)this.others[u].onChange(l);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var l=this,u=this.session,h=function(p,g){u.removeMarker(p.markerId),p.markerId=u.addMarker(new o(p.row,p.column,p.row,p.column+l.length),g,null,!1)};h(this.pos,this.mainClass);for(var f=this.others.length;f--;)h(this.others[f],this.othersClass)}},c.prototype.onCursorChange=function(l){if(!(this.$updating||!this.session)){var u=this.session.selection.getCursor();u.row===this.pos.row&&u.column>=this.pos.column&&u.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",l)):(this.hideOtherMarkers(),this._emit("cursorLeave",l))}},c.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var l=this.session.getUndoManager(),u=(l.$undoStack||l.$undostack).length-this.$undoStackDepth,h=0;h<u;h++)l.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},c}();d.implement(a.prototype,s),r.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,i){var o=n("../lib/event"),s=n("../lib/useragent");function d(c,l){return c.row==l.row&&c.column==l.column}function a(c){var l=c.domEvent,u=l.altKey,h=l.shiftKey,f=l.ctrlKey,p=c.getAccelKey(),g=c.getButton();if(f&&s.isMac&&(g=l.button),c.editor.inMultiSelectMode&&g==2){c.editor.textInput.onContextMenu(c.domEvent);return}if(!f&&!u&&!p){g===0&&c.editor.inMultiSelectMode&&c.editor.exitMultiSelectMode();return}if(g===0){var b=c.editor,x=b.selection,S=b.inMultiSelectMode,T=c.getDocumentPosition(),v=x.getCursor(),w=c.inSelection()||x.isEmpty()&&d(T,v),y=c.x,m=c.y,E=function(q){y=q.clientX,m=q.clientY},A=b.session,C=b.renderer.pixelToScreenCoordinates(y,m),k=C,I;if(b.$mouseHandler.$enableJumpToDef)f&&u||p&&u?I=h?"block":"add":u&&b.$blockSelectEnabled&&(I="block");else if(p&&!u){if(I="add",!S&&h)return}else u&&b.$blockSelectEnabled&&(I="block");if(I&&s.isMac&&l.ctrlKey&&b.$mouseHandler.cancelContextMenu(),I=="add"){if(!S&&w)return;if(!S){var R=x.toOrientedRange();b.addSelectionMarker(R)}var M=x.rangeList.rangeAtPoint(T);b.inVirtualSelectionMode=!0,h&&(M=null,R=x.ranges[0]||R,b.removeSelectionMarker(R)),b.once("mouseup",function(){var q=x.toOrientedRange();M&&q.isEmpty()&&d(M.cursor,q.cursor)?x.substractPoint(q.cursor):(h?x.substractPoint(R.cursor):R&&(b.removeSelectionMarker(R),x.addRange(R)),x.addRange(q)),b.inVirtualSelectionMode=!1})}else if(I=="block"){c.stop(),b.inVirtualSelectionMode=!0;var O,P=[],N=function(){var q=b.renderer.pixelToScreenCoordinates(y,m),re=A.screenToDocumentPosition(q.row,q.column,q.offsetX);d(k,q)&&d(re,x.lead)||(k=q,b.selection.moveToPosition(re),b.renderer.scrollCursorIntoView(),b.removeSelectionMarkers(P),P=x.rectangularRangeBlock(k,C),b.$mouseHandler.$clickSelection&&P.length==1&&P[0].isEmpty()&&(P[0]=b.$mouseHandler.$clickSelection.clone()),P.forEach(b.addSelectionMarker,b),b.updateSelectionMarkers())};S&&!p?x.toSingleRange():!S&&p&&(O=x.toOrientedRange(),b.addSelectionMarker(O)),h?C=A.documentToScreenPosition(x.lead):x.moveToPosition(T),k={row:-1,column:-1};var B=function(q){N(),clearInterval(K),b.removeSelectionMarkers(P),P.length||(P=[x.toOrientedRange()]),O&&(b.removeSelectionMarker(O),x.toSingleRange(O));for(var re=0;re<P.length;re++)x.addRange(P[re]);b.inVirtualSelectionMode=!1,b.$mouseHandler.$clickSelection=null},W=N;o.capture(b.container,E,B);var K=setInterval(function(){W()},20);return c.preventDefault()}}}r.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,r,i){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(s){s.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(s){s.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(s){s.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(s){s.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(s){s.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(s){s.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(s){s.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(s){s.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(s){s.multiSelect.rangeCount>1?s.multiSelect.joinSelections():s.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(s){s.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(s){s.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(s){s.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(s){s.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(s){return s&&s.inMultiSelectMode}}];var o=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new o(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,i){var o=n("./range_list").RangeList,s=n("./range").Range,d=n("./selection").Selection,a=n("./mouse/multi_select_handler").onMouseDown,c=n("./lib/event"),l=n("./lib/lang"),u=n("./commands/multi_select_commands");r.commands=u.defaultCommands.concat(u.multiSelectCommands);var h=n("./search").Search,f=new h;function p(v,w,y){return f.$options.wrap=!0,f.$options.needle=w,f.$options.backwards=y==-1,f.find(v)}var g=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(v,w){if(v){if(!this.inMultiSelectMode&&this.rangeCount===0){var y=this.toOrientedRange();if(this.rangeList.add(y),this.rangeList.add(v),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),w||this.fromOrientedRange(v);this.rangeList.removeAll(),this.rangeList.add(y),this.$onAddRange(y)}v.cursor||(v.cursor=v.end);var m=this.rangeList.add(v);return this.$onAddRange(v),m.length&&this.$onRemoveRange(m),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),w||this.fromOrientedRange(v)}},this.toSingleRange=function(v){v=v||this.ranges[0];var w=this.rangeList.removeAll();w.length&&this.$onRemoveRange(w),v&&this.fromOrientedRange(v)},this.substractPoint=function(v){var w=this.rangeList.substractPoint(v);if(w)return this.$onRemoveRange(w),w[0]},this.mergeOverlappingRanges=function(){var v=this.rangeList.merge();v.length&&this.$onRemoveRange(v)},this.$onAddRange=function(v){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(v),this._signal("addRange",{range:v})},this.$onRemoveRange=function(v){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var w=this.rangeList.ranges.pop();v.push(w),this.rangeCount=0}for(var y=v.length;y--;){var m=this.ranges.indexOf(v[y]);this.ranges.splice(m,1)}this._signal("removeRange",{ranges:v}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),w=w||this.ranges[0],w&&!w.isEqual(this.getRange())&&this.fromOrientedRange(w)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new o,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var v=this.ranges.length?this.ranges:[this.getRange()],w=[],y=0;y<v.length;y++){var m=v[y],E=m.start.row,A=m.end.row;if(E===A)w.push(m.clone());else{for(w.push(new s(E,m.start.column,E,this.session.getLine(E).length));++E<A;)w.push(this.getLineRange(E,!0));w.push(new s(A,0,A,m.end.column))}y==0&&!this.isBackwards()&&(w=w.reverse())}this.toSingleRange();for(var y=w.length;y--;)this.addRange(w[y])},this.joinSelections=function(){var v=this.rangeList.ranges,w=v[v.length-1],y=s.fromPoints(v[0].start,w.end);this.toSingleRange(),this.setSelectionRange(y,w.cursor==w.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var v=this.rangeList.ranges,w=v[v.length-1],y=s.fromPoints(v[0].start,w.end);this.toSingleRange(),this.setSelectionRange(y,w.cursor==w.start)}else{var m=this.session.documentToScreenPosition(this.cursor),E=this.session.documentToScreenPosition(this.anchor),A=this.rectangularRangeBlock(m,E);A.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(v,w,y){var m=[],E=v.column<w.column;if(E)var A=v.column,C=w.column,k=v.offsetX,I=w.offsetX;else var A=w.column,C=v.column,k=w.offsetX,I=v.offsetX;var R=v.row<w.row;if(R)var M=v.row,O=w.row;else var M=w.row,O=v.row;A<0&&(A=0),M<0&&(M=0),M==O&&(y=!0);for(var P,N=M;N<=O;N++){var B=s.fromPoints(this.session.screenToDocumentPosition(N,A,k),this.session.screenToDocumentPosition(N,C,I));if(B.isEmpty()){if(P&&x(B.end,P))break;P=B.end}B.cursor=E?B.start:B.end,m.push(B)}if(R&&m.reverse(),!y){for(var W=m.length-1;m[W].isEmpty()&&W>0;)W--;if(W>0)for(var K=0;m[K].isEmpty();)K++;for(var q=W;q>=K;q--)m[q].isEmpty()&&m.splice(q,1)}return m}}.call(d.prototype);var b=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(v){v.cursor||(v.cursor=v.end);var w=this.getSelectionStyle();return v.marker=this.session.addMarker(v,"ace_selection",w),this.session.$selectionMarkers.push(v),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,v},this.removeSelectionMarker=function(v){if(v.marker){this.session.removeMarker(v.marker);var w=this.session.$selectionMarkers.indexOf(v);w!=-1&&this.session.$selectionMarkers.splice(w,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(v){for(var w=this.session.$selectionMarkers,y=v.length;y--;){var m=v[y];if(m.marker){this.session.removeMarker(m.marker);var E=w.indexOf(m);E!=-1&&w.splice(E,1)}}this.session.selectionMarkerCount=w.length},this.$onAddRange=function(v){this.addSelectionMarker(v.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(v){this.removeSelectionMarkers(v.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(v){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(u.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(v){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(u.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(v){var w=v.command,y=v.editor;if(y.multiSelect){if(w.multiSelectAction)w.multiSelectAction=="forEach"?m=y.forEachSelection(w,v.args):w.multiSelectAction=="forEachLine"?m=y.forEachSelection(w,v.args,!0):w.multiSelectAction=="single"?(y.exitMultiSelectMode(),m=w.exec(y,v.args||{})):m=w.multiSelectAction(y,v.args||{});else{var m=w.exec(y,v.args||{});y.multiSelect.addRange(y.multiSelect.toOrientedRange()),y.multiSelect.mergeOverlappingRanges()}return m}},this.forEachSelection=function(v,w,y){if(!this.inVirtualSelectionMode){var m=y&&y.keepOrder,E=y==!0||y&&y.$byLines,A=this.session,C=this.selection,k=C.rangeList,I=(m?C:k).ranges,R;if(!I.length)return v.exec?v.exec(this,w||{}):v(this,w||{});var M=C._eventRegistry;C._eventRegistry={};var O=new d(A);this.inVirtualSelectionMode=!0;for(var P=I.length;P--;){if(E)for(;P>0&&I[P].start.row==I[P-1].end.row;)P--;O.fromOrientedRange(I[P]),O.index=P,this.selection=A.selection=O;var N=v.exec?v.exec(this,w||{}):v(this,w||{});!R&&N!==void 0&&(R=N),O.toOrientedRange(I[P])}O.detach(),this.selection=A.selection=C,this.inVirtualSelectionMode=!1,C._eventRegistry=M,C.mergeOverlappingRanges(),C.ranges[0]&&C.fromOrientedRange(C.ranges[0]);var B=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),B&&B.from==B.to&&this.renderer.animateScrolling(B.from),R}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var v="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var w=this.multiSelect.rangeList.ranges,y=[],m=0;m<w.length;m++)y.push(this.session.getTextRange(w[m]));var E=this.session.getDocument().getNewLineCharacter();v=y.join(E),v.length==(y.length-1)*E.length&&(v="")}else this.selection.isEmpty()||(v=this.session.getTextRange(this.getSelectionRange()));return v},this.$checkMultiselectChange=function(v,w){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var y=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&w==this.multiSelect.anchor)return;var m=w==this.multiSelect.anchor?y.cursor==y.start?y.end:y.start:y.cursor;m.row!=w.row||this.session.$clipPositionToDocument(m.row,m.column).column!=w.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(v,w,y){if(w=w||{},w.needle=v||w.needle,w.needle==null){var m=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();w.needle=this.session.getTextRange(m)}this.$search.set(w);var E=this.$search.findAll(this.session);if(!E.length)return 0;var A=this.multiSelect;y||A.toSingleRange(E[0]);for(var C=E.length;C--;)A.addRange(E[C],!0);return m&&A.rangeList.rangeAtPoint(m.start)&&A.addRange(m,!0),E.length},this.selectMoreLines=function(v,w){var y=this.selection.toOrientedRange(),m=y.cursor==y.end,E=this.session.documentToScreenPosition(y.cursor);this.selection.$desiredColumn&&(E.column=this.selection.$desiredColumn);var A=this.session.screenToDocumentPosition(E.row+v,E.column);if(y.isEmpty())var k=A;else var C=this.session.documentToScreenPosition(m?y.end:y.start),k=this.session.screenToDocumentPosition(C.row+v,C.column);if(m){var I=s.fromPoints(A,k);I.cursor=I.start}else{var I=s.fromPoints(k,A);I.cursor=I.end}if(I.desiredColumn=E.column,!this.selection.inMultiSelectMode)this.selection.addRange(y);else if(w)var R=y.cursor;this.selection.addRange(I),R&&this.selection.substractPoint(R)},this.transposeSelections=function(v){for(var w=this.session,y=w.multiSelect,m=y.ranges,E=m.length;E--;){var A=m[E];if(A.isEmpty()){var C=w.getWordRange(A.start.row,A.start.column);A.start.row=C.start.row,A.start.column=C.start.column,A.end.row=C.end.row,A.end.column=C.end.column}}y.mergeOverlappingRanges();for(var k=[],E=m.length;E--;){var A=m[E];k.unshift(w.getTextRange(A))}v<0?k.unshift(k.pop()):k.push(k.shift());for(var E=m.length;E--;){var A=m[E],C=A.clone();w.replace(A,k[E]),A.start.row=C.start.row,A.start.column=C.start.column}y.fromOrientedRange(y.ranges[0])},this.selectMore=function(v,w,y){var m=this.session,E=m.multiSelect,A=E.toOrientedRange();if(!(A.isEmpty()&&(A=m.getWordRange(A.start.row,A.start.column),A.cursor=v==-1?A.start:A.end,this.multiSelect.addRange(A),y))){var C=m.getTextRange(A),k=p(m,C,v);k&&(k.cursor=v==-1?k.start:k.end,this.session.unfold(k),this.multiSelect.addRange(k),this.renderer.scrollCursorIntoView(null,.5)),w&&this.multiSelect.substractPoint(A.cursor)}},this.alignCursors=function(){var v=this.session,w=v.multiSelect,y=w.ranges,m=-1,E=y.filter(function(W){if(W.cursor.row==m)return!0;m=W.cursor.row});if(!y.length||E.length==y.length-1){var A=this.selection.getRange(),C=A.start.row,k=A.end.row,I=C==k;if(I){var R=this.session.getLength(),M;do M=this.session.getLine(k);while(/[=:]/.test(M)&&++k<R);do M=this.session.getLine(C);while(/[=:]/.test(M)&&--C>0);C<0&&(C=0),k>=R&&(k=R-1)}var O=this.session.removeFullLines(C,k);O=this.$reAlignText(O,I),this.session.insert({row:C,column:0},O.join(`
|
||
`)+`
|
||
`),I||(A.start.column=0,A.end.column=O[O.length-1].length),this.selection.setRange(A)}else{E.forEach(function(W){w.substractPoint(W.cursor)});var P=0,N=1/0,B=y.map(function(W){var K=W.cursor,q=v.getLine(K.row),re=q.substr(K.column).search(/\S/g);return re==-1&&(re=0),K.column>P&&(P=K.column),re<N&&(N=re),re});y.forEach(function(W,K){var q=W.cursor,re=P-q.column,Y=B[K]-N;re>Y?v.insert(q,l.stringRepeat(" ",re-Y)):v.remove(new s(q.row,q.column,q.row,q.column-re+Y)),W.start.column=W.end.column=P,W.start.row=W.end.row=q.row,W.cursor=W.end}),w.fromOrientedRange(y[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(v,w){var y=!0,m=!0,E,A,C;return v.map(function(O){var P=O.match(/(\s*)(.*?)(\s*)([=:].*)/);return P?E==null?(E=P[1].length,A=P[2].length,C=P[3].length,P):(E+A+C!=P[1].length+P[2].length+P[3].length&&(m=!1),E!=P[1].length&&(y=!1),E>P[1].length&&(E=P[1].length),A<P[2].length&&(A=P[2].length),C>P[3].length&&(C=P[3].length),P):[O]}).map(w?I:y?m?R:I:M);function k(O){return l.stringRepeat(" ",O)}function I(O){return O[2]?k(E)+O[2]+k(A-O[2].length+C)+O[4].replace(/^([=:])\s+/,"$1 "):O[0]}function R(O){return O[2]?k(E+A-O[2].length)+O[2]+k(C)+O[4].replace(/^([=:])\s+/,"$1 "):O[0]}function M(O){return O[2]?k(E)+O[2]+k(C)+O[4].replace(/^([=:])\s+/,"$1 "):O[0]}}}).call(b.prototype);function x(v,w){return v.row==w.row&&v.column==w.column}r.onSessionChange=function(v){var w=v.session;w&&!w.multiSelect&&(w.$selectionMarkers=[],w.selection.$initRangeList(),w.multiSelect=w.selection),this.multiSelect=w&&w.multiSelect;var y=v.oldSession;y&&(y.multiSelect.off("addRange",this.$onAddRange),y.multiSelect.off("removeRange",this.$onRemoveRange),y.multiSelect.off("multiSelect",this.$onMultiSelect),y.multiSelect.off("singleSelect",this.$onSingleSelect),y.multiSelect.lead.off("change",this.$checkMultiselectChange),y.multiSelect.anchor.off("change",this.$checkMultiselectChange)),w&&(w.multiSelect.on("addRange",this.$onAddRange),w.multiSelect.on("removeRange",this.$onRemoveRange),w.multiSelect.on("multiSelect",this.$onMultiSelect),w.multiSelect.on("singleSelect",this.$onSingleSelect),w.multiSelect.lead.on("change",this.$checkMultiselectChange),w.multiSelect.anchor.on("change",this.$checkMultiselectChange)),w&&this.inMultiSelectMode!=w.selection.inMultiSelectMode&&(w.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function S(v){v.$multiselectOnSessionChange||(v.$onAddRange=v.$onAddRange.bind(v),v.$onRemoveRange=v.$onRemoveRange.bind(v),v.$onMultiSelect=v.$onMultiSelect.bind(v),v.$onSingleSelect=v.$onSingleSelect.bind(v),v.$multiselectOnSessionChange=r.onSessionChange.bind(v),v.$checkMultiselectChange=v.$checkMultiselectChange.bind(v),v.$multiselectOnSessionChange(v),v.on("changeSession",v.$multiselectOnSessionChange),v.on("mousedown",a),v.commands.addCommands(u.defaultCommands),T(v))}function T(v){if(!v.textInput)return;var w=v.textInput.getElement(),y=!1;c.addListener(w,"keydown",function(E){var A=E.keyCode==18&&!(E.ctrlKey||E.shiftKey||E.metaKey);v.$blockSelectEnabled&&A?y||(v.renderer.setMouseCursor("crosshair"),y=!0):y&&m()},v),c.addListener(w,"keyup",m,v),c.addListener(w,"blur",m,v);function m(E){y&&(v.renderer.setMouseCursor(""),y=!1)}}r.MultiSelect=S,n("./config").defineOptions(b.prototype,"editor",{enableMultiselect:{set:function(v){S(this),v?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(v){this.$blockSelectEnabled=v},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,i){var o=n("../../range").Range,s=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(d,a,c){var l=d.getLine(c);return this.foldingStartMarker.test(l)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(l)?"end":""},this.getFoldWidgetRange=function(d,a,c){return null},this.indentationBlock=function(d,a,c){var l=/\S/,u=d.getLine(a),h=u.search(l);if(h!=-1){for(var f=c||u.length,p=d.getLength(),g=a,b=a;++a<p;){var x=d.getLine(a).search(l);if(x!=-1){if(x<=h){var S=d.getTokenAt(a,0);if(!S||S.type!=="string")break}b=a}}if(b>g){var T=d.getLine(b).length;return new o(g,f,b,T)}}},this.openingBracketBlock=function(d,a,c,l,u){var h={row:c,column:l+1},f=d.$findClosingBracket(a,h,u);if(f){var p=d.foldWidgets[f.row];return p==null&&(p=d.getFoldWidget(f.row)),p=="start"&&f.row>h.row&&(f.row--,f.column=d.getLine(f.row).length),o.fromPoints(h,f)}},this.closingBracketBlock=function(d,a,c,l,u){var h={row:c,column:l},f=d.$findOpeningBracket(a,h);if(f)return f.column++,h.column--,o.fromPoints(f,h)}}).call(s.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,r,i){var o=n("../line_widgets").LineWidgets,s=n("../lib/dom"),d=n("../range").Range,a=n("../config").nls;function c(u,h,f){for(var p=0,g=u.length-1;p<=g;){var b=p+g>>1,x=f(h,u[b]);if(x>0)p=b+1;else if(x<0)g=b-1;else return b}return-(p+1)}function l(u,h,f){var p=u.getAnnotations().sort(d.comparePoints);if(p.length){var g=c(p,{row:h,column:-1},d.comparePoints);g<0&&(g=-g-1),g>=p.length?g=f>0?0:p.length-1:g===0&&f<0&&(g=p.length-1);var b=p[g];if(!(!b||!f)){if(b.row===h){do b=p[g+=f];while(b&&b.row===h);if(!b)return p.slice()}var x=[];h=b.row;do x[f<0?"unshift":"push"](b),b=p[g+=f];while(b&&b.row==h);return x.length&&x}}}r.showErrorMarker=function(u,h){var f=u.session;f.widgetManager||(f.widgetManager=new o(f),f.widgetManager.attach(u));var p=u.getCursorPosition(),g=p.row,b=f.widgetManager.getWidgetsAtRow(g).filter(function(A){return A.type=="errorMarker"})[0];b?b.destroy():g-=h;var x=l(f,g,h),S;if(x){var T=x[0];p.column=(T.pos&&typeof T.column!="number"?T.pos.sc:T.column)||0,p.row=T.row,S=u.renderer.$gutterLayer.$annotations[p.row]}else{if(b)return;S={text:[a("Looks good!")],className:"ace_ok"}}u.session.unfold(p.row),u.selection.moveToPosition(p);var v={row:p.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},w=v.el.appendChild(s.createElement("div")),y=v.el.appendChild(s.createElement("div"));y.className="error_widget_arrow "+S.className;var m=u.renderer.$cursorLayer.getPixelPosition(p).left;y.style.left=m+u.renderer.gutterWidth-5+"px",v.el.className="error_widget_wrapper",w.className="error_widget "+S.className,w.innerHTML=S.text.join("<br>"),w.appendChild(s.createElement("div"));var E=function(A,C,k){if(C===0&&(k==="esc"||k==="return"))return v.destroy(),{command:"null"}};v.destroy=function(){u.$mouseHandler.isMousePressed||(u.keyBinding.removeKeyboardHandler(E),f.widgetManager.removeLineWidget(v),u.off("changeSelection",v.destroy),u.off("changeSession",v.destroy),u.off("mouseup",v.destroy),u.off("change",v.destroy))},u.keyBinding.addKeyboardHandler(E),u.on("changeSelection",v.destroy),u.on("changeSession",v.destroy),u.on("mouseup",v.destroy),u.on("change",v.destroy),u.session.widgetManager.addLineWidget(v),v.el.onmousedown=u.focus.bind(u),u.renderer.scrollCursorIntoView(null,.5,{bottom:v.el.offsetHeight})},s.importCssString(`
|
||
.error_widget_wrapper {
|
||
background: inherit;
|
||
color: inherit;
|
||
border:none
|
||
}
|
||
.error_widget {
|
||
border-top: solid 2px;
|
||
border-bottom: solid 2px;
|
||
margin: 5px 0;
|
||
padding: 10px 40px;
|
||
white-space: pre-wrap;
|
||
}
|
||
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
||
border-color: #ff5a5a
|
||
}
|
||
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
||
border-color: #F1D817
|
||
}
|
||
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
||
border-color: #5a5a5a
|
||
}
|
||
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
||
border-color: #5aaa5a
|
||
}
|
||
.error_widget_arrow {
|
||
position: absolute;
|
||
border: solid 5px;
|
||
border-top-color: transparent!important;
|
||
border-right-color: transparent!important;
|
||
border-left-color: transparent!important;
|
||
top: -5px;
|
||
}
|
||
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(n,r,i){n("./loader_build")(r);var o=n("./lib/dom"),s=n("./range").Range,d=n("./editor").Editor,a=n("./edit_session").EditSession,c=n("./undomanager").UndoManager,l=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),r.config=n("./config"),r.edit=function(u,h){if(typeof u=="string"){var f=u;if(u=document.getElementById(f),!u)throw new Error("ace.edit can't find div #"+f)}if(u&&u.env&&u.env.editor instanceof d)return u.env.editor;var p="";if(u&&/input|textarea/i.test(u.tagName)){var g=u;p=g.value,u=o.createElement("pre"),g.parentNode.replaceChild(u,g)}else u&&(p=u.textContent,u.innerHTML="");var b=r.createEditSession(p),x=new d(new l(u),b,h),S={document:b,editor:x,onResize:x.resize.bind(x,null)};return g&&(S.textarea=g),x.on("destroy",function(){S.editor.container.env=null}),x.container.env=x.env=S,x},r.createEditSession=function(u,h){var f=new a(u,h);return f.setUndoManager(new c),f},r.Range=s,r.Editor=d,r.EditSession=a,r.UndoManager=c,r.VirtualRenderer=l,r.version=r.config.version}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define),window.ace||(window.ace=n);for(var r in n)n.hasOwnProperty(r)&&(window.ace[r]=n[r]);window.ace.default=window.ace,e&&(e.exports=window.ace)})}()})(UE);var Wh=UE.exports,su={},sb={},GE={exports:{}},pI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",gI=pI,mI=gI;function KE(){}function qE(){}qE.resetWarningCache=KE;var vI=function(){function e(r,i,o,s,d,a){if(a!==mI){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:qE,resetWarningCache:KE};return n.PropTypes=n,n};GE.exports=vI();var lb=GE.exports,Uh={exports:{}};Uh.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,d="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",l="[object Boolean]",u="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",g="[object Map]",b="[object Number]",x="[object Null]",S="[object Object]",T="[object Promise]",v="[object Proxy]",w="[object RegExp]",y="[object Set]",m="[object String]",E="[object Symbol]",A="[object Undefined]",C="[object WeakMap]",k="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",M="[object Float64Array]",O="[object Int8Array]",P="[object Int16Array]",N="[object Int32Array]",B="[object Uint8Array]",W="[object Uint8ClampedArray]",K="[object Uint16Array]",q="[object Uint32Array]",re=/[\\^$.*+?()[\]{}|]/g,Y=/^\[object .+?Constructor\]$/,Z=/^(?:0|[1-9]\d*)$/,te={};te[R]=te[M]=te[O]=te[P]=te[N]=te[B]=te[W]=te[K]=te[q]=!0,te[d]=te[a]=te[k]=te[l]=te[I]=te[u]=te[h]=te[f]=te[g]=te[b]=te[S]=te[w]=te[y]=te[m]=te[C]=!1;var ie=typeof Be=="object"&&Be&&Be.Object===Object&&Be,ce=typeof self=="object"&&self&&self.Object===Object&&self,he=ie||ce||Function("return this")(),ve=t&&!t.nodeType&&t,Ce=ve&&!0&&e&&!e.nodeType&&e,_e=Ce&&Ce.exports===ve,Re=_e&&ie.process,ot=function(){try{return Re&&Re.binding&&Re.binding("util")}catch{}}(),Te=ot&&ot.isTypedArray;function it(Q,se){for(var U=-1,J=Q==null?0:Q.length,ue=0,Se=[];++U<J;){var ze=Q[U];se(ze,U,Q)&&(Se[ue++]=ze)}return Se}function vt(Q,se){for(var U=-1,J=se.length,ue=Q.length;++U<J;)Q[ue+U]=se[U];return Q}function Qt(Q,se){for(var U=-1,J=Q==null?0:Q.length;++U<J;)if(se(Q[U],U,Q))return!0;return!1}function Ut(Q,se){for(var U=-1,J=Array(Q);++U<Q;)J[U]=se(U);return J}function Lr(Q){return function(se){return Q(se)}}function Ln(Q,se){return Q.has(se)}function Zn(Q,se){return Q==null?void 0:Q[se]}function Ht(Q){var se=-1,U=Array(Q.size);return Q.forEach(function(J,ue){U[++se]=[ue,J]}),U}function me(Q,se){return function(U){return Q(se(U))}}function Ae(Q){var se=-1,U=Array(Q.size);return Q.forEach(function(J){U[++se]=J}),U}var we=Array.prototype,He=Function.prototype,ct=Object.prototype,xe=he["__core-js_shared__"],Fe=He.toString,Ne=ct.hasOwnProperty,Xe=function(){var Q=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return Q?"Symbol(src)_1."+Q:""}(),tt=ct.toString,kt=RegExp("^"+Fe.call(Ne).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),on=_e?he.Buffer:void 0,Rn=he.Symbol,Rr=he.Uint8Array,Pr=ct.propertyIsEnumerable,Ps=we.splice,pr=Rn?Rn.toStringTag:void 0,Is=Object.getOwnPropertySymbols,ti=on?on.isBuffer:void 0,gr=me(Object.keys,Object),Io=ri(he,"DataView"),Pn=ri(he,"Map"),mn=ri(he,"Promise"),an=ri(he,"Set"),Qi=ri(he,"WeakMap"),Zi=ri(Object,"create"),Os=tr(Io),Jn=tr(Pn),wi=tr(mn),Si=tr(an),Ra=tr(Qi),Ji=Rn?Rn.prototype:void 0,Pa=Ji?Ji.valueOf:void 0;function In(Q){var se=-1,U=Q==null?0:Q.length;for(this.clear();++se<U;){var J=Q[se];this.set(J[0],J[1])}}function _u(){this.__data__=Zi?Zi(null):{},this.size=0}function Fs(Q){var se=this.has(Q)&&delete this.__data__[Q];return this.size-=se?1:0,se}function Cu(Q){var se=this.__data__;if(Zi){var U=se[Q];return U===r?void 0:U}return Ne.call(se,Q)?se[Q]:void 0}function ku(Q){var se=this.__data__;return Zi?se[Q]!==void 0:Ne.call(se,Q)}function Ds(Q,se){var U=this.__data__;return this.size+=this.has(Q)?0:1,U[Q]=Zi&&se===void 0?r:se,this}In.prototype.clear=_u,In.prototype.delete=Fs,In.prototype.get=Cu,In.prototype.has=ku,In.prototype.set=Ds;function vn(Q){var se=-1,U=Q==null?0:Q.length;for(this.clear();++se<U;){var J=Q[se];this.set(J[0],J[1])}}function xi(){this.__data__=[],this.size=0}function Ns(Q){var se=this.__data__,U=mr(se,Q);if(U<0)return!1;var J=se.length-1;return U==J?se.pop():Ps.call(se,U,1),--this.size,!0}function Ia(Q){var se=this.__data__,U=mr(se,Q);return U<0?void 0:se[U][1]}function Oa(Q){return mr(this.__data__,Q)>-1}function Oo(Q,se){var U=this.__data__,J=mr(U,Q);return J<0?(++this.size,U.push([Q,se])):U[J][1]=se,this}vn.prototype.clear=xi,vn.prototype.delete=Ns,vn.prototype.get=Ia,vn.prototype.has=Oa,vn.prototype.set=Oo;function Ir(Q){var se=-1,U=Q==null?0:Q.length;for(this.clear();++se<U;){var J=Q[se];this.set(J[0],J[1])}}function Fa(){this.size=0,this.__data__={hash:new In,map:new(Pn||vn),string:new In}}function eo(Q){var se=Bo(this,Q).delete(Q);return this.size-=se?1:0,se}function to(Q){return Bo(this,Q).get(Q)}function Fo(Q){return Bo(this,Q).has(Q)}function zs(Q,se){var U=Bo(this,Q),J=U.size;return U.set(Q,se),this.size+=U.size==J?0:1,this}Ir.prototype.clear=Fa,Ir.prototype.delete=eo,Ir.prototype.get=to,Ir.prototype.has=Fo,Ir.prototype.set=zs;function Or(Q){var se=-1,U=Q==null?0:Q.length;for(this.__data__=new Ir;++se<U;)this.add(Q[se])}function Bs(Q){return this.__data__.set(Q,r),this}function Da(Q){return this.__data__.has(Q)}Or.prototype.add=Or.prototype.push=Bs,Or.prototype.has=Da;function Fr(Q){var se=this.__data__=new vn(Q);this.size=se.size}function Eu(){this.__data__=new vn,this.size=0}function Na(Q){var se=this.__data__,U=se.delete(Q);return this.size=se.size,U}function js(Q){return this.__data__.get(Q)}function za(Q){return this.__data__.has(Q)}function Hs(Q,se){var U=this.__data__;if(U instanceof vn){var J=U.__data__;if(!Pn||J.length<n-1)return J.push([Q,se]),this.size=++U.size,this;U=this.__data__=new Ir(J)}return U.set(Q,se),this.size=U.size,this}Fr.prototype.clear=Eu,Fr.prototype.delete=Na,Fr.prototype.get=js,Fr.prototype.has=za,Fr.prototype.set=Hs;function yn(Q,se){var U=Vo(Q),J=!U&&Ho(Q),ue=!U&&!J&&ai(Q),Se=!U&&!J&&!ue&&Qs(Q),ze=U||J||ue||Se,Qe=ze?Ut(Q.length,String):[],Ze=Qe.length;for(var Oe in Q)(se||Ne.call(Q,Oe))&&!(ze&&(Oe=="length"||ue&&(Oe=="offset"||Oe=="parent")||Se&&(Oe=="buffer"||Oe=="byteLength"||Oe=="byteOffset")||Ba(Oe,Ze)))&&Qe.push(Oe);return Qe}function mr(Q,se){for(var U=Q.length;U--;)if(jo(Q[U][0],se))return U;return-1}function Do(Q,se,U){var J=se(Q);return Vo(Q)?J:vt(J,U(Q))}function no(Q){return Q==null?Q===void 0?A:x:pr&&pr in Object(Q)?ii(Q):io(Q)}function Vs(Q){return ki(Q)&&no(Q)==d}function No(Q,se,U,J,ue){return Q===se?!0:Q==null||se==null||!ki(Q)&&!ki(se)?Q!==Q&&se!==se:Ws(Q,se,U,J,No,ue)}function Ws(Q,se,U,J,ue,Se){var ze=Vo(Q),Qe=Vo(se),Ze=ze?a:er(Q),Oe=Qe?a:er(se);Ze=Ze==d?S:Ze,Oe=Oe==d?S:Oe;var at=Ze==S,Ft=Oe==S,xt=Ze==Oe;if(xt&&ai(Q)){if(!ai(se))return!1;ze=!0,at=!1}if(xt&&!at)return Se||(Se=new Fr),ze||Qs(Q)?Us(Q,se,U,J,ue,Se):On(Q,se,Ze,U,J,ue,Se);if(!(U&i)){var sn=at&&Ne.call(Q,"__wrapped__"),_=Ft&&Ne.call(se,"__wrapped__");if(sn||_){var L=sn?Q.value():Q,F=_?se.value():se;return Se||(Se=new Fr),ue(L,F,U,J,Se)}}return xt?(Se||(Se=new Fr),Gs(Q,se,U,J,ue,Se)):!1}function ni(Q){if(!Xs(Q)||Ks(Q))return!1;var se=Dr(Q)?kt:Y;return se.test(tr(Q))}function zo(Q){return ki(Q)&&Ci(Q.length)&&!!te[no(Q)]}function $u(Q){if(!ja(Q))return gr(Q);var se=[];for(var U in Object(Q))Ne.call(Q,U)&&U!="constructor"&&se.push(U);return se}function Us(Q,se,U,J,ue,Se){var ze=U&i,Qe=Q.length,Ze=se.length;if(Qe!=Ze&&!(ze&&Ze>Qe))return!1;var Oe=Se.get(Q);if(Oe&&Se.get(se))return Oe==se;var at=-1,Ft=!0,xt=U&o?new Or:void 0;for(Se.set(Q,se),Se.set(se,Q);++at<Qe;){var sn=Q[at],_=se[at];if(J)var L=ze?J(_,sn,at,se,Q,Se):J(sn,_,at,Q,se,Se);if(L!==void 0){if(L)continue;Ft=!1;break}if(xt){if(!Qt(se,function(F,D){if(!Ln(xt,D)&&(sn===F||ue(sn,F,U,J,Se)))return xt.push(D)})){Ft=!1;break}}else if(!(sn===_||ue(sn,_,U,J,Se))){Ft=!1;break}}return Se.delete(Q),Se.delete(se),Ft}function On(Q,se,U,J,ue,Se,ze){switch(U){case I:if(Q.byteLength!=se.byteLength||Q.byteOffset!=se.byteOffset)return!1;Q=Q.buffer,se=se.buffer;case k:return!(Q.byteLength!=se.byteLength||!Se(new Rr(Q),new Rr(se)));case l:case u:case b:return jo(+Q,+se);case h:return Q.name==se.name&&Q.message==se.message;case w:case m:return Q==se+"";case g:var Qe=Ht;case y:var Ze=J&i;if(Qe||(Qe=Ae),Q.size!=se.size&&!Ze)return!1;var Oe=ze.get(Q);if(Oe)return Oe==se;J|=o,ze.set(Q,se);var at=Us(Qe(Q),Qe(se),J,ue,Se,ze);return ze.delete(Q),at;case E:if(Pa)return Pa.call(Q)==Pa.call(se)}return!1}function Gs(Q,se,U,J,ue,Se){var ze=U&i,Qe=_i(Q),Ze=Qe.length,Oe=_i(se),at=Oe.length;if(Ze!=at&&!ze)return!1;for(var Ft=Ze;Ft--;){var xt=Qe[Ft];if(!(ze?xt in se:Ne.call(se,xt)))return!1}var sn=Se.get(Q);if(sn&&Se.get(se))return sn==se;var _=!0;Se.set(Q,se),Se.set(se,Q);for(var L=ze;++Ft<Ze;){xt=Qe[Ft];var F=Q[xt],D=se[xt];if(J)var H=ze?J(D,F,xt,se,Q,Se):J(F,D,xt,Q,se,Se);if(!(H===void 0?F===D||ue(F,D,U,J,Se):H)){_=!1;break}L||(L=xt=="constructor")}if(_&&!L){var V=Q.constructor,G=se.constructor;V!=G&&"constructor"in Q&&"constructor"in se&&!(typeof V=="function"&&V instanceof V&&typeof G=="function"&&G instanceof G)&&(_=!1)}return Se.delete(Q),Se.delete(se),_}function _i(Q){return Do(Q,Zs,oi)}function Bo(Q,se){var U=Q.__data__;return ro(se)?U[typeof se=="string"?"string":"hash"]:U.map}function ri(Q,se){var U=Zn(Q,se);return ni(U)?U:void 0}function ii(Q){var se=Ne.call(Q,pr),U=Q[pr];try{Q[pr]=void 0;var J=!0}catch{}var ue=tt.call(Q);return J&&(se?Q[pr]=U:delete Q[pr]),ue}var oi=Is?function(Q){return Q==null?[]:(Q=Object(Q),it(Is(Q),function(se){return Pr.call(Q,se)}))}:Js,er=no;(Io&&er(new Io(new ArrayBuffer(1)))!=I||Pn&&er(new Pn)!=g||mn&&er(mn.resolve())!=T||an&&er(new an)!=y||Qi&&er(new Qi)!=C)&&(er=function(Q){var se=no(Q),U=se==S?Q.constructor:void 0,J=U?tr(U):"";if(J)switch(J){case Os:return I;case Jn:return g;case wi:return T;case Si:return y;case Ra:return C}return se});function Ba(Q,se){return se=se??s,!!se&&(typeof Q=="number"||Z.test(Q))&&Q>-1&&Q%1==0&&Q<se}function ro(Q){var se=typeof Q;return se=="string"||se=="number"||se=="symbol"||se=="boolean"?Q!=="__proto__":Q===null}function Ks(Q){return!!Xe&&Xe in Q}function ja(Q){var se=Q&&Q.constructor,U=typeof se=="function"&&se.prototype||ct;return Q===U}function io(Q){return tt.call(Q)}function tr(Q){if(Q!=null){try{return Fe.call(Q)}catch{}try{return Q+""}catch{}}return""}function jo(Q,se){return Q===se||Q!==Q&&se!==se}var Ho=Vs(function(){return arguments}())?Vs:function(Q){return ki(Q)&&Ne.call(Q,"callee")&&!Pr.call(Q,"callee")},Vo=Array.isArray;function qs(Q){return Q!=null&&Ci(Q.length)&&!Dr(Q)}var ai=ti||Ha;function Ys(Q,se){return No(Q,se)}function Dr(Q){if(!Xs(Q))return!1;var se=no(Q);return se==f||se==p||se==c||se==v}function Ci(Q){return typeof Q=="number"&&Q>-1&&Q%1==0&&Q<=s}function Xs(Q){var se=typeof Q;return Q!=null&&(se=="object"||se=="function")}function ki(Q){return Q!=null&&typeof Q=="object"}var Qs=Te?Lr(Te):zo;function Zs(Q){return qs(Q)?yn(Q):$u(Q)}function Js(){return[]}function Ha(){return!1}e.exports=Ys})(Uh,Uh.exports);var YE=Uh.exports,gi={};Object.defineProperty(gi,"__esModule",{value:!0});gi.getAceInstance=gi.debounce=gi.editorEvents=gi.editorOptions=void 0;var yI=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];gi.editorOptions=yI;var bI=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];gi.editorEvents=bI;var wI=function(){var e;return typeof window>"u"?(Be.window={},e=Wh,delete Be.window):window.ace?(e=window.ace,e.acequire=window.ace.require||window.ace.acequire):e=Wh,e};gi.getAceInstance=wI;var SI=function(e,t){var n=null;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(r,i)},t)}};gi.debounce=SI;var xI=Be&&Be.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),my=Be&&Be.__assign||function(){return my=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},my.apply(this,arguments)};Object.defineProperty(sb,"__esModule",{value:!0});var _I=Wh,Ve=lb,Q1=z,rf=YE,dl=gi,Z1=(0,dl.getAceInstance)(),CI=function(e){xI(t,e);function t(n){var r=e.call(this,n)||this;return dl.editorEvents.forEach(function(i){r[i]=r[i].bind(r)}),r.debounce=dl.debounce,r}return t.prototype.isInShadow=function(n){for(var r=n&&n.parentNode;r;){if(r.toString()==="[object ShadowRoot]")return!0;r=r.parentNode}return!1},t.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.className,o=r.onBeforeLoad,s=r.onValidate,d=r.mode,a=r.focus,c=r.theme,l=r.fontSize,u=r.value,h=r.defaultValue,f=r.showGutter,p=r.wrapEnabled,g=r.showPrintMargin,b=r.scrollMargin,x=b===void 0?[0,0,0,0]:b,S=r.keyboardHandler,T=r.onLoad,v=r.commands,w=r.annotations,y=r.markers,m=r.placeholder;this.editor=Z1.edit(this.refEditor),o&&o(Z1);for(var E=Object.keys(this.props.editorProps),A=0;A<E.length;A++)this.editor[E[A]]=this.props.editorProps[E[A]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(x[0],x[1],x[2],x[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof d=="string"?"ace/mode/".concat(d):d),c&&c!==""&&this.editor.setTheme("ace/theme/".concat(c)),this.editor.setFontSize(typeof l=="number"?"".concat(l,"px"):l),this.editor.getSession().setValue(h||u||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(f),this.editor.getSession().setUseWrapMode(p),this.editor.setShowPrintMargin(g),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),m&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),s&&this.editor.getSession().on("changeAnnotation",function(){var k=n.editor.getSession().getAnnotations();n.props.onValidate(k)}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(w||[]),y&&y.length>0&&this.handleMarkers(y);var C=this.editor.$options;dl.editorOptions.forEach(function(k){C.hasOwnProperty(k)?n.editor.setOption(k,n.props[k]):n.props[k]&&console.warn("ReactAce: editor option ".concat(k," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(v)&&v.forEach(function(k){typeof k.exec=="string"?n.editor.commands.bindKey(k.bindKey,k.exec):n.editor.commands.addCommand(k)}),S&&this.editor.setKeyboardHandler("ace/keyboard/"+S),i&&(this.refEditor.className+=" "+i),T&&T(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(n){for(var r=n,i=this.props,o=0;o<dl.editorOptions.length;o++){var s=dl.editorOptions[o];i[s]!==r[s]&&this.editor.setOption(s,i[s])}if(i.className!==r.className){var d=this.refEditor.className,a=d.trim().split(" "),c=r.className.trim().split(" ");c.forEach(function(h){var f=a.indexOf(h);a.splice(f,1)}),this.refEditor.className=" "+i.className+" "+a.join(" ")}var l=this.editor&&i.value!=null&&this.editor.getValue()!==i.value;if(l){this.silent=!0;var u=this.editor.session.selection.toJSON();this.editor.setValue(i.value,i.cursorStart),this.editor.session.selection.fromJSON(u),this.silent=!1}i.placeholder!==r.placeholder&&this.updatePlaceholder(),i.mode!==r.mode&&this.editor.getSession().setMode(typeof i.mode=="string"?"ace/mode/".concat(i.mode):i.mode),i.theme!==r.theme&&this.editor.setTheme("ace/theme/"+i.theme),i.keyboardHandler!==r.keyboardHandler&&(i.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+i.keyboardHandler):this.editor.setKeyboardHandler(null)),i.fontSize!==r.fontSize&&this.editor.setFontSize(typeof i.fontSize=="number"?"".concat(i.fontSize,"px"):i.fontSize),i.wrapEnabled!==r.wrapEnabled&&this.editor.getSession().setUseWrapMode(i.wrapEnabled),i.showPrintMargin!==r.showPrintMargin&&this.editor.setShowPrintMargin(i.showPrintMargin),i.showGutter!==r.showGutter&&this.editor.renderer.setShowGutter(i.showGutter),rf(i.setOptions,r.setOptions)||this.handleOptions(i),(l||!rf(i.annotations,r.annotations))&&this.editor.getSession().setAnnotations(i.annotations||[]),!rf(i.markers,r.markers)&&Array.isArray(i.markers)&&this.handleMarkers(i.markers),rf(i.scrollMargin,r.scrollMargin)||this.handleScrollMargins(i.scrollMargin),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!n.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(n){n===void 0&&(n=[0,0,0,0]),this.editor.renderer.setScrollMargin(n[0],n[1],n[2],n[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(n){if(this.props.onChange&&!this.silent){var r=this.editor.getValue();this.props.onChange(r,n)}},t.prototype.onSelectionChange=function(n){if(this.props.onSelectionChange){var r=this.editor.getSelection();this.props.onSelectionChange(r,n)}},t.prototype.onCursorChange=function(n){if(this.props.onCursorChange){var r=this.editor.getSelection();this.props.onCursorChange(r,n)}},t.prototype.onInput=function(n){this.props.onInput&&this.props.onInput(n),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(n){this.props.onFocus&&this.props.onFocus(n,this.editor)},t.prototype.onBlur=function(n){this.props.onBlur&&this.props.onBlur(n,this.editor)},t.prototype.onCopy=function(n){var r=n.text;this.props.onCopy&&this.props.onCopy(r)},t.prototype.onPaste=function(n){var r=n.text;this.props.onPaste&&this.props.onPaste(r)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(n){for(var r=Object.keys(n.setOptions),i=0;i<r.length;i++)this.editor.setOption(r[i],n.setOptions[r[i]])},t.prototype.handleMarkers=function(n){var r=this,i=this.editor.getSession().getMarkers(!0);for(var o in i)i.hasOwnProperty(o)&&this.editor.getSession().removeMarker(i[o].id);i=this.editor.getSession().getMarkers(!1);for(var o in i)i.hasOwnProperty(o)&&i[o].clazz!=="ace_active-line"&&i[o].clazz!=="ace_selected-word"&&this.editor.getSession().removeMarker(i[o].id);n.forEach(function(s){var d=s.startRow,a=s.startCol,c=s.endRow,l=s.endCol,u=s.className,h=s.type,f=s.inFront,p=f===void 0?!1:f,g=new _I.Range(d,a,c,l);r.editor.getSession().addMarker(g,u,h,p)})},t.prototype.updatePlaceholder=function(){var n=this.editor,r=this.props.placeholder,i=!n.session.getValue().length,o=n.renderer.placeholderNode;!i&&o?(n.renderer.scroller.removeChild(n.renderer.placeholderNode),n.renderer.placeholderNode=null):i&&!o?(o=n.renderer.placeholderNode=document.createElement("div"),o.textContent=r||"",o.className="ace_comment ace_placeholder",o.style.padding="0 9px",o.style.position="absolute",o.style.zIndex="3",n.renderer.scroller.appendChild(o)):i&&o&&(o.textContent=r)},t.prototype.updateRef=function(n){this.refEditor=n},t.prototype.render=function(){var n=this.props,r=n.name,i=n.width,o=n.height,s=n.style,d=my({width:i,height:o},s);return Q1.createElement("div",{ref:this.updateRef,id:r,style:d})},t.propTypes={mode:Ve.oneOfType([Ve.string,Ve.object]),focus:Ve.bool,theme:Ve.string,name:Ve.string,className:Ve.string,height:Ve.string,width:Ve.string,fontSize:Ve.oneOfType([Ve.number,Ve.string]),showGutter:Ve.bool,onChange:Ve.func,onCopy:Ve.func,onPaste:Ve.func,onFocus:Ve.func,onInput:Ve.func,onBlur:Ve.func,onScroll:Ve.func,value:Ve.string,defaultValue:Ve.string,onLoad:Ve.func,onSelectionChange:Ve.func,onCursorChange:Ve.func,onBeforeLoad:Ve.func,onValidate:Ve.func,minLines:Ve.number,maxLines:Ve.number,readOnly:Ve.bool,highlightActiveLine:Ve.bool,tabSize:Ve.number,showPrintMargin:Ve.bool,cursorStart:Ve.number,debounceChangePeriod:Ve.number,editorProps:Ve.object,setOptions:Ve.object,style:Ve.object,scrollMargin:Ve.array,annotations:Ve.array,markers:Ve.array,keyboardHandler:Ve.string,wrapEnabled:Ve.bool,enableSnippets:Ve.bool,enableBasicAutocompletion:Ve.oneOfType([Ve.bool,Ve.array]),enableLiveAutocompletion:Ve.oneOfType([Ve.bool,Ve.array]),navigateToFileEnd:Ve.bool,commands:Ve.array,placeholder:Ve.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(Q1.Component);sb.default=CI;var ub={},Xp={},XE={exports:{}};(function(e,t){ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(n,r,i){var o=n("./lib/oop");n("./lib/lang");var s=n("./lib/event_emitter").EventEmitter,d=n("./editor").Editor,a=n("./virtual_renderer").VirtualRenderer,c=n("./edit_session").EditSession,l=function(u,h,f){this.BELOW=1,this.BESIDE=0,this.$container=u,this.$theme=h,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(f||1),this.$cEditor=this.$editors[0],this.on("focus",function(p){this.$cEditor=p}.bind(this))};(function(){o.implement(this,s),this.$createEditor=function(){var u=document.createElement("div");u.className=this.$editorCSS,u.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(u);var h=new d(new a(u,this.$theme));return h.on("focus",function(){this._emit("focus",h)}.bind(this)),this.$editors.push(h),h.setFontSize(this.$fontSize),h},this.setSplits=function(u){var h;if(u<1)throw"The number of splits have to be > 0!";if(u!=this.$splits){if(u>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<u;)h=this.$editors[this.$splits],this.$container.appendChild(h.container),h.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<u;)this.$createEditor(),this.$splits++}else for(;this.$splits>u;)h=this.$editors[this.$splits-1],this.$container.removeChild(h.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(u){return this.$editors[u]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(u){this.$editors.forEach(function(h){h.setTheme(u)})},this.setKeyboardHandler=function(u){this.$editors.forEach(function(h){h.setKeyboardHandler(u)})},this.forEach=function(u,h){this.$editors.forEach(u,h)},this.$fontSize="",this.setFontSize=function(u){this.$fontSize=u,this.forEach(function(h){h.setFontSize(u)})},this.$cloneSession=function(u){var h=new c(u.getDocument(),u.getMode()),f=u.getUndoManager();return h.setUndoManager(f),h.setTabSize(u.getTabSize()),h.setUseSoftTabs(u.getUseSoftTabs()),h.setOverwrite(u.getOverwrite()),h.setBreakpoints(u.getBreakpoints()),h.setUseWrapMode(u.getUseWrapMode()),h.setUseWorker(u.getUseWorker()),h.setWrapLimitRange(u.$wrapLimitRange.min,u.$wrapLimitRange.max),h.$foldData=u.$cloneFoldData(),h},this.setSession=function(u,h){var f;h==null?f=this.$cEditor:f=this.$editors[h];var p=this.$editors.some(function(g){return g.session===u});return p&&(u=this.$cloneSession(u)),f.setSession(u),u},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(u){this.$orientation!=u&&(this.$orientation=u,this.resize())},this.resize=function(){var u=this.$container.clientWidth,h=this.$container.clientHeight,f;if(this.$orientation==this.BESIDE)for(var p=u/this.$splits,g=0;g<this.$splits;g++)f=this.$editors[g],f.container.style.width=p+"px",f.container.style.top="0px",f.container.style.left=g*p+"px",f.container.style.height=h+"px",f.resize();else for(var b=h/this.$splits,g=0;g<this.$splits;g++)f=this.$editors[g],f.container.style.width=u+"px",f.container.style.top=g*b+"px",f.container.style.left="0px",f.container.style.height=b+"px",f.resize()}}).call(l.prototype),r.Split=l}),ace.define("ace/ext/split",["require","exports","module","ace/split"],function(n,r,i){i.exports=n("../split")}),function(){ace.require(["ace/ext/split"],function(n){e&&(e.exports=n)})}()})(XE);var kI=XE.exports,EI="Expected a function",QE="__lodash_hash_undefined__",ZE=1/0,$I="[object Function]",TI="[object GeneratorFunction]",AI="[object Symbol]",MI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,LI=/^\w*$/,RI=/^\./,PI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,II=/[\\^$.*+?()[\]{}|]/g,OI=/\\(\\)?/g,FI=/^\[object .+?Constructor\]$/,DI=typeof Be=="object"&&Be&&Be.Object===Object&&Be,NI=typeof self=="object"&&self&&self.Object===Object&&self,cb=DI||NI||Function("return this")();function zI(e,t){return e==null?void 0:e[t]}function BI(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var jI=Array.prototype,HI=Function.prototype,JE=Object.prototype,wm=cb["__core-js_shared__"],J1=function(){var e=/[^.]+$/.exec(wm&&wm.keys&&wm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),e2=HI.toString,db=JE.hasOwnProperty,t2=JE.toString,VI=RegExp("^"+e2.call(db).replace(II,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eS=cb.Symbol,WI=jI.splice,UI=n2(cb,"Map"),Qc=n2(Object,"create"),tS=eS?eS.prototype:void 0,nS=tS?tS.toString:void 0;function _s(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function GI(){this.__data__=Qc?Qc(null):{}}function KI(e){return this.has(e)&&delete this.__data__[e]}function qI(e){var t=this.__data__;if(Qc){var n=t[e];return n===QE?void 0:n}return db.call(t,e)?t[e]:void 0}function YI(e){var t=this.__data__;return Qc?t[e]!==void 0:db.call(t,e)}function XI(e,t){var n=this.__data__;return n[e]=Qc&&t===void 0?QE:t,this}_s.prototype.clear=GI;_s.prototype.delete=KI;_s.prototype.get=qI;_s.prototype.has=YI;_s.prototype.set=XI;function wu(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function QI(){this.__data__=[]}function ZI(e){var t=this.__data__,n=Qp(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():WI.call(t,n,1),!0}function JI(e){var t=this.__data__,n=Qp(t,e);return n<0?void 0:t[n][1]}function eO(e){return Qp(this.__data__,e)>-1}function tO(e,t){var n=this.__data__,r=Qp(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}wu.prototype.clear=QI;wu.prototype.delete=ZI;wu.prototype.get=JI;wu.prototype.has=eO;wu.prototype.set=tO;function As(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function nO(){this.__data__={hash:new _s,map:new(UI||wu),string:new _s}}function rO(e){return Zp(this,e).delete(e)}function iO(e){return Zp(this,e).get(e)}function oO(e){return Zp(this,e).has(e)}function aO(e,t){return Zp(this,e).set(e,t),this}As.prototype.clear=nO;As.prototype.delete=rO;As.prototype.get=iO;As.prototype.has=oO;As.prototype.set=aO;function Qp(e,t){for(var n=e.length;n--;)if(vO(e[n][0],t))return n;return-1}function sO(e,t){t=dO(t,e)?[t]:cO(t);for(var n=0,r=t.length;e!=null&&n<r;)e=e[gO(t[n++])];return n&&n==r?e:void 0}function lO(e){if(!i2(e)||hO(e))return!1;var t=yO(e)||BI(e)?VI:FI;return t.test(mO(e))}function uO(e){if(typeof e=="string")return e;if(hb(e))return nS?nS.call(e):"";var t=e+"";return t=="0"&&1/e==-ZE?"-0":t}function cO(e){return r2(e)?e:pO(e)}function Zp(e,t){var n=e.__data__;return fO(t)?n[typeof t=="string"?"string":"hash"]:n.map}function n2(e,t){var n=zI(e,t);return lO(n)?n:void 0}function dO(e,t){if(r2(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||hb(e)?!0:LI.test(e)||!MI.test(e)||t!=null&&e in Object(t)}function fO(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function hO(e){return!!J1&&J1 in e}var pO=fb(function(e){e=wO(e);var t=[];return RI.test(e)&&t.push(""),e.replace(PI,function(n,r,i,o){t.push(i?o.replace(OI,"$1"):r||n)}),t});function gO(e){if(typeof e=="string"||hb(e))return e;var t=e+"";return t=="0"&&1/e==-ZE?"-0":t}function mO(e){if(e!=null){try{return e2.call(e)}catch{}try{return e+""}catch{}}return""}function fb(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(EI);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(fb.Cache||As),n}fb.Cache=As;function vO(e,t){return e===t||e!==e&&t!==t}var r2=Array.isArray;function yO(e){var t=i2(e)?t2.call(e):"";return t==$I||t==TI}function i2(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function bO(e){return!!e&&typeof e=="object"}function hb(e){return typeof e=="symbol"||bO(e)&&t2.call(e)==AI}function wO(e){return e==null?"":uO(e)}function SO(e,t,n){var r=e==null?void 0:sO(e,t);return r===void 0?n:r}var xO=SO,_O=Be&&Be.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),vy=Be&&Be.__assign||function(){return vy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},vy.apply(this,arguments)};Object.defineProperty(Xp,"__esModule",{value:!0});var qa=gi,Sm=(0,qa.getAceInstance)(),CO=Wh,kO=kI,Ge=lb,rS=z,xm=YE,lo=xO,EO=function(e){_O(t,e);function t(n){var r=e.call(this,n)||this;return qa.editorEvents.forEach(function(i){r[i]=r[i].bind(r)}),r.debounce=qa.debounce,r}return t.prototype.isInShadow=function(n){for(var r=n&&n.parentNode;r;){if(r.toString()==="[object ShadowRoot]")return!0;r=r.parentNode}return!1},t.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.className,o=r.onBeforeLoad,s=r.mode,d=r.focus,a=r.theme,c=r.fontSize,l=r.value,u=r.defaultValue,h=r.cursorStart,f=r.showGutter,p=r.wrapEnabled,g=r.showPrintMargin,b=r.scrollMargin,x=b===void 0?[0,0,0,0]:b,S=r.keyboardHandler,T=r.onLoad,v=r.commands,w=r.annotations,y=r.markers,m=r.splits;this.editor=Sm.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(a)),o&&o(Sm);var E=Object.keys(this.props.editorProps),A=new kO.Split(this.editor.container,"ace/theme/".concat(a),m);this.editor.env.split=A,this.splitEditor=A.getEditor(0),this.split=A,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var C=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),A.forEach(function(I,R){for(var M=0;M<E.length;M++)I[E[M]]=n.props.editorProps[E[M]];var O=lo(u,R),P=lo(l,R,"");I.session.setUndoManager(new Sm.UndoManager),I.setTheme("ace/theme/".concat(a)),I.renderer.setScrollMargin(x[0],x[1],x[2],x[3]),I.getSession().setMode("ace/mode/".concat(s)),I.setFontSize(c),I.renderer.setShowGutter(f),I.getSession().setUseWrapMode(p),I.setShowPrintMargin(g),I.on("focus",n.onFocus),I.on("blur",n.onBlur),I.on("input",n.onInput),I.on("copy",n.onCopy),I.on("paste",n.onPaste),I.on("change",n.onChange),I.getSession().selection.on("changeSelection",n.onSelectionChange),I.getSession().selection.on("changeCursor",n.onCursorChange),I.session.on("changeScrollTop",n.onScroll),I.setValue(O===void 0?P:O,h);var N=lo(w,R,[]),B=lo(y,R,[]);I.getSession().setAnnotations(N),B&&B.length>0&&n.handleMarkers(B,I);for(var M=0;M<qa.editorOptions.length;M++){var W=qa.editorOptions[M];C.hasOwnProperty(W)?I.setOption(W,n.props[W]):n.props[W]&&console.warn("ReaceAce: editor option ".concat(W," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}n.handleOptions(n.props,I),Array.isArray(v)&&v.forEach(function(K){typeof K.exec=="string"?I.commands.bindKey(K.bindKey,K.exec):I.commands.addCommand(K)}),S&&I.setKeyboardHandler("ace/keyboard/"+S)}),i&&(this.refEditor.className+=" "+i),d&&this.splitEditor.focus();var k=this.editor.env.split;k.setOrientation(this.props.orientation==="below"?k.BELOW:k.BESIDE),k.resize(!0),T&&T(k)},t.prototype.componentDidUpdate=function(n){var r=this,i=n,o=this.props,s=this.editor.env.split;if(o.splits!==i.splits&&s.setSplits(o.splits),o.orientation!==i.orientation&&s.setOrientation(o.orientation==="below"?s.BELOW:s.BESIDE),s.forEach(function(l,u){o.mode!==i.mode&&l.getSession().setMode("ace/mode/"+o.mode),o.keyboardHandler!==i.keyboardHandler&&(o.keyboardHandler?l.setKeyboardHandler("ace/keyboard/"+o.keyboardHandler):l.setKeyboardHandler(null)),o.fontSize!==i.fontSize&&l.setFontSize(o.fontSize),o.wrapEnabled!==i.wrapEnabled&&l.getSession().setUseWrapMode(o.wrapEnabled),o.showPrintMargin!==i.showPrintMargin&&l.setShowPrintMargin(o.showPrintMargin),o.showGutter!==i.showGutter&&l.renderer.setShowGutter(o.showGutter);for(var h=0;h<qa.editorOptions.length;h++){var f=qa.editorOptions[h];o[f]!==i[f]&&l.setOption(f,o[f])}xm(o.setOptions,i.setOptions)||r.handleOptions(o,l);var p=lo(o.value,u,"");if(l.getValue()!==p){r.silent=!0;var g=l.session.selection.toJSON();l.setValue(p,o.cursorStart),l.session.selection.fromJSON(g),r.silent=!1}var b=lo(o.annotations,u,[]),x=lo(i.annotations,u,[]);xm(b,x)||l.getSession().setAnnotations(b);var S=lo(o.markers,u,[]),T=lo(i.markers,u,[]);!xm(S,T)&&Array.isArray(S)&&r.handleMarkers(S,l)}),o.className!==i.className){var d=this.refEditor.className,a=d.trim().split(" "),c=i.className.trim().split(" ");c.forEach(function(l){var u=a.indexOf(l);a.splice(u,1)}),this.refEditor.className=" "+o.className+" "+a.join(" ")}o.theme!==i.theme&&s.setTheme("ace/theme/"+o.theme),o.focus&&!i.focus&&this.splitEditor.focus(),(o.height!==this.props.height||o.width!==this.props.width)&&this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(n){if(this.props.onChange&&!this.silent){var r=[];this.editor.env.split.forEach(function(i){r.push(i.getValue())}),this.props.onChange(r,n)}},t.prototype.onSelectionChange=function(n){if(this.props.onSelectionChange){var r=[];this.editor.env.split.forEach(function(i){r.push(i.getSelection())}),this.props.onSelectionChange(r,n)}},t.prototype.onCursorChange=function(n){if(this.props.onCursorChange){var r=[];this.editor.env.split.forEach(function(i){r.push(i.getSelection())}),this.props.onCursorChange(r,n)}},t.prototype.onFocus=function(n){this.props.onFocus&&this.props.onFocus(n)},t.prototype.onInput=function(n){this.props.onInput&&this.props.onInput(n)},t.prototype.onBlur=function(n){this.props.onBlur&&this.props.onBlur(n)},t.prototype.onCopy=function(n){this.props.onCopy&&this.props.onCopy(n)},t.prototype.onPaste=function(n){this.props.onPaste&&this.props.onPaste(n)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(n,r){for(var i=Object.keys(n.setOptions),o=0;o<i.length;o++)r.setOption(i[o],n.setOptions[i[o]])},t.prototype.handleMarkers=function(n,r){var i=r.getSession().getMarkers(!0);for(var o in i)i.hasOwnProperty(o)&&r.getSession().removeMarker(i[o].id);i=r.getSession().getMarkers(!1);for(var o in i)i.hasOwnProperty(o)&&r.getSession().removeMarker(i[o].id);n.forEach(function(s){var d=s.startRow,a=s.startCol,c=s.endRow,l=s.endCol,u=s.className,h=s.type,f=s.inFront,p=f===void 0?!1:f,g=new CO.Range(d,a,c,l);r.getSession().addMarker(g,u,h,p)})},t.prototype.updateRef=function(n){this.refEditor=n},t.prototype.render=function(){var n=this.props,r=n.name,i=n.width,o=n.height,s=n.style,d=vy({width:i,height:o},s);return rS.createElement("div",{ref:this.updateRef,id:r,style:d})},t.propTypes={className:Ge.string,debounceChangePeriod:Ge.number,defaultValue:Ge.arrayOf(Ge.string),focus:Ge.bool,fontSize:Ge.oneOfType([Ge.number,Ge.string]),height:Ge.string,mode:Ge.string,name:Ge.string,onBlur:Ge.func,onChange:Ge.func,onCopy:Ge.func,onFocus:Ge.func,onInput:Ge.func,onLoad:Ge.func,onPaste:Ge.func,onScroll:Ge.func,orientation:Ge.string,showGutter:Ge.bool,splits:Ge.number,theme:Ge.string,value:Ge.arrayOf(Ge.string),width:Ge.string,onSelectionChange:Ge.func,onCursorChange:Ge.func,onBeforeLoad:Ge.func,minLines:Ge.number,maxLines:Ge.number,readOnly:Ge.bool,highlightActiveLine:Ge.bool,tabSize:Ge.number,showPrintMargin:Ge.bool,cursorStart:Ge.number,editorProps:Ge.object,setOptions:Ge.object,style:Ge.object,scrollMargin:Ge.array,annotations:Ge.array,markers:Ge.array,keyboardHandler:Ge.string,wrapEnabled:Ge.bool,enableBasicAutocompletion:Ge.oneOfType([Ge.bool,Ge.array]),enableLiveAutocompletion:Ge.oneOfType([Ge.bool,Ge.array]),commands:Ge.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(rS.Component);Xp.default=EO;var o2={exports:{}};(function(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,r=1,i=0;t.Diff=function(o,s){return[o,s]},t.prototype.diff_main=function(o,s,d,a){typeof a>"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var c=a;if(o==null||s==null)throw new Error("Null input. (diff_main)");if(o==s)return o?[new t.Diff(i,o)]:[];typeof d>"u"&&(d=!0);var l=d,u=this.diff_commonPrefix(o,s),h=o.substring(0,u);o=o.substring(u),s=s.substring(u),u=this.diff_commonSuffix(o,s);var f=o.substring(o.length-u);o=o.substring(0,o.length-u),s=s.substring(0,s.length-u);var p=this.diff_compute_(o,s,l,c);return h&&p.unshift(new t.Diff(i,h)),f&&p.push(new t.Diff(i,f)),this.diff_cleanupMerge(p),p},t.prototype.diff_compute_=function(o,s,d,a){var c;if(!o)return[new t.Diff(r,s)];if(!s)return[new t.Diff(n,o)];var l=o.length>s.length?o:s,u=o.length>s.length?s:o,h=l.indexOf(u);if(h!=-1)return c=[new t.Diff(r,l.substring(0,h)),new t.Diff(i,u),new t.Diff(r,l.substring(h+u.length))],o.length>s.length&&(c[0][0]=c[2][0]=n),c;if(u.length==1)return[new t.Diff(n,o),new t.Diff(r,s)];var f=this.diff_halfMatch_(o,s);if(f){var p=f[0],g=f[1],b=f[2],x=f[3],S=f[4],T=this.diff_main(p,b,d,a),v=this.diff_main(g,x,d,a);return T.concat([new t.Diff(i,S)],v)}return d&&o.length>100&&s.length>100?this.diff_lineMode_(o,s,a):this.diff_bisect_(o,s,a)},t.prototype.diff_lineMode_=function(o,s,d){var a=this.diff_linesToChars_(o,s);o=a.chars1,s=a.chars2;var c=a.lineArray,l=this.diff_main(o,s,!1,d);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new t.Diff(i,""));for(var u=0,h=0,f=0,p="",g="";u<l.length;){switch(l[u][0]){case r:f++,g+=l[u][1];break;case n:h++,p+=l[u][1];break;case i:if(h>=1&&f>=1){l.splice(u-h-f,h+f),u=u-h-f;for(var b=this.diff_main(p,g,!1,d),x=b.length-1;x>=0;x--)l.splice(u,0,b[x]);u=u+b.length}f=0,h=0,p="",g="";break}u++}return l.pop(),l},t.prototype.diff_bisect_=function(o,s,d){for(var a=o.length,c=s.length,l=Math.ceil((a+c)/2),u=l,h=2*l,f=new Array(h),p=new Array(h),g=0;g<h;g++)f[g]=-1,p[g]=-1;f[u+1]=0,p[u+1]=0;for(var b=a-c,x=b%2!=0,S=0,T=0,v=0,w=0,y=0;y<l&&!(new Date().getTime()>d);y++){for(var m=-y+S;m<=y-T;m+=2){var E=u+m,A;m==-y||m!=y&&f[E-1]<f[E+1]?A=f[E+1]:A=f[E-1]+1;for(var C=A-m;A<a&&C<c&&o.charAt(A)==s.charAt(C);)A++,C++;if(f[E]=A,A>a)T+=2;else if(C>c)S+=2;else if(x){var k=u+b-m;if(k>=0&&k<h&&p[k]!=-1){var I=a-p[k];if(A>=I)return this.diff_bisectSplit_(o,s,A,C,d)}}}for(var R=-y+v;R<=y-w;R+=2){var k=u+R,I;R==-y||R!=y&&p[k-1]<p[k+1]?I=p[k+1]:I=p[k-1]+1;for(var M=I-R;I<a&&M<c&&o.charAt(a-I-1)==s.charAt(c-M-1);)I++,M++;if(p[k]=I,I>a)w+=2;else if(M>c)v+=2;else if(!x){var E=u+b-R;if(E>=0&&E<h&&f[E]!=-1){var A=f[E],C=u+A-E;if(I=a-I,A>=I)return this.diff_bisectSplit_(o,s,A,C,d)}}}}return[new t.Diff(n,o),new t.Diff(r,s)]},t.prototype.diff_bisectSplit_=function(o,s,d,a,c){var l=o.substring(0,d),u=s.substring(0,a),h=o.substring(d),f=s.substring(a),p=this.diff_main(l,u,!1,c),g=this.diff_main(h,f,!1,c);return p.concat(g)},t.prototype.diff_linesToChars_=function(o,s){var d=[],a={};d[0]="";function c(f){for(var p="",g=0,b=-1,x=d.length;b<f.length-1;){b=f.indexOf(`
|
||
`,g),b==-1&&(b=f.length-1);var S=f.substring(g,b+1);(a.hasOwnProperty?a.hasOwnProperty(S):a[S]!==void 0)?p+=String.fromCharCode(a[S]):(x==l&&(S=f.substring(g),b=f.length),p+=String.fromCharCode(x),a[S]=x,d[x++]=S),g=b+1}return p}var l=4e4,u=c(o);l=65535;var h=c(s);return{chars1:u,chars2:h,lineArray:d}},t.prototype.diff_charsToLines_=function(o,s){for(var d=0;d<o.length;d++){for(var a=o[d][1],c=[],l=0;l<a.length;l++)c[l]=s[a.charCodeAt(l)];o[d][1]=c.join("")}},t.prototype.diff_commonPrefix=function(o,s){if(!o||!s||o.charAt(0)!=s.charAt(0))return 0;for(var d=0,a=Math.min(o.length,s.length),c=a,l=0;d<c;)o.substring(l,c)==s.substring(l,c)?(d=c,l=d):a=c,c=Math.floor((a-d)/2+d);return c},t.prototype.diff_commonSuffix=function(o,s){if(!o||!s||o.charAt(o.length-1)!=s.charAt(s.length-1))return 0;for(var d=0,a=Math.min(o.length,s.length),c=a,l=0;d<c;)o.substring(o.length-c,o.length-l)==s.substring(s.length-c,s.length-l)?(d=c,l=d):a=c,c=Math.floor((a-d)/2+d);return c},t.prototype.diff_commonOverlap_=function(o,s){var d=o.length,a=s.length;if(d==0||a==0)return 0;d>a?o=o.substring(d-a):d<a&&(s=s.substring(0,d));var c=Math.min(d,a);if(o==s)return c;for(var l=0,u=1;;){var h=o.substring(c-u),f=s.indexOf(h);if(f==-1)return l;u+=f,(f==0||o.substring(c-u)==s.substring(0,u))&&(l=u,u++)}},t.prototype.diff_halfMatch_=function(o,s){if(this.Diff_Timeout<=0)return null;var d=o.length>s.length?o:s,a=o.length>s.length?s:o;if(d.length<4||a.length*2<d.length)return null;var c=this;function l(T,v,w){for(var y=T.substring(w,w+Math.floor(T.length/4)),m=-1,E="",A,C,k,I;(m=v.indexOf(y,m+1))!=-1;){var R=c.diff_commonPrefix(T.substring(w),v.substring(m)),M=c.diff_commonSuffix(T.substring(0,w),v.substring(0,m));E.length<M+R&&(E=v.substring(m-M,m)+v.substring(m,m+R),A=T.substring(0,w-M),C=T.substring(w+R),k=v.substring(0,m-M),I=v.substring(m+R))}return E.length*2>=T.length?[A,C,k,I,E]:null}var u=l(d,a,Math.ceil(d.length/4)),h=l(d,a,Math.ceil(d.length/2)),f;if(!u&&!h)return null;h?u?f=u[4].length>h[4].length?u:h:f=h:f=u;var p,g,b,x;o.length>s.length?(p=f[0],g=f[1],b=f[2],x=f[3]):(b=f[0],x=f[1],p=f[2],g=f[3]);var S=f[4];return[p,g,b,x,S]},t.prototype.diff_cleanupSemantic=function(o){for(var s=!1,d=[],a=0,c=null,l=0,u=0,h=0,f=0,p=0;l<o.length;)o[l][0]==i?(d[a++]=l,u=f,h=p,f=0,p=0,c=o[l][1]):(o[l][0]==r?f+=o[l][1].length:p+=o[l][1].length,c&&c.length<=Math.max(u,h)&&c.length<=Math.max(f,p)&&(o.splice(d[a-1],0,new t.Diff(n,c)),o[d[a-1]+1][0]=r,a--,a--,l=a>0?d[a-1]:-1,u=0,h=0,f=0,p=0,c=null,s=!0)),l++;for(s&&this.diff_cleanupMerge(o),this.diff_cleanupSemanticLossless(o),l=1;l<o.length;){if(o[l-1][0]==n&&o[l][0]==r){var g=o[l-1][1],b=o[l][1],x=this.diff_commonOverlap_(g,b),S=this.diff_commonOverlap_(b,g);x>=S?(x>=g.length/2||x>=b.length/2)&&(o.splice(l,0,new t.Diff(i,b.substring(0,x))),o[l-1][1]=g.substring(0,g.length-x),o[l+1][1]=b.substring(x),l++):(S>=g.length/2||S>=b.length/2)&&(o.splice(l,0,new t.Diff(i,g.substring(0,S))),o[l-1][0]=r,o[l-1][1]=b.substring(0,b.length-S),o[l+1][0]=n,o[l+1][1]=g.substring(S),l++),l++}l++}},t.prototype.diff_cleanupSemanticLossless=function(o){function s(S,T){if(!S||!T)return 6;var v=S.charAt(S.length-1),w=T.charAt(0),y=v.match(t.nonAlphaNumericRegex_),m=w.match(t.nonAlphaNumericRegex_),E=y&&v.match(t.whitespaceRegex_),A=m&&w.match(t.whitespaceRegex_),C=E&&v.match(t.linebreakRegex_),k=A&&w.match(t.linebreakRegex_),I=C&&S.match(t.blanklineEndRegex_),R=k&&T.match(t.blanklineStartRegex_);return I||R?5:C||k?4:y&&!E&&A?3:E||A?2:y||m?1:0}for(var d=1;d<o.length-1;){if(o[d-1][0]==i&&o[d+1][0]==i){var a=o[d-1][1],c=o[d][1],l=o[d+1][1],u=this.diff_commonSuffix(a,c);if(u){var h=c.substring(c.length-u);a=a.substring(0,a.length-u),c=h+c.substring(0,c.length-u),l=h+l}for(var f=a,p=c,g=l,b=s(a,c)+s(c,l);c.charAt(0)===l.charAt(0);){a+=c.charAt(0),c=c.substring(1)+l.charAt(0),l=l.substring(1);var x=s(a,c)+s(c,l);x>=b&&(b=x,f=a,p=c,g=l)}o[d-1][1]!=f&&(f?o[d-1][1]=f:(o.splice(d-1,1),d--),o[d][1]=p,g?o[d+1][1]=g:(o.splice(d+1,1),d--))}d++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(o){for(var s=!1,d=[],a=0,c=null,l=0,u=!1,h=!1,f=!1,p=!1;l<o.length;)o[l][0]==i?(o[l][1].length<this.Diff_EditCost&&(f||p)?(d[a++]=l,u=f,h=p,c=o[l][1]):(a=0,c=null),f=p=!1):(o[l][0]==n?p=!0:f=!0,c&&(u&&h&&f&&p||c.length<this.Diff_EditCost/2&&u+h+f+p==3)&&(o.splice(d[a-1],0,new t.Diff(n,c)),o[d[a-1]+1][0]=r,a--,c=null,u&&h?(f=p=!0,a=0):(a--,l=a>0?d[a-1]:-1,f=p=!1),s=!0)),l++;s&&this.diff_cleanupMerge(o)},t.prototype.diff_cleanupMerge=function(o){o.push(new t.Diff(i,""));for(var s=0,d=0,a=0,c="",l="",u;s<o.length;)switch(o[s][0]){case r:a++,l+=o[s][1],s++;break;case n:d++,c+=o[s][1],s++;break;case i:d+a>1?(d!==0&&a!==0&&(u=this.diff_commonPrefix(l,c),u!==0&&(s-d-a>0&&o[s-d-a-1][0]==i?o[s-d-a-1][1]+=l.substring(0,u):(o.splice(0,0,new t.Diff(i,l.substring(0,u))),s++),l=l.substring(u),c=c.substring(u)),u=this.diff_commonSuffix(l,c),u!==0&&(o[s][1]=l.substring(l.length-u)+o[s][1],l=l.substring(0,l.length-u),c=c.substring(0,c.length-u))),s-=d+a,o.splice(s,d+a),c.length&&(o.splice(s,0,new t.Diff(n,c)),s++),l.length&&(o.splice(s,0,new t.Diff(r,l)),s++),s++):s!==0&&o[s-1][0]==i?(o[s-1][1]+=o[s][1],o.splice(s,1)):s++,a=0,d=0,c="",l="";break}o[o.length-1][1]===""&&o.pop();var h=!1;for(s=1;s<o.length-1;)o[s-1][0]==i&&o[s+1][0]==i&&(o[s][1].substring(o[s][1].length-o[s-1][1].length)==o[s-1][1]?(o[s][1]=o[s-1][1]+o[s][1].substring(0,o[s][1].length-o[s-1][1].length),o[s+1][1]=o[s-1][1]+o[s+1][1],o.splice(s-1,1),h=!0):o[s][1].substring(0,o[s+1][1].length)==o[s+1][1]&&(o[s-1][1]+=o[s+1][1],o[s][1]=o[s][1].substring(o[s+1][1].length)+o[s+1][1],o.splice(s+1,1),h=!0)),s++;h&&this.diff_cleanupMerge(o)},t.prototype.diff_xIndex=function(o,s){var d=0,a=0,c=0,l=0,u;for(u=0;u<o.length&&(o[u][0]!==r&&(d+=o[u][1].length),o[u][0]!==n&&(a+=o[u][1].length),!(d>s));u++)c=d,l=a;return o.length!=u&&o[u][0]===n?l:l+(s-c)},t.prototype.diff_prettyHtml=function(o){for(var s=[],d=/&/g,a=/</g,c=/>/g,l=/\n/g,u=0;u<o.length;u++){var h=o[u][0],f=o[u][1],p=f.replace(d,"&").replace(a,"<").replace(c,">").replace(l,"¶<br>");switch(h){case r:s[u]='<ins style="background:#e6ffe6;">'+p+"</ins>";break;case n:s[u]='<del style="background:#ffe6e6;">'+p+"</del>";break;case i:s[u]="<span>"+p+"</span>";break}}return s.join("")},t.prototype.diff_text1=function(o){for(var s=[],d=0;d<o.length;d++)o[d][0]!==r&&(s[d]=o[d][1]);return s.join("")},t.prototype.diff_text2=function(o){for(var s=[],d=0;d<o.length;d++)o[d][0]!==n&&(s[d]=o[d][1]);return s.join("")},t.prototype.diff_levenshtein=function(o){for(var s=0,d=0,a=0,c=0;c<o.length;c++){var l=o[c][0],u=o[c][1];switch(l){case r:d+=u.length;break;case n:a+=u.length;break;case i:s+=Math.max(d,a),d=0,a=0;break}}return s+=Math.max(d,a),s},t.prototype.diff_toDelta=function(o){for(var s=[],d=0;d<o.length;d++)switch(o[d][0]){case r:s[d]="+"+encodeURI(o[d][1]);break;case n:s[d]="-"+o[d][1].length;break;case i:s[d]="="+o[d][1].length;break}return s.join(" ").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(o,s){for(var d=[],a=0,c=0,l=s.split(/\t/g),u=0;u<l.length;u++){var h=l[u].substring(1);switch(l[u].charAt(0)){case"+":try{d[a++]=new t.Diff(r,decodeURI(h))}catch{throw new Error("Illegal escape in diff_fromDelta: "+h)}break;case"-":case"=":var f=parseInt(h,10);if(isNaN(f)||f<0)throw new Error("Invalid number in diff_fromDelta: "+h);var p=o.substring(c,c+=f);l[u].charAt(0)=="="?d[a++]=new t.Diff(i,p):d[a++]=new t.Diff(n,p);break;default:if(l[u])throw new Error("Invalid diff operation in diff_fromDelta: "+l[u])}}if(c!=o.length)throw new Error("Delta length ("+c+") does not equal source text length ("+o.length+").");return d},t.prototype.match_main=function(o,s,d){if(o==null||s==null||d==null)throw new Error("Null input. (match_main)");return d=Math.max(0,Math.min(d,o.length)),o==s?0:o.length?o.substring(d,d+s.length)==s?d:this.match_bitap_(o,s,d):-1},t.prototype.match_bitap_=function(o,s,d){if(s.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(s),c=this;function l(A,C){var k=A/s.length,I=Math.abs(d-C);return c.Match_Distance?k+I/c.Match_Distance:I?1:k}var u=this.Match_Threshold,h=o.indexOf(s,d);h!=-1&&(u=Math.min(l(0,h),u),h=o.lastIndexOf(s,d+s.length),h!=-1&&(u=Math.min(l(0,h),u)));var f=1<<s.length-1;h=-1;for(var p,g,b=s.length+o.length,x,S=0;S<s.length;S++){for(p=0,g=b;p<g;)l(S,d+g)<=u?p=g:b=g,g=Math.floor((b-p)/2+p);b=g;var T=Math.max(1,d-g+1),v=Math.min(d+g,o.length)+s.length,w=Array(v+2);w[v+1]=(1<<S)-1;for(var y=v;y>=T;y--){var m=a[o.charAt(y-1)];if(S===0?w[y]=(w[y+1]<<1|1)&m:w[y]=(w[y+1]<<1|1)&m|((x[y+1]|x[y])<<1|1)|x[y+1],w[y]&f){var E=l(S,y-1);if(E<=u)if(u=E,h=y-1,h>d)T=Math.max(1,2*d-h);else break}}if(l(S+1,d)>u)break;x=w}return h},t.prototype.match_alphabet_=function(o){for(var s={},d=0;d<o.length;d++)s[o.charAt(d)]=0;for(var d=0;d<o.length;d++)s[o.charAt(d)]|=1<<o.length-d-1;return s},t.prototype.patch_addContext_=function(o,s){if(s.length!=0){if(o.start2===null)throw Error("patch not initialized");for(var d=s.substring(o.start2,o.start2+o.length1),a=0;s.indexOf(d)!=s.lastIndexOf(d)&&d.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)a+=this.Patch_Margin,d=s.substring(o.start2-a,o.start2+o.length1+a);a+=this.Patch_Margin;var c=s.substring(o.start2-a,o.start2);c&&o.diffs.unshift(new t.Diff(i,c));var l=s.substring(o.start2+o.length1,o.start2+o.length1+a);l&&o.diffs.push(new t.Diff(i,l)),o.start1-=c.length,o.start2-=c.length,o.length1+=c.length+l.length,o.length2+=c.length+l.length}},t.prototype.patch_make=function(o,s,d){var a,c;if(typeof o=="string"&&typeof s=="string"&&typeof d>"u")a=o,c=this.diff_main(a,s,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(o&&typeof o=="object"&&typeof s>"u"&&typeof d>"u")c=o,a=this.diff_text1(c);else if(typeof o=="string"&&s&&typeof s=="object"&&typeof d>"u")a=o,c=s;else if(typeof o=="string"&&typeof s=="string"&&d&&typeof d=="object")a=o,c=d;else throw new Error("Unknown call format to patch_make.");if(c.length===0)return[];for(var l=[],u=new t.patch_obj,h=0,f=0,p=0,g=a,b=a,x=0;x<c.length;x++){var S=c[x][0],T=c[x][1];switch(!h&&S!==i&&(u.start1=f,u.start2=p),S){case r:u.diffs[h++]=c[x],u.length2+=T.length,b=b.substring(0,p)+T+b.substring(p);break;case n:u.length1+=T.length,u.diffs[h++]=c[x],b=b.substring(0,p)+b.substring(p+T.length);break;case i:T.length<=2*this.Patch_Margin&&h&&c.length!=x+1?(u.diffs[h++]=c[x],u.length1+=T.length,u.length2+=T.length):T.length>=2*this.Patch_Margin&&h&&(this.patch_addContext_(u,g),l.push(u),u=new t.patch_obj,h=0,g=b,f=p);break}S!==r&&(f+=T.length),S!==n&&(p+=T.length)}return h&&(this.patch_addContext_(u,g),l.push(u)),l},t.prototype.patch_deepCopy=function(o){for(var s=[],d=0;d<o.length;d++){var a=o[d],c=new t.patch_obj;c.diffs=[];for(var l=0;l<a.diffs.length;l++)c.diffs[l]=new t.Diff(a.diffs[l][0],a.diffs[l][1]);c.start1=a.start1,c.start2=a.start2,c.length1=a.length1,c.length2=a.length2,s[d]=c}return s},t.prototype.patch_apply=function(o,s){if(o.length==0)return[s,[]];o=this.patch_deepCopy(o);var d=this.patch_addPadding(o);s=d+s+d,this.patch_splitMax(o);for(var a=0,c=[],l=0;l<o.length;l++){var u=o[l].start2+a,h=this.diff_text1(o[l].diffs),f,p=-1;if(h.length>this.Match_MaxBits?(f=this.match_main(s,h.substring(0,this.Match_MaxBits),u),f!=-1&&(p=this.match_main(s,h.substring(h.length-this.Match_MaxBits),u+h.length-this.Match_MaxBits),(p==-1||f>=p)&&(f=-1))):f=this.match_main(s,h,u),f==-1)c[l]=!1,a-=o[l].length2-o[l].length1;else{c[l]=!0,a=f-u;var g;if(p==-1?g=s.substring(f,f+h.length):g=s.substring(f,p+this.Match_MaxBits),h==g)s=s.substring(0,f)+this.diff_text2(o[l].diffs)+s.substring(f+h.length);else{var b=this.diff_main(h,g,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(b)/h.length>this.Patch_DeleteThreshold)c[l]=!1;else{this.diff_cleanupSemanticLossless(b);for(var x=0,S,T=0;T<o[l].diffs.length;T++){var v=o[l].diffs[T];v[0]!==i&&(S=this.diff_xIndex(b,x)),v[0]===r?s=s.substring(0,f+S)+v[1]+s.substring(f+S):v[0]===n&&(s=s.substring(0,f+S)+s.substring(f+this.diff_xIndex(b,x+v[1].length))),v[0]!==n&&(x+=v[1].length)}}}}}return s=s.substring(d.length,s.length-d.length),[s,c]},t.prototype.patch_addPadding=function(o){for(var s=this.Patch_Margin,d="",a=1;a<=s;a++)d+=String.fromCharCode(a);for(var a=0;a<o.length;a++)o[a].start1+=s,o[a].start2+=s;var c=o[0],l=c.diffs;if(l.length==0||l[0][0]!=i)l.unshift(new t.Diff(i,d)),c.start1-=s,c.start2-=s,c.length1+=s,c.length2+=s;else if(s>l[0][1].length){var u=s-l[0][1].length;l[0][1]=d.substring(l[0][1].length)+l[0][1],c.start1-=u,c.start2-=u,c.length1+=u,c.length2+=u}if(c=o[o.length-1],l=c.diffs,l.length==0||l[l.length-1][0]!=i)l.push(new t.Diff(i,d)),c.length1+=s,c.length2+=s;else if(s>l[l.length-1][1].length){var u=s-l[l.length-1][1].length;l[l.length-1][1]+=d.substring(0,u),c.length1+=u,c.length2+=u}return d},t.prototype.patch_splitMax=function(o){for(var s=this.Match_MaxBits,d=0;d<o.length;d++)if(!(o[d].length1<=s)){var a=o[d];o.splice(d--,1);for(var c=a.start1,l=a.start2,u="";a.diffs.length!==0;){var h=new t.patch_obj,f=!0;for(h.start1=c-u.length,h.start2=l-u.length,u!==""&&(h.length1=h.length2=u.length,h.diffs.push(new t.Diff(i,u)));a.diffs.length!==0&&h.length1<s-this.Patch_Margin;){var p=a.diffs[0][0],g=a.diffs[0][1];p===r?(h.length2+=g.length,l+=g.length,h.diffs.push(a.diffs.shift()),f=!1):p===n&&h.diffs.length==1&&h.diffs[0][0]==i&&g.length>2*s?(h.length1+=g.length,c+=g.length,f=!1,h.diffs.push(new t.Diff(p,g)),a.diffs.shift()):(g=g.substring(0,s-h.length1-this.Patch_Margin),h.length1+=g.length,c+=g.length,p===i?(h.length2+=g.length,l+=g.length):f=!1,h.diffs.push(new t.Diff(p,g)),g==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(g.length))}u=this.diff_text2(h.diffs),u=u.substring(u.length-this.Patch_Margin);var b=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);b!==""&&(h.length1+=b.length,h.length2+=b.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===i?h.diffs[h.diffs.length-1][1]+=b:h.diffs.push(new t.Diff(i,b))),f||o.splice(++d,0,h)}}},t.prototype.patch_toText=function(o){for(var s=[],d=0;d<o.length;d++)s[d]=o[d];return s.join("")},t.prototype.patch_fromText=function(o){var s=[];if(!o)return s;for(var d=o.split(`
|
||
`),a=0,c=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;a<d.length;){var l=d[a].match(c);if(!l)throw new Error("Invalid patch string: "+d[a]);var u=new t.patch_obj;for(s.push(u),u.start1=parseInt(l[1],10),l[2]===""?(u.start1--,u.length1=1):l[2]=="0"?u.length1=0:(u.start1--,u.length1=parseInt(l[2],10)),u.start2=parseInt(l[3],10),l[4]===""?(u.start2--,u.length2=1):l[4]=="0"?u.length2=0:(u.start2--,u.length2=parseInt(l[4],10)),a++;a<d.length;){var h=d[a].charAt(0);try{var f=decodeURI(d[a].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+f)}if(h=="-")u.diffs.push(new t.Diff(n,f));else if(h=="+")u.diffs.push(new t.Diff(r,f));else if(h==" ")u.diffs.push(new t.Diff(i,f));else{if(h=="@")break;if(h!=="")throw new Error('Invalid patch mode "'+h+'" in: '+f)}a++}}return s},t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},t.patch_obj.prototype.toString=function(){var o,s;this.length1===0?o=this.start1+",0":this.length1==1?o=this.start1+1:o=this.start1+1+","+this.length1,this.length2===0?s=this.start2+",0":this.length2==1?s=this.start2+1:s=this.start2+1+","+this.length2;for(var d=["@@ -"+o+" +"+s+` @@
|
||
`],a,c=0;c<this.diffs.length;c++){switch(this.diffs[c][0]){case r:a="+";break;case n:a="-";break;case i:a=" ";break}d[c+1]=a+encodeURI(this.diffs[c][1])+`
|
||
`}return d.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=r,e.exports.DIFF_EQUAL=i})(o2);var $O=o2.exports,TO=Be&&Be.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(ub,"__esModule",{value:!0});var Mt=lb,iS=z,AO=Xp,MO=$O,LO=function(e){TO(t,e);function t(n){var r=e.call(this,n)||this;return r.state={value:r.props.value},r.onChange=r.onChange.bind(r),r.diff=r.diff.bind(r),r}return t.prototype.componentDidUpdate=function(){var n=this.props.value;n!==this.state.value&&this.setState({value:n})},t.prototype.onChange=function(n){this.setState({value:n}),this.props.onChange&&this.props.onChange(n)},t.prototype.diff=function(){var n=new MO,r=this.state.value[0],i=this.state.value[1];if(r.length===0&&i.length===0)return[];var o=n.diff_main(r,i);n.diff_cleanupSemantic(o);var s=this.generateDiffedLines(o),d=this.setCodeMarkers(s);return d},t.prototype.generateDiffedLines=function(n){var r={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1},i={left:[],right:[]},o={left:1,right:1};return n.forEach(function(s){var d=s[0],a=s[1],c=a.split(`
|
||
`).length-1;if(a.length!==0){var l=a[0],u=a[a.length-1],h=0;switch(d){case r.DIFF_EQUAL:o.left+=c,o.right+=c;break;case r.DIFF_DELETE:l===`
|
||
`&&(o.left++,c--),h=c,h===0&&i.right.push({startLine:o.right,endLine:o.right}),u===`
|
||
`&&(h-=1),i.left.push({startLine:o.left,endLine:o.left+h}),o.left+=c;break;case r.DIFF_INSERT:l===`
|
||
`&&(o.right++,c--),h=c,h===0&&i.left.push({startLine:o.left,endLine:o.left}),u===`
|
||
`&&(h-=1),i.right.push({startLine:o.right,endLine:o.right+h}),o.right+=c;break;default:throw new Error("Diff type was not defined.")}}}),i},t.prototype.setCodeMarkers=function(n){n===void 0&&(n={left:[],right:[]});for(var r=[],i={left:[],right:[]},o=0;o<n.left.length;o++){var s={startRow:n.left[o].startLine-1,endRow:n.left[o].endLine,type:"text",className:"codeMarker"};i.left.push(s)}for(var o=0;o<n.right.length;o++){var s={startRow:n.right[o].startLine-1,endRow:n.right[o].endLine,type:"text",className:"codeMarker"};i.right.push(s)}return r[0]=i.left,r[1]=i.right,r},t.prototype.render=function(){var n=this.diff();return iS.createElement(AO.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:n})},t.propTypes={cursorStart:Mt.number,editorProps:Mt.object,enableBasicAutocompletion:Mt.bool,enableLiveAutocompletion:Mt.bool,focus:Mt.bool,fontSize:Mt.number,height:Mt.string,highlightActiveLine:Mt.bool,maxLines:Mt.number,minLines:Mt.number,mode:Mt.string,name:Mt.string,className:Mt.string,onLoad:Mt.func,onPaste:Mt.func,onScroll:Mt.func,onChange:Mt.func,orientation:Mt.string,readOnly:Mt.bool,scrollMargin:Mt.array,setOptions:Mt.object,showGutter:Mt.bool,showPrintMargin:Mt.bool,splits:Mt.number,style:Mt.object,tabSize:Mt.number,theme:Mt.string,value:Mt.array,width:Mt.string,wrapEnabled:Mt.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(iS.Component);ub.default=LO;Object.defineProperty(su,"__esModule",{value:!0});su.diff=su.split=void 0;var RO=sb,PO=ub;su.diff=PO.default;var IO=Xp;su.split=IO.default;var a2=su.default=RO.default,OO={exports:{}};(function(e,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,i){var o=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,d=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};o.inherits(d,s),r.JsonHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,i){var o=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(d,a){return/^\s+$/.test(d)?/^\s*\}/.test(a):!1},this.autoOutdent=function(d,a){var c=d.getLine(a),l=c.match(/^(\s*\})/);if(!l)return 0;var u=l[1].length,h=d.findMatchingBracket({row:a,column:u});if(!h||h.row==a)return 0;var f=this.$getIndent(d.getLine(h.row));d.replace(new o(a,0,a,u-1),f)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,i){var o=n("../../lib/oop"),s=n("../../range").Range,d=n("./fold_mode").FoldMode,a=r.FoldMode=function(c){c&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+c.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+c.end)))};o.inherits(a,d),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(c,l,u){var h=c.getLine(u);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var f=this._getFoldWidgetBase(c,l,u);return!f&&this.startRegionRe.test(h)?"start":f},this.getFoldWidgetRange=function(c,l,u,h){var f=c.getLine(u);if(this.startRegionRe.test(f))return this.getCommentRegionBlock(c,f,u);var b=f.match(this.foldingStartMarker);if(b){var p=b.index;if(b[1])return this.openingBracketBlock(c,b[1],u,p);var g=c.getCommentFoldRange(u,p+b[0].length,1);return g&&!g.isMultiLine()&&(h?g=this.getSectionRange(c,u):l!="all"&&(g=null)),g}if(l!=="markbegin"){var b=f.match(this.foldingStopMarker);if(b){var p=b.index+b[0].length;return b[1]?this.closingBracketBlock(c,b[1],u,p):c.getCommentFoldRange(u,p,-1)}}},this.getSectionRange=function(c,l){var u=c.getLine(l),h=u.search(/\S/),f=l,p=u.length;l=l+1;for(var g=l,b=c.getLength();++l<b;){u=c.getLine(l);var x=u.search(/\S/);if(x!==-1){if(h>x)break;var S=this.getFoldWidgetRange(c,"all",l);if(S){if(S.start.row<=f)break;if(S.isMultiLine())l=S.end.row;else if(h==x)break}g=l}}return new s(f,p,g,c.getLine(g).length)},this.getCommentRegionBlock=function(c,l,u){for(var h=l.search(/\s*$/),f=c.getLength(),p=u,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,b=1;++u<f;){l=c.getLine(u);var x=g.exec(l);if(x&&(x[1]?b--:b++,!b))break}var S=u;if(S>p)return new s(p,h,S,l.length)}}.call(a.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(n,r,i){var o=n("../lib/oop"),s=n("./text").Mode,d=n("./json_highlight_rules").JsonHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,c=n("./folding/cstyle").FoldMode,l=n("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=d,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new c};o.inherits(u,s),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(h,f,p){var g=this.$getIndent(f);if(h=="start"){var b=f.match(/^.*[\{\(\[]\s*$/);b&&(g+=p)}return g},this.checkOutdent=function(h,f,p){return this.$outdent.checkOutdent(f,p)},this.autoOutdent=function(h,f,p){this.$outdent.autoOutdent(f,p)},this.createWorker=function(h){var f=new l(["ace"],"ace/mode/json_worker","JsonWorker");return f.attachToDocument(h.getDocument()),f.on("annotate",function(p){h.setAnnotations(p.data)}),f.on("terminate",function(){h.clearAnnotations()}),f},this.$id="ace/mode/json"}.call(u.prototype),r.Mode=u}),function(){ace.require(["ace/mode/json"],function(n){e&&(e.exports=n)})}()})(OO);var FO={exports:{}};(function(e,t){ace.define("ace/theme/github_dark.css",["require","exports","module"],function(n,r,i){i.exports=`.ace-github-dark .ace_gutter {
|
||
background: #24292e;
|
||
color: #7388b5
|
||
}
|
||
|
||
.ace-github-dark .ace_print-margin {
|
||
width: 1px;
|
||
background: #00204b
|
||
}
|
||
|
||
.ace-github-dark {
|
||
background-color: #24292e;
|
||
color: #FFFFFF
|
||
}
|
||
|
||
.ace-github-dark .ace_constant.ace_other,
|
||
.ace-github-dark .ace_cursor {
|
||
color: #FFFFFF
|
||
}
|
||
|
||
.ace-github-dark .ace_marker-layer .ace_selection {
|
||
background: #003F8E
|
||
}
|
||
|
||
.ace-github-dark.ace_multiselect .ace_selection.ace_start {
|
||
box-shadow: 0 0 3px 0px #24292e;
|
||
}
|
||
|
||
.ace-github-dark .ace_marker-layer .ace_step {
|
||
background: rgb(127, 111, 19)
|
||
}
|
||
|
||
.ace-github-dark .ace_marker-layer .ace_bracket {
|
||
margin: -1px 0 0 -1px;
|
||
border: 1px solid #404F7D
|
||
}
|
||
|
||
.ace-github-dark .ace_marker-layer .ace_active-line {
|
||
background: #00346E
|
||
}
|
||
|
||
.ace-github-dark .ace_gutter-active-line {
|
||
background-color: #24292e
|
||
}
|
||
|
||
.ace-github-dark .ace_marker-layer .ace_selected-word {
|
||
border: 1px solid #003F8E
|
||
}
|
||
|
||
.ace-github-dark .ace_invisible {
|
||
color: #404F7D
|
||
}
|
||
|
||
.ace-github-dark .ace_keyword,
|
||
.ace-github-dark .ace_meta,
|
||
.ace-github-dark .ace_storage,
|
||
.ace-github-dark .ace_storage.ace_type,
|
||
.ace-github-dark .ace_support.ace_type {
|
||
color: #ff7b72
|
||
}
|
||
|
||
.ace-github-dark .ace_keyword.ace_operator {
|
||
color: #79c0ff
|
||
}
|
||
|
||
.ace-github-dark .ace_constant.ace_character,
|
||
.ace-github-dark .ace_constant.ace_language,
|
||
.ace-github-dark .ace_constant.ace_numeric,
|
||
.ace-github-dark .ace_keyword.ace_other.ace_unit,
|
||
.ace-github-dark .ace_support.ace_constant,
|
||
.ace-github-dark .ace_variable.ace_parameter {
|
||
color: #FFC58F
|
||
}
|
||
|
||
.ace-github-dark .ace_invalid {
|
||
color: #FFFFFF;
|
||
background-color: #F99DA5
|
||
}
|
||
|
||
.ace-github-dark .ace_invalid.ace_deprecated {
|
||
color: #FFFFFF;
|
||
background-color: #ff7b72
|
||
}
|
||
|
||
.ace-github-dark .ace_fold {
|
||
background-color: #BBDAFF;
|
||
border-color: #FFFFFF
|
||
}
|
||
|
||
.ace-github-dark .ace_entity.ace_name.ace_function,
|
||
.ace-github-dark .ace_support.ace_function,
|
||
.ace-github-dark .ace_variable {
|
||
color: #BBDAFF
|
||
}
|
||
|
||
.ace-github-dark .ace_support.ace_class,
|
||
.ace-github-dark .ace_support.ace_type {
|
||
color: #FFEEAD
|
||
}
|
||
|
||
.ace-github-dark .ace_heading,
|
||
.ace-github-dark .ace_markup.ace_heading,
|
||
.ace-github-dark .ace_string {
|
||
color: #9fcef6
|
||
}
|
||
|
||
.ace-github-dark .ace_entity.ace_name.ace_tag,
|
||
.ace-github-dark .ace_entity.ace_other.ace_attribute-name,
|
||
.ace-github-dark .ace_meta.ace_tag,
|
||
.ace-github-dark .ace_string.ace_regexp,
|
||
.ace-github-dark .ace_variable {
|
||
color: #FF9DA4
|
||
}
|
||
|
||
.ace-github-dark .ace_comment {
|
||
color: #7285B7
|
||
}
|
||
|
||
.ace-github-dark .ace_indent-guide {
|
||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y
|
||
}
|
||
|
||
.ace-github-dark .ace_indent-guide-active {
|
||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
||
}
|
||
|
||
.ace-github-dark .ace_constant.ace_buildin {
|
||
color: #0086B3;
|
||
}
|
||
|
||
.ace-github-dark .ace_variable.ace_language {
|
||
color: #ffffff;
|
||
}
|
||
`}),ace.define("ace/theme/github_dark",["require","exports","module","ace/theme/github_dark.css","ace/lib/dom"],function(n,r,i){r.isDark=!0,r.cssClass="ace-github-dark",r.cssText=n("./github_dark.css");var o=n("../lib/dom");o.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/github_dark"],function(n){e&&(e.exports=n)})}()})(FO);var DO={exports:{}};(function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(n,r,i){var o=n("./lib/dom"),s=n("./lib/oop"),d=n("./lib/event_emitter").EventEmitter,a=n("./lib/lang"),c=n("./range").Range,l=n("./range_list").RangeList,u=n("./keyboard/hash_handler").HashHandler,h=n("./tokenizer").Tokenizer,f=n("./clipboard"),p={CURRENT_WORD:function(w){return w.session.getTextRange(w.session.getWordRange())},SELECTION:function(w,y,m){var E=w.session.getTextRange();return m?E.replace(/\n\r?([ \t]*\S)/g,`
|
||
`+m+"$1"):E},CURRENT_LINE:function(w){return w.session.getLine(w.getCursorPosition().row)},PREV_LINE:function(w){return w.session.getLine(w.getCursorPosition().row-1)},LINE_INDEX:function(w){return w.getCursorPosition().row},LINE_NUMBER:function(w){return w.getCursorPosition().row+1},SOFT_TABS:function(w){return w.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(w){return w.session.getTabSize()},CLIPBOARD:function(w){return f.getText&&f.getText()},FILENAME:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0]},FILENAME_BASE:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(w){return this.FILEPATH(w).replace(/[^/\\]*$/,"")},FILEPATH:function(w){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(w){var y=w.session.$mode||{};return y.blockComment&&y.blockComment.start||""},BLOCK_COMMENT_END:function(w){var y=w.session.$mode||{};return y.blockComment&&y.blockComment.end||""},LINE_COMMENT:function(w){var y=w.session.$mode||{};return y.lineCommentStart||""},CURRENT_YEAR:g.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:g.bind(null,{year:"2-digit"}),CURRENT_MONTH:g.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:g.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:g.bind(null,{month:"short"}),CURRENT_DATE:g.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:g.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:g.bind(null,{weekday:"short"}),CURRENT_HOUR:g.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:g.bind(null,{minute:"2-digit"}),CURRENT_SECOND:g.bind(null,{second:"2-digit"})};p.SELECTED_TEXT=p.SELECTION;function g(w){var y=new Date().toLocaleString("en-us",w);return y.length==1?"0"+y:y}var b=function(){this.snippetMap={},this.snippetNameMap={}};(function(){s.implement(this,d),this.getTokenizer=function(){return b.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function y(A){return A=A.substr(1),/^\d+$/.test(A)?[{tabstopId:parseInt(A,10)}]:[{text:A}]}function m(A){return"(?:[^\\\\"+A+"]|\\\\.)"}var E={regex:"/("+m("/")+"+)/",onMatch:function(A,C,k){var I=k[0];return I.fmtString=!0,I.guard=A.slice(1,-1),I.flag="",""},next:"formatString"};return b.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(A,C,k){var I=A[1];return(I=="}"&&k.length||"`$\\".indexOf(I)!=-1)&&(A=I),[A]}},{regex:/}/,onMatch:function(A,C,k){return[k.length?k.shift():A]}},{regex:/\$(?:\d+|\w+)/,onMatch:y},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(A,C,k){var I=y(A.substr(1));return k.unshift(I[0]),I},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+m("\\|")+"*\\|",onMatch:function(A,C,k){var I=A.slice(1,-1).replace(/\\[,|\\]|,/g,function(R){return R.length==2?R[1]:"\0"}).split("\0").map(function(R){return{value:R}});return k[0].choices=I,[I[0]]},next:"start"},E,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(A,C,k){return k.length&&k[0].expectElse?(k[0].expectElse=!1,k[0].ifEnd={elseEnd:k[0]},[k[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(A,C,k){var I=A[1];return I=="}"&&k.length||"`$\\".indexOf(I)!=-1?A=I:I=="n"?A=`
|
||
`:I=="t"?A=" ":"ulULE".indexOf(I)!=-1&&(A={changeCase:I,local:I>"a"}),[A]}},{regex:"/\\w*}",onMatch:function(A,C,k){var I=k.shift();return I&&(I.flag=A.slice(1,-1)),this.next=I&&I.tabstopId?"start":"",[I||A]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(A,C,k){return[{text:A.slice(1)}]}},{regex:/\${\w+/,onMatch:function(A,C,k){var I={text:A.slice(2)};return k.unshift(I),[I]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(A,C,k){var I=k.shift();return this.next=I&&I.tabstopId?"start":"",[I||A]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(A,C,k){var I=k[0];return I.formatFunction=A.slice(2,-1),[k.shift()]},next:"formatString"},E,{regex:/:[\?\-+]?/,onMatch:function(A,C,k){A[1]=="+"&&(k[0].ifEnd=k[0]),A[1]=="?"&&(k[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),b.$tokenizer},this.tokenizeTmSnippet=function(y,m){return this.getTokenizer().getLineTokens(y,m).tokens.map(function(E){return E.value||E})},this.getVariableValue=function(y,m,E){if(/^\d+$/.test(m))return(this.variables.__||{})[m]||"";if(/^[A-Z]\d+$/.test(m))return(this.variables[m[0]+"__"]||{})[m.substr(1)]||"";if(m=m.replace(/^TM_/,""),!this.variables.hasOwnProperty(m))return"";var A=this.variables[m];return typeof A=="function"&&(A=this.variables[m](y,m,E)),A??""},this.variables=p,this.tmStrFormat=function(y,m,E){if(!m.fmt)return y;var A=m.flag||"",C=m.guard;C=new RegExp(C,A.replace(/[^gim]/g,""));var k=typeof m.fmt=="string"?this.tokenizeTmSnippet(m.fmt,"formatString"):m.fmt,I=this,R=y.replace(C,function(){var M=I.variables.__;I.variables.__=[].slice.call(arguments);for(var O=I.resolveVariables(k,E),P="E",N=0;N<O.length;N++){var B=O[N];if(typeof B=="object")if(O[N]="",B.changeCase&&B.local){var W=O[N+1];W&&typeof W=="string"&&(B.changeCase=="u"?O[N]=W[0].toUpperCase():O[N]=W[0].toLowerCase(),O[N+1]=W.substr(1))}else B.changeCase&&(P=B.changeCase);else P=="U"?O[N]=B.toUpperCase():P=="L"&&(O[N]=B.toLowerCase())}return I.variables.__=M,O.join("")});return R},this.tmFormatFunction=function(y,m,E){return m.formatFunction=="upcase"?y.toUpperCase():m.formatFunction=="downcase"?y.toLowerCase():y},this.resolveVariables=function(y,m){for(var E=[],A="",C=!0,k=0;k<y.length;k++){var I=y[k];if(typeof I=="string"){E.push(I),I==`
|
||
`?(C=!0,A=""):C&&(A=/^\t*/.exec(I)[0],C=/\S/.test(I));continue}if(I){if(C=!1,I.fmtString){var R=y.indexOf(I,k+1);R==-1&&(R=y.length),I.fmt=y.slice(k+1,R),k=R}if(I.text){var M=this.getVariableValue(m,I.text,A)+"";I.fmtString&&(M=this.tmStrFormat(M,I,m)),I.formatFunction&&(M=this.tmFormatFunction(M,I,m)),M&&!I.ifEnd?(E.push(M),O(I)):!M&&I.ifEnd&&O(I.ifEnd)}else I.elseEnd?O(I.elseEnd):(I.tabstopId!=null||I.changeCase!=null)&&E.push(I)}}function O(P){var N=y.indexOf(P,k+1);N!=-1&&(k=N)}return E};var w=function(y,m,E){E===void 0&&(E={});var A=y.getCursorPosition(),C=y.session.getLine(A.row),k=y.session.getTabString(),I=C.match(/^\s*/)[0];A.column<I.length&&(I=I.slice(0,A.column)),m=m.replace(/\r/g,"");var R=this.tokenizeTmSnippet(m);R=this.resolveVariables(R,y),R=R.map(function(ie){return ie==`
|
||
`&&!E.excludeExtraIndent?ie+I:typeof ie=="string"?ie.replace(/\t/g,k):ie});var M=[];R.forEach(function(ie,ce){if(typeof ie=="object"){var he=ie.tabstopId,ve=M[he];if(ve||(ve=M[he]=[],ve.index=he,ve.value="",ve.parents={}),ve.indexOf(ie)===-1){ie.choices&&!ve.choices&&(ve.choices=ie.choices),ve.push(ie);var Ce=R.indexOf(ie,ce+1);if(Ce!==-1){var _e=R.slice(ce+1,Ce),Re=_e.some(function(ot){return typeof ot=="object"});Re&&!ve.value?ve.value=_e:_e.length&&(!ve.value||typeof ve.value!="string")&&(ve.value=_e.join(""))}}}}),M.forEach(function(ie){ie.length=0});var O={};function P(ie){for(var ce=[],he=0;he<ie.length;he++){var ve=ie[he];if(typeof ve=="object"){if(O[ve.tabstopId])continue;var Ce=ie.lastIndexOf(ve,he-1);ve=ce[Ce]||{tabstopId:ve.tabstopId}}ce[he]=ve}return ce}for(var N=0;N<R.length;N++){var B=R[N];if(typeof B=="object"){var W=B.tabstopId,K=M[W],q=R.indexOf(B,N+1);if(O[W]){O[W]===B&&(delete O[W],Object.keys(O).forEach(function(ie){K.parents[ie]=!0}));continue}O[W]=B;var re=K.value;typeof re!="string"?re=P(re):B.fmt&&(re=this.tmStrFormat(re,B,y)),R.splice.apply(R,[N+1,Math.max(0,q-N)].concat(re,B)),K.indexOf(B)===-1&&K.push(B)}}var Y=0,Z=0,te="";return R.forEach(function(ie){if(typeof ie=="string"){var ce=ie.split(`
|
||
`);ce.length>1?(Z=ce[ce.length-1].length,Y+=ce.length-1):Z+=ie.length,te+=ie}else ie&&(ie.start?ie.end={row:Y,column:Z}:ie.start={row:Y,column:Z})}),{text:te,tabstops:M,tokens:R}};this.getDisplayTextForSnippet=function(y,m){var E=w.call(this,y,m);return E.text},this.insertSnippetForSelection=function(y,m,E){E===void 0&&(E={});var A=w.call(this,y,m,E),C=y.getSelectionRange();E.range&&E.range.compareRange(C)===0&&(C=E.range);var k=y.session.replace(C,A.text),I=new x(y),R=y.inVirtualSelectionMode&&y.selection.index;I.addTabstops(A.tabstops,C.start,k,R)},this.insertSnippet=function(y,m,E){E===void 0&&(E={});var A=this;if(E.range&&!(E.range instanceof c)&&(E.range=c.fromPoints(E.range.start,E.range.end)),y.inVirtualSelectionMode)return A.insertSnippetForSelection(y,m,E);y.forEachSelection(function(){A.insertSnippetForSelection(y,m,E)},null,{keepOrder:!0}),y.tabstopManager&&y.tabstopManager.tabNext()},this.$getScope=function(y){var m=y.session.$mode.$id||"";if(m=m.split("/").pop(),m==="html"||m==="php"){m==="php"&&!y.session.$mode.inlinePhp&&(m="html");var E=y.getCursorPosition(),A=y.session.getState(E.row);typeof A=="object"&&(A=A[0]),A.substring&&(A.substring(0,3)=="js-"?m="javascript":A.substring(0,4)=="css-"?m="css":A.substring(0,4)=="php-"&&(m="php"))}return m},this.getActiveScopes=function(y){var m=this.$getScope(y),E=[m],A=this.snippetMap;return A[m]&&A[m].includeScopes&&E.push.apply(E,A[m].includeScopes),E.push("_"),E},this.expandWithTab=function(y,m){var E=this,A=y.forEachSelection(function(){return E.expandSnippetForSelection(y,m)},null,{keepOrder:!0});return A&&y.tabstopManager&&y.tabstopManager.tabNext(),A},this.expandSnippetForSelection=function(y,m){var E=y.getCursorPosition(),A=y.session.getLine(E.row),C=A.substring(0,E.column),k=A.substr(E.column),I=this.snippetMap,R;return this.getActiveScopes(y).some(function(M){var O=I[M];return O&&(R=this.findMatchingSnippet(O,C,k)),!!R},this),R?(m&&m.dryRun||(y.session.doc.removeInLine(E.row,E.column-R.replaceBefore.length,E.column+R.replaceAfter.length),this.variables.M__=R.matchBefore,this.variables.T__=R.matchAfter,this.insertSnippetForSelection(y,R.content),this.variables.M__=this.variables.T__=null),!0):!1},this.findMatchingSnippet=function(y,m,E){for(var A=y.length;A--;){var C=y[A];if(!(C.startRe&&!C.startRe.test(m))&&!(C.endRe&&!C.endRe.test(E))&&!(!C.startRe&&!C.endRe))return C.matchBefore=C.startRe?C.startRe.exec(m):[""],C.matchAfter=C.endRe?C.endRe.exec(E):[""],C.replaceBefore=C.triggerRe?C.triggerRe.exec(m)[0]:"",C.replaceAfter=C.endTriggerRe?C.endTriggerRe.exec(E)[0]:"",C}},this.snippetMap={},this.snippetNameMap={},this.register=function(y,m){var E=this.snippetMap,A=this.snippetNameMap,C=this;y||(y=[]);function k(M){return M&&!/^\^?\(.*\)\$?$|^\\b$/.test(M)&&(M="(?:"+M+")"),M||""}function I(M,O,P){return M=k(M),O=k(O),P?(M=O+M,M&&M[M.length-1]!="$"&&(M=M+"$")):(M=M+O,M&&M[0]!="^"&&(M="^"+M)),new RegExp(M)}function R(M){M.scope||(M.scope=m||"_"),m=M.scope,E[m]||(E[m]=[],A[m]={});var O=A[m];if(M.name){var P=O[M.name];P&&C.unregister(P),O[M.name]=M}E[m].push(M),M.prefix&&(M.tabTrigger=M.prefix),!M.content&&M.body&&(M.content=Array.isArray(M.body)?M.body.join(`
|
||
`):M.body),M.tabTrigger&&!M.trigger&&(!M.guard&&/^\w/.test(M.tabTrigger)&&(M.guard="\\b"),M.trigger=a.escapeRegExp(M.tabTrigger)),!(!M.trigger&&!M.guard&&!M.endTrigger&&!M.endGuard)&&(M.startRe=I(M.trigger,M.guard,!0),M.triggerRe=new RegExp(M.trigger),M.endRe=I(M.endTrigger,M.endGuard,!0),M.endTriggerRe=new RegExp(M.endTrigger))}Array.isArray(y)?y.forEach(R):Object.keys(y).forEach(function(M){R(y[M])}),this._signal("registerSnippets",{scope:m})},this.unregister=function(y,m){var E=this.snippetMap,A=this.snippetNameMap;function C(k){var I=A[k.scope||m];if(I&&I[k.name]){delete I[k.name];var R=E[k.scope||m],M=R&&R.indexOf(k);M>=0&&R.splice(M,1)}}y.content?C(y):Array.isArray(y)&&y.forEach(C)},this.parseSnippetFile=function(y){y=y.replace(/\r/g,"");for(var m=[],E={},A=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,C;C=A.exec(y);){if(C[1])try{E=JSON.parse(C[1]),m.push(E)}catch{}if(C[4])E.content=C[4].replace(/^\t/gm,""),m.push(E),E={};else{var k=C[2],I=C[3];if(k=="regex"){var R=/\/((?:[^\/\\]|\\.)*)|$/g;E.guard=R.exec(I)[1],E.trigger=R.exec(I)[1],E.endTrigger=R.exec(I)[1],E.endGuard=R.exec(I)[1]}else k=="snippet"?(E.tabTrigger=I.match(/^\S*/)[0],E.name||(E.name=I)):k&&(E[k]=I)}}return m},this.getSnippetByName=function(y,m){var E=this.snippetNameMap,A;return this.getActiveScopes(m).some(function(C){var k=E[C];return k&&(A=k[y]),!!A},this),A}}).call(b.prototype);var x=function(w){if(w.tabstopManager)return w.tabstopManager;w.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(w)};(function(){this.attach=function(w){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=w,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(w){for(var y=w.action[0]=="r",m=this.selectedTabstop||{},E=m.parents||{},A=(this.tabstops||[]).slice(),C=0;C<A.length;C++){var k=A[C],I=k==m||E[k.index];if(k.rangeList.$bias=I?0:1,w.action=="remove"&&k!==m){var R=k.parents&&k.parents[m.index],M=k.rangeList.pointIndex(w.start,R);M=M<0?-M-1:M+1;var O=k.rangeList.pointIndex(w.end,R);O=O<0?-O-1:O-1;for(var P=k.rangeList.ranges.slice(M,O),N=0;N<P.length;N++)this.removeRange(P[N])}k.rangeList.$onChange(w)}var B=this.editor.session;!this.$inChange&&y&&B.getLength()==1&&!B.getValue()&&this.detach()},this.updateLinkedFields=function(){var w=this.selectedTabstop;if(!(!w||!w.hasLinkedRanges||!w.firstNonLinked)){this.$inChange=!0;for(var y=this.editor.session,m=y.getTextRange(w.firstNonLinked),E=0;E<w.length;E++){var A=w[E];if(A.linked){var C=A.original,k=r.snippetManager.tmStrFormat(m,C,this.editor);y.replace(A,k)}}this.$inChange=!1}},this.onAfterExec=function(w){w.command&&!w.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var w=this.editor.selection.lead,y=this.editor.selection.anchor,m=this.editor.selection.isEmpty(),E=0;E<this.ranges.length;E++)if(!this.ranges[E].linked){var A=this.ranges[E].contains(w.row,w.column),C=m||this.ranges[E].contains(y.row,y.column);if(A&&C)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(w){var y=this.tabstops.length,m=this.index+(w||1);m=Math.min(Math.max(m,1),y),m==y&&(m=0),this.selectTabstop(m),m===0&&this.detach()},this.selectTabstop=function(w){this.$openTabstops=null;var y=this.tabstops[this.index];if(y&&this.addTabstopMarkers(y),this.index=w,y=this.tabstops[this.index],!(!y||!y.length)){this.selectedTabstop=y;var m=y.firstNonLinked||y;if(y.choices&&(m.cursor=m.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(m);else{var E=this.editor.multiSelect;E.toSingleRange(m);for(var A=0;A<y.length;A++)y.hasLinkedRanges&&y[A].linked||E.addRange(y[A].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},this.addTabstops=function(w,y,m){var E=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!w[0]){var A=c.fromPoints(m,m);T(A.start,y),T(A.end,y),w[0]=[A],w[0].index=0}var C=this.index,k=[C+1,0],I=this.ranges;w.forEach(function(R,M){for(var O=this.$openTabstops[M]||R,P=0;P<R.length;P++){var N=R[P],B=c.fromPoints(N.start,N.end||N.start);S(B.start,y),S(B.end,y),B.original=N,B.tabstop=O,I.push(B),O!=R?O.unshift(B):O[P]=B,N.fmtString||O.firstNonLinked&&E?(B.linked=!0,O.hasLinkedRanges=!0):O.firstNonLinked||(O.firstNonLinked=B)}O.firstNonLinked||(O.hasLinkedRanges=!1),O===R&&(k.push(O),this.$openTabstops[M]=O),this.addTabstopMarkers(O),O.rangeList=O.rangeList||new l,O.rangeList.$bias=0,O.rangeList.addList(O)},this),k.length>2&&(this.tabstops.length&&k.push(k.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,k))},this.addTabstopMarkers=function(w){var y=this.editor.session;w.forEach(function(m){m.markerId||(m.markerId=y.addMarker(m,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(w){var y=this.editor.session;w.forEach(function(m){y.removeMarker(m.markerId),m.markerId=null})},this.removeRange=function(w){var y=w.tabstop.indexOf(w);y!=-1&&w.tabstop.splice(y,1),y=this.ranges.indexOf(w),y!=-1&&this.ranges.splice(y,1),y=w.tabstop.rangeList.ranges.indexOf(w),y!=-1&&w.tabstop.splice(y,1),this.editor.session.removeMarker(w.markerId),w.tabstop.length||(y=this.tabstops.indexOf(w.tabstop),y!=-1&&this.tabstops.splice(y,1),this.tabstops.length||this.detach())},this.keyboardHandler=new u,this.keyboardHandler.bindKeys({Tab:function(w){r.snippetManager&&r.snippetManager.expandWithTab(w)||(w.tabstopManager.tabNext(1),w.renderer.scrollCursorIntoView())},"Shift-Tab":function(w){w.tabstopManager.tabNext(-1),w.renderer.scrollCursorIntoView()},Esc:function(w){w.tabstopManager.detach()}})}).call(x.prototype);var S=function(w,y){w.row==0&&(w.column+=y.column),w.row+=y.row},T=function(w,y){w.row==y.row&&(w.column-=y.column),w.row-=y.row};o.importCssString(`
|
||
.ace_snippet-marker {
|
||
-moz-box-sizing: border-box;
|
||
box-sizing: border-box;
|
||
background: rgba(194, 193, 208, 0.09);
|
||
border: 1px dotted rgba(211, 208, 235, 0.62);
|
||
position: absolute;
|
||
}`,"snippets.css",!1),r.snippetManager=new b;var v=n("./editor").Editor;(function(){this.insertSnippet=function(w,y){return r.snippetManager.insertSnippet(this,w,y)},this.expandSnippet=function(w){return r.snippetManager.expandWithTab(this,w)}}).call(v.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config"],function(n,r,i){var o=n("../virtual_renderer").VirtualRenderer,s=n("../editor").Editor,d=n("../range").Range,a=n("../lib/event"),c=n("../lib/lang"),l=n("../lib/dom"),u=n("../config").nls,h=function(g){return"suggest-aria-id:".concat(g)},f=function(g){var b=new o(g);b.$maxLines=4;var x=new s(b);return x.setHighlightActiveLine(!1),x.setShowPrintMargin(!1),x.renderer.setShowGutter(!1),x.renderer.setHighlightGutterLine(!1),x.$mouseHandler.$focusTimeout=0,x.$highlightTagPending=!0,x},p=function(){function g(b){var x=l.createElement("div"),S=new f(x);b&&b.appendChild(x),x.style.display="none",S.renderer.content.style.cursor="default",S.renderer.setStyle("ace_autocomplete"),S.renderer.container.setAttribute("role","listbox"),S.renderer.container.setAttribute("aria-label",u("Autocomplete suggestions")),S.setOption("displayIndentGuides",!1),S.setOption("dragDelay",150);var T=function(){};S.focus=T,S.$isFocused=!0,S.renderer.$cursorLayer.restartTimer=T,S.renderer.$cursorLayer.element.style.opacity=0,S.renderer.$maxLines=8,S.renderer.$keepTextAreaAtCursor=!1,S.setHighlightActiveLine(!1),S.session.highlight(""),S.session.$searchHighlight.clazz="ace_highlight-marker",S.on("mousedown",function(C){var k=C.getDocumentPosition();S.selection.moveToPosition(k),y.start.row=y.end.row=k.row,C.stop()});var v,w=new d(-1,0,-1,1/0),y=new d(-1,0,-1,1/0);y.id=S.session.addMarker(y,"ace_active-line","fullLine"),S.setSelectOnHover=function(C){C?w.id&&(S.session.removeMarker(w.id),w.id=null):w.id=S.session.addMarker(w,"ace_line-hover","fullLine")},S.setSelectOnHover(!1),S.on("mousemove",function(C){if(!v){v=C;return}if(!(v.x==C.x&&v.y==C.y)){v=C,v.scrollTop=S.renderer.scrollTop;var k=v.getDocumentPosition().row;w.start.row!=k&&(w.id||S.setRow(k),E(k))}}),S.renderer.on("beforeRender",function(){if(v&&w.start.row!=-1){v.$pos=null;var C=v.getDocumentPosition().row;w.id||S.setRow(C),E(C,!0)}}),S.renderer.on("afterRender",function(){var C=S.getRow(),k=S.renderer.$textLayer,I=k.element.childNodes[C-k.config.firstRow],R=document.activeElement;if(I!==k.selectedNode&&k.selectedNode&&(l.removeCssClass(k.selectedNode,"ace_selected"),R.removeAttribute("aria-activedescendant"),k.selectedNode.removeAttribute("id")),k.selectedNode=I,I){l.addCssClass(I,"ace_selected");var M=h(C);I.id=M,S.renderer.container.setAttribute("aria-activedescendant",M),R.setAttribute("aria-activedescendant",M),I.setAttribute("role","option"),I.setAttribute("aria-label",S.getData(C).value),I.setAttribute("aria-setsize",S.data.length),I.setAttribute("aria-posinset",C)}});var m=function(){E(-1)},E=function(C,k){C!==w.start.row&&(w.start.row=w.end.row=C,k||S.session._emit("changeBackMarker"),S._emit("changeHoverMarker"))};S.getHoveredRow=function(){return w.start.row},a.addListener(S.container,"mouseout",m),S.on("hide",m),S.on("changeSelection",m),S.session.doc.getLength=function(){return S.data.length},S.session.doc.getLine=function(C){var k=S.data[C];return typeof k=="string"?k:k&&k.value||""};var A=S.session.bgTokenizer;return A.$tokenizeRow=function(C){var k=S.data[C],I=[];if(!k)return I;typeof k=="string"&&(k={value:k});var R=k.caption||k.value||k.name;function M(re,Y){re&&I.push({type:(k.className||"")+(Y||""),value:re})}for(var O=R.toLowerCase(),P=(S.filterText||"").toLowerCase(),N=0,B=0,W=0;W<=P.length;W++)if(W!=B&&(k.matchMask&1<<W||W==P.length)){var K=P.slice(B,W);B=W;var q=O.indexOf(K,N);if(q==-1)continue;M(R.slice(N,q),""),N=q+K.length,M(R.slice(q,N),"completion-highlight")}return M(R.slice(N,R.length),""),I.push({type:"completion-spacer",value:" "}),k.meta&&I.push({type:"completion-meta",value:k.meta}),k.message&&I.push({type:"completion-message",value:k.message}),I},A.$updateOnChange=T,A.start=T,S.session.$computeWidth=function(){return this.screenWidth=0},S.isOpen=!1,S.isTopdown=!1,S.autoSelect=!0,S.filterText="",S.data=[],S.setData=function(C,k){S.filterText=k||"",S.setValue(c.stringRepeat(`
|
||
`,C.length),-1),S.data=C||[],S.setRow(0)},S.getData=function(C){return S.data[C]},S.getRow=function(){return y.start.row},S.setRow=function(C){C=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,C)),y.start.row!=C&&(S.selection.clearSelection(),y.start.row=y.end.row=C||0,S.session._emit("changeBackMarker"),S.moveCursorTo(C||0,0),S.isOpen&&S._signal("select"))},S.on("changeSelection",function(){S.isOpen&&S.setRow(S.selection.lead.row),S.renderer.scrollCursorIntoView()}),S.hide=function(){this.container.style.display="none",S.anchorPos=null,S.anchor=null,S.isOpen&&(S.isOpen=!1,this._signal("hide"))},S.tryShow=function(C,k,I,R){if(!R&&S.isOpen&&S.anchorPos&&S.anchor&&S.anchorPos.top===C.top&&S.anchorPos.left===C.left&&S.anchor===I)return!0;var M=this.container,O=window.innerHeight,P=window.innerWidth,N=this.renderer,B=N.$maxLines*k*1.4,W={top:0,bottom:0,left:0},K=O-C.top-3*this.$borderSize-k,q=C.top-3*this.$borderSize;I||(q<=K||K>=B?I="bottom":I="top"),I==="top"?(W.bottom=C.top-this.$borderSize,W.top=W.bottom-B):I==="bottom"&&(W.top=C.top+k+this.$borderSize,W.bottom=W.top+B);var re=W.top>=0&&W.bottom<=O;if(!R&&!re)return!1;re?N.$maxPixelHeight=null:I==="top"?N.$maxPixelHeight=q:N.$maxPixelHeight=K,I==="top"?(M.style.top="",M.style.bottom=O-W.bottom+"px",S.isTopdown=!1):(M.style.top=W.top+"px",M.style.bottom="",S.isTopdown=!0),M.style.display="";var Y=C.left;return Y+M.offsetWidth>P&&(Y=P-M.offsetWidth),M.style.left=Y+"px",M.style.right="",S.isOpen||(S.isOpen=!0,this._signal("show"),v=null),S.anchorPos=C,S.anchor=I,!0},S.show=function(C,k,I){this.tryShow(C,k,I?"bottom":void 0,!0)},S.goTo=function(C){var k=this.getRow(),I=this.session.getLength()-1;switch(C){case"up":k=k<=0?I:k-1;break;case"down":k=k>=I?-1:k+1;break;case"start":k=0;break;case"end":k=I;break}this.setRow(k)},S.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},S.$imageSize=0,S.$borderSize=1,S}return g}();l.importCssString(`
|
||
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
||
background-color: #CAD6FA;
|
||
z-index: 1;
|
||
}
|
||
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
||
background-color: #3a674e;
|
||
}
|
||
.ace_editor.ace_autocomplete .ace_line-hover {
|
||
border: 1px solid #abbffe;
|
||
margin-top: -1px;
|
||
background: rgba(233,233,253,0.4);
|
||
position: absolute;
|
||
z-index: 2;
|
||
}
|
||
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
||
border: 1px solid rgba(109, 150, 13, 0.8);
|
||
background: rgba(58, 103, 78, 0.62);
|
||
}
|
||
.ace_completion-meta {
|
||
opacity: 0.5;
|
||
margin: 0 0.9em;
|
||
}
|
||
.ace_completion-message {
|
||
color: blue;
|
||
}
|
||
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
||
color: #2d69c7;
|
||
}
|
||
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
||
color: #93ca12;
|
||
}
|
||
.ace_editor.ace_autocomplete {
|
||
width: 300px;
|
||
z-index: 200000;
|
||
border: 1px lightgray solid;
|
||
position: fixed;
|
||
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||
line-height: 1.4;
|
||
background: #fefefe;
|
||
color: #111;
|
||
}
|
||
.ace_dark.ace_editor.ace_autocomplete {
|
||
border: 1px #484747 solid;
|
||
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
||
line-height: 1.4;
|
||
background: #25282c;
|
||
color: #c1c1c1;
|
||
}
|
||
.ace_autocomplete_right .ace_text-layer {
|
||
width: calc(100% - 8px);
|
||
}
|
||
.ace_autocomplete_right .ace_line {
|
||
display: flex;
|
||
}
|
||
.ace_autocomplete_right .ace_completion-spacer {
|
||
flex: 1;
|
||
}
|
||
`,"autocompletion.css",!1),r.AcePopup=p,r.$singleLineEditor=f,r.getAriaId=h}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets"],function(n,r,i){var o=n("../snippets").snippetManager,s=function(){function d(){this.editor=null}return d.prototype.show=function(a,c,l){if(l=l||"",a&&this.editor&&this.editor!==a&&(this.hide(),this.editor=null),!a||!c)return!1;var u=c.snippet?o.getDisplayTextForSnippet(a,c.snippet):c.value;return!u||!u.startsWith(l)?!1:(this.editor=a,u=u.slice(l.length),u===""?a.removeGhostText():a.setGhostText(u),!0)},d.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},d.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},d.prototype.destroy=function(){this.hide(),this.editor=null},d}();r.AceInline=s}),ace.define("ace/autocomplete/util",["require","exports","module"],function(n,r,i){r.parForEach=function(s,d,a){var c=0,l=s.length;l===0&&a();for(var u=0;u<l;u++)d(s[u],function(h,f){c++,c===l&&a(h,f)})};var o=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(s,d,a){a=a||o;for(var c=[],l=d-1;l>=0&&a.test(s[l]);l--)c.push(s[l]);return c.reverse().join("")},r.retrieveFollowingIdentifier=function(s,d,a){a=a||o;for(var c=[],l=d;l<s.length&&a.test(s[l]);l++)c.push(s[l]);return c},r.getCompletionPrefix=function(s){var d=s.getCursorPosition(),a=s.session.getLine(d.row),c;return s.completers.forEach(function(l){l.identifierRegexps&&l.identifierRegexps.forEach(function(u){!c&&u&&(c=this.retrievePrecedingIdentifier(a,d.column,u))}.bind(this))}.bind(this)),c||this.retrievePrecedingIdentifier(a,d.column)},r.triggerAutocomplete=function(s){var d=s.getCursorPosition(),a=s.session.getLine(d.row),c=d.column===0?0:d.column-1,l=a[c];return s.completers.some(function(u){if(u.triggerCharacters&&Array.isArray(u.triggerCharacters))return u.triggerCharacters.includes(l)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],function(n,r,i){var o=n("./keyboard/hash_handler").HashHandler,s=n("./autocomplete/popup").AcePopup,d=n("./autocomplete/inline").AceInline,a=n("./autocomplete/popup").getAriaId,c=n("./autocomplete/util"),l=n("./lib/lang"),u=n("./lib/dom"),h=n("./snippets").snippetManager,f=n("./config"),p=function(S,T){T.completer&&T.completer.destroy()},g=function(){function S(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new o,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=l.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=l.delayedCall(this.updateDocTooltip.bind(this),50)}return S.prototype.$init=function(){return this.popup=new s(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(T){this.insertMatch(),T.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupChange.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},S.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new d,this.inlineRenderer},S.prototype.getPopup=function(){return this.popup||this.$init()},S.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip()},S.prototype.$onPopupChange=function(T){if(this.inlineRenderer&&this.inlineEnabled){var v=T?null:this.popup.getData(this.popup.getRow()),w=c.getCompletionPrefix(this.editor);this.inlineRenderer.show(this.editor,v,w)||this.inlineRenderer.hide(),this.$updatePopupPosition()}this.tooltipTimer.call(null,null)},S.prototype.$updatePopupPosition=function(){var T=this.editor,v=T.renderer,w=v.layerConfig.lineHeight,y=v.$cursorLayer.getPixelPosition(this.base,!0);y.left-=this.popup.getTextLeftOffset();var m=T.container.getBoundingClientRect();y.top+=m.top-v.layerConfig.offset,y.left+=m.left-T.renderer.scrollLeft,y.left+=v.gutterWidth;var E={top:y.top,left:y.left};v.$ghostText&&v.$ghostTextWidget&&this.base.row===v.$ghostText.position.row&&(E.top+=v.$ghostTextWidget.el.offsetHeight),!this.popup.tryShow(E,w,"bottom")&&(this.popup.tryShow(y,w,"top")||this.popup.show(y,w))},S.prototype.openPopup=function(T,v,w){this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:a(this.popup.getRow()),inline:this.inlineEnabled}),T.keyBinding.addKeyboardHandler(this.keyboardHandler),this.popup.setRow(this.autoSelect?0:-1),w?w&&!v&&this.detach():(this.popup.setTheme(T.getTheme()),this.popup.setFontSize(T.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel()},S.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null},S.prototype.changeListener=function(T){var v=this.editor.selection.lead;(v.row!=this.base.row||v.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},S.prototype.blurListener=function(T){var v=document.activeElement,w=this.editor.textInput.getElement(),y=T.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(T.relatedTarget),m=this.popup&&this.popup.container;v!=w&&v.parentNode!=m&&!y&&v!=this.tooltipNode&&T.relatedTarget!=w&&this.detach()},S.prototype.mousedownListener=function(T){this.detach()},S.prototype.mousewheelListener=function(T){this.detach()},S.prototype.goTo=function(T){this.popup.goTo(T)},S.prototype.insertMatch=function(T,v){if(T||(T=this.popup.getData(this.popup.getRow())),!T)return!1;if(T.value==="")return this.detach();var w=this.completions,y=this.getCompletionProvider().insertMatch(this.editor,T,w.filterText,v);return this.completions==w&&this.detach(),y},S.prototype.showPopup=function(T,v){this.editor&&this.detach(),this.activated=!0,this.editor=T,T.completer!=this&&(T.completer&&T.completer.detach(),T.completer=this),T.on("changeSelection",this.changeListener),T.on("blur",this.blurListener),T.on("mousedown",this.mousedownListener),T.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,v)},S.prototype.getCompletionProvider=function(){return this.completionProvider||(this.completionProvider=new b),this.completionProvider},S.prototype.gatherCompletions=function(T,v){return this.getCompletionProvider().gatherCompletions(T,v)},S.prototype.updateCompletions=function(T,v){if(T&&this.base&&this.completions){var y=this.editor.getCursorPosition(),m=this.editor.session.getTextRange({start:this.base,end:y});if(m==this.completions.filterText)return;if(this.completions.setFilter(m),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==m&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,m,T);return}if(v&&v.matches){var y=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(y.row,y.column),this.base.$insertRight=!0,this.completions=new x(v.matches),this.openPopup(this.editor,"",T)}var w=this.editor.getSession(),y=this.editor.getCursorPosition(),m=c.getCompletionPrefix(this.editor);this.base=w.doc.createAnchor(y.row,y.column-m.length),this.base.$insertRight=!0;var E={exactMatch:this.exactMatch};this.getCompletionProvider().provideCompletions(this.editor,E,function(A,C,k){var I=C.filtered,R=c.getCompletionPrefix(this.editor);if(k){if(!I.length){var M=!this.autoShown&&this.emptyMessage;if(typeof M=="function"&&(M=this.emptyMessage(R)),M){var O=[{caption:this.emptyMessage(R),value:""}];this.completions=new x(O),this.openPopup(this.editor,R,T);return}return this.detach()}if(I.length==1&&I[0].value==R&&!I[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&I.length==1)return this.insertMatch(I[0])}this.completions=C,this.openPopup(this.editor,R,T)}.bind(this))},S.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},S.prototype.updateDocTooltip=function(){var T=this.popup,v=T.data,w=v&&(v[T.getHoveredRow()]||v[T.getRow()]),y=null;if(!w||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var m=this.editor.completers.length,E=0;E<m;E++){var A=this.editor.completers[E];if(A.getDocTooltip&&w.completerId===A.id){y=A.getDocTooltip(w);break}}if(!y&&typeof w!="string"&&(y=w),typeof y=="string"&&(y={docText:y}),!y||!(y.docHTML||y.docText))return this.hideDocTooltip();this.showDocTooltip(y)},S.prototype.showDocTooltip=function(T){this.tooltipNode||(this.tooltipNode=u.createElement("div"),this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var v=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(v.isDark?"ace_dark ":"")+(v.cssClass||"");var w=this.tooltipNode;T.docHTML?w.innerHTML=T.docHTML:T.docText&&(w.textContent=T.docText),w.parentNode||this.popup.container.appendChild(this.tooltipNode);var y=this.popup,m=y.container.getBoundingClientRect();w.style.top=y.container.style.top,w.style.bottom=y.container.style.bottom,w.style.display="block",window.innerWidth-m.right<320?m.left<320?y.isTopdown?(w.style.top=m.bottom+"px",w.style.left=m.left+"px",w.style.right="",w.style.bottom=""):(w.style.top=y.container.offsetTop-w.offsetHeight+"px",w.style.left=m.left+"px",w.style.right="",w.style.bottom=""):(w.style.right=window.innerWidth-m.left+"px",w.style.left=""):(w.style.left=m.right+1+"px",w.style.right="")},S.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var T=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==T&&this.editor.focus(),this.tooltipNode=null,T.parentNode&&T.parentNode.removeChild(T)}},S.prototype.onTooltipClick=function(T){for(var v=T.target;v&&v!=this.tooltipNode;){if(v.nodeName=="A"&&v.href){v.rel="noreferrer",v.target="_blank";break}v=v.parentNode}},S.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var T=this.popup.container;T&&T.parentNode&&T.parentNode.removeChild(T)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",p),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},S}();g.prototype.commands={Up:function(S){S.completer.goTo("up")},Down:function(S){S.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(S){S.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(S){S.completer.goTo("end")},Esc:function(S){S.completer.detach()},Return:function(S){return S.completer.insertMatch()},"Shift-Return":function(S){S.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(S){var T=S.completer.insertMatch();if(!T&&!S.tabstopManager)S.completer.goTo("down");else return T},PageUp:function(S){S.completer.popup.gotoPageUp()},PageDown:function(S){S.completer.popup.gotoPageDown()}},g.for=function(S){return S.completer instanceof g||(S.completer&&(S.completer.destroy(),S.completer=null),f.get("sharedPopups")?(g.$sharedInstance||(g.$sharedInstance=new g),S.completer=g.$sharedInstance):(S.completer=new g,S.once("destroy",p))),S.completer},g.startCommand={name:"startAutocomplete",exec:function(S,T){var v=g.for(S);v.autoInsert=!1,v.autoSelect=!0,v.autoShown=!1,v.showPopup(S,T),v.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var b=function(){function S(){this.active=!0}return S.prototype.insertByIndex=function(T,v,w){return!this.completions||!this.completions.filtered?!1:this.insertMatch(T,this.completions.filtered[v],w)},S.prototype.insertMatch=function(T,v,w){if(!v)return!1;if(T.startOperation({command:{name:"insertMatch"}}),v.completer&&v.completer.insertMatch)v.completer.insertMatch(T,v);else{if(!this.completions)return!1;if(this.completions.filterText){var y;T.selection.getAllRanges?y=T.selection.getAllRanges():y=[T.getSelectionRange()];for(var m=0,E;E=y[m];m++)E.start.column-=this.completions.filterText.length,T.session.remove(E)}v.snippet?h.insertSnippet(T,v.snippet,{range:v.range}):this.$insertString(T,v),v.command&&v.command==="startAutocomplete"&&T.execCommand(v.command)}return T.endOperation(),!0},S.prototype.$insertString=function(T,v){var w=v.value||v;if(v.range){if(T.inVirtualSelectionMode)return T.session.replace(v.range,w);T.forEachSelection(function(){var y=T.getSelectionRange();v.range.compareRange(y)===0?T.session.replace(v.range,w):T.insert(w)},null,{keepOrder:!0})}else T.execCommand("insertstring",w)},S.prototype.gatherCompletions=function(T,v){var w=T.getSession(),y=T.getCursorPosition(),m=c.getCompletionPrefix(T),E=[],A=T.completers.length;return T.completers.forEach(function(C,k){C.getCompletions(T,w,y,m,function(I,R){!I&&R&&(E=E.concat(R)),v(null,{prefix:c.getCompletionPrefix(T),matches:E,finished:--A===0})})}),!0},S.prototype.provideCompletions=function(T,v,w){var y=function(C){var k=C.prefix,I=C.matches;this.completions=new x(I),v.exactMatch&&(this.completions.exactMatch=!0),v.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(k),(C.finished||this.completions.filtered.length)&&w(null,this.completions,C.finished)}.bind(this),m=!0,E=null;if(this.gatherCompletions(T,function(C,k){if(this.active){C&&(w(C,[],!0),this.detach());var I=k.prefix;if(I.indexOf(k.prefix)===0){if(m){E=k;return}y(k)}}}.bind(this)),m=!1,E){var A=E;E=null,y(A)}},S.prototype.detach=function(){this.active=!1},S}(),x=function(){function S(T,v){this.all=T,this.filtered=T,this.filterText=v||"",this.exactMatch=!1,this.ignoreCaption=!1}return S.prototype.setFilter=function(T){if(T.length>this.filterText&&T.lastIndexOf(this.filterText,0)===0)var v=this.filtered;else var v=this.all;this.filterText=T,v=this.filterCompletions(v,this.filterText),v=v.sort(function(y,m){return m.exactMatch-y.exactMatch||m.$score-y.$score||(y.caption||y.value).localeCompare(m.caption||m.value)});var w=null;v=v.filter(function(y){var m=y.snippet||y.caption||y.value;return m===w?!1:(w=m,!0)}),this.filtered=v},S.prototype.filterCompletions=function(T,v){var w=[],y=v.toUpperCase(),m=v.toLowerCase();e:for(var E=0,A;A=T[E];E++){var C=!this.ignoreCaption&&A.caption||A.value||A.snippet;if(C){var k=-1,I=0,R=0,M,O;if(this.exactMatch){if(v!==C.substr(0,v.length))continue e}else{var P=C.toLowerCase().indexOf(m);if(P>-1)R=P;else for(var N=0;N<v.length;N++){var B=C.indexOf(m[N],k+1),W=C.indexOf(y[N],k+1);if(M=B>=0&&(W<0||B<W)?B:W,M<0)continue e;O=M-k-1,O>0&&(k===-1&&(R+=10),R+=O,I=I|1<<N),k=M}}A.matchMask=I,A.exactMatch=R?0:1,A.$score=(A.score||0)-R,w.push(A)}}return w},S}();r.Autocomplete=g,r.CompletionProvider=b,r.FilteredList=x}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(n,r,i){var o=n("../range").Range,s=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function d(c,l){var u=c.getTextRange(o.fromPoints({row:0,column:0},l));return u.split(s).length-1}function a(c,l){var u=d(c,l),h=c.getValue().split(s),f=Object.create(null),p=h[u];return h.forEach(function(g,b){if(!(!g||g===p)){var x=Math.abs(u-b),S=h.length-x;f[g]?f[g]=Math.max(S,f[g]):f[g]=S}}),f}r.getCompletions=function(c,l,u,h,f){var p=a(l,u),g=Object.keys(p);f(null,g.map(function(b){return{caption:b,value:b,score:p[b],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(n,r,i){var o=n("../snippets").snippetManager,s=n("../autocomplete").Autocomplete,d=n("../config"),a=n("../lib/lang"),c=n("../autocomplete/util"),l=n("../autocomplete/text_completer"),u={getCompletions:function(w,y,m,E,A){if(y.$mode.completer)return y.$mode.completer.getCompletions(w,y,m,E,A);var C=w.session.getState(m.row),k=y.$mode.getCompletions(C,y,m,E);k=k.map(function(I){return I.completerId=u.id,I}),A(null,k)},id:"keywordCompleter"},h=function(w){var y={};return w.replace(/\${(\d+)(:(.*?))?}/g,function(m,E,A,C){return y[E]=C||""}).replace(/\$(\d+?)/g,function(m,E){return y[E]})},f={getCompletions:function(w,y,m,E,A){var C=[],k=y.getTokenAt(m.row,m.column);k&&k.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?C.push("html-tag"):C=o.getActiveScopes(w);var I=o.snippetMap,R=[];C.forEach(function(M){for(var O=I[M]||[],P=O.length;P--;){var N=O[P],B=N.name||N.tabTrigger;B&&R.push({caption:B,snippet:N.content,meta:N.tabTrigger&&!N.name?N.tabTrigger+"⇥ ":"snippet",completerId:f.id})}},this),A(null,R)},getDocTooltip:function(w){w.snippet&&!w.docHTML&&(w.docHTML=["<b>",a.escapeHTML(w.caption),"</b>","<hr></hr>",a.escapeHTML(h(w.snippet))].join(""))},id:"snippetCompleter"},p=[f,l,u];r.setCompleters=function(w){p.length=0,w&&p.push.apply(p,w)},r.addCompleter=function(w){p.push(w)},r.textCompleter=l,r.keyWordCompleter=u,r.snippetCompleter=f;var g={name:"expandSnippet",exec:function(w){return o.expandWithTab(w)},bindKey:"Tab"},b=function(w,y){x(y.session.$mode)},x=function(w){typeof w=="string"&&(w=d.$modes[w]),w&&(o.files||(o.files={}),S(w.$id,w.snippetFileId),w.modes&&w.modes.forEach(x))},S=function(w,y){!y||!w||o.files[w]||(o.files[w]={},d.loadModule(y,function(m){m&&(o.files[w]=m,!m.snippets&&m.snippetText&&(m.snippets=o.parseSnippetFile(m.snippetText)),o.register(m.snippets||[],m.scope),m.includeScopes&&(o.snippetMap[m.scope].includeScopes=m.includeScopes,m.includeScopes.forEach(function(E){x("ace/mode/"+E)})))}))},T=function(w){var y=w.editor,m=y.completer&&y.completer.activated;if(w.command.name==="backspace")m&&!c.getCompletionPrefix(y)&&y.completer.detach();else if(w.command.name==="insertstring"){var E=c.getCompletionPrefix(y),A=c.triggerAutocomplete(y);if((E||A)&&!m){var C=s.for(y);C.autoShown=!0,C.showPopup(y)}}},v=n("../editor").Editor;n("../config").defineOptions(v.prototype,"editor",{enableBasicAutocompletion:{set:function(w){w?(this.completers||(this.completers=Array.isArray(w)?w:p),this.commands.addCommand(s.startCommand)):this.commands.removeCommand(s.startCommand)},value:!1},enableLiveAutocompletion:{set:function(w){w?(this.completers||(this.completers=Array.isArray(w)?w:p),this.commands.on("afterExec",T)):this.commands.removeListener("afterExec",T)},value:!1},enableSnippets:{set:function(w){w?(this.commands.addCommand(g),this.on("changeMode",b),b(null,this)):(this.commands.removeCommand(g),this.off("changeMode",b))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(n){e&&(e.exports=n)})}()})(DO);const qi=z.createContext({images:[],setImages:()=>{},filteredImages:[],setFilteredImages:()=>{}});function NO({children:e}){const[t,n]=z.useState([]),[r,i]=z.useState([]),[o,s]=z.useState([]);z.useEffect(()=>{const u=[...new Set(o)];u.length!==o.length&&s(u)},[o]);const l={images:t,setImages:n,filteredImages:r,setFilteredImages:i,deleteImg:async(u,h)=>{const{path:f}=h;function p(){const g=t.filter(b=>b.path!==decodeURIComponent(f));n([...g])}if(u==="delete"){const g=await fetch(`/cozy-nest/image?path=${f}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),b=await g.json();Lt.debug("json",b),g.ok&&p()}else if(u==="archive"){const g=await fetch(`/cozy-nest/image?path=${f}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({archive:!0})}),b=await g.json();Lt.debug("json",b),g.ok&&p()}},updateExifInState:u=>{const{metadata:{exif:h,hash:f}}=u,p=t.map(g=>(g.hash===f&&(g.metadata.exif=h),g));n([...p])},getImage:u=>t.find(h=>h.hash===u),tags:o,setTags:s};return j.jsx(qi.Provider,{value:l,children:e})}ace.config.setModuleUrl("ace/mode/json_worker","cozy-nest-client/node_modules/ace-builds/src-noconflict/worker-json.js");function zO({onClose:e,visible:t,imageHash:n}){const[r,i]=z.useState({}),[o,s]=z.useState(""),[d,a]=z.useState(!1),{images:c,getImage:l}=z.useContext(qi),[u,h]=z.useState(l(n));z.useEffect(()=>{h(l(n))},[c,n]),z.useEffect(()=>{i(u.metadata.exif),s(JSON.stringify(u.metadata.exif,null,2)),a(!0)},[t,u]);const f=b=>{s(b);try{const x=JSON.parse(b);i(x),a(!0)}catch{a(!1)}},p=async()=>{if(!d)return;const b=u.path;await pb(b,r)},g=()=>{e()};return j.jsxs(j.Fragment,{children:[t&&j.jsx("div",{className:"ExifEditor backdrop",children:j.jsxs("div",{className:"container",children:[j.jsx("h1",{children:"Exif Editor"}),j.jsx(a2,{mode:"json",theme:"github_dark",showPrintMargin:!1,onChange:f,value:o,name:"ace-json-editor",editorProps:{$blockScrolling:!0},style:{width:"100%",height:"100%",zIndex:200},setOptions:{enableSnippets:!0,cursorStyle:"smooth",behavioursEnabled:!0,wrapBehavioursEnabled:!0,autoScrollEditorIntoView:!0,wrap:!0}}),j.jsx(wr,{disabled:!d,onClick:p,children:d?"Save":"Invalid JSON"}),j.jsx(wr,{onClick:()=>g(),children:"Close"})]})}),!t&&j.jsx("div",{})]})}async function pb(e,t){e.indexOf("%")!==-1&&(e=decodeURIComponent(e)),t["cozy-nest-tags"]&&t["cozy-nest-tags"].match(/^,+$/g)&&(t["cozy-nest-tags"]="");const r=await(await fetch("/cozy-nest/image-exif",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,data:t})})).json();Lt.debug("json",r)}const _m={save:pb,ExifEditor:zO};function BO(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]}function jO(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var HO=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(jO(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=BO(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),zn="-ms-",Gh="-moz-",$t="-webkit-",s2="comm",gb="rule",mb="decl",VO="@import",l2="@keyframes",WO="@layer",UO=Math.abs,Jp=String.fromCharCode,GO=Object.assign;function KO(e,t){return $n(e,0)^45?(((t<<2^$n(e,0))<<2^$n(e,1))<<2^$n(e,2))<<2^$n(e,3):0}function u2(e){return e.trim()}function qO(e,t){return(e=t.exec(e))?e[0]:e}function Tt(e,t,n){return e.replace(t,n)}function yy(e,t){return e.indexOf(t)}function $n(e,t){return e.charCodeAt(t)|0}function Zc(e,t,n){return e.slice(t,n)}function Fi(e){return e.length}function vb(e){return e.length}function of(e,t){return t.push(e),e}function YO(e,t){return e.map(t).join("")}var eg=1,lu=1,c2=0,fr=0,un=0,Su="";function tg(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:eg,column:lu,length:s,return:""}}function Nu(e,t){return GO(tg("",null,null,"",null,null,0),e,{length:-e.length},t)}function XO(){return un}function QO(){return un=fr>0?$n(Su,--fr):0,lu--,un===10&&(lu=1,eg--),un}function xr(){return un=fr<c2?$n(Su,fr++):0,lu++,un===10&&(lu=1,eg++),un}function Wi(){return $n(Su,fr)}function Hf(){return fr}function bd(e,t){return Zc(Su,e,t)}function Jc(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 d2(e){return eg=lu=1,c2=Fi(Su=e),fr=0,[]}function f2(e){return Su="",e}function Vf(e){return u2(bd(fr-1,by(e===91?e+2:e===40?e+1:e)))}function ZO(e){for(;(un=Wi())&&un<33;)xr();return Jc(e)>2||Jc(un)>3?"":" "}function JO(e,t){for(;--t&&xr()&&!(un<48||un>102||un>57&&un<65||un>70&&un<97););return bd(e,Hf()+(t<6&&Wi()==32&&xr()==32))}function by(e){for(;xr();)switch(un){case e:return fr;case 34:case 39:e!==34&&e!==39&&by(un);break;case 40:e===41&&by(e);break;case 92:xr();break}return fr}function e8(e,t){for(;xr()&&e+un!==47+10;)if(e+un===42+42&&Wi()===47)break;return"/*"+bd(t,fr-1)+"*"+Jp(e===47?e:xr())}function t8(e){for(;!Jc(Wi());)xr();return bd(e,fr)}function n8(e){return f2(Wf("",null,null,null,[""],e=d2(e),0,[0],e))}function Wf(e,t,n,r,i,o,s,d,a){for(var c=0,l=0,u=s,h=0,f=0,p=0,g=1,b=1,x=1,S=0,T="",v=i,w=o,y=r,m=T;b;)switch(p=S,S=xr()){case 40:if(p!=108&&$n(m,u-1)==58){yy(m+=Tt(Vf(S),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:m+=Vf(S);break;case 9:case 10:case 13:case 32:m+=ZO(p);break;case 92:m+=JO(Hf()-1,7);continue;case 47:switch(Wi()){case 42:case 47:of(r8(e8(xr(),Hf()),t,n),a);break;default:m+="/"}break;case 123*g:d[c++]=Fi(m)*x;case 125*g:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+l:x==-1&&(m=Tt(m,/\f/g,"")),f>0&&Fi(m)-u&&of(f>32?aS(m+";",r,n,u-1):aS(Tt(m," ","")+";",r,n,u-2),a);break;case 59:m+=";";default:if(of(y=oS(m,t,n,c,l,i,d,T,v=[],w=[],u),o),S===123)if(l===0)Wf(m,t,y,y,v,o,u,d,w);else switch(h===99&&$n(m,3)===110?100:h){case 100:case 108:case 109:case 115:Wf(e,y,y,r&&of(oS(e,y,y,0,0,i,d,T,i,v=[],u),w),i,w,u,d,r?v:w);break;default:Wf(m,y,y,y,[""],w,0,d,w)}}c=l=f=0,g=x=1,T=m="",u=s;break;case 58:u=1+Fi(m),f=p;default:if(g<1){if(S==123)--g;else if(S==125&&g++==0&&QO()==125)continue}switch(m+=Jp(S),S*g){case 38:x=l>0?1:(m+="\f",-1);break;case 44:d[c++]=(Fi(m)-1)*x,x=1;break;case 64:Wi()===45&&(m+=Vf(xr())),h=Wi(),l=u=Fi(T=m+=t8(Hf())),S++;break;case 45:p===45&&Fi(m)==2&&(g=0)}}return o}function oS(e,t,n,r,i,o,s,d,a,c,l){for(var u=i-1,h=i===0?o:[""],f=vb(h),p=0,g=0,b=0;p<r;++p)for(var x=0,S=Zc(e,u+1,u=UO(g=s[p])),T=e;x<f;++x)(T=u2(g>0?h[x]+" "+S:Tt(S,/&\f/g,h[x])))&&(a[b++]=T);return tg(e,t,n,i===0?gb:d,a,c,l)}function r8(e,t,n){return tg(e,t,n,s2,Jp(XO()),Zc(e,2,-2),0)}function aS(e,t,n,r){return tg(e,t,n,mb,Zc(e,0,r),Zc(e,r+1,-1),r)}function Hl(e,t){for(var n="",r=vb(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function i8(e,t,n,r){switch(e.type){case WO:if(e.children.length)break;case VO:case mb:return e.return=e.return||e.value;case s2:return"";case l2:return e.return=e.value+"{"+Hl(e.children,r)+"}";case gb:e.value=e.props.join(",")}return Fi(n=Hl(e.children,r))?e.return=e.value+"{"+n+"}":""}function o8(e){var t=vb(e);return function(n,r,i,o){for(var s="",d=0;d<t;d++)s+=e[d](n,r,i,o)||"";return s}}function a8(e){return function(t){t.root||(t=t.return)&&e(t)}}var sS=function(t){var n=new WeakMap;return function(r){if(n.has(r))return n.get(r);var i=t(r);return n.set(r,i),i}};function h2(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var s8=function(t,n,r){for(var i=0,o=0;i=o,o=Wi(),i===38&&o===12&&(n[r]=1),!Jc(o);)xr();return bd(t,fr)},l8=function(t,n){var r=-1,i=44;do switch(Jc(i)){case 0:i===38&&Wi()===12&&(n[r]=1),t[r]+=s8(fr-1,n,r);break;case 2:t[r]+=Vf(i);break;case 4:if(i===44){t[++r]=Wi()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Jp(i)}while(i=xr());return t},u8=function(t,n){return f2(l8(d2(t),n))},lS=new WeakMap,c8=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!lS.get(r))&&!i){lS.set(t,!0);for(var o=[],s=u8(n,o),d=r.props,a=0,c=0;a<s.length;a++)for(var l=0;l<d.length;l++,c++)t.props[c]=o[a]?s[a].replace(/&\f/g,d[l]):d[l]+" "+s[a]}}},d8=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function p2(e,t){switch(KO(e,t)){case 5103:return $t+"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 $t+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return $t+e+Gh+e+zn+e+e;case 6828:case 4268:return $t+e+zn+e+e;case 6165:return $t+e+zn+"flex-"+e+e;case 5187:return $t+e+Tt(e,/(\w+).+(:[^]+)/,$t+"box-$1$2"+zn+"flex-$1$2")+e;case 5443:return $t+e+zn+"flex-item-"+Tt(e,/flex-|-self/,"")+e;case 4675:return $t+e+zn+"flex-line-pack"+Tt(e,/align-content|flex-|-self/,"")+e;case 5548:return $t+e+zn+Tt(e,"shrink","negative")+e;case 5292:return $t+e+zn+Tt(e,"basis","preferred-size")+e;case 6060:return $t+"box-"+Tt(e,"-grow","")+$t+e+zn+Tt(e,"grow","positive")+e;case 4554:return $t+Tt(e,/([^-])(transform)/g,"$1"+$t+"$2")+e;case 6187:return Tt(Tt(Tt(e,/(zoom-|grab)/,$t+"$1"),/(image-set)/,$t+"$1"),e,"")+e;case 5495:case 3959:return Tt(e,/(image-set\([^]*)/,$t+"$1$`$1");case 4968:return Tt(Tt(e,/(.+:)(flex-)?(.*)/,$t+"box-pack:$3"+zn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$t+e+e;case 4095:case 3583:case 4068:case 2532:return Tt(e,/(.+)-inline(.+)/,$t+"$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(Fi(e)-1-t>6)switch($n(e,t+1)){case 109:if($n(e,t+4)!==45)break;case 102:return Tt(e,/(.+:)(.+)-([^]+)/,"$1"+$t+"$2-$3$1"+Gh+($n(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~yy(e,"stretch")?p2(Tt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if($n(e,t+1)!==115)break;case 6444:switch($n(e,Fi(e)-3-(~yy(e,"!important")&&10))){case 107:return Tt(e,":",":"+$t)+e;case 101:return Tt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$t+($n(e,14)===45?"inline-":"")+"box$3$1"+$t+"$2$3$1"+zn+"$2box$3")+e}break;case 5936:switch($n(e,t+11)){case 114:return $t+e+zn+Tt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $t+e+zn+Tt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $t+e+zn+Tt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $t+e+zn+e+e}return e}var f8=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case mb:t.return=p2(t.value,t.length);break;case l2:return Hl([Nu(t,{value:Tt(t.value,"@","@"+$t)})],i);case gb:if(t.length)return YO(t.props,function(o){switch(qO(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Hl([Nu(t,{props:[Tt(o,/:(read-\w+)/,":"+Gh+"$1")]})],i);case"::placeholder":return Hl([Nu(t,{props:[Tt(o,/:(plac\w+)/,":"+$t+"input-$1")]}),Nu(t,{props:[Tt(o,/:(plac\w+)/,":"+Gh+"$1")]}),Nu(t,{props:[Tt(o,/:(plac\w+)/,zn+"input-$1")]})],i)}return""})}},h8=[f8],p8=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var b=g.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||h8,o={},s,d=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var b=g.getAttribute("data-emotion").split(" "),x=1;x<b.length;x++)o[b[x]]=!0;d.push(g)});var a,c=[c8,d8];{var l,u=[i8,a8(function(g){l.insert(g)})],h=o8(c.concat(i,u)),f=function(b){return Hl(n8(b),h)};a=function(b,x,S,T){l=S,f(b?b+"{"+x.styles+"}":x.styles),T&&(p.inserted[x.name]=!0)}}var p={key:n,sheet:new HO({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:a};return p.sheet.hydrate(d),p};function Ie(){return Ie=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},Ie.apply(this,arguments)}var g2={exports:{}},It={};/** @license React v16.13.1
|
||
* react-is.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Sn=typeof Symbol=="function"&&Symbol.for,yb=Sn?Symbol.for("react.element"):60103,bb=Sn?Symbol.for("react.portal"):60106,ng=Sn?Symbol.for("react.fragment"):60107,rg=Sn?Symbol.for("react.strict_mode"):60108,ig=Sn?Symbol.for("react.profiler"):60114,og=Sn?Symbol.for("react.provider"):60109,ag=Sn?Symbol.for("react.context"):60110,wb=Sn?Symbol.for("react.async_mode"):60111,sg=Sn?Symbol.for("react.concurrent_mode"):60111,lg=Sn?Symbol.for("react.forward_ref"):60112,ug=Sn?Symbol.for("react.suspense"):60113,g8=Sn?Symbol.for("react.suspense_list"):60120,cg=Sn?Symbol.for("react.memo"):60115,dg=Sn?Symbol.for("react.lazy"):60116,m8=Sn?Symbol.for("react.block"):60121,v8=Sn?Symbol.for("react.fundamental"):60117,y8=Sn?Symbol.for("react.responder"):60118,b8=Sn?Symbol.for("react.scope"):60119;function Ar(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case yb:switch(e=e.type,e){case wb:case sg:case ng:case ig:case rg:case ug:return e;default:switch(e=e&&e.$$typeof,e){case ag:case lg:case dg:case cg:case og:return e;default:return t}}case bb:return t}}}function m2(e){return Ar(e)===sg}It.AsyncMode=wb;It.ConcurrentMode=sg;It.ContextConsumer=ag;It.ContextProvider=og;It.Element=yb;It.ForwardRef=lg;It.Fragment=ng;It.Lazy=dg;It.Memo=cg;It.Portal=bb;It.Profiler=ig;It.StrictMode=rg;It.Suspense=ug;It.isAsyncMode=function(e){return m2(e)||Ar(e)===wb};It.isConcurrentMode=m2;It.isContextConsumer=function(e){return Ar(e)===ag};It.isContextProvider=function(e){return Ar(e)===og};It.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===yb};It.isForwardRef=function(e){return Ar(e)===lg};It.isFragment=function(e){return Ar(e)===ng};It.isLazy=function(e){return Ar(e)===dg};It.isMemo=function(e){return Ar(e)===cg};It.isPortal=function(e){return Ar(e)===bb};It.isProfiler=function(e){return Ar(e)===ig};It.isStrictMode=function(e){return Ar(e)===rg};It.isSuspense=function(e){return Ar(e)===ug};It.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ng||e===sg||e===ig||e===rg||e===ug||e===g8||typeof e=="object"&&e!==null&&(e.$$typeof===dg||e.$$typeof===cg||e.$$typeof===og||e.$$typeof===ag||e.$$typeof===lg||e.$$typeof===v8||e.$$typeof===y8||e.$$typeof===b8||e.$$typeof===m8)};It.typeOf=Ar;g2.exports=It;var w8=g2.exports,v2=w8,S8={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},x8={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},y2={};y2[v2.ForwardRef]=S8;y2[v2.Memo]=x8;var _8=!0;function b2(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var Sb=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||_8===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},xb=function(t,n,r){Sb(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function C8(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var k8={animationIterationCount:1,aspectRatio: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},E8=/[A-Z]|^ms/g,$8=/_EMO_([^_]+?)_([^]*?)_EMO_/g,w2=function(t){return t.charCodeAt(1)===45},uS=function(t){return t!=null&&typeof t!="boolean"},Cm=h2(function(e){return w2(e)?e:e.replace(E8,"-$&").toLowerCase()}),cS=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace($8,function(r,i,o){return Di={name:i,styles:o,next:Di},i})}return k8[t]!==1&&!w2(t)&&typeof n=="number"&&n!==0?n+"px":n};function ed(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Di={name:n.name,styles:n.styles,next:Di},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Di={name:r.name,styles:r.styles,next:Di},r=r.next;var i=n.styles+";";return i}return T8(e,t,n)}case"function":{if(e!==void 0){var o=Di,s=n(e);return Di=o,ed(e,t,s)}break}}if(t==null)return n;var d=t[n];return d!==void 0?d:n}function T8(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=ed(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object")t!=null&&t[s]!==void 0?r+=o+"{"+t[s]+"}":uS(s)&&(r+=Cm(o)+":"+cS(o,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var d=0;d<s.length;d++)uS(s[d])&&(r+=Cm(o)+":"+cS(o,s[d])+";");else{var a=ed(e,t,s);switch(o){case"animation":case"animationName":{r+=Cm(o)+":"+a+";";break}default:r+=o+"{"+a+"}"}}}return r}var dS=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Di,fg=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";Di=void 0;var s=t[0];s==null||s.raw===void 0?(i=!1,o+=ed(r,n,s)):o+=s[0];for(var d=1;d<t.length;d++)o+=ed(r,n,t[d]),i&&(o+=s[d]);dS.lastIndex=0;for(var a="",c;(c=dS.exec(o))!==null;)a+="-"+c[1];var l=C8(o)+a;return{name:l,styles:o,next:Di}},A8=function(t){return t()},S2=zw["useInsertionEffect"]?zw["useInsertionEffect"]:!1,x2=S2||A8,fS=S2||z.useLayoutEffect,_b={}.hasOwnProperty,_2=z.createContext(typeof HTMLElement<"u"?p8({key:"css"}):null);_2.Provider;var Cb=function(t){return z.forwardRef(function(n,r){var i=z.useContext(_2);return t(n,i,r)})},uu=z.createContext({}),M8=function(t,n){if(typeof n=="function"){var r=n(t);return r}return Ie({},t,n)},L8=sS(function(e){return sS(function(t){return M8(e,t)})}),R8=function(t){var n=z.useContext(uu);return t.theme!==n&&(n=L8(n)(t.theme)),z.createElement(uu.Provider,{value:n},t.children)},wy="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",P8=function(t,n){var r={};for(var i in n)_b.call(n,i)&&(r[i]=n[i]);return r[wy]=t,r},I8=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Sb(n,r,i),x2(function(){return xb(n,r,i)}),null},O8=Cb(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[wy],o=[r],s="";typeof e.className=="string"?s=b2(t.registered,o,e.className):e.className!=null&&(s=e.className+" ");var d=fg(o,void 0,z.useContext(uu));s+=t.key+"-"+d.name;var a={};for(var c in e)_b.call(e,c)&&c!=="css"&&c!==wy&&(a[c]=e[c]);return a.ref=n,a.className=s,z.createElement(z.Fragment,null,z.createElement(I8,{cache:t,serialized:d,isStringTag:typeof i=="string"}),z.createElement(i,a))}),F8=O8,Ke=function(t,n){var r=arguments;if(n==null||!_b.call(n,"css"))return z.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=F8,o[1]=P8(t,n);for(var s=2;s<i;s++)o[s]=r[s];return z.createElement.apply(null,o)},hg=Cb(function(e,t){var n=e.styles,r=fg([n],void 0,z.useContext(uu)),i=z.useRef();return fS(function(){var o=t.key+"-global",s=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),d=!1,a=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),a!==null&&(d=!0,a.setAttribute("data-emotion",o),s.hydrate([a])),i.current=[s,d],function(){s.flush()}},[t]),fS(function(){var o=i.current,s=o[0],d=o[1];if(d){o[1]=!1;return}if(r.next!==void 0&&xb(t,r.next,!0),s.tags.length){var a=s.tags[s.tags.length-1].nextElementSibling;s.before=a,s.flush()}t.insert("",r,s,!1)},[t,r.name]),null});function kb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return fg(t)}var wd=function(){var t=kb.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},C2=String.raw,k2=C2`
|
||
:root,
|
||
:host {
|
||
--chakra-vh: 100vh;
|
||
}
|
||
|
||
@supports (height: -webkit-fill-available) {
|
||
:root,
|
||
:host {
|
||
--chakra-vh: -webkit-fill-available;
|
||
}
|
||
}
|
||
|
||
@supports (height: -moz-fill-available) {
|
||
:root,
|
||
:host {
|
||
--chakra-vh: -moz-fill-available;
|
||
}
|
||
}
|
||
|
||
@supports (height: 100dvh) {
|
||
:root,
|
||
:host {
|
||
--chakra-vh: 100dvh;
|
||
}
|
||
}
|
||
`,D8=()=>j.jsx(hg,{styles:k2}),N8=({scope:e=""})=>j.jsx(hg,{styles:C2`
|
||
html {
|
||
line-height: 1.5;
|
||
-webkit-text-size-adjust: 100%;
|
||
font-family: system-ui, sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
text-rendering: optimizeLegibility;
|
||
-moz-osx-font-smoothing: grayscale;
|
||
touch-action: manipulation;
|
||
}
|
||
|
||
body {
|
||
position: relative;
|
||
min-height: 100%;
|
||
margin: 0;
|
||
font-feature-settings: "kern";
|
||
}
|
||
|
||
${e} :where(*, *::before, *::after) {
|
||
border-width: 0;
|
||
border-style: solid;
|
||
box-sizing: border-box;
|
||
word-wrap: break-word;
|
||
}
|
||
|
||
main {
|
||
display: block;
|
||
}
|
||
|
||
${e} hr {
|
||
border-top-width: 1px;
|
||
box-sizing: content-box;
|
||
height: 0;
|
||
overflow: visible;
|
||
}
|
||
|
||
${e} :where(pre, code, kbd,samp) {
|
||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||
font-size: 1em;
|
||
}
|
||
|
||
${e} a {
|
||
background-color: transparent;
|
||
color: inherit;
|
||
text-decoration: inherit;
|
||
}
|
||
|
||
${e} abbr[title] {
|
||
border-bottom: none;
|
||
text-decoration: underline;
|
||
-webkit-text-decoration: underline dotted;
|
||
text-decoration: underline dotted;
|
||
}
|
||
|
||
${e} :where(b, strong) {
|
||
font-weight: bold;
|
||
}
|
||
|
||
${e} small {
|
||
font-size: 80%;
|
||
}
|
||
|
||
${e} :where(sub,sup) {
|
||
font-size: 75%;
|
||
line-height: 0;
|
||
position: relative;
|
||
vertical-align: baseline;
|
||
}
|
||
|
||
${e} sub {
|
||
bottom: -0.25em;
|
||
}
|
||
|
||
${e} sup {
|
||
top: -0.5em;
|
||
}
|
||
|
||
${e} img {
|
||
border-style: none;
|
||
}
|
||
|
||
${e} :where(button, input, optgroup, select, textarea) {
|
||
font-family: inherit;
|
||
font-size: 100%;
|
||
line-height: 1.15;
|
||
margin: 0;
|
||
}
|
||
|
||
${e} :where(button, input) {
|
||
overflow: visible;
|
||
}
|
||
|
||
${e} :where(button, select) {
|
||
text-transform: none;
|
||
}
|
||
|
||
${e} :where(
|
||
button::-moz-focus-inner,
|
||
[type="button"]::-moz-focus-inner,
|
||
[type="reset"]::-moz-focus-inner,
|
||
[type="submit"]::-moz-focus-inner
|
||
) {
|
||
border-style: none;
|
||
padding: 0;
|
||
}
|
||
|
||
${e} fieldset {
|
||
padding: 0.35em 0.75em 0.625em;
|
||
}
|
||
|
||
${e} legend {
|
||
box-sizing: border-box;
|
||
color: inherit;
|
||
display: table;
|
||
max-width: 100%;
|
||
padding: 0;
|
||
white-space: normal;
|
||
}
|
||
|
||
${e} progress {
|
||
vertical-align: baseline;
|
||
}
|
||
|
||
${e} textarea {
|
||
overflow: auto;
|
||
}
|
||
|
||
${e} :where([type="checkbox"], [type="radio"]) {
|
||
box-sizing: border-box;
|
||
padding: 0;
|
||
}
|
||
|
||
${e} input[type="number"]::-webkit-inner-spin-button,
|
||
${e} input[type="number"]::-webkit-outer-spin-button {
|
||
-webkit-appearance: none !important;
|
||
}
|
||
|
||
${e} input[type="number"] {
|
||
-moz-appearance: textfield;
|
||
}
|
||
|
||
${e} input[type="search"] {
|
||
-webkit-appearance: textfield;
|
||
outline-offset: -2px;
|
||
}
|
||
|
||
${e} input[type="search"]::-webkit-search-decoration {
|
||
-webkit-appearance: none !important;
|
||
}
|
||
|
||
${e} ::-webkit-file-upload-button {
|
||
-webkit-appearance: button;
|
||
font: inherit;
|
||
}
|
||
|
||
${e} details {
|
||
display: block;
|
||
}
|
||
|
||
${e} summary {
|
||
display: list-item;
|
||
}
|
||
|
||
template {
|
||
display: none;
|
||
}
|
||
|
||
[hidden] {
|
||
display: none !important;
|
||
}
|
||
|
||
${e} :where(
|
||
blockquote,
|
||
dl,
|
||
dd,
|
||
h1,
|
||
h2,
|
||
h3,
|
||
h4,
|
||
h5,
|
||
h6,
|
||
hr,
|
||
figure,
|
||
p,
|
||
pre
|
||
) {
|
||
margin: 0;
|
||
}
|
||
|
||
${e} button {
|
||
background: transparent;
|
||
padding: 0;
|
||
}
|
||
|
||
${e} fieldset {
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
${e} :where(ol, ul) {
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
${e} textarea {
|
||
resize: vertical;
|
||
}
|
||
|
||
${e} :where(button, [role="button"]) {
|
||
cursor: pointer;
|
||
}
|
||
|
||
${e} button::-moz-focus-inner {
|
||
border: 0 !important;
|
||
}
|
||
|
||
${e} table {
|
||
border-collapse: collapse;
|
||
}
|
||
|
||
${e} :where(h1, h2, h3, h4, h5, h6) {
|
||
font-size: inherit;
|
||
font-weight: inherit;
|
||
}
|
||
|
||
${e} :where(button, input, optgroup, select, textarea) {
|
||
padding: 0;
|
||
line-height: inherit;
|
||
color: inherit;
|
||
}
|
||
|
||
${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
|
||
display: block;
|
||
}
|
||
|
||
${e} :where(img, video) {
|
||
max-width: 100%;
|
||
height: auto;
|
||
}
|
||
|
||
[data-js-focus-visible]
|
||
:focus:not([data-focus-visible-added]):not(
|
||
[data-focus-visible-disabled]
|
||
) {
|
||
outline: none;
|
||
box-shadow: none;
|
||
}
|
||
|
||
${e} select::-ms-expand {
|
||
display: none;
|
||
}
|
||
|
||
${k2}
|
||
`});function z8(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function xn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o,defaultValue:s}=e,d=z.createContext(s);d.displayName=t;function a(){var c;const l=z.useContext(d);if(!l&&n){const u=new Error(o??z8(r,i));throw u.name="ContextError",(c=Error.captureStackTrace)==null||c.call(Error,u,a),u}return l}return[d.Provider,a,d]}var[B8,j8]=xn({strict:!1,name:"PortalManagerContext"});function E2(e){const{children:t,zIndex:n}=e;return j.jsx(B8,{value:{zIndex:n},children:t})}E2.displayName="PortalManager";var wa=globalThis!=null&&globalThis.document?z.useLayoutEffect:z.useEffect,[$2,H8]=xn({strict:!1,name:"PortalContext"}),Eb="chakra-portal",V8=".chakra-portal",W8=e=>j.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),U8=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=z.useState(null),o=z.useRef(null),[,s]=z.useState({});z.useEffect(()=>s({}),[]);const d=H8(),a=j8();wa(()=>{if(!r)return;const l=r.ownerDocument,u=t?d??l.body:l.body;if(!u)return;o.current=l.createElement("div"),o.current.className=Eb,u.appendChild(o.current),s({});const h=o.current;return()=>{u.contains(h)&&u.removeChild(h)}},[r]);const c=a!=null&&a.zIndex?j.jsx(W8,{zIndex:a==null?void 0:a.zIndex,children:n}):n;return o.current?yd.createPortal(j.jsx($2,{value:o.current,children:c}),o.current):j.jsx("span",{ref:l=>{l&&i(l)}})},G8=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),s=z.useMemo(()=>{const a=i==null?void 0:i.ownerDocument.createElement("div");return a&&(a.className=Eb),a},[i]),[,d]=z.useState({});return wa(()=>d({}),[]),wa(()=>{if(!(!s||!o))return o.appendChild(s),()=>{o.removeChild(s)}},[s,o]),o&&s?yd.createPortal(j.jsx($2,{value:r?s:null,children:t}),s):null};function Sd(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?j.jsx(G8,{containerRef:n,...r}):j.jsx(U8,{...r})}Sd.className=Eb;Sd.selector=V8;Sd.displayName="Portal";function K8(){const e=z.useContext(uu);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}var $b=z.createContext({});$b.displayName="ColorModeContext";function Tb(){const e=z.useContext($b);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var af={light:"chakra-ui-light",dark:"chakra-ui-dark"};function q8(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?af.dark:af.light),document.body.classList.remove(r?af.light:af.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var i;return((i=n.query().matches)!=null?i:r==="dark")?"dark":"light"},addListener(r){const i=n.query(),o=s=>{r(s.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var Y8="chakra-ui-color-mode";function X8(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var Q8=X8(Y8),hS=()=>{};function pS(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function T2(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:s=Q8}=e,d=i==="dark"?"dark":"light",[a,c]=z.useState(()=>pS(s,d)),[l,u]=z.useState(()=>pS(s)),{getSystemTheme:h,setClassName:f,setDataset:p,addListener:g}=z.useMemo(()=>q8({preventTransition:o}),[o]),b=i==="system"&&!a?l:a,x=z.useCallback(v=>{const w=v==="system"?h():v;c(w),f(w==="dark"),p(w),s.set(w)},[s,h,f,p]);wa(()=>{i==="system"&&u(h())},[]),z.useEffect(()=>{const v=s.get();if(v){x(v);return}if(i==="system"){x("system");return}x(d)},[s,d,i,x]);const S=z.useCallback(()=>{x(b==="dark"?"light":"dark")},[b,x]);z.useEffect(()=>{if(r)return g(x)},[r,g,x]);const T=z.useMemo(()=>({colorMode:t??b,toggleColorMode:t?hS:S,setColorMode:t?hS:x,forced:t!==void 0}),[b,S,x,t]);return j.jsx($b.Provider,{value:T,children:n})}T2.displayName="ColorModeProvider";function Z8(){const e=Tb(),t=K8();return{...e,theme:t}}var St=(...e)=>e.filter(Boolean).join(" ");function dr(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function da(e,...t){return J8(e)?e(...t):e}var J8=e=>typeof e=="function",ht=e=>e?"":void 0,So=e=>e?!0:void 0;function ut(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function A2(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var Kh={exports:{}};Kh.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,s=9007199254740991,d="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",l="[object Boolean]",u="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",g="[object Map]",b="[object Number]",x="[object Null]",S="[object Object]",T="[object Proxy]",v="[object RegExp]",w="[object Set]",y="[object String]",m="[object Undefined]",E="[object WeakMap]",A="[object ArrayBuffer]",C="[object DataView]",k="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",O="[object Int32Array]",P="[object Uint8Array]",N="[object Uint8ClampedArray]",B="[object Uint16Array]",W="[object Uint32Array]",K=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,re=/^(?:0|[1-9]\d*)$/,Y={};Y[k]=Y[I]=Y[R]=Y[M]=Y[O]=Y[P]=Y[N]=Y[B]=Y[W]=!0,Y[d]=Y[a]=Y[A]=Y[l]=Y[C]=Y[u]=Y[h]=Y[f]=Y[g]=Y[b]=Y[S]=Y[v]=Y[w]=Y[y]=Y[E]=!1;var Z=typeof Be=="object"&&Be&&Be.Object===Object&&Be,te=typeof self=="object"&&self&&self.Object===Object&&self,ie=Z||te||Function("return this")(),ce=t&&!t.nodeType&&t,he=ce&&!0&&e&&!e.nodeType&&e,ve=he&&he.exports===ce,Ce=ve&&Z.process,_e=function(){try{var U=he&&he.require&&he.require("util").types;return U||Ce&&Ce.binding&&Ce.binding("util")}catch{}}(),Re=_e&&_e.isTypedArray;function ot(U,J,ue){switch(ue.length){case 0:return U.call(J);case 1:return U.call(J,ue[0]);case 2:return U.call(J,ue[0],ue[1]);case 3:return U.call(J,ue[0],ue[1],ue[2])}return U.apply(J,ue)}function Te(U,J){for(var ue=-1,Se=Array(U);++ue<U;)Se[ue]=J(ue);return Se}function it(U){return function(J){return U(J)}}function vt(U,J){return U==null?void 0:U[J]}function Qt(U,J){return function(ue){return U(J(ue))}}var Ut=Array.prototype,Lr=Function.prototype,Ln=Object.prototype,Zn=ie["__core-js_shared__"],Ht=Lr.toString,me=Ln.hasOwnProperty,Ae=function(){var U=/[^.]+$/.exec(Zn&&Zn.keys&&Zn.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),we=Ln.toString,He=Ht.call(Object),ct=RegExp("^"+Ht.call(me).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xe=ve?ie.Buffer:void 0,Fe=ie.Symbol,Ne=ie.Uint8Array,Xe=xe?xe.allocUnsafe:void 0,tt=Qt(Object.getPrototypeOf,Object),kt=Object.create,on=Ln.propertyIsEnumerable,Rn=Ut.splice,Rr=Fe?Fe.toStringTag:void 0,Pr=function(){try{var U=zo(Object,"defineProperty");return U({},"",{}),U}catch{}}(),Ps=xe?xe.isBuffer:void 0,pr=Math.max,Is=Date.now,ti=zo(ie,"Map"),gr=zo(Object,"create"),Io=function(){function U(){}return function(J){if(!Dr(J))return{};if(kt)return kt(J);U.prototype=J;var ue=new U;return U.prototype=void 0,ue}}();function Pn(U){var J=-1,ue=U==null?0:U.length;for(this.clear();++J<ue;){var Se=U[J];this.set(Se[0],Se[1])}}function mn(){this.__data__=gr?gr(null):{},this.size=0}function an(U){var J=this.has(U)&&delete this.__data__[U];return this.size-=J?1:0,J}function Qi(U){var J=this.__data__;if(gr){var ue=J[U];return ue===r?void 0:ue}return me.call(J,U)?J[U]:void 0}function Zi(U){var J=this.__data__;return gr?J[U]!==void 0:me.call(J,U)}function Os(U,J){var ue=this.__data__;return this.size+=this.has(U)?0:1,ue[U]=gr&&J===void 0?r:J,this}Pn.prototype.clear=mn,Pn.prototype.delete=an,Pn.prototype.get=Qi,Pn.prototype.has=Zi,Pn.prototype.set=Os;function Jn(U){var J=-1,ue=U==null?0:U.length;for(this.clear();++J<ue;){var Se=U[J];this.set(Se[0],Se[1])}}function wi(){this.__data__=[],this.size=0}function Si(U){var J=this.__data__,ue=to(J,U);if(ue<0)return!1;var Se=J.length-1;return ue==Se?J.pop():Rn.call(J,ue,1),--this.size,!0}function Ra(U){var J=this.__data__,ue=to(J,U);return ue<0?void 0:J[ue][1]}function Ji(U){return to(this.__data__,U)>-1}function Pa(U,J){var ue=this.__data__,Se=to(ue,U);return Se<0?(++this.size,ue.push([U,J])):ue[Se][1]=J,this}Jn.prototype.clear=wi,Jn.prototype.delete=Si,Jn.prototype.get=Ra,Jn.prototype.has=Ji,Jn.prototype.set=Pa;function In(U){var J=-1,ue=U==null?0:U.length;for(this.clear();++J<ue;){var Se=U[J];this.set(Se[0],Se[1])}}function _u(){this.size=0,this.__data__={hash:new Pn,map:new(ti||Jn),string:new Pn}}function Fs(U){var J=ni(this,U).delete(U);return this.size-=J?1:0,J}function Cu(U){return ni(this,U).get(U)}function ku(U){return ni(this,U).has(U)}function Ds(U,J){var ue=ni(this,U),Se=ue.size;return ue.set(U,J),this.size+=ue.size==Se?0:1,this}In.prototype.clear=_u,In.prototype.delete=Fs,In.prototype.get=Cu,In.prototype.has=ku,In.prototype.set=Ds;function vn(U){var J=this.__data__=new Jn(U);this.size=J.size}function xi(){this.__data__=new Jn,this.size=0}function Ns(U){var J=this.__data__,ue=J.delete(U);return this.size=J.size,ue}function Ia(U){return this.__data__.get(U)}function Oa(U){return this.__data__.has(U)}function Oo(U,J){var ue=this.__data__;if(ue instanceof Jn){var Se=ue.__data__;if(!ti||Se.length<n-1)return Se.push([U,J]),this.size=++ue.size,this;ue=this.__data__=new In(Se)}return ue.set(U,J),this.size=ue.size,this}vn.prototype.clear=xi,vn.prototype.delete=Ns,vn.prototype.get=Ia,vn.prototype.has=Oa,vn.prototype.set=Oo;function Ir(U,J){var ue=jo(U),Se=!ue&&tr(U),ze=!ue&&!Se&&qs(U),Qe=!ue&&!Se&&!ze&&ki(U),Ze=ue||Se||ze||Qe,Oe=Ze?Te(U.length,String):[],at=Oe.length;for(var Ft in U)(J||me.call(U,Ft))&&!(Ze&&(Ft=="length"||ze&&(Ft=="offset"||Ft=="parent")||Qe&&(Ft=="buffer"||Ft=="byteLength"||Ft=="byteOffset")||On(Ft,at)))&&Oe.push(Ft);return Oe}function Fa(U,J,ue){(ue!==void 0&&!io(U[J],ue)||ue===void 0&&!(J in U))&&Fo(U,J,ue)}function eo(U,J,ue){var Se=U[J];(!(me.call(U,J)&&io(Se,ue))||ue===void 0&&!(J in U))&&Fo(U,J,ue)}function to(U,J){for(var ue=U.length;ue--;)if(io(U[ue][0],J))return ue;return-1}function Fo(U,J,ue){J=="__proto__"&&Pr?Pr(U,J,{configurable:!0,enumerable:!0,value:ue,writable:!0}):U[J]=ue}var zs=Ws();function Or(U){return U==null?U===void 0?m:x:Rr&&Rr in Object(U)?$u(U):oi(U)}function Bs(U){return Ci(U)&&Or(U)==d}function Da(U){if(!Dr(U)||Bo(U))return!1;var J=ai(U)?ct:q;return J.test(ja(U))}function Fr(U){return Ci(U)&&Ys(U.length)&&!!Y[Or(U)]}function Eu(U){if(!Dr(U))return ii(U);var J=ri(U),ue=[];for(var Se in U)Se=="constructor"&&(J||!me.call(U,Se))||ue.push(Se);return ue}function Na(U,J,ue,Se,ze){U!==J&&zs(J,function(Qe,Ze){if(ze||(ze=new vn),Dr(Qe))js(U,J,Ze,ue,Na,Se,ze);else{var Oe=Se?Se(Ba(U,Ze),Qe,Ze+"",U,J,ze):void 0;Oe===void 0&&(Oe=Qe),Fa(U,Ze,Oe)}},Zs)}function js(U,J,ue,Se,ze,Qe,Ze){var Oe=Ba(U,ue),at=Ba(J,ue),Ft=Ze.get(at);if(Ft){Fa(U,ue,Ft);return}var xt=Qe?Qe(Oe,at,ue+"",U,J,Ze):void 0,sn=xt===void 0;if(sn){var _=jo(at),L=!_&&qs(at),F=!_&&!L&&ki(at);xt=at,_||L||F?jo(Oe)?xt=Oe:Vo(Oe)?xt=no(Oe):L?(sn=!1,xt=yn(at,!0)):F?(sn=!1,xt=Do(at,!0)):xt=[]:Xs(at)||tr(at)?(xt=Oe,tr(Oe)?xt=Qs(Oe):(!Dr(Oe)||ai(Oe))&&(xt=Us(at))):sn=!1}sn&&(Ze.set(at,xt),ze(xt,at,Se,Qe,Ze),Ze.delete(at)),Fa(U,ue,xt)}function za(U,J){return ro(er(U,J,Q),U+"")}var Hs=Pr?function(U,J){return Pr(U,"toString",{configurable:!0,enumerable:!1,value:Ha(J),writable:!0})}:Q;function yn(U,J){if(J)return U.slice();var ue=U.length,Se=Xe?Xe(ue):new U.constructor(ue);return U.copy(Se),Se}function mr(U){var J=new U.constructor(U.byteLength);return new Ne(J).set(new Ne(U)),J}function Do(U,J){var ue=J?mr(U.buffer):U.buffer;return new U.constructor(ue,U.byteOffset,U.length)}function no(U,J){var ue=-1,Se=U.length;for(J||(J=Array(Se));++ue<Se;)J[ue]=U[ue];return J}function Vs(U,J,ue,Se){var ze=!ue;ue||(ue={});for(var Qe=-1,Ze=J.length;++Qe<Ze;){var Oe=J[Qe],at=Se?Se(ue[Oe],U[Oe],Oe,ue,U):void 0;at===void 0&&(at=U[Oe]),ze?Fo(ue,Oe,at):eo(ue,Oe,at)}return ue}function No(U){return za(function(J,ue){var Se=-1,ze=ue.length,Qe=ze>1?ue[ze-1]:void 0,Ze=ze>2?ue[2]:void 0;for(Qe=U.length>3&&typeof Qe=="function"?(ze--,Qe):void 0,Ze&&Gs(ue[0],ue[1],Ze)&&(Qe=ze<3?void 0:Qe,ze=1),J=Object(J);++Se<ze;){var Oe=ue[Se];Oe&&U(J,Oe,Se,Qe)}return J})}function Ws(U){return function(J,ue,Se){for(var ze=-1,Qe=Object(J),Ze=Se(J),Oe=Ze.length;Oe--;){var at=Ze[U?Oe:++ze];if(ue(Qe[at],at,Qe)===!1)break}return J}}function ni(U,J){var ue=U.__data__;return _i(J)?ue[typeof J=="string"?"string":"hash"]:ue.map}function zo(U,J){var ue=vt(U,J);return Da(ue)?ue:void 0}function $u(U){var J=me.call(U,Rr),ue=U[Rr];try{U[Rr]=void 0;var Se=!0}catch{}var ze=we.call(U);return Se&&(J?U[Rr]=ue:delete U[Rr]),ze}function Us(U){return typeof U.constructor=="function"&&!ri(U)?Io(tt(U)):{}}function On(U,J){var ue=typeof U;return J=J??s,!!J&&(ue=="number"||ue!="symbol"&&re.test(U))&&U>-1&&U%1==0&&U<J}function Gs(U,J,ue){if(!Dr(ue))return!1;var Se=typeof J;return(Se=="number"?Ho(ue)&&On(J,ue.length):Se=="string"&&J in ue)?io(ue[J],U):!1}function _i(U){var J=typeof U;return J=="string"||J=="number"||J=="symbol"||J=="boolean"?U!=="__proto__":U===null}function Bo(U){return!!Ae&&Ae in U}function ri(U){var J=U&&U.constructor,ue=typeof J=="function"&&J.prototype||Ln;return U===ue}function ii(U){var J=[];if(U!=null)for(var ue in Object(U))J.push(ue);return J}function oi(U){return we.call(U)}function er(U,J,ue){return J=pr(J===void 0?U.length-1:J,0),function(){for(var Se=arguments,ze=-1,Qe=pr(Se.length-J,0),Ze=Array(Qe);++ze<Qe;)Ze[ze]=Se[J+ze];ze=-1;for(var Oe=Array(J+1);++ze<J;)Oe[ze]=Se[ze];return Oe[J]=ue(Ze),ot(U,this,Oe)}}function Ba(U,J){if(!(J==="constructor"&&typeof U[J]=="function")&&J!="__proto__")return U[J]}var ro=Ks(Hs);function Ks(U){var J=0,ue=0;return function(){var Se=Is(),ze=o-(Se-ue);if(ue=Se,ze>0){if(++J>=i)return arguments[0]}else J=0;return U.apply(void 0,arguments)}}function ja(U){if(U!=null){try{return Ht.call(U)}catch{}try{return U+""}catch{}}return""}function io(U,J){return U===J||U!==U&&J!==J}var tr=Bs(function(){return arguments}())?Bs:function(U){return Ci(U)&&me.call(U,"callee")&&!on.call(U,"callee")},jo=Array.isArray;function Ho(U){return U!=null&&Ys(U.length)&&!ai(U)}function Vo(U){return Ci(U)&&Ho(U)}var qs=Ps||se;function ai(U){if(!Dr(U))return!1;var J=Or(U);return J==f||J==p||J==c||J==T}function Ys(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=s}function Dr(U){var J=typeof U;return U!=null&&(J=="object"||J=="function")}function Ci(U){return U!=null&&typeof U=="object"}function Xs(U){if(!Ci(U)||Or(U)!=S)return!1;var J=tt(U);if(J===null)return!0;var ue=me.call(J,"constructor")&&J.constructor;return typeof ue=="function"&&ue instanceof ue&&Ht.call(ue)==He}var ki=Re?it(Re):Fr;function Qs(U){return Vs(U,Zs(U))}function Zs(U){return Ho(U)?Ir(U,!0):Eu(U)}var Js=No(function(U,J,ue,Se){Na(U,J,ue,Se)});function Ha(U){return function(){return U}}function Q(U){return U}function se(){return!1}e.exports=Js})(Kh,Kh.exports);var eF=Kh.exports;const Yr=Es(eF);var tF=e=>/!(important)?$/.test(e),gS=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,nF=(e,t)=>n=>{const r=String(t),i=tF(r),o=gS(r),s=e?`${e}.${o}`:o;let d=dr(n.__cssMap)&&s in n.__cssMap?n.__cssMap[s].varRef:t;return d=gS(d),i?`${d} !important`:d};function Ab(e){const{scale:t,transform:n,compose:r}=e;return(o,s)=>{var d;const a=nF(t,o)(s);let c=(d=n==null?void 0:n(a,s))!=null?d:a;return r&&(c=r(c,s)),c}}var sf=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Br(e,t){return n=>{const r={property:n,scale:e};return r.transform=Ab({scale:e,transform:t}),r}}var rF=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function iF(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:rF(t),transform:n?Ab({scale:n,compose:r}):r}}var M2=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function oF(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...M2].join(" ")}function aF(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...M2].join(" ")}var sF={"--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(" ")},lF={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function uF(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var cF={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Sy={"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"},dF=new Set(Object.values(Sy)),xy=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),fF=e=>e.trim();function hF(e,t){if(e==null||xy.has(e))return e;if(!(_y(e)||xy.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],s=i==null?void 0:i[2];if(!o||!s)return e;const d=o.includes("-gradient")?o:`${o}-gradient`,[a,...c]=s.split(",").map(fF).filter(Boolean);if((c==null?void 0:c.length)===0)return e;const l=a in Sy?Sy[a]:a;c.unshift(l);const u=c.map(h=>{if(dF.has(h))return h;const f=h.indexOf(" "),[p,g]=f!==-1?[h.substr(0,f),h.substr(f+1)]:[h],b=_y(g)?g:g&&g.split(" "),x=`colors.${p}`,S=x in t.__cssMap?t.__cssMap[x].varRef:p;return b?[S,...Array.isArray(b)?b:[b]].join(" "):S});return`${d}(${u.join(", ")})`}var _y=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),pF=(e,t)=>hF(e,t??{});function gF(e){return/^var\(--.+\)$/.test(e)}var mF=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Ri=e=>t=>`${e}(${t})`,_t={filter(e){return e!=="auto"?e:sF},backdropFilter(e){return e!=="auto"?e:lF},ring(e){return uF(_t.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?oF():e==="auto-gpu"?aF():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=mF(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(gF(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:pF,blur:Ri("blur"),opacity:Ri("opacity"),brightness:Ri("brightness"),contrast:Ri("contrast"),dropShadow:Ri("drop-shadow"),grayscale:Ri("grayscale"),hueRotate:Ri("hue-rotate"),invert:Ri("invert"),saturate:Ri("saturate"),sepia:Ri("sepia"),bgImage(e){return e==null||_y(e)||xy.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=(t=cF[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},ae={borderWidths:Br("borderWidths"),borderStyles:Br("borderStyles"),colors:Br("colors"),borders:Br("borders"),gradients:Br("gradients",_t.gradient),radii:Br("radii",_t.px),space:Br("space",sf(_t.vh,_t.px)),spaceT:Br("space",sf(_t.vh,_t.px)),degreeT(e){return{property:e,transform:_t.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Ab({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Br("sizes",sf(_t.vh,_t.px)),sizesT:Br("sizes",sf(_t.vh,_t.fraction)),shadows:Br("shadows"),logical:iF,blur:Br("blur",_t.blur)},Uf={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:_t.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.gradients("backgroundImage"),bgClip:{transform:_t.bgClip}};Object.assign(Uf,{bgImage:Uf.backgroundImage,bgImg:Uf.backgroundImage});var Et={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Et,{rounded:Et.borderRadius,roundedTop:Et.borderTopRadius,roundedTopLeft:Et.borderTopLeftRadius,roundedTopRight:Et.borderTopRightRadius,roundedTopStart:Et.borderStartStartRadius,roundedTopEnd:Et.borderStartEndRadius,roundedBottom:Et.borderBottomRadius,roundedBottomLeft:Et.borderBottomLeftRadius,roundedBottomRight:Et.borderBottomRightRadius,roundedBottomStart:Et.borderEndStartRadius,roundedBottomEnd:Et.borderEndEndRadius,roundedLeft:Et.borderLeftRadius,roundedRight:Et.borderRightRadius,roundedStart:Et.borderInlineStartRadius,roundedEnd:Et.borderInlineEndRadius,borderStart:Et.borderInlineStart,borderEnd:Et.borderInlineEnd,borderTopStartRadius:Et.borderStartStartRadius,borderTopEndRadius:Et.borderStartEndRadius,borderBottomStartRadius:Et.borderEndStartRadius,borderBottomEndRadius:Et.borderEndEndRadius,borderStartRadius:Et.borderInlineStartRadius,borderEndRadius:Et.borderInlineEndRadius,borderStartWidth:Et.borderInlineStartWidth,borderEndWidth:Et.borderInlineEndWidth,borderStartColor:Et.borderInlineStartColor,borderEndColor:Et.borderInlineEndColor,borderStartStyle:Et.borderInlineStartStyle,borderEndStyle:Et.borderInlineEndStyle});var vF={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},Cy={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(Cy,{shadow:Cy.boxShadow});var yF={filter:{transform:_t.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",_t.brightness),contrast:ae.propT("--chakra-contrast",_t.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",_t.invert),saturate:ae.propT("--chakra-saturate",_t.saturate),dropShadow:ae.propT("--chakra-drop-shadow",_t.dropShadow),backdropFilter:{transform:_t.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",_t.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",_t.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",_t.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",_t.saturate)},qh={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:_t.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(qh,{flexDir:qh.flexDirection});var L2={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},bF={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:_t.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Vr={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (min-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (max-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",_t.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Vr,{w:Vr.width,h:Vr.height,minW:Vr.minWidth,maxW:Vr.maxWidth,minH:Vr.minHeight,maxH:Vr.maxHeight,overscroll:Vr.overscrollBehavior,overscrollX:Vr.overscrollBehaviorX,overscrollY:Vr.overscrollBehaviorY});var wF={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function SF(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var xF=e=>{const t=new WeakMap;return(r,i,o,s)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const d=t.get(r);if(d.has(i))return d.get(i);const a=e(r,i,o,s);return d.set(i,a),a}},_F=xF(SF),CF={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},kF={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},km=(e,t,n)=>{const r={},i=_F(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},EF={srOnly:{transform(e){return e===!0?CF:e==="focusable"?kF:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>km(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>km(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>km(t,e,n)}},yc={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(yc,{insetStart:yc.insetInlineStart,insetEnd:yc.insetInlineEnd});var $F={ring:{transform:_t.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Bt={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Bt,{m:Bt.margin,mt:Bt.marginTop,mr:Bt.marginRight,me:Bt.marginInlineEnd,marginEnd:Bt.marginInlineEnd,mb:Bt.marginBottom,ml:Bt.marginLeft,ms:Bt.marginInlineStart,marginStart:Bt.marginInlineStart,mx:Bt.marginX,my:Bt.marginY,p:Bt.padding,pt:Bt.paddingTop,py:Bt.paddingY,px:Bt.paddingX,pb:Bt.paddingBottom,pl:Bt.paddingLeft,ps:Bt.paddingInlineStart,paddingStart:Bt.paddingInlineStart,pr:Bt.paddingRight,pe:Bt.paddingInlineEnd,paddingEnd:Bt.paddingInlineEnd});var TF={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},AF={clipPath:!0,transform:ae.propT("transform",_t.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},MF={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},LF={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",_t.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},RF={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function R2(e){return dr(e)&&e.reference?e.reference:String(e)}var pg=(e,...t)=>t.map(R2).join(` ${e} `).replace(/calc/g,""),mS=(...e)=>`calc(${pg("+",...e)})`,vS=(...e)=>`calc(${pg("-",...e)})`,ky=(...e)=>`calc(${pg("*",...e)})`,yS=(...e)=>`calc(${pg("/",...e)})`,bS=e=>{const t=R2(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:ky(t,-1)},Ja=Object.assign(e=>({add:(...t)=>Ja(mS(e,...t)),subtract:(...t)=>Ja(vS(e,...t)),multiply:(...t)=>Ja(ky(e,...t)),divide:(...t)=>Ja(yS(e,...t)),negate:()=>Ja(bS(e)),toString:()=>e.toString()}),{add:mS,subtract:vS,multiply:ky,divide:yS,negate:bS});function PF(e,t="-"){return e.replace(/\s+/g,t)}function IF(e){const t=PF(e.toString());return FF(OF(t))}function OF(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function FF(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function DF(e,t=""){return[t,e].filter(Boolean).join("-")}function NF(e,t){return`var(${e}${t?`, ${t}`:""})`}function zF(e,t=""){return IF(`--${DF(e,t)}`)}function et(e,t,n){const r=zF(e,n);return{variable:r,reference:NF(r,t)}}function BF(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[i,o]=r;n[i]=et(`${e}-${i}`,o);continue}n[r]=et(`${e}-${r}`)}return n}function jF(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function HF(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function Ey(e){if(e==null)return e;const{unitless:t}=HF(e);return t||typeof e=="number"?`${e}px`:e}var P2=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,Mb=e=>Object.fromEntries(Object.entries(e).sort(P2));function wS(e){const t=Mb(e);return Object.assign(Object.values(t),t)}function VF(e){const t=Object.keys(Mb(e));return new Set(t)}function SS(e){var t;if(!e)return e;e=(t=Ey(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function Zu(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Ey(e)})`),t&&n.push("and",`(max-width: ${Ey(t)})`),n.join(" ")}function WF(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=wS(e),r=Object.entries(e).sort(P2).map(([s,d],a,c)=>{var l;let[,u]=(l=c[a+1])!=null?l:[];return u=parseFloat(u)>0?SS(u):void 0,{_minW:SS(d),breakpoint:s,minW:d,maxW:u,maxWQuery:Zu(null,u),minWQuery:Zu(d),minMaxQuery:Zu(d,u)}}),i=VF(e),o=Array.from(i.values());return{keys:i,normalized:n,isResponsive(s){const d=Object.keys(s);return d.length>0&&d.every(a=>i.has(a))},asObject:Mb(e),asArray:wS(e),details:r,get(s){return r.find(d=>d.breakpoint===s)},media:[null,...n.map(s=>Zu(s)).slice(1)],toArrayValue(s){if(!dr(s))throw new Error("toArrayValue: value must be an object");const d=o.map(a=>{var c;return(c=s[a])!=null?c:null});for(;jF(d)===null;)d.pop();return d},toObjectValue(s){if(!Array.isArray(s))throw new Error("toObjectValue: value must be an array");return s.reduce((d,a,c)=>{const l=o[c];return l!=null&&a!=null&&(d[l]=a),d},{})}}}var Cn={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Yo=e=>I2(t=>e(t,"&"),"[role=group]","[data-group]",".group"),uo=e=>I2(t=>e(t,"~ &"),"[data-peer]",".peer"),I2=(e,...t)=>t.map(e).join(", "),gg={_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",_firstLetter:"&::first-letter",_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:Yo(Cn.hover),_peerHover:uo(Cn.hover),_groupFocus:Yo(Cn.focus),_peerFocus:uo(Cn.focus),_groupFocusVisible:Yo(Cn.focusVisible),_peerFocusVisible:uo(Cn.focusVisible),_groupActive:Yo(Cn.active),_peerActive:uo(Cn.active),_groupDisabled:Yo(Cn.disabled),_peerDisabled:uo(Cn.disabled),_groupInvalid:Yo(Cn.invalid),_peerInvalid:uo(Cn.invalid),_groupChecked:Yo(Cn.checked),_peerChecked:uo(Cn.checked),_groupFocusWithin:Yo(Cn.focusWithin),_peerFocusWithin:uo(Cn.focusWithin),_peerPlaceholderShown:uo(Cn.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},O2=Object.keys(gg);function xS(e,t){return et(String(e).replace(/\./g,"-"),void 0,t)}function UF(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:s,value:d}=o,{variable:a,reference:c}=xS(i,t==null?void 0:t.cssVarPrefix);if(!s){if(i.startsWith("space")){const h=i.split("."),[f,...p]=h,g=`${f}.-${p.join(".")}`,b=Ja.negate(d),x=Ja.negate(c);r[g]={value:b,var:a,varRef:x}}n[a]=d,r[i]={value:d,var:a,varRef:c};continue}const l=h=>{const p=[String(i).split(".")[0],h].join(".");if(!e[p])return h;const{reference:b}=xS(p,t==null?void 0:t.cssVarPrefix);return b},u=dr(d)?d:{default:d};n=Yr(n,Object.entries(u).reduce((h,[f,p])=>{var g,b;if(!p)return h;const x=l(`${p}`);if(f==="default")return h[a]=x,h;const S=(b=(g=gg)==null?void 0:g[f])!=null?b:f;return h[S]={[a]:x},h},{})),r[i]={value:c,var:a,varRef:c}}return{cssVars:n,cssMap:r}}function GF(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function KF(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function qF(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function _S(e,t,n={}){const{stop:r,getKey:i}=n;function o(s,d=[]){var a;if(qF(s)||Array.isArray(s)){const c={};for(const[l,u]of Object.entries(s)){const h=(a=i==null?void 0:i(l))!=null?a:l,f=[...d,h];if(r!=null&&r(s,f))return t(s,d);c[h]=o(u,f)}return c}return t(s,d)}return o(e)}var YF=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function XF(e){return KF(e,YF)}function QF(e){return e.semanticTokens}function ZF(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}var JF=e=>O2.includes(e)||e==="default";function eD({tokens:e,semanticTokens:t}){const n={};return _S(e,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!1,value:r})}),_S(t,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!0,value:r})},{stop:r=>Object.keys(r).every(JF)}),n}function tD(e){var t;const n=ZF(e),r=XF(n),i=QF(n),o=eD({tokens:r,semanticTokens:i}),s=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:d,cssVars:a}=UF(o,{cssVarPrefix:s});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"},...a},__cssMap:d,__breakpoints:WF(n.breakpoints)}),n}var Lb=Yr({},Uf,Et,vF,qh,Vr,yF,$F,bF,L2,EF,yc,Cy,Bt,RF,LF,TF,AF,wF,MF),nD=Object.assign({},Bt,Vr,qh,L2,yc),rD=Object.keys(nD),iD=[...Object.keys(Lb),...O2],oD={...Lb,...gg},aD=e=>e in oD,sD=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const s in e){let d=da(e[s],t);if(d==null)continue;if(d=dr(d)&&n(d)?r(d):d,!Array.isArray(d)){o[s]=d;continue}const a=d.slice(0,i.length).length;for(let c=0;c<a;c+=1){const l=i==null?void 0:i[c];if(!l){o[s]=d[c];continue}o[l]=o[l]||{},d[c]!=null&&(o[l][s]=d[c])}}return o};function lD(e){const t=[];let n="",r=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(r=!0,n+=o):o===")"?(r=!1,n+=o):o===","&&!r?(t.push(n),n=""):n+=o}return n=n.trim(),n&&t.push(n),t}function uD(e){return/^var\(--.+\)$/.test(e)}var cD=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!uD(t),dD=(e,t)=>{var n,r;if(t==null)return t;const i=a=>{var c,l;return(l=(c=e.__cssMap)==null?void 0:c[a])==null?void 0:l.varRef},o=a=>{var c;return(c=i(a))!=null?c:a},[s,d]=lD(t);return t=(r=(n=i(s))!=null?n:o(d))!=null?r:o(t),t};function fD(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,s=!1)=>{var d,a,c;const l=da(o,r),u=sD(l)(r);let h={};for(let f in u){const p=u[f];let g=da(p,r);f in n&&(f=n[f]),cD(f,g)&&(g=dD(r,g));let b=t[f];if(b===!0&&(b={property:f}),dr(g)){h[f]=(d=h[f])!=null?d:{},h[f]=Yr({},h[f],i(g,!0));continue}let x=(c=(a=b==null?void 0:b.transform)==null?void 0:a.call(b,g,r,l))!=null?c:g;x=b!=null&&b.processResult?i(x,!0):x;const S=da(b==null?void 0:b.property,r);if(!s&&(b!=null&&b.static)){const T=da(b.static,r);h=Yr({},h,T)}if(S&&Array.isArray(S)){for(const T of S)h[T]=x;continue}if(S){S==="&"&&dr(x)?h=Yr({},h,x):h[S]=x;continue}if(dr(x)){h=Yr({},h,x);continue}h[f]=x}return h};return i}var F2=e=>t=>fD({theme:t,pseudos:gg,configs:Lb})(e);function Ct(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function hD(e,t){if(Array.isArray(e))return e;if(dr(e))return t(e);if(e!=null)return[e]}function pD(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function gD(e){const t=e.__breakpoints;return function(r,i,o,s){var d,a;if(!t)return;const c={},l=hD(o,t.toArrayValue);if(!l)return c;const u=l.length,h=u===1,f=!!r.parts;for(let p=0;p<u;p++){const g=t.details[p],b=t.details[pD(l,p)],x=Zu(g.minW,b==null?void 0:b._minW),S=da((d=r[i])==null?void 0:d[l[p]],s);if(S){if(f){(a=r.parts)==null||a.forEach(T=>{Yr(c,{[T]:h?S[T]:{[x]:S[T]}})});continue}if(!f){h?Yr(c,S):c[x]=S;continue}c[x]=S}}return c}}function mD(e){return t=>{var n;const{variant:r,size:i,theme:o}=t,s=gD(o);return Yr({},da((n=e.baseStyle)!=null?n:{},t),s(e,"sizes",i,t),s(e,"variants",r,t))}}function vD(e,t,n){var r,i,o;return(o=(i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)!=null?o:n}function ei(e){return GF(e,["styleConfig","size","variant","colorScheme"])}var yD=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function bD(e){return dr(e)?yD.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var wD={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"},SD={"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)"},xD={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},_D={property:wD,easing:SD,duration:xD},CD=_D,kD={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},ED=kD,$D={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},TD=$D,AD={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},MD=AD,LD={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"}},RD=LD,PD={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},ID=PD,OD={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"},FD=OD,DD={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},ND=DD,zD={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"}},D2=zD,N2={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"},BD={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"},jD={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},HD={...N2,...BD,container:jD},z2=HD,VD={breakpoints:MD,zIndices:ED,radii:ID,blur:ND,colors:RD,...D2,sizes:z2,shadows:FD,space:N2,borders:TD,transition:CD},{defineMultiStyleConfig:WD,definePartsStyle:Ju}=Ct(["stepper","step","title","description","indicator","separator","icon","number"]),po=et("stepper-indicator-size"),Tl=et("stepper-icon-size"),Al=et("stepper-title-font-size"),ec=et("stepper-description-font-size"),zu=et("stepper-accent-color"),UD=Ju(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[zu.variable]:`colors.${e}.500`,_dark:{[zu.variable]:`colors.${e}.200`}},title:{fontSize:Al.reference,fontWeight:"medium"},description:{fontSize:ec.reference,color:"chakra-subtle-text"},number:{fontSize:Al.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:Tl.reference,height:Tl.reference},indicator:{flexShrink:0,borderRadius:"full",width:po.reference,height:po.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:zu.reference},"&[data-status=complete]":{bg:zu.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:zu.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${po.reference} - 8px)`,top:`calc(${po.reference} + 4px)`,insetStart:`calc(${po.reference} / 2 - 1px)`}}})),GD=WD({baseStyle:UD,sizes:{xs:Ju({stepper:{[po.variable]:"sizes.4",[Tl.variable]:"sizes.3",[Al.variable]:"fontSizes.xs",[ec.variable]:"fontSizes.xs"}}),sm:Ju({stepper:{[po.variable]:"sizes.6",[Tl.variable]:"sizes.4",[Al.variable]:"fontSizes.sm",[ec.variable]:"fontSizes.xs"}}),md:Ju({stepper:{[po.variable]:"sizes.8",[Tl.variable]:"sizes.5",[Al.variable]:"fontSizes.md",[ec.variable]:"fontSizes.sm"}}),lg:Ju({stepper:{[po.variable]:"sizes.10",[Tl.variable]:"sizes.6",[Al.variable]:"fontSizes.lg",[ec.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function Rt(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...l){r();for(const u of l)t[u]=a(u);return Rt(e,t)}function o(...l){for(const u of l)u in t||(t[u]=a(u));return Rt(e,t)}function s(){return Object.fromEntries(Object.entries(t).map(([u,h])=>[u,h.selector]))}function d(){return Object.fromEntries(Object.entries(t).map(([u,h])=>[u,h.className]))}function a(l){const f=`chakra-${(["container","root"].includes(l??"")?[e]:[e,l]).filter(Boolean).join("__")}`;return{className:f,selector:`.${f}`,toString:()=>l}}return{parts:i,toPart:a,extend:o,selectors:s,classnames:d,get keys(){return Object.keys(t)},__type:{}}}var KD=Rt("accordion").parts("root","container","button","panel").extend("icon"),qD=Rt("alert").parts("title","description","container").extend("icon","spinner"),YD=Rt("avatar").parts("label","badge","container").extend("excessLabel","group"),XD=Rt("breadcrumb").parts("link","item","container").extend("separator");Rt("button").parts();var B2=Rt("checkbox").parts("control","icon","container").extend("label");Rt("progress").parts("track","filledTrack").extend("label");var QD=Rt("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),ZD=Rt("editable").parts("preview","input","textarea"),JD=Rt("form").parts("container","requiredIndicator","helperText"),eN=Rt("formError").parts("text","icon"),j2=Rt("input").parts("addon","field","element"),tN=Rt("list").parts("container","item","icon"),nN=Rt("menu").parts("button","list","item").extend("groupTitle","command","divider"),H2=Rt("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),V2=Rt("numberinput").parts("root","field","stepperGroup","stepper");Rt("pininput").parts("field");var rN=Rt("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),iN=Rt("progress").parts("label","filledTrack","track"),W2=Rt("radio").parts("container","control","label"),oN=Rt("select").parts("field","icon"),aN=Rt("slider").parts("container","track","thumb","filledTrack","mark"),sN=Rt("stat").parts("container","label","helpText","number","icon"),lN=Rt("switch").parts("container","track","thumb"),uN=Rt("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),U2=Rt("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),cN=Rt("tag").parts("container","label","closeButton"),dN=Rt("card").parts("container","header","body","footer");function os(e,t,n){return Math.min(Math.max(e,n),t)}class fN extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var tc=fN;function Rb(e){if(typeof e!="string")throw new tc(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=wN.test(e)?gN(e):e;const n=mN.exec(t);if(n){const s=Array.from(n).slice(1);return[...s.slice(0,3).map(d=>parseInt(td(d,2),16)),parseInt(td(s[3]||"f",2),16)/255]}const r=vN.exec(t);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(d=>parseInt(d,16)),parseInt(s[3]||"ff",16)/255]}const i=yN.exec(t);if(i){const s=Array.from(i).slice(1);return[...s.slice(0,3).map(d=>parseInt(d,10)),parseFloat(s[3]||"1")]}const o=bN.exec(t);if(o){const[s,d,a,c]=Array.from(o).slice(1).map(parseFloat);if(os(0,100,d)!==d)throw new tc(e);if(os(0,100,a)!==a)throw new tc(e);return[...SN(s,d,a),Number.isNaN(c)?1:c]}throw new tc(e)}function hN(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const CS=e=>parseInt(e.replace(/_/g,""),36),pN="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=CS(t.substring(0,3)),r=CS(t.substring(3)).toString(16);let i="";for(let o=0;o<6-r.length;o++)i+="0";return e[n]=`${i}${r}`,e},{});function gN(e){const t=e.toLowerCase().trim(),n=pN[hN(t)];if(!n)throw new tc(e);return`#${n}`}const td=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),mN=new RegExp(`^#${td("([a-f0-9])",3)}([a-f0-9])?$`,"i"),vN=new RegExp(`^#${td("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),yN=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${td(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),bN=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,wN=/^[a-z]+$/i,kS=e=>Math.round(e*255),SN=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(kS);const i=(e%360+360)%360/60,o=(1-Math.abs(2*r-1))*(t/100),s=o*(1-Math.abs(i%2-1));let d=0,a=0,c=0;i>=0&&i<1?(d=o,a=s):i>=1&&i<2?(d=s,a=o):i>=2&&i<3?(a=o,c=s):i>=3&&i<4?(a=s,c=o):i>=4&&i<5?(d=s,c=o):i>=5&&i<6&&(d=o,c=s);const l=r-o/2,u=d+l,h=a+l,f=c+l;return[u,h,f].map(kS)};function xN(e,t,n,r){return`rgba(${os(0,255,e).toFixed()}, ${os(0,255,t).toFixed()}, ${os(0,255,n).toFixed()}, ${parseFloat(os(0,1,r).toFixed(3))})`}function _N(e,t){const[n,r,i,o]=Rb(e);return xN(n,r,i,o-t)}function CN(e){const[t,n,r,i]=Rb(e);let o=s=>{const d=os(0,255,s).toString(16);return d.length===1?`0${d}`:d};return`#${o(t)}${o(n)}${o(r)}${i<1?o(Math.round(i*255)):""}`}function kN(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var EN=e=>Object.keys(e).length===0,Yh=(e,t,n)=>{const r=kN(e,`colors.${t}`,t);try{return CN(r),r}catch{return n??"#000000"}},mi=(e,t,n)=>{var r;return(r=vD(e,"colors",t))!=null?r:n},$N=e=>{const[t,n,r]=Rb(e);return(t*299+n*587+r*114)/1e3},TN=e=>t=>{const n=Yh(t,e);return $N(n)<128?"dark":"light"},AN=e=>t=>TN(e)(t)==="dark",cu=(e,t)=>n=>{const r=Yh(n,e);return _N(r,1-t)};function ES(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
|
||
45deg,
|
||
${t} 25%,
|
||
transparent 25%,
|
||
transparent 50%,
|
||
${t} 50%,
|
||
${t} 75%,
|
||
transparent 75%,
|
||
transparent
|
||
)`,backgroundSize:`${e} ${e}`}}var MN=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function LN(e){const t=MN();return!e||EN(e)?t:e.string&&e.colors?PN(e.string,e.colors):e.string&&!e.colors?RN(e.string):e.colors&&!e.string?IN(e.colors):t}function RN(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t=t&t;let n="#";for(let r=0;r<3;r+=1){const i=t>>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function PN(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n=n&n;return n=(n%t.length+t.length)%t.length,t[n]}function IN(e){return e[Math.floor(Math.random()*e.length)]}function Ue(e,t){return n=>n.colorMode==="dark"?t:e}function Pb(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function G2(e){return dr(e)&&e.reference?e.reference:String(e)}var mg=(e,...t)=>t.map(G2).join(` ${e} `).replace(/calc/g,""),$S=(...e)=>`calc(${mg("+",...e)})`,TS=(...e)=>`calc(${mg("-",...e)})`,$y=(...e)=>`calc(${mg("*",...e)})`,AS=(...e)=>`calc(${mg("/",...e)})`,MS=e=>{const t=G2(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:$y(t,-1)},go=Object.assign(e=>({add:(...t)=>go($S(e,...t)),subtract:(...t)=>go(TS(e,...t)),multiply:(...t)=>go($y(e,...t)),divide:(...t)=>go(AS(e,...t)),negate:()=>go(MS(e)),toString:()=>e.toString()}),{add:$S,subtract:TS,multiply:$y,divide:AS,negate:MS});function ON(e){return!Number.isInteger(parseFloat(e.toString()))}function FN(e,t="-"){return e.replace(/\s+/g,t)}function K2(e){const t=FN(e.toString());return t.includes("\\.")?e:ON(e)?t.replace(".","\\."):e}function DN(e,t=""){return[t,K2(e)].filter(Boolean).join("-")}function NN(e,t){return`var(${K2(e)}${t?`, ${t}`:""})`}function zN(e,t=""){return`--${DN(e,t)}`}function gn(e,t){const n=zN(e,t==null?void 0:t.prefix);return{variable:n,reference:NN(n,BN(t==null?void 0:t.fallback))}}function BN(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:jN,definePartsStyle:Gf}=Ct(lN.keys),bc=gn("switch-track-width"),fs=gn("switch-track-height"),Em=gn("switch-track-diff"),HN=go.subtract(bc,fs),Ty=gn("switch-thumb-x"),Bu=gn("switch-bg"),VN=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[bc.reference],height:[fs.reference],transitionProperty:"common",transitionDuration:"fast",[Bu.variable]:"colors.gray.300",_dark:{[Bu.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Bu.variable]:`colors.${t}.500`,_dark:{[Bu.variable]:`colors.${t}.200`}},bg:Bu.reference}},WN={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[fs.reference],height:[fs.reference],_checked:{transform:`translateX(${Ty.reference})`}},UN=Gf(e=>({container:{[Em.variable]:HN,[Ty.variable]:Em.reference,_rtl:{[Ty.variable]:go(Em).negate().toString()}},track:VN(e),thumb:WN})),GN={sm:Gf({container:{[bc.variable]:"1.375rem",[fs.variable]:"sizes.3"}}),md:Gf({container:{[bc.variable]:"1.875rem",[fs.variable]:"sizes.4"}}),lg:Gf({container:{[bc.variable]:"2.875rem",[fs.variable]:"sizes.6"}})},KN=jN({baseStyle:UN,sizes:GN,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:qN,definePartsStyle:Vl}=Ct(uN.keys),YN=Vl({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"}}),Xh={"&[data-is-numeric=true]":{textAlign:"end"}},XN=Vl(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...Xh},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...Xh},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),QN=Vl(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...Xh},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...Xh},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),ZN={simple:XN,striped:QN,unstyled:{}},JN={sm:Vl({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:Vl({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Vl({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},e4=qN({baseStyle:YN,variants:ZN,sizes:JN,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),or=et("tabs-color"),pi=et("tabs-bg"),lf=et("tabs-border-color"),{defineMultiStyleConfig:t4,definePartsStyle:Ui}=Ct(U2.keys),n4=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},r4=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}}},i4=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},o4={p:4},a4=Ui(e=>({root:n4(e),tab:r4(e),tablist:i4(e),tabpanel:o4})),s4={sm:Ui({tab:{py:1,px:4,fontSize:"sm"}}),md:Ui({tab:{fontSize:"md",py:2,px:4}}),lg:Ui({tab:{fontSize:"lg",py:3,px:4}})},l4=Ui(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=r?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[or.variable]:`colors.${t}.600`,_dark:{[or.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[pi.variable]:"colors.gray.200",_dark:{[pi.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:or.reference,bg:pi.reference}}}),u4=Ui(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[lf.variable]:"transparent",_selected:{[or.variable]:`colors.${t}.600`,[lf.variable]:"colors.white",_dark:{[or.variable]:`colors.${t}.300`,[lf.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:lf.reference},color:or.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),c4=Ui(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[pi.variable]:"colors.gray.50",_dark:{[pi.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[pi.variable]:"colors.white",[or.variable]:`colors.${t}.600`,_dark:{[pi.variable]:"colors.gray.800",[or.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:or.reference,bg:pi.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),d4=Ui(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Yh(n,`${t}.700`),bg:Yh(n,`${t}.100`)}}}}),f4=Ui(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[or.variable]:"colors.gray.600",_dark:{[or.variable]:"inherit"},_selected:{[or.variable]:"colors.white",[pi.variable]:`colors.${t}.600`,_dark:{[or.variable]:"colors.gray.800",[pi.variable]:`colors.${t}.300`}},color:or.reference,bg:pi.reference}}}),h4=Ui({}),p4={line:l4,enclosed:u4,"enclosed-colored":c4,"soft-rounded":d4,"solid-rounded":f4,unstyled:h4},g4=t4({baseStyle:a4,sizes:s4,variants:p4,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),rn=BF("badge",["bg","color","shadow"]),m4={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:rn.bg.reference,color:rn.color.reference,boxShadow:rn.shadow.reference},v4=e=>{const{colorScheme:t,theme:n}=e,r=cu(`${t}.500`,.6)(n);return{[rn.bg.variable]:`colors.${t}.500`,[rn.color.variable]:"colors.white",_dark:{[rn.bg.variable]:r,[rn.color.variable]:"colors.whiteAlpha.800"}}},y4=e=>{const{colorScheme:t,theme:n}=e,r=cu(`${t}.200`,.16)(n);return{[rn.bg.variable]:`colors.${t}.100`,[rn.color.variable]:`colors.${t}.800`,_dark:{[rn.bg.variable]:r,[rn.color.variable]:`colors.${t}.200`}}},b4=e=>{const{colorScheme:t,theme:n}=e,r=cu(`${t}.200`,.8)(n);return{[rn.color.variable]:`colors.${t}.500`,_dark:{[rn.color.variable]:r},[rn.shadow.variable]:`inset 0 0 0px 1px ${rn.color.reference}`}},w4={solid:v4,subtle:y4,outline:b4},wc={baseStyle:m4,variants:w4,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:S4,definePartsStyle:hs}=Ct(cN.keys),LS=et("tag-bg"),RS=et("tag-color"),$m=et("tag-shadow"),Kf=et("tag-min-height"),qf=et("tag-min-width"),Yf=et("tag-font-size"),Xf=et("tag-padding-inline"),x4={fontWeight:"medium",lineHeight:1.2,outline:0,[RS.variable]:rn.color.reference,[LS.variable]:rn.bg.reference,[$m.variable]:rn.shadow.reference,color:RS.reference,bg:LS.reference,boxShadow:$m.reference,borderRadius:"md",minH:Kf.reference,minW:qf.reference,fontSize:Yf.reference,px:Xf.reference,_focusVisible:{[$m.variable]:"shadows.outline"}},_4={lineHeight:1.2,overflow:"visible"},C4={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}},k4=hs({container:x4,label:_4,closeButton:C4}),E4={sm:hs({container:{[Kf.variable]:"sizes.5",[qf.variable]:"sizes.5",[Yf.variable]:"fontSizes.xs",[Xf.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:hs({container:{[Kf.variable]:"sizes.6",[qf.variable]:"sizes.6",[Yf.variable]:"fontSizes.sm",[Xf.variable]:"space.2"}}),lg:hs({container:{[Kf.variable]:"sizes.8",[qf.variable]:"sizes.8",[Yf.variable]:"fontSizes.md",[Xf.variable]:"space.3"}})},$4={subtle:hs(e=>{var t;return{container:(t=wc.variants)==null?void 0:t.subtle(e)}}),solid:hs(e=>{var t;return{container:(t=wc.variants)==null?void 0:t.solid(e)}}),outline:hs(e=>{var t;return{container:(t=wc.variants)==null?void 0:t.outline(e)}})},T4=S4({variants:$4,baseStyle:k4,sizes:E4,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:yo,defineMultiStyleConfig:A4}=Ct(j2.keys),M4=yo({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Xo={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"}},L4={lg:yo({field:Xo.lg,addon:Xo.lg}),md:yo({field:Xo.md,addon:Xo.md}),sm:yo({field:Xo.sm,addon:Xo.sm}),xs:yo({field:Xo.xs,addon:Xo.xs})};function Ib(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var R4=yo(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Ib(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:mi(t,r),boxShadow:`0 0 0 1px ${mi(t,r)}`},_focusVisible:{zIndex:1,borderColor:mi(t,n),boxShadow:`0 0 0 1px ${mi(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),P4=yo(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Ib(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:mi(t,r)},_focusVisible:{bg:"transparent",borderColor:mi(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),I4=yo(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Ib(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:mi(t,r),boxShadow:`0px 1px 0px 0px ${mi(t,r)}`},_focusVisible:{borderColor:mi(t,n),boxShadow:`0px 1px 0px 0px ${mi(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),O4=yo({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),F4={outline:R4,filled:P4,flushed:I4,unstyled:O4},At=A4({baseStyle:M4,sizes:L4,variants:F4,defaultProps:{size:"md",variant:"outline"}}),PS,D4={...(PS=At.baseStyle)==null?void 0:PS.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},IS,OS,N4={outline:e=>{var t,n;return(n=(t=At.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=At.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=At.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(OS=(IS=At.variants)==null?void 0:IS.unstyled.field)!=null?OS:{}},FS,DS,NS,zS,BS,jS,HS,VS,z4={xs:(DS=(FS=At.sizes)==null?void 0:FS.xs.field)!=null?DS:{},sm:(zS=(NS=At.sizes)==null?void 0:NS.sm.field)!=null?zS:{},md:(jS=(BS=At.sizes)==null?void 0:BS.md.field)!=null?jS:{},lg:(VS=(HS=At.sizes)==null?void 0:HS.lg.field)!=null?VS:{}},B4={baseStyle:D4,sizes:z4,variants:N4,defaultProps:{size:"md",variant:"outline"}},uf=gn("tooltip-bg"),Tm=gn("tooltip-fg"),j4=gn("popper-arrow-bg"),H4={bg:uf.reference,color:Tm.reference,[uf.variable]:"colors.gray.700",[Tm.variable]:"colors.whiteAlpha.900",_dark:{[uf.variable]:"colors.gray.300",[Tm.variable]:"colors.gray.900"},[j4.variable]:uf.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},V4={baseStyle:H4},{defineMultiStyleConfig:W4,definePartsStyle:nc}=Ct(iN.keys),U4=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(ES(),ES("1rem","rgba(0,0,0,0.1)"))(e),s=Ue(`${t}.500`,`${t}.200`)(e),d=`linear-gradient(
|
||
to right,
|
||
transparent 0%,
|
||
${mi(n,s)} 50%,
|
||
transparent 100%
|
||
)`;return{...!r&&i&&o,...r?{bgImage:d}:{bgColor:s}}},G4={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},K4=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),q4=e=>({transitionProperty:"common",transitionDuration:"slow",...U4(e)}),Y4=nc(e=>({label:G4,filledTrack:q4(e),track:K4(e)})),X4={xs:nc({track:{h:"1"}}),sm:nc({track:{h:"2"}}),md:nc({track:{h:"3"}}),lg:nc({track:{h:"4"}})},Q4=W4({sizes:X4,baseStyle:Y4,defaultProps:{size:"md",colorScheme:"blue"}}),Z4=e=>typeof e=="function";function Yn(e,...t){return Z4(e)?e(...t):e}var{definePartsStyle:Qf,defineMultiStyleConfig:J4}=Ct(B2.keys),Sc=et("checkbox-size"),e5=e=>{const{colorScheme:t}=e;return{w:Sc.reference,h:Sc.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},t5={_disabled:{cursor:"not-allowed"}},n5={userSelect:"none",_disabled:{opacity:.4}},r5={transitionProperty:"transform",transitionDuration:"normal"},i5=Qf(e=>({icon:r5,container:t5,control:Yn(e5,e),label:n5})),o5={sm:Qf({control:{[Sc.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:Qf({control:{[Sc.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:Qf({control:{[Sc.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},Qh=J4({baseStyle:i5,sizes:o5,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:a5,definePartsStyle:Zf}=Ct(W2.keys),s5=e=>{var t;const n=(t=Yn(Qh.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},l5=Zf(e=>{var t,n,r,i;return{label:(n=(t=Qh).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=Qh).baseStyle)==null?void 0:i.call(r,e).container,control:s5(e)}}),u5={md:Zf({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Zf({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Zf({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},c5=a5({baseStyle:l5,sizes:u5,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:d5,definePartsStyle:f5}=Ct(oN.keys),cf=et("select-bg"),WS,h5={...(WS=At.baseStyle)==null?void 0:WS.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:cf.reference,[cf.variable]:"colors.white",_dark:{[cf.variable]:"colors.gray.700"},"> option, > optgroup":{bg:cf.reference}},p5={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},g5=f5({field:h5,icon:p5}),df={paddingInlineEnd:"8"},US,GS,KS,qS,YS,XS,QS,ZS,m5={lg:{...(US=At.sizes)==null?void 0:US.lg,field:{...(GS=At.sizes)==null?void 0:GS.lg.field,...df}},md:{...(KS=At.sizes)==null?void 0:KS.md,field:{...(qS=At.sizes)==null?void 0:qS.md.field,...df}},sm:{...(YS=At.sizes)==null?void 0:YS.sm,field:{...(XS=At.sizes)==null?void 0:XS.sm.field,...df}},xs:{...(QS=At.sizes)==null?void 0:QS.xs,field:{...(ZS=At.sizes)==null?void 0:ZS.xs.field,...df},icon:{insetEnd:"1"}}},v5=d5({baseStyle:g5,sizes:m5,variants:At.variants,defaultProps:At.defaultProps}),Am=et("skeleton-start-color"),Mm=et("skeleton-end-color"),y5={[Am.variable]:"colors.gray.100",[Mm.variable]:"colors.gray.400",_dark:{[Am.variable]:"colors.gray.800",[Mm.variable]:"colors.gray.600"},background:Am.reference,borderColor:Mm.reference,opacity:.7,borderRadius:"sm"},b5={baseStyle:y5},Lm=et("skip-link-bg"),w5={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Lm.variable]:"colors.white",_dark:{[Lm.variable]:"colors.gray.700"},bg:Lm.reference}},S5={baseStyle:w5},{defineMultiStyleConfig:x5,definePartsStyle:vg}=Ct(aN.keys),nd=et("slider-thumb-size"),rd=et("slider-track-size"),la=et("slider-bg"),_5=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...Pb({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},C5=e=>({...Pb({orientation:e.orientation,horizontal:{h:rd.reference},vertical:{w:rd.reference}}),overflow:"hidden",borderRadius:"sm",[la.variable]:"colors.gray.200",_dark:{[la.variable]:"colors.whiteAlpha.200"},_disabled:{[la.variable]:"colors.gray.300",_dark:{[la.variable]:"colors.whiteAlpha.300"}},bg:la.reference}),k5=e=>{const{orientation:t}=e;return{...Pb({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:nd.reference,h:nd.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"}}},E5=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[la.variable]:`colors.${t}.500`,_dark:{[la.variable]:`colors.${t}.200`},bg:la.reference}},$5=vg(e=>({container:_5(e),track:C5(e),thumb:k5(e),filledTrack:E5(e)})),T5=vg({container:{[nd.variable]:"sizes.4",[rd.variable]:"sizes.1"}}),A5=vg({container:{[nd.variable]:"sizes.3.5",[rd.variable]:"sizes.1"}}),M5=vg({container:{[nd.variable]:"sizes.2.5",[rd.variable]:"sizes.0.5"}}),L5={lg:T5,md:A5,sm:M5},R5=x5({baseStyle:$5,sizes:L5,defaultProps:{size:"md",colorScheme:"blue"}}),es=gn("spinner-size"),P5={width:[es.reference],height:[es.reference]},I5={xs:{[es.variable]:"sizes.3"},sm:{[es.variable]:"sizes.4"},md:{[es.variable]:"sizes.6"},lg:{[es.variable]:"sizes.8"},xl:{[es.variable]:"sizes.12"}},O5={baseStyle:P5,sizes:I5,defaultProps:{size:"md"}},{defineMultiStyleConfig:F5,definePartsStyle:q2}=Ct(sN.keys),D5={fontWeight:"medium"},N5={opacity:.8,marginBottom:"2"},z5={verticalAlign:"baseline",fontWeight:"semibold"},B5={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},j5=q2({container:{},label:D5,helpText:N5,number:z5,icon:B5}),H5={md:q2({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},V5=F5({baseStyle:j5,sizes:H5,defaultProps:{size:"md"}}),Rm=et("kbd-bg"),W5={[Rm.variable]:"colors.gray.100",_dark:{[Rm.variable]:"colors.whiteAlpha.100"},bg:Rm.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},U5={baseStyle:W5},G5={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},K5={baseStyle:G5},{defineMultiStyleConfig:q5,definePartsStyle:Y5}=Ct(tN.keys),X5={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Q5=Y5({icon:X5}),Z5=q5({baseStyle:Q5}),{defineMultiStyleConfig:J5,definePartsStyle:ez}=Ct(nN.keys),Oi=et("menu-bg"),Pm=et("menu-shadow"),tz={[Oi.variable]:"#fff",[Pm.variable]:"shadows.sm",_dark:{[Oi.variable]:"colors.gray.700",[Pm.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Oi.reference,boxShadow:Pm.reference},nz={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Oi.variable]:"colors.gray.100",_dark:{[Oi.variable]:"colors.whiteAlpha.100"}},_active:{[Oi.variable]:"colors.gray.200",_dark:{[Oi.variable]:"colors.whiteAlpha.200"}},_expanded:{[Oi.variable]:"colors.gray.100",_dark:{[Oi.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Oi.reference},rz={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},iz={opacity:.6},oz={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},az={transitionProperty:"common",transitionDuration:"normal"},sz=ez({button:az,list:tz,item:nz,groupTitle:rz,command:iz,divider:oz}),lz=J5({baseStyle:sz}),{defineMultiStyleConfig:uz,definePartsStyle:Ay}=Ct(H2.keys),Im=et("modal-bg"),Om=et("modal-shadow"),cz={bg:"blackAlpha.600",zIndex:"modal"},dz=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},fz=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:n==="inside"?"calc(100% - 7.5rem)":void 0,[Im.variable]:"colors.white",[Om.variable]:"shadows.lg",_dark:{[Im.variable]:"colors.gray.700",[Om.variable]:"shadows.dark-lg"},bg:Im.reference,boxShadow:Om.reference}},hz={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},pz={position:"absolute",top:"2",insetEnd:"3"},gz=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},mz={px:"6",py:"4"},vz=Ay(e=>({overlay:cz,dialogContainer:Yn(dz,e),dialog:Yn(fz,e),header:hz,closeButton:pz,body:Yn(gz,e),footer:mz}));function ui(e){return Ay(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var yz={xs:ui("xs"),sm:ui("sm"),md:ui("md"),lg:ui("lg"),xl:ui("xl"),"2xl":ui("2xl"),"3xl":ui("3xl"),"4xl":ui("4xl"),"5xl":ui("5xl"),"6xl":ui("6xl"),full:ui("full")},bz=uz({baseStyle:vz,sizes:yz,defaultProps:{size:"md"}}),{defineMultiStyleConfig:wz,definePartsStyle:Y2}=Ct(V2.keys),Ob=gn("number-input-stepper-width"),X2=gn("number-input-input-padding"),Sz=go(Ob).add("0.5rem").toString(),Fm=gn("number-input-bg"),Dm=gn("number-input-color"),Nm=gn("number-input-border-color"),xz={[Ob.variable]:"sizes.6",[X2.variable]:Sz},_z=e=>{var t,n;return(n=(t=Yn(At.baseStyle,e))==null?void 0:t.field)!=null?n:{}},Cz={width:Ob.reference},kz={borderStart:"1px solid",borderStartColor:Nm.reference,color:Dm.reference,bg:Fm.reference,[Dm.variable]:"colors.chakra-body-text",[Nm.variable]:"colors.chakra-border-color",_dark:{[Dm.variable]:"colors.whiteAlpha.800",[Nm.variable]:"colors.whiteAlpha.300"},_active:{[Fm.variable]:"colors.gray.200",_dark:{[Fm.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Ez=Y2(e=>{var t;return{root:xz,field:(t=Yn(_z,e))!=null?t:{},stepperGroup:Cz,stepper:kz}});function ff(e){var t,n,r;const i=(t=At.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},s=(r=(n=i.field)==null?void 0:n.fontSize)!=null?r:"md",d=D2.fontSizes[s];return Y2({field:{...i.field,paddingInlineEnd:X2.reference,verticalAlign:"top"},stepper:{fontSize:go(d).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var $z={xs:ff("xs"),sm:ff("sm"),md:ff("md"),lg:ff("lg")},Tz=wz({baseStyle:Ez,sizes:$z,variants:At.variants,defaultProps:At.defaultProps}),JS,Az={...(JS=At.baseStyle)==null?void 0:JS.field,textAlign:"center"},Mz={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"}},ex,tx,Lz={outline:e=>{var t,n,r;return(r=(n=Yn((t=At.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=Yn((t=At.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=Yn((t=At.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(tx=(ex=At.variants)==null?void 0:ex.unstyled.field)!=null?tx:{}},Rz={baseStyle:Az,sizes:Mz,variants:Lz,defaultProps:At.defaultProps},{defineMultiStyleConfig:Pz,definePartsStyle:Iz}=Ct(rN.keys),hf=gn("popper-bg"),Oz=gn("popper-arrow-bg"),nx=gn("popper-arrow-shadow-color"),Fz={zIndex:10},Dz={[hf.variable]:"colors.white",bg:hf.reference,[Oz.variable]:hf.reference,[nx.variable]:"colors.gray.200",_dark:{[hf.variable]:"colors.gray.700",[nx.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Nz={px:3,py:2,borderBottomWidth:"1px"},zz={px:3,py:2},Bz={px:3,py:2,borderTopWidth:"1px"},jz={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Hz=Iz({popper:Fz,content:Dz,header:Nz,body:zz,footer:Bz,closeButton:jz}),Vz=Pz({baseStyle:Hz}),{definePartsStyle:My,defineMultiStyleConfig:Wz}=Ct(QD.keys),zm=et("drawer-bg"),Bm=et("drawer-box-shadow");function rl(e){return My(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Uz={bg:"blackAlpha.600",zIndex:"overlay"},Gz={display:"flex",zIndex:"modal",justifyContent:"center"},Kz=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[zm.variable]:"colors.white",[Bm.variable]:"shadows.lg",_dark:{[zm.variable]:"colors.gray.700",[Bm.variable]:"shadows.dark-lg"},bg:zm.reference,boxShadow:Bm.reference}},qz={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Yz={position:"absolute",top:"2",insetEnd:"3"},Xz={px:"6",py:"2",flex:"1",overflow:"auto"},Qz={px:"6",py:"4"},Zz=My(e=>({overlay:Uz,dialogContainer:Gz,dialog:Yn(Kz,e),header:qz,closeButton:Yz,body:Xz,footer:Qz})),Jz={xs:rl("xs"),sm:rl("md"),md:rl("lg"),lg:rl("2xl"),xl:rl("4xl"),full:rl("full")},e6=Wz({baseStyle:Zz,sizes:Jz,defaultProps:{size:"xs"}}),{definePartsStyle:t6,defineMultiStyleConfig:n6}=Ct(ZD.keys),r6={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},i6={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},o6={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},a6=t6({preview:r6,input:i6,textarea:o6}),s6=n6({baseStyle:a6}),{definePartsStyle:l6,defineMultiStyleConfig:u6}=Ct(JD.keys),Wl=et("form-control-color"),c6={marginStart:"1",[Wl.variable]:"colors.red.500",_dark:{[Wl.variable]:"colors.red.300"},color:Wl.reference},d6={mt:"2",[Wl.variable]:"colors.gray.600",_dark:{[Wl.variable]:"colors.whiteAlpha.600"},color:Wl.reference,lineHeight:"normal",fontSize:"sm"},f6=l6({container:{width:"100%",position:"relative"},requiredIndicator:c6,helperText:d6}),h6=u6({baseStyle:f6}),{definePartsStyle:p6,defineMultiStyleConfig:g6}=Ct(eN.keys),Ul=et("form-error-color"),m6={[Ul.variable]:"colors.red.500",_dark:{[Ul.variable]:"colors.red.300"},color:Ul.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},v6={marginEnd:"0.5em",[Ul.variable]:"colors.red.500",_dark:{[Ul.variable]:"colors.red.300"},color:Ul.reference},y6=p6({text:m6,icon:v6}),b6=g6({baseStyle:y6}),w6={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},S6={baseStyle:w6},x6={fontFamily:"heading",fontWeight:"bold"},_6={"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}},C6={baseStyle:x6,sizes:_6,defaultProps:{size:"xl"}},{defineMultiStyleConfig:k6,definePartsStyle:E6}=Ct(XD.keys),jm=et("breadcrumb-link-decor"),$6={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:jm.reference,[jm.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[jm.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},T6=E6({link:$6}),A6=k6({baseStyle:T6}),M6={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"}}},Q2=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("gray.800","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=cu(`${t}.200`,.12)(n),i=cu(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},L6=e=>{const{colorScheme:t}=e,n=Ue("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...Yn(Q2,e)}},R6={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},P6=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const a=Ue("gray.100","whiteAlpha.200")(e);return{bg:a,color:Ue("gray.800","whiteAlpha.900")(e),_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:a}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:i="white",hoverBg:o=`${n}.600`,activeBg:s=`${n}.700`}=(t=R6[n])!=null?t:{},d=Ue(r,`${n}.200`)(e);return{bg:d,color:Ue(i,"gray.800")(e),_hover:{bg:Ue(o,`${n}.300`)(e),_disabled:{bg:d}},_active:{bg:Ue(s,`${n}.400`)(e)}}},I6=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},O6={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},F6={ghost:Q2,outline:L6,solid:P6,link:I6,unstyled:O6},D6={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"}},N6={baseStyle:M6,variants:F6,sizes:D6,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:ps,defineMultiStyleConfig:z6}=Ct(dN.keys),Zh=et("card-bg"),xo=et("card-padding"),Z2=et("card-shadow"),Jf=et("card-radius"),J2=et("card-border-width","0"),e$=et("card-border-color"),B6=ps({container:{[Zh.variable]:"colors.chakra-body-bg",backgroundColor:Zh.reference,boxShadow:Z2.reference,borderRadius:Jf.reference,color:"chakra-body-text",borderWidth:J2.reference,borderColor:e$.reference},body:{padding:xo.reference,flex:"1 1 0%"},header:{padding:xo.reference},footer:{padding:xo.reference}}),j6={sm:ps({container:{[Jf.variable]:"radii.base",[xo.variable]:"space.3"}}),md:ps({container:{[Jf.variable]:"radii.md",[xo.variable]:"space.5"}}),lg:ps({container:{[Jf.variable]:"radii.xl",[xo.variable]:"space.7"}})},H6={elevated:ps({container:{[Z2.variable]:"shadows.base",_dark:{[Zh.variable]:"colors.gray.700"}}}),outline:ps({container:{[J2.variable]:"1px",[e$.variable]:"colors.chakra-border-color"}}),filled:ps({container:{[Zh.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[xo.variable]:0},header:{[xo.variable]:0},footer:{[xo.variable]:0}}},V6=z6({baseStyle:B6,variants:H6,sizes:j6,defaultProps:{variant:"elevated",size:"md"}}),xc=gn("close-button-size"),ju=gn("close-button-bg"),W6={w:[xc.reference],h:[xc.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[ju.variable]:"colors.blackAlpha.100",_dark:{[ju.variable]:"colors.whiteAlpha.100"}},_active:{[ju.variable]:"colors.blackAlpha.200",_dark:{[ju.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:ju.reference},U6={lg:{[xc.variable]:"sizes.10",fontSize:"md"},md:{[xc.variable]:"sizes.8",fontSize:"xs"},sm:{[xc.variable]:"sizes.6",fontSize:"2xs"}},G6={baseStyle:W6,sizes:U6,defaultProps:{size:"md"}},{variants:K6,defaultProps:q6}=wc,Y6={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:rn.bg.reference,color:rn.color.reference,boxShadow:rn.shadow.reference},X6={baseStyle:Y6,variants:K6,defaultProps:q6},Q6={w:"100%",mx:"auto",maxW:"prose",px:"4"},Z6={baseStyle:Q6},J6={opacity:.6,borderColor:"inherit"},eB={borderStyle:"solid"},tB={borderStyle:"dashed"},nB={solid:eB,dashed:tB},rB={baseStyle:J6,variants:nB,defaultProps:{variant:"solid"}},{definePartsStyle:iB,defineMultiStyleConfig:oB}=Ct(KD.keys),aB={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},sB={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},lB={pt:"2",px:"4",pb:"5"},uB={fontSize:"1.25em"},cB=iB({container:aB,button:sB,panel:lB,icon:uB}),dB=oB({baseStyle:cB}),{definePartsStyle:xd,defineMultiStyleConfig:fB}=Ct(qD.keys),_r=et("alert-fg"),Ao=et("alert-bg"),hB=xd({container:{bg:Ao.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:_r.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:_r.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function Fb(e){const{theme:t,colorScheme:n}=e,r=cu(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var pB=xd(e=>{const{colorScheme:t}=e,n=Fb(e);return{container:{[_r.variable]:`colors.${t}.500`,[Ao.variable]:n.light,_dark:{[_r.variable]:`colors.${t}.200`,[Ao.variable]:n.dark}}}}),gB=xd(e=>{const{colorScheme:t}=e,n=Fb(e);return{container:{[_r.variable]:`colors.${t}.500`,[Ao.variable]:n.light,_dark:{[_r.variable]:`colors.${t}.200`,[Ao.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:_r.reference}}}),mB=xd(e=>{const{colorScheme:t}=e,n=Fb(e);return{container:{[_r.variable]:`colors.${t}.500`,[Ao.variable]:n.light,_dark:{[_r.variable]:`colors.${t}.200`,[Ao.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:_r.reference}}}),vB=xd(e=>{const{colorScheme:t}=e;return{container:{[_r.variable]:"colors.white",[Ao.variable]:`colors.${t}.500`,_dark:{[_r.variable]:"colors.gray.900",[Ao.variable]:`colors.${t}.200`},color:_r.reference}}}),yB={subtle:pB,"left-accent":gB,"top-accent":mB,solid:vB},bB=fB({baseStyle:hB,variants:yB,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:t$,defineMultiStyleConfig:wB}=Ct(YD.keys),Gl=et("avatar-border-color"),_c=et("avatar-bg"),id=et("avatar-font-size"),du=et("avatar-size"),SB={borderRadius:"full",border:"0.2em solid",borderColor:Gl.reference,[Gl.variable]:"white",_dark:{[Gl.variable]:"colors.gray.800"}},xB={bg:_c.reference,fontSize:id.reference,width:du.reference,height:du.reference,lineHeight:"1",[_c.variable]:"colors.gray.200",_dark:{[_c.variable]:"colors.whiteAlpha.400"}},_B=e=>{const{name:t,theme:n}=e,r=t?LN({string:t}):"colors.gray.400",i=AN(r)(n);let o="white";return i||(o="gray.800"),{bg:_c.reference,fontSize:id.reference,color:o,borderColor:Gl.reference,verticalAlign:"top",width:du.reference,height:du.reference,"&:not([data-loaded])":{[_c.variable]:r},[Gl.variable]:"colors.white",_dark:{[Gl.variable]:"colors.gray.800"}}},CB={fontSize:id.reference,lineHeight:"1"},kB=t$(e=>({badge:Yn(SB,e),excessLabel:Yn(xB,e),container:Yn(_B,e),label:CB}));function Qo(e){const t=e!=="100%"?z2[e]:void 0;return t$({container:{[du.variable]:t??e,[id.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[du.variable]:t??e,[id.variable]:`calc(${t??e} / 2.5)`}})}var EB={"2xs":Qo(4),xs:Qo(6),sm:Qo(8),md:Qo(12),lg:Qo(16),xl:Qo(24),"2xl":Qo(32),full:Qo("100%")},$B=wB({baseStyle:kB,sizes:EB,defaultProps:{size:"md"}}),TB={Accordion:dB,Alert:bB,Avatar:$B,Badge:wc,Breadcrumb:A6,Button:N6,Checkbox:Qh,CloseButton:G6,Code:X6,Container:Z6,Divider:rB,Drawer:e6,Editable:s6,Form:h6,FormError:b6,FormLabel:S6,Heading:C6,Input:At,Kbd:U5,Link:K5,List:Z5,Menu:lz,Modal:bz,NumberInput:Tz,PinInput:Rz,Popover:Vz,Progress:Q4,Radio:c5,Select:v5,Skeleton:b5,SkipLink:S5,Slider:R5,Spinner:O5,Stat:V5,Switch:KN,Table:e4,Tabs:g4,Tag:T4,Textarea:B4,Tooltip:V4,Card:V6,Stepper:GD},AB={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-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},MB={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"}}},LB="ltr",RB={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},n$={semanticTokens:AB,direction:LB,...VD,components:TB,styles:MB,config:RB};function rc(e){return typeof e=="function"}function PB(...e){return t=>e.reduce((n,r)=>r(n),t)}var IB=e=>function(...n){let r=[...n],i=n[n.length-1];return bD(i)&&r.length>1?r=r.slice(0,r.length-1):i=e,PB(...r.map(o=>s=>rc(o)?o(s):FB(s,o)))(i)},OB=IB(n$);function FB(...e){return Yr({},...e,r$)}function r$(e,t,n,r){if((rc(e)||rc(t))&&Object.prototype.hasOwnProperty.call(r,n))return(...i)=>{const o=rc(e)?e(...i):e,s=rc(t)?t(...i):t;return Yr({},o,s,r$)}}function DB(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var NB=DB();function zB(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function BB(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var jB=e=>{const t=new WeakMap;return(r,i,o,s)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const d=t.get(r);if(d.has(i))return d.get(i);const a=e(r,i,o,s);return d.set(i,a),a}},i$=jB(BB);function o$(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var a$=e=>o$(e,t=>t!=null);function HB(e){return typeof e=="function"}function s$(e,...t){return HB(e)?e(...t):e}function VB(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var WB=typeof Element<"u",UB=typeof Map=="function",GB=typeof Set=="function",KB=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function eh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!eh(e[r],t[r]))return!1;return!0}var o;if(UB&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!eh(r.value[1],t.get(r.value[0])))return!1;return!0}if(GB&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(KB&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(WB&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!eh(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var qB=function(t,n){try{return eh(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const YB=Es(qB);function l$(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:o,colorMode:s}=Z8(),d=e?i$(o,`components.${e}`):void 0,a=r||d,c=Yr({theme:o,colorMode:s},(n=a==null?void 0:a.defaultProps)!=null?n:{},a$(zB(i,["children"]))),l=z.useRef({});if(a){const h=mD(a)(c);YB(l.current,h)||(l.current=h)}return l.current}function yg(e,t={}){return l$(e,t)}function Yi(e,t={}){return l$(e,t)}var XB=new Set([...iD,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),QB=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function ZB(e){return QB.has(e)||!XB.has(e)}function JB(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i in n&&delete n[i],n[i]=r[i]);return n}function ej(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var tj=/^((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)-.*))$/,nj=h2(function(e){return tj.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),rj=nj,ij=function(t){return t!=="theme"},rx=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?rj:ij},ix=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},oj=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Sb(n,r,i),x2(function(){return xb(n,r,i)}),null},aj=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var d=ix(t,n,r),a=d||rx(i),c=!a("as");return function(){var l=arguments,u=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&u.push("label:"+o+";"),l[0]==null||l[0].raw===void 0)u.push.apply(u,l);else{u.push(l[0][0]);for(var h=l.length,f=1;f<h;f++)u.push(l[f],l[0][f])}var p=Cb(function(g,b,x){var S=c&&g.as||i,T="",v=[],w=g;if(g.theme==null){w={};for(var y in g)w[y]=g[y];w.theme=z.useContext(uu)}typeof g.className=="string"?T=b2(b.registered,v,g.className):g.className!=null&&(T=g.className+" ");var m=fg(u.concat(v),b.registered,w);T+=b.key+"-"+m.name,s!==void 0&&(T+=" "+s);var E=c&&d===void 0?rx(S):a,A={};for(var C in g)c&&C==="as"||E(C)&&(A[C]=g[C]);return A.className=T,A.ref=x,z.createElement(z.Fragment,null,z.createElement(oj,{cache:b,serialized:m,isStringTag:typeof S=="string"}),z.createElement(S,A))});return p.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=i,p.__emotion_styles=u,p.__emotion_forwardProp=d,Object.defineProperty(p,"toString",{value:function(){return"."+s}}),p.withComponent=function(g,b){return e(g,Ie({},n,b,{shouldForwardProp:ix(p,b,!0)})).apply(void 0,u)},p}},sj=["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"],Jh=aj.bind();sj.forEach(function(e){Jh[e]=Jh(e)});var ox,lj=(ox=Jh.default)!=null?ox:Jh,uj=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...s}=t,d=o$(s,(u,h)=>aD(h)),a=s$(e,t),c=JB({},i,a,a$(d),o),l=F2(c)(t.theme);return r?[l,r]:l};function Hm(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=ZB);const i=uj({baseStyle:n}),o=lj(e,r)(i);return st.forwardRef(function(a,c){const{colorMode:l,forced:u}=Tb();return st.createElement(o,{ref:c,"data-theme":u?l:void 0,...a})})}function cj(){const e=new Map;return new Proxy(Hm,{apply(t,n,r){return Hm(...r)},get(t,n){return e.has(n)||e.set(n,Hm(n)),e.get(n)}})}var Ye=cj();function mt(e){return z.forwardRef(e)}function dj(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=z.createContext(void 0);i.displayName=r;function o(){var s;const d=z.useContext(i);if(!d&&t){const a=new Error(n);throw a.name="ContextError",(s=Error.captureStackTrace)==null||s.call(Error,a,o),a}return d}return[i.Provider,o,i]}function fj(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=z.useMemo(()=>tD(n),[n]);return j.jsxs(R8,{theme:i,children:[j.jsx(hj,{root:t}),r]})}function hj({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return j.jsx(hg,{styles:n=>({[t]:n.__cssVars})})}dj({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function pj(){const{colorMode:e}=Tb();return j.jsx(hg,{styles:t=>{const n=i$(t,"styles.global"),r=s$(n,{theme:t,colorMode:e});return r?F2(r)(t):void 0}})}var u$=z.createContext({getDocument(){return document},getWindow(){return window}});u$.displayName="EnvironmentContext";function c$(e){const{children:t,environment:n,disabled:r}=e,i=z.useRef(null),o=z.useMemo(()=>n||{getDocument:()=>{var d,a;return(a=(d=i.current)==null?void 0:d.ownerDocument)!=null?a:document},getWindow:()=>{var d,a;return(a=(d=i.current)==null?void 0:d.ownerDocument.defaultView)!=null?a:window}},[n]),s=!r||!n;return j.jsxs(u$.Provider,{value:o,children:[t,s&&j.jsx("span",{id:"__chakra_env",hidden:!0,ref:i})]})}c$.displayName="EnvironmentProvider";var gj=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetScope:i,resetCSS:o=!0,theme:s={},environment:d,cssVarsRoot:a,disableEnvironment:c,disableGlobalStyle:l}=e,u=j.jsx(c$,{environment:d,disabled:c,children:t});return j.jsx(fj,{theme:s,cssVarsRoot:a,children:j.jsxs(T2,{colorModeManager:n,options:s.config,children:[o?j.jsx(N8,{scope:i}):j.jsx(D8,{}),!l&&j.jsx(pj,{}),r?j.jsx(E2,{zIndex:r,children:u}):u]})})},mj=(e,t)=>e.find(n=>n.id===t);function ax(e,t){const n=d$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function d$(e,t){for(const[n,r]of Object.entries(e))if(mj(r,t))return n}function vj(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function yj(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",s=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:s}}function Gn(e,t=[]){const n=z.useRef(e);return z.useEffect(()=>{n.current=e}),z.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function bj(e,t){const n=Gn(e);z.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function ep(e,t){const n=z.useRef(!1),r=z.useRef(!1);z.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),z.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const f$=z.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),bg=z.createContext({}),_d=z.createContext(null),wg=typeof document<"u",tp=wg?z.useLayoutEffect:z.useEffect,h$=z.createContext({strict:!1});function wj(e,t,n,r){const{visualElement:i}=z.useContext(bg),o=z.useContext(h$),s=z.useContext(_d),d=z.useContext(f$).reducedMotion,a=z.useRef();r=r||o.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:d}));const c=a.current;return z.useInsertionEffect(()=>{c&&c.update(n,s)}),tp(()=>{c&&c.render()}),z.useEffect(()=>{c&&c.updateFeatures()}),(window.HandoffAppearAnimations?tp:z.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function Ml(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Sj(e,t,n){return z.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ml(n)&&(n.current=r))},[t])}function od(e){return typeof e=="string"||Array.isArray(e)}function Sg(e){return typeof e=="object"&&typeof e.start=="function"}const Db=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Nb=["initial",...Db];function xg(e){return Sg(e.animate)||Nb.some(t=>od(e[t]))}function p$(e){return!!(xg(e)||e.variants)}function xj(e,t){if(xg(e)){const{initial:n,animate:r}=e;return{initial:n===!1||od(n)?n:void 0,animate:od(r)?r:void 0}}return e.inherit!==!1?t:{}}function _j(e){const{initial:t,animate:n}=xj(e,z.useContext(bg));return z.useMemo(()=>({initial:t,animate:n}),[sx(t),sx(n)])}function sx(e){return Array.isArray(e)?e.join(" "):e}const lx={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ad={};for(const e in lx)ad[e]={isEnabled:t=>lx[e].some(n=>!!t[n])};function Cj(e){for(const t in e)ad[t]={...ad[t],...e[t]}}const zb=z.createContext({}),g$=z.createContext({}),kj=Symbol.for("motionComponentSymbol");function Ej({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Cj(e);function o(d,a){let c;const l={...z.useContext(f$),...d,layoutId:$j(d)},{isStatic:u}=l,h=_j(d),f=r(d,u);if(!u&&wg){h.visualElement=wj(i,f,l,t);const p=z.useContext(g$),g=z.useContext(h$).strict;h.visualElement&&(c=h.visualElement.loadFeatures(l,g,e,p))}return z.createElement(bg.Provider,{value:h},c&&h.visualElement?z.createElement(c,{visualElement:h.visualElement,...l}):null,n(i,d,Sj(f,h.visualElement,a),f,u,h.visualElement))}const s=z.forwardRef(o);return s[kj]=i,s}function $j({layoutId:e}){const t=z.useContext(zb).id;return t&&e!==void 0?t+"-"+e:e}function Tj(e){function t(r,i={}){return Ej(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Aj=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Bb(e){return typeof e!="string"||e.includes("-")?!1:!!(Aj.indexOf(e)>-1||/[A-Z]/.test(e))}const np={};function Mj(e){Object.assign(np,e)}const Cd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ms=new Set(Cd);function m$(e,{layout:t,layoutId:n}){return Ms.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!np[e]||e==="opacity")}const hr=e=>!!(e&&e.getVelocity),Lj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rj=Cd.length;function Pj(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<Rj;s++){const d=Cd[s];if(e[d]!==void 0){const a=Lj[d]||d;o+=`${a}(${e[d]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const v$=e=>t=>typeof t=="string"&&t.startsWith(e),y$=v$("--"),Ly=v$("var(--"),Ij=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Oj=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ea=(e,t,n)=>Math.min(Math.max(n,e),t),Ls={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cc={...Ls,transform:e=>Ea(0,1,e)},pf={...Ls,default:1},kc=e=>Math.round(e*1e5)/1e5,_g=/(-)?([\d]*\.?[\d])+/g,b$=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Fj=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function kd(e){return typeof e=="string"}const Ed=e=>({test:t=>kd(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Jo=Ed("deg"),Gi=Ed("%"),qe=Ed("px"),Dj=Ed("vh"),Nj=Ed("vw"),ux={...Gi,parse:e=>Gi.parse(e)/100,transform:e=>Gi.transform(e*100)},cx={...Ls,transform:Math.round},w$={borderWidth:qe,borderTopWidth:qe,borderRightWidth:qe,borderBottomWidth:qe,borderLeftWidth:qe,borderRadius:qe,radius:qe,borderTopLeftRadius:qe,borderTopRightRadius:qe,borderBottomRightRadius:qe,borderBottomLeftRadius:qe,width:qe,maxWidth:qe,height:qe,maxHeight:qe,size:qe,top:qe,right:qe,bottom:qe,left:qe,padding:qe,paddingTop:qe,paddingRight:qe,paddingBottom:qe,paddingLeft:qe,margin:qe,marginTop:qe,marginRight:qe,marginBottom:qe,marginLeft:qe,rotate:Jo,rotateX:Jo,rotateY:Jo,rotateZ:Jo,scale:pf,scaleX:pf,scaleY:pf,scaleZ:pf,skew:Jo,skewX:Jo,skewY:Jo,distance:qe,translateX:qe,translateY:qe,translateZ:qe,x:qe,y:qe,z:qe,perspective:qe,transformPerspective:qe,opacity:Cc,originX:ux,originY:ux,originZ:qe,zIndex:cx,fillOpacity:Cc,strokeOpacity:Cc,numOctaves:cx};function jb(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:d}=e;let a=!1,c=!1,l=!0;for(const u in t){const h=t[u];if(y$(u)){o[u]=h;continue}const f=w$[u],p=Oj(h,f);if(Ms.has(u)){if(a=!0,s[u]=p,!l)continue;h!==(f.default||0)&&(l=!1)}else u.startsWith("origin")?(c=!0,d[u]=p):i[u]=p}if(t.transform||(a||r?i.transform=Pj(e.transform,n,l,r):i.transform&&(i.transform="none")),c){const{originX:u="50%",originY:h="50%",originZ:f=0}=d;i.transformOrigin=`${u} ${h} ${f}`}}const Hb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function S$(e,t,n){for(const r in t)!hr(t[r])&&!m$(r,n)&&(e[r]=t[r])}function zj({transformTemplate:e},t,n){return z.useMemo(()=>{const r=Hb();return jb(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Bj(e,t,n){const r=e.style||{},i={};return S$(i,r,e),Object.assign(i,zj(e,t,n)),e.transformValues?e.transformValues(i):i}function jj(e,t,n){const r={},i=Bj(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const Hj=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function rp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||Hj.has(e)}let x$=e=>!rp(e);function Vj(e){e&&(x$=t=>t.startsWith("on")?!rp(t):e(t))}try{Vj(require("@emotion/is-prop-valid").default)}catch{}function Wj(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(x$(i)||n===!0&&rp(i)||!t&&!rp(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function dx(e,t,n){return typeof e=="string"?e:qe.transform(t+n*e)}function Uj(e,t,n){const r=dx(t,e.x,e.width),i=dx(n,e.y,e.height);return`${r} ${i}`}const Gj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kj={offset:"strokeDashoffset",array:"strokeDasharray"};function qj(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Gj:Kj;e[o.offset]=qe.transform(-r);const s=qe.transform(t),d=qe.transform(n);e[o.array]=`${s} ${d}`}function Vb(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:d=1,pathOffset:a=0,...c},l,u,h){if(jb(e,c,l,h),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:g}=e;f.transform&&(g&&(p.transform=f.transform),delete f.transform),g&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=Uj(g,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&qj(f,s,d,a,!1)}const _$=()=>({...Hb(),attrs:{}}),Wb=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Yj(e,t,n,r){const i=z.useMemo(()=>{const o=_$();return Vb(o,t,{enableHardwareAcceleration:!1},Wb(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};S$(o,e.style,e),i.style={...o,...i.style}}return i}function Xj(e=!1){return(n,r,i,{latestValues:o},s)=>{const a=(Bb(n)?Yj:jj)(r,o,s,n),l={...Wj(r,typeof n=="string",e),...a,ref:i},{children:u}=r,h=z.useMemo(()=>hr(u)?u.get():u,[u]);return z.createElement(n,{...l,children:h})}}const Ub=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function C$(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const k$=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function E$(e,t,n,r){C$(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(k$.has(i)?i:Ub(i),t.attrs[i])}function Gb(e,t){const{style:n}=e,r={};for(const i in n)(hr(n[i])||t.style&&hr(t.style[i])||m$(i,e))&&(r[i]=n[i]);return r}function $$(e,t){const n=Gb(e,t);for(const r in e)if(hr(e[r])||hr(t[r])){const i=Cd.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function Kb(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function T$(e){const t=z.useRef(null);return t.current===null&&(t.current=e()),t.current}const ip=e=>Array.isArray(e),Qj=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Zj=e=>ip(e)?e[e.length-1]||0:e;function th(e){const t=hr(e)?e.get():e;return Qj(t)?t.toValue():t}function Jj({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:eH(r,i,o,e),renderState:t()};return n&&(s.mount=d=>n(r,d,s)),s}const A$=e=>(t,n)=>{const r=z.useContext(bg),i=z.useContext(_d),o=()=>Jj(e,t,r,i);return n?o():T$(o)};function eH(e,t,n,r){const i={},o=r(e,{});for(const h in o)i[h]=th(o[h]);let{initial:s,animate:d}=e;const a=xg(e),c=p$(e);t&&c&&!a&&e.inherit!==!1&&(s===void 0&&(s=t.initial),d===void 0&&(d=t.animate));let l=n?n.initial===!1:!1;l=l||s===!1;const u=l?d:s;return u&&typeof u!="boolean"&&!Sg(u)&&(Array.isArray(u)?u:[u]).forEach(f=>{const p=Kb(e,f);if(!p)return;const{transitionEnd:g,transition:b,...x}=p;for(const S in x){let T=x[S];if(Array.isArray(T)){const v=l?T.length-1:0;T=T[v]}T!==null&&(i[S]=T)}for(const S in g)i[S]=g[S]}),i}const tH={useVisualState:A$({scrapeMotionValuesFromProps:$$,createRenderState:_$,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Vb(n,r,{enableHardwareAcceleration:!1},Wb(t.tagName),e.transformTemplate),E$(t,n)}})},nH={useVisualState:A$({scrapeMotionValuesFromProps:Gb,createRenderState:Hb})};function rH(e,{forwardMotionProps:t=!1},n,r){return{...Bb(e)?tH:nH,preloadedFeatures:n,useRender:Xj(t),createVisualElement:r,Component:e}}function bo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const M$=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Cg(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const iH=e=>t=>M$(t)&&e(t,Cg(t));function _o(e,t,n,r){return bo(e,t,iH(n),r)}const oH=(e,t)=>n=>t(e(n)),Sa=(...e)=>e.reduce(oH);function L$(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const fx=L$("dragHorizontal"),hx=L$("dragVertical");function R$(e){let t=!1;if(e==="y")t=hx();else if(e==="x")t=fx();else{const n=fx(),r=hx();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function P$(){const e=R$(!0);return e?(e(),!1):!0}class La{constructor(t){this.isMounted=!1,this.node=t}update(){}}function aH(e){let t=[],n=[],r=0,i=!1,o=!1;const s=new WeakSet,d={schedule:(a,c=!1,l=!1)=>{const u=l&&i,h=u?t:n;return c&&s.add(a),h.indexOf(a)===-1&&(h.push(a),u&&i&&(r=t.length)),a},cancel:a=>{const c=n.indexOf(a);c!==-1&&n.splice(c,1),s.delete(a)},process:a=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let c=0;c<r;c++){const l=t[c];l(a),s.has(l)&&(d.schedule(l),e())}i=!1,o&&(o=!1,d.process(a))}};return d}const Gt={delta:0,timestamp:0,isProcessing:!1},sH=40;let Ry=!0,sd=!1;const kg=["read","update","preRender","render","postRender"],Kl=kg.reduce((e,t)=>(e[t]=aH(()=>sd=!0),e),{}),lH=e=>Kl[e].process(Gt),I$=e=>{sd=!1,Gt.delta=Ry?1e3/60:Math.max(Math.min(e-Gt.timestamp,sH),1),Gt.timestamp=e,Gt.isProcessing=!0,kg.forEach(lH),Gt.isProcessing=!1,sd&&(Ry=!1,requestAnimationFrame(I$))},uH=()=>{sd=!0,Ry=!0,Gt.isProcessing||requestAnimationFrame(I$)},Wt=kg.reduce((e,t)=>{const n=Kl[t];return e[t]=(r,i=!1,o=!1)=>(sd||uH(),n.schedule(r,i,o)),e},{});function Mo(e){kg.forEach(t=>Kl[t].cancel(e))}function px(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||P$())return;const d=e.getProps();e.animationState&&d.whileHover&&e.animationState.setActive("whileHover",t),d[r]&&Wt.update(()=>d[r](o,s))};return _o(e.current,n,i,{passive:!e.getProps()[r]})}class cH extends La{mount(){this.unmount=Sa(px(this.node,!0),px(this.node,!1))}unmount(){}}class dH extends La{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Sa(bo(this.node.current,"focus",()=>this.onFocus()),bo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const O$=(e,t)=>t?e===t?!0:O$(e,t.parentElement):!1,hn=e=>e;function Vm(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Cg(n))}class fH extends La{constructor(){super(...arguments),this.removeStartListeners=hn,this.removeEndListeners=hn,this.removeAccessibleListeners=hn,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=_o(window,"pointerup",(d,a)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:l}=this.node.getProps();Wt.update(()=>{O$(this.node.current,d.target)?c&&c(d,a):l&&l(d,a)})},{passive:!(r.onTap||r.onPointerUp)}),s=_o(window,"pointercancel",(d,a)=>this.cancelPress(d,a),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Sa(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=d=>{d.key!=="Enter"||!this.checkPressEnd()||Vm("up",(a,c)=>{const{onTap:l}=this.node.getProps();l&&Wt.update(()=>l(a,c))})};this.removeEndListeners(),this.removeEndListeners=bo(this.node.current,"keyup",s),Vm("down",(d,a)=>{this.startPress(d,a)})},n=bo(this.node.current,"keydown",t),r=()=>{this.isPressing&&Vm("cancel",(o,s)=>this.cancelPress(o,s))},i=bo(this.node.current,"blur",r);this.removeAccessibleListeners=Sa(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Wt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!P$()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Wt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=_o(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=bo(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Sa(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Py=new WeakMap,Wm=new WeakMap,hH=e=>{const t=Py.get(e.target);t&&t(e)},pH=e=>{e.forEach(hH)};function gH({root:e,...t}){const n=e||document;Wm.has(n)||Wm.set(n,{});const r=Wm.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(pH,{root:e,...t})),r[i]}function mH(e,t,n){const r=gH(t);return Py.set(e,n),r.observe(e),()=>{Py.delete(e),r.unobserve(e)}}const vH={some:0,all:1};class yH extends La{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:vH[i]},d=a=>{const{isIntersecting:c}=a;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:l,onViewportLeave:u}=this.node.getProps(),h=c?l:u;h&&h(a)};return mH(this.node.current,s,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(bH(t,n))&&this.startObserver()}unmount(){}}function bH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const wH={inView:{Feature:yH},tap:{Feature:fH},focus:{Feature:dH},hover:{Feature:cH}};function F$(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}function SH(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function xH(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Eg(e,t,n){const r=e.getProps();return Kb(r,t,n!==void 0?n:r.custom,SH(e),xH(e))}const _H="framerAppearId",CH="data-"+Ub(_H);let kH=hn,qb=hn;const xa=e=>e*1e3,Co=e=>e/1e3,EH={current:!1},D$=e=>Array.isArray(e)&&typeof e[0]=="number";function N$(e){return!!(!e||typeof e=="string"&&z$[e]||D$(e)||Array.isArray(e)&&e.every(N$))}const ic=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,z$={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ic([0,.65,.55,1]),circOut:ic([.55,0,1,.45]),backIn:ic([.31,.01,.66,-.59]),backOut:ic([.33,1.53,.69,.99])};function B$(e){if(e)return D$(e)?ic(e):Array.isArray(e)?e.map(B$):z$[e]}function $H(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:d,times:a}={}){const c={[t]:n};a&&(c.offset=a);const l=B$(d);return Array.isArray(l)&&(c.easing=l),e.animate(c,{delay:r,duration:i,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}const gx={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Um={},j$={};for(const e in gx)j$[e]=()=>(Um[e]===void 0&&(Um[e]=gx[e]()),Um[e]);function TH(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const H$=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,AH=1e-7,MH=12;function LH(e,t,n,r,i){let o,s,d=0;do s=t+(n-t)/2,o=H$(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>AH&&++d<MH);return s}function $d(e,t,n,r){if(e===t&&n===r)return hn;const i=o=>LH(o,0,1,e,n);return o=>o===0||o===1?o:H$(i(o),t,r)}const RH=$d(.42,0,1,1),PH=$d(0,0,.58,1),V$=$d(.42,0,.58,1),IH=e=>Array.isArray(e)&&typeof e[0]!="number",W$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,U$=e=>t=>1-e(1-t),G$=e=>1-Math.sin(Math.acos(e)),Yb=U$(G$),OH=W$(Yb),K$=$d(.33,1.53,.69,.99),Xb=U$(K$),FH=W$(Xb),DH=e=>(e*=2)<1?.5*Xb(e):.5*(2-Math.pow(2,-10*(e-1))),NH={linear:hn,easeIn:RH,easeInOut:V$,easeOut:PH,circIn:G$,circInOut:OH,circOut:Yb,backIn:Xb,backInOut:FH,backOut:K$,anticipate:DH},mx=e=>{if(Array.isArray(e)){qb(e.length===4);const[t,n,r,i]=e;return $d(t,n,r,i)}else if(typeof e=="string")return NH[e];return e},Qb=(e,t)=>n=>!!(kd(n)&&Fj.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),q$=(e,t,n)=>r=>{if(!kd(r))return r;const[i,o,s,d]=r.match(_g);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:d!==void 0?parseFloat(d):1}},zH=e=>Ea(0,255,e),Gm={...Ls,transform:e=>Math.round(zH(e))},as={test:Qb("rgb","red"),parse:q$("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Gm.transform(e)+", "+Gm.transform(t)+", "+Gm.transform(n)+", "+kc(Cc.transform(r))+")"};function BH(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Iy={test:Qb("#"),parse:BH,transform:as.transform},Ll={test:Qb("hsl","hue"),parse:q$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Gi.transform(kc(t))+", "+Gi.transform(kc(n))+", "+kc(Cc.transform(r))+")"},Wn={test:e=>as.test(e)||Iy.test(e)||Ll.test(e),parse:e=>as.test(e)?as.parse(e):Ll.test(e)?Ll.parse(e):Iy.parse(e),transform:e=>kd(e)?e:e.hasOwnProperty("red")?as.transform(e):Ll.transform(e)},qt=(e,t,n)=>-n*e+n*t+e;function Km(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jH({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const d=n<.5?n*(1+t):n+t-n*t,a=2*n-d;i=Km(a,d,e+1/3),o=Km(a,d,e),s=Km(a,d,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const qm=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},HH=[Iy,as,Ll],VH=e=>HH.find(t=>t.test(e));function vx(e){const t=VH(e);let n=t.parse(e);return t===Ll&&(n=jH(n)),n}const Y$=(e,t)=>{const n=vx(e),r=vx(t),i={...n};return o=>(i.red=qm(n.red,r.red,o),i.green=qm(n.green,r.green,o),i.blue=qm(n.blue,r.blue,o),i.alpha=qt(n.alpha,r.alpha,o),as.transform(i))};function WH(e){var t,n;return isNaN(e)&&kd(e)&&(((t=e.match(_g))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(b$))===null||n===void 0?void 0:n.length)||0)>0}const X$={regex:Ij,countKey:"Vars",token:"${v}",parse:hn},Q$={regex:b$,countKey:"Colors",token:"${c}",parse:Wn.parse},Z$={regex:_g,countKey:"Numbers",token:"${n}",parse:Ls.parse};function Ym(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function op(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Ym(n,X$),Ym(n,Q$),Ym(n,Z$),n}function J$(e){return op(e).values}function eT(e){const{values:t,numColors:n,numVars:r,tokenised:i}=op(e),o=t.length;return s=>{let d=i;for(let a=0;a<o;a++)a<r?d=d.replace(X$.token,s[a]):a<r+n?d=d.replace(Q$.token,Wn.transform(s[a])):d=d.replace(Z$.token,kc(s[a]));return d}}const UH=e=>typeof e=="number"?0:e;function GH(e){const t=J$(e);return eT(e)(t.map(UH))}const $a={test:WH,parse:J$,createTransformer:eT,getAnimatableNone:GH},tT=(e,t)=>n=>`${n>0?t:e}`;function nT(e,t){return typeof e=="number"?n=>qt(e,t,n):Wn.test(e)?Y$(e,t):e.startsWith("var(")?tT(e,t):iT(e,t)}const rT=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>nT(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},KH=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=nT(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},iT=(e,t)=>{const n=$a.createTransformer(t),r=op(e),i=op(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Sa(rT(r.values,i.values),n):tT(e,t)},ld=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},yx=(e,t)=>n=>qt(e,t,n);function qH(e){return typeof e=="number"?yx:typeof e=="string"?Wn.test(e)?Y$:iT:Array.isArray(e)?rT:typeof e=="object"?KH:yx}function YH(e,t,n){const r=[],i=n||qH(e[0]),o=e.length-1;for(let s=0;s<o;s++){let d=i(e[s],e[s+1]);if(t){const a=Array.isArray(t)?t[s]||hn:t;d=Sa(a,d)}r.push(d)}return r}function oT(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(qb(o===t.length),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=YH(t,r,i),d=s.length,a=c=>{let l=0;if(d>1)for(;l<e.length-2&&!(c<e[l+1]);l++);const u=ld(e[l],e[l+1],c);return s[l](u)};return n?c=>a(Ea(e[0],e[o-1],c)):a}function XH(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ld(0,t,r);e.push(qt(n,1,i))}}function QH(e){const t=[0];return XH(t,e.length-1),t}function ZH(e,t){return e.map(n=>n*t)}function JH(e,t){return e.map(()=>t||V$).splice(0,e.length-1)}function ap({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=IH(r)?r.map(mx):mx(r),o={done:!1,value:t[0]},s=ZH(n&&n.length===t.length?n:QH(t),e),d=oT(s,t,{ease:Array.isArray(i)?i:JH(t,i)});return{calculatedDuration:e,next:a=>(o.value=d(a),o.done=a>=e,o)}}function aT(e,t){return t?e*(1e3/t):0}const eV=5;function sT(e,t,n){const r=Math.max(t-eV,0);return aT(n-e(r),t-r)}const Xm=.001,tV=.01,bx=10,nV=.05,rV=1;function iV({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;kH(e<=xa(bx));let s=1-t;s=Ea(nV,rV,s),e=Ea(tV,bx,Co(e)),s<1?(i=c=>{const l=c*s,u=l*e,h=l-n,f=Oy(c,s),p=Math.exp(-u);return Xm-h/f*p},o=c=>{const u=c*s*e,h=u*n+n,f=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-u),g=Oy(Math.pow(c,2),s);return(-i(c)+Xm>0?-1:1)*((h-f)*p)/g}):(i=c=>{const l=Math.exp(-c*e),u=(c-n)*e+1;return-Xm+l*u},o=c=>{const l=Math.exp(-c*e),u=(n-c)*(e*e);return l*u});const d=5/e,a=aV(i,o,d);if(e=xa(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(a,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const oV=12;function aV(e,t,n){let r=n;for(let i=1;i<oV;i++)r=r-e(r)/t(r);return r}function Oy(e,t){return e*Math.sqrt(1-t*t)}const sV=["duration","bounce"],lV=["stiffness","damping","mass"];function wx(e,t){return t.some(n=>e[n]!==void 0)}function uV(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!wx(e,lV)&&wx(e,sV)){const n=iV(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function lT({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:d,damping:a,mass:c,velocity:l,duration:u,isResolvedFromDuration:h}=uV(r),f=l?-Co(l):0,p=a/(2*Math.sqrt(d*c)),g=o-i,b=Co(Math.sqrt(d/c)),x=Math.abs(g)<5;n||(n=x?.01:2),t||(t=x?.005:.5);let S;if(p<1){const T=Oy(b,p);S=v=>{const w=Math.exp(-p*b*v);return o-w*((f+p*b*g)/T*Math.sin(T*v)+g*Math.cos(T*v))}}else if(p===1)S=T=>o-Math.exp(-b*T)*(g+(f+b*g)*T);else{const T=b*Math.sqrt(p*p-1);S=v=>{const w=Math.exp(-p*b*v),y=Math.min(T*v,300);return o-w*((f+p*b*g)*Math.sinh(y)+T*g*Math.cosh(y))/T}}return{calculatedDuration:h&&u||null,next:T=>{const v=S(T);if(h)s.done=T>=u;else{let w=f;T!==0&&(p<1?w=sT(S,T,v):w=0);const y=Math.abs(w)<=n,m=Math.abs(o-v)<=t;s.done=y&&m}return s.value=s.done?o:v,s}}}function Sx({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:d,max:a,restDelta:c=.5,restSpeed:l}){const u=e[0],h={done:!1,value:u},f=E=>d!==void 0&&E<d||a!==void 0&&E>a,p=E=>d===void 0?a:a===void 0||Math.abs(d-E)<Math.abs(a-E)?d:a;let g=n*t;const b=u+g,x=s===void 0?b:s(b);x!==b&&(g=x-u);const S=E=>-g*Math.exp(-E/r),T=E=>x+S(E),v=E=>{const A=S(E),C=T(E);h.done=Math.abs(A)<=c,h.value=h.done?x:C};let w,y;const m=E=>{f(h.value)&&(w=E,y=lT({keyframes:[h.value,p(h.value)],velocity:sT(T,E,h.value),damping:i,stiffness:o,restDelta:c,restSpeed:l}))};return m(0),{calculatedDuration:null,next:E=>{let A=!1;return!y&&w===void 0&&(A=!0,v(E),m(E)),w!==void 0&&E>w?y.next(E-w):(!A&&v(E),h)}}}const cV=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Wt.update(t,!0),stop:()=>Mo(t),now:()=>Gt.isProcessing?Gt.timestamp:performance.now()}},xx=2e4;function _x(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<xx;)t+=n,r=e.next(t);return t>=xx?1/0:t}const dV={decay:Sx,inertia:Sx,tween:ap,keyframes:ap,spring:lT};function sp({autoplay:e=!0,delay:t=0,driver:n=cV,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:d="loop",onPlay:a,onStop:c,onComplete:l,onUpdate:u,...h}){let f=1,p=!1,g,b;const x=()=>{g&&g(),b=new Promise(q=>{g=q})};x();let S;const T=dV[i]||ap;let v;T!==ap&&typeof r[0]!="number"&&(v=oT([0,100],r,{clamp:!1}),r=[0,100]);const w=T({...h,keyframes:r});let y;d==="mirror"&&(y=T({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let m="idle",E=null,A=null,C=null;w.calculatedDuration===null&&o&&(w.calculatedDuration=_x(w));const{calculatedDuration:k}=w;let I=1/0,R=1/0;k!==null&&(I=k+s,R=I*(o+1)-s);let M=0;const O=q=>{if(A===null)return;f>0&&(A=Math.min(A,q)),E!==null?M=E:M=(q-A)*f;const re=M-t,Y=re<0;M=Math.max(re,0),m==="finished"&&E===null&&(M=R);let Z=M,te=w;if(o){const ve=M/I;let Ce=Math.floor(ve),_e=ve%1;!_e&&ve>=1&&(_e=1),_e===1&&Ce--,Ce=Math.min(Ce,o+1);const Re=!!(Ce%2);Re&&(d==="reverse"?(_e=1-_e,s&&(_e-=s/I)):d==="mirror"&&(te=y));let ot=Ea(0,1,_e);M>R&&(ot=d==="reverse"&&Re?1:0),Z=ot*I}const ie=Y?{done:!1,value:r[0]}:te.next(Z);v&&(ie.value=v(ie.value));let{done:ce}=ie;!Y&&k!==null&&(ce=M>=R);const he=E===null&&(m==="finished"||m==="running"&&ce||f<0&&M<=0);return u&&u(ie.value),he&&B(),ie},P=()=>{S&&S.stop(),S=void 0},N=()=>{m="idle",P(),x(),A=C=null},B=()=>{m="finished",l&&l(),P(),x()},W=()=>{if(p)return;S||(S=n(O));const q=S.now();a&&a(),E!==null?A=q-E:(!A||m==="finished")&&(A=q),C=A,E=null,m="running",S.start()};e&&W();const K={then(q,re){return b.then(q,re)},get time(){return Co(M)},set time(q){q=xa(q),M=q,E!==null||!S||f===0?E=q:A=S.now()-q/f},get duration(){const q=w.calculatedDuration===null?_x(w):w.calculatedDuration;return Co(q)},get speed(){return f},set speed(q){q===f||!S||(f=q,K.time=Co(M))},get state(){return m},play:W,pause:()=>{m="paused",E=M},stop:()=>{p=!0,m!=="idle"&&(m="idle",c&&c(),N())},cancel:()=>{C!==null&&O(C),N()},complete:()=>{m="finished"},sample:q=>(A=0,O(q))};return K}const fV=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),gf=10,hV=2e4,pV=(e,t)=>t.type==="spring"||e==="backgroundColor"||!N$(t.ease);function gV(e,t,{onUpdate:n,onComplete:r,...i}){if(!(j$.waapi()&&fV.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,d,a;const c=()=>{a=new Promise(x=>{d=x})};c();let{keyframes:l,duration:u=300,ease:h,times:f}=i;if(pV(t,i)){const x=sp({...i,repeat:0,delay:0});let S={done:!1,value:l[0]};const T=[];let v=0;for(;!S.done&&v<hV;)S=x.sample(v),T.push(S.value),v+=gf;f=void 0,l=T,u=v-gf,h="linear"}const p=$H(e.owner.current,t,l,{...i,duration:u,ease:h,times:f}),g=()=>p.cancel(),b=()=>{Wt.update(g),d(),c()};return p.onfinish=()=>{e.set(TH(l,i)),r&&r(),b()},{then(x,S){return a.then(x,S)},get time(){return Co(p.currentTime||0)},set time(x){p.currentTime=xa(x)},get speed(){return p.playbackRate},set speed(x){p.playbackRate=x},get duration(){return Co(u)},play:()=>{s||(p.play(),Mo(g))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:x}=p;if(x){const S=sp({...i,autoplay:!1});e.setWithVelocity(S.sample(x-gf).value,S.sample(x).value,gf)}b()},complete:()=>p.finish(),cancel:b}}function mV({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:hn,pause:hn,stop:hn,then:o=>(o(),Promise.resolve()),cancel:hn,complete:hn});return t?sp({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const vV={type:"spring",stiffness:500,damping:25,restSpeed:10},yV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bV={type:"keyframes",duration:.8},wV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},SV=(e,{keyframes:t})=>t.length>2?bV:Ms.has(e)?e.startsWith("scale")?yV(t[1]):vV:wV,Fy=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&($a.test(t)||t==="0")&&!t.startsWith("url(")),xV=new Set(["brightness","contrast","saturate","opacity"]);function _V(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(_g)||[];if(!r)return e;const i=n.replace(r,"");let o=xV.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const CV=/([a-z-]*)\(.*?\)/g,Dy={...$a,getAnimatableNone:e=>{const t=e.match(CV);return t?t.map(_V).join(" "):e}},kV={...w$,color:Wn,backgroundColor:Wn,outlineColor:Wn,fill:Wn,stroke:Wn,borderColor:Wn,borderTopColor:Wn,borderRightColor:Wn,borderBottomColor:Wn,borderLeftColor:Wn,filter:Dy,WebkitFilter:Dy},Zb=e=>kV[e];function uT(e,t){let n=Zb(e);return n!==Dy&&(n=$a),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const cT=e=>/^0[^.\s]+$/.test(e);function EV(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||cT(e)}function $V(e,t,n,r){const i=Fy(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let d;const a=[];for(let c=0;c<o.length;c++)o[c]===null&&(o[c]=c===0?s:o[c-1]),EV(o[c])&&a.push(c),typeof o[c]=="string"&&o[c]!=="none"&&o[c]!=="0"&&(d=o[c]);if(i&&a.length&&d)for(let c=0;c<a.length;c++){const l=a[c];o[l]=uT(t,d)}return o}function TV({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:d,from:a,elapsed:c,...l}){return!!Object.keys(l).length}function dT(e,t){return e[t]||e.default||e}const Jb=(e,t,n,r={})=>i=>{const o=dT(r,e)||{},s=o.delay||r.delay||0;let{elapsed:d=0}=r;d=d-xa(s);const a=$V(t,e,n,o),c=a[0],l=a[a.length-1],u=Fy(e,c),h=Fy(e,l);let f={keyframes:a,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-d,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(TV(o)||(f={...f,...SV(e,f)}),f.duration&&(f.duration=xa(f.duration)),f.repeatDelay&&(f.repeatDelay=xa(f.repeatDelay)),!u||!h||EH.current||o.type===!1)return mV(f);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=gV(t,e,f);if(p)return p}return sp(f)};function lp(e){return!!(hr(e)&&e.add)}const AV=e=>/^\-?\d*\.?\d+$/.test(e);function ew(e,t){e.indexOf(t)===-1&&e.push(t)}function tw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class nw{constructor(){this.subscriptions=[]}add(t){return ew(this.subscriptions,t),()=>tw(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const MV=e=>!isNaN(parseFloat(e));class LV{constructor(t,n={}){this.version="10.12.16",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=Gt;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,Wt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Wt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=MV(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new nw);const r=this.events[t].add(n);return t==="change"?()=>{r(),Wt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?aT(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fu(e,t){return new LV(e,t)}const fT=e=>t=>t.test(e),RV={test:e=>e==="auto",parse:e=>e},hT=[Ls,qe,Gi,Jo,Nj,Dj,RV],Hu=e=>hT.find(fT(e)),PV=[...hT,Wn,$a],IV=e=>PV.find(fT(e));function OV(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fu(n))}function FV(e,t){const n=Eg(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const d=Zj(o[s]);OV(e,s,d)}}function DV(e,t,n){var r,i;const o=Object.keys(t).filter(d=>!e.hasValue(d)),s=o.length;if(s)for(let d=0;d<s;d++){const a=o[d],c=t[a];let l=null;Array.isArray(c)&&(l=c[0]),l===null&&(l=(i=(r=n[a])!==null&&r!==void 0?r:e.readValue(a))!==null&&i!==void 0?i:t[a]),l!=null&&(typeof l=="string"&&(AV(l)||cT(l))?l=parseFloat(l):!IV(l)&&$a.test(c)&&(l=uT(a,c)),e.addValue(a,fu(l,{owner:e})),n[a]===void 0&&(n[a]=l),l!==null&&e.setBaseTarget(a,l))}}function NV(e,t){return t?(t[e]||t.default||t).from:void 0}function zV(e,t,n){const r={};for(const i in e){const o=NV(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function BV({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pT(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...d}=e.makeTargetAnimatable(t);const a=e.getValue("willChange");r&&(o=r);const c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const u in d){const h=e.getValue(u),f=d[u];if(!h||f===void 0||l&&BV(l,u))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const b=e.getProps()[CH];b&&(p.elapsed=window.HandoffAppearAnimations(b,u,h,Wt))}h.start(Jb(u,h,f,e.shouldReduceMotion&&Ms.has(u)?{type:!1}:p));const g=h.animation;lp(a)&&(a.add(u),g.then(()=>a.remove(u))),c.push(g)}return s&&Promise.all(c).then(()=>{s&&FV(e,s)}),c}function Ny(e,t,n={}){const r=Eg(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(pT(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(a=0)=>{const{delayChildren:c=0,staggerChildren:l,staggerDirection:u}=i;return jV(e,t,c+a,l,u,n)}:()=>Promise.resolve(),{when:d}=i;if(d){const[a,c]=d==="beforeChildren"?[o,s]:[s,o];return a().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function jV(e,t,n=0,r=0,i=1,o){const s=[],d=(e.variantChildren.size-1)*r,a=i===1?(c=0)=>c*r:(c=0)=>d-c*r;return Array.from(e.variantChildren).sort(HV).forEach((c,l)=>{c.notify("AnimationStart",t),s.push(Ny(c,t,{...o,delay:n+a(l)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function HV(e,t){return e.sortNodePosition(t)}function VV(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Ny(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Ny(e,t,n);else{const i=typeof t=="function"?Eg(e,t,n.custom):t;r=Promise.all(pT(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const WV=[...Db].reverse(),UV=Db.length;function GV(e){return t=>Promise.all(t.map(({animation:n,options:r})=>VV(e,n,r)))}function KV(e){let t=GV(e);const n=YV();let r=!0;const i=(a,c)=>{const l=Eg(e,c);if(l){const{transition:u,transitionEnd:h,...f}=l;a={...a,...f,...h}}return a};function o(a){t=a(e)}function s(a,c){const l=e.getProps(),u=e.getVariantContext(!0)||{},h=[],f=new Set;let p={},g=1/0;for(let x=0;x<UV;x++){const S=WV[x],T=n[S],v=l[S]!==void 0?l[S]:u[S],w=od(v),y=S===c?T.isActive:null;y===!1&&(g=x);let m=v===u[S]&&v!==l[S]&&w;if(m&&r&&e.manuallyAnimateOnMount&&(m=!1),T.protectedKeys={...p},!T.isActive&&y===null||!v&&!T.prevProp||Sg(v)||typeof v=="boolean")continue;const E=qV(T.prevProp,v);let A=E||S===c&&T.isActive&&!m&&w||x>g&&w;const C=Array.isArray(v)?v:[v];let k=C.reduce(i,{});y===!1&&(k={});const{prevResolvedValues:I={}}=T,R={...I,...k},M=O=>{A=!0,f.delete(O),T.needsAnimating[O]=!0};for(const O in R){const P=k[O],N=I[O];p.hasOwnProperty(O)||(P!==N?ip(P)&&ip(N)?!F$(P,N)||E?M(O):T.protectedKeys[O]=!0:P!==void 0?M(O):f.add(O):P!==void 0&&f.has(O)?M(O):T.protectedKeys[O]=!0)}T.prevProp=v,T.prevResolvedValues=k,T.isActive&&(p={...p,...k}),r&&e.blockInitialAnimation&&(A=!1),A&&!m&&h.push(...C.map(O=>({animation:O,options:{type:S,...a}})))}if(f.size){const x={};f.forEach(S=>{const T=e.getBaseTarget(S);T!==void 0&&(x[S]=T)}),h.push({animation:x})}let b=!!h.length;return r&&l.initial===!1&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(h):Promise.resolve()}function d(a,c,l){var u;if(n[a].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(a,c)}),n[a].isActive=c;const h=s(l,a);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:s,setActive:d,setAnimateFunction:o,getState:()=>n}}function qV(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!F$(t,e):!1}function Ua(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function YV(){return{animate:Ua(!0),whileInView:Ua(),whileHover:Ua(),whileTap:Ua(),whileDrag:Ua(),whileFocus:Ua(),exit:Ua()}}class XV extends La{constructor(t){super(t),t.animationState||(t.animationState=KV(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Sg(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let QV=0;class ZV extends La{constructor(){super(...arguments),this.id=QV++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const JV={animation:{Feature:XV},exit:{Feature:ZV}},Cx=(e,t)=>Math.abs(e-t);function eW(e,t){const n=Cx(e.x,t.x),r=Cx(e.y,t.y);return Math.sqrt(n**2+r**2)}class gT{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=Zm(this.lastMoveEventInfo,this.history),l=this.startEvent!==null,u=eW(c.offset,{x:0,y:0})>=3;if(!l&&!u)return;const{point:h}=c,{timestamp:f}=Gt;this.history.push({...h,timestamp:f});const{onStart:p,onMove:g}=this.handlers;l||(p&&p(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,c)},this.handlePointerMove=(c,l)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Qm(l,this.transformPagePoint),Wt.update(this.updatePoint,!0)},this.handlePointerUp=(c,l)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:h}=this.handlers,f=Zm(c.type==="pointercancel"?this.lastMoveEventInfo:Qm(l,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,f),h&&h(c,f)},!M$(t))return;this.handlers=n,this.transformPagePoint=r;const i=Cg(t),o=Qm(i,this.transformPagePoint),{point:s}=o,{timestamp:d}=Gt;this.history=[{...s,timestamp:d}];const{onSessionStart:a}=n;a&&a(t,Zm(o,this.history)),this.removeListeners=Sa(_o(window,"pointermove",this.handlePointerMove),_o(window,"pointerup",this.handlePointerUp),_o(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Mo(this.updatePoint)}}function Qm(e,t){return t?{point:t(e.point)}:e}function kx(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zm({point:e},t){return{point:e,delta:kx(e,mT(t)),offset:kx(e,tW(t)),velocity:nW(t,.1)}}function tW(e){return e[0]}function mT(e){return e[e.length-1]}function nW(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=mT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>xa(t)));)n--;if(!r)return{x:0,y:0};const o=Co(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Er(e){return e.max-e.min}function zy(e,t=0,n=.01){return Math.abs(e-t)<=n}function Ex(e,t,n,r=.5){e.origin=r,e.originPoint=qt(t.min,t.max,e.origin),e.scale=Er(n)/Er(t),(zy(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=qt(n.min,n.max,e.origin)-e.originPoint,(zy(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Ec(e,t,n,r){Ex(e.x,t.x,n.x,r?r.originX:void 0),Ex(e.y,t.y,n.y,r?r.originY:void 0)}function $x(e,t,n){e.min=n.min+t.min,e.max=e.min+Er(t)}function rW(e,t,n){$x(e.x,t.x,n.x),$x(e.y,t.y,n.y)}function Tx(e,t,n){e.min=t.min-n.min,e.max=e.min+Er(t)}function $c(e,t,n){Tx(e.x,t.x,n.x),Tx(e.y,t.y,n.y)}function iW(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?qt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?qt(n,e,r.max):Math.min(e,n)),e}function Ax(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function oW(e,{top:t,left:n,bottom:r,right:i}){return{x:Ax(e.x,n,i),y:Ax(e.y,t,r)}}function Mx(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}}function aW(e,t){return{x:Mx(e.x,t.x),y:Mx(e.y,t.y)}}function sW(e,t){let n=.5;const r=Er(e),i=Er(t);return i>r?n=ld(t.min,t.max-r,e.min):r>i&&(n=ld(e.min,e.max-i,t.min)),Ea(0,1,n)}function lW(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const By=.35;function uW(e=By){return e===!1?e=0:e===!0&&(e=By),{x:Lx(e,"left","right"),y:Lx(e,"top","bottom")}}function Lx(e,t,n){return{min:Rx(e,t),max:Rx(e,n)}}function Rx(e,t){return typeof e=="number"?e:e[t]||0}const Px=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rl=()=>({x:Px(),y:Px()}),Ix=()=>({min:0,max:0}),ln=()=>({x:Ix(),y:Ix()});function Ii(e){return[e("x"),e("y")]}function vT({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function cW({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function dW(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Jm(e){return e===void 0||e===1}function jy({scale:e,scaleX:t,scaleY:n}){return!Jm(e)||!Jm(t)||!Jm(n)}function Ya(e){return jy(e)||yT(e)||e.z||e.rotate||e.rotateX||e.rotateY}function yT(e){return Ox(e.x)||Ox(e.y)}function Ox(e){return e&&e!=="0%"}function up(e,t,n){const r=e-n,i=t*r;return n+i}function Fx(e,t,n,r,i){return i!==void 0&&(e=up(e,i,r)),up(e,n,r)+t}function Hy(e,t=0,n=1,r,i){e.min=Fx(e.min,t,n,r,i),e.max=Fx(e.max,t,n,r,i)}function bT(e,{x:t,y:n}){Hy(e.x,t.translate,t.scale,t.originPoint),Hy(e.y,n.translate,n.scale,n.originPoint)}function fW(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let d=0;d<i;d++){o=n[d],s=o.projectionDelta;const a=o.instance;a&&a.style&&a.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Pl(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,bT(e,s)),r&&Ya(o.latestValues)&&Pl(e,o.latestValues))}t.x=Dx(t.x),t.y=Dx(t.y)}function Dx(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function oa(e,t){e.min=e.min+t,e.max=e.max+t}function Nx(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,s=qt(e.min,e.max,o);Hy(e,t[n],t[r],s,t.scale)}const hW=["x","scaleX","originX"],pW=["y","scaleY","originY"];function Pl(e,t){Nx(e.x,t,hW),Nx(e.y,t,pW)}function wT(e,t){return vT(dW(e.getBoundingClientRect(),t))}function gW(e,t,n){const r=wT(e,n),{scroll:i}=t;return i&&(oa(r.x,i.offset.x),oa(r.y,i.offset.y)),r}const mW=new WeakMap;class vW{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ln(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=a=>{this.stopAnimation(),n&&this.snapToCursor(Cg(a,"page").point)},o=(a,c)=>{const{drag:l,dragPropagation:u,onDragStart:h}=this.getProps();if(l&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=R$(l),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ii(p=>{let g=this.getAxisMotionValue(p).get()||0;if(Gi.test(g)){const{projection:b}=this.visualElement;if(b&&b.layout){const x=b.layout.layoutBox[p];x&&(g=Er(x)*(parseFloat(g)/100))}}this.originPoint[p]=g}),h&&Wt.update(()=>h(a,c),!1,!0);const{animationState:f}=this.visualElement;f&&f.setActive("whileDrag",!0)},s=(a,c)=>{const{dragPropagation:l,dragDirectionLock:u,onDirectionLock:h,onDrag:f}=this.getProps();if(!l&&!this.openGlobalLock)return;const{offset:p}=c;if(u&&this.currentDirection===null){this.currentDirection=yW(p),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",c.point,p),this.updateAxis("y",c.point,p),this.visualElement.render(),f&&f(a,c)},d=(a,c)=>this.stop(a,c);this.panSession=new gT(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:d},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Wt.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!mf(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=iW(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Ml(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=oW(r.layoutBox,t):this.constraints=!1,this.elastic=uW(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ii(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=lW(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ml(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=gW(r,i.root,this.visualElement.getTransformPagePoint());let s=aW(i.layout.layoutBox,o);if(n){const d=n(cW(s));this.hasMutatedConstraints=!!d,d&&(s=vT(d))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:d}=this.getProps(),a=this.constraints||{},c=Ii(l=>{if(!mf(l,n,this.currentDirection))return;let u=a&&a[l]||{};s&&(u={min:0,max:0});const h=i?200:1e6,f=i?40:1e7,p={type:"inertia",velocity:r?t[l]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...u};return this.startAxisValueAnimation(l,p)});return Promise.all(c).then(d)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Jb(t,r,0,n))}stopAnimation(){Ii(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ii(n=>{const{drag:r}=this.getProps();if(!mf(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:d}=i.layout.layoutBox[n];o.set(t[n]-qt(s,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ml(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ii(s=>{const d=this.getAxisMotionValue(s);if(d){const a=d.get();i[s]=sW({min:a,max:a},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ii(s=>{if(!mf(s,t,null))return;const d=this.getAxisMotionValue(s),{min:a,max:c}=this.constraints[s];d.set(qt(a,c,i[s]))})}addListeners(){if(!this.visualElement.current)return;mW.set(this.visualElement,this);const t=this.visualElement.current,n=_o(t,"pointerdown",a=>{const{drag:c,dragListener:l=!0}=this.getProps();c&&l&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();Ml(a)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=bo(window,"resize",()=>this.scalePositionWithinConstraints()),d=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ii(l=>{const u=this.getAxisMotionValue(l);u&&(this.originPoint[l]+=a[l].translate,u.set(u.get()+a[l].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),d&&d()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=By,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:d}}}function mf(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yW(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class bW extends La{constructor(t){super(t),this.removeGroupControls=hn,this.removeListeners=hn,this.controls=new vW(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||hn}unmount(){this.removeGroupControls(),this.removeListeners()}}const zx=e=>(t,n)=>{e&&Wt.update(()=>e(t,n))};class wW extends La{constructor(){super(...arguments),this.removePointerDownListener=hn}onPointerDown(t){this.session=new gT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:zx(t),onStart:zx(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&Wt.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=_o(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function ST(){const e=z.useContext(_d);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=z.useId();return z.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function SW(){return xW(z.useContext(_d))}function xW(e){return e===null?!0:e.isPresent}const nh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vu={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(qe.test(e))e=parseFloat(e);else return e;const n=Bx(e,t.target.x),r=Bx(e,t.target.y);return`${n}% ${r}%`}},_W={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=$a.parse(e);if(i.length>5)return r;const o=$a.createTransformer(e),s=typeof i[0]!="number"?1:0,d=n.x.scale*t.x,a=n.y.scale*t.y;i[0+s]/=d,i[1+s]/=a;const c=qt(d,a,.5);return typeof i[2+s]=="number"&&(i[2+s]/=c),typeof i[3+s]=="number"&&(i[3+s]/=c),o(i)}};class CW extends st.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Mj(kW),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),nh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||Wt.postRender(()=>{const d=s.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function xT(e){const[t,n]=ST(),r=z.useContext(zb);return st.createElement(CW,{...e,layoutGroup:r,switchLayoutGroup:z.useContext(g$),isPresent:t,safeToRemove:n})}const kW={borderRadius:{...Vu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vu,borderTopRightRadius:Vu,borderBottomLeftRadius:Vu,borderBottomRightRadius:Vu,boxShadow:_W},_T=["TopLeft","TopRight","BottomLeft","BottomRight"],EW=_T.length,jx=e=>typeof e=="string"?parseFloat(e):e,Hx=e=>typeof e=="number"||qe.test(e);function $W(e,t,n,r,i,o){i?(e.opacity=qt(0,n.opacity!==void 0?n.opacity:1,TW(r)),e.opacityExit=qt(t.opacity!==void 0?t.opacity:1,0,AW(r))):o&&(e.opacity=qt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<EW;s++){const d=`border${_T[s]}Radius`;let a=Vx(t,d),c=Vx(n,d);if(a===void 0&&c===void 0)continue;a||(a=0),c||(c=0),a===0||c===0||Hx(a)===Hx(c)?(e[d]=Math.max(qt(jx(a),jx(c),r),0),(Gi.test(c)||Gi.test(a))&&(e[d]+="%")):e[d]=c}(t.rotate||n.rotate)&&(e.rotate=qt(t.rotate||0,n.rotate||0,r))}function Vx(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const TW=CT(0,.5,Yb),AW=CT(.5,.95,hn);function CT(e,t,n){return r=>r<e?0:r>t?1:n(ld(e,t,r))}function Wx(e,t){e.min=t.min,e.max=t.max}function jr(e,t){Wx(e.x,t.x),Wx(e.y,t.y)}function Ux(e,t,n,r,i){return e-=t,e=up(e,1/n,r),i!==void 0&&(e=up(e,1/i,r)),e}function MW(e,t=0,n=1,r=.5,i,o=e,s=e){if(Gi.test(t)&&(t=parseFloat(t),t=qt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let d=qt(o.min,o.max,r);e===o&&(d-=t),e.min=Ux(e.min,t,n,d,i),e.max=Ux(e.max,t,n,d,i)}function Gx(e,t,[n,r,i],o,s){MW(e,t[n],t[r],t[i],t.scale,o,s)}const LW=["x","scaleX","originX"],RW=["y","scaleY","originY"];function Kx(e,t,n,r){Gx(e.x,t,LW,n?n.x:void 0,r?r.x:void 0),Gx(e.y,t,RW,n?n.y:void 0,r?r.y:void 0)}function qx(e){return e.translate===0&&e.scale===1}function kT(e){return qx(e.x)&&qx(e.y)}function Vy(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 Yx(e){return Er(e.x)/Er(e.y)}class PW{constructor(){this.members=[]}add(t){ew(this.members,t),t.scheduleRender()}remove(t){if(tw(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Xx(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:a,rotateX:c,rotateY:l}=n;a&&(r+=`rotate(${a}deg) `),c&&(r+=`rotateX(${c}deg) `),l&&(r+=`rotateY(${l}deg) `)}const s=e.x.scale*t.x,d=e.y.scale*t.y;return(s!==1||d!==1)&&(r+=`scale(${s}, ${d})`),r||"none"}const IW=(e,t)=>e.depth-t.depth;class OW{constructor(){this.children=[],this.isDirty=!1}add(t){ew(this.children,t),this.isDirty=!0}remove(t){tw(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(IW),this.isDirty=!1,this.children.forEach(t)}}function FW(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Mo(r),e(o-t))};return Wt.read(r,!0),()=>Mo(r)}function DW(e){window.MotionDebug&&window.MotionDebug.record(e)}function NW(e){return e instanceof SVGElement&&e.tagName!=="svg"}function zW(e,t,n){const r=hr(e)?e:fu(e);return r.start(Jb("",r,t,n)),r.animation}const Qx=["","X","Y","Z"],Zx=1e3;let BW=0;const Xa={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ET({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},d=t==null?void 0:t()){this.id=BW++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!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.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Xa.totalNodes=Xa.resolvedTargetDeltas=Xa.recalculatedProjection=0,this.nodes.forEach(VW),this.nodes.forEach(qW),this.nodes.forEach(YW),this.nodes.forEach(WW),DW(Xa)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new OW)}addEventListener(s,d){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new nw),this.eventHandlers.get(s).add(d)}notifyListeners(s,...d){const a=this.eventHandlers.get(s);a&&a.notify(...d)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,d=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=NW(s),this.instance=s;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),d&&(c||a)&&(this.isLayoutDirty=!0),e){let u;const h=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=FW(h,250),nh.hasAnimatedSinceResize&&(nh.hasAnimatedSinceResize=!1,this.nodes.forEach(e_))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||l.getDefaultTransition()||e9,{onLayoutAnimationStart:b,onLayoutAnimationComplete:x}=l.getProps(),S=!this.targetLayout||!Vy(this.targetLayout,p)||f,T=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||h&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,T);const v={...dT(g,"layout"),onPlay:b,onComplete:x};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v)}else h||e_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Mo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(XW),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const u=this.path[l];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:d,layout:a}=this.options;if(d===void 0&&!a)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Jx);return}this.isUpdating||this.nodes.forEach(GW),this.isUpdating=!1,this.nodes.forEach(KW),this.nodes.forEach(jW),this.nodes.forEach(HW),this.clearAllSnapshots();const d=performance.now();Gt.delta=Ea(0,1e3/60,d-Gt.timestamp),Gt.timestamp=d,Gt.isProcessing=!0,Kl.update.process(Gt),Kl.preRender.process(Gt),Kl.render.process(Gt),Gt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(UW),this.sharedNodes.forEach(QW)}scheduleUpdateProjection(){Wt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Wt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let a=0;a<this.path.length;a++)this.path[a].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ln(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let d=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(d=!1),d&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,d=this.projectionDelta&&!kT(this.projectionDelta),a=this.getTransformTemplate(),c=a?a(this.latestValues,""):void 0,l=c!==this.prevTransformTemplateValue;s&&(d||Ya(this.latestValues)||l)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const d=this.measurePageBox();let a=this.removeElementScroll(d);return s&&(a=this.removeTransform(a)),t9(a),{animationId:this.root.animationId,measuredBox:d,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return ln();const d=s.measureViewportBox(),{scroll:a}=this.root;return a&&(oa(d.x,a.offset.x),oa(d.y,a.offset.y)),d}removeElementScroll(s){const d=ln();jr(d,s);for(let a=0;a<this.path.length;a++){const c=this.path[a],{scroll:l,options:u}=c;if(c!==this.root&&l&&u.layoutScroll){if(l.isRoot){jr(d,s);const{scroll:h}=this.root;h&&(oa(d.x,-h.offset.x),oa(d.y,-h.offset.y))}oa(d.x,l.offset.x),oa(d.y,l.offset.y)}}return d}applyTransform(s,d=!1){const a=ln();jr(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c];!d&&l.options.layoutScroll&&l.scroll&&l!==l.root&&Pl(a,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),Ya(l.latestValues)&&Pl(a,l.latestValues)}return Ya(this.latestValues)&&Pl(a,this.latestValues),a}removeTransform(s){const d=ln();jr(d,s);for(let a=0;a<this.path.length;a++){const c=this.path[a];if(!c.instance||!Ya(c.latestValues))continue;jy(c.latestValues)&&c.updateSnapshot();const l=ln(),u=c.measurePageBox();jr(l,u),Kx(d,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,l)}return Ya(this.latestValues)&&Kx(d,this.latestValues),d}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}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}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Gt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:u,layoutId:h}=this.options;if(!(!this.layout||!(u||h))){if(this.resolvedRelativeTargetAt=Gt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ln(),this.relativeTargetOrigin=ln(),$c(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),jr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ln(),this.targetWithTransforms=ln()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rW(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):jr(this.target,this.layout.layoutBox),bT(this.target,this.targetDelta)):jr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ln(),this.relativeTargetOrigin=ln(),$c(this.relativeTargetOrigin,this.target,f.target),jr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Xa.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||jy(this.parent.latestValues)||yT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const d=this.getLead(),a=!!this.resumingFrom||this!==d;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Gt.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;jr(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;fW(this.layoutCorrected,this.treeScale,this.path,a),d.layout&&!d.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(d.target=d.layout.layoutBox);const{target:p}=d;if(!p){this.projectionTransform&&(this.projectionDelta=Rl(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Rl(),this.projectionDeltaWithTransform=Rl());const g=this.projectionTransform;Ec(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=Xx(this.projectionDelta,this.treeScale),(this.projectionTransform!==g||this.treeScale.x!==h||this.treeScale.y!==f)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Xa.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,d=!1){const a=this.snapshot,c=a?a.latestValues:{},l={...this.latestValues},u=Rl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const h=ln(),f=a?a.source:void 0,p=this.layout?this.layout.source:void 0,g=f!==p,b=this.getStack(),x=!b||b.members.length<=1,S=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(JW));this.animationProgress=0;let T;this.mixTargetDelta=v=>{const w=v/1e3;t_(u.x,s.x,w),t_(u.y,s.y,w),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($c(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ZW(this.relativeTarget,this.relativeTargetOrigin,h,w),T&&Vy(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=ln()),jr(T,this.relativeTarget)),g&&(this.animationValues=l,$W(l,c,this.latestValues,w,S,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Mo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Wt.update(()=>{nh.hasAnimatedSinceResize=!0,this.currentAnimation=zW(0,Zx,{...s,onUpdate:d=>{this.mixTargetDelta(d),s.onUpdate&&s.onUpdate(d)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Zx),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:d,target:a,layout:c,latestValues:l}=s;if(!(!d||!a||!c)){if(this!==s&&this.layout&&c&&$T(this.options.animationType,this.layout.layoutBox,c.layoutBox)){a=this.target||ln();const u=Er(this.layout.layoutBox.x);a.x.min=s.target.x.min,a.x.max=a.x.min+u;const h=Er(this.layout.layoutBox.y);a.y.min=s.target.y.min,a.y.max=a.y.min+h}jr(d,a),Pl(d,l),Ec(this.projectionDeltaWithTransform,this.layoutCorrected,d,l)}}registerSharedNode(s,d){this.sharedNodes.has(s)||this.sharedNodes.set(s,new PW),this.sharedNodes.get(s).add(d);const c=d.options.initialPromotionConfig;d.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(d):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:d}=this.options;return d?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:d}=this.options;return d?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:d,preserveFollowOpacity:a}={}){const c=this.getStack();c&&c.promote(this,a),s&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let d=!1;const{latestValues:a}=s;if((a.rotate||a.rotateX||a.rotateY||a.rotateZ)&&(d=!0),!d)return;const c={};for(let l=0;l<Qx.length;l++){const u="rotate"+Qx[l];a[u]&&(c[u]=a[u],s.setStaticValue(u,0))}s.render();for(const l in c)s.setStaticValue(l,c[l]);s.scheduleRender()}getProjectionStyles(s={}){var d,a;const c={};if(!this.instance||this.isSVG)return c;if(this.isVisible)c.visibility="";else return{visibility:"hidden"};const l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=th(s.pointerEvents)||"",c.transform=l?l(this.latestValues,""):"none",c;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=th(s.pointerEvents)||""),this.hasProjected&&!Ya(this.latestValues)&&(g.transform=l?l({},""):"none",this.hasProjected=!1),g}const h=u.animationValues||u.latestValues;this.applyTransformsToTarget(),c.transform=Xx(this.projectionDeltaWithTransform,this.treeScale,h),l&&(c.transform=l(h,c.transform));const{x:f,y:p}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?c.opacity=u===this?(a=(d=h.opacity)!==null&&d!==void 0?d:this.latestValues.opacity)!==null&&a!==void 0?a:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=u===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const g in np){if(h[g]===void 0)continue;const{correct:b,applyTo:x}=np[g],S=c.transform==="none"?h[g]:b(h[g],u);if(x){const T=x.length;for(let v=0;v<T;v++)c[x[v]]=S}else c[g]=S}return this.options.layoutId&&(c.pointerEvents=u===this?th(s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var d;return(d=s.currentAnimation)===null||d===void 0?void 0:d.stop()}),this.root.nodes.forEach(Jx),this.root.sharedNodes.clear()}}}function jW(e){e.updateLayout()}function HW(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?Ii(u=>{const h=s?n.measuredBox[u]:n.layoutBox[u],f=Er(h);h.min=r[u].min,h.max=h.min+f}):$T(o,n.layoutBox,r)&&Ii(u=>{const h=s?n.measuredBox[u]:n.layoutBox[u],f=Er(r[u]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const d=Rl();Ec(d,r,n.layoutBox);const a=Rl();s?Ec(a,e.applyTransform(i,!0),n.measuredBox):Ec(a,r,n.layoutBox);const c=!kT(d);let l=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const p=ln();$c(p,n.layoutBox,h.layoutBox);const g=ln();$c(g,r,f.layoutBox),Vy(p,g)||(l=!0),u.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:d,hasLayoutChanged:c,hasRelativeTargetChanged:l})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function VW(e){Xa.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function WW(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function UW(e){e.clearSnapshot()}function Jx(e){e.clearMeasurements()}function GW(e){e.isLayoutDirty=!1}function KW(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function e_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qW(e){e.resolveTargetDelta()}function YW(e){e.calcProjection()}function XW(e){e.resetRotation()}function QW(e){e.removeLeadSnapshot()}function t_(e,t,n){e.translate=qt(t.translate,0,n),e.scale=qt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function n_(e,t,n,r){e.min=qt(t.min,n.min,r),e.max=qt(t.max,n.max,r)}function ZW(e,t,n,r){n_(e.x,t.x,n.x,r),n_(e.y,t.y,n.y,r)}function JW(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const e9={duration:.45,ease:[.4,0,.1,1]};function r_(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function t9(e){r_(e.x),r_(e.y)}function $T(e,t,n){return e==="position"||e==="preserve-aspect"&&!zy(Yx(t),Yx(n),.2)}const n9=ET({attachResizeListener:(e,t)=>bo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ev={current:void 0},TT=ET({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ev.current){const e=new n9({});e.mount(window),e.setOptions({layoutScroll:!0}),ev.current=e}return ev.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),r9={pan:{Feature:wW},drag:{Feature:bW,ProjectionNode:TT,MeasureLayout:xT}},i9=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function o9(e){const t=i9.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Wy(e,t,n=1){const[r,i]=o9(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():Ly(i)?Wy(i,t,n+1):i}function a9(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!Ly(o))return;const s=Wy(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!Ly(o))continue;const s=Wy(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const s9=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),AT=e=>s9.has(e),l9=e=>Object.keys(e).some(AT),i_=e=>e===Ls||e===qe,o_=(e,t)=>parseFloat(e.split(", ")[t]),a_=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return o_(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?o_(o[1],e):0}},u9=new Set(["x","y","z"]),c9=Cd.filter(e=>!u9.has(e));function d9(e){const t=[];return c9.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const s_={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:a_(4,13),y:a_(5,14)},f9=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,d={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{d[c]=s_[c](r,o)}),t.render();const a=t.measureViewportBox();return n.forEach(c=>{const l=t.getValue(c);l&&l.jump(d[c]),e[c]=s_[c](a,o)}),e},h9=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(AT);let o=[],s=!1;const d=[];if(i.forEach(a=>{const c=e.getValue(a);if(!e.hasValue(a))return;let l=n[a],u=Hu(l);const h=t[a];let f;if(ip(h)){const p=h.length,g=h[0]===null?1:0;l=h[g],u=Hu(l);for(let b=g;b<p&&h[b]!==null;b++)f?qb(Hu(h[b])===f):f=Hu(h[b])}else f=Hu(h);if(u!==f)if(i_(u)&&i_(f)){const p=c.get();typeof p=="string"&&c.set(parseFloat(p)),typeof h=="string"?t[a]=parseFloat(h):Array.isArray(h)&&f===qe&&(t[a]=h.map(parseFloat))}else u!=null&&u.transform&&(f!=null&&f.transform)&&(l===0||h===0)?l===0?c.set(f.transform(l)):t[a]=u.transform(h):(s||(o=d9(e),s=!0),d.push(a),r[a]=r[a]!==void 0?r[a]:t[a],c.jump(h))}),d.length){const a=d.indexOf("height")>=0?window.pageYOffset:null,c=f9(t,e,d);return o.length&&o.forEach(([l,u])=>{e.getValue(l).set(u)}),e.render(),wg&&a!==null&&window.scrollTo({top:a}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function p9(e,t,n,r){return l9(t)?h9(e,t,n,r):{target:t,transitionEnd:r}}const g9=(e,t,n,r)=>{const i=a9(e,t,r);return t=i.target,r=i.transitionEnd,p9(e,t,n,r)},Uy={current:null},MT={current:!1};function m9(){if(MT.current=!0,!!wg)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Uy.current=e.matches;e.addListener(t),t()}else Uy.current=!1}function v9(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(hr(o))e.addValue(i,o),lp(r)&&r.add(i);else if(hr(s))e.addValue(i,fu(o,{owner:e})),lp(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const d=e.getValue(i);!d.hasAnimated&&d.set(o)}else{const d=e.getStaticValue(i);e.addValue(i,fu(d!==void 0?d:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const l_=new WeakMap,LT=Object.keys(ad),y9=LT.length,u_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],b9=Nb.length;class w9{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},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=()=>Wt.render(this.render,!1,!0);const{latestValues:d,renderState:a}=o;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=a,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=xg(n),this.isVariantNode=p$(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...l}=this.scrapeMotionValuesFromProps(n,{});for(const u in l){const h=l[u];d[u]!==void 0&&hr(h)&&(h.set(d[u],!1),lp(c)&&c.add(u))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,l_.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),MT.current||m9(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Uy.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){l_.delete(this.current),this.projection&&this.projection.unmount(),Mo(this.notifyUpdate),Mo(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Ms.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Wt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,d;for(let a=0;a<y9;a++){const c=LT[a],{isEnabled:l,Feature:u,ProjectionNode:h,MeasureLayout:f}=ad[c];h&&(s=h),l(n)&&(!this.features[c]&&u&&(this.features[c]=new u(this)),f&&(d=f))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:a,layout:c,drag:l,dragConstraints:u,layoutScroll:h,layoutRoot:f}=n;this.projection.setOptions({layoutId:a,layout:c,alwaysMeasureLayout:!!l||u&&Ml(u),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:f})}return d}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ln()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<u_.length;r++){const i=u_[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=v9(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<b9;r++){const i=Nb[r],o=this.props[i];(od(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=fu(n,{owner:this}),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Kb(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!hr(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new nw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class RT extends w9{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=zV(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){DV(this,r,s);const d=g9(this,r,s,n);n=d.transitionEnd,r=d.target}return{transition:t,transitionEnd:n,...r}}}function S9(e){return window.getComputedStyle(e)}class x9 extends RT{readValueFromInstance(t,n){if(Ms.has(n)){const r=Zb(n);return r&&r.default||0}else{const r=S9(t),i=(y$(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wT(t,n)}build(t,n,r,i){jb(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Gb(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;hr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){C$(t,n,r,i)}}class _9 extends RT{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ms.has(n)){const r=Zb(n);return r&&r.default||0}return n=k$.has(n)?n:Ub(n),t.getAttribute(n)}measureInstanceViewportBox(){return ln()}scrapeMotionValuesFromProps(t,n){return $$(t,n)}build(t,n,r,i){Vb(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){E$(t,n,r,i)}mount(t){this.isSVGTag=Wb(t.tagName),super.mount(t)}}const C9=(e,t)=>Bb(e)?new _9(t,{enableHardwareAcceleration:!1}):new x9(t,{enableHardwareAcceleration:!0}),k9={layout:{ProjectionNode:TT,MeasureLayout:xT}},E9={...JV,...wH,...r9,...k9},xu=Tj((e,t)=>rH(e,t,E9,C9));function PT(){const e=z.useRef(!1);return tp(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function $9(){const e=PT(),[t,n]=z.useState(0),r=z.useCallback(()=>{e.current&&n(t+1)},[t]);return[z.useCallback(()=>Wt.postRender(r),[r]),t]}class T9 extends z.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function A9({children:e,isPresent:t}){const n=z.useId(),r=z.useRef(null),i=z.useRef({width:0,height:0,top:0,left:0});return z.useInsertionEffect(()=>{const{width:o,height:s,top:d,left:a}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
|
||
[data-motion-pop-id="${n}"] {
|
||
position: absolute !important;
|
||
width: ${o}px !important;
|
||
height: ${s}px !important;
|
||
top: ${d}px !important;
|
||
left: ${a}px !important;
|
||
}
|
||
`),()=>{document.head.removeChild(c)}},[t]),z.createElement(T9,{isPresent:t,childRef:r,sizeRef:i},z.cloneElement(e,{ref:r}))}const tv=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const d=T$(M9),a=z.useId(),c=z.useMemo(()=>({id:a,initial:t,isPresent:n,custom:i,onExitComplete:l=>{d.set(l,!0);for(const u of d.values())if(!u)return;r&&r()},register:l=>(d.set(l,!1),()=>d.delete(l))}),o?void 0:[n]);return z.useMemo(()=>{d.forEach((l,u)=>d.set(u,!1))},[n]),z.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),s==="popLayout"&&(e=z.createElement(A9,{isPresent:n},e)),z.createElement(_d.Provider,{value:c},e)};function M9(){return new Map}function L9(e){return z.useEffect(()=>()=>e(),[])}const fl=e=>e.key||"";function R9(e,t){e.forEach(n=>{const r=fl(n);t.set(r,n)})}function P9(e){const t=[];return z.Children.forEach(e,n=>{z.isValidElement(n)&&t.push(n)}),t}const Td=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const d=z.useContext(zb).forceRender||$9()[0],a=PT(),c=P9(e);let l=c;const u=z.useRef(new Map).current,h=z.useRef(l),f=z.useRef(new Map).current,p=z.useRef(!0);if(tp(()=>{p.current=!1,R9(c,f),h.current=l}),L9(()=>{p.current=!0,f.clear(),u.clear()}),p.current)return z.createElement(z.Fragment,null,l.map(S=>z.createElement(tv,{key:fl(S),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},S)));l=[...l];const g=h.current.map(fl),b=c.map(fl),x=g.length;for(let S=0;S<x;S++){const T=g[S];b.indexOf(T)===-1&&!u.has(T)&&u.set(T,void 0)}return s==="wait"&&u.size&&(l=[]),u.forEach((S,T)=>{if(b.indexOf(T)!==-1)return;const v=f.get(T);if(!v)return;const w=g.indexOf(T);let y=S;if(!y){const m=()=>{f.delete(T),u.delete(T);const E=h.current.findIndex(A=>A.key===T);if(h.current.splice(E,1),!u.size){if(h.current=c,a.current===!1)return;d(),r&&r()}};y=z.createElement(tv,{key:fl(v),isPresent:!1,onExitComplete:m,custom:t,presenceAffectsLayout:o,mode:s},v),u.set(T,y)}l.splice(w,0,y)}),l=l.map(S=>{const T=S.key;return u.has(T)?S:z.createElement(tv,{key:fl(S),isPresent:!0,presenceAffectsLayout:o,mode:s},S)}),z.createElement(z.Fragment,null,u.size?l:l.map(S=>z.cloneElement(S)))};var I9={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},IT=z.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:s="bottom",duration:d=5e3,containerStyle:a,motionVariants:c=I9,toastSpacing:l="0.5rem"}=e,[u,h]=z.useState(d),f=SW();ep(()=>{f||r==null||r()},[f]),ep(()=>{h(d)},[d]);const p=()=>h(null),g=()=>h(d),b=()=>{f&&i()};z.useEffect(()=>{f&&o&&i()},[f,o,i]),bj(b,u);const x=z.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:l,...a}),[a,l]),S=z.useMemo(()=>vj(s),[s]);return j.jsx(xu.div,{layout:!0,className:"chakra-toast",variants:c,initial:"initial",animate:"animate",exit:"exit",onHoverStart:p,onHoverEnd:g,custom:{position:s},style:S,children:j.jsx(Ye.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:x,children:da(n,{id:t,onClose:b})})})});IT.displayName="ToastComponent";var c_={path:j.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[j.jsx("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"}),j.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),j.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Rs=mt((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:s,className:d,__css:a,...c}=e,l=St("chakra-icon",d),u=yg("Icon",e),h={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...a,...u},f={ref:t,focusable:o,className:l,__css:h},p=r??c_.viewBox;if(n&&typeof n!="string")return j.jsx(Ye.svg,{as:n,...f,...c});const g=s??c_.path;return j.jsx(Ye.svg,{verticalAlign:"middle",viewBox:p,...f,...c,children:g})});Rs.displayName="Icon";function O9(e){return j.jsx(Rs,{viewBox:"0 0 24 24",...e,children:j.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function F9(e){return j.jsx(Rs,{viewBox:"0 0 24 24",...e,children:j.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function d_(e){return j.jsx(Rs,{viewBox:"0 0 24 24",...e,children:j.jsx("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 D9=wd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),OT=mt((e,t)=>{const n=yg("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:s="transparent",className:d,...a}=ei(e),c=St("chakra-spinner",d),l={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:s,borderLeftColor:s,animation:`${D9} ${o} linear infinite`,...n};return j.jsx(Ye.div,{ref:t,__css:l,className:c,...a,children:r&&j.jsx(Ye.span,{srOnly:!0,children:r})})});OT.displayName="Spinner";var[N9,rw]=xn({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[z9,iw]=xn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),FT={info:{icon:F9,colorScheme:"blue"},warning:{icon:d_,colorScheme:"orange"},success:{icon:O9,colorScheme:"green"},error:{icon:d_,colorScheme:"red"},loading:{icon:OT,colorScheme:"blue"}};function B9(e){return FT[e].colorScheme}function j9(e){return FT[e].icon}var DT=mt(function(t,n){const r=iw(),{status:i}=rw(),o={display:"inline",...r.description};return j.jsx(Ye.div,{ref:n,"data-status":i,...t,className:St("chakra-alert__desc",t.className),__css:o})});DT.displayName="AlertDescription";function NT(e){const{status:t}=rw(),n=j9(t),r=iw(),i=t==="loading"?r.spinner:r.icon;return j.jsx(Ye.span,{display:"inherit","data-status":t,...e,className:St("chakra-alert__icon",e.className),__css:i,children:e.children||j.jsx(n,{h:"100%",w:"100%"})})}NT.displayName="AlertIcon";var zT=mt(function(t,n){const r=iw(),{status:i}=rw();return j.jsx(Ye.div,{ref:n,"data-status":i,...t,className:St("chakra-alert__title",t.className),__css:r.title})});zT.displayName="AlertTitle";var BT=mt(function(t,n){var r;const{status:i="info",addRole:o=!0,...s}=ei(t),d=(r=t.colorScheme)!=null?r:B9(i),a=Yi("Alert",{...t,colorScheme:d}),c={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...a.container};return j.jsx(N9,{value:{status:i},children:j.jsx(z9,{value:a,children:j.jsx(Ye.div,{"data-status":i,role:o?"alert":void 0,ref:n,...s,className:St("chakra-alert",t.className),__css:c})})})});BT.displayName="Alert";function H9(e){return j.jsx(Rs,{focusable:"false","aria-hidden":!0,...e,children:j.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var jT=mt(function(t,n){const r=yg("CloseButton",t),{children:i,isDisabled:o,__css:s,...d}=ei(t),a={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return j.jsx(Ye.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...a,...r,...s},...d,children:i||j.jsx(H9,{width:"1em",height:"1em"})})});jT.displayName="CloseButton";var V9={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Tc=W9(V9);function W9(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(s=>({...s,[o]:s[o].filter(d=>d.id!=i)}))},notify:(i,o)=>{const s=U9(i,o),{position:d,id:a}=s;return r(c=>{var l,u;const f=d.includes("top")?[s,...(l=c[d])!=null?l:[]]:[...(u=c[d])!=null?u:[],s];return{...c,[d]:f}}),a},update:(i,o)=>{i&&r(s=>{const d={...s},{position:a,index:c}=ax(d,i);return a&&c!==-1&&(d[a][c]={...d[a][c],...o,message:K9(o)}),d})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((a,c)=>(a[c]=o[c].map(l=>({...l,requestClose:!0})),a),{...o}))},close:i=>{r(o=>{const s=d$(o,i);return s?{...o,[s]:o[s].map(d=>d.id==i?{...d,requestClose:!0}:d)}:o})},isActive:i=>!!ax(Tc.getState(),i).position}}var f_=0;function U9(e,t={}){var n,r;f_+=1;const i=(n=t.id)!=null?n:f_,o=(r=t.position)!=null?r:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Tc.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var G9=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:s,description:d,colorScheme:a,icon:c}=e,l=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return j.jsxs(BT,{addRole:!1,status:t,variant:n,id:l==null?void 0:l.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:a,children:[j.jsx(NT,{children:c}),j.jsxs(Ye.div,{flex:"1",maxWidth:"100%",children:[i&&j.jsx(zT,{id:l==null?void 0:l.title,children:i}),d&&j.jsx(DT,{id:l==null?void 0:l.description,display:"block",children:d})]}),o&&j.jsx(jT,{size:"sm",onClick:s,position:"absolute",insetEnd:1,top:1})]})};function K9(e={}){const{render:t,toastComponent:n=G9}=e;return i=>typeof t=="function"?t({...i,...e}):j.jsx(n,{...i,...e})}var[q9,YQ]=xn({name:"ToastOptionsContext",strict:!1}),Y9=e=>{const t=z.useSyncExternalStore(Tc.subscribe,Tc.getState,Tc.getState),{motionVariants:n,component:r=IT,portalProps:i}=e,s=Object.keys(t).map(d=>{const a=t[d];return j.jsx("div",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${d}`,style:yj(d),children:j.jsx(Td,{initial:!1,children:a.map(c=>j.jsx(r,{motionVariants:n,...c},c.id))})},d)});return j.jsx(Sd,{...i,children:s})},X9=e=>function({children:n,theme:r=e,toastOptions:i,...o}){return j.jsxs(gj,{theme:r,...o,children:[j.jsx(q9,{value:i==null?void 0:i.defaultOptions,children:n}),j.jsx(Y9,{...i})]})},ow=X9(n$),Q9=Object.defineProperty,Z9=(e,t,n)=>t in e?Q9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jt=(e,t,n)=>(Z9(e,typeof t!="symbol"?t+"":t,n),n);function h_(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var J9=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function p_(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function g_(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Gy=typeof window<"u"?z.useLayoutEffect:z.useEffect,cp=e=>e,e7=class{constructor(){Jt(this,"descendants",new Map),Jt(this,"register",e=>{if(e!=null)return J9(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),Jt(this,"unregister",e=>{this.descendants.delete(e);const t=h_(Array.from(this.descendants.keys()));this.assignIndex(t)}),Jt(this,"destroy",()=>{this.descendants.clear()}),Jt(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),Jt(this,"count",()=>this.descendants.size),Jt(this,"enabledCount",()=>this.enabledValues().length),Jt(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),Jt(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),Jt(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),Jt(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),Jt(this,"first",()=>this.item(0)),Jt(this,"firstEnabled",()=>this.enabledItem(0)),Jt(this,"last",()=>this.item(this.descendants.size-1)),Jt(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),Jt(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),Jt(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),Jt(this,"next",(e,t=!0)=>{const n=p_(e,this.count(),t);return this.item(n)}),Jt(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=p_(r,this.enabledCount(),t);return this.enabledItem(i)}),Jt(this,"prev",(e,t=!0)=>{const n=g_(e,this.count()-1,t);return this.item(n)}),Jt(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=g_(r,this.enabledCount()-1,t);return this.enabledItem(i)}),Jt(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=h_(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)})}};function t7(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Cr(...e){return t=>{e.forEach(n=>{t7(n,t)})}}function n7(){const e=z.useRef(new e7);return Gy(()=>()=>e.current.destroy()),e.current}var[r7,HT]=xn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function i7(e){const t=HT(),[n,r]=z.useState(-1),i=z.useRef(null);Gy(()=>()=>{i.current&&t.unregister(i.current)},[]),Gy(()=>{if(!i.current)return;const s=Number(i.current.dataset.index);n!=s&&!Number.isNaN(s)&&r(s)});const o=cp(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Cr(o,i)}}function o7(){return[cp(r7),()=>cp(HT()),()=>n7(),i=>i7(i)]}function a7(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(h,f)=>h!==f}=e,o=Gn(r),s=Gn(i),[d,a]=z.useState(n),c=t!==void 0,l=c?t:d,u=Gn(h=>{const p=typeof h=="function"?h(l):h;s(l,p)&&(c||a(p),o(p))},[c,o,l,s]);return[l,u]}var m_={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},gs={enter:{duration:.2,ease:m_.easeOut},exit:{duration:.1,ease:m_.easeIn}},ms={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},s7={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:ms.enter(gs.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:ms.exit(gs.exit,n),transitionEnd:t==null?void 0:t.exit}}},VT={initial:"exit",animate:"enter",exit:"exit",variants:s7},l7=z.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:s,transitionEnd:d,delay:a,...c}=t,l=i||r?"enter":"exit",u=r?i&&r:!0,h={transition:s,transitionEnd:d,delay:a};return j.jsx(Td,{custom:h,children:u&&j.jsx(xu.div,{ref:n,className:St("chakra-fade",o),custom:h,...VT,animate:l,...c})})});l7.displayName="Fade";var u7={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(o=n==null?void 0:n.exit)!=null?o:ms.exit(gs.exit,i)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:ms.enter(gs.enter,n),transitionEnd:e==null?void 0:e.enter}}},WT={initial:"exit",animate:"enter",exit:"exit",variants:u7},c7=z.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:s=.95,className:d,transition:a,transitionEnd:c,delay:l,...u}=t,h=r?i&&r:!0,f=i||r?"enter":"exit",p={initialScale:s,reverse:o,transition:a,transitionEnd:c,delay:l};return j.jsx(Td,{custom:p,children:h&&j.jsx(xu.div,{ref:n,className:St("chakra-offset-slide",d),...WT,animate:f,custom:p,...u})})});c7.displayName="ScaleFade";var d7={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,x:e,y:t,transition:(o=n==null?void 0:n.exit)!=null?o:ms.exit(gs.exit,i),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:ms.enter(gs.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{var s;const d={x:t,y:e};return{opacity:0,transition:(s=n==null?void 0:n.exit)!=null?s:ms.exit(gs.exit,o),...i?{...d,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...d,...r==null?void 0:r.exit}}}}},Ky={initial:"initial",animate:"enter",exit:"exit",variants:d7},f7=z.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:s,offsetX:d=0,offsetY:a=8,transition:c,transitionEnd:l,delay:u,...h}=t,f=r?i&&r:!0,p=i||r?"enter":"exit",g={offsetX:d,offsetY:a,reverse:o,transition:c,transitionEnd:l,delay:u};return j.jsx(Td,{custom:g,children:f&&j.jsx(xu.div,{ref:n,className:St("chakra-offset-slide",s),custom:g,...Ky,animate:p,...h})})});f7.displayName="SlideFade";function aw(e){return z.Children.toArray(e).filter(t=>z.isValidElement(t))}var[XQ,h7]=xn({name:"CheckboxGroupContext",strict:!1});function p7(e){const[t,n]=z.useState(e),[r,i]=z.useState(!1);return e!==t&&(i(!0),n(e)),r}function g7(e){return j.jsx(Ye.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:j.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function m7(e){return j.jsx(Ye.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:j.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function v7(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?m7:g7;return n||t?j.jsx(Ye.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:j.jsx(i,{...r})}):null}var[y7,UT]=xn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[b7,Ad]=xn({strict:!1,name:"FormControlContext"});function w7(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...s}=e,d=z.useId(),a=t||`field-${d}`,c=`${a}-label`,l=`${a}-feedback`,u=`${a}-helptext`,[h,f]=z.useState(!1),[p,g]=z.useState(!1),[b,x]=z.useState(!1),S=z.useCallback((m={},E=null)=>({id:u,...m,ref:Cr(E,A=>{A&&g(!0)})}),[u]),T=z.useCallback((m={},E=null)=>({...m,ref:E,"data-focus":ht(b),"data-disabled":ht(i),"data-invalid":ht(r),"data-readonly":ht(o),id:m.id!==void 0?m.id:c,htmlFor:m.htmlFor!==void 0?m.htmlFor:a}),[a,i,b,r,o,c]),v=z.useCallback((m={},E=null)=>({id:l,...m,ref:Cr(E,A=>{A&&f(!0)}),"aria-live":"polite"}),[l]),w=z.useCallback((m={},E=null)=>({...m,...s,ref:E,role:"group"}),[s]),y=z.useCallback((m={},E=null)=>({...m,ref:E,role:"presentation","aria-hidden":!0,children:m.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!b,onFocus:()=>x(!0),onBlur:()=>x(!1),hasFeedbackText:h,setHasFeedbackText:f,hasHelpText:p,setHasHelpText:g,id:a,labelId:c,feedbackId:l,helpTextId:u,htmlProps:s,getHelpTextProps:S,getErrorMessageProps:v,getRootProps:w,getLabelProps:T,getRequiredIndicatorProps:y}}var hl=mt(function(t,n){const r=Yi("Form",t),i=ei(t),{getRootProps:o,htmlProps:s,...d}=w7(i),a=St("chakra-form-control",t.className);return j.jsx(b7,{value:d,children:j.jsx(y7,{value:r,children:j.jsx(Ye.div,{...o({},n),className:a,__css:r.container})})})});hl.displayName="FormControl";var S7=mt(function(t,n){const r=Ad(),i=UT(),o=St("chakra-form__helper-text",t.className);return j.jsx(Ye.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});S7.displayName="FormHelperText";var ea=mt(function(t,n){var r;const i=yg("FormLabel",t),o=ei(t),{className:s,children:d,requiredIndicator:a=j.jsx(GT,{}),optionalIndicator:c=null,...l}=o,u=Ad(),h=(r=u==null?void 0:u.getLabelProps(l,n))!=null?r:{ref:n,...l};return j.jsxs(Ye.label,{...h,className:St("chakra-form__label",o.className),__css:{display:"block",textAlign:"start",...i},children:[d,u!=null&&u.isRequired?a:c]})});ea.displayName="FormLabel";var GT=mt(function(t,n){const r=Ad(),i=UT();if(!(r!=null&&r.isRequired))return null;const o=St("chakra-form__required-indicator",t.className);return j.jsx(Ye.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});GT.displayName="RequiredIndicator";function x7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=sw(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":So(n),"aria-required":So(i),"aria-readonly":So(r)}}function sw(e){var t,n,r;const i=Ad(),{id:o,disabled:s,readOnly:d,required:a,isRequired:c,isInvalid:l,isReadOnly:u,isDisabled:h,onFocus:f,onBlur:p,...g}=e,b=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&(i!=null&&i.isInvalid)&&b.push(i.feedbackId),i!=null&&i.hasHelpText&&b.push(i.helpTextId),{...g,"aria-describedby":b.join(" ")||void 0,id:o??(i==null?void 0:i.id),isDisabled:(t=s??h)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(n=d??u)!=null?n:i==null?void 0:i.isReadOnly,isRequired:(r=a??c)!=null?r:i==null?void 0:i.isRequired,isInvalid:l??(i==null?void 0:i.isInvalid),onFocus:ut(i==null?void 0:i.onFocus,f),onBlur:ut(i==null?void 0:i.onBlur,p)}}var _7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},v_=!1,Md=null,Cs=!1,qy=!1,Yy=new Set;function lw(e,t){Yy.forEach(n=>n(e,t))}var C7=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function k7(e){return!(e.metaKey||!C7&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function y_(e){Cs=!0,k7(e)&&(Md="keyboard",lw("keyboard",e))}function il(e){if(Md="pointer",e.type==="mousedown"||e.type==="pointerdown"){Cs=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;lw("pointer",e)}}function E7(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function $7(e){E7(e)&&(Cs=!0,Md="virtual")}function T7(e){e.target===window||e.target===document||(!Cs&&!qy&&(Md="virtual",lw("virtual",e)),Cs=!1,qy=!1)}function A7(){Cs=!1,qy=!0}function b_(){return Md!=="pointer"}function M7(){if(typeof window>"u"||v_)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Cs=!0,e.apply(this,n)},document.addEventListener("keydown",y_,!0),document.addEventListener("keyup",y_,!0),document.addEventListener("click",$7,!0),window.addEventListener("focus",T7,!0),window.addEventListener("blur",A7,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",il,!0),document.addEventListener("pointermove",il,!0),document.addEventListener("pointerup",il,!0)):(document.addEventListener("mousedown",il,!0),document.addEventListener("mousemove",il,!0),document.addEventListener("mouseup",il,!0)),v_=!0}function KT(e){M7(),e(b_());const t=()=>e(b_());return Yy.add(t),()=>{Yy.delete(t)}}function L7(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qT(e={}){const t=sw(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:s,onBlur:d,onFocus:a,"aria-describedby":c}=t,{defaultChecked:l,isChecked:u,isFocusable:h,onChange:f,isIndeterminate:p,name:g,value:b,tabIndex:x=void 0,"aria-label":S,"aria-labelledby":T,"aria-invalid":v,...w}=e,y=L7(w,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),m=Gn(f),E=Gn(d),A=Gn(a),[C,k]=z.useState(!1),[I,R]=z.useState(!1),[M,O]=z.useState(!1),[P,N]=z.useState(!1);z.useEffect(()=>KT(k),[]);const B=z.useRef(null),[W,K]=z.useState(!0),[q,re]=z.useState(!!l),Y=u!==void 0,Z=Y?u:q,te=z.useCallback(Te=>{if(r||n){Te.preventDefault();return}Y||re(Z?Te.target.checked:p?!0:Te.target.checked),m==null||m(Te)},[r,n,Z,Y,p,m]);wa(()=>{B.current&&(B.current.indeterminate=!!p)},[p]),ep(()=>{n&&R(!1)},[n,R]),wa(()=>{const Te=B.current;Te!=null&&Te.form&&(Te.form.onreset=()=>{re(!!l)})},[]);const ie=n&&!h,ce=z.useCallback(Te=>{Te.key===" "&&N(!0)},[N]),he=z.useCallback(Te=>{Te.key===" "&&N(!1)},[N]);wa(()=>{if(!B.current)return;B.current.checked!==Z&&re(B.current.checked)},[B.current]);const ve=z.useCallback((Te={},it=null)=>{const vt=Qt=>{I&&Qt.preventDefault(),N(!0)};return{...Te,ref:it,"data-active":ht(P),"data-hover":ht(M),"data-checked":ht(Z),"data-focus":ht(I),"data-focus-visible":ht(I&&C),"data-indeterminate":ht(p),"data-disabled":ht(n),"data-invalid":ht(o),"data-readonly":ht(r),"aria-hidden":!0,onMouseDown:ut(Te.onMouseDown,vt),onMouseUp:ut(Te.onMouseUp,()=>N(!1)),onMouseEnter:ut(Te.onMouseEnter,()=>O(!0)),onMouseLeave:ut(Te.onMouseLeave,()=>O(!1))}},[P,Z,n,I,C,M,p,o,r]),Ce=z.useCallback((Te={},it=null)=>({...y,...Te,ref:Cr(it,vt=>{vt&&K(vt.tagName==="LABEL")}),onClick:ut(Te.onClick,()=>{var vt;W||((vt=B.current)==null||vt.click(),requestAnimationFrame(()=>{var Qt;(Qt=B.current)==null||Qt.focus({preventScroll:!0})}))}),"data-disabled":ht(n),"data-checked":ht(Z),"data-invalid":ht(o)}),[y,n,Z,o,W]),_e=z.useCallback((Te={},it=null)=>({...Te,ref:Cr(B,it),type:"checkbox",name:g,value:b,id:s,tabIndex:x,onChange:ut(Te.onChange,te),onBlur:ut(Te.onBlur,E,()=>R(!1)),onFocus:ut(Te.onFocus,A,()=>R(!0)),onKeyDown:ut(Te.onKeyDown,ce),onKeyUp:ut(Te.onKeyUp,he),required:i,checked:Z,disabled:ie,readOnly:r,"aria-label":S,"aria-labelledby":T,"aria-invalid":v?!!v:o,"aria-describedby":c,"aria-disabled":n,style:_7}),[g,b,s,te,E,A,ce,he,i,Z,ie,r,S,T,v,o,c,n,x]),Re=z.useCallback((Te={},it=null)=>({...Te,ref:it,onMouseDown:ut(Te.onMouseDown,R7),"data-disabled":ht(n),"data-checked":ht(Z),"data-invalid":ht(o)}),[Z,n,o]);return{state:{isInvalid:o,isFocused:I,isChecked:Z,isActive:P,isHovered:M,isIndeterminate:p,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ce,getCheckboxProps:ve,getInputProps:_e,getLabelProps:Re,htmlProps:y}}function R7(e){e.preventDefault(),e.stopPropagation()}var P7={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},I7={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},O7=wd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),F7=wd({from:{opacity:0},to:{opacity:1}}),D7=wd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),rr=mt(function(t,n){const r=h7(),i={...r,...t},o=Yi("Checkbox",i),s=ei(t),{spacing:d="0.5rem",className:a,children:c,iconColor:l,iconSize:u,icon:h=j.jsx(v7,{}),isChecked:f,isDisabled:p=r==null?void 0:r.isDisabled,onChange:g,inputProps:b,...x}=s;let S=f;r!=null&&r.value&&s.value&&(S=r.value.includes(s.value));let T=g;r!=null&&r.onChange&&s.value&&(T=A2(r.onChange,g));const{state:v,getInputProps:w,getCheckboxProps:y,getLabelProps:m,getRootProps:E}=qT({...x,isDisabled:p,isChecked:S,onChange:T}),A=p7(v.isChecked),C=z.useMemo(()=>({animation:A?v.isIndeterminate?`${F7} 20ms linear, ${D7} 200ms linear`:`${O7} 200ms linear`:void 0,fontSize:u,color:l,...o.icon}),[l,u,A,v.isIndeterminate,o.icon]),k=z.cloneElement(h,{__css:C,isIndeterminate:v.isIndeterminate,isChecked:v.isChecked});return j.jsxs(Ye.label,{__css:{...I7,...o.container},className:St("chakra-checkbox",a),...E(),children:[j.jsx("input",{className:"chakra-checkbox__input",...w(b,n)}),j.jsx(Ye.span,{__css:{...P7,...o.control},className:"chakra-checkbox__control",...y(),children:k}),c&&j.jsx(Ye.span,{className:"chakra-checkbox__label",...m(),__css:{marginStart:d,...o.label},children:c})]})});rr.displayName="Checkbox";function N7(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function YT(e,t){let n=N7(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function w_(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 z7(e,t,n){return e==null?e:(n<t&&console.warn("clamp: max cannot be less than min"),Math.min(Math.max(e,t),n))}function B7(e={}){const{onChange:t,precision:n,defaultValue:r,value:i,step:o=1,min:s=Number.MIN_SAFE_INTEGER,max:d=Number.MAX_SAFE_INTEGER,keepWithinRange:a=!0}=e,c=Gn(t),[l,u]=z.useState(()=>{var C;return r==null?"":(C=nv(r,o,n))!=null?C:""}),h=typeof i<"u",f=h?i:l,p=XT(ta(f),o),g=n??p,b=z.useCallback(C=>{C!==f&&(h||u(C.toString()),c==null||c(C.toString(),ta(C)))},[c,h,f]),x=z.useCallback(C=>{let k=C;return a&&(k=z7(k,s,d)),YT(k,g)},[g,a,d,s]),S=z.useCallback((C=o)=>{let k;f===""?k=ta(C):k=ta(f)+C,k=x(k),b(k)},[x,o,b,f]),T=z.useCallback((C=o)=>{let k;f===""?k=ta(-C):k=ta(f)-C,k=x(k),b(k)},[x,o,b,f]),v=z.useCallback(()=>{var C;let k;r==null?k="":k=(C=nv(r,o,n))!=null?C:s,b(k)},[r,n,o,b,s]),w=z.useCallback(C=>{var k;const I=(k=nv(C,o,g))!=null?k:s;b(I)},[g,o,b,s]),y=ta(f);return{isOutOfRange:y>d||y<s,isAtMax:y===d,isAtMin:y===s,precision:g,value:f,valueAsNumber:y,update:b,reset:v,increment:S,decrement:T,clamp:x,cast:w,setValue:u}}function ta(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function XT(e,t){return Math.max(w_(t),w_(e))}function nv(e,t,n){const r=ta(e);if(Number.isNaN(r))return;const i=XT(r,t);return YT(r,n??i)}function j7(e,t,n,r){const i=Gn(n);return z.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o==null||o.removeEventListener(t,i,r)}}function $g(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Xy="data-focus-lock",QT="data-focus-lock-disabled",H7="data-no-focus-lock",V7="data-autofocus-inside",W7="data-no-autofocus";function U7(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function G7(e,t){var n=z.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function ZT(e,t){return G7(t||null,function(n){return e.forEach(function(r){return U7(r,n)})})}var rv={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},zi=function(){return zi=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},zi.apply(this,arguments)};function JT(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function K7(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function eA(e){return e}function tA(e,t){t===void 0&&(t=eA);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(d){return d!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(d){return o(d)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var d=n;n=[],d.forEach(o),s=n}var a=function(){var l=s;s=[],l.forEach(o)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(l){s.push(l),c()},filter:function(l){return s=s.filter(l),n}}}};return i}function uw(e,t){return t===void 0&&(t=eA),tA(e,t)}function nA(e){e===void 0&&(e={});var t=tA(null);return t.options=zi({async:!0,ssr:!1},e),t}var rA=function(e){var t=e.sideCar,n=JT(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 z.createElement(r,zi({},n))};rA.isSideCarExport=!0;function q7(e,t){return e.useMedium(t),rA}var iA=uw({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),oA=uw(),Y7=uw(),X7=nA({async:!0}),Q7=[],cw=z.forwardRef(function(t,n){var r,i=z.useState(),o=i[0],s=i[1],d=z.useRef(),a=z.useRef(!1),c=z.useRef(null),l=t.children,u=t.disabled,h=t.noFocusGuards,f=t.persistentFocus,p=t.crossFrame,g=t.autoFocus;t.allowTextSelection;var b=t.group,x=t.className,S=t.whiteList,T=t.hasPositiveIndices,v=t.shards,w=v===void 0?Q7:v,y=t.as,m=y===void 0?"div":y,E=t.lockProps,A=E===void 0?{}:E,C=t.sideCar,k=t.returnFocus,I=t.focusOptions,R=t.onActivation,M=t.onDeactivation,O=z.useState({}),P=O[0],N=z.useCallback(function(){c.current=c.current||document&&document.activeElement,d.current&&R&&R(d.current),a.current=!0},[R]),B=z.useCallback(function(){a.current=!1,M&&M(d.current)},[M]);z.useEffect(function(){u||(c.current=null)},[]);var W=z.useCallback(function(ce){var he=c.current;if(he&&he.focus){var ve=typeof k=="function"?k(he):k;if(ve){var Ce=typeof ve=="object"?ve:void 0;c.current=null,ce?Promise.resolve().then(function(){return he.focus(Ce)}):he.focus(Ce)}}},[k]),K=z.useCallback(function(ce){a.current&&iA.useMedium(ce)},[]),q=oA.useMedium,re=z.useCallback(function(ce){d.current!==ce&&(d.current=ce,s(ce))},[]),Y=Ie((r={},r[QT]=u&&"disabled",r[Xy]=b,r),A),Z=h!==!0,te=Z&&h!=="tail",ie=ZT([n,re]);return z.createElement(z.Fragment,null,Z&&[z.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:u?-1:0,style:rv}),T?z.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:u?-1:1,style:rv}):null],!u&&z.createElement(C,{id:P,sideCar:X7,observed:o,disabled:u,persistentFocus:f,crossFrame:p,autoFocus:g,whiteList:S,shards:w,onActivation:N,onDeactivation:B,returnFocus:W,focusOptions:I}),z.createElement(m,Ie({ref:ie},Y,{className:x,onBlur:q,onFocus:K}),l),te&&z.createElement("div",{"data-focus-guard":!0,tabIndex:u?-1:0,style:rv}))});cw.propTypes={};cw.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 aA=cw;function dp(e,t){return dp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dp(e,t)}function dw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,dp(e,t)}function ks(e){"@babel/helpers - typeof";return ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ks(e)}function Z7(e,t){if(ks(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ks(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sA(e){var t=Z7(e,"string");return ks(t)==="symbol"?t:String(t)}function Il(e,t,n){return t=sA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J7(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],s;function d(){s=e(o.map(function(c){return c.props})),t(s)}var a=function(c){dw(l,c);function l(){return c.apply(this,arguments)||this}l.peek=function(){return s};var u=l.prototype;return u.componentDidMount=function(){o.push(this),d()},u.componentDidUpdate=function(){d()},u.componentWillUnmount=function(){var f=o.indexOf(this);o.splice(f,1),d()},u.render=function(){return st.createElement(i,this.props)},l}(z.PureComponent);return Il(a,"displayName","SideEffect("+n(i)+")"),a}}var Xi=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},fp=function(e){return Array.isArray(e)?e:[e]},lA=function(e){return Array.isArray(e)?e[0]:e},eU=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},uA=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},cA=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},tU=function(e,t){return!e||cA(e)||!eU(e)&&t(uA(e))},dA=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=tU(t,dA.bind(void 0,e));return e.set(t,r),r},nU=function(e,t){return e&&!cA(e)?oU(e)?t(uA(e)):!1:!0},fA=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=nU(t,fA.bind(void 0,e));return e.set(t,r),r},hA=function(e){return e.dataset},rU=function(e){return e.tagName==="BUTTON"},pA=function(e){return e.tagName==="INPUT"},gA=function(e){return pA(e)&&e.type==="radio"},iU=function(e){return!((pA(e)||rU(e))&&(e.type==="hidden"||e.disabled))},oU=function(e){var t=e.getAttribute(W7);return![!0,"true",""].includes(t)},fw=function(e){var t;return!!(e&&(!((t=hA(e))===null||t===void 0)&&t.focusGuard))},hp=function(e){return!fw(e)},aU=function(e){return!!e},sU=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},mA=function(e,t,n){return Xi(e).map(function(r,i){return{node:r,index:i,tabIndex:n&&r.tabIndex===-1?(r.dataset||{}).focusGuard?0:-1:r.tabIndex}}).filter(function(r){return!t||r.tabIndex>=0}).sort(sU)},lU=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],hw=lU.join(","),uU="".concat(hw,", [data-focus-guard]"),vA=function(e,t){return Xi((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?uU:hw)?[r]:[],vA(r))},[])},cU=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?Tg([e.contentDocument.body],t):[e]},Tg=function(e,t){return e.reduce(function(n,r){var i,o=vA(r,t),s=(i=[]).concat.apply(i,o.map(function(d){return cU(d,t)}));return n.concat(s,r.parentNode?Xi(r.parentNode.querySelectorAll(hw)).filter(function(d){return d===r}):[])},[])},dU=function(e){var t=e.querySelectorAll("[".concat(V7,"]"));return Xi(t).map(function(n){return Tg([n])}).reduce(function(n,r){return n.concat(r)},[])},pw=function(e,t){return Xi(e).filter(function(n){return dA(t,n)}).filter(function(n){return iU(n)})},S_=function(e,t){return t===void 0&&(t=new Map),Xi(e).filter(function(n){return fA(t,n)})},Qy=function(e,t,n){return mA(pw(Tg(e,n),t),!0,n)},x_=function(e,t){return mA(pw(Tg(e),t),!1)},fU=function(e,t){return pw(dU(e),t)},ql=function(e,t){return e.shadowRoot?ql(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Xi(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var i=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return i?ql(i,t):!1}return ql(n,t)})},hU=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(s,d){return!t.has(d)})},yA=function(e){return e.parentNode?yA(e.parentNode):e},gw=function(e){var t=fp(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(Xy);return n.push.apply(n,i?hU(Xi(yA(r).querySelectorAll("[".concat(Xy,'="').concat(i,'"]:not([').concat(QT,'="disabled"])')))):[r]),n},[])},pU=function(e){try{return e()}catch{return}},ud=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?ud(t.shadowRoot):t instanceof HTMLIFrameElement&&pU(function(){return t.contentWindow.document})?ud(t.contentWindow.document):t}},gU=function(e,t){return e===t},mU=function(e,t){return!!Xi(e.querySelectorAll("iframe")).some(function(n){return gU(n,t)})},bA=function(e,t){return t===void 0&&(t=ud(lA(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:gw(e).some(function(n){return ql(n,t)||mU(n,t)})},vU=function(e){e===void 0&&(e=document);var t=ud(e);return t?Xi(e.querySelectorAll("[".concat(H7,"]"))).some(function(n){return ql(n,t)}):!1},yU=function(e,t){return t.filter(gA).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},mw=function(e,t){return gA(e)&&e.name?yU(e,t):e},bU=function(e){var t=new Set;return e.forEach(function(n){return t.add(mw(n,e))}),e.filter(function(n){return t.has(n)})},__=function(e){return e[0]&&e.length>1?mw(e[0],e):e[0]},C_=function(e,t){return e.length>1?e.indexOf(mw(e[t],e)):t},wA="NEW_FOCUS",wU=function(e,t,n,r){var i=e.length,o=e[0],s=e[i-1],d=fw(n);if(!(n&&e.indexOf(n)>=0)){var a=n!==void 0?t.indexOf(n):-1,c=r?t.indexOf(r):a,l=r?e.indexOf(r):-1,u=a-c,h=t.indexOf(o),f=t.indexOf(s),p=bU(t),g=n!==void 0?p.indexOf(n):-1,b=g-(r?p.indexOf(r):a),x=C_(e,0),S=C_(e,i-1);if(a===-1||l===-1)return wA;if(!u&&l>=0)return l;if(a<=h&&d&&Math.abs(u)>1)return S;if(a>=f&&d&&Math.abs(u)>1)return x;if(u&&Math.abs(b)>1)return l;if(a<=h)return S;if(a>f)return x;if(u)return Math.abs(u)>1?l:(i+l+u)%i}},SU=function(e){return function(t){var n,r=(n=hA(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},xU=function(e,t,n){var r=e.map(function(o){var s=o.node;return s}),i=S_(r.filter(SU(n)));return i&&i.length?__(i):__(S_(t))},Zy=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&Zy(e.parentNode.host||e.parentNode,t),t},iv=function(e,t){for(var n=Zy(e),r=Zy(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},SA=function(e,t,n){var r=fp(e),i=fp(t),o=r[0],s=!1;return i.filter(Boolean).forEach(function(d){s=iv(s||d,d)||s,n.filter(Boolean).forEach(function(a){var c=iv(o,a);c&&(!s||ql(c,s)?s=c:s=iv(c,s))})}),s},_U=function(e,t){return e.reduce(function(n,r){return n.concat(fU(r,t))},[])},CU=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(aU)},kU=function(e,t){var n=ud(fp(e).length>0?document:lA(e).ownerDocument),r=gw(e).filter(hp),i=SA(n||e,e,r),o=new Map,s=x_(r,o),d=Qy(r,o).filter(function(f){var p=f.node;return hp(p)});if(!(!d[0]&&(d=s,!d[0]))){var a=x_([i],o).map(function(f){var p=f.node;return p}),c=CU(a,d),l=c.map(function(f){var p=f.node;return p}),u=wU(l,a,n,t);if(u===wA){var h=xU(s,l,_U(r,o));if(h)return{node:h};console.warn("focus-lock: cannot find any node to move focus into");return}return u===void 0?u:c[u]}},EU=function(e){var t=gw(e).filter(hp),n=SA(e,e,t),r=new Map,i=Qy([n],r,!0),o=Qy(t,r).filter(function(s){var d=s.node;return hp(d)}).map(function(s){var d=s.node;return d});return i.map(function(s){var d=s.node,a=s.index;return{node:d,index:a,lockItem:o.indexOf(d)>=0,guard:fw(d)}})},$U=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},ov=0,av=!1,xA=function(e,t,n){n===void 0&&(n={});var r=kU(e,t);if(!av&&r){if(ov>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),av=!0,setTimeout(function(){av=!1},1);return}ov++,$U(r.node,n.focusOptions),ov--}};function _A(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var TU=function(){return document&&document.activeElement===document.body},AU=function(){return TU()||vU()},Yl=null,Ol=null,Xl=null,cd=!1,MU=function(){return!0},LU=function(t){return(Yl.whiteList||MU)(t)},RU=function(t,n){Xl={observerNode:t,portaledElement:n}},PU=function(t){return Xl&&Xl.portaledElement===t};function k_(e,t,n,r){var i=null,o=e;do{var s=r[o];if(s.guard)s.node.dataset.focusAutoGuard&&(i=s);else if(s.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var IU=function(t){return t&&"current"in t?t.current:t},OU=function(t){return t?!!cd:cd==="meanwhile"},FU=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},DU=function(t,n){return n.some(function(r){return FU(t,r,r)})},pp=function(){var t=!1;if(Yl){var n=Yl,r=n.observed,i=n.persistentFocus,o=n.autoFocus,s=n.shards,d=n.crossFrame,a=n.focusOptions,c=r||Xl&&Xl.portaledElement,l=document&&document.activeElement;if(c){var u=[c].concat(s.map(IU).filter(Boolean));if((!l||LU(l))&&(i||OU(d)||!AU()||!Ol&&o)&&(c&&!(bA(u)||l&&DU(l,u)||PU(l))&&(document&&!Ol&&l&&!o?(l.blur&&l.blur(),document.body.focus()):(t=xA(u,Ol,{focusOptions:a}),Xl={})),cd=!1,Ol=document&&document.activeElement),document){var h=document&&document.activeElement,f=EU(u),p=f.map(function(g){var b=g.node;return b}).indexOf(h);p>-1&&(f.filter(function(g){var b=g.guard,x=g.node;return b&&x.dataset.focusAutoGuard}).forEach(function(g){var b=g.node;return b.removeAttribute("tabIndex")}),k_(p,f.length,1,f),k_(p,-1,-1,f))}}}return t},CA=function(t){pp()&&t&&(t.stopPropagation(),t.preventDefault())},vw=function(){return _A(pp)},NU=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||RU(r,n)},zU=function(){return null},kA=function(){cd="just",setTimeout(function(){cd="meanwhile"},0)},BU=function(){document.addEventListener("focusin",CA),document.addEventListener("focusout",vw),window.addEventListener("blur",kA)},jU=function(){document.removeEventListener("focusin",CA),document.removeEventListener("focusout",vw),window.removeEventListener("blur",kA)};function HU(e){return e.filter(function(t){var n=t.disabled;return!n})}function VU(e){var t=e.slice(-1)[0];t&&!Yl&&BU();var n=Yl,r=n&&t&&t.id===n.id;Yl=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Ol=null,(!r||n.observed!==t.observed)&&t.onActivation(),pp(),_A(pp)):(jU(),Ol=null)}iA.assignSyncMedium(NU);oA.assignMedium(vw);Y7.assignMedium(function(e){return e({moveFocusInside:xA,focusInside:bA})});const WU=J7(HU,VU)(zU);var EA=z.forwardRef(function(t,n){return z.createElement(aA,Ie({sideCar:WU,ref:n},t))}),$A=aA.propTypes||{};$A.sideCar;$g($A,["sideCar"]);EA.propTypes={};const E_=EA;function UU(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function GU(e){var t;if(!UU(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}var KU=e=>e.hasAttribute("tabindex");function qU(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function TA(e){return e.parentElement&&TA(e.parentElement)?!0:e.hidden}function YU(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function XU(e){if(!GU(e)||TA(e)||qU(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():YU(e)?!0:KU(e)}var QU=["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]"],ZU=QU.join(),JU=e=>e.offsetWidth>0&&e.offsetHeight>0;function eG(e){const t=Array.from(e.querySelectorAll(ZU));return t.unshift(e),t.filter(n=>XU(n)&&JU(n))}var $_,tG=($_=E_.default)!=null?$_:E_,AA=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:s,autoFocus:d,persistentFocus:a,lockFocusAcrossFrames:c}=e,l=z.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&eG(r.current).length===0&&requestAnimationFrame(()=>{var p;(p=r.current)==null||p.focus()})},[t,r]),u=z.useCallback(()=>{var f;(f=n==null?void 0:n.current)==null||f.focus()},[n]),h=i&&!n;return j.jsx(tG,{crossFrame:c,persistentFocus:a,autoFocus:d,disabled:s,onActivation:l,onDeactivation:u,returnFocus:h,children:o})};AA.displayName="FocusLock";var nG=NB?z.useLayoutEffect:z.useEffect;function T_(e,t=[]){const n=z.useRef(e);return nG(()=>{n.current=e}),z.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function rG(e,t){const n=z.useId();return z.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function iG(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function MA(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=T_(n),s=T_(t),[d,a]=z.useState(e.defaultIsOpen||!1),[c,l]=iG(r,d),u=rG(i,"disclosure"),h=z.useCallback(()=>{c||a(!1),s==null||s()},[c,s]),f=z.useCallback(()=>{c||a(!0),o==null||o()},[c,o]),p=z.useCallback(()=>{(l?h:f)()},[l,f,h]);return{isOpen:!!l,onOpen:f,onClose:h,onToggle:p,isControlled:c,getButtonProps:(g={})=>({...g,"aria-expanded":l,"aria-controls":u,onClick:VB(g.onClick,p)}),getDisclosureProps:(g={})=>({...g,hidden:!l,id:u})}}var[oG,aG]=xn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "<InputGroup />" `}),Jy=mt(function(t,n){const r=Yi("Input",t),{children:i,className:o,...s}=ei(t),d=St("chakra-input__group",o),a={},c=aw(i),l=r.field;c.forEach(h=>{var f,p;r&&(l&&h.type.id==="InputLeftElement"&&(a.paddingStart=(f=l.height)!=null?f:l.h),l&&h.type.id==="InputRightElement"&&(a.paddingEnd=(p=l.height)!=null?p:l.h),h.type.id==="InputRightAddon"&&(a.borderEndRadius=0),h.type.id==="InputLeftAddon"&&(a.borderStartRadius=0))});const u=c.map(h=>{var f,p;const g=ej({size:((f=h.props)==null?void 0:f.size)||t.size,variant:((p=h.props)==null?void 0:p.variant)||t.variant});return h.type.id!=="Input"?z.cloneElement(h,g):z.cloneElement(h,Object.assign(g,a,h.props))});return j.jsx(Ye.div,{className:d,ref:n,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate"},"data-group":!0,...s,children:j.jsx(oG,{value:r,children:u})})});Jy.displayName="InputGroup";var sG=Ye("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),Ag=mt(function(t,n){var r,i;const{placement:o="left",...s}=t,d=aG(),a=d.field,l={[o==="left"?"insetStart":"insetEnd"]:"0",width:(r=a==null?void 0:a.height)!=null?r:a==null?void 0:a.h,height:(i=a==null?void 0:a.height)!=null?i:a==null?void 0:a.h,fontSize:a==null?void 0:a.fontSize,...d.element};return j.jsx(sG,{ref:n,__css:l,...s})});Ag.id="InputElement";Ag.displayName="InputElement";var LA=mt(function(t,n){const{className:r,...i}=t,o=St("chakra-input__left-element",r);return j.jsx(Ag,{ref:n,placement:"left",className:o,...i})});LA.id="InputLeftElement";LA.displayName="InputLeftElement";var gp=mt(function(t,n){const{className:r,...i}=t,o=St("chakra-input__right-element",r);return j.jsx(Ag,{ref:n,placement:"right",className:o,...i})});gp.id="InputRightElement";gp.displayName="InputRightElement";var hu=mt(function(t,n){const{htmlSize:r,...i}=t,o=Yi("Input",i),s=ei(i),d=x7(s),a=St("chakra-input",t.className);return j.jsx(Ye.input,{size:r,...d,__css:o.field,ref:n,className:a})});hu.displayName="Input";hu.id="Input";function lG(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):dr(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var RA=e=>j.jsx(Ye.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});RA.displayName="StackItem";function uG(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{"&":lG(n,i=>r[i])}}var rh=mt((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:s="0.5rem",wrap:d,children:a,divider:c,className:l,shouldWrapChildren:u,...h}=e,f=n?"row":r??"column",p=z.useMemo(()=>uG({spacing:s,direction:f}),[s,f]),g=!!c,b=!u&&!g,x=z.useMemo(()=>{const T=aw(a);return b?T:T.map((v,w)=>{const y=typeof v.key<"u"?v.key:w,m=w+1===T.length,A=u?j.jsx(RA,{children:v},y):v;if(!g)return A;const C=z.cloneElement(c,{__css:p}),k=m?null:C;return j.jsxs(z.Fragment,{children:[A,k]},y)})},[c,p,g,b,u,a]),S=St("chakra-stack",l);return j.jsx(Ye.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:f,flexWrap:d,gap:g?void 0:s,className:S,...h,children:x})});rh.displayName="Stack";function cG(){const e=z.useRef(new Map),t=e.current,n=z.useCallback((i,o,s,d)=>{e.current.set(s,{type:o,el:i,options:d}),i.addEventListener(o,s,d)},[]),r=z.useCallback((i,o,s,d)=>{i.removeEventListener(o,s,d),e.current.delete(s)},[]);return z.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function sv(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function dG(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:s,onMouseUp:d,onClick:a,onKeyDown:c,onKeyUp:l,tabIndex:u,onMouseOver:h,onMouseLeave:f,...p}=e,[g,b]=z.useState(!0),[x,S]=z.useState(!1),T=cG(),v=N=>{N&&N.tagName!=="BUTTON"&&b(!1)},w=g?u:u||0,y=n&&!r,m=z.useCallback(N=>{if(n){N.stopPropagation(),N.preventDefault();return}N.currentTarget.focus(),a==null||a(N)},[n,a]),E=z.useCallback(N=>{x&&sv(N)&&(N.preventDefault(),N.stopPropagation(),S(!1),T.remove(document,"keyup",E,!1))},[x,T]),A=z.useCallback(N=>{if(c==null||c(N),n||N.defaultPrevented||N.metaKey||!sv(N.nativeEvent)||g)return;const B=i&&N.key==="Enter";o&&N.key===" "&&(N.preventDefault(),S(!0)),B&&(N.preventDefault(),N.currentTarget.click()),T.add(document,"keyup",E,!1)},[n,g,c,i,o,T,E]),C=z.useCallback(N=>{if(l==null||l(N),n||N.defaultPrevented||N.metaKey||!sv(N.nativeEvent)||g)return;o&&N.key===" "&&(N.preventDefault(),S(!1),N.currentTarget.click())},[o,g,n,l]),k=z.useCallback(N=>{N.button===0&&(S(!1),T.remove(document,"mouseup",k,!1))},[T]),I=z.useCallback(N=>{if(N.button!==0)return;if(n){N.stopPropagation(),N.preventDefault();return}g||S(!0),N.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",k,!1),s==null||s(N)},[n,g,s,T,k]),R=z.useCallback(N=>{N.button===0&&(g||S(!1),d==null||d(N))},[d,g]),M=z.useCallback(N=>{if(n){N.preventDefault();return}h==null||h(N)},[n,h]),O=z.useCallback(N=>{x&&(N.preventDefault(),S(!1)),f==null||f(N)},[x,f]),P=Cr(t,v);return g?{...p,ref:P,type:"button","aria-disabled":y?void 0:n,disabled:y,onClick:m,onMouseDown:s,onMouseUp:d,onKeyUp:l,onKeyDown:c,onMouseOver:h,onMouseLeave:f}:{...p,ref:P,role:"button","data-active":ht(x),"aria-disabled":n?"true":void 0,tabIndex:y?void 0:w,onClick:m,onMouseDown:I,onMouseUp:R,onKeyUp:C,onKeyDown:A,onMouseOver:M,onMouseLeave:O}}function fG(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var hG={slideInBottom:{...Ky,custom:{offsetY:16,reverse:!0}},slideInRight:{...Ky,custom:{offsetX:16,reverse:!0}},scale:{...WT,custom:{initialScale:.95,reverse:!0}},none:{}},pG=Ye(xu.section),gG=e=>hG[e||"none"],PA=z.forwardRef((e,t)=>{const{preset:n,motionProps:r=gG(n),...i}=e;return j.jsx(pG,{ref:t,...r,...i})});PA.displayName="ModalTransition";var mG=Object.defineProperty,vG=(e,t,n)=>t in e?mG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yG=(e,t,n)=>(vG(e,typeof t!="symbol"?t+"":t,n),n),bG=class{constructor(){yG(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return e?this.modals.get(e)===this.modals.size:!1}},e0=new bG;function IA(e,t){const[n,r]=z.useState(0);return z.useEffect(()=>{const i=e.current;if(i){if(t){const o=e0.add(i);r(o)}return()=>{e0.remove(i),r(0)}}},[t,e]),n}var wG=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ol=new WeakMap,vf=new WeakMap,yf={},lv=0,OA=function(e){return e&&(e.host||OA(e.parentNode))},SG=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=OA(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},xG=function(e,t,n,r){var i=SG(t,Array.isArray(e)?e:[e]);yf[n]||(yf[n]=new WeakMap);var o=yf[n],s=[],d=new Set,a=new Set(i),c=function(u){!u||d.has(u)||(d.add(u),c(u.parentNode))};i.forEach(c);var l=function(u){!u||a.has(u)||Array.prototype.forEach.call(u.children,function(h){if(d.has(h))l(h);else{var f=h.getAttribute(r),p=f!==null&&f!=="false",g=(ol.get(h)||0)+1,b=(o.get(h)||0)+1;ol.set(h,g),o.set(h,b),s.push(h),g===1&&p&&vf.set(h,!0),b===1&&h.setAttribute(n,"true"),p||h.setAttribute(r,"true")}})};return l(t),d.clear(),lv++,function(){s.forEach(function(u){var h=ol.get(u)-1,f=o.get(u)-1;ol.set(u,h),o.set(u,f),h||(vf.has(u)||u.removeAttribute(r),vf.delete(u)),f||u.removeAttribute(n)}),lv--,lv||(ol=new WeakMap,ol=new WeakMap,vf=new WeakMap,yf={})}},_G=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||wG(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),xG(r,i,n,"aria-hidden")):function(){return null}};function CG(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:s=!0,onOverlayClick:d,onEsc:a}=e,c=z.useRef(null),l=z.useRef(null),[u,h,f]=EG(r,"chakra-modal","chakra-modal--header","chakra-modal--body");kG(c,t&&s);const p=IA(c,t),g=z.useRef(null),b=z.useCallback(A=>{g.current=A.target},[]),x=z.useCallback(A=>{A.key==="Escape"&&(A.stopPropagation(),o&&(n==null||n()),a==null||a())},[o,n,a]),[S,T]=z.useState(!1),[v,w]=z.useState(!1),y=z.useCallback((A={},C=null)=>({role:"dialog",...A,ref:Cr(C,c),id:u,tabIndex:-1,"aria-modal":!0,"aria-labelledby":S?h:void 0,"aria-describedby":v?f:void 0,onClick:ut(A.onClick,k=>k.stopPropagation())}),[f,v,u,h,S]),m=z.useCallback(A=>{A.stopPropagation(),g.current===A.target&&e0.isTopModal(c.current)&&(i&&(n==null||n()),d==null||d())},[n,i,d]),E=z.useCallback((A={},C=null)=>({...A,ref:Cr(C,l),onClick:ut(A.onClick,m),onKeyDown:ut(A.onKeyDown,x),onMouseDown:ut(A.onMouseDown,b)}),[x,b,m]);return{isOpen:t,onClose:n,headerId:h,bodyId:f,setBodyMounted:w,setHeaderMounted:T,dialogRef:c,overlayRef:l,getDialogProps:y,getDialogContainerProps:E,index:p}}function kG(e,t){const n=e.current;z.useEffect(()=>{if(!(!e.current||!t))return _G(e.current)},[t,e,n])}function EG(e,...t){const n=z.useId(),r=e||n;return z.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[$G,Ld]=xn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `}),[TG,pu]=xn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),FA=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:n,children:r,autoFocus:i,trapFocus:o,initialFocusRef:s,finalFocusRef:d,returnFocusOnClose:a,blockScrollOnMount:c,allowPinchZoom:l,preserveScrollBarGap:u,motionPreset:h,lockFocusAcrossFrames:f,onCloseComplete:p}=t,g=Yi("Modal",t),x={...CG(t),autoFocus:i,trapFocus:o,initialFocusRef:s,finalFocusRef:d,returnFocusOnClose:a,blockScrollOnMount:c,allowPinchZoom:l,preserveScrollBarGap:u,motionPreset:h,lockFocusAcrossFrames:f};return j.jsx(TG,{value:x,children:j.jsx($G,{value:g,children:j.jsx(Td,{onExitComplete:p,children:x.isOpen&&j.jsx(Sd,{...n,children:r})})})})};FA.displayName="Modal";var ih="right-scroll-bar-position",oh="width-before-scroll-bar",AG="with-scroll-bars-hidden",MG="--removed-body-scroll-bar-size",DA=nA(),uv=function(){},Mg=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:uv,onWheelCapture:uv,onTouchMoveCapture:uv}),i=r[0],o=r[1],s=e.forwardProps,d=e.children,a=e.className,c=e.removeScrollBar,l=e.enabled,u=e.shards,h=e.sideCar,f=e.noIsolation,p=e.inert,g=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,S=e.gapMode,T=JT(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),v=h,w=ZT([n,t]),y=zi(zi({},T),i);return z.createElement(z.Fragment,null,l&&z.createElement(v,{sideCar:DA,removeScrollBar:c,shards:u,noIsolation:f,inert:p,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:S}),s?z.cloneElement(z.Children.only(d),zi(zi({},y),{ref:w})):z.createElement(x,zi({},y,{className:a,ref:w}),d))});Mg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mg.classNames={fullWidth:oh,zeroRight:ih};var A_,LG=function(){if(A_)return A_;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function RG(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=LG();return t&&e.setAttribute("nonce",t),e}function PG(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function IG(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var OG=function(){var e=0,t=null;return{add:function(n){e==0&&(t=RG())&&(PG(t,n),IG(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},FG=function(){var e=OG();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},NA=function(){var e=FG(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},DG={left:0,top:0,right:0,gap:0},cv=function(e){return parseInt(e||"",10)||0},NG=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[cv(n),cv(r),cv(i)]},zG=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return DG;var t=NG(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])}},BG=NA(),jG=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
||
.`.concat(AG,` {
|
||
overflow: hidden `).concat(r,`;
|
||
padding-right: `).concat(d,"px ").concat(r,`;
|
||
}
|
||
body {
|
||
overflow: hidden `).concat(r,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
||
padding-left: `.concat(i,`px;
|
||
padding-top: `).concat(o,`px;
|
||
padding-right: `).concat(s,`px;
|
||
margin-left:0;
|
||
margin-top:0;
|
||
margin-right: `).concat(d,"px ").concat(r,`;
|
||
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(r,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(ih,` {
|
||
right: `).concat(d,"px ").concat(r,`;
|
||
}
|
||
|
||
.`).concat(oh,` {
|
||
margin-right: `).concat(d,"px ").concat(r,`;
|
||
}
|
||
|
||
.`).concat(ih," .").concat(ih,` {
|
||
right: 0 `).concat(r,`;
|
||
}
|
||
|
||
.`).concat(oh," .").concat(oh,` {
|
||
margin-right: 0 `).concat(r,`;
|
||
}
|
||
|
||
body {
|
||
`).concat(MG,": ").concat(d,`px;
|
||
}
|
||
`)},HG=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=z.useMemo(function(){return zG(i)},[i]);return z.createElement(BG,{styles:jG(o,!t,i,n?"":"!important")})},t0=!1;if(typeof window<"u")try{var bf=Object.defineProperty({},"passive",{get:function(){return t0=!0,!0}});window.addEventListener("test",bf,bf),window.removeEventListener("test",bf,bf)}catch{t0=!1}var al=t0?{passive:!1}:!1,VG=function(e){return e.tagName==="TEXTAREA"},zA=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!VG(e)&&n[t]==="visible")},WG=function(e){return zA(e,"overflowY")},UG=function(e){return zA(e,"overflowX")},M_=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=BA(e,r);if(i){var o=jA(e,r),s=o[1],d=o[2];if(s>d)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},GG=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},KG=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},BA=function(e,t){return e==="v"?WG(t):UG(t)},jA=function(e,t){return e==="v"?GG(t):KG(t)},qG=function(e,t){return e==="h"&&t==="rtl"?-1:1},YG=function(e,t,n,r,i){var o=qG(e,window.getComputedStyle(t).direction),s=o*r,d=n.target,a=t.contains(d),c=!1,l=s>0,u=0,h=0;do{var f=jA(e,d),p=f[0],g=f[1],b=f[2],x=g-b-o*p;(p||x)&&BA(e,d)&&(u+=x,h+=p),d=d.parentNode}while(!a&&d!==document.body||a&&(t.contains(d)||t===d));return(l&&(i&&u===0||!i&&s>u)||!l&&(i&&h===0||!i&&-s>h))&&(c=!0),c},wf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},L_=function(e){return[e.deltaX,e.deltaY]},R_=function(e){return e&&"current"in e?e.current:e},XG=function(e,t){return e[0]===t[0]&&e[1]===t[1]},QG=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},ZG=0,sl=[];function JG(e){var t=z.useRef([]),n=z.useRef([0,0]),r=z.useRef(),i=z.useState(ZG++)[0],o=z.useState(NA)[0],s=z.useRef(e);z.useEffect(function(){s.current=e},[e]),z.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var g=K7([e.lockRef.current],(e.shards||[]).map(R_),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=z.useCallback(function(g,b){if("touches"in g&&g.touches.length===2)return!s.current.allowPinchZoom;var x=wf(g),S=n.current,T="deltaX"in g?g.deltaX:S[0]-x[0],v="deltaY"in g?g.deltaY:S[1]-x[1],w,y=g.target,m=Math.abs(T)>Math.abs(v)?"h":"v";if("touches"in g&&m==="h"&&y.type==="range")return!1;var E=M_(m,y);if(!E)return!0;if(E?w=m:(w=m==="v"?"h":"v",E=M_(m,y)),!E)return!1;if(!r.current&&"changedTouches"in g&&(T||v)&&(r.current=w),!w)return!0;var A=r.current||w;return YG(A,b,g,A==="h"?T:v,!0)},[]),a=z.useCallback(function(g){var b=g;if(!(!sl.length||sl[sl.length-1]!==o)){var x="deltaY"in b?L_(b):wf(b),S=t.current.filter(function(w){return w.name===b.type&&w.target===b.target&&XG(w.delta,x)})[0];if(S&&S.should){b.cancelable&&b.preventDefault();return}if(!S){var T=(s.current.shards||[]).map(R_).filter(Boolean).filter(function(w){return w.contains(b.target)}),v=T.length>0?d(b,T[0]):!s.current.noIsolation;v&&b.cancelable&&b.preventDefault()}}},[]),c=z.useCallback(function(g,b,x,S){var T={name:g,delta:b,target:x,should:S};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(v){return v!==T})},1)},[]),l=z.useCallback(function(g){n.current=wf(g),r.current=void 0},[]),u=z.useCallback(function(g){c(g.type,L_(g),g.target,d(g,e.lockRef.current))},[]),h=z.useCallback(function(g){c(g.type,wf(g),g.target,d(g,e.lockRef.current))},[]);z.useEffect(function(){return sl.push(o),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",a,al),document.addEventListener("touchmove",a,al),document.addEventListener("touchstart",l,al),function(){sl=sl.filter(function(g){return g!==o}),document.removeEventListener("wheel",a,al),document.removeEventListener("touchmove",a,al),document.removeEventListener("touchstart",l,al)}},[]);var f=e.removeScrollBar,p=e.inert;return z.createElement(z.Fragment,null,p?z.createElement(o,{styles:QG(i)}):null,f?z.createElement(HG,{gapMode:e.gapMode}):null)}const eK=q7(DA,JG);var HA=z.forwardRef(function(e,t){return z.createElement(Mg,zi({},e,{ref:t,sideCar:eK}))});HA.classNames=Mg.classNames;const tK=HA;function nK(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:s,finalFocusRef:d,returnFocusOnClose:a,preserveScrollBarGap:c,lockFocusAcrossFrames:l,isOpen:u}=pu(),[h,f]=ST();z.useEffect(()=>{!h&&f&&setTimeout(f)},[h,f]);const p=IA(r,u);return j.jsx(AA,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:d,restoreFocus:a,contentRef:r,lockFocusAcrossFrames:l,children:j.jsx(tK,{removeScrollBar:!c,allowPinchZoom:s,enabled:p===1&&o,forwardProps:!0,children:e.children})})}var VA=mt((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...s}=e,{getDialogProps:d,getDialogContainerProps:a}=pu(),c=d(s,t),l=a(i),u=St("chakra-modal__content",n),h=Ld(),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}=pu();return j.jsx(nK,{children:j.jsx(Ye.div,{...l,className:"chakra-modal__content-container",tabIndex:-1,__css:p,children:j.jsx(PA,{preset:g,motionProps:o,className:u,...c,__css:f,children:r})})})});VA.displayName="ModalContent";function WA(e){const{leastDestructiveRef:t,...n}=e;return j.jsx(FA,{...n,initialFocusRef:t})}var UA=mt((e,t)=>j.jsx(VA,{ref:t,role:"alertdialog",...e})),GA=mt((e,t)=>{const{className:n,...r}=e,i=St("chakra-modal__footer",n),s={display:"flex",alignItems:"center",justifyContent:"flex-end",...Ld().footer};return j.jsx(Ye.footer,{ref:t,...r,__css:s,className:i})});GA.displayName="ModalFooter";var KA=mt((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=pu();z.useEffect(()=>(o(!0),()=>o(!1)),[o]);const s=St("chakra-modal__header",n),a={flex:0,...Ld().header};return j.jsx(Ye.header,{ref:t,className:s,id:i,...r,__css:a})});KA.displayName="ModalHeader";var rK=Ye(xu.div),yw=mt((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,s=St("chakra-modal__overlay",n),a={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...Ld().overlay},{motionPreset:c}=pu(),u=i||(c==="none"?{}:VT);return j.jsx(rK,{...u,__css:a,ref:t,className:s,...o})});yw.displayName="ModalOverlay";var bw=mt((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=pu();z.useEffect(()=>(o(!0),()=>o(!1)),[o]);const s=St("chakra-modal__body",n),d=Ld();return j.jsx(Ye.div,{ref:t,className:s,id:i,...r,__css:d.body})});bw.displayName="ModalBody";var iK=e=>j.jsx(Rs,{viewBox:"0 0 24 24",...e,children:j.jsx("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"})}),oK=e=>j.jsx(Rs,{viewBox:"0 0 24 24",...e,children:j.jsx("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 P_(e,t,n,r){z.useEffect(()=>{var i;if(!e.current||!r)return;const o=(i=e.current.ownerDocument.defaultView)!=null?i:window,s=Array.isArray(t)?t:[t],d=new o.MutationObserver(a=>{for(const c of a)c.type==="attributes"&&c.attributeName&&s.includes(c.attributeName)&&n(c)});return d.observe(e.current,{attributes:!0,attributeFilter:s}),()=>d.disconnect()})}function aK(e,t){const n=Gn(e);z.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var sK=50,I_=300;function lK(e,t){const[n,r]=z.useState(!1),[i,o]=z.useState(null),[s,d]=z.useState(!0),a=z.useRef(null),c=()=>clearTimeout(a.current);aK(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?sK:null);const l=z.useCallback(()=>{s&&e(),a.current=setTimeout(()=>{d(!1),r(!0),o("increment")},I_)},[e,s]),u=z.useCallback(()=>{s&&t(),a.current=setTimeout(()=>{d(!1),r(!0),o("decrement")},I_)},[t,s]),h=z.useCallback(()=>{d(!0),r(!1),c()},[]);return z.useEffect(()=>()=>c(),[]),{up:l,down:u,stop:h,isSpinning:n}}var uK=/^[Ee0-9+\-.]$/;function cK(e){return uK.test(e)}function dK(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function fK(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:s=1,isReadOnly:d,isDisabled:a,isRequired:c,isInvalid:l,pattern:u="[0-9]*(.[0-9]+)?",inputMode:h="decimal",allowMouseWheel:f,id:p,onChange:g,precision:b,name:x,"aria-describedby":S,"aria-label":T,"aria-labelledby":v,onFocus:w,onBlur:y,onInvalid:m,getAriaValueText:E,isValidCharacter:A,format:C,parse:k,...I}=e,R=Gn(w),M=Gn(y),O=Gn(m),P=Gn(A??cK),N=Gn(E),B=B7(e),{update:W,increment:K,decrement:q}=B,[re,Y]=z.useState(!1),Z=!(d||a),te=z.useRef(null),ie=z.useRef(null),ce=z.useRef(null),he=z.useRef(null),ve=z.useCallback(xe=>xe.split("").filter(P).join(""),[P]),Ce=z.useCallback(xe=>{var Fe;return(Fe=k==null?void 0:k(xe))!=null?Fe:xe},[k]),_e=z.useCallback(xe=>{var Fe;return((Fe=C==null?void 0:C(xe))!=null?Fe:xe).toString()},[C]);ep(()=>{(B.valueAsNumber>o||B.valueAsNumber<i)&&(O==null||O("rangeOverflow",_e(B.value),B.valueAsNumber))},[B.valueAsNumber,B.value,_e,O]),wa(()=>{if(!te.current)return;if(te.current.value!=B.value){const Fe=Ce(te.current.value);B.setValue(ve(Fe))}},[Ce,ve]);const Re=z.useCallback((xe=s)=>{Z&&K(xe)},[K,Z,s]),ot=z.useCallback((xe=s)=>{Z&&q(xe)},[q,Z,s]),Te=lK(Re,ot);P_(ce,"disabled",Te.stop,Te.isSpinning),P_(he,"disabled",Te.stop,Te.isSpinning);const it=z.useCallback(xe=>{if(xe.nativeEvent.isComposing)return;const Ne=Ce(xe.currentTarget.value);W(ve(Ne)),ie.current={start:xe.currentTarget.selectionStart,end:xe.currentTarget.selectionEnd}},[W,ve,Ce]),vt=z.useCallback(xe=>{var Fe,Ne,Xe;R==null||R(xe),ie.current&&(xe.target.selectionStart=(Ne=ie.current.start)!=null?Ne:(Fe=xe.currentTarget.value)==null?void 0:Fe.length,xe.currentTarget.selectionEnd=(Xe=ie.current.end)!=null?Xe:xe.currentTarget.selectionStart)},[R]),Qt=z.useCallback(xe=>{if(xe.nativeEvent.isComposing)return;dK(xe,P)||xe.preventDefault();const Fe=Ut(xe)*s,Ne=xe.key,tt={ArrowUp:()=>Re(Fe),ArrowDown:()=>ot(Fe),Home:()=>W(i),End:()=>W(o)}[Ne];tt&&(xe.preventDefault(),tt(xe))},[P,s,Re,ot,W,i,o]),Ut=xe=>{let Fe=1;return(xe.metaKey||xe.ctrlKey)&&(Fe=.1),xe.shiftKey&&(Fe=10),Fe},Lr=z.useMemo(()=>{const xe=N==null?void 0:N(B.value);if(xe!=null)return xe;const Fe=B.value.toString();return Fe||void 0},[B.value,N]),Ln=z.useCallback(()=>{let xe=B.value;if(B.value==="")return;/^[eE]/.test(B.value.toString())?B.setValue(""):(B.valueAsNumber<i&&(xe=i),B.valueAsNumber>o&&(xe=o),B.cast(xe))},[B,o,i]),Zn=z.useCallback(()=>{Y(!1),n&&Ln()},[n,Y,Ln]),Ht=z.useCallback(()=>{t&&requestAnimationFrame(()=>{var xe;(xe=te.current)==null||xe.focus()})},[t]),me=z.useCallback(xe=>{xe.preventDefault(),Te.up(),Ht()},[Ht,Te]),Ae=z.useCallback(xe=>{xe.preventDefault(),Te.down(),Ht()},[Ht,Te]);j7(()=>te.current,"wheel",xe=>{var Fe,Ne;const tt=((Ne=(Fe=te.current)==null?void 0:Fe.ownerDocument)!=null?Ne:document).activeElement===te.current;if(!f||!tt)return;xe.preventDefault();const kt=Ut(xe)*s,on=Math.sign(xe.deltaY);on===-1?Re(kt):on===1&&ot(kt)},{passive:!1});const we=z.useCallback((xe={},Fe=null)=>{const Ne=a||r&&B.isAtMax;return{...xe,ref:Cr(Fe,ce),role:"button",tabIndex:-1,onPointerDown:ut(xe.onPointerDown,Xe=>{Xe.button!==0||Ne||me(Xe)}),onPointerLeave:ut(xe.onPointerLeave,Te.stop),onPointerUp:ut(xe.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":So(Ne)}},[B.isAtMax,r,me,Te.stop,a]),He=z.useCallback((xe={},Fe=null)=>{const Ne=a||r&&B.isAtMin;return{...xe,ref:Cr(Fe,he),role:"button",tabIndex:-1,onPointerDown:ut(xe.onPointerDown,Xe=>{Xe.button!==0||Ne||Ae(Xe)}),onPointerLeave:ut(xe.onPointerLeave,Te.stop),onPointerUp:ut(xe.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":So(Ne)}},[B.isAtMin,r,Ae,Te.stop,a]),ct=z.useCallback((xe={},Fe=null)=>{var Ne,Xe,tt,kt;return{name:x,inputMode:h,type:"text",pattern:u,"aria-labelledby":v,"aria-label":T,"aria-describedby":S,id:p,disabled:a,...xe,readOnly:(Ne=xe.readOnly)!=null?Ne:d,"aria-readonly":(Xe=xe.readOnly)!=null?Xe:d,"aria-required":(tt=xe.required)!=null?tt:c,required:(kt=xe.required)!=null?kt:c,ref:Cr(te,Fe),value:_e(B.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(B.valueAsNumber)?void 0:B.valueAsNumber,"aria-invalid":So(l??B.isOutOfRange),"aria-valuetext":Lr,autoComplete:"off",autoCorrect:"off",onChange:ut(xe.onChange,it),onKeyDown:ut(xe.onKeyDown,Qt),onFocus:ut(xe.onFocus,vt,()=>Y(!0)),onBlur:ut(xe.onBlur,M,Zn)}},[x,h,u,v,T,_e,S,p,a,c,d,l,B.value,B.valueAsNumber,B.isOutOfRange,i,o,Lr,it,Qt,vt,M,Zn]);return{value:_e(B.value),valueAsNumber:B.valueAsNumber,isFocused:re,isDisabled:a,isReadOnly:d,getIncrementButtonProps:we,getDecrementButtonProps:He,getInputProps:ct,htmlProps:I}}var[hK,Lg]=xn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "<NumberInput />" `}),[pK,ww]=xn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),ah=mt(function(t,n){const r=Yi("NumberInput",t),i=ei(t),o=sw(i),{htmlProps:s,...d}=fK(o),a=z.useMemo(()=>d,[d]);return j.jsx(pK,{value:a,children:j.jsx(hK,{value:r,children:j.jsx(Ye.div,{...s,ref:n,className:St("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});ah.displayName="NumberInput";var sh=mt(function(t,n){const r=Lg();return j.jsx(Ye.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});sh.displayName="NumberInputStepper";var lh=mt(function(t,n){const{getInputProps:r}=ww(),i=r(t,n),o=Lg();return j.jsx(Ye.input,{...i,className:St("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});lh.displayName="NumberInputField";var qA=Ye("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),uh=mt(function(t,n){var r;const i=Lg(),{getDecrementButtonProps:o}=ww(),s=o(t,n);return j.jsx(qA,{...s,__css:i.stepper,children:(r=t.children)!=null?r:j.jsx(iK,{})})});uh.displayName="NumberDecrementStepper";var ch=mt(function(t,n){var r;const{getIncrementButtonProps:i}=ww(),o=i(t,n),s=Lg();return j.jsx(qA,{...o,__css:s.stepper,children:(r=t.children)!=null?r:j.jsx(oK,{})})});ch.displayName="NumberIncrementStepper";function gK(e){return e&&dr(e)&&dr(e.target)}function mK(e={}){const{onChange:t,value:n,defaultValue:r,name:i,isDisabled:o,isFocusable:s,isNative:d,...a}=e,[c,l]=z.useState(r||""),u=typeof n<"u",h=u?n:c,f=z.useRef(null),p=z.useCallback(()=>{const w=f.current;if(!w)return;let y="input:not(:disabled):checked";const m=w.querySelector(y);if(m){m.focus();return}y="input:not(:disabled)";const E=w.querySelector(y);E==null||E.focus()},[]),b=`radio-${z.useId()}`,x=i||b,S=z.useCallback(w=>{const y=gK(w)?w.target.value:w;u||l(y),t==null||t(String(y))},[t,u]),T=z.useCallback((w={},y=null)=>({...w,ref:Cr(y,f),role:"radiogroup"}),[]),v=z.useCallback((w={},y=null)=>({...w,ref:y,name:x,[d?"checked":"isChecked"]:h!=null?w.value===h:void 0,onChange(E){S(E)},"data-radiogroup":!0}),[d,x,S,h]);return{getRootProps:T,getRadioProps:v,name:x,ref:f,focus:p,setValue:l,value:h,onChange:S,isDisabled:o,isFocusable:s,htmlProps:a}}var[vK,YA]=xn({name:"RadioGroupContext",strict:!1}),dh=mt((e,t)=>{const{colorScheme:n,size:r,variant:i,children:o,className:s,isDisabled:d,isFocusable:a,...c}=e,{value:l,onChange:u,getRootProps:h,name:f,htmlProps:p}=mK(c),g=z.useMemo(()=>({name:f,size:r,onChange:u,colorScheme:n,value:l,variant:i,isDisabled:d,isFocusable:a}),[f,r,u,n,l,i,d,a]);return j.jsx(vK,{value:g,children:j.jsx(Ye.div,{...h(p,t),className:St("chakra-radio-group",s),children:o})})});dh.displayName="RadioGroup";var yK={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function bK(e={}){const{defaultChecked:t,isChecked:n,isFocusable:r,isDisabled:i,isReadOnly:o,isRequired:s,onChange:d,isInvalid:a,name:c,value:l,id:u,"data-radiogroup":h,"aria-describedby":f,...p}=e,g=`radio-${z.useId()}`,b=Ad(),S=!!YA()||!!h;let v=!!b&&!S?b.id:g;v=u??v;const w=i??(b==null?void 0:b.isDisabled),y=o??(b==null?void 0:b.isReadOnly),m=s??(b==null?void 0:b.isRequired),E=a??(b==null?void 0:b.isInvalid),[A,C]=z.useState(!1),[k,I]=z.useState(!1),[R,M]=z.useState(!1),[O,P]=z.useState(!1),[N,B]=z.useState(!!t),W=typeof n<"u",K=W?n:N;z.useEffect(()=>KT(C),[]);const q=z.useCallback(_e=>{if(y||w){_e.preventDefault();return}W||B(_e.target.checked),d==null||d(_e)},[W,w,y,d]),re=z.useCallback(_e=>{_e.key===" "&&P(!0)},[P]),Y=z.useCallback(_e=>{_e.key===" "&&P(!1)},[P]),Z=z.useCallback((_e={},Re=null)=>({..._e,ref:Re,"data-active":ht(O),"data-hover":ht(R),"data-disabled":ht(w),"data-invalid":ht(E),"data-checked":ht(K),"data-focus":ht(k),"data-focus-visible":ht(k&&A),"data-readonly":ht(y),"aria-hidden":!0,onMouseDown:ut(_e.onMouseDown,()=>P(!0)),onMouseUp:ut(_e.onMouseUp,()=>P(!1)),onMouseEnter:ut(_e.onMouseEnter,()=>M(!0)),onMouseLeave:ut(_e.onMouseLeave,()=>M(!1))}),[O,R,w,E,K,k,y,A]),{onFocus:te,onBlur:ie}=b??{},ce=z.useCallback((_e={},Re=null)=>{const ot=w&&!r;return{..._e,id:v,ref:Re,type:"radio",name:c,value:l,onChange:ut(_e.onChange,q),onBlur:ut(ie,_e.onBlur,()=>I(!1)),onFocus:ut(te,_e.onFocus,()=>I(!0)),onKeyDown:ut(_e.onKeyDown,re),onKeyUp:ut(_e.onKeyUp,Y),checked:K,disabled:ot,readOnly:y,required:m,"aria-invalid":So(E),"aria-disabled":So(ot),"aria-required":So(m),"data-readonly":ht(y),"aria-describedby":f,style:yK}},[w,r,v,c,l,q,ie,te,re,Y,K,y,m,E,f]);return{state:{isInvalid:E,isFocused:k,isChecked:K,isActive:O,isHovered:R,isDisabled:w,isReadOnly:y,isRequired:m},getCheckboxProps:Z,getRadioProps:Z,getInputProps:ce,getLabelProps:(_e={},Re=null)=>({..._e,ref:Re,onMouseDown:ut(_e.onMouseDown,wK),"data-disabled":ht(w),"data-checked":ht(K),"data-invalid":ht(E)}),getRootProps:(_e,Re=null)=>({..._e,ref:Re,"data-disabled":ht(w),"data-checked":ht(K),"data-invalid":ht(E)}),htmlProps:p}}function wK(e){e.preventDefault(),e.stopPropagation()}function SK(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var co=mt((e,t)=>{var n;const r=YA(),{onChange:i,value:o}=e,s=Yi("Radio",{...r,...e}),d=ei(e),{spacing:a="0.5rem",children:c,isDisabled:l=r==null?void 0:r.isDisabled,isFocusable:u=r==null?void 0:r.isFocusable,inputProps:h,...f}=d;let p=e.isChecked;(r==null?void 0:r.value)!=null&&o!=null&&(p=r.value===o);let g=i;r!=null&&r.onChange&&o!=null&&(g=A2(r.onChange,i));const b=(n=e==null?void 0:e.name)!=null?n:r==null?void 0:r.name,{getInputProps:x,getCheckboxProps:S,getLabelProps:T,getRootProps:v,htmlProps:w}=bK({...f,isChecked:p,isFocusable:u,isDisabled:l,onChange:g,name:b}),[y,m]=SK(w,rD),E=S(m),A=x(h,t),C=T(),k=Object.assign({},y,v()),I={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...s.container},R={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...s.control},M={userSelect:"none",marginStart:a,...s.label};return j.jsxs(Ye.label,{className:"chakra-radio",...k,__css:I,children:[j.jsx("input",{className:"chakra-radio__input",...A}),j.jsx(Ye.span,{className:"chakra-radio__control",...E,__css:R}),c&&j.jsx(Ye.span,{className:"chakra-radio__label",...C,__css:M,children:c})]})});co.displayName="Radio";var XA=mt(function(t,n){const r=Yi("Switch",t),{spacing:i="0.5rem",children:o,...s}=ei(t),{state:d,getInputProps:a,getCheckboxProps:c,getRootProps:l,getLabelProps:u}=qT(s),h=z.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),f=z.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),p=z.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return j.jsxs(Ye.label,{...l(),className:St("chakra-switch",t.className),__css:h,children:[j.jsx("input",{className:"chakra-switch__input",...a({},n)}),j.jsx(Ye.span,{...c(),className:"chakra-switch__track",__css:f,children:j.jsx(Ye.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":ht(d.isChecked),"data-hover":ht(d.isHovered)})}),o&&j.jsx(Ye.span,{className:"chakra-switch__label",...u(),__css:p,children:o})]})});XA.displayName="Switch";var[xK,_K,CK,kK]=o7();function EK(e){var t;const{defaultIndex:n,onChange:r,index:i,isManual:o,isLazy:s,lazyBehavior:d="unmount",orientation:a="horizontal",direction:c="ltr",...l}=e,[u,h]=z.useState(n??0),[f,p]=a7({defaultValue:n??0,value:i,onChange:r});z.useEffect(()=>{i!=null&&h(i)},[i]);const g=CK(),b=z.useId();return{id:`tabs-${(t=e.id)!=null?t:b}`,selectedIndex:f,focusedIndex:u,setSelectedIndex:p,setFocusedIndex:h,isManual:o,isLazy:s,lazyBehavior:d,orientation:a,descendants:g,direction:c,htmlProps:l}}var[$K,Rg]=xn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});function TK(e){const{focusedIndex:t,orientation:n,direction:r}=Rg(),i=_K(),o=z.useCallback(s=>{const d=()=>{var S;const T=i.nextEnabled(t);T&&((S=T.node)==null||S.focus())},a=()=>{var S;const T=i.prevEnabled(t);T&&((S=T.node)==null||S.focus())},c=()=>{var S;const T=i.firstEnabled();T&&((S=T.node)==null||S.focus())},l=()=>{var S;const T=i.lastEnabled();T&&((S=T.node)==null||S.focus())},u=n==="horizontal",h=n==="vertical",f=s.key,p=r==="ltr"?"ArrowLeft":"ArrowRight",g=r==="ltr"?"ArrowRight":"ArrowLeft",x={[p]:()=>u&&a(),[g]:()=>u&&d(),ArrowDown:()=>h&&d(),ArrowUp:()=>h&&a(),Home:c,End:l}[f];x&&(s.preventDefault(),x(s))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:ut(e.onKeyDown,o)}}function AK(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:s,setFocusedIndex:d,selectedIndex:a}=Rg(),{index:c,register:l}=kK({disabled:t&&!n}),u=c===a,h=()=>{i(c)},f=()=>{d(c),!o&&!(t&&n)&&i(c)},p=dG({...r,ref:Cr(l,e.ref),isDisabled:t,isFocusable:n,onClick:ut(e.onClick,h)}),g="button";return{...p,id:QA(s,c),role:"tab",tabIndex:u?0:-1,type:g,"aria-selected":u,"aria-controls":ZA(s,c),onFocus:t?void 0:ut(e.onFocus,f)}}var[MK,LK]=xn({});function RK(e){const t=Rg(),{id:n,selectedIndex:r}=t,o=aw(e.children).map((s,d)=>z.createElement(MK,{key:d,value:{isSelected:d===r,id:ZA(n,d),tabId:QA(n,d),selectedIndex:r}},s));return{...e,children:o}}function PK(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=Rg(),{isSelected:o,id:s,tabId:d}=LK(),a=z.useRef(!1);o&&(a.current=!0);const c=fG({wasSelected:a.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:c?t:null,role:"tabpanel","aria-labelledby":d,hidden:!o,id:s}}function QA(e,t){return`${e}--tab-${t}`}function ZA(e,t){return`${e}--tabpanel-${t}`}var[IK,Pg]=xn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `}),JA=mt(function(t,n){const r=Yi("Tabs",t),{children:i,className:o,...s}=ei(t),{htmlProps:d,descendants:a,...c}=EK(s),l=z.useMemo(()=>c,[c]),{isFitted:u,...h}=d;return j.jsx(xK,{value:a,children:j.jsx($K,{value:l,children:j.jsx(IK,{value:r,children:j.jsx(Ye.div,{className:St("chakra-tabs",o),ref:n,...h,__css:r.root,children:i})})})})});JA.displayName="Tabs";var eM=mt(function(t,n){const r=TK({...t,ref:n}),o={display:"flex",...Pg().tablist};return j.jsx(Ye.div,{...r,className:St("chakra-tabs__tablist",t.className),__css:o})});eM.displayName="TabList";var oc=mt(function(t,n){const r=PK({...t,ref:n}),i=Pg();return j.jsx(Ye.div,{outline:"0",...r,className:St("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});oc.displayName="TabPanel";var tM=mt(function(t,n){const r=RK(t),i=Pg();return j.jsx(Ye.div,{...r,width:"100%",ref:n,className:St("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});tM.displayName="TabPanels";var ac=mt(function(t,n){const r=Pg(),i=AK({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return j.jsx(Ye.button,{...i,className:St("chakra-tabs__tab",t.className),__css:o})});ac.displayName="Tab";function Sw({message:e,buttonLabel:t,confirmLabel:n,cancelLabel:r,onConfirm:i,style:o}){const{isOpen:s,onOpen:d,onClose:a}=MA(),c=z.useRef(),l=t||n;return o?o={...o,width:"100%"}:o={width:"100%"},j.jsxs(j.Fragment,{children:[j.jsx(wr,{className:"btn-settings",style:o,onClick:d,children:l}),j.jsx(WA,{isOpen:s,leastDestructiveRef:c,onClose:a,variant:"nevysha-confirm",children:j.jsx(yw,{children:j.jsxs(UA,{children:[j.jsx(KA,{fontSize:"lg",fontWeight:"bold",children:"Confirm Action"}),j.jsx(bw,{children:e}),j.jsxs(GA,{children:[j.jsx("button",{className:"btn-settings",ref:c,onClick:a,children:r}),j.jsx("button",{className:"btn-settings",onClick:()=>{a(),i()},children:n})]})]})})})]})}function OK({imageHash:e}){const{images:t,getImage:n}=z.useContext(qi),[r,i]=z.useState(n(e));z.useEffect(()=>{i(n(e))},[t,e]);const o=(s,d)=>{if(s.preventDefault(),s.stopPropagation(),window.sendToPipe){let a={src:`/cozy-nest/image?path=${r.path}`};window.sendToPipe(d,a)}};return j.jsxs(En,{children:[j.jsx(wr,{onClick:s=>o(s,"txt2img"),children:"txt2img"}),j.jsx(wr,{onClick:s=>o(s,"img2img"),children:"img2img"}),j.jsx(wr,{onClick:s=>o(s,"inpainting"),children:"inpainting"})]})}function FK({imageHash:e}){const{images:t,deleteImg:n,updateExifInState:r,getImage:i}=z.useContext(qi),[o,s]=z.useState(!1),[d,a]=z.useState({}),[c,l]=z.useState(!1),[u,h]=z.useState(i(e));z.useEffect(()=>{h(i(e))},[t,e]),z.useEffect(()=>{!u||!u.path||a(u.metadata.exif)},[u,e]),z.useEffect(()=>{d&&l(d["cozy-nest-hidden"]==="True")},[d,u,t]);const f=async()=>{s(!0)},p=async()=>{const x=u.path;d["cozy-nest-hidden"]="True",a(d),await _m.save(x,d),r(u)},g=async()=>{const x=u.path;d["cozy-nest-hidden"]="False",a(d),await _m.save(x,d),r(u)},b=_m.ExifEditor;return j.jsxs(hi,{style:{height:"100%",justifyContent:"space-between"},children:[j.jsx(OK,{imageHash:e}),j.jsxs(hi,{children:[j.jsxs(En,{children:[o&&j.jsx(b,{imageHash:e,exif:d,visible:o,onClose:()=>s(!1)}),j.jsx(wr,{onClick:f,children:"Edit Exif"})]}),j.jsxs(En,{children:[!c&&j.jsx(wr,{onClick:p,children:"Hide"}),c&&j.jsx(wr,{onClick:g,children:"Show"}),j.jsx(wr,{onClick:()=>n("archive",u),children:"Move to archive"}),j.jsx(Sw,{style:{height:"100%"},message:"This action cannot be undone. Are you sure?",confirmLabel:"Delete",cancelLabel:"Cancel",onConfirm:()=>n("delete",u)})]})]})]})}function O_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O_(Object(n),!0).forEach(function(r){Il(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mr(e,t){if(e==null)return{};var n=$g(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var F_=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function DK(e,t){return!!(e===t||F_(e)&&F_(t))}function NK(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!DK(e[n],t[n]))return!1;return!0}function nM(e,t){t===void 0&&(t=NK);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var s=e.apply(this,i);return n={lastResult:s,lastArgs:i,lastThis:this},s}return r.clear=function(){n=null},r}function zK(e){if(Array.isArray(e))return e}function BK(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,d=[],a=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);a=!0);}catch(l){c=!0,i=l}finally{try{if(!a&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return d}}function n0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rM(e,t){if(e){if(typeof e=="string")return n0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return n0(e,t)}}function jK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qr(e,t){return zK(e)||BK(e,t)||rM(e,t)||jK()}function HK(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function VK(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}const WK=["top","right","bottom","left"];WK.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function Ki(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function iM(e){return Ki(e).getComputedStyle(e)}function oM(e){return e instanceof Ki(e).Node}function aM(e){return oM(e)?(e.nodeName||"").toLowerCase():""}function xw(e){return e instanceof Ki(e).HTMLElement}function ss(e){return e instanceof Ki(e).Element}function D_(e){return typeof ShadowRoot>"u"?!1:e instanceof Ki(e).ShadowRoot||e instanceof ShadowRoot}function sM(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=iM(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function UK(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function GK(e){return["html","body","#document"].includes(aM(e))}const mp=Math.round;function KK(e){const t=iM(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=xw(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,d=mp(n)!==o||mp(r)!==s;return d&&(n=o,r=s),{width:n,height:r,fallback:d}}function lM(e){return ss(e)?e:e.contextElement}const uM={x:1,y:1};function dv(e){const t=lM(e);if(!xw(t))return uM;const n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=KK(t);let s=(o?mp(n.width):n.width)/r,d=(o?mp(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),d&&Number.isFinite(d)||(d=1),{x:s,y:d}}const N_={x:0,y:0};function qK(e,t,n){var r,i;if(t===void 0&&(t=!0),!UK())return N_;const o=e?Ki(e):window;return!n||t&&n!==o?N_:{x:((r=o.visualViewport)==null?void 0:r.offsetLeft)||0,y:((i=o.visualViewport)==null?void 0:i.offsetTop)||0}}function z_(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=lM(e);let s=uM;t&&(r?ss(r)&&(s=dv(r)):s=dv(e));const d=qK(o,n,r);let a=(i.left+d.x)/s.x,c=(i.top+d.y)/s.y,l=i.width/s.x,u=i.height/s.y;if(o){const h=Ki(o),f=r&&ss(r)?Ki(r):r;let p=h.frameElement;for(;p&&r&&f!==h;){const g=dv(p),b=p.getBoundingClientRect(),x=getComputedStyle(p);b.x+=(p.clientLeft+parseFloat(x.paddingLeft))*g.x,b.y+=(p.clientTop+parseFloat(x.paddingTop))*g.y,a*=g.x,c*=g.y,l*=g.x,u*=g.y,a+=b.x,c+=b.y,p=Ki(p).frameElement}}return VK({width:l,height:u,x:a,y:c})}function YK(e){return((oM(e)?e.ownerDocument:e.document)||window.document).documentElement}function XK(e){if(aM(e)==="html")return e;const t=e.assignedSlot||e.parentNode||D_(e)&&e.host||YK(e);return D_(t)?t.host:t}function cM(e){const t=XK(e);return GK(t)?t.ownerDocument.body:xw(t)&&sM(t)?t:cM(t)}function fh(e,t){var n;t===void 0&&(t=[]);const r=cM(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ki(r);return i?t.concat(o,o.visualViewport||[],sM(r)?r:[]):t.concat(r,fh(r))}function QK(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:d=!1}=r,a=i||o?[...ss(e)?fh(e):e.contextElement?fh(e.contextElement):[],...fh(t)]:[];a.forEach(h=>{const f=!ss(h)&&h.toString().includes("V");!i||d&&!f||h.addEventListener("scroll",n,{passive:!0}),o&&h.addEventListener("resize",n)});let c,l=null;s&&(l=new ResizeObserver(()=>{n()}),ss(e)&&!d&&l.observe(e),ss(e)||!e.contextElement||d||l.observe(e.contextElement),l.observe(t));let u=d?z_(e):null;return d&&function h(){const f=z_(e);!u||f.x===u.x&&f.y===u.y&&f.width===u.width&&f.height===u.height||n(),u=f,c=requestAnimationFrame(h)}(),n(),()=>{var h;a.forEach(f=>{i&&f.removeEventListener("scroll",n),o&&f.removeEventListener("resize",n)}),(h=l)==null||h.disconnect(),l=null,d&&cancelAnimationFrame(c)}}var r0=z.useLayoutEffect,ZK=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],vp=function(){};function JK(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function eq(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&o.push("".concat(JK(e,s)));return o.filter(function(d){return d}).map(function(d){return String(d).trim()}).join(" ")}var yp=function(t){return uq(t)?t.filter(Boolean):ks(t)==="object"&&t!==null?[t]:[]},dM=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Mr(t,ZK);return je({},n)},tn=function(t,n,r){var i=t.cx,o=t.getStyles,s=t.getClassNames,d=t.className;return{css:o(n,t),className:i(r??{},s(n,t),d)}};function Ig(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function tq(e){return Ig(e)?window.innerHeight:e.clientHeight}function fM(e){return Ig(e)?window.pageYOffset:e.scrollTop}function bp(e,t){if(Ig(e)){window.scrollTo(0,t);return}e.scrollTop=t}function nq(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function rq(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Sf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:vp,i=fM(e),o=t-i,s=10,d=0;function a(){d+=s;var c=rq(d,i,o,n);bp(e,c),d<n?window.requestAnimationFrame(a):r(e)}a()}function B_(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?bp(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&bp(e,Math.max(t.offsetTop-i,0))}function iq(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function j_(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function oq(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var hM=!1,aq={get passive(){return hM=!0}},xf=typeof window<"u"?window:{};xf.addEventListener&&xf.removeEventListener&&(xf.addEventListener("p",vp,aq),xf.removeEventListener("p",vp,!1));var sq=hM;function lq(e){return e!=null}function uq(e){return Array.isArray(e)}function sc(e,t,n){return e?t:n}var cq=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(s){var d=Qr(s,1),a=d[0];return!r.includes(a)});return o.reduce(function(s,d){var a=Qr(d,2),c=a[0],l=a[1];return s[c]=l,s},{})};function dq(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,s=e.isFixedPosition,d=e.controlHeight,a=nq(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var l=a.getBoundingClientRect(),u=l.height,h=n.getBoundingClientRect(),f=h.bottom,p=h.height,g=h.top,b=n.offsetParent.getBoundingClientRect(),x=b.top,S=s?window.innerHeight:tq(a),T=fM(a),v=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),y=x-w,m=S-g,E=y+T,A=u-T-g,C=f-S+T+v,k=T+g-w,I=160;switch(i){case"auto":case"bottom":if(m>=p)return{placement:"bottom",maxHeight:t};if(A>=p&&!s)return o&&Sf(a,C,I),{placement:"bottom",maxHeight:t};if(!s&&A>=r||s&&m>=r){o&&Sf(a,C,I);var R=s?m-v:A-v;return{placement:"bottom",maxHeight:R}}if(i==="auto"||s){var M=t,O=s?y:E;return O>=r&&(M=Math.min(O-v-d,t)),{placement:"top",maxHeight:M}}if(i==="bottom")return o&&bp(a,C),{placement:"bottom",maxHeight:t};break;case"top":if(y>=p)return{placement:"top",maxHeight:t};if(E>=p&&!s)return o&&Sf(a,k,I),{placement:"top",maxHeight:t};if(!s&&E>=r||s&&y>=r){var P=t;return(!s&&E>=r||s&&y>=r)&&(P=s?y-w:E-w),o&&Sf(a,k,I),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function fq(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var pM=function(t){return t==="auto"?"bottom":t},hq=function(t,n){var r,i=t.placement,o=t.theme,s=o.borderRadius,d=o.spacing,a=o.colors;return je((r={label:"menu"},Il(r,fq(i),"100%"),Il(r,"position","absolute"),Il(r,"width","100%"),Il(r,"zIndex",1),r),n?{}:{backgroundColor:a.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:d.menuGutter,marginTop:d.menuGutter})},gM=z.createContext(null),pq=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,s=t.menuPosition,d=t.menuShouldScrollIntoView,a=t.theme,c=z.useContext(gM)||{},l=c.setPortalPlacement,u=z.useRef(null),h=z.useState(i),f=Qr(h,2),p=f[0],g=f[1],b=z.useState(null),x=Qr(b,2),S=x[0],T=x[1],v=a.spacing.controlHeight;return r0(function(){var w=u.current;if(w){var y=s==="fixed",m=d&&!y,E=dq({maxHeight:i,menuEl:w,minHeight:r,placement:o,shouldScroll:m,isFixedPosition:y,controlHeight:v});g(E.maxHeight),T(E.placement),l==null||l(E.placement)}},[i,o,s,d,r,l,v]),n({ref:u,placerProps:je(je({},t),{},{placement:S||pM(o),maxHeight:p})})},gq=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return Ke("div",Ie({},tn(t,"menu",{menu:!0}),{ref:r},i),n)},mq=gq,vq=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return je({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},yq=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return Ke("div",Ie({},tn(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},mM=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return je({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},bq=mM,wq=mM,vM=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)};vM.defaultProps={children:"No options"};var yM=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)};yM.defaultProps={children:"Loading..."};var Sq=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},xq=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,s=t.menuPlacement,d=t.menuPosition,a=z.useRef(null),c=z.useRef(null),l=z.useState(pM(s)),u=Qr(l,2),h=u[0],f=u[1],p=z.useMemo(function(){return{setPortalPlacement:f}},[]),g=z.useState(null),b=Qr(g,2),x=b[0],S=b[1],T=z.useCallback(function(){if(i){var m=iq(i),E=d==="fixed"?0:window.pageYOffset,A=m[h]+E;(A!==(x==null?void 0:x.offset)||m.left!==(x==null?void 0:x.rect.left)||m.width!==(x==null?void 0:x.rect.width))&&S({offset:A,rect:m})}},[i,d,h,x==null?void 0:x.offset,x==null?void 0:x.rect.left,x==null?void 0:x.rect.width]);r0(function(){T()},[T]);var v=z.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&a.current&&(c.current=QK(i,a.current,T,{elementResize:"ResizeObserver"in window}))},[i,T]);r0(function(){v()},[v]);var w=z.useCallback(function(m){a.current=m,v()},[v]);if(!n&&d!=="fixed"||!x)return null;var y=Ke("div",Ie({ref:w},tn(je(je({},t),{},{offset:x.offset,position:d,rect:x.rect}),"menuPortal",{"menu-portal":!0}),o),r);return Ke(gM.Provider,{value:p},n?yd.createPortal(y,n):y)},_q=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},Cq=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return Ke("div",Ie({},tn(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},kq=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,s=t.selectProps.controlShouldRenderValue;return je({alignItems:"center",display:i&&o&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},Eq=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return Ke("div",Ie({},tn(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},$q=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Tq=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"indicatorsContainer",{indicators:!0}),r),n)},H_,Aq=["size"],Mq={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},bM=function(t){var n=t.size,r=Mr(t,Aq);return Ke("svg",Ie({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Mq},r))},_w=function(t){return Ke(bM,Ie({size:20},t),Ke("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},wM=function(t){return Ke(bM,Ie({size:20},t),Ke("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},SM=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return je({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:o*2,":hover":{color:r?s.neutral80:s.neutral40}})},Lq=SM,Rq=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Ke(wM,null))},Pq=SM,Iq=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Ke(_w,null))},Oq=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return je({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:o*2,marginTop:o*2})},Fq=function(t){var n=t.innerProps;return Ke("span",Ie({},n,tn(t,"indicatorSeparator",{"indicator-separator":!0})))},Dq=wd(H_||(H_=HK([`
|
||
0%, 80%, 100% { opacity: 0; }
|
||
40% { opacity: 1; }
|
||
`]))),Nq=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,s=o.colors,d=o.spacing.baseUnit;return je({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:d*2})},fv=function(t){var n=t.delay,r=t.offset;return Ke("span",{css:kb({animation:"".concat(Dq," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},xM=function(t){var n=t.innerProps,r=t.isRtl;return Ke("div",Ie({},tn(t,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ke(fv,{delay:0,offset:r}),Ke(fv,{delay:160,offset:!0}),Ke(fv,{delay:320,offset:!r}))};xM.defaultProps={size:4};var zq=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,s=o.colors,d=o.borderRadius,a=o.spacing;return je({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:d,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:i?s.primary:s.neutral30}})},Bq=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,s=t.innerProps,d=t.menuIsOpen;return Ke("div",Ie({ref:o},tn(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":d}),s),n)},jq=Bq,Hq=["data"],Vq=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},Wq=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,s=t.Heading,d=t.headingProps,a=t.innerProps,c=t.label,l=t.theme,u=t.selectProps;return Ke("div",Ie({},tn(t,"group",{group:!0}),a),Ke(s,Ie({},d,{selectProps:u,theme:l,getStyles:i,getClassNames:o,cx:r}),c),Ke("div",null,n))},Uq=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return je({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},Gq=function(t){var n=dM(t);n.data;var r=Mr(n,Hq);return Ke("div",Ie({},tn(t,"groupHeading",{"group-heading":!0}),r))},Kq=Wq,qq=["innerRef","isDisabled","isHidden","inputClassName"],Yq=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,s=o.spacing,d=o.colors;return je(je({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},Xq),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:d.neutral80})},_M={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Xq={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":je({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},_M)},Qq=function(t){return je({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},_M)},Zq=function(t){var n=t.cx,r=t.value,i=dM(t),o=i.innerRef,s=i.isDisabled,d=i.isHidden,a=i.inputClassName,c=Mr(i,qq);return Ke("div",Ie({},tn(t,"input",{"input-container":!0}),{"data-value":r||""}),Ke("input",Ie({className:n({input:!0},a),ref:o,style:Qq(d),disabled:s},c)))},Jq=Zq,eY=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,s=r.colors;return je({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},tY=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,s=t.cropWithEllipsis;return je({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},nY=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,s=r.colors,d=t.isFocused;return je({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:d?s.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},CM=function(t){var n=t.children,r=t.innerProps;return Ke("div",r,n)},rY=CM,iY=CM;function oY(e){var t=e.children,n=e.innerProps;return Ke("div",Ie({role:"button"},n),t||Ke(_w,{size:14}))}var aY=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,s=t.isDisabled,d=t.removeProps,a=t.selectProps,c=r.Container,l=r.Label,u=r.Remove;return Ke(c,{data:i,innerProps:je(je({},tn(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:a},Ke(l,{data:i,innerProps:je({},tn(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},n),Ke(u,{data:i,innerProps:je(je({},tn(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},d),selectProps:a}))},sY=aY,lY=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,s=t.theme,d=s.spacing,a=s.colors;return je({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?a.primary:i?a.primary25:"transparent",color:r?a.neutral20:o?a.neutral0:"inherit",padding:"".concat(d.baseUnit*2,"px ").concat(d.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?a.primary:a.primary50}})},uY=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,s=t.innerRef,d=t.innerProps;return Ke("div",Ie({},tn(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:s,"aria-disabled":r},d),n)},cY=uY,dY=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return je({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},fY=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"placeholder",{placeholder:!0}),r),n)},hY=fY,pY=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,s=i.colors;return je({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},gY=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Ke("div",Ie({},tn(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},mY=gY,vY={ClearIndicator:Iq,Control:jq,DropdownIndicator:Rq,DownChevron:wM,CrossIcon:_w,Group:Kq,GroupHeading:Gq,IndicatorsContainer:Tq,IndicatorSeparator:Fq,Input:Jq,LoadingIndicator:xM,Menu:mq,MenuList:yq,MenuPortal:xq,LoadingMessage:yM,NoOptionsMessage:vM,MultiValue:sY,MultiValueContainer:rY,MultiValueLabel:iY,MultiValueRemove:oY,Option:cY,Placeholder:hY,SelectContainer:Cq,SingleValue:mY,ValueContainer:Eq},kM=function(t){return je(je({},vY),t.components)};const V_={disabled:!1},wp=st.createContext(null);var yY=function(t){return t.scrollTop},lc="unmounted",Qa="exited",Za="entering",pl="entered",i0="exiting",Po=function(e){dw(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,d=s&&!s.isMounting?r.enter:r.appear,a;return o.appearStatus=null,r.in?d?(a=Qa,o.appearStatus=Za):a=pl:r.unmountOnExit||r.mountOnEnter?a=lc:a=Qa,o.state={status:a},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===lc?{status:Qa}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Za&&s!==pl&&(o=Za):(s===Za||s===pl)&&(o=i0)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,d;return o=s=d=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,d=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:d}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Za){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:nf.findDOMNode(this);s&&yY(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qa&&this.setState({status:lc})},n.performEnter=function(i){var o=this,s=this.props.enter,d=this.context?this.context.isMounting:i,a=this.props.nodeRef?[d]:[nf.findDOMNode(this),d],c=a[0],l=a[1],u=this.getTimeouts(),h=d?u.appear:u.enter;if(!i&&!s||V_.disabled){this.safeSetState({status:pl},function(){o.props.onEntered(c)});return}this.props.onEnter(c,l),this.safeSetState({status:Za},function(){o.props.onEntering(c,l),o.onTransitionEnd(h,function(){o.safeSetState({status:pl},function(){o.props.onEntered(c,l)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),d=this.props.nodeRef?void 0:nf.findDOMNode(this);if(!o||V_.disabled){this.safeSetState({status:Qa},function(){i.props.onExited(d)});return}this.props.onExit(d),this.safeSetState({status:i0},function(){i.props.onExiting(d),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Qa},function(){i.props.onExited(d)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(d){s&&(s=!1,o.nextCallback=null,i(d))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:nf.findDOMNode(this),d=i==null&&!this.props.addEndListener;if(!s||d){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=a[0],l=a[1];this.props.addEndListener(c,l)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===lc)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var d=$g(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return st.createElement(wp.Provider,{value:null},typeof s=="function"?s(i,d):st.cloneElement(st.Children.only(s),d))},t}(st.Component);Po.contextType=wp;Po.propTypes={};function ll(){}Po.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ll,onEntering:ll,onEntered:ll,onExit:ll,onExiting:ll,onExited:ll};Po.UNMOUNTED=lc;Po.EXITED=Qa;Po.ENTERING=Za;Po.ENTERED=pl;Po.EXITING=i0;const EM=Po;function $M(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cw(e,t){var n=function(o){return t&&z.isValidElement(o)?t(o):o},r=Object.create(null);return e&&z.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function bY(e,t){e=e||{},t=t||{};function n(l){return l in t?t[l]:e[l]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,d={};for(var a in t){if(r[a])for(s=0;s<r[a].length;s++){var c=r[a][s];d[r[a][s]]=n(c)}d[a]=n(a)}for(s=0;s<i.length;s++)d[i[s]]=n(i[s]);return d}function ls(e,t,n){return n[t]!=null?n[t]:e.props[t]}function wY(e,t){return Cw(e.children,function(n){return z.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:ls(n,"appear",e),enter:ls(n,"enter",e),exit:ls(n,"exit",e)})})}function SY(e,t,n){var r=Cw(e.children),i=bY(t,r);return Object.keys(i).forEach(function(o){var s=i[o];if(z.isValidElement(s)){var d=o in t,a=o in r,c=t[o],l=z.isValidElement(c)&&!c.props.in;a&&(!d||l)?i[o]=z.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:ls(s,"exit",e),enter:ls(s,"enter",e)}):!a&&d&&!l?i[o]=z.cloneElement(s,{in:!1}):a&&d&&z.isValidElement(c)&&(i[o]=z.cloneElement(s,{onExited:n.bind(null,s),in:c.props.in,exit:ls(s,"exit",e),enter:ls(s,"enter",e)}))}}),i}var xY=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},_Y={component:"div",childFactory:function(t){return t}},kw=function(e){dw(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=o.handleExited.bind($M(o));return o.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},o}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,o){var s=o.children,d=o.handleExited,a=o.firstRender;return{children:a?wY(i,d):SY(i,s,d),firstRender:!1}},n.handleExited=function(i,o){var s=Cw(this.props.children);i.key in s||(i.props.onExited&&i.props.onExited(o),this.mounted&&this.setState(function(d){var a=Ie({},d.children);return delete a[i.key],{children:a}}))},n.render=function(){var i=this.props,o=i.component,s=i.childFactory,d=$g(i,["component","childFactory"]),a=this.state.contextValue,c=xY(this.state.children).map(s);return delete d.appear,delete d.enter,delete d.exit,o===null?st.createElement(wp.Provider,{value:a},c):st.createElement(wp.Provider,{value:a},st.createElement(o,d,c))},t}(st.Component);kw.propTypes={};kw.defaultProps=_Y;const TM=kw;var CY=["in","onExited","appear","enter","exit"],kY=function(t){return function(n){n.in,n.onExited,n.appear,n.enter,n.exit;var r=Mr(n,CY);return z.createElement(t,r)}},EY=kY,$Y=["component","duration","in","onExited"],AM=function(t){var n=t.component,r=t.duration,i=r===void 0?1:r,o=t.in;t.onExited;var s=Mr(t,$Y),d=z.useRef(null),a={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(i,"ms")},exiting:{opacity:0},exited:{opacity:0}};return z.createElement(EM,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:i,nodeRef:d},function(c){var l={style:je({},a[c]),ref:d};return z.createElement(n,Ie({innerProps:l},s))})},o0=260,TY=function(t){var n=t.children,r=t.in,i=t.onExited,o=z.useRef(null),s=z.useState("auto"),d=Qr(s,2),a=d[0],c=d[1];z.useEffect(function(){var u=o.current;if(u){var h=window.requestAnimationFrame(function(){return c(u.getBoundingClientRect().width)});return function(){return window.cancelAnimationFrame(h)}}},[]);var l=function(h){switch(h){default:return{width:a};case"exiting":return{width:0,transition:"width ".concat(o0,"ms ease-out")};case"exited":return{width:0}}};return z.createElement(EM,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,onExited:function(){var h=o.current;h&&(i==null||i(h))},timeout:o0,nodeRef:o},function(u){return z.createElement("div",{ref:o,style:je({overflow:"hidden",whiteSpace:"nowrap"},l(u))},n)})},AY=["in","onExited"],MY=function(t){return function(n){var r=n.in,i=n.onExited,o=Mr(n,AY);return z.createElement(TY,{in:r,onExited:i},z.createElement(t,Ie({cropWithEllipsis:r},o)))}},LY=MY,RY=function(t){return function(n){return z.createElement(AM,Ie({component:t,duration:n.isMulti?o0:1},n))}},PY=RY,IY=function(t){return function(n){return z.createElement(AM,Ie({component:t},n))}},OY=IY,FY=["component"],DY=["children"],NY=function(t){return function(n){return n.isMulti?z.createElement(zY,Ie({component:t},n)):z.createElement(TM,Ie({component:t},n))}},zY=function(t){var n=t.component,r=Mr(t,FY),i=BY(r);return z.createElement(TM,Ie({component:n},i))},BY=function(t){var n=t.children,r=Mr(t,DY),i=r.isMulti,o=r.hasValue,s=r.innerProps,d=r.selectProps,a=d.components,c=d.controlShouldRenderValue,l=z.useState(i&&c&&o),u=Qr(l,2),h=u[0],f=u[1],p=z.useState(!1),g=Qr(p,2),b=g[0],x=g[1];z.useEffect(function(){o&&!h&&f(!0)},[o,h]),z.useEffect(function(){b&&!o&&h&&f(!1),x(!1)},[b,o,h]);var S=function(){return x(!0)},T=function(m){if(i&&z.isValidElement(m)){if(m.type===a.MultiValue)return z.cloneElement(m,{onExited:S});if(m.type===a.Placeholder&&h)return null}return m},v=je(je({},s),{},{style:je(je({},s==null?void 0:s.style),{},{display:i&&o||h?"flex":"grid"})}),w=je(je({},r),{},{innerProps:v,children:z.Children.toArray(n).map(T)});return w},jY=NY,HY=["Input","MultiValue","Placeholder","SingleValue","ValueContainer"],MM=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=kM({components:t}),r=n.Input,i=n.MultiValue,o=n.Placeholder,s=n.SingleValue,d=n.ValueContainer,a=Mr(n,HY);return je({Input:EY(r),MultiValue:LY(i),Placeholder:PY(o),SingleValue:OY(s),ValueContainer:jY(d)},a)},Rd=MM();Rd.Input;Rd.MultiValue;Rd.Placeholder;Rd.SingleValue;Rd.ValueContainer;var VY=nM(MM);function WY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W_(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,sA(r.key),r)}}function UY(e,t,n){return t&&W_(e.prototype,t),n&&W_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function GY(e,t){if(typeof t!="function"&&t!==null)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&&dp(e,t)}function Sp(e){return Sp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sp(e)}function KY(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qY(e,t){if(t&&(ks(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $M(e)}function YY(e){var t=KY();return function(){var r=Sp(e),i;if(t){var o=Sp(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return qY(this,i)}}function XY(e){if(Array.isArray(e))return n0(e)}function QY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZY(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ac(e){return XY(e)||QY(e)||rM(e)||ZY()}var JY={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},eX=function(t){return Ke("span",Ie({css:JY},t))},U_=eX,tX={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.isDisabled,o=t.tabSelectsValue,s=t.context;switch(s){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,s=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return s?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,s=o===void 0?"":o,d=t.selectValue,a=t.isDisabled,c=t.isSelected,l=function(p,g){return p&&p.length?"".concat(p.indexOf(g)+1," of ").concat(p.length):""};if(n==="value"&&d)return"value ".concat(s," focused, ").concat(l(d,r),".");if(n==="menu"){var u=a?" disabled":"",h="".concat(c?"selected":"focused").concat(u);return"option ".concat(s," ").concat(h,", ").concat(l(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},nX=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,s=t.isFocused,d=t.selectValue,a=t.selectProps,c=t.id,l=a.ariaLiveMessages,u=a.getOptionLabel,h=a.inputValue,f=a.isMulti,p=a.isOptionDisabled,g=a.isSearchable,b=a.menuIsOpen,x=a.options,S=a.screenReaderStatus,T=a.tabSelectsValue,v=a["aria-label"],w=a["aria-live"],y=z.useMemo(function(){return je(je({},tX),l||{})},[l]),m=z.useMemo(function(){var M="";if(n&&y.onChange){var O=n.option,P=n.options,N=n.removedValue,B=n.removedValues,W=n.value,K=function(ce){return Array.isArray(ce)?null:ce},q=N||O||K(W),re=q?u(q):"",Y=P||B||void 0,Z=Y?Y.map(u):[],te=je({isDisabled:q&&p(q,d),label:re,labels:Z},n);M=y.onChange(te)}return M},[n,y,p,d,u]),E=z.useMemo(function(){var M="",O=r||i,P=!!(r&&d&&d.includes(r));if(O&&y.onFocus){var N={focused:O,label:u(O),isDisabled:p(O,d),isSelected:P,options:o,context:O===r?"menu":"value",selectValue:d};M=y.onFocus(N)}return M},[r,i,u,p,y,o,d]),A=z.useMemo(function(){var M="";if(b&&x.length&&y.onFilter){var O=S({count:o.length});M=y.onFilter({inputValue:h,resultsMessage:O})}return M},[o,h,b,y,x,S]),C=z.useMemo(function(){var M="";if(y.guidance){var O=i?"value":b?"menu":"input";M=y.guidance({"aria-label":v,context:O,isDisabled:r&&p(r,d),isMulti:f,isSearchable:g,tabSelectsValue:T})}return M},[v,r,i,f,p,g,b,y,d,T]),k="".concat(E," ").concat(A," ").concat(C),I=Ke(z.Fragment,null,Ke("span",{id:"aria-selection"},m),Ke("span",{id:"aria-context"},k)),R=(n==null?void 0:n.action)==="initial-input-focus";return Ke(z.Fragment,null,Ke(U_,{id:c},R&&I),Ke(U_,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text"},s&&!R&&I))},rX=nX,a0=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],iX=new RegExp("["+a0.map(function(e){return e.letters}).join("")+"]","g"),LM={};for(var hv=0;hv<a0.length;hv++)for(var pv=a0[hv],gv=0;gv<pv.letters.length;gv++)LM[pv.letters[gv]]=pv.base;var RM=function(t){return t.replace(iX,function(n){return LM[n]})},oX=nM(RM),G_=function(t){return t.replace(/^\s+|\s+$/g,"")},aX=function(t){return"".concat(t.label," ").concat(t.value)},sX=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=je({ignoreCase:!0,ignoreAccents:!0,stringify:aX,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,s=i.ignoreAccents,d=i.stringify,a=i.trim,c=i.matchFrom,l=a?G_(r):r,u=a?G_(d(n)):d(n);return o&&(l=l.toLowerCase(),u=u.toLowerCase()),s&&(l=oX(l),u=RM(u)),c==="start"?u.substr(0,l.length)===l:u.indexOf(l)>-1}},lX=["innerRef"];function uX(e){var t=e.innerRef,n=Mr(e,lX),r=cq(n,"onExited","in","enter","exit","appear");return Ke("input",Ie({ref:t},r,{css:kb({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var cX=function(t){t.preventDefault(),t.stopPropagation()};function dX(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,s=z.useRef(!1),d=z.useRef(!1),a=z.useRef(0),c=z.useRef(null),l=z.useCallback(function(b,x){if(c.current!==null){var S=c.current,T=S.scrollTop,v=S.scrollHeight,w=S.clientHeight,y=c.current,m=x>0,E=v-w-T,A=!1;E>x&&s.current&&(r&&r(b),s.current=!1),m&&d.current&&(o&&o(b),d.current=!1),m&&x>E?(n&&!s.current&&n(b),y.scrollTop=v,A=!0,s.current=!0):!m&&-x>T&&(i&&!d.current&&i(b),y.scrollTop=0,A=!0,d.current=!0),A&&cX(b)}},[n,r,i,o]),u=z.useCallback(function(b){l(b,b.deltaY)},[l]),h=z.useCallback(function(b){a.current=b.changedTouches[0].clientY},[]),f=z.useCallback(function(b){var x=a.current-b.changedTouches[0].clientY;l(b,x)},[l]),p=z.useCallback(function(b){if(b){var x=sq?{passive:!1}:!1;b.addEventListener("wheel",u,x),b.addEventListener("touchstart",h,x),b.addEventListener("touchmove",f,x)}},[f,h,u]),g=z.useCallback(function(b){b&&(b.removeEventListener("wheel",u,!1),b.removeEventListener("touchstart",h,!1),b.removeEventListener("touchmove",f,!1))},[f,h,u]);return z.useEffect(function(){if(t){var b=c.current;return p(b),function(){g(b)}}},[t,p,g]),function(b){c.current=b}}var K_=["boxSizing","height","overflow","paddingRight","position"],q_={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Y_(e){e.preventDefault()}function X_(e){e.stopPropagation()}function Q_(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Z_(){return"ontouchstart"in window||navigator.maxTouchPoints}var J_=!!(typeof window<"u"&&window.document&&window.document.createElement),Wu=0,ul={capture:!1,passive:!1};function fX(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=z.useRef({}),o=z.useRef(null),s=z.useCallback(function(a){if(J_){var c=document.body,l=c&&c.style;if(r&&K_.forEach(function(p){var g=l&&l[p];i.current[p]=g}),r&&Wu<1){var u=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,f=window.innerWidth-h+u||0;Object.keys(q_).forEach(function(p){var g=q_[p];l&&(l[p]=g)}),l&&(l.paddingRight="".concat(f,"px"))}c&&Z_()&&(c.addEventListener("touchmove",Y_,ul),a&&(a.addEventListener("touchstart",Q_,ul),a.addEventListener("touchmove",X_,ul))),Wu+=1}},[r]),d=z.useCallback(function(a){if(J_){var c=document.body,l=c&&c.style;Wu=Math.max(Wu-1,0),r&&Wu<1&&K_.forEach(function(u){var h=i.current[u];l&&(l[u]=h)}),c&&Z_()&&(c.removeEventListener("touchmove",Y_,ul),a&&(a.removeEventListener("touchstart",Q_,ul),a.removeEventListener("touchmove",X_,ul)))}},[r]);return z.useEffect(function(){if(t){var a=o.current;return s(a),function(){d(a)}}},[t,s,d]),function(a){o.current=a}}var hX=function(){return document.activeElement&&document.activeElement.blur()},pX={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function gX(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,s=e.onBottomLeave,d=e.onTopArrive,a=e.onTopLeave,c=dX({isEnabled:i,onBottomArrive:o,onBottomLeave:s,onTopArrive:d,onTopLeave:a}),l=fX({isEnabled:n}),u=function(f){c(f),l(f)};return Ke(z.Fragment,null,n&&Ke("div",{onClick:hX,css:pX}),t(u))}var mX={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},vX=function(t){var n=t.name,r=t.onFocus;return Ke("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:mX,value:"",onChange:function(){}})},yX=vX,bX=function(t){return t.label},PM=function(t){return t.label},IM=function(t){return t.value},wX=function(t){return!!t.isDisabled},SX={clearIndicator:Pq,container:_q,control:zq,dropdownIndicator:Lq,group:Vq,groupHeading:Uq,indicatorsContainer:$q,indicatorSeparator:Oq,input:Yq,loadingIndicator:Nq,loadingMessage:wq,menu:hq,menuList:vq,menuPortal:Sq,multiValue:eY,multiValueLabel:tY,multiValueRemove:nY,noOptionsMessage:bq,option:lY,placeholder:dY,singleValue:pY,valueContainer:kq},xX={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},_X=4,OM=4,CX=38,kX=OM*2,EX={baseUnit:OM,controlHeight:CX,menuGutter:kX},mv={borderRadius:_X,colors:xX,spacing:EX},$X={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:j_(),captureMenuScroll:!j_(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:sX(),formatGroupLabel:bX,getOptionLabel:PM,getOptionValue:IM,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:wX,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!oq(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function eC(e,t,n,r){var i=zM(e,t,n),o=BM(e,t,n),s=NM(e,t),d=xp(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:s,value:d,index:r}}function FM(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(s,d){return eC(e,s,t,d)}).filter(function(s){return tC(e,s)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=eC(e,n,t,r);return tC(e,o)?o:void 0}).filter(lq)}function DM(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Ac(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function TX(e,t){return DM(FM(e,t))}function tC(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,s=t.label,d=t.value;return(!HM(e)||!o)&&jM(e,{label:s,value:d,data:i},r)}function AX(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function MX(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var NM=function(t,n){return t.getOptionLabel(n)},xp=function(t,n){return t.getOptionValue(n)};function zM(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function BM(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=xp(e,t);return n.some(function(i){return xp(e,i)===r})}function jM(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var HM=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},LX=1,Ew=function(e){GY(n,e);var t=YY(n);function n(r){var i;if(WY(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(d){i.controlRef=d},i.focusedOptionRef=null,i.getFocusedOptionRef=function(d){i.focusedOptionRef=d},i.menuListRef=null,i.getMenuListRef=function(d){i.menuListRef=d},i.inputRef=null,i.getInputRef=function(d){i.inputRef=d},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(d,a){var c=i.props,l=c.onChange,u=c.name;a.name=u,i.ariaOnChange(d,a),l(d,a)},i.setValue=function(d,a,c){var l=i.props,u=l.closeMenuOnSelect,h=l.isMulti,f=l.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:f}),u&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(d,{action:a,option:c})},i.selectOption=function(d){var a=i.props,c=a.blurInputOnSelect,l=a.isMulti,u=a.name,h=i.state.selectValue,f=l&&i.isOptionSelected(d,h),p=i.isOptionDisabled(d,h);if(f){var g=i.getOptionValue(d);i.setValue(h.filter(function(b){return i.getOptionValue(b)!==g}),"deselect-option",d)}else if(!p)l?i.setValue([].concat(Ac(h),[d]),"select-option",d):i.setValue(d,"select-option");else{i.ariaOnChange(d,{action:"select-option",option:d,name:u});return}c&&i.blurInput()},i.removeValue=function(d){var a=i.props.isMulti,c=i.state.selectValue,l=i.getOptionValue(d),u=c.filter(function(f){return i.getOptionValue(f)!==l}),h=sc(a,u,u[0]||null);i.onChange(h,{action:"remove-value",removedValue:d}),i.focusInput()},i.clearValue=function(){var d=i.state.selectValue;i.onChange(sc(i.props.isMulti,[],null),{action:"clear",removedValues:d})},i.popValue=function(){var d=i.props.isMulti,a=i.state.selectValue,c=a[a.length-1],l=a.slice(0,a.length-1),u=sc(d,l,l[0]||null);i.onChange(u,{action:"pop-value",removedValue:c})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var d=arguments.length,a=new Array(d),c=0;c<d;c++)a[c]=arguments[c];return eq.apply(void 0,[i.props.classNamePrefix].concat(a))},i.getOptionLabel=function(d){return NM(i.props,d)},i.getOptionValue=function(d){return xp(i.props,d)},i.getStyles=function(d,a){var c=i.props.unstyled,l=SX[d](a,c);l.boxSizing="border-box";var u=i.props.styles[d];return u?u(l,a):l},i.getClassNames=function(d,a){var c,l;return(c=(l=i.props.classNames)[d])===null||c===void 0?void 0:c.call(l,a)},i.getElementId=function(d){return"".concat(i.instancePrefix,"-").concat(d)},i.getComponents=function(){return kM(i.props)},i.buildCategorizedOptions=function(){return FM(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return DM(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(d,a){i.setState({ariaSelection:je({value:d},a)})},i.onMenuMouseDown=function(d){d.button===0&&(d.stopPropagation(),d.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(d){i.blockOptionHover=!1},i.onControlMouseDown=function(d){if(!d.defaultPrevented){var a=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?d.target.tagName!=="INPUT"&&d.target.tagName!=="TEXTAREA"&&i.onMenuClose():a&&i.openMenu("first"):(a&&(i.openAfterFocus=!0),i.focusInput()),d.target.tagName!=="INPUT"&&d.target.tagName!=="TEXTAREA"&&d.preventDefault()}},i.onDropdownIndicatorMouseDown=function(d){if(!(d&&d.type==="mousedown"&&d.button!==0)&&!i.props.isDisabled){var a=i.props,c=a.isMulti,l=a.menuIsOpen;i.focusInput(),l?(i.setState({inputIsHiddenAfterUpdate:!c}),i.onMenuClose()):i.openMenu("first"),d.preventDefault()}},i.onClearIndicatorMouseDown=function(d){d&&d.type==="mousedown"&&d.button!==0||(i.clearValue(),d.preventDefault(),i.openAfterFocus=!1,d.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(d){typeof i.props.closeMenuOnScroll=="boolean"?d.target instanceof HTMLElement&&Ig(d.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(d)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(d){var a=d.touches,c=a&&a.item(0);c&&(i.initialTouchX=c.clientX,i.initialTouchY=c.clientY,i.userIsDragging=!1)},i.onTouchMove=function(d){var a=d.touches,c=a&&a.item(0);if(c){var l=Math.abs(c.clientX-i.initialTouchX),u=Math.abs(c.clientY-i.initialTouchY),h=5;i.userIsDragging=l>h||u>h}},i.onTouchEnd=function(d){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(d.target)&&i.menuListRef&&!i.menuListRef.contains(d.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(d){i.userIsDragging||i.onControlMouseDown(d)},i.onClearIndicatorTouchEnd=function(d){i.userIsDragging||i.onClearIndicatorMouseDown(d)},i.onDropdownIndicatorTouchEnd=function(d){i.userIsDragging||i.onDropdownIndicatorMouseDown(d)},i.handleInputChange=function(d){var a=i.props.inputValue,c=d.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(c,{action:"input-change",prevInputValue:a}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(d){i.props.onFocus&&i.props.onFocus(d),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(d){var a=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(d),i.onInputChange("",{action:"input-blur",prevInputValue:a}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(d){i.blockOptionHover||i.state.focusedOption===d||i.setState({focusedOption:d})},i.shouldHideSelectedOptions=function(){return HM(i.props)},i.onValueInputFocus=function(d){d.preventDefault(),d.stopPropagation(),i.focus()},i.onKeyDown=function(d){var a=i.props,c=a.isMulti,l=a.backspaceRemovesValue,u=a.escapeClearsValue,h=a.inputValue,f=a.isClearable,p=a.isDisabled,g=a.menuIsOpen,b=a.onKeyDown,x=a.tabSelectsValue,S=a.openMenuOnFocus,T=i.state,v=T.focusedOption,w=T.focusedValue,y=T.selectValue;if(!p&&!(typeof b=="function"&&(b(d),d.defaultPrevented))){switch(i.blockOptionHover=!0,d.key){case"ArrowLeft":if(!c||h)return;i.focusValue("previous");break;case"ArrowRight":if(!c||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(w)i.removeValue(w);else{if(!l)return;c?i.popValue():f&&i.clearValue()}break;case"Tab":if(i.isComposing||d.shiftKey||!g||!x||!v||S&&i.isOptionSelected(v,y))return;i.selectOption(v);break;case"Enter":if(d.keyCode===229)break;if(g){if(!v||i.isComposing)return;i.selectOption(v);break}return;case"Escape":g?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):f&&u&&i.clearValue();break;case" ":if(h)return;if(!g){i.openMenu("first");break}if(!v)return;i.selectOption(v);break;case"ArrowUp":g?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":g?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!g)return;i.focusOption("pageup");break;case"PageDown":if(!g)return;i.focusOption("pagedown");break;case"Home":if(!g)return;i.focusOption("first");break;case"End":if(!g)return;i.focusOption("last");break;default:return}d.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++LX),i.state.selectValue=yp(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.buildFocusableOptions(),s=o.indexOf(i.state.selectValue[0]);i.state.focusedOption=o[s]}return i}return UY(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&B_(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isDisabled,d=o.menuIsOpen,a=this.state.isFocused;(a&&!s&&i.isDisabled||a&&d&&!i.menuIsOpen)&&this.focusInput(),a&&s&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!a&&!s&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(B_(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,s=this.state,d=s.selectValue,a=s.isFocused,c=this.buildFocusableOptions(),l=i==="first"?0:c.length-1;if(!this.props.isMulti){var u=c.indexOf(d[0]);u>-1&&(l=u)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[l]},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,s=o.selectValue,d=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var a=s.indexOf(d);d||(a=-1);var c=s.length-1,l=-1;if(s.length){switch(i){case"previous":a===0?l=0:a===-1?l=c:l=a-1;break;case"next":a>-1&&a<c&&(l=a+1);break}this.setState({inputIsHidden:l!==-1,focusedValue:s[l]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,s=this.state.focusedOption,d=this.getFocusableOptions();if(d.length){var a=0,c=d.indexOf(s);s||(c=-1),i==="up"?a=c>0?c-1:d.length-1:i==="down"?a=(c+1)%d.length:i==="pageup"?(a=c-o,a<0&&(a=0)):i==="pagedown"?(a=c+o,a>d.length-1&&(a=d.length-1)):i==="last"&&(a=d.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:d[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(mv):je(je({},mv),this.props.theme):mv}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,s=this.getStyles,d=this.getClassNames,a=this.getValue,c=this.selectOption,l=this.setValue,u=this.props,h=u.isMulti,f=u.isRtl,p=u.options,g=this.hasValue();return{clearValue:i,cx:o,getStyles:s,getClassNames:d,getValue:a,hasValue:g,isMulti:h,isRtl:f,options:p,selectOption:c,selectProps:u,setValue:l,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,s=i.isMulti;return o===void 0?s:o}},{key:"isOptionDisabled",value:function(i,o){return zM(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return BM(this.props,i,o)}},{key:"filterOption",value:function(i,o){return jM(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,d=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:s,selectValue:d})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,s=i.isSearchable,d=i.inputId,a=i.inputValue,c=i.tabIndex,l=i.form,u=i.menuIsOpen,h=i.required,f=this.getComponents(),p=f.Input,g=this.state,b=g.inputIsHidden,x=g.ariaSelection,S=this.commonProps,T=d||this.getElementId("input"),v=je(je(je({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox"},u&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?(x==null?void 0:x.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?z.createElement(p,Ie({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:T,innerRef:this.getInputRef,isDisabled:o,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:l,type:"text",value:a},v)):z.createElement(uX,Ie({id:T,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:vp,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:l,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),s=o.MultiValue,d=o.MultiValueContainer,a=o.MultiValueLabel,c=o.MultiValueRemove,l=o.SingleValue,u=o.Placeholder,h=this.commonProps,f=this.props,p=f.controlShouldRenderValue,g=f.isDisabled,b=f.isMulti,x=f.inputValue,S=f.placeholder,T=this.state,v=T.selectValue,w=T.focusedValue,y=T.isFocused;if(!this.hasValue()||!p)return x?null:z.createElement(u,Ie({},h,{key:"placeholder",isDisabled:g,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),S);if(b)return v.map(function(E,A){var C=E===w,k="".concat(i.getOptionLabel(E),"-").concat(i.getOptionValue(E));return z.createElement(s,Ie({},h,{components:{Container:d,Label:a,Remove:c},isFocused:C,isDisabled:g,key:k,index:A,removeProps:{onClick:function(){return i.removeValue(E)},onTouchEnd:function(){return i.removeValue(E)},onMouseDown:function(R){R.preventDefault()}},data:E}),i.formatOptionLabel(E,"value"))});if(x)return null;var m=v[0];return z.createElement(l,Ie({},h,{data:m,isDisabled:g}),this.formatOptionLabel(m,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,s=this.commonProps,d=this.props,a=d.isDisabled,c=d.isLoading,l=this.state.isFocused;if(!this.isClearable()||!o||a||!this.hasValue()||c)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return z.createElement(o,Ie({},s,{innerProps:u,isFocused:l}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,s=this.commonProps,d=this.props,a=d.isDisabled,c=d.isLoading,l=this.state.isFocused;if(!o||!c)return null;var u={"aria-hidden":"true"};return z.createElement(o,Ie({},s,{innerProps:u,isDisabled:a,isFocused:l}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,s=i.IndicatorSeparator;if(!o||!s)return null;var d=this.commonProps,a=this.props.isDisabled,c=this.state.isFocused;return z.createElement(s,Ie({},d,{isDisabled:a,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var s=this.commonProps,d=this.props.isDisabled,a=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return z.createElement(o,Ie({},s,{innerProps:c,isDisabled:d,isFocused:a}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),s=o.Group,d=o.GroupHeading,a=o.Menu,c=o.MenuList,l=o.MenuPortal,u=o.LoadingMessage,h=o.NoOptionsMessage,f=o.Option,p=this.commonProps,g=this.state.focusedOption,b=this.props,x=b.captureMenuScroll,S=b.inputValue,T=b.isLoading,v=b.loadingMessage,w=b.minMenuHeight,y=b.maxMenuHeight,m=b.menuIsOpen,E=b.menuPlacement,A=b.menuPosition,C=b.menuPortalTarget,k=b.menuShouldBlockScroll,I=b.menuShouldScrollIntoView,R=b.noOptionsMessage,M=b.onMenuScrollToTop,O=b.onMenuScrollToBottom;if(!m)return null;var P=function(Y,Z){var te=Y.type,ie=Y.data,ce=Y.isDisabled,he=Y.isSelected,ve=Y.label,Ce=Y.value,_e=g===ie,Re=ce?void 0:function(){return i.onOptionHover(ie)},ot=ce?void 0:function(){return i.selectOption(ie)},Te="".concat(i.getElementId("option"),"-").concat(Z),it={id:Te,onClick:ot,onMouseMove:Re,onMouseOver:Re,tabIndex:-1};return z.createElement(f,Ie({},p,{innerProps:it,data:ie,isDisabled:ce,isSelected:he,key:Te,label:ve,type:te,value:Ce,isFocused:_e,innerRef:_e?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(Y.data,"menu"))},N;if(this.hasOptions())N=this.getCategorizedOptions().map(function(re){if(re.type==="group"){var Y=re.data,Z=re.options,te=re.index,ie="".concat(i.getElementId("group"),"-").concat(te),ce="".concat(ie,"-heading");return z.createElement(s,Ie({},p,{key:ie,data:Y,options:Z,Heading:d,headingProps:{id:ce,data:re.data},label:i.formatGroupLabel(re.data)}),re.options.map(function(he){return P(he,"".concat(te,"-").concat(he.index))}))}else if(re.type==="option")return P(re,"".concat(re.index))});else if(T){var B=v({inputValue:S});if(B===null)return null;N=z.createElement(u,p,B)}else{var W=R({inputValue:S});if(W===null)return null;N=z.createElement(h,p,W)}var K={minMenuHeight:w,maxMenuHeight:y,menuPlacement:E,menuPosition:A,menuShouldScrollIntoView:I},q=z.createElement(pq,Ie({},p,K),function(re){var Y=re.ref,Z=re.placerProps,te=Z.placement,ie=Z.maxHeight;return z.createElement(a,Ie({},p,K,{innerRef:Y,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:T,placement:te}),z.createElement(gX,{captureEnabled:x,onTopArrive:M,onBottomArrive:O,lockEnabled:k},function(ce){return z.createElement(c,Ie({},p,{innerRef:function(ve){i.getMenuListRef(ve),ce(ve)},isLoading:T,maxHeight:ie,focusedOption:g}),N)}))});return C||A==="fixed"?z.createElement(l,Ie({},p,{appendTo:C,controlElement:this.controlRef,menuPlacement:E,menuPosition:A}),q):q}},{key:"renderFormField",value:function(){var i=this,o=this.props,s=o.delimiter,d=o.isDisabled,a=o.isMulti,c=o.name,l=o.required,u=this.state.selectValue;if(l&&!this.hasValue()&&!d)return z.createElement(yX,{name:c,onFocus:this.onValueInputFocus});if(!(!c||d))if(a)if(s){var h=u.map(function(g){return i.getOptionValue(g)}).join(s);return z.createElement("input",{name:c,type:"hidden",value:h})}else{var f=u.length>0?u.map(function(g,b){return z.createElement("input",{key:"i-".concat(b),name:c,type:"hidden",value:i.getOptionValue(g)})}):z.createElement("input",{name:c,type:"hidden",value:""});return z.createElement("div",null,f)}else{var p=u[0]?this.getOptionValue(u[0]):"";return z.createElement("input",{name:c,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,s=o.ariaSelection,d=o.focusedOption,a=o.focusedValue,c=o.isFocused,l=o.selectValue,u=this.getFocusableOptions();return z.createElement(rX,Ie({},i,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:d,focusedValue:a,isFocused:c,selectValue:l,focusableOptions:u}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,s=i.IndicatorsContainer,d=i.SelectContainer,a=i.ValueContainer,c=this.props,l=c.className,u=c.id,h=c.isDisabled,f=c.menuIsOpen,p=this.state.isFocused,g=this.commonProps=this.getCommonProps();return z.createElement(d,Ie({},g,{className:l,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:p}),this.renderLiveRegion(),z.createElement(o,Ie({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:p,menuIsOpen:f}),z.createElement(a,Ie({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),z.createElement(s,Ie({},g,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,d=o.clearFocusValueOnUpdate,a=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,l=o.isFocused,u=o.prevWasFocused,h=i.options,f=i.value,p=i.menuIsOpen,g=i.inputValue,b=i.isMulti,x=yp(f),S={};if(s&&(f!==s.value||h!==s.options||p!==s.menuIsOpen||g!==s.inputValue)){var T=p?TX(i,x):[],v=d?AX(o,x):null,w=MX(o,T);S={selectValue:x,focusedOption:w,focusedValue:v,clearFocusValueOnUpdate:!1}}var y=a!=null&&i!==s?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},m=c,E=l&&u;return l&&!E&&(m={value:sc(b,x,x[0]||null),options:x,action:"initial-input-focus"},E=!u),(c==null?void 0:c.action)==="initial-input-focus"&&(m=null),je(je(je({},S),y),{},{prevProps:i,ariaSelection:m,prevWasFocused:E})}}]),n}(z.Component);Ew.defaultProps=$X;var RX=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function VM(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,s=o===void 0?null:o,d=e.inputValue,a=e.menuIsOpen,c=e.onChange,l=e.onInputChange,u=e.onMenuClose,h=e.onMenuOpen,f=e.value,p=Mr(e,RX),g=z.useState(d!==void 0?d:n),b=Qr(g,2),x=b[0],S=b[1],T=z.useState(a!==void 0?a:i),v=Qr(T,2),w=v[0],y=v[1],m=z.useState(f!==void 0?f:s),E=Qr(m,2),A=E[0],C=E[1],k=z.useCallback(function(B,W){typeof c=="function"&&c(B,W),C(B)},[c]),I=z.useCallback(function(B,W){var K;typeof l=="function"&&(K=l(B,W)),S(K!==void 0?K:B)},[l]),R=z.useCallback(function(){typeof h=="function"&&h(),y(!0)},[h]),M=z.useCallback(function(){typeof u=="function"&&u(),y(!1)},[u]),O=d!==void 0?d:x,P=a!==void 0?a:w,N=f!==void 0?f:A;return je(je({},p),{},{inputValue:O,menuIsOpen:P,onChange:k,onInputChange:I,onMenuClose:M,onMenuOpen:R,value:N})}var PX=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],nC=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),o=String(r.getOptionValue(n)).toLowerCase(),s=String(r.getOptionLabel(n)).toLowerCase();return o===i||s===i},vv={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return nC(t,o,i)})||r.some(function(o){return nC(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function IX(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,s=o===void 0?vv.formatCreateLabel:o,d=e.isValidNewOption,a=d===void 0?vv.isValidNewOption:d,c=e.getNewOptionData,l=c===void 0?vv.getNewOptionData:c,u=e.onCreateOption,h=e.options,f=h===void 0?[]:h,p=e.onChange,g=Mr(e,PX),b=g.getOptionValue,x=b===void 0?IM:b,S=g.getOptionLabel,T=S===void 0?PM:S,v=g.inputValue,w=g.isLoading,y=g.isMulti,m=g.value,E=g.name,A=z.useMemo(function(){return a(v,yp(m),f,{getOptionValue:x,getOptionLabel:T})?l(v,s(v)):void 0},[s,l,T,x,v,a,f,m]),C=z.useMemo(function(){return(n||!w)&&A?i==="first"?[A].concat(Ac(f)):[].concat(Ac(f),[A]):f},[n,i,w,A,f]),k=z.useCallback(function(I,R){if(R.action!=="select-option")return p(I,R);var M=Array.isArray(I)?I:[I];if(M[M.length-1]===A){if(u)u(v);else{var O=l(v,v),P={action:"create-option",name:E,option:O};p(sc(y,[].concat(Ac(yp(m)),[O]),O),P)}return}p(I,R)},[l,v,y,E,A,u,p,m]);return je(je({},g),{},{options:C,onChange:k})}var OX=z.forwardRef(function(e,t){var n=VM(e),r=IX(n);return z.createElement(Ew,Ie({ref:t},r))}),FX=OX,DX=z.forwardRef(function(e,t){var n=VM(e);return z.createElement(Ew,Ie({ref:t},n))}),NX=DX;const zX=VY(),WM={container:e=>({...e,width:"100%"}),control:e=>({...e,borderRadius:0,border:"1px solid var(--border-color-primary)",background:"var(--input-background-fill)",width:"100%"}),option:e=>({...e,borderRadius:0,color:"var(--body-text-color)",background:"var(--background-fill-primary)","&:hover":{background:"var(--ae-primary-color)"}}),menu:e=>({...e,borderRadius:0,background:"var(--background-fill-primary)",border:"1px solid var(--ae-input-border-color) !important"}),multiValue:e=>({...e,borderRadius:0,background:"var(--background-fill-primary)",color:"var(--nevysha-font-color)"}),multiValueLabel:e=>({...e,color:"var(--nevysha-font-color)"}),multiValueRemove:e=>({...e,":hover":{color:"white"}}),indicatorContainer:e=>({...e,color:"var(--nevysha-font-color)",padding:0})};function BX({imageHash:e,isFull:t}){const{getImage:n,tags:r,setTags:i}=z.useContext(qi),[o,s]=z.useState(n(e)),[d,a]=z.useState([]),[c,l]=z.useState(!1),u=o&&o.metadata&&o.metadata.exif&&o.metadata.exif["cozy-nest-tags"];z.useEffect(()=>{if(o)if(o.metadata.exif["cozy-nest-tags"]){const g=o.metadata.exif["cozy-nest-tags"].split(",");a([...g])}else a([])},[e,u]),z.useEffect(()=>{s(n(e))},[e]);const h=g=>{l(!0),i([...r,g]);const b=[...new Set([...d,g])];a([...b]),setTimeout(()=>{l(!1),p([...b]).then(x=>x)},1e3)},f=g=>{const b=[...new Set(g.map(x=>x.value))];a(b),p(b).then(x=>x)},p=async g=>{const b=o.metadata.exif;b["cozy-nest-tags"]=g.join(","),Lt.debug("Saving tags",b["cozy-nest-tags"]),await pb(o.path,b)};return j.jsx(j.Fragment,{children:j.jsx(FX,{placeholder:"Tags...",styles:WM,isMulti:!0,options:r.map(g=>({value:g,label:g})),onCreateOption:h,isDisabled:c,isLoading:c,value:d.map(g=>({value:g,label:g})),onChange:g=>f(g)})})}function jX({setActiveTags:e}){const{tags:t}=z.useContext(qi);return j.jsx(NX,{options:t.map(n=>({value:n,label:n})),components:zX,isMulti:!0,placeholder:"Tags...",styles:WM,onChange:n=>e(n.map(r=>r.value))})}const Zo=e=>{try{return e()}catch{return"Error parsing metadata"}};function rC({verbose:e,imageHash:t,closeModal:n}){const{images:r,updateExifInState:i,getImage:o}=z.useContext(qi),[s,d]=z.useState(o(t)),[a,c]=z.useState({date:0,model:"",size:"",seed:"",steps:"",sampler:"",modelHash:"",formattedAll:""}),l=e;z.useEffect(()=>{d(o(t))},[r,t]),z.useEffect(()=>{s&&s.metadata&&s.metadata.exif&&s.metadata.exif.parameters&&c({date:Zo(()=>new Date(s.metadata.date*1e3).toISOString().replace(/T/," ").replace(/\..+/,"")),model:Zo(()=>s.metadata.exif.parameters.split("Model: ")[1].split(",")[0]),size:Zo(()=>s.metadata.exif.parameters.split("Size: ")[1].split(",")[0]),seed:Zo(()=>s.metadata.exif.parameters.split("Seed: ")[1].split(",")[0]),steps:Zo(()=>s.metadata.exif.parameters.split("Steps: ")[1].split(",")[0]),sampler:Zo(()=>s.metadata.exif.parameters.split("Sampler: ")[1].split(",")[0]),modelHash:Zo(()=>s.metadata.exif.parameters.split("Model hash: ")[1].split(",")[0]),formattedAll:Zo(()=>s.metadata.exif.parameters.replace(/\n/g,"<br>"))})},[s]);const u=async()=>{n()};return s?j.jsxs("div",{className:"image-info",children:[l&&j.jsx(j.Fragment,{children:j.jsx("button",{className:"nevysha lg primary gradio-button btn",onClick:u,children:"Close"})}),j.jsx(BX,{imageHash:t,isFull:l}),j.jsx("table",{children:j.jsxs("tbody",{children:[j.jsxs("tr",{children:[j.jsx("td",{children:"Date: "}),j.jsx("td",{children:a==null?void 0:a.date})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"Model: "}),j.jsx("td",{children:a==null?void 0:a.model})]}),l&&j.jsxs("tr",{children:[j.jsx("td",{children:"Model Hash:"}),j.jsx("td",{children:a==null?void 0:a.modelHash})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"Size: "}),j.jsx("td",{children:a==null?void 0:a.size})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"Seed: "}),j.jsx("td",{children:a==null?void 0:a.seed})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"Steps: "}),j.jsx("td",{children:a==null?void 0:a.steps})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"Sampler: "}),j.jsx("td",{children:a==null?void 0:a.sampler})]})]})}),l&&j.jsx("div",{className:"blocInfo",dangerouslySetInnerHTML:{__html:a==null?void 0:a.formattedAll}}),j.jsx(FK,{imageHash:t})]}):j.jsx("div",{className:"image-info",children:"No image selected"})}window.location.href.split(":")[0]+""+window.location.href.split(":")[1];function HX({viewPort:e,imageHash:t,index:n}){const[r,i]=z.useState(!1),o=z.useRef(null),s=z.useRef(null),{getImage:d}=z.useContext(qi),[a,c]=z.useState(!1),[l,u]=z.useState(d(t));z.useEffect(()=>{u(d(t))},[t]),z.useEffect(()=>{const g=s.current.offsetTop,b=g>=e.top&&g<=e.bottom+s.current.offsetHeight||g+s.current.offsetHeight>=e.top&&g+s.current.offsetHeight<=e.bottom;c(!!b)},[e]);function h(){i(!r)}function f(){r||i(!0)}function p(){return`/cozy-nest/image?path=${encodeURIComponent(l.path)}`}return j.jsx("div",{id:`img_${n}`,className:"image",ref:s,children:a?j.jsxs(j.Fragment,{children:[j.jsx("div",{className:"image-wrapper",onClick:f,children:j.jsx("img",{className:"cozy-nest-thumbnail",src:p(),alt:"image",ref:o})}),j.jsx(rC,{verbose:!1,imageHash:t}),r&&j.jsxs("div",{className:"infoModal",children:[j.jsx("div",{className:"image-wrapper",children:j.jsx("img",{className:"cozy-nest-thumbnail",src:p(),alt:"image"})}),j.jsx(rC,{verbose:!0,imageHash:t,closeModal:h})]})]}):j.jsx("div",{className:"image image-placeholder"})})}const _f=300;function UM(e){const{images:t,filteredImages:n}=z.useContext(qi),r=z.useRef(null),[i,o]=z.useState(0),[s,d]=z.useState([]),[a,c]=z.useState({top:0,bottom:window.innerHeight+_f});z.useEffect(()=>{d([...n.slice(0,Math.min(i*20+20,n.length))])},[n,t]),n.length>0&&s.length===0&&d(n.slice(0,Math.min(20,n.length)));const l=()=>{u();let h=Math.floor(s.length/20);h!==i&&o(h);const f={top:r.current.scrollTop-_f>0?r.current.scrollTop-_f:0,bottom:r.current.scrollTop+r.current.clientHeight+_f};c(f)},u=()=>{document.getElementById("loadMoreThreshold").getBoundingClientRect().top<window.innerHeight&&d(n.slice(0,i*20+20))};return j.jsxs("div",{className:"browser nevysha nevysha-scrollable",onScroll:()=>l(),ref:r,children:[s.map((h,f)=>j.jsx(HX,{imageHash:h.hash,index:f,viewPort:a},h.hash)),j.jsx("div",{id:"loadMoreThreshold",className:"hackyOffPageElement"})]})}function VX(){return j.jsxs(j.Fragment,{children:[j.jsxs(hi,{children:[j.jsxs("h1",{className:"cnib-title",children:["Cozy Nest Image Browser ",j.jsx("span",{className:"beta-emphasis",children:"beta"})]}),j.jsxs(En,{children:[j.jsxs("span",{children:["The WebSocket is currently ",j.jsx("span",{className:"connexionStatus",style:{color:"red"},children:"Closed"})]}),j.jsx("button",{className:"nevysha lg primary gradio-button btn",style:{marginLeft:"20px",width:"410px"},disabled:!0,children:"Image browser is disabled. To enable it, go to the CozyNest settings."})]}),j.jsx("textarea",{"data-testid":"textbox",placeholder:"Search anything : Prompt, Size, Model, ...",rows:"1",spellCheck:"false","data-gramm":"false",disabled:!0})]}),j.jsx(UM,{imagesRef:[]},0)]})}var GM={},Og={};Object.defineProperty(Og,"__esModule",{value:!0});Og.calculateRgba=void 0;var _p;(function(e){e.maroon="#800000",e.red="#FF0000",e.orange="#FFA500",e.yellow="#FFFF00",e.olive="#808000",e.green="#008000",e.purple="#800080",e.fuchsia="#FF00FF",e.lime="#00FF00",e.teal="#008080",e.aqua="#00FFFF",e.blue="#0000FF",e.navy="#000080",e.black="#000000",e.gray="#808080",e.silver="#C0C0C0",e.white="#FFFFFF"})(_p||(_p={}));var WX=function(e,t){if(Object.keys(_p).includes(e)&&(e=_p[e]),e[0]==="#"&&(e=e.slice(1)),e.length===3){var n="";e.split("").forEach(function(i){n+=i,n+=i}),e=n}var r=(e.match(/.{2}/g)||[]).map(function(i){return parseInt(i,16)}).join(", ");return"rgba(".concat(r,", ").concat(t,")")};Og.calculateRgba=WX;var gu={};Object.defineProperty(gu,"__esModule",{value:!0});gu.cssValue=gu.parseLengthAndUnit=void 0;var UX={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function KM(e){if(typeof e=="number")return{value:e,unit:"px"};var t,n=(e.match(/^[0-9.]*/)||"").toString();n.includes(".")?t=parseFloat(n):t=parseInt(n,10);var r=(e.match(/[^0-9]*$/)||"").toString();return UX[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}gu.parseLengthAndUnit=KM;function GX(e){var t=KM(e);return"".concat(t.value).concat(t.unit)}gu.cssValue=GX;var Fg={};Object.defineProperty(Fg,"__esModule",{value:!0});Fg.createAnimation=void 0;var KX=function(e,t,n){var r="react-spinners-".concat(e,"-").concat(n);if(typeof window>"u"||!window.document)return r;var i=document.createElement("style");document.head.appendChild(i);var o=i.sheet,s=`
|
||
@keyframes `.concat(r,` {
|
||
`).concat(t,`
|
||
}
|
||
`);return o&&o.insertRule(s,0),r};Fg.createAnimation=KX;var Cp=Be&&Be.__assign||function(){return Cp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Cp.apply(this,arguments)},qX=Be&&Be.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),YX=Be&&Be.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),XX=Be&&Be.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&qX(t,e,n);return YX(t,e),t},QX=Be&&Be.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(GM,"__esModule",{value:!0});var yv=XX(z),ZX=Og,Uu=gu,iC=Fg;function JX(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,s=o===void 0?1:o,d=e.cssOverride,a=d===void 0?{}:d,c=e.size,l=c===void 0?50:c,u=QX(e,["loading","color","speedMultiplier","cssOverride","size"]),h=(0,Uu.parseLengthAndUnit)(l),f=h.value,p=h.unit,g=Cp({display:"inherit",position:"relative",width:(0,Uu.cssValue)(l),height:(0,Uu.cssValue)(l),transform:"rotate(165deg)"},a),b=f/5,x=(f-b)/2,S=x-b,T=(0,ZX.calculateRgba)(i,.75),v=(0,iC.createAnimation)("HashLoader","0% {width: ".concat(b,"px; box-shadow: ").concat(x,"px ").concat(-S,"px ").concat(T,", ").concat(-x,"px ").concat(S,"px ").concat(T,`}
|
||
35% {width: `).concat((0,Uu.cssValue)(l),"; box-shadow: 0 ").concat(-S,"px ").concat(T,", 0 ").concat(S,"px ").concat(T,`}
|
||
70% {width: `).concat(b,"px; box-shadow: ").concat(-x,"px ").concat(-S,"px ").concat(T,", ").concat(x,"px ").concat(S,"px ").concat(T,`}
|
||
100% {box-shadow: `).concat(x,"px ").concat(-S,"px ").concat(T,", ").concat(-x,"px ").concat(S,"px ").concat(T,"}"),"before"),w=(0,iC.createAnimation)("HashLoader","0% {height: ".concat(b,"px; box-shadow: ").concat(S,"px ").concat(x,"px ").concat(i,", ").concat(-S,"px ").concat(-x,"px ").concat(i,`}
|
||
35% {height: `).concat((0,Uu.cssValue)(l),"; box-shadow: ").concat(S,"px 0 ").concat(i,", ").concat(-S,"px 0 ").concat(i,`}
|
||
70% {height: `).concat(b,"px; box-shadow: ").concat(S,"px ").concat(-x,"px ").concat(i,", ").concat(-S,"px ").concat(x,"px ").concat(i,`}
|
||
100% {box-shadow: `).concat(S,"px ").concat(x,"px ").concat(i,", ").concat(-S,"px ").concat(-x,"px ").concat(i,"}"),"after"),y=function(m){return{position:"absolute",top:"50%",left:"50%",display:"block",width:"".concat(f/5).concat(p),height:"".concat(f/5).concat(p),borderRadius:"".concat(f/10).concat(p),transform:"translate(-50%, -50%)",animationFillMode:"none",animation:"".concat(m===1?v:w," ").concat(2/s,"s infinite")}};return n?yv.createElement("span",Cp({style:g},u),yv.createElement("span",{style:y(1)}),yv.createElement("span",{style:y(2)})):null}var eQ=GM.default=JX;function wr(e){return j.jsx("button",{...e,className:"nevysha lg primary gradio-button btn cnib-button",children:e.children})}function qM(e){const n=JSON.parse(localStorage.getItem("COZY_NEST_CONFIG")).accent_color||"#36d7b7",r=e.label||"";return j.jsxs("div",{className:"cozy-nest-loading",children:[j.jsx("div",{children:r}),j.jsx(eQ,{color:n})]})}function tQ(){const e=JSON.parse(localStorage.getItem("COZY_NEST_CONFIG")),t=e.disable_image_browser,n=(()=>{try{return e.server_default_port}catch{return Lt.debug("cnib_socket_server_port not found in main gradio app"),3333}})();if(t)return j.jsx(j.Fragment,{children:j.jsx(VX,{})});const{images:r,setImages:i,setFilteredImages:o,setTags:s}=z.useContext(qi),[d,a]=z.useState(`ws://localhost:${n}`),[,c]=z.useState([]),[l,u]=z.useState([]),[h,f]=z.useState(""),[p,g]=z.useState(!1),[b,x]=z.useState("radio-hide-hidden"),[S,T]=z.useState(!0),[v,w]=z.useState(!1),{sendMessage:y,lastMessage:m,readyState:E,getWebSocket:A}=hI(d,{shouldReconnect:()=>t,reconnectAttempts:10,reconnectInterval:3e3});window.ws=A();const C=z.useCallback(()=>y(JSON.stringify({what:"images"})),[y]),k=()=>{E!==Hr.ReadyState.OPEN&&a(d+"?t="+Date.now())};function I(){return r.filter(N=>b==="radio-hide-hidden"?N.metadata.exif["cozy-nest-hidden"]!=="True":b==="radio-only-hidden"?!(!N.metadata.exif["cozy-nest-hidden"]||N.metadata.exif["cozy-nest-hidden"]!=="True"):!0).filter(N=>l.length===0?!0:N.metadata.exif["cozy-nest-tags"]?N.metadata.exif["cozy-nest-tags"].split(",").filter(K=>l.includes(K)).length>0:!1)}z.useEffect(()=>{if(m!==null){const N=JSON.parse(m.data);N.error&&window.errorPipe&&window.errorPipe(N),N.what==="images"&&(N.images.length===0&&(Lt.debug("Received empty images array from socket"),g(!0)),i(N.images),T(!1)),N.what==="dispatch_on_image_saved"&&i(B=>[N.data,...B]),N.what==="dispatch_on_index_built"&&(i([...N.data]),T(!1)),c(B=>B.concat(m))}},[m,c]);function R(){r.length>0&&r.find(B=>B.path.indexOf("jpeg")!==-1||B.path.indexOf("jpg")!==-1)&&(Lt.debug("Found jpeg in images array"),w(!0))}z.useEffect(()=>{r.length===0&&E===Hr.ReadyState.OPEN&&!p?C():o(I()),R()},[r,E]),z.useEffect(()=>{if(h!==""){const N=I().filter(B=>JSON.stringify(B.metadata.exif).includes(h));o(N)}else o(I())},[h,b,l,r]),z.useEffect(()=>{const N=[];r.forEach(B=>{if(B.metadata.exif["cozy-nest-tags"]){const W=B.metadata.exif["cozy-nest-tags"].split(",");N.push(...W)}}),s([...N])},[r,b]);const M={[Hr.ReadyState.CONNECTING]:"Connecting",[Hr.ReadyState.OPEN]:"Connected",[Hr.ReadyState.CLOSING]:"Closing",[Hr.ReadyState.CLOSED]:"Closed",[Hr.ReadyState.UNINSTANTIATED]:"Uninstantiated"}[E],O={color:E===Hr.ReadyState.OPEN?"green":E===Hr.ReadyState.CONNECTING?"orange":"red"},P=async()=>{(await fetch("/cozy-nest/index",{method:"DELETE"})).ok&&(i([]),T(!0))};return j.jsxs(j.Fragment,{children:[j.jsxs(hi,{children:[j.jsxs(En,{children:[j.jsxs(En,{children:[j.jsx("h1",{className:"cnib-title",children:j.jsx("span",{className:"beta-emphasis",children:"beta"})}),j.jsx("button",{className:"nevysha lg primary gradio-button btn",style:{width:"100px"},onClick:P,children:"Rebuild Index"}),v&&j.jsx("span",{style:{marginLeft:"20px",color:"orange"},children:"Warning: jpeg found in output folder. Jpeg images are not supported"})]}),j.jsxs(En,{style:{width:"auto"},className:"cozy-websocket-status",children:[j.jsxs("span",{children:["WebSocket status ",j.jsx("span",{className:"connexionStatus",style:O,children:M})]}),E!==Hr.ReadyState.OPEN&&j.jsx("button",{className:"nevysha lg primary gradio-button btn",style:{marginLeft:"20px",width:"100px"},onClick:k,children:"Connect"})]})]}),j.jsx(En,{children:j.jsxs(En,{style:{gap:"10px",marginRight:"2px",width:"fit-content"},onChange:N=>x(N.target.id),children:[j.jsxs(En,{style:{width:"auto",alignItems:"center"},children:[j.jsx("input",{type:"radio",id:"radio-hide-hidden",name:"radio-filter",value:"all",defaultChecked:!0}),j.jsx("label",{className:"cozy-radio-label",htmlFor:"radio-hide-hidden",children:"Hide hidden"})]}),j.jsxs(En,{style:{width:"auto",alignItems:"center"},children:[j.jsx("input",{type:"radio",id:"radio-all",name:"radio-filter",value:"all"}),j.jsx("label",{className:"cozy-radio-label",htmlFor:"radio-all",children:"All"})]}),j.jsxs(En,{style:{width:"auto",alignItems:"center"},children:[j.jsx("input",{type:"radio",id:"radio-only-hidden",name:"radio-filter",value:"hidden"}),j.jsx("label",{className:"cozy-radio-label",htmlFor:"radio-only-hidden",children:"Only hidden"})]})]})}),j.jsxs(En,{children:[j.jsx("textarea",{"data-testid":"textbox",placeholder:"Search anything : Tags, Prompt, Size, Model, ...",rows:"1",spellCheck:"false","data-gramm":"false",onChange:N=>f(N.target.value)}),j.jsx(jX,{setActiveTags:u})]})]}),!S&&j.jsx(UM,{}),S&&j.jsx(qM,{label:"building Index..."})]})}let{definePartsStyle:nQ,defineMultiStyleConfig:rQ}=Ct(j2.keys);const iQ=rQ({defaultProps:{variant:"nevysha"},variants:{nevysha:nQ({field:{outline:"none!important",boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",borderRadius:"0 !important",backgroundColor:"var(--input-background-fill) !important",padding:"var(--input-padding) !important",width:"100%",color:"var(--body-text-color)",fontSize:"var(--input-text-size)",lineHeight:"var(--line-sm)",fontFamily:"monospace !important"}})}}),{definePartsStyle:oQ,defineMultiStyleConfig:aQ}=Ct(V2.keys),sQ=aQ({defaultProps:{variant:"nevysha"},variants:{nevysha:oQ({field:{outline:"none!important",boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",borderRadius:"0 !important",backgroundColor:"var(--input-background-fill) !important",padding:"var(--input-padding) !important",width:"100%",color:"var(--body-text-color)",fontSize:"var(--input-text-size) !important",lineHeight:"var(--line-sm)",fontFamily:"monospace !important"},stepperGroup:{border:"1px solid var(--ae-input-border-color) !important",borderTop:"none !important",borderRight:"none !important"},stepper:{color:"var(--body-text-color)",borderTop:"none !important",borderLeft:"none !important"}})}}),{definePartsStyle:oC,defineMultiStyleConfig:lQ}=Ct(U2.keys),uQ=lQ({defaultProps:{variant:"nevysha"},variants:{nevysha:oC({tab:{marginBottom:"-1px",border:"1px solid transparent",borderColor:"transparent",borderBottom:"none",borderRadius:"0 !important",padding:"var(--size-1) var(--size-4) !important",color:"var(--body-text-color-subdued) !important",fontWeight:"var(--section-header-text-weight) !important",fontSize:"var(--section-header-text-size) !important",borderTop:"2px solid transparent !important",_selected:{borderTop:"2px solid var(--ae-primary-color) !important",backgroundColor:"var(--tab-nav-background-color-selected) !important",color:"var(--body-text-color) !important"},_focus:{outline:"none"},_hover:{outline:"none",borderRight:"1px solid transparent",borderLeft:"1px solid transparent"}},tabpanel:{border:"1px solid var(--border-color-primary)",borderTop:"none",borderBottomRightRadius:"var(--container-radius)",borderBottomLeftRadius:"var(--container-radius)",padding:"var(--block-padding)",backgroundColor:"var(--tab-nav-background-color-selected) !important",gap:"20px",display:"flex",flexDirection:"column",height:"500px",overflowY:"auto"}}),nevyshaExtraNetwork:oC({root:{height:"100% !important",display:"flex",flexDirection:"column"},tabpanels:{height:"100% !important"},tab:{marginBottom:"-1px",border:"1px solid transparent",borderColor:"transparent",borderBottom:"none",borderRadius:"0 !important",padding:"var(--size-1) var(--size-4) !important",color:"var(--body-text-color-subdued) !important",fontWeight:"var(--section-header-text-weight) !important",fontSize:"var(--section-header-text-size) !important",borderTop:"2px solid transparent !important",_selected:{borderTop:"2px solid var(--ae-primary-color) !important",backgroundColor:"var(--tab-nav-background-color-selected) !important",color:"var(--body-text-color) !important"},_focus:{outline:"none"},_hover:{outline:"none",borderRight:"1px solid transparent",borderLeft:"1px solid transparent"}},tabpanel:{border:"1px solid var(--border-color-primary)",borderTop:"none",borderBottomRightRadius:"var(--container-radius)",borderBottomLeftRadius:"var(--container-radius)",padding:"var(--block-padding)",backgroundColor:"var(--tab-nav-background-color-selected) !important",gap:"20px",display:"flex",flexDirection:"column",height:"100%",overflowY:"auto"}})}}),{definePartsStyle:cQ,defineMultiStyleConfig:dQ}=Ct(B2.keys),fQ=dQ({defaultProps:{variant:"nevysha"},variants:{nevysha:cQ({control:{boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",borderRadius:"var(--checkbox-border-radius)",backgroundColor:"var(--checkbox-background-color)",lineHeight:"var(--line-sm)"}})}}),{definePartsStyle:hQ,defineMultiStyleConfig:pQ}=Ct(W2.keys),gQ=pQ({defaultProps:{variant:"nevysha"},variants:{nevysha:hQ({control:{boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",backgroundColor:"var(--checkbox-background-color)",lineHeight:"var(--line-sm)"}})}});let{definePartsStyle:aC,defineMultiStyleConfig:mQ}=Ct(H2.keys);const vQ=mQ({defaultProps:{variant:"nevysha"},variants:{nevysha:aC({dialog:{opacity:1,width:"800px",marginRight:"auto",marginLeft:"auto",transform:"none",maxWidth:"fit-content",background:"none"}}),"nevysha-confirm":aC({dialog:{opacity:1,width:"800px",marginRight:"auto",marginLeft:"auto",transform:"none",maxWidth:"fit-content",border:"1px solid var(--ae-input-border-color)",backgroundColor:"var(--block-background-fill)",color:"var(--body-text-color)",borderRadius:"0 !important",fontSize:"var(--body-text-size)"},footer:{display:"flex !important",gap:"5px"}})}}),$w=OB({fontSizes:{md:"var(--body-text-size)"},components:{Input:iQ,Tabs:uQ,Checkbox:fQ,NumberInput:sQ,Radio:gQ,Modal:vQ}});function YM(){if(!document.getElementById("cozy-img-browser-react")){setTimeout(()=>YM(),200);return}Jl.createRoot(document.getElementById("cozy-img-browser-react")).render(j.jsx(st.StrictMode,{children:j.jsx(ow,{theme:$w,children:j.jsx(NO,{children:j.jsx(tQ,{})})})}))}function yQ(e){const t=()=>{window.gatherInfoAndShowDialog(),e.onClickClose()};return j.jsxs("div",{className:"nevysha header",children:[j.jsxs("div",{className:"nevysha title",children:[j.jsx("h2",{children:"Nevysha's Cozy Nest"}),j.jsx("span",{className:"subtitle",children:"Find your cozy spot on Auto1111's webui"})]}),j.jsx(En,{children:j.jsx("div",{className:"btn-settings",onClick:e.onClickClose,children:"Close"})}),j.jsx("div",{className:"container",children:j.jsxs("div",{className:"nevysha settings-nevyui-top",children:[j.jsxs("p",{className:"nevysha-reporting",children:["Found a bug or want to ask for a feature ? Please ",j.jsx("a",{onClick:t,target:"_blank",children:"click here to gather relevant info"})," then use ",j.jsx("a",{href:"https://www.reddit.com/r/NevyshaCozyNest/",target:"_blank",children:"this subreddit"})," or ",j.jsx("a",{href:"https://github.com/Nevysha/Cozy-Nest",target:"_blank",children:"github"}),". You can also join this ",j.jsx("a",{href:"https://discord.gg/yppzDXjT7S",target:"_blank",children:"discord server"})," to discuss about Cozy Nest"]}),j.jsx("p",{className:"nevysha-emphasis",children:'WARNING : Some visual settings are immediately applied but will not be saved until you click "Save"'})]})})]})}function Dg(){return(Dg=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 XM(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function s0(e){var t=z.useRef(e),n=z.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var dd=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},Mc=function(e){return"touches"in e},l0=function(e){return e&&e.ownerDocument.defaultView||self},sC=function(e,t,n){var r=e.getBoundingClientRect(),i=Mc(t)?function(o,s){for(var d=0;d<o.length;d++)if(o[d].identifier===s)return o[d];return o[0]}(t.touches,n):t;return{left:dd((i.pageX-(r.left+l0(e).pageXOffset))/r.width),top:dd((i.pageY-(r.top+l0(e).pageYOffset))/r.height)}},lC=function(e){!Mc(e)&&e.preventDefault()},QM=st.memo(function(e){var t=e.onMove,n=e.onKey,r=XM(e,["onMove","onKey"]),i=z.useRef(null),o=s0(t),s=s0(n),d=z.useRef(null),a=z.useRef(!1),c=z.useMemo(function(){var f=function(b){lC(b),(Mc(b)?b.touches.length>0:b.buttons>0)&&i.current?o(sC(i.current,b,d.current)):g(!1)},p=function(){return g(!1)};function g(b){var x=a.current,S=l0(i.current),T=b?S.addEventListener:S.removeEventListener;T(x?"touchmove":"mousemove",f),T(x?"touchend":"mouseup",p)}return[function(b){var x=b.nativeEvent,S=i.current;if(S&&(lC(x),!function(v,w){return w&&!Mc(v)}(x,a.current)&&S)){if(Mc(x)){a.current=!0;var T=x.changedTouches||[];T.length&&(d.current=T[0].identifier)}S.focus(),o(sC(S,x,d.current)),g(!0)}},function(b){var x=b.which||b.keyCode;x<37||x>40||(b.preventDefault(),s({left:x===39?.05:x===37?-.05:0,top:x===40?.05:x===38?-.05:0}))},g]},[s,o]),l=c[0],u=c[1],h=c[2];return z.useEffect(function(){return h},[h]),st.createElement("div",Dg({},r,{onTouchStart:l,onMouseDown:l,className:"react-colorful__interactive",ref:i,onKeyDown:u,tabIndex:0,role:"slider"}))}),Tw=function(e){return e.filter(Boolean).join(" ")},ZM=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=Tw(["react-colorful__pointer",e.className]);return st.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},st.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Tn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},bQ=function(e){return CQ(u0(e))},u0=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Tn(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Tn(parseInt(e.substring(6,8),16)/255,2):1}},wQ=function(e){return _Q(xQ(e))},SQ=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Tn(e.h),s:Tn(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Tn(i/2),a:Tn(r,2)}},c0=function(e){var t=SQ(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},xQ=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),d=r*(1-(t-o)*n),a=r*(1-(1-t+o)*n),c=o%6;return{r:Tn(255*[r,d,s,s,a,r][c]),g:Tn(255*[a,r,r,d,s,s][c]),b:Tn(255*[s,s,a,r,r,d][c]),a:Tn(i,2)}},Cf=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},_Q=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?Cf(Tn(255*i)):"";return"#"+Cf(t)+Cf(n)+Cf(r)+o},CQ=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),d=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:Tn(60*(d<0?d+6:d)),s:Tn(o?s/o*100:0),v:Tn(o/255*100),a:i}},kQ=st.memo(function(e){var t=e.hue,n=e.onChange,r=Tw(["react-colorful__hue",e.className]);return st.createElement("div",{className:r},st.createElement(QM,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:dd(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Tn(t),"aria-valuemax":"360","aria-valuemin":"0"},st.createElement(ZM,{className:"react-colorful__hue-pointer",left:t/360,color:c0({h:t,s:100,v:100,a:1})})))}),EQ=st.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:c0({h:t.h,s:100,v:100,a:1})};return st.createElement("div",{className:"react-colorful__saturation",style:r},st.createElement(QM,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:dd(t.s+100*i.left,0,100),v:dd(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Tn(t.s)+"%, Brightness "+Tn(t.v)+"%"},st.createElement(ZM,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:c0(t)})))}),JM=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},$Q=function(e,t){return e.toLowerCase()===t.toLowerCase()||JM(u0(e),u0(t))};function TQ(e,t,n){var r=s0(n),i=z.useState(function(){return e.toHsva(t)}),o=i[0],s=i[1],d=z.useRef({color:t,hsva:o});z.useEffect(function(){if(!e.equal(t,d.current.color)){var c=e.toHsva(t);d.current={hsva:c,color:t},s(c)}},[t,e]),z.useEffect(function(){var c;JM(o,d.current.hsva)||e.equal(c=e.fromHsva(o),d.current.color)||(d.current={hsva:o,color:c},r(c))},[o,e,r]);var a=z.useCallback(function(c){s(function(l){return Object.assign({},l,c)})},[]);return[o,a]}var AQ=typeof window<"u"?z.useLayoutEffect:z.useEffect,MQ=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},uC=new Map,LQ=function(e){AQ(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!uC.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}`,uC.set(t,n);var r=MQ();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},RQ=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,s=XM(e,["className","colorModel","color","onChange"]),d=z.useRef(null);LQ(d);var a=TQ(n,i,o),c=a[0],l=a[1],u=Tw(["react-colorful",t]);return st.createElement("div",Dg({},s,{ref:d,className:u}),st.createElement(EQ,{hsva:c,onChange:l}),st.createElement(kQ,{hue:c.h,onChange:l,className:"react-colorful__last-control"}))},PQ={defaultColor:"000",toHsva:bQ,fromHsva:function(e){return wQ({h:e.h,s:e.s,v:e.v,a:1})},equal:$Q},IQ=function(e){return st.createElement(RQ,Dg({},e,{colorModel:PQ}))};const cl=({color:e,onChange:t,label:n})=>{const r=z.useRef(),[i,o]=z.useState(!1);return j.jsxs("div",{children:[j.jsx("label",{children:n}),j.jsxs("div",{className:"picker",children:[j.jsx("div",{className:"swatch",style:{backgroundColor:e},onClick:()=>o(!0)}),i&&j.jsxs(j.Fragment,{children:[j.jsx("div",{className:"popoverWrap",onClick:()=>o(!1)}),j.jsx("div",{className:"popover",ref:r,children:j.jsx(IQ,{color:e,onChange:t})})]})]})]})};function OQ({config:e,setConfig:t}){const[n,r]=z.useState(e.cnib_output_folder),[i,o]=z.useState("");z.useEffect(()=>{r(e.cnib_output_folder)},[e]);const s=()=>{if(i==="")return;const d=[...n];d.push(i),r(d),t({...e,cnib_output_folder:d}),o("")};return j.jsx(j.Fragment,{children:j.jsxs("div",{className:"OutputFolderSelector",children:[n.map((d,a)=>j.jsxs(Jy,{children:[j.jsx(hu,{placeholder:"C:/stable-difusion/...",value:d,onChange:c=>{const l=[...n];l[a]=c.target.value,r(l),t({...e,cnib_output_folder:l})}}),j.jsx(gp,{width:"4.5rem",children:j.jsx("button",{className:"btn-settings",onClick:()=>{const c=[...n];c.splice(a,1),r(c),t({...e,cnib_output_folder:c})},children:"Delete"})})]},a)),j.jsxs(Jy,{children:[j.jsx(hu,{placeholder:"Add a new folder...",value:i,onChange:d=>{o(d.target.value)}}),j.jsx(gp,{width:"4.5rem",children:j.jsx("button",{className:"btn-settings",onClick:s,children:"Add"})})]})]})})}function FQ({children:e,isVisible:t}){const{isOpen:n,onOpen:r,onClose:i}=MA({isOpen:t}),o=z.useRef();return z.useEffect(()=>{t?r():i()},[t]),j.jsx(WA,{motionPreset:"scale",isOpen:n,leastDestructiveRef:o,onClose:i,isCentered:!0,children:j.jsx(yw,{children:j.jsx(UA,{children:j.jsx(bw,{children:e})})})})}const kf={"&::-webkit-scrollbar":{width:"5px"},"&::-webkit-scrollbar-track":{backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:"var(--ae-primary-color)",borderRadius:"20px"}};function DQ(){const[e,t]=z.useState(!1),[n,r]=z.useState(COZY_NEST_CONFIG);function i(){T3(n.color_mode),vC(n.waves_color),yC(n.color_mode==="dark"?n.font_color:n.font_color_light),bC(n.bg_gradiant_color),M3(n.disable_waves_and_gradiant),wC(n.accent_color,n.accent_color),A3(n.secondary_accent_color),L3(n.accent_generate_button,n.accent_color),R3(n.font_size),P3(n.card_height),I3(n.card_width),O3(n.main_menu_position),F3(n.quicksettings_position),D3(n.sfw_mode),kp()}z.useEffect(()=>{i()},[n]),z.useEffect(()=>{r(COZY_NEST_CONFIG)},[COZY_NEST_CONFIG]),z.useEffect(()=>{i()},[]);const o=()=>{CozyLogger.debug("toggle"),t(!e)},s=(u,h)=>{const f={...n};u.target?f[h]=u.target.value:f[h]=u,r(f)},d=u=>{u.target.checked?r({...n,color_mode:"dark"}):r({...n,color_mode:"light"}),i()},a=()=>{(async()=>await TC(n))()},c=()=>{(async()=>await fetch("/cozy-nest/config",{method:"DELETE"}))()},l=()=>{if(n.webui===gC){document.querySelector("#settings_restart_gradio").click();return}else if(n.webui===vs){document.querySelector("#restart_submit").click();return}(async()=>(await fetch("/cozy-nest/reloadui"),window.location.reload()))()};return j.jsxs("div",{style:{display:"flex"},children:[j.jsx("button",{className:"nevysha-btn-menu",id:"nevyui_sh_options",title:"Nevysha Cozy Nest Settings",dangerouslySetInnerHTML:{__html:C3},onClick:o}),e&&j.jsx(FQ,{isVisible:e,children:j.jsxs("div",{className:"App nevysha",children:[j.jsx(yQ,{onClickClose:()=>t(!1)}),j.jsxs("div",{className:"container",children:[j.jsxs(JA,{variant:"nevysha",children:[j.jsxs(eM,{style:{backgroundColor:"var(--tab-nav-background-color)"},children:[j.jsx(ac,{children:"Main Settings"}),j.jsx(ac,{children:"Image Browser Settings"}),j.jsx(ac,{children:"Cozy Prompt Settings"}),j.jsx(ac,{children:"Others"})]}),j.jsxs(tM,{children:[j.jsxs(oc,{css:kf,children:[j.jsxs(qo,{children:[j.jsx(rr,{isChecked:n.error_popup,onChange:u=>r({...n,error_popup:u.target.checked}),children:"Display information dialog on Cozy Nest error"}),j.jsx(rr,{isChecked:n.disable_waves_and_gradiant,onChange:u=>r({...n,disable_waves_and_gradiant:u.target.checked}),children:"Disable waves and gradiant background animations"})]}),j.jsxs(hi,{children:[j.jsx("label",{children:"Main menu position"}),j.jsx(dh,{value:n.main_menu_position,onChange:u=>r({...n,main_menu_position:u}),children:j.jsxs(rh,{direction:"row",children:[j.jsx(co,{value:"left",children:"left"}),j.jsx(co,{value:"top",children:"top"}),j.jsx(co,{value:"top_centered",children:"top centered"})]})})]}),j.jsxs(hi,{children:[j.jsx("label",{children:"Quicksettings position"}),j.jsx(dh,{value:n.quicksettings_position,onChange:u=>r({...n,quicksettings_position:u}),children:j.jsxs(rh,{direction:"row",children:[j.jsx(co,{value:"left",children:"left"}),j.jsx(co,{value:"split",children:"split"}),j.jsx(co,{value:"centered",children:"centered"})]})})]}),j.jsx(En,{children:j.jsx(rr,{isChecked:n.accent_generate_button,onChange:u=>r({...n,accent_generate_button:u.target.checked}),children:"Accent Generate Button"})}),j.jsxs(qo,{children:[j.jsxs(hl,{children:[j.jsx(ea,{children:"Font size"}),j.jsxs(ah,{value:n.font_size,onChange:u=>s(u,"font_size"),min:10,max:18,children:[j.jsx(lh,{}),j.jsxs(sh,{children:[j.jsx(ch,{}),j.jsx(uh,{})]})]})]}),j.jsxs(hl,{children:[j.jsx(ea,{children:"Extra network card height"}),j.jsxs(ah,{value:n.card_height,onChange:u=>s(u,"card_height"),min:5,max:20,children:[j.jsx(lh,{}),j.jsxs(sh,{children:[j.jsx(ch,{}),j.jsx(uh,{})]})]})]}),j.jsxs(hl,{children:[j.jsx(ea,{children:"Extra network card width"}),j.jsxs(ah,{value:n.card_width,onChange:u=>s(u,"card_width"),min:5,max:20,children:[j.jsx(lh,{}),j.jsxs(sh,{children:[j.jsx(ch,{}),j.jsx(uh,{})]})]})]})]}),j.jsx(qo,{children:j.jsxs(hl,{display:"flex",alignItems:"center",children:[j.jsxs(ea,{htmlFor:"color-mode",mb:"0",children:["Color mode : ",n.color_mode]}),j.jsx(XA,{id:"color-mode",onChange:d,isChecked:n.color_mode==="dark"})]})}),j.jsxs(qo,{children:[n.color_mode==="dark"&&j.jsx(cl,{label:"Font Color (dark)",color:n.font_color,onChange:u=>s(u,"font_color")}),n.color_mode!=="dark"&&j.jsx(cl,{label:"Font Color (light)",color:n.font_color_light,onChange:u=>s(u,"font_color_light")}),j.jsx(cl,{label:"Waves Color",color:n.waves_color,onChange:u=>s(u,"waves_color")}),j.jsx(cl,{label:"Background gradiant Color",color:n.bg_gradiant_color,onChange:u=>s(u,"bg_gradiant_color")}),j.jsx(cl,{label:"Accent Color",color:n.accent_color,onChange:u=>s(u,"accent_color")}),j.jsx(cl,{label:"Secondary accent Color",color:n.secondary_accent_color,onChange:u=>s(u,"secondary_accent_color")})]}),j.jsx(qo,{children:j.jsx(rr,{isChecked:n.sfw_mode,onChange:u=>r({...n,sfw_mode:u.target.checked}),children:"SFW mode 👀 (blur all images)"})})]}),j.jsxs(oc,{css:kf,children:[j.jsx(qo,{children:j.jsx(rr,{isChecked:!n.disable_image_browser,onChange:u=>r({...n,disable_image_browser:!u.target.checked}),children:"Enable image browser (Reload UI required)"})}),j.jsxs(qo,{children:[j.jsxs(hl,{style:{width:"30%"},children:[j.jsx(ea,{children:"Socket port for image browser"}),j.jsx(hu,{placeholder:"3333",value:n.server_default_port,onChange:u=>s(u,"server_default_port")})]}),j.jsx(rr,{children:"Auto search port"}),j.jsx(rr,{visibility:n.webui===vs?"hidden":"visible",isChecked:n.fetch_output_folder_from_a1111_settings,onChange:u=>r({...n,fetch_output_folder_from_a1111_settings:u.target.checked}),children:"Fetch output folder from a1111 settings (Reload needed to enable)"})]}),j.jsxs(hi,{children:[j.jsx(ea,{children:"Archive path"}),j.jsx(hu,{placeholder:"C:/stable-difusion/...",value:n.archive_path,onChange:u=>s(u,"archive_path")})]}),j.jsxs(hi,{children:[j.jsx(ea,{children:"Output path"}),j.jsx(OQ,{config:n,setConfig:r})]})]}),j.jsxs(oc,{css:kf,children:[j.jsx(rr,{isChecked:n.enable_cozy_prompt,onChange:u=>r({...n,enable_cozy_prompt:u.target.checked}),children:"Enable Cozy Prompt (Reload UI required)"}),j.jsxs(hi,{children:[j.jsx("label",{children:"Carret style"}),j.jsx(dh,{value:n.carret_style,onChange:u=>r({...n,carret_style:u}),children:j.jsxs(rh,{direction:"row",children:[j.jsx(co,{value:"thin",children:"Thin"}),j.jsx(co,{value:"bold",children:"Bold"})]})})]}),j.jsx(rr,{isChecked:n.save_last_prompt_local_storage,onChange:u=>r({...n,save_last_prompt_local_storage:u.target.checked}),children:"Save last prompt in local storage"})]}),j.jsxs(oc,{css:kf,children:[j.jsx("p",{children:"Those settings are heavy on DOM modification and might conflict with some others extensions"}),j.jsx("p",{children:"Reload UI needed to apply"}),j.jsxs(hi,{children:[j.jsx(rr,{isChecked:n.enable_clear_button,onChange:u=>r({...n,enable_clear_button:u.target.checked}),children:"Enable clear gallery button in txt2img and img2img tabs"}),j.jsx(rr,{isChecked:!n.disable_image_browser,onChange:u=>r({...n,disable_image_browser:!u.target.checked}),children:"Enable image browser (Reload UI required)"}),j.jsx(rr,{isChecked:n.enable_extra_network_tweaks,onChange:u=>r({...n,enable_extra_network_tweaks:u.target.checked}),children:"Enable extra network tweaks"}),j.jsx(rr,{isChecked:n.enable_cozy_prompt,onChange:u=>r({...n,enable_cozy_prompt:u.target.checked}),children:"Enable Cozy Prompt"})]})]})]})]}),j.jsxs(qo,{className:"btn-toolbar",style:{gap:"25px",padding:"15px"},children:[j.jsx("button",{className:"btn-settings",style:{width:"100%"},onClick:a,children:"Save"}),j.jsx(Sw,{message:"Are you sure you want to reset all settings ? This will trigger a UI Reload",confirmLabel:"Reset",cancelLabel:"Cancel",onConfirm:c}),j.jsx("button",{className:"btn-settings",style:{width:"100%"},onClick:l,children:"Reload UI"})]}),j.jsx("div",{children:"Made by Nevysha with luv"})]})]})})]})}const cC="cozy_nest_options";function e3(){if(!document.getElementById("nevysha-btn-menu-wrapper")){setTimeout(()=>e3(),200);return}const e=document.createElement("div");e.id=cC,e.style="display: flex;",document.getElementById("nevysha-btn-menu-wrapper").insertBefore(e,document.getElementById("nevysha-btn-menu-wrapper").firstChild),Jl.createRoot(document.getElementById(cC)).render(j.jsx(st.StrictMode,{children:j.jsx(ow,{theme:$w,children:j.jsx(DQ,{})})}))}ace.define("ace/mode/prompt_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){const r=e("ace/lib/oop"),i=e("ace/mode/text_highlight_rules").TextHighlightRules;function o(){i.call(this);const s=/[\(\[\{]/,d=/[\)\]\}]/;let a=0;this.$rules={start:[{token:()=>(a++,`open-bracket.open-bracket-${a%4}`),next:"inner",regex:s},{token:()=>(a--,`close-bracket.close-bracket-${(a+1)%4}`),regex:d,next:"start"},{regex:/<lora:/,token:"lora-begin",next:"lora"},{regex:/<hypernetwork:/,token:"hypernetwork-begin",next:"hypernetwork"},{regex:/<hypernet:/,token:"hypernet-begin",next:"hypernet"},{regex:/<lyco:/,token:"lyco-begin",next:"lyco"},{regex:/[,|:]/,token:"token"},{regex:/\w+/,token:"text"}],lora:[{regex:">",token:"lora-end",next:"start"},{regex:/\w+/,token:"lora-inner"}],hypernetwork:[{regex:">",token:"hypernetwork-end",next:"start"},{regex:/\w+/,token:"hypernetwork-inner"}],hypernet:[{regex:">",token:"hypernet-end",next:"start"},{regex:/\w+/,token:"hypernet-inner"}],lyco:[{regex:">",token:"lyco-end",next:"start"},{regex:/\w+/,token:"lyco-inner"}],inner:[{token:()=>(a++,`open-bracket.open-bracket-${a%4}`),regex:s,next:"inner"},{regex:/[,|:]/,token:"token"},{regex:/\w+/,token:"inner-bracket"},{token:()=>(a--,`close-bracket.close-bracket-${(a+1)%4}`),regex:d,next:"start"}]}}r.inherits(o,i),t.CustomHighlightRules=o});ace.define("ace/mode/prompt",["require","exports","module","ace/lib/oop","ace/mode/text"],function(e,t,n){const r=e("ace/lib/oop"),i=e("ace/mode/text").Mode,o=e("ace/mode/prompt_highlight_rules").CustomHighlightRules;function s(){this.HighlightRules=o}r.inherits(s,i),s.prototype.$id="ace/mode/prompt",function(){}.call(s.prototype),t.Mode=s});const NQ=e=>{const[t,n]=z.useState("");return z.useEffect(()=>{const r=d=>{for(const a of d)if(a.type==="attributes"){const c=document.querySelector(e);n(c.value)}},i={attributes:!0,characterData:!0,childList:!0,subtree:!0},o=new MutationObserver(r),s=document.querySelector(e);return s&&(o.observe(s,i),n(s.value)),()=>{o.disconnect()}},[e]),t};ace.config.setModuleUrl("ace/mode/prompt_highlight_rules","cozy-nest-client/cozy-prompt/prompt_highlight_rules.js");ace.config.setModuleUrl("ace/mode/prompt","cozy-nest-client/cozy-prompt/mode-prompt.js");function zQ({parentId:e,containerId:t,tabId:n}){let r=localStorage.getItem(`cozy-prompt-height-${t}`);r=r?parseInt(r):200;const i=document.querySelector(`#${e} label textarea`),[o,s]=z.useState(!1),d=NQ(`#${e} label textarea`),a="",[c,l]=z.useState(a),u=z.useRef(),[h,f]=z.useState(r),[p,g]=z.useState(!1),[b,x]=z.useState(0),S=()=>{i.value=c;const C=new Event("input");i.dispatchEvent(C)};z.useEffect(()=>{COZY_NEST_CONFIG.save_last_prompt_local_storage&&localStorage.setItem(`cozy-prompt-${t}`,c)},[c]),z.useEffect(()=>{document.querySelector(`#${Lc.get("clear_prompt")(n)}`).style.display="none",document.querySelector(`#tab_${n} button#paste`).style.display="none";const C=k=>{l(k.target.value)};return i.addEventListener("change",C),()=>{i.removeEventListener("change",C)}},[]),z.useEffect(()=>{l(d)},[d]),z.useEffect(()=>{o?(i.style.display="block",i.style.marginTop="40px"):i.style.display="none"},[o]),z.useEffect(()=>{const C=()=>{p&&g(!1)},k=I=>{if(p){const R=h+I.clientY-b;f(R),localStorage.setItem(`cozy-prompt-height-${t}`,String(R)),x(I.clientY)}};return window.addEventListener("mouseup",C),window.addEventListener("mousemove",k),()=>{window.removeEventListener("mouseup",C),window.removeEventListener("mousemove",k)}},[p]);const T=C=>{C.preventDefault(),g(!0),x(C.clientY)},v=()=>{s(!o)};function w(){l(c.replaceAll("),",`),
|
||
`))}function y(){document.querySelector(`#${n}_clear_prompt`).click()}function m(){document.querySelector(`#tab_${n} button#paste`).click()}function E(C){C.renderer.setPadding(10),C.renderer.setScrollMargin(10)}function A(){return COZY_NEST_CONFIG.carret_style==="bold"}return j.jsxs(hi,{style:{width:"100%"},children:[j.jsx("div",{className:A()?"CozyPrompt bold-cursor":"CozyPrompt",style:{height:`${h}px`},children:j.jsx(a2,{ref:u,onLoad:E,mode:"prompt",theme:"github_dark",showPrintMargin:!1,onChange:l,onBlur:S,value:c,name:"ace-prompt-editor",editorProps:{$blockScrolling:!0},style:{width:"100%",height:"100%"},setOptions:{animatedScroll:!0,enableSnippets:!0,cursorStyle:"smooth",behavioursEnabled:!0,wrapBehavioursEnabled:!0,autoScrollEditorIntoView:!0,wrap:!0,fontSize:"15px",fontFamily:"monospace"}})}),j.jsxs(En,{children:[j.jsx(wr,{onClick:w,children:"Prettify"}),j.jsxs(wr,{onClick:v,children:[o?"Hide":"Show"," native textarea"]}),j.jsx(wr,{onClick:m,children:"Redo last prompt"}),j.jsx(Sw,{style:{height:"100%"},message:"Delete prompt ?",confirmLabel:"Yes",buttonLabel:"Clear prompt",cancelLabel:"No",onConfirm:()=>y()})]}),j.jsx("div",{onMouseDown:T,className:"CozyPrompt__resize-handle",children:j.jsx("div",{className:"CozyPrompt__resize-handle-line"})})]})}function d0(e,t,n){if(!document.getElementById(e)){setTimeout(()=>d0(),200);return}const r=document.createElement("div");r.id=t,r.style="display: flex; height: fit-content; width: 100%;",document.getElementById(e).insertBefore(r,document.getElementById(e).firstChild),Jl.createRoot(document.getElementById(t)).render(j.jsx(st.StrictMode,{children:j.jsx(ow,{theme:$w,children:j.jsx(zQ,{containerId:t,parentId:e,tabId:n})})}))}const t3=st.createContext({ready:!1});function BQ(e,t){return new Promise(n=>{let r;new MutationObserver((o,s)=>{clearTimeout(r),r=setTimeout(()=>{s.disconnect(),n()},3e3)}).observe(e,{attributes:!0,childList:!0,subtree:!0}),!e.hasChildNodes()&&!e.attributes.length&&n()})}async function jQ(e,t){const n=document.querySelector(`button#${Lc.get("extra_networks_btn")(e)}`);n.style.display="none",Lt.debug("triggering extra network",e);const r=document.querySelector(`div#${e}_extra_networks`);r.style.display="none",e==="txt2img"&&(r.parentNode.style.marginBottom="calc(var(--layout-gap) * -1)"),n.click(),t(),await BQ(r),Lt.debug("tabs loaded",e)}const Gu={};function HQ({children:e,prefix:t,resolve:n}){const[r,i]=st.useState(!1);Gu[t]||(Gu[t]={loaded:!1,loading:!1}),st.useEffect(()=>{const{ready:s,loading:d}=Gu[t];s||d||(Gu[t]={loaded:!1,loading:!0},(async()=>(await jQ(t,n),Gu[t]={loaded:!0,loading:!1},i(!0)))())},[]);const o={ready:r};return j.jsx(t3.Provider,{value:o,children:e})}let bv=null,dC=!1;function VQ({prefix:e}){const t=`civitai-helper-refresh-${e}`,n=st.useRef(null),{ready:r}=st.useContext(t3),[i,o]=st.useState(!1);z.useEffect(()=>(r&&s(),()=>{d()}),[r]);function s(){if(!n.current)return;Lt.debug("loading native elements",e);const c=document.querySelector(`#${e}_extra_tabs`);bv=c.parentNode;const l=document.querySelector(`button#${Lc.get("extra_networks_btn")(e)}`);l.style.display="none";const u=document.querySelector(`div#${e}_extra_networks`);if(u.style.display="none",COZY_NEST_CONFIG.webui===vs){const f=document.querySelector(`button#${e}_extra_close`);f.style.display="none"}let h=document.querySelector(`#civitai-helper-refresh-${e}`);if(!h&&(h=document.querySelector(`#${e}_extra_tabs > .tab-nav`).lastChild,h.textContent==="🔁")){h.style.display="none";const f=h.cloneNode(!0);f.textContent="🔁",f.style.display="block",f.id=`nevysha-civitai-helper-refresh-${e}`,f.onclick=()=>{a()},h.parentNode.appendChild(f),!h.id||h.id===""?h.id=t:h.id&&h.id!==t&&console.error("civitai refresh button has an ID in this probably newer version. You should maybe tell Nevysha because it will likely break extra network tweaks :)"),dC=!0}n.current.appendChild(c)}function d(c){if(!n.current||!bv)return;c=c||!1,Lt.debug("unloading native elements",e);const l=document.querySelector(`#${e}_extra_tabs`);if(c){const u=document.querySelector(`button#${e}_extra_networks`);u.style.display="block";const h=document.querySelector(`div#${e}_extra_networks`);if(h.style.display="block",dC){const f=document.querySelector(`#civitai-helper-refresh-${e}`);f.style.display="block"}}bv.appendChild(l)}function a(){if(!n.current)return;Lt.debug("civitai helper tweak",e),o(!0),d(),document.querySelector(`#${t}`).click(),setTimeout(()=>{o(!1),s()},1e3)}return j.jsxs(j.Fragment,{children:[(!r||i)&&j.jsx(qM,{label:"Loading Extra Networks..."}),j.jsx("div",{ref:n,style:{height:"100%"}})]})}function fC(e){return new Promise((t,n)=>{n3(e,t)})}function n3(e,t){if(Lt.debug("startExtraNetwork",e),!document.getElementById(`cozy-${e}-extra-network-react`)){Lt.debug("waiting for extra network react",e),setTimeout(()=>n3(),200);return}Jl.createRoot(document.getElementById(`cozy-${e}-extra-network-react`)).render(j.jsx(st.StrictMode,{children:j.jsx(HQ,{prefix:e,resolve:t,children:j.jsx(VQ,{prefix:e})})}))}function WQ(){window.confirm_clear_prompt=function(e,t){return e="",t="",[e,t]}}const UQ={override_confirm_clear_prompt:WQ};window.CozyTools={dummyLoraCard:w3,dummyControlNetBloc:S3,dummySubdirs:x3};async function GQ(){await MC(),await uL(async()=>{e3(),COZY_NEST_CONFIG.enable_cozy_prompt===!0&&(d0("txt2img_prompt","cozy_nest_prompt_txt2img","txt2img"),d0("img2img_prompt","cozy_nest_prompt_img2img","img2img"),UQ.override_confirm_clear_prompt()),COZY_NEST_CONFIG.enable_extra_network_tweaks===!0&&(await fC("txt2img"),await fC("img2img")),YM()})}window.cozyNestLoader=GQ;(async()=>{if(b3())return;const e=new CSSStyleSheet;e.replaceSync(h3),document.adoptedStyleSheets=[e],yr.time(Ql),Lt.init(!1)})();
|