vskill 0.2.78 → 0.2.80

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,73 @@
1
+ (function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const p of m.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&c(p)}).observe(document,{childList:!0,subtree:!0});function d(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function c(f){if(f.ep)return;f.ep=!0;const m=d(f);fetch(f.href,m)}})();var Zu={exports:{}},Zn={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var gm;function Yp(){if(gm)return Zn;gm=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function d(c,f,m){var p=null;if(m!==void 0&&(p=""+m),f.key!==void 0&&(p=""+f.key),"key"in f){m={};for(var j in f)j!=="key"&&(m[j]=f[j])}else m=f;return f=m.ref,{$$typeof:r,type:c,key:p,ref:f!==void 0?f:null,props:m}}return Zn.Fragment=u,Zn.jsx=d,Zn.jsxs=d,Zn}var bm;function Gp(){return bm||(bm=1,Zu.exports=Yp()),Zu.exports}var n=Gp(),Vu={exports:{}},me={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var jm;function Xp(){if(jm)return me;jm=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),p=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),R=Symbol.iterator;function X(N){return N===null||typeof N!="object"?null:(N=R&&N[R]||N["@@iterator"],typeof N=="function"?N:null)}var Q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z=Object.assign,z={};function O(N,B,F){this.props=N,this.context=B,this.refs=z,this.updater=F||Q}O.prototype.isReactComponent={},O.prototype.setState=function(N,B){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,B,"setState")},O.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function Y(){}Y.prototype=O.prototype;function J(N,B,F){this.props=N,this.context=B,this.refs=z,this.updater=F||Q}var V=J.prototype=new Y;V.constructor=J,Z(V,O.prototype),V.isPureReactComponent=!0;var $=Array.isArray;function U(){}var P={H:null,A:null,T:null,S:null},ue=Object.prototype.hasOwnProperty;function ye(N,B,F){var D=F.ref;return{$$typeof:r,type:N,key:B,ref:D!==void 0?D:null,props:F}}function we(N,B){return ye(N.type,B,N.props)}function le(N){return typeof N=="object"&&N!==null&&N.$$typeof===r}function je(N){var B={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(F){return B[F]})}var _e=/\/+/g;function Ue(N,B){return typeof N=="object"&&N!==null&&N.key!=null?je(""+N.key):B.toString(36)}function ke(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(U,U):(N.status="pending",N.then(function(B){N.status==="pending"&&(N.status="fulfilled",N.value=B)},function(B){N.status==="pending"&&(N.status="rejected",N.reason=B)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function T(N,B,F,D,H){var W=typeof N;(W==="undefined"||W==="boolean")&&(N=null);var de=!1;if(N===null)de=!0;else switch(W){case"bigint":case"string":case"number":de=!0;break;case"object":switch(N.$$typeof){case r:case u:de=!0;break;case S:return de=N._init,T(de(N._payload),B,F,D,H)}}if(de)return H=H(N),de=D===""?"."+Ue(N,0):D,$(H)?(F="",de!=null&&(F=de.replace(_e,"$&/")+"/"),T(H,B,F,"",function(K){return K})):H!=null&&(le(H)&&(H=we(H,F+(H.key==null||N&&N.key===H.key?"":(""+H.key).replace(_e,"$&/")+"/")+de)),B.push(H)),1;de=0;var Ne=D===""?".":D+":";if($(N))for(var te=0;te<N.length;te++)D=N[te],W=Ne+Ue(D,te),de+=T(D,B,F,W,H);else if(te=X(N),typeof te=="function")for(N=te.call(N),te=0;!(D=N.next()).done;)D=D.value,W=Ne+Ue(D,te++),de+=T(D,B,F,W,H);else if(W==="object"){if(typeof N.then=="function")return T(ke(N),B,F,D,H);throw B=String(N),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return de}function C(N,B,F){if(N==null)return N;var D=[],H=0;return T(N,D,"","",function(W){return B.call(F,W,H++)}),D}function ee(N){if(N._status===-1){var B=N._result;B=B(),B.then(function(F){(N._status===0||N._status===-1)&&(N._status=1,N._result=F)},function(F){(N._status===0||N._status===-1)&&(N._status=2,N._result=F)}),N._status===-1&&(N._status=0,N._result=B)}if(N._status===1)return N._result.default;throw N._result}var ae=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},fe={map:C,forEach:function(N,B,F){C(N,function(){B.apply(this,arguments)},F)},count:function(N){var B=0;return C(N,function(){B++}),B},toArray:function(N){return C(N,function(B){return B})||[]},only:function(N){if(!le(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return me.Activity=y,me.Children=fe,me.Component=O,me.Fragment=d,me.Profiler=f,me.PureComponent=J,me.StrictMode=c,me.Suspense=v,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,me.__COMPILER_RUNTIME={__proto__:null,c:function(N){return P.H.useMemoCache(N)}},me.cache=function(N){return function(){return N.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(N,B,F){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var D=Z({},N.props),H=N.key;if(B!=null)for(W in B.key!==void 0&&(H=""+B.key),B)!ue.call(B,W)||W==="key"||W==="__self"||W==="__source"||W==="ref"&&B.ref===void 0||(D[W]=B[W]);var W=arguments.length-2;if(W===1)D.children=F;else if(1<W){for(var de=Array(W),Ne=0;Ne<W;Ne++)de[Ne]=arguments[Ne+2];D.children=de}return ye(N.type,H,D)},me.createContext=function(N){return N={$$typeof:p,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:m,_context:N},N},me.createElement=function(N,B,F){var D,H={},W=null;if(B!=null)for(D in B.key!==void 0&&(W=""+B.key),B)ue.call(B,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(H[D]=B[D]);var de=arguments.length-2;if(de===1)H.children=F;else if(1<de){for(var Ne=Array(de),te=0;te<de;te++)Ne[te]=arguments[te+2];H.children=Ne}if(N&&N.defaultProps)for(D in de=N.defaultProps,de)H[D]===void 0&&(H[D]=de[D]);return ye(N,W,H)},me.createRef=function(){return{current:null}},me.forwardRef=function(N){return{$$typeof:j,render:N}},me.isValidElement=le,me.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:ee}},me.memo=function(N,B){return{$$typeof:x,type:N,compare:B===void 0?null:B}},me.startTransition=function(N){var B=P.T,F={};P.T=F;try{var D=N(),H=P.S;H!==null&&H(F,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(U,ae)}catch(W){ae(W)}finally{B!==null&&F.types!==null&&(B.types=F.types),P.T=B}},me.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},me.use=function(N){return P.H.use(N)},me.useActionState=function(N,B,F){return P.H.useActionState(N,B,F)},me.useCallback=function(N,B){return P.H.useCallback(N,B)},me.useContext=function(N){return P.H.useContext(N)},me.useDebugValue=function(){},me.useDeferredValue=function(N,B){return P.H.useDeferredValue(N,B)},me.useEffect=function(N,B){return P.H.useEffect(N,B)},me.useEffectEvent=function(N){return P.H.useEffectEvent(N)},me.useId=function(){return P.H.useId()},me.useImperativeHandle=function(N,B,F){return P.H.useImperativeHandle(N,B,F)},me.useInsertionEffect=function(N,B){return P.H.useInsertionEffect(N,B)},me.useLayoutEffect=function(N,B){return P.H.useLayoutEffect(N,B)},me.useMemo=function(N,B){return P.H.useMemo(N,B)},me.useOptimistic=function(N,B){return P.H.useOptimistic(N,B)},me.useReducer=function(N,B,F){return P.H.useReducer(N,B,F)},me.useRef=function(N){return P.H.useRef(N)},me.useState=function(N){return P.H.useState(N)},me.useSyncExternalStore=function(N,B,F){return P.H.useSyncExternalStore(N,B,F)},me.useTransition=function(){return P.H.useTransition()},me.version="19.2.4",me}var Sm;function oc(){return Sm||(Sm=1,Vu.exports=Xp()),Vu.exports}var g=oc(),Ku={exports:{}},Vn={},$u={exports:{}},Ju={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Nm;function Qp(){return Nm||(Nm=1,(function(r){function u(T,C){var ee=T.length;T.push(C);e:for(;0<ee;){var ae=ee-1>>>1,fe=T[ae];if(0<f(fe,C))T[ae]=C,T[ee]=fe,ee=ae;else break e}}function d(T){return T.length===0?null:T[0]}function c(T){if(T.length===0)return null;var C=T[0],ee=T.pop();if(ee!==C){T[0]=ee;e:for(var ae=0,fe=T.length,N=fe>>>1;ae<N;){var B=2*(ae+1)-1,F=T[B],D=B+1,H=T[D];if(0>f(F,ee))D<fe&&0>f(H,F)?(T[ae]=H,T[D]=ee,ae=D):(T[ae]=F,T[B]=ee,ae=B);else if(D<fe&&0>f(H,ee))T[ae]=H,T[D]=ee,ae=D;else break e}}return C}function f(T,C){var ee=T.sortIndex-C.sortIndex;return ee!==0?ee:T.id-C.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;r.unstable_now=function(){return m.now()}}else{var p=Date,j=p.now();r.unstable_now=function(){return p.now()-j}}var v=[],x=[],S=1,y=null,R=3,X=!1,Q=!1,Z=!1,z=!1,O=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null;function V(T){for(var C=d(x);C!==null;){if(C.callback===null)c(x);else if(C.startTime<=T)c(x),C.sortIndex=C.expirationTime,u(v,C);else break;C=d(x)}}function $(T){if(Z=!1,V(T),!Q)if(d(v)!==null)Q=!0,U||(U=!0,je());else{var C=d(x);C!==null&&ke($,C.startTime-T)}}var U=!1,P=-1,ue=5,ye=-1;function we(){return z?!0:!(r.unstable_now()-ye<ue)}function le(){if(z=!1,U){var T=r.unstable_now();ye=T;var C=!0;try{e:{Q=!1,Z&&(Z=!1,Y(P),P=-1),X=!0;var ee=R;try{t:{for(V(T),y=d(v);y!==null&&!(y.expirationTime>T&&we());){var ae=y.callback;if(typeof ae=="function"){y.callback=null,R=y.priorityLevel;var fe=ae(y.expirationTime<=T);if(T=r.unstable_now(),typeof fe=="function"){y.callback=fe,V(T),C=!0;break t}y===d(v)&&c(v),V(T)}else c(v);y=d(v)}if(y!==null)C=!0;else{var N=d(x);N!==null&&ke($,N.startTime-T),C=!1}}break e}finally{y=null,R=ee,X=!1}C=void 0}}finally{C?je():U=!1}}}var je;if(typeof J=="function")je=function(){J(le)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,Ue=_e.port2;_e.port1.onmessage=le,je=function(){Ue.postMessage(null)}}else je=function(){O(le,0)};function ke(T,C){P=O(function(){T(r.unstable_now())},C)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(T){T.callback=null},r.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<T?Math.floor(1e3/T):5},r.unstable_getCurrentPriorityLevel=function(){return R},r.unstable_next=function(T){switch(R){case 1:case 2:case 3:var C=3;break;default:C=R}var ee=R;R=C;try{return T()}finally{R=ee}},r.unstable_requestPaint=function(){z=!0},r.unstable_runWithPriority=function(T,C){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var ee=R;R=T;try{return C()}finally{R=ee}},r.unstable_scheduleCallback=function(T,C,ee){var ae=r.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ae+ee:ae):ee=ae,T){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=ee+fe,T={id:S++,callback:C,priorityLevel:T,startTime:ee,expirationTime:fe,sortIndex:-1},ee>ae?(T.sortIndex=ee,u(x,T),d(v)===null&&T===d(x)&&(Z?(Y(P),P=-1):Z=!0,ke($,ee-ae))):(T.sortIndex=fe,u(v,T),Q||X||(Q=!0,U||(U=!0,je()))),T},r.unstable_shouldYield=we,r.unstable_wrapCallback=function(T){var C=R;return function(){var ee=R;R=C;try{return T.apply(this,arguments)}finally{R=ee}}}})(Ju)),Ju}var Em;function Zp(){return Em||(Em=1,$u.exports=Qp()),$u.exports}var Wu={exports:{}},rt={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Tm;function Vp(){if(Tm)return rt;Tm=1;var r=oc();function u(v){var x="https://react.dev/errors/"+v;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)x+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+v+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var c={d:{f:d,r:function(){throw Error(u(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},f=Symbol.for("react.portal");function m(v,x,S){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:y==null?null:""+y,children:v,containerInfo:x,implementation:S}}var p=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(v,x){if(v==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,rt.createPortal=function(v,x){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(u(299));return m(v,x,null,S)},rt.flushSync=function(v){var x=p.T,S=c.p;try{if(p.T=null,c.p=2,v)return v()}finally{p.T=x,c.p=S,c.d.f()}},rt.preconnect=function(v,x){typeof v=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,c.d.C(v,x))},rt.prefetchDNS=function(v){typeof v=="string"&&c.d.D(v)},rt.preinit=function(v,x){if(typeof v=="string"&&x&&typeof x.as=="string"){var S=x.as,y=j(S,x.crossOrigin),R=typeof x.integrity=="string"?x.integrity:void 0,X=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;S==="style"?c.d.S(v,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:y,integrity:R,fetchPriority:X}):S==="script"&&c.d.X(v,{crossOrigin:y,integrity:R,fetchPriority:X,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},rt.preinitModule=function(v,x){if(typeof v=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var S=j(x.as,x.crossOrigin);c.d.M(v,{crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&c.d.M(v)},rt.preload=function(v,x){if(typeof v=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var S=x.as,y=j(S,x.crossOrigin);c.d.L(v,S,{crossOrigin:y,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},rt.preloadModule=function(v,x){if(typeof v=="string")if(x){var S=j(x.as,x.crossOrigin);c.d.m(v,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else c.d.m(v)},rt.requestFormReset=function(v){c.d.r(v)},rt.unstable_batchedUpdates=function(v,x){return v(x)},rt.useFormState=function(v,x,S){return p.H.useFormState(v,x,S)},rt.useFormStatus=function(){return p.H.useHostTransitionStatus()},rt.version="19.2.4",rt}var km;function Kp(){if(km)return Wu.exports;km=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),Wu.exports=Vp(),Wu.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Mm;function $p(){if(Mm)return Vn;Mm=1;var r=Zp(),u=oc(),d=Kp();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function p(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 j(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 v(e){if(m(e)!==e)throw Error(c(188))}function x(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(c(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var i=s.alternate;if(i===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===l)return v(s),e;if(i===a)return v(s),t;i=i.sibling}throw Error(c(188))}if(l.return!==a.return)l=s,a=i;else{for(var o=!1,h=s.child;h;){if(h===l){o=!0,l=s,a=i;break}if(h===a){o=!0,a=s,l=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===l){o=!0,l=i,a=s;break}if(h===a){o=!0,a=i,l=s;break}h=h.sibling}if(!o)throw Error(c(189))}}if(l.alternate!==a)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,R=Symbol.for("react.element"),X=Symbol.for("react.transitional.element"),Q=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),J=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),ye=Symbol.for("react.activity"),we=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function je(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var _e=Symbol.for("react.client.reference");function Ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_e?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Z:return"Fragment";case O:return"Profiler";case z:return"StrictMode";case $:return"Suspense";case U:return"SuspenseList";case ye:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Q:return"Portal";case J:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case V:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:Ue(e.type)||"Memo";case ue:t=e._payload,e=e._init;try{return Ue(e(t))}catch{}}return null}var ke=Array.isArray,T=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ae=[],fe=-1;function N(e){return{current:e}}function B(e){0>fe||(e.current=ae[fe],ae[fe]=null,fe--)}function F(e,t){fe++,ae[fe]=e.current,e.current=t}var D=N(null),H=N(null),W=N(null),de=N(null);function Ne(e,t){switch(F(W,t),F(H,e),F(D,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gf(t),e=Xf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(D),F(D,e)}function te(){B(D),B(H),B(W)}function K(e){e.memoizedState!==null&&F(de,e);var t=D.current,l=Xf(t,e.type);t!==l&&(F(H,e),F(D,l))}function I(e){H.current===e&&(B(D),B(H)),de.current===e&&(B(de),Yn._currentValue=ee)}var se,re;function et(e){if(se===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);se=t&&t[1]||"",re=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+se+e+re}var Fe=!1;function Mt(e,t){if(!e||Fe)return"";Fe=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(_){var w=_}Reflect.construct(e,[],G)}else{try{G.call()}catch(_){w=_}e.call(G.prototype)}}else{try{throw Error()}catch(_){w=_}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(_){if(_&&w&&typeof _.stack=="string")return[_.stack,w.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var b=o.split(`
44
+ `),A=h.split(`
45
+ `);for(s=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;if(a===b.length||s===A.length)for(a=b.length-1,s=A.length-1;1<=a&&0<=s&&b[a]!==A[s];)s--;for(;1<=a&&0<=s;a--,s--)if(b[a]!==A[s]){if(a!==1||s!==1)do if(a--,s--,0>s||b[a]!==A[s]){var L=`
46
+ `+b[a].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=a&&0<=s);break}}}finally{Fe=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?et(l):""}function Xl(e,t){switch(e.tag){case 26:case 27:case 5:return et(e.type);case 16:return et("Lazy");case 13:return e.child!==t&&t!==null?et("Suspense Fallback"):et("Suspense");case 19:return et("SuspenseList");case 0:case 15:return Mt(e.type,!1);case 11:return Mt(e.type.render,!1);case 1:return Mt(e.type,!0);case 31:return et("Activity");default:return""}}function fa(e){try{var t="",l=null;do t+=Xl(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
+ Error generating stack: `+a.message+`
48
+ `+a.stack}}var Ci=Object.prototype.hasOwnProperty,Ri=r.unstable_scheduleCallback,_i=r.unstable_cancelCallback,gh=r.unstable_shouldYield,bh=r.unstable_requestPaint,vt=r.unstable_now,jh=r.unstable_getCurrentPriorityLevel,yc=r.unstable_ImmediatePriority,gc=r.unstable_UserBlockingPriority,ts=r.unstable_NormalPriority,Sh=r.unstable_LowPriority,bc=r.unstable_IdlePriority,Nh=r.log,Eh=r.unstable_setDisableYieldValue,Pa=null,yt=null;function vl(e){if(typeof Nh=="function"&&Eh(e),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(Pa,e)}catch{}}var gt=Math.clz32?Math.clz32:Mh,Th=Math.log,kh=Math.LN2;function Mh(e){return e>>>=0,e===0?32:31-(Th(e)/kh|0)|0}var ls=256,as=262144,ns=4194304;function Ql(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 ss(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=a&134217727;return h!==0?(a=h&~i,a!==0?s=Ql(a):(o&=h,o!==0?s=Ql(o):l||(l=h&~e,l!==0&&(s=Ql(l))))):(h=a&~i,h!==0?s=Ql(h):o!==0?s=Ql(o):l||(l=a&~e,l!==0&&(s=Ql(l)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:s}function Ia(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ah(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 jc(){var e=ns;return ns<<=1,(ns&62914560)===0&&(ns=4194304),e}function zi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function en(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wh(e,t,l,a,s,i){var o=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var h=e.entanglements,b=e.expirationTimes,A=e.hiddenUpdates;for(l=o&~l;0<l;){var L=31-gt(l),G=1<<L;h[L]=0,b[L]=-1;var w=A[L];if(w!==null)for(A[L]=null,L=0;L<w.length;L++){var _=w[L];_!==null&&(_.lane&=-536870913)}l&=~G}a!==0&&Sc(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function Sc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-gt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Nc(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-gt(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function Ec(e,t){var l=t&-t;return l=(l&42)!==0?1:Di(l),(l&(e.suspendedLanes|t))!==0?0:l}function Di(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 Oi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Tc(){var e=C.p;return e!==0?e:(e=window.event,e===void 0?32:fm(e.type))}function kc(e,t){var l=C.p;try{return C.p=e,t()}finally{C.p=l}}var yl=Math.random().toString(36).slice(2),tt="__reactFiber$"+yl,ot="__reactProps$"+yl,ma="__reactContainer$"+yl,Li="__reactEvents$"+yl,Ch="__reactListeners$"+yl,Rh="__reactHandles$"+yl,Mc="__reactResources$"+yl,tn="__reactMarker$"+yl;function Bi(e){delete e[tt],delete e[ot],delete e[Li],delete e[Ch],delete e[Rh]}function ha(e){var t=e[tt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ma]||l[tt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Wf(e);e!==null;){if(l=e[tt])return l;e=Wf(e)}return t}e=l,l=e.parentNode}return null}function xa(e){if(e=e[tt]||e[ma]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ln(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function pa(e){var t=e[Mc];return t||(t=e[Mc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Pe(e){e[tn]=!0}var Ac=new Set,wc={};function Zl(e,t){va(e,t),va(e+"Capture",t)}function va(e,t){for(wc[e]=t,e=0;e<t.length;e++)Ac.add(t[e])}var _h=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]*$"),Cc={},Rc={};function zh(e){return Ci.call(Rc,e)?!0:Ci.call(Cc,e)?!1:_h.test(e)?Rc[e]=!0:(Cc[e]=!0,!1)}function is(e,t,l){if(zh(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function rs(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Ft(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function At(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _c(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Dh(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){l=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hi(e){if(!e._valueTracker){var t=_c(e)?"checked":"value";e._valueTracker=Dh(e,t,""+e[t])}}function zc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=_c(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function us(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Oh=/[\n"\\]/g;function wt(e){return e.replace(Oh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ui(e,t,l,a,s,i,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+At(t)):e.value!==""+At(t)&&(e.value=""+At(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?qi(e,o,At(t)):l!=null?qi(e,o,At(l)):a!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+At(h):e.removeAttribute("name")}function Dc(e,t,l,a,s,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Hi(e);return}l=l!=null?""+At(l):"",t=t!=null?""+At(t):l,h||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=h?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Hi(e)}function qi(e,t,l){t==="number"&&us(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ya(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+At(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Oc(e,t,l){if(t!=null&&(t=""+At(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+At(l):""}function Lc(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(c(92));if(ke(a)){if(1<a.length)throw Error(c(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=At(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Hi(e)}function ga(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Lh=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 Bc(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Lh.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Hc(e,t,l){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&Bc(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&Bc(e,i,t[i])}function Yi(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 Bh=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"]]),Hh=/^[\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 cs(e){return Hh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pt(){}var Gi=null;function Xi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ba=null,ja=null;function Uc(e){var t=xa(e);if(t&&(e=t.stateNode)){var l=e[ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ui(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+wt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[ot]||null;if(!s)throw Error(c(90));Ui(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&zc(a)}break e;case"textarea":Oc(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ya(e,!!l.multiple,t,!1)}}}var Qi=!1;function qc(e,t,l){if(Qi)return e(t,l);Qi=!0;try{var a=e(t);return a}finally{if(Qi=!1,(ba!==null||ja!==null)&&(Ws(),ba&&(t=ba,e=ja,ja=ba=null,Uc(t),e)))for(t=0;t<e.length;t++)Uc(e[t])}}function an(e,t){var l=e.stateNode;if(l===null)return null;var a=l[ot]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(c(231,t,typeof l));return l}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zi=!1;if(It)try{var nn={};Object.defineProperty(nn,"passive",{get:function(){Zi=!0}}),window.addEventListener("test",nn,nn),window.removeEventListener("test",nn,nn)}catch{Zi=!1}var gl=null,Vi=null,os=null;function Yc(){if(os)return os;var e,t=Vi,l=t.length,a,s="value"in gl?gl.value:gl.textContent,i=s.length;for(e=0;e<l&&t[e]===s[e];e++);var o=l-e;for(a=1;a<=o&&t[l-a]===s[i-a];a++);return os=s.slice(e,1<a?1-a:void 0)}function ds(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 fs(){return!0}function Gc(){return!1}function dt(e){function t(l,a,s,i,o){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(l=e[h],this[h]=l?l(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?fs:Gc,this.isPropagationStopped=Gc,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=fs)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=fs)},persist:function(){},isPersistent:fs}),t}var Vl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ms=dt(Vl),sn=y({},Vl,{view:0,detail:0}),Uh=dt(sn),Ki,$i,rn,hs=y({},sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wi,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!==rn&&(rn&&e.type==="mousemove"?(Ki=e.screenX-rn.screenX,$i=e.screenY-rn.screenY):$i=Ki=0,rn=e),Ki)},movementY:function(e){return"movementY"in e?e.movementY:$i}}),Xc=dt(hs),qh=y({},hs,{dataTransfer:0}),Yh=dt(qh),Gh=y({},sn,{relatedTarget:0}),Ji=dt(Gh),Xh=y({},Vl,{animationName:0,elapsedTime:0,pseudoElement:0}),Qh=dt(Xh),Zh=y({},Vl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vh=dt(Zh),Kh=y({},Vl,{data:0}),Qc=dt(Kh),$h={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jh={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"},Wh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Fh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wh[e])?!!t[e]:!1}function Wi(){return Fh}var Ph=y({},sn,{key:function(e){if(e.key){var t=$h[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Jh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wi,charCode:function(e){return e.type==="keypress"?ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ih=dt(Ph),ex=y({},hs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zc=dt(ex),tx=y({},sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wi}),lx=dt(tx),ax=y({},Vl,{propertyName:0,elapsedTime:0,pseudoElement:0}),nx=dt(ax),sx=y({},hs,{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}),ix=dt(sx),rx=y({},Vl,{newState:0,oldState:0}),ux=dt(rx),cx=[9,13,27,32],Fi=It&&"CompositionEvent"in window,un=null;It&&"documentMode"in document&&(un=document.documentMode);var ox=It&&"TextEvent"in window&&!un,Vc=It&&(!Fi||un&&8<un&&11>=un),Kc=" ",$c=!1;function Jc(e,t){switch(e){case"keyup":return cx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sa=!1;function dx(e,t){switch(e){case"compositionend":return Wc(t);case"keypress":return t.which!==32?null:($c=!0,Kc);case"textInput":return e=t.data,e===Kc&&$c?null:e;default:return null}}function fx(e,t){if(Sa)return e==="compositionend"||!Fi&&Jc(e,t)?(e=Yc(),os=Vi=gl=null,Sa=!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 Vc&&t.locale!=="ko"?null:t.data;default:return null}}var mx={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 Fc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mx[e.type]:t==="textarea"}function Pc(e,t,l,a){ba?ja?ja.push(a):ja=[a]:ba=a,t=ai(t,"onChange"),0<t.length&&(l=new ms("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var cn=null,on=null;function hx(e){Lf(e,0)}function xs(e){var t=ln(e);if(zc(t))return e}function Ic(e,t){if(e==="change")return t}var eo=!1;if(It){var Pi;if(It){var Ii="oninput"in document;if(!Ii){var to=document.createElement("div");to.setAttribute("oninput","return;"),Ii=typeof to.oninput=="function"}Pi=Ii}else Pi=!1;eo=Pi&&(!document.documentMode||9<document.documentMode)}function lo(){cn&&(cn.detachEvent("onpropertychange",ao),on=cn=null)}function ao(e){if(e.propertyName==="value"&&xs(on)){var t=[];Pc(t,on,e,Xi(e)),qc(hx,t)}}function xx(e,t,l){e==="focusin"?(lo(),cn=t,on=l,cn.attachEvent("onpropertychange",ao)):e==="focusout"&&lo()}function px(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xs(on)}function vx(e,t){if(e==="click")return xs(t)}function yx(e,t){if(e==="input"||e==="change")return xs(t)}function gx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bt=typeof Object.is=="function"?Object.is:gx;function dn(e,t){if(bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!Ci.call(t,s)||!bt(e[s],t[s]))return!1}return!0}function no(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function so(e,t){var l=no(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=no(l)}}function io(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?io(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ro(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=us(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=us(e.document)}return t}function er(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 bx=It&&"documentMode"in document&&11>=document.documentMode,Na=null,tr=null,fn=null,lr=!1;function uo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;lr||Na==null||Na!==us(a)||(a=Na,"selectionStart"in a&&er(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),fn&&dn(fn,a)||(fn=a,a=ai(tr,"onSelect"),0<a.length&&(t=new ms("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Na)))}function Kl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ea={animationend:Kl("Animation","AnimationEnd"),animationiteration:Kl("Animation","AnimationIteration"),animationstart:Kl("Animation","AnimationStart"),transitionrun:Kl("Transition","TransitionRun"),transitionstart:Kl("Transition","TransitionStart"),transitioncancel:Kl("Transition","TransitionCancel"),transitionend:Kl("Transition","TransitionEnd")},ar={},co={};It&&(co=document.createElement("div").style,"AnimationEvent"in window||(delete Ea.animationend.animation,delete Ea.animationiteration.animation,delete Ea.animationstart.animation),"TransitionEvent"in window||delete Ea.transitionend.transition);function $l(e){if(ar[e])return ar[e];if(!Ea[e])return e;var t=Ea[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in co)return ar[e]=t[l];return e}var oo=$l("animationend"),fo=$l("animationiteration"),mo=$l("animationstart"),jx=$l("transitionrun"),Sx=$l("transitionstart"),Nx=$l("transitioncancel"),ho=$l("transitionend"),xo=new Map,nr="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(" ");nr.push("scrollEnd");function qt(e,t){xo.set(e,t),Zl(t,[e])}var ps=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!==null&&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)},Ct=[],Ta=0,sr=0;function vs(){for(var e=Ta,t=sr=Ta=0;t<e;){var l=Ct[t];Ct[t++]=null;var a=Ct[t];Ct[t++]=null;var s=Ct[t];Ct[t++]=null;var i=Ct[t];if(Ct[t++]=null,a!==null&&s!==null){var o=a.pending;o===null?s.next=s:(s.next=o.next,o.next=s),a.pending=s}i!==0&&po(l,s,i)}}function ys(e,t,l,a){Ct[Ta++]=e,Ct[Ta++]=t,Ct[Ta++]=l,Ct[Ta++]=a,sr|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ir(e,t,l,a){return ys(e,t,l,a),gs(e)}function Jl(e,t){return ys(e,null,null,t),gs(e)}function po(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-gt(l),e=i.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),i):null}function gs(e){if(50<Dn)throw Dn=0,xu=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ka={};function Ex(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jt(e,t,l,a){return new Ex(e,t,l,a)}function rr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function el(e,t){var l=e.alternate;return l===null?(l=jt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function vo(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function bs(e,t,l,a,s,i){var o=0;if(a=e,typeof e=="function")rr(e)&&(o=1);else if(typeof e=="string")o=wp(e,l,D.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ye:return e=jt(31,l,t,s),e.elementType=ye,e.lanes=i,e;case Z:return Wl(l.children,s,i,t);case z:o=8,s|=24;break;case O:return e=jt(12,l,t,s|2),e.elementType=O,e.lanes=i,e;case $:return e=jt(13,l,t,s),e.elementType=$,e.lanes=i,e;case U:return e=jt(19,l,t,s),e.elementType=U,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case J:o=10;break e;case Y:o=9;break e;case V:o=11;break e;case P:o=14;break e;case ue:o=16,a=null;break e}o=29,l=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=jt(o,l,t,s),t.elementType=e,t.type=a,t.lanes=i,t}function Wl(e,t,l,a){return e=jt(7,e,a,t),e.lanes=l,e}function ur(e,t,l){return e=jt(6,e,null,t),e.lanes=l,e}function yo(e){var t=jt(18,null,null,0);return t.stateNode=e,t}function cr(e,t,l){return t=jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var go=new WeakMap;function Rt(e,t){if(typeof e=="object"&&e!==null){var l=go.get(e);return l!==void 0?l:(t={value:e,source:t,stack:fa(t)},go.set(e,t),t)}return{value:e,source:t,stack:fa(t)}}var Ma=[],Aa=0,js=null,mn=0,_t=[],zt=0,bl=null,Qt=1,Zt="";function tl(e,t){Ma[Aa++]=mn,Ma[Aa++]=js,js=e,mn=t}function bo(e,t,l){_t[zt++]=Qt,_t[zt++]=Zt,_t[zt++]=bl,bl=e;var a=Qt;e=Zt;var s=32-gt(a)-1;a&=~(1<<s),l+=1;var i=32-gt(t)+s;if(30<i){var o=s-s%5;i=(a&(1<<o)-1).toString(32),a>>=o,s-=o,Qt=1<<32-gt(t)+s|l<<s|a,Zt=i+e}else Qt=1<<i|l<<s|a,Zt=e}function or(e){e.return!==null&&(tl(e,1),bo(e,1,0))}function dr(e){for(;e===js;)js=Ma[--Aa],Ma[Aa]=null,mn=Ma[--Aa],Ma[Aa]=null;for(;e===bl;)bl=_t[--zt],_t[zt]=null,Zt=_t[--zt],_t[zt]=null,Qt=_t[--zt],_t[zt]=null}function jo(e,t){_t[zt++]=Qt,_t[zt++]=Zt,_t[zt++]=bl,Qt=t.id,Zt=t.overflow,bl=e}var lt=null,Be=null,Se=!1,jl=null,Dt=!1,fr=Error(c(519));function Sl(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hn(Rt(t,e)),fr}function So(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[tt]=e,t[ot]=a,l){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(l=0;l<Ln.length;l++)ve(Ln[l],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),Dc(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),Lc(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||qf(t.textContent,l)?(a.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),a.onScroll!=null&&ve("scroll",t),a.onScrollEnd!=null&&ve("scrollend",t),a.onClick!=null&&(t.onclick=Pt),t=!0):t=!1,t||Sl(e,!0)}function No(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Dt=!1;return;case 27:case 3:Dt=!0;return;default:lt=lt.return}}function wa(e){if(e!==lt)return!1;if(!Se)return No(e),Se=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Cu(e.type,e.memoizedProps)),l=!l),l&&Be&&Sl(e),No(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Be=Jf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Be=Jf(e)}else t===27?(t=Be,Ll(e.type)?(e=Ou,Ou=null,Be=e):Be=t):Be=lt?Lt(e.stateNode.nextSibling):null;return!0}function Fl(){Be=lt=null,Se=!1}function mr(){var e=jl;return e!==null&&(xt===null?xt=e:xt.push.apply(xt,e),jl=null),e}function hn(e){jl===null?jl=[e]:jl.push(e)}var hr=N(null),Pl=null,ll=null;function Nl(e,t,l){F(hr,t._currentValue),t._currentValue=l}function al(e){e._currentValue=hr.current,B(hr)}function xr(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function pr(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var o=s.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=s;for(var b=0;b<t.length;b++)if(h.context===t[b]){i.lanes|=l,h=i.alternate,h!==null&&(h.lanes|=l),xr(i.return,l,e),a||(o=null);break e}i=h.next}}else if(s.tag===18){if(o=s.return,o===null)throw Error(c(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),xr(o,l,e),o=null}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}}function Ca(e,t,l,a){e=null;for(var s=t,i=!1;s!==null;){if(!i){if((s.flags&524288)!==0)i=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var o=s.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var h=s.type;bt(s.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(s===de.current){if(o=s.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Yn):e=[Yn])}s=s.return}e!==null&&pr(t,e,l,a),t.flags|=262144}function Ss(e){for(e=e.firstContext;e!==null;){if(!bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Il(e){Pl=e,ll=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function at(e){return Eo(Pl,e)}function Ns(e,t){return Pl===null&&Il(e),Eo(e,t)}function Eo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},ll===null){if(e===null)throw Error(c(308));ll=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ll=ll.next=t;return l}var Tx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},kx=r.unstable_scheduleCallback,Mx=r.unstable_NormalPriority,Ve={$$typeof:J,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vr(){return{controller:new Tx,data:new Map,refCount:0}}function xn(e){e.refCount--,e.refCount===0&&kx(Mx,function(){e.controller.abort()})}var pn=null,yr=0,Ra=0,_a=null;function Ax(e,t){if(pn===null){var l=pn=[];yr=0,Ra=ju(),_a={status:"pending",value:void 0,then:function(a){l.push(a)}}}return yr++,t.then(To,To),t}function To(){if(--yr===0&&pn!==null){_a!==null&&(_a.status="fulfilled");var e=pn;pn=null,Ra=0,_a=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function wx(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var ko=T.S;T.S=function(e,t){of=vt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ax(e,t),ko!==null&&ko(e,t)};var ea=N(null);function gr(){var e=ea.current;return e!==null?e:Le.pooledCache}function Es(e,t){t===null?F(ea,ea.current):F(ea,t.pool)}function Mo(){var e=gr();return e===null?null:{parent:Ve._currentValue,pool:e}}var za=Error(c(460)),br=Error(c(474)),Ts=Error(c(542)),ks={then:function(){}};function Ao(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Pt,Pt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ro(e),e;default:if(typeof t.status=="string")t.then(Pt,Pt);else{if(e=Le,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ro(e),e}throw la=t,za}}function ta(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(la=l,za):l}}var la=null;function Co(){if(la===null)throw Error(c(459));var e=la;return la=null,e}function Ro(e){if(e===za||e===Ts)throw Error(c(483))}var Da=null,vn=0;function Ms(e){var t=vn;return vn+=1,Da===null&&(Da=[]),wo(Da,e,t)}function yn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function As(e,t){throw t.$$typeof===R?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function _o(e){function t(k,E){if(e){var M=k.deletions;M===null?(k.deletions=[E],k.flags|=16):M.push(E)}}function l(k,E){if(!e)return null;for(;E!==null;)t(k,E),E=E.sibling;return null}function a(k){for(var E=new Map;k!==null;)k.key!==null?E.set(k.key,k):E.set(k.index,k),k=k.sibling;return E}function s(k,E){return k=el(k,E),k.index=0,k.sibling=null,k}function i(k,E,M){return k.index=M,e?(M=k.alternate,M!==null?(M=M.index,M<E?(k.flags|=67108866,E):M):(k.flags|=67108866,E)):(k.flags|=1048576,E)}function o(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function h(k,E,M,q){return E===null||E.tag!==6?(E=ur(M,k.mode,q),E.return=k,E):(E=s(E,M),E.return=k,E)}function b(k,E,M,q){var ce=M.type;return ce===Z?L(k,E,M.props.children,q,M.key):E!==null&&(E.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===ue&&ta(ce)===E.type)?(E=s(E,M.props),yn(E,M),E.return=k,E):(E=bs(M.type,M.key,M.props,null,k.mode,q),yn(E,M),E.return=k,E)}function A(k,E,M,q){return E===null||E.tag!==4||E.stateNode.containerInfo!==M.containerInfo||E.stateNode.implementation!==M.implementation?(E=cr(M,k.mode,q),E.return=k,E):(E=s(E,M.children||[]),E.return=k,E)}function L(k,E,M,q,ce){return E===null||E.tag!==7?(E=Wl(M,k.mode,q,ce),E.return=k,E):(E=s(E,M),E.return=k,E)}function G(k,E,M){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=ur(""+E,k.mode,M),E.return=k,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case X:return M=bs(E.type,E.key,E.props,null,k.mode,M),yn(M,E),M.return=k,M;case Q:return E=cr(E,k.mode,M),E.return=k,E;case ue:return E=ta(E),G(k,E,M)}if(ke(E)||je(E))return E=Wl(E,k.mode,M,null),E.return=k,E;if(typeof E.then=="function")return G(k,Ms(E),M);if(E.$$typeof===J)return G(k,Ns(k,E),M);As(k,E)}return null}function w(k,E,M,q){var ce=E!==null?E.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ce!==null?null:h(k,E,""+M,q);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case X:return M.key===ce?b(k,E,M,q):null;case Q:return M.key===ce?A(k,E,M,q):null;case ue:return M=ta(M),w(k,E,M,q)}if(ke(M)||je(M))return ce!==null?null:L(k,E,M,q,null);if(typeof M.then=="function")return w(k,E,Ms(M),q);if(M.$$typeof===J)return w(k,E,Ns(k,M),q);As(k,M)}return null}function _(k,E,M,q,ce){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return k=k.get(M)||null,h(E,k,""+q,ce);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case X:return k=k.get(q.key===null?M:q.key)||null,b(E,k,q,ce);case Q:return k=k.get(q.key===null?M:q.key)||null,A(E,k,q,ce);case ue:return q=ta(q),_(k,E,M,q,ce)}if(ke(q)||je(q))return k=k.get(M)||null,L(E,k,q,ce,null);if(typeof q.then=="function")return _(k,E,M,Ms(q),ce);if(q.$$typeof===J)return _(k,E,M,Ns(E,q),ce);As(E,q)}return null}function ne(k,E,M,q){for(var ce=null,Ee=null,ie=E,xe=E=0,be=null;ie!==null&&xe<M.length;xe++){ie.index>xe?(be=ie,ie=null):be=ie.sibling;var Te=w(k,ie,M[xe],q);if(Te===null){ie===null&&(ie=be);break}e&&ie&&Te.alternate===null&&t(k,ie),E=i(Te,E,xe),Ee===null?ce=Te:Ee.sibling=Te,Ee=Te,ie=be}if(xe===M.length)return l(k,ie),Se&&tl(k,xe),ce;if(ie===null){for(;xe<M.length;xe++)ie=G(k,M[xe],q),ie!==null&&(E=i(ie,E,xe),Ee===null?ce=ie:Ee.sibling=ie,Ee=ie);return Se&&tl(k,xe),ce}for(ie=a(ie);xe<M.length;xe++)be=_(ie,k,xe,M[xe],q),be!==null&&(e&&be.alternate!==null&&ie.delete(be.key===null?xe:be.key),E=i(be,E,xe),Ee===null?ce=be:Ee.sibling=be,Ee=be);return e&&ie.forEach(function(Yl){return t(k,Yl)}),Se&&tl(k,xe),ce}function oe(k,E,M,q){if(M==null)throw Error(c(151));for(var ce=null,Ee=null,ie=E,xe=E=0,be=null,Te=M.next();ie!==null&&!Te.done;xe++,Te=M.next()){ie.index>xe?(be=ie,ie=null):be=ie.sibling;var Yl=w(k,ie,Te.value,q);if(Yl===null){ie===null&&(ie=be);break}e&&ie&&Yl.alternate===null&&t(k,ie),E=i(Yl,E,xe),Ee===null?ce=Yl:Ee.sibling=Yl,Ee=Yl,ie=be}if(Te.done)return l(k,ie),Se&&tl(k,xe),ce;if(ie===null){for(;!Te.done;xe++,Te=M.next())Te=G(k,Te.value,q),Te!==null&&(E=i(Te,E,xe),Ee===null?ce=Te:Ee.sibling=Te,Ee=Te);return Se&&tl(k,xe),ce}for(ie=a(ie);!Te.done;xe++,Te=M.next())Te=_(ie,k,xe,Te.value,q),Te!==null&&(e&&Te.alternate!==null&&ie.delete(Te.key===null?xe:Te.key),E=i(Te,E,xe),Ee===null?ce=Te:Ee.sibling=Te,Ee=Te);return e&&ie.forEach(function(qp){return t(k,qp)}),Se&&tl(k,xe),ce}function Oe(k,E,M,q){if(typeof M=="object"&&M!==null&&M.type===Z&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case X:e:{for(var ce=M.key;E!==null;){if(E.key===ce){if(ce=M.type,ce===Z){if(E.tag===7){l(k,E.sibling),q=s(E,M.props.children),q.return=k,k=q;break e}}else if(E.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===ue&&ta(ce)===E.type){l(k,E.sibling),q=s(E,M.props),yn(q,M),q.return=k,k=q;break e}l(k,E);break}else t(k,E);E=E.sibling}M.type===Z?(q=Wl(M.props.children,k.mode,q,M.key),q.return=k,k=q):(q=bs(M.type,M.key,M.props,null,k.mode,q),yn(q,M),q.return=k,k=q)}return o(k);case Q:e:{for(ce=M.key;E!==null;){if(E.key===ce)if(E.tag===4&&E.stateNode.containerInfo===M.containerInfo&&E.stateNode.implementation===M.implementation){l(k,E.sibling),q=s(E,M.children||[]),q.return=k,k=q;break e}else{l(k,E);break}else t(k,E);E=E.sibling}q=cr(M,k.mode,q),q.return=k,k=q}return o(k);case ue:return M=ta(M),Oe(k,E,M,q)}if(ke(M))return ne(k,E,M,q);if(je(M)){if(ce=je(M),typeof ce!="function")throw Error(c(150));return M=ce.call(M),oe(k,E,M,q)}if(typeof M.then=="function")return Oe(k,E,Ms(M),q);if(M.$$typeof===J)return Oe(k,E,Ns(k,M),q);As(k,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,E!==null&&E.tag===6?(l(k,E.sibling),q=s(E,M),q.return=k,k=q):(l(k,E),q=ur(M,k.mode,q),q.return=k,k=q),o(k)):l(k,E)}return function(k,E,M,q){try{vn=0;var ce=Oe(k,E,M,q);return Da=null,ce}catch(ie){if(ie===za||ie===Ts)throw ie;var Ee=jt(29,ie,null,k.mode);return Ee.lanes=q,Ee.return=k,Ee}finally{}}}var aa=_o(!0),zo=_o(!1),El=!1;function jr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sr(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 Tl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Me&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=gs(e),po(e,null,l),t}return ys(e,a,t,l),gs(e)}function gn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Nc(e,l)}}function Nr(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?s=i=o:i=i.next=o,l=l.next}while(l!==null);i===null?s=i=t:i=i.next=t}else s=i=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Er=!1;function bn(){if(Er){var e=_a;if(e!==null)throw e}}function jn(e,t,l,a){Er=!1;var s=e.updateQueue;El=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,h=s.shared.pending;if(h!==null){s.shared.pending=null;var b=h,A=b.next;b.next=null,o===null?i=A:o.next=A,o=b;var L=e.alternate;L!==null&&(L=L.updateQueue,h=L.lastBaseUpdate,h!==o&&(h===null?L.firstBaseUpdate=A:h.next=A,L.lastBaseUpdate=b))}if(i!==null){var G=s.baseState;o=0,L=A=b=null,h=i;do{var w=h.lane&-536870913,_=w!==h.lane;if(_?(ge&w)===w:(a&w)===w){w!==0&&w===Ra&&(Er=!0),L!==null&&(L=L.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var ne=e,oe=h;w=t;var Oe=l;switch(oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){G=ne.call(Oe,G,w);break e}G=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,w=typeof ne=="function"?ne.call(Oe,G,w):ne,w==null)break e;G=y({},G,w);break e;case 2:El=!0}}w=h.callback,w!==null&&(e.flags|=64,_&&(e.flags|=8192),_=s.callbacks,_===null?s.callbacks=[w]:_.push(w))}else _={lane:w,tag:h.tag,payload:h.payload,callback:h.callback,next:null},L===null?(A=L=_,b=G):L=L.next=_,o|=w;if(h=h.next,h===null){if(h=s.shared.pending,h===null)break;_=h,h=_.next,_.next=null,s.lastBaseUpdate=_,s.shared.pending=null}}while(!0);L===null&&(b=G),s.baseState=b,s.firstBaseUpdate=A,s.lastBaseUpdate=L,i===null&&(s.shared.lanes=0),Rl|=o,e.lanes=o,e.memoizedState=G}}function Do(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Oo(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Do(l[e],t)}var Oa=N(null),ws=N(0);function Lo(e,t){e=fl,F(ws,e),F(Oa,t),fl=e|t.baseLanes}function Tr(){F(ws,fl),F(Oa,Oa.current)}function kr(){fl=ws.current,B(Oa),B(ws)}var St=N(null),Ot=null;function Ml(e){var t=e.alternate;F(Qe,Qe.current&1),F(St,e),Ot===null&&(t===null||Oa.current!==null||t.memoizedState!==null)&&(Ot=e)}function Mr(e){F(Qe,Qe.current),F(St,e),Ot===null&&(Ot=e)}function Bo(e){e.tag===22?(F(Qe,Qe.current),F(St,e),Ot===null&&(Ot=e)):Al()}function Al(){F(Qe,Qe.current),F(St,St.current)}function Nt(e){B(St),Ot===e&&(Ot=null),B(Qe)}var Qe=N(0);function Cs(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||zu(l)||Du(l)))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)!==0)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 nl=0,he=null,ze=null,Ke=null,Rs=!1,La=!1,na=!1,_s=0,Sn=0,Ba=null,Cx=0;function Ge(){throw Error(c(321))}function Ar(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!bt(e[l],t[l]))return!1;return!0}function wr(e,t,l,a,s,i){return nl=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?bd:Qr,na=!1,i=l(a,s),na=!1,La&&(i=Uo(t,l,a,s)),Ho(e),i}function Ho(e){T.H=Tn;var t=ze!==null&&ze.next!==null;if(nl=0,Ke=ze=he=null,Rs=!1,Sn=0,Ba=null,t)throw Error(c(300));e===null||$e||(e=e.dependencies,e!==null&&Ss(e)&&($e=!0))}function Uo(e,t,l,a){he=e;var s=0;do{if(La&&(Ba=null),Sn=0,La=!1,25<=s)throw Error(c(301));if(s+=1,Ke=ze=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}T.H=jd,i=t(l,a)}while(La);return i}function Rx(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?Nn(t):t,e=e.useState()[0],(ze!==null?ze.memoizedState:null)!==e&&(he.flags|=1024),t}function Cr(){var e=_s!==0;return _s=0,e}function Rr(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function _r(e){if(Rs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Rs=!1}nl=0,Ke=ze=he=null,La=!1,Sn=_s=0,Ba=null}function ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?he.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function Ze(){if(ze===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ke===null?he.memoizedState:Ke.next;if(t!==null)Ke=t,ze=e;else{if(e===null)throw he.alternate===null?Error(c(467)):Error(c(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ke===null?he.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function zs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Nn(e){var t=Sn;return Sn+=1,Ba===null&&(Ba=[]),e=wo(Ba,e,t),t=he,(Ke===null?t.memoizedState:Ke.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?bd:Qr),e}function Ds(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Nn(e);if(e.$$typeof===J)return at(e)}throw Error(c(438,String(e)))}function zr(e){var t=null,l=he.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=he.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=zs(),he.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=we;return t.index++,l}function sl(e,t){return typeof t=="function"?t(e):t}function Os(e){var t=Ze();return Dr(t,ze,e)}function Dr(e,t,l){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=l;var s=e.baseQueue,i=a.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}t.baseQueue=s=i,a.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var h=o=null,b=null,A=t,L=!1;do{var G=A.lane&-536870913;if(G!==A.lane?(ge&G)===G:(nl&G)===G){var w=A.revertLane;if(w===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),G===Ra&&(L=!0);else if((nl&w)===w){A=A.next,w===Ra&&(L=!0);continue}else G={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(h=b=G,o=i):b=b.next=G,he.lanes|=w,Rl|=w;G=A.action,na&&l(i,G),i=A.hasEagerState?A.eagerState:l(i,G)}else w={lane:G,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(h=b=w,o=i):b=b.next=w,he.lanes|=G,Rl|=G;A=A.next}while(A!==null&&A!==t);if(b===null?o=i:b.next=h,!bt(i,e.memoizedState)&&($e=!0,L&&(l=_a,l!==null)))throw l;e.memoizedState=i,e.baseState=o,e.baseQueue=b,a.lastRenderedState=i}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Or(e){var t=Ze(),l=t.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,i=t.memoizedState;if(s!==null){l.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);bt(i,t.memoizedState)||($e=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function qo(e,t,l){var a=he,s=Ze(),i=Se;if(i){if(l===void 0)throw Error(c(407));l=l()}else l=t();var o=!bt((ze||s).memoizedState,l);if(o&&(s.memoizedState=l,$e=!0),s=s.queue,Hr(Xo.bind(null,a,s,e),[e]),s.getSnapshot!==t||o||Ke!==null&&Ke.memoizedState.tag&1){if(a.flags|=2048,Ha(9,{destroy:void 0},Go.bind(null,a,s,l,t),null),Le===null)throw Error(c(349));i||(nl&127)!==0||Yo(a,t,l)}return l}function Yo(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=he.updateQueue,t===null?(t=zs(),he.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Go(e,t,l,a){t.value=l,t.getSnapshot=a,Qo(t)&&Zo(e)}function Xo(e,t,l){return l(function(){Qo(t)&&Zo(e)})}function Qo(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!bt(e,l)}catch{return!0}}function Zo(e){var t=Jl(e,2);t!==null&&pt(t,e,2)}function Lr(e){var t=ut();if(typeof e=="function"){var l=e;if(e=l(),na){vl(!0);try{l()}finally{vl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:e},t}function Vo(e,t,l,a){return e.baseState=l,Dr(e,ze,typeof a=="function"?a:sl)}function _x(e,t,l,a,s){if(Hs(e))throw Error(c(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};T.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,Ko(t,i)):(i.next=l.next,t.pending=l.next=i)}}function Ko(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=T.T,o={};T.T=o;try{var h=l(s,a),b=T.S;b!==null&&b(o,h),$o(e,t,h)}catch(A){Br(e,t,A)}finally{i!==null&&o.types!==null&&(i.types=o.types),T.T=i}}else try{i=l(s,a),$o(e,t,i)}catch(A){Br(e,t,A)}}function $o(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Jo(e,t,a)},function(a){return Br(e,t,a)}):Jo(e,t,l)}function Jo(e,t,l){t.status="fulfilled",t.value=l,Wo(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Ko(e,l)))}function Br(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Wo(t),t=t.next;while(t!==a)}e.action=null}function Wo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Fo(e,t){return t}function Po(e,t){if(Se){var l=Le.formState;if(l!==null){e:{var a=he;if(Se){if(Be){t:{for(var s=Be,i=Dt;s.nodeType!==8;){if(!i){s=null;break t}if(s=Lt(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){Be=Lt(s.nextSibling),a=s.data==="F!";break e}}Sl(a)}a=!1}a&&(t=l[0])}}return l=ut(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:t},l.queue=a,l=vd.bind(null,he,a),a.dispatch=l,a=Lr(!1),i=Xr.bind(null,he,!1,a.queue),a=ut(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=_x.bind(null,he,s,i,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function Io(e){var t=Ze();return ed(t,ze,e)}function ed(e,t,l){if(t=Dr(e,t,Fo)[0],e=Os(sl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Nn(t)}catch(o){throw o===za?Ts:o}else a=t;t=Ze();var s=t.queue,i=s.dispatch;return l!==t.memoizedState&&(he.flags|=2048,Ha(9,{destroy:void 0},zx.bind(null,s,l),null)),[a,i,e]}function zx(e,t){e.action=t}function td(e){var t=Ze(),l=ze;if(l!==null)return ed(t,l,e);Ze(),t=t.memoizedState,l=Ze();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Ha(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=he.updateQueue,t===null&&(t=zs(),he.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function ld(){return Ze().memoizedState}function Ls(e,t,l,a){var s=ut();he.flags|=e,s.memoizedState=Ha(1|t,{destroy:void 0},l,a===void 0?null:a)}function Bs(e,t,l,a){var s=Ze();a=a===void 0?null:a;var i=s.memoizedState.inst;ze!==null&&a!==null&&Ar(a,ze.memoizedState.deps)?s.memoizedState=Ha(t,i,l,a):(he.flags|=e,s.memoizedState=Ha(1|t,i,l,a))}function ad(e,t){Ls(8390656,8,e,t)}function Hr(e,t){Bs(2048,8,e,t)}function Dx(e){he.flags|=4;var t=he.updateQueue;if(t===null)t=zs(),he.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function nd(e){var t=Ze().memoizedState;return Dx({ref:t,nextImpl:e}),function(){if((Me&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function sd(e,t){return Bs(4,2,e,t)}function id(e,t){return Bs(4,4,e,t)}function rd(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ud(e,t,l){l=l!=null?l.concat([e]):null,Bs(4,4,rd.bind(null,t,e),l)}function Ur(){}function cd(e,t){var l=Ze();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Ar(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function od(e,t){var l=Ze();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Ar(t,a[1]))return a[0];if(a=e(),na){vl(!0);try{e()}finally{vl(!1)}}return l.memoizedState=[a,t],a}function qr(e,t,l){return l===void 0||(nl&1073741824)!==0&&(ge&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=ff(),he.lanes|=e,Rl|=e,l)}function dd(e,t,l,a){return bt(l,t)?l:Oa.current!==null?(e=qr(e,l,a),bt(e,t)||($e=!0),e):(nl&42)===0||(nl&1073741824)!==0&&(ge&261930)===0?($e=!0,e.memoizedState=l):(e=ff(),he.lanes|=e,Rl|=e,t)}function fd(e,t,l,a,s){var i=C.p;C.p=i!==0&&8>i?i:8;var o=T.T,h={};T.T=h,Xr(e,!1,t,l);try{var b=s(),A=T.S;if(A!==null&&A(h,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var L=wx(b,a);En(e,t,L,kt(e))}else En(e,t,a,kt(e))}catch(G){En(e,t,{then:function(){},status:"rejected",reason:G},kt())}finally{C.p=i,o!==null&&h.types!==null&&(o.types=h.types),T.T=o}}function Ox(){}function Yr(e,t,l,a){if(e.tag!==5)throw Error(c(476));var s=md(e).queue;fd(e,s,t,ee,l===null?Ox:function(){return hd(e),l(a)})}function md(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:ee},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function hd(e){var t=md(e);t.next===null&&(t=e.alternate.memoizedState),En(e,t.next.queue,{},kt())}function Gr(){return at(Yn)}function xd(){return Ze().memoizedState}function pd(){return Ze().memoizedState}function Lx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=kt();e=Tl(l);var a=kl(t,e,l);a!==null&&(pt(a,t,l),gn(a,t,l)),t={cache:vr()},e.payload=t;return}t=t.return}}function Bx(e,t,l){var a=kt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Hs(e)?yd(t,l):(l=ir(e,t,l,a),l!==null&&(pt(l,e,a),gd(l,t,a)))}function vd(e,t,l){var a=kt();En(e,t,l,a)}function En(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Hs(e))yd(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,l);if(s.hasEagerState=!0,s.eagerState=h,bt(h,o))return ys(e,t,s,0),Le===null&&vs(),!1}catch{}finally{}if(l=ir(e,t,s,a),l!==null)return pt(l,e,a),gd(l,t,a),!0}return!1}function Xr(e,t,l,a){if(a={lane:2,revertLane:ju(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Hs(e)){if(t)throw Error(c(479))}else t=ir(e,l,a,2),t!==null&&pt(t,e,2)}function Hs(e){var t=e.alternate;return e===he||t!==null&&t===he}function yd(e,t){La=Rs=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function gd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Nc(e,l)}}var Tn={readContext:at,use:Ds,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Tn.useEffectEvent=Ge;var bd={readContext:at,use:Ds,useCallback:function(e,t){return ut().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:ad,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Ls(4194308,4,rd.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var l=ut();t=t===void 0?null:t;var a=e();if(na){vl(!0);try{e()}finally{vl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=ut();if(l!==void 0){var s=l(t);if(na){vl(!0);try{l(t)}finally{vl(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=Bx.bind(null,he,e),[a.memoizedState,e]},useRef:function(e){var t=ut();return e={current:e},t.memoizedState=e},useState:function(e){e=Lr(e);var t=e.queue,l=vd.bind(null,he,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Ur,useDeferredValue:function(e,t){var l=ut();return qr(l,e,t)},useTransition:function(){var e=Lr(!1);return e=fd.bind(null,he,e.queue,!0,!1),ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=he,s=ut();if(Se){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),Le===null)throw Error(c(349));(ge&127)!==0||Yo(a,t,l)}s.memoizedState=l;var i={value:l,getSnapshot:t};return s.queue=i,ad(Xo.bind(null,a,i,e),[e]),a.flags|=2048,Ha(9,{destroy:void 0},Go.bind(null,a,i,l,t),null),l},useId:function(){var e=ut(),t=Le.identifierPrefix;if(Se){var l=Zt,a=Qt;l=(a&~(1<<32-gt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=_s++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Cx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Gr,useFormState:Po,useActionState:Po,useOptimistic:function(e){var t=ut();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Xr.bind(null,he,!0,l),l.dispatch=t,[e,t]},useMemoCache:zr,useCacheRefresh:function(){return ut().memoizedState=Lx.bind(null,he)},useEffectEvent:function(e){var t=ut(),l={impl:e};return t.memoizedState=l,function(){if((Me&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},Qr={readContext:at,use:Ds,useCallback:cd,useContext:at,useEffect:Hr,useImperativeHandle:ud,useInsertionEffect:sd,useLayoutEffect:id,useMemo:od,useReducer:Os,useRef:ld,useState:function(){return Os(sl)},useDebugValue:Ur,useDeferredValue:function(e,t){var l=Ze();return dd(l,ze.memoizedState,e,t)},useTransition:function(){var e=Os(sl)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:Nn(e),t]},useSyncExternalStore:qo,useId:xd,useHostTransitionStatus:Gr,useFormState:Io,useActionState:Io,useOptimistic:function(e,t){var l=Ze();return Vo(l,ze,e,t)},useMemoCache:zr,useCacheRefresh:pd};Qr.useEffectEvent=nd;var jd={readContext:at,use:Ds,useCallback:cd,useContext:at,useEffect:Hr,useImperativeHandle:ud,useInsertionEffect:sd,useLayoutEffect:id,useMemo:od,useReducer:Or,useRef:ld,useState:function(){return Or(sl)},useDebugValue:Ur,useDeferredValue:function(e,t){var l=Ze();return ze===null?qr(l,e,t):dd(l,ze.memoizedState,e,t)},useTransition:function(){var e=Or(sl)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:Nn(e),t]},useSyncExternalStore:qo,useId:xd,useHostTransitionStatus:Gr,useFormState:td,useActionState:td,useOptimistic:function(e,t){var l=Ze();return ze!==null?Vo(l,ze,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:zr,useCacheRefresh:pd};jd.useEffectEvent=nd;function Zr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:y({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Vr={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=kt(),s=Tl(a);s.payload=t,l!=null&&(s.callback=l),t=kl(e,s,a),t!==null&&(pt(t,e,a),gn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=kt(),s=Tl(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=kl(e,s,a),t!==null&&(pt(t,e,a),gn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=kt(),a=Tl(l);a.tag=2,t!=null&&(a.callback=t),t=kl(e,a,l),t!==null&&(pt(t,e,l),gn(t,e,l))}};function Sd(e,t,l,a,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,o):t.prototype&&t.prototype.isPureReactComponent?!dn(l,a)||!dn(s,i):!0}function Nd(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Vr.enqueueReplaceState(t,t.state,null)}function sa(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=y({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Ed(e){ps(e)}function Td(e){console.error(e)}function kd(e){ps(e)}function Us(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Md(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Kr(e,t,l){return l=Tl(l),l.tag=3,l.payload={element:null},l.callback=function(){Us(e,t)},l}function Ad(e){return e=Tl(e),e.tag=3,e}function wd(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var i=a.value;e.payload=function(){return s(i)},e.callback=function(){Md(t,l,a)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Md(t,l,a),typeof s!="function"&&(_l===null?_l=new Set([this]):_l.add(this));var h=a.stack;this.componentDidCatch(a.value,{componentStack:h!==null?h:""})})}function Hx(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Ca(t,l,s,!0),l=St.current,l!==null){switch(l.tag){case 31:case 13:return Ot===null?Fs():l.alternate===null&&Xe===0&&(Xe=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===ks?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),yu(e,a,s)),!1;case 22:return l.flags|=65536,a===ks?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),yu(e,a,s)),!1}throw Error(c(435,l.tag))}return yu(e,a,s),Fs(),!1}if(Se)return t=St.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==fr&&(e=Error(c(422),{cause:a}),hn(Rt(e,l)))):(a!==fr&&(t=Error(c(423),{cause:a}),hn(Rt(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=Rt(a,l),s=Kr(e.stateNode,a,s),Nr(e,s),Xe!==4&&(Xe=2)),!1;var i=Error(c(520),{cause:a});if(i=Rt(i,l),zn===null?zn=[i]:zn.push(i),Xe!==4&&(Xe=2),t===null)return!0;a=Rt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=Kr(l.stateNode,a,e),Nr(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(_l===null||!_l.has(i))))return l.flags|=65536,s&=-s,l.lanes|=s,s=Ad(s),wd(s,e,l,a),Nr(l,s),!1}l=l.return}while(l!==null);return!1}var $r=Error(c(461)),$e=!1;function nt(e,t,l,a){t.child=e===null?zo(t,null,l,a):aa(t,e.child,l,a)}function Cd(e,t,l,a,s){l=l.render;var i=t.ref;if("ref"in a){var o={};for(var h in a)h!=="ref"&&(o[h]=a[h])}else o=a;return Il(t),a=wr(e,t,l,o,i,s),h=Cr(),e!==null&&!$e?(Rr(e,t,s),il(e,t,s)):(Se&&h&&or(t),t.flags|=1,nt(e,t,a,s),t.child)}function Rd(e,t,l,a,s){if(e===null){var i=l.type;return typeof i=="function"&&!rr(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,_d(e,t,i,a,s)):(e=bs(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!lu(e,s)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:dn,l(o,a)&&e.ref===t.ref)return il(e,t,s)}return t.flags|=1,e=el(i,a),e.ref=t.ref,e.return=t,t.child=e}function _d(e,t,l,a,s){if(e!==null){var i=e.memoizedProps;if(dn(i,a)&&e.ref===t.ref)if($e=!1,t.pendingProps=a=i,lu(e,s))(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,il(e,t,s)}return Jr(e,t,l,a,s)}function zd(e,t,l,a){var s=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~i}else a=0,t.child=null;return Dd(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Es(t,i!==null?i.cachePool:null),i!==null?Lo(t,i):Tr(),Bo(t);else return a=t.lanes=536870912,Dd(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(Es(t,i.cachePool),Lo(t,i),Al(),t.memoizedState=null):(e!==null&&Es(t,null),Tr(),Al());return nt(e,t,s,l),t.child}function kn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Dd(e,t,l,a,s){var i=gr();return i=i===null?null:{parent:Ve._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&Es(t,null),Tr(),Bo(t),e!==null&&Ca(e,t,a,!0),t.childLanes=s,null}function qs(e,t){return t=Gs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Od(e,t,l){return aa(t,e.child,null,l),e=qs(t,t.pendingProps),e.flags|=2,Nt(t),t.memoizedState=null,e}function Ux(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(a.mode==="hidden")return e=qs(t,a),t.lanes=536870912,kn(null,e);if(Mr(t),(e=Be)?(e=$f(e,Dt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bl!==null?{id:Qt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},l=yo(e),l.return=t,t.child=l,lt=t,Be=null)):e=null,e===null)throw Sl(t);return t.lanes=536870912,null}return qs(t,a)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Mr(t),s)if(t.flags&256)t.flags&=-257,t=Od(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if($e||Ca(e,t,l,!1),s=(l&e.childLanes)!==0,$e||s){if(a=Le,a!==null&&(o=Ec(a,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,Jl(e,o),pt(a,e,o),$r;Fs(),t=Od(e,t,l)}else e=i.treeContext,Be=Lt(o.nextSibling),lt=t,Se=!0,jl=null,Dt=!1,e!==null&&jo(t,e),t=qs(t,a),t.flags|=4096;return t}return e=el(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ys(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(c(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Jr(e,t,l,a,s){return Il(t),l=wr(e,t,l,a,void 0,s),a=Cr(),e!==null&&!$e?(Rr(e,t,s),il(e,t,s)):(Se&&a&&or(t),t.flags|=1,nt(e,t,l,s),t.child)}function Ld(e,t,l,a,s,i){return Il(t),t.updateQueue=null,l=Uo(t,a,l,s),Ho(e),a=Cr(),e!==null&&!$e?(Rr(e,t,i),il(e,t,i)):(Se&&a&&or(t),t.flags|=1,nt(e,t,l,i),t.child)}function Bd(e,t,l,a,s){if(Il(t),t.stateNode===null){var i=ka,o=l.contextType;typeof o=="object"&&o!==null&&(i=at(o)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Vr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},jr(t),o=l.contextType,i.context=typeof o=="object"&&o!==null?at(o):ka,i.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(Zr(t,l,o,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&Vr.enqueueReplaceState(i,i.state,null),jn(t,a,i,s),bn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,b=sa(l,h);i.props=b;var A=i.context,L=l.contextType;o=ka,typeof L=="object"&&L!==null&&(o=at(L));var G=l.getDerivedStateFromProps;L=typeof G=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,L||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||A!==o)&&Nd(t,i,a,o),El=!1;var w=t.memoizedState;i.state=w,jn(t,a,i,s),bn(),A=t.memoizedState,h||w!==A||El?(typeof G=="function"&&(Zr(t,l,G,a),A=t.memoizedState),(b=El||Sd(t,l,b,a,w,A,o))?(L||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=A),i.props=a,i.state=A,i.context=o,a=b):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Sr(e,t),o=t.memoizedProps,L=sa(l,o),i.props=L,G=t.pendingProps,w=i.context,A=l.contextType,b=ka,typeof A=="object"&&A!==null&&(b=at(A)),h=l.getDerivedStateFromProps,(A=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==G||w!==b)&&Nd(t,i,a,b),El=!1,w=t.memoizedState,i.state=w,jn(t,a,i,s),bn();var _=t.memoizedState;o!==G||w!==_||El||e!==null&&e.dependencies!==null&&Ss(e.dependencies)?(typeof h=="function"&&(Zr(t,l,h,a),_=t.memoizedState),(L=El||Sd(t,l,L,a,w,_,b)||e!==null&&e.dependencies!==null&&Ss(e.dependencies))?(A||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,_,b),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,_,b)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=_),i.props=a,i.state=_,i.context=b,a=L):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Ys(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=aa(t,e.child,null,s),t.child=aa(t,null,l,s)):nt(e,t,l,s),t.memoizedState=i.state,e=t.child):e=il(e,t,s),e}function Hd(e,t,l,a){return Fl(),t.flags|=256,nt(e,t,l,a),t.child}var Wr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fr(e){return{baseLanes:e,cachePool:Mo()}}function Pr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Tt),e}function Ud(e,t,l){var a=t.pendingProps,s=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(Qe.current&2)!==0),o&&(s=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(s?Ml(t):Al(),(e=Be)?(e=$f(e,Dt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bl!==null?{id:Qt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},l=yo(e),l.return=t,t.child=l,lt=t,Be=null)):e=null,e===null)throw Sl(t);return Du(e)?t.lanes=32:t.lanes=536870912,null}var h=a.children;return a=a.fallback,s?(Al(),s=t.mode,h=Gs({mode:"hidden",children:h},s),a=Wl(a,s,l,null),h.return=t,a.return=t,h.sibling=a,t.child=h,a=t.child,a.memoizedState=Fr(l),a.childLanes=Pr(e,o,l),t.memoizedState=Wr,kn(null,a)):(Ml(t),Ir(t,h))}var b=e.memoizedState;if(b!==null&&(h=b.dehydrated,h!==null)){if(i)t.flags&256?(Ml(t),t.flags&=-257,t=eu(e,t,l)):t.memoizedState!==null?(Al(),t.child=e.child,t.flags|=128,t=null):(Al(),h=a.fallback,s=t.mode,a=Gs({mode:"visible",children:a.children},s),h=Wl(h,s,l,null),h.flags|=2,a.return=t,h.return=t,a.sibling=h,t.child=a,aa(t,e.child,null,l),a=t.child,a.memoizedState=Fr(l),a.childLanes=Pr(e,o,l),t.memoizedState=Wr,t=kn(null,a));else if(Ml(t),Du(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var A=o.dgst;o=A,a=Error(c(419)),a.stack="",a.digest=o,hn({value:a,source:null,stack:null}),t=eu(e,t,l)}else if($e||Ca(e,t,l,!1),o=(l&e.childLanes)!==0,$e||o){if(o=Le,o!==null&&(a=Ec(o,l),a!==0&&a!==b.retryLane))throw b.retryLane=a,Jl(e,a),pt(o,e,a),$r;zu(h)||Fs(),t=eu(e,t,l)}else zu(h)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Be=Lt(h.nextSibling),lt=t,Se=!0,jl=null,Dt=!1,e!==null&&jo(t,e),t=Ir(t,a.children),t.flags|=4096);return t}return s?(Al(),h=a.fallback,s=t.mode,b=e.child,A=b.sibling,a=el(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,A!==null?h=el(A,h):(h=Wl(h,s,l,null),h.flags|=2),h.return=t,a.return=t,a.sibling=h,t.child=a,kn(null,a),a=t.child,h=e.child.memoizedState,h===null?h=Fr(l):(s=h.cachePool,s!==null?(b=Ve._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=Mo(),h={baseLanes:h.baseLanes|l,cachePool:s}),a.memoizedState=h,a.childLanes=Pr(e,o,l),t.memoizedState=Wr,kn(e.child,a)):(Ml(t),l=e.child,e=l.sibling,l=el(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=l,t.memoizedState=null,l)}function Ir(e,t){return t=Gs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Gs(e,t){return e=jt(22,e,null,t),e.lanes=0,e}function eu(e,t,l){return aa(t,e.child,null,l),e=Ir(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function qd(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),xr(e.return,t,l)}function tu(e,t,l,a,s,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=l,o.tailMode=s,o.treeForkCount=i)}function Yd(e,t,l){var a=t.pendingProps,s=a.revealOrder,i=a.tail;a=a.children;var o=Qe.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,F(Qe,o),nt(e,t,a,l),a=Se?mn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qd(e,l,t);else if(e.tag===19)qd(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&Cs(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),tu(t,!1,s,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Cs(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}tu(t,!0,l,null,i,a);break;case"together":tu(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function il(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Rl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ca(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,l=el(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=el(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function lu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ss(e)))}function qx(e,t,l){switch(t.tag){case 3:Ne(t,t.stateNode.containerInfo),Nl(t,Ve,e.memoizedState.cache),Fl();break;case 27:case 5:K(t);break;case 4:Ne(t,t.stateNode.containerInfo);break;case 10:Nl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mr(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Ml(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Ud(e,t,l):(Ml(t),e=il(e,t,l),e!==null?e.sibling:null);Ml(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Ca(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return Yd(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),F(Qe,Qe.current),a)break;return null;case 22:return t.lanes=0,zd(e,t,l,t.pendingProps);case 24:Nl(t,Ve,e.memoizedState.cache)}return il(e,t,l)}function Gd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)$e=!0;else{if(!lu(e,l)&&(t.flags&128)===0)return $e=!1,qx(e,t,l);$e=(e.flags&131072)!==0}else $e=!1,Se&&(t.flags&1048576)!==0&&bo(t,mn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ta(t.elementType),t.type=e,typeof e=="function")rr(e)?(a=sa(e,a),t.tag=1,t=Bd(null,t,e,a,l)):(t.tag=0,t=Jr(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===V){t.tag=11,t=Cd(null,t,e,a,l);break e}else if(s===P){t.tag=14,t=Rd(null,t,e,a,l);break e}}throw t=Ue(e)||e,Error(c(306,t,""))}}return t;case 0:return Jr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=sa(a,t.pendingProps),Bd(e,t,a,s,l);case 3:e:{if(Ne(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,Sr(e,t),jn(t,a,null,l);var o=t.memoizedState;if(a=o.cache,Nl(t,Ve,a),a!==i.cache&&pr(t,[Ve],l,!0),bn(),a=o.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Hd(e,t,a,l);break e}else if(a!==s){s=Rt(Error(c(424)),t),hn(s),t=Hd(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Be=Lt(e.firstChild),lt=t,Se=!0,jl=null,Dt=!0,l=zo(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Fl(),a===s){t=il(e,t,l);break e}nt(e,t,a,l)}t=t.child}return t;case 26:return Ys(e,t),e===null?(l=em(t.type,null,t.pendingProps,null))?t.memoizedState=l:Se||(l=t.type,e=t.pendingProps,a=ni(W.current).createElement(l),a[tt]=t,a[ot]=e,st(a,l,e),Pe(a),t.stateNode=a):t.memoizedState=em(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return K(t),e===null&&Se&&(a=t.stateNode=Ff(t.type,t.pendingProps,W.current),lt=t,Dt=!0,s=Be,Ll(t.type)?(Ou=s,Be=Lt(a.firstChild)):Be=s),nt(e,t,t.pendingProps.children,l),Ys(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((s=a=Be)&&(a=pp(a,t.type,t.pendingProps,Dt),a!==null?(t.stateNode=a,lt=t,Be=Lt(a.firstChild),Dt=!1,s=!0):s=!1),s||Sl(t)),K(t),s=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Cu(s,i)?a=null:o!==null&&Cu(s,o)&&(t.flags|=32),t.memoizedState!==null&&(s=wr(e,t,Rx,null,null,l),Yn._currentValue=s),Ys(e,t),nt(e,t,a,l),t.child;case 6:return e===null&&Se&&((e=l=Be)&&(l=vp(l,t.pendingProps,Dt),l!==null?(t.stateNode=l,lt=t,Be=null,e=!0):e=!1),e||Sl(t)),null;case 13:return Ud(e,t,l);case 4:return Ne(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=aa(t,null,a,l):nt(e,t,a,l),t.child;case 11:return Cd(e,t,t.type,t.pendingProps,l);case 7:return nt(e,t,t.pendingProps,l),t.child;case 8:return nt(e,t,t.pendingProps.children,l),t.child;case 12:return nt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Nl(t,t.type,a.value),nt(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,Il(t),s=at(s),a=a(s),t.flags|=1,nt(e,t,a,l),t.child;case 14:return Rd(e,t,t.type,t.pendingProps,l);case 15:return _d(e,t,t.type,t.pendingProps,l);case 19:return Yd(e,t,l);case 31:return Ux(e,t,l);case 22:return zd(e,t,l,t.pendingProps);case 24:return Il(t),a=at(Ve),e===null?(s=gr(),s===null&&(s=Le,i=vr(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=l),s=i),t.memoizedState={parent:a,cache:s},jr(t),Nl(t,Ve,s)):((e.lanes&l)!==0&&(Sr(e,t),jn(t,null,null,l),bn()),s=e.memoizedState,i=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Nl(t,Ve,a)):(a=i.cache,Nl(t,Ve,a),a!==s.cache&&pr(t,[Ve],l,!0))),nt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function rl(e){e.flags|=4}function au(e,t,l,a,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(pf())e.flags|=8192;else throw la=ks,br}else e.flags&=-16777217}function Xd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!sm(t))if(pf())e.flags|=8192;else throw la=ks,br}function Xs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?jc():536870912,e.lanes|=t,Ga|=t)}function Mn(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function He(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Yx(e,t,l){var a=t.pendingProps;switch(dr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return He(t),null;case 1:return He(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),al(Ve),te(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(wa(t)?rl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,mr())),He(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(rl(t),i!==null?(He(t),Xd(t,i)):(He(t),au(t,s,null,a,l))):i?i!==e.memoizedState?(rl(t),He(t),Xd(t,i)):(He(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&rl(t),He(t),au(t,s,e,a,l)),null;case 27:if(I(t),l=W.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&rl(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return He(t),null}e=D.current,wa(t)?So(t):(e=Ff(s,a,l),t.stateNode=e,rl(t))}return He(t),null;case 5:if(I(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&rl(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return He(t),null}if(i=D.current,wa(t))So(t);else{var o=ni(W.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?o.createElement(s,{is:a.is}):o.createElement(s)}}i[tt]=t,i[ot]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(st(i,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&rl(t)}}return He(t),au(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&rl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=W.current,wa(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=lt,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[tt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||qf(e.nodeValue,l)),e||Sl(t,!0)}else e=ni(e).createTextNode(a),e[tt]=t,t.stateNode=e}return He(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=wa(t),l!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[tt]=t}else Fl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;He(t),e=!1}else l=mr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Nt(t),t):(Nt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return He(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=wa(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(c(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(c(317));s[tt]=t}else Fl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;He(t),s=!1}else s=mr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Nt(t),t):(Nt(t),null)}return Nt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Xs(t,t.updateQueue),He(t),null);case 4:return te(),e===null&&Tu(t.stateNode.containerInfo),He(t),null;case 10:return al(t.type),He(t),null;case 19:if(B(Qe),a=t.memoizedState,a===null)return He(t),null;if(s=(t.flags&128)!==0,i=a.rendering,i===null)if(s)Mn(a,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Cs(e),i!==null){for(t.flags|=128,Mn(a,!1),e=i.updateQueue,t.updateQueue=e,Xs(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)vo(l,e),l=l.sibling;return F(Qe,Qe.current&1|2),Se&&tl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&vt()>$s&&(t.flags|=128,s=!0,Mn(a,!1),t.lanes=4194304)}else{if(!s)if(e=Cs(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Xs(t,e),Mn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Se)return He(t),null}else 2*vt()-a.renderingStartTime>$s&&l!==536870912&&(t.flags|=128,s=!0,Mn(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=vt(),e.sibling=null,l=Qe.current,F(Qe,s?l&1|2:l&1),Se&&tl(t,a.treeForkCount),e):(He(t),null);case 22:case 23:return Nt(t),kr(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(He(t),t.subtreeFlags&6&&(t.flags|=8192)):He(t),l=t.updateQueue,l!==null&&Xs(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&B(ea),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),al(Ve),He(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Gx(e,t){switch(dr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return al(Ve),te(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return I(t),null;case 31:if(t.memoizedState!==null){if(Nt(t),t.alternate===null)throw Error(c(340));Fl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Nt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Fl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Qe),null;case 4:return te(),null;case 10:return al(t.type),null;case 22:case 23:return Nt(t),kr(),e!==null&&B(ea),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return al(Ve),null;case 25:return null;default:return null}}function Qd(e,t){switch(dr(t),t.tag){case 3:al(Ve),te();break;case 26:case 27:case 5:I(t);break;case 4:te();break;case 31:t.memoizedState!==null&&Nt(t);break;case 13:Nt(t);break;case 19:B(Qe);break;case 10:al(t.type);break;case 22:case 23:Nt(t),kr(),e!==null&&B(ea);break;case 24:al(Ve)}}function An(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var i=l.create,o=l.inst;a=i(),o.destroy=a}l=l.next}while(l!==s)}}catch(h){Re(t,t.return,h)}}function wl(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var i=s.next;a=i;do{if((a.tag&e)===e){var o=a.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,s=t;var b=l,A=h;try{A()}catch(L){Re(s,b,L)}}}a=a.next}while(a!==i)}}catch(L){Re(t,t.return,L)}}function Zd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Oo(t,l)}catch(a){Re(e,e.return,a)}}}function Vd(e,t,l){l.props=sa(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Re(e,t,a)}}function wn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){Re(e,t,s)}}function Vt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){Re(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){Re(e,t,s)}else l.current=null}function Kd(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){Re(e,e.return,s)}}function nu(e,t,l){try{var a=e.stateNode;op(a,e.type,l,t),a[ot]=t}catch(s){Re(e,e.return,s)}}function $d(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ll(e.type)||e.tag===4}function su(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$d(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&&Ll(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function iu(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Pt));else if(a!==4&&(a===27&&Ll(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(iu(e,t,l),e=e.sibling;e!==null;)iu(e,t,l),e=e.sibling}function Qs(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Ll(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Qs(e,t,l),e=e.sibling;e!==null;)Qs(e,t,l),e=e.sibling}function Jd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);st(t,a,l),t[tt]=e,t[ot]=l}catch(i){Re(e,e.return,i)}}var ul=!1,Je=!1,ru=!1,Wd=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function Xx(e,t){if(e=e.containerInfo,Au=di,e=ro(e),er(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var o=0,h=-1,b=-1,A=0,L=0,G=e,w=null;t:for(;;){for(var _;G!==l||s!==0&&G.nodeType!==3||(h=o+s),G!==i||a!==0&&G.nodeType!==3||(b=o+a),G.nodeType===3&&(o+=G.nodeValue.length),(_=G.firstChild)!==null;)w=G,G=_;for(;;){if(G===e)break t;if(w===l&&++A===s&&(h=o),w===i&&++L===a&&(b=o),(_=G.nextSibling)!==null)break;G=w,w=G.parentNode}G=_}l=h===-1||b===-1?null:{start:h,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(wu={focusedElem:e,selectionRange:l},di=!1,Ie=t;Ie!==null;)if(t=Ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ie=e;else for(;Ie!==null;){switch(t=Ie,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,s=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var ne=sa(l.type,s);e=a.getSnapshotBeforeUpdate(ne,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(oe){Re(l,l.return,oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)_u(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_u(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Ie=e;break}Ie=t.return}}function Fd(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ol(e,l),a&4&&An(5,l);break;case 1:if(ol(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){Re(l,l.return,o)}else{var s=sa(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Re(l,l.return,o)}}a&64&&Zd(l),a&512&&wn(l,l.return);break;case 3:if(ol(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Oo(e,t)}catch(o){Re(l,l.return,o)}}break;case 27:t===null&&a&4&&Jd(l);case 26:case 5:ol(e,l),t===null&&a&4&&Kd(l),a&512&&wn(l,l.return);break;case 12:ol(e,l);break;case 31:ol(e,l),a&4&&ef(e,l);break;case 13:ol(e,l),a&4&&tf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Px.bind(null,l),yp(e,l))));break;case 22:if(a=l.memoizedState!==null||ul,!a){t=t!==null&&t.memoizedState!==null||Je,s=ul;var i=Je;ul=a,(Je=t)&&!i?dl(e,l,(l.subtreeFlags&8772)!==0):ol(e,l),ul=s,Je=i}break;case 30:break;default:ol(e,l)}}function Pd(e){var t=e.alternate;t!==null&&(e.alternate=null,Pd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Bi(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 qe=null,ft=!1;function cl(e,t,l){for(l=l.child;l!==null;)Id(e,t,l),l=l.sibling}function Id(e,t,l){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(Pa,l)}catch{}switch(l.tag){case 26:Je||Vt(l,t),cl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Je||Vt(l,t);var a=qe,s=ft;Ll(l.type)&&(qe=l.stateNode,ft=!1),cl(e,t,l),Hn(l.stateNode),qe=a,ft=s;break;case 5:Je||Vt(l,t);case 6:if(a=qe,s=ft,qe=null,cl(e,t,l),qe=a,ft=s,qe!==null)if(ft)try{(qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe).removeChild(l.stateNode)}catch(i){Re(l,t,i)}else try{qe.removeChild(l.stateNode)}catch(i){Re(l,t,i)}break;case 18:qe!==null&&(ft?(e=qe,Vf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Wa(e)):Vf(qe,l.stateNode));break;case 4:a=qe,s=ft,qe=l.stateNode.containerInfo,ft=!0,cl(e,t,l),qe=a,ft=s;break;case 0:case 11:case 14:case 15:wl(2,l,t),Je||wl(4,l,t),cl(e,t,l);break;case 1:Je||(Vt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Vd(l,t,a)),cl(e,t,l);break;case 21:cl(e,t,l);break;case 22:Je=(a=Je)||l.memoizedState!==null,cl(e,t,l),Je=a;break;default:cl(e,t,l)}}function ef(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wa(e)}catch(l){Re(t,t.return,l)}}}function tf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wa(e)}catch(l){Re(t,t.return,l)}}function Qx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Wd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Wd),t;default:throw Error(c(435,e.tag))}}function Zs(e,t){var l=Qx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=Ix.bind(null,e,a);a.then(s,s)}})}function mt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],i=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(Ll(h.type)){qe=h.stateNode,ft=!1;break e}break;case 5:qe=h.stateNode,ft=!1;break e;case 3:case 4:qe=h.stateNode.containerInfo,ft=!0;break e}h=h.return}if(qe===null)throw Error(c(160));Id(i,o,s),qe=null,ft=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)lf(t,e),t=t.sibling}var Yt=null;function lf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:mt(t,e),ht(e),a&4&&(wl(3,e,e.return),An(3,e),wl(5,e,e.return));break;case 1:mt(t,e),ht(e),a&512&&(Je||l===null||Vt(l,l.return)),a&64&&ul&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=Yt;if(mt(t,e),ht(e),a&512&&(Je||l===null||Vt(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":i=s.getElementsByTagName("title")[0],(!i||i[tn]||i[tt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),st(i,a,l),i[tt]=e,Pe(i),a=i;break e;case"link":var o=am("link","href",s).get(a+(l.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){o.splice(h,1);break t}}i=s.createElement(a),st(i,a,l),s.head.appendChild(i);break;case"meta":if(o=am("meta","content",s).get(a+(l.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){o.splice(h,1);break t}}i=s.createElement(a),st(i,a,l),s.head.appendChild(i);break;default:throw Error(c(468,a))}i[tt]=e,Pe(i),a=i}e.stateNode=a}else nm(s,e.type,e.stateNode);else e.stateNode=lm(s,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?nm(s,e.type,e.stateNode):lm(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&nu(e,e.memoizedProps,l.memoizedProps)}break;case 27:mt(t,e),ht(e),a&512&&(Je||l===null||Vt(l,l.return)),l!==null&&a&4&&nu(e,e.memoizedProps,l.memoizedProps);break;case 5:if(mt(t,e),ht(e),a&512&&(Je||l===null||Vt(l,l.return)),e.flags&32){s=e.stateNode;try{ga(s,"")}catch(ne){Re(e,e.return,ne)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,nu(e,s,l!==null?l.memoizedProps:s)),a&1024&&(ru=!0);break;case 6:if(mt(t,e),ht(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ne){Re(e,e.return,ne)}}break;case 3:if(ri=null,s=Yt,Yt=si(t.containerInfo),mt(t,e),Yt=s,ht(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Wa(t.containerInfo)}catch(ne){Re(e,e.return,ne)}ru&&(ru=!1,af(e));break;case 4:a=Yt,Yt=si(e.stateNode.containerInfo),mt(t,e),ht(e),Yt=a;break;case 12:mt(t,e),ht(e);break;case 31:mt(t,e),ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zs(e,a)));break;case 13:mt(t,e),ht(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ks=vt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zs(e,a)));break;case 22:s=e.memoizedState!==null;var b=l!==null&&l.memoizedState!==null,A=ul,L=Je;if(ul=A||s,Je=L||b,mt(t,e),Je=L,ul=A,ht(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||b||ul||Je||ia(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){b=l=t;try{if(i=b.stateNode,s)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=b.stateNode;var G=b.memoizedProps.style,w=G!=null&&G.hasOwnProperty("display")?G.display:null;h.style.display=w==null||typeof w=="boolean"?"":(""+w).trim()}}catch(ne){Re(b,b.return,ne)}}}else if(t.tag===6){if(l===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(ne){Re(b,b.return,ne)}}}else if(t.tag===18){if(l===null){b=t;try{var _=b.stateNode;s?Kf(_,!0):Kf(b.stateNode,!1)}catch(ne){Re(b,b.return,ne)}}}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 e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Zs(e,l))));break;case 19:mt(t,e),ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zs(e,a)));break;case 30:break;case 21:break;default:mt(t,e),ht(e)}}function ht(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if($d(a)){l=a;break}a=a.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var s=l.stateNode,i=su(e);Qs(e,i,s);break;case 5:var o=l.stateNode;l.flags&32&&(ga(o,""),l.flags&=-33);var h=su(e);Qs(e,h,o);break;case 3:case 4:var b=l.stateNode.containerInfo,A=su(e);iu(e,A,b);break;default:throw Error(c(161))}}catch(L){Re(e,e.return,L)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function af(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;af(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Fd(e,t.alternate,t),t=t.sibling}function ia(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:wl(4,t,t.return),ia(t);break;case 1:Vt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Vd(t,t.return,l),ia(t);break;case 27:Hn(t.stateNode);case 26:case 5:Vt(t,t.return),ia(t);break;case 22:t.memoizedState===null&&ia(t);break;case 30:ia(t);break;default:ia(t)}e=e.sibling}}function dl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:dl(s,i,l),An(4,i);break;case 1:if(dl(s,i,l),a=i,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(A){Re(a,a.return,A)}if(a=i,s=a.updateQueue,s!==null){var h=a.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)Do(b[s],h)}catch(A){Re(a,a.return,A)}}l&&o&64&&Zd(i),wn(i,i.return);break;case 27:Jd(i);case 26:case 5:dl(s,i,l),l&&a===null&&o&4&&Kd(i),wn(i,i.return);break;case 12:dl(s,i,l);break;case 31:dl(s,i,l),l&&o&4&&ef(s,i);break;case 13:dl(s,i,l),l&&o&4&&tf(s,i);break;case 22:i.memoizedState===null&&dl(s,i,l),wn(i,i.return);break;case 30:break;default:dl(s,i,l)}t=t.sibling}}function uu(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&xn(l))}function cu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xn(e))}function Gt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)nf(e,t,l,a),t=t.sibling}function nf(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Gt(e,t,l,a),s&2048&&An(9,t);break;case 1:Gt(e,t,l,a);break;case 3:Gt(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xn(e)));break;case 12:if(s&2048){Gt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){Re(t,t.return,b)}}else Gt(e,t,l,a);break;case 31:Gt(e,t,l,a);break;case 13:Gt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?Gt(e,t,l,a):Cn(e,t):i._visibility&2?Gt(e,t,l,a):(i._visibility|=2,Ua(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&uu(o,t);break;case 24:Gt(e,t,l,a),s&2048&&cu(t.alternate,t);break;default:Gt(e,t,l,a)}}function Ua(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,h=l,b=a,A=o.flags;switch(o.tag){case 0:case 11:case 15:Ua(i,o,h,b,s),An(8,o);break;case 23:break;case 22:var L=o.stateNode;o.memoizedState!==null?L._visibility&2?Ua(i,o,h,b,s):Cn(i,o):(L._visibility|=2,Ua(i,o,h,b,s)),s&&A&2048&&uu(o.alternate,o);break;case 24:Ua(i,o,h,b,s),s&&A&2048&&cu(o.alternate,o);break;default:Ua(i,o,h,b,s)}t=t.sibling}}function Cn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:Cn(l,a),s&2048&&uu(a.alternate,a);break;case 24:Cn(l,a),s&2048&&cu(a.alternate,a);break;default:Cn(l,a)}t=t.sibling}}var Rn=8192;function qa(e,t,l){if(e.subtreeFlags&Rn)for(e=e.child;e!==null;)sf(e,t,l),e=e.sibling}function sf(e,t,l){switch(e.tag){case 26:qa(e,t,l),e.flags&Rn&&e.memoizedState!==null&&Cp(l,Yt,e.memoizedState,e.memoizedProps);break;case 5:qa(e,t,l);break;case 3:case 4:var a=Yt;Yt=si(e.stateNode.containerInfo),qa(e,t,l),Yt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Rn,Rn=16777216,qa(e,t,l),Rn=a):qa(e,t,l));break;default:qa(e,t,l)}}function rf(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 _n(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ie=a,cf(a,e)}rf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)uf(e),e=e.sibling}function uf(e){switch(e.tag){case 0:case 11:case 15:_n(e),e.flags&2048&&wl(9,e,e.return);break;case 3:_n(e);break;case 12:_n(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vs(e)):_n(e);break;default:_n(e)}}function Vs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ie=a,cf(a,e)}rf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:wl(8,t,t.return),Vs(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Vs(t));break;default:Vs(t)}e=e.sibling}}function cf(e,t){for(;Ie!==null;){var l=Ie;switch(l.tag){case 0:case 11:case 15:wl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:xn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Ie=a;else e:for(l=e;Ie!==null;){a=Ie;var s=a.sibling,i=a.return;if(Pd(a),a===l){Ie=null;break e}if(s!==null){s.return=i,Ie=s;break e}Ie=i}}}var Zx={getCacheForType:function(e){var t=at(Ve),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return at(Ve).controller.signal}},Vx=typeof WeakMap=="function"?WeakMap:Map,Me=0,Le=null,pe=null,ge=0,Ce=0,Et=null,Cl=!1,Ya=!1,ou=!1,fl=0,Xe=0,Rl=0,ra=0,du=0,Tt=0,Ga=0,zn=null,xt=null,fu=!1,Ks=0,of=0,$s=1/0,Js=null,_l=null,We=0,zl=null,Xa=null,ml=0,mu=0,hu=null,df=null,Dn=0,xu=null;function kt(){return(Me&2)!==0&&ge!==0?ge&-ge:T.T!==null?ju():Tc()}function ff(){if(Tt===0)if((ge&536870912)===0||Se){var e=as;as<<=1,(as&3932160)===0&&(as=262144),Tt=e}else Tt=536870912;return e=St.current,e!==null&&(e.flags|=32),Tt}function pt(e,t,l){(e===Le&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Qa(e,0),Dl(e,ge,Tt,!1)),en(e,l),((Me&2)===0||e!==Le)&&(e===Le&&((Me&2)===0&&(ra|=l),Xe===4&&Dl(e,ge,Tt,!1)),Kt(e))}function mf(e,t,l){if((Me&6)!==0)throw Error(c(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Ia(e,t),s=a?Jx(e,t):vu(e,t,!0),i=a;do{if(s===0){Ya&&!a&&Dl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Kx(l)){s=vu(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;s=zn;var b=h.current.memoizedState.isDehydrated;if(b&&(Qa(h,o).flags|=256),o=vu(h,o,!1),o!==2){if(ou&&!b){h.errorRecoveryDisabledLanes|=i,ra|=i,s=4;break e}i=xt,xt=s,i!==null&&(xt===null?xt=i:xt.push.apply(xt,i))}s=o}if(i=!1,s!==2)continue}}if(s===1){Qa(e,0),Dl(e,t,0,!0);break}e:{switch(a=e,i=s,i){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Dl(a,t,Tt,!Cl);break e;case 2:xt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(s=Ks+300-vt(),10<s)){if(Dl(a,t,Tt,!Cl),ss(a,0,!0)!==0)break e;ml=t,a.timeoutHandle=Qf(hf.bind(null,a,l,xt,Js,fu,t,Tt,ra,Ga,Cl,i,"Throttled",-0,0),s);break e}hf(a,l,xt,Js,fu,t,Tt,ra,Ga,Cl,i,null,-0,0)}}break}while(!0);Kt(e)}function hf(e,t,l,a,s,i,o,h,b,A,L,G,w,_){if(e.timeoutHandle=-1,G=t.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pt},sf(t,i,G);var ne=(i&62914560)===i?Ks-vt():(i&4194048)===i?of-vt():0;if(ne=Rp(G,ne),ne!==null){ml=i,e.cancelPendingCommit=ne(Sf.bind(null,e,t,i,l,a,s,o,h,b,L,G,null,w,_)),Dl(e,i,o,!A);return}}Sf(e,t,i,l,a,s,o,h,b)}function Kx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],i=s.getSnapshot;s=s.value;try{if(!bt(i(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Dl(e,t,l,a){t&=~du,t&=~ra,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var i=31-gt(s),o=1<<i;a[i]=-1,s&=~o}l!==0&&Sc(e,l,t)}function Ws(){return(Me&6)===0?(On(0),!1):!0}function pu(){if(pe!==null){if(Ce===0)var e=pe.return;else e=pe,ll=Pl=null,_r(e),Da=null,vn=0,e=pe;for(;e!==null;)Qd(e.alternate,e),e=e.return;pe=null}}function Qa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,mp(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ml=0,pu(),Le=e,pe=l=el(e.current,null),ge=t,Ce=0,Et=null,Cl=!1,Ya=Ia(e,t),ou=!1,Ga=Tt=du=ra=Rl=Xe=0,xt=zn=null,fu=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-gt(a),i=1<<s;t|=e[s],a&=~i}return fl=t,vs(),l}function xf(e,t){he=null,T.H=Tn,t===za||t===Ts?(t=Co(),Ce=3):t===br?(t=Co(),Ce=4):Ce=t===$r?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Et=t,pe===null&&(Xe=1,Us(e,Rt(t,e.current)))}function pf(){var e=St.current;return e===null?!0:(ge&4194048)===ge?Ot===null:(ge&62914560)===ge||(ge&536870912)!==0?e===Ot:!1}function vf(){var e=T.H;return T.H=Tn,e===null?Tn:e}function yf(){var e=T.A;return T.A=Zx,e}function Fs(){Xe=4,Cl||(ge&4194048)!==ge&&St.current!==null||(Ya=!0),(Rl&134217727)===0&&(ra&134217727)===0||Le===null||Dl(Le,ge,Tt,!1)}function vu(e,t,l){var a=Me;Me|=2;var s=vf(),i=yf();(Le!==e||ge!==t)&&(Js=null,Qa(e,t)),t=!1;var o=Xe;e:do try{if(Ce!==0&&pe!==null){var h=pe,b=Et;switch(Ce){case 8:pu(),o=6;break e;case 3:case 2:case 9:case 6:St.current===null&&(t=!0);var A=Ce;if(Ce=0,Et=null,Za(e,h,b,A),l&&Ya){o=0;break e}break;default:A=Ce,Ce=0,Et=null,Za(e,h,b,A)}}$x(),o=Xe;break}catch(L){xf(e,L)}while(!0);return t&&e.shellSuspendCounter++,ll=Pl=null,Me=a,T.H=s,T.A=i,pe===null&&(Le=null,ge=0,vs()),o}function $x(){for(;pe!==null;)gf(pe)}function Jx(e,t){var l=Me;Me|=2;var a=vf(),s=yf();Le!==e||ge!==t?(Js=null,$s=vt()+500,Qa(e,t)):Ya=Ia(e,t);e:do try{if(Ce!==0&&pe!==null){t=pe;var i=Et;t:switch(Ce){case 1:Ce=0,Et=null,Za(e,t,i,1);break;case 2:case 9:if(Ao(i)){Ce=0,Et=null,bf(t);break}t=function(){Ce!==2&&Ce!==9||Le!==e||(Ce=7),Kt(e)},i.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:Ao(i)?(Ce=0,Et=null,bf(t)):(Ce=0,Et=null,Za(e,t,i,7));break;case 5:var o=null;switch(pe.tag){case 26:o=pe.memoizedState;case 5:case 27:var h=pe;if(o?sm(o):h.stateNode.complete){Ce=0,Et=null;var b=h.sibling;if(b!==null)pe=b;else{var A=h.return;A!==null?(pe=A,Ps(A)):pe=null}break t}}Ce=0,Et=null,Za(e,t,i,5);break;case 6:Ce=0,Et=null,Za(e,t,i,6);break;case 8:pu(),Xe=6;break e;default:throw Error(c(462))}}Wx();break}catch(L){xf(e,L)}while(!0);return ll=Pl=null,T.H=a,T.A=s,Me=l,pe!==null?0:(Le=null,ge=0,vs(),Xe)}function Wx(){for(;pe!==null&&!gh();)gf(pe)}function gf(e){var t=Gd(e.alternate,e,fl);e.memoizedProps=e.pendingProps,t===null?Ps(e):pe=t}function bf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Ld(l,t,t.pendingProps,t.type,void 0,ge);break;case 11:t=Ld(l,t,t.pendingProps,t.type.render,t.ref,ge);break;case 5:_r(t);default:Qd(l,t),t=pe=vo(t,fl),t=Gd(l,t,fl)}e.memoizedProps=e.pendingProps,t===null?Ps(e):pe=t}function Za(e,t,l,a){ll=Pl=null,_r(t),Da=null,vn=0;var s=t.return;try{if(Hx(e,s,t,l,ge)){Xe=1,Us(e,Rt(l,e.current)),pe=null;return}}catch(i){if(s!==null)throw pe=s,i;Xe=1,Us(e,Rt(l,e.current)),pe=null;return}t.flags&32768?(Se||a===1?e=!0:Ya||(ge&536870912)!==0?e=!1:(Cl=e=!0,(a===2||a===9||a===3||a===6)&&(a=St.current,a!==null&&a.tag===13&&(a.flags|=16384))),jf(t,e)):Ps(t)}function Ps(e){var t=e;do{if((t.flags&32768)!==0){jf(t,Cl);return}e=t.return;var l=Yx(t.alternate,t,fl);if(l!==null){pe=l;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);Xe===0&&(Xe=5)}function jf(e,t){do{var l=Gx(e.alternate,e);if(l!==null){l.flags&=32767,pe=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){pe=e;return}pe=e=l}while(e!==null);Xe=6,pe=null}function Sf(e,t,l,a,s,i,o,h,b){e.cancelPendingCommit=null;do Is();while(We!==0);if((Me&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(i=t.lanes|t.childLanes,i|=sr,wh(e,l,i,o,h,b),e===Le&&(pe=Le=null,ge=0),Xa=t,zl=e,ml=l,mu=i,hu=s,df=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ep(ts,function(){return Mf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=T.T,T.T=null,s=C.p,C.p=2,o=Me,Me|=4;try{Xx(e,t,l)}finally{Me=o,C.p=s,T.T=a}}We=1,Nf(),Ef(),Tf()}}function Nf(){if(We===1){We=0;var e=zl,t=Xa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=T.T,T.T=null;var a=C.p;C.p=2;var s=Me;Me|=4;try{lf(t,e);var i=wu,o=ro(e.containerInfo),h=i.focusedElem,b=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&io(h.ownerDocument.documentElement,h)){if(b!==null&&er(h)){var A=b.start,L=b.end;if(L===void 0&&(L=A),"selectionStart"in h)h.selectionStart=A,h.selectionEnd=Math.min(L,h.value.length);else{var G=h.ownerDocument||document,w=G&&G.defaultView||window;if(w.getSelection){var _=w.getSelection(),ne=h.textContent.length,oe=Math.min(b.start,ne),Oe=b.end===void 0?oe:Math.min(b.end,ne);!_.extend&&oe>Oe&&(o=Oe,Oe=oe,oe=o);var k=so(h,oe),E=so(h,Oe);if(k&&E&&(_.rangeCount!==1||_.anchorNode!==k.node||_.anchorOffset!==k.offset||_.focusNode!==E.node||_.focusOffset!==E.offset)){var M=G.createRange();M.setStart(k.node,k.offset),_.removeAllRanges(),oe>Oe?(_.addRange(M),_.extend(E.node,E.offset)):(M.setEnd(E.node,E.offset),_.addRange(M))}}}}for(G=[],_=h;_=_.parentNode;)_.nodeType===1&&G.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<G.length;h++){var q=G[h];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}di=!!Au,wu=Au=null}finally{Me=s,C.p=a,T.T=l}}e.current=t,We=2}}function Ef(){if(We===2){We=0;var e=zl,t=Xa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=T.T,T.T=null;var a=C.p;C.p=2;var s=Me;Me|=4;try{Fd(e,t.alternate,t)}finally{Me=s,C.p=a,T.T=l}}We=3}}function Tf(){if(We===4||We===3){We=0,bh();var e=zl,t=Xa,l=ml,a=df;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?We=5:(We=0,Xa=zl=null,kf(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(_l=null),Oi(l),t=t.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(Pa,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=T.T,s=C.p,C.p=2,T.T=null;try{for(var i=e.onRecoverableError,o=0;o<a.length;o++){var h=a[o];i(h.value,{componentStack:h.stack})}}finally{T.T=t,C.p=s}}(ml&3)!==0&&Is(),Kt(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===xu?Dn++:(Dn=0,xu=e):Dn=0,On(0)}}function kf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xn(t)))}function Is(){return Nf(),Ef(),Tf(),Mf()}function Mf(){if(We!==5)return!1;var e=zl,t=mu;mu=0;var l=Oi(ml),a=T.T,s=C.p;try{C.p=32>l?32:l,T.T=null,l=hu,hu=null;var i=zl,o=ml;if(We=0,Xa=zl=null,ml=0,(Me&6)!==0)throw Error(c(331));var h=Me;if(Me|=4,uf(i.current),nf(i,i.current,o,l),Me=h,On(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(Pa,i)}catch{}return!0}finally{C.p=s,T.T=a,kf(e,t)}}function Af(e,t,l){t=Rt(l,t),t=Kr(e.stateNode,t,2),e=kl(e,t,2),e!==null&&(en(e,2),Kt(e))}function Re(e,t,l){if(e.tag===3)Af(e,e,l);else for(;t!==null;){if(t.tag===3){Af(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(_l===null||!_l.has(a))){e=Rt(l,e),l=Ad(2),a=kl(t,l,2),a!==null&&(wd(l,a,t,e),en(a,2),Kt(a));break}}t=t.return}}function yu(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Vx;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(ou=!0,s.add(l),e=Fx.bind(null,e,t,l),t.then(e,e))}function Fx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Le===e&&(ge&l)===l&&(Xe===4||Xe===3&&(ge&62914560)===ge&&300>vt()-Ks?(Me&2)===0&&Qa(e,0):du|=l,Ga===ge&&(Ga=0)),Kt(e)}function wf(e,t){t===0&&(t=jc()),e=Jl(e,t),e!==null&&(en(e,t),Kt(e))}function Px(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),wf(e,l)}function Ix(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),wf(e,l)}function ep(e,t){return Ri(e,t)}var ei=null,Va=null,gu=!1,ti=!1,bu=!1,Ol=0;function Kt(e){e!==Va&&e.next===null&&(Va===null?ei=Va=e:Va=Va.next=e),ti=!0,gu||(gu=!0,lp())}function On(e,t){if(!bu&&ti){bu=!0;do for(var l=!1,a=ei;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var i=0;else{var o=a.suspendedLanes,h=a.pingedLanes;i=(1<<31-gt(42|e)+1)-1,i&=s&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,zf(a,i))}else i=ge,i=ss(a,a===Le?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Ia(a,i)||(l=!0,zf(a,i));a=a.next}while(l);bu=!1}}function tp(){Cf()}function Cf(){ti=gu=!1;var e=0;Ol!==0&&fp()&&(e=Ol);for(var t=vt(),l=null,a=ei;a!==null;){var s=a.next,i=Rf(a,t);i===0?(a.next=null,l===null?ei=s:l.next=s,s===null&&(Va=l)):(l=a,(e!==0||(i&3)!==0)&&(ti=!0)),a=s}We!==0&&We!==5||On(e),Ol!==0&&(Ol=0)}function Rf(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-gt(i),h=1<<o,b=s[o];b===-1?((h&l)===0||(h&a)!==0)&&(s[o]=Ah(h,t)):b<=t&&(e.expiredLanes|=h),i&=~h}if(t=Le,l=ge,l=ss(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&_i(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ia(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&_i(a),Oi(l)){case 2:case 8:l=gc;break;case 32:l=ts;break;case 268435456:l=bc;break;default:l=ts}return a=_f.bind(null,e),l=Ri(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&_i(a),e.callbackPriority=2,e.callbackNode=null,2}function _f(e,t){if(We!==0&&We!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Is()&&e.callbackNode!==l)return null;var a=ge;return a=ss(e,e===Le?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(mf(e,a,t),Rf(e,vt()),e.callbackNode!=null&&e.callbackNode===l?_f.bind(null,e):null)}function zf(e,t){if(Is())return null;mf(e,t,!0)}function lp(){hp(function(){(Me&6)!==0?Ri(yc,tp):Cf()})}function ju(){if(Ol===0){var e=Ra;e===0&&(e=ls,ls<<=1,(ls&261888)===0&&(ls=256)),Ol=e}return Ol}function Df(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:cs(""+e)}function Of(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function ap(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var i=Df((s[ot]||null).action),o=a.submitter;o&&(t=(t=o[ot]||null)?Df(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new ms("action","action",null,a,s);e.push({event:h,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ol!==0){var b=o?Of(s,o):new FormData(s);Yr(l,{pending:!0,data:b,method:s.method,action:i},null,b)}}else typeof i=="function"&&(h.preventDefault(),b=o?Of(s,o):new FormData(s),Yr(l,{pending:!0,data:b,method:s.method,action:i},i,b))},currentTarget:s}]})}}for(var Su=0;Su<nr.length;Su++){var Nu=nr[Su],np=Nu.toLowerCase(),sp=Nu[0].toUpperCase()+Nu.slice(1);qt(np,"on"+sp)}qt(oo,"onAnimationEnd"),qt(fo,"onAnimationIteration"),qt(mo,"onAnimationStart"),qt("dblclick","onDoubleClick"),qt("focusin","onFocus"),qt("focusout","onBlur"),qt(jx,"onTransitionRun"),qt(Sx,"onTransitionStart"),qt(Nx,"onTransitionCancel"),qt(ho,"onTransitionEnd"),va("onMouseEnter",["mouseout","mouseover"]),va("onMouseLeave",["mouseout","mouseover"]),va("onPointerEnter",["pointerout","pointerover"]),va("onPointerLeave",["pointerout","pointerover"]),Zl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ln="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(" "),ip=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ln));function Lf(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var o=a.length-1;0<=o;o--){var h=a[o],b=h.instance,A=h.currentTarget;if(h=h.listener,b!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=A;try{i(s)}catch(L){ps(L)}s.currentTarget=null,i=b}else for(o=0;o<a.length;o++){if(h=a[o],b=h.instance,A=h.currentTarget,h=h.listener,b!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=A;try{i(s)}catch(L){ps(L)}s.currentTarget=null,i=b}}}}function ve(e,t){var l=t[Li];l===void 0&&(l=t[Li]=new Set);var a=e+"__bubble";l.has(a)||(Bf(t,e,2,!1),l.add(a))}function Eu(e,t,l){var a=0;t&&(a|=4),Bf(l,e,a,t)}var li="_reactListening"+Math.random().toString(36).slice(2);function Tu(e){if(!e[li]){e[li]=!0,Ac.forEach(function(l){l!=="selectionchange"&&(ip.has(l)||Eu(l,!1,e),Eu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[li]||(t[li]=!0,Eu("selectionchange",!1,t))}}function Bf(e,t,l,a){switch(fm(t)){case 2:var s=Dp;break;case 8:s=Op;break;default:s=qu}l=s.bind(null,t,l,e),s=void 0,!Zi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function ku(e,t,l,a,s){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var h=a.stateNode.containerInfo;if(h===s)break;if(o===4)for(o=a.return;o!==null;){var b=o.tag;if((b===3||b===4)&&o.stateNode.containerInfo===s)return;o=o.return}for(;h!==null;){if(o=ha(h),o===null)return;if(b=o.tag,b===5||b===6||b===26||b===27){a=i=o;continue e}h=h.parentNode}}a=a.return}qc(function(){var A=i,L=Xi(l),G=[];e:{var w=xo.get(e);if(w!==void 0){var _=ms,ne=e;switch(e){case"keypress":if(ds(l)===0)break e;case"keydown":case"keyup":_=Ih;break;case"focusin":ne="focus",_=Ji;break;case"focusout":ne="blur",_=Ji;break;case"beforeblur":case"afterblur":_=Ji;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=Xc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=Yh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=lx;break;case oo:case fo:case mo:_=Qh;break;case ho:_=nx;break;case"scroll":case"scrollend":_=Uh;break;case"wheel":_=ix;break;case"copy":case"cut":case"paste":_=Vh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=Zc;break;case"toggle":case"beforetoggle":_=ux}var oe=(t&4)!==0,Oe=!oe&&(e==="scroll"||e==="scrollend"),k=oe?w!==null?w+"Capture":null:w;oe=[];for(var E=A,M;E!==null;){var q=E;if(M=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||M===null||k===null||(q=an(E,k),q!=null&&oe.push(Bn(E,q,M))),Oe)break;E=E.return}0<oe.length&&(w=new _(w,ne,null,l,L),G.push({event:w,listeners:oe}))}}if((t&7)===0){e:{if(w=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",w&&l!==Gi&&(ne=l.relatedTarget||l.fromElement)&&(ha(ne)||ne[ma]))break e;if((_||w)&&(w=L.window===L?L:(w=L.ownerDocument)?w.defaultView||w.parentWindow:window,_?(ne=l.relatedTarget||l.toElement,_=A,ne=ne?ha(ne):null,ne!==null&&(Oe=m(ne),oe=ne.tag,ne!==Oe||oe!==5&&oe!==27&&oe!==6)&&(ne=null)):(_=null,ne=A),_!==ne)){if(oe=Xc,q="onMouseLeave",k="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(oe=Zc,q="onPointerLeave",k="onPointerEnter",E="pointer"),Oe=_==null?w:ln(_),M=ne==null?w:ln(ne),w=new oe(q,E+"leave",_,l,L),w.target=Oe,w.relatedTarget=M,q=null,ha(L)===A&&(oe=new oe(k,E+"enter",ne,l,L),oe.target=M,oe.relatedTarget=Oe,q=oe),Oe=q,_&&ne)t:{for(oe=rp,k=_,E=ne,M=0,q=k;q;q=oe(q))M++;q=0;for(var ce=E;ce;ce=oe(ce))q++;for(;0<M-q;)k=oe(k),M--;for(;0<q-M;)E=oe(E),q--;for(;M--;){if(k===E||E!==null&&k===E.alternate){oe=k;break t}k=oe(k),E=oe(E)}oe=null}else oe=null;_!==null&&Hf(G,w,_,oe,!1),ne!==null&&Oe!==null&&Hf(G,Oe,ne,oe,!0)}}e:{if(w=A?ln(A):window,_=w.nodeName&&w.nodeName.toLowerCase(),_==="select"||_==="input"&&w.type==="file")var Ee=Ic;else if(Fc(w))if(eo)Ee=yx;else{Ee=px;var ie=xx}else _=w.nodeName,!_||_.toLowerCase()!=="input"||w.type!=="checkbox"&&w.type!=="radio"?A&&Yi(A.elementType)&&(Ee=Ic):Ee=vx;if(Ee&&(Ee=Ee(e,A))){Pc(G,Ee,l,L);break e}ie&&ie(e,w,A),e==="focusout"&&A&&w.type==="number"&&A.memoizedProps.value!=null&&qi(w,"number",w.value)}switch(ie=A?ln(A):window,e){case"focusin":(Fc(ie)||ie.contentEditable==="true")&&(Na=ie,tr=A,fn=null);break;case"focusout":fn=tr=Na=null;break;case"mousedown":lr=!0;break;case"contextmenu":case"mouseup":case"dragend":lr=!1,uo(G,l,L);break;case"selectionchange":if(bx)break;case"keydown":case"keyup":uo(G,l,L)}var xe;if(Fi)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else Sa?Jc(e,l)&&(be="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(be="onCompositionStart");be&&(Vc&&l.locale!=="ko"&&(Sa||be!=="onCompositionStart"?be==="onCompositionEnd"&&Sa&&(xe=Yc()):(gl=L,Vi="value"in gl?gl.value:gl.textContent,Sa=!0)),ie=ai(A,be),0<ie.length&&(be=new Qc(be,e,null,l,L),G.push({event:be,listeners:ie}),xe?be.data=xe:(xe=Wc(l),xe!==null&&(be.data=xe)))),(xe=ox?dx(e,l):fx(e,l))&&(be=ai(A,"onBeforeInput"),0<be.length&&(ie=new Qc("onBeforeInput","beforeinput",null,l,L),G.push({event:ie,listeners:be}),ie.data=xe)),ap(G,e,A,l,L)}Lf(G,t)})}function Bn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function ai(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=an(e,l),s!=null&&a.unshift(Bn(e,s,i)),s=an(e,t),s!=null&&a.push(Bn(e,s,i))),e.tag===3)return a;e=e.return}return[]}function rp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Hf(e,t,l,a,s){for(var i=t._reactName,o=[];l!==null&&l!==a;){var h=l,b=h.alternate,A=h.stateNode;if(h=h.tag,b!==null&&b===a)break;h!==5&&h!==26&&h!==27||A===null||(b=A,s?(A=an(l,i),A!=null&&o.unshift(Bn(l,A,b))):s||(A=an(l,i),A!=null&&o.push(Bn(l,A,b)))),l=l.return}o.length!==0&&e.push({event:t,listeners:o})}var up=/\r\n?/g,cp=/\u0000|\uFFFD/g;function Uf(e){return(typeof e=="string"?e:""+e).replace(up,`
49
+ `).replace(cp,"")}function qf(e,t){return t=Uf(t),Uf(e)===t}function De(e,t,l,a,s,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ga(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ga(e,""+a);break;case"className":rs(e,"class",a);break;case"tabIndex":rs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":rs(e,l,a);break;case"style":Hc(e,a,i);break;case"data":if(t!=="object"){rs(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=cs(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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 i=="function"&&(l==="formAction"?(t!=="input"&&De(e,t,"name",s.name,s,null),De(e,t,"formEncType",s.formEncType,s,null),De(e,t,"formMethod",s.formMethod,s,null),De(e,t,"formTarget",s.formTarget,s,null)):(De(e,t,"encType",s.encType,s,null),De(e,t,"method",s.method,s,null),De(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=cs(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Pt);break;case"onScroll":a!=null&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=cs(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":ve("beforetoggle",e),ve("toggle",e),is(e,"popover",a);break;case"xlinkActuate":Ft(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Ft(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Ft(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Ft(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Ft(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Ft(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":is(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Bh.get(l)||l,is(e,l,a))}}function Mu(e,t,l,a,s,i){switch(l){case"style":Hc(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ga(e,a):(typeof a=="number"||typeof a=="bigint")&&ga(e,""+a);break;case"onScroll":a!=null&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Pt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wc.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),i=e[ot]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):is(e,l,a)}}}function st(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var a=!1,s=!1,i;for(i in l)if(l.hasOwnProperty(i)){var o=l[i];if(o!=null)switch(i){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:De(e,t,i,o,l,null)}}s&&De(e,t,"srcSet",l.srcSet,l,null),a&&De(e,t,"src",l.src,l,null);return;case"input":ve("invalid",e);var h=i=o=s=null,b=null,A=null;for(a in l)if(l.hasOwnProperty(a)){var L=l[a];if(L!=null)switch(a){case"name":s=L;break;case"type":o=L;break;case"checked":b=L;break;case"defaultChecked":A=L;break;case"value":i=L;break;case"defaultValue":h=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(c(137,t));break;default:De(e,t,a,L,l,null)}}Dc(e,i,h,b,A,o,s,!1);return;case"select":ve("invalid",e),a=o=i=null;for(s in l)if(l.hasOwnProperty(s)&&(h=l[s],h!=null))switch(s){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":a=h;default:De(e,t,s,h,l,null)}t=i,l=o,e.multiple=!!a,t!=null?ya(e,!!a,t,!1):l!=null&&ya(e,!!a,l,!0);return;case"textarea":ve("invalid",e),i=s=a=null;for(o in l)if(l.hasOwnProperty(o)&&(h=l[o],h!=null))switch(o){case"value":a=h;break;case"defaultValue":s=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(c(91));break;default:De(e,t,o,h,l,null)}Lc(e,a,s,i);return;case"option":for(b in l)if(l.hasOwnProperty(b)&&(a=l[b],a!=null))switch(b){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:De(e,t,b,a,l,null)}return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(a=0;a<Ln.length;a++)ve(Ln[a],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("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(A in l)if(l.hasOwnProperty(A)&&(a=l[A],a!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:De(e,t,A,a,l,null)}return;default:if(Yi(t)){for(L in l)l.hasOwnProperty(L)&&(a=l[L],a!==void 0&&Mu(e,t,L,a,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(a=l[h],a!=null&&De(e,t,h,a,l,null))}function op(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,o=null,h=null,b=null,A=null,L=null;for(_ in l){var G=l[_];if(l.hasOwnProperty(_)&&G!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":b=G;default:a.hasOwnProperty(_)||De(e,t,_,null,a,G)}}for(var w in a){var _=a[w];if(G=l[w],a.hasOwnProperty(w)&&(_!=null||G!=null))switch(w){case"type":i=_;break;case"name":s=_;break;case"checked":A=_;break;case"defaultChecked":L=_;break;case"value":o=_;break;case"defaultValue":h=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(c(137,t));break;default:_!==G&&De(e,t,w,_,a,G)}}Ui(e,o,h,b,A,L,i,s);return;case"select":_=o=h=w=null;for(i in l)if(b=l[i],l.hasOwnProperty(i)&&b!=null)switch(i){case"value":break;case"multiple":_=b;default:a.hasOwnProperty(i)||De(e,t,i,null,a,b)}for(s in a)if(i=a[s],b=l[s],a.hasOwnProperty(s)&&(i!=null||b!=null))switch(s){case"value":w=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==b&&De(e,t,s,i,a,b)}t=h,l=o,a=_,w!=null?ya(e,!!l,w,!1):!!a!=!!l&&(t!=null?ya(e,!!l,t,!0):ya(e,!!l,l?[]:"",!1));return;case"textarea":_=w=null;for(h in l)if(s=l[h],l.hasOwnProperty(h)&&s!=null&&!a.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:De(e,t,h,null,a,s)}for(o in a)if(s=a[o],i=l[o],a.hasOwnProperty(o)&&(s!=null||i!=null))switch(o){case"value":w=s;break;case"defaultValue":_=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(c(91));break;default:s!==i&&De(e,t,o,s,a,i)}Oc(e,w,_);return;case"option":for(var ne in l)if(w=l[ne],l.hasOwnProperty(ne)&&w!=null&&!a.hasOwnProperty(ne))switch(ne){case"selected":e.selected=!1;break;default:De(e,t,ne,null,a,w)}for(b in a)if(w=a[b],_=l[b],a.hasOwnProperty(b)&&w!==_&&(w!=null||_!=null))switch(b){case"selected":e.selected=w&&typeof w!="function"&&typeof w!="symbol";break;default:De(e,t,b,w,a,_)}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 oe in l)w=l[oe],l.hasOwnProperty(oe)&&w!=null&&!a.hasOwnProperty(oe)&&De(e,t,oe,null,a,w);for(A in a)if(w=a[A],_=l[A],a.hasOwnProperty(A)&&w!==_&&(w!=null||_!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(c(137,t));break;default:De(e,t,A,w,a,_)}return;default:if(Yi(t)){for(var Oe in l)w=l[Oe],l.hasOwnProperty(Oe)&&w!==void 0&&!a.hasOwnProperty(Oe)&&Mu(e,t,Oe,void 0,a,w);for(L in a)w=a[L],_=l[L],!a.hasOwnProperty(L)||w===_||w===void 0&&_===void 0||Mu(e,t,L,w,a,_);return}}for(var k in l)w=l[k],l.hasOwnProperty(k)&&w!=null&&!a.hasOwnProperty(k)&&De(e,t,k,null,a,w);for(G in a)w=a[G],_=l[G],!a.hasOwnProperty(G)||w===_||w==null&&_==null||De(e,t,G,w,a,_)}function Yf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dp(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],i=s.transferSize,o=s.initiatorType,h=s.duration;if(i&&h&&Yf(o)){for(o=0,h=s.responseEnd,a+=1;a<l.length;a++){var b=l[a],A=b.startTime;if(A>h)break;var L=b.transferSize,G=b.initiatorType;L&&Yf(G)&&(b=b.responseEnd,o+=L*(b<h?1:(h-A)/(b-A)))}if(--a,t+=8*(i+o)/(s.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 Au=null,wu=null;function ni(e){return e.nodeType===9?e:e.ownerDocument}function Gf(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 Xf(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 Cu(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 Ru=null;function fp(){var e=window.event;return e&&e.type==="popstate"?e===Ru?!1:(Ru=e,!0):(Ru=null,!1)}var Qf=typeof setTimeout=="function"?setTimeout:void 0,mp=typeof clearTimeout=="function"?clearTimeout:void 0,Zf=typeof Promise=="function"?Promise:void 0,hp=typeof queueMicrotask=="function"?queueMicrotask:typeof Zf<"u"?function(e){return Zf.resolve(null).then(e).catch(xp)}:Qf;function xp(e){setTimeout(function(){throw e})}function Ll(e){return e==="head"}function Vf(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),Wa(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Hn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Hn(l);for(var i=l.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[tn]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&Hn(e.ownerDocument.body);l=s}while(l);Wa(t)}function Kf(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function _u(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":_u(l),Bi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function pp(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[tn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Lt(e.nextSibling),e===null)break}return null}function vp(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Lt(e.nextSibling),e===null))return null;return e}function $f(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Lt(e.nextSibling),e===null))return null;return e}function zu(e){return e.data==="$?"||e.data==="$~"}function Du(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function yp(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Lt(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 Ou=null;function Jf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Lt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Wf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Ff(e,t,l){switch(t=ni(l),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Hn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Bi(e)}var Bt=new Map,Pf=new Set;function si(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var hl=C.d;C.d={f:gp,r:bp,D:jp,C:Sp,L:Np,m:Ep,X:kp,S:Tp,M:Mp};function gp(){var e=hl.f(),t=Ws();return e||t}function bp(e){var t=xa(e);t!==null&&t.tag===5&&t.type==="form"?hd(t):hl.r(e)}var Ka=typeof document>"u"?null:document;function If(e,t,l){var a=Ka;if(a&&typeof t=="string"&&t){var s=wt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),Pf.has(s)||(Pf.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),st(t,"link",e),Pe(t),a.head.appendChild(t)))}}function jp(e){hl.D(e),If("dns-prefetch",e,null)}function Sp(e,t){hl.C(e,t),If("preconnect",e,t)}function Np(e,t,l){hl.L(e,t,l);var a=Ka;if(a&&e&&t){var s='link[rel="preload"][as="'+wt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+wt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+wt(l.imageSizes)+'"]')):s+='[href="'+wt(e)+'"]';var i=s;switch(t){case"style":i=$a(e);break;case"script":i=Ja(e)}Bt.has(i)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Bt.set(i,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(Un(i))||t==="script"&&a.querySelector(qn(i))||(t=a.createElement("link"),st(t,"link",e),Pe(t),a.head.appendChild(t)))}}function Ep(e,t){hl.m(e,t);var l=Ka;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+wt(a)+'"][href="'+wt(e)+'"]',i=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ja(e)}if(!Bt.has(i)&&(e=y({rel:"modulepreload",href:e},t),Bt.set(i,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(qn(i)))return}a=l.createElement("link"),st(a,"link",e),Pe(a),l.head.appendChild(a)}}}function Tp(e,t,l){hl.S(e,t,l);var a=Ka;if(a&&e){var s=pa(a).hoistableStyles,i=$a(e);t=t||"default";var o=s.get(i);if(!o){var h={loading:0,preload:null};if(o=a.querySelector(Un(i)))h.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Bt.get(i))&&Lu(e,l);var b=o=a.createElement("link");Pe(b),st(b,"link",e),b._p=new Promise(function(A,L){b.onload=A,b.onerror=L}),b.addEventListener("load",function(){h.loading|=1}),b.addEventListener("error",function(){h.loading|=2}),h.loading|=4,ii(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:h},s.set(i,o)}}}function kp(e,t){hl.X(e,t);var l=Ka;if(l&&e){var a=pa(l).hoistableScripts,s=Ja(e),i=a.get(s);i||(i=l.querySelector(qn(s)),i||(e=y({src:e,async:!0},t),(t=Bt.get(s))&&Bu(e,t),i=l.createElement("script"),Pe(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function Mp(e,t){hl.M(e,t);var l=Ka;if(l&&e){var a=pa(l).hoistableScripts,s=Ja(e),i=a.get(s);i||(i=l.querySelector(qn(s)),i||(e=y({src:e,async:!0,type:"module"},t),(t=Bt.get(s))&&Bu(e,t),i=l.createElement("script"),Pe(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function em(e,t,l,a){var s=(s=W.current)?si(s):null;if(!s)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=$a(l.href),l=pa(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=$a(l.href);var i=pa(s).hoistableStyles,o=i.get(e);if(o||(s=s.ownerDocument||s,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=s.querySelector(Un(e)))&&!i._p&&(o.instance=i,o.state.loading=5),Bt.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Bt.set(e,l),i||Ap(s,e,l,o.state))),t&&a===null)throw Error(c(528,""));return o}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ja(l),l=pa(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function $a(e){return'href="'+wt(e)+'"'}function Un(e){return'link[rel="stylesheet"]['+e+"]"}function tm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Ap(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),st(t,"link",l),Pe(t),e.head.appendChild(t))}function Ja(e){return'[src="'+wt(e)+'"]'}function qn(e){return"script[async]"+e}function lm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+wt(l.href)+'"]');if(a)return t.instance=a,Pe(a),a;var s=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Pe(a),st(a,"style",s),ii(a,l.precedence,e),t.instance=a;case"stylesheet":s=$a(l.href);var i=e.querySelector(Un(s));if(i)return t.state.loading|=4,t.instance=i,Pe(i),i;a=tm(l),(s=Bt.get(s))&&Lu(a,s),i=(e.ownerDocument||e).createElement("link"),Pe(i);var o=i;return o._p=new Promise(function(h,b){o.onload=h,o.onerror=b}),st(i,"link",a),t.state.loading|=4,ii(i,l.precedence,e),t.instance=i;case"script":return i=Ja(l.src),(s=e.querySelector(qn(i)))?(t.instance=s,Pe(s),s):(a=l,(s=Bt.get(i))&&(a=y({},l),Bu(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Pe(s),st(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ii(a,l.precedence,e));return t.instance}function ii(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,i=s,o=0;o<a.length;o++){var h=a[o];if(h.dataset.precedence===t)i=h;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Lu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Bu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ri=null;function am(e,t,l){if(ri===null){var a=new Map,s=ri=new Map;s.set(l,a)}else s=ri,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var i=l[s];if(!(i[tn]||i[tt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var h=a.get(o);h?h.push(i):a.set(o,[i])}}return a}function nm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function wp(e,t,l){if(l===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 sm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Cp(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=$a(a.href),i=t.querySelector(Un(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ui.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Pe(i);return}i=t.ownerDocument||t,a=tm(a),(s=Bt.get(s))&&Lu(a,s),i=i.createElement("link"),Pe(i);var o=i;o._p=new Promise(function(h,b){o.onload=h,o.onerror=b}),st(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=ui.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Hu=0;function Rp(e,t){return e.stylesheets&&e.count===0&&oi(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&oi(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Hu===0&&(Hu=62500*dp());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&oi(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Hu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function ui(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)oi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ci=null;function oi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ci=new Map,t.forEach(_p,e),ci=null,ui.call(e))}function _p(e,t){if(!(t.state.loading&4)){var l=ci.get(e);if(l)var a=l.get(null);else{l=new Map,ci.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var o=s[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),a=o)}a&&l.set(null,a)}s=t.instance,o=s.getAttribute("data-precedence"),i=l.get(o)||a,i===a&&l.set(null,s),l.set(o,s),this.count++,a=ui.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Yn={$$typeof:J,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function zp(e,t,l,a,s,i,o,h,b){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=zi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zi(0),this.hiddenUpdates=zi(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function im(e,t,l,a,s,i,o,h,b,A,L,G){return e=new zp(e,t,l,o,b,A,L,G,h),t=1,i===!0&&(t|=24),i=jt(3,null,null,t),e.current=i,i.stateNode=e,t=vr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},jr(i),e}function rm(e){return e?(e=ka,e):ka}function um(e,t,l,a,s,i){s=rm(s),a.context===null?a.context=s:a.pendingContext=s,a=Tl(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=kl(e,a,t),l!==null&&(pt(l,e,t),gn(l,e,t))}function cm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Uu(e,t){cm(e,t),(e=e.alternate)&&cm(e,t)}function om(e){if(e.tag===13||e.tag===31){var t=Jl(e,67108864);t!==null&&pt(t,e,67108864),Uu(e,67108864)}}function dm(e){if(e.tag===13||e.tag===31){var t=kt();t=Di(t);var l=Jl(e,t);l!==null&&pt(l,e,t),Uu(e,t)}}var di=!0;function Dp(e,t,l,a){var s=T.T;T.T=null;var i=C.p;try{C.p=2,qu(e,t,l,a)}finally{C.p=i,T.T=s}}function Op(e,t,l,a){var s=T.T;T.T=null;var i=C.p;try{C.p=8,qu(e,t,l,a)}finally{C.p=i,T.T=s}}function qu(e,t,l,a){if(di){var s=Yu(a);if(s===null)ku(e,t,a,fi,l),mm(e,a);else if(Bp(s,e,t,l,a))a.stopPropagation();else if(mm(e,a),t&4&&-1<Lp.indexOf(e)){for(;s!==null;){var i=xa(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Ql(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var b=1<<31-gt(o);h.entanglements[1]|=b,o&=~b}Kt(i),(Me&6)===0&&($s=vt()+500,On(0))}}break;case 31:case 13:h=Jl(i,2),h!==null&&pt(h,i,2),Ws(),Uu(i,2)}if(i=Yu(a),i===null&&ku(e,t,a,fi,l),i===s)break;s=i}s!==null&&a.stopPropagation()}else ku(e,t,a,null,l)}}function Yu(e){return e=Xi(e),Gu(e)}var fi=null;function Gu(e){if(fi=null,e=ha(e),e!==null){var t=m(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=p(t),e!==null)return e;e=null}else if(l===31){if(e=j(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fi=e,null}function fm(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(jh()){case yc:return 2;case gc:return 8;case ts:case Sh:return 32;case bc:return 268435456;default:return 32}default:return 32}}var Xu=!1,Bl=null,Hl=null,Ul=null,Gn=new Map,Xn=new Map,ql=[],Lp="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 mm(e,t){switch(e){case"focusin":case"focusout":Bl=null;break;case"dragenter":case"dragleave":Hl=null;break;case"mouseover":case"mouseout":Ul=null;break;case"pointerover":case"pointerout":Gn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xn.delete(t.pointerId)}}function Qn(e,t,l,a,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[s]},t!==null&&(t=xa(t),t!==null&&om(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Bp(e,t,l,a,s){switch(t){case"focusin":return Bl=Qn(Bl,e,t,l,a,s),!0;case"dragenter":return Hl=Qn(Hl,e,t,l,a,s),!0;case"mouseover":return Ul=Qn(Ul,e,t,l,a,s),!0;case"pointerover":var i=s.pointerId;return Gn.set(i,Qn(Gn.get(i)||null,e,t,l,a,s)),!0;case"gotpointercapture":return i=s.pointerId,Xn.set(i,Qn(Xn.get(i)||null,e,t,l,a,s)),!0}return!1}function hm(e){var t=ha(e.target);if(t!==null){var l=m(t);if(l!==null){if(t=l.tag,t===13){if(t=p(l),t!==null){e.blockedOn=t,kc(e.priority,function(){dm(l)});return}}else if(t===31){if(t=j(l),t!==null){e.blockedOn=t,kc(e.priority,function(){dm(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Yu(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Gi=a,l.target.dispatchEvent(a),Gi=null}else return t=xa(l),t!==null&&om(t),e.blockedOn=l,!1;t.shift()}return!0}function xm(e,t,l){mi(e)&&l.delete(t)}function Hp(){Xu=!1,Bl!==null&&mi(Bl)&&(Bl=null),Hl!==null&&mi(Hl)&&(Hl=null),Ul!==null&&mi(Ul)&&(Ul=null),Gn.forEach(xm),Xn.forEach(xm)}function hi(e,t){e.blockedOn===t&&(e.blockedOn=null,Xu||(Xu=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Hp)))}var xi=null;function pm(e){xi!==e&&(xi=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){xi===e&&(xi=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(Gu(a||l)===null)continue;break}var i=xa(l);i!==null&&(e.splice(t,3),t-=3,Yr(i,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function Wa(e){function t(b){return hi(b,e)}Bl!==null&&hi(Bl,e),Hl!==null&&hi(Hl,e),Ul!==null&&hi(Ul,e),Gn.forEach(t),Xn.forEach(t);for(var l=0;l<ql.length;l++){var a=ql[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ql.length&&(l=ql[0],l.blockedOn===null);)hm(l),l.blockedOn===null&&ql.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],i=l[a+1],o=s[ot]||null;if(typeof i=="function")o||pm(l);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(s=i,o=i[ot]||null)h=o.formAction;else if(Gu(s)!==null)continue}else h=o.action;typeof h=="function"?l[a+1]=h:(l.splice(a,3),a-=3),pm(l)}}}function vm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return s=o})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Qu(e){this._internalRoot=e}pi.prototype.render=Qu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var l=t.current,a=kt();um(l,a,e,t,null,null)},pi.prototype.unmount=Qu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;um(e.current,2,null,e,null,null),Ws(),t[ma]=null}};function pi(e){this._internalRoot=e}pi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ql.length&&t!==0&&t<ql[l].priority;l++);ql.splice(l,0,e),l===0&&hm(e)}};var ym=u.version;if(ym!=="19.2.4")throw Error(c(527,ym,"19.2.4"));C.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=x(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Up={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vi.isDisabled&&vi.supportsFiber)try{Pa=vi.inject(Up),yt=vi}catch{}}return Vn.createRoot=function(e,t){if(!f(e))throw Error(c(299));var l=!1,a="",s=Ed,i=Td,o=kd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=im(e,1,!1,null,null,l,a,null,s,i,o,vm),e[ma]=t.current,Tu(e),new Qu(t)},Vn.hydrateRoot=function(e,t,l){if(!f(e))throw Error(c(299));var a=!1,s="",i=Ed,o=Td,h=kd,b=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(b=l.formState)),t=im(e,1,!0,t,l??null,a,s,b,i,o,h,vm),t.context=rm(null),l=t.current,a=kt(),a=Di(a),s=Tl(a),s.callback=null,kl(l,s,a),l=a,t.current.lanes=l,en(t,l),Kt(t),e[ma]=t.current,Tu(e),new pi(t)},Vn.version="19.2.4",Vn}var Am;function Jp(){if(Am)return Ku.exports;Am=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),Ku.exports=$p(),Ku.exports}var Wp=Jp();/**
50
+ * react-router v7.13.1
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var wm="popstate";function Cm(r){return typeof r=="object"&&r!=null&&"pathname"in r&&"search"in r&&"hash"in r&&"state"in r&&"key"in r}function Fp(r={}){function u(f,m){let{pathname:p="/",search:j="",hash:v=""}=oa(f.location.hash.substring(1));return!p.startsWith("/")&&!p.startsWith(".")&&(p="/"+p),sc("",{pathname:p,search:j,hash:v},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function d(f,m){let p=f.document.querySelector("base"),j="";if(p&&p.getAttribute("href")){let v=f.location.href,x=v.indexOf("#");j=x===-1?v:v.slice(0,x)}return j+"#"+(typeof m=="string"?m:Jn(m))}function c(f,m){Ht(f.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return Ip(u,d,c,r)}function Ye(r,u){if(r===!1||r===null||typeof r>"u")throw new Error(u)}function Ht(r,u){if(!r){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Pp(){return Math.random().toString(36).substring(2,10)}function Rm(r,u){return{usr:r.state,key:r.key,idx:u,masked:r.unstable_mask?{pathname:r.pathname,search:r.search,hash:r.hash}:void 0}}function sc(r,u,d=null,c,f){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof u=="string"?oa(u):u,state:d,key:u&&u.key||c||Pp(),unstable_mask:f}}function Jn({pathname:r="/",search:u="",hash:d=""}){return u&&u!=="?"&&(r+=u.charAt(0)==="?"?u:"?"+u),d&&d!=="#"&&(r+=d.charAt(0)==="#"?d:"#"+d),r}function oa(r){let u={};if(r){let d=r.indexOf("#");d>=0&&(u.hash=r.substring(d),r=r.substring(0,d));let c=r.indexOf("?");c>=0&&(u.search=r.substring(c),r=r.substring(0,c)),r&&(u.pathname=r)}return u}function Ip(r,u,d,c={}){let{window:f=document.defaultView,v5Compat:m=!1}=c,p=f.history,j="POP",v=null,x=S();x==null&&(x=0,p.replaceState({...p.state,idx:x},""));function S(){return(p.state||{idx:null}).idx}function y(){j="POP";let z=S(),O=z==null?null:z-x;x=z,v&&v({action:j,location:Z.location,delta:O})}function R(z,O){j="PUSH";let Y=Cm(z)?z:sc(Z.location,z,O);d&&d(Y,z),x=S()+1;let J=Rm(Y,x),V=Z.createHref(Y.unstable_mask||Y);try{p.pushState(J,"",V)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;f.location.assign(V)}m&&v&&v({action:j,location:Z.location,delta:1})}function X(z,O){j="REPLACE";let Y=Cm(z)?z:sc(Z.location,z,O);d&&d(Y,z),x=S();let J=Rm(Y,x),V=Z.createHref(Y.unstable_mask||Y);p.replaceState(J,"",V),m&&v&&v({action:j,location:Z.location,delta:0})}function Q(z){return ev(z)}let Z={get action(){return j},get location(){return r(f,p)},listen(z){if(v)throw new Error("A history only accepts one active listener");return f.addEventListener(wm,y),v=z,()=>{f.removeEventListener(wm,y),v=null}},createHref(z){return u(f,z)},createURL:Q,encodeLocation(z){let O=Q(z);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:R,replace:X,go(z){return p.go(z)}};return Z}function ev(r,u=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),Ye(d,"No window.location.(origin|href) available to create URL");let c=typeof r=="string"?r:Jn(r);return c=c.replace(/ $/,"%20"),!u&&c.startsWith("//")&&(c=d+c),new URL(c,d)}function Wm(r,u,d="/"){return tv(r,u,d,!1)}function tv(r,u,d,c){let f=typeof u=="string"?oa(u):u,m=pl(f.pathname||"/",d);if(m==null)return null;let p=Fm(r);lv(p);let j=null;for(let v=0;j==null&&v<p.length;++v){let x=mv(m);j=dv(p[v],x,c)}return j}function Fm(r,u=[],d=[],c="",f=!1){let m=(p,j,v=f,x)=>{let S={relativePath:x===void 0?p.path||"":x,caseSensitive:p.caseSensitive===!0,childrenIndex:j,route:p};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(c)&&v)return;Ye(S.relativePath.startsWith(c),`Absolute route path "${S.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(c.length)}let y=$t([c,S.relativePath]),R=d.concat(S);p.children&&p.children.length>0&&(Ye(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Fm(p.children,u,R,y,v)),!(p.path==null&&!p.index)&&u.push({path:y,score:cv(y,p.index),routesMeta:R})};return r.forEach((p,j)=>{var v;if(p.path===""||!((v=p.path)!=null&&v.includes("?")))m(p,j);else for(let x of Pm(p.path))m(p,j,!0,x)}),u}function Pm(r){let u=r.split("/");if(u.length===0)return[];let[d,...c]=u,f=d.endsWith("?"),m=d.replace(/\?$/,"");if(c.length===0)return f?[m,""]:[m];let p=Pm(c.join("/")),j=[];return j.push(...p.map(v=>v===""?m:[m,v].join("/"))),f&&j.push(...p),j.map(v=>r.startsWith("/")&&v===""?"/":v)}function lv(r){r.sort((u,d)=>u.score!==d.score?d.score-u.score:ov(u.routesMeta.map(c=>c.childrenIndex),d.routesMeta.map(c=>c.childrenIndex)))}var av=/^:[\w-]+$/,nv=3,sv=2,iv=1,rv=10,uv=-2,_m=r=>r==="*";function cv(r,u){let d=r.split("/"),c=d.length;return d.some(_m)&&(c+=uv),u&&(c+=sv),d.filter(f=>!_m(f)).reduce((f,m)=>f+(av.test(m)?nv:m===""?iv:rv),c)}function ov(r,u){return r.length===u.length&&r.slice(0,-1).every((c,f)=>c===u[f])?r[r.length-1]-u[u.length-1]:0}function dv(r,u,d=!1){let{routesMeta:c}=r,f={},m="/",p=[];for(let j=0;j<c.length;++j){let v=c[j],x=j===c.length-1,S=m==="/"?u:u.slice(m.length)||"/",y=Ei({path:v.relativePath,caseSensitive:v.caseSensitive,end:x},S),R=v.route;if(!y&&x&&d&&!c[c.length-1].route.index&&(y=Ei({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},S)),!y)return null;Object.assign(f,y.params),p.push({params:f,pathname:$t([m,y.pathname]),pathnameBase:vv($t([m,y.pathnameBase])),route:R}),y.pathnameBase!=="/"&&(m=$t([m,y.pathnameBase]))}return p}function Ei(r,u){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[d,c]=fv(r.path,r.caseSensitive,r.end),f=u.match(d);if(!f)return null;let m=f[0],p=m.replace(/(.)\/+$/,"$1"),j=f.slice(1);return{params:c.reduce((x,{paramName:S,isOptional:y},R)=>{if(S==="*"){let Q=j[R]||"";p=m.slice(0,m.length-Q.length).replace(/(.)\/+$/,"$1")}const X=j[R];return y&&!X?x[S]=void 0:x[S]=(X||"").replace(/%2F/g,"/"),x},{}),pathname:m,pathnameBase:p,pattern:r}}function fv(r,u=!1,d=!0){Ht(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let c=[],f="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,j,v,x,S)=>{if(c.push({paramName:j,isOptional:v!=null}),v){let y=S.charAt(x+p.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(c.push({paramName:"*"}),f+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?f+="\\/*$":r!==""&&r!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,u?void 0:"i"),c]}function mv(r){try{return r.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Ht(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),r}}function pl(r,u){if(u==="/")return r;if(!r.toLowerCase().startsWith(u.toLowerCase()))return null;let d=u.endsWith("/")?u.length-1:u.length,c=r.charAt(d);return c&&c!=="/"?null:r.slice(d)||"/"}var hv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function xv(r,u="/"){let{pathname:d,search:c="",hash:f=""}=typeof r=="string"?oa(r):r,m;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?m=zm(d.substring(1),"/"):m=zm(d,u)):m=u,{pathname:m,search:yv(c),hash:gv(f)}}function zm(r,u){let d=u.replace(/\/+$/,"").split("/");return r.split("/").forEach(f=>{f===".."?d.length>1&&d.pop():f!=="."&&d.push(f)}),d.length>1?d.join("/"):"/"}function Fu(r,u,d,c){return`Cannot include a '${r}' character in a manually specified \`to.${u}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pv(r){return r.filter((u,d)=>d===0||u.route.path&&u.route.path.length>0)}function Im(r){let u=pv(r);return u.map((d,c)=>c===u.length-1?d.pathname:d.pathnameBase)}function dc(r,u,d,c=!1){let f;typeof r=="string"?f=oa(r):(f={...r},Ye(!f.pathname||!f.pathname.includes("?"),Fu("?","pathname","search",f)),Ye(!f.pathname||!f.pathname.includes("#"),Fu("#","pathname","hash",f)),Ye(!f.search||!f.search.includes("#"),Fu("#","search","hash",f)));let m=r===""||f.pathname==="",p=m?"/":f.pathname,j;if(p==null)j=d;else{let y=u.length-1;if(!c&&p.startsWith("..")){let R=p.split("/");for(;R[0]==="..";)R.shift(),y-=1;f.pathname=R.join("/")}j=y>=0?u[y]:"/"}let v=xv(f,j),x=p&&p!=="/"&&p.endsWith("/"),S=(m||p===".")&&d.endsWith("/");return!v.pathname.endsWith("/")&&(x||S)&&(v.pathname+="/"),v}var $t=r=>r.join("/").replace(/\/\/+/g,"/"),vv=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),yv=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,gv=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,bv=class{constructor(r,u,d,c=!1){this.status=r,this.statusText=u||"",this.internal=c,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function jv(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function Sv(r){return r.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var eh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function th(r,u){let d=r;if(typeof d!="string"||!hv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let c=d,f=!1;if(eh)try{let m=new URL(window.location.href),p=d.startsWith("//")?new URL(m.protocol+d):new URL(d),j=pl(p.pathname,u);p.origin===m.origin&&j!=null?d=j+p.search+p.hash:f=!0}catch{Ht(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:f,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var lh=["POST","PUT","PATCH","DELETE"];new Set(lh);var Nv=["GET",...lh];new Set(Nv);var Fa=g.createContext(null);Fa.displayName="DataRouter";var Mi=g.createContext(null);Mi.displayName="DataRouterState";var Ev=g.createContext(!1),ah=g.createContext({isTransitioning:!1});ah.displayName="ViewTransition";var Tv=g.createContext(new Map);Tv.displayName="Fetchers";var kv=g.createContext(null);kv.displayName="Await";var Ut=g.createContext(null);Ut.displayName="Navigation";var Fn=g.createContext(null);Fn.displayName="Location";var Jt=g.createContext({outlet:null,matches:[],isDataRoute:!1});Jt.displayName="Route";var fc=g.createContext(null);fc.displayName="RouteError";var nh="REACT_ROUTER_ERROR",Mv="REDIRECT",Av="ROUTE_ERROR_RESPONSE";function wv(r){if(r.startsWith(`${nh}:${Mv}:{`))try{let u=JSON.parse(r.slice(28));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.location=="string"&&typeof u.reloadDocument=="boolean"&&typeof u.replace=="boolean")return u}catch{}}function Cv(r){if(r.startsWith(`${nh}:${Av}:{`))try{let u=JSON.parse(r.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new bv(u.status,u.statusText,u.data)}catch{}}function Rv(r,{relative:u}={}){Ye(Pn(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:c}=g.useContext(Ut),{hash:f,pathname:m,search:p}=In(r,{relative:u}),j=m;return d!=="/"&&(j=m==="/"?d:$t([d,m])),c.createHref({pathname:j,search:p,hash:f})}function Pn(){return g.useContext(Fn)!=null}function Wt(){return Ye(Pn(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Fn).location}var sh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ih(r){g.useContext(Ut).static||g.useLayoutEffect(r)}function da(){let{isDataRoute:r}=g.useContext(Jt);return r?Qv():_v()}function _v(){Ye(Pn(),"useNavigate() may be used only in the context of a <Router> component.");let r=g.useContext(Fa),{basename:u,navigator:d}=g.useContext(Ut),{matches:c}=g.useContext(Jt),{pathname:f}=Wt(),m=JSON.stringify(Im(c)),p=g.useRef(!1);return ih(()=>{p.current=!0}),g.useCallback((v,x={})=>{if(Ht(p.current,sh),!p.current)return;if(typeof v=="number"){d.go(v);return}let S=dc(v,JSON.parse(m),f,x.relative==="path");r==null&&u!=="/"&&(S.pathname=S.pathname==="/"?u:$t([u,S.pathname])),(x.replace?d.replace:d.push)(S,x.state,x)},[u,d,m,f,r])}g.createContext(null);function Ai(){let{matches:r}=g.useContext(Jt),u=r[r.length-1];return u?u.params:{}}function In(r,{relative:u}={}){let{matches:d}=g.useContext(Jt),{pathname:c}=Wt(),f=JSON.stringify(Im(d));return g.useMemo(()=>dc(r,JSON.parse(f),c,u==="path"),[r,f,c,u])}function zv(r,u){return rh(r,u)}function rh(r,u,d){var z;Ye(Pn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=g.useContext(Ut),{matches:f}=g.useContext(Jt),m=f[f.length-1],p=m?m.params:{},j=m?m.pathname:"/",v=m?m.pathnameBase:"/",x=m&&m.route;{let O=x&&x.path||"";ch(j,!x||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${j}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let S=Wt(),y;if(u){let O=typeof u=="string"?oa(u):u;Ye(v==="/"||((z=O.pathname)==null?void 0:z.startsWith(v)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${v}" but pathname "${O.pathname}" was given in the \`location\` prop.`),y=O}else y=S;let R=y.pathname||"/",X=R;if(v!=="/"){let O=v.replace(/^\//,"").split("/");X="/"+R.replace(/^\//,"").split("/").slice(O.length).join("/")}let Q=Wm(r,{pathname:X});Ht(x||Q!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Ht(Q==null||Q[Q.length-1].route.element!==void 0||Q[Q.length-1].route.Component!==void 0||Q[Q.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let Z=Hv(Q&&Q.map(O=>Object.assign({},O,{params:Object.assign({},p,O.params),pathname:$t([v,c.encodeLocation?c.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?v:$t([v,c.encodeLocation?c.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),f,d);return u&&Z?g.createElement(Fn.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},Z):Z}function Dv(){let r=Xv(),u=jv(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),d=r instanceof Error?r.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},m={padding:"2px 4px",backgroundColor:c},p=null;return console.error("Error handled by React Router default ErrorBoundary:",r),p=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:m},"ErrorBoundary")," or"," ",g.createElement("code",{style:m},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},u),d?g.createElement("pre",{style:f},d):null,p)}var Ov=g.createElement(Dv,null),uh=class extends g.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,u){return u.location!==r.location||u.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:u.error,location:u.location,revalidation:r.revalidation||u.revalidation}}componentDidCatch(r,u){this.props.onError?this.props.onError(r,u):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const d=Cv(r.digest);d&&(r=d)}let u=r!==void 0?g.createElement(Jt.Provider,{value:this.props.routeContext},g.createElement(fc.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?g.createElement(Lv,{error:r},u):u}};uh.contextType=Ev;var Pu=new WeakMap;function Lv({children:r,error:u}){let{basename:d}=g.useContext(Ut);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let c=wv(u.digest);if(c){let f=Pu.get(u);if(f)throw f;let m=th(c.location,d);if(eh&&!Pu.get(u))if(m.isExternal||c.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:c.replace}));throw Pu.set(u,p),p}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return r}function Bv({routeContext:r,match:u,children:d}){let c=g.useContext(Fa);return c&&c.static&&c.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=u.route.id),g.createElement(Jt.Provider,{value:r},d)}function Hv(r,u=[],d){let c=d==null?void 0:d.state;if(r==null){if(!c)return null;if(c.errors)r=c.matches;else if(u.length===0&&!c.initialized&&c.matches.length>0)r=c.matches;else return null}let f=r,m=c==null?void 0:c.errors;if(m!=null){let S=f.findIndex(y=>y.route.id&&(m==null?void 0:m[y.route.id])!==void 0);Ye(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let p=!1,j=-1;if(d&&c){p=c.renderFallback;for(let S=0;S<f.length;S++){let y=f[S];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(j=S),y.route.id){let{loaderData:R,errors:X}=c,Q=y.route.loader&&!R.hasOwnProperty(y.route.id)&&(!X||X[y.route.id]===void 0);if(y.route.lazy||Q){d.isStatic&&(p=!0),j>=0?f=f.slice(0,j+1):f=[f[0]];break}}}}let v=d==null?void 0:d.onError,x=c&&v?(S,y)=>{var R,X;v(S,{location:c.location,params:((X=(R=c.matches)==null?void 0:R[0])==null?void 0:X.params)??{},unstable_pattern:Sv(c.matches),errorInfo:y})}:void 0;return f.reduceRight((S,y,R)=>{let X,Q=!1,Z=null,z=null;c&&(X=m&&y.route.id?m[y.route.id]:void 0,Z=y.route.errorElement||Ov,p&&(j<0&&R===0?(ch("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),Q=!0,z=null):j===R&&(Q=!0,z=y.route.hydrateFallbackElement||null)));let O=u.concat(f.slice(0,R+1)),Y=()=>{let J;return X?J=Z:Q?J=z:y.route.Component?J=g.createElement(y.route.Component,null):y.route.element?J=y.route.element:J=S,g.createElement(Bv,{match:y,routeContext:{outlet:S,matches:O,isDataRoute:c!=null},children:J})};return c&&(y.route.ErrorBoundary||y.route.errorElement||R===0)?g.createElement(uh,{location:c.location,revalidation:c.revalidation,component:Z,error:X,children:Y(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:x}):Y()},null)}function mc(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Uv(r){let u=g.useContext(Fa);return Ye(u,mc(r)),u}function qv(r){let u=g.useContext(Mi);return Ye(u,mc(r)),u}function Yv(r){let u=g.useContext(Jt);return Ye(u,mc(r)),u}function hc(r){let u=Yv(r),d=u.matches[u.matches.length-1];return Ye(d.route.id,`${r} can only be used on routes that contain a unique "id"`),d.route.id}function Gv(){return hc("useRouteId")}function Xv(){var c;let r=g.useContext(fc),u=qv("useRouteError"),d=hc("useRouteError");return r!==void 0?r:(c=u.errors)==null?void 0:c[d]}function Qv(){let{router:r}=Uv("useNavigate"),u=hc("useNavigate"),d=g.useRef(!1);return ih(()=>{d.current=!0}),g.useCallback(async(f,m={})=>{Ht(d.current,sh),d.current&&(typeof f=="number"?await r.navigate(f):await r.navigate(f,{fromRouteId:u,...m}))},[r,u])}var Dm={};function ch(r,u,d){!u&&!Dm[r]&&(Dm[r]=!0,Ht(!1,d))}g.memo(Zv);function Zv({routes:r,future:u,state:d,isStatic:c,onError:f}){return rh(r,void 0,{state:d,isStatic:c,onError:f})}function ca(r){Ye(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Vv({basename:r="/",children:u=null,location:d,navigationType:c="POP",navigator:f,static:m=!1,unstable_useTransitions:p}){Ye(!Pn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let j=r.replace(/^\/*/,"/"),v=g.useMemo(()=>({basename:j,navigator:f,static:m,unstable_useTransitions:p,future:{}}),[j,f,m,p]);typeof d=="string"&&(d=oa(d));let{pathname:x="/",search:S="",hash:y="",state:R=null,key:X="default",unstable_mask:Q}=d,Z=g.useMemo(()=>{let z=pl(x,j);return z==null?null:{location:{pathname:z,search:S,hash:y,state:R,key:X,unstable_mask:Q},navigationType:c}},[j,x,S,y,R,X,c,Q]);return Ht(Z!=null,`<Router basename="${j}"> is not able to match the URL "${x}${S}${y}" because it does not start with the basename, so the <Router> won't render anything.`),Z==null?null:g.createElement(Ut.Provider,{value:v},g.createElement(Fn.Provider,{children:u,value:Z}))}function Kv({children:r,location:u}){return zv(ic(r),u)}function ic(r,u=[]){let d=[];return g.Children.forEach(r,(c,f)=>{if(!g.isValidElement(c))return;let m=[...u,f];if(c.type===g.Fragment){d.push.apply(d,ic(c.props.children,m));return}Ye(c.type===ca,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ye(!c.props.index||!c.props.children,"An index route cannot have child routes.");let p={id:c.props.id||m.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(p.children=ic(c.props.children,m)),d.push(p)}),d}var ji="get",Si="application/x-www-form-urlencoded";function wi(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function $v(r){return wi(r)&&r.tagName.toLowerCase()==="button"}function Jv(r){return wi(r)&&r.tagName.toLowerCase()==="form"}function Wv(r){return wi(r)&&r.tagName.toLowerCase()==="input"}function Fv(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Pv(r,u){return r.button===0&&(!u||u==="_self")&&!Fv(r)}function rc(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((u,d)=>{let c=r[d];return u.concat(Array.isArray(c)?c.map(f=>[d,f]):[[d,c]])},[]))}function Iv(r,u){let d=rc(r);return u&&u.forEach((c,f)=>{d.has(f)||u.getAll(f).forEach(m=>{d.append(f,m)})}),d}var yi=null;function ey(){if(yi===null)try{new FormData(document.createElement("form"),0),yi=!1}catch{yi=!0}return yi}var ty=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Iu(r){return r!=null&&!ty.has(r)?(Ht(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Si}"`),null):r}function ly(r,u){let d,c,f,m,p;if(Jv(r)){let j=r.getAttribute("action");c=j?pl(j,u):null,d=r.getAttribute("method")||ji,f=Iu(r.getAttribute("enctype"))||Si,m=new FormData(r)}else if($v(r)||Wv(r)&&(r.type==="submit"||r.type==="image")){let j=r.form;if(j==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=r.getAttribute("formaction")||j.getAttribute("action");if(c=v?pl(v,u):null,d=r.getAttribute("formmethod")||j.getAttribute("method")||ji,f=Iu(r.getAttribute("formenctype"))||Iu(j.getAttribute("enctype"))||Si,m=new FormData(j,r),!ey()){let{name:x,type:S,value:y}=r;if(S==="image"){let R=x?`${x}.`:"";m.append(`${R}x`,"0"),m.append(`${R}y`,"0")}else x&&m.append(x,y)}}else{if(wi(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=ji,c=null,f=Si,p=r}return m&&f==="text/plain"&&(p=m,m=void 0),{action:c,method:d.toLowerCase(),encType:f,formData:m,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function xc(r,u){if(r===!1||r===null||typeof r>"u")throw new Error(u)}function ay(r,u,d,c){let f=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return d?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${c}`:f.pathname=`${f.pathname}.${c}`:f.pathname==="/"?f.pathname=`_root.${c}`:u&&pl(f.pathname,u)==="/"?f.pathname=`${u.replace(/\/$/,"")}/_root.${c}`:f.pathname=`${f.pathname.replace(/\/$/,"")}.${c}`,f}async function ny(r,u){if(r.id in u)return u[r.id];try{let d=await import(r.module);return u[r.id]=d,d}catch(d){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function sy(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function iy(r,u,d){let c=await Promise.all(r.map(async f=>{let m=u.routes[f.route.id];if(m){let p=await ny(m,d);return p.links?p.links():[]}return[]}));return oy(c.flat(1).filter(sy).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Om(r,u,d,c,f,m){let p=(v,x)=>d[x]?v.route.id!==d[x].route.id:!0,j=(v,x)=>{var S;return d[x].pathname!==v.pathname||((S=d[x].route.path)==null?void 0:S.endsWith("*"))&&d[x].params["*"]!==v.params["*"]};return m==="assets"?u.filter((v,x)=>p(v,x)||j(v,x)):m==="data"?u.filter((v,x)=>{var y;let S=c.routes[v.route.id];if(!S||!S.hasLoader)return!1;if(p(v,x)||j(v,x))return!0;if(v.route.shouldRevalidate){let R=v.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((y=d[0])==null?void 0:y.params)||{},nextUrl:new URL(r,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof R=="boolean")return R}return!0}):[]}function ry(r,u,{includeHydrateFallback:d}={}){return uy(r.map(c=>{let f=u.routes[c.route.id];if(!f)return[];let m=[f.module];return f.clientActionModule&&(m=m.concat(f.clientActionModule)),f.clientLoaderModule&&(m=m.concat(f.clientLoaderModule)),d&&f.hydrateFallbackModule&&(m=m.concat(f.hydrateFallbackModule)),f.imports&&(m=m.concat(f.imports)),m}).flat(1))}function uy(r){return[...new Set(r)]}function cy(r){let u={},d=Object.keys(r).sort();for(let c of d)u[c]=r[c];return u}function oy(r,u){let d=new Set;return new Set(u),r.reduce((c,f)=>{let m=JSON.stringify(cy(f));return d.has(m)||(d.add(m),c.push({key:m,link:f})),c},[])}function oh(){let r=g.useContext(Fa);return xc(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function dy(){let r=g.useContext(Mi);return xc(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var pc=g.createContext(void 0);pc.displayName="FrameworkContext";function dh(){let r=g.useContext(pc);return xc(r,"You must render this element inside a <HydratedRouter> element"),r}function fy(r,u){let d=g.useContext(pc),[c,f]=g.useState(!1),[m,p]=g.useState(!1),{onFocus:j,onBlur:v,onMouseEnter:x,onMouseLeave:S,onTouchStart:y}=u,R=g.useRef(null);g.useEffect(()=>{if(r==="render"&&p(!0),r==="viewport"){let Z=O=>{O.forEach(Y=>{p(Y.isIntersecting)})},z=new IntersectionObserver(Z,{threshold:.5});return R.current&&z.observe(R.current),()=>{z.disconnect()}}},[r]),g.useEffect(()=>{if(c){let Z=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(Z)}}},[c]);let X=()=>{f(!0)},Q=()=>{f(!1),p(!1)};return d?r!=="intent"?[m,R,{}]:[m,R,{onFocus:Kn(j,X),onBlur:Kn(v,Q),onMouseEnter:Kn(x,X),onMouseLeave:Kn(S,Q),onTouchStart:Kn(y,X)}]:[!1,R,{}]}function Kn(r,u){return d=>{r&&r(d),d.defaultPrevented||u(d)}}function my({page:r,...u}){let{router:d}=oh(),c=g.useMemo(()=>Wm(d.routes,r,d.basename),[d.routes,r,d.basename]);return c?g.createElement(xy,{page:r,matches:c,...u}):null}function hy(r){let{manifest:u,routeModules:d}=dh(),[c,f]=g.useState([]);return g.useEffect(()=>{let m=!1;return iy(r,u,d).then(p=>{m||f(p)}),()=>{m=!0}},[r,u,d]),c}function xy({page:r,matches:u,...d}){let c=Wt(),{future:f,manifest:m,routeModules:p}=dh(),{basename:j}=oh(),{loaderData:v,matches:x}=dy(),S=g.useMemo(()=>Om(r,u,x,m,c,"data"),[r,u,x,m,c]),y=g.useMemo(()=>Om(r,u,x,m,c,"assets"),[r,u,x,m,c]),R=g.useMemo(()=>{if(r===c.pathname+c.search+c.hash)return[];let Z=new Set,z=!1;if(u.forEach(Y=>{var V;let J=m.routes[Y.route.id];!J||!J.hasLoader||(!S.some($=>$.route.id===Y.route.id)&&Y.route.id in v&&((V=p[Y.route.id])!=null&&V.shouldRevalidate)||J.hasClientLoader?z=!0:Z.add(Y.route.id))}),Z.size===0)return[];let O=ay(r,j,f.unstable_trailingSlashAwareDataRequests,"data");return z&&Z.size>0&&O.searchParams.set("_routes",u.filter(Y=>Z.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[O.pathname+O.search]},[j,f.unstable_trailingSlashAwareDataRequests,v,c,m,S,u,r,p]),X=g.useMemo(()=>ry(y,m),[y,m]),Q=hy(y);return g.createElement(g.Fragment,null,R.map(Z=>g.createElement("link",{key:Z,rel:"prefetch",as:"fetch",href:Z,...d})),X.map(Z=>g.createElement("link",{key:Z,rel:"modulepreload",href:Z,...d})),Q.map(({key:Z,link:z})=>g.createElement("link",{key:Z,nonce:d.nonce,...z,crossOrigin:z.crossOrigin??d.crossOrigin})))}function py(...r){return u=>{r.forEach(d=>{typeof d=="function"?d(u):d!=null&&(d.current=u)})}}var vy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vy&&(window.__reactRouterVersion="7.13.1")}catch{}function yy({basename:r,children:u,unstable_useTransitions:d,window:c}){let f=g.useRef();f.current==null&&(f.current=Fp({window:c,v5Compat:!0}));let m=f.current,[p,j]=g.useState({action:m.action,location:m.location}),v=g.useCallback(x=>{d===!1?j(x):g.startTransition(()=>j(x))},[d]);return g.useLayoutEffect(()=>m.listen(v),[m,v]),g.createElement(Vv,{basename:r,children:u,location:p.location,navigationType:p.action,navigator:m,unstable_useTransitions:d})}var fh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xt=g.forwardRef(function({onClick:u,discover:d="render",prefetch:c="none",relative:f,reloadDocument:m,replace:p,unstable_mask:j,state:v,target:x,to:S,preventScrollReset:y,viewTransition:R,unstable_defaultShouldRevalidate:X,...Q},Z){let{basename:z,navigator:O,unstable_useTransitions:Y}=g.useContext(Ut),J=typeof S=="string"&&fh.test(S),V=th(S,z);S=V.to;let $=Rv(S,{relative:f}),U=Wt(),P=null;if(j){let ke=dc(j,[],U.unstable_mask?U.unstable_mask.pathname:"/",!0);z!=="/"&&(ke.pathname=ke.pathname==="/"?z:$t([z,ke.pathname])),P=O.createHref(ke)}let[ue,ye,we]=fy(c,Q),le=Sy(S,{replace:p,unstable_mask:j,state:v,target:x,preventScrollReset:y,relative:f,viewTransition:R,unstable_defaultShouldRevalidate:X,unstable_useTransitions:Y});function je(ke){u&&u(ke),ke.defaultPrevented||le(ke)}let _e=!(V.isExternal||m),Ue=g.createElement("a",{...Q,...we,href:(_e?P:void 0)||V.absoluteURL||$,onClick:_e?je:u,ref:py(Z,ye),target:x,"data-discover":!J&&d==="render"?"true":void 0});return ue&&!J?g.createElement(g.Fragment,null,Ue,g.createElement(my,{page:$})):Ue});Xt.displayName="Link";var gy=g.forwardRef(function({"aria-current":u="page",caseSensitive:d=!1,className:c="",end:f=!1,style:m,to:p,viewTransition:j,children:v,...x},S){let y=In(p,{relative:x.relative}),R=Wt(),X=g.useContext(Mi),{navigator:Q,basename:Z}=g.useContext(Ut),z=X!=null&&My(y)&&j===!0,O=Q.encodeLocation?Q.encodeLocation(y).pathname:y.pathname,Y=R.pathname,J=X&&X.navigation&&X.navigation.location?X.navigation.location.pathname:null;d||(Y=Y.toLowerCase(),J=J?J.toLowerCase():null,O=O.toLowerCase()),J&&Z&&(J=pl(J,Z)||J);const V=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let $=Y===O||!f&&Y.startsWith(O)&&Y.charAt(V)==="/",U=J!=null&&(J===O||!f&&J.startsWith(O)&&J.charAt(O.length)==="/"),P={isActive:$,isPending:U,isTransitioning:z},ue=$?u:void 0,ye;typeof c=="function"?ye=c(P):ye=[c,$?"active":null,U?"pending":null,z?"transitioning":null].filter(Boolean).join(" ");let we=typeof m=="function"?m(P):m;return g.createElement(Xt,{...x,"aria-current":ue,className:ye,ref:S,style:we,to:p,viewTransition:j},typeof v=="function"?v(P):v)});gy.displayName="NavLink";var by=g.forwardRef(({discover:r="render",fetcherKey:u,navigate:d,reloadDocument:c,replace:f,state:m,method:p=ji,action:j,onSubmit:v,relative:x,preventScrollReset:S,viewTransition:y,unstable_defaultShouldRevalidate:R,...X},Q)=>{let{unstable_useTransitions:Z}=g.useContext(Ut),z=Ty(),O=ky(j,{relative:x}),Y=p.toLowerCase()==="get"?"get":"post",J=typeof j=="string"&&fh.test(j),V=$=>{if(v&&v($),$.defaultPrevented)return;$.preventDefault();let U=$.nativeEvent.submitter,P=(U==null?void 0:U.getAttribute("formmethod"))||p,ue=()=>z(U||$.currentTarget,{fetcherKey:u,method:P,navigate:d,replace:f,state:m,relative:x,preventScrollReset:S,viewTransition:y,unstable_defaultShouldRevalidate:R});Z&&d!==!1?g.startTransition(()=>ue()):ue()};return g.createElement("form",{ref:Q,method:Y,action:O,onSubmit:c?v:V,...X,"data-discover":!J&&r==="render"?"true":void 0})});by.displayName="Form";function jy(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function mh(r){let u=g.useContext(Fa);return Ye(u,jy(r)),u}function Sy(r,{target:u,replace:d,unstable_mask:c,state:f,preventScrollReset:m,relative:p,viewTransition:j,unstable_defaultShouldRevalidate:v,unstable_useTransitions:x}={}){let S=da(),y=Wt(),R=In(r,{relative:p});return g.useCallback(X=>{if(Pv(X,u)){X.preventDefault();let Q=d!==void 0?d:Jn(y)===Jn(R),Z=()=>S(r,{replace:Q,unstable_mask:c,state:f,preventScrollReset:m,relative:p,viewTransition:j,unstable_defaultShouldRevalidate:v});x?g.startTransition(()=>Z()):Z()}},[y,S,R,d,c,f,u,r,m,p,j,v,x])}function vc(r){Ht(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let u=g.useRef(rc(r)),d=g.useRef(!1),c=Wt(),f=g.useMemo(()=>Iv(c.search,d.current?null:u.current),[c.search]),m=da(),p=g.useCallback((j,v)=>{const x=rc(typeof j=="function"?j(new URLSearchParams(f)):j);d.current=!0,m("?"+x,v)},[m,f]);return[f,p]}var Ny=0,Ey=()=>`__${String(++Ny)}__`;function Ty(){let{router:r}=mh("useSubmit"),{basename:u}=g.useContext(Ut),d=Gv(),c=r.fetch,f=r.navigate;return g.useCallback(async(m,p={})=>{let{action:j,method:v,encType:x,formData:S,body:y}=ly(m,u);if(p.navigate===!1){let R=p.fetcherKey||Ey();await c(R,d,p.action||j,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:S,body:y,formMethod:p.method||v,formEncType:p.encType||x,flushSync:p.flushSync})}else await f(p.action||j,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:S,body:y,formMethod:p.method||v,formEncType:p.encType||x,replace:p.replace,state:p.state,fromRouteId:d,flushSync:p.flushSync,viewTransition:p.viewTransition})},[c,f,u,d])}function ky(r,{relative:u}={}){let{basename:d}=g.useContext(Ut),c=g.useContext(Jt);Ye(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),m={...In(r||".",{relative:u})},p=Wt();if(r==null){m.search=p.search;let j=new URLSearchParams(m.search),v=j.getAll("index");if(v.some(S=>S==="")){j.delete("index"),v.filter(y=>y).forEach(y=>j.append("index",y));let S=j.toString();m.search=S?`?${S}`:""}}return(!r||r===".")&&f.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(m.pathname=m.pathname==="/"?d:$t([d,m.pathname])),Jn(m)}function My(r,{relative:u}={}){let d=g.useContext(ah);Ye(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=mh("useViewTransitionState"),f=In(r,{relative:u});if(!d.isTransitioning)return!1;let m=pl(d.currentLocation.pathname,c)||d.currentLocation.pathname,p=pl(d.nextLocation.pathname,c)||d.nextLocation.pathname;return Ei(f.pathname,p)!=null||Ei(f.pathname,m)!=null}const Ay="";async function it(r,u){const d=await fetch(`${Ay}${r}`,u);if(!d.ok){const c=await d.json().catch(()=>({error:d.statusText}));throw new Error(c.error||`HTTP ${d.status}`)}return d.json()}const Ae={getConfig(){return it("/api/config")},setConfig(r,u){return it("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:u})})},getSkills(){return it("/api/skills")},getSkillDetail(r,u){return it(`/api/skills/${r}/${u}`)},getEvals(r,u){return it(`/api/skills/${r}/${u}/evals`)},saveEvals(r,u,d){return it(`/api/skills/${r}/${u}/evals`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)})},generateEvals(r,u){return it(`/api/skills/${r}/${u}/generate-evals`,{method:"POST"})},getLatestBenchmark(r,u){return it(`/api/skills/${r}/${u}/benchmark/latest`)},getHistory(r,u,d){const c=new URLSearchParams;d!=null&&d.model&&c.set("model",d.model),d!=null&&d.type&&c.set("type",d.type),d!=null&&d.from&&c.set("from",d.from),d!=null&&d.to&&c.set("to",d.to);const f=c.toString();return it(`/api/skills/${r}/${u}/history${f?"?"+f:""}`)},getHistoryEntry(r,u,d){return it(`/api/skills/${r}/${u}/history/${encodeURIComponent(d)}`)},compareRuns(r,u,d,c){return it(`/api/skills/${r}/${u}/history-compare?a=${encodeURIComponent(d)}&b=${encodeURIComponent(c)}`)},getCaseHistory(r,u,d,c){const f=new URLSearchParams;c&&f.set("model",c);const m=f.toString();return it(`/api/skills/${r}/${u}/history/case/${d}${m?"?"+m:""}`)},deleteHistoryEntry(r,u,d){return it(`/api/skills/${r}/${u}/history/${encodeURIComponent(d)}`,{method:"DELETE"})},improveSkill(r,u,d){return it(`/api/skills/${r}/${u}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)})},applyImprovement(r,u,d){return it(`/api/skills/${r}/${u}/apply-improvement`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:d})})},getStats(r,u){return it(`/api/skills/${r}/${u}/stats`)},getDependencies(r,u){return it(`/api/skills/${r}/${u}/dependencies`)}},Lm={pass:{bg:"var(--green-muted)",text:"var(--green)",dot:"var(--green)",label:"Passing"},fail:{bg:"var(--red-muted)",text:"var(--red)",dot:"var(--red)",label:"Failing"},pending:{bg:"var(--yellow-muted)",text:"var(--yellow)",dot:"var(--yellow)",label:"Pending"},missing:{bg:"var(--surface-3)",text:"var(--text-tertiary)",dot:"var(--text-tertiary)",label:"No evals"}};function ec(){return n.jsx("div",{className:"glass-card p-5",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:"skeleton h-5 w-36 mb-2"}),n.jsx("div",{className:"skeleton h-3.5 w-48"})]}),n.jsx("div",{className:"skeleton h-6 w-20 rounded-full"})]})})}function wy(){const[r,u]=g.useState([]),[d,c]=g.useState(!0),[f,m]=g.useState(null);g.useEffect(()=>{Ae.getSkills().then(u).catch(j=>m(j.message)).finally(()=>c(!1))},[]);const p=r.reduce((j,v)=>{var x;return(j[x=v.plugin]||(j[x]=[])).push(v),j},{});return n.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[n.jsxs("div",{className:"mb-8",children:[n.jsx("h2",{className:"text-[22px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Skills"}),n.jsx("p",{className:"text-[13px] mt-1",style:{color:"var(--text-tertiary)"},children:d?"Scanning plugins...":`${r.length} skill${r.length!==1?"s":""} across ${Object.keys(p).length} plugin${Object.keys(p).length!==1?"s":""}`})]}),f&&n.jsx("div",{className:"mb-6 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:f}),d&&n.jsxs("div",{className:"space-y-3",children:[n.jsx(ec,{}),n.jsx(ec,{}),n.jsx(ec,{})]}),!d&&n.jsx("div",{className:"space-y-8 stagger-children",children:Object.entries(p).map(([j,v])=>n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[n.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),n.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:j}),n.jsx("div",{className:"flex-1 h-px",style:{background:"var(--border-subtle)"}})]}),n.jsx("div",{className:"grid gap-2",children:v.map(x=>{const S=Lm[x.benchmarkStatus]||Lm.missing;return n.jsxs(Xt,{to:`/skills/${x.plugin}/${x.skill}`,className:"glass-card glass-card-interactive p-5 flex items-center justify-between group",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"flex items-center gap-2",children:n.jsx("span",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:x.skill})}),n.jsxs("div",{className:"flex items-center gap-3 mt-1.5",children:[n.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:[x.evalCount," eval",x.evalCount!==1?"s":""]}),n.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:[x.assertionCount," assertion",x.assertionCount!==1?"s":""]}),x.lastBenchmark&&n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:new Date(x.lastBenchmark).toLocaleDateString()})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{className:"pill",style:{background:S.bg,color:S.text},children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:S.dot}}),S.label]}),n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-0 group-hover:opacity-100 transition-opacity duration-150",style:{transform:"translateX(0)",transition:"transform 0.15s ease"},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})})]})]},`${x.plugin}/${x.skill}`)})})]},j))}),!d&&r.length===0&&!f&&n.jsxs("div",{className:"text-center py-16 animate-fade-in-scale",children:[n.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:"var(--surface-2)"},children:n.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"})})}),n.jsx("p",{className:"text-[14px] font-medium",style:{color:"var(--text-secondary)"},children:"No skills found"}),n.jsxs("p",{className:"text-[12px] mt-1",style:{color:"var(--text-tertiary)"},children:["Check your ",n.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-2)"},children:"--root"})," directory"]})]})]})}function es(){const[r,u]=g.useState([]),[d,c]=g.useState(!1),[f,m]=g.useState(!1),[p,j]=g.useState(null),v=g.useRef(null),x=g.useCallback(async(y,R)=>{u([]),c(!0),m(!1),j(null);const X=new AbortController;v.current=X;try{const Q=await fetch(y,{method:"POST",headers:{"Content-Type":"application/json"},body:R?JSON.stringify(R):void 0,signal:X.signal});if(!Q.ok||!Q.body)throw new Error(`HTTP ${Q.status}`);const Z=Q.body.getReader(),z=new TextDecoder;let O="",Y="";for(;;){const{done:J,value:V}=await Z.read();if(J)break;O+=z.decode(V,{stream:!0});const $=O.split(`
61
+ `);O=$.pop()||"";for(const U of $)if(U.startsWith("event: "))Y=U.slice(7).trim();else if(U.startsWith("data: ")){try{const P=JSON.parse(U.slice(6)),ue={event:Y,data:P};Y==="done"?(m(!0),u(ye=>[...ye,ue])):u(ye=>[...ye,ue])}catch{}Y=""}}}catch(Q){Q.name!=="AbortError"&&j(Q.message)}finally{c(!1),v.current=null}},[]),S=g.useCallback(()=>{var y;(y=v.current)==null||y.abort()},[]);return{events:r,running:d,done:f,error:p,start:x,stop:S}}function Cy(r){const u=r.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);if(!u)return{metadata:{},body:r};const d=u[1],c=u[2].trim(),f={},m=d.split(`
62
+ `);let p="";for(const j of m){const v=j.match(/^\s+-\s+(.+)$/);if(v&&p){const S=f[p];Array.isArray(S)?S.push(v[1].trim().replace(/^["']|["']$/g,"")):f[p]=[v[1].trim().replace(/^["']|["']$/g,"")];continue}const x=j.match(/^([\w-]+):\s*(.*)$/);if(x){p=x[1];const S=x[2].trim();if(!S){f[p]=[];continue}const y=S.match(/^\[(.+)\]$/);if(y){f[p]=y[1].split(",").map(R=>R.trim().replace(/^["']|["']$/g,"")).filter(Boolean);continue}f[p]=S.replace(/^["']|["']$/g,"")}}return{metadata:f,body:c}}function Ry({content:r,defaultExpanded:u=!0}){const[d,c]=g.useState(u),{metadata:f,body:m}=Cy(r);if(!r.trim())return null;const p=Object.keys(f).length>0,j=f["allowed-tools"],v=Array.isArray(j)?j:j?[j]:[],x=Object.entries(f).filter(([S])=>S!=="allowed-tools");return n.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsxs("button",{onClick:()=>c(!d),className:"w-full flex items-center justify-between px-5 py-3.5 text-left transition-colors duration-150",style:{background:"var(--surface-2)"},onMouseEnter:S=>{S.currentTarget.style.background="var(--surface-3)"},onMouseLeave:S=>{S.currentTarget.style.background="var(--surface-2)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"var(--accent-muted)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),n.jsx("polyline",{points:"14 2 14 8 20 8"}),n.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),n.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"SKILL.md"}),n.jsx("span",{className:"text-[11px] ml-2",style:{color:"var(--text-tertiary)"},children:"Skill Definition"})]})]}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",style:{transform:d?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),d&&n.jsxs("div",{className:"px-5 py-4 animate-fade-in",children:[p&&n.jsx("div",{className:"grid grid-cols-2 gap-3 mb-4",children:x.map(([S,y])=>n.jsxs("div",{className:"px-3 py-2.5 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--text-tertiary)"},children:S}),n.jsx("div",{className:"text-[12px]",style:{color:"var(--text-primary)"},children:Array.isArray(y)?y.join(", "):y})]},S))}),v.length>0&&n.jsxs("div",{className:"mb-4",children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-2",style:{color:"var(--text-tertiary)"},children:"Allowed Tools"}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:v.map(S=>n.jsx("span",{className:"px-2 py-1 rounded-md text-[11px] font-mono",style:{background:"var(--accent-muted)",color:"var(--accent)"},children:S},S))})]}),m&&n.jsx("pre",{className:"text-[12px] leading-relaxed p-4 rounded-lg overflow-x-auto",style:{background:"var(--surface-0)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",maxHeight:"400px",overflowY:"auto",fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:m})]})]})}function _y(r,u){const d=r.split(`
63
+ `),c=u.split(`
64
+ `);if(d.length>1e3||c.length>1e3)return[...d.map(S=>({type:"unchanged",content:S}))];const f=d.length,m=c.length,p=Array.from({length:f+1},()=>new Array(m+1).fill(0));for(let S=1;S<=f;S++)for(let y=1;y<=m;y++)d[S-1]===c[y-1]?p[S][y]=p[S-1][y-1]+1:p[S][y]=Math.max(p[S-1][y],p[S][y-1]);const j=[];let v=f,x=m;for(;v>0||x>0;)v>0&&x>0&&d[v-1]===c[x-1]?(j.push({type:"unchanged",content:d[v-1]}),v--,x--):x>0&&(v===0||p[v][x-1]>=p[v-1][x])?(j.push({type:"added",content:c[x-1]}),x--):(j.push({type:"removed",content:d[v-1]}),v--);return j.reverse()}function zy({plugin:r,skill:u,skillContent:d,onApplied:c}){const[f,m]=g.useState("closed"),[p,j]=g.useState(null),[v,x]=g.useState("claude-cli"),[S,y]=g.useState("opus"),[R,X]=g.useState([]),[Q,Z]=g.useState(""),[z,O]=g.useState(""),[Y,J]=g.useState(null),[V,$]=g.useState(!1);g.useEffect(()=>{Ae.getConfig().then(le=>{j(le),le.providers.find(_e=>_e.id==="claude-cli"&&_e.available)&&(x("claude-cli"),y("opus"))}).catch(()=>{})},[]);function U(){return p==null?void 0:p.providers.find(le=>le.id===v&&le.available)}async function P(){m("loading"),J(null);try{const le=await Ae.improveSkill(r,u,{provider:v,model:S});Z(le.improved),O(le.reasoning),X(_y(le.original,le.improved)),m("diff_shown")}catch(le){J(le.message),m("open")}}async function ue(){$(!0);try{await Ae.applyImprovement(r,u,Q),c(Q),m("closed")}catch(le){J(le.message)}finally{$(!1)}}function ye(){m("closed"),X([]),Z(""),O(""),J(null)}if(f==="closed")return n.jsxs("button",{onClick:()=>m("open"),className:"btn btn-secondary mb-5",disabled:!d,children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]}),"Improve Skill"]});const we=U();return n.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden animate-fade-in",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5",style:{background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]})}),n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"AI Skill Improvement"})]}),n.jsx("button",{onClick:ye,className:"w-7 h-7 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:le=>{le.currentTarget.style.background="var(--surface-3)"},onMouseLeave:le=>{le.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsxs("div",{className:"px-5 py-4",children:[(f==="open"||f==="loading")&&n.jsxs("div",{className:"flex items-end gap-3 mb-4",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Provider"}),n.jsx("select",{className:"input-field text-[12px] py-1.5",value:v,onChange:le=>{x(le.target.value);const je=p==null?void 0:p.providers.find(_e=>_e.id===le.target.value);je!=null&&je.models[0]&&y(je.models[0].id)},disabled:f==="loading",children:p==null?void 0:p.providers.filter(le=>le.available).map(le=>n.jsx("option",{value:le.id,children:le.label},le.id))})]}),n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Model"}),n.jsx("select",{className:"input-field text-[12px] py-1.5",value:S,onChange:le=>y(le.target.value),disabled:f==="loading",children:we==null?void 0:we.models.map(le=>n.jsx("option",{value:le.id,children:le.label},le.id))})]}),n.jsx("button",{onClick:P,disabled:f==="loading",className:"btn btn-primary flex-shrink-0",children:f==="loading"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}})," Improving..."]}):"Improve"})]}),Y&&n.jsx("div",{className:"mb-4 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:Y}),f==="diff_shown"&&n.jsxs(n.Fragment,{children:[z&&n.jsxs("div",{className:"mb-4 px-4 py-3 rounded-lg text-[12px]",style:{background:"rgba(168,85,247,0.08)",color:"var(--text-secondary)",border:"1px solid rgba(168,85,247,0.2)"},children:[n.jsx("span",{className:"font-semibold",style:{color:"#a855f7"},children:"AI Reasoning: "}),z]}),n.jsx("div",{className:"rounded-lg overflow-hidden mb-4",style:{border:"1px solid var(--border-subtle)",maxHeight:"400px",overflowY:"auto"},children:R.map((le,je)=>n.jsxs("div",{className:"px-3 py-0.5 text-[11px] font-mono",style:{background:le.type==="added"?"rgba(34,197,94,0.1)":le.type==="removed"?"rgba(239,68,68,0.1)":"transparent",color:le.type==="added"?"var(--green)":le.type==="removed"?"var(--red)":"var(--text-secondary)",borderLeft:le.type==="added"?"3px solid var(--green)":le.type==="removed"?"3px solid var(--red)":"3px solid transparent"},children:[n.jsx("span",{style:{userSelect:"none",opacity:.5,marginRight:8},children:le.type==="added"?"+":le.type==="removed"?"-":" "}),le.content]},je))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:ue,disabled:V,className:"btn btn-primary",children:V?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}})," Applying..."]}):n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})})," Apply"]})}),n.jsx("button",{onClick:ye,className:"btn btn-secondary",children:"Discard"})]})]})]})]})}function Dy({plugin:r,skill:u}){const[d,c]=g.useState([]),[f,m]=g.useState([]),[p,j]=g.useState(!0),[v,x]=g.useState(null);g.useEffect(()=>{Ae.getDependencies(r,u).then(y=>{c(y.mcpDependencies),m(y.skillDependencies)}).catch(()=>{}).finally(()=>j(!1))},[r,u]);async function S(y,R){try{await navigator.clipboard.writeText(R),x(y),setTimeout(()=>x(null),2e3)}catch{}}return p?null:d.length===0&&f.length===0?n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[12px]",style:{background:"var(--surface-2)",color:"var(--text-tertiary)",border:"1px solid var(--border-subtle)"},children:"No dependencies detected"}):n.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5 px-5 py-3.5",style:{background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(234,179,8,0.15)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#eab308",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),n.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Dependencies"}),n.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:d.length+f.length})]}),n.jsxs("div",{className:"px-5 py-4",children:[d.length>0&&n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"MCP Servers"}),d.map(y=>n.jsxs("div",{className:"p-3 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:y.server}),n.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:y.transport})]}),n.jsx("button",{onClick:()=>S(y.server,y.configSnippet),className:"btn btn-ghost text-[11px] py-1 px-2",style:{color:v===y.server?"var(--green)":"var(--accent)"},children:v===y.server?n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})})," Copied!"]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),n.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})," Copy Config"]})})]}),n.jsx("div",{className:"text-[11px] mb-2 font-mono",style:{color:"var(--text-tertiary)"},children:y.url}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:y.matchedTools.map(R=>n.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--surface-3)",color:"var(--text-secondary)"},children:R},R))})]},y.server))]}),f.length>0&&n.jsxs("div",{children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-2",style:{color:"var(--text-tertiary)"},children:"Skill Dependencies"}),n.jsx("div",{className:"space-y-1.5",children:f.map(y=>n.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"})}),n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:y.name}),n.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:y.source==="frontmatter"?"frontmatter":"referenced"})]},y.name))})]})]})]})}function Oy({plugin:r,skill:u,evalCase:d,onClose:c}){var Ue,ke;const[f,m]=g.useState(null),[p,j]=g.useState("claude-cli"),[v,x]=g.useState("sonnet"),[S,y]=g.useState("claude-cli"),[R,X]=g.useState("opus"),[Q,Z]=g.useState("idle"),[z,O]=g.useState(null),[Y,J]=g.useState(null),[V,$]=g.useState(null),{events:U,running:P,start:ue}=es(),ye=g.useRef(null);g.useEffect(()=>{Ae.getConfig().then(m).catch(()=>{})},[]),g.useEffect(()=>{const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=T}},[]),g.useEffect(()=>{function T(C){C.key==="Escape"&&Q!=="running_a"&&Q!=="running_b"&&c()}return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[c,Q]),g.useEffect(()=>{for(const T of U)T.event==="model_a_start"?Z("running_a"):T.event==="model_a_result"?(O(T.data),Z("running_b")):T.event==="model_b_start"?Z("running_b"):T.event==="model_b_result"?J(T.data):T.event==="done"?Z("complete"):T.event==="error"&&($(T.data.error),Z("complete"))},[U]),g.useEffect(()=>{!P&&(Q==="running_a"||Q==="running_b")&&Z("complete")},[P,Q]);function we(){O(null),J(null),$(null),Z("running_a"),ue(`/api/skills/${r}/${u}/compare-models`,{eval_id:d.id,modelA:{provider:p,model:v},modelB:{provider:S,model:R}})}const le=g.useCallback(T=>{T.target===ye.current&&Q!=="running_a"&&Q!=="running_b"&&c()},[c,Q]);function je(T){return f==null?void 0:f.providers.find(C=>C.id===T&&C.available)}const _e=Q==="running_a"||Q==="running_b";return n.jsx("div",{ref:ye,onClick:le,className:"fixed inset-0 z-50 flex items-center justify-center p-4 animate-overlay-in",style:{background:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)"},children:n.jsxs("div",{className:"w-full max-w-4xl animate-modal-in flex flex-col",style:{background:"var(--surface-1)",border:"1px solid var(--border-default)",borderRadius:"16px",boxShadow:"0 24px 80px rgba(0,0,0,0.5)",maxHeight:"min(90vh, 800px)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4",style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"rgba(99,131,255,0.15)"},children:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M16 3h5v5"}),n.jsx("path",{d:"M8 21H3v-5"}),n.jsx("path",{d:"M21 3l-7 7"}),n.jsx("path",{d:"M3 21l7-7"})]})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-[15px] font-semibold",style:{color:"var(--text-primary)"},children:"Compare Models"}),n.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:["#",d.id," — ",d.name]})]})]}),n.jsx("button",{onClick:c,disabled:_e,className:"w-8 h-8 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)",opacity:_e?.3:1},onMouseEnter:T=>{_e||(T.currentTarget.style.background="var(--surface-3)")},onMouseLeave:T=>{T.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-5",style:{minHeight:0},children:[Q==="idle"&&n.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-5",children:[n.jsxs("div",{className:"p-4 rounded-xl",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"Model A"}),n.jsx("select",{className:"input-field text-[12px] py-1.5 mb-2 w-full",value:p,onChange:T=>{j(T.target.value);const C=f==null?void 0:f.providers.find(ee=>ee.id===T.target.value);C!=null&&C.models[0]&&x(C.models[0].id)},children:f==null?void 0:f.providers.filter(T=>T.available).map(T=>n.jsx("option",{value:T.id,children:T.label},T.id))}),n.jsx("select",{className:"input-field text-[12px] py-1.5 w-full",value:v,onChange:T=>x(T.target.value),children:(Ue=je(p))==null?void 0:Ue.models.map(T=>n.jsx("option",{value:T.id,children:T.label},T.id))})]}),n.jsxs("div",{className:"p-4 rounded-xl",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"Model B"}),n.jsx("select",{className:"input-field text-[12px] py-1.5 mb-2 w-full",value:S,onChange:T=>{y(T.target.value);const C=f==null?void 0:f.providers.find(ee=>ee.id===T.target.value);C!=null&&C.models[0]&&X(C.models[0].id)},children:f==null?void 0:f.providers.filter(T=>T.available).map(T=>n.jsx("option",{value:T.id,children:T.label},T.id))}),n.jsx("select",{className:"input-field text-[12px] py-1.5 w-full",value:R,onChange:T=>X(T.target.value),children:(ke=je(S))==null?void 0:ke.models.map(T=>n.jsx("option",{value:T.id,children:T.label},T.id))})]})]}),_e&&n.jsxs("div",{className:"flex items-center justify-center gap-3 py-8",children:[n.jsx("div",{className:"spinner",style:{width:20,height:20}}),n.jsx("span",{className:"text-[13px]",style:{color:"var(--text-secondary)"},children:Q==="running_a"?"Model A running...":"Model A done, Model B running..."})]}),V&&n.jsx("div",{className:"mb-4 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:V}),(z||Y)&&n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsx(Bm,{label:"Model A",result:z}),n.jsx(Bm,{label:"Model B",result:Y})]})]}),n.jsxs("div",{className:"flex items-center justify-between px-6 py-4",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"Results are ephemeral — not saved to benchmark history"}),n.jsxs("div",{className:"flex gap-2",children:[Q==="idle"&&n.jsxs("button",{onClick:we,className:"btn btn-primary",children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),"Compare"]}),Q==="complete"&&n.jsx("button",{onClick:c,className:"btn btn-secondary",children:"Close"})]})]})]})})}function Bm({label:r,result:u}){const[d,c]=g.useState(!1);if(!u)return n.jsxs("div",{className:"p-4 rounded-xl",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:r}),n.jsx("div",{className:"flex items-center justify-center py-6",style:{color:"var(--text-tertiary)"},children:n.jsx("span",{className:"text-[12px]",children:"Waiting..."})})]});const f=u.assertions.filter(p=>p.pass).length,m=Math.round(u.passRate*100);return n.jsxs("div",{className:"p-4 rounded-xl",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:r}),n.jsxs("span",{className:"pill",style:{background:m>=80?"var(--green-muted)":m>=50?"var(--yellow-muted)":"var(--red-muted)",color:m>=80?"var(--green)":m>=50?"var(--yellow)":"var(--red)"},children:[m,"%"]})]}),n.jsx("div",{className:"text-[12px] font-medium mb-2",style:{color:"var(--text-primary)"},children:u.model}),n.jsxs("div",{className:"flex gap-3 text-[11px] mb-3",style:{color:"var(--text-tertiary)"},children:[n.jsxs("span",{children:[(u.durationMs/1e3).toFixed(1),"s"]}),u.tokens!=null&&n.jsxs("span",{children:[u.tokens.toLocaleString()," tokens"]}),n.jsxs("span",{children:[f,"/",u.assertions.length," passed"]})]}),n.jsx("div",{className:"space-y-1.5 mb-3",children:u.assertions.map(p=>n.jsxs("div",{className:"flex items-start gap-2 p-2 rounded-lg text-[11px]",style:{background:p.pass?"var(--green-muted)":"var(--red-muted)"},children:[n.jsx("div",{className:"w-3.5 h-3.5 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:p.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"7",height:"7",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:p.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"font-medium",style:{color:"var(--text-primary)"},children:p.text}),n.jsx("div",{className:"mt-0.5",style:{color:"var(--text-secondary)"},children:p.reasoning})]})]},p.id))}),n.jsxs("button",{onClick:()=>c(!d),className:"flex items-center gap-1.5 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:p=>{p.currentTarget.style.color="var(--text-primary)"},onMouseLeave:p=>{p.currentTarget.style.color="var(--text-tertiary)"},children:[n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:d?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})}),d?"Hide Output":"Show Output"]}),d&&n.jsx("pre",{className:"mt-2 text-[11px] leading-relaxed p-3 rounded-lg max-h-40 overflow-y-auto whitespace-pre-wrap animate-fade-in",style:{background:"var(--surface-0)",color:"var(--text-secondary)",fontFamily:"var(--font-mono, monospace)"},children:u.output})]})}function Ly(r,u){return u&&(r==="generating"||r==="comparing"||r==="judging"||r==="judging_assertion")?n.jsx("div",{className:"spinner",style:{width:10,height:10,flexShrink:0}}):n.jsx("div",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{background:r==="generating"||r==="comparing"?"var(--accent)":"var(--green)"}})}function hh({entries:r,isRunning:u}){const[d,c]=g.useState(!1),f=g.useRef(null);return g.useEffect(()=>{f.current&&!d&&(f.current.scrollTop=f.current.scrollHeight)},[r,d]),r.length===0&&!u?null:n.jsxs("div",{className:"mt-2 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("button",{onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:m=>{m.currentTarget.style.color="var(--text-primary)"},onMouseLeave:m=>{m.currentTarget.style.color="var(--text-tertiary)"},children:[n.jsxs("span",{className:"flex items-center gap-2",children:[u&&n.jsx("div",{className:"spinner",style:{width:10,height:10}}),"Progress Log (",r.length,")"]}),n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:d?"rotate(0)":"rotate(180deg)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),!d&&n.jsx("div",{ref:f,className:"px-3 pb-3 space-y-1 max-h-48 overflow-y-auto",children:r.map((m,p)=>{const j=p===r.length-1&&u,v=p===0?"0s":`+${((m.timestamp-r[0].timestamp)/1e3).toFixed(1)}s`;return n.jsxs("div",{className:"flex items-center gap-2 text-[11px] animate-fade-in",style:{opacity:j?1:.7},children:[Ly(m.phase,j),n.jsx("span",{className:"font-mono flex-shrink-0",style:{color:"var(--text-tertiary)",width:40},children:v}),n.jsx("span",{style:{color:j?"var(--text-primary)":"var(--text-secondary)"},children:m.message}),m.current!=null&&m.total!=null&&n.jsxs("span",{className:"font-mono flex-shrink-0",style:{color:"var(--text-tertiary)"},children:["[",m.current,"/",m.total,"]"]})]},p)})})]})}function By(){const{plugin:r,skill:u}=Ai(),d=da(),[c,f]=g.useState(null),[m,p]=g.useState(!0),[j,v]=g.useState(null),[x,S]=g.useState(!1),[y,R]=g.useState(null),[X,Q]=g.useState(!1),{events:Z,running:z,start:O}=es(),[Y,J]=g.useState(null),[V,$]=g.useState(new Map),[U,P]=g.useState(new Set),[ue,ye]=g.useState(null),[we,le]=g.useState(!1),[je,_e]=g.useState(null),[Ue,ke]=g.useState(""),[T,C]=g.useState(null),[ee,ae]=g.useState([]);g.useEffect(()=>{!r||!u||(Ae.getEvals(r,u).then(f).catch(K=>v(K.message)).finally(()=>p(!1)),Ae.getSkillDetail(r,u).then(K=>ke(K.skillContent)).catch(()=>{}),Ae.getLatestBenchmark(r,u).then(K=>{ye(K);const I=new Map;for(const se of K.cases)I.set(se.eval_id,{status:se.status,passRate:se.pass_rate,errorMessage:se.error_message||void 0,durationMs:se.durationMs,tokens:se.tokens,assertions:se.assertions.map(re=>({assertion_id:re.id,text:re.text,pass:re.pass,reasoning:re.reasoning}))});$(I)}).catch(()=>{}))},[r,u]);async function fe(K){if(!(!r||!u)){S(!0);try{const I=await Ae.saveEvals(r,u,K);f(I),v(null)}catch(I){v(I.message)}finally{S(!1)}}}function N(K){c&&(fe({...c,evals:[...c.evals,K]}),Q(!1))}function B(K){c&&(fe({...c,evals:c.evals.map(I=>I.id===K.id?K:I)}),R(null))}function F(K){!c||!confirm("Delete this eval case?")||fe({...c,evals:c.evals.filter(I=>I.id!==K)})}function D(K){if(!c)return;const I=c.evals.find(se=>se.id===K);I&&B({...I,assertions:[...I.assertions,{id:`assert-${Date.now()}`,text:"New assertion",type:"boolean"}]})}async function H(K,I,se){if(!c)return;const re=c.evals.find(Fe=>Fe.id===K);if(!re)return;const et={...re,assertions:re.assertions.map(Fe=>Fe.id===I?{...Fe,text:se}:Fe)};await fe({...c,evals:c.evals.map(Fe=>Fe.id===et.id?et:Fe)}),Ne(K)}function W(K,I){if(!c)return;const se=c.evals.find(re=>re.id===K);se&&B({...se,assertions:se.assertions.filter(re=>re.id!==I)})}async function de(){if(!(!r||!u)){le(!0),_e(null);try{const K=await Ae.generateEvals(r,u),I=await Ae.saveEvals(r,u,K);f(I),v(null)}catch(K){_e(K.message)}finally{le(!1)}}}g.useEffect(()=>{if(!Y)return;const K={assertions:[]},I=[];for(const se of Z){if(se.event==="progress"){const re=se.data;re.eval_id===Y&&I.push({timestamp:Date.now(),evalId:re.eval_id,phase:re.phase,message:re.message,current:re.current,total:re.total})}if(se.event==="output_ready"){const re=se.data;re.eval_id===Y&&(K.output=re.output,re.durationMs!=null&&(K.durationMs=re.durationMs),re.tokens!=null&&(K.tokens=re.tokens))}if(se.event==="assertion_result"){const re=se.data;re.eval_id===Y&&!K.assertions.find(et=>et.assertion_id===re.assertion_id)&&K.assertions.push(re)}if(se.event==="case_complete"){const re=se.data;re.eval_id===Y&&(K.status=re.status,K.passRate=re.pass_rate,K.errorMessage=re.error_message||void 0)}}ae(I),$(se=>new Map(se).set(Y,K))},[Z,Y]),g.useEffect(()=>{!z&&Y&&J(null)},[z,Y]);function Ne(K){J(K),ae([]),P(I=>new Set(I).add(K)),O(`/api/skills/${r}/${u}/benchmark`,{eval_ids:[K]})}function te(K){P(I=>{const se=new Set(I);return se.has(K)?se.delete(K):se.add(K),se})}return m?n.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[n.jsx("div",{className:"skeleton h-5 w-48 mb-6"}),n.jsxs("div",{className:"flex gap-2 mb-6",children:[n.jsx("div",{className:"skeleton h-9 w-32 rounded-lg"}),n.jsx("div",{className:"skeleton h-9 w-32 rounded-lg"})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"skeleton h-32 rounded-xl"}),n.jsx("div",{className:"skeleton h-32 rounded-xl"})]})]}):n.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1 text-[13px]",children:[n.jsx(Xt,{to:"/",className:"transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:K=>{K.currentTarget.style.color="var(--text-primary)"},onMouseLeave:K=>{K.currentTarget.style.color="var(--text-tertiary)"},children:"Skills"}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsx("span",{style:{color:"var(--text-tertiary)"},children:r}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:u})]}),n.jsx(Ry,{content:Ue}),r&&u&&n.jsx(zy,{plugin:r,skill:u,skillContent:Ue,onApplied:K=>{ke(K)}}),r&&u&&n.jsx(Dy,{plugin:r,skill:u}),c&&n.jsxs("div",{className:"flex items-center gap-2 mt-4 mb-7",children:[n.jsxs(Xt,{to:`/skills/${r}/${u}/benchmark`,className:"btn btn-primary",children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),"Run Benchmark"]}),n.jsxs(Xt,{to:`/skills/${r}/${u}/compare`,className:"btn btn-purple",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M16 3h5v5"}),n.jsx("path",{d:"M8 21H3v-5"}),n.jsx("path",{d:"M21 3l-7 7"}),n.jsx("path",{d:"M3 21l7-7"})]}),"Compare A/B"]}),n.jsxs(Xt,{to:`/skills/${r}/${u}/history`,className:"btn btn-secondary",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"12 6 12 12 16 14"})]}),"History"]})]}),ue&&!z&&(()=>{const K=ue.cases.filter(Mt=>Mt.status==="pass").length,I=ue.cases.length,se=ue.overall_pass_rate!==void 0?Math.round(ue.overall_pass_rate*100):I>0?Math.round(K/I*100):0,re=ue.cases.reduce((Mt,Xl)=>Mt+(Xl.durationMs??0),0),et=new Date(ue.timestamp),Fe=Uy(et);return n.jsxs("div",{className:"mb-5 px-4 py-3 rounded-lg flex items-center justify-between",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{className:"text-[20px] font-bold",style:{color:se>=80?"var(--green)":se>=50?"var(--yellow)":"var(--red)"},children:[se,"%"]}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:["Last Benchmark — ",K,"/",I," passed"]}),n.jsxs("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[ue.model," · ",Fe,re>0?` · ${(re/1e3).toFixed(1)}s`:""]})]})]}),n.jsx("span",{className:"pill",style:{background:se>=80?"var(--green-muted)":se>=50?"var(--yellow-muted)":"var(--red-muted)",color:se>=80?"var(--green)":se>=50?"var(--yellow)":"var(--red)"},children:se>=80?"Healthy":se>=50?"Needs Work":"Failing"})]})})(),j&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:j}),c?n.jsxs("div",{className:"space-y-3 stagger-children",children:[c.evals.map(K=>n.jsxs("div",{className:"glass-card p-5",children:[n.jsxs("div",{className:"flex items-start justify-between mb-3",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",K.id]}),n.jsx("h4",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:K.name})]}),n.jsx("p",{className:"text-[12px] mt-1.5 line-clamp-2",style:{color:"var(--text-tertiary)"},children:K.prompt})]}),n.jsxs("div",{className:"flex gap-1 ml-3",children:[n.jsx("button",{onClick:()=>Ne(K.id),disabled:z,className:"btn btn-ghost text-[12px] flex-shrink-0",style:{color:"var(--accent)"},children:Y===K.id?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}})," Running..."]}):n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})})," Run"]})}),n.jsxs("button",{onClick:()=>C(K),disabled:z,className:"btn btn-ghost text-[12px]",style:{color:"var(--accent)"},children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M16 3h5v5"}),n.jsx("path",{d:"M8 21H3v-5"}),n.jsx("path",{d:"M21 3l-7 7"}),n.jsx("path",{d:"M3 21l7-7"})]}),"A/B"]}),n.jsx("button",{onClick:()=>{R(K),Q(!0)},className:"btn btn-ghost text-[12px]",children:"Edit"}),n.jsx("button",{onClick:()=>F(K.id),className:"btn btn-danger text-[12px]",children:"Delete"})]})]}),n.jsxs("div",{className:"mt-3 pt-3",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Assertions"}),n.jsx("span",{className:"pill",style:{background:"var(--surface-3)",color:"var(--text-tertiary)",fontSize:"10px",padding:"1px 7px"},children:K.assertions.length})]}),n.jsx("div",{className:"space-y-1.5",children:K.assertions.map(I=>n.jsxs("div",{className:"flex items-center gap-2 group",children:[n.jsx("span",{className:"text-[11px] font-mono w-28 truncate flex-shrink-0",style:{color:"var(--text-tertiary)"},children:I.id}),n.jsx(Hy,{initialText:I.text,onCommit:se=>H(K.id,I.id,se),disabled:z}),n.jsx("button",{onClick:()=>W(K.id,I.id),className:"opacity-0 group-hover:opacity-100 transition-opacity duration-150 p-1 rounded",style:{color:"var(--red)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},I.id))}),n.jsxs("button",{onClick:()=>D(K.id),className:"btn btn-ghost text-[12px] mt-2",style:{color:"var(--accent)"},children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Add assertion"]})]}),Y===K.id&&ee.length>0&&n.jsx(hh,{entries:ee,isRunning:z}),(()=>{const I=V.get(K.id);if(!I||I.assertions.length===0&&!I.status)return null;const se=U.has(K.id);return n.jsxs("div",{className:"mt-3 pt-3",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Benchmark Result"}),I.durationMs!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[(I.durationMs/1e3).toFixed(1),"s"]}),I.tokens!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[I.tokens.toLocaleString()," tok"]})]}),I.status?n.jsxs("span",{className:"pill",style:{background:I.status==="pass"?"var(--green-muted)":I.status==="error"?"var(--yellow-muted)":"var(--red-muted)",color:I.status==="pass"?"var(--green)":I.status==="error"?"var(--yellow)":"var(--red)"},children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:I.status==="pass"?"var(--green)":I.status==="error"?"var(--yellow)":"var(--red)"}}),I.status," ",I.passRate!==void 0?`${Math.round(I.passRate*100)}%`:""]}):n.jsxs("div",{className:"flex items-center gap-2 text-[12px]",style:{color:"var(--accent)"},children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}}),"Evaluating..."]})]}),I.status&&n.jsxs("button",{onClick:()=>d(`/skills/${r}/${u}/history?tab=per-eval`),className:"text-[11px] font-medium mb-2 flex items-center gap-1 transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:re=>{re.currentTarget.style.color="var(--accent)"},onMouseLeave:re=>{re.currentTarget.style.color="var(--text-tertiary)"},children:[n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"12 6 12 12 16 14"})]}),"View History"]}),I.errorMessage&&n.jsx("div",{className:"mb-2 p-2 rounded-lg text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:I.errorMessage}),n.jsx("div",{className:"space-y-1.5",children:I.assertions.map(re=>n.jsxs("div",{className:"flex items-start gap-2 p-2 rounded-lg animate-fade-in",style:{background:re.pass?"var(--green-muted)":"var(--red-muted)"},children:[n.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:re.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:re.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:re.text||re.assertion_id}),n.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-secondary)"},children:re.reasoning})]})]},re.assertion_id))}),I.output&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{onClick:()=>te(K.id),className:"mt-2 flex items-center gap-1.5 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:re=>{re.currentTarget.style.color="var(--text-primary)"},onMouseLeave:re=>{re.currentTarget.style.color="var(--text-tertiary)"},children:[n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:se?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})}),se?"Hide Output":"Show LLM Output"]}),se&&n.jsx("div",{className:"mt-2 text-[11px] leading-relaxed p-3 rounded-lg max-h-48 overflow-y-auto whitespace-pre-wrap animate-fade-in",style:{background:"var(--surface-1)",color:"var(--text-secondary)",fontFamily:"var(--font-mono, monospace)"},children:I.output})]})]})})()]},K.id)),n.jsx("button",{onClick:()=>{R(null),Q(!0)},className:"w-full p-4 rounded-xl text-[13px] font-medium transition-all duration-150",style:{border:"2px dashed var(--border-default)",color:"var(--text-tertiary)",background:"transparent"},onMouseEnter:K=>{K.currentTarget.style.borderColor="var(--accent)",K.currentTarget.style.color="var(--accent)",K.currentTarget.style.background="var(--accent-muted)"},onMouseLeave:K=>{K.currentTarget.style.borderColor="var(--border-default)",K.currentTarget.style.color="var(--text-tertiary)",K.currentTarget.style.background="transparent"},children:"+ Add Eval Case"})]}):n.jsxs("div",{className:"text-center py-16 animate-fade-in-scale",children:[n.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:"var(--surface-2)"},children:we?n.jsx("div",{className:"spinner",style:{width:28,height:28}}):n.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",children:[n.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),n.jsx("polyline",{points:"14 2 14 8 20 8"})]})}),we?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[14px] font-medium",style:{color:"var(--text-secondary)"},children:"Generating eval cases..."}),n.jsx("p",{className:"text-[12px] mt-1",style:{color:"var(--text-tertiary)"},children:"This may take 10–30 seconds"})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[14px] font-medium",style:{color:"var(--text-secondary)"},children:"No evals.json found"}),je&&n.jsx("div",{className:"mt-3 mx-auto max-w-md px-4 py-3 rounded-lg text-[13px] text-left",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:je}),n.jsxs("div",{className:"flex items-center justify-center gap-2 mt-3",children:[n.jsxs("button",{onClick:de,className:"btn btn-primary",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]}),"Generate with AI"]}),n.jsx("button",{onClick:()=>Q(!0),className:"btn btn-secondary",children:"Create Manually"})]})]})]}),X&&n.jsx(qy,{evalCase:y,skillName:(c==null?void 0:c.skill_name)||u||"",existingIds:(c==null?void 0:c.evals.map(K=>K.id))||[],onSave:K=>y?B(K):N(K),onCancel:()=>{Q(!1),R(null)}}),T&&r&&u&&n.jsx(Oy,{plugin:r,skill:u,evalCase:T,onClose:()=>C(null)}),x&&n.jsxs("div",{className:"fixed bottom-5 right-5 flex items-center gap-2 px-4 py-2.5 rounded-lg text-[13px] animate-fade-in-scale",style:{background:"var(--accent)",color:"#fff",boxShadow:"0 8px 32px rgba(99,131,255,0.3)"},children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)"}}),"Saving..."]})]})}function Hy({initialText:r,onCommit:u,disabled:d}){const[c,f]=g.useState(r),m=g.useRef(r);g.useEffect(()=>{f(r),m.current=r},[r]);function p(){const v=c.trim();v&&v!==m.current&&(m.current=v,u(v))}function j(v){v.key==="Enter"&&(v.preventDefault(),v.target.blur())}return n.jsx("input",{className:"input-field flex-1 text-[12px] py-1.5",style:{background:"transparent",border:"1px solid transparent",borderRadius:"6px"},value:c,onChange:v=>f(v.target.value),onBlur:p,onKeyDown:j,onFocus:v=>{v.currentTarget.style.borderColor="var(--border-default)",v.currentTarget.style.background="var(--surface-2)"},disabled:d})}function Uy(r){const u=Math.floor((Date.now()-r.getTime())/1e3);if(u<60)return"just now";const d=Math.floor(u/60);if(d<60)return`${d}m ago`;const c=Math.floor(d/60);if(c<24)return`${c}h ago`;const f=Math.floor(c/24);return f<30?`${f}d ago`:r.toLocaleDateString()}function qy({evalCase:r,skillName:u,existingIds:d,onSave:c,onCancel:f}){const[m,p]=g.useState((r==null?void 0:r.name)||""),[j,v]=g.useState((r==null?void 0:r.prompt)||""),[x,S]=g.useState((r==null?void 0:r.expected_output)||""),[y,R]=g.useState((r==null?void 0:r.assertions)||[{id:"assert-1",text:"",type:"boolean"}]),X=g.useRef(null),Q=g.useRef(null),Z=g.useRef(null);g.useEffect(()=>{const Y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Y}},[]),g.useEffect(()=>{requestAnimationFrame(()=>{var Y;return(Y=Z.current)==null?void 0:Y.focus()})},[]),g.useEffect(()=>{function Y(J){J.key==="Escape"&&f()}return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[f]);const z=g.useCallback(Y=>{Y.target===X.current&&f()},[f]);function O(Y){Y.preventDefault();const J=(r==null?void 0:r.id)??(d.length>0?Math.max(...d)+1:1);c({id:J,name:m,prompt:j,expected_output:x,files:(r==null?void 0:r.files)||[],assertions:y.filter(V=>V.text.trim())})}return n.jsx("div",{ref:X,onClick:z,className:"fixed inset-0 z-50 grid place-items-center overflow-y-auto p-4 animate-overlay-in",style:{background:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)"},children:n.jsxs("form",{ref:Q,onSubmit:O,className:"w-full max-w-2xl animate-modal-in flex flex-col",style:{background:"var(--surface-1)",border:"1px solid var(--border-default)",borderRadius:"16px",boxShadow:"0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04)",maxHeight:"min(85vh, 720px)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 flex-shrink-0",style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"var(--accent-muted)"},children:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r?n.jsxs(n.Fragment,{children:[n.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),n.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-[15px] font-semibold",style:{color:"var(--text-primary)"},children:r?"Edit Eval Case":"New Eval Case"}),r&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:["#",r.id]})]})]}),n.jsx("button",{type:"button",onClick:f,className:"w-8 h-8 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)",background:"transparent"},onMouseEnter:Y=>{Y.currentTarget.style.background="var(--surface-3)",Y.currentTarget.style.color="var(--text-primary)"},onMouseLeave:Y=>{Y.currentTarget.style.background="transparent",Y.currentTarget.style.color="var(--text-tertiary)"},"aria-label":"Close",children:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsxs("div",{className:"overflow-y-auto flex-1 px-6 py-5",style:{minHeight:0},children:[n.jsxs("label",{className:"block mb-5",children:[n.jsx("span",{className:"text-[12px] font-medium mb-1.5 block",style:{color:"var(--text-secondary)"},children:"Name"}),n.jsx("input",{ref:Z,className:"input-field",value:m,onChange:Y=>p(Y.target.value),required:!0,placeholder:"e.g. basic-test-question"})]}),n.jsxs("label",{className:"block mb-5",children:[n.jsx("span",{className:"text-[12px] font-medium mb-1.5 block",style:{color:"var(--text-secondary)"},children:"Prompt"}),n.jsx("textarea",{className:"input-field resize-y",style:{minHeight:"96px"},value:j,onChange:Y=>v(Y.target.value),required:!0,placeholder:"The user prompt to test against..."})]}),n.jsxs("label",{className:"block mb-5",children:[n.jsx("span",{className:"text-[12px] font-medium mb-1.5 block",style:{color:"var(--text-secondary)"},children:"Expected Output"}),n.jsx("textarea",{className:"input-field resize-y",style:{minHeight:"80px"},value:x,onChange:Y=>S(Y.target.value),placeholder:"What a good answer should include..."})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:"Assertions"}),n.jsx("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:y.length})]}),n.jsxs("button",{type:"button",onClick:()=>R([...y,{id:`assert-${y.length+1}`,text:"",type:"boolean"}]),className:"btn btn-ghost text-[12px] py-1 px-2",style:{color:"var(--accent)"},children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Add"]})]}),n.jsx("div",{className:"space-y-2",children:y.map((Y,J)=>n.jsxs("div",{className:"flex items-center gap-2 p-2.5 rounded-lg group transition-colors duration-150",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("input",{className:"input-field text-[11px] font-mono py-1.5 px-2",style:{background:"var(--surface-3)",width:"120px",flexShrink:0},value:Y.id,onChange:V=>{const $=[...y];$[J]={...$[J],id:V.target.value},R($)},placeholder:"ID"}),n.jsx("input",{className:"input-field flex-1 text-[12px] py-1.5 px-2.5",style:{background:"transparent",borderColor:"transparent"},value:Y.text,onChange:V=>{const $=[...y];$[J]={...$[J],text:V.target.value},R($)},onFocus:V=>{V.currentTarget.style.borderColor="var(--border-default)",V.currentTarget.style.background="var(--surface-1)"},onBlur:V=>{V.currentTarget.style.borderColor="transparent",V.currentTarget.style.background="transparent"},placeholder:"Assertion text"}),n.jsx("button",{type:"button",onClick:()=>R(y.filter((V,$)=>$!==J)),className:"w-7 h-7 rounded-md flex items-center justify-center flex-shrink-0 opacity-0 group-hover:opacity-100 transition-all duration-150",style:{color:"var(--red)",background:"transparent"},onMouseEnter:V=>{V.currentTarget.style.background="var(--red-muted)"},onMouseLeave:V=>{V.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},J))}),y.length===0&&n.jsx("div",{className:"text-center py-6 rounded-lg text-[12px]",style:{background:"var(--surface-2)",color:"var(--text-tertiary)",border:"1px dashed var(--border-default)"},children:"No assertions yet. Add one to validate the eval output."})]})]}),n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 flex-shrink-0",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:["Press ",n.jsx("kbd",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--surface-3)",border:"1px solid var(--border-subtle)"},children:"Esc"})," to cancel"]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{type:"button",onClick:f,className:"btn btn-secondary",children:"Cancel"}),n.jsxs("button",{type:"submit",className:"btn btn-primary",children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}),r?"Save Changes":"Create Case"]})]})]})]})})}const xl=220,$n=32,Hm=4,Um=28,gi=44,qm=16,ua=40,Yy=52;function xh({title:r,groups:u,seriesColors:d,seriesLabels:c,maxValue:f,formatValue:m=j=>j.toFixed(1),yLabel:p}){const j=c.length,v=j*$n+(j-1)*Hm,x=gi+qm+u.length*v+(u.length-1)*Um,S=ua+xl+Yy,y=5,R=Array.from({length:y+1},(X,Q)=>f/y*Q);return n.jsxs("div",{className:"glass-card p-5 overflow-x-auto animate-fade-in",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-4",style:{color:"var(--text-primary)"},children:r}),n.jsx("div",{className:"flex items-center gap-5 mb-3",children:c.map((X,Q)=>n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-3 h-3 rounded-[3px]",style:{background:d[Q]}}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:X})]},X))}),n.jsxs("svg",{width:Math.max(x,300),height:S,viewBox:`0 0 ${Math.max(x,300)} ${S}`,style:{display:"block"},children:[p&&n.jsx("text",{x:12,y:ua+xl/2,transform:`rotate(-90, 12, ${ua+xl/2})`,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em"},children:p}),R.map(X=>{const Q=ua+xl-X/f*xl;return n.jsxs("g",{children:[n.jsx("line",{x1:gi,y1:Q,x2:Math.max(x,300)-qm,y2:Q,stroke:"var(--border-subtle)",strokeWidth:X===0?1:.5,strokeDasharray:X===0?void 0:"4 4"}),n.jsx("text",{x:gi-8,y:Q+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:X%1===0?X.toFixed(0):X.toFixed(1)})]},X)}),u.map((X,Q)=>{const Z=gi+Q*(v+Um);return n.jsxs("g",{children:[X.values.map((z,O)=>{const Y=Math.max(0,z.value/f*xl),J=Z+O*($n+Hm),V=ua+xl-Y;return n.jsxs("g",{children:[n.jsxs("rect",{x:J,y:V,width:$n,height:Y,rx:4,ry:4,fill:d[O],opacity:.85,children:[n.jsx("animate",{attributeName:"height",from:"0",to:Y,dur:"0.5s",fill:"freeze"}),n.jsx("animate",{attributeName:"y",from:ua+xl,to:V,dur:"0.5s",fill:"freeze"})]}),n.jsx("text",{x:J+$n/2,y:V-6,textAnchor:"middle",style:{fill:"var(--text-secondary)",fontSize:10,fontWeight:600},children:m(z.value)}),z.label&&n.jsx("text",{x:J+$n/2,y:V-17,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:9},children:z.label})]},O)}),n.jsx("text",{x:Z+v/2,y:ua+xl+18,textAnchor:"middle",style:{fill:"var(--text-secondary)",fontSize:11},children:Gy(X.label,14)})]},X.label)})]})]})}function Gy(r,u){return r.length<=u?r:r.slice(0,u-1)+"…"}function Xy(){const{plugin:r,skill:u}=Ai(),[d]=vc(),c=da(),{events:f,running:m,done:p,error:j,start:v}=es(),[x,S]=g.useState(new Set),[y,R]=g.useState(null),[X,Q]=g.useState(null),[Z,z]=g.useState(null),[O,Y]=g.useState(null),[J,V]=g.useState(!1),[$,U]=g.useState(null),[P,ue]=g.useState([]),[ye,we]=g.useState(""),[le,je]=g.useState(!1),_e=g.useRef(!1);g.useEffect(()=>{Ae.getConfig().then(D=>R(D.model)).catch(()=>{}),r&&u&&(Ae.getEvals(r,u).then(Q).catch(()=>{}),Ae.getLatestBenchmark(r,u).then(Y).catch(()=>{}))},[r,u]),g.useEffect(()=>{if(_e.current||!r||!u)return;const D=d.get("autostart"),H=d.get("mode");D==="true"&&(_e.current=!0,H==="baseline"?ke():Ue())},[r,u,d]);function Ue(D){Ae.getConfig().then(W=>R(W.model)).catch(()=>{}),S(new Set),V(!1),z((D==null?void 0:D.length)===1?D[0]:"all");const H=D?{eval_ids:D}:void 0;v(`/api/skills/${r}/${u}/benchmark`,H)}function ke(){Ae.getConfig().then(D=>R(D.model)).catch(()=>{}),S(new Set),V(!0),z("all"),v(`/api/skills/${r}/${u}/baseline`)}function T(D){if($===D){U(null),ue([]),we("");return}U(D),we(""),C(D)}function C(D,H){!r||!u||(je(!0),Ae.getCaseHistory(r,u,D,H||void 0).then(ue).catch(()=>ue([])).finally(()=>je(!1)))}function ee(D){S(H=>{const W=new Set(H);return W.has(D)?W.delete(D):W.add(D),W})}const ae=new Map,fe=[];for(const D of f){if(D.event==="progress"){const H=D.data;fe.push({timestamp:Date.now(),evalId:H.eval_id,phase:H.phase,message:H.message,current:H.current,total:H.total})}if(D.event==="case_start"){const H=D.data;ae.has(H.eval_id)||ae.set(H.eval_id,{name:H.eval_name,assertions:[]})}if(D.event==="output_ready"){const H=D.data,W=ae.get(H.eval_id)||{assertions:[]};W.output=H.output,H.durationMs!=null&&(W.durationMs=H.durationMs),H.tokens!=null&&(W.tokens=H.tokens),ae.set(H.eval_id,W)}if(D.event==="assertion_result"){const H=D.data,W=ae.get(H.eval_id)||{assertions:[]};W.assertions.find(de=>de.assertion_id===H.assertion_id)||(W.assertions.push(H),ae.set(H.eval_id,W))}if(D.event==="case_complete"){const H=D.data,W=ae.get(H.eval_id)||{assertions:[]};W.status=H.status,W.passRate=H.pass_rate,W.errorMessage=H.error_message||void 0,ae.set(H.eval_id,W)}}const N=f.find(D=>D.event==="done"),B=N==null?void 0:N.data,F=(B==null?void 0:B.overall_pass_rate)!==void 0?Math.round(B.overall_pass_rate*100):null;return n.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-5 text-[13px]",children:[n.jsx(Xt,{to:`/skills/${r}/${u}`,className:"transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:D=>{D.currentTarget.style.color="var(--text-primary)"},onMouseLeave:D=>{D.currentTarget.style.color="var(--text-tertiary)"},children:u}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:J?"Baseline (no skill)":"Benchmark"})]}),n.jsx("div",{className:"mb-3",children:n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"Runs your skill against each eval case. An LLM judge grades every assertion against the actual output."})}),n.jsxs("div",{className:"flex items-center gap-2 mb-7",children:[n.jsx("button",{onClick:()=>Ue(),disabled:m,className:"btn btn-primary",children:m&&Z==="all"&&!J?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)",width:14,height:14}})," Running All..."]}):n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})})," Run All (",(X==null?void 0:X.evals.length)??0," cases)"]})}),n.jsx("button",{onClick:()=>ke(),disabled:m,className:"btn btn-ghost",style:{color:"#f97316"},children:m&&J?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#f97316",borderColor:"rgba(249,115,22,0.2)",width:14,height:14}})," Running Baseline..."]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("line",{x1:"4.93",y1:"4.93",x2:"19.07",y2:"19.07"})]})," Run Baseline"]})}),n.jsxs("button",{onClick:()=>c(`/skills/${r}/${u}/compare`),className:"btn btn-purple",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),n.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),n.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]}),"Run A/B"]})]}),j&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:j}),!m&&ae.size===0&&O&&(()=>{const D=O.cases.filter(te=>te.status==="pass").length,H=O.cases.length,W=O.overall_pass_rate!==void 0?Math.round(O.overall_pass_rate*100):H>0?Math.round(D/H*100):0,de=O.cases.reduce((te,K)=>te+(K.durationMs??0),0),Ne=new Date(O.timestamp);return n.jsxs("div",{className:"mb-5 px-4 py-3 rounded-lg flex items-center justify-between",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{className:"text-[20px] font-bold",style:{color:W>=80?"var(--green)":W>=50?"var(--yellow)":"var(--red)"},children:[W,"%"]}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:["Last Benchmark — ",D,"/",H," passed"]}),n.jsxs("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[O.model," · ",Ne.toLocaleString(),de>0?` · ${(de/1e3).toFixed(1)}s`:""]})]})]}),n.jsx("span",{className:"pill",style:{background:W>=80?"var(--green-muted)":W>=50?"var(--yellow-muted)":"var(--red-muted)",color:W>=80?"var(--green)":W>=50?"var(--yellow)":"var(--red)"},children:W>=80?"Healthy":W>=50?"Needs Work":"Failing"})]})})(),!m&&ae.size===0&&X&&X.evals.length>0&&n.jsxs("div",{className:"space-y-2 mb-6",children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-widest mb-2",style:{color:"var(--text-tertiary)"},children:"Eval Cases"}),X.evals.map(D=>{const H=O==null?void 0:O.cases.find(W=>W.eval_id===D.id);return n.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-100",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",D.id]}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[13px] font-medium truncate",style:{color:"var(--text-primary)"},children:D.name}),n.jsxs("div",{className:"text-[11px] truncate mt-0.5",style:{color:"var(--text-tertiary)"},children:[D.assertions.length," assertion",D.assertions.length!==1?"s":""]})]}),H&&n.jsxs("span",{className:"pill flex-shrink-0",style:{background:H.status==="pass"?"var(--green-muted)":H.status==="error"?"var(--yellow-muted)":"var(--red-muted)",color:H.status==="pass"?"var(--green)":H.status==="error"?"var(--yellow)":"var(--red)"},children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:H.status==="pass"?"var(--green)":H.status==="error"?"var(--yellow)":"var(--red)"}}),H.status," ",Math.round(H.pass_rate*100),"%",H.durationMs!=null&&n.jsxs("span",{className:"ml-1 opacity-70",children:[(H.durationMs/1e3).toFixed(1),"s"]})]}),n.jsxs("button",{onClick:()=>Ue([D.id]),disabled:m,className:"btn btn-ghost text-[12px] flex-shrink-0",style:{color:"var(--accent)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),"Run"]})]},D.id)})]}),ae.size>0&&n.jsxs("div",{className:"space-y-3 stagger-children",children:[Array.from(ae.entries()).map(([D,H])=>{const W=x.has(D),de=!!H.status,Ne=$===D;return n.jsxs("div",{className:"glass-card overflow-hidden",children:[n.jsxs("div",{className:"p-5",style:{cursor:de?"pointer":"default"},onClick:()=>{de&&T(D)},children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",D]}),n.jsx("h4",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:H.name||"Eval Case"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[H.durationMs!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[(H.durationMs/1e3).toFixed(1),"s"]}),H.tokens!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[H.tokens.toLocaleString()," tok"]}),H.status?n.jsxs("span",{className:"pill",style:{background:H.status==="pass"?"var(--green-muted)":H.status==="error"?"var(--yellow-muted)":"var(--red-muted)",color:H.status==="pass"?"var(--green)":H.status==="error"?"var(--yellow)":"var(--red)"},children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:H.status==="pass"?"var(--green)":H.status==="error"?"var(--yellow)":"var(--red)"}}),H.status," ",H.passRate!==void 0?`${Math.round(H.passRate*100)}%`:""]}):n.jsxs("div",{className:"flex items-center gap-2 text-[12px]",style:{color:"var(--accent)"},children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}}),"Evaluating..."]}),de&&n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:Ne?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease",flexShrink:0},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]})]}),H.errorMessage&&n.jsx("div",{className:"mb-3 p-3 rounded-lg text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:H.errorMessage}),n.jsx("div",{className:"space-y-2",children:H.assertions.map(te=>n.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg animate-fade-in",style:{background:te.pass?"var(--green-muted)":"var(--red-muted)"},children:[n.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:te.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:te.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:te.text||te.assertion_id}),n.jsx("div",{className:"text-[12px] mt-0.5",style:{color:"var(--text-secondary)"},children:te.reasoning})]})]},te.assertion_id))})]}),Ne&&n.jsxs("div",{className:"px-5 py-4 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)",background:"var(--surface-1)"},onClick:te=>te.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Case History"}),n.jsxs("select",{value:ye,onChange:te=>{we(te.target.value),C(D,te.target.value)},className:"text-[11px] px-2 py-1 rounded",style:{background:"var(--surface-2)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)"},children:[n.jsx("option",{value:"",children:"All models"}),[...new Set(P.map(te=>te.model))].map(te=>n.jsx("option",{value:te,children:te},te))]})]}),le?n.jsx("div",{className:"flex items-center justify-center py-4",children:n.jsx("div",{className:"spinner",style:{width:16,height:16}})}):P.length===0?n.jsx("div",{className:"text-[12px] py-3 text-center",style:{color:"var(--text-tertiary)"},children:"No history found for this case."}):n.jsxs(n.Fragment,{children:[P.length>=2&&(()=>{const te=P.slice().reverse(),K=200,I=40,se=4,re=1,et=(K-se*2)/(te.length-1);return n.jsx("div",{className:"mb-3",children:n.jsxs("svg",{width:K,height:I,style:{display:"block"},children:[n.jsx("polyline",{points:te.map((Fe,Mt)=>{const Xl=se+Mt*et,fa=I-se-Fe.pass_rate/re*(I-se*2);return`${Xl.toFixed(1)},${fa.toFixed(1)}`}).join(" "),fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),te.map((Fe,Mt)=>{const Xl=se+Mt*et,fa=I-se-Fe.pass_rate/re*(I-se*2);return n.jsx("circle",{cx:Xl,cy:fa,r:"2.5",fill:"var(--accent)"},Mt)})]})})})(),n.jsx("div",{className:"space-y-1.5",children:P.map((te,K)=>{const I=Math.round(te.pass_rate*100),se=new Date(te.timestamp);return n.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg text-[12px]",style:{background:"var(--surface-2)"},children:[n.jsxs("span",{className:"text-[11px] flex-shrink-0",style:{color:"var(--text-tertiary)"},children:[se.toLocaleDateString()," ",se.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]}),n.jsx("span",{className:"pill flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-secondary)",fontSize:"10px"},children:te.model}),n.jsxs("span",{className:"pill flex-shrink-0",style:{background:I>=80?"var(--green-muted)":I>=50?"var(--yellow-muted)":"var(--red-muted)",color:I>=80?"var(--green)":I>=50?"var(--yellow)":"var(--red)",fontSize:"10px"},children:[I,"%"]}),te.durationMs!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[(te.durationMs/1e3).toFixed(1),"s"]}),te.tokens!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[te.tokens.toLocaleString()," tok"]})]},K)})})]})]}),H.output&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{onClick:te=>{te.stopPropagation(),ee(D)},className:"w-full px-5 py-2.5 flex items-center justify-center gap-2 text-[12px] font-medium transition-all duration-150",style:{background:"var(--surface-2)",color:"var(--text-secondary)",borderTop:"1px solid var(--border-subtle)"},onMouseEnter:te=>{te.currentTarget.style.background="var(--surface-3)"},onMouseLeave:te=>{te.currentTarget.style.background="var(--surface-2)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:W?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})}),W?"Hide LLM Output":"Show Actual LLM Output"]}),W&&n.jsxs("div",{className:"p-4 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-2",style:{color:"var(--text-tertiary)"},children:"LLM Output"}),n.jsx("div",{className:"text-[12px] leading-relaxed p-3 rounded-lg max-h-64 overflow-y-auto whitespace-pre-wrap",style:{background:"var(--surface-1)",color:"var(--text-secondary)",fontFamily:"var(--font-mono, monospace)"},children:H.output})]})]})]},D)}),p&&ae.size>1&&(()=>{const D=Array.from(ae.entries());return n.jsx(xh,{title:"Benchmark Results — Pass Rate per Eval",groups:D.map(([W,de])=>{const Ne=de.assertions.filter(I=>I.pass).length,te=de.assertions.length,K=te>0?Ne/te:0;return{label:de.name||`Eval #${W}`,values:[{value:K*100,label:`${Ne}/${te}`}]}}),seriesColors:[D.every(([,W])=>W.status==="pass")?"#34d399":"#6383ff"],seriesLabels:["Pass Rate"],maxValue:100,formatValue:W=>`${Math.round(W)}%`,yLabel:"Accuracy"})})(),p&&F!==null&&(()=>{const D=Array.from(ae.values()),H=D.reduce((Ne,te)=>Ne+(te.durationMs??0),0),W=D.reduce((Ne,te)=>Ne+(te.tokens??0),0),de=D.some(Ne=>Ne.tokens!=null);return n.jsxs("div",{className:"glass-card p-6 text-center animate-fade-in-scale",style:{borderColor:F>=80?"var(--green)":F>=50?"var(--yellow)":"var(--red)",borderWidth:2},children:[n.jsxs("div",{className:"text-[36px] font-bold tracking-tight",style:{color:F>=80?"var(--green)":F>=50?"var(--yellow)":"var(--red)"},children:[F,"%"]}),n.jsx("div",{className:"text-[13px] mt-1",style:{color:"var(--text-tertiary)"},children:Z==="all"?"Overall Pass Rate":"Pass Rate"}),n.jsxs("div",{className:"flex items-center justify-center gap-4 mt-2 text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[y&&n.jsx("span",{children:y}),H>0&&n.jsxs("span",{children:[(H/1e3).toFixed(1),"s total"]}),de&&W>0&&n.jsxs("span",{children:[W.toLocaleString()," tokens"]})]})]})})()]}),m&&ae.size===0&&n.jsxs("div",{className:"text-center py-16 animate-fade-in",children:[n.jsx("div",{className:"spinner-lg mx-auto mb-4"}),n.jsx("p",{className:"text-[14px]",style:{color:"var(--text-secondary)"},children:"Generating outputs and evaluating assertions..."})]}),fe.length>0&&n.jsx("div",{className:"glass-card mt-3 overflow-hidden",children:n.jsx(hh,{entries:fe,isRunning:m})})]})}const Ym={EFFECTIVE:{bg:"var(--green-muted)",text:"var(--green)",border:"var(--green)",glow:"rgba(52,211,153,0.15)"},MARGINAL:{bg:"var(--yellow-muted)",text:"var(--yellow)",border:"var(--yellow)",glow:"rgba(251,191,36,0.15)"},INEFFECTIVE:{bg:"rgba(251,146,60,0.12)",text:"var(--orange)",border:"var(--orange)",glow:"rgba(251,146,60,0.15)"},DEGRADING:{bg:"var(--red-muted)",text:"var(--red)",border:"var(--red)",glow:"rgba(248,113,113,0.15)"}};function Qy(){const{plugin:r,skill:u}=Ai(),{events:d,running:c,done:f,error:m,start:p}=es(),[j,v]=g.useState(new Set),[x,S]=g.useState(null),[y]=vc(),R=g.useRef(!1);g.useEffect(()=>{Ae.getConfig().then(U=>S(U.model)).catch(()=>{})},[]),g.useEffect(()=>{y.get("autostart")==="true"&&!R.current&&r&&u&&(R.current=!0,v(new Set),p(`/api/skills/${r}/${u}/compare`))},[y,r,u]);function X(){v(new Set),p(`/api/skills/${r}/${u}/compare`)}function Q(U){v(P=>{const ue=new Set(P);return ue.has(U)?ue.delete(U):ue.add(U),ue})}const Z=[],z=[],O=[];for(const U of d)if(U.event==="outputs_ready"){const P=U.data;Z.find(ue=>ue.eval_id===P.eval_id)||Z.push(P)}else if(U.event==="case_error"){const P=U.data;z.find(ue=>ue.eval_id===P.eval_id)||z.push(P)}else if(U.event==="case_start"){const P=U.data;O.find(ue=>ue.eval_id===P.eval_id)||O.push(P)}const Y=new Set([...Z.map(U=>U.eval_id),...z.map(U=>U.eval_id)]),J=O.filter(U=>!Y.has(U.eval_id)).pop(),V=d.find(U=>U.event==="done"),$=V==null?void 0:V.data;return n.jsxs("div",{className:"px-10 py-8 max-w-6xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-5 text-[13px]",children:[n.jsx(Xt,{to:`/skills/${r}/${u}`,className:"transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:U=>{U.currentTarget.style.color="var(--text-primary)"},onMouseLeave:U=>{U.currentTarget.style.color="var(--text-tertiary)"},children:u}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"A/B Comparison"})]}),n.jsxs("div",{className:"mb-3",children:[n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"Runs each eval prompt twice: once WITH your skill, once WITHOUT. An LLM judge scores both outputs blindly on content and structure (1-5 each)."}),x&&n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5",children:[n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"Model:"}),n.jsx("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--accent)"},children:x})]})]}),n.jsx("button",{onClick:X,disabled:c,className:"btn btn-purple mb-7",children:c?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)",width:14,height:14}})," Comparing..."]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M16 3h5v5"}),n.jsx("path",{d:"M8 21H3v-5"}),n.jsx("path",{d:"M21 3l-7 7"}),n.jsx("path",{d:"M3 21l7-7"})]})," Run Comparison"]})}),m&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:m}),($==null?void 0:$.error)&&n.jsxs("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:[n.jsx("span",{className:"font-semibold",children:"Error:"})," ",$.error]}),z.length>0&&n.jsx("div",{className:"space-y-2 mb-5",children:z.map(U=>n.jsxs("div",{className:"px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:[n.jsxs("span",{className:"font-semibold",children:["Eval #",U.eval_id," failed:"]})," ",U.error]},U.eval_id))}),Z.length>0&&n.jsxs("div",{className:"space-y-4 stagger-children",children:[Z.map(U=>{const P=j.has(U.eval_id),ue=U.winner==="skill"?"Skill Wins":U.winner==="baseline"?"Baseline Wins":"Tie",ye=U.winner==="skill"?"var(--green)":U.winner==="baseline"?"var(--red)":"var(--text-tertiary)";return n.jsxs("div",{className:"glass-card overflow-hidden",children:[n.jsxs("div",{className:"p-5 pb-4",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",U.eval_id]}),n.jsx("h4",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:U.eval_name||"Eval Case"})]}),n.jsx("span",{className:"pill",style:{background:U.winner==="skill"?"var(--green-muted)":U.winner==="baseline"?"var(--red-muted)":"var(--surface-3)",color:ye,fontWeight:700},children:ue})]}),n.jsxs("div",{className:"mb-4 p-3 rounded-lg",style:{background:"var(--surface-2)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-1.5",style:{color:"var(--text-tertiary)"},children:"Prompt"}),n.jsx("div",{className:"text-[12px] leading-relaxed",style:{color:"var(--text-secondary)"},children:U.prompt})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsx(Gm,{label:"WITH Skill",contentScore:U.skillContentScore,structureScore:U.skillStructureScore,isWinner:U.winner==="skill"}),n.jsx(Gm,{label:"WITHOUT Skill",contentScore:U.baselineContentScore,structureScore:U.baselineStructureScore,isWinner:U.winner==="baseline"})]})]}),n.jsxs("button",{onClick:()=>Q(U.eval_id),className:"w-full px-5 py-3 flex items-center justify-center gap-2 text-[12px] font-medium transition-all duration-150",style:{background:"var(--surface-2)",color:"var(--text-secondary)",borderTop:"1px solid var(--border-subtle)"},onMouseEnter:we=>{we.currentTarget.style.background="var(--surface-3)"},onMouseLeave:we=>{we.currentTarget.style.background="var(--surface-2)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:P?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})}),P?"Hide LLM Outputs":"Show Actual LLM Outputs"]}),P&&n.jsxs("div",{className:"grid grid-cols-2 gap-0 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx(Qm,{label:"WITH Skill",output:U.skillOutput,accentColor:U.winner==="skill"?"var(--green)":void 0}),n.jsx(Qm,{label:"WITHOUT Skill",output:U.baselineOutput,accentColor:U.winner==="baseline"?"var(--red)":void 0,hasBorderLeft:!0})]})]},U.eval_id)}),f&&Z.length>1&&n.jsx(xh,{title:"Score Comparison — With Skill vs Without",groups:Z.map(U=>({label:U.eval_name||`Eval #${U.eval_id}`,values:[{value:(U.skillContentScore+U.skillStructureScore)/2,label:`${U.skillContentScore+U.skillStructureScore}/10`},{value:(U.baselineContentScore+U.baselineStructureScore)/2,label:`${U.baselineContentScore+U.baselineStructureScore}/10`}]})),seriesColors:["#6383ff","#a0a0a0"],seriesLabels:["With Skill","Without Skill"],maxValue:5,yLabel:"Avg Score"}),f&&($==null?void 0:$.verdict)&&(()=>{const U=Ym[$.verdict]||Ym.INEFFECTIVE;return n.jsxs("div",{className:"glass-card p-8 text-center animate-fade-in-scale",style:{borderColor:U.border,borderWidth:2,boxShadow:`0 0 40px ${U.glow}`},children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-widest mb-2",style:{color:"var(--text-tertiary)"},children:"Verdict"}),n.jsx("div",{className:"text-[32px] font-bold tracking-tight",style:{color:U.text},children:$.verdict}),$.comparison&&n.jsxs("div",{className:"flex justify-center gap-8 mt-5",children:[n.jsx(tc,{label:"Skill Avg",value:$.comparison.skillRubricAvg.toFixed(1)}),n.jsx(tc,{label:"Baseline Avg",value:$.comparison.baselineRubricAvg.toFixed(1)}),n.jsx(tc,{label:"Delta",value:`${$.comparison.delta>0?"+":""}${$.comparison.delta.toFixed(1)}`,color:$.comparison.delta>0?"var(--green)":$.comparison.delta<0?"var(--red)":"var(--text-secondary)"})]}),$.overall_pass_rate!==void 0&&n.jsxs("div",{className:"text-[12px] mt-3",style:{color:"var(--text-tertiary)"},children:["Assertion pass rate: ",Math.round($.overall_pass_rate*100),"%"]})]})})()]}),c&&Z.length===0&&z.length===0&&n.jsxs("div",{className:"text-center py-16 animate-fade-in",children:[n.jsx("div",{className:"spinner-lg mx-auto mb-4"}),n.jsx("p",{className:"text-[14px]",style:{color:"var(--text-secondary)"},children:"Generating WITH and WITHOUT outputs..."}),n.jsx("p",{className:"text-[12px] mt-1",style:{color:"var(--text-tertiary)"},children:J?`Processing: ${J.eval_name||`Eval #${J.eval_id}`}`:"Then blind-scoring both responses"})]})]})}function Gm({label:r,contentScore:u,structureScore:d,isWinner:c}){const f=((u+d)/2).toFixed(1),m=parseFloat(f),p=m>=4?"var(--green)":m>=3?"var(--yellow)":"var(--red)";return n.jsxs("div",{className:"rounded-xl p-4",style:{background:"var(--surface-2)",border:c?"1px solid var(--green)":"1px solid transparent",boxShadow:c?"0 0 20px var(--green-muted)":"none"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wide",style:{color:"var(--text-tertiary)"},children:r}),n.jsx("div",{className:"text-[16px] font-bold",style:{color:p},children:f})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(Xm,{label:"Content",score:u}),n.jsx(Xm,{label:"Structure",score:d})]})]})}function Xm({label:r,score:u}){const d=u/5*100,c=u>=4?"var(--green)":u>=3?"var(--yellow)":"var(--red)";return n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"text-[11px] w-16",style:{color:"var(--text-tertiary)"},children:r}),n.jsx("div",{className:"flex-1 h-1.5 rounded-full",style:{background:"var(--surface-3)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${d}%`,background:c}})}),n.jsx("div",{className:"text-[12px] font-semibold w-5 text-right",style:{color:c},children:u})]})}function Qm({label:r,output:u,accentColor:d,hasBorderLeft:c}){return n.jsxs("div",{className:"p-4",style:{borderLeft:c?"1px solid var(--border-subtle)":void 0},children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d&&n.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:d}}),n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:d||"var(--text-tertiary)"},children:r})]}),n.jsx("div",{className:"text-[12px] leading-relaxed p-3 rounded-lg max-h-64 overflow-y-auto whitespace-pre-wrap",style:{background:"var(--surface-1)",color:"var(--text-secondary)",fontFamily:"var(--font-mono, monospace)"},children:u||"(empty output)"})]})}function tc({label:r,value:u,color:d}){return n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-[18px] font-bold",style:{color:d||"var(--text-primary)"},children:u}),n.jsx("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:r})]})}const lc={benchmark:"#6383ff",comparison:"#a78bfa",baseline:"#fb923c"},Zm={benchmark:"Benchmark",comparison:"Comparison",baseline:"Baseline"},uc=600,cc=180,ct=40,ac=uc-ct*2,Gl=cc-ct*2,Zy=[25,50,75,100];function Vm(r){return new Date(r).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Vy({entries:r}){const[u,d]=g.useState(null);if(r.length<2)return null;const c=r.length,f=r.map((j,v)=>{const x=ct+v/(c-1)*ac,S=j.passRate*100,y=ct+Gl-S/100*Gl;return{x,y,pct:S,entry:j}}),m=f.map(j=>`${j.x},${j.y}`).join(" "),p=Array.from(new Set(r.map(j=>j.type)));return n.jsxs("div",{className:"glass-card p-5 animate-fade-in",style:{position:"relative"},children:[n.jsx("div",{className:"text-[13px] font-semibold mb-2",style:{color:"var(--text-primary)"},children:"Pass Rate Trend"}),n.jsx("div",{className:"flex items-center gap-5 mb-3",children:p.map(j=>n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-3 h-3 rounded-full",style:{background:lc[j]??"var(--text-tertiary)"}}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:Zm[j]??j})]},j))}),n.jsxs("svg",{width:uc,height:cc,viewBox:`0 0 ${uc} ${cc}`,style:{display:"block",overflow:"visible"},children:[Zy.map(j=>{const v=ct+Gl-j/100*Gl;return n.jsxs("g",{children:[n.jsx("line",{x1:ct,y1:v,x2:ct+ac,y2:v,stroke:"var(--border-subtle)",strokeWidth:.5,strokeDasharray:"4 4"}),n.jsxs("text",{x:ct-8,y:v+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:[j,"%"]})]},j)}),n.jsx("line",{x1:ct,y1:ct+Gl,x2:ct+ac,y2:ct+Gl,stroke:"var(--border-subtle)",strokeWidth:1}),n.jsx("text",{x:ct-8,y:ct+Gl+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:"0%"}),n.jsx("polyline",{points:m,fill:"none",stroke:"var(--border-subtle)",strokeWidth:1.5,strokeLinejoin:"round"}),f.map((j,v)=>n.jsx("circle",{cx:j.x,cy:j.y,r:5,fill:lc[j.entry.type]??"var(--text-tertiary)",stroke:"var(--surface-2)",strokeWidth:2,style:{cursor:"pointer",transition:"r 0.15s ease"},onMouseEnter:x=>{x.currentTarget.setAttribute("r","7"),d({x:j.x,y:j.y,entry:j.entry})},onMouseLeave:x=>{x.currentTarget.setAttribute("r","5"),d(null)}},v)),Ky(c).map(j=>n.jsx("text",{x:f[j].x,y:ct+Gl+16,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:10},children:Vm(r[j].timestamp)},j))]}),u&&n.jsxs("div",{style:{position:"absolute",left:u.x,top:u.y-12,transform:"translate(-50%, -100%)",background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:8,padding:"8px 12px",pointerEvents:"none",zIndex:10,whiteSpace:"nowrap"},children:[n.jsx("div",{className:"text-[11px] font-medium",style:{color:"var(--text-primary)"},children:Vm(u.entry.timestamp)}),n.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-tertiary)"},children:u.entry.model}),n.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[n.jsx("span",{className:"text-[9px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:lc[u.entry.type]??"var(--text-tertiary)",color:"#fff"},children:Zm[u.entry.type]??u.entry.type}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--text-primary)"},children:[Math.round(u.entry.passRate*100),"%"]})]})]})]})}function Ky(r){return r<=3?Array.from({length:r},(u,d)=>d):r<=6?[0,Math.floor(r/2),r-1]:[0,Math.floor(r/3),Math.floor(2*r/3),r-1]}function Km(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function $y(r){const u=new Date(r);return u.toLocaleDateString(void 0,{month:"short",day:"numeric"})+", "+u.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function Jy(r){return r==null?"--":r>=1e3?`${(r/1e3).toFixed(1)}s`:`${r}ms`}function Wy({entries:r}){if(r.length<2)return null;const u=80,d=24,c=2,f=r.slice().reverse(),m=f.length,p=f.map((j,v)=>{const x=c+v/(m-1)*(u-c*2),S=c+(d-c*2)-j.pass_rate*(d-c*2);return`${x},${S}`});return n.jsxs("svg",{width:u,height:d,style:{display:"block",flexShrink:0},children:[n.jsx("polyline",{points:p.join(" "),fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),p.length>0&&n.jsx("circle",{cx:parseFloat(p[p.length-1].split(",")[0]),cy:parseFloat(p[p.length-1].split(",")[1]),r:2.5,fill:"var(--accent)"})]})}function Fy({plugin:r,skill:u}){const[d,c]=g.useState(null),[f,m]=g.useState(null),[p,j]=g.useState({}),[v,x]=g.useState({});g.useEffect(()=>{Ae.getEvals(r,u).then(c).catch(()=>c(null))},[r,u]);async function S(y){if(f===y){m(null);return}if(m(y),!p[y]){x(R=>({...R,[y]:!0}));try{const R=await Ae.getCaseHistory(r,u,y);j(X=>({...X,[y]:R}))}catch{j(R=>({...R,[y]:[]}))}finally{x(R=>({...R,[y]:!1}))}}}return d?n.jsx("div",{className:"space-y-2 stagger-children",children:d.evals.map(y=>{const R=p[y.id]||[],X=f===y.id,Q=v[y.id],Z=R.length>0?R[0].pass_rate:null;return n.jsxs("div",{className:"glass-card overflow-hidden",children:[n.jsxs("button",{onClick:()=>S(y.id),className:"w-full text-left p-4 flex items-center gap-3 transition-colors duration-150",style:{background:X?"var(--surface-2)":"transparent"},onMouseEnter:z=>{X||(z.currentTarget.style.background="var(--surface-2)")},onMouseLeave:z=>{X||(z.currentTarget.style.background="transparent")},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",strokeLinecap:"round",style:{transform:X?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease",flexShrink:0},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",y.id]}),n.jsx("span",{className:"text-[13px] font-medium flex-1 truncate",style:{color:"var(--text-primary)"},children:y.name}),R.length>=2&&n.jsx(Wy,{entries:R}),Z!=null&&n.jsxs("span",{className:"text-[12px] font-semibold flex-shrink-0",style:{color:Km(Z)},children:[Math.round(Z*100),"%"]}),R.length>0&&n.jsxs("span",{className:"text-[10px] flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[R.length," runs"]})]}),X&&n.jsx("div",{className:"border-t animate-fade-in",style:{borderColor:"var(--border-subtle)"},children:Q?n.jsxs("div",{className:"p-4 flex items-center gap-2",children:[n.jsx("div",{className:"spinner",style:{width:14,height:14}}),n.jsx("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading history..."})]}):R.length===0?n.jsx("div",{className:"p-4",children:n.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"No history for this eval case"})}):n.jsx("div",{className:"divide-y",style:{borderColor:"var(--border-subtle)"},children:R.map((z,O)=>n.jsxs("div",{className:"p-4",style:{background:O===0?"var(--surface-2)":"transparent"},children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:$y(z.timestamp)}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:z.model}),n.jsx("span",{className:"pill",style:{fontSize:9,padding:"1px 6px",background:z.type==="benchmark"?"rgba(99,131,255,0.15)":z.type==="comparison"?"var(--purple-muted)":"rgba(251,146,60,0.15)",color:z.type==="benchmark"?"#6383ff":z.type==="comparison"?"var(--purple)":"#fb923c"},children:z.type}),n.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:Km(z.pass_rate)},children:[Math.round(z.pass_rate*100),"%"]})]}),n.jsxs("div",{className:"flex items-center gap-4 mb-2 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[z.durationMs!=null&&n.jsx("span",{children:Jy(z.durationMs)}),z.tokens!=null&&n.jsxs("span",{children:[z.tokens>=1e3?`${(z.tokens/1e3).toFixed(1)}k`:z.tokens," tok"]})]}),n.jsx("div",{className:"space-y-1",children:z.assertions.map(Y=>n.jsxs("div",{className:"flex items-start gap-2 py-0.5",children:[n.jsx("div",{className:"w-3.5 h-3.5 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:Y.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"7",height:"7",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",children:Y.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[11px]",style:{color:"var(--text-primary)"},children:Y.text}),Y.reasoning&&n.jsx("div",{className:"text-[10px] mt-0.5",style:{color:"var(--text-tertiary)"},children:Y.reasoning})]})]},Y.id))})]},O))})})]},y.id)})}):n.jsx("div",{className:"text-center py-12",children:n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No eval cases found"})})}function Ti(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function Py(r){return r>=1e3?`${(r/1e3).toFixed(1)}s`:`${Math.round(r)}ms`}function Iy({rate:r,label:u}){const d=Math.round(r*100);return n.jsx("div",{className:"flex items-center gap-3",children:n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-[11px] truncate",style:{color:"var(--text-primary)",maxWidth:"70%"},children:u}),n.jsxs("span",{className:"text-[11px] font-semibold",style:{color:Ti(r)},children:[d,"%"]})]}),n.jsx("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:"var(--surface-3)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${d}%`,background:Ti(r)}})})]})})}function e1({points:r}){if(r.length<2)return null;const u=200,d=48,c=4,f=r.length,m=r.map((v,x)=>{const S=c+x/(f-1)*(u-c*2),y=c+(d-c*2)-v.passRate*(d-c*2);return{x:S,y}}),p=`M ${m[0].x},${d-c} `+m.map(v=>`L ${v.x},${v.y}`).join(" ")+` L ${m[m.length-1].x},${d-c} Z`,j=m.map((v,x)=>`${x===0?"M":"L"} ${v.x},${v.y}`).join(" ");return n.jsxs("svg",{width:u,height:d,style:{display:"block"},children:[n.jsx("path",{d:p,fill:"var(--accent-muted)"}),n.jsx("path",{d:j,fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),n.jsx("circle",{cx:m[m.length-1].x,cy:m[m.length-1].y,r:3,fill:"var(--accent)"})]})}function t1({plugin:r,skill:u}){const d=da(),[c,f]=g.useState(null),[m,p]=g.useState(!0);if(g.useEffect(()=>{p(!0),Ae.getStats(r,u).then(f).catch(()=>f(null)).finally(()=>p(!1))},[r,u]),m)return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"skeleton h-24 rounded-xl"}),n.jsx("div",{className:"skeleton h-48 rounded-xl"}),n.jsx("div",{className:"skeleton h-36 rounded-xl"})]});if(!c||c.totalRuns===0)return n.jsxs("div",{className:"text-center py-12",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"var(--surface-2)"},children:n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",children:[n.jsx("path",{d:"M18 20V10"}),n.jsx("path",{d:"M12 20V4"}),n.jsx("path",{d:"M6 20v-6"})]})}),n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark data yet"}),n.jsx("p",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:"Run some benchmarks to see statistics"})]});const j=c.trendPoints.length>0?c.trendPoints[c.trendPoints.length-1].passRate:0,v=c.trendPoints.length>0?c.trendPoints[0].passRate:0,x=j-v,S=c.assertionStats.slice(0,10);return n.jsxs("div",{className:"space-y-4 stagger-children",children:[n.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Total Runs"}),n.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:c.totalRuns})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Latest Pass Rate"}),n.jsxs("div",{className:"text-[24px] font-bold",style:{color:Ti(j)},children:[Math.round(j*100),"%"]})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Trend"}),n.jsxs("div",{className:"text-[24px] font-bold",style:{color:x>=0?"var(--green)":"var(--red)"},children:[x>=0?"+":"",Math.round(x*100),"%"]})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Models Tested"}),n.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:c.modelStats.length})]})]}),c.trendPoints.length>=2&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Pass Rate Over Time"}),n.jsx(e1,{points:c.trendPoints})]}),c.modelStats.length>0&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Model Performance"}),n.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[n.jsx("thead",{children:n.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("th",{style:{textAlign:"left",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Model"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Runs"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Pass Rate"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Duration"})]})}),n.jsx("tbody",{children:c.modelStats.map(y=>n.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("td",{style:{padding:"8px",color:"var(--text-primary)",fontWeight:500},children:y.model}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:y.runs}),n.jsx("td",{style:{padding:"8px",textAlign:"center"},children:n.jsxs("span",{className:"font-semibold",style:{color:Ti(y.avgPassRate)},children:[Math.round(y.avgPassRate*100),"%"]})}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:Py(y.avgDurationMs)})]},y.model))})]})]}),S.length>0&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Weakest Assertions"}),n.jsx("div",{className:"space-y-3",children:S.map(y=>n.jsxs("button",{className:"block w-full text-left rounded-lg p-2 -mx-2 transition-colors duration-150",style:{background:"transparent"},onMouseEnter:R=>{R.currentTarget.style.background="var(--surface-2)"},onMouseLeave:R=>{R.currentTarget.style.background="transparent"},onClick:()=>d(`/skills/${r}/${u}/history?tab=per-eval`),children:[n.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[n.jsxs("span",{className:"text-[10px] font-mono px-1 py-0.5 rounded flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",y.evalId]}),n.jsx("span",{className:"text-[10px] truncate",style:{color:"var(--text-tertiary)"},children:y.evalName}),n.jsxs("span",{className:"text-[10px] ml-auto flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[y.totalRuns," runs"]})]}),n.jsx(Iy,{rate:y.passRate,label:y.text})]},`${y.evalId}:${y.id}`))})]})]})}function ph(r){const u=new Date(r);return u.toLocaleDateString(void 0,{month:"short",day:"numeric"})+", "+u.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function ki(r){return r==null?"--":r>=1e3?`${(r/1e3).toFixed(1)}s`:`${r}ms`}function Wn(r){return r==null?"--":r>=1e3?`${(r/1e3).toFixed(1)}k tok`:`${r} tok`}function Ni(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}const l1={benchmark:{bg:"rgba(99,131,255,0.15)",fg:"#6383ff",label:"Benchmark"},comparison:{bg:"var(--purple-muted)",fg:"var(--purple)",label:"A/B"},baseline:{bg:"rgba(251,146,60,0.15)",fg:"#fb923c",label:"Baseline"}};function vh(r){return r?r==="EFFECTIVE"?"var(--green)":r==="MARGINAL"?"var(--yellow)":r==="DEGRADING"?"var(--red)":"var(--text-secondary)":"var(--text-tertiary)"}function a1({models:r,filters:u,onChange:d}){const c=!!(u.model||u.type||u.from||u.to),f={background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:8,padding:"4px 8px",fontSize:12,color:"var(--text-primary)",outline:"none"};return n.jsxs("div",{className:"flex items-center gap-3 flex-wrap animate-fade-in",style:{marginBottom:16},children:[n.jsxs("select",{value:u.model??"",onChange:m=>d({...u,model:m.target.value||void 0}),style:f,children:[n.jsx("option",{value:"",children:"All models"}),r.map(m=>n.jsx("option",{value:m,children:m},m))]}),n.jsxs("select",{value:u.type??"",onChange:m=>d({...u,type:m.target.value||void 0}),style:f,children:[n.jsx("option",{value:"",children:"All types"}),n.jsx("option",{value:"benchmark",children:"Benchmark"}),n.jsx("option",{value:"comparison",children:"Comparison"}),n.jsx("option",{value:"baseline",children:"Baseline"})]}),n.jsx("input",{type:"date",value:u.from??"",onChange:m=>d({...u,from:m.target.value||void 0}),style:f,placeholder:"From"}),n.jsx("input",{type:"date",value:u.to??"",onChange:m=>d({...u,to:m.target.value||void 0}),style:f,placeholder:"To"}),c&&n.jsx("button",{className:"btn btn-ghost",style:{fontSize:12,padding:"4px 10px"},onClick:()=>d({}),children:"Clear Filters"})]})}function n1({result:r}){const{runA:u,runB:d,caseDiffs:c}=r;return n.jsxs("div",{className:"space-y-3 animate-slide-in-right",children:[n.jsx("div",{className:"glass-card p-4",children:n.jsx("div",{className:"grid grid-cols-2 gap-4",children:[u,d].map((f,m)=>n.jsxs("div",{children:[n.jsxs("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:["Run ",m===0?"A":"B"]}),n.jsx("div",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:ph(f.timestamp)}),n.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-tertiary)"},children:f.model}),n.jsxs("div",{className:"text-[12px] font-semibold mt-1",style:{color:Ni(f.passRate)},children:[Math.round(f.passRate*100),"% pass"]})]},m))})}),n.jsx("div",{className:"glass-card p-4 overflow-x-auto",children:n.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[n.jsx("thead",{children:n.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("th",{style:{textAlign:"left",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Case"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Run A"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Run B"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Duration"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Tokens"})]})}),n.jsx("tbody",{children:c.map(f=>{const m=f.statusA==="pass"&&f.statusB!=="pass",p=f.statusA!=="pass"&&f.statusB==="pass",j=m?"var(--red-muted)":p?"var(--green-muted)":"transparent";return n.jsxs("tr",{style:{background:j,borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("td",{style:{padding:"8px",color:"var(--text-primary)",fontWeight:500},children:f.eval_name}),n.jsx("td",{style:{padding:"8px",textAlign:"center"},children:f.statusA==="missing"?n.jsx("span",{className:"pill",style:{background:"var(--surface-3)",color:"var(--text-tertiary)",fontSize:9,padding:"1px 6px"},children:"removed"}):n.jsxs("span",{style:{color:Ni(f.passRateA??0),fontWeight:600,fontFamily:"var(--font-mono, monospace)"},children:[f.statusA," ",f.passRateA!=null?`${Math.round(f.passRateA*100)}%`:""]})}),n.jsx("td",{style:{padding:"8px",textAlign:"center"},children:f.statusB==="missing"?n.jsx("span",{className:"pill",style:{background:"var(--surface-3)",color:"var(--text-tertiary)",fontSize:9,padding:"1px 6px"},children:"new"}):n.jsxs("span",{style:{color:Ni(f.passRateB??0),fontWeight:600,fontFamily:"var(--font-mono, monospace)"},children:[f.statusB," ",f.passRateB!=null?`${Math.round(f.passRateB*100)}%`:""]})}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",fontSize:11,color:"var(--text-secondary)"},children:f.durationMsA!=null||f.durationMsB!=null?`${ki(f.durationMsA??void 0)} / ${ki(f.durationMsB??void 0)}`:"--"}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",fontSize:11,color:"var(--text-secondary)"},children:f.tokensA!=null||f.tokensB!=null?`${Wn(f.tokensA)} / ${Wn(f.tokensB)}`:"--"})]},f.eval_id)})})]})}),r.regressions.length>0&&n.jsxs("div",{className:"glass-card p-4",children:[n.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-widest mb-2",style:{color:"var(--text-tertiary)"},children:["Assertion Changes (",r.regressions.length,")"]}),n.jsx("div",{className:"space-y-1",children:r.regressions.map((f,m)=>n.jsxs("div",{className:"flex items-center gap-2 text-[12px]",style:{color:f.change==="regression"?"var(--red)":"var(--green)"},children:[n.jsx("span",{children:f.change==="regression"?"↓":"↑"}),n.jsxs("span",{style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)",fontSize:10},children:["#",f.evalId]}),n.jsx("span",{style:{color:"var(--text-primary)"},children:f.evalName}),n.jsx("span",{className:"pill",style:{background:f.change==="regression"?"var(--red-muted)":"var(--green-muted)",color:f.change==="regression"?"var(--red)":"var(--green)",fontSize:9,padding:"1px 6px"},children:f.change})]},m))})]})]})}function s1({run:r,plugin:u,skill:d,onDelete:c}){const f=da();return n.jsxs("div",{className:"space-y-3 animate-slide-in-right",children:[n.jsxs("div",{className:"glass-card p-4",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:new Date(r.timestamp).toLocaleString()}),n.jsx("div",{className:"text-[12px] mt-0.5",style:{color:"var(--text-tertiary)"},children:r.model})]}),r.verdict&&n.jsx("span",{className:"text-[14px] font-bold",style:{color:vh(r.verdict)},children:r.verdict})]}),n.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[n.jsx("button",{className:"btn btn-ghost",style:{fontSize:11,padding:"3px 10px"},onClick:()=>f(`/skills/${u}/${d}/benchmark?autostart=true`),children:"Rerun Benchmark"}),n.jsx("button",{className:"btn btn-ghost",style:{fontSize:11,padding:"3px 10px"},onClick:()=>f(`/skills/${u}/${d}/benchmark?mode=baseline&autostart=true`),children:"Run Baseline"}),n.jsx("button",{className:"btn btn-purple",style:{fontSize:11,padding:"3px 10px"},onClick:()=>f(`/skills/${u}/${d}/compare?autostart=true`),children:"Run A/B"}),n.jsx("div",{style:{flex:1}}),n.jsx("button",{className:"btn btn-ghost",style:{fontSize:11,padding:"3px 10px",color:"var(--red)"},onClick:()=>{confirm("Delete this run?")&&c(r.timestamp)},children:"Delete"})]})]}),r.cases.map(m=>n.jsxs("div",{className:"glass-card p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",m.eval_id]}),n.jsx("h4",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:m.eval_name})]}),n.jsxs("span",{className:"pill",style:{background:m.status==="pass"?"var(--green-muted)":m.status==="error"?"var(--yellow-muted)":"var(--red-muted)",color:m.status==="pass"?"var(--green)":m.status==="error"?"var(--yellow)":"var(--red)"},children:[m.status," (",Math.round(m.pass_rate*100),"%)"]})]}),(m.durationMs!=null||m.inputTokens!=null||m.outputTokens!=null)&&n.jsxs("div",{className:"flex items-center gap-4 mb-3 text-[11px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[m.durationMs!=null&&n.jsx("span",{children:ki(m.durationMs)}),m.inputTokens!=null&&n.jsxs("span",{children:[Wn(m.inputTokens)," in"]}),m.outputTokens!=null&&n.jsxs("span",{children:[Wn(m.outputTokens)," out"]})]}),m.error_message&&n.jsx("div",{className:"text-[12px] mb-3 p-2 rounded",style:{background:"var(--red-muted)",color:"var(--red)"},children:m.error_message}),n.jsx("div",{className:"space-y-1.5",children:m.assertions.map(p=>n.jsxs("div",{className:"flex items-start gap-2.5 py-1.5",children:[n.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:p.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",children:p.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[12px]",style:{color:"var(--text-primary)"},children:p.text}),n.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-tertiary)"},children:p.reasoning})]})]},p.id))})]},m.eval_id))]})}function i1(){const{plugin:r,skill:u}=Ai(),d=da(),[c,f]=vc(),m=c.get("tab")||"timeline",[p,j]=g.useState([]),[v,x]=g.useState(!0),[S,y]=g.useState({}),[R,X]=g.useState(null),[Q,Z]=g.useState(null),[z,O]=g.useState(!1),[Y,J]=g.useState(new Set),[V,$]=g.useState(null),[U,P]=g.useState(!1),ue=g.useMemo(()=>{const C=new Set(p.map(ee=>ee.model));return Array.from(C).sort()},[p]),ye=g.useCallback(async C=>{if(!(!r||!u)){x(!0);try{const ee=await Ae.getHistory(r,u,C);j(ee)}catch{j([])}finally{x(!1)}}},[r,u]);g.useEffect(()=>{ye(S)},[ye,S]);function we(C){y(C),X(null),Z(null),$(null),J(new Set)}async function le(C){if(!(!r||!u)){$(null),Z(C);try{const ee=await Ae.getHistoryEntry(r,u,C);X(ee)}catch{X(null)}}}async function je(C){if(!(!r||!u))try{await Ae.deleteHistoryEntry(r,u,C),X(null),Z(null),ye(S)}catch{}}function _e(C){J(ee=>{const ae=new Set(ee);if(ae.has(C))ae.delete(C);else{if(ae.size>=2)return ee;ae.add(C)}return ae})}async function Ue(){if(!r||!u)return;const[C,ee]=Array.from(Y);if(!(!C||!ee)){P(!0);try{const ae=await Ae.compareRuns(r,u,C,ee);$(ae),X(null),Z(null)}catch{$(null)}finally{P(!1)}}}function ke(){z?(O(!1),J(new Set),$(null)):(O(!0),$(null))}if(v&&p.length===0)return n.jsxs("div",{className:"px-10 py-8 max-w-6xl",children:[n.jsx("div",{className:"skeleton h-5 w-48 mb-6"}),n.jsx("div",{className:"skeleton h-48 rounded-xl mb-4"}),n.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("div",{className:"skeleton h-20 rounded-xl"}),n.jsx("div",{className:"skeleton h-20 rounded-xl"}),n.jsx("div",{className:"skeleton h-20 rounded-xl"})]}),n.jsx("div",{className:"col-span-2",children:n.jsx("div",{className:"skeleton h-48 rounded-xl"})})]})]});const T=!!(S.model||S.type||S.from||S.to);return n.jsxs("div",{className:"px-10 py-8 max-w-6xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-5 text-[13px]",children:[n.jsx(Xt,{to:`/skills/${r}/${u}`,className:"transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:C=>{C.currentTarget.style.color="var(--text-primary)"},onMouseLeave:C=>{C.currentTarget.style.color="var(--text-tertiary)"},children:u}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"History"})]}),n.jsx("div",{className:"flex items-center gap-1 mb-5 p-1 rounded-lg",style:{background:"var(--surface-2)",display:"inline-flex"},children:["timeline","per-eval","statistics"].map(C=>{const ee={timeline:"Timeline","per-eval":"Per Eval",statistics:"Statistics"},ae=m===C;return n.jsx("button",{onClick:()=>f({tab:C}),className:"px-4 py-1.5 rounded-md text-[12px] font-medium transition-all duration-150",style:{background:ae?"var(--surface-4)":"transparent",color:ae?"var(--text-primary)":"var(--text-tertiary)",boxShadow:ae?"0 1px 3px rgba(0,0,0,0.2)":"none"},onMouseEnter:fe=>{ae||(fe.currentTarget.style.color="var(--text-secondary)")},onMouseLeave:fe=>{ae||(fe.currentTarget.style.color=ae?"var(--text-primary)":"var(--text-tertiary)")},children:ee[C]},C)})}),m==="per-eval"&&r&&u&&n.jsx(Fy,{plugin:r,skill:u}),m==="statistics"&&r&&u&&n.jsx(t1,{plugin:r,skill:u}),m==="timeline"&&n.jsxs(n.Fragment,{children:[p.length>=2&&n.jsx("div",{style:{marginBottom:16},children:n.jsx(Vy,{entries:p.slice().reverse()})}),n.jsx(a1,{models:ue,filters:S,onChange:we}),n.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[n.jsxs("div",{className:"col-span-1",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3 px-1",children:[n.jsxs("div",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:["Past Runs (",p.length,")"]}),n.jsxs("div",{className:"flex items-center gap-2",children:[z&&Y.size===2&&n.jsx("button",{className:"btn btn-primary",style:{fontSize:10,padding:"2px 8px"},onClick:Ue,disabled:U,children:U?"Comparing...":"Compare Selected"}),n.jsx("button",{className:`btn ${z?"btn-purple":"btn-ghost"}`,style:{fontSize:10,padding:"2px 8px"},onClick:ke,children:"Compare"})]})]}),p.length===0&&!T&&n.jsxs("div",{className:"text-center py-8",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"var(--surface-2)"},children:n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"12 6 12 12 16 14"})]})}),n.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"No benchmark runs yet"})]}),p.length===0&&T&&n.jsx("div",{className:"text-center py-8",children:n.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"No runs match current filters"})}),n.jsx("div",{className:"space-y-1.5 stagger-children",children:p.map(C=>{const ee=Q===C.timestamp,ae=Ni(C.passRate),fe=l1[C.type],N=Y.has(C.timestamp);return n.jsxs("div",{className:"flex items-start gap-2",children:[z&&n.jsx("label",{className:"flex items-center justify-center mt-3.5 flex-shrink-0 cursor-pointer",style:{width:18,height:18},children:n.jsx("input",{type:"checkbox",checked:N,onChange:()=>_e(C.timestamp),disabled:!N&&Y.size>=2,style:{accentColor:"var(--purple)"}})}),n.jsxs("button",{onClick:()=>le(C.timestamp),className:"w-full text-left p-3.5 rounded-xl transition-all duration-150",style:{background:ee?"var(--accent-muted)":"var(--surface-1)",border:ee?"1px solid var(--border-active)":"1px solid var(--border-subtle)"},onMouseEnter:B=>{ee||(B.currentTarget.style.borderColor="var(--border-hover)")},onMouseLeave:B=>{ee||(B.currentTarget.style.borderColor="var(--border-subtle)")},children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:ph(C.timestamp)}),fe&&n.jsx("span",{className:"pill",style:{background:fe.bg,color:fe.fg,fontSize:9,padding:"1px 6px"},children:fe.label})]}),n.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:C.model}),n.jsxs("span",{className:"text-[11px] font-semibold",style:{color:ae},children:[Math.round(C.passRate*100),"%"]})]}),n.jsxs("div",{className:"flex items-center gap-3 mt-1.5 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[n.jsxs("span",{children:[C.caseCount??0," cases"]}),n.jsx("span",{children:ki(C.totalDurationMs??void 0)}),n.jsx("span",{children:Wn(C.totalTokens)})]}),C.type==="comparison"&&C.verdict&&n.jsx("div",{className:"mt-1.5",children:n.jsx("span",{className:"pill",style:{background:C.verdict==="EFFECTIVE"?"var(--green-muted)":C.verdict==="MARGINAL"?"var(--yellow-muted)":C.verdict==="DEGRADING"?"var(--red-muted)":"var(--surface-3)",color:vh(C.verdict),fontSize:9,padding:"1px 6px"},children:C.verdict})})]})]},C.timestamp)})})]}),n.jsx("div",{className:"col-span-2",children:V?n.jsx(n1,{result:V}):R&&r&&u?n.jsx(s1,{run:R,plugin:r,skill:u,onDelete:je}):n.jsxs("div",{className:"text-center py-20",children:[n.jsx("button",{onClick:()=>d(`/skills/${r}/${u}`),className:"w-14 h-14 rounded-2xl flex items-center justify-center mx-auto mb-4 transition-all duration-150",style:{background:"var(--surface-2)"},onMouseEnter:C=>{C.currentTarget.style.background="var(--surface-3)",C.currentTarget.style.transform="scale(1.05)"},onMouseLeave:C=>{C.currentTarget.style.background="var(--surface-2)",C.currentTarget.style.transform="scale(1)"},title:"Back to skill",children:n.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"15 18 9 12 15 6"})})}),n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:z?"Check two runs and click Compare Selected":"Select a run to view details"})]})})]})]})]})}const $m={TP:{bg:"var(--green-muted)",text:"var(--green)",icon:"check"},TN:{bg:"rgba(52,211,153,0.06)",text:"rgba(52,211,153,0.6)",icon:"check"},FP:{bg:"var(--red-muted)",text:"var(--red)",icon:"x"},FN:{bg:"rgba(248,113,113,0.06)",text:"rgba(248,113,113,0.6)",icon:"x"}},r1=[{label:"Should activate",prompts:["How do I use this feature?","Show me best practices for this","What's the recommended approach?"]},{label:"Should NOT activate",prompts:["!What's the weather today?","!Write me a poem","!How do I cook pasta?"]}];function u1(){const[r,u]=g.useState([]),[d,c]=g.useState(null),[f,m]=g.useState(null),[p,j]=g.useState(""),[v,x]=g.useState(!1),{events:S,running:y,error:R,start:X}=es();g.useEffect(()=>{Ae.getSkills().then(u).catch(()=>{})},[]),g.useEffect(()=>{if(!d){m(null);return}fetch(`/api/skills/${d.plugin}/${d.skill}/description`).then(V=>V.json()).then(V=>m(V.description)).catch(()=>m(null))},[d]);function Q(){if(!d)return;const $=p.trim().split(`
65
+ `).filter(Boolean).map(U=>{const P=U.startsWith("!");return{prompt:P?U.slice(1).trim():U.trim(),expected:P?"should_not_activate":"should_activate"}});X(`/api/skills/${d.plugin}/${d.skill}/activation-test`,{prompts:$})}function Z(V){const $=p.trim(),U=$?`${$}
66
+ ${V.join(`
67
+ `)}`:V.join(`
68
+ `);j(U)}const z=[];let O=null;for(const V of S)V.event==="prompt_result"&&z.push(V.data),V.event==="done"&&(O=V.data);const Y=z.filter(V=>V.classification==="TP"||V.classification==="TN"),J=z.filter(V=>V.classification==="FP"||V.classification==="FN");return n.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[n.jsxs("div",{className:"mb-6",children:[n.jsx("h2",{className:"text-[22px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Description Activation Test"}),n.jsxs("p",{className:"text-[13px] mt-1 max-w-2xl",style:{color:"var(--text-tertiary)"},children:["Tests whether a skill's description activates correctly for relevant prompts and stays silent for irrelevant ones. This validates the ",n.jsx("strong",{children:"auto-activation quality"})," of your skill description."]})]}),n.jsxs("div",{className:"grid grid-cols-5 gap-5 mb-6",children:[n.jsxs("div",{className:"col-span-3 space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[12px] font-medium mb-1.5 block",style:{color:"var(--text-secondary)"},children:"Skill"}),n.jsxs("select",{className:"input-field",value:d?`${d.plugin}/${d.skill}`:"",onChange:V=>{const[$,U]=V.target.value.split("/");c($&&U?{plugin:$,skill:U}:null)},children:[n.jsx("option",{value:"",children:"Select a skill..."}),r.map(V=>n.jsxs("option",{value:`${V.plugin}/${V.skill}`,children:[V.plugin," / ",V.skill]},`${V.plugin}/${V.skill}`))]})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[n.jsx("label",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:"Test Prompts"}),n.jsx("div",{className:"flex gap-1.5",children:r1.map(V=>n.jsxs("button",{onClick:()=>Z(V.prompts),className:"text-[10px] px-2 py-1 rounded-md transition-colors duration-150",style:{background:"var(--surface-2)",color:"var(--text-tertiary)"},onMouseEnter:$=>{$.currentTarget.style.color="var(--text-primary)",$.currentTarget.style.background="var(--surface-3)"},onMouseLeave:$=>{$.currentTarget.style.color="var(--text-tertiary)",$.currentTarget.style.background="var(--surface-2)"},children:["+ ",V.label]},V.label))})]}),n.jsx("textarea",{className:"input-field h-32 resize-y font-mono text-[12px]",value:p,onChange:V=>j(V.target.value),placeholder:`How do I write a unit test?
69
+ What edge cases should I test?
70
+ !What's the weather like today?
71
+ !Write me a poem about flowers`}),n.jsxs("div",{className:"flex items-center gap-4 mt-1.5 text-[11px]",style:{color:"var(--text-tertiary)"},children:[n.jsx("span",{children:"One prompt per line"}),n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx("code",{className:"px-1 rounded",style:{background:"var(--surface-2)"},children:"!"})," prefix = should NOT activate"]}),n.jsxs("span",{children:[p.trim().split(`
72
+ `).filter(Boolean).length," prompt",p.trim().split(`
73
+ `).filter(Boolean).length!==1?"s":""]})]})]})]}),n.jsx("div",{className:"col-span-2",children:n.jsxs("div",{className:"glass-card h-full",children:[n.jsxs("button",{onClick:()=>x(!v),className:"w-full p-3 flex items-center justify-between text-left",style:{borderBottom:v?"1px solid var(--border-subtle)":void 0},children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Skill Description"}),n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:v?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),v&&n.jsx("div",{className:"p-3 animate-fade-in",children:f?n.jsx("div",{className:"text-[12px] leading-relaxed whitespace-pre-wrap",style:{color:"var(--text-secondary)"},children:f}):d?n.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading description..."}):n.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Select a skill to see its description"})}),!v&&f&&n.jsx("div",{className:"px-3 pb-3 pt-1",children:n.jsxs("div",{className:"text-[11px] truncate",style:{color:"var(--text-tertiary)"},children:[f.slice(0,100),f.length>100?"...":""]})})]})})]}),n.jsx("button",{onClick:Q,disabled:y||!d||!p.trim(),className:"btn btn-primary mb-7",children:y?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)",width:14,height:14}})," Testing..."]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("circle",{cx:"12",cy:"12",r:"6"}),n.jsx("circle",{cx:"12",cy:"12",r:"2"})]})," Run Activation Test"]})}),R&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:R}),z.length>0&&n.jsxs("div",{className:"space-y-5 mb-6",children:[J.length>0&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),n.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--red)"},children:["Incorrect (",J.length,")"]}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"— These need attention"})]}),n.jsx("div",{className:"space-y-1.5 stagger-children",children:J.map((V,$)=>n.jsx(Jm,{result:V},`incorrect-${$}`))})]}),Y.length>0&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"16 10 11 15 8 12"})]}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--green)"},children:["Correct (",Y.length,")"]})]}),n.jsx("div",{className:"space-y-1.5 stagger-children",children:Y.map((V,$)=>n.jsx(Jm,{result:V},`correct-${$}`))})]})]}),O&&n.jsxs("div",{className:"glass-card p-6 animate-fade-in-scale",style:{borderColor:"var(--border-active)",borderWidth:2},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-4",style:{color:"var(--text-tertiary)"},children:"Summary"}),n.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-5",children:[n.jsx(nc,{label:"Precision",value:O.precision,description:"Of all activations, how many were correct?",detail:`${O.tp} true / ${O.tp+O.fp} total activations`}),n.jsx(nc,{label:"Recall",value:O.recall,description:"Of expected activations, how many fired?",detail:`${O.tp} activated / ${O.tp+O.fn} expected`}),n.jsx(nc,{label:"Reliability",value:O.reliability,description:"Overall correct classification rate",detail:`${O.tp+O.tn} correct / ${O.total} total`})]}),n.jsxs("div",{className:"pt-4",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-3 text-center",style:{color:"var(--text-tertiary)"},children:"Confusion Matrix"}),n.jsxs("div",{className:"grid grid-cols-2 gap-2 max-w-xs mx-auto",children:[n.jsx(bi,{label:"True Positive",abbr:"TP",count:O.tp,bg:"var(--green-muted)",color:"var(--green)",description:"Correctly activated"}),n.jsx(bi,{label:"False Positive",abbr:"FP",count:O.fp,bg:"var(--red-muted)",color:"var(--red)",description:"Wrongly activated"}),n.jsx(bi,{label:"False Negative",abbr:"FN",count:O.fn,bg:"rgba(248,113,113,0.06)",color:"rgba(248,113,113,0.6)",description:"Missed activation"}),n.jsx(bi,{label:"True Negative",abbr:"TN",count:O.tn,bg:"rgba(52,211,153,0.06)",color:"rgba(52,211,153,0.6)",description:"Correctly silent"})]})]})]}),y&&z.length===0&&n.jsxs("div",{className:"text-center py-16 animate-fade-in",children:[n.jsx("div",{className:"spinner-lg mx-auto mb-4"}),n.jsx("p",{className:"text-[14px]",style:{color:"var(--text-secondary)"},children:"Testing activation against skill description..."})]})]})}function Jm({result:r}){const u=$m[r.classification]||$m.FN,d=r.classification==="TP"||r.classification==="TN";return n.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl transition-all duration-200",style:{background:u.bg,border:"1px solid transparent"},children:[n.jsx("div",{className:"flex-shrink-0 mt-0.5",children:n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:`color-mix(in srgb, ${u.text} 20%, transparent)`},children:d?n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:u.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}):n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:u.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"flex items-center gap-2 mb-1",children:n.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:r.prompt})}),n.jsxs("div",{className:"flex items-center gap-3 text-[12px]",children:[n.jsx("span",{className:"pill",style:{background:"rgba(0,0,0,0.1)",color:u.text,fontWeight:700,fontSize:"10px",padding:"1px 6px"},children:r.classification}),n.jsx("span",{style:{color:r.activate?"var(--green)":"var(--text-tertiary)"},children:r.activate?"Activated":"Silent"}),n.jsx("span",{style:{color:"var(--text-tertiary)"},children:"·"}),n.jsxs("span",{style:{color:"var(--text-tertiary)"},children:["Expected: ",r.expected==="should_activate"?"activate":"stay silent"]}),n.jsx("span",{style:{color:"var(--text-tertiary)"},children:"·"}),n.jsxs("span",{style:{color:"var(--text-tertiary)"},children:[r.confidence," confidence"]})]}),r.reasoning&&n.jsx("div",{className:"text-[11px] mt-1.5",style:{color:"var(--text-tertiary)"},children:r.reasoning})]})]})}function nc({label:r,value:u,description:d,detail:c}){const f=Math.round(u*100),m=f>=80?"var(--green)":f>=60?"var(--yellow)":"var(--red)";return n.jsxs("div",{className:"text-center",children:[n.jsxs("div",{className:"text-[28px] font-bold tracking-tight",style:{color:m},children:[f,"%"]}),n.jsx("div",{className:"text-[12px] font-medium mt-0.5",style:{color:"var(--text-secondary)"},children:r}),n.jsx("div",{className:"text-[10px] mt-1",style:{color:"var(--text-tertiary)"},children:d}),n.jsx("div",{className:"text-[10px] mt-0.5 font-mono",style:{color:"var(--text-tertiary)"},children:c})]})}function bi({label:r,abbr:u,count:d,bg:c,color:f,description:m}){return n.jsxs("div",{className:"text-center p-3 rounded-lg",style:{background:c},children:[n.jsx("div",{className:"text-[20px] font-bold",style:{color:f},children:d}),n.jsx("div",{className:"text-[11px] font-semibold",style:{color:f},children:u}),n.jsx("div",{className:"text-[9px] mt-0.5",style:{color:"var(--text-tertiary)"},children:m})]})}function c1(){const[r,u]=g.useState(null),[d,c]=g.useState(!1),[f,m]=g.useState(!1),p=g.useRef(null);g.useEffect(()=>{Ae.getConfig().then(u).catch(()=>{})},[]),g.useEffect(()=>{function x(S){p.current&&!p.current.contains(S.target)&&c(!1)}return d&&document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[d]);async function j(x,S){m(!0);try{const y=await Ae.setConfig(x.id,S.id);u(y),c(!1)}catch{const y=await Ae.getConfig();u(y)}finally{m(!1)}}if(!r)return null;const v=o1(r);return n.jsxs("div",{ref:p,className:"relative",children:[n.jsxs("button",{onClick:()=>c(!d),className:"w-full flex items-center gap-2 px-3 py-2 rounded-lg text-[12px] transition-all duration-150",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"},onMouseEnter:x=>{x.currentTarget.style.borderColor="var(--accent)"},onMouseLeave:x=>{x.currentTarget.style.borderColor="var(--border-subtle)"},children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"3"}),n.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),n.jsx("span",{className:"flex-1 text-left font-medium truncate",children:v}),n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:d?"rotate(180deg)":"rotate(0)",transition:"transform 0.15s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),d&&n.jsxs("div",{className:"absolute bottom-full mb-1 left-0 w-64 rounded-xl shadow-xl z-50 overflow-hidden animate-fade-in",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"px-4 py-2.5",style:{borderBottom:"1px solid var(--border-subtle)"},children:n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Select Model"})}),n.jsx("div",{className:"py-1 max-h-80 overflow-y-auto",children:r.providers.map(x=>n.jsxs("div",{children:[n.jsxs("div",{className:"px-4 py-1.5 flex items-center gap-2",children:[n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:(x.available,"var(--text-tertiary)"),opacity:x.available?1:.5},children:x.label}),!x.available&&n.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:"unavailable"})]}),x.models.map(S=>{const y=yh(r,x.id,S.id),R=!x.available||f;return n.jsxs("button",{onClick:()=>!R&&j(x,S),disabled:R,className:"w-full px-4 py-2 flex items-center gap-2.5 text-left transition-all duration-100",style:{background:y?"var(--accent-muted)":"transparent",color:R?"var(--text-tertiary)":"var(--text-primary)",opacity:R?.4:1,cursor:R?"not-allowed":"pointer"},onMouseEnter:X=>{!R&&!y&&(X.currentTarget.style.background="var(--surface-3)")},onMouseLeave:X=>{y||(X.currentTarget.style.background="transparent")},children:[n.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0 flex items-center justify-center",style:{border:`2px solid ${y?"var(--accent)":"var(--border-subtle)"}`},children:y&&n.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}})}),n.jsx("span",{className:"text-[12px]",children:S.label})]},`${x.id}-${S.id}`)})]},x.id))})]})]})}function yh(r,u,d){return r.provider!==u?!1:u==="claude-cli"?r.model===`claude-${d}`:r.model===d}function o1(r){for(const u of r.providers)for(const d of u.models)if(yh(r,u.id,d.id))return d.label;return r.model}function d1({active:r}){return n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:r?"#fff":"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),n.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),n.jsx("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})]})}function f1({active:r}){return n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:r?"#fff":"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("circle",{cx:"12",cy:"12",r:"6"}),n.jsx("circle",{cx:"12",cy:"12",r:"2"})]})}const m1=[{path:"/",label:"Skills",Icon:d1},{path:"/activation",label:"Activation Test",Icon:f1}];function h1(){const r=Wt(),[u,d]=g.useState(null);return g.useEffect(()=>{Ae.getConfig().then(c=>d(c.projectName)).catch(()=>{})},[]),n.jsxs("div",{className:"flex h-screen",children:[n.jsxs("nav",{className:"w-[220px] flex flex-col flex-shrink-0",style:{background:"var(--surface-1)",borderRight:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"px-5 py-5",style:{borderBottom:"1px solid var(--border-subtle)"},children:n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"var(--accent-muted)"},children:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[14px] font-semibold",style:{color:"var(--text-primary)",letterSpacing:"-0.01em"},children:"Skill Builder"}),n.jsx("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:u||"vskill"})]})]})}),n.jsxs("div",{className:"flex-1 px-3 py-3",children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest px-2 mb-2",style:{color:"var(--text-tertiary)"},children:"Navigation"}),m1.map(c=>{const f=r.pathname===c.path;return n.jsxs(Xt,{to:c.path,className:"flex items-center gap-2.5 px-3 py-[9px] rounded-lg text-[13px] font-medium mb-0.5 transition-all duration-150",style:{background:f?"var(--accent)":"transparent",color:f?"#fff":"var(--text-secondary)"},onMouseEnter:m=>{f||(m.currentTarget.style.background="var(--surface-3)",m.currentTarget.style.color="var(--text-primary)")},onMouseLeave:m=>{f||(m.currentTarget.style.background="transparent",m.currentTarget.style.color="var(--text-secondary)")},children:[n.jsx(c.Icon,{active:f}),c.label]},c.path)})]}),n.jsxs("div",{className:"px-3 py-3",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest px-2 mb-2",style:{color:"var(--text-tertiary)"},children:"Model"}),n.jsx(c1,{})]})]}),n.jsx("main",{className:"flex-1 overflow-auto",style:{background:"var(--surface-0)"},children:n.jsx("div",{className:"animate-fade-in",children:n.jsxs(Kv,{children:[n.jsx(ca,{path:"/",element:n.jsx(wy,{})}),n.jsx(ca,{path:"/skills/:plugin/:skill",element:n.jsx(By,{})}),n.jsx(ca,{path:"/skills/:plugin/:skill/benchmark",element:n.jsx(Xy,{})}),n.jsx(ca,{path:"/skills/:plugin/:skill/compare",element:n.jsx(Qy,{})}),n.jsx(ca,{path:"/skills/:plugin/:skill/history",element:n.jsx(i1,{})}),n.jsx(ca,{path:"/activation",element:n.jsx(u1,{})})]})},r.pathname)})]})}Wp.createRoot(document.getElementById("root")).render(n.jsx(g.StrictMode,{children:n.jsx(yy,{children:n.jsx(h1,{})})}));