free-coding-models 0.5.30 → 0.5.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,40 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function E(e,t){return T(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ie(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ie(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=ie(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=ie(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ie(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function oe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var k=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},A={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=A,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ee.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return T(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ee.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return T(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:oe}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,k)}catch(e){k(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}var S=!1,C=-1,w=5,ee=-1;function T(){return g?!0:!(e.unstable_now()-ee<w)}function E(){if(g=!1,S){var t=e.unstable_now();ee=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&T());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(E)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,te=O.port2;O.port1.onmessage=E,D=function(){te.postMessage(null)}}else D=function(){_(E,0)};function ne(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),T=Symbol.for(`react.suspense_list`),E=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),te=Symbol.for(`react.memo_cache_sentinel`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var ie=Symbol.for(`react.client.reference`);function ae(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case ee:return`Suspense`;case T:return`SuspenseList`;case O:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case E:return t=e.displayName||null,t===null?ae(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}var oe=Array.isArray,k=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ce=[],le=-1;function j(e){return{current:e}}function ue(e){0>le||(e.current=ce[le],ce[le]=null,le--)}function M(e,t){le++,ce[le]=e.current,e.current=t}var de=j(null),fe=j(null),pe=j(null),me=j(null);function he(e,t){switch(M(pe,t),M(fe,e),M(de,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ue(de),M(de,e)}function ge(){ue(de),ue(fe),ue(pe)}function _e(e){e.memoizedState!==null&&M(me,e);var t=de.current,n=Hd(t,e.type);t!==n&&(M(fe,e),M(de,n))}function ve(e){fe.current===e&&(ue(de),ue(fe)),me.current===e&&(ue(me),Qf._currentValue=se)}var ye,be;function xe(e){if(ye===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ye=t&&t[1]||``,be=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+ye+e+be}var Se=!1;function Ce(e,t){if(!e||Se)return``;Se=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?xe(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe(`Lazy`);case 13:return e.child!==t&&t!==null?xe(`Suspense Fallback`):xe(`Suspense`);case 19:return xe(`SuspenseList`);case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return xe(`Activity`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Ee=Object.prototype.hasOwnProperty,De=t.unstable_scheduleCallback,Oe=t.unstable_cancelCallback,ke=t.unstable_shouldYield,Ae=t.unstable_requestPaint,je=t.unstable_now,Me=t.unstable_getCurrentPriorityLevel,Ne=t.unstable_ImmediatePriority,Pe=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,Ie=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Re=t.log,ze=t.unstable_setDisableYieldValue,Be=null,Ve=null;function He(e){if(typeof Re==`function`&&ze(e),Ve&&typeof Ve.setStrictMode==`function`)try{Ve.setStrictMode(Be,e)}catch{}}var Ue=Math.clz32?Math.clz32:Ke,We=Math.log,Ge=Math.LN2;function Ke(e){return e>>>=0,e===0?32:31-(We(e)/Ge|0)|0}var qe=256,Je=262144,Ye=4194304;function Xe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Xe(n))):i=Xe(o):i=Xe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Xe(n))):i=Xe(o)):i=Xe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $e(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function et(){var e=Ye;return Ye<<=1,!(Ye&62914560)&&(Ye=4194304),e}function tt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function nt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ue(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&it(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function it(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ue(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function at(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ue(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ot(e,t){var n=t&-t;return n=n&42?1:st(n),(n&(e.suspendedLanes|t))===0?n:0}function st(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ct(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function lt(){var e=A.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ut(e,t){var n=A.p;try{return A.p=e,t()}finally{A.p=n}}var dt=Math.random().toString(36).slice(2),ft=`__reactFiber$`+dt,pt=`__reactProps$`+dt,N=`__reactContainer$`+dt,mt=`__reactEvents$`+dt,ht=`__reactListeners$`+dt,gt=`__reactHandles$`+dt,_t=`__reactResources$`+dt,vt=`__reactMarker$`+dt;function yt(e){delete e[ft],delete e[pt],delete e[mt],delete e[ht],delete e[gt]}function bt(e){var t=e[ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[N]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[ft])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function xt(e){if(e=e[ft]||e[N]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function St(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ct(e){var t=e[_t];return t||=e[_t]={hoistableStyles:new Map,hoistableScripts:new Map},t}function wt(e){e[vt]=!0}var Tt=new Set,Et={};function Dt(e,t){Ot(e,t),Ot(e+`Capture`,t)}function Ot(e,t){for(Et[e]=t,e=0;e<t.length;e++)Tt.add(t[e])}var kt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),At={},jt={};function Mt(e){return Ee.call(jt,e)?!0:Ee.call(At,e)?!1:kt.test(e)?jt[e]=!0:(At[e]=!0,!1)}function Nt(e,t,n){if(Mt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Pt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ft(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function It(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Lt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Rt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zt(e){if(!e._valueTracker){var t=Lt(e)?`checked`:`value`;e._valueTracker=Rt(e,t,``+e[t])}}function Bt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Lt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Vt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ht=/[\n"\\]/g;function Ut(e){return e.replace(Ht,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Wt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+It(t)):e.value!==``+It(t)&&(e.value=``+It(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Kt(e,o,It(n)):Kt(e,o,It(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+It(s):e.removeAttribute(`name`)}function Gt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){zt(e);return}n=n==null?``:``+It(n),t=t==null?n:``+It(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),zt(e)}function Kt(e,t,n){t===`number`&&Vt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function qt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+It(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Jt(e,t,n){if(t!=null&&(t=``+It(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+It(n)}function Yt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(oe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=It(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),zt(e)}function Xt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Qt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function $t(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Qt(e,o,t[o])}function en(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var tn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),nn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function rn(e){return nn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function an(){}var on=null;function sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cn=null,ln=null;function un(e){var t=xt(e);if(t&&(e=t.stateNode)){var n=e[pt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Wt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Ut(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[pt]||null;if(!a)throw Error(i(90));Wt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Bt(r)}break a;case`textarea`:Jt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&qt(e,!!n.multiple,t,!1)}}}var dn=!1;function fn(e,t,n){if(dn)return e(t,n);dn=!0;try{return e(t)}finally{if(dn=!1,(cn!==null||ln!==null)&&(vu(),cn&&(t=cn,e=ln,ln=cn=null,un(t),e)))for(t=0;t<e.length;t++)un(e[t])}}function pn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[pt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var mn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),hn=!1;if(mn)try{var gn={};Object.defineProperty(gn,"passive",{get:function(){hn=!0}}),window.addEventListener(`test`,gn,gn),window.removeEventListener(`test`,gn,gn)}catch{hn=!1}var _n=null,vn=null,yn=null;function bn(){if(yn)return yn;var e,t=vn,n=t.length,r,i=`value`in _n?_n.value:_n.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return yn=i.slice(e,1<r?1-r:void 0)}function xn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Sn(){return!0}function Cn(){return!1}function wn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Sn:Cn,this.isPropagationStopped=Cn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Sn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Sn)},persist:function(){},isPersistent:Sn}),t}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},En=wn(Tn),Dn=m({},Tn,{view:0,detail:0}),On=wn(Dn),kn,An,jn,Mn=m({},Dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==jn&&(jn&&e.type===`mousemove`?(kn=e.screenX-jn.screenX,An=e.screenY-jn.screenY):An=kn=0,jn=e),kn)},movementY:function(e){return`movementY`in e?e.movementY:An}}),Nn=wn(Mn),Pn=wn(m({},Mn,{dataTransfer:0})),Fn=wn(m({},Dn,{relatedTarget:0})),In=wn(m({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0})),Ln=wn(m({},Tn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),P=wn(m({},Tn,{data:0})),Rn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},zn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Bn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Vn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bn[e])?!!t[e]:!1}function Hn(){return Vn}var Un=wn(m({},Dn,{key:function(e){if(e.key){var t=Rn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=xn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hn,charCode:function(e){return e.type===`keypress`?xn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?xn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Wn=wn(m({},Mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Gn=wn(m({},Dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hn})),Kn=wn(m({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),qn=wn(m({},Mn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Jn=wn(m({},Tn,{newState:0,oldState:0})),Yn=[9,13,27,32],Xn=mn&&`CompositionEvent`in window,Zn=null;mn&&`documentMode`in document&&(Zn=document.documentMode);var Qn=mn&&`TextEvent`in window&&!Zn,$n=mn&&(!Xn||Zn&&8<Zn&&11>=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ir=!1;function ar(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function or(e,t){if(ir)return e===`compositionend`||!Xn&&nr(e,t)?(e=bn(),yn=vn=_n=null,ir=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return $n&&t.locale!==`ko`?null:t.data;default:return null}}var sr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!sr[e.type]:t===`textarea`}function lr(e,t,n,r){cn?ln?ln.push(r):ln=[r]:cn=r,t=Td(t,`onChange`),0<t.length&&(n=new En(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ur=null,dr=null;function fr(e){vd(e,0)}function pr(e){if(Bt(St(e)))return e}function mr(e,t){if(e===`change`)return t}var hr=!1;if(mn){var gr;if(mn){var _r=`oninput`in document;if(!_r){var vr=document.createElement(`div`);vr.setAttribute(`oninput`,`return;`),_r=typeof vr.oninput==`function`}gr=_r}else gr=!1;hr=gr&&(!document.documentMode||9<document.documentMode)}function yr(){ur&&(ur.detachEvent(`onpropertychange`,br),dr=ur=null)}function br(e){if(e.propertyName===`value`&&pr(dr)){var t=[];lr(t,dr,e,sn(e)),fn(fr,t)}}function xr(e,t,n){e===`focusin`?(yr(),ur=t,dr=n,ur.attachEvent(`onpropertychange`,br)):e===`focusout`&&yr()}function Sr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return pr(dr)}function Cr(e,t){if(e===`click`)return pr(t)}function wr(e,t){if(e===`input`||e===`change`)return pr(t)}function Tr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Er=typeof Object.is==`function`?Object.is:Tr;function Dr(e,t){if(Er(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ee.call(t,i)||!Er(e[i],t[i]))return!1}return!0}function Or(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kr(e,t){var n=Or(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Or(n)}}function Ar(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ar(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vt(e.document)}return t}function Mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Nr=mn&&`documentMode`in document&&11>=document.documentMode,Pr=null,Fr=null,Ir=null,Lr=!1;function Rr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lr||Pr==null||Pr!==Vt(r)||(r=Pr,`selectionStart`in r&&Mr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ir&&Dr(Ir,r)||(Ir=r,r=Td(Fr,`onSelect`),0<r.length&&(t=new En(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Pr)))}function zr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Br={animationend:zr(`Animation`,`AnimationEnd`),animationiteration:zr(`Animation`,`AnimationIteration`),animationstart:zr(`Animation`,`AnimationStart`),transitionrun:zr(`Transition`,`TransitionRun`),transitionstart:zr(`Transition`,`TransitionStart`),transitioncancel:zr(`Transition`,`TransitionCancel`),transitionend:zr(`Transition`,`TransitionEnd`)},Vr={},Hr={};mn&&(Hr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Br.animationend.animation,delete Br.animationiteration.animation,delete Br.animationstart.animation),`TransitionEvent`in window||delete Br.transitionend.transition);function Ur(e){if(Vr[e])return Vr[e];if(!Br[e])return e;var t=Br[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Hr)return Vr[e]=t[n];return e}var Wr=Ur(`animationend`),Gr=Ur(`animationiteration`),Kr=Ur(`animationstart`),qr=Ur(`transitionrun`),Jr=Ur(`transitionstart`),Yr=Ur(`transitioncancel`),Xr=Ur(`transitionend`),Zr=new Map,Qr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Qr.push(`scrollEnd`);function $r(e,t){Zr.set(e,t),Dt(t,[e])}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ei=[],I=0,ti=0;function ni(){for(var e=I,t=ti=I=0;t<e;){var n=ei[t];ei[t++]=null;var r=ei[t];ei[t++]=null;var i=ei[t];ei[t++]=null;var a=ei[t];if(ei[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&oi(n,i,a)}}function ri(e,t,n,r){ei[I++]=e,ei[I++]=t,ei[I++]=n,ei[I++]=r,ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ii(e,t,n,r){return ri(e,t,n,r),si(e)}function ai(e,t){return ri(e,null,null,t),si(e)}function oi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ue(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function si(e){if(50<lu)throw lu=0,uu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ci={};function li(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ui(e,t,n,r){return new li(e,t,n,r)}function di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var n=e.alternate;return n===null?(n=ui(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function pi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function mi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)di(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,de.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case O:return e=ui(31,n,t,a),e.elementType=O,e.lanes=o,e;case y:return hi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ui(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case ee:return e=ui(13,n,t,a),e.elementType=ee,e.lanes=o,e;case T:return e=ui(19,n,t,a),e.elementType=T,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case E:s=14;break a;case D:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ui(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function hi(e,t,n,r){return e=ui(7,e,r,t),e.lanes=n,e}function gi(e,t,n){return e=ui(6,e,null,t),e.lanes=n,e}function _i(e){var t=ui(18,null,null,0);return t.stateNode=e,t}function vi(e,t,n){return t=ui(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var yi=new WeakMap;function bi(e,t){if(typeof e==`object`&&e){var n=yi.get(e);return n===void 0?(t={value:e,source:t,stack:Te(t)},yi.set(e,t),t):n}return{value:e,source:t,stack:Te(t)}}var xi=[],Si=0,Ci=null,wi=0,Ti=[],Ei=0,Di=null,Oi=1,ki=``;function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ci,Ci=e,wi=t}function ji(e,t,n){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Di=e;var r=Oi;e=ki;var i=32-Ue(r)-1;r&=~(1<<i),n+=1;var a=32-Ue(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Oi=1<<32-Ue(t)+i|n<<i|r,ki=a+e}else Oi=1<<a|n<<i|r,ki=e}function Mi(e){e.return!==null&&(Ai(e,1),ji(e,1,0))}function Ni(e){for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null;for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,ki=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null}function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Oi=t.id,ki=t.overflow,Di=e}var Fi=null,Ii=null,L=!1,Li=null,Ri=!1,zi=Error(i(519));function Bi(e){throw Ki(bi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function Vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ft]=e,t[pt]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),Gt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Yt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=an),t=!0):t=!1,t||Bi(e,!0)}function Hi(e){for(Fi=e.return;Fi;)switch(Fi.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:Fi=Fi.return}}function Ui(e){if(e!==Fi)return!1;if(!L)return Hi(e),L=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Ii&&Bi(e),Hi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=uf(e)}else t===27?(t=Ii,Zd(e.type)?(e=lf,lf=null,Ii=e):Ii=t):Ii=Fi?cf(e.stateNode.nextSibling):null;return!0}function Wi(){Ii=Fi=null,L=!1}function Gi(){var e=Li;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),Li=null),e}function Ki(e){Li===null?Li=[e]:Li.push(e)}var qi=j(null),Ji=null,Yi=null;function Xi(e,t,n){M(qi,t._currentValue),t._currentValue=n}function Zi(e){e._currentValue=qi.current,ue(qi)}function R(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Qi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),R(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),R(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function $i(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Er(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===me.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Qi(t,e,n,r),t.flags|=262144}function ea(e){for(e=e.firstContext;e!==null;){if(!Er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ta(e){Ji=e,Yi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function na(e){return ia(Ji,e)}function ra(e,t){return Ji===null&&ta(e),ia(e,t)}function ia(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Yi===null){if(e===null)throw Error(i(308));Yi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yi=Yi.next=t;return n}var aa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},oa=t.unstable_scheduleCallback,sa=t.unstable_NormalPriority,ca={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function la(){return{controller:new aa,data:new Map,refCount:0}}function ua(e){e.refCount--,e.refCount===0&&oa(sa,function(){e.controller.abort()})}var da=null,fa=0,z=0,B=null;function pa(e,t){if(da===null){var n=da=[];fa=0,z=ud(),B={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return fa++,t.then(ma,ma),t}function ma(){if(--fa===0&&da!==null){B!==null&&(B.status=`fulfilled`);var e=da;da=null,z=0,B=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ga=k.S;k.S=function(e,t){Ql=je(),typeof t==`object`&&t&&typeof t.then==`function`&&pa(e,t),ga!==null&&ga(e,t)};var _a=j(null);function va(){var e=_a.current;return e===null?Fl.pooledCache:e}function ya(e,t){t===null?M(_a,_a.current):M(_a,t.pool)}function ba(){var e=va();return e===null?null:{parent:ca._currentValue,pool:e}}var xa=Error(i(460)),Sa=Error(i(474)),Ca=Error(i(542)),wa={then:function(){}};function Ta(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ea(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(an,an),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e;default:if(typeof t.status==`string`)t.then(an,an);else{if(e=Fl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e}throw Oa=t,xa}}function Da(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Oa=e,xa):e}}var Oa=null;function ka(){if(Oa===null)throw Error(i(459));var e=Oa;return Oa=null,e}function Aa(e){if(e===xa||e===Ca)throw Error(i(483))}var ja=null,Ma=0;function Na(e){var t=Ma;return Ma+=1,ja===null&&(ja=[]),Ea(ja,e,t)}function Pa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Fa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ia(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=gi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===D&&Da(i)===t.type)?(t=a(t,n.props),Pa(t,n),t.return=e,t):(t=mi(n.type,n.key,n.props,null,e.mode,r),Pa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=vi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=hi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=gi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=mi(t.type,t.key,t.props,null,e.mode,n),Pa(n,t),n.return=e,n;case v:return t=vi(t,e.mode,n),t.return=e,t;case D:return t=Da(t),f(e,t,n)}if(oe(t)||re(t))return t=hi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Na(t),n);if(t.$$typeof===C)return f(e,ra(e,t),n);Fa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case D:return n=Da(n),p(e,t,n,r)}if(oe(n)||re(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Na(n),r);if(n.$$typeof===C)return p(e,t,ra(e,n),r);Fa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case D:return r=Da(r),m(e,t,n,r,i)}if(oe(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Na(r),i);if(r.$$typeof===C)return m(e,t,n,ra(t,r),i);Fa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),L&&Ai(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return L&&Ai(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),L&&Ai(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),L&&Ai(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return L&&Ai(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),L&&Ai(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&Da(l)===r.type){n(e,r.sibling),c=a(r,o.props),Pa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=hi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=mi(o.type,o.key,o.props,null,e.mode,c),Pa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=vi(o,e.mode,c),c.return=e,e=c}return s(e);case D:return o=Da(o),b(e,r,o,c)}if(oe(o))return h(e,r,o,c);if(re(o)){if(l=re(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Na(o),c);if(o.$$typeof===C)return b(e,r,ra(e,o),c);Fa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ma=0;var i=b(e,t,n,r);return ja=null,i}catch(t){if(t===xa||t===Ca)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var La=Ia(!0),Ra=Ia(!1),za=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function Wa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}function Ga(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ka=!1;function qa(){if(Ka){var e=B;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Q&f)===f:(r&f)===f){f!==0&&f===z&&(Ka=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:za=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ul|=o,e.lanes=o,e.memoizedState=d}}function Ya(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ya(n[e],t)}var Za=j(null),Qa=j(0);function $a(e,t){e=Vl,M(Qa,e),M(Za,t),Vl=e|t.baseLanes}function eo(){M(Qa,Vl),M(Za,Za.current)}function to(){Vl=Qa.current,ue(Za),ue(Qa)}var no=j(null),ro=null;function io(e){var t=e.alternate;M(lo,lo.current&1),M(no,e),ro===null&&(t===null||Za.current!==null||t.memoizedState!==null)&&(ro=e)}function ao(e){M(lo,lo.current),M(no,e),ro===null&&(ro=e)}function oo(e){e.tag===22?(M(lo,lo.current),M(no,e),ro===null&&(ro=e)):so(e)}function so(){M(lo,lo.current),M(no,no.current)}function co(e){ue(no),ro===e&&(ro=null),ue(lo)}var lo=j(0);function uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fo=0,V=null,po=null,mo=null,ho=!1,go=!1,_o=!1,vo=0,yo=0,bo=null,xo=0;function So(){throw Error(i(321))}function Co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}function wo(e,t,n,r,i,a){return fo=a,V=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Rs:zs,_o=!1,a=n(r,i),_o=!1,go&&(a=Eo(t,n,r,i)),To(e),a}function To(e){k.H=Ls;var t=po!==null&&po.next!==null;if(fo=0,mo=po=V=null,ho=!1,yo=0,bo=null,t)throw Error(i(300));e===null||K||(e=e.dependencies,e!==null&&ea(e)&&(K=!0))}function Eo(e,t,n,r){V=e;var a=0;do{if(go&&(bo=null),yo=0,go=!1,25<=a)throw Error(i(301));if(a+=1,mo=po=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}k.H=Bs,o=t(n,r)}while(go);return o}function Do(){var e=k.H,t=e.useState()[0];return t=typeof t.then==`function`?Po(t):t,e=e.useState()[0],(po===null?null:po.memoizedState)!==e&&(V.flags|=1024),t}function Oo(){var e=vo!==0;return vo=0,e}function ko(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ao(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}fo=0,mo=po=V=null,go=!1,yo=vo=0,bo=null}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mo===null?V.memoizedState=mo=e:mo=mo.next=e,mo}function Mo(){if(po===null){var e=V.alternate;e=e===null?null:e.memoizedState}else e=po.next;var t=mo===null?V.memoizedState:mo.next;if(t!==null)mo=t,po=e;else{if(e===null)throw V.alternate===null?Error(i(467)):Error(i(310));po=e,e={memoizedState:po.memoizedState,baseState:po.baseState,baseQueue:po.baseQueue,queue:po.queue,next:null},mo===null?V.memoizedState=mo=e:mo=mo.next=e}return mo}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Po(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=Ea(bo,e,t),t=V,(mo===null?t.memoizedState:mo.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Rs:zs),e}function Fo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Po(e);if(e.$$typeof===C)return na(e)}throw Error(i(438,String(e)))}function Io(e){var t=null,n=V.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=V.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=No(),V.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=te;return t.index++,n}function Lo(e,t){return typeof t==`function`?t(e):t}function Ro(e){return zo(Mo(),po,e)}function zo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(fo&f)===f:(Q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===z&&(d=!0);else if((fo&p)===p){u=u.next,p===z&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,V.lanes|=p,Ul|=p;f=u.action,_o&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,V.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Er(o,e.memoizedState)&&(K=!0,d&&(n=B,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Bo(e){var t=Mo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Er(o,t.memoizedState)||(K=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Vo(e,t,n){var r=V,a=Mo(),o=L;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Er((po||a).memoizedState,n);if(s&&(a.memoizedState=n,K=!0),a=a.queue,fs(Wo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||mo!==null&&mo.memoizedState.tag&1){if(r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,a,n,t),null),Fl===null)throw Error(i(349));o||fo&127||Ho(r,t,n)}return n}function Ho(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=V.updateQueue,t===null?(t=No(),V.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Uo(e,t,n,r){t.value=n,t.getSnapshot=r,Go(t)&&Ko(e)}function Wo(e,t,n){return n(function(){Go(t)&&Ko(e)})}function Go(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Er(e,n)}catch{return!0}}function Ko(e){var t=ai(e,2);t!==null&&pu(t,e,2)}function qo(e){var t=jo();if(typeof e==`function`){var n=e;if(e=n(),_o){He(!0);try{n()}finally{He(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:e},t}function Jo(e,t,n,r){return e.baseState=n,zo(e,po,typeof r==`function`?r:Lo)}function Yo(e,t,n,r,a){if(Ps(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};k.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Xo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Xo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=k.T,o={};k.T=o;try{var s=n(i,r),c=k.S;c!==null&&c(o,s),Zo(e,t,s)}catch(n){$o(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),k.T=a}}else try{a=n(i,r),Zo(e,t,a)}catch(n){$o(e,t,n)}}function Zo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Qo(e,t,n)},function(n){return $o(e,t,n)}):Qo(e,t,n)}function Qo(e,t,n){t.status=`fulfilled`,t.value=n,es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Xo(e,n)))}function $o(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,es(t),t=t.next;while(t!==r)}e.action=null}function es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ts(e,t){return t}function ns(e,t){if(L){var n=Fl.formState;if(n!==null){a:{var r=V;if(L){if(Ii){b:{for(var i=Ii,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ii=cf(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=jo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:t},n.queue=r,n=js.bind(null,V,r),r.dispatch=n,r=qo(!1),a=Ns.bind(null,V,!1,r.queue),r=jo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Yo.bind(null,V,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function rs(e){return is(Mo(),po,e)}function is(e,t,n){if(t=zo(e,t,ts)[0],e=Ro(Lo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Po(t)}catch(e){throw e===xa?Ca:e}else r=t;t=Mo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(V.flags|=2048,ss(9,{destroy:void 0},as.bind(null,i,n),null)),[r,a,e]}function as(e,t){e.action=t}function os(e){var t=Mo(),n=po;if(n!==null)return is(t,n,e);Mo(),t=t.memoizedState,n=Mo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=V.updateQueue,t===null&&(t=No(),V.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function cs(){return Mo().memoizedState}function ls(e,t,n,r){var i=jo();V.flags|=e,i.memoizedState=ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function us(e,t,n,r){var i=Mo();r=r===void 0?null:r;var a=i.memoizedState.inst;po!==null&&r!==null&&Co(r,po.memoizedState.deps)?i.memoizedState=ss(t,a,n,r):(V.flags|=e,i.memoizedState=ss(1|t,a,n,r))}function ds(e,t){ls(8390656,8,e,t)}function fs(e,t){us(2048,8,e,t)}function ps(e){V.flags|=4;var t=V.updateQueue;if(t===null)t=No(),V.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ms(e){var t=Mo().memoizedState;return ps({ref:t,nextImpl:e}),function(){if(Pl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function hs(e,t){return us(4,2,e,t)}function gs(e,t){return us(4,4,e,t)}function _s(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vs(e,t,n){n=n==null?null:n.concat([e]),us(4,4,_s.bind(null,t,e),n)}function ys(){}function bs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Co(t,r[1]))return r[0];if(r=e(),_o){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r}function H(e,t,n){return n===void 0||fo&1073741824&&!(Q&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),V.lanes|=e,Ul|=e,n)}function Ss(e,t,n,r){return Er(n,t)?n:Za.current===null?!(fo&42)||fo&1073741824&&!(Q&261930)?(K=!0,e.memoizedState=n):(e=fu(),V.lanes|=e,Ul|=e,t):(e=H(e,n,r),Er(e,t)||(K=!0),e)}function Cs(e,t,n,r,i){var a=A.p;A.p=a!==0&&8>a?a:8;var o=k.T,s={};k.T=s,Ns(e,!1,t,n);try{var c=i(),l=k.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ms(e,t,ha(c,r),du(e)):Ms(e,t,r,du(e))}catch(n){Ms(e,t,{then:function(){},status:`rejected`,reason:n},du())}finally{A.p=a,o!==null&&s.types!==null&&(o.types=s.types),k.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,se,n===null?ws:function(){return U(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function U(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},du())}function Ds(){return na(Qf)}function Os(){return Mo().memoizedState}function W(){return Mo().memoizedState}function ks(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=Ha(n);var r=Ua(t,e,n);r!==null&&(pu(r,t,n),Wa(r,t,n)),t={cache:la()},e.payload=t;return}t=t.return}}function As(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=ii(e,t,n,r),n!==null&&(pu(n,e,r),Is(n,t,r)))}function js(e,t,n){Ms(e,t,n,du())}function Ms(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Er(s,o))return ri(e,t,i,0),Fl===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return pu(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&pu(t,e,2)}function Ps(e){var t=e.alternate;return e===V||t!==null&&t===V}function Fs(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}var Ls={readContext:na,use:Fo,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useLayoutEffect:So,useInsertionEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useSyncExternalStore:So,useId:So,useHostTransitionStatus:So,useFormState:So,useActionState:So,useOptimistic:So,useMemoCache:So,useCacheRefresh:So};Ls.useEffectEvent=So;var Rs={readContext:na,use:Fo,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:ds,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ls(4194308,4,_s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ls(4194308,4,e,t)},useInsertionEffect:function(e,t){ls(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(_o){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(_o){He(!0);try{n(t)}finally{He(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=As.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=qo(e);var t=e.queue,n=js.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ys,useDeferredValue:function(e,t){return H(jo(),e,t)},useTransition:function(){var e=qo(!1);return e=Cs.bind(null,V,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,a=jo();if(L){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Fl===null)throw Error(i(349));Q&127||Ho(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ds(Wo.bind(null,r,o,e),[e]),r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,o,n,t),null),n},useId:function(){var e=jo(),t=Fl.identifierPrefix;if(L){var n=ki,r=Oi;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:ns,useActionState:ns,useOptimistic:function(e){var t=jo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ns.bind(null,V,!0,n),n.dispatch=t,[e,t]},useMemoCache:Io,useCacheRefresh:function(){return jo().memoizedState=ks.bind(null,V)},useEffectEvent:function(e){var t=jo(),n={impl:e};return t.memoizedState=n,function(){if(Pl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},zs={readContext:na,use:Fo,useCallback:bs,useContext:na,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Ro,useRef:cs,useState:function(){return Ro(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){return Ss(Mo(),po.memoizedState,e,t)},useTransition:function(){var e=Ro(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:Os,useHostTransitionStatus:Ds,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){return Jo(Mo(),po,e,t)},useMemoCache:Io,useCacheRefresh:W};zs.useEffectEvent=ms;var Bs={readContext:na,use:Fo,useCallback:bs,useContext:na,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Bo,useRef:cs,useState:function(){return Bo(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){var n=Mo();return po===null?H(n,e,t):Ss(n,po.memoizedState,e,t)},useTransition:function(){var e=Bo(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:Os,useHostTransitionStatus:Ds,useFormState:os,useActionState:os,useOptimistic:function(e,t){var n=Mo();return po===null?(n.baseState=e,[e,n.queue.dispatch]):Jo(n,po,e,t)},useMemoCache:Io,useCacheRefresh:W};Bs.useEffectEvent=ms;function Vs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=Ha(r);i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(pu(t,e,r),Wa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=Ha(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(pu(t,e,r),Wa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=Ha(n);r.tag=2,t!=null&&(r.callback=t),t=Ua(e,r,n),t!==null&&(pu(t,e,n),Wa(t,e,n))}};function Us(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Dr(n,r)||!Dr(i,a):!0}function Ws(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Hs.enqueueReplaceState(t,t.state,null)}function Gs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ks(e){F(e)}function qs(e){console.error(e)}function Js(e){F(e)}function Ys(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function G(e,t,n){return n=Ha(n),n.tag=3,n.payload={element:null},n.callback=function(){Ys(e,t)},n}function Zs(e){return e=Ha(e),e.tag=3,e}function Qs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Xs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Xs(t,n,r),typeof i!=`function`&&(tu===null?tu=new Set([this]):tu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function $s(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&$i(t,n,a,!0),n=no.current,n!==null){switch(n.tag){case 31:case 13:return ro===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Tu(),!1}if(L)return t=no.current,t===null?(r!==zi&&(t=Error(i(423),{cause:r}),Ki(bi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=bi(r,n),a=G(e.stateNode,r,a),Ga(e,a),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==zi&&(e=Error(i(422),{cause:r}),Ki(bi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=bi(o,n),Jl===null?Jl=[o]:Jl.push(o),Hl!==4&&(Hl=2),t===null)return!0;r=bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=G(n.stateNode,r,e),Ga(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(tu===null||!tu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Zs(a),Qs(a,e,n,r),Ga(n,a),!1}n=n.return}while(n!==null);return!1}var ec=Error(i(461)),K=!1;function tc(e,t,n,r){t.child=e===null?Ra(t,null,n,r):La(t,e.child,n,r)}function nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ta(t),r=wo(e,t,n,o,a,i),s=Oo(),e!==null&&!K?(ko(e,t,i),Tc(e,t,i)):(L&&s&&Mi(t),t.flags|=1,tc(e,t,r,i),t.child)}function q(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=mi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Dr:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Dr(a,r)&&e.ref===t.ref)if(K=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&(K=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return dc(e,t,n,r,i)}function ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return oc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ya(t,a===null?null:a.cachePool),a===null?eo():$a(t,a),oo(t);else return r=t.lanes=536870912,oc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ya(t,null),eo(),so(t)):(ya(t,a.cachePool),$a(t,a),so(t),t.memoizedState=null);return tc(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oc(e,t,n,r,i){var a=va();return a=a===null?null:{parent:ca._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ya(t,null),eo(),oo(t),e!==null&&$i(e,t,r,!0),t.childLanes=i,null}function sc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cc(e,t,n){return La(t,e.child,null,n),e=sc(t,t.pendingProps),e.flags|=2,co(t),t.memoizedState=null,e}function lc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(L){if(r.mode===`hidden`)return e=sc(t,r),t.lanes=536870912,ac(null,e);if(ao(t),(e=Ii)?(e=rf(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return sc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ao(t),a)if(t.flags&256)t.flags&=-257,t=cc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(K||$i(e,t,n,!1),a=(n&e.childLanes)!==0,K||a){if(r=Fl,r!==null&&(s=ot(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ai(e,s),pu(r,e,s),ec;Tu(),t=cc(e,t,n)}else e=o.treeContext,Ii=cf(s.nextSibling),Fi=t,L=!0,Li=null,Ri=!1,e!==null&&Pi(t,e),t=sc(t,r),t.flags|=4096;return t}return e=fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function dc(e,t,n,r,i){return ta(t),n=wo(e,t,n,r,void 0,i),r=Oo(),e!==null&&!K?(ko(e,t,i),Tc(e,t,i)):(L&&r&&Mi(t),t.flags|=1,tc(e,t,n,i),t.child)}function fc(e,t,n,r,i,a){return ta(t),t.updateQueue=null,n=Eo(t,r,n,i),To(e),r=Oo(),e!==null&&!K?(ko(e,t,a),Tc(e,t,a)):(L&&r&&Mi(t),t.flags|=1,tc(e,t,n,a),t.child)}function pc(e,t,n,r,i){if(ta(t),t.stateNode===null){var a=ci,o=n.contextType;typeof o==`object`&&o&&(a=na(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Hs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ba(t),o=n.contextType,a.context=typeof o==`object`&&o?na(o):ci,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Vs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Hs.enqueueReplaceState(a,a.state,null),Ja(t,r,a,i),qa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Gs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ci,typeof u==`object`&&u&&(o=na(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ws(t,a,r,o),za=!1;var f=t.memoizedState;a.state=f,Ja(t,r,a,i),qa(),l=t.memoizedState,s||f!==l||za?(typeof d==`function`&&(Vs(t,n,d,r),l=t.memoizedState),(c=za||Us(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Va(e,t),o=t.memoizedProps,u=Gs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ci,typeof l==`object`&&l&&(c=na(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ws(t,a,r,c),za=!1,f=t.memoizedState,a.state=f,Ja(t,r,a,i),qa();var p=t.memoizedState;o!==d||f!==p||za||e!==null&&e.dependencies!==null&&ea(e.dependencies)?(typeof s==`function`&&(Vs(t,n,s,r),p=t.memoizedState),(u=za||Us(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ea(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,uc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=La(t,e.child,null,i),t.child=La(t,null,n,i)):tc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function mc(e,t,n,r){return Wi(),t.flags|=256,tc(e,t,n,r),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:ba()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function vc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(lo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(L){if(a?io(t):so(t),(e=Ii)?(e=rf(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Bi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(so(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=hi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(null,r)):(io(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(io(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(so(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=hi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,La(t,e.child,null,n),r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,t=ac(null,r)):(so(t),t.child=e.child,t.flags|=128,t=null);else if(io(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ki({value:r,source:null,stack:null}),t=xc(e,t,n)}else if(K||$i(e,t,n,!1),s=(n&e.childLanes)!==0,K||s){if(s=Fl,s!==null&&(r=ot(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ai(e,r),pu(s,e,r),ec;af(c)||Tu(),t=xc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ii=cf(c.nextSibling),Fi=t,L=!0,Li=null,Ri=!1,e!==null&&Pi(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(so(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=fi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=hi(c,a,n,null),c.flags|=2):c=fi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=gc(n):(a=c.cachePool,a===null?a=ba():(l=ca._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(e.child,r)):(io(t),n=e.child,e=n.sibling,n=fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=ui(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return La(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),R(e.return,t,n)}function Cc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=lo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,M(lo,o),tc(e,t,r,n),r=L?wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&uo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0)if(e!==null){if($i(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ea(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:he(t,t.stateNode.containerInfo),Xi(t,ca,e.memoizedState.cache),Wi();break;case 27:case 5:_e(t);break;case 4:he(t,t.stateNode.containerInfo);break;case 10:Xi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(io(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(io(t),t.flags|=128,null);io(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=($i(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),M(lo,lo.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:Xi(t,ca,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)K=!0;else{if(!Ec(e,n)&&!(t.flags&128))return K=!1,Dc(e,t,n);K=!!(e.flags&131072)}else K=!1,L&&t.flags&1048576&&ji(t,wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Da(t.elementType),t.type=e,typeof e==`function`)di(e)?(r=Gs(e,r),t.tag=1,t=pc(null,t,e,r,n)):(t.tag=0,t=dc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=nc(null,t,e,r,n);break a}else if(a===E){t.tag=14,t=q(null,t,e,r,n);break a}}throw t=ae(e)||e,Error(i(306,t,``))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Gs(r,t.pendingProps),pc(e,t,r,a,n);case 3:a:{if(he(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Va(e,t),Ja(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Xi(t,ca,r),r!==o.cache&&Qi(t,[ca],n,!0),qa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=mc(e,t,r,n);break a}else if(r!==a){a=bi(Error(i(424)),t),Ki(a),t=mc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ii=cf(e.firstChild),Fi=t,L=!0,Li=null,Ri=!0,n=Ra(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wi(),r===a){t=Tc(e,t,n);break a}tc(e,t,r,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:L||(n=t.type,e=t.pendingProps,r=Bd(pe.current).createElement(n),r[ft]=t,r[pt]=e,Pd(r,n,e),wt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _e(t),e===null&&L&&(r=t.stateNode=ff(t.type,t.pendingProps,pe.current),Fi=t,Ri=!0,a=Ii,Zd(t.type)?(lf=a,Ii=cf(r.firstChild)):Ii=a),tc(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&L&&((a=r=Ii)&&(r=tf(r,t.type,t.pendingProps,Ri),r===null?a=!1:(t.stateNode=r,Fi=t,Ii=cf(r.firstChild),Ri=!1,a=!0)),a||Bi(t)),_e(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=wo(e,t,Do,null,null,n),Qf._currentValue=a),uc(e,t),tc(e,t,r,n),t.child;case 6:return e===null&&L&&((e=n=Ii)&&(n=nf(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,Fi=t,Ii=null,e=!0)),e||Bi(t)),null;case 13:return vc(e,t,n);case 4:return he(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):tc(e,t,r,n),t.child;case 11:return nc(e,t,t.type,t.pendingProps,n);case 7:return tc(e,t,t.pendingProps,n),t.child;case 8:return tc(e,t,t.pendingProps.children,n),t.child;case 12:return tc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Xi(t,t.type,r.value),tc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ta(t),a=na(a),r=r(a),t.flags|=1,tc(e,t,r,n),t.child;case 14:return q(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return lc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return ta(t),r=na(ca),e===null?(a=va(),a===null&&(a=Fl,o=la(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ba(t),Xi(t,ca,a)):((e.lanes&n)!==0&&(Va(e,t),Ja(t,null,null,n),qa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Xi(t,ca,r),r!==a.cache&&Qi(t,[ca],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Xi(t,ca,r))),tc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Su())e.flags|=8192;else throw Oa=wa,Sa}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Su())e.flags|=8192;else throw Oa=wa,Sa}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:et(),e.lanes|=t,ql|=t)}function Nc(e,t){if(!L)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function J(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pc(e,t,n){var r=t.pendingProps;switch(Ni(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return J(t),null;case 1:return J(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Zi(ca),ge(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gi())),J(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(J(t),Ac(t,a,null,r,n)):(J(t),jc(t,o))):o?o===e.memoizedState?(J(t),t.flags&=-16777217):(kc(t),J(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),J(t),Ac(t,a,e,r,n)),null;case 27:if(ve(t),n=pe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return J(t),null}e=de.current,Ui(t)?Vi(t,e):(e=ff(a,r,n),t.stateNode=e,kc(t))}return J(t),null;case 5:if(ve(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return J(t),null}if(o=de.current,Ui(t))Vi(t,o);else{var s=Bd(pe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ft]=t,o[pt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&kc(t)}}return J(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=pe.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Fi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Bi(t,!0)}else e=Bd(e).createTextNode(r),e[ft]=t,t.stateNode=e}return J(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ft]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;J(t),e=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(co(t),t):(co(t),null);if(t.flags&128)throw Error(i(558))}return J(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ui(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ft]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;J(t),a=!1}else a=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(co(t),t):(co(t),null)}return co(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mc(t,t.updateQueue),J(t),null);case 4:return ge(),e===null&&xd(t.stateNode.containerInfo),J(t),null;case 10:return Zi(t.type),J(t),null;case 19:if(ue(lo),r=t.memoizedState,r===null)return J(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=uo(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return M(lo,lo.current&1|2),L&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&je()>$l&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!L)return J(t),null}else 2*je()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(J(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=je(),e.sibling=null,n=lo.current,M(lo,a?n&1|2:n&1),L&&Ai(t,r.treeForkCount),e);case 22:case 23:return co(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(J(t),t.subtreeFlags&6&&(t.flags|=8192)):J(t),n=t.updateQueue,n!==null&&Mc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ue(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Zi(ca),J(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Fc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(ca),ge(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(co(t),t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(lo),null;case 4:return ge(),null;case 10:return Zi(t.type),null;case 22:case 23:return co(t),to(),e!==null&&ue(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zi(ca),null;case 25:return null;default:return null}}function Ic(e,t){switch(Ni(t),t.tag){case 3:Zi(ca),ge();break;case 26:case 27:case 5:ve(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&co(t);break;case 13:co(t);break;case 19:ue(lo);break;case 10:Zi(t.type);break;case 22:case 23:co(t),to(),e!==null&&ue(_a);break;case 24:Zi(ca)}}function Lc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Uu(t,t.return,e)}}function Rc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){Uu(e,e.return,t)}}}function Bc(e,t,n){n.props=Gs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function Vc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Uu(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Uu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Uu(e,t,n)}else n.current=null}function Uc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Uu(e,e.return,t)}}function Y(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[pt]=t}catch(t){Uu(e,e.return,t)}}function Wc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Gc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=an));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[ft]=e,t[pt]=n}catch(t){Uu(e,e.return,t)}}var Yc=!1,Xc=!1,Zc=!1,Qc=typeof WeakSet==`function`?WeakSet:Set,$c=null;function el(e,t){if(e=e.containerInfo,Rd=sp,e=jr(e),Mr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,$c=t;$c!==null;)if(t=$c,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,$c=e;else for(;$c!==null;){switch(t=$c,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Gs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,$c=e;break}$c=t.return}}function tl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hl(e,n),r&4&&Lc(5,n);break;case 1:if(hl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=Gs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}r&64&&zc(n),r&512&&Vc(n,n.return);break;case 3:if(hl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Xa(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&Jc(n);case 26:case 5:hl(e,n),t===null&&r&4&&Uc(n),r&512&&Vc(n,n.return);break;case 12:hl(e,n);break;case 31:hl(e,n),r&4&&X(e,n);break;case 13:hl(e,n),r&4&&sl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Yc,!r){t=t!==null&&t.memoizedState!==null||Xc,i=Yc;var a=Xc;Yc=r,(Xc=t)&&!a?_l(e,n,(n.subtreeFlags&8772)!=0):hl(e,n),Yc=i,Xc=a}break;case 30:break;default:hl(e,n)}}function nl(e){var t=e.alternate;t!==null&&(e.alternate=null,nl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&yt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var rl=null,il=!1;function al(e,t,n){for(n=n.child;n!==null;)ol(e,t,n),n=n.sibling}function ol(e,t,n){if(Ve&&typeof Ve.onCommitFiberUnmount==`function`)try{Ve.onCommitFiberUnmount(Be,n)}catch{}switch(n.tag){case 26:Xc||Hc(n,t),al(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Xc||Hc(n,t);var r=rl,i=il;Zd(n.type)&&(rl=n.stateNode,il=!1),al(e,t,n),pf(n.stateNode),rl=r,il=i;break;case 5:Xc||Hc(n,t);case 6:if(r=rl,i=il,rl=null,al(e,t,n),rl=r,il=i,rl!==null)if(il)try{(rl.nodeType===9?rl.body:rl.nodeName===`HTML`?rl.ownerDocument.body:rl).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{rl.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}break;case 18:rl!==null&&(il?(e=rl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(rl,n.stateNode));break;case 4:r=rl,i=il,rl=n.stateNode.containerInfo,il=!0,al(e,t,n),rl=r,il=i;break;case 0:case 11:case 14:case 15:Rc(2,n,t),Xc||Rc(4,n,t),al(e,t,n);break;case 1:Xc||(Hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Bc(n,t,r)),al(e,t,n);break;case 21:al(e,t,n);break;case 22:Xc=(r=Xc)||n.memoizedState!==null,al(e,t,n),Xc=r;break;default:al(e,t,n)}}function X(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Uu(t,t.return,e)}}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Uu(t,t.return,e)}}function cl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Qc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Qc),t;default:throw Error(i(435,e.tag))}}function ll(e,t){var n=cl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function ul(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){rl=c.stateNode,il=!1;break a}break;case 5:rl=c.stateNode,il=!1;break a;case 3:case 4:rl=c.stateNode.containerInfo,il=!0;break a}c=c.return}if(rl===null)throw Error(i(160));ol(o,s,a),rl=null,il=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var dl=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(t,e),pl(e),r&4&&(Rc(3,e,e.return),Lc(3,e),Rc(5,e,e.return));break;case 1:ul(t,e),pl(e),r&512&&(Xc||n===null||Hc(n,n.return)),r&64&&Yc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=dl;if(ul(t,e),pl(e),r&512&&(Xc||n===null||Hc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[vt]||o[ft]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[ft]=e,wt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ft]=e,wt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Y(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:ul(t,e),pl(e),r&512&&(Xc||n===null||Hc(n,n.return)),n!==null&&r&4&&Y(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ul(t,e),pl(e),r&512&&(Xc||n===null||Hc(n,n.return)),e.flags&32){a=e.stateNode;try{Xt(a,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Y(e,a,n===null?a:n.memoizedProps)),r&1024&&(Zc=!0);break;case 6:if(ul(t,e),pl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Bf=null,a=dl,dl=gf(t.containerInfo),ul(t,e),dl=a,pl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Uu(e,e.return,t)}Zc&&(Zc=!1,ml(e));break;case 4:r=dl,dl=gf(e.stateNode.containerInfo),ul(t,e),pl(e),dl=r;break;case 12:ul(t,e),pl(e);break;case 31:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 13:ul(t,e),pl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=je()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Yc,d=Xc;if(Yc=u||a,Xc=d||l,ul(t,e),Xc=d,Yc=u,pl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Yc||Xc||gl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Uu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Uu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ll(e,n))));break;case 19:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 30:break;case 21:break;default:ul(t,e),pl(e)}}function pl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Wc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;qc(e,Gc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Xt(o,``),n.flags&=-33),qc(e,Gc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Kc(e,Gc(e),s);break;default:throw Error(i(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ml(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ml(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)tl(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rc(4,t,t.return),gl(t);break;case 1:Hc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Bc(t,t.return,n),gl(t);break;case 27:pf(t.stateNode);case 26:case 5:Hc(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function _l(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:_l(i,a,n),Lc(4,a);break;case 1:if(_l(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ya(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&zc(a),Vc(a,a.return);break;case 27:Jc(a);case 26:case 5:_l(i,a,n),n&&r===null&&o&4&&Uc(a),Vc(a,a.return);break;case 12:_l(i,a,n);break;case 31:_l(i,a,n),n&&o&4&&X(i,a);break;case 13:_l(i,a,n),n&&o&4&&sl(i,a);break;case 22:a.memoizedState===null&&_l(i,a,n),Vc(a,a.return);break;case 30:break;default:_l(i,a,n)}t=t.sibling}}function vl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ua(n))}function yl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ua(e))}function bl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xl(e,t,n,r),t=t.sibling}function xl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:bl(e,t,n,r),i&2048&&Lc(9,t);break;case 1:bl(e,t,n,r);break;case 3:bl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ua(e)));break;case 12:if(i&2048){bl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Uu(t,t.return,e)}}else bl(e,t,n,r);break;case 31:bl(e,t,n,r);break;case 13:bl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?bl(e,t,n,r):(a._visibility|=2,Sl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?bl(e,t,n,r):Cl(e,t),i&2048&&vl(o,t);break;case 24:bl(e,t,n,r),i&2048&&yl(t.alternate,t);break;default:bl(e,t,n,r)}}function Sl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Sl(a,o,s,c,i),Lc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Sl(a,o,s,c,i)):u._visibility&2?Sl(a,o,s,c,i):Cl(a,o),i&&l&2048&&vl(o.alternate,o);break;case 24:Sl(a,o,s,c,i),i&&l&2048&&yl(o.alternate,o);break;default:Sl(a,o,s,c,i)}t=t.sibling}}function Cl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Cl(n,r),i&2048&&vl(r.alternate,r);break;case 24:Cl(n,r),i&2048&&yl(r.alternate,r);break;default:Cl(n,r)}t=t.sibling}}var wl=8192;function Tl(e,t,n){if(e.subtreeFlags&wl)for(e=e.child;e!==null;)El(e,t,n),e=e.sibling}function El(e,t,n){switch(e.tag){case 26:Tl(e,t,n),e.flags&wl&&e.memoizedState!==null&&Gf(n,dl,e.memoizedState,e.memoizedProps);break;case 5:Tl(e,t,n);break;case 3:case 4:var r=dl;dl=gf(e.stateNode.containerInfo),Tl(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=wl,wl=16777216,Tl(e,t,n),wl=r):Tl(e,t,n));break;default:Tl(e,t,n)}}function Dl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,jl(r,e)}Dl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kl(e),e=e.sibling}function kl(e){switch(e.tag){case 0:case 11:case 15:Ol(e),e.flags&2048&&Rc(9,e,e.return);break;case 3:Ol(e);break;case 12:Ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):Ol(e);break;default:Ol(e)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,jl(r,e)}Dl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rc(8,t,t.return),Al(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function jl(e,t){for(;$c!==null;){var n=$c;switch(n.tag){case 0:case 11:case 15:Rc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ua(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,$c=r;else a:for(n=e;$c!==null;){r=$c;var i=r.sibling,a=r.return;if(nl(r),r===n){$c=null;break a}if(i!==null){i.return=a,$c=i;break a}$c=a}}}var Ml={getCacheForType:function(e){var t=na(ca),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return na(ca).controller.signal}},Nl=typeof WeakMap==`function`?WeakMap:Map,Pl=0,Fl=null,Z=null,Q=0,Il=0,Ll=null,Rl=!1,zl=!1,Bl=!1,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=null,Yl=null,Xl=!1,Zl=0,Ql=0,$l=1/0,eu=null,tu=null,nu=0,ru=null,iu=null,au=0,ou=0,su=null,cu=null,lu=0,uu=null;function du(){return Pl&2&&Q!==0?Q&-Q:k.T===null?lt():ud()}function fu(){if(Kl===0)if(!(Q&536870912)||L){var e=Je;Je<<=1,!(Je&3932160)&&(Je=262144),Kl=e}else Kl=536870912;return e=no.current,e!==null&&(e.flags|=32),Kl}function pu(e,t,n){(e===Fl&&(Il===2||Il===9)||e.cancelPendingCommit!==null)&&(bu(e,0),_u(e,Q,Kl,!1)),nt(e,n),(!(Pl&2)||e!==Fl)&&(e===Fl&&(!(Pl&2)&&(Wl|=n),Hl===4&&_u(e,Q,Kl,!1)),nd(e))}function mu(e,t,n){if(Pl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Qe(e,t),a=r?Ou(e,t):Eu(e,t,!0),o=r;do{if(a===0){zl&&!r&&_u(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!gu(n)){a=Eu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Jl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Bl&&!l){c.errorRecoveryDisabledLanes|=o,Wl|=o,a=4;break a}o=Yl,Yl=a,o!==null&&(Yl===null?Yl=o:Yl.push.apply(Yl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){bu(e,0),_u(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:_u(r,t,Kl,!Rl);break a;case 2:Yl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Zl+300-je(),10<a)){if(_u(r,t,Kl,!Rl),Ze(r,0,!0)!==0)break a;au=t,r.timeoutHandle=Kd(hu.bind(null,r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,`Throttled`,-0,0),a);break a}hu(r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,null,-0,0)}}break}while(1);nd(e)}function hu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:an},El(t,a,d);var m=(a&62914560)===a?Zl-je():(a&4194048)===a?Ql-je():0;if(m=qf(d,m),m!==null){au=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),_u(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function gu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Er(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _u(e,t,n,r){t&=~Gl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ue(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&it(e,n,t)}function vu(){return Pl&6?!0:(rd(0,!1),!1)}function yu(){if(Z!==null){if(Il===0)var e=Z.return;else e=Z,Yi=Ji=null,Ao(e),ja=null,Ma=0,e=Z;for(;e!==null;)Ic(e.alternate,e),e=e.return;Z=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),au=0,yu(),Fl=e,Z=n=fi(e.current,null),Q=t,Il=0,Ll=null,Rl=!1,zl=Qe(e,t),Bl=!1,ql=Kl=Gl=Wl=Ul=Hl=0,Yl=Jl=null,Xl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ue(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,ni(),n}function xu(e,t){V=null,k.H=Ls,t===xa||t===Ca?(t=ka(),Il=3):t===Sa?(t=ka(),Il=4):Il=t===ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Z===null&&(Hl=1,Ys(e,bi(t,e.current)))}function Su(){var e=no.current;return e===null?!0:(Q&4194048)===Q?ro===null:(Q&62914560)===Q||Q&536870912?e===ro:!1}function Cu(){var e=k.H;return k.H=Ls,e===null?Ls:e}function wu(){var e=k.A;return k.A=Ml,e}function Tu(){Hl=4,Rl||(Q&4194048)!==Q&&no.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Fl===null||_u(Fl,Q,Kl,!1)}function Eu(e,t,n){var r=Pl;Pl|=2;var i=Cu(),a=wu();(Fl!==e||Q!==t)&&(eu=null,bu(e,t)),t=!1;var o=Hl;a:do try{if(Il!==0&&Z!==null){var s=Z,c=Ll;switch(Il){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:no.current===null&&(t=!0);var l=Il;if(Il=0,Ll=null,Mu(e,s,c,l),n&&zl){o=0;break a}break;default:l=Il,Il=0,Ll=null,Mu(e,s,c,l)}}Du(),o=Hl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,Yi=Ji=null,Pl=r,k.H=i,k.A=a,Z===null&&(Fl=null,Q=0,ni()),o}function Du(){for(;Z!==null;)Au(Z)}function Ou(e,t){var n=Pl;Pl|=2;var r=Cu(),a=wu();Fl!==e||Q!==t?(eu=null,$l=je()+500,bu(e,t)):zl=Qe(e,t);a:do try{if(Il!==0&&Z!==null){t=Z;var o=Ll;b:switch(Il){case 1:Il=0,Ll=null,Mu(e,t,o,1);break;case 2:case 9:if(Ta(o)){Il=0,Ll=null,ju(t);break}t=function(){Il!==2&&Il!==9||Fl!==e||(Il=7),nd(e)},o.then(t,t);break a;case 3:Il=7;break a;case 4:Il=5;break a;case 7:Ta(o)?(Il=0,Ll=null,ju(t)):(Il=0,Ll=null,Mu(e,t,o,7));break;case 5:var s=null;switch(Z.tag){case 26:s=Z.memoizedState;case 5:case 27:var c=Z;if(s?Wf(s):c.stateNode.complete){Il=0,Ll=null;var l=c.sibling;if(l!==null)Z=l;else{var u=c.return;u===null?Z=null:(Z=u,Nu(u))}break b}}Il=0,Ll=null,Mu(e,t,o,5);break;case 6:Il=0,Ll=null,Mu(e,t,o,6);break;case 8:yu(),Hl=6;break a;default:throw Error(i(462))}}ku();break}catch(t){xu(e,t)}while(1);return Yi=Ji=null,k.H=r,k.A=a,Pl=n,Z===null?(Fl=null,Q=0,ni(),Hl):0}function ku(){for(;Z!==null&&!ke();)Au(Z)}function Au(e){var t=Oc(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fc(n,t,t.pendingProps,t.type,void 0,Q);break;case 11:t=fc(n,t,t.pendingProps,t.type.render,t.ref,Q);break;case 5:Ao(t);default:Ic(n,t),t=Z=pi(t,Vl),t=Oc(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function Mu(e,t,n,r){Yi=Ji=null,Ao(t),ja=null,Ma=0;var i=t.return;try{if($s(e,i,t,n,Q)){Hl=1,Ys(e,bi(n,e.current)),Z=null;return}}catch(t){if(i!==null)throw Z=i,t;Hl=1,Ys(e,bi(n,e.current)),Z=null;return}t.flags&32768?(L||r===1?e=!0:zl||Q&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=no.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Rl);return}e=t.return;var n=Pc(t.alternate,t,Vl);if(n!==null){Z=n;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);Hl===0&&(Hl=5)}function Pu(e,t){do{var n=Fc(e.alternate,e);if(n!==null){n.flags&=32767,Z=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Z=e;return}Z=e=n}while(e!==null);Hl=6,Z=null}function Fu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Bu();while(nu!==0);if(Pl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ti,rt(e,n,o,s,c,l),e===Fl&&(Z=Fl=null,Q=0),iu=t,ru=e,au=n,ou=o,su=a,cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(Fe,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=k.T,k.T=null,a=A.p,A.p=2,s=Pl,Pl|=4;try{el(e,t,n)}finally{Pl=s,A.p=a,k.T=r}}nu=1,Iu(),Lu(),Ru()}}function Iu(){if(nu===1){nu=0;var e=ru,t=iu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=k.T,k.T=null;var r=A.p;A.p=2;var i=Pl;Pl|=4;try{fl(t,e);var a=zd,o=jr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ar(s.ownerDocument.documentElement,s)){if(c!==null&&Mr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=kr(s,h),v=kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{Pl=i,A.p=r,k.T=n}}e.current=t,nu=2}}function Lu(){if(nu===2){nu=0;var e=ru,t=iu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=k.T,k.T=null;var r=A.p;A.p=2;var i=Pl;Pl|=4;try{tl(e,t.alternate,t)}finally{Pl=i,A.p=r,k.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,Ae();var e=ru,t=iu,n=au,r=cu;t.subtreeFlags&10256||t.flags&10256?nu=5:(nu=0,iu=ru=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(tu=null),ct(n),t=t.stateNode,Ve&&typeof Ve.onCommitFiberRoot==`function`)try{Ve.onCommitFiberRoot(Be,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=k.T,i=A.p,A.p=2,k.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{k.T=t,A.p=i}}au&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===uu?lu++:(lu=0,uu=e):lu=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ua(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=ct(au),r=k.T,a=A.p;try{A.p=32>n?32:n,k.T=null,n=su,su=null;var o=ru,s=au;if(nu=0,iu=ru=null,au=0,Pl&6)throw Error(i(331));var c=Pl;if(Pl|=4,kl(o.current),xl(o,o.current,s,n),Pl=c,rd(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot==`function`)try{Ve.onPostCommitFiberRoot(Be,o)}catch{}return!0}finally{A.p=a,k.T=r,zu(e,t)}}function Hu(e,t,n){t=bi(n,t),t=G(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(nt(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(tu===null||!tu.has(r))){e=bi(n,e),n=Zs(2),r=Ua(t,n,2),r!==null&&(Qs(n,r,t,e),nt(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Bl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fl===e&&(Q&n)===n&&(Hl===4||Hl===3&&(Q&62914560)===Q&&300>je()-Zl?!(Pl&2)&&bu(e,0):Gl|=n,ql===Q&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=et()),e=ai(e,t),e!==null&&(nt(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ku(e,n)}function Yu(e,t){return De(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ue(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Q,a=Ze(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Qe(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=je(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}nu!==0&&nu!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ue(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=$e(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Fl,n=Q,n=Ze(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Il===2||Il===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Oe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Oe(r),ct(n)){case 2:case 8:n=Pe;break;case 32:n=Fe;break;case 268435456:n=Le;break;default:n=Fe}return r=sd.bind(null,e),n=De(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Oe(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(nu!==0&&nu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=Q;return r=Ze(e,e===Fl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,je()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;mu(e,t,!0)}function ld(){Yd(function(){Pl&6?De(Ne,id):ad()})}function ud(){if(td===0){var e=z;e===0&&(e=qe,qe<<=1,!(qe&261888)&&(qe=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:rn(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[pt]||null).action),o=r.submitter;o&&(t=(t=o[pt]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new En(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Qr.length;md++){var hd=Qr[md];$r(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}$r(Wr,`onAnimationEnd`),$r(Gr,`onAnimationIteration`),$r(Kr,`onAnimationStart`),$r(`dblclick`,`onDoubleClick`),$r(`focusin`,`onFocus`),$r(`focusout`,`onBlur`),$r(qr,`onTransitionRun`),$r(Jr,`onTransitionStart`),$r(Yr,`onTransitionCancel`),$r(Xr,`onTransitionEnd`),Ot(`onMouseEnter`,[`mouseout`,`mouseover`]),Ot(`onMouseLeave`,[`mouseout`,`mouseover`]),Ot(`onPointerEnter`,[`pointerout`,`pointerover`]),Ot(`onPointerLeave`,[`pointerout`,`pointerover`]),Dt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Dt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Dt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Dt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){F(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){F(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[mt];n===void 0&&(n=t[mt]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,Tt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!hn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=bt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}fn(function(){var r=a,i=sn(n),s=[];a:{var c=Zr.get(e);if(c!==void 0){var l=En,u=e;switch(e){case`keypress`:if(xn(n)===0)break a;case`keydown`:case`keyup`:l=Un;break;case`focusin`:u=`focus`,l=Fn;break;case`focusout`:u=`blur`,l=Fn;break;case`beforeblur`:case`afterblur`:l=Fn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Nn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Pn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Gn;break;case Wr:case Gr:case Kr:l=In;break;case Xr:l=Kn;break;case`scroll`:case`scrollend`:l=On;break;case`wheel`:l=qn;break;case`copy`:case`cut`:case`paste`:l=Ln;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Wn;break;case`toggle`:case`beforetoggle`:l=Jn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=pn(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==on&&(u=n.relatedTarget||n.fromElement)&&(bt(u)||u[N]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?bt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Nn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Wn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:St(l),h=u==null?c:St(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,bt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?St(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=mr;else if(cr(c))if(hr)v=wr;else{v=Sr;var y=xr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&en(r.elementType)&&(v=mr):v=Cr;if(v&&=v(e,r)){lr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Kt(c,`number`,c.value)}switch(y=r?St(r):window,e){case`focusin`:(cr(y)||y.contentEditable===`true`)&&(Pr=y,Fr=r,Ir=null);break;case`focusout`:Ir=Fr=Pr=null;break;case`mousedown`:Lr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Lr=!1,Rr(s,n,i);break;case`selectionchange`:if(Nr)break;case`keydown`:case`keyup`:Rr(s,n,i)}var b;if(Xn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else ir?nr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&($n&&n.locale!==`ko`&&(ir||x!==`onCompositionStart`?x===`onCompositionEnd`&&ir&&(b=bn()):(_n=i,vn=`value`in _n?_n.value:_n.textContent,ir=!0)),y=Td(r,x),0<y.length&&(x=new P(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=rr(n),b!==null&&(x.data=b)))),(b=Qn?ar(e,n):or(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new P(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=pn(e,n),i!=null&&r.unshift(wd(e,i,a)),i=pn(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=pn(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=pn(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
9
+ `).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Xt(e,``+r);break;case`className`:Pt(e,`class`,r);break;case`tabIndex`:Pt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Pt(e,n,r);break;case`style`:$t(e,r,o);break;case`data`:if(t!==`object`){Pt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=an);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=rn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Nt(e,`popover`,r);break;case`xlinkActuate`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Nt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=tn.get(n)||n,Nt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:$t(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Xt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=an);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Et.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[pt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Nt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Md(e,t,r,d,n,null)}}Gt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&qt(e,!!r,n,!0):qt(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Md(e,t,s,c,n,null)}Yt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,u,r,n,null)}return;default:if(en(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}Wt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Md(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?qt(e,!!n,n?[]:``,!1):qt(e,!!n,t,!0)):qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}Jt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(en(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[vt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),yt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[vt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=A.d;A.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=vu();return e||t}function yf(e){var t=xt(e);t!==null&&t.tag===5&&t.type===`form`?U(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Ut(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ut(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ut(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ut(n.imageSizes)+`"]`)):i+=`[href="`+Ut(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ut(r)+`"][href="`+Ut(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),wt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Ct(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);wt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Ct(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),wt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Ct(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),wt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=pe.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Ct(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Ct(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Ct(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Ut(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),wt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Ut(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ut(n.href)+`"]`);if(r)return t.instance=r,wt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),wt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,wt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),wt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,wt(a),a):(r=n,(a=mf.get(o))&&(r=m({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),wt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[vt]||a[ft]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,wt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=tt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tt(0),this.hiddenUpdates=tt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ui(3,null,null,t),e.current=a,a.stateNode=e,t=la(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ba(a),e}function tp(e){return e?(e=ci,e):ci}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ha(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ua(e,r,t),n!==null&&(pu(n,e,t),Wa(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=st(t);var n=ai(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=2,up(e,t,n,r)}finally{A.p=a,k.T=i}}function lp(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=8,up(e,t,n,r)}finally{A.p=a,k.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=xt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Xe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ue(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Pl&6)&&($l=je()+500,rd(0,!1))}}break;case 31:case 13:s=ai(a,2),s!==null&&pu(s,a,2),vu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=sn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=bt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Me()){case Ne:return 2;case Pe:return 8;case Fe:case Ie:return 32;case Le:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=xt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=bt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ut(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ut(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);on=r,n.target.dispatchEvent(r),on=null}else return t=xt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=xt(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[pt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[pt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,du(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),vu(),t[N]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=lt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));A.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:k,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Be=zp.inject(Rp),Ve=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ks,s=qs,c=Js;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[N]=t.current,xd(e),new Fp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=Object.create(null);b.open=`0`,b.close=`1`,b.ping=`2`,b.pong=`3`,b.message=`4`,b.upgrade=`5`,b.noop=`6`;var x=Object.create(null);Object.keys(b).forEach(e=>{x[b[e]]=e});var S={type:`error`,data:`parser error`},C=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,w=typeof ArrayBuffer==`function`,ee=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,T=({type:e,data:t},n,r)=>C&&t instanceof Blob?n?r(t):E(t,r):w&&(t instanceof ArrayBuffer||ee(t))?n?r(t):E(new Blob([t]),r):r(b[e]+(t||``)),E=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function D(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var O;function te(e,t){if(C&&e.data instanceof Blob)return e.data.arrayBuffer().then(D).then(t);if(w&&(e.data instanceof ArrayBuffer||ee(e.data)))return t(D(e.data));T(e,!1,e=>{O||=new TextEncoder,t(O.encode(e))})}var ne=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,re=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)re[ne.charCodeAt(e)]=e;var ie=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=re[e.charCodeAt(r)],o=re[e.charCodeAt(r+1)],s=re[e.charCodeAt(r+2)],c=re[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},ae=typeof ArrayBuffer==`function`,oe=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:A(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:k(e.substring(1),t)}:x[n]?e.length>1?{type:x[n],data:e.substring(1)}:{type:x[n]}:S},k=(e,t)=>ae?A(ie(e),t):{base64:!0,data:e},A=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},se=``,ce=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{T(e,!1,e=>{r[a]=e,++i===n&&t(r.join(se))})})},le=(e,t)=>{let n=e.split(se),r=[];for(let e=0;e<n.length;e++){let i=oe(n[e],t);if(r.push(i),i.type===`error`)break}return r};function j(){return new TransformStream({transform(e,t){te(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var ue;function M(e){return e.reduce((e,t)=>e+t.length,0)}function de(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function fe(e,t){ue||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(M(n)<1)break;let e=de(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(M(n)<2)break;let e=de(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(M(n)<8)break;let e=de(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(S);break}i=a*2**32+t.getUint32(4),r=3}else{if(M(n)<i)break;let e=de(n,i);s.enqueue(oe(a?e:ue.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(S);break}}}})}function pe(e){if(e)return me(e)}function me(e){for(var t in pe.prototype)e[t]=pe.prototype[t];return e}pe.prototype.on=pe.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},pe.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},pe.prototype.off=pe.prototype.removeListener=pe.prototype.removeAllListeners=pe.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},pe.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},pe.prototype.emitReserved=pe.prototype.emit,pe.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},pe.prototype.hasListeners=function(e){return!!this.listeners(e).length};var he=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),ge=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),_e=`arraybuffer`;function ve(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var ye=ge.setTimeout,be=ge.clearTimeout;function xe(e,t){t.useNativeTimers?(e.setTimeoutFn=ye.bind(ge),e.clearTimeoutFn=be.bind(ge)):(e.setTimeoutFn=ge.setTimeout.bind(ge),e.clearTimeoutFn=ge.clearTimeout.bind(ge))}var Se=1.33;function Ce(e){return typeof e==`string`?we(e):Math.ceil((e.byteLength||e.size)*Se)}function we(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Te(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ee(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function De(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var Oe=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},ke=class extends pe{constructor(e){super(),this.writable=!1,xe(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new Oe(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=oe(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=Ee(e);return t.length?`?`+t:``}},Ae=class extends ke{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){le(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,ce(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Te()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},je=!1;try{je=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var Me=je;function Ne(){}var Pe=class extends Ae{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},Fe=class e extends pe{constructor(e,t,n){super(),this.createRequest=e,xe(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=ve(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(this._xhr===void 0||this._xhr===null)){if(this._xhr.onreadystatechange=Ne,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(Fe.requestsCount=0,Fe.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,Ie);else if(typeof addEventListener==`function`){let e=`onpagehide`in ge?`pagehide`:`unload`;addEventListener(e,Ie,!1)}}function Ie(){for(let e in Fe.requests)Fe.requests.hasOwnProperty(e)&&Fe.requests[e].abort()}var Le=(function(){let e=ze({xdomain:!1});return e&&e.responseType!==null})(),Re=class extends Pe{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Le&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Fe(ze,this.uri(),e)}};function ze(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||Me))return new XMLHttpRequest}catch{}if(!t)try{return new ge[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var Be=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,Ve=class extends ke{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=Be?{}:ve(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;T(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&he(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Te()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},He=ge.WebSocket||ge.MozWebSocket,Ue={websocket:class extends Ve{createSocket(e,t,n){return Be?new He(e,t,n):t?new He(e,t):new He(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends ke{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=fe(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=j();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&he(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:Re},We=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ge=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function Ke(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=We.exec(e||``),a={},o=14;for(;o--;)a[Ge[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=qe(a,a.path),a.queryKey=Je(a,a.query),a}function qe(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function Je(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var Ye=typeof addEventListener==`function`&&typeof removeEventListener==`function`,Xe=[];Ye&&addEventListener(`offline`,()=>{Xe.forEach(e=>e())},!1);var Ze=class e extends pe{constructor(e,t){if(super(),this.binaryType=_e,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=Ke(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=Ke(t.host).host);xe(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=De(this.opts.query)),Ye&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},Xe.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data);break}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=Ce(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,he(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),Ye&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=Xe.indexOf(this._offlineEventListener);e!==-1&&Xe.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};Ze.protocol=4;var Qe=class extends Ze{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;Ze.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;Ze.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},$e=class extends Qe{constructor(e,t={}){let n=typeof e==`object`?e:t;(!n.transports||n.transports&&typeof n.transports[0]==`string`)&&(n.transports=(n.transports||[`polling`,`websocket`,`webtransport`]).map(e=>Ue[e]).filter(e=>!!e)),super(e,n)}};$e.protocol;function et(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=Ke(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var tt=typeof ArrayBuffer==`function`,nt=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,rt=Object.prototype.toString,it=typeof Blob==`function`||typeof Blob<`u`&&rt.call(Blob)===`[object BlobConstructor]`,at=typeof File==`function`||typeof File<`u`&&rt.call(File)===`[object FileConstructor]`;function ot(e){return tt&&(e instanceof ArrayBuffer||nt(e))||it&&e instanceof Blob||at&&e instanceof File}function st(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(st(e[t]))return!0;return!1}if(ot(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return st(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&st(e[t]))return!0;return!1}function ct(e){let t=[],n=e.data,r=e;return r.data=lt(n,t),r.attachments=t.length,{packet:r,buffers:t}}function lt(e,t){if(!e)return e;if(ot(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=lt(e[r],t);return n}else if(typeof e==`object`&&!(e instanceof Date)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=lt(e[r],t));return n}return e}function ut(e,t){return e.data=dt(e.data,t),delete e.attachments,e}function dt(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=dt(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=dt(e[n],t));return e}var ft=s({Decoder:()=>ht,Encoder:()=>mt,PacketType:()=>N,isPacketValid:()=>St,protocol:()=>5}),pt=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],N;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(N||={});var mt=class{constructor(e){this.replacer=e}encode(e){return(e.type===N.EVENT||e.type===N.ACK)&&st(e)?this.encodeAsBinary({type:e.type===N.EVENT?N.BINARY_EVENT:N.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===N.BINARY_EVENT||e.type===N.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=ct(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},ht=class e extends pe{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===N.BINARY_EVENT;n||t.type===N.BINARY_ACK?(t.type=n?N.EVENT:N.ACK,this.reconstructor=new gt(t),t.attachments===0&&super.emitReserved(`decoded`,t)):super.emitReserved(`decoded`,t)}else if(ot(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(N[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===N.BINARY_EVENT||r.type===N.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!vt(a)||a<0)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&!(t.charAt(n)===`,`||n===t.length););r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case N.CONNECT:return bt(t);case N.DISCONNECT:return t===void 0;case N.CONNECT_ERROR:return typeof t==`string`||bt(t);case N.EVENT:case N.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&pt.indexOf(t[0])===-1);case N.ACK:case N.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},gt=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=ut(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function _t(e){return typeof e==`string`}var vt=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function yt(e){return e===void 0||vt(e)}function bt(e){return Object.prototype.toString.call(e)===`[object Object]`}function xt(e,t){switch(e){case N.CONNECT:return t===void 0||bt(t);case N.DISCONNECT:return t===void 0;case N.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&pt.indexOf(t[0])===-1);case N.ACK:return Array.isArray(t);case N.CONNECT_ERROR:return typeof t==`string`||bt(t);default:return!1}}function St(e){return _t(e.nsp)&&yt(e.id)&&xt(e.type,e.data)}function Ct(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var wt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Tt=class extends pe{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[Ct(e,`open`,this.onopen.bind(this)),Ct(e,`packet`,this.onpacket.bind(this)),Ct(e,`error`,this.onerror.bind(this)),Ct(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(wt.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:N.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:N.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case N.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case N.EVENT:case N.BINARY_EVENT:this.onevent(e);break;case N.ACK:case N.BINARY_ACK:this.onack(e);break;case N.DISCONNECT:this.ondisconnect();break;case N.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:N.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:N.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function Et(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Et.prototype.duration=function(){var e=this.ms*this.factor**+ this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},Et.prototype.reset=function(){this.attempts=0},Et.prototype.setMin=function(e){this.ms=e},Et.prototype.setMax=function(e){this.max=e},Et.prototype.setJitter=function(e){this.jitter=e};var Dt=class extends pe{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,xe(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new Et({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||ft;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new $e(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=Ct(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=Ct(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(Ct(e,`ping`,this.onping.bind(this)),Ct(e,`data`,this.ondata.bind(this)),Ct(e,`error`,this.onerror.bind(this)),Ct(e,`close`,this.onclose.bind(this)),Ct(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){he(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Tt(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},Ot={};function kt(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=et(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=Ot[i]&&a in Ot[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new Dt(r,t):(Ot[i]||(Ot[i]=new Dt(r,t)),c=Ot[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(kt,{Manager:Dt,Socket:Tt,io:kt,connect:kt});var At=2e3,jt=4e3,Mt=1e3;function Nt(e){return e?Array.isArray(e)?{models:e}:Array.isArray(e.models)?e:null:null}function Pt(e,t){return t?`${t.replace(/\/$/,``)}${e}`:e}function Ft(e=``){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(`connecting`),[s,c]=(0,v.useState)(0),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)(0),[h,g]=(0,v.useState)(`speed`),[_,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(0),[S,C]=(0,v.useState)(0),[w,ee]=(0,v.useState)(null),T=(0,v.useRef)(null),E=(0,v.useRef)(null),D=(0,v.useRef)(null),O=(0,v.useRef)(0),te=(0,v.useRef)(0),ne=(0,v.useRef)(!1),re=(0,v.useCallback)((e,t=`unknown`)=>{let r=Nt(e);!r||!ne.current||(n(r.models??[]),g(r.pingMode??`speed`),u(r.nextPingAt??null),f(!!r.isPinging),m(Number.isFinite(r.pendingPings)?r.pendingPings:0),y(!!r.globalBenchmarkRunning),x(Number.isFinite(r.globalBenchmarkTotal)?r.globalBenchmarkTotal:0),C(Number.isFinite(r.globalBenchmarkCompleted)?r.globalBenchmarkCompleted:0),ee(r.updateStatus&&r.updateStatus.allowedOutdated?r.updateStatus:null),c(e=>e+1),O.current=Date.now(),t!==`poll`&&(i(!0),o(t)))},[]),ie=(0,v.useCallback)(async()=>{try{let t=await fetch(Pt(`/api/state`,e),{headers:{Accept:`application/json`}});if(t.ok){re(await t.json(),`poll`),i(!0),o(e=>e===`socket`||e===`sse`?e:`poll`);return}}catch{}try{let t=await fetch(Pt(`/api/models`,e),{headers:{Accept:`application/json`}});if(!t.ok)throw Error(`HTTP ${t.status}`);re(await t.json(),`poll`),i(!0),o(e=>e===`socket`||e===`sse`?e:`poll`)}catch{i(!1),o(`offline`)}},[re,e]),ae=(0,v.useCallback)(()=>{if(!(E.current||!ne.current))try{let t=new EventSource(Pt(`/api/events`,e));E.current=t,t.onopen=()=>{ne.current&&(i(!0),o(`sse`))};let n=e=>{try{re(JSON.parse(e.data),`sse`)}catch(e){console.warn(`[useSocket] SSE parse error:`,e)}};t.onmessage=n,t.addEventListener(`models`,n),t.onerror=()=>{t.close(),E.current===t&&(E.current=null),T.current?.connected||i(!1)}}catch{E.current=null}},[re,e]),oe=(0,v.useCallback)(()=>{let t=Date.now();if(!(t-te.current<Mt)){if(te.current=t,T.current?.connected){T.current.emit(`client:activity`);return}fetch(Pt(`/api/activity`,e),{method:`POST`}).catch(()=>{})}},[e]);return(0,v.useEffect)(()=>{ne.current=!0;let t=kt(e||void 0,{transports:[`websocket`,`polling`],reconnectionDelay:500,reconnectionDelayMax:2500,timeout:1200});T.current=t,t.on(`connect`,()=>{i(!0),o(`socket`),E.current?.close(),E.current=null,t.emit(`models:refresh`),t.emit(`client:activity`)}),t.on(`disconnect`,()=>{ne.current&&(i(!1),ae())}),t.on(`connect_error`,()=>{ne.current&&(i(!1),ae())}),t.on(`models:update`,e=>re(e,`socket`)),D.current=setInterval(()=>{let e=Date.now()-O.current>jt;(!t.connected||e)&&ie()},At),ie();let n=[`keydown`,`pointerdown`,`mousemove`,`focus`];for(let e of n)window.addEventListener(e,oe,{passive:!0});return()=>{ne.current=!1;for(let e of n)window.removeEventListener(e,oe);D.current&&clearInterval(D.current),t.disconnect(),E.current?.close(),T.current=null,E.current=null}},[re,ie,oe,e,ae]),{models:t,connected:r,transport:a,updateCount:s,nextPingAt:l,isPinging:d,pendingPings:p,pingMode:h,globalBenchmarkRunning:_,globalBenchmarkTotal:b,globalBenchmarkCompleted:S,updateStatus:w}}var It={"S+":0,S:1,"A+":2,A:3,"A-":4,"B+":5,B:6,C:7},Lt={Perfect:0,Normal:1,Slow:2,Spiky:3,"Very Slow":4,Overloaded:5,Unstable:6,"Not Active":7,Pending:8};function Rt(e){return It[e]??99}function zt(e){return Lt[e]??99}function Bt(e){return!e||e===`—`?0:parseFloat(e.replace(`%`,``))||0}function Vt(e){let t=Bt(e);return t>=65?`sweHigh`:t>=40?`sweMid`:`sweLow`}function Ht(e){return e==null||e===1/0||e>99e3?{text:`—`,cls:`pingNone`}:{text:`${e}ms`,cls:Ut(e)}}function Ut(e){return e==null||e===1/0?`pingNone`:e<500?`pingFast`:e<1500?`pingMedium`:`pingSlow`}function Wt(e){if(!e||e===`—`)return 0;let t=e.toLowerCase();return t.includes(`m`)?parseFloat(t)*1e3:t.includes(`k`)?parseFloat(t):0}function Gt(e){return!e||e.length<8?`••••••••`:`••••••••`+e.slice(-4)}var Kt=[`all`,`S+`,`S`,`A+`,`A`,`A-`,`B+`,`B`,`C`],qt=[`all`,`up`,`down`,`pending`],Jt=[`all`,`Perfect`,`Normal`,`Spiky`,`Slow`,`Overloaded`,`Down`,`Unstable`,`Pending`],Yt=[`all`,`up`,`timeout`,`down`,`pending`,`noauth`,`auth_error`],Xt=[`normal`,`configured`,`usable`];function Zt(e){return e.idx??9999}function Qt(e){return e.pingHistory||e.pings||[]}function $t(e){let t=Qt(e);return(t.length>0?t[t.length-1]:null)?.ms??null}function en(e){let t=Qt(e).map(e=>e?.ms).filter(e=>typeof e==`number`&&Number.isFinite(e));return t.length<2?null:t[t.length-1]-t[0]}function tn(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function nn(e,t,n){let r=e==null,i=t==null;return r&&i?0:r?1:i?-1:(e-t)*n}function rn(e,t,n){let r=typeof e==`string`?e:``,i=typeof t==`string`?t:``,a=r.length===0,o=i.length===0;return a&&o?0:a?1:o?-1:r.localeCompare(i)*n}var an={up:0,pending:1,timeout:2,down:3,noauth:4,auth_error:5};function on(e){let[t,n]=(0,v.useState)(`all`),[r,i]=(0,v.useState)(`all`),[a,o]=(0,v.useState)(`all`),[s,c]=(0,v.useState)(`all`),[l,u]=(0,v.useState)(`all`),[d,f]=(0,v.useState)(`normal`),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(`avg`),[b,x]=(0,v.useState)(`asc`),S=(0,v.useCallback)((e,t,n)=>{n(t[(t.indexOf(e)+1)%t.length])},[]),C=(0,v.useCallback)(()=>S(t,Kt,n),[t,S]),w=(0,v.useCallback)(()=>S(r,qt,i),[r,S]),ee=(0,v.useCallback)(()=>S(s,Jt,c),[s,S]),T=(0,v.useCallback)(()=>S(l,Yt,u),[l,S]),E=(0,v.useCallback)(()=>S(d,Xt,f),[d,S]),D=(0,v.useCallback)(e=>{if(_!==e){y(e),x(`asc`);return}if(b===`asc`){x(`desc`);return}y(null),x(`asc`)},[_,b]),O=(0,v.useCallback)(()=>{n(`all`),i(`all`),o(`all`),c(`all`),u(`all`),f(`normal`),m(``),g(null),y(`avg`),x(`asc`)},[]);return{filtered:(0,v.useMemo)(()=>{let n=[...e];t!==`all`&&(n=n.filter(e=>e.tier===t)),r!==`all`&&(n=n.filter(e=>r===`up`?e.status===`up`:r===`down`?e.status===`down`||e.status===`timeout`:r===`pending`?e.status===`pending`:!0)),a!==`all`&&(n=n.filter(e=>e.providerKey===a)),s!==`all`&&(n=n.filter(e=>e.verdict===s)),l!==`all`&&(n=n.filter(e=>e.status===l)),d===`configured`?n=n.filter(e=>e.hasApiKey&&e.status!==`noauth`&&e.status!==`auth_error`):d===`usable`&&(n=n.filter(e=>e.status===`up`?[`Perfect`,`Normal`,`Slow`].includes(e.verdict):!1));let i=p.trim().toLowerCase(),o=(h||``).trim().toLowerCase();return i&&(n=n.filter(e=>e.label.toLowerCase().includes(i)||e.modelId.toLowerCase().includes(i)||e.origin.toLowerCase().includes(i)||e.tier.toLowerCase().includes(i)||(e.verdict||``).toLowerCase().includes(i))),o&&(n=n.filter(e=>e.label.toLowerCase().includes(o)||e.modelId.toLowerCase().includes(o)||e.origin.toLowerCase().includes(o)||(e.ctx||``).toLowerCase().includes(o)||(e.providerKey||``).toLowerCase().includes(o))),n.sort((e,t)=>{if(!_)return Zt(e)-Zt(t);let n=b===`desc`?-1:1,r=0;return _===`mood`?r=nn(zt(e.verdict),zt(t.verdict),n):_===`idx`?r=nn(Zt(e),Zt(t),n):_===`tier`?r=nn(Rt(e.tier),Rt(t.tier),n):_===`label`?r=rn(e.label,t.label,n):_===`origin`?r=rn(e.origin,t.origin,n):_===`sweScore`?r=nn(Bt(e.sweScore),Bt(t.sweScore),n):_===`ctx`?r=nn(Wt(e.ctx),Wt(t.ctx),n):_===`latestPing`?r=nn($t(e),$t(t),n):_===`avg`?r=nn(e.avg==null||e.avg===1/0||e.avg>99e3?null:e.avg,t.avg==null||t.avg===1/0||t.avg>99e3?null:t.avg,n):_===`condition`?r=nn(an[e.status]??9,an[t.status]??9,n):_===`verdict`?r=nn(zt(e.verdict),zt(t.verdict),n):_===`stability`?r=nn(tn(e.stability),tn(t.stability),n):_===`uptime`?r=nn(tn(e.uptime),tn(t.uptime),n):_===`aiLatency`?r=nn(e.benchmark?.ok?e.benchmark.totalMs:null,t.benchmark?.ok?t.benchmark.totalMs:null,n):_===`tps`?r=nn(e.benchmark?.ok?e.benchmark.tokensPerSecond??0:null,t.benchmark?.ok?t.benchmark.tokensPerSecond??0:null,n):_===`trend`&&(r=nn(en(e),en(t),n)),r||Zt(e)-Zt(t)}),n},[e,t,r,a,s,l,d,p,h,_,b]),filterTier:t,setFilterTier:n,cycleTier:C,filterStatus:r,setFilterStatus:i,cycleStatus:w,filterProvider:a,setFilterProvider:o,filterVerdict:s,setFilterVerdict:c,cycleVerdict:ee,filterHealth:l,setFilterHealth:u,cycleHealth:T,visibilityMode:d,setVisibilityMode:f,cycleVisibility:E,searchQuery:p,setSearchQuery:m,customTextFilter:h,setCustomTextFilter:g,sortColumn:_,sortDirection:b,toggleSort:D,resetView:O}}var sn=[`auto`,`dark`,`light`];function cn(){if(typeof window>`u`||typeof window.matchMedia!=`function`)return`dark`;try{return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}catch{return`dark`}}function ln(){if(typeof document>`u`)return`auto`;let e=document.documentElement.getAttribute(`data-theme`);return e===`auto`||e===`dark`||e===`light`?e:`auto`}function un(){let[e,t]=(0,v.useState)(ln),[n,r]=(0,v.useState)(cn);(0,v.useEffect)(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=e=>r(e.matches?`dark`:`light`);if(typeof e.addEventListener==`function`)return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t);if(typeof e.addListener==`function`)return e.addListener(t),()=>e.removeListener(t)},[]),(0,v.useEffect)(()=>{let t=e===`auto`?n:e;document.documentElement.setAttribute(`data-theme`,t),document.documentElement.setAttribute(`data-theme-preference`,e)},[e,n]);let i=(0,v.useCallback)(()=>{t(e=>sn[(sn.indexOf(e)+1)%sn.length])},[]),a=(0,v.useCallback)(e=>{sn.includes(e)&&t(e)},[]);return{theme:e,resolvedTheme:e===`auto`?n:e,setTheme:a,cycle:i}}var dn=Object.freeze([]);function fn({models:e}={}){let[t,n]=(0,v.useState)(dn),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(!0),[s,c]=(0,v.useState)(null),l=(0,v.useCallback)(async()=>{try{let e=await fetch(`/api/favorites`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();n(Array.isArray(t.favorites)?t.favorites:[]),i(!!t.pinnedAndSticky),c(null)}catch(e){c(e.message||`Failed to load favorites`),n(dn),i(!1)}finally{o(!1)}},[]);(0,v.useEffect)(()=>{l()},[l]);let u=(0,v.useMemo)(()=>{let e=new Map;return t.forEach((t,n)=>e.set(t,n)),e},[t]),d=(0,v.useCallback)(e=>{if(!e)return!1;let t=`${e.providerKey}/${e.modelId}`;return u.has(t)},[u]),f=(0,v.useCallback)(e=>{if(!e)return 2**53-1;let t=`${e.providerKey}/${e.modelId}`,n=u.get(t);return n===void 0?2**53-1:n},[u]),p=(0,v.useCallback)(e=>e?`${e.providerKey}/${e.modelId}`:null,[]),m=(0,v.useCallback)(async e=>{try{let t=await fetch(`/api/favorites`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({favorites:e})});if(!t.ok)throw Error(`HTTP ${t.status}`);n(e)}catch(e){c(e.message||`Failed to save favorites`)}},[]);return{favorites:t,pinnedAndSticky:r,isFavorite:d,favoriteRank:f,toggle:(0,v.useCallback)(async e=>{let n=p(e);n&&await m(u.has(n)?t.filter(e=>e!==n):[...t,n])},[t,u,p,m]),reorder:(0,v.useCallback)(async(e,n)=>{let r=p(e);if(!r)return;let i=t.indexOf(r);if(i<0)return;let a=n===`up`?i-1:i+1;if(a<0||a>=t.length)return;let o=[...t];[o[i],o[a]]=[o[a],o[i]],await m(o)},[t,p,m]),setPinnedAndSticky:(0,v.useCallback)(async e=>{i(!!e);try{await fetch(`/api/favorites`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({pinnedAndSticky:!!e})})}catch(e){c(e.message||`Failed to save display mode`)}},[]),refresh:l,loading:a,error:s}}var pn=[`opencode`,`opencode-desktop`,`opencode-web`,`openclaw`,`crush`,`goose`,`pi`,`aider`,`qwen`,`openhands`,`amp`,`forgecode`,`fcm_router`],mn=`opencode`;function hn(e){return pn.includes(e)?e:mn}function gn({onToast:e}={}){let[t,n]=(0,v.useState)(mn),r=(0,v.useRef)(!1);(0,v.useEffect)(()=>{let t=!1;async function i(){try{let e=await fetch(`/api/tool-mode`),i=await e.json().catch(()=>({}));!t&&!r.current&&e.ok&&n(hn(i.mode))}catch(n){t||e?.(`Tool mode load failed: ${n.message}`,`error`)}}return i(),()=>{t=!0}},[e]);let i=(0,v.useCallback)(async t=>{let i=hn(t);r.current=!0,n(i);try{let e=await fetch(`/api/tool-mode`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({mode:i})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||`HTTP ${e.status}`);return n(hn(t.mode)),{ok:!0,mode:hn(t.mode)}}catch(t){return e?.(`Tool mode save failed: ${t.message}`,`error`),{ok:!1,error:t.message,mode:i}}},[e]),a=(0,v.useCallback)(()=>i(pn[(TOOL_MODE_ORDER.indexOf(t)+1)%pn.length]||mn),[i,t]);return{toolMode:t,tools:(0,v.useMemo)(()=>[...pn],[]),setToolMode:i,cycleToolMode:a}}var _n={opencode:{label:`OpenCode CLI`,emoji:`📦`,flag:`--opencode`,color:[110,214,255]},"opencode-desktop":{label:`OpenCode Desktop`,emoji:`📦`,flag:`--opencode-desktop`,color:[149,205,255]},"opencode-web":{label:`OpenCode Web`,emoji:`📦`,flag:`--opencode-web`,color:[180,220,255]},openclaw:{label:`OpenClaw`,emoji:`🦞`,flag:`--openclaw`,color:[255,129,129]},crush:{label:`Crush`,emoji:`💘`,flag:`--crush`,color:[255,168,209]},goose:{label:`Goose`,emoji:`🪿`,flag:`--goose`,color:[132,235,168]},pi:{label:`Pi`,emoji:`π`,flag:`--pi`,color:[173,216,230]},aider:{label:`Aider`,emoji:`🛠`,flag:`--aider`,color:[255,208,102]},kilo:{label:`Kilo CLI`,emoji:`⚡️`,flag:`--kilo`,color:[255,107,107]},qwen:{label:`Qwen Code`,emoji:`🐉`,flag:`--qwen`,color:[255,213,128]},openhands:{label:`OpenHands`,emoji:`🤲`,flag:`--openhands`,color:[228,191,239]},amp:{label:`Amp`,emoji:`⚡`,flag:`--amp`,color:[255,232,98]},hermes:{label:`Hermes`,emoji:`🔮`,flag:`--hermes`,color:[200,160,255]},continue:{label:`Continue CLI`,emoji:`▶️`,flag:`--continue`,color:[255,100,100]},cline:{label:`Cline`,emoji:`🧠`,flag:`--cline`,color:[100,220,180]},caveman:{label:`Caveman Code`,emoji:`🪨`,flag:`--caveman`,color:[180,130,80]},jcode:{label:`jcode`,emoji:`🪼`,flag:`--jcode`,color:[255,140,0]},xcode:{label:`Xcode Intelligence`,emoji:`🛠️`,flag:`--xcode`,color:[20,126,251]},fcm_router:{label:`FCM Router`,emoji:`🧭`,flag:`--fcm-router`,color:[80,200,120]},copilot:{label:`Copilot CLI`,emoji:`🤖`,flag:`--copilot`,color:[200,220,255]},forgecode:{label:`ForgeCode`,emoji:`🔥`,flag:`--forgecode`,color:[255,120,50]}},vn=[`opencode`,`pi`,`jcode`,`opencode-desktop`,`opencode-web`,`openclaw`,`crush`,`goose`,`aider`,`kilo`,`qwen`,`openhands`,`amp`,`hermes`,`continue`,`cline`,`xcode`,`fcm_router`,`caveman`,`copilot`,`forgecode`];function yn(e){return _n[e]||{label:e,emoji:`•`,flag:null}}var bn=Object.keys(_n).filter(e=>!_n[e].cliOnly);function xn(e){return bn}function Sn(e,t){return xn(e).includes(t)}function Cn(e,t,n,r=3){let i=parseFloat(e)||0;return n.filter(e=>!e.hidden&&Sn(e.providerKey,t)).map(e=>({modelId:e.modelId,label:e.label,tier:e.tier,sweScore:e.sweScore||`-`,providerKey:e.providerKey,sweDelta:Math.abs((parseFloat(e.sweScore)||0)-i)})).sort((e,t)=>e.sweDelta-t.sweDelta).slice(0,r)}var wn=new Set([`S+`,`S`,`A+`,`A`,`A-`,`B+`,`B`,`C`,`all`]),Tn=new Set([`up`,`down`,`pending`,`all`]),En=new Set([`mood`,`idx`,`tier`,`sweScore`,`ctx`,`label`,`origin`,`latestPing`,`avg`,`condition`,`verdict`,`stability`,`uptime`,`aiLatency`,`tps`,`trend`]),Dn=new Set([`dashboard`,`settings`,`analytics`,`recommend`,`router`,`help`,`changelog`]),On=new Set([`asc`,`desc`]),kn=new Set(vn);function An(){if(typeof window>`u`)return null;let e=new URLSearchParams(window.location.search),t={};return e.has(`view`)&&Dn.has(e.get(`view`))&&(t.view=e.get(`view`)),e.has(`tier`)&&wn.has(e.get(`tier`))&&(t.tier=e.get(`tier`)),e.has(`status`)&&Tn.has(e.get(`status`))&&(t.status=e.get(`status`)),e.has(`provider`)&&(t.provider=e.get(`provider`)),e.has(`verdict`)&&(t.verdict=e.get(`verdict`)),e.has(`health`)&&(t.health=e.get(`health`)),e.has(`sort`)&&En.has(e.get(`sort`))&&(t.sort=e.get(`sort`)),e.has(`dir`)&&On.has(e.get(`dir`))&&(t.dir=e.get(`dir`)),e.has(`q`)&&(t.q=e.get(`q`)),e.has(`toolMode`)&&kn.has(e.get(`toolMode`))&&(t.toolMode=e.get(`toolMode`)),e.has(`recommend`)&&[`1`,`true`,`open`].includes(e.get(`recommend`))&&(t.view=`recommend`),e.has(`palette`)&&e.get(`palette`)===`open`&&(t.palette=`open`),t}function jn(e){let t=new URLSearchParams;return e?(e.currentView&&e.currentView!==`dashboard`&&t.set(`view`,e.currentView),e.filterTier&&e.filterTier!==`all`&&t.set(`tier`,e.filterTier),e.filterStatus&&e.filterStatus!==`all`&&t.set(`status`,e.filterStatus),e.filterProvider&&e.filterProvider!==`all`&&t.set(`provider`,e.filterProvider),e.filterVerdict&&e.filterVerdict!==`all`&&t.set(`verdict`,e.filterVerdict),e.filterHealth&&e.filterHealth!==`all`&&t.set(`health`,e.filterHealth),e.sortColumn&&(t.set(`sort`,e.sortColumn),e.sortDirection&&t.set(`dir`,e.sortDirection)),e.searchQuery&&t.set(`q`,e.searchQuery),e.toolMode&&t.set(`toolMode`,e.toolMode),e.paletteOpen&&t.set(`palette`,`open`),t):t}function Mn(e){if(typeof window>`u`)return;let t=jn(e).toString(),n=t?`${window.location.pathname}?${t}${window.location.hash}`:`${window.location.pathname}${window.location.hash}`;window.history.replaceState({},``,n)}function Nn({currentView:e,setCurrentView:t,filterState:n=null,paletteOpen:r=!1,setPaletteOpen:i=()=>{},toolMode:a=null,setToolMode:o=()=>{}}){let s=(0,v.useRef)(null),c=(0,v.useRef)(!1);(0,v.useEffect)(()=>{if(c.current)return;c.current=!0;let r=An();r&&(r.view&&t&&r.view!==e&&t(r.view),r.tier&&n?.setFilterTier&&n.setFilterTier(r.tier),r.status&&n?.setFilterStatus&&n.setFilterStatus(r.status),r.provider&&n?.setFilterProvider&&n.setFilterProvider(r.provider),r.verdict&&n?.setFilterVerdict&&n.setFilterVerdict(r.verdict),r.health&&n?.setFilterHealth&&n.setFilterHealth(r.health),r.sort&&n?.toggleSort&&(n.setSortColumn&&n.setSortColumn(r.sort),r.dir&&n.setSortDirection&&n.setSortDirection(r.dir)),r.q!==void 0&&n?.setSearchQuery&&n.setSearchQuery(r.q),r.toolMode&&o&&o(r.toolMode),r.palette===`open`&&i&&i(!0))},[]),(0,v.useEffect)(()=>{if(c.current)return s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{Mn({currentView:e,filterTier:n?.filterTier,filterStatus:n?.filterStatus,filterProvider:n?.filterProvider,filterVerdict:n?.filterVerdict,filterHealth:n?.filterHealth,sortColumn:n?.sortColumn,sortDirection:n?.sortDirection,searchQuery:n?.searchQuery,toolMode:a,paletteOpen:r})},80),()=>{s.current&&clearTimeout(s.current)}},[e,r,a,n?.filterTier,n?.filterStatus,n?.filterProvider,n?.filterVerdict,n?.filterHealth,n?.sortColumn,n?.sortDirection,n?.searchQuery])}var Pn=5*6e4;function Fn(e,t){if(!e||!t)return 0;let n=e.replace(/^v/,``).split(`.`).map(Number),r=t.replace(/^v/,``).split(`.`).map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){let t=n[e]||0,i=r[e]||0;if(i!==t)return i-t}return 0}function In({onToast:e}={}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=(0,v.useRef)(null),f=(0,v.useCallback)(async()=>{u(!0);try{let e=await fetch(`/api/version`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();n(t.local??null),i(t.latest??null),o(t.lastReleaseDate??null),c(t.error??null)}catch(e){c(e.message||`update check failed`)}finally{u(!1)}},[]);(0,v.useEffect)(()=>(f(),d.current=setInterval(f,Pn),()=>{d.current&&clearInterval(d.current)}),[f]);let p=!!(r&&t&&Fn(r,t)>0);return{localVersion:t,latestVersion:r,lastReleaseDate:a,updateAvailable:p,checkNow:f,runUpdate:(0,v.useCallback)(async()=>{if(!p){e?.(`No update available.`,`info`);return}try{let t=await fetch(`/api/update/run`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({version:r})}),n=await t.json().catch(()=>({}));t.ok&&n?.started?e?.(`Update to v${r} started — restart the dashboard to apply.`,`success`):e?.(n?.error||n?.message||`Update failed`,`error`)}catch(t){e?.(t.message||`Update request failed`,`error`)}},[p,r,e]),loading:l,error:s}}var Ln={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},P=(e,t,n,r)=>{let i=(0,v.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,v.createElement)(`svg`,{ref:u,...Ln[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,v.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},Rn=P(`outline`,`activity`,`Activity`,[[`path`,{d:`M3 12h4l3 8l4 -16l3 8h4`,key:`svg-0`}]]),zn=P(`outline`,`alert-octagon`,`AlertOctagon`,[[`path`,{d:`M12.802 2.165l5.575 2.389c.48 .206 .863 .589 1.07 1.07l2.388 5.574c.22 .512 .22 1.092 0 1.604l-2.389 5.575c-.206 .48 -.589 .863 -1.07 1.07l-5.574 2.388c-.512 .22 -1.092 .22 -1.604 0l-5.575 -2.389a2.036 2.036 0 0 1 -1.07 -1.07l-2.388 -5.574a2.036 2.036 0 0 1 0 -1.604l2.389 -5.575c.206 -.48 .589 -.863 1.07 -1.07l5.574 -2.388a2.036 2.036 0 0 1 1.604 0`,key:`svg-0`}],[`path`,{d:`M12 8v4`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),Bn=P(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),Vn=P(`outline`,`arrow-down`,`ArrowDown`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M18 13l-6 6`,key:`svg-1`}],[`path`,{d:`M6 13l6 6`,key:`svg-2`}]]),Hn=P(`outline`,`arrow-left`,`ArrowLeft`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M5 12l6 6`,key:`svg-1`}],[`path`,{d:`M5 12l6 -6`,key:`svg-2`}]]),Un=P(`outline`,`arrow-right`,`ArrowRight`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M13 18l6 -6`,key:`svg-1`}],[`path`,{d:`M13 6l6 6`,key:`svg-2`}]]),Wn=P(`outline`,`arrow-up`,`ArrowUp`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M18 11l-6 -6`,key:`svg-1`}],[`path`,{d:`M6 11l6 -6`,key:`svg-2`}]]),Gn=P(`outline`,`ban`,`Ban`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M5.7 5.7l12.6 12.6`,key:`svg-1`}]]),Kn=P(`outline`,`bolt`,`Bolt`,[[`path`,{d:`M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11`,key:`svg-0`}]]),qn=P(`outline`,`braces`,`Braces`,[[`path`,{d:`M7 4a2 2 0 0 0 -2 2v3a2 3 0 0 1 -2 3a2 3 0 0 1 2 3v3a2 2 0 0 0 2 2`,key:`svg-0`}],[`path`,{d:`M17 4a2 2 0 0 1 2 2v3a2 3 0 0 0 2 3a2 3 0 0 0 -2 3v3a2 2 0 0 1 -2 2`,key:`svg-1`}]]),Jn=P(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),Yn=P(`outline`,`checks`,`Checks`,[[`path`,{d:`M7 12l5 5l10 -10`,key:`svg-0`}],[`path`,{d:`M2 12l5 5m5 -5l5 -5`,key:`svg-1`}]]),Xn=P(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),Zn=P(`outline`,`chevron-left`,`ChevronLeft`,[[`path`,{d:`M15 6l-6 6l6 6`,key:`svg-0`}]]),Qn=P(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),$n=P(`outline`,`chevron-up`,`ChevronUp`,[[`path`,{d:`M6 15l6 -6l6 6`,key:`svg-0`}]]),er=P(`outline`,`circle-check`,`CircleCheck`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M9 12l2 2l4 -4`,key:`svg-1`}]]),tr=P(`outline`,`circle-dotted`,`CircleDotted`,[[`path`,{d:`M7.5 4.21l0 .01`,key:`svg-0`}],[`path`,{d:`M4.21 7.5l0 .01`,key:`svg-1`}],[`path`,{d:`M3 12l0 .01`,key:`svg-2`}],[`path`,{d:`M4.21 16.5l0 .01`,key:`svg-3`}],[`path`,{d:`M7.5 19.79l0 .01`,key:`svg-4`}],[`path`,{d:`M12 21l0 .01`,key:`svg-5`}],[`path`,{d:`M16.5 19.79l0 .01`,key:`svg-6`}],[`path`,{d:`M19.79 16.5l0 .01`,key:`svg-7`}],[`path`,{d:`M21 12l0 .01`,key:`svg-8`}],[`path`,{d:`M19.79 7.5l0 .01`,key:`svg-9`}],[`path`,{d:`M16.5 4.21l0 .01`,key:`svg-10`}],[`path`,{d:`M12 3l0 .01`,key:`svg-11`}]]),nr=P(`outline`,`clipboard`,`Clipboard`,[[`path`,{d:`M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2`,key:`svg-0`}],[`path`,{d:`M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2`,key:`svg-1`}]]),rr=P(`outline`,`clock`,`Clock`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 7v5l3 3`,key:`svg-1`}]]),ir=P(`outline`,`cloud-off`,`CloudOff`,[[`path`,{d:`M9.58 5.548c.24 -.11 .492 -.207 .752 -.286c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 .957 -.383 1.824 -1.003 2.454m-2.997 1.033h-11.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.13 -.582 .37 -1.128 .7 -1.62`,key:`svg-0`}],[`path`,{d:`M3 3l18 18`,key:`svg-1`}]]),ar=P(`outline`,`command`,`Command`,[[`path`,{d:`M7 9a2 2 0 1 1 2 -2v10a2 2 0 1 1 -2 -2h10a2 2 0 1 1 -2 2v-10a2 2 0 1 1 2 2h-10`,key:`svg-0`}]]),or=P(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),sr=P(`outline`,`dots`,`Dots`,[[`path`,{d:`M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}]]),cr=P(`outline`,`download`,`Download`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 11l5 5l5 -5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),lr=P(`outline`,`error-404`,`Error404`,[[`path`,{d:`M3 8v3a1 1 0 0 0 1 1h3`,key:`svg-0`}],[`path`,{d:`M7 8v8`,key:`svg-1`}],[`path`,{d:`M17 8v3a1 1 0 0 0 1 1h3`,key:`svg-2`}],[`path`,{d:`M21 8v8`,key:`svg-3`}],[`path`,{d:`M10 10v4a2 2 0 1 0 4 0v-4a2 2 0 1 0 -4 0`,key:`svg-4`}]]),ur=P(`outline`,`external-link`,`ExternalLink`,[[`path`,{d:`M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 13l9 -9`,key:`svg-1`}],[`path`,{d:`M15 4h5v5`,key:`svg-2`}]]),dr=P(`outline`,`eye-off`,`EyeOff`,[[`path`,{d:`M10.585 10.587a2 2 0 0 0 2.829 2.828`,key:`svg-0`}],[`path`,{d:`M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87`,key:`svg-1`}],[`path`,{d:`M3 3l18 18`,key:`svg-2`}]]),fr=P(`outline`,`eye`,`Eye`,[[`path`,{d:`M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`,key:`svg-0`}],[`path`,{d:`M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6`,key:`svg-1`}]]),pr=P(`outline`,`file-spreadsheet`,`FileSpreadsheet`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}],[`path`,{d:`M8 11h8v7h-8l0 -7`,key:`svg-2`}],[`path`,{d:`M8 15h8`,key:`svg-3`}],[`path`,{d:`M11 11v7`,key:`svg-4`}]]),mr=P(`outline`,`filter`,`Filter`,[[`path`,{d:`M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`,key:`svg-0`}]]),hr=P(`outline`,`flame`,`Flame`,[[`path`,{d:`M12 10.941c2.333 -3.308 .167 -7.823 -1 -8.941c0 3.395 -2.235 5.299 -3.667 6.706c-1.43 1.408 -2.333 3.294 -2.333 5.588c0 3.704 3.134 6.706 7 6.706c3.866 0 7 -3.002 7 -6.706c0 -1.712 -1.232 -4.403 -2.333 -5.588c-2.084 3.353 -3.257 3.353 -4.667 2.235`,key:`svg-0`}]]),gr=P(`outline`,`folders`,`Folders`,[[`path`,{d:`M9 3h3l2 2h5a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2`,key:`svg-0`}],[`path`,{d:`M17 16v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2h2`,key:`svg-1`}]]),_r=P(`outline`,`grip-vertical`,`GripVertical`,[[`path`,{d:`M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}],[`path`,{d:`M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-4`}],[`path`,{d:`M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-5`}]]),vr=P(`outline`,`history`,`History`,[[`path`,{d:`M12 8l0 4l2 2`,key:`svg-0`}],[`path`,{d:`M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5`,key:`svg-1`}]]),yr=P(`outline`,`hourglass-off`,`HourglassOff`,[[`path`,{d:`M18 18v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1v-2a6 6 0 0 1 6 -6`,key:`svg-0`}],[`path`,{d:`M6 6a6 6 0 0 0 6 6m3.13 -.88a6 6 0 0 0 2.87 -5.12v-2a1 1 0 0 0 -1 -1h-10`,key:`svg-1`}],[`path`,{d:`M3 3l18 18`,key:`svg-2`}]]),br=P(`outline`,`hourglass`,`Hourglass`,[[`path`,{d:`M6.5 7h11`,key:`svg-0`}],[`path`,{d:`M6.5 17h11`,key:`svg-1`}],[`path`,{d:`M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1`,key:`svg-2`}],[`path`,{d:`M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1`,key:`svg-3`}]]),xr=P(`outline`,`key`,`Key`,[[`path`,{d:`M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0`,key:`svg-0`}],[`path`,{d:`M15 9h.01`,key:`svg-1`}]]),Sr=P(`outline`,`layout-dashboard`,`LayoutDashboard`,[[`path`,{d:`M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1`,key:`svg-0`}],[`path`,{d:`M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1`,key:`svg-1`}],[`path`,{d:`M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1`,key:`svg-2`}],[`path`,{d:`M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1`,key:`svg-3`}]]),Cr=P(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),wr=P(`outline`,`loader`,`Loader`,[[`path`,{d:`M12 6l0 -3`,key:`svg-0`}],[`path`,{d:`M16.25 7.75l2.15 -2.15`,key:`svg-1`}],[`path`,{d:`M18 12l3 0`,key:`svg-2`}],[`path`,{d:`M16.25 16.25l2.15 2.15`,key:`svg-3`}],[`path`,{d:`M12 18l0 3`,key:`svg-4`}],[`path`,{d:`M7.75 16.25l-2.15 2.15`,key:`svg-5`}],[`path`,{d:`M6 12l-3 0`,key:`svg-6`}],[`path`,{d:`M7.75 7.75l-2.15 -2.15`,key:`svg-7`}]]),Tr=P(`outline`,`lock`,`Lock`,[[`path`,{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 11v-4a4 4 0 1 1 8 0v4`,key:`svg-2`}]]),Er=P(`outline`,`menu-2`,`Menu2`,[[`path`,{d:`M4 6l16 0`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}],[`path`,{d:`M4 18l16 0`,key:`svg-2`}]]),Dr=P(`outline`,`message-chatbot`,`MessageChatbot`,[[`path`,{d:`M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12`,key:`svg-0`}],[`path`,{d:`M9.5 9h.01`,key:`svg-1`}],[`path`,{d:`M14.5 9h.01`,key:`svg-2`}],[`path`,{d:`M9.5 13a3.5 3.5 0 0 0 5 0`,key:`svg-3`}]]),Or=P(`outline`,`moon`,`Moon`,[[`path`,{d:`M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008`,key:`svg-0`}]]),kr=P(`outline`,`player-play`,`PlayerPlay`,[[`path`,{d:`M7 4v16l13 -8l-13 -8`,key:`svg-0`}]]),Ar=P(`outline`,`player-stop`,`PlayerStop`,[[`path`,{d:`M5 7a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -10`,key:`svg-0`}]]),jr=P(`outline`,`plug-connected`,`PlugConnected`,[[`path`,{d:`M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5`,key:`svg-0`}],[`path`,{d:`M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5`,key:`svg-1`}],[`path`,{d:`M3 21l2.5 -2.5`,key:`svg-2`}],[`path`,{d:`M18.5 5.5l2.5 -2.5`,key:`svg-3`}],[`path`,{d:`M10 11l-2 2`,key:`svg-4`}],[`path`,{d:`M13 14l-2 2`,key:`svg-5`}]]),Mr=P(`outline`,`plug`,`Plug`,[[`path`,{d:`M9.785 6l8.215 8.215l-2.054 2.054a5.81 5.81 0 1 1 -8.215 -8.215l2.054 -2.054`,key:`svg-0`}],[`path`,{d:`M4 20l3.5 -3.5`,key:`svg-1`}],[`path`,{d:`M15 4l-3.5 3.5`,key:`svg-2`}],[`path`,{d:`M20 9l-3.5 3.5`,key:`svg-3`}]]),Nr=P(`outline`,`plus`,`Plus`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M5 12l14 0`,key:`svg-1`}]]),Pr=P(`outline`,`question-mark`,`QuestionMark`,[[`path`,{d:`M8 8a3.5 3 0 0 1 3.5 -3h1a3.5 3 0 0 1 3.5 3a3 3 0 0 1 -2 3a3 4 0 0 0 -2 4`,key:`svg-0`}],[`path`,{d:`M12 19l0 .01`,key:`svg-1`}]]),Fr=P(`outline`,`refresh`,`Refresh`,[[`path`,{d:`M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4`,key:`svg-0`}],[`path`,{d:`M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4`,key:`svg-1`}]]),Ir=P(`outline`,`route`,`Route`,[[`path`,{d:`M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`,key:`svg-0`}],[`path`,{d:`M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4`,key:`svg-1`}],[`path`,{d:`M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5`,key:`svg-2`}]]),Lr=P(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]),Rr=P(`outline`,`send`,`Send`,[[`path`,{d:`M10 14l11 -11`,key:`svg-0`}],[`path`,{d:`M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5`,key:`svg-1`}]]),zr=P(`outline`,`settings`,`Settings`,[[`path`,{d:`M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065`,key:`svg-0`}],[`path`,{d:`M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`,key:`svg-1`}]]),Br=P(`outline`,`sparkles`,`Sparkles`,[[`path`,{d:`M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6`,key:`svg-0`}]]),Vr=P(`outline`,`star`,`Star`,[[`path`,{d:`M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245`,key:`svg-0`}]]),Hr=P(`outline`,`sun`,`Sun`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7`,key:`svg-1`}]]),Ur=P(`outline`,`tool`,`Tool`,[[`path`,{d:`M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5`,key:`svg-0`}]]),Wr=P(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),Gr=P(`outline`,`trophy`,`Trophy`,[[`path`,{d:`M8 21l8 0`,key:`svg-0`}],[`path`,{d:`M12 17l0 4`,key:`svg-1`}],[`path`,{d:`M7 4l10 0`,key:`svg-2`}],[`path`,{d:`M17 4v8a5 5 0 0 1 -10 0v-8`,key:`svg-3`}],[`path`,{d:`M3 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-4`}],[`path`,{d:`M17 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-5`}]]),Kr=P(`outline`,`upload`,`Upload`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 9l5 -5l5 5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),qr=P(`outline`,`wand`,`Wand`,[[`path`,{d:`M6 21l15 -15l-3 -3l-15 15l3 3`,key:`svg-0`}],[`path`,{d:`M15 6l3 3`,key:`svg-1`}],[`path`,{d:`M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-2`}],[`path`,{d:`M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-3`}]]),Jr=P(`outline`,`x`,`X`,[[`path`,{d:`M18 6l-12 12`,key:`svg-0`}],[`path`,{d:`M6 6l12 12`,key:`svg-1`}]]),Yr=P(`filled`,`circle-check-filled`,`CircleCheckFilled`,[[`path`,{d:`M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z`,key:`svg-0`}]]),Xr=P(`filled`,`player-play-filled`,`PlayerPlayFilled`,[[`path`,{d:`M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z`,key:`svg-0`}]]),Zr=P(`filled`,`star-filled`,`StarFilled`,[[`path`,{d:`M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z`,key:`svg-0`}]]),Qr={wrap:`_wrap_3zy19_5`,trigger:`_trigger_3zy19_11`,cycle:`_cycle_3zy19_12`,emoji:`_emoji_3zy19_40`,label:`_label_3zy19_41`,menu:`_menu_3zy19_42`,item:`_item_3zy19_56`,itemActive:`_itemActive_3zy19_70`,itemEmoji:`_itemEmoji_3zy19_74`,itemText:`_itemText_3zy19_75`,activeDot:`_activeDot_3zy19_78`,compact:`_compact_3zy19_79`},$r=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),F=o(((e,t)=>{t.exports=$r()}))();function ei({toolMode:e=`opencode`,onSetToolMode:t,onCycleToolMode:n,compact:r=!1,tools:i=pn}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null),c=yn(e);return(0,v.useEffect)(()=>{if(!a)return;let e=e=>{s.current&&!s.current.contains(e.target)&&o(!1)},t=e=>{e.key===`Escape`&&o(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[a]),(0,F.jsxs)(`div`,{className:`${Qr.wrap} ${r?Qr.compact:``}`,ref:s,children:[(0,F.jsxs)(`button`,{type:`button`,className:Qr.trigger,onClick:()=>o(e=>!e),"aria-haspopup":`listbox`,"aria-expanded":a,title:`Install endpoint into: ${c.label}`,children:[(0,F.jsx)(`span`,{className:Qr.emoji,children:c.emoji}),(0,F.jsx)(`span`,{className:Qr.label,children:r?c.label.replace(/ CLI$/,``):c.label}),(0,F.jsx)(Xn,{size:13,stroke:1.7})]}),(0,F.jsx)(`button`,{type:`button`,className:Qr.cycle,onClick:n,title:`Cycle endpoint target`,"aria-label":`Cycle endpoint target`,children:(0,F.jsx)(Fr,{size:13,stroke:1.7})}),a&&(0,F.jsx)(`div`,{className:Qr.menu,role:`listbox`,"aria-label":`Endpoint install target`,children:i.map(n=>{let r=_n[n],i=n===e;return(0,F.jsxs)(`button`,{type:`button`,className:`${Qr.item} ${i?Qr.itemActive:``}`,onClick:()=>{t?.(n),o(!1)},role:`option`,"aria-selected":i,children:[(0,F.jsx)(`span`,{className:Qr.itemEmoji,children:r.emoji}),(0,F.jsxs)(`span`,{className:Qr.itemText,children:[(0,F.jsx)(`strong`,{children:r.label}),(0,F.jsx)(`small`,{children:r.flag})]}),i&&(0,F.jsx)(`span`,{className:Qr.activeDot,children:`●`})]},n)})})]})}var I={header:`_header_3lvj2_11`,left:`_left_3lvj2_28`,center:`_center_3lvj2_35`,right:`_right_3lvj2_41`,logo:`_logo_3lvj2_49`,logoIcon:`_logoIcon_3lvj2_50`,logoText:`_logoText_3lvj2_58`,logoTextHighlight:`_logoTextHighlight_3lvj2_64`,version:`_version_3lvj2_65`,nav:`_nav_3lvj2_72`,navBtn:`_navBtn_3lvj2_82`,navBtnActive:`_navBtnActive_3lvj2_103`,comingBadge:`_comingBadge_3lvj2_116`,menuWrap:`_menuWrap_3lvj2_132`,menuTrigger:`_menuTrigger_3lvj2_133`,menuPopover:`_menuPopover_3lvj2_138`,menuItem:`_menuItem_3lvj2_153`,searchBar:`_searchBar_3lvj2_173`,searchIcon:`_searchIcon_3lvj2_183`,searchInput:`_searchInput_3lvj2_184`,iconBtn:`_iconBtn_3lvj2_192`,cmdkBtn:`_cmdkBtn_3lvj2_202`,cmdkLabel:`_cmdkLabel_3lvj2_215`,benchmarkBtn:`_benchmarkBtn_3lvj2_218`,benchmarkActive:`_benchmarkActive_3lvj2_228`,benchmarkRunning:`_benchmarkRunning_3lvj2_233`,spinner:`_spinner_3lvj2_235`,spin:`_spin_3lvj2_235`,hamburgerBtn:`_hamburgerBtn_3lvj2_268`,mobileNav:`_mobileNav_3lvj2_290`,mobileNavItem:`_mobileNavItem_3lvj2_305`,mobileNavActive:`_mobileNavActive_3lvj2_322`,mobileNavDivider:`_mobileNavDivider_3lvj2_327`},ti=[{id:`dashboard`,label:`Dashboard`,icon:Sr},{id:`settings`,label:`Settings`,icon:zr},{id:`analytics`,label:`Analytics`,icon:Rn},{id:`recommend`,label:`Recommend`,icon:Br},{id:`router`,label:`Router`,icon:Ir},{id:`playground`,label:`Playground`,icon:Dr}],ni=[{id:`help`,label:`Help`,icon:Pr},{id:`changelog`,label:`Changelog`,icon:vr},{id:`install-endpoints`,label:`Install Endpoints`,icon:Mr},{id:`installed-models`,label:`Installed Models`,icon:gr}];function ri({searchQuery:e,onSearchChange:t,currentView:n,onNavigate:r,onToggleTheme:i,onOpenExport:a,onOpenCommandPalette:o,onBenchmark:s,benchmarkRunning:c,benchmarkTotal:l,benchmarkCompleted:u,modelsCount:d,theme:f,onToast:p,toolMode:m=`opencode`,onSetToolMode:h,onCycleToolMode:g,updateSlot:_=null}){let[y,b]=(0,v.useState)(!1),[x,S]=(0,v.useState)(!1),C=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!y&&!x)return;let e=e=>{C.current&&!C.current.contains(e.target)&&b(!1)},t=e=>{e.key===`Escape`&&(b(!1),S(!1))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[y,x]);let w=e=>{if(e.comingIn){p?.(`${e.label} arrives in milestone ${e.comingIn}.`,`info`);return}r(e.id),S(!1)},ee=e=>{if(b(!1),e.comingIn){p?.(`${e.label} arrives in milestone ${e.comingIn}.`,`info`);return}r(e.id)};return(0,F.jsxs)(`header`,{className:I.header,children:[(0,F.jsxs)(`div`,{className:I.left,children:[(0,F.jsxs)(`div`,{className:I.logo,children:[(0,F.jsx)(`span`,{className:I.logoIcon,children:`>`}),(0,F.jsxs)(`span`,{className:I.logoText,children:[(0,F.jsx)(`span`,{className:I.logoTextHighlight,children:`free`}),(0,F.jsx)(`span`,{children:`-coding-models`}),(0,F.jsx)(`span`,{className:I.logoTextHighlight,children:`_`})]})]}),(0,F.jsxs)(`span`,{className:I.version,children:[`v`,`0.5.32`]}),(0,F.jsx)(`button`,{className:I.hamburgerBtn,onClick:()=>S(e=>!e),"aria-label":`Navigation menu`,"aria-expanded":x,"aria-haspopup":`true`,children:(0,F.jsx)(Er,{size:18,stroke:1.5})}),x&&(0,F.jsxs)(`div`,{className:I.mobileNav,role:`menu`,children:[ti.map(e=>{let t=e.icon;return(0,F.jsxs)(`button`,{className:`${I.mobileNavItem} ${n===e.id?I.mobileNavActive:``}`,onClick:()=>w(e),role:`menuitem`,children:[(0,F.jsx)(t,{size:16,stroke:1.5}),(0,F.jsx)(`span`,{children:e.label})]},e.id)}),(0,F.jsx)(`div`,{className:I.mobileNavDivider}),ni.map(e=>{let t=e.icon;return(0,F.jsxs)(`button`,{className:I.mobileNavItem,onClick:()=>ee(e),role:`menuitem`,children:[(0,F.jsx)(t,{size:16,stroke:1.5}),(0,F.jsx)(`span`,{children:e.label})]},e.id)})]}),(0,F.jsxs)(`nav`,{className:I.nav,"aria-label":`Primary`,children:[ti.map(e=>{let t=e.icon,r=n===e.id;return(0,F.jsxs)(`button`,{className:`${I.navBtn} ${r?I.navBtnActive:``}`,onClick:()=>w(e),title:e.comingIn?`${e.label} — coming in ${e.comingIn}`:e.label,"aria-current":r?`page`:void 0,children:[(0,F.jsx)(t,{size:14,stroke:1.5}),(0,F.jsx)(`span`,{children:e.label}),e.comingIn&&(0,F.jsx)(`span`,{className:I.comingBadge,children:e.comingIn})]},e.id)}),(0,F.jsxs)(`div`,{className:I.menuWrap,ref:C,children:[(0,F.jsx)(`button`,{className:`${I.navBtn} ${I.menuTrigger}`,onClick:()=>b(e=>!e),title:`More features`,"aria-label":`More features`,"aria-haspopup":`true`,"aria-expanded":y,children:(0,F.jsx)(sr,{size:16,stroke:1.5})}),y&&(0,F.jsx)(`div`,{className:I.menuPopover,role:`menu`,children:ni.map(e=>{let t=e.icon;return(0,F.jsxs)(`button`,{className:I.menuItem,onClick:()=>ee(e),role:`menuitem`,children:[(0,F.jsx)(t,{size:14,stroke:1.5}),(0,F.jsx)(`span`,{children:e.label}),e.comingIn&&(0,F.jsx)(`span`,{className:I.comingBadge,children:e.comingIn})]},e.id)})})]})]})]}),(0,F.jsx)(`div`,{className:I.center,children:(0,F.jsxs)(`div`,{className:I.searchBar,children:[(0,F.jsx)(`span`,{className:I.searchIcon,children:(0,F.jsx)(Lr,{size:16,stroke:1.5})}),(0,F.jsx)(`input`,{type:`text`,className:I.searchInput,placeholder:`Search models, providers, tiers...`,value:e,onChange:e=>t(e.target.value),autoComplete:`off`})]})}),(0,F.jsxs)(`div`,{className:I.right,children:[(0,F.jsx)(ei,{toolMode:m,onSetToolMode:h,onCycleToolMode:g}),(0,F.jsxs)(`button`,{className:I.cmdkBtn,onClick:o,title:`Command palette (⌘K / Ctrl+P)`,"aria-label":`Open command palette (⌘K)`,children:[(0,F.jsx)(ar,{size:14,stroke:1.5}),(0,F.jsx)(`span`,{className:I.cmdkLabel,children:`⌘K`})]}),(0,F.jsxs)(`button`,{className:`${I.benchmarkBtn} ${c?I.benchmarkActive:``}`,onClick:s,disabled:c,title:c?`AI Speed Test running — ${u}/${l}`:`Run AI Latency benchmark on ${d} visible models`,"aria-label":c?`AI Speed Test running — ${u} of ${l} complete`:`AI Latency benchmark`,children:[(0,F.jsx)(kr,{size:14,stroke:1.5}),c?(0,F.jsxs)(`span`,{className:I.benchmarkRunning,children:[(0,F.jsx)(`span`,{className:I.spinner}),`RUN `,u,`/`,l]}):(0,F.jsx)(`span`,{children:`AI Latency`})]}),_,(0,F.jsx)(`button`,{className:I.iconBtn,onClick:i,title:`Theme: ${f} (click to cycle auto / dark / light)`,"aria-label":`Theme: ${f}. Click to cycle.`,children:f===`light`?(0,F.jsx)(Or,{size:16,stroke:1.5}):(0,F.jsx)(Hr,{size:16,stroke:1.5})}),(0,F.jsx)(`button`,{className:I.iconBtn,onClick:a,title:`Export Data`,"aria-label":`Export model data`,children:(0,F.jsx)(cr,{size:16,stroke:1.5})})]})]})}var ii={footer:`_footer_1uw54_1`,left:`_left_1uw54_8`,right:`_right_1uw54_8`};function ai(){return(0,F.jsxs)(`footer`,{className:ii.footer,children:[(0,F.jsxs)(`div`,{className:ii.left,children:[`by `,(0,F.jsx)(`a`,{href:`https://vavanessa.dev`,target:`_blank`,rel:`noopener`,children:`Vava-Nessa`})]}),(0,F.jsxs)(`div`,{className:ii.right,children:[(0,F.jsx)(`a`,{href:`https://github.com/vava-nessa/free-coding-models`,target:`_blank`,rel:`noopener`,children:`GitHub`}),(0,F.jsx)(`a`,{href:`https://discord.gg/ZTNFHvvCkU`,target:`_blank`,rel:`noopener`,children:`Discord`})]})]})}var oi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 181 24" xmlns="http://www.w3.org/2000/svg"><title>Google AI Studio</title><path d="M172.721 19.07c-1.172 0-2.221-.266-3.149-.798a5.779 5.779 0 01-2.169-2.237c-.517-.943-.775-1.993-.775-3.15 0-1.155.258-2.205.775-3.149a5.619 5.619 0 012.169-2.213c.928-.548 1.977-.822 3.149-.822 1.171 0 2.221.274 3.149.822a5.777 5.777 0 012.168 2.236c.518.944.776 1.986.776 3.127 0 1.156-.258 2.206-.776 3.15a5.776 5.776 0 01-2.168 2.236c-.928.532-1.978.799-3.149.799zm0-2.304c.639 0 1.232-.153 1.78-.457.548-.32.981-.768 1.301-1.346.335-.594.502-1.286.502-2.077 0-.791-.167-1.476-.502-2.054a3.304 3.304 0 00-1.301-1.324 3.472 3.472 0 00-1.78-.479c-.639 0-1.232.16-1.78.48a3.458 3.458 0 00-1.324 1.323c-.319.578-.479 1.263-.479 2.054 0 .791.16 1.483.479 2.077a3.629 3.629 0 001.324 1.346 3.606 3.606 0 001.78.457zM162.999 5.378a1.69 1.69 0 01-1.21-.48 1.69 1.69 0 01-.479-1.21c0-.47.16-.866.479-1.186a1.65 1.65 0 011.21-.502c.471 0 .867.167 1.186.502.335.32.503.715.503 1.187 0 .471-.168.875-.503 1.21a1.61 1.61 0 01-1.186.479zm-1.255 1.688h2.51v11.64h-2.51V7.066zM152.429 19.07c-1.05 0-2.001-.266-2.853-.798-.852-.533-1.529-1.263-2.031-2.191-.487-.944-.73-2.008-.73-3.195 0-1.187.243-2.244.73-3.172.502-.944 1.179-1.682 2.031-2.214.852-.533 1.803-.799 2.853-.799.821 0 1.559.183 2.213.548.655.365 1.149.814 1.484 1.346h.114l-.114-1.643V2.365h2.51v16.34h-2.396V17.2h-.114c-.335.517-.829.959-1.484 1.324-.654.365-1.392.547-2.213.547zm.365-2.305c.608 0 1.171-.16 1.689-.479.532-.32.958-.776 1.278-1.37.319-.592.479-1.27.479-2.03 0-.76-.16-1.43-.479-2.008-.32-.594-.746-1.05-1.278-1.37a3.158 3.158 0 00-1.689-.48c-.609 0-1.179.16-1.712.48-.532.32-.958.776-1.278 1.37-.319.578-.479 1.247-.479 2.008 0 .76.16 1.438.479 2.03.32.594.746 1.05 1.278 1.37.533.32 1.103.48 1.712.48zM138.527 19.07c-1.415 0-2.495-.418-3.241-1.255-.73-.852-1.095-2.03-1.095-3.537V7.066h2.51v6.87c0 .943.221 1.65.662 2.122.456.472 1.05.707 1.78.707.593 0 1.118-.152 1.575-.456.456-.32.806-.738 1.049-1.255a3.856 3.856 0 00.366-1.666V7.066h2.51v11.64h-2.373v-1.507h-.137c-.32.548-.814.997-1.484 1.346a4.517 4.517 0 01-2.122.525zM130.115 18.888a4.208 4.208 0 01-1.461-.251c-.457-.167-.829-.388-1.118-.662-.655-.654-.982-1.544-.982-2.67V9.28h-2.031V7.066h2.031V3.78h2.511v3.286h2.83V9.28h-2.83v5.477c0 .624.121 1.065.365 1.324.228.304.624.456 1.187.456.258 0 .486-.03.684-.09.198-.077.411-.191.639-.343v2.442c-.502.228-1.11.342-1.825.342zM117.888 19.07a6.03 6.03 0 01-3.652-1.186c-1.08-.791-1.825-1.902-2.236-3.332l2.419-.981c.243.897.669 1.635 1.278 2.213.624.563 1.369.845 2.236.845.807 0 1.491-.206 2.054-.617.563-.426.845-1.004.845-1.734 0-.67-.251-1.217-.753-1.643-.487-.441-1.347-.883-2.579-1.324l-1.027-.365c-1.096-.38-2.016-.928-2.762-1.643-.745-.715-1.118-1.658-1.118-2.83 0-.806.221-1.552.662-2.236.441-.685 1.05-1.225 1.826-1.62.791-.412 1.681-.617 2.67-.617 1.43 0 2.571.35 3.423 1.05.852.684 1.423 1.46 1.712 2.328l-2.305.981c-.168-.517-.487-.974-.959-1.37-.471-.395-1.08-.593-1.826-.593-.745 0-1.376.19-1.894.57-.502.381-.753.868-.753 1.461 0 .563.228 1.027.685 1.393.456.365 1.171.715 2.145 1.05l1.027.342c1.4.487 2.48 1.126 3.241 1.917.776.776 1.164 1.818 1.164 3.126 0 1.065-.274 1.963-.822 2.693a4.978 4.978 0 01-2.1 1.598 6.677 6.677 0 01-2.601.525zM102.221 2.365h2.556v16.34h-2.556V2.365zM90.94 2.365h2.922L100 18.705h-2.83l-1.46-4.176h-6.596l-1.484 4.176h-2.83l6.14-16.34zm3.903 9.79l-1.734-4.86-.64-1.895h-.136l-.64 1.894-1.734 4.862h4.884zM73.43 19.07c-1.141 0-2.168-.266-3.081-.798a5.758 5.758 0 01-2.123-2.191c-.502-.943-.753-2-.753-3.172 0-1.111.244-2.138.73-3.081a5.898 5.898 0 012.078-2.282c.882-.563 1.886-.845 3.012-.845 1.171 0 2.183.259 3.035.776A4.985 4.985 0 0178.291 9.6c.456.897.684 1.909.684 3.035 0 .213-.022.48-.068.799h-8.923c.091 1.08.471 1.917 1.14 2.51a3.57 3.57 0 002.374.867c.715 0 1.332-.16 1.849-.48a3.745 3.745 0 001.278-1.345l2.122 1.004c-.547.958-1.263 1.711-2.145 2.259-.882.548-1.94.822-3.172.822zm2.99-7.553a2.82 2.82 0 00-.389-1.21c-.228-.41-.578-.753-1.05-1.027-.456-.274-1.019-.41-1.688-.41-.806 0-1.491.243-2.054.73-.548.471-.928 1.11-1.141 1.917h6.322zM62.763 2.365h2.51v16.34h-2.51V2.365zM54.016 24c-1.43 0-2.616-.327-3.56-.981-.928-.654-1.552-1.43-1.871-2.328l2.35-.981a3.148 3.148 0 001.164 1.46c.548.38 1.187.57 1.917.57 1.065 0 1.895-.319 2.488-.958.609-.624.913-1.506.913-2.647v-1.073h-.137c-.38.548-.89.982-1.53 1.301-.623.304-1.346.457-2.167.457a5.185 5.185 0 01-2.716-.754c-.837-.502-1.506-1.21-2.008-2.122-.487-.928-.73-1.986-.73-3.172 0-1.187.243-2.237.73-3.15.502-.928 1.171-1.643 2.008-2.145a5.07 5.07 0 012.716-.776c.806 0 1.529.16 2.168.48.639.319 1.149.753 1.529 1.3h.137V7.066h2.396v11c0 1.263-.243 2.336-.73 3.218a4.81 4.81 0 01-2.054 2.031c-.867.457-1.872.685-3.013.685zm.023-7.463c.609 0 1.172-.144 1.69-.433a3.281 3.281 0 001.231-1.301c.305-.578.457-1.255.457-2.031 0-1.187-.327-2.107-.982-2.762-.639-.67-1.437-1.004-2.396-1.004-.623 0-1.194.152-1.711.457-.518.289-.928.715-1.233 1.278-.304.563-.456 1.24-.456 2.03 0 .792.152 1.469.456 2.032a3.28 3.28 0 001.233 1.3c.517.29 1.087.434 1.711.434zM40.36 19.07c-1.172 0-2.222-.266-3.15-.798a5.778 5.778 0 01-2.168-2.237c-.517-.943-.776-1.993-.776-3.15 0-1.155.259-2.205.776-3.149a5.618 5.618 0 012.168-2.213c.928-.548 1.978-.822 3.15-.822 1.17 0 2.22.274 3.149.822a5.778 5.778 0 012.168 2.236c.517.944.776 1.986.776 3.127 0 1.156-.259 2.206-.776 3.15a5.778 5.778 0 01-2.168 2.236c-.928.532-1.978.799-3.15.799zm0-2.304c.638 0 1.232-.153 1.78-.457.547-.32.98-.768 1.3-1.346.335-.594.502-1.286.502-2.077 0-.791-.167-1.476-.502-2.054a3.303 3.303 0 00-1.3-1.324 3.472 3.472 0 00-1.78-.479c-.64 0-1.233.16-1.78.48a3.458 3.458 0 00-1.324 1.323c-.32.578-.48 1.263-.48 2.054 0 .791.16 1.483.48 2.077a3.629 3.629 0 001.323 1.346 3.606 3.606 0 001.78.457zM26.497 19.07c-1.172 0-2.221-.266-3.15-.798a5.778 5.778 0 01-2.168-2.237c-.517-.943-.775-1.993-.775-3.15 0-1.155.258-2.205.776-3.149a5.618 5.618 0 012.168-2.213c.928-.548 1.977-.822 3.149-.822s2.221.274 3.15.822a5.779 5.779 0 012.167 2.236c.518.944.776 1.986.776 3.127 0 1.156-.258 2.206-.776 3.15a5.778 5.778 0 01-2.168 2.236c-.928.532-1.977.799-3.149.799zm0-2.304c.639 0 1.232-.153 1.78-.457.548-.32.981-.768 1.3-1.346.336-.594.503-1.286.503-2.077 0-.791-.167-1.476-.502-2.054a3.303 3.303 0 00-1.3-1.324 3.472 3.472 0 00-1.781-.479c-.639 0-1.232.16-1.78.48a3.456 3.456 0 00-1.324 1.323c-.32.578-.479 1.263-.479 2.054 0 .791.16 1.483.48 2.077a3.627 3.627 0 001.323 1.346 3.606 3.606 0 001.78.457zM10.558 19.07c-1.552 0-2.982-.372-4.29-1.118a8.49 8.49 0 01-3.127-3.058C2.381 13.586 2 12.133 2 10.535c0-1.597.38-3.043 1.141-4.336a8.435 8.435 0 013.127-3.08C7.576 2.372 9.006 2 10.558 2c1.232 0 2.381.22 3.446.662 1.065.441 1.955 1.057 2.67 1.848l-1.78 1.78a5.401 5.401 0 00-1.917-1.369c-.73-.32-1.544-.48-2.442-.48-1.05 0-2.03.252-2.944.754a5.702 5.702 0 00-2.19 2.145c-.548.928-.822 1.993-.822 3.195 0 1.202.274 2.267.821 3.195a5.702 5.702 0 002.191 2.146 6.057 6.057 0 002.967.753c.974 0 1.788-.145 2.442-.434a6.2 6.2 0 001.757-1.164c.335-.335.617-.753.845-1.255.243-.502.403-1.05.479-1.643h-5.546V9.85H18.5c.076.426.114.867.114 1.323 0 1.035-.16 2.032-.479 2.99a6.294 6.294 0 01-1.53 2.465c-1.536 1.628-3.552 2.442-6.047 2.442z"></path></svg>`,si=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Google AI Studio</title><path d="M9.921 4.196H6.328A2.705 2.705 0 003.623 6.9v11.362a2.705 2.705 0 002.705 2.705h11.363a2.705 2.705 0 002.705-2.705v-4.756l1.623-1.113v5.87a4.329 4.329 0 01-4.328 4.328H6.328A4.329 4.329 0 012 18.263V6.901a4.328 4.328 0 014.328-4.329h4.545l-.952 1.624z"></path><path d="M17.82 0c.145 0 .268.104.299.246a7 7 0 001.9 3.484 7 7 0 003.485 1.901c.142.031.246.154.246.3a.308.308 0 01-.246.298A7 7 0 0020.02 8.13a7 7 0 00-1.912 3.535.297.297 0 01-.288.238.297.297 0 01-.288-.238A7 7 0 0015.62 8.13a7 7 0 00-3.535-1.912.297.297 0 01-.238-.288c0-.14.1-.26.238-.288A7 7 0 0015.62 3.73 7.001 7.001 0 0017.521.246.308.308 0 0117.82 0z"></path></svg>`,ci=`<svg fill="currentColor" height="1em" style="flex:none;line-height:1" viewBox="0 0 53 24" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M13 2.701A9.299 9.299 0 0013 21.3V22.7C7.09 22.701 2.299 17.91 2.299 12S7.09 1.299 13 1.299V2.7zm4.752 3.677a7.353 7.353 0 00-9.453 11.265l-.901 1.074A8.755 8.755 0 1118.652 5.304l-.901 1.074zm-2.256.844a5.407 5.407 0 00-5.049 9.563l-.654 1.24a6.81 6.81 0 016.358-12.043l-.655 1.24zM13 8.539a3.461 3.461 0 000 6.922v1.402a4.863 4.863 0 010-9.726v1.402z" fill="#F15A29" fill-rule="evenodd"></path><path d="M14.286 10.836a2.242 2.242 0 00-.51-.409 1.085 1.085 0 00-.545-.152c-.254 0-.482.047-.683.14a1.582 1.582 0 00-.841.912 1.848 1.848 0 000 1.262 1.595 1.595 0 00.841.913c.2.093.429.14.683.14.217 0 .418-.046.603-.135.187-.09.35-.225.475-.392l.927 1.006c-.139.14-.3.261-.481.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.316 3.316 0 01-1.182-.21 2.826 2.826 0 01-.962-.597 2.813 2.813 0 01-.643-.929 2.986 2.986 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.277-.261.604-.464.962-.596a3.316 3.316 0 011.181-.21c.355 0 .713.068 1.072.204.362.138.686.36.945.649l-.962.97z"></path><path d="M19.338 11.397c-.008-.414-.136-.738-.383-.976-.247-.237-.59-.356-1.03-.356-.418 0-.749.12-.991.362-.244.242-.393.565-.447.97h2.85zm-2.85 1.052c.045.42.208.748.486.982.278.234.614.351 1.008.351.348 0 .639-.072.875-.217a2.42 2.42 0 00.62-.543l.997.76c-.325.405-.689.694-1.09.865a3.32 3.32 0 01-2.445.047 2.821 2.821 0 01-.962-.597 2.829 2.829 0 01-.643-.929 2.992 2.992 0 01-.237-1.21c0-.444.079-.847.238-1.21.15-.35.368-.666.642-.929.278-.261.605-.464.962-.596a3.32 3.32 0 011.182-.21c.386 0 .74.067 1.06.204.32.136.595.333.823.59.228.258.405.575.533.953.128.379.19.812.19 1.303v.386h-4.24zm4.843-3.296h1.39v.888h.023c.155-.327.375-.58.661-.76a1.812 1.812 0 011.234-.246c.081.016.164.036.25.06v1.355a3.912 3.912 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.324 0-.585.06-.782.182a1.38 1.38 0 00-.66.883 1.76 1.76 0 00-.053.35v3.005h-1.39V9.152zm7.797 2.244c-.008-.414-.135-.738-.383-.976-.246-.237-.59-.356-1.03-.356-.417 0-.748.12-.99.362-.245.242-.393.565-.447.97h2.85zm-2.85 1.052c.046.42.208.748.487.982.277.234.613.351 1.007.351.348 0 .64-.072.875-.217.236-.144.446-.328.62-.543l.997.76c-.325.405-.688.694-1.09.865a3.319 3.319 0 01-2.445.047 2.823 2.823 0 01-.961-.597 2.829 2.829 0 01-.643-.929 2.984 2.984 0 01-.238-1.21c0-.444.08-.847.238-1.21.158-.362.373-.672.643-.929a2.84 2.84 0 01.962-.596 3.318 3.318 0 011.181-.21c.387 0 .74.067 1.06.204.321.136.596.333.823.59.228.258.406.575.533.953.128.379.192.812.192 1.303v.386h-4.241zm9.225-.49a1.84 1.84 0 00-.11-.632 1.603 1.603 0 00-.84-.912 1.607 1.607 0 00-.684-.14 1.587 1.587 0 00-1.524 1.052 1.83 1.83 0 00-.11.631c0 .218.036.429.11.632a1.583 1.583 0 001.524 1.052 1.591 1.591 0 001.524-1.052c.073-.203.11-.414.11-.632zM30.89 5.925h1.391v3.94h.035a1.99 1.99 0 01.266-.287 2.327 2.327 0 01.927-.485c.201-.054.433-.081.696-.081a2.55 2.55 0 011.94.853c.236.264.42.577.55.935.132.358.198.744.198 1.157 0 .413-.062.8-.186 1.158a2.673 2.673 0 01-.544.935c-.243.267-.539.48-.869.625-.34.152-.723.229-1.147.229a2.613 2.613 0 01-1.1-.235 1.785 1.785 0 01-.812-.748h-.023v.841H30.89V5.927zm6.604 3.227h1.39v.888h.023c.155-.327.376-.58.661-.76a1.815 1.815 0 011.234-.246c.081.016.164.036.25.06v1.355a3.893 3.893 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.325 0-.585.06-.782.182a1.43 1.43 0 00-.452.415 1.39 1.39 0 00-.209.468 1.788 1.788 0 00-.051.35v3.005h-1.391V9.152zm7.207 3.097h-.29c-.193 0-.409.008-.649.024a3.384 3.384 0 00-.677.11c-.213.06-.393.146-.54.258a.564.564 0 00-.22.473c0 .133.03.244.087.333.058.09.134.166.226.229a.933.933 0 00.313.134c.117.027.232.04.348.04.48 0 .832-.114 1.06-.344.228-.23.342-.544.342-.94v-.317zm.082 1.743h-.036c-.2.32-.456.551-.764.695-.32.146-.668.22-1.02.216-.253 0-.504-.035-.748-.104a2.03 2.03 0 01-.649-.317 1.616 1.616 0 01-.457-.526 1.501 1.501 0 01-.174-.736c0-.305.054-.563.163-.777.103-.21.252-.393.434-.539a2.19 2.19 0 01.632-.344c.242-.087.492-.152.747-.193.258-.043.52-.07.782-.082.247-.011.495-.017.742-.018h.347v-.151c0-.351-.12-.614-.36-.79-.238-.175-.544-.262-.914-.262a2.129 2.129 0 00-1.483.585l-.73-.738a2.7 2.7 0 011.083-.69c.412-.14.845-.21 1.28-.21.394 0 .726.046.997.135.27.09.494.205.672.345.177.14.314.302.411.485.096.183.166.368.21.555.041.187.066.368.074.544.008.175.012.33.012.461v3.227h-1.252v-.771zm5.018-3.286c-.27-.382-.634-.573-1.09-.573a1.16 1.16 0 00-.544.14.478.478 0 00-.266.456c0 .172.073.297.22.375.147.078.332.144.556.198.224.055.465.111.724.17.259.058.5.148.724.268.224.122.41.287.556.498.147.21.22.498.22.864 0 .336-.071.619-.214.848-.139.226-.33.417-.556.556a2.456 2.456 0 01-.77.303c-.282.062-.57.094-.858.094-.432 0-.83-.062-1.194-.187a2.27 2.27 0 01-.973-.678l.928-.877c.177.203.368.368.573.497.204.129.454.193.747.193.101 0 .205-.012.313-.035a.992.992 0 00.301-.117.71.71 0 00.226-.204.482.482 0 00.087-.287c0-.194-.073-.34-.22-.432a1.966 1.966 0 00-.556-.229c-.24-.062-.481-.116-.724-.164a2.794 2.794 0 01-.725-.245 1.523 1.523 0 01-.556-.473c-.146-.203-.22-.483-.22-.841 0-.312.064-.583.191-.813a1.69 1.69 0 01.504-.567c.217-.152.461-.263.719-.327a3.256 3.256 0 011.923.087c.356.123.664.354.881.66l-.927.842z"></path></svg>`,li=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 53 24" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M13 2.701A9.299 9.299 0 0013 21.3V22.7C7.09 22.701 2.299 17.91 2.299 12S7.09 1.299 13 1.299V2.7zm4.752 3.677a7.353 7.353 0 00-9.453 11.265l-.901 1.074A8.755 8.755 0 1118.652 5.304l-.901 1.074zm-2.256.844a5.407 5.407 0 00-5.049 9.563l-.654 1.24a6.81 6.81 0 016.358-12.043l-.655 1.24zM13 8.539a3.461 3.461 0 000 6.922v1.402a4.863 4.863 0 010-9.726v1.402z"></path><path d="M14.286 10.836a2.242 2.242 0 00-.51-.409 1.085 1.085 0 00-.545-.152c-.254 0-.482.047-.683.14a1.582 1.582 0 00-.841.912 1.848 1.848 0 000 1.262 1.595 1.595 0 00.841.913c.2.093.429.14.683.14.217 0 .418-.046.603-.135.187-.09.35-.225.475-.392l.927 1.006c-.139.14-.3.261-.481.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.316 3.316 0 01-1.182-.21 2.826 2.826 0 01-.962-.597 2.813 2.813 0 01-.643-.929 2.986 2.986 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.277-.261.604-.464.962-.596a3.316 3.316 0 011.181-.21c.355 0 .713.068 1.072.204.362.138.686.36.945.649l-.962.97z"></path><path d="M19.338 11.397c-.008-.414-.136-.738-.383-.976-.247-.237-.59-.356-1.03-.356-.418 0-.749.12-.991.362-.244.242-.393.565-.447.97h2.85zm-2.85 1.052c.045.42.208.748.486.982.278.234.614.351 1.008.351.348 0 .639-.072.875-.217a2.42 2.42 0 00.62-.543l.997.76c-.325.405-.689.694-1.09.865a3.32 3.32 0 01-2.445.047 2.821 2.821 0 01-.962-.597 2.829 2.829 0 01-.643-.929 2.992 2.992 0 01-.237-1.21c0-.444.079-.847.238-1.21.15-.35.368-.666.642-.929.278-.261.605-.464.962-.596a3.32 3.32 0 011.182-.21c.386 0 .74.067 1.06.204.32.136.595.333.823.59.228.258.405.575.533.953.128.379.19.812.19 1.303v.386h-4.24zm4.843-3.296h1.39v.888h.023c.155-.327.375-.58.661-.76a1.812 1.812 0 011.234-.246c.081.016.164.036.25.06v1.355a3.912 3.912 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.324 0-.585.06-.782.182a1.38 1.38 0 00-.66.883 1.76 1.76 0 00-.053.35v3.005h-1.39V9.152zm7.797 2.244c-.008-.414-.135-.738-.383-.976-.246-.237-.59-.356-1.03-.356-.417 0-.748.12-.99.362-.245.242-.393.565-.447.97h2.85zm-2.85 1.052c.046.42.208.748.487.982.277.234.613.351 1.007.351.348 0 .64-.072.875-.217.236-.144.446-.328.62-.543l.997.76c-.325.405-.688.694-1.09.865a3.319 3.319 0 01-2.445.047 2.823 2.823 0 01-.961-.597 2.829 2.829 0 01-.643-.929 2.984 2.984 0 01-.238-1.21c0-.444.08-.847.238-1.21.158-.362.373-.672.643-.929a2.84 2.84 0 01.962-.596 3.318 3.318 0 011.181-.21c.387 0 .74.067 1.06.204.321.136.596.333.823.59.228.258.406.575.533.953.128.379.192.812.192 1.303v.386h-4.241zm9.225-.49a1.84 1.84 0 00-.11-.632 1.603 1.603 0 00-.84-.912 1.607 1.607 0 00-.684-.14 1.587 1.587 0 00-1.524 1.052 1.83 1.83 0 00-.11.631c0 .218.036.429.11.632a1.583 1.583 0 001.524 1.052 1.591 1.591 0 001.524-1.052c.073-.203.11-.414.11-.632zM30.89 5.925h1.391v3.94h.035a1.99 1.99 0 01.266-.287 2.327 2.327 0 01.927-.485c.201-.054.433-.081.696-.081a2.55 2.55 0 011.94.853c.236.264.42.577.55.935.132.358.198.744.198 1.157 0 .413-.062.8-.186 1.158a2.673 2.673 0 01-.544.935c-.243.267-.539.48-.869.625-.34.152-.723.229-1.147.229a2.613 2.613 0 01-1.1-.235 1.785 1.785 0 01-.812-.748h-.023v.841H30.89V5.927zm6.604 3.227h1.39v.888h.023c.155-.327.376-.58.661-.76a1.815 1.815 0 011.234-.246c.081.016.164.036.25.06v1.355a3.893 3.893 0 00-.343-.076c-.109-.02-.22-.03-.33-.03-.325 0-.585.06-.782.182a1.43 1.43 0 00-.452.415 1.39 1.39 0 00-.209.468 1.788 1.788 0 00-.051.35v3.005h-1.391V9.152zm7.207 3.097h-.29c-.193 0-.409.008-.649.024a3.384 3.384 0 00-.677.11c-.213.06-.393.146-.54.258a.564.564 0 00-.22.473c0 .133.03.244.087.333.058.09.134.166.226.229a.933.933 0 00.313.134c.117.027.232.04.348.04.48 0 .832-.114 1.06-.344.228-.23.342-.544.342-.94v-.317zm.082 1.743h-.036c-.2.32-.456.551-.764.695-.32.146-.668.22-1.02.216-.253 0-.504-.035-.748-.104a2.03 2.03 0 01-.649-.317 1.616 1.616 0 01-.457-.526 1.501 1.501 0 01-.174-.736c0-.305.054-.563.163-.777.103-.21.252-.393.434-.539a2.19 2.19 0 01.632-.344c.242-.087.492-.152.747-.193.258-.043.52-.07.782-.082.247-.011.495-.017.742-.018h.347v-.151c0-.351-.12-.614-.36-.79-.238-.175-.544-.262-.914-.262a2.129 2.129 0 00-1.483.585l-.73-.738a2.7 2.7 0 011.083-.69c.412-.14.845-.21 1.28-.21.394 0 .726.046.997.135.27.09.494.205.672.345.177.14.314.302.411.485.096.183.166.368.21.555.041.187.066.368.074.544.008.175.012.33.012.461v3.227h-1.252v-.771zm5.018-3.286c-.27-.382-.634-.573-1.09-.573a1.16 1.16 0 00-.544.14.478.478 0 00-.266.456c0 .172.073.297.22.375.147.078.332.144.556.198.224.055.465.111.724.17.259.058.5.148.724.268.224.122.41.287.556.498.147.21.22.498.22.864 0 .336-.071.619-.214.848-.139.226-.33.417-.556.556a2.456 2.456 0 01-.77.303c-.282.062-.57.094-.858.094-.432 0-.83-.062-1.194-.187a2.27 2.27 0 01-.973-.678l.928-.877c.177.203.368.368.573.497.204.129.454.193.747.193.101 0 .205-.012.313-.035a.992.992 0 00.301-.117.71.71 0 00.226-.204.482.482 0 00.087-.287c0-.194-.073-.34-.22-.432a1.966 1.966 0 00-.556-.229c-.24-.062-.481-.116-.724-.164a2.794 2.794 0 01-.725-.245 1.523 1.523 0 01-.556-.473c-.146-.203-.22-.483-.22-.841 0-.312.064-.583.191-.813a1.69 1.69 0 01.504-.567c.217-.152.461-.263.719-.327a3.256 3.256 0 011.923.087c.356.123.664.354.881.66l-.927.842z"></path></svg>`,ui=`<svg fill="currentColor" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z" fill="#F15A29" fill-rule="evenodd"></path><path d="M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"></path></svg>`,di=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 95 24" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M17.075 16.717c-.62-.52-.982-1.25-1.085-2.187l9.446.001v-.86c0-1.094-.14-2.06-.425-2.904-.283-.842-.68-1.549-1.188-2.12a5.049 5.049 0 00-1.832-1.317c-.713-.304-1.5-.456-2.361-.456a7.396 7.396 0 00-2.633.469 6.325 6.325 0 00-2.143 1.328 6.309 6.309 0 00-1.431 2.07c-.354.808-.53 1.706-.53 2.696 0 .99.176 1.888.529 2.695.333.78.82 1.483 1.432 2.07a6.288 6.288 0 002.142 1.328 7.396 7.396 0 002.633.469 7.101 7.101 0 002.814-.573c.894-.381 1.704-1.025 2.427-1.926l-2.22-1.693c-.388.48-.855.888-1.381 1.21-.526.322-1.175.483-1.95.483-.877 0-1.625-.261-2.244-.783zm4.413-6.705c.55.53.836 1.254.852 2.175h-6.35c.12-.903.452-1.623.995-2.162.54-.537 1.278-.807 2.207-.807.98 0 1.745.266 2.296.794z"></path><path d="M29.878 7.187H26.78v12.499h3.098v-6.693c0-.172.038-.433.116-.78.077-.348.232-.694.465-1.043.233-.346.568-.654 1.006-.923.44-.27 1.02-.405 1.742-.405.247 0 .493.023.736.066.256.045.51.101.761.169v-3.02a7.03 7.03 0 00-.554-.131 2.962 2.962 0 00-.555-.05c-.827 0-1.559.198-2.194.597-.636.4-1.129.964-1.473 1.693h-.05V7.187z"></path><path clip-rule="evenodd" d="M37.8 14.531c.102.937.465 1.666 1.084 2.186.619.522 1.367.783 2.245.783.775 0 1.424-.161 1.95-.483.525-.322.992-.73 1.38-1.21l2.22 1.693c-.722.901-1.532 1.545-2.426 1.926-.89.38-1.848.576-2.815.573a7.39 7.39 0 01-2.632-.469 6.287 6.287 0 01-2.142-1.328 6.302 6.302 0 01-1.432-2.07c-.353-.807-.53-1.705-.53-2.696 0-.989.177-1.887.53-2.695a6.3 6.3 0 011.432-2.07 6.325 6.325 0 012.142-1.328 7.39 7.39 0 012.633-.469c.86 0 1.648.152 2.361.456a5.05 5.05 0 011.833 1.316c.507.572.904 1.279 1.188 2.121.285.844.426 1.81.426 2.903v.861H37.8zm5.497-4.519c.55.53.834 1.254.852 2.175H37.8c.121-.903.452-1.623.995-2.162.54-.537 1.278-.807 2.207-.807.98 0 1.746.266 2.296.794zM51.173 0h-3.098v19.686h2.944V17.81h.051c.447.765 1.048 1.32 1.808 1.667.77.35 1.606.528 2.45.522.947 0 1.8-.17 2.557-.509a5.714 5.714 0 001.935-1.393 5.954 5.954 0 001.213-2.082 7.835 7.835 0 00.413-2.58c0-.92-.146-1.778-.44-2.576a6.398 6.398 0 00-1.225-2.085 5.68 5.68 0 00-1.896-1.394 5.772 5.772 0 00-2.426-.506 5.93 5.93 0 00-1.55.182 5.18 5.18 0 00-1.187.47c-.344.19-.636.394-.878.61-.241.219-.439.43-.593.638h-.078V0zm6.931 12.031c.163.45.245.92.245 1.405 0 .487-.082.956-.246 1.407a3.545 3.545 0 01-1.87 2.03 3.574 3.574 0 01-1.524.314 3.525 3.525 0 01-3.394-2.343 4.098 4.098 0 01-.245-1.407c-.001-.48.081-.955.245-1.406A3.533 3.533 0 0153.186 10a3.584 3.584 0 011.523-.312c.568 0 1.076.104 1.523.312.434.2.825.482 1.15.833.317.349.557.746.722 1.2z"></path><path d="M65.882 7.187h-3.097v12.499h3.098v-6.693c0-.172.038-.433.115-.78.078-.348.233-.694.466-1.043.232-.346.567-.654 1.006-.923.439-.27 1.019-.405 1.742-.405.246 0 .492.023.735.066.257.045.512.101.763.169v-3.02a7.065 7.065 0 00-.556-.131 2.942 2.942 0 00-.554-.05c-.825 0-1.558.198-2.194.597-.636.4-1.128.964-1.473 1.693h-.051V7.187z"></path><path clip-rule="evenodd" d="M78.943 17.969h.079l-.002 1.718h2.788v-7.188c0-.294-.008-.638-.026-1.028a6.951 6.951 0 00-.166-1.21 5.142 5.142 0 00-.466-1.238 3.4 3.4 0 00-.916-1.08c-.397-.312-.895-.569-1.497-.77-.603-.198-1.343-.299-2.22-.299a8.83 8.83 0 00-2.853.469 6.012 6.012 0 00-2.413 1.536l1.626 1.642a4.743 4.743 0 013.304-1.303c.826 0 1.506.196 2.039.587.533.39.8.976.8 1.757v.338h-.773c-.551.001-1.103.014-1.654.039-.584.026-1.165.088-1.741.182a9.606 9.606 0 00-1.665.43 4.88 4.88 0 00-1.407.768 3.555 3.555 0 00-.967 1.199c-.241.478-.363 1.053-.363 1.731 0 .625.13 1.173.388 1.64.25.461.598.861 1.019 1.173.436.32.925.558 1.446.704a6.019 6.019 0 001.665.233 5.307 5.307 0 002.271-.481c.688-.321 1.257-.838 1.704-1.55zm-.749-3.881h.645v.703c0 .884-.254 1.584-.76 2.096-.51.513-1.295.768-2.362.768-.259 0-.516-.03-.775-.091a2.083 2.083 0 01-.698-.3 1.769 1.769 0 01-.503-.507c-.129-.2-.193-.447-.193-.742 0-.451.164-.803.49-1.055a3.465 3.465 0 011.202-.573 7.534 7.534 0 011.508-.247 22.752 22.752 0 011.446-.052z"></path><path d="M87.774 9.374c1.015 0 1.825.425 2.426 1.276l2.066-1.875a4.013 4.013 0 00-1.963-1.47 7.302 7.302 0 00-2.452-.43c-.618-.001-1.234.078-1.833.234a4.82 4.82 0 00-1.6.73c-.464.33-.839.75-1.123 1.262-.284.512-.425 1.116-.425 1.81 0 .798.163 1.424.49 1.876.322.446.747.807 1.239 1.052a6.22 6.22 0 001.614.547c.54.106 1.079.227 1.613.365.499.131.91.3 1.238.51.328.207.491.529.491.961 0 .245-.065.458-.194.64a1.578 1.578 0 01-.504.454c-.206.122-.429.21-.67.26a3.24 3.24 0 01-.697.079c-.654 0-1.21-.143-1.665-.428a5.852 5.852 0 01-1.277-1.11l-2.066 1.955c.637.729 1.36 1.232 2.168 1.51.81.278 1.696.417 2.66.417.642-.001 1.282-.07 1.91-.209a5.473 5.473 0 001.716-.676 3.78 3.78 0 001.238-1.238c.319-.51.477-1.14.477-1.888 0-.816-.163-1.458-.49-1.926a3.527 3.527 0 00-1.238-1.108 6.356 6.356 0 00-1.613-.598c-.577-.13-1.115-.256-1.614-.378-.5-.121-.911-.269-1.238-.442-.327-.173-.49-.452-.49-.834 0-.47.197-.806.593-1.016.396-.208.8-.312 1.213-.312zM9.95 10.026c.422.246.805.553 1.137.911l2.142-2.162a5.428 5.428 0 00-2.104-1.446 6.713 6.713 0 00-2.388-.455 7.386 7.386 0 00-2.632.468 6.316 6.316 0 00-2.142 1.329 6.266 6.266 0 00-1.432 2.07C2.177 11.55 2 12.449 2 13.437c0 .99.177 1.887.53 2.695.333.78.82 1.484 1.433 2.07a6.294 6.294 0 002.142 1.33 7.384 7.384 0 002.632.467c.276 0 .603-.03.982-.09a7.502 7.502 0 002.413-.846 4.813 4.813 0 001.072-.808l-2.066-2.24c-.278.37-.64.67-1.058.873-.413.198-.86.3-1.343.3-.567 0-1.075-.105-1.521-.312a3.553 3.553 0 01-1.873-2.032 4.107 4.107 0 01-.246-1.407c0-.48.082-.955.245-1.405a3.52 3.52 0 01.724-1.198c.32-.349.701-.625 1.15-.835.446-.207.954-.311 1.521-.311.428.003.846.12 1.214.339z"></path></svg>`,fi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cerebras</title><path clip-rule="evenodd" d="M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z"></path><path d="M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"></path></svg>`,pi=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cloudflare</title><path d="M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437" fill="#F38020"></path><path d="M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777" fill="#FCAD32"></path></svg>`,mi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 242 24" xmlns="http://www.w3.org/2000/svg"><title>Cloudflare</title><path d="M28.4 2.395h5.386v14.606h9.326v4.736H28.4V2.395zM16.71 14.369c-.787 1.71-2.363 2.894-4.465 2.894-2.89 0-4.86-2.368-4.86-5.263 0-2.764 1.97-5.132 4.86-5.132 2.232 0 3.81 1.316 4.597 3.158h5.647C21.571 5.421 17.5 2 12.377 2 6.467 2 2 6.474 2 12s4.335 10 10.377 10c5.122 0 9.062-3.289 10.112-7.763H16.71v.132zM224.37 2.395h15.499v4.606h-10.114v2.894h9.194v4.21h-9.194v3.027H240v4.605h-15.63V2.395zm-24.693 0h9.062c2.89 0 4.991.79 6.305 2.105 1.182 1.052 1.708 2.632 1.708 4.474 0 2.894-1.576 4.868-3.94 5.921l4.596 6.71h-6.174l-3.939-5.79h-2.365v5.79h-5.386V2.395h.133zm8.8 9.211c1.838 0 2.889-.921 2.889-2.238 0-1.579-1.05-2.237-2.89-2.237l-3.546.001v4.605h3.547v-.13zm-29.028-9.343h5.122l8.144 19.474h-5.78l-1.444-3.421h-7.486l-1.315 3.42h-5.516l8.275-19.473zm4.598 11.842l-2.103-5.526-2.232 5.526h4.335zm-33.232-11.71h5.386v14.606h9.325v4.736h-14.711V2.395zm-22.854 0h15.367v4.737h-9.981v3.158h9.062v4.474h-9.062v6.973h-5.386V2.395zm-26.007 0h7.488c6.829 0 10.9 3.947 10.9 9.473 0 5.526-4.071 9.737-11.032 9.737h-7.356V2.395zm7.488 14.606c3.151 0 5.253-1.712 5.253-4.87 0-3.025-2.102-4.868-5.253-4.868h-2.233v9.87h2.233V17zm-33.625-3.816V2.395H81.2v10.658c0 2.763 1.445 4.078 3.547 4.078 2.101 0 3.547-1.315 3.547-3.946V2.263h5.385v10.659c0 6.183-3.548 8.946-9.063 8.946-5.386.132-8.8-2.63-8.8-8.683zm-27.19-1.053C48.628 6.474 53.095 2 59.006 2c5.91 0 10.375 4.474 10.375 10s-4.465 10-10.375 10c-6.042 0-10.377-4.342-10.377-9.868zm15.237 0c0-2.896-1.97-5.264-4.99-5.264-2.891 0-4.861 2.368-4.861 5.132s1.97 5.263 4.86 5.263c3.02 0 4.99-2.368 4.99-5.131z"></path></svg>`,hi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cloudflare</title><path d="M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437"></path><path d="M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777"></path></svg>`,gi=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="#3186FF"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-0-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-1-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-2-_R_0_)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-0-_R_0_" x1="7" x2="11" y1="15.5" y2="12"><stop stop-color="#08B962"></stop><stop offset="1" stop-color="#08B962" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-1-_R_0_" x1="8" x2="11.5" y1="5.5" y2="11"><stop stop-color="#F94543"></stop><stop offset="1" stop-color="#F94543" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-2-_R_0_" x1="3.5" x2="17.5" y1="13.5" y2="12"><stop stop-color="#FABC12"></stop><stop offset=".46" stop-color="#FABC12" stop-opacity="0"></stop></linearGradient></defs></svg>`,_i=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 98 24" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M21.186 12.67c0 2.649-.786 4.759-2.359 6.33-1.766 1.87-4.09 2.806-6.969 2.806-2.756 0-5.088-.953-6.996-2.86C2.954 17.04 2 14.693 2 11.904c0-2.789.954-5.137 2.862-7.043C6.77 2.953 9.102 2 11.858 2c1.396 0 2.712.247 3.949.741 1.236.495 2.252 1.192 3.047 2.092l-1.749 1.748c-.583-.706-1.338-1.258-2.266-1.655a7.49 7.49 0 00-2.981-.596c-2.067 0-3.816.715-5.247 2.145-1.413 1.448-2.12 3.257-2.12 5.428s.707 3.98 2.12 5.428c1.431 1.43 3.18 2.145 5.247 2.145 1.89 0 3.463-.53 4.717-1.588 1.254-1.06 1.979-2.516 2.173-4.37h-6.89v-2.277h9.196c.088.495.132.971.132 1.43m7.652-4.633c1.946 0 3.494.629 4.645 1.886 1.15 1.257 1.726 3.018 1.726 5.282l-.027.268H24.877c.036 1.284.464 2.318 1.285 3.102.82.785 1.802 1.177 2.944 1.177 1.57 0 2.802-.784 3.694-2.354l2.195 1.07a6.54 6.54 0 01-2.45 2.595C31.503 21.688 30.32 22 29 22c-1.927 0-3.516-.66-4.765-1.98-1.249-1.319-1.873-2.986-1.873-5.001 0-1.997.606-3.66 1.82-4.988 1.213-1.329 2.766-1.993 4.657-1.993m-.053 2.247c-.928 0-1.727.285-2.396.856-.67.57-1.11 1.337-1.325 2.3h7.522c-.071-.91-.442-1.663-1.111-2.26-.67-.598-1.566-.896-2.69-.896M39.247 21.53h-2.455V8.465h2.348v1.813h.107c.374-.64.947-1.173 1.721-1.6.774-.427 1.544-.64 2.309-.64.96 0 1.806.222 2.535.667a3.931 3.931 0 011.601 1.84c1.085-1.671 2.589-2.507 4.51-2.507 1.513 0 2.678.462 3.496 1.387.819.924 1.228 2.24 1.228 3.946v8.16h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.192-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.191-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227zM61.911 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zM80 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zm-16.343.022h2.349v1.813h.107c.373-.64.947-1.173 1.721-1.6a4.935 4.935 0 012.415-.64c1.601 0 2.833.458 3.696 1.373.863.916 1.294 2.218 1.294 3.907v8.213h-2.455v-8.053c-.053-2.133-1.13-3.2-3.229-3.2-.978 0-1.797.395-2.455 1.187-.658.79-.987 1.737-.987 2.84v7.226h-2.456V8.465z"></path></svg>`,vi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"></path></svg>`,yi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 78 24" xmlns="http://www.w3.org/2000/svg"><title>Github</title><path d="M16.598 10.836v9.48c0 .066-.017.181-.1.214 0 0-2.07 1.47-5.484 1.47C6.888 22 2 20.712 2 12.223 2 3.734 6.275 1.983 10.45 2c3.613 0 5.07.81 5.303.958.066.083.1.149.1.231l-.697 2.94c0 .149-.149.33-.331.28-.597-.18-1.491-.544-3.596-.544-2.435 0-5.053.693-5.053 6.16 0 5.466 2.485 6.11 4.275 6.11 1.524 0 2.07-.181 2.07-.181v-3.799h-2.435c-.182 0-.315-.132-.315-.28v-3.04c0-.148.133-.28.315-.28h6.197c.182 0 .315.132.315.28zM76 14.684c0 5.664-1.84 7.283-5.054 7.283-2.717 0-4.175-1.37-4.175-1.37s-.067.759-.15.858c-.05.1-.132.132-.231.132h-2.453c-.165 0-.315-.132-.315-.28l.034-18.349a.29.29 0 01.281-.28h3.53a.29.29 0 01.281.28v6.226s1.359-.875 3.347-.875l-.016-.033c1.988 0 4.921.743 4.921 6.408zM47.865 2.71a.29.29 0 01.281.281V21.34a.29.29 0 01-.281.281h-3.53a.29.29 0 01-.281-.28l.033-7.845h-5.485v7.844a.29.29 0 01-.281.281h-3.53c-.132 0-.281-.132-.281-.28V2.99a.29.29 0 01.281-.28h3.53a.29.29 0 01.281.28v6.755h5.485V2.99a.29.29 0 01.282-.28h3.496zM61.55 8.722c.183 0 .315.132.315.28l-.033 12.337c0 .149-.1.281-.282.281h-2.22c-.116 0-.232-.066-.265-.148-.05-.1-.133-.744-.133-.744S57.061 22 54.758 22c-2.8 0-4.839-.908-4.839-4.542V9.02a.29.29 0 01.282-.28h3.546a.29.29 0 01.282.28v7.845c0 1.238.364 1.8 1.607 1.8 1.243 0 2.154-.644 2.154-.644V9.036c0-.182.1-.314.282-.314h3.48zm-28.84 9.861h.007c.14.029.239.154.234.296v2.477c0 .116-.05.231-.149.264-.166.083-1.226.363-2.104.363-1.922 0-4.74-.412-4.74-4.442v-5.417H24.12c-.149 0-.281-.132-.281-.314V9.564c0-.132.083-.248.215-.28.116-.017 1.922-.463 1.922-.463V5.237c0-.132.083-.215.232-.215h3.58c.148 0 .231.083.231.215v3.485h2.635c.132 0 .265.132.265.28v2.808c0 .182-.116.314-.265.314h-2.635v5.17c0 .777.448 1.372 1.74 1.372.41 0 .797-.081.951-.083zM22.28 8.705a.29.29 0 01.282.281v12.172c0 .297-.083.446-.414.446h-3.182c-.281 0-.497-.116-.497-.446V9.036c0-.182.133-.33.282-.33h3.53zm49.693 6.243c0-2.99-1.21-3.386-2.486-3.253-.994.066-1.79.561-1.79.561v5.813s.813.562 2.022.595c1.707.05 2.254-.562 2.254-3.716zM20.54 3.123a2.26 2.26 0 012.254 2.28A2.26 2.26 0 0120.54 7.68a2.266 2.266 0 01-2.286-2.279c0-1.271 1.01-2.279 2.286-2.279z"></path></svg>`,bi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Github</title><path d="M12 0c6.63 0 12 5.276 12 11.79-.001 5.067-3.29 9.567-8.175 11.187-.6.118-.825-.25-.825-.56 0-.398.015-1.665.015-3.242 0-1.105-.375-1.813-.81-2.181 2.67-.295 5.475-1.297 5.475-5.822 0-1.297-.465-2.344-1.23-3.169.12-.295.54-1.503-.12-3.125 0 0-1.005-.324-3.3 1.209a11.32 11.32 0 00-3-.398c-1.02 0-2.04.133-3 .398-2.295-1.518-3.3-1.209-3.3-1.209-.66 1.622-.24 2.83-.12 3.125-.765.825-1.23 1.887-1.23 3.169 0 4.51 2.79 5.527 5.46 5.822-.345.294-.66.81-.765 1.577-.69.31-2.415.81-3.495-.973-.225-.354-.9-1.223-1.845-1.209-1.005.015-.405.56.015.781.51.28 1.095 1.327 1.23 1.666.24.663 1.02 1.93 4.035 1.385 0 .988.015 1.916.015 2.196 0 .31-.225.664-.825.56C3.303 21.374-.003 16.867 0 11.791 0 5.276 5.37 0 12 0z"></path></svg>`,xi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 64 24" xmlns="http://www.w3.org/2000/svg"><title>Groq</title><path d="M37.925 2.039c4.142 0 7.509 3.368 7.509 7.528l-.004.244c-.128 4.047-3.437 7.284-7.505 7.284-4.15 0-7.509-3.368-7.509-7.528s3.36-7.528 7.509-7.528zm-11.144-.023c.26 0 .522.015.775.046l.015-.008a7.464 7.464 0 012.922.969L29.09 5.468a4.619 4.619 0 00-2.309-.6h-.253l-.253.016c-.338.03-.66.092-.982.177-.621.169-1.196.469-1.703.869a4.062 4.062 0 00-1.418 2.322l-.04.234-.03.235c-.007.077-.023.161-.023.238l-.014 2.713v2.593l-.016 2.522h-2.815l-.03-4.973V8.852c0-.139.015-.262.022-.392.023-.262.062-.523.115-.777.1-.523.269-1.03.491-1.515a6.998 6.998 0 011.948-2.484 7.465 7.465 0 012.754-1.391c.49-.131.99-.216 1.495-.254.123-.008.253-.023.376-.023h.376zM37.925 4.86a4.7 4.7 0 00-4.694 4.706 4.7 4.7 0 004.694 4.706 4.7 4.7 0 004.694-4.706l-.005-.216a4.7 4.7 0 00-4.689-4.49zM9.578 2C5.428 1.96 2.038 5.298 2 9.458c-.038 4.16 3.29 7.559 7.44 7.597h2.608v-2.822h-2.47c-2.592.031-4.717-2.053-4.748-4.652a4.7 4.7 0 014.64-4.76h.108c2.52 0 4.577 1.992 4.696 4.49l.005.216v6.936c0 2.576-2.093 4.676-4.655 4.706a4.663 4.663 0 01-3.267-1.376l-1.994 2A7.46 7.46 0 009.57 24h.1c4.096-.062 7.386-3.391 7.409-7.497V9.35c-.1-4.09-3.428-7.35-7.501-7.35zm44.929.038c-4.15 0-7.509 3.368-7.509 7.528s3.36 7.528 7.509 7.528h2.57v-2.822h-2.57a4.7 4.7 0 01-4.694-4.706 4.7 4.7 0 014.694-4.706A4.707 4.707 0 0159.16 8.94l.024.22v14.456H62V9.566c-.008-4.152-3.352-7.527-7.493-7.527z"></path></svg>`,Si=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Groq</title><path d="M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"></path></svg>`,Ci=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><path d="M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z" fill="gold"></path><path d="M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z" fill="#FFAF00"></path><path d="M3.428 10.258h17.144v3.428H3.428v-3.428z" fill="#FF8205"></path><path d="M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z" fill="#FA500F"></path><path d="M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z" fill="#E10500"></path></svg>`,wi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 134 24" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><path d="M2 22.638V1h6.55l3.933 14.76L16.37 1h6.565v21.638H18.87V5.605l-4.302 17.033h-4.214L6.066 5.605v17.033H2zm25.011-17.8V1.002h4.155V4.84h-4.155zm0 17.801V6.964h4.155V22.64h-4.155zm6.707-4.473l4.17-.635c.177.807.536 1.42 1.079 1.838.986.864 3.753.796 4.702.036.588-.404.753-1.367.25-1.89-.206-.196-.67-.378-1.389-.545-3.351-.738-5.475-1.412-6.372-2.022-2.418-1.526-2.465-5.18-.252-6.952 1.76-1.8 7.852-1.78 9.788-.34 1.045.699 1.764 1.732 2.159 3.1l-3.918.723c-.413-1.402-1.417-1.886-2.957-1.89-1.094 0-1.878.154-2.35.458-.591.383-.651 1.179-.06 1.595.374.275 1.668.664 3.88 1.165 2.213.502 3.759 1.117 4.636 1.845 1.993 1.694 1.615 5.13-.503 6.79-2.087 2.01-8.091 2.034-10.416.25-1.247-.865-2.063-2.04-2.447-3.527zm31.88 4.472h-4.154V6.963h3.86v2.229c.66-1.053 1.253-1.747 1.78-2.081 1.374-.857 3.144-.536 4.532.28l-1.286 3.617c-1.877-1.247-3.849-.81-4.384 1.535-.468 1.352-.329 7.76-.347 10.096zm10.67-10.892l-3.77-.679c1.014-3.408 3.08-4.43 6.801-4.457 2.81.037 4.804.362 6.055 2.324.37.674.554 1.912.554 3.713.013 1.729-.178 6.48.155 7.889.133.654.382 1.355.747 2.103H82.7c-.124-.272-.411-1.286-.547-1.712-1.378 1.335-2.97 2.066-4.865 2.067-2.945.058-5.22-1.756-5.219-4.635-.011-1.72.87-3.225 2.418-3.963.764-.37 1.865-.691 3.304-.967 1.942-.364 3.287-.703 4.037-1.018v-.413c0-.797-.197-1.366-.591-1.705-.57-.582-3.147-.744-3.963-.074-.414.29-.75.8-1.006 1.527zm5.56 3.365c-.757.315-4.139.86-4.79 1.358-1.077.707-1.038 2.141-.163 2.967 1.017.987 2.672.733 3.8-.103 1.374-.983 1.117-2.455 1.153-4.221zm7.933 7.527V1h4.155v21.638H89.76zm35.917 0h-4.761l-1.892-4.915h-8.665l-1.789 4.915h-4.643L112.371 1h4.627l8.679 21.638h.001zm-8.058-8.56l-2.987-8.03-2.927 8.03h5.914zm10.004 8.56V1H132v21.638h-4.376zM58.98 6.964v3.307H56.14v6.317l.081 2.236c.434 1.136 1.612.712 2.743.332l.355 3.218c-2.416 1.02-6.87 1.14-7.215-2.346-.096-.537-.123-1.89-.133-3.44v-6.317h-1.908V6.965h1.908V3.85l4.17-2.42v5.535h2.838z"></path></svg>`,Ti=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><path clip-rule="evenodd" d="M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z"></path></svg>`,Ei=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Nvidia</title><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z" fill="#74B71B" fill-rule="nonzero"></path></svg>`,Di=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 111 24" xmlns="http://www.w3.org/2000/svg"><title>Nvidia</title><path d="M46.495 2.027v19.965h5.656V2.027h-5.656zM2 2v19.992h5.706V6.48l4.452.015a4.088 4.088 0 013.183 1.101c.894.951 1.26 2.483 1.26 5.287V22h5.529V10.949c0-7.883-5.035-8.946-9.972-8.946L2 2zm53.604.027v19.965h9.174c4.882 0 6.482-.81 8.208-2.626a11.156 11.156 0 002.008-7.136c.109-2.423-.53-4.82-1.831-6.869-2.095-2.788-5.114-3.332-9.621-3.332l-7.938-.002zm5.61 4.347h2.432c3.527 0 5.81 1.58 5.81 5.678 0 4.097-2.289 5.679-5.81 5.679h-2.432V6.374zM38.34 2.027L33.62 17.845 29.096 2.027h-6.102l6.46 19.965h8.151l6.51-19.965h-5.774zm39.285 19.965h5.657V2.03h-5.659l.002 19.963zm15.86-19.957l-7.898 19.95h5.578l1.25-3.526h9.346l1.183 3.526H109l-7.958-19.952-7.555.002zm3.673 3.64l3.427 9.346h-6.96l3.533-9.346z"></path></svg>`,Oi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Nvidia</title><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"></path></svg>`,ki=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 138 24" xmlns="http://www.w3.org/2000/svg"><title>opencode</title><path d="M12.429 17.143H5.57v-6.857h6.858v6.857z" fill-opacity=".25"></path><path d="M12.428 6.857H5.571v10.286h6.857V6.857zm3.43 13.715H2.142V3.429h13.714v17.143z" fill-opacity=".75"></path><path d="M29.571 17.143h-6.857v-6.857h6.857v6.857z" fill-opacity=".25"></path><path d="M22.714 17.143h6.858V6.857h-6.858v10.286zM33 20.572H22.714V24h-3.428V3.43H33v17.143z" fill-opacity=".75"></path><path d="M50.143 13.714v3.429H39.857v-3.429h10.286z" fill-opacity=".25"></path><path d="M50.143 13.714H39.857v3.429h10.286v3.429H36.429V3.429h13.714v10.285zm-10.286-3.428h6.857V6.857h-6.857v3.429z" fill-opacity=".75"></path><path d="M63.857 20.571H57V10.286h6.857V20.57z" fill-opacity=".25"></path><path d="M63.857 6.857H57v13.715h-3.429V3.429h10.286v3.428zm3.429 13.715h-3.429V6.857h3.429v13.715z" fill-opacity=".75"></path><path d="M84.428 17.143H74.144v-6.857h10.285v6.857z" fill-opacity=".25"></path><path d="M84.428 6.857H74.144v10.286h10.285v3.429H70.715V3.429H84.43v3.428z"></path><path d="M98.143 17.143h-6.857v-6.857h6.857v6.857z" fill-opacity=".25"></path><path d="M98.143 6.857h-6.857v10.286h6.857V6.857zm3.428 13.715H87.857V3.429h13.714v17.143z"></path><path d="M115.286 17.143h-6.857v-6.857h6.857v6.857z" fill-opacity=".25"></path><path d="M115.286 6.857h-6.857v10.286h6.857V6.857zm3.428 13.714H105V3.43h10.286V0h3.428v20.571z"></path><path d="M135.857 13.714v3.429h-10.286v-3.429h10.286z" fill-opacity=".25"></path><path d="M125.571 6.857v3.429h6.858V6.857h-6.858zm10.286 6.857h-10.286v3.429h10.286v3.429h-13.714V3.429h13.714v10.285z"></path></svg>`,Ai=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>opencode</title><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>`,ji=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenRouter</title><path d="M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z"></path></svg>`,Mi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 143 24" xmlns="http://www.w3.org/2000/svg"><title>OpenRouter</title><path d="M9.623 2c1.46 0 2.763.35 3.91 1.05 1.149.699 2.053 1.7 2.714 3.002.66 1.303.991 2.861.991 4.675 0 1.814-.33 3.372-.991 4.675-.66 1.302-1.565 2.303-2.713 3.003-1.148.7-2.452 1.049-3.91 1.049-1.465 0-2.772-.35-3.92-1.05-1.148-.699-2.052-1.701-2.713-3.007-.66-1.305-.991-2.862-.991-4.67 0-1.814.33-3.372.991-4.675.66-1.302 1.565-2.303 2.713-3.003C6.852 2.35 8.16 2 9.624 2zm0 2.34c-.974 0-1.844.244-2.61.734-.765.489-1.37 1.208-1.813 2.156-.443.949-.664 2.114-.664 3.497s.221 2.548.664 3.497c.444.948 1.048 1.667 1.813 2.156.766.49 1.636.735 2.61.735.97 0 1.838-.245 2.606-.735.768-.489 1.374-1.208 1.817-2.156.443-.949.665-2.114.665-3.497s-.222-2.548-.665-3.497c-.443-.948-1.049-1.667-1.817-2.156-.768-.49-1.637-.735-2.606-.735zm16.32 1.974c1.024 0 1.938.26 2.742.78s1.436 1.269 1.896 2.248c.46.979.69 2.156.69 3.534 0 1.377-.23 2.556-.686 3.538-.457.981-1.085 1.736-1.883 2.264-.799.529-1.71.793-2.734.793-.771 0-1.4-.13-1.887-.39-.488-.26-.869-.564-1.144-.913a6.908 6.908 0 01-.636-.929h-.149V24h-2.47V6.48h2.412v2.065h.207c.143-.265.35-.572.62-.92.27-.349.643-.655 1.123-.917.479-.263 1.112-.394 1.9-.394zm-.528 2.107c-.716 0-1.32.185-1.813.556-.493.37-.866.887-1.12 1.55-.253.665-.38 1.439-.38 2.324 0 .896.13 1.68.389 2.356.259.674.633 1.201 1.123 1.58s1.09.568 1.8.568c.738 0 1.355-.198 1.85-.593.496-.395.872-.933 1.128-1.613.256-.68.384-1.447.384-2.298 0-.84-.125-1.596-.376-2.265-.25-.67-.625-1.197-1.123-1.584-.498-.388-1.12-.581-1.862-.581zm13.387-2.107c.716 0 1.41.119 2.082.356a5.037 5.037 0 011.809 1.12c.534.51.955 1.169 1.263 1.979.309.81.463 1.793.463 2.949v.88l-9.016-.001.002.105c.03.732.178 1.364.445 1.895.3.597.72 1.052 1.26 1.364.539.313 1.17.469 1.89.469.469 0 .895-.068 1.28-.203a2.716 2.716 0 001-.61c.281-.271.496-.606.644-1.004l2.338.423a4.247 4.247 0 01-1.004 1.813c-.482.517-1.084.918-1.808 1.203-.725.284-1.549.427-2.474.427-1.25 0-2.325-.27-3.225-.809-.9-.54-1.594-1.3-2.082-2.281-.487-.982-.73-2.134-.73-3.455 0-1.306.243-2.456.73-3.451.488-.996 1.17-1.773 2.049-2.331.878-.559 1.906-.838 3.084-.838zm.017 2.049c-.694 0-1.298.17-1.813.51-.515.34-.911.782-1.19 1.327a3.778 3.778 0 00-.39 1.303l-.02.236h6.593c0-.653-.132-1.232-.397-1.738a3.022 3.022 0 00-1.11-1.199c-.477-.293-1.034-.44-1.673-.44zm10.29 3.293v7.566H46.64V6.48h2.37v2.074h.158a3.63 3.63 0 011.375-1.626c.625-.41 1.413-.614 2.366-.614.864 0 1.622.18 2.271.543.65.362 1.154.9 1.512 1.614.358.713.537 1.595.537 2.646v8.105h-2.47v-7.806c0-.924-.24-1.647-.718-2.17-.48-.522-1.137-.784-1.974-.784-.573 0-1.081.125-1.524.374a2.65 2.65 0 00-1.05 1.09c-.255.479-.383 1.055-.383 1.73zm17.122-9.424c1.31 0 2.4.227 3.266.68.868.454 1.516 1.08 1.945 1.88.43.799.645 1.72.645 2.766 0 1.04-.216 1.954-.649 2.742-.432.788-1.082 1.4-1.949 1.837a5.1 5.1 0 01-.501.22l3.743 6.865h-2.907l-3.436-6.43h-3.634v6.43h-2.552V2.232h6.029zm-.273 2.199h-3.204v6.155h3.237c.826 0 1.5-.119 2.02-.357s.901-.583 1.144-1.037c.242-.453.363-.998.363-1.634 0-.641-.122-1.197-.367-1.667-.246-.47-.628-.831-1.148-1.083-.52-.252-1.202-.377-2.045-.377zM79.66 6.314c1.19 0 2.227.273 3.114.821.886.548 1.575 1.316 2.065 2.306s.735 2.146.735 3.468c0 1.316-.245 2.466-.735 3.45-.49.985-1.179 1.751-2.065 2.299-.887.547-1.924.82-3.114.82s-2.227-.273-3.113-.82c-.887-.548-1.575-1.314-2.065-2.298-.49-.985-.735-2.135-.735-3.451 0-1.322.245-2.478.735-3.468.49-.99 1.178-1.758 2.065-2.306.886-.548 1.924-.821 3.113-.821zm.008 2.074c-.776 0-1.419.207-1.928.622-.51.415-.887.963-1.132 1.646a6.602 6.602 0 00-.367 2.244c0 .819.122 1.568.367 2.249.245.68.623 1.225 1.132 1.634.51.41 1.152.614 1.928.614.771 0 1.41-.205 1.917-.614.506-.41.882-.954 1.127-1.634.245-.68.367-1.43.367-2.249 0-.813-.122-1.56-.367-2.244-.245-.683-.62-1.231-1.127-1.646-.507-.415-1.146-.622-1.917-.622zm16.164 5.55V6.48h2.477v12.742h-2.428v-2.207h-.132a3.956 3.956 0 01-1.4 1.697c-.641.45-1.438.676-2.391.676-.815 0-1.535-.181-2.16-.544-.625-.362-1.115-.9-1.47-1.613-.355-.714-.533-1.596-.533-2.647V6.48h2.47v7.806c0 .868.24 1.56.718 2.074.48.514 1.102.771 1.867.771.462 0 .924-.116 1.383-.348.46-.232.843-.584 1.148-1.054.306-.47.456-1.067.45-1.792zm8.58-10.511v3.052h2.602v1.992h-2.602v7.01c0 .48.072.841.215 1.082.144.24.33.404.558.49.228.085.478.128.747.128.199 0 .372-.014.52-.041l.348-.067.446 2.05a4.42 4.42 0 01-.612.17c-.264.057-.594.09-.99.095a4.331 4.331 0 01-1.818-.349 3.12 3.12 0 01-1.362-1.128c-.347-.509-.52-1.148-.52-1.916l-.002-7.525h-1.857V6.48h1.857l.001-3.053h2.47zm9.961 2.887c.716 0 1.41.119 2.081.356a5.037 5.037 0 011.81 1.12c.533.51.954 1.169 1.263 1.979.308.81.462 1.793.462 2.949v.88l-9.016-.001.003.105c.03.732.178 1.364.445 1.895.3.597.72 1.052 1.259 1.364.54.313 1.17.469 1.891.469.468 0 .895-.068 1.28-.203a2.716 2.716 0 001-.61c.28-.271.495-.606.644-1.004l2.337.423a4.247 4.247 0 01-1.003 1.813c-.482.517-1.085.918-1.809 1.203-.724.284-1.548.427-2.473.427-1.25 0-2.325-.27-3.226-.809-.9-.54-1.594-1.3-2.08-2.281-.488-.982-.732-2.134-.732-3.455 0-1.306.244-2.456.731-3.451.487-.996 1.17-1.773 2.048-2.331.879-.559 1.907-.838 3.085-.838zm.017 2.049c-.694 0-1.298.17-1.813.51-.515.34-.911.782-1.19 1.327a3.778 3.778 0 00-.39 1.303l-.02.236h6.592c0-.653-.132-1.232-.396-1.738a3.022 3.022 0 00-1.11-1.199c-.477-.293-1.035-.44-1.673-.44zm7.821 10.859V6.48h2.387v2.024h.132a3.092 3.092 0 011.227-1.622 3.485 3.485 0 011.994-.593l.396.01.153.006c.212.011.379.025.5.042v2.372c-.1-.027-.275-.059-.529-.095a5.4 5.4 0 00-.76-.054c-.583 0-1.102.123-1.556.37a2.799 2.799 0 00-1.078 1.02 2.79 2.79 0 00-.397 1.48v7.782h-2.469z"></path></svg>`,Ni=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenRouter</title><path d="M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z"></path></svg>`,Pi=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 298.03 47.18" fill="currentColor" role="img" aria-label="OVHcloud">
10
+ <title>OVHcloud</title>
11
+ <path fill="currentColor" d="M110.11,40.31a40.1,40.1,0,0,1-3.74,44.49H84.93l6.6-11.67H82.8L93.09,55h8.78l8.24-14.67ZM67.77,84.8H45.91a39.59,39.59,0,0,1-3.79-44.59L56.3,64.84,71.93,37.62h23L67.78,84.78h0v0Z" transform="translate(-36.97 -37.62)"/>
12
+ <path fill="currentColor" d="M128.18,62.9c0-12.59,6.27-18.64,16.57-18.64s16.56,6.05,16.56,18.64S155,81.47,144.75,81.47,128.18,75.37,128.18,62.9Zm3.72,0c0,10.35,4.72,15.28,12.85,15.28s12.84-4.93,12.84-15.28-4.72-15.35-12.84-15.35S131.9,52.49,131.9,62.9Z" transform="translate(-36.97 -37.62)"/>
13
+ <path fill="currentColor" d="M188.38,45.75a1.82,1.82,0,0,1,1.7-1.17,1.79,1.79,0,0,1,1.8,1.81,2.42,2.42,0,0,1-.16.79L179.3,79.93a1.78,1.78,0,0,1-3.39,0L163.49,47.18a2.42,2.42,0,0,1-.16-.79,1.79,1.79,0,0,1,1.8-1.81,1.82,1.82,0,0,1,1.7,1.17L177.6,74.31Z" transform="translate(-36.97 -37.62)"/>
14
+ <path fill="currentColor" d="M199.42,64.06V79.35a1.81,1.81,0,1,1-3.61,0v-33a1.81,1.81,0,1,1,3.61,0V60.77H217.9V46.39a1.81,1.81,0,1,1,3.61,0v33a1.81,1.81,0,1,1-3.61,0V64.06Z" transform="translate(-36.97 -37.62)"/>
15
+ <path fill="currentColor" d="M238.55,55.89a10,10,0,0,1,8.17,3.66,1.56,1.56,0,0,1,.37,1,1.51,1.51,0,0,1-1.54,1.54,1.56,1.56,0,0,1-1.27-.64A6.8,6.8,0,0,0,238.55,59c-4.89,0-7.49,3.13-7.49,9.66s2.6,9.71,7.49,9.71a9.68,9.68,0,0,0,6.15-2.28,1.56,1.56,0,0,1,1-.37,1.54,1.54,0,0,1,1.54,1.54,1.63,1.63,0,0,1-.69,1.32,12.06,12.06,0,0,1-8,2.87c-6.85,0-10.94-4.09-10.94-12.79S231.7,55.89,238.55,55.89Z" transform="translate(-36.97 -37.62)"/>
16
+ <path fill="currentColor" d="M255.48,44.63V75c0,2.12.69,3,2.12,3a1.6,1.6,0,1,1,0,3.19c-3.55,0-5.52-2.13-5.52-6.21V44.63a1.74,1.74,0,0,1,1.7-1.69A1.7,1.7,0,0,1,255.48,44.63Z" transform="translate(-36.97 -37.62)"/>
17
+ <path fill="currentColor" d="M284.41,68.63c0,8.7-4.25,12.79-11.15,12.79s-11.14-4.09-11.14-12.79,4.3-12.74,11.14-12.74S284.41,59.92,284.41,68.63Zm-3.45,0c0-6.69-2.81-9.66-7.7-9.66s-7.69,3-7.69,9.66,2.81,9.71,7.69,9.71S281,75.42,281,68.63Z" transform="translate(-36.97 -37.62)"/>
18
+ <path fill="currentColor" d="M292.59,57.91V71.76c0,3.45,1.11,6.42,6.47,6.42s6.48-3,6.48-6.42V57.91a1.72,1.72,0,0,1,1.75-1.7,1.67,1.67,0,0,1,1.65,1.7V71.76c0,5-1.65,9.66-9.88,9.66s-9.87-4.62-9.87-9.66V57.91a1.67,1.67,0,0,1,1.7-1.7A1.71,1.71,0,0,1,292.59,57.91Z" transform="translate(-36.97 -37.62)"/>
19
+ <path fill="currentColor" d="M331.6,59.34V44.63a1.7,1.7,0,0,1,3.4,0V71c0,7-4.35,10.46-10.4,10.46-6.85,0-10.89-4.09-10.89-12.79s3.83-12.74,10.67-12.74A9,9,0,0,1,331.6,59.34Zm0,4.3s-2-4.67-7-4.67-7.49,3.13-7.49,9.66,2.6,9.71,7.49,9.71c4.08,0,7-2.33,7-7.38Z" transform="translate(-36.97 -37.62)"/>
20
+ </svg>
21
+ `,Fi=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Qwen</title><path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z" fill="url(#lobe-icons-qwen-_R_0_)" fill-rule="nonzero"></path><defs><linearGradient id="lobe-icons-qwen-_R_0_" x1="0%" x2="100%" y1="0%" y2="0%"><stop offset="0%" stop-color="#6336E7" stop-opacity=".84"></stop><stop offset="100%" stop-color="#6F69F7" stop-opacity=".84"></stop></linearGradient></defs></svg>`,Ii=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 75 24" xmlns="http://www.w3.org/2000/svg"><title>Qwen</title><path d="M11.425 14.13h3.642l1.529 1.795a7.89 7.89 0 002.166-2.832 8.36 8.36 0 00.771-3.562c0-2.03-.624-3.664-1.874-4.905-1.24-1.25-2.884-1.874-4.931-1.874-1.028 0-1.99.186-2.885.558A6.99 6.99 0 007.45 4.932 8.576 8.576 0 005.656 7.67a8.354 8.354 0 00-.625 3.19c0 2.003.611 3.643 1.834 4.919 1.223 1.276 2.779 1.914 4.666 1.914.39 0 .793-.031 1.21-.093.425-.062.868-.16 1.329-.293l-2.645-3.177zM18.07 22l-2.127-2.46c-.753.293-1.48.51-2.18.652a9.84 9.84 0 01-2.073.226c-2.97 0-5.326-.85-7.072-2.552C2.873 16.164 2 13.865 2 10.966c0-1.577.28-3.052.837-4.426a10.148 10.148 0 012.406-3.576A10.427 10.427 0 018.713.758C10.025.253 11.429 0 12.927 0c2.915 0 5.25.86 7.005 2.579 1.755 1.72 2.632 4.01 2.632 6.872 0 1.764-.354 3.399-1.063 4.905a10.156 10.156 0 01-3.031 3.776L21.714 22H18.07zm5.743-14.675h2.884l2.047 6.433.054.16c.248.789.38 1.373.399 1.755.097-.302.221-.62.372-.958.16-.345.354-.713.585-1.103l4.227-7.218 2.06 7.43c.08.275.146.559.2.851.053.293.097.63.133 1.01.132-.372.265-.708.398-1.01.142-.3.28-.562.412-.784l3.816-6.567h3.243L36.097 20.71l-2.127-7.045a8.683 8.683 0 01-.213-.798 17.846 17.846 0 01-.146-.97 69.17 69.17 0 01-.519 1.063c-.15.302-.265.514-.345.638l-4.28 7.112-4.653-13.385zm24.392 4.785h6.5c-.026-.85-.292-1.52-.797-2.007-.496-.497-1.166-.745-2.008-.745-.957 0-1.768.248-2.432.745-.665.496-1.086 1.165-1.263 2.007zm6.34 3.948l2.061 1.608c-.735.966-1.533 1.67-2.392 2.114-.86.443-1.848.665-2.965.665-1.87 0-3.38-.563-4.533-1.689-1.152-1.134-1.728-2.623-1.728-4.466 0-2.162.66-3.935 1.98-5.317 1.33-1.391 3.018-2.087 5.066-2.087 1.71 0 3.07.532 4.08 1.595 1.02 1.055 1.53 2.473 1.53 4.254 0 .15-.01.345-.027.585-.01.23-.027.51-.054.837h-9.61c0 1.143.288 2.056.864 2.738.576.674 1.342 1.01 2.3 1.01.664 0 1.293-.159 1.887-.478a4.633 4.633 0 001.542-1.369zm14.317 3.868l.957-7.244c.018-.133.031-.27.04-.412.009-.151.013-.368.013-.652 0-.824-.2-1.453-.598-1.887-.399-.444-.98-.665-1.741-.665-1.188 0-2.118.385-2.792 1.156-.673.763-1.112 1.937-1.316 3.523l-.797 6.181H59.77l1.661-12.601h2.752l-.213 1.515c.727-.664 1.476-1.156 2.247-1.475a6.5 6.5 0 012.486-.479c1.293 0 2.3.341 3.017 1.024.727.673 1.09 1.622 1.09 2.845 0 .31-.018.673-.053 1.09-.036.407-.089.886-.16 1.435l-.877 6.647h-2.858z"></path></svg>`,L=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Qwen</title><path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z"></path></svg>`,Li=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>SambaNova</title><path d="M23 23h-1.223V8.028c0-3.118-2.568-5.806-5.744-5.806H8.027c-3.176 0-5.744 2.565-5.744 5.686 0 3.119 2.568 5.684 5.744 5.684h.794c1.346 0 2.445 1.1 2.445 2.444 0 1.346-1.1 2.446-2.445 2.446H1v-1.223h7.761c.671 0 1.223-.551 1.223-1.16 0-.67-.552-1.16-1.223-1.16h-.794C4.177 14.872 1 11.756 1 7.909 1 4.058 4.176 1 8.027 1h8.066C19.88 1 23 4.239 23 8.028V23z" fill="#EE7624"></path><path d="M8.884 12.672c1.71.06 3.361 1.588 3.361 3.422 0 1.833-1.528 3.421-3.421 3.421H1v1.223h7.761c2.568 0 4.705-2.077 4.705-4.644 0-.672-.123-1.283-.43-1.894-.245-.551-.67-1.1-1.099-1.528-.489-.429-1.039-.734-1.65-.977-.525-.175-1.048-.193-1.594-.212-.218-.008-.441-.016-.669-.034-.428 0-1.406-.245-1.956-.61a3.369 3.369 0 01-1.223-1.406c-.183-.489-.305-.977-.305-1.528A3.417 3.417 0 017.96 4.482h8.066c1.895 0 3.422 1.65 3.422 3.483v15.032h1.223V8.027c0-2.568-2.077-4.768-4.645-4.768h-8c-2.568 0-4.705 2.077-4.705 4.646 0 .67.123 1.282.43 1.894a4.45 4.45 0 001.099 1.528c.429.428 1.039.734 1.588.976.306.123.611.183.976.246.857.06 1.406.123 1.466.123h.003z" fill="#EE7624"></path><path d="M1 23h7.761v-.003c3.85 0 7.03-3.116 7.09-7.026 0-3.79-3.117-6.906-6.967-6.906H8.09c-.672 0-1.222-.552-1.222-1.16 0-.608.487-1.16 1.159-1.16h8.069c.608 0 1.159.611 1.159 1.283v14.97h1.223V8.024c0-1.345-1.1-2.505-2.445-2.505H7.967a2.451 2.451 0 00-2.445 2.445 2.45 2.45 0 002.445 2.445h.794c3.176 0 5.744 2.568 5.744 5.684s-2.568 5.684-5.744 5.684H1V23z" fill="#EE7624"></path></svg>`,Ri=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 175 24" xmlns="http://www.w3.org/2000/svg"><title>SambaNova</title><path d="M11.5 5.904c0-1.92-1.232-3.066-2.977-3.066-1.488 0-2.833 1.345-2.833 2.89 0 1.546 1.003 2.349 3.066 3.005 4.582 1.46 6.27 3.18 6.27 6.846 0 3.665-2.748 6.413-6.499 6.413-3.75 0-6.47-2.691-6.527-6.67h3.095c.028 2.291 1.373 3.836 3.436 3.836 2.063 0 3.409-1.488 3.409-3.58 0-1.545-.69-2.52-2.948-3.294-5.239-1.773-6.385-3.494-6.385-6.499C2.607 2.548 5.27 0 8.536 0c3.494 0 6.013 2.206 6.07 5.9h-3.094l-.012.004zM31.433 21.596v-2.462h-.058c-1.117 1.891-3.123 2.862-5.381 2.862-4.64 0-8.42-3.494-8.42-8.077 0-5.068 3.637-8.619 8.305-8.619 2.32 0 4.265.86 5.496 2.662h.058V5.728h2.976v15.864h-2.976v.004zm.057-7.901c0-3.095-2.235-5.671-5.525-5.671-2.976 0-5.41 2.548-5.41 5.67 0 3.124 2.434 5.586 5.41 5.586s5.525-2.576 5.525-5.585zM58.908 21.596V12.72c0-3.004-1.26-4.696-3.75-4.696-2.635 0-3.78 1.46-3.78 4.64v8.932H48.4v-9.218c0-3.123-1.46-4.35-3.608-4.35-2.634 0-3.922 1.545-3.922 4.668V21.6h-2.976V5.732h2.748V7.45h.057C41.988 5.932 43.19 5.3 45.254 5.3c2.063 0 4.122 1.003 4.925 2.662 1.146-1.802 2.72-2.662 5.24-2.662 4.121 0 6.47 2.577 6.47 6.67v9.622h-2.977l-.004.004zM65.346 21.596V.408h2.976v7.53h.057c1.288-1.745 3.294-2.634 5.439-2.634 4.497 0 8.22 3.78 8.22 8.362 0 4.583-3.495 8.334-7.963 8.334-2.291 0-4.412-.917-5.728-2.69h-.057v2.29h-2.948l.004-.004zm13.715-7.93c0-3.004-2.377-5.642-5.439-5.642-3.062 0-5.381 2.576-5.381 5.585 0 3.01 2.377 5.672 5.41 5.672 3.033 0 5.41-2.52 5.41-5.615zM97.575 21.596v-2.462h-.057c-1.117 1.891-3.123 2.862-5.382 2.862-4.64 0-8.419-3.494-8.419-8.077 0-5.068 3.637-8.619 8.305-8.619 2.32 0 4.265.86 5.496 2.662h.057V5.728h2.976v15.864h-2.976v.004zm.057-7.901c0-3.095-2.234-5.671-5.524-5.671-2.977 0-5.41 2.548-5.41 5.67 0 3.124 2.434 5.586 5.41 5.586s5.524-2.576 5.524-5.585zM117.855 21.596L107.372 5.22h-.057v16.377h-3.09V.408h3.38l10.307 16.12h.057V.409h3.09v21.188h-3.208.004zM132.304 21.996c-4.469 0-8.448-3.808-8.448-8.277 0-4.84 3.808-8.419 8.676-8.419 4.383 0 8.505 3.437 8.448 8.476-.057 4.236-3.608 8.22-8.676 8.22zm.086-13.972c-2.977 0-5.558 2.52-5.558 5.614s2.492 5.642 5.496 5.642c3.005 0 5.668-2.462 5.668-5.67 0-3.21-2.492-5.586-5.611-5.586h.005zM147.41 21.596l-6.3-15.864h3.181l4.15 11.339h.057l4.065-11.339h3.18l-6.242 15.864h-2.091zM169.785 21.596v-2.462h-.057c-1.118 1.891-3.124 2.862-5.382 2.862-4.64 0-8.419-3.494-8.419-8.077 0-5.068 3.636-8.619 8.305-8.619 2.319 0 4.264.86 5.496 2.662h.057V5.728h2.976v15.864h-2.976v.004zm.057-7.901c0-3.095-2.235-5.671-5.525-5.671-2.976 0-5.41 2.548-5.41 5.67 0 3.124 2.434 5.586 5.41 5.586 2.977 0 5.525-2.576 5.525-5.585z"></path></svg>`,zi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>SambaNova</title><path d="M23 23h-1.223V8.028c0-3.118-2.568-5.806-5.744-5.806H8.027c-3.176 0-5.744 2.565-5.744 5.686 0 3.119 2.568 5.684 5.744 5.684h.794c1.346 0 2.445 1.1 2.445 2.444 0 1.346-1.1 2.446-2.445 2.446H1v-1.223h7.761c.671 0 1.223-.551 1.223-1.16 0-.67-.552-1.16-1.223-1.16h-.794C4.177 14.872 1 11.756 1 7.909 1 4.058 4.176 1 8.027 1h8.066C19.88 1 23 4.239 23 8.028V23z"></path><path d="M8.884 12.672c1.71.06 3.361 1.588 3.361 3.422 0 1.833-1.528 3.421-3.421 3.421H1v1.223h7.761c2.568 0 4.705-2.077 4.705-4.644 0-.672-.123-1.283-.43-1.894-.245-.551-.67-1.1-1.099-1.528-.489-.429-1.039-.734-1.65-.977-.525-.175-1.048-.193-1.594-.212-.218-.008-.441-.016-.669-.034-.428 0-1.406-.245-1.956-.61a3.369 3.369 0 01-1.223-1.406c-.183-.489-.305-.977-.305-1.528A3.417 3.417 0 017.96 4.482h8.066c1.895 0 3.422 1.65 3.422 3.483v15.032h1.223V8.027c0-2.568-2.077-4.768-4.645-4.768h-8c-2.568 0-4.705 2.077-4.705 4.646 0 .67.123 1.282.43 1.894a4.45 4.45 0 001.099 1.528c.429.428 1.039.734 1.588.976.306.123.611.183.976.246.857.06 1.406.123 1.466.123h.003z"></path><path d="M1 23h7.761v-.003c3.85 0 7.03-3.116 7.09-7.026 0-3.79-3.117-6.906-6.967-6.906H8.09c-.672 0-1.222-.552-1.222-1.16 0-.608.487-1.16 1.159-1.16h8.069c.608 0 1.159.611 1.159 1.283v14.97h1.223V8.024c0-1.345-1.1-2.505-2.445-2.505H7.967a2.451 2.451 0 00-2.445 2.445 2.45 2.45 0 002.445 2.445h.794c3.176 0 5.744 2.568 5.744 5.684s-2.568 5.684-5.744 5.684H1V23z"></path></svg>`,Bi=`<svg width="410" height="80" viewBox="0 0 410 80" fill="none" xmlns="http://www.w3.org/2000/svg">
22
+ <path d="M24.9107 54.3209C24.9274 56.8686 27.0181 58.9206 29.5804 58.9042L42.1861 58.8841C45.0739 58.5267 47.2897 56.164 47.4468 53.2747V35.2209C47.4468 32.6897 45.3831 30.6377 42.8374 30.6377C40.2917 30.6377 38.228 32.6897 38.228 35.2209V46.6889C38.228 48.3397 36.8821 49.6779 35.2219 49.6779H29.5202C26.9579 49.6944 24.8942 51.7731 24.9107 54.3209Z" fill="currentColor"/>
23
+ <path d="M22.035 45.4135C19.4893 45.4135 17.4256 43.3616 17.4256 40.8304V22.7666C17.5772 19.8767 19.7889 17.5098 22.6763 17.1472H35.292C37.8416 17.1523 39.9179 19.1858 39.9616 21.7204C39.9749 22.9464 39.4958 24.1271 38.6305 25.0005C37.7652 25.874 36.5852 26.3681 35.3522 26.3734H29.6405C27.9803 26.3734 26.6344 27.7116 26.6344 29.3624V40.8304C26.6344 43.3577 24.5768 45.4081 22.035 45.4135Z" fill="currentColor"/>
24
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M14.4796 4.55169e-05H37.3562C44.5954 -0.0131325 51.5429 2.83563 56.6684 7.91884C61.7938 13.002 64.6767 19.9027 64.682 27.1007V63.2382C63.944 70.0767 58.4198 75.4272 51.5252 75.9815H27.3358C20.0878 75.992 13.1333 73.1359 8.00535 68.0428C2.87745 62.9496 -0.00266304 56.0377 1.84766e-06 48.831V14.4172C0.00551173 6.4649 6.48177 0.0165653 14.4796 4.55169e-05ZM50.1458 14.5586C46.7362 11.1591 42.1046 9.25081 37.2761 9.25614L14.8303 9.21629C11.7215 9.25996 9.22756 11.7841 9.23882 14.8755V48.6616C9.2362 53.4532 11.1494 58.0494 14.5569 61.4375C17.9645 64.8257 22.5869 66.728 27.4059 66.7254H50.6333C53.0728 66.3869 55.015 64.5241 55.4433 62.1123V27.3697C55.4618 22.5687 53.5554 17.9582 50.1458 14.5586Z" fill="currentColor"/>
25
+ <path d="M104.493 67.7317C100.27 67.7021 96.1195 66.6378 92.4086 64.6331C88.5532 62.6416 85.2129 59.7909 82.6487 56.3036C82.3105 55.8858 82.1561 55.35 82.2202 54.8175C82.2843 54.285 82.5616 53.8006 82.9894 53.474L87.6589 49.3491C88.0366 49.0076 88.5312 48.8223 89.0417 48.831H89.3824C89.9862 48.9245 90.5216 49.2686 90.8554 49.7775C92.4311 52.3094 94.5919 54.4307 97.1583 55.9648C99.6108 57.4255 102.416 58.1969 105.275 58.1967C108.381 58.1967 110.716 57.5889 112.179 56.3036C113.616 55.0959 114.387 53.278 114.253 51.4115C114.408 49.4054 113.571 47.45 112.009 46.1708C110.192 44.7958 107.256 43.5072 103.201 42.3049C91.1761 39.3856 85.1638 33.7164 85.1638 25.3671C85.1638 20.216 86.8873 16.1808 90.3444 13.3511C93.8014 10.5215 98.2906 9.22626 103.992 9.22626C111.809 8.99634 119.263 12.5093 124.033 18.6716C124.739 19.5593 124.625 20.8408 123.773 21.5909L119.233 25.377C118.86 25.7249 118.362 25.9112 117.851 25.8951H117.59C116.999 25.8392 116.463 25.5253 116.127 25.0383C114.738 23.0268 112.908 21.3543 110.776 20.1462C108.661 19.0881 106.32 18.5549 103.952 18.5919C101.601 18.4991 99.2774 19.1288 97.2986 20.3953C95.8526 21.4259 95.0124 23.1004 95.054 24.8689C94.9621 26.6539 95.7328 28.3752 97.1282 29.5019C98.7716 30.8769 101.708 31.9928 105.846 33.019C111.467 34.5733 115.866 36.6258 119.063 39.296C122.43 42.2153 124.163 46.2704 124.163 51.4016C124.179 54.4298 123.275 57.3923 121.568 59.9004C119.831 62.4462 117.397 64.4445 114.554 65.6593C111.406 67.1128 107.963 67.8221 104.493 67.7317Z" fill="currentColor"/>
26
+ <path d="M149.205 67.9011C145.557 67.9905 141.961 67.036 138.843 65.1511C135.81 63.3472 133.354 60.725 131.759 57.5889C130.027 54.247 129.166 50.5268 129.254 46.7686C129.157 43.038 130.019 39.3444 131.759 36.0379C133.359 32.908 135.814 30.2903 138.843 28.4856C141.961 26.6794 145.506 25.7303 149.114 25.7357C152.134 25.6691 155.117 26.4088 157.752 27.8778C160.285 29.3689 162.512 31.3228 164.315 33.6367C165.002 34.5447 164.852 35.8286 163.975 36.556L160.177 39.5451C159.797 39.8179 159.343 39.9707 158.874 39.9834H158.534C157.97 39.903 157.467 39.5878 157.151 39.1166C155.466 36.3527 152.455 34.6612 149.205 34.653C147.321 34.6582 145.474 35.1638 143.854 36.1176C142.227 37.1265 140.934 38.5886 140.136 40.3222C138.322 44.427 138.322 49.1001 140.136 53.205C140.931 54.9639 142.223 56.4557 143.854 57.4992C145.437 58.5355 147.311 59.0448 149.205 58.9539C150.933 59.0546 152.658 58.7115 154.215 57.9575C155.628 57.1916 156.864 56.1394 157.842 54.8688C158.537 54.0159 159.771 53.8301 160.688 54.4404L164.756 57.27C165.214 57.5893 165.525 58.0765 165.621 58.6242C165.717 59.172 165.59 59.7351 165.267 60.1893C165.27 60.2121 165.263 60.2351 165.248 60.2523C165.232 60.2694 165.21 60.2792 165.187 60.279C163.312 62.5875 160.952 64.4611 158.273 65.7689C155.462 67.1814 152.354 67.9121 149.205 67.9011Z" fill="currentColor"/>
27
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M170.628 57.5889C173.948 64.0489 180.689 68.0542 187.984 67.9011C190.817 67.9399 193.614 67.261 196.11 65.9283C196.892 65.46 197.663 64.9818 198.445 64.4637V64.5533C198.461 65.684 199.382 66.5951 200.519 66.6058H205.7C206.837 66.5951 207.758 65.684 207.774 64.5533V28.9938C207.758 27.8614 206.839 26.9474 205.7 26.9313H200.509C199.37 26.9474 198.451 27.8614 198.435 28.9938V29.1731C197.685 28.5749 196.876 28.0542 196.02 27.6188C193.47 26.3623 190.659 25.7174 187.813 25.7357C180.569 25.598 173.887 29.6036 170.628 36.0379C167.251 42.8292 167.251 50.7977 170.628 57.5889ZM182.543 36.1276C184.129 35.1626 185.954 34.6554 187.813 34.663C189.747 34.5783 191.657 35.1202 193.254 36.2073C194.859 37.2433 196.143 38.7024 196.962 40.4218C198.782 44.522 198.782 49.1945 196.962 53.2946C196.177 55.057 194.888 56.5505 193.254 57.5889C191.6 58.5412 189.725 59.0462 187.813 59.0535C185.943 59.1455 184.094 58.6316 182.543 57.5889C180.909 56.5484 179.617 55.0558 178.825 53.2946C177.86 51.256 177.39 49.0208 177.452 46.7686C177.427 44.5487 177.896 42.3508 178.825 40.3322C179.68 38.6361 180.96 37.1879 182.543 36.1276Z" fill="currentColor"/>
28
+ <path d="M216.662 9.52515H221.843C222.982 9.54121 223.901 10.4553 223.917 11.5876V64.5733C223.901 65.7056 222.982 66.6196 221.843 66.6357H216.662C215.523 66.6196 214.604 65.7056 214.588 64.5733V11.5876C214.568 11.0348 214.78 10.4987 215.174 10.1075C215.567 9.71639 216.106 9.50544 216.662 9.52515Z" fill="currentColor"/>
29
+ <path d="M305.423 65.2408C305.673 66.128 306.502 66.7295 307.427 66.6955L312.768 66.6855C313.681 66.6792 314.488 66.0936 314.772 65.2308L326.516 29.6513C326.853 28.6109 326.324 27.4884 325.304 27.0808C325.025 26.987 324.736 26.9268 324.442 26.9014H319.512C318.597 26.9122 317.791 27.5013 317.508 28.366L310.424 50.2857L303.409 28.366C303.164 27.4749 302.334 26.8685 301.405 26.9014H296.305C295.39 26.9122 294.584 27.5013 294.301 28.366L287.026 50.5547L279.851 28.3959C279.605 27.5047 278.776 26.8984 277.847 26.9313H272.366C271.977 26.9353 271.594 27.0237 271.244 27.1904C270.351 27.6733 269.93 28.7194 270.242 29.6812L282.076 65.2408C282.325 66.128 283.154 66.7295 284.08 66.6955H289.26C290.164 66.7394 290.985 66.1761 291.264 65.3205L298.599 44.0286L305.423 65.2408Z" fill="currentColor"/>
30
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M347.589 67.9011C340.299 68.0398 333.565 64.0387 330.234 57.5889C326.868 50.7952 326.868 42.8316 330.234 36.0379C333.509 29.5756 340.233 25.5656 347.509 25.7357C350.336 25.7447 353.12 26.428 355.626 27.7284C356.481 28.1616 357.29 28.679 358.041 29.2727V29.1034C358.05 27.953 358.959 27.0093 360.115 26.9512H365.386C366.525 26.9673 367.444 27.8814 367.46 29.0137V64.5733C367.444 65.7039 366.523 66.615 365.386 66.6257H360.205C359.068 66.615 358.147 65.7039 358.131 64.5733V64.4836C357.383 65.0178 356.603 65.5068 355.796 65.9482C353.265 67.2633 350.445 67.9343 347.589 67.9011ZM347.509 34.663C345.65 34.6554 343.825 35.1626 342.238 36.1276C340.654 37.1855 339.373 38.6343 338.521 40.3322C337.546 42.336 337.072 44.5438 337.138 46.7686C337.079 49.0215 337.553 51.2568 338.521 53.2946C339.313 55.0558 340.605 56.5484 342.238 57.5889C343.79 58.6316 345.639 59.1455 347.509 59.0535C349.394 59.0577 351.243 58.5514 352.86 57.5889C354.494 56.5484 355.786 55.0558 356.578 53.2946C358.398 49.1945 358.398 44.522 356.578 40.4218C355.78 38.6856 354.487 37.2202 352.86 36.2073C351.296 35.1217 349.415 34.5789 347.509 34.663Z" fill="currentColor"/>
31
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M259.319 54.5899C260.083 53.6547 261.445 53.4675 262.436 54.1615L265.973 56.7221C265.973 56.7716 266.013 56.8117 266.063 56.8117C266.555 57.1866 266.877 57.7407 266.958 58.3519C267.039 58.9631 266.872 59.5811 266.494 60.0698C264.778 62.2739 262.635 64.1135 260.191 65.4799C256.86 67.2044 253.143 68.0613 249.389 67.9708C245.753 67.9799 242.179 67.0347 239.028 65.2309C236.018 63.3986 233.568 60.7837 231.943 57.6686C230.218 54.3245 229.357 50.6059 229.438 46.8483C229.405 43.1244 230.264 39.4462 231.943 36.1176C233.512 32.9861 235.945 30.3631 238.958 28.5554C242.042 26.7403 245.564 25.79 249.148 25.8055C256.149 25.7488 262.604 29.5547 265.913 35.6892C267.593 38.7702 268.452 42.2277 268.408 45.7324C268.429 46.5336 268.402 47.3355 268.328 48.1336C268.239 49.206 267.336 50.0303 266.253 50.0266H239.198C239.629 52.2116 240.612 54.2517 242.054 55.9549C243.894 58.0468 246.597 59.1849 249.389 59.0436C251.666 59.1174 253.925 58.6134 255.952 57.5789C257.251 56.7988 258.393 55.7852 259.319 54.5899ZM249.309 34.5833C246.83 34.4938 244.423 35.4236 242.655 37.1538C241.363 38.3715 240.375 39.8728 239.769 41.5378H258.548C258.145 39.7527 257.246 38.1162 255.952 36.8151C254.399 35.2608 252.155 34.5833 249.309 34.5833Z" fill="currentColor"/>
32
+ <path d="M409.686 27.8778C409.269 27.3513 408.637 27.0372 407.963 27.021H403.043C402.152 27.0212 401.355 27.5684 401.038 28.3959L390.938 54.3009L381.348 28.2764C380.995 27.4912 380.209 26.9872 379.344 26.991H373.903C373.202 26.9849 372.548 27.3439 372.18 27.9376C371.774 28.5251 371.706 29.2803 371.999 29.9303L386.068 66.8649C385.837 68.2296 385.096 69.4574 383.994 70.3022C382.702 71.1585 380.199 71.2486 378.816 71.2985L378.813 71.2986C377.613 71.3567 376.668 72.3361 376.659 73.5304V77.0475C376.653 77.641 376.888 78.2118 377.31 78.6316C377.732 79.0513 378.306 79.2847 378.903 79.2793C379.105 79.2793 379.319 79.2808 379.544 79.2824L379.546 79.2824C381.718 79.2975 384.865 79.3194 387.371 78.0737C392.405 75.43 393.598 72.2252 394.943 68.6108C395.119 68.1389 395.297 67.6592 395.487 67.1737L409.907 29.731C410.085 29.1088 410.006 28.4415 409.686 27.8778Z" fill="currentColor"/>
33
+ </svg>
34
+ `,Vi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 50 24" xmlns="http://www.w3.org/2000/svg"><title>Z.ai</title><path d="M43.794 21.722V7.02h4.078v14.702h-4.078zm2.048-16.597a2.215 2.215 0 01-1.56-.603c-.427-.408-.641-.896-.641-1.464 0-.562.214-1.043.641-1.445A2.196 2.196 0 0145.842 1c.607 0 1.123.204 1.55.613.435.402.652.883.652 1.445 0 .568-.217 1.056-.651 1.464a2.182 2.182 0 01-1.55.603zM32.351 22c-.938 0-1.773-.163-2.507-.488a4.037 4.037 0 01-1.742-1.465c-.422-.65-.632-1.46-.632-2.43 0-.818.15-1.504.45-2.059.3-.555.708-1.002 1.225-1.34a5.942 5.942 0 011.761-.765c.664-.173 1.36-.294 2.087-.364a52.88 52.88 0 002.067-.249c.523-.083.903-.204 1.14-.364.235-.16.353-.395.353-.708v-.057c0-.607-.191-1.076-.574-1.407-.376-.332-.912-.498-1.608-.498-.734 0-1.318.163-1.752.488a2.246 2.246 0 00-.861 1.206l-3.771-.306a5.124 5.124 0 011.13-2.317c.56-.657 1.285-1.16 2.172-1.512.893-.357 1.927-.536 3.101-.536.817 0 1.599.096 2.345.287.753.192 1.42.488 2 .89.588.402 1.05.92 1.389 1.551.338.625.507 1.375.507 2.25v9.915h-3.867v-2.038h-.115c-.236.46-.552.864-.947 1.215a4.387 4.387 0 01-1.427.814c-.555.191-1.196.287-1.924.287zm1.168-2.814c.6 0 1.13-.118 1.589-.354.46-.243.82-.568 1.082-.977.261-.408.392-.87.392-1.387v-1.56c-.128.082-.303.159-.526.23a9.587 9.587 0 01-.737.181 36.44 36.44 0 01-.824.144l-.746.105c-.479.07-.897.182-1.254.335-.357.153-.635.36-.833.622-.197.255-.296.574-.296.957 0 .555.2.98.603 1.273.408.287.925.43 1.55.43zM22.514 21.971a2.236 2.236 0 01-1.627-.67 2.236 2.236 0 01-.67-1.627c0-.625.223-1.161.67-1.608.453-.446.995-.67 1.627-.67.613 0 1.149.224 1.608.67.46.447.69.983.69 1.608 0 .421-.11.808-.326 1.158-.21.345-.489.623-.833.833a2.193 2.193 0 01-1.139.306zM2.02 21.722v-2.46L11.8 5.537H2V2.12h15.008v2.46L7.216 18.305h9.811v3.417H2.02z"></path></svg>`,Hi=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Z.ai</title><path d="M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"></path></svg>`,Ui={row:`_row_2hylr_13`,icon:`_icon_2hylr_27`,textLogo:`_textLogo_2hylr_44`,iconLegacyWordmark:`_iconLegacyWordmark_2hylr_63`,fallback:`_fallback_2hylr_96`},Wi=Object.assign({"../../../assets/providers/aistudio/aistudio-text.svg":oi,"../../../assets/providers/aistudio/aistudio.svg":si,"../../../assets/providers/cerebras/cerebras-brand-color.svg":ci,"../../../assets/providers/cerebras/cerebras-brand.svg":li,"../../../assets/providers/cerebras/cerebras-color.svg":ui,"../../../assets/providers/cerebras/cerebras-text.svg":di,"../../../assets/providers/cerebras/cerebras.svg":fi,"../../../assets/providers/cloudflare/cloudflare-color.svg":pi,"../../../assets/providers/cloudflare/cloudflare-text.svg":mi,"../../../assets/providers/cloudflare/cloudflare.svg":hi,"../../../assets/providers/gemini/gemini-color.svg":gi,"../../../assets/providers/gemini/gemini-text.svg":_i,"../../../assets/providers/gemini/gemini.svg":vi,"../../../assets/providers/github/github-text.svg":yi,"../../../assets/providers/github/github.svg":bi,"../../../assets/providers/groq/groq-text.svg":xi,"../../../assets/providers/groq/groq.svg":Si,"../../../assets/providers/mistral/mistral-color.svg":Ci,"../../../assets/providers/mistral/mistral-text.svg":wi,"../../../assets/providers/mistral/mistral.svg":Ti,"../../../assets/providers/nvidia/nvidia-color.svg":Ei,"../../../assets/providers/nvidia/nvidia-text.svg":Di,"../../../assets/providers/nvidia/nvidia.svg":Oi,"../../../assets/providers/opencode/opencode-text.svg":ki,"../../../assets/providers/opencode/opencode.svg":Ai,"../../../assets/providers/openrouter/openrouter (1).svg":ji,"../../../assets/providers/openrouter/openrouter-text.svg":Mi,"../../../assets/providers/openrouter/openrouter.svg":Ni,"../../../assets/providers/ovhcloud/ovhcloud.svg":Pi,"../../../assets/providers/qwen/qwen-color.svg":Fi,"../../../assets/providers/qwen/qwen-text.svg":Ii,"../../../assets/providers/qwen/qwen.svg":L,"../../../assets/providers/sambanova/sambanova-color.svg":Li,"../../../assets/providers/sambanova/sambanova-text.svg":Ri,"../../../assets/providers/sambanova/sambanova.svg":zi,"../../../assets/providers/scalewaylogo/ScalewayLogo.svg":Bi,"../../../assets/providers/zai/zai-text.svg":Vi,"../../../assets/providers/zai/zai.svg":Hi}),Gi={nvidia:{folder:`nvidia`,hasColor:!0,hasText:!0},groq:{folder:`groq`,hasColor:!1,hasText:!0},cerebras:{folder:`cerebras`,hasColor:!0,hasText:!0},googleai:{folder:`aistudio`,hasColor:!1,hasText:!0},"github-models":{folder:`github`,hasColor:!1,hasText:!0},mistral:{folder:`mistral`,hasColor:!0,hasText:!0},cloudflare:{folder:`cloudflare`,hasColor:!0,hasText:!0},openrouter:{folder:`openrouter`,hasColor:!1,hasText:!0},sambanova:{folder:`sambanova`,hasColor:!0,hasText:!0},ovhcloud:{folder:`ovhcloud`,hasColor:!1,hasText:!1,legacy:!0,noCaption:!0},scaleway:{folder:`scalewaylogo`,iconFile:`ScalewayLogo`,iconClass:`scalewayLogo`,hasColor:!1,hasText:!1,legacy:!0,noCaption:!0},zai:{folder:`zai`,hasColor:!1,hasText:!0},qwen:{folder:`qwen`,hasColor:!0,hasText:!0},"opencode-zen":{folder:`opencode`,hasColor:!1,hasText:!0},codestral:{folder:`mistral`,iconFile:`mistral-color`,hasColor:!0,hasText:!1,legacy:!0,caption:`Codestral`}};function Ki(e,t){return!e||!t?null:Wi[`../../../assets/providers/${e}/${t}.svg`]||null}function qi({providerKey:e,origin:t}){let n=Gi[e];if(!n)return(0,F.jsx)(`span`,{className:Ui.fallback,children:t});let r=n.iconFile&&Ki(n.folder,n.iconFile)||n.hasColor&&Ki(n.folder,`${n.folder}-color`)||Ki(n.folder,n.folder),i=n.hasText?Ki(n.folder,`${n.folder}-text`):null;if(r&&i)return(0,F.jsxs)(`span`,{className:Ui.row,title:t,children:[(0,F.jsx)(`span`,{className:Ui.icon,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:r}}),(0,F.jsx)(`span`,{className:Ui.textLogo,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:i}})]});if(r){let e=n.caption??t;if(n.noCaption){let e=n.iconClass?`${Ui.iconLegacyWordmark} ${n.iconClass}`:Ui.iconLegacyWordmark;return(0,F.jsx)(`span`,{className:Ui.row,title:t,children:(0,F.jsx)(`span`,{className:e,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:r}})})}return(0,F.jsxs)(`span`,{className:Ui.row,title:t,children:[(0,F.jsx)(`span`,{className:Ui.icon,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:r}}),(0,F.jsx)(`span`,{className:Ui.fallback,children:e})]})}return i?(0,F.jsx)(`span`,{className:Ui.row,title:t,children:(0,F.jsx)(`span`,{className:Ui.textLogo,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:i}})}):(0,F.jsx)(`span`,{className:Ui.fallback,children:t})}var Ji={dropdown:`_dropdown_1mlad_10`,trigger:`_trigger_1mlad_15`,triggerActive:`_triggerActive_1mlad_40`,triggerOpen:`_triggerOpen_1mlad_44`,triggerContent:`_triggerContent_1mlad_52`,triggerLogo:`_triggerLogo_1mlad_61`,triggerLabel:`_triggerLabel_1mlad_76`,triggerCount:`_triggerCount_1mlad_83`,chevron:`_chevron_1mlad_92`,chevronOpen:`_chevronOpen_1mlad_97`,menu:`_menu_1mlad_103`,option:`_option_1mlad_133`,optionActive:`_optionActive_1mlad_159`,optionLabel:`_optionLabel_1mlad_168`,optionLogo:`_optionLogo_1mlad_173`,optionCount:`_optionCount_1mlad_188`,separator:`_separator_1mlad_198`,healthDot:`_healthDot_1mlad_205`,dot_active:`_dot_active_1mlad_215`,dot_pending:`_dot_pending_1mlad_221`,dot_down:`_dot_down_1mlad_226`,dot_nokey:`_dot_nokey_1mlad_231`};function Yi(e){return e.hasKey?e.anyUp?`active`:`down`:`nokey`}function Xi({state:e}){let t=Ji[`dot_${e}`]||Ji.dot_nokey;return(0,F.jsx)(`span`,{className:`${Ji.healthDot} ${t}`,title:{active:`API key works — at least one model is UP`,pending:`API key set — waiting for health data`,down:`API key set — models are DOWN or have auth errors`,nokey:`No API key configured`}[e]||``})}function Zi({providers:e,value:t,onChange:n}){let[r,i]=(0,v.useState)(!1),a=(0,v.useRef)(null),o=(0,v.useRef)(null),s=(0,v.useCallback)(()=>i(!1),[]);(0,v.useEffect)(()=>{if(!r)return;let e=e=>{a.current&&!a.current.contains(e.target)&&s()},t=e=>{e.key===`Escape`&&s()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r,s]),(0,v.useEffect)(()=>{if(!r||!o.current)return;let e=o.current.querySelector(`[data-active="true"]`);e&&e.scrollIntoView({block:`nearest`})},[r]);let c=e.find(e=>e.key===t),l=t!==`all`;return(0,F.jsxs)(`div`,{className:Ji.dropdown,ref:a,children:[(0,F.jsxs)(`button`,{className:`${Ji.trigger} ${l?Ji.triggerActive:``} ${r?Ji.triggerOpen:``}`,onClick:()=>i(!r),"aria-expanded":r,"aria-haspopup":`listbox`,title:l?`Provider: ${c?.name||t}`:`All providers`,children:[(0,F.jsx)(`span`,{className:Ji.triggerContent,children:l&&c?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:Ji.triggerLogo,children:(0,F.jsx)(qi,{providerKey:c.key,origin:c.name})}),(0,F.jsx)(`span`,{className:Ji.triggerCount,children:c.count})]}):(0,F.jsx)(`span`,{className:Ji.triggerLabel,children:`All Providers`})}),(0,F.jsx)(Xn,{size:12,stroke:2,className:`${Ji.chevron} ${r?Ji.chevronOpen:``}`})]}),r&&(0,F.jsxs)(`div`,{className:Ji.menu,role:`listbox`,ref:o,children:[(0,F.jsxs)(`button`,{role:`option`,"aria-selected":t===`all`,"data-active":t===`all`,className:`${Ji.option} ${t===`all`?Ji.optionActive:``}`,onClick:()=>{n(`all`),s()},children:[(0,F.jsx)(`span`,{className:Ji.optionLabel,children:`All Providers`}),(0,F.jsx)(`span`,{className:Ji.optionCount,children:e.reduce((e,t)=>e+t.count,0)})]}),(0,F.jsx)(`div`,{className:Ji.separator}),e.map(e=>{let r=Yi(e);return(0,F.jsxs)(`button`,{role:`option`,"aria-selected":t===e.key,"data-active":t===e.key,className:`${Ji.option} ${t===e.key?Ji.optionActive:``}`,onClick:()=>{n(e.key),s()},title:`${e.name} — ${e.count} model${e.count===1?``:`s`}`,children:[(0,F.jsx)(`span`,{className:Ji.optionLogo,children:(0,F.jsx)(qi,{providerKey:e.key,origin:e.name})}),(0,F.jsx)(Xi,{state:r}),(0,F.jsx)(`span`,{className:Ji.optionCount,children:e.count})]},e.key)})]})]})}var R={filters:`_filters_c3x5j_9`,group:`_group_c3x5j_19`,filterLabel:`_filterLabel_c3x5j_21`,filterGroup:`_filterGroup_c3x5j_28`,filterTrigger:`_filterTrigger_c3x5j_32`,filterTriggerActive:`_filterTriggerActive_c3x5j_48`,filterTriggerExpanded:`_filterTriggerExpanded_c3x5j_52`,filterTriggerLabel:`_filterTriggerLabel_c3x5j_61`,filterTriggerSep:`_filterTriggerSep_c3x5j_66`,filterTriggerValue:`_filterTriggerValue_c3x5j_70`,filterTriggerChevron:`_filterTriggerChevron_c3x5j_78`,chevronOpen:`_chevronOpen_c3x5j_83`,filterDropdown:`_filterDropdown_c3x5j_88`,filterChipRow:`_filterChipRow_c3x5j_100`,filterChip:`_filterChip_c3x5j_100`,filterChipActive:`_filterChipActive_c3x5j_127`,select:`_select_c3x5j_136`,providerSelect:`_providerSelect_c3x5j_136`,toolStatus:`_toolStatus_c3x5j_145`,spacer:`_spacer_c3x5j_163`,resetBtn:`_resetBtn_c3x5j_165`,resetBadge:`_resetBadge_c3x5j_178`,customFilterChip:`_customFilterChip_c3x5j_189`,customFilterIcon:`_customFilterIcon_c3x5j_199`,customFilterLabel:`_customFilterLabel_c3x5j_200`,customFilterClear:`_customFilterClear_c3x5j_205`,nextPing:`_nextPing_c3x5j_218`,nextPingLabel:`_nextPingLabel_c3x5j_226`,nextPingTime:`_nextPingTime_c3x5j_230`,live:`_live_c3x5j_241`,liveDot:`_liveDot_c3x5j_246`,pulseDot:`_pulseDot_c3x5j_1`,benchmarkBar:`_benchmarkBar_c3x5j_252`,benchmarkLabel:`_benchmarkLabel_c3x5j_262`,benchmarkSpinner:`_benchmarkSpinner_c3x5j_268`,spinSp:`_spinSp_c3x5j_1`,benchmarkCount:`_benchmarkCount_c3x5j_273`,benchmarkTrack:`_benchmarkTrack_c3x5j_274`,benchmarkFill:`_benchmarkFill_c3x5j_280`,benchmarkPct:`_benchmarkPct_c3x5j_286`},Qi=[{key:`all`,label:`All`},{key:`S+`,label:`S+`},{key:`S`,label:`S`},{key:`A+`,label:`A+`},{key:`A`,label:`A`},{key:`A-`,label:`A-`},{key:`B+`,label:`B+`},{key:`B`,label:`B`},{key:`C`,label:`C`}],$i=[{key:`all`,label:`All`},{key:`up`,label:`Up`},{key:`down`,label:`Down`},{key:`pending`,label:`Pending`}],ea=[{key:`all`,label:`All`},{key:`Perfect`,label:`Perfect`},{key:`Normal`,label:`Normal`},{key:`Spiky`,label:`Spiky`},{key:`Slow`,label:`Slow`},{key:`Overloaded`,label:`Overloaded`},{key:`Down`,label:`Down`},{key:`Unstable`,label:`Unstable`},{key:`Pending`,label:`Pending`}],ta=[{key:`all`,label:`All`},{key:`up`,label:`Up`},{key:`timeout`,label:`Timeout`},{key:`down`,label:`Down`},{key:`pending`,label:`Pending`},{key:`noauth`,label:`No key`},{key:`auth_error`,label:`Auth err`}],na=[{key:`normal`,label:`All models`,hint:`Show everything`},{key:`configured`,label:`Configured only`,hint:`Hide models with no key or auth errors`},{key:`usable`,label:`Usable only`,hint:`Only Health UP + good verdict`}],ra=[{key:`speed`,label:`⚡ Speed`,interval:`2s`,color:`#00ff88`},{key:`normal`,label:`● Normal`,interval:`10s`,color:`#ffaa00`},{key:`slow`,label:`🐢 Slow`,interval:`30s`,color:`#ff6644`},{key:`forced`,label:`🔥 Forced`,interval:`4s`,color:`#ff4466`}];function ia(e){if(e==null)return null;let t=Math.max(0,e/1e3);return t<60?`${t.toFixed(2)}s`:`${Math.floor(t/60)}m ${(t%60).toFixed(2)}s`}function aa({label:e,items:t,value:n,onChange:r,colorMap:i}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null),c=(0,v.useCallback)(()=>o(!1),[]);(0,v.useEffect)(()=>{if(!a)return;let e=e=>{s.current&&!s.current.contains(e.target)&&c()},t=e=>{e.key===`Escape`&&c()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[a,c]);let l=t.find(e=>e.key===n)?.label??n??`All`,u=n!==`all`;return(0,F.jsxs)(`div`,{className:R.filterGroup,ref:s,children:[(0,F.jsxs)(`button`,{className:`${R.filterTrigger} ${u?R.filterTriggerActive:``} ${a?R.filterTriggerExpanded:``}`,onClick:()=>o(!a),title:`${e}: ${l}`,"aria-expanded":a,"aria-haspopup":`listbox`,children:[(0,F.jsx)(`span`,{className:R.filterTriggerLabel,children:e}),(0,F.jsx)(`span`,{className:R.filterTriggerSep,children:`:`}),(0,F.jsx)(`span`,{className:R.filterTriggerValue,children:l}),(0,F.jsx)(Xn,{size:12,stroke:2,className:`${R.filterTriggerChevron} ${a?R.chevronOpen:``}`})]}),a&&(0,F.jsx)(`div`,{className:R.filterDropdown,role:`listbox`,children:(0,F.jsx)(`div`,{className:R.filterChipRow,children:t.map((e,t)=>{let a=n===e.key,o=i?.[e.key];return(0,F.jsx)(`button`,{role:`option`,"aria-selected":a,className:`${R.filterChip} ${a?R.filterChipActive:``}`,style:a&&o?{"--chip-active-color":o}:{},onClick:()=>{r(e.key),c()},title:e.hint||e.label,children:e.label},e.key)})})})]})}function oa({filterTier:e,setFilterTier:t,filterStatus:n,setFilterStatus:r,filterProvider:i,setFilterProvider:a,filterVerdict:o,setFilterVerdict:s,filterHealth:c,setFilterHealth:l,visibilityMode:u,setVisibilityMode:d,customTextFilter:f,setCustomTextFilter:p,searchQuery:m,onResetView:h,providers:g,pingMode:_,setPingMode:y,nextPingAt:b,isPinging:x,globalBenchmarkRunning:S,globalBenchmarkTotal:C,globalBenchmarkCompleted:w,toolMode:ee=`opencode`}){let[T,E]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(b==null)return;let e=()=>{let e=b-Date.now();E(e>0?e:0)};e();let t=setInterval(e,100);return()=>clearInterval(t)},[b]);let D=T===null?null:ia(T),O=yn(ee),te=!!(f&&f.trim().length>0),ne=S&&C>0?Math.round(w/C*100):0,re=(0,v.useMemo)(()=>{let t=0;return e!==`all`&&t++,n!==`all`&&t++,i!==`all`&&t++,o!==`all`&&t++,c!==`all`&&t++,u!==`normal`&&t++,te&&t++,m&&m.trim().length>0&&t++,t},[e,n,i,o,c,u,te,m]);return(0,F.jsxs)(`section`,{className:R.filters,children:[S&&(0,F.jsxs)(`div`,{className:R.benchmarkBar,children:[(0,F.jsxs)(`div`,{className:R.benchmarkLabel,children:[(0,F.jsx)(`span`,{className:R.benchmarkSpinner}),(0,F.jsx)(`span`,{children:`AI Speed Test`}),(0,F.jsxs)(`span`,{className:R.benchmarkCount,children:[w,`/`,C]})]}),(0,F.jsx)(`div`,{className:R.benchmarkTrack,children:(0,F.jsx)(`div`,{className:R.benchmarkFill,style:{width:`${ne}%`}})}),(0,F.jsxs)(`span`,{className:R.benchmarkPct,children:[ne,`%`]})]}),(0,F.jsx)(aa,{label:`Tier`,items:Qi,value:e,onChange:t}),(0,F.jsx)(aa,{label:`Status`,items:$i,value:n,onChange:r}),(0,F.jsx)(aa,{label:`Verdict`,items:ea,value:o,onChange:s}),(0,F.jsx)(aa,{label:`Health`,items:ta,value:c,onChange:l}),(0,F.jsxs)(`div`,{className:R.group,children:[(0,F.jsx)(`label`,{className:R.filterLabel,htmlFor:`visibility-select`,children:`Visibility`}),(0,F.jsx)(`select`,{id:`visibility-select`,className:R.select,value:u,onChange:e=>d(e.target.value),title:na.find(e=>e.key===u)?.hint,"aria-label":`Visibility mode`,children:na.map(e=>(0,F.jsx)(`option`,{value:e.key,children:e.label},e.key))})]}),(0,F.jsxs)(`div`,{className:R.group,children:[(0,F.jsx)(`label`,{className:R.filterLabel,children:`Provider`}),(0,F.jsx)(Zi,{providers:g,value:i,onChange:a})]}),(0,F.jsxs)(`div`,{className:R.group,children:[(0,F.jsx)(`label`,{className:R.filterLabel,children:`Endpoint target`}),(0,F.jsxs)(`div`,{className:R.toolStatus,title:`Active endpoint install target from the Header picker`,children:[(0,F.jsx)(`span`,{children:O.emoji}),(0,F.jsx)(`strong`,{children:O.label})]})]}),(0,F.jsx)(`div`,{className:R.spacer}),te&&(0,F.jsxs)(`div`,{className:R.group,children:[(0,F.jsx)(`label`,{className:R.filterLabel,children:`Text`}),(0,F.jsxs)(`div`,{className:R.customFilterChip,title:`Click X to clear (TUI: X key)`,children:[(0,F.jsx)(`span`,{className:R.customFilterIcon,children:(0,F.jsx)(mr,{size:12,stroke:1.5})}),(0,F.jsx)(`span`,{className:R.customFilterLabel,children:f}),(0,F.jsx)(`button`,{className:R.customFilterClear,onClick:()=>p(null),title:`Clear custom text filter (TUI: X)`,"aria-label":`Clear custom text filter`,children:(0,F.jsx)(Jr,{size:12,stroke:2})})]})]}),re>0&&(0,F.jsxs)(`button`,{className:R.resetBtn,onClick:h,title:`Reset ${re} active filter${re===1?``:`s`} (TUI: N)`,children:[(0,F.jsx)(Fr,{size:12,stroke:1.5}),(0,F.jsx)(`span`,{children:`Reset`}),(0,F.jsx)(`span`,{className:R.resetBadge,children:re})]}),(0,F.jsx)(aa,{label:`Ping`,items:ra,value:_,onChange:y,colorMap:Object.fromEntries(ra.map(e=>[e.key,e.color]))}),(0,F.jsx)(`div`,{className:R.group,children:(0,F.jsxs)(`div`,{className:R.nextPing,title:`Next ping countdown`,children:[(0,F.jsx)(`span`,{className:R.nextPingLabel,children:`next ping in`}),(0,F.jsx)(`span`,{className:R.nextPingTime,children:D??`—`})]})})]})}function sa(){return{accessor:(e,t)=>typeof e==`function`?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function ca(e,t){return typeof e==`function`?e(t):e}function la(e,t){return n=>{t.setState(t=>({...t,[e]:ca(n,t[e])}))}}function ua(e){return e instanceof Function}function da(e){return Array.isArray(e)&&e.every(e=>typeof e==`number`)}function fa(e,t){let n=[],r=e=>{e.forEach(e=>{n.push(e);let i=t(e);i!=null&&i.length&&r(i)})};return r(e),n}function z(e,t,n){let r=[],i;return a=>{let o;n.key&&n.debug&&(o=Date.now());let s=e(a);if(!(s.length!==r.length||s.some((e,t)=>r[t]!==e)))return i;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
35
+ font-size: .6rem;
36
+ font-weight: bold;
37
+ color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return i}}function B(e,t,n,r){return{debug:()=>e?.debugAll??e[t],key:!1,onChange:r}}function pa(e,t,n,r){let i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>i.getValue()??e.options.renderFallbackValue,getContext:z(()=>[e,n,t,i],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),B(e.options,`debugCells`,`cell.getContext`))};return e._features.forEach(r=>{r.createCell==null||r.createCell(i,n,t,e)},{}),i}function ma(e,t,n,r){let i={...e._getDefaultColumnDef(),...t},a=i.accessorKey,o=i.id??(a?typeof String.prototype.replaceAll==`function`?a.replaceAll(`.`,`_`):a.replace(/\./g,`_`):void 0)??(typeof i.header==`string`?i.header:void 0),s;if(i.accessorFn?s=i.accessorFn:a&&(s=a.includes(`.`)?e=>{let t=e;for(let e of a.split(`.`))t=t?.[e];return t}:e=>e[i.accessorKey]),!o)throw Error();let c={id:`${String(o)}`,accessorFn:s,parent:r,depth:n,columnDef:i,columns:[],getFlatColumns:z(()=>[!0],()=>[c,...c.columns?.flatMap(e=>e.getFlatColumns())],B(e.options,`debugColumns`,`column.getFlatColumns`)),getLeafColumns:z(()=>[e._getOrderColumnsFn()],e=>{var t;return(t=c.columns)!=null&&t.length?e(c.columns.flatMap(e=>e.getLeafColumns())):[c]},B(e.options,`debugColumns`,`column.getLeafColumns`))};for(let t of e._features)t.createColumn==null||t.createColumn(c,e);return c}var ha=`debugHeaders`;function ga(e,t,n){let r={id:n.id??t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(r),e},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach(t=>{t.createHeader==null||t.createHeader(r,e)}),r}var _a={createTable:e=>{e.getHeaderGroups=z(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{let a=r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],o=i?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],s=n.filter(e=>!(r!=null&&r.includes(e.id))&&!(i!=null&&i.includes(e.id)));return va(t,[...a,...s,...o],e)},B(e.options,ha,`getHeaderGroups`)),e.getCenterHeaderGroups=z(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(e=>!(r!=null&&r.includes(e.id))&&!(i!=null&&i.includes(e.id))),va(t,n,e,`center`)),B(e.options,ha,`getCenterHeaderGroups`)),e.getLeftHeaderGroups=z(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>va(t,r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],e,`left`),B(e.options,ha,`getLeftHeaderGroups`)),e.getRightHeaderGroups=z(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>va(t,r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],e,`right`),B(e.options,ha,`getRightHeaderGroups`)),e.getFooterGroups=z(()=>[e.getHeaderGroups()],e=>[...e].reverse(),B(e.options,ha,`getFooterGroups`)),e.getLeftFooterGroups=z(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),B(e.options,ha,`getLeftFooterGroups`)),e.getCenterFooterGroups=z(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),B(e.options,ha,`getCenterFooterGroups`)),e.getRightFooterGroups=z(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),B(e.options,ha,`getRightFooterGroups`)),e.getFlatHeaders=z(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),B(e.options,ha,`getFlatHeaders`)),e.getLeftFlatHeaders=z(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),B(e.options,ha,`getLeftFlatHeaders`)),e.getCenterFlatHeaders=z(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),B(e.options,ha,`getCenterFlatHeaders`)),e.getRightFlatHeaders=z(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),B(e.options,ha,`getRightFlatHeaders`)),e.getCenterLeafHeaders=z(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),B(e.options,ha,`getCenterLeafHeaders`)),e.getLeftLeafHeaders=z(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),B(e.options,ha,`getLeftLeafHeaders`)),e.getRightLeafHeaders=z(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),B(e.options,ha,`getRightLeafHeaders`)),e.getLeafHeaders=z(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>[...e[0]?.headers??[],...t[0]?.headers??[],...n[0]?.headers??[]].map(e=>e.getLeafHeaders()).flat(),B(e.options,ha,`getLeafHeaders`))}};function va(e,t,n,r){let i=0,a=function(e,t){t===void 0&&(t=1),i=Math.max(i,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;(n=e.columns)!=null&&n.length&&a(e.columns,t+1)},0)};a(e);let o=[],s=(e,t)=>{let i={depth:t,id:[r,`${t}`].filter(Boolean).join(`_`),headers:[]},a=[];e.forEach(e=>{let o=[...a].reverse()[0],s=e.column.depth===i.depth,c,l=!1;if(s&&e.column.parent?c=e.column.parent:(c=e.column,l=!0),o&&o?.column===c)o.subHeaders.push(e);else{let i=ga(n,c,{id:[r,t,c.id,e?.id].filter(Boolean).join(`_`),isPlaceholder:l,placeholderId:l?`${a.filter(e=>e.column===c).length}`:void 0,depth:t,index:a.length});i.subHeaders.push(e),a.push(i)}i.headers.push(e),e.headerGroup=i}),o.push(i),t>0&&s(a,t-1)};s(t.map((e,t)=>ga(n,e,{depth:i,index:t})),i-1),o.reverse();let c=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],c(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:i}=e;t+=n,r.push(i)})):t=1;let i=Math.min(...r);return n+=i,e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return c(o[0]?.headers??[]),o}var ya=(e,t,n,r,i,a,o)=>{let s={id:t,index:r,original:n,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];let n=e.getColumn(t);if(n!=null&&n.accessorFn)return s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];let n=e.getColumn(t);if(n!=null&&n.accessorFn)return n.columnDef.getUniqueValues?(s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[t]):(s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t])},renderValue:t=>s.getValue(t)??e.options.renderFallbackValue,subRows:a??[],getLeafRows:()=>fa(s.subRows,e=>e.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){let n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:z(()=>[e.getAllLeafColumns()],t=>t.map(t=>pa(e,s,t,t.id)),B(e.options,`debugRows`,`getAllCells`)),_getAllCellsByColumnId:z(()=>[s.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),B(e.options,`debugRows`,`getAllCellsByColumnId`))};for(let t=0;t<e._features.length;t++){let n=e._features[t];n==null||n.createRow==null||n.createRow(s,e)}return s},ba={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},xa=(e,t,n)=>{var r,i;let a=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(a))};xa.autoRemove=e=>ja(e);var Sa=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Sa.autoRemove=e=>ja(e);var Ca=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};Ca.autoRemove=e=>ja(e);var wa=(e,t,n)=>e.getValue(t)?.includes(n);wa.autoRemove=e=>ja(e);var Ta=(e,t,n)=>!n.some(n=>{var r;return!((r=e.getValue(t))!=null&&r.includes(n))});Ta.autoRemove=e=>ja(e)||!(e!=null&&e.length);var Ea=(e,t,n)=>n.some(n=>e.getValue(t)?.includes(n));Ea.autoRemove=e=>ja(e)||!(e!=null&&e.length);var Da=(e,t,n)=>e.getValue(t)===n;Da.autoRemove=e=>ja(e);var Oa=(e,t,n)=>e.getValue(t)==n;Oa.autoRemove=e=>ja(e);var ka=(e,t,n)=>{let[r,i]=n,a=e.getValue(t);return a>=r&&a<=i};ka.resolveFilterValue=e=>{let[t,n]=e,r=typeof t==`number`?t:parseFloat(t),i=typeof n==`number`?n:parseFloat(n),a=t===null||Number.isNaN(r)?-1/0:r,o=n===null||Number.isNaN(i)?1/0:i;if(a>o){let e=a;a=o,o=e}return[a,o]},ka.autoRemove=e=>ja(e)||ja(e[0])&&ja(e[1]);var Aa={includesString:xa,includesStringSensitive:Sa,equalsString:Ca,arrIncludes:wa,arrIncludesAll:Ta,arrIncludesSome:Ea,equals:Da,weakEquals:Oa,inNumberRange:ka};function ja(e){return e==null||e===``}var Ma={getDefaultColumnDef:()=>({filterFn:`auto`}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:la(`columnFilters`,e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let n=t.getCoreRowModel().flatRows[0]?.getValue(e.id);return typeof n==`string`?Aa.includesString:typeof n==`number`?Aa.inNumberRange:typeof n==`boolean`||typeof n==`object`&&n?Aa.equals:Array.isArray(n)?Aa.arrIncludes:Aa.weakEquals},e.getFilterFn=()=>ua(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn===`auto`?e.getAutoFilterFn():t.options.filterFns?.[e.columnDef.filterFn]??Aa[e.columnDef.filterFn],e.getCanFilter=()=>(e.columnDef.enableColumnFilter??!0)&&(t.options.enableColumnFilters??!0)&&(t.options.enableFilters??!0)&&!!e.accessorFn,e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(t=>t.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>t.getState().columnFilters?.findIndex(t=>t.id===e.id)??-1,e.setFilterValue=n=>{t.setColumnFilters(t=>{let r=e.getFilterFn(),i=t?.find(t=>t.id===e.id),a=ca(n,i?i.value:void 0);if(Na(r,a,e))return t?.filter(t=>t.id!==e.id)??[];let o={id:e.id,value:a};return i?t?.map(t=>t.id===e.id?o:t)??[]:t!=null&&t.length?[...t,o]:[o]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let n=e.getAllLeafColumns();e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(e=>ca(t,e)?.filter(e=>{let t=n.find(t=>t.id===e.id);return!(t&&Na(t.getFilterFn(),e.value,t))}))},e.resetColumnFilters=t=>{e.setColumnFilters(t?[]:e.initialState?.columnFilters??[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Na(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||t===void 0||typeof t==`string`&&!t}var Pa={sum:(e,t,n)=>n.reduce((t,n)=>{let r=n.getValue(e);return t+(typeof r==`number`?r:0)},0),min:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}),r},max:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}),r},extent:(e,t,n)=>{let r,i;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r===void 0?n>=n&&(r=i=n):(r>n&&(r=n),i<n&&(i=n)))}),[r,i]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let i=t.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;let n=t.map(t=>t.getValue(e));if(!da(n))return;if(n.length===1)return n[0];let r=Math.floor(n.length/2),i=n.sort((e,t)=>e-t);return n.length%2==0?(i[r-1]+i[r])/2:i[r]},unique:(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count:(e,t)=>t.length},Fa={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t;return((t=e.getValue())==null||t.toString==null?void 0:t.toString())??null},aggregationFn:`auto`}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:la(`grouping`,e),groupedColumnMode:`reorder`}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(t=>t!==e.id):[...t??[],e.id])},e.getCanGroup=()=>(e.columnDef.enableGrouping??!0)&&(t.options.enableGrouping??!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue),e.getIsGrouped=()=>t.getState().grouping?.includes(e.id),e.getGroupedIndex=()=>t.getState().grouping?.indexOf(e.id),e.getToggleGroupingHandler=()=>{let t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let n=t.getCoreRowModel().flatRows[0]?.getValue(e.id);if(typeof n==`number`)return Pa.sum;if(Object.prototype.toString.call(n)===`[object Date]`)return Pa.extent},e.getAggregationFn=()=>{if(!e)throw Error();return ua(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn===`auto`?e.getAutoAggregationFn():t.options.aggregationFns?.[e.columnDef.aggregationFn]??Pa[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{e.setGrouping(t?[]:e.initialState?.grouping??[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];let r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((t=n.subRows)!=null&&t.length)}}};function Ia(e,t,n){if(!(t!=null&&t.length)||!n)return e;let r=e.filter(e=>!t.includes(e.id));return n===`remove`?r:[...t.map(t=>e.find(e=>e.id===t)).filter(Boolean),...r]}var La={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:la(`columnOrder`,e)}),createColumn:(e,t)=>{e.getIndex=z(e=>[Ja(t,e)],t=>t.findIndex(t=>t.id===e.id),B(t.options,`debugColumns`,`getIndex`)),e.getIsFirstColumn=n=>Ja(t,n)[0]?.id===e.id,e.getIsLastColumn=n=>{let r=Ja(t,n);return r[r.length-1]?.id===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{e.setColumnOrder(t?[]:e.initialState.columnOrder??[])},e._getOrderColumnsFn=z(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let i=[];if(!(e!=null&&e.length))i=r;else{let t=[...e],n=[...r];for(;n.length&&t.length;){let e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&i.push(n.splice(r,1)[0])}i=[...i,...n]}return Ia(i,t,n)},B(e.options,`debugTable`,`_getOrderColumnsFn`))}},Ra=()=>({left:[],right:[]}),za={getInitialState:e=>({columnPinning:Ra(),...e}),getDefaultOptions:e=>({onColumnPinningChange:la(`columnPinning`,e)}),createColumn:(e,t)=>{e.pin=n=>{let r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>n===`right`?{left:(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),right:[...(e?.right??[]).filter(e=>!(r!=null&&r.includes(e))),...r]}:n===`left`?{left:[...(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),...r],right:(e?.right??[]).filter(e=>!(r!=null&&r.includes(e)))}:{left:(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),right:(e?.right??[]).filter(e=>!(r!=null&&r.includes(e)))})},e.getCanPin=()=>e.getLeafColumns().some(e=>(e.columnDef.enablePinning??!0)&&(t.options.enableColumnPinning??t.options.enablePinning??!0)),e.getIsPinned=()=>{let n=e.getLeafColumns().map(e=>e.id),{left:r,right:i}=t.getState().columnPinning,a=n.some(e=>r?.includes(e)),o=n.some(e=>i?.includes(e));return a?`left`:o?`right`:!1},e.getPinnedIndex=()=>{var n;let r=e.getIsPinned();return r?((n=t.getState().columnPinning)==null||(n=n[r])==null?void 0:n.indexOf(e.id))??-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=z(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{let r=[...t??[],...n??[]];return e.filter(e=>!r.includes(e.column.id))},B(t.options,`debugRows`,`getCenterVisibleCells`)),e.getLeftVisibleCells=z(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>(t??[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:`left`})),B(t.options,`debugRows`,`getLeftVisibleCells`)),e.getRightVisibleCells=z(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>(t??[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:`right`})),B(t.options,`debugRows`,`getRightVisibleCells`))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>e.setColumnPinning(t?Ra():e.initialState?.columnPinning??Ra()),e.getIsSomeColumnsPinned=t=>{let n=e.getState().columnPinning;return t?!!n[t]?.length:!!(n.left?.length||n.right?.length)},e.getLeftLeafColumns=z(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(t??[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),B(e.options,`debugColumns`,`getLeftLeafColumns`)),e.getRightLeafColumns=z(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(t??[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),B(e.options,`debugColumns`,`getRightLeafColumns`)),e.getCenterLeafColumns=z(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{let r=[...t??[],...n??[]];return e.filter(e=>!r.includes(e.id))},B(e.options,`debugColumns`,`getCenterLeafColumns`))}};function Ba(e){return e||(typeof document<`u`?document:null)}var Va={size:150,minSize:20,maxSize:2**53-1},Ha=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Ua={getDefaultColumnDef:()=>Va,getInitialState:e=>({columnSizing:{},columnSizingInfo:Ha(),...e}),getDefaultOptions:e=>({columnResizeMode:`onEnd`,columnResizeDirection:`ltr`,onColumnSizingChange:la(`columnSizing`,e),onColumnSizingInfoChange:la(`columnSizingInfo`,e)}),createColumn:(e,t)=>{e.getSize=()=>{let n=t.getState().columnSizing[e.id];return Math.min(Math.max(e.columnDef.minSize??Va.minSize,n??e.columnDef.size??Va.size),e.columnDef.maxSize??Va.maxSize)},e.getStart=z(e=>[e,Ja(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),B(t.options,`debugColumns`,`getStart`)),e.getAfter=z(e=>[e,Ja(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),B(t.options,`debugColumns`,`getAfter`)),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>(e.columnDef.enableResizing??!0)&&(t.options.enableColumnResizing??!0),e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0,n=e=>{e.subHeaders.length?e.subHeaders.forEach(n):t+=e.column.getSize()??0};return n(e),t},e.getStart=()=>{if(e.index>0){let t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{let r=t.getColumn(e.column.id),i=r?.getCanResize();return a=>{if(!r||!i||(a.persist==null||a.persist(),Ka(a)&&a.touches&&a.touches.length>1))return;let o=e.getSize(),s=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],c=Ka(a)?Math.round(a.touches[0].clientX):a.clientX,l={},u=(e,n)=>{typeof n==`number`&&(t.setColumnSizingInfo(e=>{let r=t.options.columnResizeDirection===`rtl`?-1:1,i=(n-(e?.startOffset??0))*r,a=Math.max(i/(e?.startSize??0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;l[t]=Math.round(Math.max(n+n*a,0)*100)/100}),{...e,deltaOffset:i,deltaPercentage:a}}),(t.options.columnResizeMode===`onChange`||e===`end`)&&t.setColumnSizing(e=>({...e,...l})))},d=e=>u(`move`,e),f=e=>{u(`end`,e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=Ba(n),m={moveHandler:e=>d(e.clientX),upHandler:e=>{p?.removeEventListener(`mousemove`,m.moveHandler),p?.removeEventListener(`mouseup`,m.upHandler),f(e.clientX)}},h={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{p?.removeEventListener(`touchmove`,h.moveHandler),p?.removeEventListener(`touchend`,h.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(e.touches[0]?.clientX)}},g=Ga()?{passive:!1}:!1;Ka(a)?(p?.addEventListener(`touchmove`,h.moveHandler,g),p?.addEventListener(`touchend`,h.upHandler,g)):(p?.addEventListener(`mousemove`,m.moveHandler,g),p?.addEventListener(`mouseup`,m.upHandler,g)),t.setColumnSizingInfo(e=>({...e,startOffset:c,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{e.setColumnSizing(t?{}:e.initialState.columnSizing??{})},e.resetHeaderSizeInfo=t=>{e.setColumnSizingInfo(t?Ha():e.initialState.columnSizingInfo??Ha())},e.getTotalSize=()=>e.getHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getLeftTotalSize=()=>e.getLeftHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getCenterTotalSize=()=>e.getCenterHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getRightTotalSize=()=>e.getRightHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0}},Wa=null;function Ga(){if(typeof Wa==`boolean`)return Wa;let e=!1;try{let t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener(`test`,n,t),window.removeEventListener(`test`,n)}catch{e=!1}return Wa=e,Wa}function Ka(e){return e.type===`touchstart`}var qa={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:la(`columnVisibility`,e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>({...t,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{let n=e.columns;return(n.length?n.some(e=>e.getIsVisible()):t.getState().columnVisibility?.[e.id])??!0},e.getCanHide=()=>(e.columnDef.enableHiding??!0)&&(t.options.enableHiding??!0),e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=z(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),B(t.options,`debugRows`,`_getAllVisibleCells`)),e.getVisibleCells=z(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],B(t.options,`debugRows`,`getVisibleCells`))},createTable:e=>{let t=(t,n)=>z(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join(`_`)],e=>e.filter(e=>e.getIsVisible==null?void 0:e.getIsVisible()),B(e.options,`debugColumns`,t));e.getVisibleFlatColumns=t(`getVisibleFlatColumns`,()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t(`getVisibleLeafColumns`,()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t(`getLeftVisibleLeafColumns`,()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t(`getRightVisibleLeafColumns`,()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t(`getCenterVisibleLeafColumns`,()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{e.setColumnVisibility(t?{}:e.initialState.columnVisibility??{})},e.toggleAllColumnsVisible=t=>{t??=!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(n.getCanHide!=null&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(e.getIsVisible!=null&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>e.getIsVisible==null?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{e.toggleAllColumnsVisible(t.target?.checked)}}};function Ja(e,t){return t?t===`center`?e.getCenterVisibleLeafColumns():t===`left`?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var Ya={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,`__global__`),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,`__global__`),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,`__global__`),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Xa={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:la(`globalFilter`,e),globalFilterFn:`auto`,getColumnCanGlobalFilter:t=>{var n;let r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r==`string`||typeof r==`number`}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>(e.columnDef.enableGlobalFilter??!0)&&(t.options.enableGlobalFilter??!0)&&(t.options.enableFilters??!0)&&((t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))??!0)&&!!e.accessorFn},createTable:e=>{e.getGlobalAutoFilterFn=()=>Aa.includesString,e.getGlobalFilterFn=()=>{let{globalFilterFn:t}=e.options;return ua(t)?t:t===`auto`?e.getGlobalAutoFilterFn():e.options.filterFns?.[t]??Aa[t]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Za={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:la(`expanded`,e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{if(!t){e._queue(()=>{t=!0});return}if(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=t=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{e.setExpanded(t?{}:e.initialState?.expanded??{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{t.persist==null||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let t=e.getState().expanded;return t===!0||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{let t=e.getState().expanded;return typeof t==`boolean`?t===!0:!(!Object.keys(t).length||e.getRowModel().flatRows.some(e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(e=>{let n=e.split(`.`);t=Math.max(t,n.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{let i=r===!0?!0:!!(r!=null&&r[e.id]),a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(e=>{a[e]=!0}):a=r,n??=!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){let{[e.id]:t,...n}=a;return n}return r})},e.getIsExpanded=()=>{let n=t.getState().expanded;return!!((t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))??(n===!0||n?.[e.id]))},e.getCanExpand=()=>{var n;return(t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))??((t.options.enableExpanding??!0)&&!!((n=e.subRows)!=null&&n.length))},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},Qa=0,$a=10,eo=()=>({pageIndex:Qa,pageSize:$a}),to={getInitialState:e=>({...e,pagination:{...eo(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:la(`pagination`,e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{if(!t){e._queue(()=>{t=!0});return}if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=t=>e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(e=>ca(t,e)),e.resetPagination=t=>{e.setPagination(t?eo():e.initialState.pagination??eo())},e.setPageIndex=t=>{e.setPagination(n=>{let r=ca(t,n.pageIndex),i=e.options.pageCount===void 0||e.options.pageCount===-1?2**53-1:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})},e.resetPageIndex=t=>{var n;e.setPageIndex(t?Qa:((n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageIndex)??Qa)},e.resetPageSize=t=>{var n;e.setPageSize(t?$a:((n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageSize)??$a)},e.setPageSize=t=>{e.setPagination(e=>{let n=Math.max(1,ca(t,e.pageSize)),r=e.pageSize*e.pageIndex,i=Math.floor(r/n);return{...e,pageIndex:i,pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{let r=ca(t,e.options.pageCount??-1);return typeof r==`number`&&(r=Math.max(-1,r)),{...n,pageCount:r}}),e.getPageOptions=z(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...Array(e)].fill(null).map((e,t)=>t)),t},B(e.options,`debugTable`,`getPageOptions`)),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return n===-1?!0:n===0?!1:t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>e.options.pageCount??Math.ceil(e.getRowCount()/e.getState().pagination.pageSize),e.getRowCount=()=>e.options.rowCount??e.getPrePaginationRowModel().rows.length}},no=()=>({top:[],bottom:[]}),ro={getInitialState:e=>({rowPinning:no(),...e}),getDefaultOptions:e=>({onRowPinningChange:la(`rowPinning`,e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{let a=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],o=i?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],s=new Set([...o,e.id,...a]);t.setRowPinning(e=>n===`bottom`?{top:(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),bottom:[...(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e))),...Array.from(s)]}:n===`top`?{top:[...(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),...Array.from(s)],bottom:(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e)))}:{top:(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),bottom:(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e)))})},e.getCanPin=()=>{let{enableRowPinning:n,enablePinning:r}=t.options;return typeof n==`function`?n(e):n??r??!0},e.getIsPinned=()=>{let n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,a=n.some(e=>r?.includes(e)),o=n.some(e=>i?.includes(e));return a?`top`:o?`bottom`:!1},e.getPinnedIndex=()=>{let n=e.getIsPinned();return n?((n===`top`?t.getTopRows():t.getBottomRows())?.map(e=>{let{id:t}=e;return t}))?.indexOf(e.id)??-1:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>e.setRowPinning(t?no():e.initialState?.rowPinning??no()),e.getIsSomeRowsPinned=t=>{let n=e.getState().rowPinning;return t?!!n[t]?.length:!!(n.top?.length||n.bottom?.length)},e._getPinnedRows=(t,n,r)=>(e.options.keepPinnedRows??!0?(n??[]).map(t=>{let n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(n??[]).map(e=>t.find(t=>t.id===e))).filter(Boolean).map(e=>({...e,position:r})),e.getTopRows=z(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,`top`),B(e.options,`debugRows`,`getTopRows`)),e.getBottomRows=z(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,`bottom`),B(e.options,`debugRows`,`getBottomRows`)),e.getCenterRows=z(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{let r=new Set([...t??[],...n??[]]);return e.filter(e=>!r.has(e.id))},B(e.options,`debugRows`,`getCenterRows`))}},io={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:la(`rowSelection`,e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>e.setRowSelection(t?{}:e.initialState.rowSelection??{}),e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=t===void 0?!e.getIsAllRowsSelected():t;let r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):i.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{let r=t===void 0?!e.getIsAllPageRowsSelected():t,i={...n};return e.getRowModel().rows.forEach(t=>{ao(i,t.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=z(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?oo(e,n):{rows:[],flatRows:[],rowsById:{}},B(e.options,`debugTable`,`getSelectedRowModel`)),e.getFilteredSelectedRowModel=z(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?oo(e,n):{rows:[],flatRows:[],rowsById:{}},B(e.options,`debugTable`,`getFilteredSelectedRowModel`)),e.getGroupedSelectedRowModel=z(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?oo(e,n):{rows:[],flatRows:[],rowsById:{}},B(e.options,`debugTable`,`getGroupedSelectedRowModel`)),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState(),r=!!(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState(),r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{let t=Object.keys(e.getState().rowSelection??{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{let i=e.getIsSelected();t.setRowSelection(a=>{if(n=n===void 0?!i:n,e.getCanSelect()&&i===n)return a;let o={...a};return ao(o,e.id,n,r?.selectChildren??!0,t),o})},e.getIsSelected=()=>{let{rowSelection:n}=t.getState();return so(e,n)},e.getIsSomeSelected=()=>{let{rowSelection:n}=t.getState();return co(e,n)===`some`},e.getIsAllSubRowsSelected=()=>{let{rowSelection:n}=t.getState();return co(e,n)===`all`},e.getCanSelect=()=>typeof t.options.enableRowSelection==`function`?t.options.enableRowSelection(e):t.options.enableRowSelection??!0,e.getCanSelectSubRows=()=>typeof t.options.enableSubRowSelection==`function`?t.options.enableSubRowSelection(e):t.options.enableSubRowSelection??!0,e.getCanMultiSelect=()=>typeof t.options.enableMultiRowSelection==`function`?t.options.enableMultiRowSelection(e):t.options.enableMultiRowSelection??!0,e.getToggleSelectedHandler=()=>{let t=e.getCanSelect();return n=>{t&&e.toggleSelected(n.target?.checked)}}}},ao=(e,t,n,r,i)=>{var a;let o=i.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),o.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=o.subRows)!=null&&a.length&&o.getCanSelectSubRows()&&o.subRows.forEach(t=>ao(e,t.id,n,r,i))};function oo(e,t){let n=e.getState().rowSelection,r=[],i={},a=function(e,t){return e.map(e=>{var t;let o=so(e,n);if(o&&(r.push(e),i[e.id]=e),(t=e.subRows)!=null&&t.length&&(e={...e,subRows:a(e.subRows)}),o)return e}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:i}}function so(e,t){return t[e.id]??!1}function co(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,a=!1;return e.subRows.forEach(e=>{if(!(a&&!i)&&(e.getCanSelect()&&(so(e,t)?a=!0:i=!1),e.subRows&&e.subRows.length)){let n=co(e,t);n===`all`?a=!0:(n===`some`&&(a=!0),i=!1)}}),i?`all`:a?`some`:!1}var lo=/([0-9]+)/gm,uo=(e,t,n)=>vo(_o(e.getValue(n)).toLowerCase(),_o(t.getValue(n)).toLowerCase()),fo=(e,t,n)=>vo(_o(e.getValue(n)),_o(t.getValue(n))),V=(e,t,n)=>go(_o(e.getValue(n)).toLowerCase(),_o(t.getValue(n)).toLowerCase()),po=(e,t,n)=>go(_o(e.getValue(n)),_o(t.getValue(n))),mo=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},ho=(e,t,n)=>go(e.getValue(n),t.getValue(n));function go(e,t){return e===t?0:e>t?1:-1}function _o(e){return typeof e==`number`?isNaN(e)||e===1/0||e===-1/0?``:String(e):typeof e==`string`?e:``}function vo(e,t){let n=e.split(lo).filter(Boolean),r=t.split(lo).filter(Boolean);for(;n.length&&r.length;){let e=n.shift(),t=r.shift(),i=parseInt(e,10),a=parseInt(t,10),o=[i,a].sort();if(isNaN(o[0])){if(e>t)return 1;if(t>e)return-1;continue}if(isNaN(o[1]))return isNaN(i)?-1:1;if(i>a)return 1;if(a>i)return-1}return n.length-r.length}var yo={alphanumeric:uo,alphanumericCaseSensitive:fo,text:V,textCaseSensitive:po,datetime:mo,basic:ho},bo=[_a,qa,La,za,ba,Ma,Ya,Xa,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:`auto`,sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:la(`sorting`,e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let n=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let t of n){let n=t?.getValue(e.id);if(Object.prototype.toString.call(n)===`[object Date]`)return yo.datetime;if(typeof n==`string`&&(r=!0,n.split(lo).length>1))return yo.alphanumeric}return r?yo.text:yo.basic},e.getAutoSortDir=()=>typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id)==`string`?`asc`:`desc`,e.getSortingFn=()=>{if(!e)throw Error();return ua(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn===`auto`?e.getAutoSortingFn():t.options.sortingFns?.[e.columnDef.sortingFn]??yo[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{let i=e.getNextSortingOrder(),a=n!=null;t.setSorting(o=>{let s=o?.find(t=>t.id===e.id),c=o?.findIndex(t=>t.id===e.id),l=[],u,d=a?n:i===`desc`;return u=o!=null&&o.length&&e.getCanMultiSort()&&r?s?`toggle`:`add`:o!=null&&o.length&&c!==o.length-1?`replace`:s?`toggle`:`replace`,u===`toggle`&&(a||i||(u=`remove`)),u===`add`?(l=[...o,{id:e.id,desc:d}],l.splice(0,l.length-(t.options.maxMultiSortColCount??2**53-1))):l=u===`toggle`?o.map(t=>t.id===e.id?{...t,desc:d}:t):u===`remove`?o.filter(t=>t.id!==e.id):[{id:e.id,desc:d}],l})},e.getFirstSortDir=()=>e.columnDef.sortDescFirst??t.options.sortDescFirst??e.getAutoSortDir()===`desc`?`desc`:`asc`,e.getNextSortingOrder=n=>{let r=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==r&&(t.options.enableSortingRemoval??!0)&&(!n||(t.options.enableMultiRemove??!0))?!1:i===`desc`?`asc`:`desc`:r},e.getCanSort=()=>(e.columnDef.enableSorting??!0)&&(t.options.enableSorting??!0)&&!!e.accessorFn,e.getCanMultiSort=()=>e.columnDef.enableMultiSort??t.options.enableMultiSort??!!e.accessorFn,e.getIsSorted=()=>{let n=t.getState().sorting?.find(t=>t.id===e.id);return n?n.desc?`desc`:`asc`:!1},e.getSortIndex=()=>t.getState().sorting?.findIndex(t=>t.id===e.id)??-1,e.clearSorting=()=>{t.setSorting(t=>t!=null&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{let n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{e.setSorting(t?[]:e.initialState?.sorting??[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Fa,Za,to,ro,io,Ua];function xo(e){let t=[...bo,...e._features??[]],n={_features:t},r=n._features.reduce((e,t)=>Object.assign(e,t.getDefaultOptions==null?void 0:t.getDefaultOptions(n)),{}),i=e=>n.options.mergeOptions?n.options.mergeOptions(r,e):{...r,...e},a={...e.initialState??{}};n._features.forEach(e=>{a=(e.getInitialState==null?void 0:e.getInitialState(a))??a});let o=[],s=!1,c={_features:t,options:{...r,...e},initialState:a,_queue:e=>{o.push(e),s||(s=!0,Promise.resolve().then(()=>{for(;o.length;)o.shift()();s=!1}).catch(e=>setTimeout(()=>{throw e})))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{n.options=i(ca(e,n.options))},getState:()=>n.options.state,setState:e=>{n.options.onStateChange==null||n.options.onStateChange(e)},_getRowId:(e,t,r)=>(n.options.getRowId==null?void 0:n.options.getRowId(e,t,r))??`${r?[r.id,t].join(`.`):t}`,getCoreRowModel:()=>(n._getCoreRowModel||=n.options.getCoreRowModel(n),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(e,t)=>{let r=(t?n.getPrePaginationRowModel():n.getRowModel()).rowsById[e];if(!r&&(r=n.getCoreRowModel().rowsById[e],!r))throw Error();return r},_getDefaultColumnDef:z(()=>[n.options.defaultColumn],e=>(e??={},{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t;return((t=e.renderValue())==null||t.toString==null?void 0:t.toString())??null},...n._features.reduce((e,t)=>Object.assign(e,t.getDefaultColumnDef==null?void 0:t.getDefaultColumnDef()),{}),...e}),B(e,`debugColumns`,`_getDefaultColumnDef`)),_getColumnDefs:()=>n.options.columns,getAllColumns:z(()=>[n._getColumnDefs()],e=>{let t=function(e,r,i){return i===void 0&&(i=0),e.map(e=>{let a=ma(n,e,i,r),o=e;return a.columns=o.columns?t(o.columns,a,i+1):[],a})};return t(e)},B(e,`debugColumns`,`getAllColumns`)),getAllFlatColumns:z(()=>[n.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),B(e,`debugColumns`,`getAllFlatColumns`)),_getAllFlatColumnsById:z(()=>[n.getAllFlatColumns()],e=>e.reduce((e,t)=>(e[t.id]=t,e),{}),B(e,`debugColumns`,`getAllFlatColumnsById`)),getAllLeafColumns:z(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),B(e,`debugColumns`,`getAllLeafColumns`)),getColumn:e=>n._getAllFlatColumnsById()[e]};Object.assign(n,c);for(let e=0;e<n._features.length;e++){let t=n._features[e];t==null||t.createTable==null||t.createTable(n)}return n}function So(){return e=>z(()=>[e.options.data],t=>{let n={rows:[],flatRows:[],rowsById:{}},r=function(t,i,a){i===void 0&&(i=0);let o=[];for(let c=0;c<t.length;c++){let l=ya(e,e._getRowId(t[c],c,a),t[c],c,i,void 0,a?.id);if(n.flatRows.push(l),n.rowsById[l.id]=l,o.push(l),e.options.getSubRows){var s;l.originalSubRows=e.options.getSubRows(t[c],c),(s=l.originalSubRows)!=null&&s.length&&(l.subRows=r(l.originalSubRows,i+1,l))}}return o};return n.rows=r(t),n},B(e.options,`debugTable`,`getRowModel`,()=>e._autoResetPageIndex()))}function Co(e,t){return e?wo(e)?v.createElement(e,t):e:null}function wo(e){return To(e)||typeof e==`function`||Eo(e)}function To(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Eo(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}function Do(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=v.useState(()=>({current:xo(t)})),[r,i]=v.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),e.onStateChange==null||e.onStateChange(t)}})),n.current}var Oo=`fcm.columnSizing.v1`,ko=1200;function Ao(e){if(!e||typeof e!=`object`||Array.isArray(e))return{};let t={};for(let[n,r]of Object.entries(e))typeof r==`number`&&Number.isFinite(r)&&r>0&&(t[n]=r);return t}function jo(e,t=24,n=ko){let r={};for(let[i,a]of Object.entries(e||{}))typeof a!=`number`||!Number.isFinite(a)||(r[i]=Math.max(t,Math.min(n,Math.round(a))));return r}function Mo(e,t,n){return{...e||{},...t||{},...n||{}}}function No(e,t){if(!e||!t)return!1;for(let n of Object.keys(e))if(e[n]!==t[n])return!0;return!1}function Po(e,t,n={}){if(!e||typeof e.getItem!=`function`)return n;let r;try{r=e.getItem(t)}catch{return n}if(!r)return n;let i;try{i=JSON.parse(r)}catch{return n}return Ao(i)}function Fo(e,t,n){if(!e||typeof e.setItem!=`function`)return!1;try{return e.setItem(t,JSON.stringify(n)),!0}catch{return!1}}function Io(e,t){if(!e||typeof e.removeItem!=`function`)return!1;try{return e.removeItem(t),!0}catch{return!1}}function Lo(e){let t=(0,v.useRef)(e);t.current=e;let[n,r]=(0,v.useState)(()=>typeof window>`u`?{...e}:Mo(e,Po(window.localStorage,Oo,{}),{})),i=(0,v.useRef)(n);return i.current=n,(0,v.useEffect)(()=>{if(!(typeof window>`u`||!window.localStorage)){if(!No(n,t.current)){Io(window.localStorage,Oo);return}Fo(window.localStorage,Oo,n)}},[n]),(0,v.useEffect)(()=>{if(typeof window>`u`||!window.addEventListener)return;let e=e=>{if(e.key!==`fcm.columnSizing.v1`)return;let n=Po(window.localStorage,Oo,{});r(e=>Mo(t.current,n,e))};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),{columnSizing:n,setColumnSizing:(0,v.useCallback)(e=>{r(t=>{let n=typeof e==`function`?e(t):e;return{...t,...jo(n)}})},[]),resetColumnSizing:(0,v.useCallback)(()=>{r({...t.current})},[]),hasCustomSizing:No(n,t.current)}}var Ro={mood:`_mood_f9he5_1`},zo={Perfect:`🟩`,Normal:`🟢`,Spiky:`🟡`,Slow:`🟠`,"Very Slow":`🔴`,Overloaded:`🔥`,Unstable:`🟥`,"Not Active":`⚫`,Pending:`⏳`,Usable:`🟠`};function Bo({verdict:e}){let t=zo[e]||`❔`;return(0,F.jsx)(`span`,{className:Ro.mood,children:t})}var Vo={badge:`_badge_5yv5w_1`,tier_splus:`_tier_splus_5yv5w_11`,tier_s:`_tier_s_5yv5w_11`,tier_aplus:`_tier_aplus_5yv5w_13`,tier_a:`_tier_a_5yv5w_13`,tier_aminus:`_tier_aminus_5yv5w_15`,tier_bplus:`_tier_bplus_5yv5w_16`,tier_b:`_tier_b_5yv5w_16`,tier_c:`_tier_c_5yv5w_18`};function Ho({tier:e}){let t=e.replace(`+`,`plus`).replace(`-`,`minus`).toLowerCase();return(0,F.jsx)(`span`,{className:`${Vo.badge} ${Vo[`tier_${t}`]}`,children:e})}var Uo={dot:`_dot_729ui_1`,up:`_up_729ui_9`,down:`_down_729ui_10`,timeout:`_timeout_729ui_11`,pending:`_pending_729ui_12`,pulse:`_pulse_729ui_1`,notInSet:`_notInSet_729ui_16`};function Wo({status:e,inRouterSet:t=!0}){let n=e===`up`?Uo.up:e===`timeout`?Uo.timeout:e===`down`?Uo.down:e===`pending`&&!t?Uo.notInSet:Uo.pending;return(0,F.jsx)(`span`,{className:`${Uo.dot} ${n}`})}var Go={cell:`_cell_ptyq8_1`,value:`_value_ptyq8_10`,fast:`_fast_ptyq8_11`,medium:`_medium_ptyq8_12`,slow:`_slow_ptyq8_13`,none:`_none_ptyq8_14`,spinner:`_spinner_ptyq8_26`,pingRing:`_pingRing_ptyq8_1`,pingPulse:`_pingPulse_ptyq8_1`};function Ko(e){return e==null||e===1/0?Go.none:e<500?Go.fast:e<1500?Go.medium:Go.slow}function qo({ms:e,isPinging:t}){return e==null?(0,F.jsx)(`span`,{className:`${Go.cell} ${Go.none}`,children:t?(0,F.jsx)(`span`,{className:Go.spinner,title:`Testing…`}):`—`}):(0,F.jsxs)(`span`,{className:`${Go.cell} ${Ko(e)}`,children:[(0,F.jsx)(`span`,{className:Go.value,children:e}),t&&(0,F.jsx)(`span`,{className:Go.spinner})]})}var Jo={wrapper:`_wrapper_1t2v0_7`,key:`_key_1t2v0_17`,slash:`_slash_1t2v0_24`};function Yo({size:e=14,title:t=`No API key configured`}){let n=Math.max(1,Math.round(e*.07));return(0,F.jsxs)(`span`,{className:Jo.wrapper,style:{width:`${e}px`,height:`${e}px`},role:`img`,"aria-label":t,title:t,children:[(0,F.jsx)(xr,{size:e,stroke:1.5,className:Jo.key}),(0,F.jsx)(`svg`,{className:Jo.slash,width:e+n*2,height:e+n*2,viewBox:`0 0 ${e+n*2} ${e+n*2}`,"aria-hidden":`true`,focusable:`false`,children:(0,F.jsx)(`line`,{x1:n+1,y1:n+1,x2:n+e-1,y2:n+e-1,stroke:`var(--color-danger, #ff4444)`,strokeWidth:`1.1`,strokeLinecap:`round`})})]})}var Xo={cell:`_cell_8296g_7`,up:`_up_8296g_19`,warning:`_warning_8296g_20`,error:`_error_8296g_21`,errorBold:`_errorBold_8296g_22`,dim:`_dim_8296g_23`,notInSet:`_notInSet_8296g_26`,noKey:`_noKey_8296g_33`,noKeyText:`_noKeyText_8296g_43`},Zo=12,Qo=1.8,$o={success:`var(--color-success, #00ff88)`,warning:`var(--color-warning, #ffaa00)`,danger:`var(--color-danger, #ff4444)`,dim:`var(--color-text-dim, #444)`},es={404:`404 NOT FOUND`,410:`410 GONE`,429:`429 TRY LATER`,500:`500 ERROR`,502:`502 ERROR`,503:`503 ERROR`,504:`504 TIMEOUT`},ts={429:{Icon:hr,color:$o.danger},404:{Icon:lr,color:$o.danger},500:{Icon:zn,color:$o.danger},502:{Icon:Mr,color:$o.danger},503:{Icon:ir,color:$o.danger},504:{Icon:rr,color:$o.danger}};function ns(e,t,n){return e===`noauth`?`NO KEY`:e===`auth_error`?`AUTH FAIL`:e===`pending`?n?`wait`:`NOT IN SET`:e===`timeout`?`TIMEOUT`:e===`down`?es[t]||t||`ERROR`:e===`up`?`UP`:`?`}function rs(e,t){return e===`noauth`?Xo.noKey:e===`up`?Xo.up:e===`down`?Xo.error:e===`timeout`?Xo.warning:e===`auth_error`?Xo.errorBold:e===`pending`?t?Xo.warning:Xo.notInSet:Xo.dim}function is({status:e,httpCode:t,inRouterSet:n=!0}){let r=ns(e,t,n),i=rs(e,n),a=e===`noauth`,o=e===`pending`&&!n,s=null,c=null;return e===`up`?(s=Yn,c=$o.success):e===`timeout`?(s=yr,c=$o.warning):o?(s=tr,c=$o.dim):e===`pending`?(s=br,c=$o.warning):e===`auth_error`?(s=Tr,c=$o.danger):e===`down`&&ts[t]?(s=ts[t].Icon,c=ts[t].color):e===`down`&&(s=Gn,c=$o.danger),(0,F.jsxs)(`span`,{className:`${Xo.cell} ${i}`,children:[a?(0,F.jsx)(Yo,{size:15,title:`No API key configured for this provider`}):s?(0,F.jsx)(s,{size:Zo,stroke:Qo,style:{color:c,flexShrink:0},"aria-hidden":`true`}):null,(0,F.jsx)(`span`,{className:a?Xo.noKeyText:void 0,children:r})]})}var as={cell:`_cell_18ls4_1`,bar:`_bar_18ls4_2`,fill:`_fill_18ls4_3`,high:`_high_18ls4_4`,mid:`_mid_18ls4_5`,low:`_low_18ls4_6`,value:`_value_18ls4_7`,none:`_none_18ls4_8`};function os({score:e}){if(e==null||e<0)return(0,F.jsx)(`span`,{className:as.none,children:`—`});let t=e>=70?`high`:e>=40?`mid`:`low`;return(0,F.jsxs)(`div`,{className:as.cell,children:[(0,F.jsx)(`div`,{className:as.bar,children:(0,F.jsx)(`div`,{className:`${as.fill} ${as[t]}`,style:{width:`${e}%`}})}),(0,F.jsx)(`span`,{className:as.value,children:e})]})}var ss={badge:`_badge_5z8g9_5`,emoji:`_emoji_5z8g9_16`,text:`_text_5z8g9_17`,perfect:`_perfect_5z8g9_20`,normal:`_normal_5z8g9_21`,slow:`_slow_5z8g9_22`,spiky:`_spiky_5z8g9_23`,veryslow:`_veryslow_5z8g9_24`,overloaded:`_overloaded_5z8g9_25`,unstable:`_unstable_5z8g9_26`,notactive:`_notactive_5z8g9_27`,pending:`_pending_5z8g9_28`},cs={Perfect:{emoji:`🟩`,text:`Perfect`,cls:`perfect`},Normal:{emoji:`🟢`,text:`Normal`,cls:`normal`},Spiky:{emoji:`🟡`,text:`Spiky`,cls:`spiky`},Slow:{emoji:`🟠`,text:`Slow`,cls:`slow`},"Very Slow":{emoji:`🔴`,text:`Very Slow`,cls:`veryslow`},Overloaded:{emoji:`🔥`,text:`Overloaded`,cls:`overloaded`},Unstable:{emoji:`🟥`,text:`Unstable`,cls:`unstable`},"Not Active":{emoji:`⚫`,text:`Not Active`,cls:`notactive`},Pending:{emoji:`⏳`,text:`Pending`,cls:`pending`}},ls={emoji:`❔`,text:`Pending`,cls:`pending`};function us({verdict:e,httpCode:t}){let n=e?cs[e]||{emoji:`❔`,text:e,cls:`pending`}:ls;return(0,F.jsxs)(`span`,{className:`${ss.badge} ${ss[n.cls]}`,children:[(0,F.jsx)(`span`,{className:ss.emoji,children:n.emoji}),(0,F.jsx)(`span`,{className:ss.text,children:n.text})]})}function ds(e,t){return typeof window>`u`||!window.document?.documentElement?t:getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t}function fs(e){return e<500?ds(`--color-success`,`#00ff88`):e<1500?ds(`--color-warning`,`#ffaa00`):ds(`--color-danger`,`#ff4444`)}function ps({history:e}){return(0,v.useMemo)(()=>{if(!e||e.length<2)return null;let t=e.filter(e=>e.code===`200`||e.code===`401`);if(t.length<2)return null;let n=t.map(e=>e.ms),r=Math.max(...n,1),i=Math.min(...n,0),a=r-i||1,o=80/(n.length-1),s=n.map((e,t)=>{let n=t*o,r=22-(e-i)/a*18-2;return`${n.toFixed(1)},${r.toFixed(1)}`}).join(` `),c=n[n.length-1],l=fs(c),u=((n.length-1)*o).toFixed(1),d=(22-(c-i)/a*18-2).toFixed(1);return(0,F.jsxs)(`svg`,{className:`sparkline-svg`,width:80,height:22,viewBox:`0 0 80 22`,children:[(0,F.jsx)(`polyline`,{fill:`none`,stroke:l,strokeWidth:`1.5`,strokeLinejoin:`round`,strokeLinecap:`round`,points:s,opacity:`0.85`}),(0,F.jsx)(`circle`,{cx:u,cy:d,r:`2.5`,fill:l})]})},[e])||null}var ms={cell:`_cell_c8a3q_1`,value:`_value_c8a3q_13`,fast:`_fast_c8a3q_14`,medium:`_medium_c8a3q_15`,slow:`_slow_c8a3q_16`,dim:`_dim_c8a3q_17`,running:`_running_c8a3q_18`,badge:`_badge_c8a3q_19`,runningCell:`_runningCell_c8a3q_22`,benchmarkSpinner:`_benchmarkSpinner_c8a3q_34`,benchSpin:`_benchSpin_c8a3q_1`,benchPulse:`_benchPulse_c8a3q_1`};function hs(e,t){if(t)return{text:`RUN`,badge:``};if(!e||!e.ok)return{text:e?.code||`—`,badge:``};let n=e.totalMs/1e3,r=e.retries>0?`↻${e.retries}`:``;return{text:n>=10?`${n.toFixed(0)}s`:`${n.toFixed(1)}s`,badge:r}}function gs({result:e,isRunning:t}){let{text:n,badge:r}=hs(e,t),i=e?.ok?ms.fast:e?ms.slow:ms.dim;return(0,F.jsx)(`span`,{className:`${ms.cell} ${t?ms.runningCell:``}`,children:t?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:ms.benchmarkSpinner}),(0,F.jsx)(`span`,{className:`${ms.value} ${ms.running}`,children:n})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`${ms.value} ${i}`,children:n}),r&&(0,F.jsx)(`span`,{className:ms.badge,children:r})]})})}var _s={cell:`_cell_1bcec_1`,value:`_value_1bcec_13`,fast:`_fast_1bcec_14`,slow:`_slow_1bcec_15`,dim:`_dim_1bcec_16`,running:`_running_1bcec_17`,badge:`_badge_1bcec_18`,runningCell:`_runningCell_1bcec_21`,miniSpinner:`_miniSpinner_1bcec_29`,miniSpin:`_miniSpin_1bcec_29`};function vs(e,t){if(t)return{text:`…`,badge:``};if(!e||!e.ok)return{text:`—`,badge:``};let n=e.retries>0?`↻${e.retries}`:``;return{text:String(Math.round(e.tokensPerSecond??0)),badge:n}}function ys({result:e,isRunning:t}){let{text:n,badge:r}=vs(e,t),i=e?.ok?_s.fast:e?_s.slow:_s.dim;return(0,F.jsx)(`span`,{className:`${_s.cell} ${t?_s.runningCell:``}`,children:t?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:_s.miniSpinner}),(0,F.jsx)(`span`,{className:`${_s.value} ${_s.running}`,children:n})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`${_s.value} ${i}`,children:n}),r&&(0,F.jsx)(`span`,{className:_s.badge,children:r})]})})}var bs={button:`_button_5uv8q_2`,icon:`_icon_5uv8q_24`};function xs({model:e,toolMode:t=`opencode`,onLaunch:n,variant:r=`default`,disabled:i=!1}){let a=yn(t),o=r===`icon`?`Install endpoint`:`Install endpoint in ${a.emoji} ${a.label}`;return(0,F.jsxs)(`button`,{type:`button`,className:`${bs.button} ${bs[r]||``}`,disabled:i||!e,onClick:t=>{t.stopPropagation(),e&&n?.(e)},title:e?`Install ${e.label} endpoint in ${a.label}`:`Select a model first`,"aria-label":e?`Install ${e.label} endpoint in ${a.label}`:`Install selected model endpoint`,children:[(0,F.jsx)(jr,{size:r===`icon`?13:14,stroke:1.8}),r!==`icon`&&(0,F.jsx)(`span`,{children:o})]})}var H={root:`_root_1fq95_12`,transcript:`_transcript_1fq95_21`,full:`_full_1fq95_30`,mini:`_mini_1fq95_34`,empty:`_empty_1fq95_40`,emptyIcon:`_emptyIcon_1fq95_57`,emptyTitle:`_emptyTitle_1fq95_62`,emptyHint:`_emptyHint_1fq95_72`,suggestions:`_suggestions_1fq95_93`,message:`_message_1fq95_102`,msgIn:`_msgIn_1fq95_1`,user:`_user_1fq95_120`,assistant:`_assistant_1fq95_125`,bubbleRow:`_bubbleRow_1fq95_130`,role:`_role_1fq95_137`,copyBtn:`_copyBtn_1fq95_145`,bubble:`_bubble_1fq95_130`,typing:`_typing_1fq95_192`,codeBlock:`_codeBlock_1fq95_198`,cursor:`_cursor_1fq95_211`,blink:`_blink_1fq95_1`,meta:`_meta_1fq95_227`,metaChip:`_metaChip_1fq95_242`,target:`_target_1fq95_255`,modelChip:`_modelChip_1fq95_261`,latencyChip:`_latencyChip_1fq95_266`,tpsChip:`_tpsChip_1fq95_271`,errorChip:`_errorChip_1fq95_276`,inputBar:`_inputBar_1fq95_282`,input:`_input_1fq95_282`,sendBtn:`_sendBtn_1fq95_333`,stopBtn:`_stopBtn_1fq95_334`,spin:`_spin_1fq95_376`};function Ss(e){if(!e)return null;let t=e.indexOf(`/`);return t<=0?{provider:e,model:``}:{provider:e.slice(0,t),model:e.slice(t+1)}}function Cs(e){return!e||typeof e!=`object`?typeof e==`string`?e:null:typeof e.error==`string`?e.error:e.error&&typeof e.error==`object`&&typeof e.error.message==`string`?e.error.message:typeof e.message==`string`?e.message:null}function ws(e){return e?e.split(/(```[\s\S]*?```)/g).map((e,t)=>{let n=e.match(/^```([a-zA-Z0-9_-]+)?\n?([\s\S]*?)```$/);return n?(0,F.jsx)(`pre`,{className:H.codeBlock,children:(0,F.jsx)(`code`,{children:n[2].replace(/\n$/,``)})},t):(0,F.jsx)(`span`,{children:e},t)}):null}function Ts(e){return Number.isFinite(e)?(Math.round(e*10)/10).toFixed(1):`—`}var Es=(0,v.forwardRef)(function({model:e,disabled:t=!1,variant:n=`mini`,stream:r=!0,placeholder:i,targetLabel:a,suggestions:o=[],emptyTitle:s,emptyHint:c,emptyIcon:l,children:u,onTurnComplete:d},f){let[p,m]=(0,v.useState)([]),[h,g]=(0,v.useState)(``),[_,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(null),S=(0,v.useRef)(null),C=(0,v.useRef)(null),w=(0,v.useRef)(null),ee=(0,v.useRef)([]);(0,v.useImperativeHandle)(f,()=>({clear:()=>{S.current&&=(S.current.abort(),null),y(!1),m([])},focus:()=>C.current?.focus(),getMessages:()=>ee.current}),[]),(0,v.useEffect)(()=>{ee.current=p},[p]),(0,v.useEffect)(()=>{if(typeof d!=`function`)return;let e=p[p.length-1];if(!e||e.pending||!(e.role===`assistant`&&(e.meta||e.error||e.aborted)))return;let t=p.reduce((e,t)=>e+(t.meta?.tokens||0),0);d({count:p.length,totalTokens:t,lastMeta:e.meta})},[p,d]),(0,v.useEffect)(()=>{let e=w.current;e&&(e.scrollTop=e.scrollHeight)},[p,_]);let T=(0,v.useCallback)(()=>{S.current&&=(S.current.abort(),null),y(!1)},[]),E=(0,v.useCallback)(async n=>{let i=(typeof n==`string`?n:h).trim();if(!i||_||t)return;g(``);let o=a||(e===`fcm`?`fcm`:e),s={id:`u-${Date.now()}`,role:`user`,content:i,ts:Date.now(),target:o},c=`a-${Date.now()}`,l={id:c,role:`assistant`,content:``,pending:!0},u=[...p,s];m([...u,l]),y(!0);let d=new AbortController;S.current=d;let f=Date.now(),v=e=>m(t=>t.map(t=>t.id===c?{...t,...e}:t)),b=null,x=t=>(b=t.headers.get(`x-fcm-router-model`)||(e===`fcm`?null:e),Ss(b)||{provider:e,model:``}),C={model:e||`fcm`,messages:u.map(({role:e,content:t})=>({role:e,content:t})),stream:r,temperature:.7};try{let e=await fetch(`/api/playground/chat`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(C),signal:d.signal});if(!e.ok){v({pending:!1,error:Cs(await e.json().catch(()=>null))||`Request failed (${e.status})`});return}if(r){let t=e.body?.getReader();if(!t)throw Error(`No stream reader available`);let n=new TextDecoder,r=``,i=``,a=x(e),o=0,s=!!b;for(;;){let{value:e,done:c}=await t.read();if(c)break;r+=n.decode(e,{stream:!0});let l=r.split(/\n\n/);r=l.pop()||``;for(let e of l){let t=e.split(/\n/);for(let e of t){if(!e.startsWith(`data:`))continue;let t=e.slice(5).trim();if(t!==`[DONE]`)try{let e=JSON.parse(t),n=e?.choices?.[0]?.delta?.content;typeof n==`string`&&n&&(i+=n,v({content:i,pending:!1}));let r=e?.usage;r&&(typeof r.completion_tokens==`number`?o=r.completion_tokens:typeof r.total_tokens==`number`&&(o=r.total_tokens)),!s&&e?.x_routed_via&&(a={provider:e.x_routed_via,model:e.x_routed_model||``},s=!0)}catch{}}}}let c=Date.now()-f,l=o>0&&c>0?o/(c/1e3):null;v({pending:!1,meta:{provider:a.provider,model:a.model,latencyMs:c,tokens:o,tps:l}})}else{let t=await e.json().catch(()=>null),n=t?.choices?.[0]?.message?.content||``,r=t?.usage||{},i=typeof r.completion_tokens==`number`?r.completion_tokens:r.total_tokens||0,a=x(e),o=Date.now()-f,s=i>0&&o>0?i/(o/1e3):null;v({pending:!1,content:n,meta:{provider:a.provider,model:a.model,latencyMs:o,tokens:i,tps:s}})}}catch(e){e?.name===`AbortError`?v({pending:!1,aborted:!0}):v({pending:!1,error:e?.message||String(e)})}finally{y(!1),S.current=null}},[h,_,t,p,e,r,a,d]),D=(0,v.useCallback)(e=>{(e.key===`Enter`&&!e.shiftKey&&n===`full`||e.key===`Enter`&&n===`mini`)&&(e.preventDefault(),E())},[E,n]),O=(0,v.useCallback)(async(e,t)=>{try{await navigator.clipboard.writeText(t||``),x(e),setTimeout(()=>x(null),1500)}catch{}},[]),te=(0,v.useCallback)(e=>{if(g(e.target.value),n===`full`){let t=e.target;t.style.height=`auto`,t.style.height=`${Math.min(t.scrollHeight,180)}px`}},[n]),ne=n===`full`?H.full:H.mini;return(0,F.jsxs)(`div`,{className:`${H.root} ${ne}`,children:[u,(0,F.jsx)(`div`,{className:H.transcript,ref:w,children:p.length===0?(0,F.jsxs)(`div`,{className:H.empty,children:[l&&(0,F.jsx)(`div`,{className:H.emptyIcon,children:l}),s&&(0,F.jsx)(`div`,{className:H.emptyTitle,children:s}),c&&(0,F.jsx)(`div`,{className:H.emptyHint,children:c}),o.length>0&&(0,F.jsx)(`div`,{className:H.suggestions,children:o.map(e=>(0,F.jsx)(`button`,{className:H.chip,onClick:()=>void E(e),type:`button`,children:e},e))})]}):p.map((e,t)=>(0,F.jsxs)(`div`,{className:`${H.message} ${H[e.role]||``}`,children:[(0,F.jsxs)(`div`,{className:H.bubbleRow,children:[(0,F.jsx)(`span`,{className:H.role,children:e.role}),e.role===`assistant`&&e.content&&(0,F.jsx)(`button`,{className:H.copyBtn,onClick:()=>O(t,e.content),title:`Copy reply`,type:`button`,children:b===t?(0,F.jsx)(Jn,{size:11}):(0,F.jsx)(or,{size:11})})]}),(0,F.jsx)(`div`,{className:H.bubble,children:e.role===`assistant`?(0,F.jsxs)(F.Fragment,{children:[e.content?ws(e.content):null,_&&t===p.length-1&&e.pending&&!e.aborted&&(0,F.jsx)(`span`,{className:H.cursor}),!e.content&&e.pending&&(0,F.jsx)(`span`,{className:H.typing,children:`…`})]}):e.content}),e.role===`user`&&e.target&&(0,F.jsx)(`div`,{className:H.meta,children:(0,F.jsxs)(`span`,{className:`${H.metaChip} ${H.target}`,title:`Addressed model`,children:[(0,F.jsx)(Kn,{size:11}),e.target]})}),e.role===`assistant`&&!e.pending&&e.meta&&(0,F.jsxs)(`div`,{className:H.meta,children:[e.meta.provider&&(0,F.jsxs)(`span`,{className:`${H.metaChip} ${H.modelChip}`,title:`Model that served this reply`,children:[(0,F.jsx)(Kn,{size:11}),e.meta.provider,e.meta.model?`/${e.meta.model}`:``]}),e.meta.latencyMs!=null&&(0,F.jsxs)(`span`,{className:`${H.metaChip} ${H.latencyChip}`,title:`Response time (send → end)`,children:[(0,F.jsx)(rr,{size:11}),Math.round(e.meta.latencyMs),`ms`]}),e.meta.tokens>0&&(0,F.jsxs)(`span`,{className:H.metaChip,title:`Completion tokens`,children:[e.meta.tokens,` tok`]}),e.meta.tps!=null&&e.meta.tps>0&&(0,F.jsxs)(`span`,{className:`${H.metaChip} ${H.tpsChip}`,title:`Tokens per second`,children:[(0,F.jsx)(Fr,{size:11}),Ts(e.meta.tps),` t/s`]})]}),e.role===`assistant`&&e.error&&(0,F.jsx)(`div`,{className:H.meta,children:(0,F.jsxs)(`span`,{className:`${H.metaChip} ${H.errorChip}`,title:`Error`,children:[(0,F.jsx)(Bn,{size:11}),e.error]})}),e.role===`assistant`&&e.aborted&&!e.error&&(0,F.jsx)(`div`,{className:H.meta,children:(0,F.jsx)(`span`,{className:H.metaChip,children:`stopped`})})]},e.id||t))}),(0,F.jsxs)(`div`,{className:H.inputBar,children:[(0,F.jsx)(`textarea`,{ref:C,className:H.input,placeholder:i||(n===`full`?`Ask anything. Enter to send, Shift+Enter for a newline.`:`Send a message…`),value:h,onChange:te,onKeyDown:D,disabled:t,rows:1}),_?(0,F.jsxs)(`button`,{className:H.stopBtn,onClick:T,title:`Stop generating`,type:`button`,children:[(0,F.jsx)(wr,{size:14,className:H.spin}),n===`full`?`Stop`:``]}):(0,F.jsxs)(`button`,{className:H.sendBtn,onClick:()=>void E(),disabled:t||!h.trim(),title:`Send`,type:`button`,children:[(0,F.jsx)(Rr,{size:14}),n===`full`?`Send`:``]})]})]})}),U={row:`_row_15axt_10`,slideDown:`_slideDown_15axt_1`,grid:`_grid_15axt_29`,col:`_col_15axt_37`,colTitle:`_colTitle_15axt_43`,statGrid:`_statGrid_15axt_53`,statItem:`_statItem_15axt_59`,statLabel:`_statLabel_15axt_65`,statValue:`_statValue_15axt_73`,infoActions:`_infoActions_15axt_82`,favBtn:`_favBtn_15axt_90`,favBtnActive:`_favBtnActive_15axt_109`,playgroundHeader:`_playgroundHeader_15axt_119`,playgroundWrap:`_playgroundWrap_15axt_128`,inputRow:`_inputRow_15axt_135`,inputField:`_inputField_15axt_140`,sendBtn:`_sendBtn_15axt_163`,responseArea:`_responseArea_15axt_188`,responsePlaceholder:`_responsePlaceholder_15axt_205`,benchBtn:`_benchBtn_15axt_211`,metricsGrid:`_metricsGrid_15axt_244`,metricCard:`_metricCard_15axt_250`,metricLabel:`_metricLabel_15axt_260`,metricValue:`_metricValue_15axt_268`,streamText:`_streamText_15axt_275`,progressBar:`_progressBar_15axt_291`,progressFill:`_progressFill_15axt_299`,sweHigh:`_sweHigh_15axt_307`,sweMid:`_sweMid_15axt_308`,sweLow:`_sweLow_15axt_309`,pingFast:`_pingFast_15axt_314`,pingMedium:`_pingMedium_15axt_315`,pingSlow:`_pingSlow_15axt_316`,pingNone:`_pingNone_15axt_317`,noKeyBanner:`_noKeyBanner_15axt_323`,noKeyIcon:`_noKeyIcon_15axt_336`,spinning:`_spinning_15axt_342`,spin:`_spin_15axt_342`};function Ds({label:e,children:t}){return(0,F.jsxs)(`div`,{className:U.statItem,children:[(0,F.jsx)(`span`,{className:U.statLabel,children:e}),(0,F.jsx)(`span`,{className:U.statValue,children:t})]})}function Os({model:e,favorites:t,onBenchmark:n,onLaunch:r,onToast:i,toolMode:a=`opencode`,onSetToolMode:o,onCycleToolMode:s,onOpenFallback:c}){let[l,u]=(0,v.useState)(`idle`),[d,f]=(0,v.useState)({latency:null,tokens:null,tps:null}),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(0),_=(0,v.useRef)(null);if(!e)return null;let y=t?.isFavorite(e)??!1,b=Ht(e.avg),x=b.cls||Ut(e.avg),S=(0,v.useCallback)(async()=>{if(l===`running`)return;u(`running`),f({latency:null,tokens:null,tps:null}),m(``),g(0),_.current&&_.current.abort();let t=new AbortController;_.current=t;try{let n=await fetch(`/api/benchmark-stream`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerKey:e.providerKey,modelId:e.modelId}),signal:t.signal});if(!n.ok){let e=await n.text().catch(()=>`HTTP ${n.status}`);u(`error`),m(`Error: ${e}`);return}let r=n.body.getReader(),i=new TextDecoder,a=``,o=``;for(;;){let{done:e,value:t}=await r.read();if(e)break;a+=i.decode(t,{stream:!0});let n=a.split(`
38
+ `);a=n.pop()||``;for(let e of n){let t=e.trim();if(t&&!t.startsWith(`event: `)&&t.startsWith(`data: `)){let e=t.slice(6).trim();try{let t=JSON.parse(e),n=t.type||t.event;n===`token`||t.token!==void 0?(t.text&&(o+=t.text,m(o)),t.totalMs!=null&&f(e=>({...e,latency:(t.totalMs/1e3).toFixed(2)})),t.tokens!=null&&(f(e=>({...e,tokens:t.tokens})),g(Math.min(100,Math.round(t.tokens/140*100)))),t.tps!=null&&f(e=>({...e,tps:t.tps.toFixed(1)}))):n===`done`?(t.totalMs!=null&&f(e=>({...e,latency:(t.totalMs/1e3).toFixed(2)})),t.outputTokens!=null&&f(e=>({...e,tokens:t.outputTokens})),t.tokensPerSecond!=null&&f(e=>({...e,tps:t.tokensPerSecond.toFixed(1)})),g(100),u(`done`)):n===`error`&&(u(`error`),m(t.message||t.error||`Unknown error`))}catch{}}}}}catch(e){e.name!==`AbortError`&&(u(`error`),m(`Error: ${e.message}`))}finally{l===`running`&&u(`done`),_.current=null}},[l,e.providerKey,e.modelId]);return e.hasApiKey?(0,F.jsx)(`div`,{className:U.row,children:(0,F.jsxs)(`div`,{className:U.grid,children:[(0,F.jsxs)(`div`,{className:U.col,children:[(0,F.jsx)(`div`,{className:U.colTitle,children:`📊 Model Info`}),(0,F.jsxs)(`div`,{className:U.statGrid,children:[(0,F.jsx)(Ds,{label:`Tier`,children:(0,F.jsx)(Ho,{tier:e.tier})}),(0,F.jsx)(Ds,{label:`SWE-bench`,children:(0,F.jsx)(`span`,{className:U[Vt(e.sweScore)],children:e.sweScore||`—`})}),(0,F.jsx)(Ds,{label:`Context`,children:e.ctx||`—`}),(0,F.jsx)(Ds,{label:`Provider`,children:e.origin}),(0,F.jsxs)(Ds,{label:`Status`,children:[(0,F.jsx)(Wo,{status:e.status}),(0,F.jsx)(`span`,{style:{fontSize:11},children:e.status})]}),(0,F.jsx)(Ds,{label:`Avg Ping`,children:(0,F.jsx)(`span`,{className:U[x],children:b.text})}),(0,F.jsx)(Ds,{label:`Stability`,children:(0,F.jsx)(os,{score:e.stability})}),(0,F.jsx)(Ds,{label:`Verdict`,children:(0,F.jsx)(us,{verdict:e.verdict,httpCode:e.httpCode})}),(0,F.jsx)(Ds,{label:`Uptime`,children:e.uptime>0?`${e.uptime}%`:`—`})]}),(0,F.jsxs)(`div`,{className:U.infoActions,children:[t&&(0,F.jsxs)(`button`,{className:`${U.favBtn} ${y?U.favBtnActive:``}`,onClick:()=>t.toggle(e),title:y?`Unfavorite ${e.label}`:`Favorite ${e.label}`,children:[y?(0,F.jsx)(Zr,{size:13,stroke:1.5}):(0,F.jsx)(Vr,{size:13,stroke:1.5}),(0,F.jsx)(`span`,{children:y?`Favorited`:`Favorite`})]}),r&&(0,F.jsx)(xs,{model:e,toolMode:a,onLaunch:r,variant:`default`})]})]}),(0,F.jsxs)(`div`,{className:U.col,children:[(0,F.jsxs)(`div`,{className:U.playgroundHeader,children:[`💬 Mini Playground — `,e.label]}),(0,F.jsx)(`div`,{className:U.playgroundWrap,children:(0,F.jsx)(Es,{model:`${e.providerKey}/${e.modelId}`,variant:`mini`,disabled:!e.hasApiKey,placeholder:`Type a message…`,emptyTitle:`Test ${e.label}`,emptyHint:`Send a message to test this model. Responses stream in real time with latency + TPS.`})})]}),(0,F.jsxs)(`div`,{className:U.col,children:[(0,F.jsxs)(`button`,{className:U.benchBtn,onClick:S,disabled:l===`running`,title:l===`running`?`Running benchmark…`:`Test AI Latency`,children:[l===`running`?(0,F.jsx)(wr,{size:13,stroke:1.8,className:U.spinning}):(0,F.jsx)(Xr,{size:13,stroke:1.8}),(0,F.jsx)(`span`,{children:l===`running`?`Running…`:`Test AI Latency`})]}),(0,F.jsxs)(`div`,{className:U.metricsGrid,children:[(0,F.jsxs)(`div`,{className:U.metricCard,children:[(0,F.jsx)(`span`,{className:U.metricLabel,children:`Latency`}),(0,F.jsx)(`span`,{className:U.metricValue,children:d.latency==null?`—`:`${d.latency}s`})]}),(0,F.jsxs)(`div`,{className:U.metricCard,children:[(0,F.jsx)(`span`,{className:U.metricLabel,children:`Tokens`}),(0,F.jsx)(`span`,{className:U.metricValue,children:d.tokens==null?`—`:d.tokens})]}),(0,F.jsxs)(`div`,{className:U.metricCard,children:[(0,F.jsx)(`span`,{className:U.metricLabel,children:`TPS`}),(0,F.jsx)(`span`,{className:U.metricValue,children:d.tps==null?`—`:d.tps})]}),(0,F.jsxs)(`div`,{className:U.metricCard,children:[(0,F.jsx)(`span`,{className:U.metricLabel,children:`Status`}),(0,F.jsxs)(`span`,{className:U.metricValue,children:[l===`idle`&&`⏳`,l===`running`&&`⚡`,l===`done`&&`✅`,l===`error`&&`❌`]})]})]}),(0,F.jsx)(`div`,{className:U.progressBar,children:(0,F.jsx)(`div`,{className:U.progressFill,style:{width:`${h}%`}})}),(0,F.jsx)(`div`,{className:U.streamText,children:p||(0,F.jsx)(`span`,{className:U.responsePlaceholder,children:`Generated text will appear here…`})})]})]})}):(0,F.jsx)(`div`,{className:U.row,children:(0,F.jsxs)(`div`,{className:U.noKeyBanner,children:[(0,F.jsx)(`span`,{className:U.noKeyIcon,children:`🔒`}),(0,F.jsxs)(`span`,{children:[`No API key configured for `,e.origin,`. Open Settings (P) to add one.`]})]})})}var W={container:`_container_1vjc8_8`,table:`_table_1vjc8_23`,th:`_th_1vjc8_32`,thInner:`_thInner_1vjc8_59`,thLabel:`_thLabel_1vjc8_67`,resizeHandle:`_resizeHandle_1vjc8_81`,resizeHandleActive:`_resizeHandleActive_1vjc8_106`,resizeToolbar:`_resizeToolbar_1vjc8_125`,resizeToolbarHint:`_resizeToolbarHint_1vjc8_139`,resizeResetButton:`_resizeResetButton_1vjc8_150`,sortIcon:`_sortIcon_1vjc8_179`,sortIconActive:`_sortIconActive_1vjc8_180`,td:`_td_1vjc8_183`,rank1:`_rank1_1vjc8_202`,rank2:`_rank2_1vjc8_203`,rank3:`_rank3_1vjc8_204`,rankNum:`_rankNum_1vjc8_207`,swe:`_swe_1vjc8_215`,sweHigh:`_sweHigh_1vjc8_216`,sweMid:`_sweMid_1vjc8_217`,sweLow:`_sweLow_1vjc8_218`,ctx:`_ctx_1vjc8_220`,ping:`_ping_1vjc8_222`,pingFast:`_pingFast_1vjc8_223`,pingMedium:`_pingMedium_1vjc8_224`,pingSlow:`_pingSlow_1vjc8_225`,pingNone:`_pingNone_1vjc8_226`,uptime:`_uptime_1vjc8_235`,modelCell:`_modelCell_1vjc8_238`,modelMeta:`_modelMeta_1vjc8_239`,modelHeader:`_modelHeader_1vjc8_240`,modelName:`_modelName_1vjc8_241`,modelId:`_modelId_1vjc8_242`,benchRow:`_benchRow_1vjc8_253`,benchRowPulse:`_benchRowPulse_1vjc8_1`,empty:`_empty_1vjc8_271`,favBtn:`_favBtn_1vjc8_274`,favBtnActive:`_favBtnActive_1vjc8_289`,aiLatencyWrap:`_aiLatencyWrap_1vjc8_301`,aiLatencyRunning:`_aiLatencyRunning_1vjc8_312`,aiLatencyPlay:`_aiLatencyPlay_1vjc8_314`,incompatible:`_incompatible_1vjc8_323`,unusable:`_unusable_1vjc8_341`,notInSetRow:`_notInSetRow_1vjc8_350`,launchCell:`_launchCell_1vjc8_358`,expandedRow:`_expandedRow_1vjc8_371`,expandRowWrapper:`_expandRowWrapper_1vjc8_374`,expandRowCell:`_expandRowCell_1vjc8_377`},ks=sa(),As=new Set([`mood`,`idx`,`tier`,`sweScore`,`ctx`,`label`,`origin`,`latestPing`,`avg`,`condition`,`verdict`,`stability`,`uptime`,`aiLatency`,`tps`,`trend`]);function js({row:e}){return(0,F.jsx)(Bo,{verdict:e.original.verdict})}function Ms({row:e}){let t=e.original,n=!t.hasApiKey&&!t.cliOnly;return(0,F.jsxs)(`div`,{className:W.modelCell,children:[(0,F.jsx)(Wo,{status:t.status,inRouterSet:t.inRouterSet}),(0,F.jsxs)(`div`,{className:W.modelMeta,children:[(0,F.jsxs)(`div`,{className:W.modelHeader,children:[(0,F.jsx)(`span`,{className:W.modelName,children:t.label}),n&&(0,F.jsx)(Yo,{size:14,title:`No API key configured — health will stay in 'NO KEY' state`})]}),(0,F.jsx)(`div`,{className:W.modelId,children:t.modelId})]})]})}function Ns({row:e}){let t=e.original,n=Vt(t.sweScore);return(0,F.jsx)(`span`,{className:`${W.swe} ${W[n]}`,children:t.sweScore||`—`})}function Ps({row:e}){return(0,F.jsx)(`span`,{className:W.ctx,children:e.original.ctx||`—`})}function Fs({row:e}){return(0,F.jsx)(qi,{providerKey:e.original.providerKey,origin:e.original.origin})}function Is({row:e}){let t=e.original,n=t.pingHistory||t.pings||[];return(0,F.jsx)(qo,{ms:(n.length>0?n[n.length-1]:null)?.ms??null,isPinging:!!t.isPinging})}function Ls({row:e}){let t=e.original,n=Ut(t.avg);return(0,F.jsx)(`span`,{className:`${W.ping} ${W[n]}`,children:t.avg==null||t.avg===1/0||t.avg>99e3?`—`:t.avg})}function Rs({row:e}){let t=e.original;return(0,F.jsx)(is,{status:t.status,httpCode:t.httpCode,inRouterSet:t.inRouterSet})}function zs({row:e}){let t=e.original;return(0,F.jsx)(us,{verdict:t.verdict,httpCode:t.httpCode})}function Bs({row:e}){return(0,F.jsx)(os,{score:e.original.stability})}function Vs({row:e}){let t=e.original;return(0,F.jsx)(`span`,{className:W.uptime,children:t.uptime>0?`${t.uptime}%`:`—`})}function Hs({row:e}){let t=e.original,n=!!t.isBenchmarking;return(0,F.jsxs)(`div`,{className:`${W.aiLatencyWrap} ${n?W.aiLatencyRunning:``}`,onClick:e=>{e.stopPropagation();let n=window.__fcmRowBenchmarkHandler;typeof n==`function`&&n(t)},title:n?`Benchmarking…`:`Click to run AI Speed Test (TUI: Ctrl+A)`,children:[(0,F.jsx)(gs,{result:t.benchmark||null,isRunning:n}),!n&&(0,F.jsx)(`span`,{className:W.aiLatencyPlay,"aria-hidden":`true`,children:(0,F.jsx)(Xr,{size:10,stroke:1.5})})]})}function Us({row:e}){let t=e.original;return(0,F.jsx)(ys,{result:t.benchmark||null,isRunning:!!t.isBenchmarking})}function Ws({row:e}){return(0,F.jsx)(ps,{history:e.original.pingHistory})}var Gs=({favorites:e,onBenchmarkRow:t,onSelectModel:n,onLaunch:r,toolMode:i})=>[ks.display({id:`fav`,header:`⭐`,size:32,enableSorting:!1,cell:({row:t})=>{let n=t.original,r=e.isFavorite(n);return(0,F.jsx)(`button`,{className:`${W.favBtn} ${r?W.favBtnActive:``}`,onClick:t=>{t.stopPropagation(),e.toggle(n)},title:r?`Unfavorite ${n.label} (TUI: F)`:`Favorite ${n.label} (TUI: F)`,"aria-label":r?`Unfavorite ${n.label}`:`Favorite ${n.label}`,"aria-pressed":r,children:r?(0,F.jsx)(Zr,{size:14,stroke:1.5}):(0,F.jsx)(Vr,{size:14,stroke:1.5})})}}),ks.display({id:`mood`,header:`❔`,size:28,cell:js,enableSorting:!0}),ks.accessor(`idx`,{header:`#`,size:36,enableSorting:!0,cell:({getValue:e,row:t})=>(0,F.jsx)(`span`,{className:W.rankNum,children:e()??t.index+1})}),ks.accessor(`tier`,{header:`Tier`,size:48,enableSorting:!0,cell:({getValue:e})=>(0,F.jsx)(Ho,{tier:e()})}),ks.accessor(`sweScore`,{header:`SWE%`,size:52,enableSorting:!0,cell:Ns}),ks.accessor(`ctx`,{header:`CTX`,size:48,enableSorting:!0,cell:Ps}),ks.accessor(`label`,{header:`Model`,size:200,enableSorting:!0,cell:Ms}),ks.accessor(`origin`,{header:`Provider`,size:150,enableSorting:!0,cell:Fs}),ks.display({id:`latestPing`,header:`Last Ping`,size:80,cell:Is,enableSorting:!0}),ks.accessor(`avg`,{header:`Avg`,size:72,enableSorting:!0,cell:Ls}),ks.accessor(`status`,{id:`condition`,header:`Health`,size:120,enableSorting:!0,cell:Rs}),ks.accessor(`verdict`,{header:`Verdict`,size:100,enableSorting:!0,cell:zs}),ks.accessor(`stability`,{header:`Stability`,size:90,enableSorting:!0,cell:Bs}),ks.accessor(`uptime`,{header:`Up%`,size:48,enableSorting:!0,cell:Vs}),ks.display({id:`aiLatency`,header:`AI Lat.`,size:80,cell:Hs,enableSorting:!0}),ks.display({id:`tps`,header:`TPS`,size:48,cell:Us,enableSorting:!0}),ks.display({id:`trend`,header:`Trend`,size:96,cell:Ws,enableSorting:!0}),ks.display({id:`launch`,header:`🔌`,size:42,enableSorting:!1,cell:({row:e})=>(0,F.jsx)(`div`,{className:W.launchCell,children:(0,F.jsx)(xs,{model:e.original,toolMode:i,onLaunch:r,variant:`icon`})})})],Ks=Gs({favorites:{isFavorite:()=>!1,toggle:()=>{}},onBenchmarkRow:null,onSelectModel:null,onLaunch:null,toolMode:`opencode`}).reduce((e,t)=>(t.id&&(e[t.id]=t.size??80),e),{});function qs({filtered:e,onSelectModel:t,onBenchmarkRow:n,onLaunch:r,favorites:i,sortColumn:a,sortDirection:o,onSort:s,toolMode:c=null,onToast:l,onSetToolMode:u,onCycleToolMode:d,onOpenFallback:f}){let[p,m]=(0,v.useState)(null),h=(0,v.useCallback)(e=>{let t=`${e.providerKey}/${e.modelId}`;m(e=>e===t?null:t)},[]),g=(0,v.useMemo)(()=>{let t=e.filter(e=>e.status===`up`&&e.avg!=null&&e.avg!==1/0&&e.avg<99e3);return new Set([...t].sort((e,t)=>e.avg-t.avg).slice(0,3).map(e=>e.modelId))},[e]);(0,v.useEffect)(()=>{if(typeof n!=`function`){window.__fcmRowBenchmarkHandler=null;return}return window.__fcmRowBenchmarkHandler=n,()=>{window.__fcmRowBenchmarkHandler===n&&(window.__fcmRowBenchmarkHandler=null)}},[n]);let _=(0,v.useMemo)(()=>Gs({favorites:i,onBenchmarkRow:n,onSelectModel:t,onLaunch:r,toolMode:c}),[i,n,t,r,c]),{columnSizing:y,setColumnSizing:b,resetColumnSizing:x,hasCustomSizing:S}=Lo(Ks),C=Do({data:e,columns:_,defaultColumn:{enableSorting:!0},getCoreRowModel:So(),columnResizeMode:`onChange`,state:{columnSizing:y},onColumnSizingChange:b}),w=C.getRowModel().rows,ee=(0,v.useMemo)(()=>C.getAllColumns().reduce((e,t)=>e+t.getSize(),0),[y]),T=!!C.getState().columnSizingInfo?.isResizingColumn;return(0,v.useEffect)(()=>{if(!(typeof document>`u`))return T?document.body.classList.add(`col-resizing`):document.body.classList.remove(`col-resizing`),()=>{document.body.classList.remove(`col-resizing`)}},[T]),w.length===0?(0,F.jsx)(`div`,{className:W.empty,children:`No models match your filters`}):(0,F.jsxs)(`div`,{className:W.container,children:[S&&(0,F.jsxs)(`div`,{className:W.resizeToolbar,children:[(0,F.jsxs)(`span`,{className:W.resizeToolbarHint,children:[`📐 Custom column widths · total `,(0,F.jsxs)(`strong`,{children:[Math.round(ee),`px`]})]}),(0,F.jsx)(`button`,{type:`button`,className:W.resizeResetButton,onClick:x,title:`Restore the default column widths`,children:`↺ Reset columns`})]}),(0,F.jsxs)(`table`,{className:W.table,style:S?{minWidth:`${ee}px`}:void 0,children:[(0,F.jsx)(`thead`,{children:C.getHeaderGroups().map(e=>(0,F.jsx)(`tr`,{children:e.headers.map(e=>{let t=e.column,n=As.has(t.id),r=t.getIsResizing?.()===!0,i=`${e.getSize()}px`;return(0,F.jsx)(`th`,{className:W.th,onClick:n?()=>s(e.id):void 0,style:{width:i,minWidth:i,maxWidth:i,cursor:n?`pointer`:`default`},title:`Sort ${t.columnDef.header}: asc → desc → reset`,children:(0,F.jsxs)(`div`,{className:W.thInner,children:[(0,F.jsxs)(`span`,{className:W.thLabel,children:[Co(t.columnDef.header,e.getContext()),n&&(0,F.jsx)(`span`,{className:a===t.id?W.sortIconActive:W.sortIcon,children:a===t.id?o===`asc`?`↑`:`↓`:`⇅`})]}),(0,F.jsx)(`span`,{className:`${W.resizeHandle} ${r?W.resizeHandleActive:``}`,onClick:e=>e.stopPropagation(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),onDoubleClick:()=>{b(e=>({...e,[t.id]:Ks[t.id]}))},title:`Drag to resize ${t.columnDef.header} (double-click to reset this column)`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize ${t.columnDef.header} column`})]})},e.id)})},e.id))}),(0,F.jsx)(`tbody`,{children:w.map((e,t)=>{let a=e.original,o=p===`${a.providerKey}/${a.modelId}`,s=[...g].indexOf(a.modelId),m=[];return s>=0&&m.push(W[`rank${s+1}`]),a.isBenchmarking&&m.push(W.benchRow),o&&m.push(W.expandedRow),c&&(xn(a.providerKey).includes(c)||m.push(W.incompatible)),(a.status===`noauth`||a.status===`auth_error`)&&m.push(W.unusable),a.status===`pending`&&a.inRouterSet===!1&&m.push(W.notInSetRow),(0,F.jsxs)(v.Fragment,{children:[(0,F.jsx)(`tr`,{className:m.join(` `),onClick:()=>h(a),children:e.getVisibleCells().map(e=>{let t=`${e.column.getSize()}px`;return(0,F.jsx)(`td`,{className:W.td,style:{width:t,minWidth:t,maxWidth:t},children:Co(e.column.columnDef.cell,e.getContext())},e.id)})}),o&&(0,F.jsx)(`tr`,{className:W.expandRowWrapper,children:(0,F.jsx)(`td`,{colSpan:e.getVisibleCells().length,className:W.expandRowCell,children:(0,F.jsx)(Os,{model:a,favorites:i,onBenchmark:n,onLaunch:r,onToast:l,toolMode:c,onSetToolMode:u,onCycleToolMode:d,onOpenFallback:f})})})]},e.id)})})]})]})}function Js(e,t,n){let r=new Blob([e],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=t,a.click(),URL.revokeObjectURL(i)}var Ys={overlay:`_overlay_1e3f5_1`,fadeIn:`_fadeIn_1e3f5_1`,modal:`_modal_1e3f5_18`,modalSlideIn:`_modalSlideIn_1e3f5_1`,modalHeader:`_modalHeader_1e3f5_33`,modalTitle:`_modalTitle_1e3f5_40`,modalClose:`_modalClose_1e3f5_45`,modalBody:`_modalBody_1e3f5_57`,options:`_options_1e3f5_60`,option:`_option_1e3f5_60`,optionIcon:`_optionIcon_1e3f5_84`,optionText:`_optionText_1e3f5_88`,optionLabel:`_optionLabel_1e3f5_89`,optionDesc:`_optionDesc_1e3f5_94`};function Xs({models:e,onClose:t,onToast:n}){return e?(0,F.jsx)(`div`,{className:Ys.overlay,onClick:e=>e.target===e.currentTarget&&t(),children:(0,F.jsxs)(`div`,{className:Ys.modal,children:[(0,F.jsxs)(`div`,{className:Ys.modalHeader,children:[(0,F.jsxs)(`h2`,{className:Ys.modalTitle,children:[(0,F.jsx)(Kr,{size:20,stroke:1.5,style:{marginRight:8,verticalAlign:`middle`}}),`Export Data`]}),(0,F.jsx)(`button`,{className:Ys.modalClose,onClick:t,children:`×`})]}),(0,F.jsx)(`div`,{className:Ys.modalBody,children:(0,F.jsxs)(`div`,{className:Ys.options,children:[(0,F.jsxs)(`button`,{className:Ys.option,onClick:()=>{Js(JSON.stringify(e,null,2),`free-coding-models-export.json`,`application/json`),n?.(`Exported as JSON`,`success`),t()},children:[(0,F.jsx)(`span`,{className:Ys.optionIcon,children:(0,F.jsx)(qn,{size:20,stroke:1.5})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{className:Ys.optionLabel,children:`Export as JSON`}),(0,F.jsx)(`span`,{className:Ys.optionDesc,children:`Full model data with all metrics`})]})]}),(0,F.jsxs)(`button`,{className:Ys.option,onClick:()=>{let r=[`Rank`,`Tier`,`Model`,`Provider`,`SWE%`,`Context`,`LatestPing`,`AvgPing`,`Stability`,`Verdict`,`Uptime`],i=e.map((e,t)=>[t+1,e.tier,e.label,e.origin,e.sweScore||``,e.ctx||``,e.latestPing||``,e.avg===1/0?``:e.avg,e.stability||``,e.verdict||``,e.uptime||``].join(`,`));Js([r.join(`,`),...i].join(`
39
+ `),`free-coding-models-export.csv`,`text/csv`),n?.(`Exported as CSV`,`success`),t()},children:[(0,F.jsx)(`span`,{className:Ys.optionIcon,children:(0,F.jsx)(pr,{size:20,stroke:1.5})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{className:Ys.optionLabel,children:`Export as CSV`}),(0,F.jsx)(`span`,{className:Ys.optionDesc,children:`Spreadsheet-compatible format`})]})]}),(0,F.jsxs)(`button`,{className:Ys.option,onClick:async()=>{let r=e.filter(e=>e.status===`up`),i=`free-coding-models Dashboard Export\nTotal: ${e.length} | Online: ${r.length}\n\n`+r.slice(0,20).map((e,t)=>`${t+1}. ${e.label} [${e.tier}] — ${e.avg===1/0?`N/A`:e.avg+`ms`} (${e.origin})`).join(`
40
+ `);await navigator.clipboard.writeText(i),n?.(`Copied to clipboard`,`success`),t()},children:[(0,F.jsx)(`span`,{className:Ys.optionIcon,children:(0,F.jsx)(nr,{size:20,stroke:1.5})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{className:Ys.optionLabel,children:`Copy to Clipboard`}),(0,F.jsx)(`span`,{className:Ys.optionDesc,children:`Copy model summary as text`})]})]})]})})]})}):null}var G={page:`_page_1847y_1`,pageHeader:`_pageHeader_1847y_5`,pageTitle:`_pageTitle_1847y_9`,pageSubtitle:`_pageSubtitle_1847y_15`,loading:`_loading_1847y_30`,featureSection:`_featureSection_1847y_37`,sectionHeading:`_sectionHeading_1847y_44`,featureGrid:`_featureGrid_1847y_52`,featureRow:`_featureRow_1847y_57`,featureLabel:`_featureLabel_1847y_67`,featureTitle:`_featureTitle_1847y_79`,featureDesc:`_featureDesc_1847y_85`,featureActions:`_featureActions_1847y_91`,select:`_select_1847y_96`,toggleSwitch:`_toggleSwitch_1847y_110`,toggleSlider:`_toggleSlider_1847y_122`,smallBtn:`_smallBtn_1847y_148`,notice:`_notice_1847y_166`,testBadge:`_testBadge_1847y_178`,test_ok:`_test_ok_1847y_191`,test_auth_error:`_test_auth_error_1847y_192`,test_rate_limited:`_test_rate_limited_1847y_193`,test_no_callable_model:`_test_no_callable_model_1847y_194`,test_fail:`_test_fail_1847y_195`,test_missing_key:`_test_missing_key_1847y_196`,test_pending:`_test_pending_1847y_197`,testSpinner:`_testSpinner_1847y_199`,spin:`_spin_1847y_1`,toolbar:`_toolbar_1847y_210`,toolbarSearch:`_toolbarSearch_1847y_218`,toolbarActions:`_toolbarActions_1847y_250`,toolbarBtn:`_toolbarBtn_1847y_255`,providers:`_providers_1847y_276`,card:`_card_1847y_282`,cardHeader:`_cardHeader_1847y_295`,cardIcon:`_cardIcon_1847y_308`,cardInfo:`_cardInfo_1847y_320`,cardName:`_cardName_1847y_325`,cardMeta:`_cardMeta_1847y_330`,cardStatus:`_cardStatus_1847y_336`,statusConfigured:`_statusConfigured_1847y_344`,statusMissing:`_statusMissing_1847y_349`,toggleIcon:`_toggleIcon_1847y_354`,toggleIconExpanded:`_toggleIconExpanded_1847y_361`,cardBody:`_cardBody_1847y_365`,cardExpanded:`_cardExpanded_1847y_372`,cardContent:`_cardContent_1847y_377`,keyGroup:`_keyGroup_1847y_381`,keyLabel:`_keyLabel_1847y_385`,keyDisplay:`_keyDisplay_1847y_395`,keyDisplayValue:`_keyDisplayValue_1847y_406`,keyDisplayActions:`_keyDisplayActions_1847y_414`,actionBtn:`_actionBtn_1847y_420`,actionBtnDanger:`_actionBtnDanger_1847y_438`,keyInputRow:`_keyInputRow_1847y_448`,keyInput:`_keyInput_1847y_448`,saveBtn:`_saveBtn_1847y_475`,enabledRow:`_enabledRow_1847y_495`,enabledLabel:`_enabledLabel_1847y_504`},Zs={ok:{label:`OK`,icon:Yr,className:`testOk`},auth_error:{label:`Auth error`,icon:xr,className:`testErr`},rate_limited:{label:`Rate limited`,icon:Fr,className:`testWarn`},no_callable_model:{label:`No callable model`,icon:xr,className:`testWarn`},fail:{label:`Failed`,icon:xr,className:`testErr`},missing_key:{label:`Missing key`,icon:xr,className:`testNeutral`}};function Qs({onToast:e,onOpenChangelog:t,onCheckForUpdate:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(new Set),[l,u]=(0,v.useState)(new Set),[d,f]=(0,v.useState)({}),[p,m]=(0,v.useState)({}),[h,g]=(0,v.useState)(new Set),[_,y]=(0,v.useState)(null),b=(0,v.useCallback)(async()=>{try{i(await(await fetch(`/api/config`)).json())}catch{e?.(`Failed to load settings`,`error`)}},[e]);(0,v.useEffect)(()=>{b()},[b]);let x=e=>{c(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},S=()=>{r&&c(new Set(Object.keys(r.providers)))},C=()=>c(new Set),w=async t=>{if(l.has(t)){u(e=>{let n=new Set(e);return n.delete(t),n});return}try{(await(await fetch(`/api/key/${t}`)).json()).key&&u(e=>new Set(e).add(t))}catch{e?.(`Failed to reveal key`,`error`)}},ee=async t=>{try{let n=await(await fetch(`/api/key/${t}`)).json();n.key?(await navigator.clipboard.writeText(n.key),e?.(`API key copied to clipboard`,`success`)):e?.(`No key to copy`,`warning`)}catch{e?.(`Failed to copy key`,`error`)}},T=async t=>{let n=d[t]?.trim();if(!n){e?.(`Please enter an API key`,`warning`);return}try{let r=await(await fetch(`/api/settings`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({apiKeys:{[t]:n}})})).json();r.success?(e?.(`API key for ${t} saved successfully!`,`success`),f(e=>({...e,[t]:``})),u(e=>{let n=new Set(e);return n.delete(t),n}),await b(),c(e=>new Set(e).add(t))):e?.(r.error||`Failed to save`,`error`)}catch{e?.(`Network error while saving`,`error`)}},E=async t=>{if(confirm(`Are you sure you want to delete the API key for "${t}"?`))try{let n=await(await fetch(`/api/settings`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({apiKeys:{[t]:``}})})).json();n.success?(e?.(`API key for ${t} deleted`,`info`),u(e=>{let n=new Set(e);return n.delete(t),n}),await b()):e?.(n.error||`Failed to delete`,`error`)}catch{e?.(`Network error while deleting`,`error`)}},D=async(t,n)=>{try{let r=await(await fetch(`/api/settings`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providers:{[t]:{enabled:n}}})})).json();r.success?e?.(`${t} ${n?`enabled`:`disabled`}`,`success`):e?.(r.error||`Failed to toggle`,`error`)}catch{e?.(`Network error`,`error`)}},O=(0,v.useCallback)(async t=>{if(!h.has(t)){g(e=>new Set(e).add(t)),m(e=>({...e,[t]:{outcome:`pending`}}));try{let n=await fetch(`/api/key/${encodeURIComponent(t)}/test`,{method:`POST`}),r=await n.json().catch(()=>({}));if(n.ok){m(e=>({...e,[t]:r}));let n=Zs[r.outcome]||Zs.fail;e?.(`${t} test: ${n.label}${r.code?` (HTTP ${r.code})`:``}`,r.outcome===`ok`?`success`:`info`)}else m(e=>({...e,[t]:{outcome:`fail`,detail:r.error||`HTTP `+n.status}})),e?.(`${t} test failed: ${r.error||n.statusText}`,`error`)}catch(n){m(e=>({...e,[t]:{outcome:`fail`,detail:n.message}})),e?.(`${t} test failed: ${n.message}`,`error`)}finally{g(e=>{let n=new Set(e);return n.delete(t),n})}}},[h,e]),te=(0,v.useCallback)(async(t,n)=>{try{let r=await(await fetch(`/api/settings/feature`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n===void 0?{feature:t}:{feature:t,value:n})})).json();r.success?(await b(),e?.(`${t} updated`,`success`)):e?.(r.error||`Failed to update feature`,`error`)}catch{e?.(`Network error`,`error`)}},[e]),ne=(0,v.useCallback)(async t=>{try{let n=await(await fetch(`/api/shell-env/toggle`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:t})})).json();n.success?(await b(),e?.(`Shell env export ${n.enabled?`enabled`:`disabled`} — restart your shell to apply.`,`success`)):e?.(n.error||`Failed to toggle shell env`,`error`)}catch{e?.(`Network error`,`error`)}},[e]),re=(0,v.useCallback)(async()=>{if(confirm(`Remove discontinued proxy config leftovers? This is safe to run.`))try{let t=await(await fetch(`/api/legacy-cleanup`,{method:`POST`})).json(),n=(t.removedFiles?.length||0)+(t.updatedFiles?.length||0);t.changed?(y(`Cleaned ${n} legacy file(s). ${t.errors.length} error(s).`),e?.(`Legacy proxy cleanup: ${n} file(s) cleaned.`,`success`)):(y(`No discontinued proxy config was found. You are on the stable direct-provider setup.`),e?.(`No legacy proxy config found — already on stable setup.`,`info`)),await b()}catch(t){e?.(`Legacy cleanup failed: ${t.message}`,`error`)}},[e]),ie=(0,v.useCallback)(()=>{n?.()},[n]);if(!r)return(0,F.jsx)(`div`,{className:G.page,children:(0,F.jsx)(`div`,{className:G.loading,children:`Loading settings...`})});let ae=Object.entries(r.providers).filter(([,e])=>{if(!a)return!0;let t=a.toLowerCase();return`${e.name} ${e.displayName||``} ${e.billingNote||``}`.toLowerCase().includes(t)}).sort((e,t)=>e[1].name.localeCompare(t[1].name));return(0,F.jsxs)(`div`,{className:G.page,children:[(0,F.jsxs)(`div`,{className:G.pageHeader,children:[(0,F.jsxs)(`h1`,{className:G.pageTitle,children:[(0,F.jsx)(zr,{size:24,stroke:1.5,style:{marginRight:8,verticalAlign:`middle`}}),`Settings`]}),(0,F.jsxs)(`p`,{className:G.pageSubtitle,children:[`API keys, theme, favorites mode, shell env, and update controls. All settings are stored locally in `,(0,F.jsx)(`code`,{children:`~/.free-coding-models.json`}),`and shared with the TUI.`]})]}),r&&(0,F.jsxs)(`section`,{className:G.featureSection,children:[(0,F.jsx)(`h2`,{className:G.sectionHeading,children:`⚙️ Global settings`}),(0,F.jsxs)(`div`,{className:G.featureGrid,children:[(0,F.jsxs)(`div`,{className:G.featureRow,children:[(0,F.jsxs)(`div`,{className:G.featureLabel,children:[(0,F.jsx)(Hr,{size:16,stroke:1.5}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:G.featureTitle,children:`Theme`}),(0,F.jsx)(`div`,{className:G.featureDesc,children:`Tri-state cycle. Auto follows your OS.`})]})]}),(0,F.jsxs)(`select`,{className:G.select,value:r.settings?.theme||`auto`,onChange:e=>te(`theme`,e.target.value),children:[(0,F.jsx)(`option`,{value:`auto`,children:`Auto (OS)`}),(0,F.jsx)(`option`,{value:`dark`,children:`Dark`}),(0,F.jsx)(`option`,{value:`light`,children:`Light`})]})]}),(0,F.jsxs)(`div`,{className:G.featureRow,children:[(0,F.jsxs)(`div`,{className:G.featureLabel,children:[(0,F.jsx)(Vr,{size:16,stroke:1.5}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:G.featureTitle,children:`Favorites pinned + always visible`}),(0,F.jsx)(`div`,{className:G.featureDesc,children:`Favorites bypass filters and stay on top (TUI: Y key).`})]})]}),(0,F.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:!!r.settings?.favoritesPinnedAndSticky,onChange:e=>te(`favoritesPinnedAndSticky`,e.target.checked)}),(0,F.jsx)(`span`,{className:G.toggleSlider})]})]}),(0,F.jsxs)(`div`,{className:G.featureRow,children:[(0,F.jsxs)(`div`,{className:G.featureLabel,children:[(0,F.jsx)(Kn,{size:16,stroke:1.5}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:G.featureTitle,children:`Run AI Speed Test on startup`}),(0,F.jsx)(`div`,{className:G.featureDesc,children:`Auto-fire the global benchmark right after launch (TUI: U → 'Enable').`})]})]}),(0,F.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:!!r.settings?.runAiSpeedTestOnStartup,onChange:e=>te(`runAiSpeedTestOnStartup`,e.target.checked)}),(0,F.jsx)(`span`,{className:G.toggleSlider})]})]}),(0,F.jsxs)(`div`,{className:G.featureRow,children:[(0,F.jsxs)(`div`,{className:G.featureLabel,children:[(0,F.jsx)(er,{size:16,stroke:1.5}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:G.featureTitle,children:`Export API keys to shell rc`}),(0,F.jsx)(`div`,{className:G.featureDesc,children:`Write NVIDIA_API_KEY / GROQ_API_KEY / … to your shell rc file.`})]})]}),(0,F.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:!!r.settings?.shellEnvEnabled,onChange:e=>ne(e.target.checked)}),(0,F.jsx)(`span`,{className:G.toggleSlider})]})]}),(0,F.jsxs)(`div`,{className:G.featureRow,children:[(0,F.jsxs)(`div`,{className:G.featureLabel,children:[(0,F.jsx)(cr,{size:16,stroke:1.5}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:G.featureTitle,children:`Check for updates`}),(0,F.jsx)(`div`,{className:G.featureDesc,children:`The header chip turns green when a newer npm version is available. Use the 'Update now' button to install.`})]})]}),(0,F.jsxs)(`div`,{className:G.featureActions,children:[(0,F.jsx)(`button`,{className:G.smallBtn,onClick:ie,children:`Check now`}),(0,F.jsxs)(`button`,{className:G.smallBtn,onClick:()=>t?.(null),children:[(0,F.jsx)(vr,{size:13,stroke:1.5}),` Changelog`]})]})]}),(0,F.jsxs)(`div`,{className:G.featureRow,children:[(0,F.jsxs)(`div`,{className:G.featureLabel,children:[(0,F.jsx)(Fr,{size:16,stroke:1.5}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:G.featureTitle,children:`Cleanup discontinued proxy artifacts`}),(0,F.jsx)(`div`,{className:G.featureDesc,children:`Remove old config / env / service leftovers from the old multi-tool proxy.`})]})]}),(0,F.jsx)(`button`,{className:G.smallBtn,onClick:re,children:`Run cleanup`})]})]}),_&&(0,F.jsx)(`div`,{className:G.notice,children:_})]}),(0,F.jsxs)(`div`,{className:G.toolbar,children:[(0,F.jsxs)(`div`,{className:G.toolbarSearch,children:[(0,F.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,F.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,F.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,F.jsx)(`input`,{type:`text`,placeholder:`Search providers...`,value:a,onChange:e=>o(e.target.value),autoComplete:`off`})]}),(0,F.jsxs)(`div`,{className:G.toolbarActions,children:[(0,F.jsx)(`button`,{className:G.toolbarBtn,onClick:S,children:`Expand All`}),(0,F.jsx)(`button`,{className:G.toolbarBtn,onClick:C,children:`Collapse All`})]})]}),(0,F.jsx)(`div`,{className:G.providers,children:ae.map(([e,t])=>{let n=s.has(e),r=l.has(e);return(0,F.jsxs)(`div`,{className:`${G.card} ${n?G.cardExpanded:``}`,children:[(0,F.jsxs)(`div`,{className:G.cardHeader,onClick:()=>x(e),children:[(0,F.jsx)(`div`,{className:G.cardIcon,children:(0,F.jsx)(Mr,{size:20,stroke:1.5})}),(0,F.jsxs)(`div`,{className:G.cardInfo,children:[(0,F.jsx)(`div`,{className:G.cardName,children:t.displayName||t.name}),(0,F.jsxs)(`div`,{className:G.cardMeta,children:[t.modelCount,` models · `,e,t.billingNote?` · ${t.billingNote}`:``]})]}),(0,F.jsx)(`span`,{className:`${G.cardStatus} ${t.hasKey?G.statusConfigured:G.statusMissing}`,children:t.hasKey?(0,F.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,F.jsx)(er,{size:14,stroke:1.5}),` Active`]}):(0,F.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,F.jsx)(xr,{size:14,stroke:1.5}),` No Key`]})}),(0,F.jsx)(`span`,{className:`${G.toggleIcon} ${n?G.toggleIconExpanded:``}`,children:`▼`})]}),(0,F.jsx)(`div`,{className:G.cardBody,children:(0,F.jsxs)(`div`,{className:G.cardContent,children:[t.hasKey&&p[e]&&(0,F.jsx)(`div`,{className:`${G.testBadge} ${G[`test_${p[e].outcome}`]||``}`,children:(()=>{let t=Zs[p[e].outcome]||Zs.fail,n=t.icon;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(n,{size:12,stroke:1.5}),(0,F.jsxs)(`span`,{children:[`Last test: `,t.label,p[e].code?` (HTTP ${p[e].code})`:``]})]})})()}),t.hasKey&&(0,F.jsxs)(`div`,{className:G.keyGroup,children:[(0,F.jsx)(`label`,{className:G.keyLabel,children:`Current API Key`}),(0,F.jsxs)(`div`,{className:G.keyDisplay,children:[(0,F.jsx)(`span`,{className:G.keyDisplayValue,children:r?t.maskedKey||`••••••••`:Gt(t.maskedKey||``)}),(0,F.jsxs)(`div`,{className:G.keyDisplayActions,children:[(0,F.jsx)(`button`,{className:G.actionBtn,onClick:()=>w(e),title:r?`Hide`:`Reveal`,children:r?(0,F.jsx)(dr,{size:14,stroke:1.5}):(0,F.jsx)(fr,{size:14,stroke:1.5})}),(0,F.jsx)(`button`,{className:G.actionBtn,onClick:()=>ee(e),title:`Copy`,children:(0,F.jsx)(or,{size:14,stroke:1.5})}),(0,F.jsxs)(`button`,{className:G.actionBtn,onClick:()=>O(e),disabled:h.has(e),title:`Test this key against the provider (TUI: T key in Settings)`,"aria-label":`Test key for ${e}`,children:[h.has(e)?(0,F.jsx)(`span`,{className:G.testSpinner}):(0,F.jsx)(Kn,{size:14,stroke:1.5}),h.has(e)?`Testing…`:`Test`]}),(0,F.jsx)(`button`,{className:`${G.actionBtn} ${G.actionBtnDanger}`,onClick:()=>E(e),title:`Delete Key`,children:(0,F.jsx)(Wr,{size:14,stroke:1.5})})]})]})]}),(0,F.jsxs)(`div`,{className:G.keyGroup,children:[(0,F.jsxs)(`label`,{className:G.keyLabel,children:[t.hasKey?`Update API Key`:`Add API Key`,t.billingNote?` 💰 ${t.billingNote}`:``]}),(0,F.jsxs)(`div`,{className:G.keyInputRow,children:[(0,F.jsx)(`input`,{type:`password`,className:G.keyInput,placeholder:`Enter your API key...`,value:d[e]||``,onChange:t=>f(n=>({...n,[e]:t.target.value})),autoComplete:`off`}),(0,F.jsx)(`button`,{className:G.saveBtn,onClick:()=>T(e),children:t.hasKey?`Update`:`Save`})]})]}),(0,F.jsxs)(`div`,{className:G.enabledRow,children:[(0,F.jsx)(`span`,{className:G.enabledLabel,children:`Provider Enabled`}),(0,F.jsxs)(`label`,{className:G.toggleSwitch,children:[(0,F.jsx)(`input`,{type:`checkbox`,defaultChecked:t.enabled!==!1,onChange:t=>D(e,t.target.checked)}),(0,F.jsx)(`span`,{className:G.toggleSlider})]})]})]})})]},e)})})]})}function $s(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(!0),i=(0,v.useCallback)(async()=>{r(!0);try{t(ec(await(await fetch(`/api/router/tokens`)).json()))}catch{t(null)}finally{r(!1)}},[]);return(0,v.useEffect)(()=>{i()},[i]),{data:e,loading:n,refresh:i}}function ec(e){if(!e)return null;let t=e.daily||{},n=e.all_time||{},r=[],i=new Date;for(let e=6;e>=0;e--){let n=new Date(i);n.setDate(n.getDate()-e);let a=n.toISOString().slice(0,10),o=t[a]||{total_tokens:0,requests:0};r.push({date:a,label:n.toLocaleDateString(`en`,{weekday:`short`}),totalTokens:o.total_tokens||0,requests:o.requests||0})}let a={};for(let e of Object.values(t)){let t=e.by_model||{};for(let[e,n]of Object.entries(t))a[e]||(a[e]={total:0,requests:0}),a[e].total+=n.total||0,a[e].requests+=n.requests||0}let o=Object.entries(a).sort((e,t)=>t[1].total-e[1].total).slice(0,10).map(([e,t])=>({key:e,...t})),s={};for(let[e,t]of Object.entries(a)){let n=e.split(`/`)[0];s[n]||(s[n]={total:0,requests:0}),s[n].total+=t.total,s[n].requests+=t.requests}let c=Object.entries(s).sort((e,t)=>t[1].total-e[1].total).slice(0,10).map(([e,t])=>({key:e,...t})),l=t[i.toISOString().slice(0,10)]||{};return{today:{totalTokens:l.total_tokens||0,promptTokens:l.prompt_tokens||0,completionTokens:l.completion_tokens||0,requests:l.requests||0},allTime:{totalTokens:n.total_tokens||0,promptTokens:n.prompt_tokens||0,completionTokens:n.completion_tokens||0,requests:n.requests||0},sevenDays:r,topModels:o,topProviders:c,hasData:n.total_tokens>0||Object.keys(t).length>0}}var K={card:`_card_1m2zx_1`,cardTitle:`_cardTitle_1m2zx_5`,empty:`_empty_1m2zx_14`,summaryGrid:`_summaryGrid_1m2zx_22`,summaryCard:`_summaryCard_1m2zx_29`,summaryLabel:`_summaryLabel_1m2zx_39`,summaryValue:`_summaryValue_1m2zx_47`,summarySub:`_summarySub_1m2zx_53`,chart:`_chart_1m2zx_59`,chartBar:`_chartBar_1m2zx_67`,chartFill:`_chartFill_1m2zx_77`,chartLabel:`_chartLabel_1m2zx_85`,topList:`_topList_1m2zx_92`,topRow:`_topRow_1m2zx_98`,topKey:`_topKey_1m2zx_106`,topVal:`_topVal_1m2zx_115`,topReq:`_topReq_1m2zx_121`};function tc(e){return typeof e!=`number`||!Number.isFinite(e)?`0`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(Math.round(e))}function nc(){let{data:e,loading:t}=$s();if(t)return(0,F.jsxs)(`div`,{className:K.card,children:[(0,F.jsx)(`h3`,{className:K.cardTitle,children:`Token Usage`}),(0,F.jsx)(`div`,{className:K.empty,children:`Loading…`})]});if(!e||!e.hasData)return(0,F.jsxs)(`div`,{className:K.card,children:[(0,F.jsx)(`h3`,{className:K.cardTitle,children:`Token Usage`}),(0,F.jsx)(`div`,{className:K.empty,children:`No token data yet. Start the router and send requests to track usage.`})]});let n=Math.max(...e.sevenDays.map(e=>e.totalTokens),1);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:K.summaryGrid,children:[(0,F.jsxs)(`div`,{className:K.summaryCard,children:[(0,F.jsx)(`span`,{className:K.summaryLabel,children:`Today`}),(0,F.jsx)(`span`,{className:K.summaryValue,children:tc(e.today.totalTokens)}),(0,F.jsxs)(`span`,{className:K.summarySub,children:[e.today.requests,` requests`]})]}),(0,F.jsxs)(`div`,{className:K.summaryCard,children:[(0,F.jsx)(`span`,{className:K.summaryLabel,children:`All Time`}),(0,F.jsx)(`span`,{className:K.summaryValue,children:tc(e.allTime.totalTokens)}),(0,F.jsxs)(`span`,{className:K.summarySub,children:[e.allTime.requests,` requests`]})]})]}),(0,F.jsxs)(`div`,{className:K.card,children:[(0,F.jsx)(`h3`,{className:K.cardTitle,children:`7-Day Usage`}),(0,F.jsx)(`div`,{className:K.chart,children:e.sevenDays.map(e=>(0,F.jsxs)(`div`,{className:K.chartBar,children:[(0,F.jsx)(`div`,{className:K.chartFill,style:{height:`${Math.max(2,e.totalTokens/n*100)}%`},title:`${e.date}: ${tc(e.totalTokens)} tokens`}),(0,F.jsx)(`span`,{className:K.chartLabel,children:e.label})]},e.date))})]}),e.topModels.length>0&&(0,F.jsxs)(`div`,{className:K.card,children:[(0,F.jsx)(`h3`,{className:K.cardTitle,children:`Top Models`}),(0,F.jsx)(`div`,{className:K.topList,children:e.topModels.map(e=>(0,F.jsxs)(`div`,{className:K.topRow,children:[(0,F.jsx)(`span`,{className:K.topKey,children:e.key}),(0,F.jsxs)(`span`,{className:K.topVal,children:[tc(e.total),` tokens`]}),(0,F.jsxs)(`span`,{className:K.topReq,children:[e.requests,` req`]})]},e.key))})]}),e.topProviders.length>0&&(0,F.jsxs)(`div`,{className:K.card,children:[(0,F.jsx)(`h3`,{className:K.cardTitle,children:`Top Providers`}),(0,F.jsx)(`div`,{className:K.topList,children:e.topProviders.map(e=>(0,F.jsxs)(`div`,{className:K.topRow,children:[(0,F.jsx)(`span`,{className:K.topKey,children:e.key}),(0,F.jsxs)(`span`,{className:K.topVal,children:[tc(e.total),` tokens`]}),(0,F.jsxs)(`span`,{className:K.topReq,children:[e.requests,` req`]})]},e.key))})]})]})}var q={page:`_page_1n8f8_1`,pageHeader:`_pageHeader_1n8f8_5`,pageTitle:`_pageTitle_1n8f8_9`,pageSubtitle:`_pageSubtitle_1n8f8_15`,grid:`_grid_1n8f8_21`,card:`_card_1n8f8_27`,cardWide:`_cardWide_1n8f8_36`,cardTitle:`_cardTitle_1n8f8_40`,cardBody:`_cardBody_1n8f8_46`,empty:`_empty_1n8f8_49`,healthItem:`_healthItem_1n8f8_55`,healthName:`_healthName_1n8f8_67`,healthBar:`_healthBar_1n8f8_74`,healthFill:`_healthFill_1n8f8_82`,healthPct:`_healthPct_1n8f8_89`,pctFast:`_pctFast_1n8f8_97`,pctMedium:`_pctMedium_1n8f8_98`,pctSlow:`_pctSlow_1n8f8_99`,leaderItem:`_leaderItem_1n8f8_105`,leaderRank:`_leaderRank_1n8f8_117`,rank1:`_rank1_1n8f8_131`,rank2:`_rank2_1n8f8_132`,rank3:`_rank3_1n8f8_133`,leaderName:`_leaderName_1n8f8_135`,leaderLatency:`_leaderLatency_1n8f8_145`,tierItem:`_tierItem_1n8f8_153`,tierBadge:`_tierBadge_1n8f8_160`,tierBar:`_tierBar_1n8f8_165`,tierFill:`_tierFill_1n8f8_173`,tierCount:`_tierCount_1n8f8_179`};function rc(e,t){return typeof window>`u`||!window.document?.documentElement?t:getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t}var ic={"S+":`--tier-splus`,S:`--tier-s`,"A+":`--tier-aplus`,A:`--tier-a`,"A-":`--tier-aminus`,"B+":`--tier-bplus`,B:`--tier-b`,C:`--tier-c`},ac={"S+":`#ffd700`,S:`#ff8c00`,"A+":`#00c8ff`,A:`#3ddc84`,"A-":`#7ecf7e`,"B+":`#a8a8c8`,B:`#808098`,C:`#606078`};function oc(e){return rc(ic[e],ac[e])}var sc=[`S+`,`S`,`A+`,`A`,`A-`,`B+`,`B`,`C`];function cc({models:e}){let t=(0,v.useMemo)(()=>{let t={};return e.forEach(e=>{t[e.origin]||(t[e.origin]={total:0,online:0,key:e.providerKey}),t[e.origin].total++,e.status===`up`&&t[e.origin].online++}),Object.entries(t).sort((e,t)=>t[1].online/t[1].total-e[1].online/e[1].total)},[e]),n=(0,v.useMemo)(()=>[...e.filter(e=>e.status===`up`&&e.avg!==1/0&&e.avg<99e3)].sort((e,t)=>e.avg-t.avg).slice(0,10),[e]),r=(0,v.useMemo)(()=>{let t={};e.forEach(e=>{t[e.tier]=(t[e.tier]||0)+1});let n=Math.max(...Object.values(t),1);return sc.map(e=>({tier:e,count:t[e]||0,pct:(t[e]||0)/n*100}))},[e]);return(0,F.jsxs)(`div`,{className:q.page,children:[(0,F.jsxs)(`div`,{className:q.pageHeader,children:[(0,F.jsxs)(`h1`,{className:q.pageTitle,children:[(0,F.jsx)(Rn,{size:24,stroke:1.5,style:{marginRight:8,verticalAlign:`middle`}}),`Analytics`]}),(0,F.jsx)(`p`,{className:q.pageSubtitle,children:`Real-time insights across all providers and models`})]}),(0,F.jsxs)(`div`,{className:q.grid,children:[(0,F.jsxs)(`div`,{className:`${q.card} ${q.cardWide}`,children:[(0,F.jsx)(`h3`,{className:q.cardTitle,children:`Provider Health Overview`}),(0,F.jsx)(`div`,{className:q.cardBody,children:t.length===0?(0,F.jsx)(`div`,{className:q.empty,children:`Waiting for data...`}):t.map(([e,t])=>{let n=t.total>0?Math.round(t.online/t.total*100):0,r=n>70?q.pctFast:n>30?q.pctMedium:q.pctSlow;return(0,F.jsxs)(`div`,{className:q.healthItem,children:[(0,F.jsx)(`span`,{className:q.healthName,children:e}),(0,F.jsx)(`div`,{className:q.healthBar,children:(0,F.jsx)(`div`,{className:q.healthFill,style:{width:`${n}%`}})}),(0,F.jsxs)(`span`,{className:`${q.healthPct} ${r}`,children:[n,`%`]})]},e)})})]}),(0,F.jsxs)(`div`,{className:q.card,children:[(0,F.jsxs)(`h3`,{className:q.cardTitle,style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,F.jsx)(Gr,{size:16,stroke:1.5}),`Fastest Models`]}),(0,F.jsx)(`div`,{className:q.cardBody,children:n.length===0?(0,F.jsx)(`div`,{className:q.empty,children:`Waiting for ping data...`}):n.map((e,t)=>{let n=t<3?q[`rank${t+1}`]:``;return(0,F.jsxs)(`div`,{className:q.leaderItem,children:[(0,F.jsx)(`div`,{className:`${q.leaderRank} ${n}`,children:t+1}),(0,F.jsx)(`span`,{className:q.leaderName,children:e.label}),(0,F.jsxs)(`span`,{className:q.leaderLatency,children:[e.avg,`ms`]})]},e.modelId)})})]}),(0,F.jsxs)(`div`,{className:q.card,children:[(0,F.jsx)(`h3`,{className:q.cardTitle,children:`Tier Distribution`}),(0,F.jsx)(`div`,{className:q.cardBody,children:r.map(({tier:e,count:t,pct:n})=>(0,F.jsxs)(`div`,{className:q.tierItem,children:[(0,F.jsx)(`div`,{className:q.tierBadge,children:(0,F.jsx)(Ho,{tier:e})}),(0,F.jsx)(`div`,{className:q.tierBar,children:(0,F.jsx)(`div`,{className:q.tierFill,style:{width:`${n}%`,background:oc(e)}})}),(0,F.jsx)(`span`,{className:q.tierCount,children:t})]},e))})]})]}),(0,F.jsx)(nc,{})]})}var lc={nvidia:{name:`NVIDIA NIM`,url:`https://integrate.api.nvidia.com/v1/chat/completions`,models:[[`minimaxai/minimax-m2.7`,`MiniMax M2.7`,`S+`,`80.2%`,`200k`],[`z-ai/glm-5.1`,`GLM 5.1`,`S+`,`77.8%`,`128k`],[`moonshotai/kimi-k2.6`,`Kimi K2.6`,`S+`,`76.8%`,`256k`],[`deepseek-ai/deepseek-v4-pro`,`DeepSeek V4 Pro`,`S+`,`73.1%`,`1M`],[`deepseek-ai/deepseek-v4-flash`,`DeepSeek V4 Flash`,`S+`,`72.0%`,`1M`],[`stepfun-ai/step-3.5-flash`,`Step 3.5 Flash`,`S+`,`74.4%`,`256k`],[`stepfun-ai/step-3.7-flash`,`Step 3.7 Flash`,`S+`,`74.4%`,`256k`],[`qwen/qwen3-coder-480b-a35b-instruct`,`Qwen3 Coder 480B`,`S+`,`70.6%`,`256k`],[`nvidia/nemotron-3-ultra-550b-a55b`,`Nemotron 3 Ultra`,`S+`,`-`,`1M`],[`qwen/qwen3-next-80b-a3b-instruct`,`Qwen3 80B Instruct`,`S`,`65.0%`,`128k`],[`qwen/qwen3.5-397b-a17b`,`Qwen3.5 400B VLM`,`S`,`68.0%`,`128k`],[`openai/gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`128k`],[`meta/llama-4-maverick-17b-128e-instruct`,`Llama 4 Maverick`,`S`,`62.0%`,`1M`],[`mistralai/mistral-medium-3.5-128b`,`Mistral Medium 3.5`,`S`,`66.0%`,`128k`],[`mistralai/mistral-small-4-119b-2603`,`Mistral Small 4`,`S`,`60.0%`,`256k`],[`qwen/qwen3.5-122b-a10b`,`Qwen3.5 122B`,`S`,`64.0%`,`128k`],[`mistralai/mistral-large-3-675b-instruct-2512`,`Mistral Large 675B`,`A+`,`58.0%`,`256k`],[`nvidia/nemotron-3-super-120b-a12b`,`Nemotron 3 Super`,`A+`,`56.0%`,`128k`],[`nvidia/nemotron-3-nano-omni-30b-a3b-reasoning`,`Nemotron 3 Omni`,`A+`,`52.0%`,`128k`],[`nvidia/nemotron-3-nano-30b-a3b`,`Nemotron Nano 30B`,`A`,`43.0%`,`128k`],[`openai/gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`128k`],[`google/gemma-4-31b-it`,`Gemma 4 31B`,`A`,`45.0%`,`256k`],[`bytedance/seed-oss-36b-instruct`,`Seed OSS 36B`,`A-`,`38.0%`,`32k`],[`stockmark/stockmark-2-100b-instruct`,`Stockmark 100B`,`A-`,`36.0%`,`32k`],[`mistralai/ministral-14b-instruct-2512`,`Ministral 14B`,`B+`,`34.0%`,`32k`],[`meta/llama-3.2-11b-vision-instruct`,`Llama 3.2 11B Vision`,`B`,`28.0%`,`128k`],[`microsoft/phi-4-mini-instruct`,`Phi 4 Mini`,`C`,`14.0%`,`128k`]]},groq:{name:`Groq`,url:`https://api.groq.com/openai/v1/chat/completions`,models:[[`llama-3.3-70b-versatile`,`Llama 3.3 70B`,`A-`,`39.5%`,`131k`],[`meta-llama/llama-4-scout-17b-16e-instruct`,`Llama 4 Scout`,`A`,`44.0%`,`131k`],[`llama-3.1-8b-instant`,`Llama 3.1 8B`,`B`,`28.8%`,`131k`],[`openai/gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`openai/gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`131k`],[`qwen/qwen3-32b`,`Qwen3 32B`,`A+`,`50.0%`,`131k`],[`groq/compound`,`Groq Compound`,`A`,`45.0%`,`131k`],[`groq/compound-mini`,`Groq Compound Mini`,`B+`,`32.0%`,`131k`]]},cerebras:{name:`Cerebras`,url:`https://api.cerebras.ai/v1/chat/completions`,models:[[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`zai-glm-4.7`,`GLM 4.7`,`S+`,`73.8%`,`131k`]]},googleai:{name:`Google AI`,url:`https://generativelanguage.googleapis.com/v1beta/openai/chat/completions`,models:[[`gemini-3.5-flash`,`Gemini 3.5 Flash`,`S+`,`-`,`1M`],[`gemini-3.1-pro-preview`,`Gemini 3.1 Pro Preview`,`S+`,`78.0%`,`1M`],[`gemini-3-flash-preview`,`Gemini 3 Flash Preview`,`S`,`65.0%`,`1M`],[`gemini-3.1-flash-lite`,`Gemini 3.1 Flash Lite`,`A+`,`55.0%`,`1M`],[`gemini-2.5-pro`,`Gemini 2.5 Pro`,`S+`,`63.2%`,`1M`],[`gemini-2.5-flash`,`Gemini 2.5 Flash`,`A+`,`50.0%`,`1M`],[`gemini-2.5-flash-lite`,`Gemini 2.5 Flash Lite`,`A`,`42.0%`,`1M`]]},"github-models":{name:`GitHub Models`,url:`https://models.github.ai/inference/chat/completions`,models:[[`openai/gpt-4.1`,`GPT-4.1`,`S+`,`-`,`1M`],[`openai/gpt-4.1-mini`,`GPT-4.1 Mini`,`S`,`-`,`1M`],[`openai/gpt-4.1-nano`,`GPT-4.1 Nano`,`A`,`-`,`1M`],[`deepseek/deepseek-v3-0324`,`DeepSeek V3 0324`,`S`,`62.0%`,`128k`],[`meta/meta-llama-3.1-405b-instruct`,`Llama 3.1 405B`,`A`,`44.0%`,`128k`],[`meta/llama-4-maverick-17b-128e-instruct-fp8`,`Llama 4 Maverick`,`S`,`62.0%`,`1M`],[`meta/llama-4-scout-17b-16e-instruct`,`Llama 4 Scout`,`A`,`44.0%`,`1M`],[`meta/llama-3.3-70b-instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`128k`],[`meta/llama-3.2-90b-vision-instruct`,`Llama 3.2 90B Vision`,`A-`,`-`,`128k`],[`meta/llama-3.2-11b-vision-instruct`,`Llama 3.2 11B Vision`,`B`,`-`,`128k`],[`meta/meta-llama-3.1-8b-instruct`,`Llama 3.1 8B`,`B`,`28.8%`,`128k`],[`mistral-ai/codestral-2501`,`Codestral 2501`,`B+`,`34.0%`,`256k`],[`mistral-ai/mistral-medium-2505`,`Mistral Medium 2505`,`A`,`48.0%`,`128k`],[`mistral-ai/mistral-small-2503`,`Mistral Small 2503`,`B+`,`30.0%`,`128k`],[`mistral-ai/ministral-3b`,`Ministral 3B`,`C`,`-`,`128k`]]},mistral:{name:`Mistral LP`,url:`https://api.mistral.ai/v1/chat/completions`,models:[[`mistral-large-2512`,`Mistral Large 3`,`S+`,`70.0%`,`256k`],[`mistral-medium-3-5`,`Mistral Medium 3.5`,`S+`,`77.6%`,`256k`],[`devstral-2512`,`Devstral 2`,`S+`,`72.2%`,`256k`],[`magistral-medium-2509`,`Magistral Medium 1.2`,`A+`,`52.0%`,`128k`],[`mistral-small-2603`,`Mistral Small 4`,`A`,`48.0%`,`256k`]]},cloudflare:{name:`Cloudflare AI`,url:`https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1/chat/completions`,models:[[`@cf/moonshotai/kimi-k2.6`,`Kimi K2.6`,`S+`,`76.8%`,`262k`],[`@cf/zai-org/glm-4.7-flash`,`GLM-4.7-Flash`,`S`,`59.2%`,`131k`],[`@cf/nvidia/nemotron-3-120b-a12b`,`Nemotron 3 Super`,`A+`,`56.0%`,`32k`],[`@cf/meta/llama-4-scout-17b-16e-instruct`,`Llama 4 Scout`,`A`,`44.0%`,`131k`],[`@cf/meta/llama-3.2-90b-instruct`,`Llama 3.2 90B`,`A+`,`45.0%`,`128k`],[`@cf/mistralai/mistral-7b-instruct-v0.2`,`Mistral 7B v0.2`,`A`,`38.0%`,`128k`],[`@cf/google/gemma-2-9b-it`,`Gemma 2 9B`,`A`,`35.0%`,`128k`],[`@cf/anthropic/claude-3-5-sonnet`,`Claude 3.5 Sonnet`,`S+`,`62.4%`,`200k`],[`@cf/openai/gpt-4o-mini`,`GPT-4o Mini`,`A+`,`50.0%`,`128k`],[`@cf/qwen/qwen3-30b-a3b-fp8`,`Qwen3 30B MoE`,`A`,`45.0%`,`128k`],[`@cf/qwen/qwen2.5-coder-32b-instruct`,`Qwen2.5 Coder 32B`,`A`,`46.0%`,`128k`],[`@cf/openai/gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`128k`],[`@cf/meta/llama-3.3-70b-instruct-fp8-fast`,`Llama 3.3 70B`,`A-`,`39.5%`,`128k`],[`@cf/google/gemma-4-26b-a4b-it`,`Gemma 4 26B MoE`,`A-`,`38.0%`,`128k`],[`@cf/mistralai/mistral-small-3.1-24b-instruct`,`Mistral Small 3.1`,`B+`,`30.0%`,`128k`],[`@cf/ibm/granite-4.0-h-micro`,`Granite 4.0 Micro`,`B+`,`30.0%`,`128k`]]},openrouter:{name:`OpenRouter`,url:`https://openrouter.ai/api/v1/chat/completions`,models:[[`qwen/qwen3-coder:free`,`Qwen3 Coder 480B`,`S+`,`70.6%`,`1M`],[`z-ai/glm-4.5-air:free`,`GLM 4.5 Air`,`S+`,`72.0%`,`131k`],[`poolside/laguna-m.1:free`,`Poolside Laguna M.1`,`S+`,`-`,`262k`],[`poolside/laguna-xs.2:free`,`Poolside Laguna XS.2`,`S+`,`-`,`131k`],[`moonshotai/kimi-k2.6:free`,`Kimi K2.6`,`S+`,`76.8%`,`262k`],[`qwen/qwen3-next-80b-a3b-instruct:free`,`Qwen3 80B Instruct`,`S`,`65.0%`,`262k`],[`openai/gpt-oss-120b:free`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`arcee-ai/trinity-large-thinking:free`,`Arcee Trinity Large`,`A`,`-`,`262k`],[`nvidia/nemotron-3-super-120b-a12b:free`,`Nemotron 3 Super`,`A+`,`56.0%`,`262k`],[`nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free`,`Nemotron 3 Omni`,`A+`,`52.0%`,`256k`],[`nvidia/nemotron-nano-12b-v2-vl:free`,`Nemotron Nano 12B VL`,`A`,`20.0%`,`128k`],[`openrouter/owl-alpha`,`Owl Alpha`,`A+`,`-`,`1M`],[`nousresearch/hermes-3-llama-3.1-405b:free`,`Hermes 3 405B`,`A`,`44.0%`,`131k`],[`openai/gpt-oss-20b:free`,`GPT OSS 20B`,`A`,`42.0%`,`131k`],[`nvidia/nemotron-nano-30b-a3b:free`,`Nemotron Nano 30B`,`A`,`43.0%`,`256k`],[`cognitivecomputations/dolphin-mistral-24b-venice-edition:free`,`Dolphin Mistral 24B`,`B+`,`30.0%`,`33k`],[`google/gemma-4-31b-it:free`,`Gemma 4 31B`,`A`,`45.0%`,`256k`],[`google/gemma-4-26b-a4b-it:free`,`Gemma 4 26B MoE`,`A-`,`38.0%`,`256k`],[`meta-llama/llama-3.3-70b-instruct:free`,`Llama 3.3 70B`,`A-`,`39.5%`,`131k`],[`meta-llama/llama-3.2-3b-instruct:free`,`Llama 3.2 3B`,`B`,`20.0%`,`128k`],[`nvidia/nemotron-nano-9b-v2:free`,`Nemotron Nano 9B`,`B+`,`18.0%`,`128k`],[`openrouter/free`,`OpenRouter Free`,`B`,`-`,`200k`],[`liquid/lfm-2.5-1.2b-instruct:free`,`LFM 2.5 1.2B`,`C`,`-`,`32k`],[`liquid/lfm-2.5-1.2b-thinking:free`,`LFM 2.5 Thinking`,`C`,`-`,`32k`]]},sambanova:{name:`SambaNova`,url:`https://api.sambanova.ai/v1/chat/completions`,models:[[`MiniMax-M2.7`,`MiniMax M2.7`,`S+`,`56.2%`,`192k`],[`DeepSeek-V3.1`,`DeepSeek V3.1`,`S`,`62.0%`,`128k`],[`DeepSeek-V3.2`,`DeepSeek V3.2`,`S+`,`70.0%`,`32k`],[`Llama-4-Maverick-17B-128E-Instruct`,`Llama 4 Maverick`,`S`,`62.0%`,`128k`],[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`128k`],[`Meta-Llama-3.3-70B-Instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`128k`],[`gemma-3-12b-it`,`Gemma 3 12B IT`,`B+`,`46.0%`,`128k`]]},ovhcloud:{name:`OVHcloud AI`,url:`https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/chat/completions`,models:[[`Qwen3.5-397B-A17B`,`Qwen3.5 397B MoE`,`S`,`-`,`262k`],[`Qwen3-Coder-30B-A3B-Instruct`,`Qwen3 Coder 30B MoE`,`A+`,`55.0%`,`256k`],[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`gpt-oss-20b`,`GPT OSS 20B`,`A`,`42.0%`,`131k`],[`Meta-Llama-3_3-70B-Instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`131k`],[`Qwen3-32B`,`Qwen3 32B`,`A+`,`50.0%`,`32k`],[`Mistral-Small-3.2-24B-Instruct-2506`,`Mistral Small 3.2`,`B+`,`34.0%`,`128k`],[`Mistral-7B-Instruct-v0.3`,`Mistral 7B Instruct`,`B`,`25.0%`,`127k`],[`Mistral-Nemo-Instruct-2407`,`Mistral Nemo`,`B+`,`30.0%`,`118k`],[`Qwen3.5-9B`,`Qwen3.5 9B`,`B+`,`30.0%`,`262k`]]},codestral:{name:`Codestral`,url:`https://api.mistral.ai/v1/chat/completions`,models:[[`codestral-2508`,`Codestral`,`B+`,`34.0%`,`128k`]]},zai:{name:`ZAI`,url:`https://api.z.ai/api/coding/paas/v4/chat/completions`,models:[[`zai/glm-4.7-flash`,`GLM-4.7-Flash`,`S`,`59.2%`,`200k`],[`zai/glm-4.5-flash`,`GLM-4.5-Flash`,`S`,`59.2%`,`128k`]]},scaleway:{name:`Scaleway`,url:`https://api.scaleway.ai/v1/chat/completions`,models:[[`devstral-2-123b-instruct-2512`,`Devstral 2 123B`,`S+`,`72.2%`,`200k`],[`qwen3.5-397b-a17b`,`Qwen3.5 400B VLM`,`S`,`68.0%`,`250k`],[`mistral/mistral-large-3-675b-instruct-2512`,`Mistral Large 675B`,`A+`,`58.0%`,`250k`],[`qwen3-235b-a22b-instruct-2507`,`Qwen3 235B`,`S+`,`70.0%`,`250k`],[`gpt-oss-120b`,`GPT OSS 120B`,`S`,`60.0%`,`128k`],[`qwen3-coder-30b-a3b-instruct`,`Qwen3 Coder 30B`,`A+`,`55.0%`,`128k`],[`holo2-30b-a3b`,`Holo2 30B`,`A+`,`52.0%`,`22k`],[`llama-3.3-70b-instruct`,`Llama 3.3 70B`,`A-`,`39.5%`,`100k`],[`mistral-small-3.2-24b-instruct-2506`,`Mistral Small 3.2`,`B+`,`30.0%`,`128k`],[`gemma-3-27b-it`,`Gemma 3 27B`,`B`,`22.0%`,`40k`]]},qwen:{name:`Alibaba DashScope`,url:`https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions`,models:[[`qwen3.7-max`,`Qwen3.7 Max`,`S+`,`80.0%`,`1M`],[`qwen3-max`,`Qwen3 Max`,`S+`,`78.8%`,`256k`],[`qwen3.6-plus`,`Qwen3.6 Plus`,`S+`,`72.0%`,`1M`],[`qwen3-235b-a22b`,`Qwen3 235B`,`S+`,`70.0%`,`256k`],[`qwen3.5-plus`,`Qwen3.5 Plus`,`S`,`68.0%`,`1M`],[`qwen3-coder-plus`,`Qwen3 Coder Plus`,`S`,`69.6%`,`1M`],[`qwen3-coder-next`,`Qwen3 Coder Next`,`S`,`65.0%`,`256k`],[`qwen3.6-flash`,`Qwen3.6 Flash`,`A+`,`60.0%`,`1M`],[`qwen3.5-flash`,`Qwen3.5 Flash`,`A+`,`55.0%`,`1M`],[`qwen3-coder-flash`,`Qwen3 Coder Flash`,`A+`,`55.0%`,`1M`],[`qwen3-32b`,`Qwen3 32B`,`A+`,`50.0%`,`256k`]]},"opencode-zen":{name:`OpenCode Zen`,url:`https://opencode.ai/zen/v1/chat/completions`,models:[[`big-pickle`,`Big Pickle`,`S+`,`72.0%`,`200k`],[`deepseek-v4-flash-free`,`DeepSeek V4 Flash Free`,`S+`,`79.0%`,`200k`],[`mimo-v2.5-free`,`MiMo-V2.5 Free`,`S+`,`-`,`200k`],[`nemotron-3-super-free`,`Nemotron 3 Super Free`,`A+`,`52.0%`,`200k`],[`minimax-m3-free`,`MiniMax M3 Free`,`S+`,`59.0%`,`1M`]],zenOnly:!0},kilo:{name:`Kilo`,url:`https://api.kilo.ai/api/gateway/chat/completions`,models:[[`kilo-auto/free`,`Kilo Auto Free`,`A+`,`-`,`256k`]],noKeyNeeded:!0},llm7:{name:`LLM7`,url:`https://api.llm7.io/v1/chat/completions`,models:[[`qwen3-235b`,`Qwen3 235B`,`S+`,`70.0%`,`240k`],[`mistral-small-3.2`,`Mistral Small 3.2`,`B+`,`34.0%`,`128k`],[`codestral-latest`,`Codestral Latest`,`B+`,`34.0%`,`32k`],[`devstral-small-2:24b`,`Devstral Small 2`,`A`,`-`,`128k`]],noKeyNeeded:!0},routeway:{name:`Routeway`,url:`https://api.routeway.ai/v1/chat/completions`,models:[[`deepseek-v4-flash:free`,`DeepSeek V4 Flash`,`S+`,`72.0%`,`1M`],[`step-3.5-flash:free`,`Step 3.5 Flash`,`S+`,`74.4%`,`256k`],[`ling-2.6-flash:free`,`Ling 2.6 Flash`,`S`,`-`,`262k`],[`gpt-oss-120b:free`,`GPT OSS 120B`,`S`,`60.0%`,`131k`],[`minimax-m2:free`,`MiniMax M2`,`S`,`-`,`197k`],[`laguna-m.1:free`,`Poolside Laguna M.1`,`S+`,`-`,`131k`],[`laguna-xs.2:free`,`Poolside Laguna XS.2`,`S+`,`-`,`131k`],[`gemma-4-31b-it:free`,`Gemma 4 31B`,`A`,`45.0%`,`262k`],[`nemotron-3-nano-30b-a3b:free`,`Nemotron Nano 30B`,`A`,`43.0%`,`256k`],[`llama-3.3-70b-instruct:free`,`Llama 3.3 70B`,`A-`,`39.5%`,`131k`],[`mistral-nemo-instruct:free`,`Mistral Nemo`,`B+`,`30.0%`,`16k`],[`nemotron-nano-9b-v2:free`,`Nemotron Nano 9B`,`B+`,`18.0%`,`128k`],[`llama-3.1-8b-instruct:free`,`Llama 3.1 8B`,`B`,`28.8%`,`16k`],[`llama-3.2-3b-instruct:free`,`Llama 3.2 3B`,`B`,`20.0%`,`16k`],[`llama-3.2-1b-instruct:free`,`Llama 3.2 1B`,`C`,`-`,`16k`]]},novita:{name:`Novita AI`,url:`https://api.novita.ai/openai/v1/chat/completions`,models:[[`qwen/qwen3.6-plus`,`Qwen3.6 Plus`,`S+`,`72.0%`,`1M`],[`qwen/qwen3.5-plus`,`Qwen3.5 Plus`,`S`,`68.0%`,`1M`],[`nex-agi/nex-n2-pro`,`Nex N2 Pro`,`S`,`-`,`262k`],[`minimax/m2-her`,`MiniMax M2 HER`,`S`,`-`,`32k`]]},"ollama-cloud":{name:`Ollama Cloud`,url:`https://ollama.com/v1/chat/completions`,models:[[`minimax-m2.7`,`MiniMax M2.7`,`S+`,`80.2%`,`200k`],[`glm-5.1`,`GLM 5.1`,`S+`,`77.8%`,`203k`],[`kimi-k2.6`,`Kimi K2.6`,`S+`,`76.8%`,`131k`],[`deepseek-v4-pro`,`DeepSeek V4 Pro`,`S+`,`73.1%`,`1M`],[`deepseek-v4-flash`,`DeepSeek V4 Flash`,`S+`,`72.0%`,`1M`],[`devstral-2:123b`,`Devstral 2 123B`,`S+`,`72.2%`,`200k`],[`qwen3-coder:480b`,`Qwen3 Coder 480B`,`S+`,`70.6%`,`256k`],[`nemotron-3-ultra`,`Nemotron 3 Ultra`,`S+`,`-`,`1M`],[`glm-4.7`,`GLM 4.7`,`S+`,`73.8%`,`128k`],[`qwen3.5:397b`,`Qwen3.5 397B`,`S`,`68.0%`,`128k`],[`qwen3-coder-next`,`Qwen3 Coder Next`,`S`,`65.0%`,`256k`],[`gpt-oss:120b`,`GPT OSS 120B`,`S`,`60.0%`,`128k`],[`minimax-m3`,`MiniMax M3`,`S`,`59.0%`,`1M`],[`mistral-large-3:675b`,`Mistral Large 3`,`A+`,`58.0%`,`256k`],[`nemotron-3-super`,`Nemotron 3 Super`,`A+`,`56.0%`,`128k`],[`gemma4:31b`,`Gemma 4 31B`,`A`,`45.0%`,`256k`],[`gpt-oss:20b`,`GPT OSS 20B`,`A`,`42.0%`,`128k`]]}},uc=[];for(let[e,t]of Object.entries(lc))if(!(!t||!t.models))for(let n of t.models){let[t,r,i,a,o,s]=n;uc.push([t,r,i,a,o,e,s||null])}var dc=Object.entries(lc).map(([e,t])=>{let n=t?.name||e;return{id:`filter-provider-${e.replace(/[^a-z0-9]+/gi,`-`)}`,label:n,providerKey:e,description:`${n} models`,keywords:[`filter`,`provider`,`origin`,e,n.toLowerCase()]}}),fc={opencode:`Launch in OpenCode CLI with the selected model.`,"opencode-desktop":`Set model in shared config, then open OpenCode Desktop.`,"opencode-web":`Set model in shared config, then open OpenCode WebUI.`,openclaw:`Set default model in OpenClaw and launch it.`,crush:`Launch Crush with this provider/model pair.`,goose:`Launch Goose and preselect the active model.`,pi:`Launch Pi with model/provider flags.`,aider:`Launch Aider configured on the selected model.`,kilo:`Set model in shared config, then launch Kilo CLI.`,qwen:`Launch Qwen Code using the selected provider model.`,openhands:`Launch OpenHands with the selected model endpoint.`,amp:`Launch Amp with this model as active target.`,hermes:`Launch Hermes Agent with the selected model.`,continue:`Launch Continue CLI with the selected model.`,cline:`Launch Cline CLI with the selected model.`,caveman:`Caveman Code — token-efficient coding agent (launch with Caveman tool only).`,jcode:`Launch jcode coding agent with the selected model.`},pc=vn.map(e=>{let t=_n[e]||{label:e,emoji:`🧰`};return{id:`action-set-tool-${e}`,label:t.label,toolMode:e,icon:t.emoji,description:fc[e]||`Set this as the active launch target.`,keywords:[`tool`,`target`,`mode`,e,t.label.toLowerCase()]}}),mc=[{id:`action-cycle-ping-mode`,label:`Cycle ping mode`,shortcut:`W`,icon:`⚡`,description:`Rotate speed → normal → slow → forced.`,keywords:[`ping`,`mode`,`cycle`,`speed`,`normal`,`slow`,`forced`]},{id:`action-set-ping-speed`,label:`Speed mode (2s)`,pingMode:`speed`,description:`Fast 2s bursts for short live checks.`,keywords:[`ping`,`mode`,`speed`,`2s`,`fast`]},{id:`action-set-ping-normal`,label:`Normal mode (10s)`,pingMode:`normal`,description:`Balanced default cadence for daily use.`,keywords:[`ping`,`mode`,`normal`,`10s`,`default`]},{id:`action-set-ping-slow`,label:`Slow mode (30s)`,pingMode:`slow`,description:`Lower refresh cost when you are mostly idle.`,keywords:[`ping`,`mode`,`slow`,`30s`,`idle`]},{id:`action-set-ping-forced`,label:`Forced mode (4s)`,pingMode:`forced`,description:`Keeps 4s cadence until manually changed.`,keywords:[`ping`,`mode`,`forced`,`4s`,`manual`]}],hc=[{id:`filters`,label:`Filters`,icon:`🔍`,children:[{id:`filter-tier`,label:`Filter by tier`,icon:`📊`,children:[{id:`filter-tier-all`,label:`All tiers`,tier:null,shortcut:`T`,description:`Show all models`,keywords:[`filter`,`tier`,`all`]},{id:`filter-tier-splus`,label:`S+ tier`,tier:`S+`,description:`Best coding models`,keywords:[`filter`,`tier`,`s+`]},{id:`filter-tier-s`,label:`S tier`,tier:`S`,description:`Excellent models`,keywords:[`filter`,`tier`,`s`]},{id:`filter-tier-aplus`,label:`A+ tier`,tier:`A+`,description:`Very good models`,keywords:[`filter`,`tier`,`a+`]},{id:`filter-tier-a`,label:`A tier`,tier:`A`,description:`Good models`,keywords:[`filter`,`tier`,`a`]},{id:`filter-tier-aminus`,label:`A- tier`,tier:`A-`,description:`Solid models`,keywords:[`filter`,`tier`,`a-`]},{id:`filter-tier-bplus`,label:`B+ tier`,tier:`B+`,description:`Fair models`,keywords:[`filter`,`tier`,`b+`]},{id:`filter-tier-b`,label:`B tier`,tier:`B`,description:`Basic models`,keywords:[`filter`,`tier`,`b`]},{id:`filter-tier-c`,label:`C tier`,tier:`C`,description:`Limited models`,keywords:[`filter`,`tier`,`c`]}]},{id:`filter-provider`,label:`Filter by provider`,icon:`🏢`,children:[{id:`filter-provider-cycle`,label:`Cycle provider`,shortcut:`D`,description:`Switch between providers`,keywords:[`filter`,`provider`,`origin`]},{id:`filter-provider-all`,label:`All providers`,providerKey:null,description:`Show all providers`,keywords:[`filter`,`provider`,`all`]},...dc]},{id:`filter-model`,label:`Filter by model`,icon:`🤖`,children:[]},{id:`filter-other`,label:`Other filters`,icon:`⚙️`,children:[{id:`filter-configured-toggle`,label:`Show only configured & working`,shortcut:`E`,description:`Show only configured providers that are responding (not noauth/auth error)`,keywords:[`filter`,`configured`,`keys`,`working`,`active`]}]}]},{id:`sort`,label:`Sort`,icon:`📶`,children:[{id:`sort-rank`,label:`Sort by rank`,shortcut:`R`,description:`Rank by SWE score`,keywords:[`sort`,`rank`]},{id:`sort-tier`,label:`Sort by tier`,description:`Group by quality tier`,keywords:[`sort`,`tier`]},{id:`sort-provider`,label:`Sort by provider`,shortcut:`O`,description:`Group by provider`,keywords:[`sort`,`origin`,`provider`]},{id:`sort-model`,label:`Sort by model`,shortcut:`M`,description:`Alphabetical order`,keywords:[`sort`,`model`,`name`]},{id:`sort-latest-ping`,label:`Sort by latest ping`,shortcut:`L`,description:`Recent response time`,keywords:[`sort`,`latest`,`ping`]},{id:`sort-avg-ping`,label:`Sort by avg ping`,shortcut:`A`,description:`Average response time`,keywords:[`sort`,`avg`,`average`,`ping`]},{id:`sort-swe`,label:`Sort by SWE score`,shortcut:`S`,description:`Coding ability score`,keywords:[`sort`,`swe`,`score`]},{id:`sort-ctx`,label:`Sort by context`,shortcut:`C`,description:`Context window size`,keywords:[`sort`,`context`,`ctx`]},{id:`sort-health`,label:`Sort by health`,shortcut:`H`,description:`Current model status`,keywords:[`sort`,`health`,`condition`]},{id:`sort-verdict`,label:`Sort by verdict`,shortcut:`V`,description:`Overall assessment`,keywords:[`sort`,`verdict`]},{id:`sort-stability`,label:`Sort by stability`,shortcut:`B`,description:`Reliability score`,keywords:[`sort`,`stability`]},{id:`sort-uptime`,label:`Sort by uptime`,shortcut:`U`,description:`Success rate`,keywords:[`sort`,`uptime`]}]},{id:`actions`,label:`Actions`,icon:`⚙️`,children:[{id:`action-target-tool`,label:`Target tool`,icon:`🧰`,children:[{id:`action-cycle-tool-mode`,label:`Cycle target tool`,shortcut:`Z`,icon:`🔄`,description:`Rotate through every launcher mode.`,keywords:[`tool`,`mode`,`cycle`,`target`]},...pc]},{id:`action-ping-mode`,label:`Ping mode`,icon:`📶`,children:mc},{id:`action-favorites-mode`,label:`Favorites mode`,icon:`⭐`,children:[{id:`action-toggle-favorite-mode`,label:`Toggle favorites mode`,shortcut:`Y`,icon:`⭐`,description:`Switch pinned+sticky ↔ normal list behavior.`,keywords:[`favorite`,`favorites`,`mode`,`toggle`,`y`]},{id:`action-favorites-mode-pinned`,label:`Pinned + always visible`,favoritesPinned:!0,description:`Favorites stay on top and bypass current filters.`,keywords:[`favorite`,`favorites`,`pinned`,`sticky`,`always visible`]},{id:`action-favorites-mode-normal`,label:`Normal rows (starred only)`,favoritesPinned:!1,description:`Favorites keep ⭐ but follow active filters and sort.`,keywords:[`favorite`,`favorites`,`normal`,`sort`,`filter`]},{id:`action-toggle-favorite`,label:`Toggle favorite on selected row`,shortcut:`F`,icon:`⭐`,description:`Star/unstar the highlighted model.`,keywords:[`favorite`,`star`,`toggle`]}]},{id:`action-cycle-theme`,label:`Cycle theme`,shortcut:`G`,icon:`🌗`,description:`Switch dark/light/auto`,keywords:[`theme`,`dark`,`light`,`auto`]},{id:`action-reset-view`,label:`Reset view`,shortcut:`N`,icon:`🔄`,description:`Reset filters and sort`,keywords:[`reset`,`view`,`sort`,`filters`]},{id:`action-probe-404`,label:`Probe 404 Models`,shortcut:`Ctrl+Shift+P`,icon:`🔍`,description:`Test all configured models for 404/410 errors. Auto-hides broken models.`,keywords:[`probe`,`404`,`broken`,`dead`,`health`,`check`,`test`,`verify`]},{id:`action-toggle-auto-hide-broken`,label:`Toggle Auto-hide Broken Models`,icon:`🚩`,description:`Enable/disable auto-hiding of 404/410 models. Unhides all when disabled.`,keywords:[`auto`,`hide`,`broken`,`404`,`models`,`toggle`,`probe`]}]},{id:`open-settings`,label:`Settings`,shortcut:`P`,icon:`⚙️`,type:`page`,description:`API keys and preferences`,keywords:[`settings`,`config`,`api key`]},{id:`open-help`,label:`Help`,shortcut:`K`,icon:`❓`,type:`page`,description:`Show all shortcuts`,keywords:[`help`,`shortcuts`,`hotkeys`]},{id:`open-changelog`,label:`Changelog`,icon:`📋`,type:`page`,description:`Version history`,keywords:[`changelog`,`release`]},{id:`open-recommend`,label:`Smart recommend`,shortcut:`Q`,icon:`🎯`,type:`page`,description:`Find best model for task`,keywords:[`recommend`,`best model`]},{id:`open-playground`,label:`Playground`,shortcut:`;`,icon:`💬`,type:`page`,description:`Chat with the FCM router`,keywords:[`playground`,`chat`,`try`,`prompt`,`router`]},{id:`open-install-endpoints`,label:`Install endpoints`,icon:`🔌`,type:`page`,description:`Install provider catalogs`,keywords:[`install`,`endpoints`,`providers`]},{id:`open-installed-models`,label:`Installed models`,icon:`🗂️`,type:`page`,description:`View models configured in tools`,keywords:[`installed`,`models`,`configured`,`tools`,`manager`,`goose`,`crush`,`aider`]}];function gc(e=[]){let t=JSON.parse(JSON.stringify(hc)),n=t.find(e=>e.id===`filters`)?.children.find(e=>e.id===`filter-model`);if(n&&Array.isArray(e)&&e.length>0){let t=e.filter(e=>!e.hidden&&e.status!==`noauth`).slice(0,20);for(let e of t)n.children.push({id:`filter-model-${e.providerKey}-${e.modelId}`,label:e.label,modelId:e.modelId,providerKey:e.providerKey,keywords:[`filter`,`model`,e.label.toLowerCase(),e.modelId.toLowerCase()]})}return t}function _c(e,t=new Set){let n=[];function r(e,i=0){for(let a of e){if(a.type===`page`||a.type===`action`){n.push({...a,type:a.type,depth:0,hasChildren:!1,isExpanded:!1});continue}let e=t.has(a.id),o=Array.isArray(a.children)&&a.children.length>0;o?(n.push({...a,type:i===0?`category`:`subcategory`,depth:i,hasChildren:o,isExpanded:e}),e&&r(a.children,i+1)):n.push({...a,type:`command`,depth:i,hasChildren:!1,isExpanded:!1})}}return r(e),n}function vc(e=[]){let t=gc(e),n=new Set;function r(e){for(let t of e)n.add(t.id),Array.isArray(t.children)&&r(t.children)}return r(t),_c(t,n).map(e=>{let t={...e};return e.tier!==void 0&&(t.tierValue=e.tier),t})}function yc(e,t){let n=(e||``).trim().toLowerCase(),r=(t||``).toLowerCase();if(!n)return{matched:!0,score:0,positions:[]};if(!r)return{matched:!1,score:0,positions:[]};let i=0,a=[];for(let e=0;e<r.length&&i<n.length;e++)n[i]===r[e]&&(a.push(e),i++);if(i!==n.length)return{matched:!1,score:0,positions:[]};let o=n.length*10;for(let e=1;e<a.length;e++)a[e]===a[e-1]+1&&(o+=5);for(let e of a)if(e===0)o+=8;else{let t=r[e-1];(t===` `||t===`:`||t===`-`||t===`/`)&&(o+=6)}return o-=Math.max(0,r.length-n.length),{matched:!0,score:o,positions:a}}function bc(e,t){let n=(t||``).trim();if(!n)return e;let r=[];for(let t of e){let e=yc(n,t.label),i=e.score,a=e.positions,o=e.matched;if(!o&&Array.isArray(t.keywords))for(let e of t.keywords){let t=yc(n,e);if(!t.matched)continue;o=!0;let r=Math.max(1,t.score-7);r>i&&(i=r,a=[])}o&&r.push({...t,score:i,matchPositions:a})}let i=[],a=new Set;for(let e of r)e.type===`command`&&e.matchPositions&&i.find(t=>t.id===e.id)&&a.add(e.parentId);return r.sort((e,t)=>t.score===e.score?e.depth===t.depth?e.label.localeCompare(t.label):e.depth-t.depth:t.score-e.score),r}var xc={backdrop:`_backdrop_162pr_6`,modal:`_modal_162pr_19`,searchRow:`_searchRow_162pr_31`,searchIcon:`_searchIcon_162pr_38`,input:`_input_162pr_39`,kbd:`_kbd_162pr_49`,list:`_list_162pr_62`,item:`_item_162pr_70`,itemActive:`_itemActive_162pr_82`,itemDisabled:`_itemDisabled_162pr_83`,itemIcon:`_itemIcon_162pr_88`,itemLabel:`_itemLabel_162pr_89`,itemEnter:`_itemEnter_162pr_90`,empty:`_empty_162pr_96`,footer:`_footer_162pr_103`},Sc={filter:{icon:`🔍`,label:`Filter`},sort:{icon:`📶`,label:`Sort`},action:{icon:`⚙️`,label:`Action`},page:{icon:`📄`,label:`Page`},update:{icon:`⬆️`,label:`Update`},tool:{icon:`🧰`,label:`Tool`}},Cc=[`speed`,`normal`,`slow`,`forced`];function wc(e){let{onCycleTheme:t,onResetView:n,onSetPingMode:r,onOpenChangelog:i,theme:a,pingMode:o,modelsCount:s,onExport:c}=e;return[{id:`page.help`,section:`page`,label:`Open Help`,keywords:[`help`,`shortcuts`,`reference`],run:()=>e.onOpenHelp?.()},{id:`page.changelog`,section:`page`,label:`Open Changelog`,keywords:[`changelog`,`release`,`history`,`version`],run:()=>i?.()},{id:`page.playground`,section:`page`,label:`Open Playground`,keywords:[`playground`,`chat`,`try`,`prompt`,`router`],run:()=>e.onOpenPlayground?.()},{id:`page.install-endpoints`,section:`page`,label:`Open Install Endpoints (M4)`,keywords:[`install`,`endpoint`,`tool`,`configure`],disabled:!0},{id:`page.installed-models`,section:`page`,label:`Open Installed Models (M4)`,keywords:[`installed`,`models`,`tools`],disabled:!0},{id:`action.theme.cycle`,section:`action`,label:`Cycle theme (current: ${a})`,keywords:[`theme`,`dark`,`light`,`auto`],run:t},{id:`action.reset.view`,section:`action`,label:`Reset view (filters + sort)`,keywords:[`reset`,`view`,`clear`,`filters`,`sort`],run:n},{id:`action.ping.speed`,section:`action`,label:`Ping mode → Speed (2s)`,keywords:[`ping`,`mode`,`speed`,`fast`,`2s`],run:()=>r?.(`speed`)},{id:`action.ping.normal`,section:`action`,label:`Ping mode → Normal (10s)`,keywords:[`ping`,`mode`,`normal`,`10s`,`default`],run:()=>r?.(`normal`)},{id:`action.ping.slow`,section:`action`,label:`Ping mode → Slow (30s)`,keywords:[`ping`,`mode`,`slow`,`30s`,`idle`],run:()=>r?.(`slow`)},{id:`action.ping.forced`,section:`action`,label:`Ping mode → Forced (4s)`,keywords:[`ping`,`mode`,`forced`,`4s`],run:()=>r?.(`forced`)},{id:`action.export`,section:`action`,label:`Export models…`,keywords:[`export`,`download`,`json`,`csv`,`clipboard`],run:c}]}function Tc({onClose:e,onNavigate:t,onCycleTheme:n,onResetView:r,onSetPingMode:i,onOpenHelp:a,onOpenChangelog:o,onOpenCommandPalette:s,onToast:c,onExport:l,currentView:u,theme:d,pingMode:f,models:p,updateAvailable:m,latestVersion:h,onRunUpdate:g}){let[_,y]=(0,v.useState)(``),[b,x]=(0,v.useState)(0),S=(0,v.useRef)(null),C=(0,v.useRef)(null),w=(0,v.useMemo)(()=>{let e=vc(p||[]).map(e=>{let t=`action`;return e.id.startsWith(`filter-`)?t=`filter`:e.id.startsWith(`sort-`)?t=`sort`:e.id.startsWith(`action-`)?t=`action`:e.id.startsWith(`action-set-tool-`)?t=`tool`:(e.id.startsWith(`page-`)||e.id===`open-settings`||e.id===`open-help`||e.id===`open-changelog`)&&(t=`page`),{...e,section:t}}),t=wc({onCycleTheme:n,onResetView:r,onSetPingMode:i,onOpenChangelog:o,onOpenHelp:a,theme:d,pingMode:f,modelsCount:p?.length??0,onExport:l}),s=[];return m&&h&&s.push({id:`action.update.run`,section:`update`,label:`⬆️ UPDATE NOW — v${h} available (recommended!)`,keywords:[`update`,`upgrade`,`version`,`install`,`new`],run:()=>g?.()}),[...s,...e,...t]},[p,d,f,n,r,i,o,a,l,m,h,g]),ee=(0,v.useMemo)(()=>_.trim()?bc(w,_):w,[w,_]),T=(0,v.useMemo)(()=>{let e=new Map;for(let t of ee)e.has(t.section)||e.set(t.section,[]),e.get(t.section).push(t);return Array.from(e.entries())},[ee]),E=(0,v.useMemo)(()=>T.flatMap(([,e])=>e),[T]);(0,v.useEffect)(()=>{S.current?.focus()},[]),(0,v.useEffect)(()=>{b>=E.length&&x(0)},[E,b]),(0,v.useEffect)(()=>{let t=t=>{if(t.key===`Escape`){t.preventDefault(),e();return}if(t.key===`ArrowDown`){t.preventDefault(),x(e=>Math.min(E.length-1,e+1));return}if(t.key===`ArrowUp`){t.preventDefault(),x(e=>Math.max(0,e-1));return}if(t.key===`Enter`){t.preventDefault();let e=E[b];if(!e)return;if(e.disabled){c?.(`${e.label} is not available yet.`,`info`);return}D(e)}};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[E,b,e,c]);let D=(0,v.useCallback)(s=>{let u=s.id;if(u===`open-settings`){t?.(`settings`),e();return}if(u===`open-help`){a?.(),e();return}if(u===`open-changelog`){o?.(),e();return}if(u===`open-recommend`){c?.(`Recommend arrives in M3`,`info`),e();return}if(u===`open-router-dashboard`){c?.(`Router dashboard arrives in M4`,`info`),e();return}if(u===`open-installed-models`){c?.(`Installed Models arrives in M4`,`info`),e();return}if(u===`open-install-endpoints`){c?.(`Install Endpoints arrives in M4`,`info`),e();return}if(u===`action-update-now`){g?.(),e();return}if(u===`action-cycle-theme`){n?.(),e();return}if(u===`action-reset-view`){r?.(),e();return}if(u===`action-cycle-ping-mode`){let t=Cc.indexOf(f);i?.(Cc[(t+1)%Cc.length]),e();return}if(u===`action-cycle-tool-mode`){c?.(`Tool mode picker arrives in M3`,`info`),e();return}if(u===`action-toggle-favorite`){c?.(`Press F on a model row in the table.`,`info`),e();return}if(u===`action-toggle-favorite-mode`){c?.(`Set the favorites display mode in Settings (M2).`,`info`),e();return}if(u===`action-export`){l?.(),e();return}if(u===`action-benchmark-row`){c?.(`Click any AI Lat. cell to benchmark the highlighted row.`,`info`),e();return}if(u===`filter-provider-cycle`){c?.(`Use the Provider dropdown in the FilterBar.`,`info`),e();return}if(u.startsWith(`filter-tier-`)){c?.(`Tier filter — use the Tier chip row in the FilterBar.`,`info`),e();return}if(u.startsWith(`filter-provider-`)){c?.(`Provider filter — use the Provider dropdown.`,`info`),e();return}if(u===`filter-configured-toggle`){c?.(`Use the Visibility dropdown in the FilterBar.`,`info`),e();return}if(u.startsWith(`sort-`)){c?.(`Sort — click the column header in the table.`,`info`),e();return}if(u===`action-set-ping-speed`){i?.(`speed`),e();return}if(u===`action-set-ping-normal`){i?.(`normal`),e();return}if(u===`action-set-ping-slow`){i?.(`slow`),e();return}if(u===`action-set-ping-forced`){i?.(`forced`),e();return}if(typeof s.run==`function`){s.run(),e();return}c?.(`${s.label} is not wired on the Web yet.`,`info`),e()},[t,e,c,n,r,i,a,o,g,l,f]);return(0,v.useEffect)(()=>{if(!C.current)return;let e=C.current.querySelector(`[data-cmd-index="${b}"]`);e&&e.scrollIntoView({block:`nearest`})},[b]),(0,F.jsx)(`div`,{className:xc.backdrop,onClick:e,children:(0,F.jsxs)(`div`,{className:xc.modal,onClick:e=>e.stopPropagation(),children:[(0,F.jsxs)(`div`,{className:xc.searchRow,children:[(0,F.jsx)(Lr,{size:16,stroke:1.5,className:xc.searchIcon}),(0,F.jsx)(`input`,{ref:S,className:xc.input,placeholder:`Type a command… (filters, sorts, tools, theme, ping, export)`,value:_,onChange:e=>y(e.target.value),autoComplete:`off`}),(0,F.jsxs)(`span`,{className:xc.kbd,children:[(0,F.jsx)(ar,{size:10,stroke:1.5}),`K`]})]}),(0,F.jsxs)(`div`,{className:xc.list,ref:C,role:`listbox`,children:[E.length===0&&(0,F.jsx)(`div`,{className:xc.empty,children:`No matching command.`}),T.map(([e,t])=>{let n=Sc[e]||{icon:`•`,label:e};return(0,F.jsxs)(`div`,{className:xc.section,children:[(0,F.jsxs)(`div`,{className:xc.sectionHeader,children:[(0,F.jsx)(`span`,{className:xc.sectionIcon,children:n.icon}),(0,F.jsx)(`span`,{children:n.label})]}),t.map(e=>{let t=E.indexOf(e),n=t===b;return(0,F.jsxs)(`button`,{"data-cmd-index":t,className:`${xc.item} ${n?xc.itemActive:``} ${e.disabled?xc.itemDisabled:``}`,onClick:()=>D(e),onMouseEnter:()=>x(t),role:`option`,"aria-selected":n,"aria-disabled":e.disabled?`true`:void 0,children:[(0,F.jsxs)(`span`,{className:xc.itemLabel,children:[e.label,e.shortcut&&(0,F.jsx)(`span`,{className:xc.shortcut,children:e.shortcut})]}),e.description&&(0,F.jsx)(`span`,{className:xc.itemDesc,children:e.description}),n&&(0,F.jsx)(`span`,{className:xc.itemEnter,children:`↵`})]},e.id)})]},e)})]}),(0,F.jsxs)(`div`,{className:xc.footer,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`↑↓`}),` navigate`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`↵`}),` select`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`Esc`}),` close`]}),(0,F.jsxs)(`span`,{className:xc.footerRight,children:[`Powered by the TUI command registry — 1:1 parity`,(0,F.jsx)(ur,{size:10,stroke:1.5,style:{marginLeft:4}})]})]})]})})}var Ec={backdrop:`_backdrop_1y1s7_6`,modal:`_modal_1y1s7_19`,header:`_header_1y1s7_31`,titleRow:`_titleRow_1y1s7_36`,title:`_title_1y1s7_36`,closeBtn:`_closeBtn_1y1s7_50`,searchBar:`_searchBar_1y1s7_63`,searchIcon:`_searchIcon_1y1s7_78`,searchInput:`_searchInput_1y1s7_79`,note:`_note_1y1s7_90`,body:`_body_1y1s7_106`,section:`_section_1y1s7_112`,sectionTitle:`_sectionTitle_1y1s7_113`,itemList:`_itemList_1y1s7_122`,item:`_item_1y1s7_122`,itemKey:`_itemKey_1y1s7_141`,itemDesc:`_itemDesc_1y1s7_147`,empty:`_empty_1y1s7_152`},Dc=[{id:`navigation`,title:`🧭 Navigation`,items:[{key:`↑ / ↓`,desc:`Navigate rows in the main table (planned — currently mouse-only)`},{key:`Enter`,desc:`Open the detail panel for the focused row`},{key:`Esc`,desc:`Close any open modal or detail panel`}]},{id:`filters`,title:`🔍 Filters`,items:[{key:`Tier chip`,desc:`Click to cycle: All → S+ → S → A+ → A → A- → B+ → B → C → All`},{key:`Status chip`,desc:`Click to cycle: All → Up → Down → Pending`},{key:`Verdict chip`,desc:`Click to cycle: All → Perfect → Normal → Spiky → Slow → Overloaded → Down → Unstable → Pending`},{key:`Health chip`,desc:`Click to cycle: All → Up → Timeout → Down → Pending → No key → Auth err`},{key:`Visibility`,desc:`Normal (all) / Configured only (hide no-key) / Usable only (UP + good verdict)`},{key:`Provider dropdown`,desc:`Filter by provider`},{key:`Custom text filter`,desc:"Apply via ⌘K palette or `Apply text filter` — clear with the X chip"},{key:`Reset button`,desc:`Clears every active filter + sort back to defaults`}]},{id:`sort`,title:`📶 Sort`,items:[{key:`Click any column header`,desc:`Sort asc → desc → reset (no sort, default order)`},{key:`Resizable columns`,desc:`Drag the right edge of any header to resize. Double-click resets one column.`}]},{id:`favorites`,title:`⭐ Favorites`,items:[{key:`Star button (per row)`,desc:`Click to favorite / unfavorite the model (TUI: F key)`},{key:`Detail panel`,desc:`Favorite + Up/Down reorder + current priority rank (TUI: Shift+↑/↓)`},{key:`Pinned mode`,desc:`In the Settings view, toggle "Pinned + always visible" (TUI: Y key)`},{key:`Shared with TUI`,desc:`Favorites are persisted in the same ~/.free-coding-models.json the TUI uses`}]},{id:`benchmark`,title:`🤖 AI Speed Test (benchmark)`,items:[{key:`Header button`,desc:`Run a global AI Speed Test on every visible model`},{key:`AI Lat. cell`,desc:`Click any AI Lat. cell to benchmark just that model (TUI: Ctrl+A)`},{key:`Detail panel`,desc:`Dedicated "AI Speed Test" button (TUI: Ctrl+A)`},{key:`TPS column`,desc:`Tokens per second for the model — appears after a benchmark run`},{key:`Latency column`,desc:`Real completion latency (not just ping) for the model`}]},{id:`tools`,title:`🧰 Tool mode (M3)`,items:[{key:`M3 shipped`,desc:`Endpoint target picker, per-row Install Endpoint button, and incompatible-target fallback modal`}]},{id:`palette`,title:`⚡ Command palette`,items:[{key:`⌘K / Ctrl+P`,desc:`The Web's only global keyboard shortcut — toggles the command palette`},{key:`Type to search`,desc:`Fuzzy match across all filters, sorts, tools, pages, and theme / ping / reset actions`},{key:`↑ / ↓ + Enter`,desc:`Navigate the results and execute the highlighted command`},{key:`Esc`,desc:`Close the palette without running anything`}]},{id:`theme`,title:`🌗 Theme`,items:[{key:`Theme button (header)`,desc:`Click to cycle: auto → dark → light (TUI: G key)`},{key:`Auto mode`,desc:`Follows the OS prefers-color-scheme preference and updates live`}]},{id:`ping`,title:`⚡ Ping mode`,items:[{key:`Speed / Normal / Slow / Forced`,desc:`Ping cadence (2s / 10s / 30s / 4s) — TUI: W key`},{key:`next ping in Xs`,desc:`Live countdown shown in the FilterBar (TUI footer style)`}]},{id:`url`,title:`🔗 URL deep-linking`,items:[{key:`?tier=S+&sort=verdict&origin=groq&view=dashboard`,desc:`Every filter / sort / view is reflected in the URL — share pre-filtered links`}]},{id:`cli`,title:`⌨️ CLI parity`,items:[{key:`Same storage`,desc:`The Web reads + writes the same ~/.free-coding-models.json as the TUI`},{key:`Same engine`,desc:`All model parsing, ping, and benchmark code is shared with the TUI`}]},{id:`how-router-works`,title:`🌐 How the FCM Router works`,items:[{key:`Smart router`,desc:`Point any OpenAI client at http://localhost:19280/v1 with model: "fcm". The daemon picks the healthiest model in the active set and forwards the request with automatic failover.`},{key:`Pre-prompt`,desc:`A first-class system message is injected on every proxied request. The default introduces the assistant as the FCM routing agent. Edit from Settings.`},{key:`Probes`,desc:`Every 10s/30s/120s (eco/balanced/aggressive) the daemon sends a 1-token chat-completion ping to every model in the active set. The probe measures latency + status code, not just URL reachability — so a wrong API key is caught and the circuit opens.`},{key:`Circuit breaker`,desc:`Per-model state. Healthy (green) = last probe 2xx, route here. Down (red) = last 3 probes failed, skip until cooldown. Recovering (yellow) = cooldown expired, retrying. Auth error (orange) = 401/403, your key is wrong. Deprecated (gray) = removed from catalog, will be replaced by auto-heal.`},{key:`Failover order`,desc:`Models are tried in priority order. A model in Recovering/Down/Auth error is skipped — the request goes to the next healthy one. If ALL fail, you get 503 with the "models_tried" list in the error body.`},{key:`Auto-heal`,desc:`On daemon start, every Auth-error / Deprecated model in the active set is swapped for a working alternative (same provider first, then cross-provider). The first time you add/remove/reorder a model, auto-heal switches off.`},{key:`Rate limits`,desc:`Each provider has its own quota. Common free-tier limits: Groq 14 400 RPD, Mistral 1 RPS, NVIDIA ~40 RPM, OpenRouter 50 RPD. When a provider returns 429, the router fails over. When daily quota is exhausted, the model goes Auth error and auto-heal swaps it out next start.`}]}];function Oc({onClose:e}){let[t,n]=(0,v.useState)(``),r=(0,v.useMemo)(()=>{let e=t.trim().toLowerCase();return e?Dc.map(t=>({...t,items:t.items.filter(t=>t.key.toLowerCase().includes(e)||t.desc.toLowerCase().includes(e))})).filter(e=>e.items.length>0):Dc},[t]);return(0,F.jsx)(`div`,{className:Ec.backdrop,onClick:e,children:(0,F.jsxs)(`div`,{className:Ec.modal,onClick:e=>e.stopPropagation(),children:[(0,F.jsxs)(`div`,{className:Ec.header,children:[(0,F.jsxs)(`div`,{className:Ec.titleRow,children:[(0,F.jsx)(`h2`,{className:Ec.title,children:`❓ Help & Keyboard Shortcuts`}),(0,F.jsx)(`button`,{className:Ec.closeBtn,onClick:e,"aria-label":`Close help`,children:(0,F.jsx)(Jr,{size:18,stroke:1.5})})]}),(0,F.jsxs)(`div`,{className:Ec.searchBar,children:[(0,F.jsx)(Lr,{size:14,stroke:1.5,className:Ec.searchIcon}),(0,F.jsx)(`input`,{className:Ec.searchInput,placeholder:`Search help (filters, hotkeys, TUI parity)…`,value:t,onChange:e=>n(e.target.value),autoFocus:!0})]}),(0,F.jsxs)(`p`,{className:Ec.note,children:[`The Web Dashboard is mouse-first. The only global keyboard shortcut is`,` `,(0,F.jsx)(`kbd`,{children:`⌘K`}),` / `,(0,F.jsx)(`kbd`,{children:`Ctrl+P`}),` for the command palette — everything else lives here, in the header menu, or in modals.`]})]}),(0,F.jsx)(`div`,{className:Ec.body,children:r.length===0?(0,F.jsxs)(`div`,{className:Ec.empty,children:[`No help matches "`,t,`".`]}):r.map(e=>(0,F.jsxs)(`section`,{className:Ec.section,children:[(0,F.jsx)(`h3`,{className:Ec.sectionTitle,children:e.title}),(0,F.jsx)(`ul`,{className:Ec.itemList,children:e.items.map(e=>(0,F.jsxs)(`li`,{className:Ec.item,children:[(0,F.jsx)(`span`,{className:Ec.itemKey,children:e.key}),(0,F.jsx)(`span`,{className:Ec.itemDesc,children:e.desc})]},e.key+e.desc))})]},e.id))})]})})}function kc(){let[e,t]=(0,v.useState)({}),[n,r]=(0,v.useState)(!0),[i,a]=(0,v.useState)(null),o=(0,v.useCallback)(async()=>{try{let e=await fetch(`/api/changelog`);if(!e.ok)throw Error(`HTTP ${e.status}`);t((await e.json())?.versions??{}),a(null)}catch(e){a(e.message||`Failed to load changelog`)}finally{r(!1)}},[]);return(0,v.useEffect)(()=>{o()},[o]),{versions:e,sortedVersions:(0,v.useMemo)(()=>Object.keys(e).sort((e,t)=>{let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){let t=n[e]||0,i=r[e]||0;if(i!==t)return i-t}return 0}),[e]),getVersion:(0,v.useCallback)(t=>e[t]??null,[e]),loading:n,error:i,refresh:o}}var Ac={backdrop:`_backdrop_5ik46_6`,modal:`_modal_5ik46_19`,header:`_header_5ik46_31`,titleRow:`_titleRow_5ik46_36`,title:`_title_5ik46_36`,backBtn:`_backBtn_5ik46_51`,closeBtn:`_closeBtn_5ik46_68`,body:`_body_5ik46_82`,indexWrap:`_indexWrap_5ik46_88`,indexHint:`_indexHint_5ik46_89`,versionList:`_versionList_5ik46_95`,versionBtn:`_versionBtn_5ik46_103`,versionLabel:`_versionLabel_5ik46_119`,versionSummary:`_versionSummary_5ik46_125`,details:`_details_5ik46_130`,section:`_section_5ik46_131`,sectionTitle:`_sectionTitle_5ik46_132`,itemList:`_itemList_5ik46_140`,item:`_item_5ik46_140`,empty:`_empty_5ik46_155`},jc=[{key:`added`,label:`✨ Added`,icon:`✨`},{key:`fixed`,label:`🐛 Fixed`,icon:`🐛`},{key:`changed`,label:`🔄 Changed`,icon:`🔄`},{key:`updated`,label:`📝 Updated`,icon:`📝`}];function Mc({onClose:e,defaultVersion:t=null}){let{sortedVersions:n,getVersion:r,loading:i,error:a}=kc(),[o,s]=(0,v.useState)(t?`details`:`index`),[c,l]=(0,v.useState)(t),u=e=>{l(e),s(`details`)},d=()=>{l(null),s(`index`)},f=c?r(c):null;return(0,F.jsx)(`div`,{className:Ac.backdrop,onClick:e,children:(0,F.jsxs)(`div`,{className:Ac.modal,onClick:e=>e.stopPropagation(),children:[(0,F.jsx)(`div`,{className:Ac.header,children:(0,F.jsxs)(`div`,{className:Ac.titleRow,children:[(0,F.jsx)(`h2`,{className:Ac.title,children:o===`index`?`📋 Changelog`:`📋 v${c}`}),o===`details`&&(0,F.jsxs)(`button`,{className:Ac.backBtn,onClick:d,title:`Back to index (TUI: B)`,children:[(0,F.jsx)(Hn,{size:14,stroke:1.5}),` Index`]}),(0,F.jsx)(`button`,{className:Ac.closeBtn,onClick:e,"aria-label":`Close changelog`,children:(0,F.jsx)(Jr,{size:18,stroke:1.5})})]})}),(0,F.jsxs)(`div`,{className:Ac.body,children:[i&&(0,F.jsx)(`div`,{className:Ac.empty,children:`Loading changelog…`}),a&&!i&&(0,F.jsxs)(`div`,{className:Ac.empty,children:[`Failed to load changelog: `,a]}),!i&&!a&&o===`index`&&(0,F.jsxs)(`div`,{className:Ac.indexWrap,children:[(0,F.jsxs)(`p`,{className:Ac.indexHint,children:[n.length,` versions. Click any to read the release notes.`]}),(0,F.jsx)(`ul`,{className:Ac.versionList,children:n.map(e=>{let t=r(e),n=[];return t?.added?.length&&n.push(`${t.added.length} added`),t?.fixed?.length&&n.push(`${t.fixed.length} fixed`),t?.changed?.length&&n.push(`${t.changed.length} changed`),(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{className:Ac.versionBtn,onClick:()=>u(e),children:[(0,F.jsxs)(`span`,{className:Ac.versionLabel,children:[`v`,e]}),(0,F.jsx)(`span`,{className:Ac.versionSummary,children:n.length>0?n.join(` · `):`—`})]})},e)})})]}),!i&&!a&&o===`details`&&f&&(0,F.jsxs)(`div`,{className:Ac.details,children:[jc.map(({key:e,label:t})=>{let n=f[e];return!n||n.length===0?null:(0,F.jsxs)(`section`,{className:Ac.section,children:[(0,F.jsx)(`h3`,{className:Ac.sectionTitle,children:t}),(0,F.jsx)(`ul`,{className:Ac.itemList,children:n.map((e,t)=>(0,F.jsx)(`li`,{className:Ac.item,children:Nc(e)},t))})]},e)}),jc.every(({key:e})=>!f[e]?.length)&&(0,F.jsxs)(`div`,{className:Ac.empty,children:[`No release notes for v`,c,`.`]})]}),!i&&!a&&o===`details`&&!f&&(0,F.jsxs)(`div`,{className:Ac.empty,children:[`No notes for v`,c,`.`]})]})]})})}function Nc(e){return e.replace(/\*\*([^*]+)\*\*/g,`$1`).replace(/`([^`]+)`/g,`$1`).trim()}var J={wrap:`_wrap_10lrt_6`,chip:`_chip_10lrt_11`,checking:`_checking_10lrt_34`,dot:`_dot_10lrt_42`,pulse:`_pulse_10lrt_1`,popover:`_popover_10lrt_54`,popoverHeader:`_popoverHeader_10lrt_67`,popoverTitle:`_popoverTitle_10lrt_74`,popoverClose:`_popoverClose_10lrt_82`,popoverBody:`_popoverBody_10lrt_95`,popoverActions:`_popoverActions_10lrt_107`,primaryAction:`_primaryAction_10lrt_113`,secondaryAction:`_secondaryAction_10lrt_114`};function Pc({updateAvailable:e,latestVersion:t,onRunUpdate:n,onOpenChangelog:r,checking:i}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(!a)return;let e=e=>{s.current&&!s.current.contains(e.target)&&o(!1)},t=e=>{e.key===`Escape`&&o(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[a]),e?(0,F.jsxs)(`div`,{className:J.wrap,ref:s,children:[(0,F.jsxs)(`button`,{className:J.chip,onClick:()=>o(e=>!e),title:`Update available: v${t}. Click to install.`,"aria-expanded":a,"aria-haspopup":`dialog`,children:[(0,F.jsx)(cr,{size:13,stroke:1.5}),(0,F.jsxs)(`span`,{children:[`v`,t]})]}),a&&(0,F.jsxs)(`div`,{className:J.popover,role:`dialog`,"aria-label":`Update available`,children:[(0,F.jsxs)(`div`,{className:J.popoverHeader,children:[(0,F.jsxs)(`div`,{className:J.popoverTitle,children:[(0,F.jsx)(cr,{size:14,stroke:1.5}),(0,F.jsx)(`span`,{children:`Update available`})]}),(0,F.jsx)(`button`,{className:J.popoverClose,onClick:()=>o(!1),"aria-label":`Close`,children:(0,F.jsx)(Jr,{size:14,stroke:1.5})})]}),(0,F.jsxs)(`p`,{className:J.popoverBody,children:[`A newer version (`,(0,F.jsxs)(`strong`,{children:[`v`,t]}),`) is available on npm. After updating, restart the dashboard to pick up the changes.`]}),(0,F.jsxs)(`div`,{className:J.popoverActions,children:[(0,F.jsxs)(`button`,{className:J.primaryAction,onClick:()=>{o(!1),n?.()},children:[(0,F.jsx)(cr,{size:13,stroke:1.5}),(0,F.jsx)(`span`,{children:`Update now`})]}),(0,F.jsxs)(`button`,{className:J.secondaryAction,onClick:()=>{o(!1),r?.(t)},children:[(0,F.jsx)(vr,{size:13,stroke:1.5}),(0,F.jsx)(`span`,{children:`What's new`})]})]})]})]}):i?(0,F.jsx)(`span`,{className:J.checking,title:`Checking for updates…`,children:(0,F.jsx)(`span`,{className:J.dot})}):null}var Fc={quickfix:{label:`Quick Fix`,sweWeight:.2,speedWeight:.5,ctxWeight:.1,stabilityWeight:.2},refactor:{label:`Deep Refactor`,sweWeight:.4,speedWeight:.1,ctxWeight:.3,stabilityWeight:.2},review:{label:`Code Review`,sweWeight:.35,speedWeight:.2,ctxWeight:.25,stabilityWeight:.2},testgen:{label:`Test Generation`,sweWeight:.35,speedWeight:.15,ctxWeight:.2,stabilityWeight:.3}},Ic={speed:{label:`Speed`,speedMultiplier:1.5,sweMultiplier:.7},quality:{label:`Quality`,speedMultiplier:.7,sweMultiplier:1.5},balanced:{label:`Balanced`,speedMultiplier:1,sweMultiplier:1}},Lc={small:{label:`Small file (<4K)`,minCtx:0,idealCtx:32},medium:{label:`Medium project (<32K)`,minCtx:32,idealCtx:128},large:{label:`Large codebase (>32K)`,minCtx:128,idealCtx:256}};function Rc({onToast:e}={}){let[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)(0),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)(null),l=(0,v.useRef)(null);return(0,v.useEffect)(()=>()=>{l.current&&clearInterval(l.current)},[]),{recommend:(0,v.useCallback)(async t=>{l.current&&clearInterval(l.current),n(!0),i(0),o([]),c(null);let r=Date.now();l.current=setInterval(()=>{i(Math.min(98,Math.round((Date.now()-r)/1e4*100)))},250);try{await new Promise(e=>setTimeout(e,1e4));let e=await fetch(`/api/recommend`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({answers:t})}),n=await e.json().catch(()=>({}));if(!e.ok)throw Error(n.error||`HTTP ${e.status}`);return o(Array.isArray(n.top3)?n.top3:[]),i(100),{ok:!0,top3:n.top3||[]}}catch(t){return c(t.message),e?.(`Recommend failed: ${t.message}`,`error`),{ok:!1,error:t.message}}finally{l.current&&clearInterval(l.current),l.current=null,n(!1)}},[e]),loading:t,progress:r,results:a,error:s,reset:(0,v.useCallback)(()=>{l.current&&clearInterval(l.current),l.current=null,n(!1),i(0),o([]),c(null)},[])}}var zc={backdrop:`_backdrop_7j81h_2`,modal:`_modal_7j81h_13`,header:`_header_7j81h_23`,footer:`_footer_7j81h_24`,eyebrow:`_eyebrow_7j81h_27`,summary:`_summary_7j81h_28`,muted:`_muted_7j81h_29`,close:`_close_7j81h_30`,secondary:`_secondary_7j81h_31`,body:`_body_7j81h_35`,steps:`_steps_7j81h_36`,options:`_options_7j81h_38`,option:`_option_7j81h_38`,progress:`_progress_7j81h_43`,percent:`_percent_7j81h_45`,results:`_results_7j81h_46`,resultCard:`_resultCard_7j81h_47`,medal:`_medal_7j81h_48`,resultMain:`_resultMain_7j81h_49`,score:`_score_7j81h_53`,error:`_error_7j81h_54`},Bc=[{key:`taskType`,title:`What are you working on?`,options:Fc},{key:`priority`,title:`What matters most?`,options:Ic},{key:`contextBudget`,title:`How big is your context?`,options:Lc}];function Vc({onClose:e,onLaunch:t,onPinAndLaunch:n,toolMode:r,onToast:i}){let[a,o]=(0,v.useState)(0),[s,c]=(0,v.useState)({taskType:null,priority:null,contextBudget:null}),{recommend:l,loading:u,progress:d,results:f,error:p,reset:m}=Rc({onToast:i}),h=Bc[a],g=f.length>0,_=(0,v.useMemo)(()=>Bc.map(e=>e.options[s[e.key]]?.label).filter(Boolean).join(` · `),[s]);async function y(e){let t={...s,[h.key]:e};if(c(t),a<Bc.length-1){o(a+1);return}await l(t)}function b(){if(g||u){m(),o(0),c({taskType:null,priority:null,contextBudget:null});return}o(e=>Math.max(0,e-1))}return(0,F.jsx)(`div`,{className:zc.backdrop,onClick:e,children:(0,F.jsxs)(`div`,{className:zc.modal,onClick:e=>e.stopPropagation(),children:[(0,F.jsxs)(`header`,{className:zc.header,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:zc.eyebrow,children:`Smart Recommend`}),(0,F.jsxs)(`h2`,{children:[(0,F.jsx)(Br,{size:20}),` Find the best model for this task`]}),_&&(0,F.jsx)(`p`,{className:zc.summary,children:_})]}),(0,F.jsx)(`button`,{className:zc.close,onClick:e,"aria-label":`Close`,children:(0,F.jsx)(Jr,{size:18})})]}),!u&&!g&&(0,F.jsxs)(`main`,{className:zc.body,children:[(0,F.jsxs)(`div`,{className:zc.steps,children:[`Question `,a+1,` / `,Bc.length]}),(0,F.jsx)(`h3`,{children:h.title}),(0,F.jsx)(`div`,{className:zc.options,children:Object.entries(h.options).map(([e,t])=>(0,F.jsxs)(`button`,{className:zc.option,onClick:()=>y(e),children:[(0,F.jsx)(`strong`,{children:t.label}),(0,F.jsx)(`span`,{children:e})]},e))})]}),u&&(0,F.jsxs)(`main`,{className:zc.body,children:[(0,F.jsx)(`h3`,{children:`Analyzing live catalog…`}),(0,F.jsx)(`p`,{className:zc.muted,children:`10 seconds · roughly 2 checks/sec · same scoring as the TUI.`}),(0,F.jsx)(`div`,{className:zc.progress,children:(0,F.jsx)(`span`,{style:{width:`${d}%`}})}),(0,F.jsxs)(`p`,{className:zc.percent,children:[d,`%`]})]}),g&&(0,F.jsxs)(`main`,{className:zc.body,children:[(0,F.jsx)(`h3`,{children:`Top 3 recommendations`}),(0,F.jsx)(`div`,{className:zc.results,children:f.map((e,t)=>(0,F.jsxs)(`article`,{className:zc.resultCard,children:[(0,F.jsx)(`div`,{className:zc.medal,children:[`🥇`,`🥈`,`🥉`][t]}),(0,F.jsxs)(`div`,{className:zc.resultMain,children:[(0,F.jsx)(`strong`,{children:e.result.label}),(0,F.jsxs)(`span`,{children:[e.result.origin,` · `,e.result.tier,` · `,e.result.ctx]}),(0,F.jsx)(`p`,{children:e.reason})]}),(0,F.jsx)(`div`,{className:zc.score,children:e.score}),(0,F.jsx)(xs,{model:e.result,toolMode:r,onLaunch:()=>n?.(e.result)})]},`${e.result.providerKey}/${e.result.modelId}`))})]}),p&&(0,F.jsx)(`p`,{className:zc.error,children:p}),(0,F.jsxs)(`footer`,{className:zc.footer,children:[(0,F.jsxs)(`button`,{className:zc.secondary,onClick:b,disabled:a===0&&!u&&!g,children:[(0,F.jsx)(Hn,{size:14}),` `,g||u?`Restart`:`Back`]}),(0,F.jsx)(`button`,{className:zc.secondary,onClick:e,children:`Close`})]})]})})}var Hc={backdrop:`_backdrop_8r8li_2`,modal:`_modal_8r8li_13`,modalWide:`_modalWide_8r8li_14`,header:`_header_8r8li_25`,eyebrow:`_eyebrow_8r8li_40`,close:`_close_8r8li_48`,body:`_body_8r8li_61`,command:`_command_8r8li_62`,note:`_note_8r8li_72`,muted:`_muted_8r8li_73`,docs:`_docs_8r8li_74`,error:`_error_8r8li_75`,footer:`_footer_8r8li_76`,primary:`_primary_8r8li_83`,secondary:`_secondary_8r8li_84`,option:`_option_8r8li_85`,grid:`_grid_8r8li_103`,card:`_card_8r8li_104`,stack:`_stack_8r8li_111`};function Uc({request:e,models:t=[],onClose:n,onSwitchToolLaunch:r,onLaunchSimilar:i}){if(!e?.model)return null;let{model:a,toolMode:o}=e,s=yn(o),c=xn(a.providerKey),l=Cn(a.sweScore,o,t,3).filter(e=>e.modelId!==a.modelId||e.providerKey!==a.providerKey);return(0,F.jsx)(`div`,{className:Hc.backdrop,onClick:n,children:(0,F.jsxs)(`div`,{className:Hc.modalWide,onClick:e=>e.stopPropagation(),children:[(0,F.jsxs)(`div`,{className:Hc.header,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:Hc.eyebrow,children:`Incompatible model`}),(0,F.jsxs)(`h2`,{children:[(0,F.jsx)(Bn,{size:18}),` `,a.label,` cannot be installed in `,s.emoji,` `,s.label]})]}),(0,F.jsx)(`button`,{className:Hc.close,onClick:n,"aria-label":`Close`,children:(0,F.jsx)(Jr,{size:18})})]}),(0,F.jsxs)(`div`,{className:Hc.grid,children:[(0,F.jsxs)(`section`,{className:Hc.card,children:[(0,F.jsxs)(`h3`,{children:[(0,F.jsx)(Ur,{size:15}),` Switch tool`]}),(0,F.jsx)(`p`,{className:Hc.muted,children:`This provider can be configured in these tools. Pick one and FCM installs the endpoint.`}),(0,F.jsx)(`div`,{className:Hc.stack,children:c.map(e=>{let t=yn(e);return(0,F.jsxs)(`button`,{className:Hc.option,onClick:()=>r?.(e,a),children:[(0,F.jsx)(`span`,{children:t.emoji}),(0,F.jsx)(`strong`,{children:t.label})]},e)})})]}),(0,F.jsxs)(`section`,{className:Hc.card,children:[(0,F.jsxs)(`h3`,{children:[(0,F.jsx)(jr,{size:15}),` Similar models`]}),(0,F.jsxs)(`p`,{className:Hc.muted,children:[`Or keep `,s.label,` and install a compatible model close to the same SWE score.`]}),(0,F.jsxs)(`div`,{className:Hc.stack,children:[l.length===0&&(0,F.jsx)(`p`,{className:Hc.muted,children:`No close compatible alternative found yet.`}),l.map(e=>(0,F.jsxs)(`button`,{className:Hc.option,onClick:()=>i?.(e),children:[(0,F.jsx)(`span`,{children:e.tier}),(0,F.jsx)(`strong`,{children:e.label}),(0,F.jsxs)(`small`,{children:[e.providerKey,` · `,e.sweScore]})]},`${e.providerKey}/${e.modelId}`))]})]})]})]})})}var Y={overlay:`_overlay_68cg1_1`,fadeIn:`_fadeIn_68cg1_1`,modal:`_modal_68cg1_12`,header:`_header_68cg1_24`,title:`_title_68cg1_32`,closeBtn:`_closeBtn_68cg1_42`,body:`_body_68cg1_53`,heroCard:`_heroCard_68cg1_60`,heroRunning:`_heroRunning_68cg1_69`,heroStopped:`_heroStopped_68cg1_74`,heroLeft:`_heroLeft_68cg1_79`,heroStatus:`_heroStatus_68cg1_85`,statusDot:`_statusDot_68cg1_91`,dotGreen:`_dotGreen_68cg1_98`,dotGray:`_dotGray_68cg1_103`,heroLabel:`_heroLabel_68cg1_107`,heroMeta:`_heroMeta_68cg1_113`,heroActions:`_heroActions_68cg1_121`,startBtn:`_startBtn_68cg1_127`,startBtnBig:`_startBtnBig_68cg1_144`,stopBtn:`_stopBtn_68cg1_150`,refreshBtn:`_refreshBtn_68cg1_166`,quickSetup:`_quickSetup_68cg1_181`,quickSetupHero:`_quickSetupHero_68cg1_186`,copyAllBtn:`_copyAllBtn_68cg1_195`,sectionTitle:`_sectionTitle_68cg1_212`,quickRows:`_quickRows_68cg1_224`,quickRow:`_quickRow_68cg1_224`,quickLabel:`_quickLabel_68cg1_240`,quickValue:`_quickValue_68cg1_248`,copyBtn:`_copyBtn_68cg1_258`,section:`_section_68cg1_212`,probeModes:`_probeModes_68cg1_273`,probeBtn:`_probeBtn_68cg1_278`,probeActive:`_probeActive_68cg1_290`,modelList:`_modelList_68cg1_298`,modelRow:`_modelRow_68cg1_304`,modelPriority:`_modelPriority_68cg1_314`,modelName:`_modelName_68cg1_320`,modelScore:`_modelScore_68cg1_329`,modelLatency:`_modelLatency_68cg1_335`,circuitBadge:`_circuitBadge_68cg1_341`,circuitClosed:`_circuitClosed_68cg1_352`,circuitOpen:`_circuitOpen_68cg1_353`,circuitHalfOpen:`_circuitHalfOpen_68cg1_354`,circuitAuth:`_circuitAuth_68cg1_355`,circuitUnknown:`_circuitUnknown_68cg1_356`,logList:`_logList_68cg1_359`,logRow:`_logRow_68cg1_365`,logOk:`_logOk_68cg1_374`,logErr:`_logErr_68cg1_375`,logModel:`_logModel_68cg1_376`,logLatency:`_logLatency_68cg1_377`,logTokens:`_logTokens_68cg1_378`,logFailover:`_logFailover_68cg1_379`,logEmpty:`_logEmpty_68cg1_388`,setMeta:`_setMeta_68cg1_405`,setMetaName:`_setMetaName_68cg1_414`,setActions:`_setActions_68cg1_420`,smallBtn:`_smallBtn_68cg1_426`,primaryBtn:`_primaryBtn_68cg1_443`,setList:`_setList_68cg1_460`,setEmpty:`_setEmpty_68cg1_467`,setEmptyTitle:`_setEmptyTitle_68cg1_477`,setEmptyHint:`_setEmptyHint_68cg1_484`,setRow:`_setRow_68cg1_494`,setRowDragging:`_setRowDragging_68cg1_513`,setRowDropTarget:`_setRowDropTarget_68cg1_519`,setRowDropTargetAbove:`_setRowDropTargetAbove_68cg1_524`,setRowDropTargetBelow:`_setRowDropTargetBelow_68cg1_528`,setDragHandle:`_setDragHandle_68cg1_532`,setPriority:`_setPriority_68cg1_543`,setKey:`_setKey_68cg1_552`,setTier:`_setTier_68cg1_562`,setPriorityPrimary:`_setPriorityPrimary_68cg1_577`,setPriorityFallback:`_setPriorityFallback_68cg1_589`,setRowNext:`_setRowNext_68cg1_597`,priorityLegend:`_priorityLegend_68cg1_604`,legendPrimary:`_legendPrimary_68cg1_618`,legendFallback:`_legendFallback_68cg1_626`,legendSeparator:`_legendSeparator_68cg1_631`,legendNext:`_legendNext_68cg1_636`,setRowBtns:`_setRowBtns_68cg1_647`,iconBtn:`_iconBtn_68cg1_652`,removeBtn:`_removeBtn_68cg1_666`,pickerPanel:`_pickerPanel_68cg1_669`,pickerHeader:`_pickerHeader_68cg1_680`,pickerSearch:`_pickerSearch_68cg1_689`,pickerInput:`_pickerInput_68cg1_694`,pickerSelect:`_pickerSelect_68cg1_707`,pickerList:`_pickerList_68cg1_720`,pickerItem:`_pickerItem_68cg1_728`,pickerItemAdded:`_pickerItemAdded_68cg1_741`,pickerProvider:`_pickerProvider_68cg1_747`,pickerModel:`_pickerModel_68cg1_752`,pickerBadge:`_pickerBadge_68cg1_759`,pickerBadgeOk:`_pickerBadgeOk_68cg1_769`,pickerEmpty:`_pickerEmpty_68cg1_774`,saveStatus:`_saveStatus_68cg1_781`,saveStatusOk:`_saveStatusOk_68cg1_791`,saveStatusErr:`_saveStatusErr_68cg1_792`,autoHealBanner:`_autoHealBanner_68cg1_796`,autoHealLeft:`_autoHealLeft_68cg1_808`,autoHealIcon:`_autoHealIcon_68cg1_816`,autoHealTitle:`_autoHealTitle_68cg1_823`,autoHealHint:`_autoHealHint_68cg1_830`,autoHealActions:`_autoHealActions_68cg1_840`,probeBtnActive:`_probeBtnActive_68cg1_852`,probeProgress:`_probeProgress_68cg1_859`,probeProgressLabel:`_probeProgressLabel_68cg1_870`,probeProgressCount:`_probeProgressCount_68cg1_879`,probeProgressBar:`_probeProgressBar_68cg1_886`,probeProgressFill:`_probeProgressFill_68cg1_893`,aiLatencyCell:`_aiLatencyCell_68cg1_904`,aiLatencyMs:`_aiLatencyMs_68cg1_914`,aiLatencyTps:`_aiLatencyTps_68cg1_919`,aiLatencySpin:`_aiLatencySpin_68cg1_924`,probeSpin:`_probeSpin_68cg1_1`,aiLatencyErr:`_aiLatencyErr_68cg1_936`,aiLatencyNone:`_aiLatencyNone_68cg1_941`,miniPgHint:`_miniPgHint_68cg1_950`,miniPg:`_miniPg_68cg1_950`,miniPgEmpty:`_miniPgEmpty_68cg1_976`,miniPgMsg:`_miniPgMsg_68cg1_983`,miniPgUser:`_miniPgUser_68cg1_990`,miniPgAssistant:`_miniPgAssistant_68cg1_995`,miniPgBubble:`_miniPgBubble_68cg1_1000`,miniPgTyping:`_miniPgTyping_68cg1_1022`,miniPgError:`_miniPgError_68cg1_1028`,miniPgAborted:`_miniPgAborted_68cg1_1035`,miniPgTarget:`_miniPgTarget_68cg1_1047`,miniPgRouted:`_miniPgRouted_68cg1_1045`,miniPgInputRow:`_miniPgInputRow_68cg1_1074`,miniPgInput:`_miniPgInput_68cg1_1074`,miniPgSendBtn:`_miniPgSendBtn_68cg1_1101`,miniPgStopBtn:`_miniPgStopBtn_68cg1_1102`};function Wc(e){if(!e||e<=0)return`—`;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return t>0?`${t}h ${n}m`:n>0?`${n}m ${r}s`:`${r}s`}function Gc(e){return typeof e!=`number`||!Number.isFinite(e)?`0`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}var Kc={CLOSED:{label:`Healthy`,cls:`circuitClosed`},OPEN:{label:`Down`,cls:`circuitOpen`},HALF_OPEN:{label:`Recovering`,cls:`circuitHalfOpen`},AUTH_ERROR:{label:`Auth error`,cls:`circuitAuth`},STALE:{label:`Deprecated`,cls:`circuitUnknown`},UNSUPPORTED:{label:`Unsupported`,cls:`circuitUnknown`},UNKNOWN:{label:`Unknown`,cls:`circuitUnknown`}};function qc({state:e}){let t=Kc[e]||Kc.UNKNOWN;return(0,F.jsx)(`span`,{className:`${Y.circuitBadge} ${Y[t.cls]}`,children:t.label})}var Jc={kind:`idle`},Yc={kind:`saving`},Xc={kind:`saved`},Zc=e=>({kind:`error`,message:e});function Qc({onClose:e,onToast:t,favorites:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)({activeSet:null,sets:{}}),[b,x]=(0,v.useState)([]),[S,C]=(0,v.useState)(!1),[w,ee]=(0,v.useState)(``),[T,E]=(0,v.useState)(``),[D,O]=(0,v.useState)(Jc),te=(0,v.useRef)(null),ne=(0,v.useRef)(!1),[re,ie]=(0,v.useState)(!1),ae=(0,v.useCallback)(async()=>{try{let e=await(await fetch(`/api/router/status`)).json();if(i(e),e?.ok){let e=await(await fetch(`/api/router/stats`)).json();e.ok&&o(e)}}catch{}},[]),oe=(0,v.useCallback)(async()=>{try{let e=await(await fetch(`/api/router/sets`)).json();e&&e.sets&&y(e)}catch{}},[]),k=(0,v.useCallback)(async()=>{try{let e=await(await fetch(`/api/router/catalog`)).json();Array.isArray(e?.models)&&x(e.models)}catch{}},[]);(0,v.useEffect)(()=>{ae(),oe(),k(),fetch(`/api/router/quick-setup`).then(e=>e.json()).then(c).catch(()=>{});let e=setInterval(()=>{ae(),oe()},5e3);return()=>clearInterval(e)},[ae,oe,k]),(0,v.useEffect)(()=>{if(!re)return;let e=setInterval(()=>{ae()},1200);return()=>clearInterval(e)},[re,ae]),(0,v.useEffect)(()=>{re&&a?.globalBenchmark&&!a.globalBenchmark.running&&ie(!1)},[a?.globalBenchmark,re]),(0,v.useEffect)(()=>{if(D.kind===`saved`)return te.current=setTimeout(()=>O(Jc),1500),()=>{te.current&&clearTimeout(te.current)}},[D]);let A=async()=>{u(!0);try{let e=await(await fetch(`/api/router/start`,{method:`POST`})).json();e.ok||e.alreadyRunning?(t?.(`Router daemon started.`,`success`),await ae(),await oe()):t?.(`Failed to start: ${e.error||e.message||`unknown`}`,`error`)}catch(e){let n=e.name===`TypeError`&&e.message?.includes(`fetch`)?`Cannot reach daemon — it may not be installed or the port is blocked`:e.message;t?.(`Start failed: ${n}`,`error`)}finally{u(!1)}},se=async()=>{u(!0);try{let e=await(await fetch(`/api/router/stop`,{method:`POST`})).json();e.ok?(t?.(`Router daemon stopped.`,`success`),i({ok:!1,running:!1}),o(null)):t?.(`Failed to stop: ${e.error||`unknown`}`,`error`)}catch(e){t?.(`Stop failed: ${e.message}`,`error`)}finally{u(!1)}},ce=(e,t)=>{navigator.clipboard.writeText(e).then(()=>{m(t),setTimeout(()=>m(null),1500)})},le=async e=>{try{await fetch(`/api/router/probe-mode`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({probeMode:e})}),t?.(`Probe mode set to ${e}.`,`info`),await ae()}catch{}},j=_?.activeSet||r?.activeSet||`fast-coding`,ue=_?.sets?.[j]||{models:[]},M=Array.isArray(ue.models)?ue.models:[],de=async e=>{try{await fetch(`/api/router/sets/${encodeURIComponent(e)}/activate`,{method:`POST`}),t?.(`Active set: ${e}`,`info`),await oe(),await ae()}catch(e){t?.(`Failed to activate: ${e.message}`,`error`)}},fe=async()=>{if(j){O(Yc),t?.(`Probing models with your keys…`,`info`);try{let e=await fetch(`/api/router/sets/${encodeURIComponent(j)}/sync`,{method:`POST`});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||`HTTP ${e.status}`)}let n=await e.json(),r=n.selected?.length||0,i=n.probeCount||0;t?.(`Synced ${j}: ${r} working model${r===1?``:`s`} from ${i} probes.`,`success`),await oe(),await ae(),O(Xc)}catch(e){O(Zc(e.message||String(e))),t?.(`Sync failed: ${e.message}`,`error`)}}},pe=async()=>{if(!j)return;let e=n?.favorites||[];if(e.length===0){t?.(`You do not have any favorite models yet. Star some models first!`,`info`);return}let r=e.map((e,t)=>{let n=e.split(`/`);return{provider:n[0],model:n.slice(1).join(`/`),priority:t+1}});O(Yc);try{let n=await fetch(`/api/router/sets/${encodeURIComponent(j)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({models:r})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error||`HTTP ${n.status}`)}let i=await n.json();i?.sets?.[j]?y(e=>({...e,sets:i.sets})):await oe(),O(Xc),t?.(`Replaced active set with ${e.length} favorite model${e.length===1?``:`s`}.`,`success`),await ae()}catch(e){O(Zc(e.message||String(e))),t?.(`Failed to replace set: ${e.message}`,`error`)}},me=(0,v.useCallback)(async e=>{if(j){O(Yc);try{let t=e.map(e=>`${e.provider}/${e.model}`),n=await fetch(`/api/router/sets/${encodeURIComponent(j)}/reorder`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({order:t})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error||`HTTP ${n.status}`)}let r=await n.json();r?.sets?.[j]?y(e=>({...e,sets:r.sets})):await oe(),O(Xc)}catch(e){O(Zc(e.message||String(e))),t?.(`Reorder failed: ${e.message}`,`error`)}}},[j,oe,t]),he=(0,v.useCallback)(async(e,n)=>{if(j){O(Yc);try{let r=await fetch(`/api/router/sets/${encodeURIComponent(j)}/models`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,model:n})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error||`HTTP ${r.status}`)}let i=await r.json();i?.sets?.[j]?y(e=>({...e,sets:i.sets})):await oe(),O(Xc),t?.(`Added ${e}/${n} to ${j}.`,`success`)}catch(e){O(Zc(e.message||String(e))),t?.(`Add failed: ${e.message}`,`error`)}}},[j,oe,t]),ge=(0,v.useCallback)(async(e,n)=>{if(j){O(Yc);try{let t=await fetch(`/api/router/sets/${encodeURIComponent(j)}/models`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,model:n})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||`HTTP ${t.status}`)}let r=await t.json();r?.sets?.[j]?y(e=>({...e,sets:r.sets})):await oe(),O(Xc)}catch(e){O(Zc(e.message||String(e))),t?.(`Remove failed: ${e.message}`,`error`)}}},[j,oe,t]),_e=async()=>{if(!(!j||re)){if(ve.length===0){t?.(`Add models to the set first, then probe.`,`info`);return}try{let e=ve.map(e=>({providerKey:e.provider,modelId:e.model})),n=await fetch(`/api/router/probe-all`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({models:e})}),r=await n.json().catch(()=>null);if(!n.ok||!n.status||n.status===409)throw Error(r?.error||`Probe already running`);ie(!0);let i=r?.total??ve.length;t?.(`Probing ${i} model${i===1?``:`s`} for AI Latency…`,`info`),await ae()}catch(e){t?.(`Probe failed: ${e.message}`,`error`),ie(!1)}}},[ve,ye]=(0,v.useState)(M);(0,v.useEffect)(()=>{ye(M)},[M]);let[be,xe]=(0,v.useState)(null),[Se,Ce]=(0,v.useState)(null),we=(0,v.useCallback)(async(e,t)=>{let n=[...ve],r=t===`up`?e-1:e+1;if(r<0||r>=n.length)return;let[i]=n.splice(e,1);n.splice(r,0,i),ye(n),await me(n)},[ve,me]),Te=(0,v.useCallback)(async e=>{let t=ve[e];t&&(ye(ve.filter((t,n)=>n!==e)),await ge(t.provider,t.model))},[ve,ge]),Ee=(e,t)=>{let n=ve[t];n&&(xe(`${n.provider}/${n.model}`),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,`${n.provider}/${n.model}`))},De=(e,t)=>{if(be==null)return;e.preventDefault(),e.dataTransfer.dropEffect=`move`;let n=ve[t];if(!n)return;let r=`${n.provider}/${n.model}`;if(r===be)return;let i=e.currentTarget.getBoundingClientRect();Ce({key:r,side:e.clientY<i.top+i.height/2?`above`:`below`})},Oe=e=>{e.currentTarget.contains(e.relatedTarget)},ke=async(e,t)=>{if(e.preventDefault(),be==null)return;let n=ve.findIndex(e=>`${e.provider}/${e.model}`===be);if(n<0){xe(null),Ce(null);return}if(!ve[t]){xe(null),Ce(null);return}let r=e.currentTarget.getBoundingClientRect(),i=(e.clientY<r.top+r.height/2?`above`:`below`)==`above`?t:t+1;if(n<i&&--i,i===n){xe(null),Ce(null);return}let a=[...ve],[o]=a.splice(n,1);a.splice(i,0,o),ye(a),xe(null),Ce(null),await me(a)},Ae=()=>{xe(null),Ce(null)},je=(0,v.useMemo)(()=>{let e=new Set(b.map(e=>e.provider));return Array.from(e).sort()},[b]),Me=(0,v.useMemo)(()=>{let e=w.trim().toLowerCase();return b.filter(t=>T&&t.provider!==T?!1:e?t.key.toLowerCase().includes(e)||(t.label||``).toLowerCase().includes(e)||t.provider.toLowerCase().includes(e):!0).slice(0,200)},[b,w,T]),Ne=(e,t)=>ve.some(n=>n.provider===e&&n.model===t),Pe=r?.ok,Fe=a?.circuitBreakers||{},Ie=a?.requestLog||[],Le=a?.routingOrder||[],Re=Le.length>0?Le[0].key:null,ze=new Map;for(let e of a?.models||[])e&&typeof e.key==`string`&&ze.set(e.key,e);let Be=a?.globalBenchmark||null,Ve=!!Be?.running||re;(0,v.useEffect)(()=>{Ie.length>0&&!ne.current&&(ne.current=!0,f(!0))},[Ie.length]);let He=Pe&&s?.baseUrl?s.baseUrl:`http://localhost:19280/v1`,Ue=s?.model||`fcm`,We=`fcm-local`,Ge=`Base URL: ${He}\nModel: ${Ue}\nAPI Key: ${We}`,Ke=_?.sets||{},qe=Object.keys(Ke).sort();return(0,F.jsx)(`div`,{className:Y.overlay,onClick:t=>t.target===t.currentTarget&&e(),children:(0,F.jsxs)(`div`,{className:Y.modal,children:[(0,F.jsxs)(`div`,{className:Y.header,children:[(0,F.jsxs)(`h2`,{className:Y.title,children:[(0,F.jsx)(Ir,{size:20,stroke:1.5}),`Router Dashboard`]}),(0,F.jsx)(`button`,{className:Y.closeBtn,onClick:e,"aria-label":`Close`,children:`✕`})]}),(0,F.jsxs)(`div`,{className:Y.body,children:[Pe&&r?.brokenModelCount>0&&!h&&(0,F.jsxs)(`div`,{className:Y.autoHealBanner,children:[(0,F.jsxs)(`div`,{className:Y.autoHealLeft,children:[(0,F.jsx)(`span`,{className:Y.autoHealIcon,children:`⚠`}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:Y.autoHealTitle,children:[r.brokenModelCount,` model`,r.brokenModelCount===1?``:`s`,` in the active set are not responding`]}),(0,F.jsxs)(`div`,{className:Y.autoHealHint,children:[`Auto-heal ran on startup but the replacement may also be broken. Click `,(0,F.jsx)(`strong`,{children:`Sync best`}),` below to re-probe with your current keys, or click `,(0,F.jsx)(`strong`,{children:`Fix now`}),` to manually replace the broken entries.`]})]})]}),(0,F.jsxs)(`div`,{className:Y.autoHealActions,children:[(0,F.jsxs)(`button`,{className:Y.smallBtn,onClick:fe,children:[(0,F.jsx)(qr,{size:11}),`Fix now`]}),(0,F.jsx)(`button`,{className:Y.iconBtn,onClick:()=>g(!0),"aria-label":`Dismiss`,children:(0,F.jsx)(Jr,{size:12})})]})]}),(0,F.jsxs)(`div`,{className:`${Y.quickSetup} ${Pe?Y.quickSetupHero:``}`,children:[(0,F.jsxs)(`h3`,{className:Y.sectionTitle,children:[(0,F.jsx)(or,{size:14}),`Quick Setup`,(0,F.jsxs)(`button`,{className:Y.copyAllBtn,onClick:()=>ce(Ge,`all`),children:[p===`all`?(0,F.jsx)(Jn,{size:12}):(0,F.jsx)(or,{size:12}),p===`all`?`Copied!`:`Copy all`]})]}),(0,F.jsxs)(`div`,{className:Y.quickRows,children:[(0,F.jsxs)(`div`,{className:Y.quickRow,children:[(0,F.jsx)(`span`,{className:Y.quickLabel,children:`Base URL`}),(0,F.jsx)(`code`,{className:Y.quickValue,children:He}),(0,F.jsx)(`button`,{className:Y.copyBtn,onClick:()=>ce(He,`url`),children:p===`url`?(0,F.jsx)(Jn,{size:12}):(0,F.jsx)(or,{size:12})})]}),(0,F.jsxs)(`div`,{className:Y.quickRow,children:[(0,F.jsx)(`span`,{className:Y.quickLabel,children:`Model`}),(0,F.jsx)(`code`,{className:Y.quickValue,children:Ue}),(0,F.jsx)(`button`,{className:Y.copyBtn,onClick:()=>ce(Ue,`model`),children:p===`model`?(0,F.jsx)(Jn,{size:12}):(0,F.jsx)(or,{size:12})})]}),(0,F.jsxs)(`div`,{className:Y.quickRow,children:[(0,F.jsx)(`span`,{className:Y.quickLabel,children:`API Key`}),(0,F.jsx)(`code`,{className:Y.quickValue,children:We}),(0,F.jsx)(`button`,{className:Y.copyBtn,onClick:()=>ce(We,`key`),children:p===`key`?(0,F.jsx)(Jn,{size:12}):(0,F.jsx)(or,{size:12})})]})]})]}),(0,F.jsxs)(`div`,{className:`${Y.heroCard} ${Pe?Y.heroRunning:Y.heroStopped}`,children:[(0,F.jsxs)(`div`,{className:Y.heroLeft,children:[(0,F.jsxs)(`div`,{className:Y.heroStatus,children:[(0,F.jsx)(`span`,{className:`${Y.statusDot} ${Pe?Y.dotGreen:Y.dotGray}`}),(0,F.jsx)(`span`,{className:Y.heroLabel,children:Pe?`Running`:`Stopped`})]}),Pe&&(0,F.jsxs)(`div`,{className:Y.heroMeta,children:[(0,F.jsxs)(`span`,{children:[`Port `,r.port]}),(0,F.jsx)(`span`,{children:`·`}),(0,F.jsxs)(`span`,{children:[`Uptime `,Wc(r.uptimeSeconds)]}),(0,F.jsx)(`span`,{children:`·`}),(0,F.jsxs)(`span`,{children:[r.requestsRouted,` requests`]})]}),!Pe&&(0,F.jsx)(`div`,{className:Y.heroMeta,children:`Smart failover router — start to route requests to the healthiest model.`})]}),(0,F.jsxs)(`div`,{className:Y.heroActions,children:[Pe?(0,F.jsxs)(`button`,{className:Y.stopBtn,onClick:se,disabled:l,children:[(0,F.jsx)(Ar,{size:14}),l?`Stopping…`:`Stop`]}):(0,F.jsxs)(`button`,{className:`${Y.startBtn} ${Y.startBtnBig}`,onClick:A,disabled:l,children:[(0,F.jsx)(kr,{size:16}),l?`Starting…`:`Start Router`]}),(0,F.jsx)(`button`,{className:Y.refreshBtn,onClick:ae,title:`Refresh`,children:(0,F.jsx)(Fr,{size:14})})]})]}),Pe&&(0,F.jsxs)(`div`,{className:Y.section,children:[(0,F.jsxs)(`h3`,{className:Y.sectionTitle,children:[(0,F.jsx)(Cr,{size:14}),`Active Set (`,ve.length,` models)`]}),(0,F.jsxs)(`div`,{className:Y.setMeta,children:[(0,F.jsxs)(`div`,{className:Y.setActions,children:[(0,F.jsx)(`span`,{className:Y.setMetaName,children:j}),qe.length>1&&(0,F.jsx)(`select`,{className:Y.pickerSelect,value:j,onChange:e=>de(e.target.value),title:`Switch the active set`,children:qe.map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))})]}),(0,F.jsxs)(`div`,{className:Y.setActions,children:[(0,F.jsx)($c,{status:D}),(0,F.jsxs)(`button`,{className:Y.smallBtn,onClick:fe,disabled:D.kind===`saving`,title:`Probe your API keys and rebuild the set with only models that actually work`,children:[(0,F.jsx)(qr,{size:11}),`Sync best`]}),n&&(0,F.jsxs)(`button`,{className:Y.smallBtn,onClick:pe,disabled:D.kind===`saving`,title:`Replace current router models with your favorite models`,children:[(0,F.jsx)(Cr,{size:11}),`Use favorites`]}),(0,F.jsxs)(`button`,{className:`${Y.smallBtn} ${Ve?Y.probeBtnActive:``}`,onClick:_e,disabled:Ve||D.kind===`saving`||ve.length===0,title:`Benchmark AI Latency + TPS on every model in this set`,children:[(0,F.jsx)(Kn,{size:11}),Ve?`Probing…`:`Probe all`]}),(0,F.jsxs)(`button`,{className:Y.primaryBtn,onClick:()=>C(e=>!e),disabled:D.kind===`saving`,children:[S?(0,F.jsx)(Jr,{size:11}):(0,F.jsx)(Nr,{size:11}),S?`Close`:`Add model`]})]})]}),Ve&&Be&&(0,F.jsxs)(`div`,{className:Y.probeProgress,children:[(0,F.jsxs)(`div`,{className:Y.probeProgressLabel,children:[(0,F.jsx)(Kn,{size:11}),`AI Latency probe`,(0,F.jsxs)(`span`,{className:Y.probeProgressCount,children:[Be.completed,` / `,Be.total||ve.length]})]}),(0,F.jsx)(`div`,{className:Y.probeProgressBar,children:(0,F.jsx)(`div`,{className:Y.probeProgressFill,style:{width:`${Math.min(100,(Be.completed||0)/Math.max(1,Be.total||ve.length)*100)}%`}})})]}),ve.length===0?(0,F.jsxs)(`div`,{className:Y.setEmpty,children:[(0,F.jsx)(`div`,{className:Y.setEmptyTitle,children:`No models in the active set`}),(0,F.jsxs)(`div`,{className:Y.setEmptyHint,children:[`Add models from the picker below, or click `,(0,F.jsx)(`strong`,{children:`Sync best`}),` above to auto-pick working models.`]})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:Y.priorityLegend,children:[(0,F.jsxs)(`span`,{className:Y.legendPrimary,children:[(0,F.jsx)(Un,{size:11}),` Primary`]}),(0,F.jsx)(`span`,{className:Y.legendSeparator,children:`tries first`}),(0,F.jsx)(`span`,{className:Y.legendFallback,children:`Fallback`}),(0,F.jsx)(`span`,{className:Y.legendSeparator,children:`on failure / rate-limit`}),Pe&&Re&&(0,F.jsxs)(`span`,{className:Y.legendNext,children:[`Next up: `,(0,F.jsx)(`code`,{children:Re})]})]}),(0,F.jsx)(`div`,{className:Y.setList,onDragLeave:Oe,children:ve.map((e,t)=>{let n=`${e.provider}/${e.model}`,r=Fe[n]||{},i=ze.get(n),a=i?.benchmark||null,o=!!i?.isBenchmarking,s=be===n,c=Se?.key===n&&Se.side===`above`,l=Se?.key===n&&Se.side===`below`,u=t===0,d=Pe&&Re===n;return(0,F.jsxs)(`div`,{className:`${Y.setRow} ${s?Y.setRowDragging:``} ${d?Y.setRowNext:``} ${c?`${Y.setRowDropTarget} ${Y.setRowDropTargetAbove}`:``} ${l?`${Y.setRowDropTarget} ${Y.setRowDropTargetBelow}`:``}`,draggable:!0,onDragStart:e=>Ee(e,t),onDragOver:e=>De(e,t),onDrop:e=>ke(e,t),onDragEnd:Ae,title:n,children:[(0,F.jsx)(`span`,{className:Y.setDragHandle,"aria-hidden":!0,children:(0,F.jsx)(_r,{size:14})}),(0,F.jsx)(`span`,{className:`${Y.setPriority} ${u?Y.setPriorityPrimary:Y.setPriorityFallback}`,title:u?`Primary model — tried first on every request`:`Fallback #${t+1} — used when higher-priority models fail or rate-limit`,children:u?`Primary`:`#${t+1}`}),(0,F.jsx)(`span`,{className:Y.setKey,children:n}),e.tier&&(0,F.jsx)(`span`,{className:Y.setTier,children:e.tier}),(0,F.jsx)(qc,{state:r.state||e.state}),(0,F.jsx)(`span`,{className:Y.aiLatencyCell,title:a?`AI Latency: ${Math.round(a.totalMs)}ms · TPS: ${(a.tokensPerSecond??0).toFixed(1)}`:`Run Probe all to measure AI Latency`,children:o?(0,F.jsx)(`span`,{className:Y.aiLatencySpin,children:`···`}):a?.ok?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{className:Y.aiLatencyMs,children:[Math.round(a.totalMs),`ms`]}),a.tokensPerSecond!=null&&a.tokensPerSecond>0&&(0,F.jsxs)(`span`,{className:Y.aiLatencyTps,children:[a.tokensPerSecond.toFixed(1),` t/s`]})]}):a&&!a.ok?(0,F.jsx)(`span`,{className:Y.aiLatencyErr,children:`fail`}):(0,F.jsx)(`span`,{className:Y.aiLatencyNone,children:`—`})}),(0,F.jsxs)(`div`,{className:Y.setRowBtns,children:[(0,F.jsx)(`button`,{className:Y.iconBtn,onClick:()=>we(t,`up`),disabled:t===0||D.kind===`saving`,title:`Move up`,"aria-label":`Move ${n} up`,children:(0,F.jsx)(Wn,{size:12})}),(0,F.jsx)(`button`,{className:Y.iconBtn,onClick:()=>we(t,`down`),disabled:t===ve.length-1||D.kind===`saving`,title:`Move down`,"aria-label":`Move ${n} down`,children:(0,F.jsx)(Vn,{size:12})}),(0,F.jsx)(`button`,{className:`${Y.iconBtn} ${Y.removeBtn}`,onClick:()=>Te(t),disabled:D.kind===`saving`,title:`Remove from set`,"aria-label":`Remove ${n}`,children:(0,F.jsx)(Wr,{size:12})})]})]},n)})})]}),S&&(0,F.jsxs)(`div`,{className:Y.pickerPanel,children:[(0,F.jsxs)(`div`,{className:Y.pickerHeader,children:[(0,F.jsxs)(`span`,{children:[`Add a model to `,(0,F.jsx)(`code`,{children:j})]}),(0,F.jsxs)(`span`,{style:{color:`var(--text-muted, #888)`},children:[Me.length,` of `,b.length]})]}),(0,F.jsxs)(`div`,{className:Y.pickerSearch,children:[(0,F.jsx)(`input`,{className:Y.pickerInput,placeholder:`Search by provider, model, or label…`,value:w,onChange:e=>ee(e.target.value),autoFocus:!0}),(0,F.jsxs)(`select`,{className:Y.pickerSelect,value:T,onChange:e=>E(e.target.value),children:[(0,F.jsx)(`option`,{value:``,children:`All providers`}),je.map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))]})]}),(0,F.jsx)(`div`,{className:Y.pickerList,children:Me.length===0?(0,F.jsx)(`div`,{className:Y.pickerEmpty,children:`No models match your filter.`}):Me.map(e=>{let t=Ne(e.provider,e.model);return(0,F.jsxs)(`div`,{className:`${Y.pickerItem} ${t?Y.pickerItemAdded:``}`,onClick:()=>{t||he(e.provider,e.model)},title:t?`Already in set`:`Add ${e.key}`,children:[(0,F.jsx)(`span`,{className:Y.pickerProvider,children:e.provider}),(0,F.jsx)(`span`,{className:Y.pickerModel,children:e.label||e.model}),e.tier&&(0,F.jsx)(`span`,{className:Y.setTier,children:e.tier}),e.hasKey?(0,F.jsx)(`span`,{className:`${Y.pickerBadge} ${Y.pickerBadgeOk}`,children:`key`}):(0,F.jsx)(`span`,{className:Y.pickerBadge,children:`no key`})]},e.key)})})]})]}),Pe&&(0,F.jsxs)(`div`,{className:Y.section,children:[(0,F.jsxs)(`h3`,{className:Y.sectionTitle,children:[(0,F.jsx)(Rn,{size:14}),`Probe Mode`]}),(0,F.jsx)(`div`,{className:Y.probeModes,children:[`eco`,`balanced`,`aggressive`].map(e=>(0,F.jsx)(`button`,{className:`${Y.probeBtn} ${r?.probeMode===e?Y.probeActive:``}`,onClick:()=>le(e),children:e},e))})]}),Pe&&(0,F.jsxs)(`div`,{className:Y.section,children:[(0,F.jsxs)(`h3`,{className:Y.sectionTitle,onClick:()=>f(!d),style:{cursor:`pointer`},children:[(0,F.jsx)(Rn,{size:14}),`Request Log (`,Ie.length,`)`,d?(0,F.jsx)($n,{size:12}):(0,F.jsx)(Xn,{size:12})]}),d&&(Ie.length===0?(0,F.jsx)(`div`,{className:Y.logEmpty,children:`No requests yet. Start coding to see traffic here.`}):(0,F.jsx)(`div`,{className:Y.logList,children:Ie.map((e,t)=>(0,F.jsxs)(`div`,{className:Y.logRow,children:[(0,F.jsx)(`span`,{className:e.error?Y.logErr:Y.logOk,children:e.status||`—`}),(0,F.jsx)(`span`,{className:Y.logModel,children:e.model}),(0,F.jsx)(`span`,{className:Y.logLatency,children:e.latency_ms==null?`—`:`${e.latency_ms}ms`}),(0,F.jsx)(`span`,{className:Y.logTokens,children:e.tokens>0?Gc(e.tokens)+` tok`:``}),e.failover&&(0,F.jsx)(`span`,{className:Y.logFailover,children:`failover`})]},t))}))]}),Pe&&(0,F.jsxs)(`div`,{className:Y.section,children:[(0,F.jsxs)(`h3`,{className:Y.sectionTitle,children:[(0,F.jsx)(Rr,{size:14}),`Test Router`,(0,F.jsxs)(`span`,{className:Y.miniPgHint,children:[`routes through `,(0,F.jsx)(`code`,{children:`fcm`}),` — try the fallback chain`]})]}),(0,F.jsx)(Es,{model:`fcm`,variant:`mini`,disabled:!Pe,targetLabel:Re||`fcm`,placeholder:`Test the router… (e.g. write a haiku about TypeScript)`,emptyHint:`Send a message to see which model the router picks, with latency + TPS.`})]}),(0,F.jsx)(`div`,{className:Y.section,style:{marginBottom:0,marginTop:16},children:(0,F.jsx)(`span`,{className:Y.saveStatus,children:a?.tokenStats?`${Gc(a.tokenStats.all_time?.total_tokens||0)} tokens routed lifetime`:``})})]})]})})}function $c({status:e}){return!e||e.kind===`idle`?null:e.kind===`saving`?(0,F.jsx)(`span`,{className:Y.saveStatus,children:`saving…`}):e.kind===`saved`?(0,F.jsx)(`span`,{className:`${Y.saveStatus} ${Y.saveStatusOk}`,children:`✓ saved`}):e.kind===`error`?(0,F.jsxs)(`span`,{className:`${Y.saveStatus} ${Y.saveStatusErr}`,title:e.message,children:[`⚠ `,e.message?.slice(0,40)||`error`]}):null}var el={overlay:`_overlay_14fdi_7`,fadeIn:`_fadeIn_14fdi_1`,modal:`_modal_14fdi_18`,slideUp:`_slideUp_14fdi_1`,header:`_header_14fdi_41`,headerLeft:`_headerLeft_14fdi_50`,headerTitle:`_headerTitle_14fdi_57`,headerSubtitle:`_headerSubtitle_14fdi_65`,headerActions:`_headerActions_14fdi_71`,iconBtn:`_iconBtn_14fdi_77`,modelBar:`_modelBar_14fdi_95`,modelLabel:`_modelLabel_14fdi_106`,modelSelect:`_modelSelect_14fdi_111`,presetChip:`_presetChip_14fdi_129`,prePromptToggle:`_prePromptToggle_14fdi_146`,transcript:`_transcript_14fdi_159`,chatBody:`_chatBody_14fdi_172`,empty:`_empty_14fdi_179`,emptyTitle:`_emptyTitle_14fdi_191`,emptyHint:`_emptyHint_14fdi_197`,message:`_message_14fdi_203`,msgIn:`_msgIn_14fdi_1`,user:`_user_14fdi_216`,assistant:`_assistant_14fdi_220`,system:`_system_14fdi_224`,messageRole:`_messageRole_14fdi_229`,bubble:`_bubble_14fdi_238`,codeBlock:`_codeBlock_14fdi_269`,meta:`_meta_14fdi_281`,metaChip:`_metaChip_14fdi_290`,provider:`_provider_14fdi_301`,error:`_error_14fdi_306`,cursor:`_cursor_14fdi_311`,blink:`_blink_14fdi_1`,inputBar:`_inputBar_14fdi_326`,textarea:`_textarea_14fdi_336`,sendBtn:`_sendBtn_14fdi_361`,errorBar:`_errorBar_14fdi_386`,stopBar:`_stopBar_14fdi_398`,stopBtn:`_stopBtn_14fdi_410`,daemonStartPanel:`_daemonStartPanel_14fdi_427`,daemonStartTitle:`_daemonStartTitle_14fdi_439`,daemonStartHint:`_daemonStartHint_14fdi_445`,daemonStartBtn:`_daemonStartBtn_14fdi_452`,daemonStartAlt:`_daemonStartAlt_14fdi_484`,spin:`_spin_14fdi_498`,spinAnim:`_spinAnim_14fdi_1`},tl=[`Write a Python fizzbuzz with type hints`,`Explain Big O notation with three examples`,`Refactor a deeply nested for-loop into map/filter`,`Write a tiny Express endpoint that returns JSON`];function nl({routerStatus:e,daemonRunning:t}){return t===!0?(0,F.jsxs)(`span`,{className:el.metaChip,children:[(0,F.jsx)(Kn,{size:11}),`Router online`]}):t===!1?(0,F.jsxs)(`span`,{className:`${el.metaChip} ${el.error}`,children:[(0,F.jsx)(Bn,{size:11}),`Router offline`]}):(0,F.jsxs)(`span`,{className:el.metaChip,children:[(0,F.jsx)(wr,{size:11,className:el.spin}),`Checking router…`]})}function rl({onClose:e,onToast:t,models:n,routerStatus:r}){let[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!0),[c,l]=(0,v.useState)(!0),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(r?.running===!0?!0:null),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(5),y=(0,v.useRef)(null),b=(0,v.useRef)(null),x=(0,v.useRef)(!1),[S,C]=(0,v.useState)({count:0,totalTokens:0}),w=(0,v.useRef)(null);(0,v.useEffect)(()=>{fetch(`/api/router/preprompt`).then(e=>e.json()).then(e=>{e&&typeof e==`object`&&(l(e.enabled===!0),typeof e.text==`string`&&d(e.text))}).catch(()=>{})},[]),(0,v.useEffect)(()=>{if(i!==null)return;let e=(Array.isArray(n)?n:[]).filter(e=>e.status===`up`&&e.hasApiKey&&!e.isPinging);if(e.length>0){let t={"S+":0,S:1,"A+":2,A:3,"A-":4,"B+":5,B:6,C:7};e.sort((e,n)=>{let r=t[e.tier]??99,i=t[n.tier]??99;return r===i?(typeof e.avg==`number`?e.avg:99999)-(typeof n.avg==`number`?n.avg:99999):r-i}),a(`${e[0].providerKey}/${e[0].modelId}`);return}a(`fcm`)},[n,i]),(0,v.useEffect)(()=>{let e=!0;async function t(){try{let t=await(await fetch(`/api/router/status`)).json();if(!e)return;p(t?.running===!0)}catch{e&&p(!1)}}return t(),()=>{e=!1,y.current&&clearInterval(y.current),b.current&&clearInterval(b.current)}},[]);let ee=(0,v.useCallback)(async()=>{if(!m){y.current&&=(clearInterval(y.current),null),x.current=!0,h(!0);try{await fetch(`/api/router/start`,{method:`POST`});let e=0;await new Promise(t=>{b.current=setInterval(async()=>{e+=1;try{(await(await fetch(`/api/router/status`)).json())?.running&&(clearInterval(b.current),p(!0),h(!1),t())}catch{}e>=30&&(clearInterval(b.current),h(!1),t())},1e3)})}catch{h(!1)}}},[m]);(0,v.useEffect)(()=>{if(f!==!1||i!==`fcm`||x.current)return;let e=5;return _(5),y.current=setInterval(()=>{--e,_(e),e<=0&&(clearInterval(y.current),x.current=!0,ee())},1e3),()=>{y.current&&clearInterval(y.current)}},[f,i,ee]);let T=(0,v.useMemo)(()=>{let e=[{value:`fcm`,label:`fcm — auto router (recommended)`}];if(Array.isArray(n))for(let t of n.slice(0,200)){let n=t.modelId||t.id;if(!n)continue;let r=t.label||n;e.push({value:`${t.providerKey}/${n}`,label:`${t.providerKey}/${n} (${r})`})}return e},[n]),E=(0,v.useCallback)(e=>{C({count:e.count,totalTokens:e.totalTokens})},[]),D=(0,v.useCallback)(()=>{w.current?.clear(),C({count:0,totalTokens:0})},[]),O=!(i===`fcm`&&f!==!0),te=S.count>0,ne=i===`fcm`&&!te&&f===!1&&!m,re=i===`fcm`&&!te&&m,ie=!ne&&!re;return(0,F.jsx)(`div`,{className:el.overlay,onClick:t=>{t.target===t.currentTarget&&e()},children:(0,F.jsxs)(`div`,{className:el.modal,role:`dialog`,"aria-label":`Free Coding Models Playground`,children:[(0,F.jsxs)(`div`,{className:el.header,children:[(0,F.jsxs)(`div`,{className:el.headerLeft,children:[(0,F.jsxs)(`div`,{className:el.headerTitle,children:[(0,F.jsx)(Dr,{size:18}),`Playground`]}),(0,F.jsxs)(`div`,{className:el.headerSubtitle,children:[`Chat with the FCM router · `,S.count,` message`,S.count===1?``:`s`,` · `,S.totalTokens,` tokens`]})]}),(0,F.jsxs)(`div`,{className:el.headerActions,children:[(0,F.jsx)(`button`,{className:el.iconBtn,onClick:D,title:`Clear conversation`,disabled:!te,children:(0,F.jsx)(Wr,{size:16})}),(0,F.jsx)(`button`,{className:el.iconBtn,onClick:e,title:`Close (Esc)`,children:(0,F.jsx)(Jr,{size:16})})]})]}),(0,F.jsxs)(`div`,{className:el.modelBar,children:[(0,F.jsx)(`span`,{className:el.modelLabel,children:`Model:`}),(0,F.jsx)(`select`,{className:el.modelSelect,value:i??`fcm`,onChange:e=>a(e.target.value),disabled:!ie,children:T.map(e=>(0,F.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,F.jsx)(`button`,{className:el.presetChip,onClick:()=>s(e=>!e),title:`Toggle streaming`,children:o?`⚡ Streaming`:`🐢 One-shot`}),(0,F.jsxs)(`label`,{className:el.prePromptToggle,title:`Router persona injected as the first system message`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:c,onChange:e=>l(e.target.checked)}),`Pre-prompt`]}),(0,F.jsx)(nl,{routerStatus:r,daemonRunning:f})]}),c&&u&&(0,F.jsxs)(`div`,{className:el.modelBar,style:{borderTop:`none`,background:`transparent`,paddingTop:4,paddingBottom:8,fontSize:11},children:[(0,F.jsx)(`span`,{className:el.modelLabel,style:{flexShrink:0},children:`Persona:`}),(0,F.jsx)(`span`,{style:{opacity:.7,fontStyle:`italic`},children:u.length>160?`${u.slice(0,160)}…`:u})]}),(0,F.jsxs)(`div`,{className:el.chatBody,children:[ne?(0,F.jsxs)(`div`,{className:el.daemonStartPanel,children:[(0,F.jsx)(Bn,{size:32,style:{color:`#fbbf24`,opacity:.8}}),(0,F.jsx)(`div`,{className:el.daemonStartTitle,children:`Router daemon is not running`}),(0,F.jsx)(`div`,{className:el.daemonStartHint,children:`The playground routes your chats through the FCM router daemon. Start it to begin chatting with free coding models, or pick a specific model above.`}),(0,F.jsx)(`button`,{className:el.daemonStartBtn,onClick:ee,title:`Start the router daemon`,children:m?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(wr,{size:14,className:el.spin}),` Starting…`]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(kr,{size:14}),` Start Router`,g>0&&!x.current?` (auto in ${g}s)`:``]})}),(0,F.jsxs)(`div`,{className:el.daemonStartAlt,children:[`Or run `,(0,F.jsx)(`code`,{children:`free-coding-models --daemon-bg`}),` in your terminal`]})]}):re?(0,F.jsxs)(`div`,{className:el.daemonStartPanel,children:[(0,F.jsx)(wr,{size:32,className:el.spin,style:{color:`var(--accent, #22c55e)`}}),(0,F.jsx)(`div`,{className:el.daemonStartTitle,children:`Starting router daemon…`}),(0,F.jsx)(`div`,{className:el.daemonStartHint,children:`The daemon is being launched. This usually takes a few seconds. You'll be able to chat as soon as it's ready.`})]}):null,ie&&(0,F.jsx)(Es,{ref:w,model:i||`fcm`,variant:`full`,stream:o,disabled:!O,onTurnComplete:E,suggestions:tl,emptyTitle:`Try the FCM router in 10 seconds`,emptyHint:`Each request is auto-routed to the healthiest free coding model in your active set, or sent directly to the model you picked. Every reply shows the served model, latency, and TPS below it.`,emptyIcon:(0,F.jsx)(Dr,{size:42,style:{opacity:.5}}),placeholder:`Ask anything. Enter to send, Shift+Enter for a newline.`})]})]})})}function il(){let[e,t]=(0,v.useState)([]),[n,r]=(0,v.useState)(!0),i=(0,v.useCallback)(async()=>{r(!0);try{t((await(await fetch(`/api/installed-models`)).json()).results||[])}catch{t([])}finally{r(!1)}},[]);return(0,v.useEffect)(()=>{i()},[i]),{results:e,loading:n,refresh:i,disableModel:(0,v.useCallback)(async(e,t)=>{let n=await(await fetch(`/api/installed-models/${encodeURIComponent(e)}/${encodeURIComponent(t)}/disable`,{method:`POST`})).json();return n.success&&await i(),n},[i])}}var al={overlay:`_overlay_1ocey_1`,fadeIn:`_fadeIn_1ocey_1`,modal:`_modal_1ocey_12`,header:`_header_1ocey_24`,title:`_title_1ocey_32`,count:`_count_1ocey_42`,headerActions:`_headerActions_1ocey_51`,refreshBtn:`_refreshBtn_1ocey_57`,closeBtn:`_closeBtn_1ocey_71`,body:`_body_1ocey_82`,empty:`_empty_1ocey_88`,hint:`_hint_1ocey_96`,toolGroup:`_toolGroup_1ocey_102`,toolHeader:`_toolHeader_1ocey_106`,toolEmoji:`_toolEmoji_1ocey_113`,toolLabel:`_toolLabel_1ocey_117`,toolCount:`_toolCount_1ocey_123`,toolMissing:`_toolMissing_1ocey_128`,modelList:`_modelList_1ocey_139`,modelRow:`_modelRow_1ocey_146`,modelIcon:`_modelIcon_1ocey_157`,modelName:`_modelName_1ocey_161`,modelTier:`_modelTier_1ocey_166`,modelId:`_modelId_1ocey_175`,disableBtn:`_disableBtn_1ocey_185`};function ol({onClose:e,onToast:t}){let{results:n,loading:r,refresh:i,disableModel:a}=il(),o=async(e,n)=>{try{let r=await a(e,n);r.success?t?.(`Disabled ${n} in ${e}.`,`success`):t?.(`Failed: ${r.error||`unknown error`}`,`error`)}catch(e){t?.(`Error: ${e.message}`,`error`)}},s=n.reduce((e,t)=>e+t.models.length,0);return(0,F.jsx)(`div`,{className:al.overlay,onClick:t=>t.target===t.currentTarget&&e(),children:(0,F.jsxs)(`div`,{className:al.modal,children:[(0,F.jsxs)(`div`,{className:al.header,children:[(0,F.jsxs)(`h2`,{className:al.title,children:[(0,F.jsx)(gr,{size:20,stroke:1.5}),`Installed Models`,!r&&(0,F.jsx)(`span`,{className:al.count,children:s})]}),(0,F.jsxs)(`div`,{className:al.headerActions,children:[(0,F.jsx)(`button`,{className:al.refreshBtn,onClick:i,title:`Refresh`,children:(0,F.jsx)(Fr,{size:14})}),(0,F.jsx)(`button`,{className:al.closeBtn,onClick:e,"aria-label":`Close`,children:`✕`})]})]}),(0,F.jsxs)(`div`,{className:al.body,children:[r&&(0,F.jsx)(`div`,{className:al.empty,children:`Scanning tool configs…`}),!r&&s===0&&(0,F.jsxs)(`div`,{className:al.empty,children:[`No models found in tool configs.`,(0,F.jsx)(`br`,{}),(0,F.jsx)(`span`,{className:al.hint,children:`Use "Install Endpoints" to configure models for your tools.`})]}),!r&&n.map(e=>(0,F.jsxs)(`div`,{className:al.toolGroup,children:[(0,F.jsxs)(`div`,{className:al.toolHeader,children:[(0,F.jsx)(`span`,{className:al.toolEmoji,children:e.toolEmoji}),(0,F.jsx)(`span`,{className:al.toolLabel,children:e.toolLabel}),(0,F.jsxs)(`span`,{className:al.toolCount,children:[e.models.length,` model`,e.models.length===1?``:`s`]}),!e.isValid&&(0,F.jsx)(`span`,{className:al.toolMissing,children:`Not installed`})]}),e.models.length>0&&(0,F.jsx)(`div`,{className:al.modelList,children:e.models.map(t=>(0,F.jsxs)(`div`,{className:al.modelRow,children:[(0,F.jsx)(`span`,{className:al.modelIcon,children:t.isExternal?`🔗`:`✅`}),(0,F.jsx)(`span`,{className:al.modelName,children:t.label}),t.tier&&t.tier!==`-`&&(0,F.jsx)(`span`,{className:al.modelTier,children:t.tier}),(0,F.jsx)(`span`,{className:al.modelId,title:t.modelId,children:t.modelId}),(0,F.jsx)(`button`,{className:al.disableBtn,onClick:()=>o(e.toolMode,t.modelId),title:`Remove model from config (backup saved)`,children:(0,F.jsx)(Wr,{size:12})})]},`${e.toolMode}-${t.modelId}`))})]},e.toolMode))]})]})})}var X={overlay:`_overlay_bbtxk_1`,fadeIn:`_fadeIn_bbtxk_1`,modal:`_modal_bbtxk_12`,header:`_header_bbtxk_24`,title:`_title_bbtxk_32`,closeBtn:`_closeBtn_bbtxk_42`,steps:`_steps_bbtxk_54`,step:`_step_bbtxk_54`,stepActive:`_stepActive_bbtxk_71`,stepDone:`_stepDone_bbtxk_76`,stepNum:`_stepNum_bbtxk_80`,stepLabel:`_stepLabel_bbtxk_105`,body:`_body_bbtxk_111`,stepContent:`_stepContent_bbtxk_118`,stepDesc:`_stepDesc_bbtxk_120`,loading:`_loading_bbtxk_126`,empty:`_empty_bbtxk_126`,grid:`_grid_bbtxk_134`,pickCard:`_pickCard_bbtxk_140`,pickActive:`_pickActive_bbtxk_156`,pickEmoji:`_pickEmoji_bbtxk_162`,pickLabel:`_pickLabel_bbtxk_166`,pickMeta:`_pickMeta_bbtxk_171`,scopeToggle:`_scopeToggle_bbtxk_177`,scopeBtn:`_scopeBtn_bbtxk_183`,scopeActive:`_scopeActive_bbtxk_194`,modelGrid:`_modelGrid_bbtxk_202`,modelCard:`_modelCard_bbtxk_210`,modelSelected:`_modelSelected_bbtxk_224`,modelName:`_modelName_bbtxk_230`,modelTier:`_modelTier_bbtxk_236`,allNotice:`_allNotice_bbtxk_247`,installingState:`_installingState_bbtxk_255`,installingLabel:`_installingLabel_bbtxk_265`,installingSub:`_installingSub_bbtxk_271`,spinner:`_spinner_bbtxk_276`,spin:`_spin_bbtxk_276`,doneState:`_doneState_bbtxk_280`,doneFadeIn:`_doneFadeIn_bbtxk_1`,doneTitle:`_doneTitle_bbtxk_290`,doneSub:`_doneSub_bbtxk_296`,checkCircle:`_checkCircle_bbtxk_308`,checkPop:`_checkPop_bbtxk_1`,errorDot:`_errorDot_bbtxk_320`,installPath:`_installPath_bbtxk_334`,footer:`_footer_bbtxk_363`,backBtn:`_backBtn_bbtxk_370`,nextBtn:`_nextBtn_bbtxk_384`,doneBtn:`_doneBtn_bbtxk_401`,donePop:`_donePop_bbtxk_1`},sl=[`Provider`,`Tool`,`Models`,`Install`];function cl({onClose:e,onToast:t}){let[n,r]=(0,v.useState)(0),[i,a]=(0,v.useState)([]),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)([]),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)([]),[m,h]=(0,v.useState)(`all`),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(null),[x,S]=(0,v.useState)(!0),C=[{id:`opencode`,label:`OpenCode CLI`,emoji:`💻`},{id:`opencode-desktop`,label:`OpenCode Desktop`,emoji:`🖥️`},{id:`openclaw`,label:`OpenClaw`,emoji:`🦞`},{id:`crush`,label:`Crush`,emoji:`💘`},{id:`goose`,label:`Goose`,emoji:`🪿`},{id:`pi`,label:`Pi`,emoji:`π`},{id:`aider`,label:`Aider`,emoji:`🛠`},{id:`qwen`,label:`Qwen`,emoji:`🐉`},{id:`openhands`,label:`OpenHands`,emoji:`🤲`},{id:`amp`,label:`Amp`,emoji:`⚡`},{id:`forgecode`,label:`ForgeCode`,emoji:`🔥`},{id:`fcm_router`,label:`FCM Router`,emoji:`🔄`}];(0,v.useEffect)(()=>{fetch(`/api/install-endpoints/providers`).then(e=>e.json()).then(e=>{a(e.providers||[]),S(!1)}).catch(()=>S(!1))},[]),(0,v.useEffect)(()=>{o&&fetch(`/api/install-endpoints/catalog?provider=${o.providerKey}`).then(e=>e.json()).then(e=>l(e.models||[])).catch(()=>l([]))},[o]);let w=(0,v.useCallback)(e=>{p(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),ee=(0,v.useCallback)(()=>{p(c.map(e=>e.modelId)),h(`all`)},[c]);(0,v.useCallback)(()=>{p([]),h(`selected`)},[]);let T=()=>n===0?!!o:n===1?!!u:n===2?m===`all`||f.length>0:!0,E=async()=>{r(3),_(!0),b(null);try{let e=await(await fetch(`/api/install-endpoints/wizard`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerKey:o.providerKey,toolMode:u,scope:m,modelIds:m===`selected`?f:[]})})).json();e.success?(b(e),t?.(`Installed ${e.modelCount} models for ${o.label} into ${C.find(e=>e.id===u)?.label||u}.`,`success`)):(b(null),t?.(`Install failed: ${e.error||`unknown`}`,`error`),r(2))}catch(e){b(null),t?.(`Install error: ${e.message}`,`error`),r(2)}finally{_(!1)}};return(0,F.jsx)(`div`,{className:X.overlay,onClick:t=>t.target===t.currentTarget&&e(),children:(0,F.jsxs)(`div`,{className:X.modal,children:[(0,F.jsxs)(`div`,{className:X.header,children:[(0,F.jsxs)(`h2`,{className:X.title,children:[(0,F.jsx)(Mr,{size:20,stroke:1.5}),`Install Endpoints`]}),(0,F.jsx)(`button`,{className:X.closeBtn,onClick:e,"aria-label":`Close`,children:`✕`})]}),(0,F.jsx)(`div`,{className:X.steps,children:sl.map((e,t)=>(0,F.jsxs)(`div`,{className:`${X.step} ${t===n?X.stepActive:t<n?X.stepDone:``}`,children:[(0,F.jsx)(`span`,{className:X.stepNum,children:t<n?(0,F.jsx)(Jn,{size:12}):t+1}),(0,F.jsx)(`span`,{className:X.stepLabel,children:e})]},t))}),(0,F.jsxs)(`div`,{className:X.body,children:[n===0&&(0,F.jsxs)(`div`,{className:X.stepContent,children:[(0,F.jsx)(`p`,{className:X.stepDesc,children:`Choose a provider with a configured API key.`}),x&&(0,F.jsx)(`div`,{className:X.loading,children:`Loading providers…`}),!x&&i.length===0&&(0,F.jsx)(`div`,{className:X.empty,children:`No configured providers found. Add API keys in Settings first.`}),(0,F.jsx)(`div`,{className:X.grid,children:i.map(e=>(0,F.jsxs)(`button`,{className:`${X.pickCard} ${o?.providerKey===e.providerKey?X.pickActive:``}`,onClick:()=>{s(e),r(1)},children:[(0,F.jsx)(`span`,{className:X.pickLabel,children:e.label}),(0,F.jsxs)(`span`,{className:X.pickMeta,children:[e.modelCount,` models`]})]},e.providerKey))})]}),n===1&&(0,F.jsxs)(`div`,{className:X.stepContent,children:[(0,F.jsxs)(`p`,{className:X.stepDesc,children:[`Install `,(0,F.jsx)(`strong`,{children:o?.label}),` models into which tool?`]}),(0,F.jsx)(`div`,{className:X.grid,children:C.map(e=>(0,F.jsxs)(`button`,{className:`${X.pickCard} ${u===e.id?X.pickActive:``}`,onClick:()=>{d(e.id),r(2)},children:[(0,F.jsx)(`span`,{className:X.pickEmoji,children:e.emoji}),(0,F.jsx)(`span`,{className:X.pickLabel,children:e.label})]},e.id))})]}),n===2&&(0,F.jsxs)(`div`,{className:X.stepContent,children:[(0,F.jsxs)(`p`,{className:X.stepDesc,children:[`Choose models to install from `,(0,F.jsx)(`strong`,{children:o?.label}),` into `,(0,F.jsx)(`strong`,{children:C.find(e=>e.id===u)?.label}),`.`]}),(0,F.jsxs)(`div`,{className:X.scopeToggle,children:[(0,F.jsx)(`button`,{className:`${X.scopeBtn} ${m===`all`?X.scopeActive:``}`,onClick:()=>{h(`all`),ee()},children:`All Models`}),(0,F.jsx)(`button`,{className:`${X.scopeBtn} ${m===`selected`?X.scopeActive:``}`,onClick:()=>h(`selected`),children:`Select Models`})]}),m===`selected`&&(0,F.jsx)(`div`,{className:X.modelGrid,children:c.map(e=>(0,F.jsxs)(`button`,{className:`${X.modelCard} ${f.includes(e.modelId)?X.modelSelected:``}`,onClick:()=>w(e.modelId),children:[(0,F.jsx)(`span`,{className:X.modelName,children:e.label}),(0,F.jsx)(`span`,{className:X.modelTier,children:e.tier})]},e.modelId))}),m===`all`&&(0,F.jsxs)(`div`,{className:X.allNotice,children:[`All `,c.length,` models from `,o?.label,` will be installed.`]})]}),n===3&&(0,F.jsxs)(`div`,{className:X.stepContent,children:[g&&(0,F.jsxs)(`div`,{className:X.installingState,children:[(0,F.jsx)(wr,{size:32,className:X.spinner}),(0,F.jsxs)(`span`,{className:X.installingLabel,children:[`Installing `,m===`all`?`all`:f.length,` model`,m===`all`&&c.length!==1?`s`:f.length===1?``:`s`,`…`]}),(0,F.jsxs)(`span`,{className:X.installingSub,children:[`Writing config for `,C.find(e=>e.id===u)?.label]})]}),!g&&y&&(0,F.jsxs)(`div`,{className:X.doneState,children:[(0,F.jsx)(`div`,{className:X.checkCircle,children:(0,F.jsx)(Jn,{size:36})}),(0,F.jsx)(`h3`,{className:X.doneTitle,children:`Installed!`}),(0,F.jsxs)(`p`,{className:X.doneSub,children:[y.modelCount,` model`,y.modelCount===1?``:`s`,` from `,(0,F.jsx)(`strong`,{children:o?.label}),` → `,(0,F.jsx)(`strong`,{children:y.toolLabel})]}),(0,F.jsx)(`code`,{className:X.installPath,children:y.path})]}),!g&&!y&&(0,F.jsxs)(`div`,{className:X.doneState,children:[(0,F.jsx)(`span`,{className:X.errorDot,children:`✕`}),(0,F.jsx)(`h3`,{className:X.doneTitle,children:`Install failed`}),(0,F.jsx)(`p`,{className:X.doneSub,children:`Check the toast for details. You can go back and retry.`})]})]})]}),(0,F.jsxs)(`div`,{className:X.footer,children:[n>0&&n<3&&(0,F.jsxs)(`button`,{className:X.backBtn,onClick:()=>{r(e=>Math.max(e-1,0))},children:[(0,F.jsx)(Zn,{size:14}),`Back`]}),n===3&&!g&&!y&&(0,F.jsxs)(`button`,{className:X.backBtn,onClick:()=>r(2),children:[(0,F.jsx)(Zn,{size:14}),`Back`]}),n<3&&(0,F.jsx)(`button`,{className:X.nextBtn,onClick:()=>{if(n===2){E();return}r(e=>Math.min(e+1,3))},disabled:!T(),children:n===2?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Mr,{size:14}),`Install`]}):(0,F.jsxs)(F.Fragment,{children:[`Next`,(0,F.jsx)(Qn,{size:14})]})}),n===3&&!g&&y&&(0,F.jsxs)(`button`,{className:X.doneBtn,onClick:e,children:[(0,F.jsx)(Jn,{size:14}),`Done`]})]})]})})}var ll={container:`_container_18l8h_1`},ul={toast:`_toast_73ezc_1`,slideIn:`_slideIn_73ezc_1`,success:`_success_73ezc_17`,error:`_error_73ezc_18`,warning:`_warning_73ezc_19`,info:`_info_73ezc_20`,icon:`_icon_73ezc_27`,message:`_message_73ezc_28`,close:`_close_73ezc_29`,exiting:`_exiting_73ezc_38`,slideOut:`_slideOut_73ezc_1`},dl={success:`✅`,error:`❌`,warning:`⚠️`,info:`ℹ️`};function fl({message:e,type:t=`info`,duration:n=3500,onDismiss:r}){let i=(0,v.useRef)(null);return(0,v.useEffect)(()=>(i.current=setTimeout(r,n),()=>clearTimeout(i.current)),[n,r]),(0,F.jsxs)(`div`,{className:`${ul.toast} ${ul[t]}`,children:[(0,F.jsx)(`span`,{className:ul.icon,children:dl[t]||`📌`}),(0,F.jsx)(`span`,{className:ul.message,children:e}),(0,F.jsx)(`button`,{className:ul.close,onClick:r,children:`×`})]})}function pl({toasts:e,dismissToast:t}){return(0,F.jsx)(`div`,{className:ll.container,children:e.map(e=>(0,F.jsx)(fl,{message:e.message,type:e.type,onDismiss:()=>t(e.id)},e.id))})}var ml=0,hl={dashboard:`dashboard`,settings:`settings`,analytics:`analytics`,recommend:`recommend`,router:`router`};function gl(){let{models:e,connected:t,nextPingAt:n,isPinging:r,pingMode:i,globalBenchmarkRunning:a,globalBenchmarkTotal:o,globalBenchmarkCompleted:s}=Ft(),{theme:c,cycle:l}=un(),[u,d]=(0,v.useState)(`dashboard`),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(!1),[x,S]=(0,v.useState)(!1),[C,w]=(0,v.useState)(null),[ee,T]=(0,v.useState)(!1),[E,D]=(0,v.useState)(!1),[O,te]=(0,v.useState)(!1),[ne,re]=(0,v.useState)(!1),[ie,ae]=(0,v.useState)(!1),[oe,k]=(0,v.useState)(null),[A,se]=(0,v.useState)([]),ce=(0,v.useRef)(Date.now());(0,v.useEffect)(()=>{try{typeof window<`u`&&window.posthog?.capture&&window.posthog.capture(`app_web_start`,{version:`0.5.32`,timestamp:new Date().toISOString()})}catch{}},[]);let le=(0,v.useCallback)(()=>{D(!0);try{typeof window<`u`&&window.posthog?.capture&&window.posthog.capture(`app_router_start`,{version:`0.5.32`,timestamp:new Date().toISOString()})}catch{}},[]),j=(0,v.useCallback)((e,t=`info`)=>{let n=++ml;se(r=>[...r,{id:n,message:e,type:t}]),setTimeout(()=>{se(e=>e.filter(e=>e.id!==n))},4e3)},[]),ue=(0,v.useCallback)(e=>{se(t=>t.filter(t=>t.id!==e))},[]),{filtered:M,filterTier:de,setFilterTier:fe,filterStatus:pe,setFilterStatus:me,filterProvider:he,setFilterProvider:ge,filterVerdict:_e,setFilterVerdict:ve,filterHealth:ye,setFilterHealth:be,visibilityMode:xe,setVisibilityMode:Se,searchQuery:Ce,setSearchQuery:we,customTextFilter:Te,setCustomTextFilter:Ee,sortColumn:De,sortDirection:Oe,setSortColumn:ke,setSortDirection:Ae,toggleSort:je,resetView:Me}=on(e),{toolMode:Ne,setToolMode:Pe,cycleToolMode:Fe}=gn({onToast:j});Nn({currentView:u,setCurrentView:d,filterState:{filterTier:de,setFilterTier:fe,filterStatus:pe,setFilterStatus:me,filterProvider:he,setFilterProvider:ge,filterVerdict:_e,setFilterVerdict:ve,filterHealth:ye,setFilterHealth:be,sortColumn:De,sortDirection:Oe,setSortColumn:ke,setSortDirection:Ae,toggleSort:je,setSearchQuery:we,filterState:null,searchQuery:Ce},paletteOpen:g,setPaletteOpen:_,toolMode:Ne,setToolMode:Pe});let Ie=fn({models:e}),Le=(0,v.useCallback)(async(e,t=null)=>{let n=t||Ne||`opencode`;if(e){if(!Sn(e.providerKey,n)){k({model:e,toolMode:n});return}try{let t=await fetch(`/api/install-endpoint`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerKey:e.providerKey,modelId:e.modelId,toolMode:n})}),r=await t.json().catch(()=>({}));if(t.status===422&&r.code===`incompatible_model`){k({model:e,toolMode:n});return}if(!t.ok)throw Error(r.error||`HTTP ${t.status}`);j(`Endpoint installed for ${e.label} in ${n}. Start the tool yourself.`,`success`)}catch(e){j(`Endpoint install failed: ${e.message}`,`error`)}}},[j,Ne]),Re=(0,v.useCallback)(async(e,t)=>{await Pe(e),k(null),await Le(t,e)},[Le,Pe]),ze=(0,v.useCallback)(async e=>{Ie.isFavorite(e)||await Ie.toggle(e),await Le(e)},[Ie,Le]),{localVersion:Be,latestVersion:Ve,updateAvailable:He,runUpdate:Ue,checkNow:We,error:Ge}=In({onToast:j}),Ke=(0,v.useMemo)(()=>{let t={};return e.forEach(e=>{t[e.providerKey]||(t[e.providerKey]={key:e.providerKey,name:e.origin,count:0,hasKey:!1,anyUp:!1}),t[e.providerKey].count++,e.hasApiKey&&(t[e.providerKey].hasKey=!0),e.status===`up`&&(t[e.providerKey].anyUp=!0)}),Object.values(t).sort((e,t)=>e.name.localeCompare(t.name))},[e]),qe=(0,v.useCallback)(async()=>{if(!a)try{await fetch(`/api/global-benchmark`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({models:M.map(e=>({providerKey:e.providerKey,modelId:e.modelId}))})})}catch(e){console.error(`[Benchmark] Failed to start global benchmark:`,e.message)}},[M,a]),Je=(0,v.useCallback)(async e=>{try{let t=await fetch(`/api/benchmark`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerKey:e.providerKey,modelId:e.modelId})});!t.ok&&t.status!==202&&j(`Benchmark failed: ${(await t.json().catch(()=>({})))?.error||t.statusText}`,`error`)}catch(e){console.error(`[Benchmark] per-row failed:`,e.message)}},[j]),Ye=(0,v.useCallback)(e=>{p(e),ce.current=Date.now()},[]);(0,v.useCallback)(()=>p(null),[]);let Xe=(0,v.useCallback)(async e=>{try{await fetch(`/api/ping-mode?action=${e}`,{method:`POST`})}catch{}},[]),Ze=(0,v.useCallback)(e=>{if(e===`help`){b(!0);return}if(e===`changelog`){S(!0),w(null);return}if(e===`recommend`){T(!0);return}if(e===`router`){le();return}if(e===`playground`){te(!0);return}if(e===`install-endpoints`){ae(!0);return}if(e===`installed-models`){re(!0);return}d(hl[e]||e),ce.current=Date.now()},[j]),Qe=(0,v.useCallback)(()=>{Me(),we(``),j(`View reset to defaults.`,`info`)},[j,Me,we]),$e=(0,v.useCallback)(e=>{w(e),S(!0)},[]);return(0,v.useEffect)(()=>{let e=e=>{let t=e.metaKey||e.ctrlKey;if(t&&(e.key===`k`||e.key===`K`)){e.preventDefault(),_(e=>!e);return}if(t&&(e.key===`p`||e.key===`P`)&&!e.shiftKey){e.preventDefault(),_(e=>!e);return}if(e.key===`Escape`){if(g){_(!1);return}if(y){b(!1);return}if(x){S(!1);return}if(ee){T(!1);return}if(E){D(!1);return}if(O){te(!1);return}if(ie){ae(!1);return}if(ne){re(!1);return}if(oe){k(null);return}if(f){p(null);return}if(m){h(!1);return}}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g,y,x,ee,E,O,ie,ne,oe,f,m]),(0,v.useEffect)(()=>{u===`recommend`&&(T(!0),d(`dashboard`))},[u]),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`app-shell`,children:[(0,F.jsx)(ri,{searchQuery:Ce,onSearchChange:we,currentView:u,onNavigate:Ze,onToggleTheme:l,onOpenExport:()=>h(!0),onOpenCommandPalette:()=>_(!0),onBenchmark:qe,benchmarkRunning:a,benchmarkTotal:o,benchmarkCompleted:s,modelsCount:M.length,theme:c,onToast:j,toolMode:Ne,onSetToolMode:Pe,onCycleToolMode:Fe,updateSlot:(0,F.jsx)(Pc,{updateAvailable:He,latestVersion:Ve,onRunUpdate:Ue,onOpenChangelog:$e})}),(0,F.jsxs)(`div`,{className:`app-content`,children:[u===`dashboard`&&(0,F.jsxs)(`main`,{className:`view`,children:[(0,F.jsx)(oa,{filterTier:de,setFilterTier:fe,filterStatus:pe,setFilterStatus:me,filterProvider:he,setFilterProvider:ge,filterVerdict:_e,setFilterVerdict:ve,filterHealth:ye,setFilterHealth:be,visibilityMode:xe,setVisibilityMode:Se,customTextFilter:Te,setCustomTextFilter:Ee,searchQuery:Ce,onResetView:Qe,providers:Ke,pingMode:i,setPingMode:Xe,nextPingAt:n,isPinging:r,globalBenchmarkRunning:a,globalBenchmarkTotal:o,globalBenchmarkCompleted:s,toolMode:Ne}),(0,F.jsx)(qs,{filtered:M,onSelectModel:Ye,onBenchmarkRow:Je,onLaunch:Le,favorites:Ie,sortColumn:De,sortDirection:Oe,onSort:je,toolMode:Ne,onToast:j,onSetToolMode:Pe,onCycleToolMode:Fe,onOpenFallback:e=>k({model:e,toolMode:Ne})})]}),u===`settings`&&(0,F.jsx)(`div`,{className:`view`,children:(0,F.jsx)(Qs,{onToast:j,onOpenChangelog:e=>{w(e),S(!0)},onCheckForUpdate:()=>{We(),j?.(`Checking for updates…`,`info`)}})}),u===`analytics`&&(0,F.jsx)(`div`,{className:`view`,children:(0,F.jsx)(cc,{models:e})}),(0,F.jsx)(ai,{})]})]}),m&&(0,F.jsx)(Xs,{models:M,onClose:()=>h(!1),onToast:j}),g&&(0,F.jsx)(Tc,{onClose:()=>_(!1),onNavigate:Ze,onCycleTheme:l,onResetView:Qe,onSetPingMode:Xe,onOpenHelp:()=>b(!0),onOpenChangelog:()=>{w(null),S(!0)},onOpenPlayground:()=>te(!0),onExport:()=>h(!0),onRunUpdate:Ue,currentView:u,theme:c,pingMode:i,models:e,updateAvailable:He,latestVersion:Ve,onToast:j}),ee&&(0,F.jsx)(Vc,{onClose:()=>T(!1),toolMode:Ne,onLaunch:Le,onPinAndLaunch:ze,onToast:j}),oe&&(0,F.jsx)(Uc,{request:oe,models:e,onClose:()=>k(null),onSwitchToolLaunch:Re,onLaunchSimilar:t=>{k(null),Le(e.find(e=>e.providerKey===t.providerKey&&e.modelId===t.modelId)||t)}}),y&&(0,F.jsx)(Oc,{onClose:()=>b(!1)}),x&&(0,F.jsx)(Mc,{onClose:()=>S(!1),defaultVersion:C}),E&&(0,F.jsx)(Qc,{onClose:()=>D(!1),onToast:j,favorites:Ie}),O&&(0,F.jsx)(rl,{onClose:()=>te(!1),onToast:j,models:e,routerStatus:null}),ne&&(0,F.jsx)(ol,{onClose:()=>re(!1),onToast:j}),ie&&(0,F.jsx)(cl,{onClose:()=>ae(!1),onToast:j}),(0,F.jsx)(pl,{toasts:A,dismissToast:ue})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,F.jsx)(v.StrictMode,{children:(0,F.jsx)(gl,{})}));