// ==UserScript==
// @name GeoFS-Flight Assistant
// @namespace https://github.com/Ferhatduran55
// @version 0.6.1
// @description Say hello to your flight assistant that enhances the experience!
// @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
// @name:tr GeoFS-Uçuş Asistanı
// @name:fr GeoFS-Assistant DeVol
// @name:de GeoFS-Flugassistent
// @name:es GeoFS-Asistente de vuelo
// @name:it GeoFS-Assistente di volo
// @name:pt GeoFS-Assistente de voo
// @name:ru GeoFS-Помощник пилота
// @name:zh GeoFS-飞行助手
// @name:ja GeoFS-フライトアシスタント
// @name:ko GeoFS-비행 보조 프로그램
// @name:ar مساعد الطيران في GeoFS
// @description:tr Deneyimi zenginleştiren uçuş asistanınıza merhaba deyin!
// @description:fr Dites bonjour à votre assistant de vol qui améliore l'expérience!
// @description:de Sagen Sie hallo zu Ihrem Flugassistenten, der das Erlebnis verbessert!
// @description:es ¡Saluda a tu asistente de vuelo que mejora la experiencia!
// @description:it Dì ciao al tuo assistente di volo che migliora l'esperienza!
// @description:pt Diga olá ao seu assistente de voo que melhora a experiência!
// @description:ru Поздоровайтесь со своим помощником пилота, который улучшает опыт!
// @description:zh 向您的飞行助手打招呼,增强体验!
// @description:ja 体験を向上させるあなたのフライトアシスタントにこんにちはと言ってください!
// @description:ko 경험을 향상시키는 비행 보조 프로그램에 인사하세요!
// @description:ar قل مرحبًا لمساعد الطيران الذي يعزز التجربة!
// @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}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.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}.p-2{padding:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.font-medium{font-weight:500}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / 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}.group[open] .group-open\\:rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}')}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
const g={context:void 0,registry:void 0};function ge(e){g.context=e}const Et=(e,t)=>e===t,F=Symbol("solid-proxy"),ze=Symbol("solid-track"),Te={equals:Et};let lt=ht;const K=1,_e=2,at={owned:null,cleanups:null,context:null,owner:null},Fe={};var p=null;let se=null,Ct=null,w=null,O=null,R=null,je=0;function Q(e,t){const n=w,r=p,s=e.length===0,i=t===void 0?r:t,o=s?at:{owned:null,cleanups:null,context:i?i.context:null,owner:i},l=s?e:()=>e(()=>D(()=>Le(o)));p=o,w=null;try{return H(l,!0)}finally{w=n,p=r}}function I(e,t){t=t?Object.assign({},Te,t):Te;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),dt(n,s));return[ut.bind(n),r]}function et(e,t,n){const r=Me(e,t,!0,K);he(r)}function T(e,t,n){const r=Me(e,t,!1,K);he(r)}function oe(e,t,n){lt=Lt;const r=Me(e,t,!1,K),s=le&&Ye(le);s&&(r.suspense=s),(!n||!n.render)&&(r.user=!0),R?R.push(r):he(r)}function N(e,t,n){n=n?Object.assign({},Te,n):Te;const r=Me(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,he(r),ut.bind(r)}function Ot(e){return e&&typeof e=="object"&&"then"in e}function Pt(e,t,n){let r,s,i;arguments.length===2&&typeof t=="object"||arguments.length===1?(r=!0,s=e,i=t||{}):(r=e,s=t,i=n||{});let o=null,l=Fe,a=null,f=!1,c=!1,u="initialValue"in i,d=typeof r=="function"&&N(r);const h=new Set,[y,x]=(i.storage||I)(i.initialValue),[P,C]=I(void 0),[S,j]=I(void 0,{equals:!1}),[M,U]=I(u?"ready":"unresolved");if(g.context){a=`${g.context.id}${g.context.count++}`;let A;i.ssrLoadFrom==="initial"?l=i.initialValue:g.load&&(A=g.load(a))&&(l=A)}function W(A,$,E,ee){return o===A&&(o=null,ee!==void 0&&(u=!0),(A===l||$===l)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(ee,{value:$})),l=Fe,_t($,E)),$}function _t(A,$){H(()=>{$===void 0&&x(()=>A),U($!==void 0?"errored":u?"ready":"unresolved"),C($);for(const E of h.keys())E.decrement();h.clear()},!1)}function Re(){const A=le&&Ye(le),$=y(),E=P();if(E!==void 0&&!o)throw E;return w&&!w.user&&A&&et(()=>{S(),o&&(A.resolved&&se&&f?se.promises.add(o):h.has(A)||(A.increment(),h.add(A)))}),$}function Be(A=!0){if(A!==!1&&c)return;c=!1;const $=d?d():r;if(f=se,$==null||$===!1){W(o,D(y));return}const E=l!==Fe?l:D(()=>s($,{value:y(),refetching:A}));return Ot(E)?(o=E,"value"in E?(E.status==="success"?W(o,E.value,void 0,$):W(o,void 0,void 0,$),E):(c=!0,queueMicrotask(()=>c=!1),H(()=>{U(u?"refreshing":"pending"),j()},!1),E.then(ee=>W(E,ee,void 0,$),ee=>W(E,void 0,mt(ee),$)))):(W(o,E,void 0,$),E)}return Object.defineProperties(Re,{state:{get:()=>M()},error:{get:()=>P()},loading:{get(){const A=M();return A==="pending"||A==="refreshing"}},latest:{get(){if(!u)return Re();const A=P();if(A&&!o)throw A;return y()}}}),d?et(()=>Be(!1)):Be(!1),[Re,{refetch:Be,mutate:x}]}function kt(e){return H(e,!1)}function D(e){if(w===null)return e();const t=w;w=null;try{return e()}finally{w=t}}function Ie(e){oe(()=>D(e))}function Z(e){return p===null||(p.cleanups===null?p.cleanups=[e]:p.cleanups.push(e)),e}function He(){return w}function Ke(){return p}function Nt(e,t){const n=p,r=w;p=e,w=null;try{return H(t,!0)}catch(s){Qe(s)}finally{p=n,w=r}}function Dt(e){R.push.apply(R,e),e.length=0}function ct(e,t){const n=Symbol("context");return{id:n,Provider:Rt(n),defaultValue:e}}function Ye(e){return p&&p.context&&p.context[e.id]!==void 0?p.context[e.id]:e.defaultValue}function ft(e){const t=N(e),n=N(()=>We(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let le;function jt(){return le||(le=ct())}function ut(){if(this.sources&&this.state)if(this.state===K)he(this);else{const e=O;O=null,H(()=>Ce(this),!1),O=e}if(w){const e=this.observers?this.observers.length:0;w.sources?(w.sources.push(this),w.sourceSlots.push(e)):(w.sources=[this],w.sourceSlots=[e]),this.observers?(this.observers.push(w),this.observerSlots.push(w.sources.length-1)):(this.observers=[w],this.observerSlots=[w.sources.length-1])}return this.value}function dt(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&H(()=>{for(let s=0;s<e.observers.length;s+=1){const i=e.observers[s],o=se&&se.running;o&&se.disposed.has(i),(o?!i.tState:!i.state)&&(i.pure?O.push(i):R.push(i),i.observers&>(i)),o||(i.state=K)}if(O.length>1e6)throw O=[],new Error},!1)),t}function he(e){if(!e.fn)return;Le(e);const t=je;It(e,e.value,t)}function It(e,t,n){let r;const s=p,i=w;w=p=e;try{r=e.fn(t)}catch(o){return e.pure&&(e.state=K,e.owned&&e.owned.forEach(Le),e.owned=null),e.updatedAt=n+1,Qe(o)}finally{w=i,p=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?dt(e,r):e.value=r,e.updatedAt=n)}function Me(e,t,n,r=K,s){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:p,context:p?p.context:null,pure:n};return p===null||p!==at&&(p.owned?p.owned.push(i):p.owned=[i]),i}function Ee(e){if(e.state===0)return;if(e.state===_e)return Ce(e);if(e.suspense&&D(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<je);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===K)he(e);else if(e.state===_e){const r=O;O=null,H(()=>Ce(e,t[0]),!1),O=r}}function H(e,t){if(O)return e();let n=!1;t||(O=[]),R?n=!0:R=[],je++;try{const r=e();return Mt(n),r}catch(r){n||(R=null),O=null,Qe(r)}}function Mt(e){if(O&&(ht(O),O=null),e)return;const t=R;R=null,t.length&&H(()=>lt(t),!1)}function ht(e){for(let t=0;t<e.length;t++)Ee(e[t])}function Lt(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ee(r)}if(g.context){if(g.count){g.effects||(g.effects=[]),g.effects.push(...e.slice(0,n));return}else g.effects&&(e=[...g.effects,...e],n+=g.effects.length,delete g.effects);ge()}for(t=0;t<n;t++)Ee(e[t])}function Ce(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const s=r.state;s===K?r!==t&&(!r.updatedAt||r.updatedAt<je)&&Ee(r):s===_e&&Ce(r,t)}}}function gt(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=_e,n.pure?O.push(n):R.push(n),n.observers&>(n))}}function Le(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),s=n.observers;if(s&&s.length){const i=s.pop(),o=n.observerSlots.pop();r<s.length&&(i.sourceSlots[o]=r,s[r]=i,n.observerSlots[r]=o)}}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Le(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 mt(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Qe(e,t=p){throw mt(e)}function We(e){if(typeof e=="function"&&!e.length)return We(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=We(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Rt(e,t){return function(r){let s;return T(()=>s=D(()=>(p.context={...p.context,[e]:r.value},ft(()=>r.children))),void 0),s}}const Bt=Symbol("fallback");function tt(e){for(let t=0;t<e.length;t++)e[t]()}function Ft(e,t,n={}){let r=[],s=[],i=[],o=0,l=t.length>1?[]:null;return Z(()=>tt(i)),()=>{let a=e()||[],f,c;return a[ze],D(()=>{let d=a.length,h,y,x,P,C,S,j,M,U;if(d===0)o!==0&&(tt(i),i=[],r=[],s=[],o=0,l&&(l=[])),n.fallback&&(r=[Bt],s[0]=Q(W=>(i[0]=W,n.fallback())),o=1);else if(o===0){for(s=new Array(d),c=0;c<d;c++)r[c]=a[c],s[c]=Q(u);o=d}else{for(x=new Array(d),P=new Array(d),l&&(C=new Array(d)),S=0,j=Math.min(o,d);S<j&&r[S]===a[S];S++);for(j=o-1,M=d-1;j>=S&&M>=S&&r[j]===a[M];j--,M--)x[M]=s[j],P[M]=i[j],l&&(C[M]=l[j]);for(h=new Map,y=new Array(M+1),c=M;c>=S;c--)U=a[c],f=h.get(U),y[c]=f===void 0?-1:f,h.set(U,c);for(f=S;f<=j;f++)U=r[f],c=h.get(U),c!==void 0&&c!==-1?(x[c]=s[f],P[c]=i[f],l&&(C[c]=l[f]),c=y[c],h.set(U,c)):i[f]();for(c=S;c<d;c++)c in x?(s[c]=x[c],i[c]=P[c],l&&(l[c]=C[c],l[c](c))):s[c]=Q(u);s=s.slice(0,o=d),r=a.slice(0)}return s});function u(d){if(i[c]=d,l){const[h,y]=I(c);return l[c]=y,t(a[c],h)}return t(a[c])}}}function m(e,t){return D(()=>e(t||{}))}function Se(){return!0}const Ut={get(e,t,n){return t===F?n:e.get(t)},has(e,t){return t===F?!0:e.has(t)},set:Se,deleteProperty:Se,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Se,deleteProperty:Se}},ownKeys(e){return e.keys()}};function Ue(e){return(e=typeof e=="function"?e():e)?e:{}}function Vt(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Y(...e){let t=!1;for(let o=0;o<e.length;o++){const l=e[o];t=t||!!l&&F in l,e[o]=typeof l=="function"?(t=!0,N(l)):l}if(t)return new Proxy({get(o){for(let l=e.length-1;l>=0;l--){const a=Ue(e[l])[o];if(a!==void 0)return a}},has(o){for(let l=e.length-1;l>=0;l--)if(o in Ue(e[l]))return!0;return!1},keys(){const o=[];for(let l=0;l<e.length;l++)o.push(...Object.keys(Ue(e[l])));return[...new Set(o)]}},Ut);const n={},r=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 u=Object.getOwnPropertyDescriptor(l,c);if(!r[c])r[c]=u.get?{enumerable:!0,configurable:!0,get:Vt.bind(n[c]=[u.get.bind(l)])}:u.value!==void 0?u:void 0;else{const d=n[c];d&&(u.get?d.push(u.get.bind(l)):u.value!==void 0&&d.push(()=>u.value))}}}const s={},i=Object.keys(r);for(let o=i.length-1;o>=0;o--){const l=i[o],a=r[l];a&&a.get?Object.defineProperty(s,l,a):s[l]=a?a.value:void 0}return s}const yt=e=>`Stale read from <${e}>.`;function qe(e){const t="fallback"in e&&{fallback:()=>e.fallback};return N(Ft(()=>e.each,e.children,t||void 0))}function Ge(e){const t=e.keyed,n=N(()=>e.when,void 0,{equals:(r,s)=>t?r===s:!r==!s});return N(()=>{const r=n();if(r){const s=e.children;return typeof s=="function"&&s.length>0?D(()=>s(t?r:()=>{if(!D(n))throw yt("Show");return e.when})):s}return e.fallback},void 0,void 0)}function Je(e){let t=!1;const n=(i,o)=>(t?i[1]===o[1]:!i[1]==!o[1])&&i[2]===o[2],r=ft(()=>e.children),s=N(()=>{let i=r();Array.isArray(i)||(i=[i]);for(let o=0;o<i.length;o++){const l=i[o].when;if(l)return t=!!i[o].keyed,[o,l,i[o]]}return[-1]},void 0,{equals:n});return N(()=>{const[i,o,l]=s();if(i<0)return e.fallback;const a=l.children;return typeof a=="function"&&a.length>0?D(()=>a(t?o:()=>{if(D(s)[0]!==i)throw yt("Match");return l.when})):a},void 0,void 0)}function G(e){return e}const zt=ct();function Ht(e){let t=0,n,r,s,i,o;const[l,a]=I(!1),f=jt(),c={increment:()=>{++t===1&&a(!0)},decrement:()=>{--t===0&&a(!1)},inFallback:l,effects:[],resolved:!1},u=Ke();if(g.context&&g.load){const y=g.context.id+g.context.count;let x=g.load(y);if(x&&(typeof x!="object"||x.status!=="success")&&(s=x),s&&s!=="$$f"){const[P,C]=I(void 0,{equals:!1});i=P,s.then(()=>{g.gather(y),ge(r),C(),ge()}).catch(S=>{if(S||g.done)return S&&(o=S),C()})}}const d=Ye(zt);d&&(n=d.register(c.inFallback));let h;return Z(()=>h&&h()),m(f.Provider,{value:c,get children(){return N(()=>{if(o)throw o;if(r=g.context,i)return i(),i=void 0;r&&s==="$$f"&&ge();const y=N(()=>e.children);return N(x=>{const P=c.inFallback(),{showContent:C=!0,showFallback:S=!0}=n?n():{};if((!P||s&&s!=="$$f")&&C)return c.resolved=!0,h&&h(),h=r=s=void 0,Dt(c.effects),y();if(S)return h?x:Q(j=>(h=j,r&&(ge({id:r.id+"f",count:0}),r=void 0),e.fallback),u)})})}})}const Kt=["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"],Wt=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Kt]),qt=new Set(["innerHTML","textContent","innerText","children"]),Gt=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Xt=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 Yt(e,t){const n=Xt[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Qt=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Jt={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Zt(e,t,n){let r=n.length,s=t.length,i=r,o=0,l=0,a=t[s-1].nextSibling,f=null;for(;o<s||l<i;){if(t[o]===n[l]){o++,l++;continue}for(;t[s-1]===n[i-1];)s--,i--;if(s===o){const c=i<r?l?n[l-1].nextSibling:n[i-l]:a;for(;l<i;)e.insertBefore(n[l++],c)}else if(i===l)for(;o<s;)(!f||!f.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[i-1]&&n[l]===t[s-1]){const c=t[--s].nextSibling;e.insertBefore(n[l++],t[o++].nextSibling),e.insertBefore(n[--i],c),t[s]=n[i]}else{if(!f){f=new Map;let u=l;for(;u<i;)f.set(n[u],u++)}const c=f.get(t[o]);if(c!=null)if(l<c&&c<i){let u=o,d=1,h;for(;++u<s&&u<i&&!((h=f.get(t[u]))==null||h!==c+d);)d++;if(d>c-l){const y=t[o];for(;l<c;)e.insertBefore(n[l++],y)}else e.replaceChild(n[l++],t[o++])}else o++;else t[o++].remove()}}}const nt="_$DX_DELEGATE";function Ze(e,t,n,r={}){let s;return Q(i=>{s=i,t===document?e():b(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{s(),t.textContent=""}}function _(e,t,n){let r;const s=()=>{const o=document.createElement("template");return o.innerHTML=e,n?o.content.firstChild.firstChild:o.content.firstChild},i=t?()=>D(()=>document.importNode(r||(r=s()),!0)):()=>(r||(r=s())).cloneNode(!0);return i.cloneNode=i,i}function pt(e,t=window.document){const n=t[nt]||(t[nt]=new Set);for(let r=0,s=e.length;r<s;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,on))}}function k(e,t,n){g.context||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function en(e,t,n,r){g.context||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function we(e,t){g.context||(t==null?e.removeAttribute("class"):e.className=t)}function tn(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const s=n[0];e.addEventListener(t,n[0]=i=>s.call(e,n[1],i))}else e.addEventListener(t,n)}function nn(e,t,n={}){const r=Object.keys(t||{}),s=Object.keys(n);let i,o;for(i=0,o=s.length;i<o;i++){const l=s[i];!l||l==="undefined"||t[l]||(st(e,l,!1),delete n[l])}for(i=0,o=r.length;i<o;i++){const l=r[i],a=!!t[l];!l||l==="undefined"||n[l]===a||!a||(st(e,l,!0),n[l]=a)}return n}function V(e,t,n){if(!t)return n?k(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let s,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)s=t[i],s!==n[i]&&(r.setProperty(i,s),n[i]=s);return n}function X(e,t={},n,r){const s={};return r||T(()=>s.children=ce(e,t.children,s.children)),T(()=>t.ref&&t.ref(e)),T(()=>sn(e,t,n,!0,s,!0)),s}function ae(e,t,n){return D(()=>e(t,n))}function b(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return ce(e,t,r,n);T(s=>ce(e,t(),s,n),r)}function sn(e,t,n,r,s={},i=!1){t||(t={});for(const o in s)if(!(o in t)){if(o==="children")continue;s[o]=rt(e,o,null,s[o],n,i)}for(const o in t){if(o==="children"){r||ce(e,t.children);continue}const l=t[o];s[o]=rt(e,o,l,s[o],n,i)}}function rn(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function st(e,t,n){const r=t.trim().split(/\s+/);for(let s=0,i=r.length;s<i;s++)e.classList.toggle(r[s],n)}function rt(e,t,n,r,s,i){let o,l,a,f,c;if(t==="style")return V(e,n,r);if(t==="classList")return nn(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const u=t.slice(3);r&&e.removeEventListener(u,r),n&&e.addEventListener(u,n)}else if(t.slice(0,10)==="oncapture:"){const u=t.slice(10);r&&e.removeEventListener(u,r,!0),n&&e.addEventListener(u,n,!0)}else if(t.slice(0,2)==="on"){const u=t.slice(2).toLowerCase(),d=Qt.has(u);if(!d&&r){const h=Array.isArray(r)?r[0]:r;e.removeEventListener(u,h)}(d||n)&&(tn(e,u,n,d),d&&pt([u]))}else if(t.slice(0,5)==="attr:")k(e,t.slice(5),n);else if((c=t.slice(0,5)==="prop:")||(a=qt.has(t))||!s&&((f=Yt(t,e.tagName))||(l=Wt.has(t)))||(o=e.nodeName.includes("-"))){if(c)t=t.slice(5),l=!0;else if(g.context)return n;t==="class"||t==="className"?we(e,n):o&&!l&&!a?e[rn(t)]=n:e[f||t]=n}else{const u=s&&t.indexOf(":")>-1&&Jt[t.split(":")[0]];u?en(e,u,t,n):k(e,Gt[t]||t,n)}return n}function on(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}}),g.registry&&!g.done&&(g.done=_$HY.done=!0);n;){const r=n[t];if(r&&!n.disabled){const s=n[`${t}Data`];if(s!==void 0?r.call(n,s,e):r.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function ce(e,t,n,r,s){if(g.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 i=typeof t,o=r!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(g.context)return n;if(i==="number"&&(t=t.toString()),o){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=te(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean"){if(g.context)return n;n=te(e,n,r)}else{if(i==="function")return T(()=>{let l=t();for(;typeof l=="function";)l=l();n=ce(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],a=n&&Array.isArray(n);if(Xe(l,t,n,s))return T(()=>n=ce(e,l,n,r,!0)),()=>n;if(g.context){if(!l.length)return n;if(r===void 0)return[...e.childNodes];let f=l[0],c=[f];for(;(f=f.nextSibling)!==r;)c.push(f);return n=c}if(l.length===0){if(n=te(e,n,r),o)return n}else a?n.length===0?it(e,l,r):Zt(e,n,l):(n&&te(e),it(e,l));n=l}else if(t.nodeType){if(g.context&&t.parentNode)return n=o?[t]:t;if(Array.isArray(n)){if(o)return n=te(e,n,r,t);te(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Xe(e,t,n,r){let s=!1;for(let i=0,o=t.length;i<o;i++){let l=t[i],a=n&&n[i],f;if(!(l==null||l===!0||l===!1))if((f=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))s=Xe(e,l,a)||s;else if(f==="function")if(r){for(;typeof l=="function";)l=l();s=Xe(e,Array.isArray(l)?l:[l],Array.isArray(a)?a:[a])||s}else e.push(l),s=!0;else{const c=String(l);a&&a.nodeType===3&&a.data===c?e.push(a):e.push(document.createTextNode(c))}}return s}function it(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function te(e,t,n,r){if(n===void 0)return e.textContent="";const s=r||document.createTextNode("");if(t.length){let i=!1;for(let o=t.length-1;o>=0;o--){const l=t[o];if(s!==l){const a=l.parentNode===e;!i&&!o?a?e.replaceChild(s,l):e.insertBefore(s,n):a&&l.remove()}else i=!0}}else e.insertBefore(s,n);return[s]}const ln="http://www.w3.org/2000/svg";function an(e,t=!1){return t?document.createElementNS(ln,e):document.createElement(e)}function cn(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,s=Ke();let i,o=!!g.context;return oe(()=>{o&&(Ke().user=o=!1),i||(i=Nt(s,()=>N(()=>e.children)));const l=r();if(l instanceof HTMLHeadElement){const[a,f]=I(!1),c=()=>f(!0);Q(u=>b(l,()=>a()?u():i(),null)),Z(c)}else{const a=an(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,i),l.appendChild(a),e.ref&&e.ref(a),Z(()=>l.removeChild(a))}},void 0,{render:!o}),n}const fn=e=>typeof e=="function",Oe=(e,t)=>fn(e)?e(t):e;var v;(function(e){e[e.ADD_TOAST=0]="ADD_TOAST",e[e.UPDATE_TOAST=1]="UPDATE_TOAST",e[e.UPSERT_TOAST=2]="UPSERT_TOAST",e[e.DISMISS_TOAST=3]="DISMISS_TOAST",e[e.REMOVE_TOAST=4]="REMOVE_TOAST",e[e.START_PAUSE=5]="START_PAUSE",e[e.END_PAUSE=6]="END_PAUSE"})(v||(v={}));const Pe=Symbol("store-raw"),re=Symbol("store-node"),z=Symbol("store-has"),wt=Symbol("store-self");function bt(e){let t=e[F];if(!t&&(Object.defineProperty(e,F,{value:t=new Proxy(e,hn)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let s=0,i=n.length;s<i;s++){const o=n[s];r[o].get&&Object.defineProperty(e,o,{enumerable:r[o].enumerable,get:r[o].get.bind(t)})}}return t}function fe(e){let t;return e!=null&&typeof e=="object"&&(e[F]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function ue(e,t=new Set){let n,r,s,i;if(n=e!=null&&e[Pe])return n;if(!fe(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let o=0,l=e.length;o<l;o++)s=e[o],(r=ue(s,t))!==s&&(e[o]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const o=Object.keys(e),l=Object.getOwnPropertyDescriptors(e);for(let a=0,f=o.length;a<f;a++)i=o[a],!l[i].get&&(s=e[i],(r=ue(s,t))!==s&&(e[i]=r))}return e}function ke(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function pe(e,t,n){if(e[t])return e[t];const[r,s]=I(n,{equals:!1,internal:!0});return r.$=s,e[t]=r}function un(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===F||t===re||(delete n.value,delete n.writable,n.get=()=>e[F][t]),n}function St(e){He()&&pe(ke(e,re),wt)()}function dn(e){return St(e),Reflect.ownKeys(e)}const hn={get(e,t,n){if(t===Pe)return e;if(t===F)return n;if(t===ze)return St(e),n;const r=ke(e,re),s=r[t];let i=s?s():e[t];if(t===re||t===z||t==="__proto__")return i;if(!s){const o=Object.getOwnPropertyDescriptor(e,t);He()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(o&&o.get)&&(i=pe(r,t,i)())}return fe(i)?bt(i):i},has(e,t){return t===Pe||t===F||t===ze||t===re||t===z||t==="__proto__"?!0:(He()&&pe(ke(e,z),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:dn,getOwnPropertyDescriptor:un};function de(e,t,n,r=!1){if(!r&&e[t]===n)return;const s=e[t],i=e.length;n===void 0?(delete e[t],e[z]&&e[z][t]&&s!==void 0&&e[z][t].$()):(e[t]=n,e[z]&&e[z][t]&&s===void 0&&e[z][t].$());let o=ke(e,re),l;if((l=pe(o,t,s))&&l.$(()=>n),Array.isArray(e)&&e.length!==i){for(let a=e.length;a<i;a++)(l=o[a])&&l.$();(l=pe(o,"length",i))&&l.$(e.length)}(l=o[wt])&&l.$()}function At(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const s=n[r];de(e,s,t[s])}}function gn(e,t){if(typeof t=="function"&&(t=t(e)),t=ue(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const s=t[n];e[n]!==s&&de(e,n,s)}de(e,"length",r)}else At(e,t)}function me(e,t,n=[]){let r,s=e;if(t.length>1){r=t.shift();const o=typeof r,l=Array.isArray(e);if(Array.isArray(r)){for(let a=0;a<r.length;a++)me(e,[r[a]].concat(t),n);return}else if(l&&o==="function"){for(let a=0;a<e.length;a++)r(e[a],a)&&me(e,[a].concat(t),n);return}else if(l&&o==="object"){const{from:a=0,to:f=e.length-1,by:c=1}=r;for(let u=a;u<=f;u+=c)me(e,[u].concat(t),n);return}else if(t.length>1){me(e[r],t,[r].concat(n));return}s=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(s,n),i===s)||r===void 0&&i==null||(i=ue(i),r===void 0||fe(s)&&fe(i)&&!Array.isArray(i)?At(s,i):de(e,r,i))}function mn(...[e,t]){const n=ue(e||{}),r=Array.isArray(n),s=bt(n);function i(...o){kt(()=>{r&&o.length===1?gn(n,o[0]):me(n,o)})}return[s,i]}const Ne=new WeakMap,vt={get(e,t){if(t===Pe)return e;const n=e[t];let r;return fe(n)?Ne.get(n)||(Ne.set(n,r=new Proxy(n,vt)),r):n},set(e,t,n){return de(e,t,ue(n)),!0},deleteProperty(e,t){return de(e,t,void 0,!0),!0}};function Ae(e){return t=>{if(fe(t)){let n;(n=Ne.get(t))||Ne.set(t,n=new Proxy(t,vt)),e(n)}return t}}const[J,q]=mn({toasts:[],pausedAt:void 0}),yn=()=>{const{pausedAt:e,toasts:t}=J;if(e)return;const n=Date.now();return t.map(s=>{if(s.duration===1/0)return;const i=(s.duration||0)+s.pauseDuration-(n-s.createdAt);if(i<=0){s.visible&&B({type:v.DISMISS_TOAST,toastId:s.id});return}return setTimeout(()=>{B({type:v.DISMISS_TOAST,toastId:s.id})},i)})},ye=new Map,ot=(e,t)=>{if(ye.has(e))return;const n=setTimeout(()=>{ye.delete(e),B({type:v.REMOVE_TOAST,toastId:e})},t);ye.set(e,n)},pn=e=>{const t=ye.get(e);ye.delete(e),t&&clearTimeout(t)},B=e=>{switch(e.type){case v.ADD_TOAST:q("toasts",s=>{const i=s;return[e.toast,...i]});break;case v.DISMISS_TOAST:const{toastId:t}=e,n=J.toasts;if(t){const s=n.find(i=>i.id===t);s&&ot(t,s.unmountDelay),q("toasts",i=>i.id===t,Ae(i=>i.visible=!1))}else n.forEach(s=>{ot(s.id,s.unmountDelay)}),q("toasts",s=>s.id!==void 0,Ae(s=>s.visible=!1));break;case v.REMOVE_TOAST:if(!e.toastId){q("toasts",[]);break}q("toasts",s=>s.filter(o=>o.id!==e.toastId));break;case v.UPDATE_TOAST:e.toast.id&&pn(e.toast.id),q("toasts",s=>s.id===e.toast.id,s=>({...s,...e.toast}));break;case v.UPSERT_TOAST:J.toasts.find(s=>s.id===e.toast.id)?B({type:v.UPDATE_TOAST,toast:e.toast}):B({type:v.ADD_TOAST,toast:e.toast});break;case v.START_PAUSE:q(Ae(s=>{s.pausedAt=Date.now(),s.toasts.forEach(i=>{i.paused=!0})}));break;case v.END_PAUSE:const r=e.time-(J.pausedAt||0);q(Ae(s=>{s.pausedAt=void 0,s.toasts.forEach(i=>{i.pauseDuration+=r,i.paused=!1})}));break}},wn={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},ie={id:"",icon:"",unmountDelay:500,duration:3e3,ariaProps:{role:"status","aria-live":"polite"},className:"",style:{},position:"top-right",iconTheme:{}},xt={position:"top-right",toastOptions:ie,gutter:8,containerStyle:{},containerClassName:""},ve="16px",bn={position:"fixed","z-index":9999,top:ve,bottom:ve,left:ve,right:ve,"pointer-events":"none"},Sn=(()=>{let e=0;return()=>String(++e)})(),An=e=>{Cn(t=>({containerClassName:e.containerClassName??t.containerClassName,containerStyle:e.containerStyle??t.containerStyle,gutter:e.gutter??t.gutter,position:e.position??t.position,toastOptions:{...e.toastOptions}}))},vn=(e,t)=>{const r=e.includes("top")?{top:0,"margin-top":`${t}px`}:{bottom:0,"margin-bottom":`${t}px`},s=e.includes("center")?{"justify-content":"center"}:e.includes("right")?{"justify-content":"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:"all 230ms cubic-bezier(.21,1.02,.73,1)",...r,...s}},xn=(e,t)=>{const n=e.getBoundingClientRect();n.height!==t.height&&B({type:v.UPDATE_TOAST,toast:{id:t.id,height:n.height}})},$n=(e,t)=>{const{toasts:n}=J,r=ne().gutter||xt.gutter||8,s=n.filter(a=>(a.position||t)===t&&a.height),i=s.findIndex(a=>a.id===e.id),o=s.filter((a,f)=>f<i&&a.visible).length;return s.slice(0,o).reduce((a,f)=>a+r+(f.height||0),0)},Tn=(e,t)=>(e.position||t).includes("top")?1:-1,_n={display:"flex","align-items":"center",color:"#363636",background:"white","box-shadow":"0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05)","max-width":"350px","pointer-events":"auto",padding:"8px 10px","border-radius":"4px","line-height":"1.3","will-change":"transform"},En={display:"flex","align-items":"center",flex:"1 1 auto",margin:"4px 10px","white-space":"pre-line"},xe={"flex-shrink":0,"min-width":"20px","min-height":"20px",display:"flex","align-items":"center","justify-content":"center","text-align":"center"},De=e=>({calcMode:"spline",keyTimes:"0; 1",keySplines:e}),[ne,Cn]=I(xt),On=(e,t="blank",n)=>({...ie,...ne().toastOptions,...n,type:t,message:e,pauseDuration:0,createdAt:Date.now(),visible:!0,id:n.id||Sn(),paused:!1,style:{...ie.style,...ne().toastOptions?.style,...n.style},duration:n.duration||ne().toastOptions?.duration||wn[t],position:n.position||ne().toastOptions?.position||ne().position||ie.position}),be=e=>(t,n={})=>Q(()=>{const r=J.toasts.find(i=>i.id===n.id),s=On(t,e,{...r,duration:void 0,...n});return B({type:v.UPSERT_TOAST,toast:s}),s.id}),L=(e,t)=>be("blank")(e,t);D(()=>L);L.error=be("error");L.success=be("success");L.loading=be("loading");L.custom=be("custom");L.dismiss=e=>{B({type:v.DISMISS_TOAST,toastId:e})};L.promise=(e,t,n)=>{const r=L.loading(t.loading,{...n});return e.then(s=>(L.success(Oe(t.success,s),{id:r,...n}),s)).catch(s=>{L.error(Oe(t.error,s),{id:r,...n})}),e};L.remove=e=>{B({type:v.REMOVE_TOAST,toastId:e})};var Pn=_("<div><style>.sldt-active{z-index:9999;}.sldt-active>*{pointer-events:auto;}");const kn=e=>(oe(()=>{An(e)}),oe(()=>{const t=yn();Z(()=>{t&&t.forEach(n=>n&&clearTimeout(n))})}),(()=>{var t=Pn();return t.firstChild,b(t,m(qe,{get each(){return J.toasts},children:n=>m(In,{toast:n})}),null),T(n=>{var r={...bn,...e.containerStyle},s=e.containerClassName;return n.e=V(t,r,n.e),s!==n.t&&we(t,n.t=s),n},{e:void 0,t:void 0}),t})());var $e=_("<div>"),Nn=_("<div><div>");const Dn=e=>{let t;return oe(()=>{if(!t)return;const n=Tn(e.toast,e.position);e.toast.visible?t.animate([{transform:`translate3d(0,${n*-200}%,0) scale(.6)`,opacity:.5},{transform:"translate3d(0,0,0) scale(1)",opacity:1}],{duration:350,fill:"forwards",easing:"cubic-bezier(.21,1.02,.73,1)"}):t.animate([{transform:"translate3d(0,0,-1px) scale(1)",opacity:1},{transform:`translate3d(0,${n*-150}%,-1px) scale(.4)`,opacity:0}],{duration:400,fill:"forwards",easing:"cubic-bezier(.06,.71,.55,1)"})}),(()=>{var n=Nn(),r=n.firstChild,s=t;return typeof s=="function"?ae(s,n):t=n,b(n,m(Je,{get children(){return[m(G,{get when(){return e.toast.icon},get children(){var i=$e();return b(i,()=>e.toast.icon),T(o=>V(i,xe,o)),i}}),m(G,{get when(){return e.toast.type==="loading"},get children(){var i=$e();return b(i,m(zn,Y(()=>e.toast.iconTheme))),T(o=>V(i,xe,o)),i}}),m(G,{get when(){return e.toast.type==="success"},get children(){var i=$e();return b(i,m(Bn,Y(()=>e.toast.iconTheme))),T(o=>V(i,xe,o)),i}}),m(G,{get when(){return e.toast.type==="error"},get children(){var i=$e();return b(i,m(Un,Y(()=>e.toast.iconTheme))),T(o=>V(i,xe,o)),i}})]}}),r),X(r,Y(()=>e.toast.ariaProps),!1,!0),b(r,()=>Oe(e.toast.message,e.toast)),T(i=>{var o=e.toast.className,l={..._n,...e.toast.style},a=En;return o!==i.e&&we(n,i.e=o),i.t=V(n,l,i.t),i.a=V(r,a,i.a),i},{e:void 0,t:void 0,a:void 0}),n})()};var jn=_("<div>");const In=e=>{const t=()=>{const s=e.toast.position||ie.position,i=$n(e.toast,s);return vn(s,i)},n=N(()=>t());let r;return Ie(()=>{r&&xn(r,e.toast)}),(()=>{var s=jn();s.addEventListener("mouseleave",()=>B({type:v.END_PAUSE,time:Date.now()})),s.addEventListener("mouseenter",()=>B({type:v.START_PAUSE,time:Date.now()}));var i=r;return typeof i=="function"?ae(i,s):r=s,b(s,(()=>{var o=N(()=>e.toast.type==="custom");return()=>o()?Oe(e.toast.message,e.toast):m(Dn,{get toast(){return e.toast},get position(){return e.toast.position||ie.position}})})()),T(o=>{var l=n(),a=e.toast.visible?"sldt-active":"";return o.e=V(s,l,o.e),a!==o.t&&we(s,o.t=a),o},{e:void 0,t:void 0}),s})()};var Mn=_('<svg><circle cx=16 cy=16 r=0><animate attributeName=opacity values="0; 1; 1"></animate><animate attributeName=r values="0; 17.5; 16"></svg>',!1,!0),Ln=_('<svg><circle cx=16 cy=16 r=12 opacity=0><animate attributeName=opacity values="1; 0"></animate><animate attributeName=r values="12; 26"></svg>',!1,!0);const $t=e=>{const t={dur:"0.35s",begin:"100ms",fill:"freeze",calcMode:"spline",keyTimes:"0; 0.6; 1",keySplines:"0.25 0.71 0.4 0.88; .59 .22 .87 .63"};return(()=>{var n=Mn(),r=n.firstChild,s=r.nextSibling;return X(r,t,!0,!1),X(s,t,!0,!1),T(()=>k(n,"fill",e.fill)),n})()},Tt=e=>{const t={dur:"1s",begin:e.begin||"320ms",fill:"freeze",...De("0.0 0.0 0.2 1")};return(()=>{var n=Ln(),r=n.firstChild,s=r.nextSibling;return X(r,t,!0,!1),X(s,t,!0,!1),T(()=>k(n,"fill",e.fill)),n})()};var Rn=_('<svg viewBox="0 0 32 32"width=1.25rem height=1.25rem><path fill=none stroke-width=4 stroke-dasharray=22 stroke-dashoffset=22 stroke-linecap=round stroke-miterlimit=10 d=M9.8,17.2l3.8,3.6c0.1,0.1,0.3,0.1,0.4,0l9.6-9.7><animate attributeName=stroke-dashoffset values=22;0 dur=0.25s begin=250ms fill=freeze>');const Bn=e=>{const t=e.primary||"#34C759";return(()=>{var n=Rn(),r=n.firstChild,s=r.firstChild;return n.style.setProperty("overflow","visible"),b(n,m($t,{fill:t}),r),b(n,m(Tt,{fill:t,begin:"350ms"}),r),X(s,Y(()=>De("0.0, 0.0, 0.58, 1.0")),!0,!1),T(()=>k(r,"stroke",e.secondary||"#FCFCFC")),n})()};var Fn=_('<svg viewBox="0 0 32 32"width=1.25rem height=1.25rem><path fill=none stroke-width=4 stroke-dasharray=9 stroke-dashoffset=9 stroke-linecap=round d=M16,7l0,9><animate attributeName=stroke-dashoffset values=9;0 dur=0.2s begin=250ms fill=freeze></animate></path><circle cx=16 cy=23 r=2.5 opacity=0><animate attributeName=opacity values=0;1 dur=0.25s begin=350ms fill=freeze>');const Un=e=>{const t=e.primary||"#FF3B30";return(()=>{var n=Fn(),r=n.firstChild,s=r.firstChild,i=r.nextSibling,o=i.firstChild;return n.style.setProperty("overflow","visible"),b(n,m($t,{fill:t}),r),b(n,m(Tt,{fill:t}),r),X(s,Y(()=>De("0.0, 0.0, 0.58, 1.0")),!0,!1),X(o,Y(()=>De("0.0, 0.0, 0.58, 1.0")),!0,!1),T(l=>{var a=e.secondary||"#FFFFFF",f=e.secondary||"#FFFFFF";return a!==l.e&&k(r,"stroke",l.e=a),f!==l.t&&k(i,"fill",l.t=f),l},{e:void 0,t:void 0}),n})()};var Vn=_('<svg viewBox="0 0 32 32"width=1.25rem height=1.25rem><path fill=none stroke-width=4 stroke-miterlimit=10 d=M16,6c3,0,5.7,1.3,7.5,3.4c1.5,1.8,2.5,4,2.5,6.6c0,5.5-4.5,10-10,10S6,21.6,6,16S10.5,6,16,6z></path><path fill=none stroke-width=4 stroke-linecap=round stroke-miterlimit=10 d=M16,6c3,0,5.7,1.3,7.5,3.4c0.6,0.7,1.1,1.4,1.5,2.2><animateTransform attributeName=transform type=rotate from="0 16 16"to="360 16 16"dur=0.75s repeatCount=indefinite>');const zn=e=>(()=>{var t=Vn(),n=t.firstChild,r=n.nextSibling;return t.style.setProperty("overflow","visible"),T(s=>{var i=e.primary||"#E5E7EB",o=e.secondary||"#4b5563";return i!==s.e&&k(n,"stroke",s.e=i),o!==s.t&&k(r,"stroke",s.t=o),s},{e:void 0,t:void 0}),t})(),Hn=[{target:"geofs.aircraft.instance",prop:"engines"},{target:"geofs.aircraft.instance",prop:"id"}];function Kn(e){const t=e.split(".");let n=unsafeWindow;for(let r of t)if(n=n[r],n===void 0)throw new Error(`Path ${e} does not exist`);return n}class Ve{static _options={cloneAfterCreation:!1,temp:null};static _props=[];static _cache={};static set props(t){this._props=t}static get props(){return this._props}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,r={}){let s=t;try{if(typeof t=="string")s=Kn(t);else if(typeof t=="object")s=t;else throw new Error("The first argument to parse must be an object or string path.");if(typeof n!="string")throw new Error("The second argument to parse must be a string.");if(s===void 0)throw new Error("Invalid target.");if(n===void 0)throw new Error("Invalid property.");let i=s[n];if(i===void 0)throw new Error("Invalid value.");const[o,l]=I(i),a=r?.cloneAfterCreation!==void 0?r?.cloneAfterCreation:this._options?.cloneAfterCreation;if(o===void 0||l===void 0)throw new Error("Signal not created.");if(Object.defineProperty(s,n,{get:function(){return o()},set:function(f){i=f,l(f)}}),Object.getOwnPropertyDescriptor(s,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.");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(u){c(u)}}),Object.getOwnPropertyDescriptor(this._options.temp,n)===void 0)throw new Error("Reactive property clone not defined.")}return[o,l]}catch(i){console.error(i)}}static all(){try{this._props.forEach(({target:t,prop:n})=>{this.parse(t,n)})}catch(t){console.error(t)}}}var Wn=_('<li class="flex gap-2"><label>Thrust:</label><input type=number min=0 max=30000000 step=100 placeholder="Between 0 and 30000000"class="w-11/12 m-2 border-0 rounded-md p-2 shadow-md">'),qn=_('<li class="flex gap-2"><label>After Burner Thrust:</label><input type=number min=0 max=30000000 step=100 placeholder="Between 0 and 30000000"class="w-11/12 m-2 border-0 rounded-md p-2 shadow-md">'),Gn=_('<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><svg xmlns=http://www.w3.org/2000/svg width=16 height=16 fill=currentColor 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"></path></svg></summary><article class="px-4 pb-4"><ul class="flex flex-col gap-4 pl-2 mt-4">'),Xn=_("<ul class=flight-assistant-item-list>"),Yn=_("<span>Error: "),Qn=_('<details class=group><summary class="flex items-center justify-between gap-2 p-2 font-medium marker:content-none hover:cursor-pointer"><span class="flex gap-2">Engines</span><svg class="w-5 h-5 text-gray-500 transition group-open:rotate-90"xmlns=http://www.w3.org/2000/svg width=16 height=16 fill=currentColor 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"></path></svg></summary><article class="px-4 pb-4"><ul class="flex flex-col gap-4 pl-2 mt-4 flight-assistant-engine-list">'),Jn=_("<div>Engines Loading..."),Zn=_("<li> "),es=_('<ul class="geofs-list geofs-toggle-panel geofs-assistant-list"data-noblur=true data-onshow={geofs.initializePreferencesPanel()} data-onhide={geofs.savePreferencesPanel()}>'),ts=_('<button class="mdl-button mdl-js-button geofs-f-standard-ui"id=assistantbutton tabindex=0 data-upgraded=,MaterialButton data-toggle-panel=.geofs-assistant-list data-tooltip-classname=mdl-tooltip--top title="Flight Assistant">ASSISTANT');const ns=async()=>await new Promise((e,t)=>{const n=flightAssistant.instance.engines,r=[];for(let s=0;s<n.length;s++)r.push((()=>{var i=Gn(),o=i.firstChild,l=o.firstChild,a=l.nextSibling,f=o.nextSibling,c=f.firstChild;return we(i,"group/engine"+s),b(l,m(Je,{get children(){return[m(G,{get when(){return n[s].name},get children(){return n[s].name}}),m(G,{get when(){return!n[s].name},get children(){return["Engine ",s+1]}})]}})),k(a,"class","w-5 h-5 text-gray-500 transition group-open/engine"+s+":rotate-90"),b(c,m(Ge,{get when(){return n[s].thrust},get children(){var u=Wn(),d=u.firstChild,h=d.nextSibling;return k(d,"for",`setEngine${s+1}Thrust`),h.$$input=y=>{y.target.value>0&&y.target.value<=3e7&&(flightAssistant.instance.engines[s].thrust=parseInt(y.target.value))},k(h,"id",`setEngine${s+1}Thrust`),u}}),null),b(c,m(Ge,{get when(){return n[s].afterBurnerThrust},get children(){var u=qn(),d=u.firstChild,h=d.nextSibling;return k(d,"for",`setEngine${s+1}AfterBurnerThrust`),h.$$input=y=>{y.target.value>0&&y.target.value<=3e7&&(flightAssistant.instance.engines[s].afterBurnerThrust=parseInt(y.target.value))},k(h,"id",`setEngine${s+1}AfterBurnerThrust`),u}}),null),i})());e(r)}),ss=e=>{const[t,n]=I();n(flightAssistant.instance.id);const[r,{refetch:s}]=Pt(ns),[i,o]=I([]),[l,a]=I(i.length);let f,c;const u=(...d)=>{let h=d.length;h!==0&&(o([...i(),...d]),a(l()+h))};return e.children&&(Array.isArray(e.children)?u(...e.children):u(e.children)),oe(()=>{const d=flightAssistant.instance.id;t()!==d&&(n(d),setTimeout(()=>{s()},1e3))}),Ie(()=>{flightAssistant.state.itemList=c,flightAssistant.state.engineList=f}),[m(Ge,{get when(){return l()===0},get children(){var d=Xn(),h=c;return typeof h=="function"?ae(h,d):c=d,b(d,m(qe,{get each(){return i()},children:y=>y})),d}}),(()=>{var d=Qn(),h=d.firstChild,y=h.nextSibling,x=y.firstChild,P=f;return typeof P=="function"?ae(P,x):f=x,b(x,m(Ht,{get fallback(){return Jn()},get children(){return m(Je,{get children(){return[m(G,{get when(){return r.error},get children(){var C=Yn();return C.firstChild,b(C,()=>r.error,null),C}}),m(G,{get when(){return r()},get children(){return m(qe,{get each(){return r()},children:C=>(()=>{var S=Zn();return S.firstChild,b(S,C,null),S})()})}})]}})}})),d})()]},rs=e=>{let t;return Ie(()=>{flightAssistant.state.container=t}),Z(()=>{flightAssistant.state.container=null}),(()=>{var n=es(),r=t;return typeof r=="function"?ae(r,n):t=n,b(n,m(ss,{get children(){return e.children}})),n})()},is=e=>{const t=document.querySelector(".geofs-ui-left");Ze(()=>m(rs,e),t)},os=()=>{let e;return Ie(()=>{flightAssistant.state.button=e}),Z(()=>{flightAssistant.state.button=null}),(()=>{var t=ts(),n=e;return typeof n=="function"?ae(n,t):e=t,t})()},ls=()=>{const e=document.querySelector(".geofs-ui-bottom");Ze(()=>m(os,{}),e)};pt(["input"]);const as=()=>m(cn,{get mount(){return document.body},get children(){return m(kn,{position:"top-right",gutter:8,containerClassName:"",containerStyle:{},toastOptions:{className:"",style:{background:"#363636",color:"#fff"}}})}}),cs=()=>{const e={version:GM.info.script.version,state:{},instance:{}};return Ve.options={cloneAfterCreation:!0,temp:e.instance},unsafeWindow.executeOnEventDone("geofsStarted",function(){const t=new Promise((n,r)=>{setTimeout(()=>{try{Ve.props=Hn,Ve.all(),is(),ls(),n("Assistant Started.")}catch(s){r(s)}},5e3)});L.promise(t,{loading:"Assistant is starting..",success:n=>`Success: ${n}`,error:n=>`Error: ${n.message}`})}),unsafeWindow.flightAssistant=e,m(as,{})},fs=document.body;Ze(()=>m(cs,{}),fs);