-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.user.js
24 lines (23 loc) · 67.7 KB
/
index.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// ==UserScript==
// @name Experimental Flight Interface
// @namespace https://github.com/Ferhatduran55/geofs-experimental-fi
// @version 0.7.13
// @description Improve your plane with the interface that offers experimental features.
// @author Ferhatduran55
// @match https://www.geo-fs.com/geofs.php?v=3.7
// @grant GM_addStyle
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_deleteValue
// @grant GM_listValues
// @grant GM_info
// @grant unsafeWindow
// @license MIT
// @homepage https://greasyfork.org/scripts/488227
// @supportURL https://greasyfork.org/scripts/488227/feedback
// @downloadURL https://update.greasyfork.org/scripts/488227.user.js
// @updateURL https://update.greasyfork.org/scripts/488227.meta.js
// @run-at document-end
// ==/UserScript==
(function(){"use strict";try{typeof document<"u"&&GM.addStyle('*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.static{position:static}.m-2{margin:.5rem}.mt-4{margin-top:1rem}.flex{display:flex}.h-5{height:1.25rem}.w-11\\/12{width:91.666667%}.w-5{width:1.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-max{width:-moz-max-content;width:max-content}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.rounded-md{border-radius:.375rem}.border-0{border-width:0px}.bg-sky-600{--tw-bg-opacity: 1;background-color:rgb(2 132 199 / var(--tw-bg-opacity))}.p-2{padding:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-medium{font-weight:500}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.marker\\:content-none *::marker{--tw-content: none;content:var(--tw-content)}.marker\\:content-none::marker{--tw-content: none;content:var(--tw-content)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-sky-700:hover{--tw-bg-opacity: 1;background-color:rgb(3 105 161 / var(--tw-bg-opacity))}html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}html[dir=rtl],[data-sonner-toaster][dir=rtl]{--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translate(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[data-sonner-toast]{--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;will-change:transform,opacity,height;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-y-position=top]{top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast] [data-cancel]{color:var(--normal-text);background:#00000014}[data-sonner-toast][data-theme=dark] [data-cancel]{background:#ffffff4d}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y: translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y: translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success],[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info],[data-rich-colors=true] [data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning],[data-rich-colors=true] [data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error],[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}')}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
const b={context:void 0,registry:void 0};function pe(e){b.context=e}const Ot=(e,t)=>e===t,Pe=Symbol("solid-proxy"),It=Symbol("solid-track"),_e={equals:Ot};let gt=xt;const ie=1,ke=2,mt={owned:null,cleanups:null,context:null,owner:null},Fe={};var M=null;let ge=null,Bt=null,D=null,z=null,J=null,Le=0;function me(e,t){const n=D,s=M,i=e.length===0,r=t===void 0?s:t,o=i?mt:{owned:null,cleanups:null,context:r?r.context:null,owner:r},l=i?e:()=>e(()=>q(()=>je(o)));M=o,D=null;try{return le(l,!0)}finally{D=n,M=s}}function R(e,t){t=t?Object.assign({},_e,t):_e;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},s=i=>(typeof i=="function"&&(i=i(n.value)),vt(n,i));return[bt.bind(n),s]}function rt(e,t,n){const s=Me(e,t,!0,ie);ve(s)}function G(e,t,n){const s=Me(e,t,!1,ie);ve(s)}function te(e,t,n){gt=Ft;const s=Me(e,t,!1,ie),i=ye&&Ke(ye);i&&(s.suspense=i),(!n||!n.render)&&(s.user=!0),J?J.push(s):ve(s)}function K(e,t,n){n=n?Object.assign({},_e,n):_e;const s=Me(e,t,!0,0);return s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,ve(s),bt.bind(s)}function Lt(e){return e&&typeof e=="object"&&"then"in e}function ot(e,t,n){let s,i,r;arguments.length===2&&typeof t=="object"||arguments.length===1?(s=!0,i=e,r=t||{}):(s=e,i=t,r=n||{});let o=null,l=Fe,a=null,f=!1,c=!1,d="initialValue"in r,m=typeof s=="function"&&K(s);const h=new Set,[p,L]=(r.storage||R)(r.initialValue),[E,j]=R(void 0),[v,k]=R(void 0,{equals:!1}),[w,S]=R(d?"ready":"unresolved");if(b.context){a=`${b.context.id}${b.context.count++}`;let T;r.ssrLoadFrom==="initial"?l=r.initialValue:b.load&&(T=b.load(a))&&(l=T)}function A(T,g,P,N){return o===T&&(o=null,N!==void 0&&(d=!0),(T===l||g===l)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(N,{value:g})),l=Fe,O(g,P)),g}function O(T,g){le(()=>{g===void 0&&L(()=>T),S(g!==void 0?"errored":d?"ready":"unresolved"),j(g);for(const P of h.keys())P.decrement();h.clear()},!1)}function F(){const T=ye&&Ke(ye),g=p(),P=E();if(P!==void 0&&!o)throw P;return D&&!D.user&&T&&rt(()=>{v(),o&&(T.resolved&&ge&&f?ge.promises.add(o):h.has(T)||(T.increment(),h.add(T)))}),g}function _(T=!0){if(T!==!1&&c)return;c=!1;const g=m?m():s;if(f=ge,g==null||g===!1){A(o,q(p));return}const P=l!==Fe?l:q(()=>i(g,{value:p(),refetching:T}));return Lt(P)?(o=P,"value"in P?(P.status==="success"?A(o,P.value,void 0,g):A(o,void 0,void 0,g),P):(c=!0,queueMicrotask(()=>c=!1),le(()=>{S(d?"refreshing":"pending"),k()},!1),P.then(N=>A(P,N,void 0,g),N=>A(P,void 0,$t(N),g)))):(A(o,P,void 0,g),P)}return Object.defineProperties(F,{state:{get:()=>w()},error:{get:()=>E()},loading:{get(){const T=w();return T==="pending"||T==="refreshing"}},latest:{get(){if(!d)return F();const T=E();if(T&&!o)throw T;return p()}}}),m?rt(()=>_(!1)):_(!1),[F,{refetch:_,mutate:L}]}function q(e){if(D===null)return e();const t=D;D=null;try{return e()}finally{D=t}}function $e(e,t,n){const s=Array.isArray(e);let i,r=n&&n.defer;return o=>{let l;if(s){l=Array(e.length);for(let f=0;f<e.length;f++)l[f]=e[f]()}else l=e();if(r){r=!1;return}const a=q(()=>t(l,i,o));return i=l,a}}function oe(e){te(()=>q(e))}function Q(e){return M===null||(M.cleanups===null?M.cleanups=[e]:M.cleanups.push(e)),e}function Ve(){return M}function Mt(e,t){const n=M,s=D;M=e,D=null;try{return le(t,!0)}catch(i){qe(i)}finally{M=n,D=s}}function jt(e){J.push.apply(J,e),e.length=0}function yt(e,t){const n=Symbol("context");return{id:n,Provider:Ht(n),defaultValue:e}}function Ke(e){return M&&M.context&&M.context[e.id]!==void 0?M.context[e.id]:e.defaultValue}function wt(e){const t=K(e),n=K(()=>Ge(t()));return n.toArray=()=>{const s=n();return Array.isArray(s)?s:s!=null?[s]:[]},n}let ye;function Nt(){return ye||(ye=yt())}function bt(){if(this.sources&&this.state)if(this.state===ie)ve(this);else{const e=z;z=null,le(()=>Ie(this),!1),z=e}if(D){const e=this.observers?this.observers.length:0;D.sources?(D.sources.push(this),D.sourceSlots.push(e)):(D.sources=[this],D.sourceSlots=[e]),this.observers?(this.observers.push(D),this.observerSlots.push(D.sources.length-1)):(this.observers=[D],this.observerSlots=[D.sources.length-1])}return this.value}function vt(e,t,n){let s=e.value;return(!e.comparator||!e.comparator(s,t))&&(e.value=t,e.observers&&e.observers.length&&le(()=>{for(let i=0;i<e.observers.length;i+=1){const r=e.observers[i],o=ge&&ge.running;o&&ge.disposed.has(r),(o?!r.tState:!r.state)&&(r.pure?z.push(r):J.push(r),r.observers&&pt(r)),o||(r.state=ie)}if(z.length>1e6)throw z=[],new Error},!1)),t}function ve(e){if(!e.fn)return;je(e);const t=Le;Dt(e,e.value,t)}function Dt(e,t,n){let s;const i=M,r=D;D=M=e;try{s=e.fn(t)}catch(o){return e.pure&&(e.state=ie,e.owned&&e.owned.forEach(je),e.owned=null),e.updatedAt=n+1,qe(o)}finally{D=r,M=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?vt(e,s):e.value=s,e.updatedAt=n)}function Me(e,t,n,s=ie,i){const r={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:M,context:M?M.context:null,pure:n};return M===null||M!==mt&&(M.owned?M.owned.push(r):M.owned=[r]),r}function Oe(e){if(e.state===0)return;if(e.state===ke)return Ie(e);if(e.suspense&&q(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Le);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===ie)ve(e);else if(e.state===ke){const s=z;z=null,le(()=>Ie(e,t[0]),!1),z=s}}function le(e,t){if(z)return e();let n=!1;t||(z=[]),J?n=!0:J=[],Le++;try{const s=e();return Rt(n),s}catch(s){n||(J=null),z=null,qe(s)}}function Rt(e){if(z&&(xt(z),z=null),e)return;const t=J;J=null,t.length&&le(()=>gt(t),!1)}function xt(e){for(let t=0;t<e.length;t++)Oe(e[t])}function Ft(e){let t,n=0;for(t=0;t<e.length;t++){const s=e[t];s.user?e[n++]=s:Oe(s)}if(b.context){if(b.count){b.effects||(b.effects=[]),b.effects.push(...e.slice(0,n));return}else b.effects&&(e=[...b.effects,...e],n+=b.effects.length,delete b.effects);pe()}for(t=0;t<n;t++)Oe(e[t])}function Ie(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const s=e.sources[n];if(s.sources){const i=s.state;i===ie?s!==t&&(!s.updatedAt||s.updatedAt<Le)&&Oe(s):i===ke&&Ie(s,t)}}}function pt(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=ke,n.pure?z.push(n):J.push(n),n.observers&&pt(n))}}function je(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),s=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const r=i.pop(),o=n.observerSlots.pop();s<i.length&&(r.sourceSlots[o]=s,i[s]=r,n.observerSlots[s]=o)}}if(e.owned){for(t=e.owned.length-1;t>=0;t--)je(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function $t(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function qe(e,t=M){throw $t(e)}function Ge(e){if(typeof e=="function"&&!e.length)return Ge(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const s=Ge(e[n]);Array.isArray(s)?t.push.apply(t,s):t.push(s)}return t}return e}function Ht(e,t){return function(s){let i;return G(()=>i=q(()=>(M.context={...M.context,[e]:s.value},wt(()=>s.children))),void 0),i}}const Vt=Symbol("fallback");function lt(e){for(let t=0;t<e.length;t++)e[t]()}function Gt(e,t,n={}){let s=[],i=[],r=[],o=0,l=t.length>1?[]:null;return Q(()=>lt(r)),()=>{let a=e()||[],f,c;return a[It],q(()=>{let m=a.length,h,p,L,E,j,v,k,w,S;if(m===0)o!==0&&(lt(r),r=[],s=[],i=[],o=0,l&&(l=[])),n.fallback&&(s=[Vt],i[0]=me(A=>(r[0]=A,n.fallback())),o=1);else if(o===0){for(i=new Array(m),c=0;c<m;c++)s[c]=a[c],i[c]=me(d);o=m}else{for(L=new Array(m),E=new Array(m),l&&(j=new Array(m)),v=0,k=Math.min(o,m);v<k&&s[v]===a[v];v++);for(k=o-1,w=m-1;k>=v&&w>=v&&s[k]===a[w];k--,w--)L[w]=i[k],E[w]=r[k],l&&(j[w]=l[k]);for(h=new Map,p=new Array(w+1),c=w;c>=v;c--)S=a[c],f=h.get(S),p[c]=f===void 0?-1:f,h.set(S,c);for(f=v;f<=k;f++)S=s[f],c=h.get(S),c!==void 0&&c!==-1?(L[c]=i[f],E[c]=r[f],l&&(j[c]=l[f]),c=p[c],h.set(S,c)):r[f]();for(c=v;c<m;c++)c in L?(i[c]=L[c],r[c]=E[c],l&&(l[c]=j[c],l[c](c))):i[c]=me(d);i=i.slice(0,o=m),s=a.slice(0)}return i});function d(m){if(r[c]=m,l){const[h,p]=R(c);return l[c]=p,t(a[c],h)}return t(a[c])}}}function x(e,t){return q(()=>e(t||{}))}function Ce(){return!0}const Ue={get(e,t,n){return t===Pe?n:e.get(t)},has(e,t){return t===Pe?!0:e.has(t)},set:Ce,deleteProperty:Ce,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ce,deleteProperty:Ce}},ownKeys(e){return e.keys()}};function He(e){return(e=typeof e=="function"?e():e)?e:{}}function Ut(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Ne(...e){let t=!1;for(let o=0;o<e.length;o++){const l=e[o];t=t||!!l&&Pe in l,e[o]=typeof l=="function"?(t=!0,K(l)):l}if(t)return new Proxy({get(o){for(let l=e.length-1;l>=0;l--){const a=He(e[l])[o];if(a!==void 0)return a}},has(o){for(let l=e.length-1;l>=0;l--)if(o in He(e[l]))return!0;return!1},keys(){const o=[];for(let l=0;l<e.length;l++)o.push(...Object.keys(He(e[l])));return[...new Set(o)]}},Ue);const n={},s=Object.create(null);for(let o=e.length-1;o>=0;o--){const l=e[o];if(!l)continue;const a=Object.getOwnPropertyNames(l);for(let f=a.length-1;f>=0;f--){const c=a[f];if(c==="__proto__"||c==="constructor")continue;const d=Object.getOwnPropertyDescriptor(l,c);if(!s[c])s[c]=d.get?{enumerable:!0,configurable:!0,get:Ut.bind(n[c]=[d.get.bind(l)])}:d.value!==void 0?d:void 0;else{const m=n[c];m&&(d.get?m.push(d.get.bind(l)):d.value!==void 0&&m.push(()=>d.value))}}}const i={},r=Object.keys(s);for(let o=r.length-1;o>=0;o--){const l=r[o],a=s[l];a&&a.get?Object.defineProperty(i,l,a):i[l]=a?a.value:void 0}return i}function Wt(e,...t){if(Pe in e){const i=new Set(t.length>1?t.flat():t[0]),r=t.map(o=>new Proxy({get(l){return o.includes(l)?e[l]:void 0},has(l){return o.includes(l)&&l in e},keys(){return o.filter(l=>l in e)}},Ue));return r.push(new Proxy({get(o){return i.has(o)?void 0:e[o]},has(o){return i.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!i.has(o))}},Ue)),r}const n={},s=t.map(()=>({}));for(const i of Object.getOwnPropertyNames(e)){const r=Object.getOwnPropertyDescriptor(e,i),o=!r.get&&!r.set&&r.enumerable&&r.writable&&r.configurable;let l=!1,a=0;for(const f of t)f.includes(i)&&(l=!0,o?s[a][i]=r.value:Object.defineProperty(s[a],i,r)),++a;l||(o?n[i]=r.value:Object.defineProperty(n,i,r))}return[...s,n]}const At=e=>`Stale read from <${e}>.`;function we(e){const t="fallback"in e&&{fallback:()=>e.fallback};return K(Gt(()=>e.each,e.children,t||void 0))}function se(e){const t=e.keyed,n=K(()=>e.when,void 0,{equals:(s,i)=>t?s===i:!s==!i});return K(()=>{const s=n();if(s){const i=e.children;return typeof i=="function"&&i.length>0?q(()=>i(t?s:()=>{if(!q(n))throw At("Show");return e.when})):i}return e.fallback},void 0,void 0)}function Tt(e){let t=!1;const n=(r,o)=>(t?r[1]===o[1]:!r[1]==!o[1])&&r[2]===o[2],s=wt(()=>e.children),i=K(()=>{let r=s();Array.isArray(r)||(r=[r]);for(let o=0;o<r.length;o++){const l=r[o].when;if(l)return t=!!r[o].keyed,[o,l,r[o]]}return[-1]},void 0,{equals:n});return K(()=>{const[r,o,l]=i();if(r<0)return e.fallback;const a=l.children;return typeof a=="function"&&a.length>0?q(()=>a(t?o:()=>{if(q(i)[0]!==r)throw At("Match");return l.when})):a},void 0,void 0)}function Ae(e){return e}const zt=yt();function Kt(e){let t=0,n,s,i,r,o;const[l,a]=R(!1),f=Nt(),c={increment:()=>{++t===1&&a(!0)},decrement:()=>{--t===0&&a(!1)},inFallback:l,effects:[],resolved:!1},d=Ve();if(b.context&&b.load){const p=b.context.id+b.context.count;let L=b.load(p);if(L&&(typeof L!="object"||L.status!=="success")&&(i=L),i&&i!=="$$f"){const[E,j]=R(void 0,{equals:!1});r=E,i.then(()=>{b.gather(p),pe(s),j(),pe()}).catch(v=>{if(v||b.done)return v&&(o=v),j()})}}const m=Ke(zt);m&&(n=m.register(c.inFallback));let h;return Q(()=>h&&h()),x(f.Provider,{value:c,get children(){return K(()=>{if(o)throw o;if(s=b.context,r)return r(),r=void 0;s&&i==="$$f"&&pe();const p=K(()=>e.children);return K(L=>{const E=c.inFallback(),{showContent:j=!0,showFallback:v=!0}=n?n():{};if((!E||i&&i!=="$$f")&&j)return c.resolved=!0,h&&h(),h=s=i=void 0,jt(c.effects),p();if(v)return h?L:me(k=>(h=k,s&&(pe({id:s.id+"f",count:0}),s=void 0),e.fallback),d)})})}})}const qt=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Xt=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...qt]),Yt=new Set(["innerHTML","textContent","innerText","children"]),Qt=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Jt=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Zt(e,t){const n=Jt[e];return typeof n=="object"?n[t]?n.$:void 0:n}const en=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),tn=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),nn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function sn(e,t,n){let s=n.length,i=t.length,r=s,o=0,l=0,a=t[i-1].nextSibling,f=null;for(;o<i||l<r;){if(t[o]===n[l]){o++,l++;continue}for(;t[i-1]===n[r-1];)i--,r--;if(i===o){const c=r<s?l?n[l-1].nextSibling:n[r-l]:a;for(;l<r;)e.insertBefore(n[l++],c)}else if(r===l)for(;o<i;)(!f||!f.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[r-1]&&n[l]===t[i-1]){const c=t[--i].nextSibling;e.insertBefore(n[l++],t[o++].nextSibling),e.insertBefore(n[--r],c),t[i]=n[r]}else{if(!f){f=new Map;let d=l;for(;d<r;)f.set(n[d],d++)}const c=f.get(t[o]);if(c!=null)if(l<c&&c<r){let d=o,m=1,h;for(;++d<i&&d<r&&!((h=f.get(t[d]))==null||h!==c+m);)m++;if(m>c-l){const p=t[o];for(;l<c;)e.insertBefore(n[l++],p)}else e.replaceChild(n[l++],t[o++])}else o++;else t[o++].remove()}}}const at="_$DX_DELEGATE";function Xe(e,t,n,s={}){let i;return me(r=>{i=r,t===document?e():B(t,e(),t.firstChild?null:void 0,n)},s.owner),()=>{i(),t.textContent=""}}function I(e,t,n){let s;const i=()=>{const o=document.createElement("template");return o.innerHTML=e,n?o.content.firstChild.firstChild:o.content.firstChild},r=t?()=>q(()=>document.importNode(s||(s=i()),!0)):()=>(s||(s=i())).cloneNode(!0);return r.cloneNode=r,r}function Ye(e,t=window.document){const n=t[at]||(t[at]=new Set);for(let s=0,i=e.length;s<i;s++){const r=e[s];n.has(r)||(n.add(r),t.addEventListener(r,un))}}function C(e,t,n){b.context||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function rn(e,t,n,s){b.context||(s==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,s))}function ee(e,t){b.context||(t==null?e.removeAttribute("class"):e.className=t)}function Et(e,t,n,s){if(s)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const i=n[0];e.addEventListener(t,n[0]=r=>i.call(e,n[1],r))}else e.addEventListener(t,n)}function on(e,t,n={}){const s=Object.keys(t||{}),i=Object.keys(n);let r,o;for(r=0,o=i.length;r<o;r++){const l=i[r];!l||l==="undefined"||t[l]||(ct(e,l,!1),delete n[l])}for(r=0,o=s.length;r<o;r++){const l=s[r],a=!!t[l];!l||l==="undefined"||n[l]===a||!a||(ct(e,l,!0),n[l]=a)}return n}function Te(e,t,n){if(!t)return n?C(e,"style"):t;const s=e.style;if(typeof t=="string")return s.cssText=t;typeof n=="string"&&(s.cssText=n=void 0),n||(n={}),t||(t={});let i,r;for(r in n)t[r]==null&&s.removeProperty(r),delete n[r];for(r in t)i=t[r],i!==n[r]&&(s.setProperty(r,i),n[r]=i);return n}function Qe(e,t={},n,s){const i={};return s||G(()=>i.children=be(e,t.children,i.children)),G(()=>t.ref&&t.ref(e)),G(()=>ln(e,t,n,!0,i,!0)),i}function Ee(e,t,n){return q(()=>e(t,n))}function B(e,t,n,s){if(n!==void 0&&!s&&(s=[]),typeof t!="function")return be(e,t,s,n);G(i=>be(e,t(),i,n),s)}function ln(e,t,n,s,i={},r=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=ut(e,o,null,i[o],n,r)}for(const o in t){if(o==="children"){s||be(e,t.children);continue}const l=t[o];i[o]=ut(e,o,l,i[o],n,r)}}function an(e){let t,n;return!b.context||!(t=b.registry.get(n=fn()))?e():(b.completed&&b.completed.add(t),b.registry.delete(n),t)}function cn(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function ct(e,t,n){const s=t.trim().split(/\s+/);for(let i=0,r=s.length;i<r;i++)e.classList.toggle(s[i],n)}function ut(e,t,n,s,i,r){let o,l,a,f,c;if(t==="style")return Te(e,n,s);if(t==="classList")return on(e,n,s);if(n===s)return s;if(t==="ref")r||n(e);else if(t.slice(0,3)==="on:"){const d=t.slice(3);s&&e.removeEventListener(d,s),n&&e.addEventListener(d,n)}else if(t.slice(0,10)==="oncapture:"){const d=t.slice(10);s&&e.removeEventListener(d,s,!0),n&&e.addEventListener(d,n,!0)}else if(t.slice(0,2)==="on"){const d=t.slice(2).toLowerCase(),m=en.has(d);if(!m&&s){const h=Array.isArray(s)?s[0]:s;e.removeEventListener(d,h)}(m||n)&&(Et(e,d,n,m),m&&Ye([d]))}else if(t.slice(0,5)==="attr:")C(e,t.slice(5),n);else if((c=t.slice(0,5)==="prop:")||(a=Yt.has(t))||!i&&((f=Zt(t,e.tagName))||(l=Xt.has(t)))||(o=e.nodeName.includes("-"))){if(c)t=t.slice(5),l=!0;else if(b.context)return n;t==="class"||t==="className"?ee(e,n):o&&!l&&!a?e[cn(t)]=n:e[f||t]=n}else{const d=i&&t.indexOf(":")>-1&&nn[t.split(":")[0]];d?rn(e,d,t,n):C(e,Qt[t]||t,n)}return n}function un(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}}),b.registry&&!b.done&&(b.done=_$HY.done=!0);n;){const s=n[t];if(s&&!n.disabled){const i=n[`${t}Data`];if(i!==void 0?s.call(n,i,e):s.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function be(e,t,n,s,i){if(b.context){!n&&(n=[...e.childNodes]);let l=[];for(let a=0;a<n.length;a++){const f=n[a];f.nodeType===8&&f.data.slice(0,2)==="!$"?f.remove():l.push(f)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const r=typeof t,o=s!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,r==="string"||r==="number"){if(b.context)return n;if(r==="number"&&(t=t.toString()),o){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=de(e,n,s,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||r==="boolean"){if(b.context)return n;n=de(e,n,s)}else{if(r==="function")return G(()=>{let l=t();for(;typeof l=="function";)l=l();n=be(e,l,n,s)}),()=>n;if(Array.isArray(t)){const l=[],a=n&&Array.isArray(n);if(We(l,t,n,i))return G(()=>n=be(e,l,n,s,!0)),()=>n;if(b.context){if(!l.length)return n;if(s===void 0)return[...e.childNodes];let f=l[0],c=[f];for(;(f=f.nextSibling)!==s;)c.push(f);return n=c}if(l.length===0){if(n=de(e,n,s),o)return n}else a?n.length===0?ft(e,l,s):sn(e,n,l):(n&&de(e),ft(e,l));n=l}else if(t.nodeType){if(b.context&&t.parentNode)return n=o?[t]:t;if(Array.isArray(n)){if(o)return n=de(e,n,s,t);de(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function We(e,t,n,s){let i=!1;for(let r=0,o=t.length;r<o;r++){let l=t[r],a=n&&n[r],f;if(!(l==null||l===!0||l===!1))if((f=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))i=We(e,l,a)||i;else if(f==="function")if(s){for(;typeof l=="function";)l=l();i=We(e,Array.isArray(l)?l:[l],Array.isArray(a)?a:[a])||i}else e.push(l),i=!0;else{const c=String(l);a&&a.nodeType===3&&a.data===c?e.push(a):e.push(document.createTextNode(c))}}return i}function ft(e,t,n=null){for(let s=0,i=t.length;s<i;s++)e.insertBefore(t[s],n)}function de(e,t,n,s){if(n===void 0)return e.textContent="";const i=s||document.createTextNode("");if(t.length){let r=!1;for(let o=t.length-1;o>=0;o--){const l=t[o];if(i!==l){const a=l.parentNode===e;!r&&!o?a?e.replaceChild(i,l):e.insertBefore(i,n):a&&l.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function fn(){const e=b.context;return`${e.id}${e.count++}`}const dn="http://www.w3.org/2000/svg";function St(e,t=!1){return t?document.createElementNS(dn,e):document.createElement(e)}function hn(e){const{useShadow:t}=e,n=document.createTextNode(""),s=()=>e.mount||document.body,i=Ve();let r,o=!!b.context;return te(()=>{o&&(Ve().user=o=!1),r||(r=Mt(i,()=>K(()=>e.children)));const l=s();if(l instanceof HTMLHeadElement){const[a,f]=R(!1),c=()=>f(!0);me(d=>B(l,()=>a()?d():r(),null)),Q(c)}else{const a=St(e.isSVG?"g":"div",e.isSVG),f=t&&a.attachShadow?a.attachShadow({mode:"open"}):a;Object.defineProperty(a,"_$host",{get(){return n.parentNode},configurable:!0}),B(f,r),l.appendChild(a),e.ref&&e.ref(a),Q(()=>l.removeChild(a))}},void 0,{render:!o}),n}function dt(e){const[t,n]=Wt(e,["component"]),s=K(()=>t.component);return K(()=>{const i=s();switch(typeof i){case"function":return q(()=>i(n));case"string":const r=tn.has(i),o=b.context?an():St(i,r);return Qe(o,n,r),o}})}var gn=I("<div class=sonner-loading-wrapper><div class=sonner-spinner>"),mn=I("<div class=sonner-loading-bar>"),yn=I('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"clip-rule=evenodd>'),wn=I('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z"clip-rule=evenodd>'),bn=I('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"clip-rule=evenodd>'),vn=I('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z"clip-rule=evenodd>'),xn=I("<div class=sonner-loader>"),pn=I('<button aria-label="Close toast"data-close-button><svg xmlns=http://www.w3.org/2000/svg width=12 height=12 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><line x1=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>'),$n=I('<li aria-atomic=true role=status tabindex=0 data-sonner-toast="">'),An=I('<div data-icon="">'),Tn=I('<div data-description="">'),En=I('<div data-content=""><div data-title="">'),Sn=I("<button data-button data-cancel>"),Cn=I('<button data-button="">'),Pn=I("<section tabindex=-1>"),_n=I("<ol tabindex=-1 data-sonner-toaster>"),kn=Array(12).fill(0);function On(e){return(()=>{var t=gn(),n=t.firstChild;return B(n,x(we,{each:kn,children:()=>mn()})),G(()=>C(t,"data-visible",e.visible)),t})()}function In(){return yn()}function Bn(){return wn()}function Ln(){return bn()}function Mn(){return vn()}function jn(e){switch(e){case"success":return In;case"info":return Ln;case"warning":return Bn;case"error":return Mn;default:return null}}var ze=0,Nn=class{subscribers;toasts;constructor(){this.subscribers=[],this.toasts=[]}subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:t,...n}=e,s=typeof e?.id=="number"||e.id&&e.id?.length>0?e.id:ze++;return this.toasts.find(r=>r.id===s)?this.toasts=this.toasts.map(r=>r.id===s?(this.publish({...r,...e,id:s,title:t}),{...r,...e,id:s,title:t}):r):this.addToast({title:t,...n,id:s}),s};dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e);message=(e,t)=>this.create({...t,message:e});error=(e,t)=>this.create({...t,message:e,type:"error"});success=(e,t)=>this.create({...t,type:"success",message:e});info=(e,t)=>this.create({...t,type:"info",message:e});warning=(e,t)=>this.create({...t,type:"warning",message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading}));const s=e instanceof Promise?e:e();let i=n!==void 0;return s.then(r=>{if(r&&typeof r.ok=="boolean"&&!r.ok){i=!1;const o=typeof t.error=="function"?t.error(`HTTP error! status: ${r.status}`):t.error;this.create({id:n,type:"error",message:o})}else if(t.success!==void 0){i=!1;const o=typeof t.success=="function"?t.success(r):t.success;this.create({id:n,type:"success",message:o})}}).catch(r=>{if(t.error!==void 0){i=!1;const o=typeof t.error=="function"?t.error(r):t.error;this.create({id:n,type:"error",message:o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),n};custom=(e,t)=>{const n=t?.id||ze++;return this.publish({jsx:e(n),id:n,...t}),n}},Z=new Nn;function Dn(e,t){const n=t?.id||ze++;return Z.addToast({title:e,...t,id:n}),n}var Rn=Dn,ne=Object.assign(Rn,{success:Z.success,info:Z.info,warning:Z.warning,error:Z.error,custom:Z.custom,message:Z.message,promise:Z.promise,dismiss:Z.dismiss});function Fn(){const[e,t]=R(!1);return oe(()=>{const n=()=>{t(document.hidden)};document.addEventListener("visibilitychange",n),Q(()=>{window.removeEventListener("visibilitychange",n)})}),e}var Hn=3,Vn="32px",Gn=4e3,Un=356,Ct=14,Wn=20,zn=200;function he(...e){return e.filter(Boolean).join(" ")}var Kn=e=>{const[t,n]=R(!1),[s,i]=R(!1),[r,o]=R(!1),[l,a]=R(!1),[f,c]=R(0),[d,m]=R(0);let h;const p=()=>e.index===0,L=()=>e.index+1<=e.visibleToasts,E=()=>e.toast.type,j=()=>e.toast.class||"",v=()=>e.toast.descriptionClass||"",k=Ne({gap:Ct},e),w=()=>e.heights.findIndex(y=>y.toastId===e.toast.id)||0,S=()=>e.toast.duration||e.duration||Gn;let A=0,O=0;const[F,_]=R(null),T=()=>e.position.split("-"),g=()=>e.heights.reduce((y,X,u)=>u>=w()?y:y+X.height,0),P=Fn(),N=()=>e.toast.invert||e.invert,Y=()=>E()==="loading",U=()=>w()*k.gap+g();function ce(){return e.icons?.loading?(()=>{var y=xn();return B(y,()=>e.icons.loading),G(()=>C(y,"data-visible",E()==="loading")),y})():x(On,{get visible(){return E()==="loading"}})}oe(()=>{n(!0)}),oe(()=>{const y=h,X=y.style.height;y.style.height="auto";const u=y.getBoundingClientRect().height;y.style.height=X,m(u),te(()=>{e.setHeights($=>$.find(V=>V.toastId===e.toast.id)?$.map(V=>V.toastId===e.toast.id?{...V,height:u}:V):[{toastId:e.toast.id,height:u,position:e.toast.position},...$])})});const W=()=>{i(!0),c(U()),e.setHeights(y=>y.filter(X=>X.toastId!==e.toast.id)),setTimeout(()=>{e.removeToast(e.toast)},zn)};let xe=S();return te($e(()=>[e.expanded,e.interacting,e.toast,S(),e.toast.promise,E(),e.pauseWhenPageIsHidden,P()],([y,X,u,$,H,V,ue,ae])=>{if(H&&V==="loading"||$===Number.POSITIVE_INFINITY)return;let fe;y||X||ue&&ae?(()=>{if(O<A){const Se=new Date().getTime()-A;xe=xe-Se}O=new Date().getTime()})():(()=>{A=new Date().getTime(),fe=setTimeout(()=>{u.onAutoClose?.(u),W()},xe)})(),Q(()=>{clearTimeout(fe)})})),te($e(()=>e.toast.id,y=>{const X=h;if(X){const u=X.getBoundingClientRect().height;m(u),e.setHeights($=>[{toastId:y,height:u,position:e.toast.position},...$]),Q(()=>{e.setHeights($=>$.filter(H=>H.toastId!==y))})}})),te($e(()=>e.toast.delete,y=>{y&&W()})),(()=>{var y=$n();y.$$pointermove=u=>{if(!F())return;const $=u.clientY-F().y,H=u.clientX-F().x,ue=(T()[0]==="top"?Math.min:Math.max)(0,$),ae=u.pointerType==="touch"?10:2;Math.abs(ue)>ae?h?.style.setProperty("--swipe-amount",`${$}px`):Math.abs(H)>ae&&_(null)},y.$$pointerup=()=>{if(l())return;_(null);const u=Number(h?.style.getPropertyValue("--swipe-amount").replace("px","")||0);if(Math.abs(u)>=Wn){c(U()),e.toast.onDismiss?.(e.toast),W(),a(!0);return}h?.style.setProperty("--swipe-amount","0px"),o(!1)},y.$$pointerdown=u=>{Y()||(c(U()),u.target.setPointerCapture(u.pointerId),u.target.tagName!=="BUTTON"&&(o(!0),_({x:u.clientX,y:u.clientY})))};var X=h;return typeof X=="function"?Ee(X,y):h=y,B(y,x(se,{get when(){return e.closeButton&&!e.toast.jsx},get children(){var u=pn();return Et(u,"click",Y()?void 0:()=>{W(),e.toast.onDismiss?.(e.toast)},!0),G($=>{var H=Y(),V=he(e.classes?.closeButton,e.toast?.classes?.closeButton);return H!==$.e&&C(u,"data-disabled",$.e=H),V!==$.t&&ee(u,$.t=V),$},{e:void 0,t:void 0}),u}}),null),B(y,x(se,{get when(){return e.toast.jsx||e.toast.title instanceof Element},get fallback(){return[x(se,{get when(){return E()||e.toast.icon||e.toast.promise},get children(){var u=An();return B(u,x(se,{get when(){return e.toast.promise||E()==="loading"},get fallback(){return x(dt,{get component(){return jn(E())}})},get children(){return x(dt,{get component(){return e.toast.icon||e.icons?.loading||ce()}})}})),u}}),(()=>{var u=En(),$=u.firstChild;return B($,()=>e.toast.title),B(u,x(se,{get when(){return e.toast.description},get children(){var H=Tn();return B(H,()=>e.toast.description),G(()=>ee(H,he(e.descriptionClass,v(),e.classes?.description,e.toast?.classes?.description))),H}}),null),G(()=>ee($,he(e.classes?.title,e.toast?.classes?.title))),u})(),x(se,{get when(){return e.toast.cancel},get children(){var u=Sn();return u.$$click=()=>{W(),e.toast.cancel?.onClick&&e.toast.cancel.onClick()},B(u,()=>e.toast.cancel.label),G($=>{var H=e.toast.cancelButtonStyle||e.cancelButtonStyle,V=he(e.classes?.cancelButton,e.toast?.classes?.cancelButton);return $.e=Te(u,H,$.e),V!==$.t&&ee(u,$.t=V),$},{e:void 0,t:void 0}),u}}),x(se,{get when(){return e.toast.action},get children(){var u=Cn();return u.$$click=$=>{e.toast.action?.onClick($),!$.defaultPrevented&&W()},B(u,()=>e.toast.action.label),G($=>{var H=e.toast.actionButtonStyle||e.actionButtonStyle,V=he(e.classes?.actionButton,e.toast?.classes?.actionButton);return $.e=Te(u,H,$.e),V!==$.t&&ee(u,$.t=V),$},{e:void 0,t:void 0}),u}})]},get children(){return e.toast.jsx||e.toast.title}}),null),G(u=>{var $=e.toast.important?"assertive":"polite",H=he(e.class,j(),e.classes?.toast,e.toast?.classes?.toast,e.classes?.default,e.classes?.[E()],e.toast?.classes?.[E()]),V=!(e.toast.jsx||e.toast.unstyled||e.unstyled),ue=t(),ae=!!e.toast.promise,fe=s(),De=L(),Re=T()[0],Se=T()[1],Je=e.index,Ze=p(),et=r(),tt=E(),nt=N(),it=l(),st=!!(e.expanded||e.expandByDefault&&t()),kt={"--index":e.index,"--toasts-before":e.index,"--z-index":e.toasts.length-e.index,"--offset":`${s()?f():U()}px`,"--initial-height":e.expandByDefault?"auto":`${d()}px`,...e.style,...e.toast.style};return $!==u.e&&C(y,"aria-live",u.e=$),H!==u.t&&ee(y,u.t=H),V!==u.a&&C(y,"data-styled",u.a=V),ue!==u.o&&C(y,"data-mounted",u.o=ue),ae!==u.i&&C(y,"data-promise",u.i=ae),fe!==u.n&&C(y,"data-removed",u.n=fe),De!==u.s&&C(y,"data-visible",u.s=De),Re!==u.h&&C(y,"data-y-position",u.h=Re),Se!==u.r&&C(y,"data-x-position",u.r=Se),Je!==u.d&&C(y,"data-index",u.d=Je),Ze!==u.l&&C(y,"data-front",u.l=Ze),et!==u.u&&C(y,"data-swiping",u.u=et),tt!==u.c&&C(y,"data-type",u.c=tt),nt!==u.w&&C(y,"data-invert",u.w=nt),it!==u.m&&C(y,"data-swipe-out",u.m=it),st!==u.f&&C(y,"data-expanded",u.f=st),u.y=Te(y,kt,u.y),u},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0}),y})()};function ht(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var qn=e=>{const t=Ne({position:"bottom-right",hotkey:["altKey","KeyT"],theme:"light",visibleToasts:Hn,dir:ht()},e),[n,s]=R([]),i=()=>Array.from(new Set([t.position].concat(n().filter(w=>w.position).map(w=>w.position)))),[r,o]=R([]),[l,a]=R(!1),[f,c]=R(!1);let d;const m=()=>t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),[h,p]=R(null),[L,E]=R(!1),[j,v]=R(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),k=w=>s(S=>S.filter(({id:A})=>A!==w.id));return oe(()=>{const w=Z.subscribe(S=>{if(S.dismiss){s(A=>A.map(O=>O.id===S.id?{...O,delete:!0}:O));return}s(A=>{const O=A.findIndex(F=>F.id===S.id);return O!==-1?[...A.slice(0,O),{...A[O],...S},...A.slice(O+1)]:[S,...A]})});Q(()=>{w()})}),te($e(()=>t.theme,w=>{if(w!=="system"){v(w);return}typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:S})=>{v(S?"dark":"light")})})),te(()=>{n().length<=1&&a(!1)}),oe(()=>{const w=S=>{t.hotkey.every(O=>S[O]||S.code===O)&&(a(!0),d?.focus()),S.code==="Escape"&&(document.activeElement===d||d?.contains(document.activeElement))&&a(!1)};document.addEventListener("keydown",w),Q(()=>{document.removeEventListener("keydown",w)})}),te($e(()=>d,w=>{w&&Q(()=>{h()&&(h()?.focus({preventScroll:!0}),p(null),E(!1))})})),x(se,{get when(){return n().length>0},get children(){var w=Pn();return B(w,x(we,{get each(){return i()},children:(S,A)=>{const[O,F]=S.split("-");return(()=>{var _=_n();_.$$pointerup=()=>c(!1),_.$$pointerdown=()=>{c(!0)},_.addEventListener("mouseleave",()=>{f()||a(!1)}),_.$$mousemove=()=>a(!0),_.addEventListener("mouseenter",()=>a(!0)),_.addEventListener("focus",g=>{L()||(E(!0),p(g.relatedTarget))}),_.addEventListener("blur",g=>{L()&&!g.currentTarget.contains(g.relatedTarget)&&(E(!1),h()&&(h()?.focus({preventScroll:!0}),p(null)))});var T=d;return typeof T=="function"?Ee(T,_):d=_,C(_,"data-y-position",O),C(_,"data-x-position",F),B(_,x(we,{get each(){return n().filter(g=>!g.position&&A()===0||g.position===S)},children:(g,P)=>x(Kn,{get index(){return P()},get icons(){return t.icons},toast:g,get duration(){return t.toastOptions?.duration??e.duration},get class(){return t.toastOptions?.class},get classes(){return t.toastOptions?.classes},get cancelButtonStyle(){return t.toastOptions?.cancelButtonStyle},get actionButtonStyle(){return t.toastOptions?.actionButtonStyle},get descriptionClass(){return t.toastOptions?.descriptionClass},get invert(){return!!t.invert},get visibleToasts(){return t.visibleToasts},get closeButton(){return!!t.closeButton},get interacting(){return f()},get position(){return t.position},get style(){return t.toastOptions?.style},get unstyled(){return t.toastOptions?.unstyled},removeToast:k,get toasts(){return n()},get heights(){return r()},setHeights:o,get expandByDefault(){return!!t.expand},get gap(){return t.gap},get expanded(){return l()},get pauseWhenPageIsHidden(){return t.pauseWhenPageIsHidden}})})),G(g=>{var P=t.dir==="auto"?ht():t.dir,N=t.class,Y=j(),U=t.richColors,ce={"--front-toast-height":`${r()[0]?.height}px`,"--offset":typeof t.offset=="number"?`${t.offset}px`:t.offset||Vn,"--width":`${Un}px`,"--gap":`${Ct}px`,...t.style};return P!==g.e&&C(_,"dir",g.e=P),N!==g.t&&ee(_,g.t=N),Y!==g.a&&C(_,"data-theme",g.a=Y),U!==g.o&&C(_,"data-rich-colors",g.o=U),g.i=Te(_,ce,g.i),g},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),_})()}})),G(()=>C(w,"aria-label",`Notifications ${m()}`)),w}})};Ye(["pointerdown","pointerup","pointermove","click","mousemove"]);const Xn=[{name:"Definition",options:{source:{target:"geofs.aircraft.instance",prop:"definition"},reactive:!0,reset:!0,allowed:[{name:"airbrakesTravelTime",type:"float"},{name:"accessoriesTravelTime",type:"float"},{name:"flapsTravelTime",type:"float"},{name:"flapsSteps",type:"int"},{name:"gearTravelTime",type:"float"},{name:"zeroThrustAltitude",type:"int"},{name:"zeroRPMAltitude",type:"int"},{name:"mass",type:"int"},{name:"minRPM",type:"int",comment:"not recommended"},{name:"maxRPM",type:"int",comment:"not recommended"}],ignored:["object","function","undefined","null","boolean","symbol","array"]}},{name:"Engines",options:{source:{target:"geofs.aircraft.instance",prop:"engines"},reactive:!0,allowed:[{name:"thrust",type:"int"},{name:"afterBurnerThrust",type:"int"},{name:"reverseThrust",type:"int"}],ignored:["object","function","undefined","null","boolean","symbol","array"]}},{name:"id",options:{source:{target:"geofs.aircraft.instance",prop:"id"},reactive:!0}}];function Yn(e){const t=e.split(".");let n=unsafeWindow;for(let s of t)if(n=n[s],n===void 0)throw new Error(`Path ${e} does not exist`);return n}class Qn{static _options={cloneAfterCreation:!1,temp:null};static _cache={};static set cache(t){this._cache=t}static get cache(){return this._cache}static set options(t){this._options=t}static get options(){return this._options}static parse(t,n,s={}){let i=t;try{if(typeof t=="string")i=Yn(t);else if(typeof t=="object")i=t;else throw new Error("The first argument to parse must be an object or string path.",t);if(typeof n!="string")throw new Error("The second argument to parse must be a string.",n);if(i===void 0)throw new Error("Invalid target.",i);if(n===void 0)throw new Error("Invalid property.",n);let r=i[n];if(r===void 0)throw new Error("Invalid value.",r);const[o,l]=R(r),a=s?.cloneAfterCreation!==void 0?s?.cloneAfterCreation:this._options?.cloneAfterCreation;if(o===void 0||l===void 0)throw new Error("Signal not created.");if(Object.defineProperty(i,n,{get:function(){return o()},set:function(f){r=f,l(f)}}),Object.getOwnPropertyDescriptor(i,n)===void 0)throw new Error("Reactive property not created.");if(a){if(this._options.temp===null)throw new Error("Temporary object not defined.");if(this._cache[n]!==void 0)throw new Error("Property already exists in cache.",n);const[f,c]=[o,l];if(f===void 0||c===void 0)throw new Error("Reactive property not cloned.");if(this._cache[n]=!0,Object.defineProperty(this._options.temp,n,{get:function(){return f()},set:function(d){c(d)}}),Object.getOwnPropertyDescriptor(this._options.temp,n)===void 0)throw new Error("Reactive property clone not defined.",n)}return[o,l]}catch(r){console.error(r)}}}class Be{static _reactive=Qn;static _data={};static get reactive(){return this._reactive}static set reactive(t){this._reactive=t}static async load(...t){return await new Promise((n,s)=>{try{if(!t.length)throw new Error("No props to load");if(!Array.isArray(t))throw new Error("Props must be an array");for(const i of t[0]){const{name:r,options:o}=i,{source:l}=o;if(o.reactive){if(!o.source)throw new Error("Reactive props require a source");if(!o.source.target||!o.source.prop)throw new Error("Reactive props require a target and prop");this._reactive.parse(l.target,l.prop,o.source?.options)}Object.defineProperty(this,r,{get:function(){return this._data[r]},set:function(a){this._data[r]=a}}),this[r]={allowed:o.allowed||[],ignored:o.ignored||[],reset:o.reset||!1}}n(!0)}catch(i){s(i)}})}}const re={duration:2e3,closeButton:!0};var Jn=I('<li class="flex gap-2"><label class="flex-none w-fit">:</label><input>'),Zn=I("<br>"),ei=I('<span class="text-sm text-slate-500">'),ti=I('<li class="flex gap-2"><button class="w-fit m-2 border-0 rounded-md px-3 bg-sky-600 text-white shadow-md hover:bg-sky-700 hover:cursor-pointer">Reset</button><button class="w-fit m-2 border-0 rounded-md px-3 bg-sky-600 text-white shadow-md hover:bg-sky-700 hover:cursor-pointer">Save</button><button class="w-fit m-2 border-0 rounded-md px-3 bg-sky-600 text-white shadow-md hover:bg-sky-700 hover:cursor-pointer">Load');const ni=async()=>await new Promise((e,t)=>{try{const{allowed:n,ignored:s,reset:i}=Be.Definition,r=flightAssistant.instance.definition;if(!r)throw new Error("No definition found.");const o=[];for(const l of Object.entries(r)){const[a,f]=l,c=typeof f;if(s.includes(c)||!n.some(k=>k.name===a))continue;const m=n.find(k=>k.name===a).type;if(!m)continue;const h=n.find(k=>k.name===a).comment,p=["int","float","number"].includes(m)||c==="number",L=m==="int",E=m==="float",j=m==="string";let v={};j?v.placeholder="Text":p&&(v.min=L?"0":E?"0.0":null,v.max=L?parseInt(f*2):E?parseFloat(f*2):null,v.step=L?"1":E?"0.2":null,v.placeholder=`Between ${v.min} and ${v.max}`),i&&(v["data-definitions-default"]=f),v["data-definitions-propname"]=a,v["data-definitions-type"]=m,o.push((()=>{var k=Jn(),w=k.firstChild,S=w.firstChild,A=w.nextSibling;return C(w,"for",`set${a}`),B(w,a,S),B(w,h?[Zn(),(()=>{var O=ei();return B(O,h),O})()]:null,null),C(A,"id",`set${a}`),C(A,"type",p?"number":j?"text":null),Qe(A,Ne(v,{class:"flex-auto w-max m-2 border-0 rounded-md p-2 shadow-md",oninput:async O=>{let F=O.target,[_,T,g]=["min","max","value"].map(N=>p?parseFloat(F[N]):F[N]),P=F.type;await new Promise((N,Y)=>{if(P=="number"&&g>_&&g<=T){let U=g*2*100;O.target.max=U<1?10:U,flightAssistant.instance.definition[a]=g,F.placeholder=`Between ${_} and ${T}`,N(`${a} set to ${g}`)}else P=="text"&&!g?(flightAssistant.instance.definition[a]=g,N(`${a} set to ${g}`)):Y(p?`Value must be between ${_} and ${T}`:j?"Value must be text":"Invalid value")}).then(N=>ne.success(N,re)).catch(N=>ne.error(N,re))}}),!1,!1),k})())}i&&o.unshift((()=>{var l=ti(),a=l.firstChild,f=a.nextSibling,c=f.nextSibling;return a.$$click=()=>{const d=document.querySelectorAll("input[data-definitions-default]");d.forEach(m=>{let h="data-definitions-",p=m.getAttribute(`${h}default`),L=m.getAttribute(`${h}propname`),E=m.getAttribute(`${h}type`);E==="int"&&(p=parseInt(p)),E==="float"&&(p=parseFloat(p)),m.value=p,flightAssistant.instance.definition[L]=p}),d.length?ne.success("Definitions reset",re):ne.error("No definitions to reset",re)},f.$$click=()=>{ne.info("Coming soon..",re)},c.$$click=()=>{ne.info("Coming soon..",re)},l})()),e(o)}catch(n){t(n)}});Ye(["click"]);var ii=I('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"><path fill-rule=evenodd d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z">');const Pt=e=>(()=>{var t=ii();return G(n=>{var s=`w-5 h-5 text-gray-500 transition group-open/${e["group-open"]}:rotate-90`,i=e.fill||"currentColor";return s!==n.e&&C(t,"class",n.e=s),i!==n.t&&C(t,"fill",n.t=i),n},{e:void 0,t:void 0}),t})();var si=I('<details><summary class="flex items-center justify-between gap-2 p-2 font-medium marker:content-none hover:cursor-pointer"><span class="flex gap-2"></span></summary><article class="px-4 pb-4"><ul class="flex flex-col gap-4 pl-2 mt-4">'),ri=I('<li class="flex gap-2"><label>:</label><input>');const oi=async()=>await new Promise((e,t)=>{try{const{allowed:n,ignored:s}=Be.Engines,i=flightAssistant.instance.engines;if(!i)throw new Error("No engines found.");const r=[];for(let o=0;o<i.length;o++)r.push((()=>{var l=si(),a=l.firstChild,f=a.firstChild,c=a.nextSibling,d=c.firstChild;return ee(l,"group/engine"+o),B(f,x(Tt,{get children(){return[x(Ae,{get when(){return i[o].name},get children(){return i[o].name}}),x(Ae,{get when(){return!i[o].name},get children(){return["Engine ",o+1]}})]}})),B(a,x(Pt,{"group-open":`engine${o}`}),null),B(d,x(we,{get each(){return Object.entries(i[o])},children:m=>{const[h,p]=m,L=typeof p;if(s.includes(L)||!n.some(O=>O.name===h))return null;const j=n.find(O=>O.name===h).type;if(!j)return null;const v=["int","float","number"].includes(j)||L==="number",k=j==="int",w=j==="float",S=j==="string";let A={};return S?A.placeholder="Text":v&&(A.min=k?"0":w?"0.0":null,A.max=k?parseInt(p*2):w?parseFloat(p*2):null,A.step=k?"1":w?"0.2":null,A.placeholder=`Between ${A.min} and ${A.max}`),(()=>{var O=ri(),F=O.firstChild,_=F.firstChild,T=F.nextSibling;return B(F,h,_),C(T,"type",v?"number":S?"text":null),Qe(T,Ne({get id(){return`set${i[o].name}${h}`}},A,{class:"w-11/12 m-2 border-0 rounded-md p-2 shadow-md",oninput:async g=>{let P=g.target,[N,Y,U]=["min","max","value"].map(W=>v?parseFloat(P[W]):P[W]),ce=P.type;await new Promise((W,xe)=>{if(ce=="number"&&U>N&&U<=Y){let y=U*2*100;g.target.max=y<1?10:y,flightAssistant.instance.engines[o][h]=U,P.placeholder=`Between ${N} and ${Y}`,W(`${i[o].name}${h} set to ${U}`)}else ce=="text"&&!U?(flightAssistant.instance.engines[o][h]=U,W(`${i[o].name}${h} set to ${U}`)):xe(v?`Value must be between ${N} and ${Y}`:S?"Value must be text":"Invalid value")}).then(W=>ne.success(W,re)).catch(W=>ne.error(W,re))}}),!1,!1),G(()=>C(F,"for",`set${i[o].name}${h}`)),O})()}})),l})());e(r)}catch(n){t(n)}}),li=()=>[{name:"definitions",title:"Definitions",icon:!0,resource:ot(ni),reference:null},{name:"engines",title:"Engines",icon:!0,resource:ot(oi),reference:null}];var ai=I('<summary class="flex items-center justify-between gap-2 p-2 font-medium marker:content-none hover:cursor-pointer"><span class="flex gap-2">'),ci=I("<span>Loading..."),ui=I("<span>Error: "),fi=I('<article class="px-4 pb-4"><ul class="flex flex-col gap-4 pl-2 mt-4">'),di=I("<div> Loading..."),hi=I("<details>");const gi=e=>(()=>{var t=ai(),n=t.firstChild;return B(n,()=>e.title),B(t,x(Pt,{get"group-open"(){return e.name}}),null),t})(),mi=e=>(()=>{var t=fi(),n=t.firstChild,s=e.reference;return typeof s=="function"?Ee(s,n):e.reference=n,B(n,x(Kt,{get fallback(){return(()=>{var i=di(),r=i.firstChild;return B(i,()=>e.title,r),i})()},get children(){return x(Tt,{get children(){return[x(Ae,{get when(){return e.resource?.loading},get children(){return ci()}}),x(Ae,{get when(){return e.resource?.error},get children(){var i=ui();return i.firstChild,B(i,()=>e.resource.error,null),i}}),x(Ae,{get when(){return e.resource()},get children(){return x(we,{get each(){return e.resource()},children:i=>i})}})]}})}})),t})(),yi=e=>(()=>{var t=hi();return B(t,x(gi,e),null),B(t,x(mi,e),null),G(()=>ee(t,"group/"+e.name)),t})(),wi=e=>{try{if(!e.name||!e.resource)throw new Error("Group component requires a name and resource prop.");if(typeof e.resource!="function")throw new Error("Group component resource prop must be an function.");let{name:t,resource:n}=e,s=e.icon||!0,i=e.title||t,r=e.reference||null;return x(yi,{name:t,title:i,resource:n,icon:s,reference:r})}catch(t){return console.error(t),null}},_t={left:document.querySelector(".geofs-ui-left"),bottom:document.querySelector(".geofs-ui-bottom")};var bi=I('<ul class="geofs-list geofs-toggle-panel geofs-efi-list"data-noblur=true data-onshow={geofs.initializePreferencesPanel()} data-onhide={geofs.savePreferencesPanel()}>'),vi=I('<button class="mdl-button mdl-js-button geofs-f-standard-ui"id=geofs-efi-button tabindex=0 data-upgraded=,MaterialButton data-toggle-panel=.geofs-efi-list data-tooltip-classname=mdl-tooltip--top title="Experimental Flight Interface">CONFIG');const xi=()=>{const e=li(),[t,n]=R();n(flightAssistant.instance.id);const s=K(()=>flightAssistant.instance.id===t());return te(()=>{s()||(n(flightAssistant.instance.id),setTimeout(()=>{for(let i=0;i<e.length;i++)e[i].resource[1].refetch()},1e3))}),oe(()=>{for(let i=0;i<e.length;i++){let{name:r,reference:o}=e[i];flightAssistant.refs[r]=o}}),x(we,{each:e,children:i=>x(wi,{get name(){return i.name},get title(){return i.title},get icon(){return i.icon},get resource(){return i.resource[0]},get reference(){return i.reference}})})},pi=()=>{let e;return oe(()=>{flightAssistant.refs.container=e}),Q(()=>{flightAssistant.refs.container=null}),(()=>{var t=bi(),n=e;return typeof n=="function"?Ee(n,t):e=t,B(t,x(xi,{})),t})()},$i=()=>{let e;return oe(()=>{flightAssistant.refs.button=e}),Q(()=>{flightAssistant.refs.button=null}),(()=>{var t=vi(),n=e;return typeof n=="function"?Ee(n,t):e=t,t})()},Ai=()=>Xe(()=>x(pi,{}),_t.left),Ti=()=>Xe(()=>x($i,{}),_t.bottom),Ei=()=>x(hn,{get mount(){return document.body},get children(){return x(qn,{position:"top-right",gap:8,expand:!1,richColors:!0})}}),Si=()=>{const e={version:GM.info.script.version,refs:{},instance:{}};return Be.reactive.options={cloneAfterCreation:!0,temp:e.instance},unsafeWindow.executeOnEventDone("geofsStarted",function(){const t=new Promise((n,s)=>{setTimeout(()=>{try{Be.load(Xn),Ai(),Ti(),n("Assistant Started.")}catch(i){s(i)}},5e3)});ne.promise(t,{loading:"Assistant is starting..",success:n=>n,error:n=>`Error: ${n.message}`})}),unsafeWindow.flightAssistant=e,x(Ei,{})},Ci=document.body;Xe(()=>x(Si,{}),Ci);