Experimental Flight Interface

Improve your plane with the interface that offers experimental features.

当前为 2024-02-29 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Experimental Flight Interface
// @namespace    https://github.com/Ferhatduran55/geofs-experimental-fi
// @version      0.7.0
// @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
// @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 b={context:void 0,registry:void 0};function we(e){b.context=e}const Nt=(e,t)=>e===t,K=Symbol("solid-proxy"),Ge=Symbol("solid-track"),ke={equals:Nt};let gt=$t;const Y=1,De=2,mt={owned:null,cleanups:null,context:null,owner:null},Ke={};var S=null;let ae=null,It=null,E=null,M=null,U=null,Ue=0;function ee(e,t){const n=E,r=S,s=e.length===0,i=t===void 0?r:t,o=s?mt:{owned:null,cleanups:null,context:i?i.context:null,owner:i},l=s?e:()=>e(()=>B(()=>He(o)));S=o,E=null;try{return G(l,!0)}finally{E=n,S=r}}function R(e,t){t=t?Object.assign({},ke,t):ke;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),bt(n,s));return[wt.bind(n),r]}function nt(e,t,n){const r=ze(e,t,!0,Y);pe(r)}function P(e,t,n){const r=ze(e,t,!1,Y);pe(r)}function ue(e,t,n){gt=Vt;const r=ze(e,t,!1,Y),s=de&&Ze(de);s&&(r.suspense=s),(!n||!n.render)&&(r.user=!0),U?U.push(r):pe(r)}function L(e,t,n){n=n?Object.assign({},ke,n):ke;const r=ze(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,pe(r),wt.bind(r)}function jt(e){return e&&typeof e=="object"&&"then"in e}function st(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=Ke,a=null,f=!1,c=!1,h="initialValue"in i,g=typeof r=="function"&&L(r);const m=new Set,[d,u]=(i.storage||R)(i.initialValue),[y,v]=R(void 0),[p,x]=R(void 0,{equals:!1}),[$,A]=R(h?"ready":"unresolved");if(b.context){a=`${b.context.id}${b.context.count++}`;let C;i.ssrLoadFrom==="initial"?l=i.initialValue:b.load&&(C=b.load(a))&&(l=C)}function I(C,N,j,ie){return o===C&&(o=null,ie!==void 0&&(h=!0),(C===l||N===l)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(ie,{value:N})),l=Ke,F(N,j)),N}function F(C,N){G(()=>{N===void 0&&u(()=>C),A(N!==void 0?"errored":h?"ready":"unresolved"),v(N);for(const j of m.keys())j.decrement();m.clear()},!1)}function re(){const C=de&&Ze(de),N=d(),j=y();if(j!==void 0&&!o)throw j;return E&&!E.user&&C&&nt(()=>{p(),o&&(C.resolved&&ae&&f?ae.promises.add(o):m.has(C)||(C.increment(),m.add(C)))}),N}function z(C=!0){if(C!==!1&&c)return;c=!1;const N=g?g():r;if(f=ae,N==null||N===!1){I(o,B(d));return}const j=l!==Ke?l:B(()=>s(N,{value:d(),refetching:C}));return jt(j)?(o=j,"value"in j?(j.status==="success"?I(o,j.value,void 0,N):I(o,void 0,void 0,N),j):(c=!0,queueMicrotask(()=>c=!1),G(()=>{A(h?"refreshing":"pending"),x()},!1),j.then(ie=>I(j,ie,void 0,N),ie=>I(j,void 0,xt(ie),N)))):(I(o,j,void 0,N),j)}return Object.defineProperties(re,{state:{get:()=>$()},error:{get:()=>y()},loading:{get(){const C=$();return C==="pending"||C==="refreshing"}},latest:{get(){if(!h)return re();const C=y();if(C&&!o)throw C;return d()}}}),g?nt(()=>z(!1)):z(!1),[re,{refetch:z,mutate:u}]}function Mt(e){return G(e,!1)}function B(e){if(E===null)return e();const t=E;E=null;try{return e()}finally{E=t}}function Ve(e){ue(()=>B(e))}function se(e){return S===null||(S.cleanups===null?S.cleanups=[e]:S.cleanups.push(e)),e}function Xe(){return E}function Ye(){return S}function Lt(e,t){const n=S,r=E;S=e,E=null;try{return G(t,!0)}catch(s){et(s)}finally{S=n,E=r}}function Bt(e){U.push.apply(U,e),e.length=0}function yt(e,t){const n=Symbol("context");return{id:n,Provider:zt(n),defaultValue:e}}function Ze(e){return S&&S.context&&S.context[e.id]!==void 0?S.context[e.id]:e.defaultValue}function pt(e){const t=L(e),n=L(()=>Qe(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let de;function Rt(){return de||(de=yt())}function wt(){if(this.sources&&this.state)if(this.state===Y)pe(this);else{const e=M;M=null,G(()=>Ie(this),!1),M=e}if(E){const e=this.observers?this.observers.length:0;E.sources?(E.sources.push(this),E.sourceSlots.push(e)):(E.sources=[this],E.sourceSlots=[e]),this.observers?(this.observers.push(E),this.observerSlots.push(E.sources.length-1)):(this.observers=[E],this.observerSlots=[E.sources.length-1])}return this.value}function bt(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&G(()=>{for(let s=0;s<e.observers.length;s+=1){const i=e.observers[s],o=ae&&ae.running;o&&ae.disposed.has(i),(o?!i.tState:!i.state)&&(i.pure?M.push(i):U.push(i),i.observers&&vt(i)),o||(i.state=Y)}if(M.length>1e6)throw M=[],new Error},!1)),t}function pe(e){if(!e.fn)return;He(e);const t=Ue;Ft(e,e.value,t)}function Ft(e,t,n){let r;const s=S,i=E;E=S=e;try{r=e.fn(t)}catch(o){return e.pure&&(e.state=Y,e.owned&&e.owned.forEach(He),e.owned=null),e.updatedAt=n+1,et(o)}finally{E=i,S=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?bt(e,r):e.value=r,e.updatedAt=n)}function ze(e,t,n,r=Y,s){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:S,context:S?S.context:null,pure:n};return S===null||S!==mt&&(S.owned?S.owned.push(i):S.owned=[i]),i}function Ne(e){if(e.state===0)return;if(e.state===De)return Ie(e);if(e.suspense&&B(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ue);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Y)pe(e);else if(e.state===De){const r=M;M=null,G(()=>Ie(e,t[0]),!1),M=r}}function G(e,t){if(M)return e();let n=!1;t||(M=[]),U?n=!0:U=[],Ue++;try{const r=e();return Ut(n),r}catch(r){n||(U=null),M=null,et(r)}}function Ut(e){if(M&&($t(M),M=null),e)return;const t=U;U=null,t.length&&G(()=>gt(t),!1)}function $t(e){for(let t=0;t<e.length;t++)Ne(e[t])}function Vt(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ne(r)}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);we()}for(t=0;t<n;t++)Ne(e[t])}function Ie(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===Y?r!==t&&(!r.updatedAt||r.updatedAt<Ue)&&Ne(r):s===De&&Ie(r,t)}}}function vt(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=De,n.pure?M.push(n):U.push(n),n.observers&&vt(n))}}function He(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--)He(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 xt(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function et(e,t=S){throw xt(e)}function Qe(e){if(typeof e=="function"&&!e.length)return Qe(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Qe(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function zt(e,t){return function(r){let s;return P(()=>s=B(()=>(S.context={...S.context,[e]:r.value},pt(()=>r.children))),void 0),s}}const Ht=Symbol("fallback");function rt(e){for(let t=0;t<e.length;t++)e[t]()}function Kt(e,t,n={}){let r=[],s=[],i=[],o=0,l=t.length>1?[]:null;return se(()=>rt(i)),()=>{let a=e()||[],f,c;return a[Ge],B(()=>{let g=a.length,m,d,u,y,v,p,x,$,A;if(g===0)o!==0&&(rt(i),i=[],r=[],s=[],o=0,l&&(l=[])),n.fallback&&(r=[Ht],s[0]=ee(I=>(i[0]=I,n.fallback())),o=1);else if(o===0){for(s=new Array(g),c=0;c<g;c++)r[c]=a[c],s[c]=ee(h);o=g}else{for(u=new Array(g),y=new Array(g),l&&(v=new Array(g)),p=0,x=Math.min(o,g);p<x&&r[p]===a[p];p++);for(x=o-1,$=g-1;x>=p&&$>=p&&r[x]===a[$];x--,$--)u[$]=s[x],y[$]=i[x],l&&(v[$]=l[x]);for(m=new Map,d=new Array($+1),c=$;c>=p;c--)A=a[c],f=m.get(A),d[c]=f===void 0?-1:f,m.set(A,c);for(f=p;f<=x;f++)A=r[f],c=m.get(A),c!==void 0&&c!==-1?(u[c]=s[f],y[c]=i[f],l&&(v[c]=l[f]),c=d[c],m.set(A,c)):i[f]();for(c=p;c<g;c++)c in u?(s[c]=u[c],i[c]=y[c],l&&(l[c]=v[c],l[c](c))):s[c]=ee(h);s=s.slice(0,o=g),r=a.slice(0)}return s});function h(g){if(i[c]=g,l){const[m,d]=R(c);return l[c]=d,t(a[c],m)}return t(a[c])}}}function w(e,t){return B(()=>e(t||{}))}function Ae(){return!0}const Wt={get(e,t,n){return t===K?n:e.get(t)},has(e,t){return t===K?!0:e.has(t)},set:Ae,deleteProperty:Ae,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ae,deleteProperty:Ae}},ownKeys(e){return e.keys()}};function We(e){return(e=typeof e=="function"?e():e)?e:{}}function qt(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Z(...e){let t=!1;for(let o=0;o<e.length;o++){const l=e[o];t=t||!!l&&K in l,e[o]=typeof l=="function"?(t=!0,L(l)):l}if(t)return new Proxy({get(o){for(let l=e.length-1;l>=0;l--){const a=We(e[l])[o];if(a!==void 0)return a}},has(o){for(let l=e.length-1;l>=0;l--)if(o in We(e[l]))return!0;return!1},keys(){const o=[];for(let l=0;l<e.length;l++)o.push(...Object.keys(We(e[l])));return[...new Set(o)]}},Wt);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 h=Object.getOwnPropertyDescriptor(l,c);if(!r[c])r[c]=h.get?{enumerable:!0,configurable:!0,get:qt.bind(n[c]=[h.get.bind(l)])}:h.value!==void 0?h:void 0;else{const g=n[c];g&&(h.get?g.push(h.get.bind(l)):h.value!==void 0&&g.push(()=>h.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 St=e=>`Stale read from <${e}>.`;function Oe(e){const t="fallback"in e&&{fallback:()=>e.fallback};return L(Kt(()=>e.each,e.children,t||void 0))}function Pe(e){const t=e.keyed,n=L(()=>e.when,void 0,{equals:(r,s)=>t?r===s:!r==!s});return L(()=>{const r=n();if(r){const s=e.children;return typeof s=="function"&&s.length>0?B(()=>s(t?r:()=>{if(!B(n))throw St("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=pt(()=>e.children),s=L(()=>{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 L(()=>{const[i,o,l]=s();if(i<0)return e.fallback;const a=l.children;return typeof a=="function"&&a.length>0?B(()=>a(t?o:()=>{if(B(s)[0]!==i)throw St("Match");return l.when})):a},void 0,void 0)}function H(e){return e}const Gt=yt();function it(e){let t=0,n,r,s,i,o;const[l,a]=R(!1),f=Rt(),c={increment:()=>{++t===1&&a(!0)},decrement:()=>{--t===0&&a(!1)},inFallback:l,effects:[],resolved:!1},h=Ye();if(b.context&&b.load){const d=b.context.id+b.context.count;let u=b.load(d);if(u&&(typeof u!="object"||u.status!=="success")&&(s=u),s&&s!=="$$f"){const[y,v]=R(void 0,{equals:!1});i=y,s.then(()=>{b.gather(d),we(r),v(),we()}).catch(p=>{if(p||b.done)return p&&(o=p),v()})}}const g=Ze(Gt);g&&(n=g.register(c.inFallback));let m;return se(()=>m&&m()),w(f.Provider,{value:c,get children(){return L(()=>{if(o)throw o;if(r=b.context,i)return i(),i=void 0;r&&s==="$$f"&&we();const d=L(()=>e.children);return L(u=>{const y=c.inFallback(),{showContent:v=!0,showFallback:p=!0}=n?n():{};if((!y||s&&s!=="$$f")&&v)return c.resolved=!0,m&&m(),m=r=s=void 0,Bt(c.effects),d();if(p)return m?u:ee(x=>(m=x,r&&(we({id:r.id+"f",count:0}),r=void 0),e.fallback),h)})})}})}const Xt=["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"],Yt=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Xt]),Qt=new Set(["innerHTML","textContent","innerText","children"]),Jt=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Zt=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 en(e,t){const n=Zt[e];return typeof n=="object"?n[t]?n.$:void 0:n}const tn=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),nn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function sn(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 h=l;for(;h<i;)f.set(n[h],h++)}const c=f.get(t[o]);if(c!=null)if(l<c&&c<i){let h=o,g=1,m;for(;++h<s&&h<i&&!((m=f.get(t[h]))==null||m!==c+g);)g++;if(g>c-l){const d=t[o];for(;l<c;)e.insertBefore(n[l++],d)}else e.replaceChild(n[l++],t[o++])}else o++;else t[o++].remove()}}}const ot="_$DX_DELEGATE";function tt(e,t,n,r={}){let s;return ee(i=>{s=i,t===document?e():T(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{s(),t.textContent=""}}function O(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?()=>B(()=>document.importNode(r||(r=s()),!0)):()=>(r||(r=s())).cloneNode(!0);return i.cloneNode=i,i}function At(e,t=window.document){const n=t[ot]||(t[ot]=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,fn))}}function _(e,t,n){b.context||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function rn(e,t,n,r){b.context||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function xe(e,t){b.context||(t==null?e.removeAttribute("class"):e.className=t)}function on(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 ln(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]||(lt(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||(lt(e,l,!0),n[l]=a)}return n}function W(e,t,n){if(!t)return n?_(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||P(()=>s.children=he(e,t.children,s.children)),P(()=>t.ref&&t.ref(e)),P(()=>an(e,t,n,!0,s,!0)),s}function te(e,t,n){return B(()=>e(t,n))}function T(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return he(e,t,r,n);P(s=>he(e,t(),s,n),r)}function an(e,t,n,r,s={},i=!1){t||(t={});for(const o in s)if(!(o in t)){if(o==="children")continue;s[o]=at(e,o,null,s[o],n,i)}for(const o in t){if(o==="children"){r||he(e,t.children);continue}const l=t[o];s[o]=at(e,o,l,s[o],n,i)}}function cn(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function lt(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 at(e,t,n,r,s,i){let o,l,a,f,c;if(t==="style")return W(e,n,r);if(t==="classList")return ln(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const h=t.slice(3);r&&e.removeEventListener(h,r),n&&e.addEventListener(h,n)}else if(t.slice(0,10)==="oncapture:"){const h=t.slice(10);r&&e.removeEventListener(h,r,!0),n&&e.addEventListener(h,n,!0)}else if(t.slice(0,2)==="on"){const h=t.slice(2).toLowerCase(),g=tn.has(h);if(!g&&r){const m=Array.isArray(r)?r[0]:r;e.removeEventListener(h,m)}(g||n)&&(on(e,h,n,g),g&&At([h]))}else if(t.slice(0,5)==="attr:")_(e,t.slice(5),n);else if((c=t.slice(0,5)==="prop:")||(a=Qt.has(t))||!s&&((f=en(t,e.tagName))||(l=Yt.has(t)))||(o=e.nodeName.includes("-"))){if(c)t=t.slice(5),l=!0;else if(b.context)return n;t==="class"||t==="className"?xe(e,n):o&&!l&&!a?e[cn(t)]=n:e[f||t]=n}else{const h=s&&t.indexOf(":")>-1&&nn[t.split(":")[0]];h?rn(e,h,t,n):_(e,Jt[t]||t,n)}return n}function fn(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 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 he(e,t,n,r,s){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 i=typeof t,o=r!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(b.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=oe(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(b.context)return n;n=oe(e,n,r)}else{if(i==="function")return P(()=>{let l=t();for(;typeof l=="function";)l=l();n=he(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],a=n&&Array.isArray(n);if(Je(l,t,n,s))return P(()=>n=he(e,l,n,r,!0)),()=>n;if(b.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=oe(e,n,r),o)return n}else a?n.length===0?ct(e,l,r):sn(e,n,l):(n&&oe(e),ct(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=oe(e,n,r,t);oe(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Je(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=Je(e,l,a)||s;else if(f==="function")if(r){for(;typeof l=="function";)l=l();s=Je(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 ct(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function oe(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 un="http://www.w3.org/2000/svg";function dn(e,t=!1){return t?document.createElementNS(un,e):document.createElement(e)}function hn(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,s=Ye();let i,o=!!b.context;return ue(()=>{o&&(Ye().user=o=!1),i||(i=Lt(s,()=>L(()=>e.children)));const l=r();if(l instanceof HTMLHeadElement){const[a,f]=R(!1),c=()=>f(!0);ee(h=>T(l,()=>a()?h():i(),null)),se(c)}else{const a=dn(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}),T(f,i),l.appendChild(a),e.ref&&e.ref(a),se(()=>l.removeChild(a))}},void 0,{render:!o}),n}const gn=e=>typeof e=="function",Me=(e,t)=>gn(e)?e(t):e;var k;(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"})(k||(k={}));const Le=Symbol("store-raw"),ce=Symbol("store-node"),q=Symbol("store-has"),Tt=Symbol("store-self");function _t(e){let t=e[K];if(!t&&(Object.defineProperty(e,K,{value:t=new Proxy(e,pn)}),!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 ge(e){let t;return e!=null&&typeof e=="object"&&(e[K]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function me(e,t=new Set){let n,r,s,i;if(n=e!=null&&e[Le])return n;if(!ge(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=me(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=me(s,t))!==s&&(e[i]=r))}return e}function Be(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function ve(e,t,n){if(e[t])return e[t];const[r,s]=R(n,{equals:!1,internal:!0});return r.$=s,e[t]=r}function mn(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===K||t===ce||(delete n.value,delete n.writable,n.get=()=>e[K][t]),n}function Et(e){Xe()&&ve(Be(e,ce),Tt)()}function yn(e){return Et(e),Reflect.ownKeys(e)}const pn={get(e,t,n){if(t===Le)return e;if(t===K)return n;if(t===Ge)return Et(e),n;const r=Be(e,ce),s=r[t];let i=s?s():e[t];if(t===ce||t===q||t==="__proto__")return i;if(!s){const o=Object.getOwnPropertyDescriptor(e,t);Xe()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(o&&o.get)&&(i=ve(r,t,i)())}return ge(i)?_t(i):i},has(e,t){return t===Le||t===K||t===Ge||t===ce||t===q||t==="__proto__"?!0:(Xe()&&ve(Be(e,q),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:yn,getOwnPropertyDescriptor:mn};function ye(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[q]&&e[q][t]&&s!==void 0&&e[q][t].$()):(e[t]=n,e[q]&&e[q][t]&&s===void 0&&e[q][t].$());let o=Be(e,ce),l;if((l=ve(o,t,s))&&l.$(()=>n),Array.isArray(e)&&e.length!==i){for(let a=e.length;a<i;a++)(l=o[a])&&l.$();(l=ve(o,"length",i))&&l.$(e.length)}(l=o[Tt])&&l.$()}function Ct(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const s=n[r];ye(e,s,t[s])}}function wn(e,t){if(typeof t=="function"&&(t=t(e)),t=me(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&&ye(e,n,s)}ye(e,"length",r)}else Ct(e,t)}function be(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++)be(e,[r[a]].concat(t),n);return}else if(l&&o==="function"){for(let a=0;a<e.length;a++)r(e[a],a)&&be(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 h=a;h<=f;h+=c)be(e,[h].concat(t),n);return}else if(t.length>1){be(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=me(i),r===void 0||ge(s)&&ge(i)&&!Array.isArray(i)?Ct(s,i):ye(e,r,i))}function bn(...[e,t]){const n=me(e||{}),r=Array.isArray(n),s=_t(n);function i(...o){Mt(()=>{r&&o.length===1?wn(n,o[0]):be(n,o)})}return[s,i]}const Re=new WeakMap,Ot={get(e,t){if(t===Le)return e;const n=e[t];let r;return ge(n)?Re.get(n)||(Re.set(n,r=new Proxy(n,Ot)),r):n},set(e,t,n){return ye(e,t,me(n)),!0},deleteProperty(e,t){return ye(e,t,void 0,!0),!0}};function Te(e){return t=>{if(ge(t)){let n;(n=Re.get(t))||Re.set(t,n=new Proxy(t,Ot)),e(n)}return t}}const[ne,Q]=bn({toasts:[],pausedAt:void 0}),$n=()=>{const{pausedAt:e,toasts:t}=ne;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&&V({type:k.DISMISS_TOAST,toastId:s.id});return}return setTimeout(()=>{V({type:k.DISMISS_TOAST,toastId:s.id})},i)})},$e=new Map,ft=(e,t)=>{if($e.has(e))return;const n=setTimeout(()=>{$e.delete(e),V({type:k.REMOVE_TOAST,toastId:e})},t);$e.set(e,n)},vn=e=>{const t=$e.get(e);$e.delete(e),t&&clearTimeout(t)},V=e=>{switch(e.type){case k.ADD_TOAST:Q("toasts",s=>{const i=s;return[e.toast,...i]});break;case k.DISMISS_TOAST:const{toastId:t}=e,n=ne.toasts;if(t){const s=n.find(i=>i.id===t);s&&ft(t,s.unmountDelay),Q("toasts",i=>i.id===t,Te(i=>i.visible=!1))}else n.forEach(s=>{ft(s.id,s.unmountDelay)}),Q("toasts",s=>s.id!==void 0,Te(s=>s.visible=!1));break;case k.REMOVE_TOAST:if(!e.toastId){Q("toasts",[]);break}Q("toasts",s=>s.filter(o=>o.id!==e.toastId));break;case k.UPDATE_TOAST:e.toast.id&&vn(e.toast.id),Q("toasts",s=>s.id===e.toast.id,s=>({...s,...e.toast}));break;case k.UPSERT_TOAST:ne.toasts.find(s=>s.id===e.toast.id)?V({type:k.UPDATE_TOAST,toast:e.toast}):V({type:k.ADD_TOAST,toast:e.toast});break;case k.START_PAUSE:Q(Te(s=>{s.pausedAt=Date.now(),s.toasts.forEach(i=>{i.paused=!0})}));break;case k.END_PAUSE:const r=e.time-(ne.pausedAt||0);Q(Te(s=>{s.pausedAt=void 0,s.toasts.forEach(i=>{i.pauseDuration+=r,i.paused=!1})}));break}},xn={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},fe={id:"",icon:"",unmountDelay:500,duration:3e3,ariaProps:{role:"status","aria-live":"polite"},className:"",style:{},position:"top-right",iconTheme:{}},Pt={position:"top-right",toastOptions:fe,gutter:8,containerStyle:{},containerClassName:""},_e="16px",Sn={position:"fixed","z-index":9999,top:_e,bottom:_e,left:_e,right:_e,"pointer-events":"none"},An=(()=>{let e=0;return()=>String(++e)})(),Tn=e=>{Dn(t=>({containerClassName:e.containerClassName??t.containerClassName,containerStyle:e.containerStyle??t.containerStyle,gutter:e.gutter??t.gutter,position:e.position??t.position,toastOptions:{...e.toastOptions}}))},_n=(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}},En=(e,t)=>{const n=e.getBoundingClientRect();n.height!==t.height&&V({type:k.UPDATE_TOAST,toast:{id:t.id,height:n.height}})},Cn=(e,t)=>{const{toasts:n}=ne,r=le().gutter||Pt.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)},On=(e,t)=>(e.position||t).includes("top")?1:-1,Pn={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"},kn={display:"flex","align-items":"center",flex:"1 1 auto",margin:"4px 10px","white-space":"pre-line"},Ee={"flex-shrink":0,"min-width":"20px","min-height":"20px",display:"flex","align-items":"center","justify-content":"center","text-align":"center"},Fe=e=>({calcMode:"spline",keyTimes:"0; 1",keySplines:e}),[le,Dn]=R(Pt),Nn=(e,t="blank",n)=>({...fe,...le().toastOptions,...n,type:t,message:e,pauseDuration:0,createdAt:Date.now(),visible:!0,id:n.id||An(),paused:!1,style:{...fe.style,...le().toastOptions?.style,...n.style},duration:n.duration||le().toastOptions?.duration||xn[t],position:n.position||le().toastOptions?.position||le().position||fe.position}),Se=e=>(t,n={})=>ee(()=>{const r=ne.toasts.find(i=>i.id===n.id),s=Nn(t,e,{...r,duration:void 0,...n});return V({type:k.UPSERT_TOAST,toast:s}),s.id}),D=(e,t)=>Se("blank")(e,t);B(()=>D);D.error=Se("error");D.success=Se("success");D.loading=Se("loading");D.custom=Se("custom");D.dismiss=e=>{V({type:k.DISMISS_TOAST,toastId:e})};D.promise=(e,t,n)=>{const r=D.loading(t.loading,{...n});return e.then(s=>(D.success(Me(t.success,s),{id:r,...n}),s)).catch(s=>{D.error(Me(t.error,s),{id:r,...n})}),e};D.remove=e=>{V({type:k.REMOVE_TOAST,toastId:e})};var In=O("<div><style>.sldt-active{z-index:9999;}.sldt-active>*{pointer-events:auto;}");const jn=e=>(ue(()=>{Tn(e)}),ue(()=>{const t=$n();se(()=>{t&&t.forEach(n=>n&&clearTimeout(n))})}),(()=>{var t=In();return t.firstChild,T(t,w(Oe,{get each(){return ne.toasts},children:n=>w(Rn,{toast:n})}),null),P(n=>{var r={...Sn,...e.containerStyle},s=e.containerClassName;return n.e=W(t,r,n.e),s!==n.t&&xe(t,n.t=s),n},{e:void 0,t:void 0}),t})());var Ce=O("<div>"),Mn=O("<div><div>");const Ln=e=>{let t;return ue(()=>{if(!t)return;const n=On(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=Mn(),r=n.firstChild,s=t;return typeof s=="function"?te(s,n):t=n,T(n,w(je,{get children(){return[w(H,{get when(){return e.toast.icon},get children(){var i=Ce();return T(i,()=>e.toast.icon),P(o=>W(i,Ee,o)),i}}),w(H,{get when(){return e.toast.type==="loading"},get children(){var i=Ce();return T(i,w(qn,Z(()=>e.toast.iconTheme))),P(o=>W(i,Ee,o)),i}}),w(H,{get when(){return e.toast.type==="success"},get children(){var i=Ce();return T(i,w(zn,Z(()=>e.toast.iconTheme))),P(o=>W(i,Ee,o)),i}}),w(H,{get when(){return e.toast.type==="error"},get children(){var i=Ce();return T(i,w(Kn,Z(()=>e.toast.iconTheme))),P(o=>W(i,Ee,o)),i}})]}}),r),X(r,Z(()=>e.toast.ariaProps),!1,!0),T(r,()=>Me(e.toast.message,e.toast)),P(i=>{var o=e.toast.className,l={...Pn,...e.toast.style},a=kn;return o!==i.e&&xe(n,i.e=o),i.t=W(n,l,i.t),i.a=W(r,a,i.a),i},{e:void 0,t:void 0,a:void 0}),n})()};var Bn=O("<div>");const Rn=e=>{const t=()=>{const s=e.toast.position||fe.position,i=Cn(e.toast,s);return _n(s,i)},n=L(()=>t());let r;return Ve(()=>{r&&En(r,e.toast)}),(()=>{var s=Bn();s.addEventListener("mouseleave",()=>V({type:k.END_PAUSE,time:Date.now()})),s.addEventListener("mouseenter",()=>V({type:k.START_PAUSE,time:Date.now()}));var i=r;return typeof i=="function"?te(i,s):r=s,T(s,(()=>{var o=L(()=>e.toast.type==="custom");return()=>o()?Me(e.toast.message,e.toast):w(Ln,{get toast(){return e.toast},get position(){return e.toast.position||fe.position}})})()),P(o=>{var l=n(),a=e.toast.visible?"sldt-active":"";return o.e=W(s,l,o.e),a!==o.t&&xe(s,o.t=a),o},{e:void 0,t:void 0}),s})()};var Fn=O('<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),Un=O('<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 kt=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=Fn(),r=n.firstChild,s=r.nextSibling;return X(r,t,!0,!1),X(s,t,!0,!1),P(()=>_(n,"fill",e.fill)),n})()},Dt=e=>{const t={dur:"1s",begin:e.begin||"320ms",fill:"freeze",...Fe("0.0 0.0 0.2 1")};return(()=>{var n=Un(),r=n.firstChild,s=r.nextSibling;return X(r,t,!0,!1),X(s,t,!0,!1),P(()=>_(n,"fill",e.fill)),n})()};var Vn=O('<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 zn=e=>{const t=e.primary||"#34C759";return(()=>{var n=Vn(),r=n.firstChild,s=r.firstChild;return n.style.setProperty("overflow","visible"),T(n,w(kt,{fill:t}),r),T(n,w(Dt,{fill:t,begin:"350ms"}),r),X(s,Z(()=>Fe("0.0, 0.0, 0.58, 1.0")),!0,!1),P(()=>_(r,"stroke",e.secondary||"#FCFCFC")),n})()};var Hn=O('<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 Kn=e=>{const t=e.primary||"#FF3B30";return(()=>{var n=Hn(),r=n.firstChild,s=r.firstChild,i=r.nextSibling,o=i.firstChild;return n.style.setProperty("overflow","visible"),T(n,w(kt,{fill:t}),r),T(n,w(Dt,{fill:t}),r),X(s,Z(()=>Fe("0.0, 0.0, 0.58, 1.0")),!0,!1),X(o,Z(()=>Fe("0.0, 0.0, 0.58, 1.0")),!0,!1),P(l=>{var a=e.secondary||"#FFFFFF",f=e.secondary||"#FFFFFF";return a!==l.e&&_(r,"stroke",l.e=a),f!==l.t&&_(i,"fill",l.t=f),l},{e:void 0,t:void 0}),n})()};var Wn=O('<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 qn=e=>(()=>{var t=Wn(),n=t.firstChild,r=n.nextSibling;return t.style.setProperty("overflow","visible"),P(s=>{var i=e.primary||"#E5E7EB",o=e.secondary||"#4b5563";return i!==s.e&&_(n,"stroke",s.e=i),o!==s.t&&_(r,"stroke",s.t=o),s},{e:void 0,t:void 0}),t})(),Gn=[{target:"geofs.aircraft.instance",prop:"engines"},{target:"geofs.aircraft.instance",prop:"id"},{target:"geofs.aircraft.instance",prop:"definition"}];function Xn(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 qe{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=Xn(t);else if(typeof t=="object")s=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(s===void 0)throw new Error("Invalid target.",s);if(n===void 0)throw new Error("Invalid property.",n);let i=s[n];if(i===void 0)throw new Error("Invalid value.",i);const[o,l]=R(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.",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(h){c(h)}}),Object.getOwnPropertyDescriptor(this._options.temp,n)===void 0)throw new Error("Reactive property clone not defined.",n)}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)}}}const ut=[{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"}],Yn=["object","function","undefined","null","boolean","symbol","array"];var Qn=O('<li class="flex gap-2"><label>:</label><input>'),Jn=O('<li class="flex gap-2"><label>Thrust:</label><input type=number min=0 step=100 class="w-11/12 m-2 border-0 rounded-md p-2 shadow-md">'),Zn=O('<li class="flex gap-2"><label>After Burner Thrust:</label><input type=number min=0 step=100 class="w-11/12 m-2 border-0 rounded-md p-2 shadow-md">'),es=O('<li class="flex gap-2"><label>Reverse Thrust:</label><input type=number min=0 step=100 class="w-11/12 m-2 border-0 rounded-md p-2 shadow-md">'),ts=O('<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">'),ns=O("<ul class=flight-assistant-item-list>"),dt=O("<span>Error: "),ss=O('<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">Definitions</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-definition-list">'),rs=O('<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">'),is=O("<div>Definitions Loading..."),ht=O("<li> <!> "),os=O("<div>Engines Loading..."),ls=O('<ul class="geofs-list geofs-toggle-panel geofs-assistant-list"data-noblur=true data-onshow={geofs.initializePreferencesPanel()} data-onhide={geofs.savePreferencesPanel()}>'),as=O('<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 J={duration:2e3},cs=async()=>await new Promise((e,t)=>{try{const n=flightAssistant.instance.definition;if(!n)throw new Error("No definition found.");const r=[];for(const s of Object.entries(n)){const[i,o]=s,l=typeof o;if(Yn.includes(l)||!ut.some(u=>u.name===i))continue;const f=ut.find(u=>u.name===i).type;if(!f)continue;const c=["int","float","number"].includes(f)||l==="number",h=f==="int",g=f==="float",m=f==="string";let d={};m?d.placeholder="Text":c&&(d.min=0,d.max=o*2,d.step=h?"1":g?"0.2":null,d.placeholder=`Between ${d.min} and ${d.max}`),r.push((()=>{var u=Qn(),y=u.firstChild,v=y.firstChild,p=y.nextSibling;return _(y,"for",`set${i}`),T(y,i,v),_(p,"id",`set${i}`),_(p,"type",c?"number":m?"text":null),X(p,Z(d,{class:"w-11/12 m-2 border-0 rounded-md p-2 shadow-md",oninput:async x=>{let $=x.target,A,I,F;c?(I=parseFloat($.min),F=parseFloat($.max),A=parseFloat($.value)):(I=$.min,F=$.max,A=$.value);let re=$.type;await new Promise((z,C)=>{re=="number"&&A>I&&A<=F?(x.target.max=A*2*100,flightAssistant.instance.definition[i]=A,$.placeholder=`Between ${I} and ${F}`,z(`${i} set to ${A}`)):re=="text"&&!A?(flightAssistant.instance.definition[i]=A,z(`${i} set to ${A}`)):C(c?`Value must be between ${I} and ${F}`:m?"Value must be text":"Invalid value")}).then(z=>D.success(z,J)).catch(z=>D.error(z,J))}}),!1,!1),u})())}e(r)}catch(n){t(n)}}),fs=async()=>await new Promise((e,t)=>{const n=flightAssistant.instance.engines,r=[];for(let s=0;s<n.length;s++)r.push((()=>{var i=ts(),o=i.firstChild,l=o.firstChild,a=l.nextSibling,f=o.nextSibling,c=f.firstChild;return xe(i,"group/engine"+s),T(l,w(je,{get children(){return[w(H,{get when(){return n[s].name},get children(){return n[s].name}}),w(H,{get when(){return!n[s].name},get children(){return["Engine ",s+1]}})]}})),_(a,"class","w-5 h-5 text-gray-500 transition group-open/engine"+s+":rotate-90"),T(c,w(Pe,{get when(){return n[s].thrust},get children(){var h=Jn(),g=h.firstChild,m=g.nextSibling;return _(g,"for",`setEngine${s+1}Thrust`),m.$$input=async d=>{let u=parseInt(d.target.value),y=parseInt(d.target.min),v=parseInt(d.target.max);await new Promise((p,x)=>{u>y&&u<=v?(d.target.max=u*2*100,flightAssistant.instance.engines[s].thrust=u,d.target.placeholder=`Between ${y} and ${v}`,p(`${n[s].name} thrust set to ${u}`)):x(`Value must be between ${y} and ${v}`)}).then(p=>D.success(p,J)).catch(p=>D.error(p,J))},_(m,"id",`setEngine${s+1}Thrust`),P(d=>{var u=n[s].thrust*2*100,y=`Between 0 and ${n[s].thrust*2*100}`;return u!==d.e&&_(m,"max",d.e=u),y!==d.t&&_(m,"placeholder",d.t=y),d},{e:void 0,t:void 0}),h}}),null),T(c,w(Pe,{get when(){return n[s].afterBurnerThrust},get children(){var h=Zn(),g=h.firstChild,m=g.nextSibling;return _(g,"for",`setEngine${s+1}AfterBurnerThrust`),m.$$input=async d=>{let u=parseInt(d.target.value),y=parseInt(d.target.min),v=parseInt(d.target.max);await new Promise((p,x)=>{u>y&&u<=v?(d.target.max=u*2*100,flightAssistant.instance.engines[s].afterBurnerThrust=u,d.target.placeholder=`Between ${y} and ${v}`,p(`${n[s].name} after burner thrust set to ${u}`)):x(`Value must be between ${y} and ${v}`)}).then(p=>D.success(p,J)).catch(p=>D.error(p,J))},_(m,"id",`setEngine${s+1}AfterBurnerThrust`),P(d=>{var u=n[s].afterBurnerThrust*2*100,y=`Between 0 and ${n[s].afterBurnerThrust*2*100}`;return u!==d.e&&_(m,"max",d.e=u),y!==d.t&&_(m,"placeholder",d.t=y),d},{e:void 0,t:void 0}),h}}),null),T(c,w(Pe,{get when(){return n[s].reverseThrust},get children(){var h=es(),g=h.firstChild,m=g.nextSibling;return _(g,"for",`setEngine${s+1}ReverseThrust`),m.$$input=async d=>{let u=parseInt(d.target.value),y=parseInt(d.target.min),v=parseInt(d.target.max);await new Promise((p,x)=>{u>y&&u<=v?(d.target.max=u*2*100,flightAssistant.instance.engines[s].reverseThrust=u,d.target.placeholder=`Between ${y} and ${v}`,p(`${n[s].name} reverse thrust set to ${u}`)):x(`Value must be between ${y} and ${v}`)}).then(p=>D.success(p,J)).catch(p=>D.error(p,J))},_(m,"id",`setEngine${s+1}ReverseThrust`),P(d=>{var u=n[s].reverseThrust*2*100,y=`Between 0 and ${n[s].reverseThrust*2*100}`;return u!==d.e&&_(m,"max",d.e=u),y!==d.t&&_(m,"placeholder",d.t=y),d},{e:void 0,t:void 0}),h}}),null),i})());e(r)}),us=e=>{const[t,n]=R();n(flightAssistant.instance.id);const[r,s={refetch}]=st(fs),[i,o={refetch}]=st(cs),[l,a]=R([]),[f,c]=R(l.length);let h,g,m;const d=(...u)=>{let y=u.length;y!==0&&(a([...l(),...u]),c(f()+y))};return e.children&&(Array.isArray(e.children)?d(...e.children):d(e.children)),ue(()=>{const u=flightAssistant.instance.id;t()!==u&&(n(u),setTimeout(()=>{s.refetch(),o.refetch()},1e3))}),Ve(()=>{flightAssistant.state.itemList=m,flightAssistant.state.definitionList=h,flightAssistant.state.engineList=g}),[w(Pe,{get when(){return f()===0},get children(){var u=ns(),y=m;return typeof y=="function"?te(y,u):m=u,T(u,w(Oe,{get each(){return l()},children:v=>v})),u}}),(()=>{var u=ss(),y=u.firstChild,v=y.nextSibling,p=v.firstChild,x=h;return typeof x=="function"?te(x,p):h=p,T(p,w(it,{get fallback(){return is()},get children(){return w(je,{get children(){return[w(H,{get when(){return i.error},get children(){var $=dt();return $.firstChild,T($,()=>i.error,null),$}}),w(H,{get when(){return i()},get children(){return w(Oe,{get each(){return i()},children:$=>(()=>{var A=ht(),I=A.firstChild,F=I.nextSibling;return F.nextSibling,T(A,$,F),A})()})}})]}})}})),u})(),(()=>{var u=rs(),y=u.firstChild,v=y.nextSibling,p=v.firstChild,x=g;return typeof x=="function"?te(x,p):g=p,T(p,w(it,{get fallback(){return os()},get children(){return w(je,{get children(){return[w(H,{get when(){return r.error},get children(){var $=dt();return $.firstChild,T($,()=>r.error,null),$}}),w(H,{get when(){return r()},get children(){return w(Oe,{get each(){return r()},children:$=>(()=>{var A=ht(),I=A.firstChild,F=I.nextSibling;return F.nextSibling,T(A,$,F),A})()})}})]}})}})),u})()]},ds=e=>{let t;return Ve(()=>{flightAssistant.state.container=t}),se(()=>{flightAssistant.state.container=null}),(()=>{var n=ls(),r=t;return typeof r=="function"?te(r,n):t=n,T(n,w(us,{get children(){return e.children}})),n})()},hs=e=>{const t=document.querySelector(".geofs-ui-left");tt(()=>w(ds,e),t)},gs=()=>{let e;return Ve(()=>{flightAssistant.state.button=e}),se(()=>{flightAssistant.state.button=null}),(()=>{var t=as(),n=e;return typeof n=="function"?te(n,t):e=t,t})()},ms=()=>{const e=document.querySelector(".geofs-ui-bottom");tt(()=>w(gs,{}),e)};At(["input"]);const ys=()=>w(hn,{get mount(){return document.body},get children(){return w(jn,{position:"top-right",gutter:8,containerClassName:"",containerStyle:{},toastOptions:{className:"",style:{background:"#363636",color:"#fff"}}})}}),ps=()=>{const e={version:GM.info.script.version,state:{},instance:{}};return qe.options={cloneAfterCreation:!0,temp:e.instance},unsafeWindow.executeOnEventDone("geofsStarted",function(){const t=new Promise((n,r)=>{setTimeout(()=>{try{qe.props=Gn,qe.all(),hs(),ms(),n("Assistant Started.")}catch(s){r(s)}},5e3)});D.promise(t,{loading:"Assistant is starting..",success:n=>`Success: ${n}`,error:n=>`Error: ${n.message}`})}),unsafeWindow.flightAssistant=e,w(ys,{})},ws=document.body;tt(()=>w(ps,{}),ws);