vskill 0.2.83 → 0.2.84
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,87 @@
|
|
|
1
|
+
(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const x of m.addedNodes)x.tagName==="LINK"&&x.rel==="modulepreload"&&u(x)}).observe(document,{childList:!0,subtree:!0});function f(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function u(d){if(d.ep)return;d.ep=!0;const m=f(d);fetch(d.href,m)}})();var Lu={exports:{}},Ln={};/**
|
|
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 mm;function zx(){if(mm)return Ln;mm=1;var r=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function f(u,d,m){var x=null;if(m!==void 0&&(x=""+m),d.key!==void 0&&(x=""+d.key),"key"in d){m={};for(var g in d)g!=="key"&&(m[g]=d[g])}else m=d;return d=m.ref,{$$typeof:r,type:u,key:x,ref:d!==void 0?d:null,props:m}}return Ln.Fragment=c,Ln.jsx=f,Ln.jsxs=f,Ln}var hm;function Dx(){return hm||(hm=1,Lu.exports=zx()),Lu.exports}var s=Dx(),Uu={exports:{}},re={};/**
|
|
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 pm;function Ox(){if(pm)return re;pm=1;var r=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),x=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),C=Symbol.iterator;function O(N){return N===null||typeof N!="object"?null:(N=C&&N[C]||N["@@iterator"],typeof N=="function"?N:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,w={};function M(N,q,W){this.props=N,this.context=q,this.refs=w,this.updater=W||L}M.prototype.isReactComponent={},M.prototype.setState=function(N,q){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,q,"setState")},M.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function V(){}V.prototype=M.prototype;function Y(N,q,W){this.props=N,this.context=q,this.refs=w,this.updater=W||L}var X=Y.prototype=new V;X.constructor=Y,z(X,M.prototype),X.isPureReactComponent=!0;var Q=Array.isArray;function F(){}var $={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function ae(N,q,W){var I=W.ref;return{$$typeof:r,type:N,key:q,ref:I!==void 0?I:null,props:W}}function ee(N,q){return ae(N.type,q,N.props)}function J(N){return typeof N=="object"&&N!==null&&N.$$typeof===r}function fe(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(W){return q[W]})}var te=/\/+/g;function ye(N,q){return typeof N=="object"&&N!==null&&N.key!=null?fe(""+N.key):q.toString(36)}function Ne(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(F,F):(N.status="pending",N.then(function(q){N.status==="pending"&&(N.status="fulfilled",N.value=q)},function(q){N.status==="pending"&&(N.status="rejected",N.reason=q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function D(N,q,W,I,ue){var de=typeof N;(de==="undefined"||de==="boolean")&&(N=null);var Te=!1;if(N===null)Te=!0;else switch(de){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(N.$$typeof){case r:case c:Te=!0;break;case S:return Te=N._init,D(Te(N._payload),q,W,I,ue)}}if(Te)return ue=ue(N),Te=I===""?"."+ye(N,0):I,Q(ue)?(W="",Te!=null&&(W=Te.replace(te,"$&/")+"/"),D(ue,q,W,"",function(Ga){return Ga})):ue!=null&&(J(ue)&&(ue=ee(ue,W+(ue.key==null||N&&N.key===ue.key?"":(""+ue.key).replace(te,"$&/")+"/")+Te)),q.push(ue)),1;Te=0;var tt=I===""?".":I+":";if(Q(N))for(var Be=0;Be<N.length;Be++)I=N[Be],de=tt+ye(I,Be),Te+=D(I,q,W,de,ue);else if(Be=O(N),typeof Be=="function")for(N=Be.call(N),Be=0;!(I=N.next()).done;)I=I.value,de=tt+ye(I,Be++),Te+=D(I,q,W,de,ue);else if(de==="object"){if(typeof N.then=="function")return D(Ne(N),q,W,I,ue);throw q=String(N),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Te}function K(N,q,W){if(N==null)return N;var I=[],ue=0;return D(N,I,"","",function(de){return q.call(W,de,ue++)}),I}function ie(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(W){(N._status===0||N._status===-1)&&(N._status=1,N._result=W)},function(W){(N._status===0||N._status===-1)&&(N._status=2,N._result=W)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var Ee=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=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(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},Z={map:K,forEach:function(N,q,W){K(N,function(){q.apply(this,arguments)},W)},count:function(N){var q=0;return K(N,function(){q++}),q},toArray:function(N){return K(N,function(q){return q})||[]},only:function(N){if(!J(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return re.Activity=v,re.Children=Z,re.Component=M,re.Fragment=f,re.Profiler=d,re.PureComponent=Y,re.StrictMode=u,re.Suspense=y,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,re.__COMPILER_RUNTIME={__proto__:null,c:function(N){return $.H.useMemoCache(N)}},re.cache=function(N){return function(){return N.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(N,q,W){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var I=z({},N.props),ue=N.key;if(q!=null)for(de in q.key!==void 0&&(ue=""+q.key),q)!G.call(q,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&q.ref===void 0||(I[de]=q[de]);var de=arguments.length-2;if(de===1)I.children=W;else if(1<de){for(var Te=Array(de),tt=0;tt<de;tt++)Te[tt]=arguments[tt+2];I.children=Te}return ae(N.type,ue,I)},re.createContext=function(N){return N={$$typeof:x,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:m,_context:N},N},re.createElement=function(N,q,W){var I,ue={},de=null;if(q!=null)for(I in q.key!==void 0&&(de=""+q.key),q)G.call(q,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ue[I]=q[I]);var Te=arguments.length-2;if(Te===1)ue.children=W;else if(1<Te){for(var tt=Array(Te),Be=0;Be<Te;Be++)tt[Be]=arguments[Be+2];ue.children=tt}if(N&&N.defaultProps)for(I in Te=N.defaultProps,Te)ue[I]===void 0&&(ue[I]=Te[I]);return ae(N,de,ue)},re.createRef=function(){return{current:null}},re.forwardRef=function(N){return{$$typeof:g,render:N}},re.isValidElement=J,re.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:ie}},re.memo=function(N,q){return{$$typeof:h,type:N,compare:q===void 0?null:q}},re.startTransition=function(N){var q=$.T,W={};$.T=W;try{var I=N(),ue=$.S;ue!==null&&ue(W,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(F,Ee)}catch(de){Ee(de)}finally{q!==null&&W.types!==null&&(q.types=W.types),$.T=q}},re.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},re.use=function(N){return $.H.use(N)},re.useActionState=function(N,q,W){return $.H.useActionState(N,q,W)},re.useCallback=function(N,q){return $.H.useCallback(N,q)},re.useContext=function(N){return $.H.useContext(N)},re.useDebugValue=function(){},re.useDeferredValue=function(N,q){return $.H.useDeferredValue(N,q)},re.useEffect=function(N,q){return $.H.useEffect(N,q)},re.useEffectEvent=function(N){return $.H.useEffectEvent(N)},re.useId=function(){return $.H.useId()},re.useImperativeHandle=function(N,q,W){return $.H.useImperativeHandle(N,q,W)},re.useInsertionEffect=function(N,q){return $.H.useInsertionEffect(N,q)},re.useLayoutEffect=function(N,q){return $.H.useLayoutEffect(N,q)},re.useMemo=function(N,q){return $.H.useMemo(N,q)},re.useOptimistic=function(N,q){return $.H.useOptimistic(N,q)},re.useReducer=function(N,q,W){return $.H.useReducer(N,q,W)},re.useRef=function(N){return $.H.useRef(N)},re.useState=function(N){return $.H.useState(N)},re.useSyncExternalStore=function(N,q,W){return $.H.useSyncExternalStore(N,q,W)},re.useTransition=function(){return $.H.useTransition()},re.version="19.2.4",re}var xm;function ac(){return xm||(xm=1,Uu.exports=Ox()),Uu.exports}var b=ac(),Bu={exports:{}},Un={},Hu={exports:{}},qu={};/**
|
|
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 vm;function Lx(){return vm||(vm=1,(function(r){function c(D,K){var ie=D.length;D.push(K);e:for(;0<ie;){var Ee=ie-1>>>1,Z=D[Ee];if(0<d(Z,K))D[Ee]=K,D[ie]=Z,ie=Ee;else break e}}function f(D){return D.length===0?null:D[0]}function u(D){if(D.length===0)return null;var K=D[0],ie=D.pop();if(ie!==K){D[0]=ie;e:for(var Ee=0,Z=D.length,N=Z>>>1;Ee<N;){var q=2*(Ee+1)-1,W=D[q],I=q+1,ue=D[I];if(0>d(W,ie))I<Z&&0>d(ue,W)?(D[Ee]=ue,D[I]=ie,Ee=I):(D[Ee]=W,D[q]=ie,Ee=q);else if(I<Z&&0>d(ue,ie))D[Ee]=ue,D[I]=ie,Ee=I;else break e}}return K}function d(D,K){var ie=D.sortIndex-K.sortIndex;return ie!==0?ie:D.id-K.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 x=Date,g=x.now();r.unstable_now=function(){return x.now()-g}}var y=[],h=[],S=1,v=null,C=3,O=!1,L=!1,z=!1,w=!1,M=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function X(D){for(var K=f(h);K!==null;){if(K.callback===null)u(h);else if(K.startTime<=D)u(h),K.sortIndex=K.expirationTime,c(y,K);else break;K=f(h)}}function Q(D){if(z=!1,X(D),!L)if(f(y)!==null)L=!0,F||(F=!0,fe());else{var K=f(h);K!==null&&Ne(Q,K.startTime-D)}}var F=!1,$=-1,G=5,ae=-1;function ee(){return w?!0:!(r.unstable_now()-ae<G)}function J(){if(w=!1,F){var D=r.unstable_now();ae=D;var K=!0;try{e:{L=!1,z&&(z=!1,V($),$=-1),O=!0;var ie=C;try{t:{for(X(D),v=f(y);v!==null&&!(v.expirationTime>D&&ee());){var Ee=v.callback;if(typeof Ee=="function"){v.callback=null,C=v.priorityLevel;var Z=Ee(v.expirationTime<=D);if(D=r.unstable_now(),typeof Z=="function"){v.callback=Z,X(D),K=!0;break t}v===f(y)&&u(y),X(D)}else u(y);v=f(y)}if(v!==null)K=!0;else{var N=f(h);N!==null&&Ne(Q,N.startTime-D),K=!1}}break e}finally{v=null,C=ie,O=!1}K=void 0}}finally{K?fe():F=!1}}}var fe;if(typeof Y=="function")fe=function(){Y(J)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ye=te.port2;te.port1.onmessage=J,fe=function(){ye.postMessage(null)}}else fe=function(){M(J,0)};function Ne(D,K){$=M(function(){D(r.unstable_now())},K)}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(D){D.callback=null},r.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<D?Math.floor(1e3/D):5},r.unstable_getCurrentPriorityLevel=function(){return C},r.unstable_next=function(D){switch(C){case 1:case 2:case 3:var K=3;break;default:K=C}var ie=C;C=K;try{return D()}finally{C=ie}},r.unstable_requestPaint=function(){w=!0},r.unstable_runWithPriority=function(D,K){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ie=C;C=D;try{return K()}finally{C=ie}},r.unstable_scheduleCallback=function(D,K,ie){var Ee=r.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?Ee+ie:Ee):ie=Ee,D){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=ie+Z,D={id:S++,callback:K,priorityLevel:D,startTime:ie,expirationTime:Z,sortIndex:-1},ie>Ee?(D.sortIndex=ie,c(h,D),f(y)===null&&D===f(h)&&(z?(V($),$=-1):z=!0,Ne(Q,ie-Ee))):(D.sortIndex=Z,c(y,D),L||O||(L=!0,F||(F=!0,fe()))),D},r.unstable_shouldYield=ee,r.unstable_wrapCallback=function(D){var K=C;return function(){var ie=C;C=K;try{return D.apply(this,arguments)}finally{C=ie}}}})(qu)),qu}var ym;function Ux(){return ym||(ym=1,Hu.exports=Lx()),Hu.exports}var Yu={exports:{}},et={};/**
|
|
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 gm;function Bx(){if(gm)return et;gm=1;var r=ac();function c(y){var h="https://react.dev/errors/"+y;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)h+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+y+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var u={d:{f,r:function(){throw Error(c(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},d=Symbol.for("react.portal");function m(y,h,S){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:v==null?null:""+v,children:y,containerInfo:h,implementation:S}}var x=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,h){if(y==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,et.createPortal=function(y,h){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(c(299));return m(y,h,null,S)},et.flushSync=function(y){var h=x.T,S=u.p;try{if(x.T=null,u.p=2,y)return y()}finally{x.T=h,u.p=S,u.d.f()}},et.preconnect=function(y,h){typeof y=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,u.d.C(y,h))},et.prefetchDNS=function(y){typeof y=="string"&&u.d.D(y)},et.preinit=function(y,h){if(typeof y=="string"&&h&&typeof h.as=="string"){var S=h.as,v=g(S,h.crossOrigin),C=typeof h.integrity=="string"?h.integrity:void 0,O=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;S==="style"?u.d.S(y,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:C,fetchPriority:O}):S==="script"&&u.d.X(y,{crossOrigin:v,integrity:C,fetchPriority:O,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},et.preinitModule=function(y,h){if(typeof y=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var S=g(h.as,h.crossOrigin);u.d.M(y,{crossOrigin:S,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&u.d.M(y)},et.preload=function(y,h){if(typeof y=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var S=h.as,v=g(S,h.crossOrigin);u.d.L(y,S,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},et.preloadModule=function(y,h){if(typeof y=="string")if(h){var S=g(h.as,h.crossOrigin);u.d.m(y,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:S,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else u.d.m(y)},et.requestFormReset=function(y){u.d.r(y)},et.unstable_batchedUpdates=function(y,h){return y(h)},et.useFormState=function(y,h,S){return x.H.useFormState(y,h,S)},et.useFormStatus=function(){return x.H.useHostTransitionStatus()},et.version="19.2.4",et}var bm;function Hx(){if(bm)return Yu.exports;bm=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(c){console.error(c)}}return r(),Yu.exports=Bx(),Yu.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 jm;function qx(){if(jm)return Un;jm=1;var r=Ux(),c=ac(),f=Hx();function u(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 d(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 x(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 g(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 y(e){if(m(e)!==e)throw Error(u(188))}function h(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(u(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return y(n),e;if(i===a)return y(n),t;i=i.sibling}throw Error(u(188))}if(l.return!==a.return)l=n,a=i;else{for(var o=!1,p=n.child;p;){if(p===l){o=!0,l=n,a=i;break}if(p===a){o=!0,a=n,l=i;break}p=p.sibling}if(!o){for(p=i.child;p;){if(p===l){o=!0,l=i,a=n;break}if(p===a){o=!0,a=i,l=n;break}p=p.sibling}if(!o)throw Error(u(189))}}if(l.alternate!==a)throw Error(u(190))}if(l.tag!==3)throw Error(u(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 v=Object.assign,C=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function fe(e){return e===null||typeof e!="object"?null:(e=J&&e[J]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case z:return"Fragment";case M:return"Profiler";case w:return"StrictMode";case Q:return"Suspense";case F:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case Y:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case G:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var Ne=Array.isArray,D=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},Ee=[],Z=-1;function N(e){return{current:e}}function q(e){0>Z||(e.current=Ee[Z],Ee[Z]=null,Z--)}function W(e,t){Z++,Ee[Z]=e.current,e.current=t}var I=N(null),ue=N(null),de=N(null),Te=N(null);function tt(e,t){switch(W(de,t),W(ue,e),W(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ld(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ld(t),e=Ud(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(I),W(I,e)}function Be(){q(I),q(ue),q(de)}function Ga(e){e.memoizedState!==null&&W(Te,e);var t=I.current,l=Ud(t,e.type);t!==l&&(W(ue,e),W(I,l))}function Qn(e){ue.current===e&&(q(I),q(ue)),Te.current===e&&(q(Te),_n._currentValue=ie)}var yi,oc;function Ol(e){if(yi===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);yi=t&&t[1]||"",oc=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+yi+e+oc}var gi=!1;function bi(e,t){if(!e||gi)return"";gi=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(_){var k=_}Reflect.construct(e,[],H)}else{try{H.call()}catch(_){k=_}e.call(H.prototype)}}else{try{throw Error()}catch(_){k=_}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(_){if(_&&k&&typeof _.stack=="string")return[_.stack,k.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),o=i[0],p=i[1];if(o&&p){var j=o.split(`
|
|
44
|
+
`),A=p.split(`
|
|
45
|
+
`);for(n=a=0;a<j.length&&!j[a].includes("DetermineComponentFrameRoot");)a++;for(;n<A.length&&!A[n].includes("DetermineComponentFrameRoot");)n++;if(a===j.length||n===A.length)for(a=j.length-1,n=A.length-1;1<=a&&0<=n&&j[a]!==A[n];)n--;for(;1<=a&&0<=n;a--,n--)if(j[a]!==A[n]){if(a!==1||n!==1)do if(a--,n--,0>n||j[a]!==A[n]){var U=`
|
|
46
|
+
`+j[a].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=a&&0<=n);break}}}finally{gi=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ol(l):""}function oh(e,t){switch(e.tag){case 26:case 27:case 5:return Ol(e.type);case 16:return Ol("Lazy");case 13:return e.child!==t&&t!==null?Ol("Suspense Fallback"):Ol("Suspense");case 19:return Ol("SuspenseList");case 0:case 15:return bi(e.type,!1);case 11:return bi(e.type.render,!1);case 1:return bi(e.type,!0);case 31:return Ol("Activity");default:return""}}function fc(e){try{var t="",l=null;do t+=oh(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var ji=Object.prototype.hasOwnProperty,Si=r.unstable_scheduleCallback,Ni=r.unstable_cancelCallback,fh=r.unstable_shouldYield,dh=r.unstable_requestPaint,ft=r.unstable_now,mh=r.unstable_getCurrentPriorityLevel,dc=r.unstable_ImmediatePriority,mc=r.unstable_UserBlockingPriority,Vn=r.unstable_NormalPriority,hh=r.unstable_LowPriority,hc=r.unstable_IdlePriority,ph=r.log,xh=r.unstable_setDisableYieldValue,Xa=null,dt=null;function cl(e){if(typeof ph=="function"&&xh(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(Xa,e)}catch{}}var mt=Math.clz32?Math.clz32:gh,vh=Math.log,yh=Math.LN2;function gh(e){return e>>>=0,e===0?32:31-(vh(e)/yh|0)|0}var Zn=256,Kn=262144,$n=4194304;function Ll(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 Jn(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~i,a!==0?n=Ll(a):(o&=p,o!==0?n=Ll(o):l||(l=p&~e,l!==0&&(n=Ll(l))))):(p=a&~i,p!==0?n=Ll(p):o!==0?n=Ll(o):l||(l=a&~e,l!==0&&(n=Ll(l)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function Qa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function bh(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 pc(){var e=$n;return $n<<=1,($n&62914560)===0&&($n=4194304),e}function Ei(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Va(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function jh(e,t,l,a,n,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 p=e.entanglements,j=e.expirationTimes,A=e.hiddenUpdates;for(l=o&~l;0<l;){var U=31-mt(l),H=1<<U;p[U]=0,j[U]=-1;var k=A[U];if(k!==null)for(A[U]=null,U=0;U<k.length;U++){var _=k[U];_!==null&&(_.lane&=-536870913)}l&=~H}a!==0&&xc(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function xc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-mt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function vc(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-mt(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function yc(e,t){var l=t&-t;return l=(l&42)!==0?1:Ti(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ti(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 Ci(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function gc(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:im(e.type))}function bc(e,t){var l=K.p;try{return K.p=e,t()}finally{K.p=l}}var ol=Math.random().toString(36).slice(2),Je="__reactFiber$"+ol,nt="__reactProps$"+ol,aa="__reactContainer$"+ol,Ri="__reactEvents$"+ol,Sh="__reactListeners$"+ol,Nh="__reactHandles$"+ol,jc="__reactResources$"+ol,Za="__reactMarker$"+ol;function Ai(e){delete e[Je],delete e[nt],delete e[Ri],delete e[Sh],delete e[Nh]}function na(e){var t=e[Je];if(t)return t;for(var l=e.parentNode;l;){if(t=l[aa]||l[Je]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Qd(e);e!==null;){if(l=e[Je])return l;e=Qd(e)}return t}e=l,l=e.parentNode}return null}function sa(e){if(e=e[Je]||e[aa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ka(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function ia(e){var t=e[jc];return t||(t=e[jc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[Za]=!0}var Sc=new Set,Nc={};function Ul(e,t){ra(e,t),ra(e+"Capture",t)}function ra(e,t){for(Nc[e]=t,e=0;e<t.length;e++)Sc.add(t[e])}var Eh=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]*$"),Ec={},Tc={};function Th(e){return ji.call(Tc,e)?!0:ji.call(Ec,e)?!1:Eh.test(e)?Tc[e]=!0:(Ec[e]=!0,!1)}function Wn(e,t,l){if(Th(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 Fn(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 Xt(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 jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ch(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 n=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.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 Mi(e){if(!e._valueTracker){var t=Cc(e)?"checked":"value";e._valueTracker=Ch(e,t,""+e[t])}}function Rc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Cc(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Pn(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 Rh=/[\n"\\]/g;function St(e){return e.replace(Rh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ki(e,t,l,a,n,i,o,p){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=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?wi(e,o,jt(t)):l!=null?wi(e,o,jt(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+jt(p):e.removeAttribute("name")}function Ac(e,t,l,a,n,i,o,p){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)){Mi(e);return}l=l!=null?""+jt(l):"",t=t!=null?""+jt(t):l,p||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=p?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Mi(e)}function wi(e,t,l){t==="number"&&Pn(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ua(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+jt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Mc(e,t,l){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+jt(l):""}function kc(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(u(92));if(Ne(a)){if(1<a.length)throw Error(u(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=jt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Mi(e)}function ca(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Ah=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 wc(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||Ah.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function _c(e,t,l){if(t!=null&&typeof t!="object")throw Error(u(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 n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&wc(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&wc(e,i,t[i])}function _i(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 Mh=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"]]),kh=/^[\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 In(e){return kh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qt(){}var zi=null;function Di(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oa=null,fa=null;function zc(e){var t=sa(e);if(t&&(e=t.stateNode)){var l=e[nt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ki(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="'+St(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[nt]||null;if(!n)throw Error(u(90));ki(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Rc(a)}break e;case"textarea":Mc(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ua(e,!!l.multiple,t,!1)}}}var Oi=!1;function Dc(e,t,l){if(Oi)return e(t,l);Oi=!0;try{var a=e(t);return a}finally{if(Oi=!1,(oa!==null||fa!==null)&&(qs(),oa&&(t=oa,e=fa,fa=oa=null,zc(t),e)))for(t=0;t<e.length;t++)zc(e[t])}}function $a(e,t){var l=e.stateNode;if(l===null)return null;var a=l[nt]||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(u(231,t,typeof l));return l}var Vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Li=!1;if(Vt)try{var Ja={};Object.defineProperty(Ja,"passive",{get:function(){Li=!0}}),window.addEventListener("test",Ja,Ja),window.removeEventListener("test",Ja,Ja)}catch{Li=!1}var fl=null,Ui=null,es=null;function Oc(){if(es)return es;var e,t=Ui,l=t.length,a,n="value"in fl?fl.value:fl.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var o=l-e;for(a=1;a<=o&&t[l-a]===n[i-a];a++);return es=n.slice(e,1<a?1-a:void 0)}function ts(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 ls(){return!0}function Lc(){return!1}function st(e){function t(l,a,n,i,o){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(l=e[p],this[p]=l?l(i):i[p]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ls:Lc,this.isPropagationStopped=Lc,this}return v(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=ls)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ls)},persist:function(){},isPersistent:ls}),t}var Bl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},as=st(Bl),Wa=v({},Bl,{view:0,detail:0}),wh=st(Wa),Bi,Hi,Fa,ns=v({},Wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yi,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!==Fa&&(Fa&&e.type==="mousemove"?(Bi=e.screenX-Fa.screenX,Hi=e.screenY-Fa.screenY):Hi=Bi=0,Fa=e),Bi)},movementY:function(e){return"movementY"in e?e.movementY:Hi}}),Uc=st(ns),_h=v({},ns,{dataTransfer:0}),zh=st(_h),Dh=v({},Wa,{relatedTarget:0}),qi=st(Dh),Oh=v({},Bl,{animationName:0,elapsedTime:0,pseudoElement:0}),Lh=st(Oh),Uh=v({},Bl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bh=st(Uh),Hh=v({},Bl,{data:0}),Bc=st(Hh),qh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yh={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"},Gh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gh[e])?!!t[e]:!1}function Yi(){return Xh}var Qh=v({},Wa,{key:function(e){if(e.key){var t=qh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ts(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Yh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yi,charCode:function(e){return e.type==="keypress"?ts(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ts(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vh=st(Qh),Zh=v({},ns,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hc=st(Zh),Kh=v({},Wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yi}),$h=st(Kh),Jh=v({},Bl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wh=st(Jh),Fh=v({},ns,{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}),Ph=st(Fh),Ih=v({},Bl,{newState:0,oldState:0}),ep=st(Ih),tp=[9,13,27,32],Gi=Vt&&"CompositionEvent"in window,Pa=null;Vt&&"documentMode"in document&&(Pa=document.documentMode);var lp=Vt&&"TextEvent"in window&&!Pa,qc=Vt&&(!Gi||Pa&&8<Pa&&11>=Pa),Yc=" ",Gc=!1;function Xc(e,t){switch(e){case"keyup":return tp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var da=!1;function ap(e,t){switch(e){case"compositionend":return Qc(t);case"keypress":return t.which!==32?null:(Gc=!0,Yc);case"textInput":return e=t.data,e===Yc&&Gc?null:e;default:return null}}function np(e,t){if(da)return e==="compositionend"||!Gi&&Xc(e,t)?(e=Oc(),es=Ui=fl=null,da=!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 qc&&t.locale!=="ko"?null:t.data;default:return null}}var sp={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 Vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sp[e.type]:t==="textarea"}function Zc(e,t,l,a){oa?fa?fa.push(a):fa=[a]:oa=a,t=Ks(t,"onChange"),0<t.length&&(l=new as("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Ia=null,en=null;function ip(e){kd(e,0)}function ss(e){var t=Ka(e);if(Rc(t))return e}function Kc(e,t){if(e==="change")return t}var $c=!1;if(Vt){var Xi;if(Vt){var Qi="oninput"in document;if(!Qi){var Jc=document.createElement("div");Jc.setAttribute("oninput","return;"),Qi=typeof Jc.oninput=="function"}Xi=Qi}else Xi=!1;$c=Xi&&(!document.documentMode||9<document.documentMode)}function Wc(){Ia&&(Ia.detachEvent("onpropertychange",Fc),en=Ia=null)}function Fc(e){if(e.propertyName==="value"&&ss(en)){var t=[];Zc(t,en,e,Di(e)),Dc(ip,t)}}function rp(e,t,l){e==="focusin"?(Wc(),Ia=t,en=l,Ia.attachEvent("onpropertychange",Fc)):e==="focusout"&&Wc()}function up(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ss(en)}function cp(e,t){if(e==="click")return ss(t)}function op(e,t){if(e==="input"||e==="change")return ss(t)}function fp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ht=typeof Object.is=="function"?Object.is:fp;function tn(e,t){if(ht(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 n=l[a];if(!ji.call(t,n)||!ht(e[n],t[n]))return!1}return!0}function Pc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ic(e,t){var l=Pc(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=Pc(l)}}function eo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function to(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pn(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=Pn(e.document)}return t}function Vi(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 dp=Vt&&"documentMode"in document&&11>=document.documentMode,ma=null,Zi=null,ln=null,Ki=!1;function lo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ki||ma==null||ma!==Pn(a)||(a=ma,"selectionStart"in a&&Vi(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}),ln&&tn(ln,a)||(ln=a,a=Ks(Zi,"onSelect"),0<a.length&&(t=new as("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=ma)))}function Hl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ha={animationend:Hl("Animation","AnimationEnd"),animationiteration:Hl("Animation","AnimationIteration"),animationstart:Hl("Animation","AnimationStart"),transitionrun:Hl("Transition","TransitionRun"),transitionstart:Hl("Transition","TransitionStart"),transitioncancel:Hl("Transition","TransitionCancel"),transitionend:Hl("Transition","TransitionEnd")},$i={},ao={};Vt&&(ao=document.createElement("div").style,"AnimationEvent"in window||(delete ha.animationend.animation,delete ha.animationiteration.animation,delete ha.animationstart.animation),"TransitionEvent"in window||delete ha.transitionend.transition);function ql(e){if($i[e])return $i[e];if(!ha[e])return e;var t=ha[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in ao)return $i[e]=t[l];return e}var no=ql("animationend"),so=ql("animationiteration"),io=ql("animationstart"),mp=ql("transitionrun"),hp=ql("transitionstart"),pp=ql("transitioncancel"),ro=ql("transitionend"),uo=new Map,Ji="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(" ");Ji.push("scrollEnd");function zt(e,t){uo.set(e,t),Ul(t,[e])}var is=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)},Nt=[],pa=0,Wi=0;function rs(){for(var e=pa,t=Wi=pa=0;t<e;){var l=Nt[t];Nt[t++]=null;var a=Nt[t];Nt[t++]=null;var n=Nt[t];Nt[t++]=null;var i=Nt[t];if(Nt[t++]=null,a!==null&&n!==null){var o=a.pending;o===null?n.next=n:(n.next=o.next,o.next=n),a.pending=n}i!==0&&co(l,n,i)}}function us(e,t,l,a){Nt[pa++]=e,Nt[pa++]=t,Nt[pa++]=l,Nt[pa++]=a,Wi|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Fi(e,t,l,a){return us(e,t,l,a),cs(e)}function Yl(e,t){return us(e,null,null,t),cs(e)}function co(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!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||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-mt(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function cs(e){if(50<Tn)throw Tn=0,iu=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xa={};function xp(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 pt(e,t,l,a){return new xp(e,t,l,a)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zt(e,t){var l=e.alternate;return l===null?(l=pt(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 oo(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 os(e,t,l,a,n,i){var o=0;if(a=e,typeof e=="function")Pi(e)&&(o=1);else if(typeof e=="string")o=jx(e,l,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=pt(31,l,t,n),e.elementType=ae,e.lanes=i,e;case z:return Gl(l.children,n,i,t);case w:o=8,n|=24;break;case M:return e=pt(12,l,t,n|2),e.elementType=M,e.lanes=i,e;case Q:return e=pt(13,l,t,n),e.elementType=Q,e.lanes=i,e;case F:return e=pt(19,l,t,n),e.elementType=F,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:o=10;break e;case V:o=9;break e;case X:o=11;break e;case $:o=14;break e;case G:o=16,a=null;break e}o=29,l=Error(u(130,e===null?"null":typeof e,"")),a=null}return t=pt(o,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function Gl(e,t,l,a){return e=pt(7,e,a,t),e.lanes=l,e}function Ii(e,t,l){return e=pt(6,e,null,t),e.lanes=l,e}function fo(e){var t=pt(18,null,null,0);return t.stateNode=e,t}function er(e,t,l){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mo=new WeakMap;function Et(e,t){if(typeof e=="object"&&e!==null){var l=mo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:fc(t)},mo.set(e,t),t)}return{value:e,source:t,stack:fc(t)}}var va=[],ya=0,fs=null,an=0,Tt=[],Ct=0,dl=null,Lt=1,Ut="";function Kt(e,t){va[ya++]=an,va[ya++]=fs,fs=e,an=t}function ho(e,t,l){Tt[Ct++]=Lt,Tt[Ct++]=Ut,Tt[Ct++]=dl,dl=e;var a=Lt;e=Ut;var n=32-mt(a)-1;a&=~(1<<n),l+=1;var i=32-mt(t)+n;if(30<i){var o=n-n%5;i=(a&(1<<o)-1).toString(32),a>>=o,n-=o,Lt=1<<32-mt(t)+n|l<<n|a,Ut=i+e}else Lt=1<<i|l<<n|a,Ut=e}function tr(e){e.return!==null&&(Kt(e,1),ho(e,1,0))}function lr(e){for(;e===fs;)fs=va[--ya],va[ya]=null,an=va[--ya],va[ya]=null;for(;e===dl;)dl=Tt[--Ct],Tt[Ct]=null,Ut=Tt[--Ct],Tt[Ct]=null,Lt=Tt[--Ct],Tt[Ct]=null}function po(e,t){Tt[Ct++]=Lt,Tt[Ct++]=Ut,Tt[Ct++]=dl,Lt=t.id,Ut=t.overflow,dl=e}var We=null,_e=null,ve=!1,ml=null,Rt=!1,ar=Error(u(519));function hl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw nn(Et(t,e)),ar}function xo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Je]=e,t[nt]=a,l){case"dialog":he("cancel",t),he("close",t);break;case"iframe":case"object":case"embed":he("load",t);break;case"video":case"audio":for(l=0;l<Rn.length;l++)he(Rn[l],t);break;case"source":he("error",t);break;case"img":case"image":case"link":he("error",t),he("load",t);break;case"details":he("toggle",t);break;case"input":he("invalid",t),Ac(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":he("invalid",t);break;case"textarea":he("invalid",t),kc(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||Dd(t.textContent,l)?(a.popover!=null&&(he("beforetoggle",t),he("toggle",t)),a.onScroll!=null&&he("scroll",t),a.onScrollEnd!=null&&he("scrollend",t),a.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||hl(e,!0)}function vo(e){for(We=e.return;We;)switch(We.tag){case 5:case 31:case 13:Rt=!1;return;case 27:case 3:Rt=!0;return;default:We=We.return}}function ga(e){if(e!==We)return!1;if(!ve)return vo(e),ve=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||ju(e.type,e.memoizedProps)),l=!l),l&&_e&&hl(e),vo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));_e=Xd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));_e=Xd(e)}else t===27?(t=_e,Al(e.type)?(e=Cu,Cu=null,_e=e):_e=t):_e=We?Mt(e.stateNode.nextSibling):null;return!0}function Xl(){_e=We=null,ve=!1}function nr(){var e=ml;return e!==null&&(ct===null?ct=e:ct.push.apply(ct,e),ml=null),e}function nn(e){ml===null?ml=[e]:ml.push(e)}var sr=N(null),Ql=null,$t=null;function pl(e,t,l){W(sr,t._currentValue),t._currentValue=l}function Jt(e){e._currentValue=sr.current,q(sr)}function ir(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 rr(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var o=n.child;i=i.firstContext;e:for(;i!==null;){var p=i;i=n;for(var j=0;j<t.length;j++)if(p.context===t[j]){i.lanes|=l,p=i.alternate,p!==null&&(p.lanes|=l),ir(i.return,l,e),a||(o=null);break e}i=p.next}}else if(n.tag===18){if(o=n.return,o===null)throw Error(u(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),ir(o,l,e),o=null}else o=n.child;if(o!==null)o.return=n;else for(o=n;o!==null;){if(o===e){o=null;break}if(n=o.sibling,n!==null){n.return=o.return,o=n;break}o=o.return}n=o}}function ba(e,t,l,a){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var o=n.alternate;if(o===null)throw Error(u(387));if(o=o.memoizedProps,o!==null){var p=n.type;ht(n.pendingProps.value,o.value)||(e!==null?e.push(p):e=[p])}}else if(n===Te.current){if(o=n.alternate,o===null)throw Error(u(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(_n):e=[_n])}n=n.return}e!==null&&rr(t,e,l,a),t.flags|=262144}function ds(e){for(e=e.firstContext;e!==null;){if(!ht(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vl(e){Ql=e,$t=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Fe(e){return yo(Ql,e)}function ms(e,t){return Ql===null&&Vl(e),yo(e,t)}function yo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},$t===null){if(e===null)throw Error(u(308));$t=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $t=$t.next=t;return l}var vp=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()})}},yp=r.unstable_scheduleCallback,gp=r.unstable_NormalPriority,Ye={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ur(){return{controller:new vp,data:new Map,refCount:0}}function sn(e){e.refCount--,e.refCount===0&&yp(gp,function(){e.controller.abort()})}var rn=null,cr=0,ja=0,Sa=null;function bp(e,t){if(rn===null){var l=rn=[];cr=0,ja=du(),Sa={status:"pending",value:void 0,then:function(a){l.push(a)}}}return cr++,t.then(go,go),t}function go(){if(--cr===0&&rn!==null){Sa!==null&&(Sa.status="fulfilled");var e=rn;rn=null,ja=0,Sa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function jp(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var bo=D.S;D.S=function(e,t){nd=ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&bp(e,t),bo!==null&&bo(e,t)};var Zl=N(null);function or(){var e=Zl.current;return e!==null?e:we.pooledCache}function hs(e,t){t===null?W(Zl,Zl.current):W(Zl,t.pool)}function jo(){var e=or();return e===null?null:{parent:Ye._currentValue,pool:e}}var Na=Error(u(460)),fr=Error(u(474)),ps=Error(u(542)),xs={then:function(){}};function So(e){return e=e.status,e==="fulfilled"||e==="rejected"}function No(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Qt,Qt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,To(e),e;default:if(typeof t.status=="string")t.then(Qt,Qt);else{if(e=we,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,To(e),e}throw $l=t,Na}}function Kl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?($l=l,Na):l}}var $l=null;function Eo(){if($l===null)throw Error(u(459));var e=$l;return $l=null,e}function To(e){if(e===Na||e===ps)throw Error(u(483))}var Ea=null,un=0;function vs(e){var t=un;return un+=1,Ea===null&&(Ea=[]),No(Ea,e,t)}function cn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ys(e,t){throw t.$$typeof===C?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Co(e){function t(T,E){if(e){var R=T.deletions;R===null?(T.deletions=[E],T.flags|=16):R.push(E)}}function l(T,E){if(!e)return null;for(;E!==null;)t(T,E),E=E.sibling;return null}function a(T){for(var E=new Map;T!==null;)T.key!==null?E.set(T.key,T):E.set(T.index,T),T=T.sibling;return E}function n(T,E){return T=Zt(T,E),T.index=0,T.sibling=null,T}function i(T,E,R){return T.index=R,e?(R=T.alternate,R!==null?(R=R.index,R<E?(T.flags|=67108866,E):R):(T.flags|=67108866,E)):(T.flags|=1048576,E)}function o(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function p(T,E,R,B){return E===null||E.tag!==6?(E=Ii(R,T.mode,B),E.return=T,E):(E=n(E,R),E.return=T,E)}function j(T,E,R,B){var ne=R.type;return ne===z?U(T,E,R.props.children,B,R.key):E!==null&&(E.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===G&&Kl(ne)===E.type)?(E=n(E,R.props),cn(E,R),E.return=T,E):(E=os(R.type,R.key,R.props,null,T.mode,B),cn(E,R),E.return=T,E)}function A(T,E,R,B){return E===null||E.tag!==4||E.stateNode.containerInfo!==R.containerInfo||E.stateNode.implementation!==R.implementation?(E=er(R,T.mode,B),E.return=T,E):(E=n(E,R.children||[]),E.return=T,E)}function U(T,E,R,B,ne){return E===null||E.tag!==7?(E=Gl(R,T.mode,B,ne),E.return=T,E):(E=n(E,R),E.return=T,E)}function H(T,E,R){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Ii(""+E,T.mode,R),E.return=T,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case O:return R=os(E.type,E.key,E.props,null,T.mode,R),cn(R,E),R.return=T,R;case L:return E=er(E,T.mode,R),E.return=T,E;case G:return E=Kl(E),H(T,E,R)}if(Ne(E)||fe(E))return E=Gl(E,T.mode,R,null),E.return=T,E;if(typeof E.then=="function")return H(T,vs(E),R);if(E.$$typeof===Y)return H(T,ms(T,E),R);ys(T,E)}return null}function k(T,E,R,B){var ne=E!==null?E.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ne!==null?null:p(T,E,""+R,B);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case O:return R.key===ne?j(T,E,R,B):null;case L:return R.key===ne?A(T,E,R,B):null;case G:return R=Kl(R),k(T,E,R,B)}if(Ne(R)||fe(R))return ne!==null?null:U(T,E,R,B,null);if(typeof R.then=="function")return k(T,E,vs(R),B);if(R.$$typeof===Y)return k(T,E,ms(T,R),B);ys(T,R)}return null}function _(T,E,R,B,ne){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return T=T.get(R)||null,p(E,T,""+B,ne);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case O:return T=T.get(B.key===null?R:B.key)||null,j(E,T,B,ne);case L:return T=T.get(B.key===null?R:B.key)||null,A(E,T,B,ne);case G:return B=Kl(B),_(T,E,R,B,ne)}if(Ne(B)||fe(B))return T=T.get(R)||null,U(E,T,B,ne,null);if(typeof B.then=="function")return _(T,E,R,vs(B),ne);if(B.$$typeof===Y)return _(T,E,R,ms(E,B),ne);ys(E,B)}return null}function P(T,E,R,B){for(var ne=null,be=null,le=E,oe=E=0,xe=null;le!==null&&oe<R.length;oe++){le.index>oe?(xe=le,le=null):xe=le.sibling;var je=k(T,le,R[oe],B);if(je===null){le===null&&(le=xe);break}e&&le&&je.alternate===null&&t(T,le),E=i(je,E,oe),be===null?ne=je:be.sibling=je,be=je,le=xe}if(oe===R.length)return l(T,le),ve&&Kt(T,oe),ne;if(le===null){for(;oe<R.length;oe++)le=H(T,R[oe],B),le!==null&&(E=i(le,E,oe),be===null?ne=le:be.sibling=le,be=le);return ve&&Kt(T,oe),ne}for(le=a(le);oe<R.length;oe++)xe=_(le,T,oe,R[oe],B),xe!==null&&(e&&xe.alternate!==null&&le.delete(xe.key===null?oe:xe.key),E=i(xe,E,oe),be===null?ne=xe:be.sibling=xe,be=xe);return e&&le.forEach(function(zl){return t(T,zl)}),ve&&Kt(T,oe),ne}function se(T,E,R,B){if(R==null)throw Error(u(151));for(var ne=null,be=null,le=E,oe=E=0,xe=null,je=R.next();le!==null&&!je.done;oe++,je=R.next()){le.index>oe?(xe=le,le=null):xe=le.sibling;var zl=k(T,le,je.value,B);if(zl===null){le===null&&(le=xe);break}e&&le&&zl.alternate===null&&t(T,le),E=i(zl,E,oe),be===null?ne=zl:be.sibling=zl,be=zl,le=xe}if(je.done)return l(T,le),ve&&Kt(T,oe),ne;if(le===null){for(;!je.done;oe++,je=R.next())je=H(T,je.value,B),je!==null&&(E=i(je,E,oe),be===null?ne=je:be.sibling=je,be=je);return ve&&Kt(T,oe),ne}for(le=a(le);!je.done;oe++,je=R.next())je=_(le,T,oe,je.value,B),je!==null&&(e&&je.alternate!==null&&le.delete(je.key===null?oe:je.key),E=i(je,E,oe),be===null?ne=je:be.sibling=je,be=je);return e&&le.forEach(function(_x){return t(T,_x)}),ve&&Kt(T,oe),ne}function ke(T,E,R,B){if(typeof R=="object"&&R!==null&&R.type===z&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case O:e:{for(var ne=R.key;E!==null;){if(E.key===ne){if(ne=R.type,ne===z){if(E.tag===7){l(T,E.sibling),B=n(E,R.props.children),B.return=T,T=B;break e}}else if(E.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===G&&Kl(ne)===E.type){l(T,E.sibling),B=n(E,R.props),cn(B,R),B.return=T,T=B;break e}l(T,E);break}else t(T,E);E=E.sibling}R.type===z?(B=Gl(R.props.children,T.mode,B,R.key),B.return=T,T=B):(B=os(R.type,R.key,R.props,null,T.mode,B),cn(B,R),B.return=T,T=B)}return o(T);case L:e:{for(ne=R.key;E!==null;){if(E.key===ne)if(E.tag===4&&E.stateNode.containerInfo===R.containerInfo&&E.stateNode.implementation===R.implementation){l(T,E.sibling),B=n(E,R.children||[]),B.return=T,T=B;break e}else{l(T,E);break}else t(T,E);E=E.sibling}B=er(R,T.mode,B),B.return=T,T=B}return o(T);case G:return R=Kl(R),ke(T,E,R,B)}if(Ne(R))return P(T,E,R,B);if(fe(R)){if(ne=fe(R),typeof ne!="function")throw Error(u(150));return R=ne.call(R),se(T,E,R,B)}if(typeof R.then=="function")return ke(T,E,vs(R),B);if(R.$$typeof===Y)return ke(T,E,ms(T,R),B);ys(T,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,E!==null&&E.tag===6?(l(T,E.sibling),B=n(E,R),B.return=T,T=B):(l(T,E),B=Ii(R,T.mode,B),B.return=T,T=B),o(T)):l(T,E)}return function(T,E,R,B){try{un=0;var ne=ke(T,E,R,B);return Ea=null,ne}catch(le){if(le===Na||le===ps)throw le;var be=pt(29,le,null,T.mode);return be.lanes=B,be.return=T,be}finally{}}}var Jl=Co(!0),Ro=Co(!1),xl=!1;function dr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mr(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 vl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Se&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=cs(e),co(e,null,l),t}return us(e,a,t,l),cs(e)}function on(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,vc(e,l)}}function hr(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=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?n=i=o:i=i.next=o,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,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 pr=!1;function fn(){if(pr){var e=Sa;if(e!==null)throw e}}function dn(e,t,l,a){pr=!1;var n=e.updateQueue;xl=!1;var i=n.firstBaseUpdate,o=n.lastBaseUpdate,p=n.shared.pending;if(p!==null){n.shared.pending=null;var j=p,A=j.next;j.next=null,o===null?i=A:o.next=A,o=j;var U=e.alternate;U!==null&&(U=U.updateQueue,p=U.lastBaseUpdate,p!==o&&(p===null?U.firstBaseUpdate=A:p.next=A,U.lastBaseUpdate=j))}if(i!==null){var H=n.baseState;o=0,U=A=j=null,p=i;do{var k=p.lane&-536870913,_=k!==p.lane;if(_?(pe&k)===k:(a&k)===k){k!==0&&k===ja&&(pr=!0),U!==null&&(U=U.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var P=e,se=p;k=t;var ke=l;switch(se.tag){case 1:if(P=se.payload,typeof P=="function"){H=P.call(ke,H,k);break e}H=P;break e;case 3:P.flags=P.flags&-65537|128;case 0:if(P=se.payload,k=typeof P=="function"?P.call(ke,H,k):P,k==null)break e;H=v({},H,k);break e;case 2:xl=!0}}k=p.callback,k!==null&&(e.flags|=64,_&&(e.flags|=8192),_=n.callbacks,_===null?n.callbacks=[k]:_.push(k))}else _={lane:k,tag:p.tag,payload:p.payload,callback:p.callback,next:null},U===null?(A=U=_,j=H):U=U.next=_,o|=k;if(p=p.next,p===null){if(p=n.shared.pending,p===null)break;_=p,p=_.next,_.next=null,n.lastBaseUpdate=_,n.shared.pending=null}}while(!0);U===null&&(j=H),n.baseState=j,n.firstBaseUpdate=A,n.lastBaseUpdate=U,i===null&&(n.shared.lanes=0),Nl|=o,e.lanes=o,e.memoizedState=H}}function Ao(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Mo(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Ao(l[e],t)}var Ta=N(null),gs=N(0);function ko(e,t){e=nl,W(gs,e),W(Ta,t),nl=e|t.baseLanes}function xr(){W(gs,nl),W(Ta,Ta.current)}function vr(){nl=gs.current,q(Ta),q(gs)}var xt=N(null),At=null;function gl(e){var t=e.alternate;W(He,He.current&1),W(xt,e),At===null&&(t===null||Ta.current!==null||t.memoizedState!==null)&&(At=e)}function yr(e){W(He,He.current),W(xt,e),At===null&&(At=e)}function wo(e){e.tag===22?(W(He,He.current),W(xt,e),At===null&&(At=e)):bl()}function bl(){W(He,He.current),W(xt,xt.current)}function vt(e){q(xt),At===e&&(At=null),q(He)}var He=N(0);function bs(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Eu(l)||Tu(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 Wt=0,ce=null,Ae=null,Ge=null,js=!1,Ca=!1,Wl=!1,Ss=0,mn=0,Ra=null,Sp=0;function Le(){throw Error(u(321))}function gr(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!ht(e[l],t[l]))return!1;return!0}function br(e,t,l,a,n,i){return Wt=i,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?pf:Or,Wl=!1,i=l(a,n),Wl=!1,Ca&&(i=zo(t,l,a,n)),_o(e),i}function _o(e){D.H=xn;var t=Ae!==null&&Ae.next!==null;if(Wt=0,Ge=Ae=ce=null,js=!1,mn=0,Ra=null,t)throw Error(u(300));e===null||Xe||(e=e.dependencies,e!==null&&ds(e)&&(Xe=!0))}function zo(e,t,l,a){ce=e;var n=0;do{if(Ca&&(Ra=null),mn=0,Ca=!1,25<=n)throw Error(u(301));if(n+=1,Ge=Ae=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}D.H=xf,i=t(l,a)}while(Ca);return i}function Np(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?hn(t):t,e=e.useState()[0],(Ae!==null?Ae.memoizedState:null)!==e&&(ce.flags|=1024),t}function jr(){var e=Ss!==0;return Ss=0,e}function Sr(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Nr(e){if(js){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}js=!1}Wt=0,Ge=Ae=ce=null,Ca=!1,mn=Ss=0,Ra=null}function lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?ce.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function qe(){if(Ae===null){var e=ce.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=Ge===null?ce.memoizedState:Ge.next;if(t!==null)Ge=t,Ae=e;else{if(e===null)throw ce.alternate===null?Error(u(467)):Error(u(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},Ge===null?ce.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function Ns(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hn(e){var t=mn;return mn+=1,Ra===null&&(Ra=[]),e=No(Ra,e,t),t=ce,(Ge===null?t.memoizedState:Ge.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?pf:Or),e}function Es(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return hn(e);if(e.$$typeof===Y)return Fe(e)}throw Error(u(438,String(e)))}function Er(e){var t=null,l=ce.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=ce.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Ns(),ce.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]=ee;return t.index++,l}function Ft(e,t){return typeof t=="function"?t(e):t}function Ts(e){var t=qe();return Tr(t,Ae,e)}function Tr(e,t,l){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var o=n.next;n.next=i.next,i.next=o}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var p=o=null,j=null,A=t,U=!1;do{var H=A.lane&-536870913;if(H!==A.lane?(pe&H)===H:(Wt&H)===H){var k=A.revertLane;if(k===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),H===ja&&(U=!0);else if((Wt&k)===k){A=A.next,k===ja&&(U=!0);continue}else H={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},j===null?(p=j=H,o=i):j=j.next=H,ce.lanes|=k,Nl|=k;H=A.action,Wl&&l(i,H),i=A.hasEagerState?A.eagerState:l(i,H)}else k={lane:H,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},j===null?(p=j=k,o=i):j=j.next=k,ce.lanes|=H,Nl|=H;A=A.next}while(A!==null&&A!==t);if(j===null?o=i:j.next=p,!ht(i,e.memoizedState)&&(Xe=!0,U&&(l=Sa,l!==null)))throw l;e.memoizedState=i,e.baseState=o,e.baseQueue=j,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Cr(e){var t=qe(),l=t.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var o=n=n.next;do i=e(i,o.action),o=o.next;while(o!==n);ht(i,t.memoizedState)||(Xe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function Do(e,t,l){var a=ce,n=qe(),i=ve;if(i){if(l===void 0)throw Error(u(407));l=l()}else l=t();var o=!ht((Ae||n).memoizedState,l);if(o&&(n.memoizedState=l,Xe=!0),n=n.queue,Mr(Uo.bind(null,a,n,e),[e]),n.getSnapshot!==t||o||Ge!==null&&Ge.memoizedState.tag&1){if(a.flags|=2048,Aa(9,{destroy:void 0},Lo.bind(null,a,n,l,t),null),we===null)throw Error(u(349));i||(Wt&127)!==0||Oo(a,t,l)}return l}function Oo(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ce.updateQueue,t===null?(t=Ns(),ce.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Lo(e,t,l,a){t.value=l,t.getSnapshot=a,Bo(t)&&Ho(e)}function Uo(e,t,l){return l(function(){Bo(t)&&Ho(e)})}function Bo(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!ht(e,l)}catch{return!0}}function Ho(e){var t=Yl(e,2);t!==null&&ot(t,e,2)}function Rr(e){var t=lt();if(typeof e=="function"){var l=e;if(e=l(),Wl){cl(!0);try{l()}finally{cl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:e},t}function qo(e,t,l,a){return e.baseState=l,Tr(e,Ae,typeof a=="function"?a:Ft)}function Ep(e,t,l,a,n){if(As(e))throw Error(u(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};D.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,Yo(t,i)):(i.next=l.next,t.pending=l.next=i)}}function Yo(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=D.T,o={};D.T=o;try{var p=l(n,a),j=D.S;j!==null&&j(o,p),Go(e,t,p)}catch(A){Ar(e,t,A)}finally{i!==null&&o.types!==null&&(i.types=o.types),D.T=i}}else try{i=l(n,a),Go(e,t,i)}catch(A){Ar(e,t,A)}}function Go(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Xo(e,t,a)},function(a){return Ar(e,t,a)}):Xo(e,t,l)}function Xo(e,t,l){t.status="fulfilled",t.value=l,Qo(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Yo(e,l)))}function Ar(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Qo(t),t=t.next;while(t!==a)}e.action=null}function Qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Vo(e,t){return t}function Zo(e,t){if(ve){var l=we.formState;if(l!==null){e:{var a=ce;if(ve){if(_e){t:{for(var n=_e,i=Rt;n.nodeType!==8;){if(!i){n=null;break t}if(n=Mt(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){_e=Mt(n.nextSibling),a=n.data==="F!";break e}}hl(a)}a=!1}a&&(t=l[0])}}return l=lt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:t},l.queue=a,l=df.bind(null,ce,a),a.dispatch=l,a=Rr(!1),i=Dr.bind(null,ce,!1,a.queue),a=lt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=Ep.bind(null,ce,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function Ko(e){var t=qe();return $o(t,Ae,e)}function $o(e,t,l){if(t=Tr(e,t,Vo)[0],e=Ts(Ft)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=hn(t)}catch(o){throw o===Na?ps:o}else a=t;t=qe();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(ce.flags|=2048,Aa(9,{destroy:void 0},Tp.bind(null,n,l),null)),[a,i,e]}function Tp(e,t){e.action=t}function Jo(e){var t=qe(),l=Ae;if(l!==null)return $o(t,l,e);qe(),t=t.memoizedState,l=qe();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Aa(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=ce.updateQueue,t===null&&(t=Ns(),ce.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 Wo(){return qe().memoizedState}function Cs(e,t,l,a){var n=lt();ce.flags|=e,n.memoizedState=Aa(1|t,{destroy:void 0},l,a===void 0?null:a)}function Rs(e,t,l,a){var n=qe();a=a===void 0?null:a;var i=n.memoizedState.inst;Ae!==null&&a!==null&&gr(a,Ae.memoizedState.deps)?n.memoizedState=Aa(t,i,l,a):(ce.flags|=e,n.memoizedState=Aa(1|t,i,l,a))}function Fo(e,t){Cs(8390656,8,e,t)}function Mr(e,t){Rs(2048,8,e,t)}function Cp(e){ce.flags|=4;var t=ce.updateQueue;if(t===null)t=Ns(),ce.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Po(e){var t=qe().memoizedState;return Cp({ref:t,nextImpl:e}),function(){if((Se&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Io(e,t){return Rs(4,2,e,t)}function ef(e,t){return Rs(4,4,e,t)}function tf(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 lf(e,t,l){l=l!=null?l.concat([e]):null,Rs(4,4,tf.bind(null,t,e),l)}function kr(){}function af(e,t){var l=qe();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&gr(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function nf(e,t){var l=qe();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&gr(t,a[1]))return a[0];if(a=e(),Wl){cl(!0);try{e()}finally{cl(!1)}}return l.memoizedState=[a,t],a}function wr(e,t,l){return l===void 0||(Wt&1073741824)!==0&&(pe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=id(),ce.lanes|=e,Nl|=e,l)}function sf(e,t,l,a){return ht(l,t)?l:Ta.current!==null?(e=wr(e,l,a),ht(e,t)||(Xe=!0),e):(Wt&42)===0||(Wt&1073741824)!==0&&(pe&261930)===0?(Xe=!0,e.memoizedState=l):(e=id(),ce.lanes|=e,Nl|=e,t)}function rf(e,t,l,a,n){var i=K.p;K.p=i!==0&&8>i?i:8;var o=D.T,p={};D.T=p,Dr(e,!1,t,l);try{var j=n(),A=D.S;if(A!==null&&A(p,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var U=jp(j,a);pn(e,t,U,bt(e))}else pn(e,t,a,bt(e))}catch(H){pn(e,t,{then:function(){},status:"rejected",reason:H},bt())}finally{K.p=i,o!==null&&p.types!==null&&(o.types=p.types),D.T=o}}function Rp(){}function _r(e,t,l,a){if(e.tag!==5)throw Error(u(476));var n=uf(e).queue;rf(e,n,t,ie,l===null?Rp:function(){return cf(e),l(a)})}function uf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:ie},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function cf(e){var t=uf(e);t.next===null&&(t=e.alternate.memoizedState),pn(e,t.next.queue,{},bt())}function zr(){return Fe(_n)}function of(){return qe().memoizedState}function ff(){return qe().memoizedState}function Ap(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=bt();e=vl(l);var a=yl(t,e,l);a!==null&&(ot(a,t,l),on(a,t,l)),t={cache:ur()},e.payload=t;return}t=t.return}}function Mp(e,t,l){var a=bt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},As(e)?mf(t,l):(l=Fi(e,t,l,a),l!==null&&(ot(l,e,a),hf(l,t,a)))}function df(e,t,l){var a=bt();pn(e,t,l,a)}function pn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(As(e))mf(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,p=i(o,l);if(n.hasEagerState=!0,n.eagerState=p,ht(p,o))return us(e,t,n,0),we===null&&rs(),!1}catch{}finally{}if(l=Fi(e,t,n,a),l!==null)return ot(l,e,a),hf(l,t,a),!0}return!1}function Dr(e,t,l,a){if(a={lane:2,revertLane:du(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},As(e)){if(t)throw Error(u(479))}else t=Fi(e,l,a,2),t!==null&&ot(t,e,2)}function As(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function mf(e,t){Ca=js=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function hf(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,vc(e,l)}}var xn={readContext:Fe,use:Es,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useLayoutEffect:Le,useInsertionEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useSyncExternalStore:Le,useId:Le,useHostTransitionStatus:Le,useFormState:Le,useActionState:Le,useOptimistic:Le,useMemoCache:Le,useCacheRefresh:Le};xn.useEffectEvent=Le;var pf={readContext:Fe,use:Es,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Fe,useEffect:Fo,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Cs(4194308,4,tf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Cs(4194308,4,e,t)},useInsertionEffect:function(e,t){Cs(4,2,e,t)},useMemo:function(e,t){var l=lt();t=t===void 0?null:t;var a=e();if(Wl){cl(!0);try{e()}finally{cl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=lt();if(l!==void 0){var n=l(t);if(Wl){cl(!0);try{l(t)}finally{cl(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Mp.bind(null,ce,e),[a.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:function(e){e=Rr(e);var t=e.queue,l=df.bind(null,ce,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:kr,useDeferredValue:function(e,t){var l=lt();return wr(l,e,t)},useTransition:function(){var e=Rr(!1);return e=rf.bind(null,ce,e.queue,!0,!1),lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ce,n=lt();if(ve){if(l===void 0)throw Error(u(407));l=l()}else{if(l=t(),we===null)throw Error(u(349));(pe&127)!==0||Oo(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,Fo(Uo.bind(null,a,i,e),[e]),a.flags|=2048,Aa(9,{destroy:void 0},Lo.bind(null,a,i,l,t),null),l},useId:function(){var e=lt(),t=we.identifierPrefix;if(ve){var l=Ut,a=Lt;l=(a&~(1<<32-mt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ss++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Sp++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:zr,useFormState:Zo,useActionState:Zo,useOptimistic:function(e){var t=lt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Dr.bind(null,ce,!0,l),l.dispatch=t,[e,t]},useMemoCache:Er,useCacheRefresh:function(){return lt().memoizedState=Ap.bind(null,ce)},useEffectEvent:function(e){var t=lt(),l={impl:e};return t.memoizedState=l,function(){if((Se&2)!==0)throw Error(u(440));return l.impl.apply(void 0,arguments)}}},Or={readContext:Fe,use:Es,useCallback:af,useContext:Fe,useEffect:Mr,useImperativeHandle:lf,useInsertionEffect:Io,useLayoutEffect:ef,useMemo:nf,useReducer:Ts,useRef:Wo,useState:function(){return Ts(Ft)},useDebugValue:kr,useDeferredValue:function(e,t){var l=qe();return sf(l,Ae.memoizedState,e,t)},useTransition:function(){var e=Ts(Ft)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:hn(e),t]},useSyncExternalStore:Do,useId:of,useHostTransitionStatus:zr,useFormState:Ko,useActionState:Ko,useOptimistic:function(e,t){var l=qe();return qo(l,Ae,e,t)},useMemoCache:Er,useCacheRefresh:ff};Or.useEffectEvent=Po;var xf={readContext:Fe,use:Es,useCallback:af,useContext:Fe,useEffect:Mr,useImperativeHandle:lf,useInsertionEffect:Io,useLayoutEffect:ef,useMemo:nf,useReducer:Cr,useRef:Wo,useState:function(){return Cr(Ft)},useDebugValue:kr,useDeferredValue:function(e,t){var l=qe();return Ae===null?wr(l,e,t):sf(l,Ae.memoizedState,e,t)},useTransition:function(){var e=Cr(Ft)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:hn(e),t]},useSyncExternalStore:Do,useId:of,useHostTransitionStatus:zr,useFormState:Jo,useActionState:Jo,useOptimistic:function(e,t){var l=qe();return Ae!==null?qo(l,Ae,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Er,useCacheRefresh:ff};xf.useEffectEvent=Po;function Lr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:v({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Ur={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=bt(),n=vl(a);n.payload=t,l!=null&&(n.callback=l),t=yl(e,n,a),t!==null&&(ot(t,e,a),on(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=bt(),n=vl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=yl(e,n,a),t!==null&&(ot(t,e,a),on(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=bt(),a=vl(l);a.tag=2,t!=null&&(a.callback=t),t=yl(e,a,l),t!==null&&(ot(t,e,l),on(t,e,l))}};function vf(e,t,l,a,n,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,o):t.prototype&&t.prototype.isPureReactComponent?!tn(l,a)||!tn(n,i):!0}function yf(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&&Ur.enqueueReplaceState(t,t.state,null)}function Fl(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=v({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function gf(e){is(e)}function bf(e){console.error(e)}function jf(e){is(e)}function Ms(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Sf(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Br(e,t,l){return l=vl(l),l.tag=3,l.payload={element:null},l.callback=function(){Ms(e,t)},l}function Nf(e){return e=vl(e),e.tag=3,e}function Ef(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){Sf(t,l,a)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Sf(t,l,a),typeof n!="function"&&(El===null?El=new Set([this]):El.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function kp(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&ba(t,l,n,!0),l=xt.current,l!==null){switch(l.tag){case 31:case 13:return At===null?Ys():l.alternate===null&&Ue===0&&(Ue=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===xs?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),cu(e,a,n)),!1;case 22:return l.flags|=65536,a===xs?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)),cu(e,a,n)),!1}throw Error(u(435,l.tag))}return cu(e,a,n),Ys(),!1}if(ve)return t=xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==ar&&(e=Error(u(422),{cause:a}),nn(Et(e,l)))):(a!==ar&&(t=Error(u(423),{cause:a}),nn(Et(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Et(a,l),n=Br(e.stateNode,a,n),hr(e,n),Ue!==4&&(Ue=2)),!1;var i=Error(u(520),{cause:a});if(i=Et(i,l),En===null?En=[i]:En.push(i),Ue!==4&&(Ue=2),t===null)return!0;a=Et(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=Br(l.stateNode,a,e),hr(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"&&(El===null||!El.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Nf(n),Ef(n,e,l,a),hr(l,n),!1}l=l.return}while(l!==null);return!1}var Hr=Error(u(461)),Xe=!1;function Pe(e,t,l,a){t.child=e===null?Ro(t,null,l,a):Jl(t,e.child,l,a)}function Tf(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var o={};for(var p in a)p!=="ref"&&(o[p]=a[p])}else o=a;return Vl(t),a=br(e,t,l,o,i,n),p=jr(),e!==null&&!Xe?(Sr(e,t,n),Pt(e,t,n)):(ve&&p&&tr(t),t.flags|=1,Pe(e,t,a,n),t.child)}function Cf(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!Pi(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Rf(e,t,i,a,n)):(e=os(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Kr(e,n)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:tn,l(o,a)&&e.ref===t.ref)return Pt(e,t,n)}return t.flags|=1,e=Zt(i,a),e.ref=t.ref,e.return=t,t.child=e}function Rf(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(tn(i,a)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=a=i,Kr(e,n))(e.flags&131072)!==0&&(Xe=!0);else return t.lanes=e.lanes,Pt(e,t,n)}return qr(e,t,l,a,n)}function Af(e,t,l,a){var n=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,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,t.child=null;return Mf(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&hs(t,i!==null?i.cachePool:null),i!==null?ko(t,i):xr(),wo(t);else return a=t.lanes=536870912,Mf(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(hs(t,i.cachePool),ko(t,i),bl(),t.memoizedState=null):(e!==null&&hs(t,null),xr(),bl());return Pe(e,t,n,l),t.child}function vn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mf(e,t,l,a,n){var i=or();return i=i===null?null:{parent:Ye._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&hs(t,null),xr(),wo(t),e!==null&&ba(e,t,a,!0),t.childLanes=n,null}function ks(e,t){return t=_s({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kf(e,t,l){return Jl(t,e.child,null,l),e=ks(t,t.pendingProps),e.flags|=2,vt(t),t.memoizedState=null,e}function wp(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ve){if(a.mode==="hidden")return e=ks(t,a),t.lanes=536870912,vn(null,e);if(yr(t),(e=_e)?(e=Gd(e,Rt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:dl!==null?{id:Lt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},l=fo(e),l.return=t,t.child=l,We=t,_e=null)):e=null,e===null)throw hl(t);return t.lanes=536870912,null}return ks(t,a)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(yr(t),n)if(t.flags&256)t.flags&=-257,t=kf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(Xe||ba(e,t,l,!1),n=(l&e.childLanes)!==0,Xe||n){if(a=we,a!==null&&(o=yc(a,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,Yl(e,o),ot(a,e,o),Hr;Ys(),t=kf(e,t,l)}else e=i.treeContext,_e=Mt(o.nextSibling),We=t,ve=!0,ml=null,Rt=!1,e!==null&&po(t,e),t=ks(t,a),t.flags|=4096;return t}return e=Zt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ws(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(u(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function qr(e,t,l,a,n){return Vl(t),l=br(e,t,l,a,void 0,n),a=jr(),e!==null&&!Xe?(Sr(e,t,n),Pt(e,t,n)):(ve&&a&&tr(t),t.flags|=1,Pe(e,t,l,n),t.child)}function wf(e,t,l,a,n,i){return Vl(t),t.updateQueue=null,l=zo(t,a,l,n),_o(e),a=jr(),e!==null&&!Xe?(Sr(e,t,i),Pt(e,t,i)):(ve&&a&&tr(t),t.flags|=1,Pe(e,t,l,i),t.child)}function _f(e,t,l,a,n){if(Vl(t),t.stateNode===null){var i=xa,o=l.contextType;typeof o=="object"&&o!==null&&(i=Fe(o)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Ur,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},dr(t),o=l.contextType,i.context=typeof o=="object"&&o!==null?Fe(o):xa,i.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(Lr(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&&Ur.enqueueReplaceState(i,i.state,null),dn(t,a,i,n),fn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var p=t.memoizedProps,j=Fl(l,p);i.props=j;var A=i.context,U=l.contextType;o=xa,typeof U=="object"&&U!==null&&(o=Fe(U));var H=l.getDerivedStateFromProps;U=typeof H=="function"||typeof i.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,U||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(p||A!==o)&&yf(t,i,a,o),xl=!1;var k=t.memoizedState;i.state=k,dn(t,a,i,n),fn(),A=t.memoizedState,p||k!==A||xl?(typeof H=="function"&&(Lr(t,l,H,a),A=t.memoizedState),(j=xl||vf(t,l,j,a,k,A,o))?(U||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=j):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,mr(e,t),o=t.memoizedProps,U=Fl(l,o),i.props=U,H=t.pendingProps,k=i.context,A=l.contextType,j=xa,typeof A=="object"&&A!==null&&(j=Fe(A)),p=l.getDerivedStateFromProps,(A=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==H||k!==j)&&yf(t,i,a,j),xl=!1,k=t.memoizedState,i.state=k,dn(t,a,i,n),fn();var _=t.memoizedState;o!==H||k!==_||xl||e!==null&&e.dependencies!==null&&ds(e.dependencies)?(typeof p=="function"&&(Lr(t,l,p,a),_=t.memoizedState),(U=xl||vf(t,l,U,a,k,_,j)||e!==null&&e.dependencies!==null&&ds(e.dependencies))?(A||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,_,j),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,_,j)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=_),i.props=a,i.state=_,i.context=j,a=U):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,ws(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=Jl(t,e.child,null,n),t.child=Jl(t,null,l,n)):Pe(e,t,l,n),t.memoizedState=i.state,e=t.child):e=Pt(e,t,n),e}function zf(e,t,l,a){return Xl(),t.flags|=256,Pe(e,t,l,a),t.child}var Yr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gr(e){return{baseLanes:e,cachePool:jo()}}function Xr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=gt),e}function Df(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(He.current&2)!==0),o&&(n=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(ve){if(n?gl(t):bl(),(e=_e)?(e=Gd(e,Rt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:dl!==null?{id:Lt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},l=fo(e),l.return=t,t.child=l,We=t,_e=null)):e=null,e===null)throw hl(t);return Tu(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,n?(bl(),n=t.mode,p=_s({mode:"hidden",children:p},n),a=Gl(a,n,l,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=Gr(l),a.childLanes=Xr(e,o,l),t.memoizedState=Yr,vn(null,a)):(gl(t),Qr(t,p))}var j=e.memoizedState;if(j!==null&&(p=j.dehydrated,p!==null)){if(i)t.flags&256?(gl(t),t.flags&=-257,t=Vr(e,t,l)):t.memoizedState!==null?(bl(),t.child=e.child,t.flags|=128,t=null):(bl(),p=a.fallback,n=t.mode,a=_s({mode:"visible",children:a.children},n),p=Gl(p,n,l,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,Jl(t,e.child,null,l),a=t.child,a.memoizedState=Gr(l),a.childLanes=Xr(e,o,l),t.memoizedState=Yr,t=vn(null,a));else if(gl(t),Tu(p)){if(o=p.nextSibling&&p.nextSibling.dataset,o)var A=o.dgst;o=A,a=Error(u(419)),a.stack="",a.digest=o,nn({value:a,source:null,stack:null}),t=Vr(e,t,l)}else if(Xe||ba(e,t,l,!1),o=(l&e.childLanes)!==0,Xe||o){if(o=we,o!==null&&(a=yc(o,l),a!==0&&a!==j.retryLane))throw j.retryLane=a,Yl(e,a),ot(o,e,a),Hr;Eu(p)||Ys(),t=Vr(e,t,l)}else Eu(p)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,_e=Mt(p.nextSibling),We=t,ve=!0,ml=null,Rt=!1,e!==null&&po(t,e),t=Qr(t,a.children),t.flags|=4096);return t}return n?(bl(),p=a.fallback,n=t.mode,j=e.child,A=j.sibling,a=Zt(j,{mode:"hidden",children:a.children}),a.subtreeFlags=j.subtreeFlags&65011712,A!==null?p=Zt(A,p):(p=Gl(p,n,l,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,vn(null,a),a=t.child,p=e.child.memoizedState,p===null?p=Gr(l):(n=p.cachePool,n!==null?(j=Ye._currentValue,n=n.parent!==j?{parent:j,pool:j}:n):n=jo(),p={baseLanes:p.baseLanes|l,cachePool:n}),a.memoizedState=p,a.childLanes=Xr(e,o,l),t.memoizedState=Yr,vn(e.child,a)):(gl(t),l=e.child,e=l.sibling,l=Zt(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 Qr(e,t){return t=_s({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function _s(e,t){return e=pt(22,e,null,t),e.lanes=0,e}function Vr(e,t,l){return Jl(t,e.child,null,l),e=Qr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Of(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ir(e.return,t,l)}function Zr(e,t,l,a,n,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=l,o.tailMode=n,o.treeForkCount=i)}function Lf(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var o=He.current,p=(o&2)!==0;if(p?(o=o&1|2,t.flags|=128):o&=1,W(He,o),Pe(e,t,a,l),a=ve?an:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Of(e,l,t);else if(e.tag===19)Of(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(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&bs(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),Zr(t,!1,n,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&bs(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}Zr(t,!0,l,null,i,a);break;case"together":Zr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Pt(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Nl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ba(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,l=Zt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Zt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Kr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ds(e)))}function _p(e,t,l){switch(t.tag){case 3:tt(t,t.stateNode.containerInfo),pl(t,Ye,e.memoizedState.cache),Xl();break;case 27:case 5:Ga(t);break;case 4:tt(t,t.stateNode.containerInfo);break;case 10:pl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,yr(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(gl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Df(e,t,l):(gl(t),e=Pt(e,t,l),e!==null?e.sibling:null);gl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(ba(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return Lf(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),W(He,He.current),a)break;return null;case 22:return t.lanes=0,Af(e,t,l,t.pendingProps);case 24:pl(t,Ye,e.memoizedState.cache)}return Pt(e,t,l)}function Uf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xe=!0;else{if(!Kr(e,l)&&(t.flags&128)===0)return Xe=!1,_p(e,t,l);Xe=(e.flags&131072)!==0}else Xe=!1,ve&&(t.flags&1048576)!==0&&ho(t,an,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Kl(t.elementType),t.type=e,typeof e=="function")Pi(e)?(a=Fl(e,a),t.tag=1,t=_f(null,t,e,a,l)):(t.tag=0,t=qr(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===X){t.tag=11,t=Tf(null,t,e,a,l);break e}else if(n===$){t.tag=14,t=Cf(null,t,e,a,l);break e}}throw t=ye(e)||e,Error(u(306,t,""))}}return t;case 0:return qr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=Fl(a,t.pendingProps),_f(e,t,a,n,l);case 3:e:{if(tt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,mr(e,t),dn(t,a,null,l);var o=t.memoizedState;if(a=o.cache,pl(t,Ye,a),a!==i.cache&&rr(t,[Ye],l,!0),fn(),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=zf(e,t,a,l);break e}else if(a!==n){n=Et(Error(u(424)),t),nn(n),t=zf(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(_e=Mt(e.firstChild),We=t,ve=!0,ml=null,Rt=!0,l=Ro(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Xl(),a===n){t=Pt(e,t,l);break e}Pe(e,t,a,l)}t=t.child}return t;case 26:return ws(e,t),e===null?(l=$d(t.type,null,t.pendingProps,null))?t.memoizedState=l:ve||(l=t.type,e=t.pendingProps,a=$s(de.current).createElement(l),a[Je]=t,a[nt]=e,Ie(a,l,e),Ke(a),t.stateNode=a):t.memoizedState=$d(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ga(t),e===null&&ve&&(a=t.stateNode=Vd(t.type,t.pendingProps,de.current),We=t,Rt=!0,n=_e,Al(t.type)?(Cu=n,_e=Mt(a.firstChild)):_e=n),Pe(e,t,t.pendingProps.children,l),ws(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ve&&((n=a=_e)&&(a=ux(a,t.type,t.pendingProps,Rt),a!==null?(t.stateNode=a,We=t,_e=Mt(a.firstChild),Rt=!1,n=!0):n=!1),n||hl(t)),Ga(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,ju(n,i)?a=null:o!==null&&ju(n,o)&&(t.flags|=32),t.memoizedState!==null&&(n=br(e,t,Np,null,null,l),_n._currentValue=n),ws(e,t),Pe(e,t,a,l),t.child;case 6:return e===null&&ve&&((e=l=_e)&&(l=cx(l,t.pendingProps,Rt),l!==null?(t.stateNode=l,We=t,_e=null,e=!0):e=!1),e||hl(t)),null;case 13:return Df(e,t,l);case 4:return tt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Jl(t,null,a,l):Pe(e,t,a,l),t.child;case 11:return Tf(e,t,t.type,t.pendingProps,l);case 7:return Pe(e,t,t.pendingProps,l),t.child;case 8:return Pe(e,t,t.pendingProps.children,l),t.child;case 12:return Pe(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,pl(t,t.type,a.value),Pe(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,Vl(t),n=Fe(n),a=a(n),t.flags|=1,Pe(e,t,a,l),t.child;case 14:return Cf(e,t,t.type,t.pendingProps,l);case 15:return Rf(e,t,t.type,t.pendingProps,l);case 19:return Lf(e,t,l);case 31:return wp(e,t,l);case 22:return Af(e,t,l,t.pendingProps);case 24:return Vl(t),a=Fe(Ye),e===null?(n=or(),n===null&&(n=we,i=ur(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},dr(t),pl(t,Ye,n)):((e.lanes&l)!==0&&(mr(e,t),dn(t,null,null,l),fn()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),pl(t,Ye,a)):(a=i.cache,pl(t,Ye,a),a!==n.cache&&rr(t,[Ye],l,!0))),Pe(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function It(e){e.flags|=4}function $r(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(od())e.flags|=8192;else throw $l=xs,fr}else e.flags&=-16777217}function Bf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Id(t))if(od())e.flags|=8192;else throw $l=xs,fr}function zs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?pc():536870912,e.lanes|=t,_a|=t)}function yn(e,t){if(!ve)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 ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function zp(e,t,l){var a=t.pendingProps;switch(lr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Jt(Ye),Be(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ga(t)?It(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,nr())),ze(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(It(t),i!==null?(ze(t),Bf(t,i)):(ze(t),$r(t,n,null,a,l))):i?i!==e.memoizedState?(It(t),ze(t),Bf(t,i)):(ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&It(t),ze(t),$r(t,n,e,a,l)),null;case 27:if(Qn(t),l=de.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&It(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return ze(t),null}e=I.current,ga(t)?xo(t):(e=Vd(n,a,l),t.stateNode=e,It(t))}return ze(t),null;case 5:if(Qn(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&It(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return ze(t),null}if(i=I.current,ga(t))xo(t);else{var o=$s(de.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);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(n,{is:a.is}):o.createElement(n)}}i[Je]=t,i[nt]=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(Ie(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&It(t)}}return ze(t),$r(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&It(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(u(166));if(e=de.current,ga(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=We,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Je]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Dd(e.nodeValue,l)),e||hl(t,!0)}else e=$s(e).createTextNode(a),e[Je]=t,t.stateNode=e}return ze(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=ga(t),l!==null){if(e===null){if(!a)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Je]=t}else Xl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else l=nr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(vt(t),t):(vt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return ze(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=ga(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(u(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(u(317));n[Je]=t}else Xl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),n=!1}else n=nr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(vt(t),t):(vt(t),null)}return vt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),zs(t,t.updateQueue),ze(t),null);case 4:return Be(),e===null&&xu(t.stateNode.containerInfo),ze(t),null;case 10:return Jt(t.type),ze(t),null;case 19:if(q(He),a=t.memoizedState,a===null)return ze(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)yn(a,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=bs(e),i!==null){for(t.flags|=128,yn(a,!1),e=i.updateQueue,t.updateQueue=e,zs(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)oo(l,e),l=l.sibling;return W(He,He.current&1|2),ve&&Kt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ft()>Bs&&(t.flags|=128,n=!0,yn(a,!1),t.lanes=4194304)}else{if(!n)if(e=bs(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,zs(t,e),yn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!ve)return ze(t),null}else 2*ft()-a.renderingStartTime>Bs&&l!==536870912&&(t.flags|=128,n=!0,yn(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=ft(),e.sibling=null,l=He.current,W(He,n?l&1|2:l&1),ve&&Kt(t,a.treeForkCount),e):(ze(t),null);case 22:case 23:return vt(t),vr(),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&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),l=t.updateQueue,l!==null&&zs(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&&q(Zl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Jt(Ye),ze(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Dp(e,t){switch(lr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jt(Ye),Be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Qn(t),null;case 31:if(t.memoizedState!==null){if(vt(t),t.alternate===null)throw Error(u(340));Xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(He),null;case 4:return Be(),null;case 10:return Jt(t.type),null;case 22:case 23:return vt(t),vr(),e!==null&&q(Zl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jt(Ye),null;case 25:return null;default:return null}}function Hf(e,t){switch(lr(t),t.tag){case 3:Jt(Ye),Be();break;case 26:case 27:case 5:Qn(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&vt(t);break;case 13:vt(t);break;case 19:q(He);break;case 10:Jt(t.type);break;case 22:case 23:vt(t),vr(),e!==null&&q(Zl);break;case 24:Jt(Ye)}}function gn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;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!==n)}}catch(p){Re(t,t.return,p)}}function jl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){var o=a.inst,p=o.destroy;if(p!==void 0){o.destroy=void 0,n=t;var j=l,A=p;try{A()}catch(U){Re(n,j,U)}}}a=a.next}while(a!==i)}}catch(U){Re(t,t.return,U)}}function qf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Mo(t,l)}catch(a){Re(e,e.return,a)}}}function Yf(e,t,l){l.props=Fl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Re(e,t,a)}}function bn(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(n){Re(e,t,n)}}function Bt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Re(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Re(e,t,n)}else l.current=null}function Gf(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(n){Re(e,e.return,n)}}function Jr(e,t,l){try{var a=e.stateNode;lx(a,e.type,l,t),a[nt]=t}catch(n){Re(e,e.return,n)}}function Xf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Al(e.type)||e.tag===4}function Wr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xf(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&&Al(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 Fr(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=Qt));else if(a!==4&&(a===27&&Al(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Fr(e,t,l),e=e.sibling;e!==null;)Fr(e,t,l),e=e.sibling}function Ds(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&&Al(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Ds(e,t,l),e=e.sibling;e!==null;)Ds(e,t,l),e=e.sibling}function Qf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ie(t,a,l),t[Je]=e,t[nt]=l}catch(i){Re(e,e.return,i)}}var el=!1,Qe=!1,Pr=!1,Vf=typeof WeakSet=="function"?WeakSet:Set,$e=null;function Op(e,t){if(e=e.containerInfo,gu=ti,e=to(e),Vi(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 n=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var o=0,p=-1,j=-1,A=0,U=0,H=e,k=null;t:for(;;){for(var _;H!==l||n!==0&&H.nodeType!==3||(p=o+n),H!==i||a!==0&&H.nodeType!==3||(j=o+a),H.nodeType===3&&(o+=H.nodeValue.length),(_=H.firstChild)!==null;)k=H,H=_;for(;;){if(H===e)break t;if(k===l&&++A===n&&(p=o),k===i&&++U===a&&(j=o),(_=H.nextSibling)!==null)break;H=k,k=H.parentNode}H=_}l=p===-1||j===-1?null:{start:p,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(bu={focusedElem:e,selectionRange:l},ti=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){switch(t=$e,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++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var P=Fl(l.type,n);e=a.getSnapshotBeforeUpdate(P,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(se){Re(l,l.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Nu(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Nu(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}}function Zf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ll(e,l),a&4&&gn(5,l);break;case 1:if(ll(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){Re(l,l.return,o)}else{var n=Fl(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Re(l,l.return,o)}}a&64&&qf(l),a&512&&bn(l,l.return);break;case 3:if(ll(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{Mo(e,t)}catch(o){Re(l,l.return,o)}}break;case 27:t===null&&a&4&&Qf(l);case 26:case 5:ll(e,l),t===null&&a&4&&Gf(l),a&512&&bn(l,l.return);break;case 12:ll(e,l);break;case 31:ll(e,l),a&4&&Jf(e,l);break;case 13:ll(e,l),a&4&&Wf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Qp.bind(null,l),ox(e,l))));break;case 22:if(a=l.memoizedState!==null||el,!a){t=t!==null&&t.memoizedState!==null||Qe,n=el;var i=Qe;el=a,(Qe=t)&&!i?al(e,l,(l.subtreeFlags&8772)!==0):ll(e,l),el=n,Qe=i}break;case 30:break;default:ll(e,l)}}function Kf(e){var t=e.alternate;t!==null&&(e.alternate=null,Kf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ai(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 De=null,it=!1;function tl(e,t,l){for(l=l.child;l!==null;)$f(e,t,l),l=l.sibling}function $f(e,t,l){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Xa,l)}catch{}switch(l.tag){case 26:Qe||Bt(l,t),tl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Qe||Bt(l,t);var a=De,n=it;Al(l.type)&&(De=l.stateNode,it=!1),tl(e,t,l),Mn(l.stateNode),De=a,it=n;break;case 5:Qe||Bt(l,t);case 6:if(a=De,n=it,De=null,tl(e,t,l),De=a,it=n,De!==null)if(it)try{(De.nodeType===9?De.body:De.nodeName==="HTML"?De.ownerDocument.body:De).removeChild(l.stateNode)}catch(i){Re(l,t,i)}else try{De.removeChild(l.stateNode)}catch(i){Re(l,t,i)}break;case 18:De!==null&&(it?(e=De,qd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),qa(e)):qd(De,l.stateNode));break;case 4:a=De,n=it,De=l.stateNode.containerInfo,it=!0,tl(e,t,l),De=a,it=n;break;case 0:case 11:case 14:case 15:jl(2,l,t),Qe||jl(4,l,t),tl(e,t,l);break;case 1:Qe||(Bt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Yf(l,t,a)),tl(e,t,l);break;case 21:tl(e,t,l);break;case 22:Qe=(a=Qe)||l.memoizedState!==null,tl(e,t,l),Qe=a;break;default:tl(e,t,l)}}function Jf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{qa(e)}catch(l){Re(t,t.return,l)}}}function Wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{qa(e)}catch(l){Re(t,t.return,l)}}function Lp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Vf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Vf),t;default:throw Error(u(435,e.tag))}}function Os(e,t){var l=Lp(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=Vp.bind(null,e,a);a.then(n,n)}})}function rt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,o=t,p=o;e:for(;p!==null;){switch(p.tag){case 27:if(Al(p.type)){De=p.stateNode,it=!1;break e}break;case 5:De=p.stateNode,it=!1;break e;case 3:case 4:De=p.stateNode.containerInfo,it=!0;break e}p=p.return}if(De===null)throw Error(u(160));$f(i,o,n),De=null,it=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ff(t,e),t=t.sibling}var Dt=null;function Ff(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:rt(t,e),ut(e),a&4&&(jl(3,e,e.return),gn(3,e),jl(5,e,e.return));break;case 1:rt(t,e),ut(e),a&512&&(Qe||l===null||Bt(l,l.return)),a&64&&el&&(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 n=Dt;if(rt(t,e),ut(e),a&512&&(Qe||l===null||Bt(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,n=n.ownerDocument||n;t:switch(a){case"title":i=n.getElementsByTagName("title")[0],(!i||i[Za]||i[Je]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),Ie(i,a,l),i[Je]=e,Ke(i),a=i;break e;case"link":var o=Fd("link","href",n).get(a+(l.href||""));if(o){for(var p=0;p<o.length;p++)if(i=o[p],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(p,1);break t}}i=n.createElement(a),Ie(i,a,l),n.head.appendChild(i);break;case"meta":if(o=Fd("meta","content",n).get(a+(l.content||""))){for(p=0;p<o.length;p++)if(i=o[p],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(p,1);break t}}i=n.createElement(a),Ie(i,a,l),n.head.appendChild(i);break;default:throw Error(u(468,a))}i[Je]=e,Ke(i),a=i}e.stateNode=a}else Pd(n,e.type,e.stateNode);else e.stateNode=Wd(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Pd(n,e.type,e.stateNode):Wd(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Jr(e,e.memoizedProps,l.memoizedProps)}break;case 27:rt(t,e),ut(e),a&512&&(Qe||l===null||Bt(l,l.return)),l!==null&&a&4&&Jr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(rt(t,e),ut(e),a&512&&(Qe||l===null||Bt(l,l.return)),e.flags&32){n=e.stateNode;try{ca(n,"")}catch(P){Re(e,e.return,P)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Jr(e,n,l!==null?l.memoizedProps:n)),a&1024&&(Pr=!0);break;case 6:if(rt(t,e),ut(e),a&4){if(e.stateNode===null)throw Error(u(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(P){Re(e,e.return,P)}}break;case 3:if(Fs=null,n=Dt,Dt=Js(t.containerInfo),rt(t,e),Dt=n,ut(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{qa(t.containerInfo)}catch(P){Re(e,e.return,P)}Pr&&(Pr=!1,Pf(e));break;case 4:a=Dt,Dt=Js(e.stateNode.containerInfo),rt(t,e),ut(e),Dt=a;break;case 12:rt(t,e),ut(e);break;case 31:rt(t,e),ut(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Os(e,a)));break;case 13:rt(t,e),ut(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Us=ft()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Os(e,a)));break;case 22:n=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,A=el,U=Qe;if(el=A||n,Qe=U||j,rt(t,e),Qe=U,el=A,ut(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||j||el||Qe||Pl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){j=l=t;try{if(i=j.stateNode,n)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{p=j.stateNode;var H=j.memoizedProps.style,k=H!=null&&H.hasOwnProperty("display")?H.display:null;p.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(P){Re(j,j.return,P)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=n?"":j.memoizedProps}catch(P){Re(j,j.return,P)}}}else if(t.tag===18){if(l===null){j=t;try{var _=j.stateNode;n?Yd(_,!0):Yd(j.stateNode,!1)}catch(P){Re(j,j.return,P)}}}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,Os(e,l))));break;case 19:rt(t,e),ut(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Os(e,a)));break;case 30:break;case 21:break;default:rt(t,e),ut(e)}}function ut(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Xf(a)){l=a;break}a=a.return}if(l==null)throw Error(u(160));switch(l.tag){case 27:var n=l.stateNode,i=Wr(e);Ds(e,i,n);break;case 5:var o=l.stateNode;l.flags&32&&(ca(o,""),l.flags&=-33);var p=Wr(e);Ds(e,p,o);break;case 3:case 4:var j=l.stateNode.containerInfo,A=Wr(e);Fr(e,A,j);break;default:throw Error(u(161))}}catch(U){Re(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Pf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ll(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Zf(e,t.alternate,t),t=t.sibling}function Pl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:jl(4,t,t.return),Pl(t);break;case 1:Bt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Yf(t,t.return,l),Pl(t);break;case 27:Mn(t.stateNode);case 26:case 5:Bt(t,t.return),Pl(t);break;case 22:t.memoizedState===null&&Pl(t);break;case 30:Pl(t);break;default:Pl(t)}e=e.sibling}}function al(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:al(n,i,l),gn(4,i);break;case 1:if(al(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(A){Re(a,a.return,A)}if(a=i,n=a.updateQueue,n!==null){var p=a.stateNode;try{var j=n.shared.hiddenCallbacks;if(j!==null)for(n.shared.hiddenCallbacks=null,n=0;n<j.length;n++)Ao(j[n],p)}catch(A){Re(a,a.return,A)}}l&&o&64&&qf(i),bn(i,i.return);break;case 27:Qf(i);case 26:case 5:al(n,i,l),l&&a===null&&o&4&&Gf(i),bn(i,i.return);break;case 12:al(n,i,l);break;case 31:al(n,i,l),l&&o&4&&Jf(n,i);break;case 13:al(n,i,l),l&&o&4&&Wf(n,i);break;case 22:i.memoizedState===null&&al(n,i,l),bn(i,i.return);break;case 30:break;default:al(n,i,l)}t=t.sibling}}function Ir(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&&sn(l))}function eu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sn(e))}function Ot(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)If(e,t,l,a),t=t.sibling}function If(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Ot(e,t,l,a),n&2048&&gn(9,t);break;case 1:Ot(e,t,l,a);break;case 3:Ot(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sn(e)));break;case 12:if(n&2048){Ot(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,p=i.onPostCommit;typeof p=="function"&&p(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Re(t,t.return,j)}}else Ot(e,t,l,a);break;case 31:Ot(e,t,l,a);break;case 13:Ot(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?Ot(e,t,l,a):jn(e,t):i._visibility&2?Ot(e,t,l,a):(i._visibility|=2,Ma(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Ir(o,t);break;case 24:Ot(e,t,l,a),n&2048&&eu(t.alternate,t);break;default:Ot(e,t,l,a)}}function Ma(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,p=l,j=a,A=o.flags;switch(o.tag){case 0:case 11:case 15:Ma(i,o,p,j,n),gn(8,o);break;case 23:break;case 22:var U=o.stateNode;o.memoizedState!==null?U._visibility&2?Ma(i,o,p,j,n):jn(i,o):(U._visibility|=2,Ma(i,o,p,j,n)),n&&A&2048&&Ir(o.alternate,o);break;case 24:Ma(i,o,p,j,n),n&&A&2048&&eu(o.alternate,o);break;default:Ma(i,o,p,j,n)}t=t.sibling}}function jn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:jn(l,a),n&2048&&Ir(a.alternate,a);break;case 24:jn(l,a),n&2048&&eu(a.alternate,a);break;default:jn(l,a)}t=t.sibling}}var Sn=8192;function ka(e,t,l){if(e.subtreeFlags&Sn)for(e=e.child;e!==null;)ed(e,t,l),e=e.sibling}function ed(e,t,l){switch(e.tag){case 26:ka(e,t,l),e.flags&Sn&&e.memoizedState!==null&&Sx(l,Dt,e.memoizedState,e.memoizedProps);break;case 5:ka(e,t,l);break;case 3:case 4:var a=Dt;Dt=Js(e.stateNode.containerInfo),ka(e,t,l),Dt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Sn,Sn=16777216,ka(e,t,l),Sn=a):ka(e,t,l));break;default:ka(e,t,l)}}function td(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 Nn(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];$e=a,ad(a,e)}td(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ld(e),e=e.sibling}function ld(e){switch(e.tag){case 0:case 11:case 15:Nn(e),e.flags&2048&&jl(9,e,e.return);break;case 3:Nn(e);break;case 12:Nn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ls(e)):Nn(e);break;default:Nn(e)}}function Ls(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];$e=a,ad(a,e)}td(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:jl(8,t,t.return),Ls(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ls(t));break;default:Ls(t)}e=e.sibling}}function ad(e,t){for(;$e!==null;){var l=$e;switch(l.tag){case 0:case 11:case 15:jl(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:sn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,$e=a;else e:for(l=e;$e!==null;){a=$e;var n=a.sibling,i=a.return;if(Kf(a),a===l){$e=null;break e}if(n!==null){n.return=i,$e=n;break e}$e=i}}}var Up={getCacheForType:function(e){var t=Fe(Ye),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Fe(Ye).controller.signal}},Bp=typeof WeakMap=="function"?WeakMap:Map,Se=0,we=null,me=null,pe=0,Ce=0,yt=null,Sl=!1,wa=!1,tu=!1,nl=0,Ue=0,Nl=0,Il=0,lu=0,gt=0,_a=0,En=null,ct=null,au=!1,Us=0,nd=0,Bs=1/0,Hs=null,El=null,Ze=0,Tl=null,za=null,sl=0,nu=0,su=null,sd=null,Tn=0,iu=null;function bt(){return(Se&2)!==0&&pe!==0?pe&-pe:D.T!==null?du():gc()}function id(){if(gt===0)if((pe&536870912)===0||ve){var e=Kn;Kn<<=1,(Kn&3932160)===0&&(Kn=262144),gt=e}else gt=536870912;return e=xt.current,e!==null&&(e.flags|=32),gt}function ot(e,t,l){(e===we&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Da(e,0),Cl(e,pe,gt,!1)),Va(e,l),((Se&2)===0||e!==we)&&(e===we&&((Se&2)===0&&(Il|=l),Ue===4&&Cl(e,pe,gt,!1)),Ht(e))}function rd(e,t,l){if((Se&6)!==0)throw Error(u(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Qa(e,t),n=a?Yp(e,t):uu(e,t,!0),i=a;do{if(n===0){wa&&!a&&Cl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Hp(l)){n=uu(e,t,!1),i=!1;continue}if(n===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 p=e;n=En;var j=p.current.memoizedState.isDehydrated;if(j&&(Da(p,o).flags|=256),o=uu(p,o,!1),o!==2){if(tu&&!j){p.errorRecoveryDisabledLanes|=i,Il|=i,n=4;break e}i=ct,ct=n,i!==null&&(ct===null?ct=i:ct.push.apply(ct,i))}n=o}if(i=!1,n!==2)continue}}if(n===1){Da(e,0),Cl(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Cl(a,t,gt,!Sl);break e;case 2:ct=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(n=Us+300-ft(),10<n)){if(Cl(a,t,gt,!Sl),Jn(a,0,!0)!==0)break e;sl=t,a.timeoutHandle=Bd(ud.bind(null,a,l,ct,Hs,au,t,gt,Il,_a,Sl,i,"Throttled",-0,0),n);break e}ud(a,l,ct,Hs,au,t,gt,Il,_a,Sl,i,null,-0,0)}}break}while(!0);Ht(e)}function ud(e,t,l,a,n,i,o,p,j,A,U,H,k,_){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},ed(t,i,H);var P=(i&62914560)===i?Us-ft():(i&4194048)===i?nd-ft():0;if(P=Nx(H,P),P!==null){sl=i,e.cancelPendingCommit=P(xd.bind(null,e,t,i,l,a,n,o,p,j,U,H,null,k,_)),Cl(e,i,o,!A);return}}xd(e,t,i,l,a,n,o,p,j)}function Hp(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 n=l[a],i=n.getSnapshot;n=n.value;try{if(!ht(i(),n))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 Cl(e,t,l,a){t&=~lu,t&=~Il,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-mt(n),o=1<<i;a[i]=-1,n&=~o}l!==0&&xc(e,l,t)}function qs(){return(Se&6)===0?(Cn(0),!1):!0}function ru(){if(me!==null){if(Ce===0)var e=me.return;else e=me,$t=Ql=null,Nr(e),Ea=null,un=0,e=me;for(;e!==null;)Hf(e.alternate,e),e=e.return;me=null}}function Da(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,sx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),sl=0,ru(),we=e,me=l=Zt(e.current,null),pe=t,Ce=0,yt=null,Sl=!1,wa=Qa(e,t),tu=!1,_a=gt=lu=Il=Nl=Ue=0,ct=En=null,au=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-mt(a),i=1<<n;t|=e[n],a&=~i}return nl=t,rs(),l}function cd(e,t){ce=null,D.H=xn,t===Na||t===ps?(t=Eo(),Ce=3):t===fr?(t=Eo(),Ce=4):Ce=t===Hr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yt=t,me===null&&(Ue=1,Ms(e,Et(t,e.current)))}function od(){var e=xt.current;return e===null?!0:(pe&4194048)===pe?At===null:(pe&62914560)===pe||(pe&536870912)!==0?e===At:!1}function fd(){var e=D.H;return D.H=xn,e===null?xn:e}function dd(){var e=D.A;return D.A=Up,e}function Ys(){Ue=4,Sl||(pe&4194048)!==pe&&xt.current!==null||(wa=!0),(Nl&134217727)===0&&(Il&134217727)===0||we===null||Cl(we,pe,gt,!1)}function uu(e,t,l){var a=Se;Se|=2;var n=fd(),i=dd();(we!==e||pe!==t)&&(Hs=null,Da(e,t)),t=!1;var o=Ue;e:do try{if(Ce!==0&&me!==null){var p=me,j=yt;switch(Ce){case 8:ru(),o=6;break e;case 3:case 2:case 9:case 6:xt.current===null&&(t=!0);var A=Ce;if(Ce=0,yt=null,Oa(e,p,j,A),l&&wa){o=0;break e}break;default:A=Ce,Ce=0,yt=null,Oa(e,p,j,A)}}qp(),o=Ue;break}catch(U){cd(e,U)}while(!0);return t&&e.shellSuspendCounter++,$t=Ql=null,Se=a,D.H=n,D.A=i,me===null&&(we=null,pe=0,rs()),o}function qp(){for(;me!==null;)md(me)}function Yp(e,t){var l=Se;Se|=2;var a=fd(),n=dd();we!==e||pe!==t?(Hs=null,Bs=ft()+500,Da(e,t)):wa=Qa(e,t);e:do try{if(Ce!==0&&me!==null){t=me;var i=yt;t:switch(Ce){case 1:Ce=0,yt=null,Oa(e,t,i,1);break;case 2:case 9:if(So(i)){Ce=0,yt=null,hd(t);break}t=function(){Ce!==2&&Ce!==9||we!==e||(Ce=7),Ht(e)},i.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:So(i)?(Ce=0,yt=null,hd(t)):(Ce=0,yt=null,Oa(e,t,i,7));break;case 5:var o=null;switch(me.tag){case 26:o=me.memoizedState;case 5:case 27:var p=me;if(o?Id(o):p.stateNode.complete){Ce=0,yt=null;var j=p.sibling;if(j!==null)me=j;else{var A=p.return;A!==null?(me=A,Gs(A)):me=null}break t}}Ce=0,yt=null,Oa(e,t,i,5);break;case 6:Ce=0,yt=null,Oa(e,t,i,6);break;case 8:ru(),Ue=6;break e;default:throw Error(u(462))}}Gp();break}catch(U){cd(e,U)}while(!0);return $t=Ql=null,D.H=a,D.A=n,Se=l,me!==null?0:(we=null,pe=0,rs(),Ue)}function Gp(){for(;me!==null&&!fh();)md(me)}function md(e){var t=Uf(e.alternate,e,nl);e.memoizedProps=e.pendingProps,t===null?Gs(e):me=t}function hd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=wf(l,t,t.pendingProps,t.type,void 0,pe);break;case 11:t=wf(l,t,t.pendingProps,t.type.render,t.ref,pe);break;case 5:Nr(t);default:Hf(l,t),t=me=oo(t,nl),t=Uf(l,t,nl)}e.memoizedProps=e.pendingProps,t===null?Gs(e):me=t}function Oa(e,t,l,a){$t=Ql=null,Nr(t),Ea=null,un=0;var n=t.return;try{if(kp(e,n,t,l,pe)){Ue=1,Ms(e,Et(l,e.current)),me=null;return}}catch(i){if(n!==null)throw me=n,i;Ue=1,Ms(e,Et(l,e.current)),me=null;return}t.flags&32768?(ve||a===1?e=!0:wa||(pe&536870912)!==0?e=!1:(Sl=e=!0,(a===2||a===9||a===3||a===6)&&(a=xt.current,a!==null&&a.tag===13&&(a.flags|=16384))),pd(t,e)):Gs(t)}function Gs(e){var t=e;do{if((t.flags&32768)!==0){pd(t,Sl);return}e=t.return;var l=zp(t.alternate,t,nl);if(l!==null){me=l;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);Ue===0&&(Ue=5)}function pd(e,t){do{var l=Dp(e.alternate,e);if(l!==null){l.flags&=32767,me=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){me=e;return}me=e=l}while(e!==null);Ue=6,me=null}function xd(e,t,l,a,n,i,o,p,j){e.cancelPendingCommit=null;do Xs();while(Ze!==0);if((Se&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(i=t.lanes|t.childLanes,i|=Wi,jh(e,l,i,o,p,j),e===we&&(me=we=null,pe=0),za=t,Tl=e,sl=l,nu=i,su=n,sd=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Zp(Vn,function(){return jd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null,n=K.p,K.p=2,o=Se,Se|=4;try{Op(e,t,l)}finally{Se=o,K.p=n,D.T=a}}Ze=1,vd(),yd(),gd()}}function vd(){if(Ze===1){Ze=0;var e=Tl,t=za,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var a=K.p;K.p=2;var n=Se;Se|=4;try{Ff(t,e);var i=bu,o=to(e.containerInfo),p=i.focusedElem,j=i.selectionRange;if(o!==p&&p&&p.ownerDocument&&eo(p.ownerDocument.documentElement,p)){if(j!==null&&Vi(p)){var A=j.start,U=j.end;if(U===void 0&&(U=A),"selectionStart"in p)p.selectionStart=A,p.selectionEnd=Math.min(U,p.value.length);else{var H=p.ownerDocument||document,k=H&&H.defaultView||window;if(k.getSelection){var _=k.getSelection(),P=p.textContent.length,se=Math.min(j.start,P),ke=j.end===void 0?se:Math.min(j.end,P);!_.extend&&se>ke&&(o=ke,ke=se,se=o);var T=Ic(p,se),E=Ic(p,ke);if(T&&E&&(_.rangeCount!==1||_.anchorNode!==T.node||_.anchorOffset!==T.offset||_.focusNode!==E.node||_.focusOffset!==E.offset)){var R=H.createRange();R.setStart(T.node,T.offset),_.removeAllRanges(),se>ke?(_.addRange(R),_.extend(E.node,E.offset)):(R.setEnd(E.node,E.offset),_.addRange(R))}}}}for(H=[],_=p;_=_.parentNode;)_.nodeType===1&&H.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<H.length;p++){var B=H[p];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}ti=!!gu,bu=gu=null}finally{Se=n,K.p=a,D.T=l}}e.current=t,Ze=2}}function yd(){if(Ze===2){Ze=0;var e=Tl,t=za,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var a=K.p;K.p=2;var n=Se;Se|=4;try{Zf(e,t.alternate,t)}finally{Se=n,K.p=a,D.T=l}}Ze=3}}function gd(){if(Ze===4||Ze===3){Ze=0,dh();var e=Tl,t=za,l=sl,a=sd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ze=5:(Ze=0,za=Tl=null,bd(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(El=null),Ci(l),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Xa,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=D.T,n=K.p,K.p=2,D.T=null;try{for(var i=e.onRecoverableError,o=0;o<a.length;o++){var p=a[o];i(p.value,{componentStack:p.stack})}}finally{D.T=t,K.p=n}}(sl&3)!==0&&Xs(),Ht(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===iu?Tn++:(Tn=0,iu=e):Tn=0,Cn(0)}}function bd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sn(t)))}function Xs(){return vd(),yd(),gd(),jd()}function jd(){if(Ze!==5)return!1;var e=Tl,t=nu;nu=0;var l=Ci(sl),a=D.T,n=K.p;try{K.p=32>l?32:l,D.T=null,l=su,su=null;var i=Tl,o=sl;if(Ze=0,za=Tl=null,sl=0,(Se&6)!==0)throw Error(u(331));var p=Se;if(Se|=4,ld(i.current),If(i,i.current,o,l),Se=p,Cn(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Xa,i)}catch{}return!0}finally{K.p=n,D.T=a,bd(e,t)}}function Sd(e,t,l){t=Et(l,t),t=Br(e.stateNode,t,2),e=yl(e,t,2),e!==null&&(Va(e,2),Ht(e))}function Re(e,t,l){if(e.tag===3)Sd(e,e,l);else for(;t!==null;){if(t.tag===3){Sd(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(El===null||!El.has(a))){e=Et(l,e),l=Nf(2),a=yl(t,l,2),a!==null&&(Ef(l,a,t,e),Va(a,2),Ht(a));break}}t=t.return}}function cu(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Bp;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(tu=!0,n.add(l),e=Xp.bind(null,e,t,l),t.then(e,e))}function Xp(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,we===e&&(pe&l)===l&&(Ue===4||Ue===3&&(pe&62914560)===pe&&300>ft()-Us?(Se&2)===0&&Da(e,0):lu|=l,_a===pe&&(_a=0)),Ht(e)}function Nd(e,t){t===0&&(t=pc()),e=Yl(e,t),e!==null&&(Va(e,t),Ht(e))}function Qp(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Nd(e,l)}function Vp(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(u(314))}a!==null&&a.delete(t),Nd(e,l)}function Zp(e,t){return Si(e,t)}var Qs=null,La=null,ou=!1,Vs=!1,fu=!1,Rl=0;function Ht(e){e!==La&&e.next===null&&(La===null?Qs=La=e:La=La.next=e),Vs=!0,ou||(ou=!0,$p())}function Cn(e,t){if(!fu&&Vs){fu=!0;do for(var l=!1,a=Qs;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var o=a.suspendedLanes,p=a.pingedLanes;i=(1<<31-mt(42|e)+1)-1,i&=n&~(o&~p),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Rd(a,i))}else i=pe,i=Jn(a,a===we?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Qa(a,i)||(l=!0,Rd(a,i));a=a.next}while(l);fu=!1}}function Kp(){Ed()}function Ed(){Vs=ou=!1;var e=0;Rl!==0&&nx()&&(e=Rl);for(var t=ft(),l=null,a=Qs;a!==null;){var n=a.next,i=Td(a,t);i===0?(a.next=null,l===null?Qs=n:l.next=n,n===null&&(La=l)):(l=a,(e!==0||(i&3)!==0)&&(Vs=!0)),a=n}Ze!==0&&Ze!==5||Cn(e),Rl!==0&&(Rl=0)}function Td(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-mt(i),p=1<<o,j=n[o];j===-1?((p&l)===0||(p&a)!==0)&&(n[o]=bh(p,t)):j<=t&&(e.expiredLanes|=p),i&=~p}if(t=we,l=pe,l=Jn(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&&Ni(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Qa(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ni(a),Ci(l)){case 2:case 8:l=mc;break;case 32:l=Vn;break;case 268435456:l=hc;break;default:l=Vn}return a=Cd.bind(null,e),l=Si(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Ni(a),e.callbackPriority=2,e.callbackNode=null,2}function Cd(e,t){if(Ze!==0&&Ze!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Xs()&&e.callbackNode!==l)return null;var a=pe;return a=Jn(e,e===we?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(rd(e,a,t),Td(e,ft()),e.callbackNode!=null&&e.callbackNode===l?Cd.bind(null,e):null)}function Rd(e,t){if(Xs())return null;rd(e,t,!0)}function $p(){ix(function(){(Se&6)!==0?Si(dc,Kp):Ed()})}function du(){if(Rl===0){var e=ja;e===0&&(e=Zn,Zn<<=1,(Zn&261888)===0&&(Zn=256)),Rl=e}return Rl}function Ad(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:In(""+e)}function Md(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 Jp(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=Ad((n[nt]||null).action),o=a.submitter;o&&(t=(t=o[nt]||null)?Ad(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var p=new as("action","action",null,a,n);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Rl!==0){var j=o?Md(n,o):new FormData(n);_r(l,{pending:!0,data:j,method:n.method,action:i},null,j)}}else typeof i=="function"&&(p.preventDefault(),j=o?Md(n,o):new FormData(n),_r(l,{pending:!0,data:j,method:n.method,action:i},i,j))},currentTarget:n}]})}}for(var mu=0;mu<Ji.length;mu++){var hu=Ji[mu],Wp=hu.toLowerCase(),Fp=hu[0].toUpperCase()+hu.slice(1);zt(Wp,"on"+Fp)}zt(no,"onAnimationEnd"),zt(so,"onAnimationIteration"),zt(io,"onAnimationStart"),zt("dblclick","onDoubleClick"),zt("focusin","onFocus"),zt("focusout","onBlur"),zt(mp,"onTransitionRun"),zt(hp,"onTransitionStart"),zt(pp,"onTransitionCancel"),zt(ro,"onTransitionEnd"),ra("onMouseEnter",["mouseout","mouseover"]),ra("onMouseLeave",["mouseout","mouseover"]),ra("onPointerEnter",["pointerout","pointerover"]),ra("onPointerLeave",["pointerout","pointerover"]),Ul("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ul("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ul("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ul("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ul("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ul("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rn="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(" "),Pp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rn));function kd(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var o=a.length-1;0<=o;o--){var p=a[o],j=p.instance,A=p.currentTarget;if(p=p.listener,j!==i&&n.isPropagationStopped())break e;i=p,n.currentTarget=A;try{i(n)}catch(U){is(U)}n.currentTarget=null,i=j}else for(o=0;o<a.length;o++){if(p=a[o],j=p.instance,A=p.currentTarget,p=p.listener,j!==i&&n.isPropagationStopped())break e;i=p,n.currentTarget=A;try{i(n)}catch(U){is(U)}n.currentTarget=null,i=j}}}}function he(e,t){var l=t[Ri];l===void 0&&(l=t[Ri]=new Set);var a=e+"__bubble";l.has(a)||(wd(t,e,2,!1),l.add(a))}function pu(e,t,l){var a=0;t&&(a|=4),wd(l,e,a,t)}var Zs="_reactListening"+Math.random().toString(36).slice(2);function xu(e){if(!e[Zs]){e[Zs]=!0,Sc.forEach(function(l){l!=="selectionchange"&&(Pp.has(l)||pu(l,!1,e),pu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zs]||(t[Zs]=!0,pu("selectionchange",!1,t))}}function wd(e,t,l,a){switch(im(t)){case 2:var n=Cx;break;case 8:n=Rx;break;default:n=wu}l=n.bind(null,t,l,e),n=void 0,!Li||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function vu(e,t,l,a,n){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 p=a.stateNode.containerInfo;if(p===n)break;if(o===4)for(o=a.return;o!==null;){var j=o.tag;if((j===3||j===4)&&o.stateNode.containerInfo===n)return;o=o.return}for(;p!==null;){if(o=na(p),o===null)return;if(j=o.tag,j===5||j===6||j===26||j===27){a=i=o;continue e}p=p.parentNode}}a=a.return}Dc(function(){var A=i,U=Di(l),H=[];e:{var k=uo.get(e);if(k!==void 0){var _=as,P=e;switch(e){case"keypress":if(ts(l)===0)break e;case"keydown":case"keyup":_=Vh;break;case"focusin":P="focus",_=qi;break;case"focusout":P="blur",_=qi;break;case"beforeblur":case"afterblur":_=qi;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":_=Uc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=zh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=$h;break;case no:case so:case io:_=Lh;break;case ro:_=Wh;break;case"scroll":case"scrollend":_=wh;break;case"wheel":_=Ph;break;case"copy":case"cut":case"paste":_=Bh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=Hc;break;case"toggle":case"beforetoggle":_=ep}var se=(t&4)!==0,ke=!se&&(e==="scroll"||e==="scrollend"),T=se?k!==null?k+"Capture":null:k;se=[];for(var E=A,R;E!==null;){var B=E;if(R=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||R===null||T===null||(B=$a(E,T),B!=null&&se.push(An(E,B,R))),ke)break;E=E.return}0<se.length&&(k=new _(k,P,null,l,U),H.push({event:k,listeners:se}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",k&&l!==zi&&(P=l.relatedTarget||l.fromElement)&&(na(P)||P[aa]))break e;if((_||k)&&(k=U.window===U?U:(k=U.ownerDocument)?k.defaultView||k.parentWindow:window,_?(P=l.relatedTarget||l.toElement,_=A,P=P?na(P):null,P!==null&&(ke=m(P),se=P.tag,P!==ke||se!==5&&se!==27&&se!==6)&&(P=null)):(_=null,P=A),_!==P)){if(se=Uc,B="onMouseLeave",T="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(se=Hc,B="onPointerLeave",T="onPointerEnter",E="pointer"),ke=_==null?k:Ka(_),R=P==null?k:Ka(P),k=new se(B,E+"leave",_,l,U),k.target=ke,k.relatedTarget=R,B=null,na(U)===A&&(se=new se(T,E+"enter",P,l,U),se.target=R,se.relatedTarget=ke,B=se),ke=B,_&&P)t:{for(se=Ip,T=_,E=P,R=0,B=T;B;B=se(B))R++;B=0;for(var ne=E;ne;ne=se(ne))B++;for(;0<R-B;)T=se(T),R--;for(;0<B-R;)E=se(E),B--;for(;R--;){if(T===E||E!==null&&T===E.alternate){se=T;break t}T=se(T),E=se(E)}se=null}else se=null;_!==null&&_d(H,k,_,se,!1),P!==null&&ke!==null&&_d(H,ke,P,se,!0)}}e:{if(k=A?Ka(A):window,_=k.nodeName&&k.nodeName.toLowerCase(),_==="select"||_==="input"&&k.type==="file")var be=Kc;else if(Vc(k))if($c)be=op;else{be=up;var le=rp}else _=k.nodeName,!_||_.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?A&&_i(A.elementType)&&(be=Kc):be=cp;if(be&&(be=be(e,A))){Zc(H,be,l,U);break e}le&&le(e,k,A),e==="focusout"&&A&&k.type==="number"&&A.memoizedProps.value!=null&&wi(k,"number",k.value)}switch(le=A?Ka(A):window,e){case"focusin":(Vc(le)||le.contentEditable==="true")&&(ma=le,Zi=A,ln=null);break;case"focusout":ln=Zi=ma=null;break;case"mousedown":Ki=!0;break;case"contextmenu":case"mouseup":case"dragend":Ki=!1,lo(H,l,U);break;case"selectionchange":if(dp)break;case"keydown":case"keyup":lo(H,l,U)}var oe;if(Gi)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else da?Xc(e,l)&&(xe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(xe="onCompositionStart");xe&&(qc&&l.locale!=="ko"&&(da||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&da&&(oe=Oc()):(fl=U,Ui="value"in fl?fl.value:fl.textContent,da=!0)),le=Ks(A,xe),0<le.length&&(xe=new Bc(xe,e,null,l,U),H.push({event:xe,listeners:le}),oe?xe.data=oe:(oe=Qc(l),oe!==null&&(xe.data=oe)))),(oe=lp?ap(e,l):np(e,l))&&(xe=Ks(A,"onBeforeInput"),0<xe.length&&(le=new Bc("onBeforeInput","beforeinput",null,l,U),H.push({event:le,listeners:xe}),le.data=oe)),Jp(H,e,A,l,U)}kd(H,t)})}function An(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Ks(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=$a(e,l),n!=null&&a.unshift(An(e,n,i)),n=$a(e,t),n!=null&&a.push(An(e,n,i))),e.tag===3)return a;e=e.return}return[]}function Ip(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function _d(e,t,l,a,n){for(var i=t._reactName,o=[];l!==null&&l!==a;){var p=l,j=p.alternate,A=p.stateNode;if(p=p.tag,j!==null&&j===a)break;p!==5&&p!==26&&p!==27||A===null||(j=A,n?(A=$a(l,i),A!=null&&o.unshift(An(l,A,j))):n||(A=$a(l,i),A!=null&&o.push(An(l,A,j)))),l=l.return}o.length!==0&&e.push({event:t,listeners:o})}var ex=/\r\n?/g,tx=/\u0000|\uFFFD/g;function zd(e){return(typeof e=="string"?e:""+e).replace(ex,`
|
|
49
|
+
`).replace(tx,"")}function Dd(e,t){return t=zd(t),zd(e)===t}function Me(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ca(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ca(e,""+a);break;case"className":Fn(e,"class",a);break;case"tabIndex":Fn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Fn(e,l,a);break;case"style":_c(e,a,i);break;case"data":if(t!=="object"){Fn(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=In(""+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"&&Me(e,t,"name",n.name,n,null),Me(e,t,"formEncType",n.formEncType,n,null),Me(e,t,"formMethod",n.formMethod,n,null),Me(e,t,"formTarget",n.formTarget,n,null)):(Me(e,t,"encType",n.encType,n,null),Me(e,t,"method",n.method,n,null),Me(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=In(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Qt);break;case"onScroll":a!=null&&he("scroll",e);break;case"onScrollEnd":a!=null&&he("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(u(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=In(""+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":he("beforetoggle",e),he("toggle",e),Wn(e,"popover",a);break;case"xlinkActuate":Xt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Xt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Xt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Xt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Xt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Xt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Wn(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=Mh.get(l)||l,Wn(e,l,a))}}function yu(e,t,l,a,n,i){switch(l){case"style":_c(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ca(e,a):(typeof a=="number"||typeof a=="bigint")&&ca(e,""+a);break;case"onScroll":a!=null&&he("scroll",e);break;case"onScrollEnd":a!=null&&he("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Qt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nc.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),i=e[nt]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Wn(e,l,a)}}}function Ie(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":he("error",e),he("load",e);var a=!1,n=!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":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Me(e,t,i,o,l,null)}}n&&Me(e,t,"srcSet",l.srcSet,l,null),a&&Me(e,t,"src",l.src,l,null);return;case"input":he("invalid",e);var p=i=o=n=null,j=null,A=null;for(a in l)if(l.hasOwnProperty(a)){var U=l[a];if(U!=null)switch(a){case"name":n=U;break;case"type":o=U;break;case"checked":j=U;break;case"defaultChecked":A=U;break;case"value":i=U;break;case"defaultValue":p=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(u(137,t));break;default:Me(e,t,a,U,l,null)}}Ac(e,i,p,j,A,o,n,!1);return;case"select":he("invalid",e),a=o=i=null;for(n in l)if(l.hasOwnProperty(n)&&(p=l[n],p!=null))switch(n){case"value":i=p;break;case"defaultValue":o=p;break;case"multiple":a=p;default:Me(e,t,n,p,l,null)}t=i,l=o,e.multiple=!!a,t!=null?ua(e,!!a,t,!1):l!=null&&ua(e,!!a,l,!0);return;case"textarea":he("invalid",e),i=n=a=null;for(o in l)if(l.hasOwnProperty(o)&&(p=l[o],p!=null))switch(o){case"value":a=p;break;case"defaultValue":n=p;break;case"children":i=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(u(91));break;default:Me(e,t,o,p,l,null)}kc(e,a,n,i);return;case"option":for(j in l)if(l.hasOwnProperty(j)&&(a=l[j],a!=null))switch(j){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Me(e,t,j,a,l,null)}return;case"dialog":he("beforetoggle",e),he("toggle",e),he("cancel",e),he("close",e);break;case"iframe":case"object":he("load",e);break;case"video":case"audio":for(a=0;a<Rn.length;a++)he(Rn[a],e);break;case"image":he("error",e),he("load",e);break;case"details":he("toggle",e);break;case"embed":case"source":case"link":he("error",e),he("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(u(137,t));default:Me(e,t,A,a,l,null)}return;default:if(_i(t)){for(U in l)l.hasOwnProperty(U)&&(a=l[U],a!==void 0&&yu(e,t,U,a,l,void 0));return}}for(p in l)l.hasOwnProperty(p)&&(a=l[p],a!=null&&Me(e,t,p,a,l,null))}function lx(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 n=null,i=null,o=null,p=null,j=null,A=null,U=null;for(_ in l){var H=l[_];if(l.hasOwnProperty(_)&&H!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":j=H;default:a.hasOwnProperty(_)||Me(e,t,_,null,a,H)}}for(var k in a){var _=a[k];if(H=l[k],a.hasOwnProperty(k)&&(_!=null||H!=null))switch(k){case"type":i=_;break;case"name":n=_;break;case"checked":A=_;break;case"defaultChecked":U=_;break;case"value":o=_;break;case"defaultValue":p=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(u(137,t));break;default:_!==H&&Me(e,t,k,_,a,H)}}ki(e,o,p,j,A,U,i,n);return;case"select":_=o=p=k=null;for(i in l)if(j=l[i],l.hasOwnProperty(i)&&j!=null)switch(i){case"value":break;case"multiple":_=j;default:a.hasOwnProperty(i)||Me(e,t,i,null,a,j)}for(n in a)if(i=a[n],j=l[n],a.hasOwnProperty(n)&&(i!=null||j!=null))switch(n){case"value":k=i;break;case"defaultValue":p=i;break;case"multiple":o=i;default:i!==j&&Me(e,t,n,i,a,j)}t=p,l=o,a=_,k!=null?ua(e,!!l,k,!1):!!a!=!!l&&(t!=null?ua(e,!!l,t,!0):ua(e,!!l,l?[]:"",!1));return;case"textarea":_=k=null;for(p in l)if(n=l[p],l.hasOwnProperty(p)&&n!=null&&!a.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:Me(e,t,p,null,a,n)}for(o in a)if(n=a[o],i=l[o],a.hasOwnProperty(o)&&(n!=null||i!=null))switch(o){case"value":k=n;break;case"defaultValue":_=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(u(91));break;default:n!==i&&Me(e,t,o,n,a,i)}Mc(e,k,_);return;case"option":for(var P in l)if(k=l[P],l.hasOwnProperty(P)&&k!=null&&!a.hasOwnProperty(P))switch(P){case"selected":e.selected=!1;break;default:Me(e,t,P,null,a,k)}for(j in a)if(k=a[j],_=l[j],a.hasOwnProperty(j)&&k!==_&&(k!=null||_!=null))switch(j){case"selected":e.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:Me(e,t,j,k,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 se in l)k=l[se],l.hasOwnProperty(se)&&k!=null&&!a.hasOwnProperty(se)&&Me(e,t,se,null,a,k);for(A in a)if(k=a[A],_=l[A],a.hasOwnProperty(A)&&k!==_&&(k!=null||_!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(137,t));break;default:Me(e,t,A,k,a,_)}return;default:if(_i(t)){for(var ke in l)k=l[ke],l.hasOwnProperty(ke)&&k!==void 0&&!a.hasOwnProperty(ke)&&yu(e,t,ke,void 0,a,k);for(U in a)k=a[U],_=l[U],!a.hasOwnProperty(U)||k===_||k===void 0&&_===void 0||yu(e,t,U,k,a,_);return}}for(var T in l)k=l[T],l.hasOwnProperty(T)&&k!=null&&!a.hasOwnProperty(T)&&Me(e,t,T,null,a,k);for(H in a)k=a[H],_=l[H],!a.hasOwnProperty(H)||k===_||k==null&&_==null||Me(e,t,H,k,a,_)}function Od(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ax(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,o=n.initiatorType,p=n.duration;if(i&&p&&Od(o)){for(o=0,p=n.responseEnd,a+=1;a<l.length;a++){var j=l[a],A=j.startTime;if(A>p)break;var U=j.transferSize,H=j.initiatorType;U&&Od(H)&&(j=j.responseEnd,o+=U*(j<p?1:(p-A)/(j-A)))}if(--a,t+=8*(i+o)/(n.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 gu=null,bu=null;function $s(e){return e.nodeType===9?e:e.ownerDocument}function Ld(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 Ud(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 ju(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 Su=null;function nx(){var e=window.event;return e&&e.type==="popstate"?e===Su?!1:(Su=e,!0):(Su=null,!1)}var Bd=typeof setTimeout=="function"?setTimeout:void 0,sx=typeof clearTimeout=="function"?clearTimeout:void 0,Hd=typeof Promise=="function"?Promise:void 0,ix=typeof queueMicrotask=="function"?queueMicrotask:typeof Hd<"u"?function(e){return Hd.resolve(null).then(e).catch(rx)}:Bd;function rx(e){setTimeout(function(){throw e})}function Al(e){return e==="head"}function qd(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),qa(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Mn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Mn(l);for(var i=l.firstChild;i;){var o=i.nextSibling,p=i.nodeName;i[Za]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&Mn(e.ownerDocument.body);l=n}while(l);qa(t)}function Yd(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 Nu(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":Nu(l),Ai(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function ux(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Za])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!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Mt(e.nextSibling),e===null)break}return null}function cx(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Mt(e.nextSibling),e===null))return null;return e}function Gd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Mt(e.nextSibling),e===null))return null;return e}function Eu(e){return e.data==="$?"||e.data==="$~"}function Tu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ox(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 Mt(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 Cu=null;function Xd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Mt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Qd(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 Vd(e,t,l){switch(t=$s(l),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Mn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ai(e)}var kt=new Map,Zd=new Set;function Js(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var il=K.d;K.d={f:fx,r:dx,D:mx,C:hx,L:px,m:xx,X:yx,S:vx,M:gx};function fx(){var e=il.f(),t=qs();return e||t}function dx(e){var t=sa(e);t!==null&&t.tag===5&&t.type==="form"?cf(t):il.r(e)}var Ua=typeof document>"u"?null:document;function Kd(e,t,l){var a=Ua;if(a&&typeof t=="string"&&t){var n=St(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Zd.has(n)||(Zd.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),Ie(t,"link",e),Ke(t),a.head.appendChild(t)))}}function mx(e){il.D(e),Kd("dns-prefetch",e,null)}function hx(e,t){il.C(e,t),Kd("preconnect",e,t)}function px(e,t,l){il.L(e,t,l);var a=Ua;if(a&&e&&t){var n='link[rel="preload"][as="'+St(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+St(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+St(l.imageSizes)+'"]')):n+='[href="'+St(e)+'"]';var i=n;switch(t){case"style":i=Ba(e);break;case"script":i=Ha(e)}kt.has(i)||(e=v({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),kt.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(kn(i))||t==="script"&&a.querySelector(wn(i))||(t=a.createElement("link"),Ie(t,"link",e),Ke(t),a.head.appendChild(t)))}}function xx(e,t){il.m(e,t);var l=Ua;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+St(a)+'"][href="'+St(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ha(e)}if(!kt.has(i)&&(e=v({rel:"modulepreload",href:e},t),kt.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(wn(i)))return}a=l.createElement("link"),Ie(a,"link",e),Ke(a),l.head.appendChild(a)}}}function vx(e,t,l){il.S(e,t,l);var a=Ua;if(a&&e){var n=ia(a).hoistableStyles,i=Ba(e);t=t||"default";var o=n.get(i);if(!o){var p={loading:0,preload:null};if(o=a.querySelector(kn(i)))p.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},l),(l=kt.get(i))&&Ru(e,l);var j=o=a.createElement("link");Ke(j),Ie(j,"link",e),j._p=new Promise(function(A,U){j.onload=A,j.onerror=U}),j.addEventListener("load",function(){p.loading|=1}),j.addEventListener("error",function(){p.loading|=2}),p.loading|=4,Ws(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:p},n.set(i,o)}}}function yx(e,t){il.X(e,t);var l=Ua;if(l&&e){var a=ia(l).hoistableScripts,n=Ha(e),i=a.get(n);i||(i=l.querySelector(wn(n)),i||(e=v({src:e,async:!0},t),(t=kt.get(n))&&Au(e,t),i=l.createElement("script"),Ke(i),Ie(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function gx(e,t){il.M(e,t);var l=Ua;if(l&&e){var a=ia(l).hoistableScripts,n=Ha(e),i=a.get(n);i||(i=l.querySelector(wn(n)),i||(e=v({src:e,async:!0,type:"module"},t),(t=kt.get(n))&&Au(e,t),i=l.createElement("script"),Ke(i),Ie(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function $d(e,t,l,a){var n=(n=de.current)?Js(n):null;if(!n)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Ba(l.href),l=ia(n).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=Ba(l.href);var i=ia(n).hoistableStyles,o=i.get(e);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=n.querySelector(kn(e)))&&!i._p&&(o.instance=i,o.state.loading=5),kt.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},kt.set(e,l),i||bx(n,e,l,o.state))),t&&a===null)throw Error(u(528,""));return o}if(t&&a!==null)throw Error(u(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ha(l),l=ia(n).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(u(444,e))}}function Ba(e){return'href="'+St(e)+'"'}function kn(e){return'link[rel="stylesheet"]['+e+"]"}function Jd(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function bx(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}),Ie(t,"link",l),Ke(t),e.head.appendChild(t))}function Ha(e){return'[src="'+St(e)+'"]'}function wn(e){return"script[async]"+e}function Wd(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+St(l.href)+'"]');if(a)return t.instance=a,Ke(a),a;var n=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ke(a),Ie(a,"style",n),Ws(a,l.precedence,e),t.instance=a;case"stylesheet":n=Ba(l.href);var i=e.querySelector(kn(n));if(i)return t.state.loading|=4,t.instance=i,Ke(i),i;a=Jd(l),(n=kt.get(n))&&Ru(a,n),i=(e.ownerDocument||e).createElement("link"),Ke(i);var o=i;return o._p=new Promise(function(p,j){o.onload=p,o.onerror=j}),Ie(i,"link",a),t.state.loading|=4,Ws(i,l.precedence,e),t.instance=i;case"script":return i=Ha(l.src),(n=e.querySelector(wn(i)))?(t.instance=n,Ke(n),n):(a=l,(n=kt.get(i))&&(a=v({},l),Au(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),Ke(n),Ie(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ws(a,l.precedence,e));return t.instance}function Ws(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,o=0;o<a.length;o++){var p=a[o];if(p.dataset.precedence===t)i=p;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Ru(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Au(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Fs=null;function Fd(e,t,l){if(Fs===null){var a=new Map,n=Fs=new Map;n.set(l,a)}else n=Fs,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var i=l[n];if(!(i[Za]||i[Je]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var p=a.get(o);p?p.push(i):a.set(o,[i])}}return a}function Pd(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function jx(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 Id(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Sx(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 n=Ba(a.href),i=t.querySelector(kn(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ps.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Ke(i);return}i=t.ownerDocument||t,a=Jd(a),(n=kt.get(n))&&Ru(a,n),i=i.createElement("link"),Ke(i);var o=i;o._p=new Promise(function(p,j){o.onload=p,o.onerror=j}),Ie(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=Ps.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Mu=0;function Nx(e,t){return e.stylesheets&&e.count===0&&ei(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&ei(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Mu===0&&(Mu=62500*ax());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ei(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Mu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Ps(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ei(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Is=null;function ei(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Is=new Map,t.forEach(Ex,e),Is=null,Ps.call(e))}function Ex(e,t){if(!(t.state.loading&4)){var l=Is.get(e);if(l)var a=l.get(null);else{l=new Map,Is.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var o=n[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),a=o)}a&&l.set(null,a)}n=t.instance,o=n.getAttribute("data-precedence"),i=l.get(o)||a,i===a&&l.set(null,n),l.set(o,n),this.count++,a=Ps.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var _n={$$typeof:Y,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function Tx(e,t,l,a,n,i,o,p,j){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=Ei(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ei(0),this.hiddenUpdates=Ei(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function em(e,t,l,a,n,i,o,p,j,A,U,H){return e=new Tx(e,t,l,o,j,A,U,H,p),t=1,i===!0&&(t|=24),i=pt(3,null,null,t),e.current=i,i.stateNode=e,t=ur(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},dr(i),e}function tm(e){return e?(e=xa,e):xa}function lm(e,t,l,a,n,i){n=tm(n),a.context===null?a.context=n:a.pendingContext=n,a=vl(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=yl(e,a,t),l!==null&&(ot(l,e,t),on(l,e,t))}function am(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function ku(e,t){am(e,t),(e=e.alternate)&&am(e,t)}function nm(e){if(e.tag===13||e.tag===31){var t=Yl(e,67108864);t!==null&&ot(t,e,67108864),ku(e,67108864)}}function sm(e){if(e.tag===13||e.tag===31){var t=bt();t=Ti(t);var l=Yl(e,t);l!==null&&ot(l,e,t),ku(e,t)}}var ti=!0;function Cx(e,t,l,a){var n=D.T;D.T=null;var i=K.p;try{K.p=2,wu(e,t,l,a)}finally{K.p=i,D.T=n}}function Rx(e,t,l,a){var n=D.T;D.T=null;var i=K.p;try{K.p=8,wu(e,t,l,a)}finally{K.p=i,D.T=n}}function wu(e,t,l,a){if(ti){var n=_u(a);if(n===null)vu(e,t,a,li,l),rm(e,a);else if(Mx(n,e,t,l,a))a.stopPropagation();else if(rm(e,a),t&4&&-1<Ax.indexOf(e)){for(;n!==null;){var i=sa(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Ll(i.pendingLanes);if(o!==0){var p=i;for(p.pendingLanes|=2,p.entangledLanes|=2;o;){var j=1<<31-mt(o);p.entanglements[1]|=j,o&=~j}Ht(i),(Se&6)===0&&(Bs=ft()+500,Cn(0))}}break;case 31:case 13:p=Yl(i,2),p!==null&&ot(p,i,2),qs(),ku(i,2)}if(i=_u(a),i===null&&vu(e,t,a,li,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else vu(e,t,a,null,l)}}function _u(e){return e=Di(e),zu(e)}var li=null;function zu(e){if(li=null,e=na(e),e!==null){var t=m(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=x(t),e!==null)return e;e=null}else if(l===31){if(e=g(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 li=e,null}function im(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(mh()){case dc:return 2;case mc:return 8;case Vn:case hh:return 32;case hc:return 268435456;default:return 32}default:return 32}}var Du=!1,Ml=null,kl=null,wl=null,zn=new Map,Dn=new Map,_l=[],Ax="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 rm(e,t){switch(e){case"focusin":case"focusout":Ml=null;break;case"dragenter":case"dragleave":kl=null;break;case"mouseover":case"mouseout":wl=null;break;case"pointerover":case"pointerout":zn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dn.delete(t.pointerId)}}function On(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=sa(t),t!==null&&nm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Mx(e,t,l,a,n){switch(t){case"focusin":return Ml=On(Ml,e,t,l,a,n),!0;case"dragenter":return kl=On(kl,e,t,l,a,n),!0;case"mouseover":return wl=On(wl,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return zn.set(i,On(zn.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,Dn.set(i,On(Dn.get(i)||null,e,t,l,a,n)),!0}return!1}function um(e){var t=na(e.target);if(t!==null){var l=m(t);if(l!==null){if(t=l.tag,t===13){if(t=x(l),t!==null){e.blockedOn=t,bc(e.priority,function(){sm(l)});return}}else if(t===31){if(t=g(l),t!==null){e.blockedOn=t,bc(e.priority,function(){sm(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 ai(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=_u(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);zi=a,l.target.dispatchEvent(a),zi=null}else return t=sa(l),t!==null&&nm(t),e.blockedOn=l,!1;t.shift()}return!0}function cm(e,t,l){ai(e)&&l.delete(t)}function kx(){Du=!1,Ml!==null&&ai(Ml)&&(Ml=null),kl!==null&&ai(kl)&&(kl=null),wl!==null&&ai(wl)&&(wl=null),zn.forEach(cm),Dn.forEach(cm)}function ni(e,t){e.blockedOn===t&&(e.blockedOn=null,Du||(Du=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,kx)))}var si=null;function om(e){si!==e&&(si=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){si===e&&(si=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(zu(a||l)===null)continue;break}var i=sa(l);i!==null&&(e.splice(t,3),t-=3,_r(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function qa(e){function t(j){return ni(j,e)}Ml!==null&&ni(Ml,e),kl!==null&&ni(kl,e),wl!==null&&ni(wl,e),zn.forEach(t),Dn.forEach(t);for(var l=0;l<_l.length;l++){var a=_l[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<_l.length&&(l=_l[0],l.blockedOn===null);)um(l),l.blockedOn===null&&_l.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],o=n[nt]||null;if(typeof i=="function")o||om(l);else if(o){var p=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[nt]||null)p=o.formAction;else if(zu(n)!==null)continue}else p=o.action;typeof p=="function"?l[a+1]=p:(l.splice(a,3),a-=3),om(l)}}}function fm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return n=o})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=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,n=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),n!==null&&(n(),n=null)}}}function Ou(e){this._internalRoot=e}ii.prototype.render=Ou.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var l=t.current,a=bt();lm(l,a,e,t,null,null)},ii.prototype.unmount=Ou.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lm(e.current,2,null,e,null,null),qs(),t[aa]=null}};function ii(e){this._internalRoot=e}ii.prototype.unstable_scheduleHydration=function(e){if(e){var t=gc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<_l.length&&t!==0&&t<_l[l].priority;l++);_l.splice(l,0,e),l===0&&um(e)}};var dm=c.version;if(dm!=="19.2.4")throw Error(u(527,dm,"19.2.4"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=h(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var wx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ri=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ri.isDisabled&&ri.supportsFiber)try{Xa=ri.inject(wx),dt=ri}catch{}}return Un.createRoot=function(e,t){if(!d(e))throw Error(u(299));var l=!1,a="",n=gf,i=bf,o=jf;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=em(e,1,!1,null,null,l,a,null,n,i,o,fm),e[aa]=t.current,xu(e),new Ou(t)},Un.hydrateRoot=function(e,t,l){if(!d(e))throw Error(u(299));var a=!1,n="",i=gf,o=bf,p=jf,j=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(p=l.onRecoverableError),l.formState!==void 0&&(j=l.formState)),t=em(e,1,!0,t,l??null,a,n,j,i,o,p,fm),t.context=tm(null),l=t.current,a=bt(),a=Ti(a),n=vl(a),n.callback=null,yl(l,n,a),l=a,t.current.lanes=l,Va(t,l),Ht(t),e[aa]=t.current,xu(e),new ii(t)},Un.version="19.2.4",Un}var Sm;function Yx(){if(Sm)return Bu.exports;Sm=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(c){console.error(c)}}return r(),Bu.exports=qx(),Bu.exports}var Gx=Yx();/**
|
|
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 Nm="popstate";function Em(r){return typeof r=="object"&&r!=null&&"pathname"in r&&"search"in r&&"hash"in r&&"state"in r&&"key"in r}function Xx(r={}){function c(d,m){let{pathname:x="/",search:g="",hash:y=""}=ta(d.location.hash.substring(1));return!x.startsWith("/")&&!x.startsWith(".")&&(x="/"+x),Fu("",{pathname:x,search:g,hash:y},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function f(d,m){let x=d.document.querySelector("base"),g="";if(x&&x.getAttribute("href")){let y=d.location.href,h=y.indexOf("#");g=h===-1?y:y.slice(0,h)}return g+"#"+(typeof m=="string"?m:qn(m))}function u(d,m){wt(d.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return Vx(c,f,u,r)}function Oe(r,c){if(r===!1||r===null||typeof r>"u")throw new Error(c)}function wt(r,c){if(!r){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function Qx(){return Math.random().toString(36).substring(2,10)}function Tm(r,c){return{usr:r.state,key:r.key,idx:c,masked:r.unstable_mask?{pathname:r.pathname,search:r.search,hash:r.hash}:void 0}}function Fu(r,c,f=null,u,d){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof c=="string"?ta(c):c,state:f,key:c&&c.key||u||Qx(),unstable_mask:d}}function qn({pathname:r="/",search:c="",hash:f=""}){return c&&c!=="?"&&(r+=c.charAt(0)==="?"?c:"?"+c),f&&f!=="#"&&(r+=f.charAt(0)==="#"?f:"#"+f),r}function ta(r){let c={};if(r){let f=r.indexOf("#");f>=0&&(c.hash=r.substring(f),r=r.substring(0,f));let u=r.indexOf("?");u>=0&&(c.search=r.substring(u),r=r.substring(0,u)),r&&(c.pathname=r)}return c}function Vx(r,c,f,u={}){let{window:d=document.defaultView,v5Compat:m=!1}=u,x=d.history,g="POP",y=null,h=S();h==null&&(h=0,x.replaceState({...x.state,idx:h},""));function S(){return(x.state||{idx:null}).idx}function v(){g="POP";let w=S(),M=w==null?null:w-h;h=w,y&&y({action:g,location:z.location,delta:M})}function C(w,M){g="PUSH";let V=Em(w)?w:Fu(z.location,w,M);f&&f(V,w),h=S()+1;let Y=Tm(V,h),X=z.createHref(V.unstable_mask||V);try{x.pushState(Y,"",X)}catch(Q){if(Q instanceof DOMException&&Q.name==="DataCloneError")throw Q;d.location.assign(X)}m&&y&&y({action:g,location:z.location,delta:1})}function O(w,M){g="REPLACE";let V=Em(w)?w:Fu(z.location,w,M);f&&f(V,w),h=S();let Y=Tm(V,h),X=z.createHref(V.unstable_mask||V);x.replaceState(Y,"",X),m&&y&&y({action:g,location:z.location,delta:0})}function L(w){return Zx(w)}let z={get action(){return g},get location(){return r(d,x)},listen(w){if(y)throw new Error("A history only accepts one active listener");return d.addEventListener(Nm,v),y=w,()=>{d.removeEventListener(Nm,v),y=null}},createHref(w){return c(d,w)},createURL:L,encodeLocation(w){let M=L(w);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:C,replace:O,go(w){return x.go(w)}};return z}function Zx(r,c=!1){let f="http://localhost";typeof window<"u"&&(f=window.location.origin!=="null"?window.location.origin:window.location.href),Oe(f,"No window.location.(origin|href) available to create URL");let u=typeof r=="string"?r:qn(r);return u=u.replace(/ $/,"%20"),!c&&u.startsWith("//")&&(u=f+u),new URL(u,f)}function Hm(r,c,f="/"){return Kx(r,c,f,!1)}function Kx(r,c,f,u){let d=typeof c=="string"?ta(c):c,m=ul(d.pathname||"/",f);if(m==null)return null;let x=qm(r);$x(x);let g=null;for(let y=0;g==null&&y<x.length;++y){let h=sv(m);g=av(x[y],h,u)}return g}function qm(r,c=[],f=[],u="",d=!1){let m=(x,g,y=d,h)=>{let S={relativePath:h===void 0?x.path||"":h,caseSensitive:x.caseSensitive===!0,childrenIndex:g,route:x};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(u)&&y)return;Oe(S.relativePath.startsWith(u),`Absolute route path "${S.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(u.length)}let v=qt([u,S.relativePath]),C=f.concat(S);x.children&&x.children.length>0&&(Oe(x.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),qm(x.children,c,C,v,y)),!(x.path==null&&!x.index)&&c.push({path:v,score:tv(v,x.index),routesMeta:C})};return r.forEach((x,g)=>{var y;if(x.path===""||!((y=x.path)!=null&&y.includes("?")))m(x,g);else for(let h of Ym(x.path))m(x,g,!0,h)}),c}function Ym(r){let c=r.split("/");if(c.length===0)return[];let[f,...u]=c,d=f.endsWith("?"),m=f.replace(/\?$/,"");if(u.length===0)return d?[m,""]:[m];let x=Ym(u.join("/")),g=[];return g.push(...x.map(y=>y===""?m:[m,y].join("/"))),d&&g.push(...x),g.map(y=>r.startsWith("/")&&y===""?"/":y)}function $x(r){r.sort((c,f)=>c.score!==f.score?f.score-c.score:lv(c.routesMeta.map(u=>u.childrenIndex),f.routesMeta.map(u=>u.childrenIndex)))}var Jx=/^:[\w-]+$/,Wx=3,Fx=2,Px=1,Ix=10,ev=-2,Cm=r=>r==="*";function tv(r,c){let f=r.split("/"),u=f.length;return f.some(Cm)&&(u+=ev),c&&(u+=Fx),f.filter(d=>!Cm(d)).reduce((d,m)=>d+(Jx.test(m)?Wx:m===""?Px:Ix),u)}function lv(r,c){return r.length===c.length&&r.slice(0,-1).every((u,d)=>u===c[d])?r[r.length-1]-c[c.length-1]:0}function av(r,c,f=!1){let{routesMeta:u}=r,d={},m="/",x=[];for(let g=0;g<u.length;++g){let y=u[g],h=g===u.length-1,S=m==="/"?c:c.slice(m.length)||"/",v=mi({path:y.relativePath,caseSensitive:y.caseSensitive,end:h},S),C=y.route;if(!v&&h&&f&&!u[u.length-1].route.index&&(v=mi({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},S)),!v)return null;Object.assign(d,v.params),x.push({params:d,pathname:qt([m,v.pathname]),pathnameBase:cv(qt([m,v.pathnameBase])),route:C}),v.pathnameBase!=="/"&&(m=qt([m,v.pathnameBase]))}return x}function mi(r,c){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[f,u]=nv(r.path,r.caseSensitive,r.end),d=c.match(f);if(!d)return null;let m=d[0],x=m.replace(/(.)\/+$/,"$1"),g=d.slice(1);return{params:u.reduce((h,{paramName:S,isOptional:v},C)=>{if(S==="*"){let L=g[C]||"";x=m.slice(0,m.length-L.length).replace(/(.)\/+$/,"$1")}const O=g[C];return v&&!O?h[S]=void 0:h[S]=(O||"").replace(/%2F/g,"/"),h},{}),pathname:m,pathnameBase:x,pattern:r}}function nv(r,c=!1,f=!0){wt(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 u=[],d="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(x,g,y,h,S)=>{if(u.push({paramName:g,isOptional:y!=null}),y){let v=S.charAt(h+x.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(u.push({paramName:"*"}),d+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):f?d+="\\/*$":r!==""&&r!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,c?void 0:"i"),u]}function sv(r){try{return r.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return wt(!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 (${c}).`),r}}function ul(r,c){if(c==="/")return r;if(!r.toLowerCase().startsWith(c.toLowerCase()))return null;let f=c.endsWith("/")?c.length-1:c.length,u=r.charAt(f);return u&&u!=="/"?null:r.slice(f)||"/"}var iv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function rv(r,c="/"){let{pathname:f,search:u="",hash:d=""}=typeof r=="string"?ta(r):r,m;return f?(f=f.replace(/\/\/+/g,"/"),f.startsWith("/")?m=Rm(f.substring(1),"/"):m=Rm(f,c)):m=c,{pathname:m,search:ov(u),hash:fv(d)}}function Rm(r,c){let f=c.replace(/\/+$/,"").split("/");return r.split("/").forEach(d=>{d===".."?f.length>1&&f.pop():d!=="."&&f.push(d)}),f.length>1?f.join("/"):"/"}function Gu(r,c,f,u){return`Cannot include a '${r}' character in a manually specified \`to.${c}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${f}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function uv(r){return r.filter((c,f)=>f===0||c.route.path&&c.route.path.length>0)}function Gm(r){let c=uv(r);return c.map((f,u)=>u===c.length-1?f.pathname:f.pathnameBase)}function nc(r,c,f,u=!1){let d;typeof r=="string"?d=ta(r):(d={...r},Oe(!d.pathname||!d.pathname.includes("?"),Gu("?","pathname","search",d)),Oe(!d.pathname||!d.pathname.includes("#"),Gu("#","pathname","hash",d)),Oe(!d.search||!d.search.includes("#"),Gu("#","search","hash",d)));let m=r===""||d.pathname==="",x=m?"/":d.pathname,g;if(x==null)g=f;else{let v=c.length-1;if(!u&&x.startsWith("..")){let C=x.split("/");for(;C[0]==="..";)C.shift(),v-=1;d.pathname=C.join("/")}g=v>=0?c[v]:"/"}let y=rv(d,g),h=x&&x!=="/"&&x.endsWith("/"),S=(m||x===".")&&f.endsWith("/");return!y.pathname.endsWith("/")&&(h||S)&&(y.pathname+="/"),y}var qt=r=>r.join("/").replace(/\/\/+/g,"/"),cv=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),ov=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,fv=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,dv=class{constructor(r,c,f,u=!1){this.status=r,this.statusText=c||"",this.internal=u,f instanceof Error?(this.data=f.toString(),this.error=f):this.data=f}};function mv(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function hv(r){return r.map(c=>c.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Xm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qm(r,c){let f=r;if(typeof f!="string"||!iv.test(f))return{absoluteURL:void 0,isExternal:!1,to:f};let u=f,d=!1;if(Xm)try{let m=new URL(window.location.href),x=f.startsWith("//")?new URL(m.protocol+f):new URL(f),g=ul(x.pathname,c);x.origin===m.origin&&g!=null?f=g+x.search+x.hash:d=!0}catch{wt(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:d,to:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Vm=["POST","PUT","PATCH","DELETE"];new Set(Vm);var pv=["GET",...Vm];new Set(pv);var Ya=b.createContext(null);Ya.displayName="DataRouter";var pi=b.createContext(null);pi.displayName="DataRouterState";var xv=b.createContext(!1),Zm=b.createContext({isTransitioning:!1});Zm.displayName="ViewTransition";var vv=b.createContext(new Map);vv.displayName="Fetchers";var yv=b.createContext(null);yv.displayName="Await";var _t=b.createContext(null);_t.displayName="Navigation";var Yn=b.createContext(null);Yn.displayName="Location";var Yt=b.createContext({outlet:null,matches:[],isDataRoute:!1});Yt.displayName="Route";var sc=b.createContext(null);sc.displayName="RouteError";var Km="REACT_ROUTER_ERROR",gv="REDIRECT",bv="ROUTE_ERROR_RESPONSE";function jv(r){if(r.startsWith(`${Km}:${gv}:{`))try{let c=JSON.parse(r.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function Sv(r){if(r.startsWith(`${Km}:${bv}:{`))try{let c=JSON.parse(r.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new dv(c.status,c.statusText,c.data)}catch{}}function Nv(r,{relative:c}={}){Oe(Gn(),"useHref() may be used only in the context of a <Router> component.");let{basename:f,navigator:u}=b.useContext(_t),{hash:d,pathname:m,search:x}=Xn(r,{relative:c}),g=m;return f!=="/"&&(g=m==="/"?f:qt([f,m])),u.createHref({pathname:g,search:x,hash:d})}function Gn(){return b.useContext(Yn)!=null}function Gt(){return Oe(Gn(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Yn).location}var $m="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jm(r){b.useContext(_t).static||b.useLayoutEffect(r)}function xi(){let{isDataRoute:r}=b.useContext(Yt);return r?Uv():Ev()}function Ev(){Oe(Gn(),"useNavigate() may be used only in the context of a <Router> component.");let r=b.useContext(Ya),{basename:c,navigator:f}=b.useContext(_t),{matches:u}=b.useContext(Yt),{pathname:d}=Gt(),m=JSON.stringify(Gm(u)),x=b.useRef(!1);return Jm(()=>{x.current=!0}),b.useCallback((y,h={})=>{if(wt(x.current,$m),!x.current)return;if(typeof y=="number"){f.go(y);return}let S=nc(y,JSON.parse(m),d,h.relative==="path");r==null&&c!=="/"&&(S.pathname=S.pathname==="/"?c:qt([c,S.pathname])),(h.replace?f.replace:f.push)(S,h.state,h)},[c,f,m,d,r])}b.createContext(null);function Tv(){let{matches:r}=b.useContext(Yt),c=r[r.length-1];return c?c.params:{}}function Xn(r,{relative:c}={}){let{matches:f}=b.useContext(Yt),{pathname:u}=Gt(),d=JSON.stringify(Gm(f));return b.useMemo(()=>nc(r,JSON.parse(d),u,c==="path"),[r,d,u,c])}function Cv(r,c){return Wm(r,c)}function Wm(r,c,f){var w;Oe(Gn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=b.useContext(_t),{matches:d}=b.useContext(Yt),m=d[d.length-1],x=m?m.params:{},g=m?m.pathname:"/",y=m?m.pathnameBase:"/",h=m&&m.route;{let M=h&&h.path||"";Pm(g,!h||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${M}">) 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="${M}"> to <Route path="${M==="/"?"*":`${M}/*`}">.`)}let S=Gt(),v;if(c){let M=typeof c=="string"?ta(c):c;Oe(y==="/"||((w=M.pathname)==null?void 0:w.startsWith(y)),`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 "${y}" but pathname "${M.pathname}" was given in the \`location\` prop.`),v=M}else v=S;let C=v.pathname||"/",O=C;if(y!=="/"){let M=y.replace(/^\//,"").split("/");O="/"+C.replace(/^\//,"").split("/").slice(M.length).join("/")}let L=Hm(r,{pathname:O});wt(h||L!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),wt(L==null||L[L.length-1].route.element!==void 0||L[L.length-1].route.Component!==void 0||L[L.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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=wv(L&&L.map(M=>Object.assign({},M,{params:Object.assign({},x,M.params),pathname:qt([y,u.encodeLocation?u.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?y:qt([y,u.encodeLocation?u.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),d,f);return c&&z?b.createElement(Yn.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},z):z}function Rv(){let r=Lv(),c=mv(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),f=r instanceof Error?r.stack:null,u="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:u},m={padding:"2px 4px",backgroundColor:u},x=null;return console.error("Error handled by React Router default ErrorBoundary:",r),x=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:m},"ErrorBoundary")," or"," ",b.createElement("code",{style:m},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},c),f?b.createElement("pre",{style:d},f):null,x)}var Av=b.createElement(Rv,null),Fm=class extends b.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,c){return c.location!==r.location||c.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:c.error,location:c.location,revalidation:r.revalidation||c.revalidation}}componentDidCatch(r,c){this.props.onError?this.props.onError(r,c):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 f=Sv(r.digest);f&&(r=f)}let c=r!==void 0?b.createElement(Yt.Provider,{value:this.props.routeContext},b.createElement(sc.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?b.createElement(Mv,{error:r},c):c}};Fm.contextType=xv;var Xu=new WeakMap;function Mv({children:r,error:c}){let{basename:f}=b.useContext(_t);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let u=jv(c.digest);if(u){let d=Xu.get(c);if(d)throw d;let m=Qm(u.location,f);if(Xm&&!Xu.get(c))if(m.isExternal||u.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const x=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:u.replace}));throw Xu.set(c,x),x}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return r}function kv({routeContext:r,match:c,children:f}){let u=b.useContext(Ya);return u&&u.static&&u.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=c.route.id),b.createElement(Yt.Provider,{value:r},f)}function wv(r,c=[],f){let u=f==null?void 0:f.state;if(r==null){if(!u)return null;if(u.errors)r=u.matches;else if(c.length===0&&!u.initialized&&u.matches.length>0)r=u.matches;else return null}let d=r,m=u==null?void 0:u.errors;if(m!=null){let S=d.findIndex(v=>v.route.id&&(m==null?void 0:m[v.route.id])!==void 0);Oe(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),d=d.slice(0,Math.min(d.length,S+1))}let x=!1,g=-1;if(f&&u){x=u.renderFallback;for(let S=0;S<d.length;S++){let v=d[S];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(g=S),v.route.id){let{loaderData:C,errors:O}=u,L=v.route.loader&&!C.hasOwnProperty(v.route.id)&&(!O||O[v.route.id]===void 0);if(v.route.lazy||L){f.isStatic&&(x=!0),g>=0?d=d.slice(0,g+1):d=[d[0]];break}}}}let y=f==null?void 0:f.onError,h=u&&y?(S,v)=>{var C,O;y(S,{location:u.location,params:((O=(C=u.matches)==null?void 0:C[0])==null?void 0:O.params)??{},unstable_pattern:hv(u.matches),errorInfo:v})}:void 0;return d.reduceRight((S,v,C)=>{let O,L=!1,z=null,w=null;u&&(O=m&&v.route.id?m[v.route.id]:void 0,z=v.route.errorElement||Av,x&&(g<0&&C===0?(Pm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,w=null):g===C&&(L=!0,w=v.route.hydrateFallbackElement||null)));let M=c.concat(d.slice(0,C+1)),V=()=>{let Y;return O?Y=z:L?Y=w:v.route.Component?Y=b.createElement(v.route.Component,null):v.route.element?Y=v.route.element:Y=S,b.createElement(kv,{match:v,routeContext:{outlet:S,matches:M,isDataRoute:u!=null},children:Y})};return u&&(v.route.ErrorBoundary||v.route.errorElement||C===0)?b.createElement(Fm,{location:u.location,revalidation:u.revalidation,component:z,error:O,children:V(),routeContext:{outlet:null,matches:M,isDataRoute:!0},onError:h}):V()},null)}function ic(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _v(r){let c=b.useContext(Ya);return Oe(c,ic(r)),c}function zv(r){let c=b.useContext(pi);return Oe(c,ic(r)),c}function Dv(r){let c=b.useContext(Yt);return Oe(c,ic(r)),c}function rc(r){let c=Dv(r),f=c.matches[c.matches.length-1];return Oe(f.route.id,`${r} can only be used on routes that contain a unique "id"`),f.route.id}function Ov(){return rc("useRouteId")}function Lv(){var u;let r=b.useContext(sc),c=zv("useRouteError"),f=rc("useRouteError");return r!==void 0?r:(u=c.errors)==null?void 0:u[f]}function Uv(){let{router:r}=_v("useNavigate"),c=rc("useNavigate"),f=b.useRef(!1);return Jm(()=>{f.current=!0}),b.useCallback(async(d,m={})=>{wt(f.current,$m),f.current&&(typeof d=="number"?await r.navigate(d):await r.navigate(d,{fromRouteId:c,...m}))},[r,c])}var Am={};function Pm(r,c,f){!c&&!Am[r]&&(Am[r]=!0,wt(!1,f))}b.memo(Bv);function Bv({routes:r,future:c,state:f,isStatic:u,onError:d}){return Wm(r,void 0,{state:f,isStatic:u,onError:d})}function Hn(r){Oe(!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 Hv({basename:r="/",children:c=null,location:f,navigationType:u="POP",navigator:d,static:m=!1,unstable_useTransitions:x}){Oe(!Gn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let g=r.replace(/^\/*/,"/"),y=b.useMemo(()=>({basename:g,navigator:d,static:m,unstable_useTransitions:x,future:{}}),[g,d,m,x]);typeof f=="string"&&(f=ta(f));let{pathname:h="/",search:S="",hash:v="",state:C=null,key:O="default",unstable_mask:L}=f,z=b.useMemo(()=>{let w=ul(h,g);return w==null?null:{location:{pathname:w,search:S,hash:v,state:C,key:O,unstable_mask:L},navigationType:u}},[g,h,S,v,C,O,u,L]);return wt(z!=null,`<Router basename="${g}"> is not able to match the URL "${h}${S}${v}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:b.createElement(_t.Provider,{value:y},b.createElement(Yn.Provider,{children:c,value:z}))}function qv({children:r,location:c}){return Cv(Pu(r),c)}function Pu(r,c=[]){let f=[];return b.Children.forEach(r,(u,d)=>{if(!b.isValidElement(u))return;let m=[...c,d];if(u.type===b.Fragment){f.push.apply(f,Pu(u.props.children,m));return}Oe(u.type===Hn,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Oe(!u.props.index||!u.props.children,"An index route cannot have child routes.");let x={id:u.props.id||m.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(x.children=Pu(u.props.children,m)),f.push(x)}),f}var fi="get",di="application/x-www-form-urlencoded";function vi(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function Yv(r){return vi(r)&&r.tagName.toLowerCase()==="button"}function Gv(r){return vi(r)&&r.tagName.toLowerCase()==="form"}function Xv(r){return vi(r)&&r.tagName.toLowerCase()==="input"}function Qv(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Vv(r,c){return r.button===0&&(!c||c==="_self")&&!Qv(r)}function Iu(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((c,f)=>{let u=r[f];return c.concat(Array.isArray(u)?u.map(d=>[f,d]):[[f,u]])},[]))}function Zv(r,c){let f=Iu(r);return c&&c.forEach((u,d)=>{f.has(d)||c.getAll(d).forEach(m=>{f.append(d,m)})}),f}var ui=null;function Kv(){if(ui===null)try{new FormData(document.createElement("form"),0),ui=!1}catch{ui=!0}return ui}var $v=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qu(r){return r!=null&&!$v.has(r)?(wt(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${di}"`),null):r}function Jv(r,c){let f,u,d,m,x;if(Gv(r)){let g=r.getAttribute("action");u=g?ul(g,c):null,f=r.getAttribute("method")||fi,d=Qu(r.getAttribute("enctype"))||di,m=new FormData(r)}else if(Yv(r)||Xv(r)&&(r.type==="submit"||r.type==="image")){let g=r.form;if(g==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=r.getAttribute("formaction")||g.getAttribute("action");if(u=y?ul(y,c):null,f=r.getAttribute("formmethod")||g.getAttribute("method")||fi,d=Qu(r.getAttribute("formenctype"))||Qu(g.getAttribute("enctype"))||di,m=new FormData(g,r),!Kv()){let{name:h,type:S,value:v}=r;if(S==="image"){let C=h?`${h}.`:"";m.append(`${C}x`,"0"),m.append(`${C}y`,"0")}else h&&m.append(h,v)}}else{if(vi(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');f=fi,u=null,d=di,x=r}return m&&d==="text/plain"&&(x=m,m=void 0),{action:u,method:f.toLowerCase(),encType:d,formData:m,body:x}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function uc(r,c){if(r===!1||r===null||typeof r>"u")throw new Error(c)}function Wv(r,c,f,u){let d=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return f?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${u}`:d.pathname=`${d.pathname}.${u}`:d.pathname==="/"?d.pathname=`_root.${u}`:c&&ul(d.pathname,c)==="/"?d.pathname=`${c.replace(/\/$/,"")}/_root.${u}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${u}`,d}async function Fv(r,c){if(r.id in c)return c[r.id];try{let f=await import(r.module);return c[r.id]=f,f}catch(f){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(f),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Pv(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 Iv(r,c,f){let u=await Promise.all(r.map(async d=>{let m=c.routes[d.route.id];if(m){let x=await Fv(m,f);return x.links?x.links():[]}return[]}));return ay(u.flat(1).filter(Pv).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Mm(r,c,f,u,d,m){let x=(y,h)=>f[h]?y.route.id!==f[h].route.id:!0,g=(y,h)=>{var S;return f[h].pathname!==y.pathname||((S=f[h].route.path)==null?void 0:S.endsWith("*"))&&f[h].params["*"]!==y.params["*"]};return m==="assets"?c.filter((y,h)=>x(y,h)||g(y,h)):m==="data"?c.filter((y,h)=>{var v;let S=u.routes[y.route.id];if(!S||!S.hasLoader)return!1;if(x(y,h)||g(y,h))return!0;if(y.route.shouldRevalidate){let C=y.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((v=f[0])==null?void 0:v.params)||{},nextUrl:new URL(r,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function ey(r,c,{includeHydrateFallback:f}={}){return ty(r.map(u=>{let d=c.routes[u.route.id];if(!d)return[];let m=[d.module];return d.clientActionModule&&(m=m.concat(d.clientActionModule)),d.clientLoaderModule&&(m=m.concat(d.clientLoaderModule)),f&&d.hydrateFallbackModule&&(m=m.concat(d.hydrateFallbackModule)),d.imports&&(m=m.concat(d.imports)),m}).flat(1))}function ty(r){return[...new Set(r)]}function ly(r){let c={},f=Object.keys(r).sort();for(let u of f)c[u]=r[u];return c}function ay(r,c){let f=new Set;return new Set(c),r.reduce((u,d)=>{let m=JSON.stringify(ly(d));return f.has(m)||(f.add(m),u.push({key:m,link:d})),u},[])}function Im(){let r=b.useContext(Ya);return uc(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function ny(){let r=b.useContext(pi);return uc(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var cc=b.createContext(void 0);cc.displayName="FrameworkContext";function eh(){let r=b.useContext(cc);return uc(r,"You must render this element inside a <HydratedRouter> element"),r}function sy(r,c){let f=b.useContext(cc),[u,d]=b.useState(!1),[m,x]=b.useState(!1),{onFocus:g,onBlur:y,onMouseEnter:h,onMouseLeave:S,onTouchStart:v}=c,C=b.useRef(null);b.useEffect(()=>{if(r==="render"&&x(!0),r==="viewport"){let z=M=>{M.forEach(V=>{x(V.isIntersecting)})},w=new IntersectionObserver(z,{threshold:.5});return C.current&&w.observe(C.current),()=>{w.disconnect()}}},[r]),b.useEffect(()=>{if(u){let z=setTimeout(()=>{x(!0)},100);return()=>{clearTimeout(z)}}},[u]);let O=()=>{d(!0)},L=()=>{d(!1),x(!1)};return f?r!=="intent"?[m,C,{}]:[m,C,{onFocus:Bn(g,O),onBlur:Bn(y,L),onMouseEnter:Bn(h,O),onMouseLeave:Bn(S,L),onTouchStart:Bn(v,O)}]:[!1,C,{}]}function Bn(r,c){return f=>{r&&r(f),f.defaultPrevented||c(f)}}function iy({page:r,...c}){let{router:f}=Im(),u=b.useMemo(()=>Hm(f.routes,r,f.basename),[f.routes,r,f.basename]);return u?b.createElement(uy,{page:r,matches:u,...c}):null}function ry(r){let{manifest:c,routeModules:f}=eh(),[u,d]=b.useState([]);return b.useEffect(()=>{let m=!1;return Iv(r,c,f).then(x=>{m||d(x)}),()=>{m=!0}},[r,c,f]),u}function uy({page:r,matches:c,...f}){let u=Gt(),{future:d,manifest:m,routeModules:x}=eh(),{basename:g}=Im(),{loaderData:y,matches:h}=ny(),S=b.useMemo(()=>Mm(r,c,h,m,u,"data"),[r,c,h,m,u]),v=b.useMemo(()=>Mm(r,c,h,m,u,"assets"),[r,c,h,m,u]),C=b.useMemo(()=>{if(r===u.pathname+u.search+u.hash)return[];let z=new Set,w=!1;if(c.forEach(V=>{var X;let Y=m.routes[V.route.id];!Y||!Y.hasLoader||(!S.some(Q=>Q.route.id===V.route.id)&&V.route.id in y&&((X=x[V.route.id])!=null&&X.shouldRevalidate)||Y.hasClientLoader?w=!0:z.add(V.route.id))}),z.size===0)return[];let M=Wv(r,g,d.unstable_trailingSlashAwareDataRequests,"data");return w&&z.size>0&&M.searchParams.set("_routes",c.filter(V=>z.has(V.route.id)).map(V=>V.route.id).join(",")),[M.pathname+M.search]},[g,d.unstable_trailingSlashAwareDataRequests,y,u,m,S,c,r,x]),O=b.useMemo(()=>ey(v,m),[v,m]),L=ry(v);return b.createElement(b.Fragment,null,C.map(z=>b.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...f})),O.map(z=>b.createElement("link",{key:z,rel:"modulepreload",href:z,...f})),L.map(({key:z,link:w})=>b.createElement("link",{key:z,nonce:f.nonce,...w,crossOrigin:w.crossOrigin??f.crossOrigin})))}function cy(...r){return c=>{r.forEach(f=>{typeof f=="function"?f(c):f!=null&&(f.current=c)})}}var oy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{oy&&(window.__reactRouterVersion="7.13.1")}catch{}function fy({basename:r,children:c,unstable_useTransitions:f,window:u}){let d=b.useRef();d.current==null&&(d.current=Xx({window:u,v5Compat:!0}));let m=d.current,[x,g]=b.useState({action:m.action,location:m.location}),y=b.useCallback(h=>{f===!1?g(h):b.startTransition(()=>g(h))},[f]);return b.useLayoutEffect(()=>m.listen(y),[m,y]),b.createElement(Hv,{basename:r,children:c,location:x.location,navigationType:x.action,navigator:m,unstable_useTransitions:f})}var th=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rl=b.forwardRef(function({onClick:c,discover:f="render",prefetch:u="none",relative:d,reloadDocument:m,replace:x,unstable_mask:g,state:y,target:h,to:S,preventScrollReset:v,viewTransition:C,unstable_defaultShouldRevalidate:O,...L},z){let{basename:w,navigator:M,unstable_useTransitions:V}=b.useContext(_t),Y=typeof S=="string"&&th.test(S),X=Qm(S,w);S=X.to;let Q=Nv(S,{relative:d}),F=Gt(),$=null;if(g){let Ne=nc(g,[],F.unstable_mask?F.unstable_mask.pathname:"/",!0);w!=="/"&&(Ne.pathname=Ne.pathname==="/"?w:qt([w,Ne.pathname])),$=M.createHref(Ne)}let[G,ae,ee]=sy(u,L),J=py(S,{replace:x,unstable_mask:g,state:y,target:h,preventScrollReset:v,relative:d,viewTransition:C,unstable_defaultShouldRevalidate:O,unstable_useTransitions:V});function fe(Ne){c&&c(Ne),Ne.defaultPrevented||J(Ne)}let te=!(X.isExternal||m),ye=b.createElement("a",{...L,...ee,href:(te?$:void 0)||X.absoluteURL||Q,onClick:te?fe:c,ref:cy(z,ae),target:h,"data-discover":!Y&&f==="render"?"true":void 0});return G&&!Y?b.createElement(b.Fragment,null,ye,b.createElement(iy,{page:Q})):ye});rl.displayName="Link";var dy=b.forwardRef(function({"aria-current":c="page",caseSensitive:f=!1,className:u="",end:d=!1,style:m,to:x,viewTransition:g,children:y,...h},S){let v=Xn(x,{relative:h.relative}),C=Gt(),O=b.useContext(pi),{navigator:L,basename:z}=b.useContext(_t),w=O!=null&&jy(v)&&g===!0,M=L.encodeLocation?L.encodeLocation(v).pathname:v.pathname,V=C.pathname,Y=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;f||(V=V.toLowerCase(),Y=Y?Y.toLowerCase():null,M=M.toLowerCase()),Y&&z&&(Y=ul(Y,z)||Y);const X=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let Q=V===M||!d&&V.startsWith(M)&&V.charAt(X)==="/",F=Y!=null&&(Y===M||!d&&Y.startsWith(M)&&Y.charAt(M.length)==="/"),$={isActive:Q,isPending:F,isTransitioning:w},G=Q?c:void 0,ae;typeof u=="function"?ae=u($):ae=[u,Q?"active":null,F?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let ee=typeof m=="function"?m($):m;return b.createElement(rl,{...h,"aria-current":G,className:ae,ref:S,style:ee,to:x,viewTransition:g},typeof y=="function"?y($):y)});dy.displayName="NavLink";var my=b.forwardRef(({discover:r="render",fetcherKey:c,navigate:f,reloadDocument:u,replace:d,state:m,method:x=fi,action:g,onSubmit:y,relative:h,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:C,...O},L)=>{let{unstable_useTransitions:z}=b.useContext(_t),w=gy(),M=by(g,{relative:h}),V=x.toLowerCase()==="get"?"get":"post",Y=typeof g=="string"&&th.test(g),X=Q=>{if(y&&y(Q),Q.defaultPrevented)return;Q.preventDefault();let F=Q.nativeEvent.submitter,$=(F==null?void 0:F.getAttribute("formmethod"))||x,G=()=>w(F||Q.currentTarget,{fetcherKey:c,method:$,navigate:f,replace:d,state:m,relative:h,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:C});z&&f!==!1?b.startTransition(()=>G()):G()};return b.createElement("form",{ref:L,method:V,action:M,onSubmit:u?y:X,...O,"data-discover":!Y&&r==="render"?"true":void 0})});my.displayName="Form";function hy(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lh(r){let c=b.useContext(Ya);return Oe(c,hy(r)),c}function py(r,{target:c,replace:f,unstable_mask:u,state:d,preventScrollReset:m,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:y,unstable_useTransitions:h}={}){let S=xi(),v=Gt(),C=Xn(r,{relative:x});return b.useCallback(O=>{if(Vv(O,c)){O.preventDefault();let L=f!==void 0?f:qn(v)===qn(C),z=()=>S(r,{replace:L,unstable_mask:u,state:d,preventScrollReset:m,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:y});h?b.startTransition(()=>z()):z()}},[v,S,C,f,u,d,c,r,m,x,g,y,h])}function xy(r){wt(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 c=b.useRef(Iu(r)),f=b.useRef(!1),u=Gt(),d=b.useMemo(()=>Zv(u.search,f.current?null:c.current),[u.search]),m=xi(),x=b.useCallback((g,y)=>{const h=Iu(typeof g=="function"?g(new URLSearchParams(d)):g);f.current=!0,m("?"+h,y)},[m,d]);return[d,x]}var vy=0,yy=()=>`__${String(++vy)}__`;function gy(){let{router:r}=lh("useSubmit"),{basename:c}=b.useContext(_t),f=Ov(),u=r.fetch,d=r.navigate;return b.useCallback(async(m,x={})=>{let{action:g,method:y,encType:h,formData:S,body:v}=Jv(m,c);if(x.navigate===!1){let C=x.fetcherKey||yy();await u(C,f,x.action||g,{unstable_defaultShouldRevalidate:x.unstable_defaultShouldRevalidate,preventScrollReset:x.preventScrollReset,formData:S,body:v,formMethod:x.method||y,formEncType:x.encType||h,flushSync:x.flushSync})}else await d(x.action||g,{unstable_defaultShouldRevalidate:x.unstable_defaultShouldRevalidate,preventScrollReset:x.preventScrollReset,formData:S,body:v,formMethod:x.method||y,formEncType:x.encType||h,replace:x.replace,state:x.state,fromRouteId:f,flushSync:x.flushSync,viewTransition:x.viewTransition})},[u,d,c,f])}function by(r,{relative:c}={}){let{basename:f}=b.useContext(_t),u=b.useContext(Yt);Oe(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),m={...Xn(r||".",{relative:c})},x=Gt();if(r==null){m.search=x.search;let g=new URLSearchParams(m.search),y=g.getAll("index");if(y.some(S=>S==="")){g.delete("index"),y.filter(v=>v).forEach(v=>g.append("index",v));let S=g.toString();m.search=S?`?${S}`:""}}return(!r||r===".")&&d.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),f!=="/"&&(m.pathname=m.pathname==="/"?f:qt([f,m.pathname])),qn(m)}function jy(r,{relative:c}={}){let f=b.useContext(Zm);Oe(f!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=lh("useViewTransitionState"),d=Xn(r,{relative:c});if(!f.isTransitioning)return!1;let m=ul(f.currentLocation.pathname,u)||f.currentLocation.pathname,x=ul(f.nextLocation.pathname,u)||f.nextLocation.pathname;return mi(d.pathname,x)!=null||mi(d.pathname,m)!=null}const Sy="";async function Ve(r,c){const f=await fetch(`${Sy}${r}`,c);if(!f.ok){const u=await f.json().catch(()=>({error:f.statusText}));throw new Error(u.error||`HTTP ${f.status}`)}return f.json()}const ge={getConfig(){return Ve("/api/config")},setConfig(r,c){return Ve("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:c})})},getSkills(){return Ve("/api/skills")},getSkillDetail(r,c){return Ve(`/api/skills/${r}/${c}`)},getEvals(r,c){return Ve(`/api/skills/${r}/${c}/evals`)},saveEvals(r,c,f){return Ve(`/api/skills/${r}/${c}/evals`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)})},generateEvals(r,c){return Ve(`/api/skills/${r}/${c}/generate-evals`,{method:"POST"})},getLatestBenchmark(r,c){return Ve(`/api/skills/${r}/${c}/benchmark/latest`)},getHistory(r,c,f){const u=new URLSearchParams;f!=null&&f.model&&u.set("model",f.model),f!=null&&f.type&&u.set("type",f.type),f!=null&&f.from&&u.set("from",f.from),f!=null&&f.to&&u.set("to",f.to);const d=u.toString();return Ve(`/api/skills/${r}/${c}/history${d?"?"+d:""}`)},getHistoryEntry(r,c,f){return Ve(`/api/skills/${r}/${c}/history/${encodeURIComponent(f)}`)},compareRuns(r,c,f,u){return Ve(`/api/skills/${r}/${c}/history-compare?a=${encodeURIComponent(f)}&b=${encodeURIComponent(u)}`)},getCaseHistory(r,c,f,u){const d=new URLSearchParams;u&&d.set("model",u);const m=d.toString();return Ve(`/api/skills/${r}/${c}/history/case/${f}${m?"?"+m:""}`)},deleteHistoryEntry(r,c,f){return Ve(`/api/skills/${r}/${c}/history/${encodeURIComponent(f)}`,{method:"DELETE"})},improveSkill(r,c,f){return Ve(`/api/skills/${r}/${c}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)})},applyImprovement(r,c,f){return Ve(`/api/skills/${r}/${c}/apply-improvement`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:f})})},getStats(r,c){return Ve(`/api/skills/${r}/${c}/stats`)},getDependencies(r,c){return Ve(`/api/skills/${r}/${c}/dependencies`)},getProjectLayout(){return Ve("/api/project-layout")},createSkill(r){return Ve("/api/skills/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})},getSkillCreatorStatus(){return Ve("/api/skill-creator-status")}},km={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 Vu(){return s.jsx("div",{className:"glass-card p-5",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"skeleton h-5 w-36 mb-2"}),s.jsx("div",{className:"skeleton h-3.5 w-48"})]}),s.jsx("div",{className:"skeleton h-6 w-20 rounded-full"})]})})}function Ny(){const[r,c]=b.useState([]),[f,u]=b.useState(!0),[d,m]=b.useState(null);b.useEffect(()=>{ge.getSkills().then(c).catch(g=>m(g.message)).finally(()=>u(!1))},[]);const x=r.reduce((g,y)=>{var h;return(g[h=y.plugin]||(g[h]=[])).push(y),g},{});return s.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[s.jsxs("div",{className:"mb-8 flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-[22px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Skills"}),s.jsx("p",{className:"text-[13px] mt-1",style:{color:"var(--text-tertiary)"},children:f?"Scanning plugins...":`${r.length} skill${r.length!==1?"s":""} across ${Object.keys(x).length} plugin${Object.keys(x).length!==1?"s":""}`})]}),!f&&s.jsxs(rl,{to:"/create",className:"flex items-center gap-2 px-4 py-2 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:"var(--accent)",color:"#fff"},onMouseEnter:g=>{g.currentTarget.style.opacity="0.9"},onMouseLeave:g=>{g.currentTarget.style.opacity="1"},children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),s.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"New Skill"]})]}),d&&s.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:d}),f&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(Vu,{}),s.jsx(Vu,{}),s.jsx(Vu,{})]}),!f&&s.jsx("div",{className:"space-y-8 stagger-children",children:Object.entries(x).map(([g,y])=>s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),s.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:g}),s.jsx("div",{className:"flex-1 h-px",style:{background:"var(--border-subtle)"}})]}),s.jsx("div",{className:"grid gap-2",children:y.map(h=>{const S=km[h.benchmarkStatus]||km.missing;return s.jsxs(rl,{to:`/skills/${h.plugin}/${h.skill}`,className:"glass-card glass-card-interactive p-5 flex items-center justify-between group",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"flex items-center gap-2",children:s.jsx("span",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:h.skill})}),s.jsxs("div",{className:"flex items-center gap-3 mt-1.5",children:[s.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:[h.evalCount," eval",h.evalCount!==1?"s":""]}),s.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:[h.assertionCount," assertion",h.assertionCount!==1?"s":""]}),h.lastBenchmark&&s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:new Date(h.lastBenchmark).toLocaleDateString()})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"pill",style:{background:S.bg,color:S.text},children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:S.dot}}),S.label]}),s.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:s.jsx("polyline",{points:"9 18 15 12 9 6"})})]})]},`${h.plugin}/${h.skill}`)})})]},g))}),!f&&r.length===0&&!d&&s.jsxs("div",{className:"text-center py-16 animate-fade-in-scale",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:"var(--surface-2)"},children:s.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:s.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"})})}),s.jsx("p",{className:"text-[14px] font-medium",style:{color:"var(--text-secondary)"},children:"No skills found"}),s.jsxs("p",{className:"text-[12px] mt-1 mb-4",style:{color:"var(--text-tertiary)"},children:["Check your ",s.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-2)"},children:"--root"})," directory, or create your first skill"]}),s.jsxs(rl,{to:"/create",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:"var(--accent)",color:"#fff"},onMouseEnter:g=>{g.currentTarget.style.opacity="0.9"},onMouseLeave:g=>{g.currentTarget.style.opacity="1"},children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),s.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Create Your First Skill"]})]})]})}function ah(){const[r,c]=b.useState([]),[f,u]=b.useState(!1),[d,m]=b.useState(!1),[x,g]=b.useState(null),y=b.useRef(null),h=b.useCallback(async(v,C)=>{c([]),u(!0),m(!1),g(null);const O=new AbortController;y.current=O;try{const L=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:C?JSON.stringify(C):void 0,signal:O.signal});if(!L.ok||!L.body)throw new Error(`HTTP ${L.status}`);const z=L.body.getReader(),w=new TextDecoder;let M="",V="";for(;;){const{done:Y,value:X}=await z.read();if(Y)break;M+=w.decode(X,{stream:!0});const Q=M.split(`
|
|
61
|
+
`);M=Q.pop()||"";for(const F of Q)if(F.startsWith("event: "))V=F.slice(7).trim();else if(F.startsWith("data: ")){try{const $=JSON.parse(F.slice(6)),G={event:V,data:$};V==="done"?(m(!0),c(ae=>[...ae,G])):c(ae=>[...ae,G])}catch{}V=""}}}catch(L){L.name!=="AbortError"&&g(L.message)}finally{u(!1),y.current=null}},[]),S=b.useCallback(()=>{var v;(v=y.current)==null||v.abort()},[]);return{events:r,running:f,done:d,error:x,start:h,stop:S}}const Ey={plugin:"",skill:"",skillContent:"",savedContent:"",isDirty:!1,evals:null,activePanel:"tests",selectedCaseId:null,isRunning:!1,runMode:null,runScope:null,latestBenchmark:null,inlineResults:new Map,improveTarget:null,regressions:[],iterationCount:0,loading:!0,error:null};function Ty(r,c){var f,u;switch(c.type){case"SET_LOADING":return{...r,loading:c.loading};case"SET_ERROR":return{...r,error:c.error};case"INIT_DATA":{const d=new Map;if(c.benchmark)for(const x of c.benchmark.cases)d.set(x.eval_id,{status:x.status,passRate:x.pass_rate,errorMessage:x.error_message||void 0,durationMs:x.durationMs,tokens:x.tokens,output:x.output,assertions:x.assertions.map(g=>({assertion_id:g.id,text:g.text,pass:g.pass,reasoning:g.reasoning}))});const m=((u=(f=c.evals)==null?void 0:f.evals[0])==null?void 0:u.id)??null;return{...r,skillContent:c.skillContent,savedContent:c.skillContent,isDirty:!1,evals:c.evals,latestBenchmark:c.benchmark,inlineResults:d,selectedCaseId:m,loading:!1,error:null}}case"SET_PANEL":return{...r,activePanel:c.panel};case"SET_CONTENT":return{...r,skillContent:c.content,isDirty:c.content!==r.savedContent};case"CONTENT_SAVED":return{...r,savedContent:r.skillContent,isDirty:!1};case"SET_EVALS":return{...r,evals:c.evals};case"SELECT_CASE":return{...r,selectedCaseId:c.caseId};case"RUN_START":return{...r,isRunning:!0,runMode:c.mode,runScope:c.scope,activePanel:"run"};case"RUN_COMPLETE":{const d=new Map(r.inlineResults);for(const m of c.benchmark.cases)d.set(m.eval_id,{status:m.status,passRate:m.pass_rate,errorMessage:m.error_message||void 0,durationMs:m.durationMs,tokens:m.tokens,output:m.output,assertions:m.assertions.map(x=>({assertion_id:x.id,text:x.text,pass:x.pass,reasoning:x.reasoning}))});return{...r,isRunning:!1,latestBenchmark:c.benchmark,inlineResults:d,iterationCount:r.iterationCount+1}}case"UPDATE_INLINE_RESULT":{const d=new Map(r.inlineResults);return d.set(c.evalId,c.result),{...r,inlineResults:d}}case"OPEN_IMPROVE":return{...r,improveTarget:c.evalId,activePanel:"editor"};case"CLOSE_IMPROVE":return{...r,improveTarget:null};case"SET_REGRESSIONS":return{...r,regressions:c.regressions};case"INCREMENT_ITERATION":return{...r,iterationCount:r.iterationCount+1};default:return r}}const nh=b.createContext(null);function la(){const r=b.useContext(nh);if(!r)throw new Error("useWorkspace must be used within WorkspaceProvider");return r}function Cy({plugin:r,skill:c,children:f}){const[u,d]=xy(),[m,x]=b.useReducer(Ty,{...Ey,plugin:r,skill:c}),{events:g,running:y,start:h,stop:S}=ah();b.useEffect(()=>{const X=u.get("panel");X&&["editor","tests","run","history","deps"].includes(X)&&x({type:"SET_PANEL",panel:X})},[]),b.useEffect(()=>{u.get("panel")!==m.activePanel&&d(Q=>{const F=new URLSearchParams(Q);return F.set("panel",m.activePanel),F},{replace:!0})},[m.activePanel]),b.useEffect(()=>{let X=!1;async function Q(){try{const[F,$,G]=await Promise.allSettled([ge.getSkillDetail(r,c),ge.getEvals(r,c),ge.getLatestBenchmark(r,c)]);if(X)return;x({type:"INIT_DATA",skillContent:F.status==="fulfilled"?F.value.skillContent:"",evals:$.status==="fulfilled"?$.value:null,benchmark:G.status==="fulfilled"?G.value:null})}catch(F){X||x({type:"SET_ERROR",error:F.message})}}return Q(),()=>{X=!0}},[r,c]),b.useEffect(()=>{if(!m.isRunning||!m.runScope)return;const X=new Map;for(const Q of g){const F=Q.data,$=F.eval_id;X.has($)||X.set($,{assertions:[]});const G=X.get($);if(Q.event==="output_ready"&&(G.output=F.output,F.durationMs!=null&&(G.durationMs=F.durationMs),F.tokens!=null&&(G.tokens=F.tokens)),Q.event==="assertion_result"){const ae={assertion_id:F.assertion_id,text:F.text,pass:F.pass,reasoning:F.reasoning};G.assertions.find(ee=>ee.assertion_id===ae.assertion_id)||G.assertions.push(ae)}Q.event==="case_complete"&&(G.status=F.status,G.passRate=F.pass_rate,G.errorMessage=F.error_message||void 0),x({type:"UPDATE_INLINE_RESULT",evalId:$,result:{...G}})}},[g,m.isRunning,m.runScope]),b.useEffect(()=>{!y&&m.isRunning&&ge.getLatestBenchmark(r,c).then(X=>x({type:"RUN_COMPLETE",benchmark:X})).catch(()=>x({type:"RUN_COMPLETE",benchmark:m.latestBenchmark}))},[y]);const v=b.useCallback(async()=>{try{await ge.applyImprovement(r,c,m.skillContent),x({type:"CONTENT_SAVED"})}catch(X){x({type:"SET_ERROR",error:X.message})}},[r,c,m.skillContent]),C=b.useCallback(async X=>{try{const Q=await ge.saveEvals(r,c,X);x({type:"SET_EVALS",evals:Q})}catch(Q){x({type:"SET_ERROR",error:Q.message})}},[r,c]),O=b.useCallback((X,Q)=>{if(m.isRunning)return;x({type:"RUN_START",mode:X,scope:Q});const F=Q==="all"?void 0:[Q.caseId],$=X==="comparison"?`/api/skills/${r}/${c}/compare`:X==="baseline"?`/api/skills/${r}/${c}/benchmark`:`/api/skills/${r}/${c}/benchmark`;h($,X==="baseline"?{eval_ids:F,baseline_only:!0}:{eval_ids:F})},[r,c,m.isRunning,h]),L=b.useCallback(()=>{S(),x({type:"RUN_COMPLETE",benchmark:m.latestBenchmark})},[S,m.latestBenchmark]),z=b.useCallback(async(X,Q)=>{x({type:"OPEN_IMPROVE",evalId:X})},[]),w=b.useCallback(async(X,Q)=>{try{await ge.applyImprovement(r,c,Q),x({type:"SET_CONTENT",content:Q}),x({type:"CONTENT_SAVED"}),x({type:"CLOSE_IMPROVE"}),O("benchmark",{caseId:X})}catch(F){x({type:"SET_ERROR",error:F.message})}},[r,c,O]),M=b.useCallback(async()=>{try{const X=await ge.getSkillDetail(r,c);x({type:"SET_CONTENT",content:X.skillContent}),x({type:"CONTENT_SAVED"})}catch{}},[r,c]),V=b.useCallback(async()=>{try{const X=await ge.generateEvals(r,c),Q=await ge.saveEvals(r,c,X);x({type:"SET_EVALS",evals:Q})}catch(X){x({type:"SET_ERROR",error:X.message})}},[r,c]),Y=b.useMemo(()=>({state:m,dispatch:x,saveContent:v,saveEvals:C,runBenchmark:O,cancelRun:L,improveForCase:z,applyImproveAndRerun:w,refreshSkillContent:M,generateEvals:V}),[m,v,C,O,L,z,w,M,V]);return s.jsx(nh.Provider,{value:Y,children:f})}function Ry({state:r}){const{plugin:c,skill:f,evals:u,latestBenchmark:d,isDirty:m,isRunning:x,regressions:g,iterationCount:y}=r,h=d==null?void 0:d.overall_pass_rate,S=(u==null?void 0:u.evals.reduce((L,z)=>L+z.assertions.length,0))??0,v=(u==null?void 0:u.evals.length)??0,C=h!=null?h>=80?"var(--green)":h>=50?"var(--yellow)":"var(--red)":"var(--text-tertiary)",O=h!=null?h>=80?"var(--green-muted)":h>=50?"var(--yellow-muted)":"var(--red-muted)":"var(--surface-3)";return s.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[s.jsxs("div",{className:"flex items-center gap-2 text-[13px]",children:[s.jsx(rl,{to:"/",className:"transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:L=>{L.currentTarget.style.color="var(--text-primary)"},onMouseLeave:L=>{L.currentTarget.style.color="var(--text-tertiary)"},children:"Skills"}),s.jsx(wm,{}),s.jsx("span",{style:{color:"var(--text-tertiary)"},children:c}),s.jsx(wm,{}),s.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:f}),m&&s.jsx("span",{className:"ml-2 text-[10px] font-semibold uppercase tracking-wider px-1.5 py-0.5 rounded",style:{background:"var(--yellow-muted)",color:"var(--yellow)"},children:"unsaved"}),x&&s.jsxs("span",{className:"ml-2 flex items-center gap-1.5 text-[11px]",style:{color:"var(--accent)"},children:[s.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}}),"Running..."]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[g.length>0&&s.jsxs("span",{className:"pill",style:{background:"var(--red-muted)",color:"var(--red)"},children:[s.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[s.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),s.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),g.length," regression",g.length>1?"s":""]}),y>0&&s.jsxs("span",{className:"pill",style:{background:"var(--purple-muted)",color:"var(--purple)"},children:["Iter ",y]}),s.jsx("span",{className:"pill",style:{background:O,color:C},children:h!=null?`${Math.round(h*100)}%`:"--"}),s.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[v," case",v!==1?"s":""," / ",S," assert",S!==1?"s":""]})]})]})}function wm(){return s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:s.jsx("polyline",{points:"9 18 15 12 9 6"})})}const Ay=[{id:"editor",label:"Editor",shortcut:"1"},{id:"tests",label:"Tests",shortcut:"2"},{id:"run",label:"Run",shortcut:"3"},{id:"history",label:"History",shortcut:"4"},{id:"deps",label:"Deps",shortcut:"5"}];function My({id:r,active:c}){const u={width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:c?"#fff":"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"};switch(r){case"editor":return s.jsxs("svg",{...u,children:[s.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),s.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]});case"tests":return s.jsxs("svg",{...u,children:[s.jsx("path",{d:"M9 11l3 3L22 4"}),s.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]});case"run":return s.jsx("svg",{...u,children:s.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})});case"history":return s.jsxs("svg",{...u,children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("polyline",{points:"12 6 12 12 16 14"})]});case"deps":return s.jsxs("svg",{...u,children:[s.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"}),s.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"})]})}}function ky({activePanel:r,onPanelChange:c,isDirty:f,isRunning:u,hasRegressions:d}){return s.jsx("div",{className:"flex flex-col gap-1 py-2 px-1",style:{background:"var(--surface-1)",borderRight:"1px solid var(--border-subtle)",width:48},children:Ay.map(m=>{const x=r===m.id,g=m.id==="editor"&&f||m.id==="run"&&u||m.id==="history"&&d;return s.jsxs("button",{onClick:()=>c(m.id),title:`${m.label} (Ctrl+${m.shortcut})`,className:"relative flex items-center justify-center rounded-lg transition-all duration-150",style:{width:40,height:40,background:x?"var(--accent)":"transparent",color:x?"#fff":"var(--text-tertiary)"},onMouseEnter:y=>{x||(y.currentTarget.style.background="var(--surface-3)",y.currentTarget.style.color="var(--text-primary)")},onMouseLeave:y=>{x||(y.currentTarget.style.background="transparent",y.currentTarget.style.color="var(--text-tertiary)")},children:[s.jsx(My,{id:m.id,active:x}),g&&s.jsx("span",{className:"absolute top-1 right-1 rounded-full",style:{width:6,height:6,background:m.id==="run"?"var(--accent)":m.id==="history"?"var(--red)":"var(--yellow)"}})]},m.id)})})}function wy(r){const c=r.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);if(!c)return{metadata:{},body:r};const f=c[1],u=c[2].trim(),d={},m=f.split(`
|
|
62
|
+
`);let x="";for(const g of m){const y=g.match(/^\s+-\s+(.+)$/);if(y&&x){const S=d[x];Array.isArray(S)?S.push(y[1].trim().replace(/^["']|["']$/g,"")):d[x]=[y[1].trim().replace(/^["']|["']$/g,"")];continue}const h=g.match(/^([\w-]+):\s*(.*)$/);if(h){x=h[1];const S=h[2].trim();if(!S){d[x]=[];continue}const v=S.match(/^\[(.+)\]$/);if(v){d[x]=v[1].split(",").map(C=>C.trim().replace(/^["']|["']$/g,"")).filter(Boolean);continue}d[x]=S.replace(/^["']|["']$/g,"")}}return{metadata:d,body:u}}function _y(r){if(!r)return"";let c=zy(r);return c=c.replace(/```(\w*)\n([\s\S]*?)```/g,'<pre style="background:var(--surface-2);padding:0.75rem;border-radius:6px;overflow-x:auto;font-size:12px;line-height:1.5;margin:0.5rem 0;border:1px solid var(--border-subtle)"><code>$2</code></pre>'),c=c.replace(/^### (.+)$/gm,'<div style="font-weight:600;font-size:14px;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),c=c.replace(/^## (.+)$/gm,'<div style="font-weight:700;font-size:15px;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),c=c.replace(/^# (.+)$/gm,'<div style="font-weight:700;font-size:1rem;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),c=c.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:var(--accent);text-decoration:underline">$1</a>'),c=c.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),c=c.replace(/\*([^*]+)\*/g,"<em>$1</em>"),c=c.replace(/`([^`]+)`/g,'<code style="background:var(--surface-3);padding:0.1rem 0.3rem;border-radius:3px;font-size:0.85em">$1</code>'),c=c.replace(/^- (.+)$/gm,'<div style="padding-left:1rem;margin:0.15rem 0">• $1</div>'),c=c.replace(/^(\d+)\. (.+)$/gm,'<div style="padding-left:1rem;margin:0.15rem 0">$1. $2</div>'),c=c.replace(/\n\n/g,'<div style="height:0.5rem"></div>'),c=c.replace(/\n/g,"<br/>"),c}function zy(r){const c=r.split(`
|
|
63
|
+
`),f=[];let u=0;for(;u<c.length;)if(c[u].trim().startsWith("|")&&u+1<c.length&&c[u+1].trim().startsWith("|")&&/\|[\s-:]+\|/.test(c[u+1])){const d=_m(c[u]);u+=2;const m=[];for(;u<c.length&&c[u].trim().startsWith("|");)m.push(_m(c[u])),u++;const x='style="text-align:left;padding:0.4rem 0.6rem;font-weight:600;font-size:12px;color:var(--text-primary);border-bottom:1px solid var(--border-default)"',g='style="padding:0.4rem 0.6rem;font-size:12px;color:var(--text-secondary);border-bottom:1px solid var(--border-subtle)"';let y='<table style="width:100%;border-collapse:collapse;margin:0.5rem 0;border:1px solid var(--border-subtle);border-radius:6px;overflow:hidden">';y+="<thead><tr>";for(const h of d)y+=`<th ${x}>${h}</th>`;y+="</tr></thead><tbody>";for(const h of m){y+="<tr>";for(const S of h)y+=`<td ${g}>${S}</td>`;y+="</tr>"}y+="</tbody></table>",f.push(y)}else f.push(c[u]),u++;return f.join(`
|
|
64
|
+
`)}function _m(r){return r.split("|").map(c=>c.trim()).filter(c=>c.length>0)}function Dy(r,c){const f=r.split(`
|
|
65
|
+
`),u=c.split(`
|
|
66
|
+
`);if(f.length>1e3||u.length>1e3)return[...f.map(S=>({type:"unchanged",content:S}))];const d=f.length,m=u.length,x=Array.from({length:d+1},()=>new Array(m+1).fill(0));for(let S=1;S<=d;S++)for(let v=1;v<=m;v++)f[S-1]===u[v-1]?x[S][v]=x[S-1][v-1]+1:x[S][v]=Math.max(x[S-1][v],x[S][v-1]);const g=[];let y=d,h=m;for(;y>0||h>0;)y>0&&h>0&&f[y-1]===u[h-1]?(g.push({type:"unchanged",content:f[y-1]}),y--,h--):h>0&&(y===0||x[y][h-1]>=x[y-1][h])?(g.push({type:"added",content:u[h-1]}),h--):(g.push({type:"removed",content:f[y-1]}),y--);return g.reverse()}function Oy({plugin:r,skill:c,skillContent:f,onApplied:u}){const[d,m]=b.useState("closed"),[x,g]=b.useState(null),[y,h]=b.useState("claude-cli"),[S,v]=b.useState("opus"),[C,O]=b.useState([]),[L,z]=b.useState(""),[w,M]=b.useState(""),[V,Y]=b.useState(null),[X,Q]=b.useState(!1);b.useEffect(()=>{ge.getConfig().then(J=>{g(J),J.providers.find(te=>te.id==="claude-cli"&&te.available)&&(h("claude-cli"),v("opus"))}).catch(()=>{})},[]);function F(){return x==null?void 0:x.providers.find(J=>J.id===y&&J.available)}async function $(){m("loading"),Y(null);try{const J=await ge.improveSkill(r,c,{provider:y,model:S});z(J.improved),M(J.reasoning),O(Dy(J.original,J.improved)),m("diff_shown")}catch(J){Y(J.message),m("open")}}async function G(){Q(!0);try{await ge.applyImprovement(r,c,L),u(L),m("closed")}catch(J){Y(J.message)}finally{Q(!1)}}function ae(){m("closed"),O([]),z(""),M(""),Y(null)}if(d==="closed")return s.jsxs("button",{onClick:()=>m("open"),className:"btn btn-secondary mb-5",disabled:!f,children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),s.jsx("path",{d:"M2 17l10 5 10-5"}),s.jsx("path",{d:"M2 12l10 5 10-5"})]}),"Improve Skill"]});const ee=F();return s.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden animate-fade-in",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[s.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:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),s.jsx("path",{d:"M2 17l10 5 10-5"}),s.jsx("path",{d:"M2 12l10 5 10-5"})]})}),s.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"AI Skill Improvement"})]}),s.jsx("button",{onClick:ae,className:"w-7 h-7 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:J=>{J.currentTarget.style.background="var(--surface-3)"},onMouseLeave:J=>{J.currentTarget.style.background="transparent"},children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),s.jsxs("div",{className:"px-5 py-4",children:[(d==="open"||d==="loading")&&s.jsxs("div",{className:"flex items-end gap-3 mb-4",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Provider"}),s.jsx("select",{className:"input-field text-[12px] py-1.5",value:y,onChange:J=>{h(J.target.value);const fe=x==null?void 0:x.providers.find(te=>te.id===J.target.value);fe!=null&&fe.models[0]&&v(fe.models[0].id)},disabled:d==="loading",children:x==null?void 0:x.providers.filter(J=>J.available).map(J=>s.jsx("option",{value:J.id,children:J.label},J.id))})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Model"}),s.jsx("select",{className:"input-field text-[12px] py-1.5",value:S,onChange:J=>v(J.target.value),disabled:d==="loading",children:ee==null?void 0:ee.models.map(J=>s.jsx("option",{value:J.id,children:J.label},J.id))})]}),s.jsx("button",{onClick:$,disabled:d==="loading",className:"btn btn-primary flex-shrink-0",children:d==="loading"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"spinner",style:{width:12,height:12}})," Improving..."]}):"Improve"})]}),V&&s.jsx("div",{className:"mb-4 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:V}),d==="diff_shown"&&s.jsxs(s.Fragment,{children:[w&&s.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:[s.jsx("span",{className:"font-semibold",style:{color:"#a855f7"},children:"AI Reasoning: "}),w]}),s.jsx("div",{className:"rounded-lg overflow-hidden mb-4",style:{border:"1px solid var(--border-subtle)",maxHeight:"400px",overflowY:"auto"},children:C.map((J,fe)=>s.jsxs("div",{className:"px-3 py-0.5 text-[11px] font-mono",style:{background:J.type==="added"?"rgba(34,197,94,0.1)":J.type==="removed"?"rgba(239,68,68,0.1)":"transparent",color:J.type==="added"?"var(--green)":J.type==="removed"?"var(--red)":"var(--text-secondary)",borderLeft:J.type==="added"?"3px solid var(--green)":J.type==="removed"?"3px solid var(--red)":"3px solid transparent"},children:[s.jsx("span",{style:{userSelect:"none",opacity:.5,marginRight:8},children:J.type==="added"?"+":J.type==="removed"?"-":" "}),J.content]},fe))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:G,disabled:X,className:"btn btn-primary",children:X?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"spinner",style:{width:12,height:12}})," Applying..."]}):s.jsxs(s.Fragment,{children:[s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})})," Apply"]})}),s.jsx("button",{onClick:ae,className:"btn btn-secondary",children:"Discard"})]})]})]})]})}function Ly(){const{state:r,dispatch:c,saveContent:f}=la(),{plugin:u,skill:d,skillContent:m,isDirty:x,improveTarget:g}=r,[y,h]=b.useState("split"),[S,v]=b.useState(!1),C=b.useRef(null),{metadata:O,body:L}=wy(m),z=Array.isArray(O["allowed-tools"])?O["allowed-tools"]:O["allowed-tools"]?[O["allowed-tools"]]:[],w=Object.entries(O).filter(([Y])=>Y!=="allowed-tools"),M=b.useCallback(async()=>{v(!0),await f(),v(!1)},[f]),V=b.useCallback(Y=>{(Y.ctrlKey||Y.metaKey)&&Y.key==="s"&&(Y.preventDefault(),Y.stopPropagation(),x&&M())},[x,M]);return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-2",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[s.jsx("div",{className:"flex items-center gap-1",children:["raw","split","preview"].map(Y=>s.jsx("button",{onClick:()=>h(Y),className:"px-3 py-1.5 rounded-md text-[12px] font-medium transition-all duration-150",style:{background:y===Y?"var(--accent-muted)":"transparent",color:y===Y?"var(--accent)":"var(--text-tertiary)"},children:Y==="raw"?"Raw":Y==="split"?"Side-by-Side":"Preview"},Y))}),s.jsxs("div",{className:"flex items-center gap-2",children:[x&&s.jsx("button",{onClick:()=>c({type:"SET_CONTENT",content:r.savedContent}),className:"btn btn-ghost text-[12px]",children:"Discard"}),s.jsx("button",{onClick:M,disabled:!x||S,className:"btn btn-primary text-[12px]",children:S?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}})," Saving..."]}):"Save"})]})]}),s.jsxs("div",{className:"flex-1 overflow-hidden",style:{display:"grid",gridTemplateColumns:y==="raw"||y==="preview"?"1fr":"1fr 1fr"},children:[y!=="preview"&&s.jsxs("div",{className:"flex flex-col overflow-hidden",style:{borderRight:y==="split"?"1px solid var(--border-subtle)":"none"},children:[s.jsx("div",{className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:"SKILL.md"}),s.jsx("textarea",{ref:C,value:m,onChange:Y=>c({type:"SET_CONTENT",content:Y.target.value}),onKeyDown:V,spellCheck:!1,className:"flex-1 w-full resize-none outline-none p-4",style:{background:"var(--surface-0)",color:"var(--text-primary)",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:13,lineHeight:1.6,tabSize:2,border:"none"}})]}),y!=="raw"&&s.jsxs("div",{className:"overflow-auto",children:[s.jsx("div",{className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:"Preview"}),s.jsxs("div",{className:"p-4 animate-fade-in",children:[w.length>0&&s.jsx("div",{className:"grid grid-cols-2 gap-3 mb-4",children:w.map(([Y,X])=>s.jsxs("div",{className:"px-3 py-2.5 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--text-tertiary)"},children:Y}),s.jsx("div",{className:"text-[12px]",style:{color:"var(--text-primary)"},children:Array.isArray(X)?X.join(", "):X})]},Y))}),z.length>0&&s.jsxs("div",{className:"mb-4",children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-2",style:{color:"var(--text-tertiary)"},children:"Allowed Tools"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:z.map(Y=>s.jsx("span",{className:"px-2 py-1 rounded-md text-[11px] font-mono",style:{background:"var(--accent-muted)",color:"var(--accent)"},children:Y},Y))})]}),L&&s.jsx("div",{className:"text-[13px] leading-relaxed p-4 rounded-lg overflow-x-auto",style:{background:"var(--surface-1)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",maxHeight:"calc(100vh - 200px)",overflowY:"auto",wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:_y(L)}})]})]})]}),g!==null&&u&&d&&s.jsx("div",{style:{borderTop:"1px solid var(--border-subtle)"},children:s.jsx(Oy,{plugin:u,skill:d,skillContent:m,onApplied:Y=>{c({type:"SET_CONTENT",content:Y}),c({type:"CONTENT_SAVED"}),c({type:"CLOSE_IMPROVE"})}})})]})}function ec(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function sh(r){const c=new Date(r);return c.toLocaleDateString(void 0,{month:"short",day:"numeric"})+", "+c.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function ih(r){return r==null?"--":r>=1e3?`${(r/1e3).toFixed(1)}s`:`${r}ms`}function rh({entries:r}){if(r.length<2)return null;const c=80,f=24,u=2,d=r.slice().reverse(),m=d.length,x=d.map((g,y)=>{const h=u+y/(m-1)*(c-u*2),S=u+(f-u*2)-g.pass_rate*(f-u*2);return`${h},${S}`});return s.jsxs("svg",{width:c,height:f,style:{display:"block",flexShrink:0},children:[s.jsx("polyline",{points:x.join(" "),fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),x.length>0&&s.jsx("circle",{cx:parseFloat(x[x.length-1].split(",")[0]),cy:parseFloat(x[x.length-1].split(",")[1]),r:2.5,fill:"var(--accent)"})]})}function Uy(){const{state:r,dispatch:c,saveEvals:f,runBenchmark:u,cancelRun:d,generateEvals:m}=la(),{evals:x,selectedCaseId:g,inlineResults:y,isRunning:h}=r,[S,v]=b.useState(!1),[C,O]=b.useState(!1),L=(x==null?void 0:x.evals)??[],z=L.find(M=>M.id===g)??null,w=b.useCallback(async()=>{O(!0),await m(),O(!1)},[m]);return!x||L.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 px-8",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center",style:{background:"var(--accent-muted)"},children:s.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M9 11l3 3L22 4"}),s.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]})}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-[14px] font-medium mb-1",style:{color:"var(--text-primary)"},children:"No test cases yet"}),s.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Create test cases to start evaluating your skill"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:()=>v(!0),className:"btn btn-primary text-[12px]",children:"Create Test Case"}),s.jsx("button",{onClick:w,disabled:C,className:"btn btn-secondary text-[12px]",children:C?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}})," Generating..."]}):"Generate with AI"})]}),S&&x&&s.jsx(zm,{evals:x,onSave:M=>{f(M),v(!1)},onCancel:()=>v(!1)})]}):s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"280px 1fr",height:"100%",overflow:"hidden"},children:[s.jsxs("div",{className:"overflow-auto",style:{borderRight:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[s.jsxs("div",{className:"px-3 py-2 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",borderBottom:"1px solid var(--border-subtle)"},children:["Test Cases (",L.length,")"]}),s.jsx("div",{className:"py-1",children:L.map(M=>{const V=y.get(M.id),Y=g===M.id;return s.jsxs("button",{onClick:()=>c({type:"SELECT_CASE",caseId:M.id}),className:"w-full text-left px-3 py-2.5 transition-all duration-150",style:{background:Y?"var(--accent-muted)":"transparent",borderLeft:Y?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:X=>{Y||(X.currentTarget.style.background="var(--surface-2)")},onMouseLeave:X=>{Y||(X.currentTarget.style.background="transparent")},children:[s.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[s.jsxs("span",{className:"text-[12px] font-medium truncate",style:{color:Y?"var(--text-primary)":"var(--text-secondary)"},children:["#",M.id," ",M.name]}),s.jsx(uh,{result:V})]}),s.jsxs("div",{className:"text-[11px] flex items-center gap-2",style:{color:"var(--text-tertiary)"},children:[M.assertions.length," assertion",M.assertions.length!==1?"s":"",(V==null?void 0:V.passRate)!=null&&s.jsx(qy,{passRate:V.passRate})]})]},M.id)})}),s.jsx("div",{className:"px-3 py-2",children:s.jsx("button",{onClick:()=>v(!0),className:"w-full py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{border:"1px dashed var(--border-default)",color:"var(--text-tertiary)",background:"transparent"},onMouseEnter:M=>{M.currentTarget.style.borderColor="var(--accent)",M.currentTarget.style.color="var(--accent)"},onMouseLeave:M=>{M.currentTarget.style.borderColor="var(--border-default)",M.currentTarget.style.color="var(--text-tertiary)"},children:"+ Add Test Case"})})]}),s.jsx("div",{className:"overflow-auto",children:z?s.jsx(By,{evalCase:z,result:y.get(z.id),evals:x,isRunning:h,onSaveEvals:f,onRun:M=>u("benchmark",{caseId:M}),onCompare:M=>u("comparison",{caseId:M}),onCancel:d,onImprove:M=>c({type:"OPEN_IMPROVE",evalId:M})}):s.jsx("div",{className:"flex items-center justify-center h-full text-[13px]",style:{color:"var(--text-tertiary)"},children:"Select a test case"})}),S&&x&&s.jsx(zm,{evals:x,onSave:M=>{f(M),v(!1)},onCancel:()=>v(!1)})]})}function By({evalCase:r,result:c,evals:f,isRunning:u,onSaveEvals:d,onRun:m,onCompare:x,onCancel:g,onImprove:y}){const[h,S]=b.useState(!1),[v,C]=b.useState(r.prompt),[O,L]=b.useState(!1),[z,w]=b.useState(r.expected_output);b.useState(()=>{C(r.prompt),w(r.expected_output)});const M=b.useCallback(ee=>{d({...f,evals:f.evals.map(J=>J.id===ee.id?ee:J)})},[f,d]),V=b.useCallback(()=>{M({...r,prompt:v}),S(!1)},[r,v,M]),Y=b.useCallback(()=>{M({...r,expected_output:z}),L(!1)},[r,z,M]),X=b.useCallback(()=>{M({...r,assertions:[...r.assertions,{id:`assert-${Date.now()}`,text:"New assertion",type:"boolean"}]})},[r,M]),Q=b.useCallback((ee,J)=>{M({...r,assertions:r.assertions.map(fe=>fe.id===ee?{...fe,text:J}:fe)})},[r,M]),F=b.useCallback(ee=>{M({...r,assertions:r.assertions.filter(J=>J.id!==ee)})},[r,M]),$=b.useCallback(()=>{confirm("Delete this test case?")&&d({...f,evals:f.evals.filter(ee=>ee.id!==r.id)})},[f,r.id,d]),G=c&&c.assertions.length>0&&c.assertions.every(ee=>ee.pass),ae=c&&c.assertions.some(ee=>!ee.pass);return s.jsxs("div",{className:"p-5 animate-fade-in",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-[16px] font-semibold",style:{color:"var(--text-primary)"},children:["#",r.id," ",r.name]}),s.jsx(uh,{result:c})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[u?s.jsxs("button",{onClick:g,className:"btn text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:4},children:s.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1"})}),"Cancel"]}):s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>m(r.id),className:"btn btn-primary text-[12px]",children:"Run"}),s.jsx("button",{onClick:()=>x(r.id),className:"btn btn-purple text-[12px]",children:"A/B Compare"})]}),ae&&!u&&s.jsx("button",{onClick:()=>y(r.id),className:"btn btn-secondary text-[12px]",children:"Fix with AI"}),!u&&s.jsx("button",{onClick:$,className:"btn btn-ghost text-[12px]",style:{color:"var(--red)"},children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("polyline",{points:"3 6 5 6 21 6"}),s.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})]}),G&&s.jsxs("div",{className:"mb-4 px-4 py-3 rounded-xl flex items-center gap-3",style:{background:"var(--green-muted)",border:"1px solid rgba(52, 211, 153, 0.2)"},children:[s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"2.5",children:[s.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),s.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),s.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--green)"},children:"All assertions passing"})]}),s.jsx(Zu,{title:"Prompt",children:h?s.jsxs("div",{children:[s.jsx("textarea",{value:v,onChange:ee=>C(ee.target.value),className:"input-field w-full",rows:4,style:{fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:12},autoFocus:!0}),s.jsxs("div",{className:"flex gap-2 mt-2",children:[s.jsx("button",{onClick:V,className:"btn btn-primary text-[12px]",children:"Save"}),s.jsx("button",{onClick:()=>{C(r.prompt),S(!1)},className:"btn btn-ghost text-[12px]",children:"Cancel"})]})]}):s.jsx("div",{className:"p-3 rounded-lg text-[12px] cursor-pointer transition-all duration-150",style:{background:"var(--surface-2)",color:"var(--text-secondary)",fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap",border:"1px solid var(--border-subtle)"},onClick:()=>S(!0),onMouseEnter:ee=>{ee.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:ee=>{ee.currentTarget.style.borderColor="var(--border-subtle)"},children:r.prompt||s.jsx("span",{style:{color:"var(--text-tertiary)",fontStyle:"italic"},children:"Click to edit prompt..."})})}),s.jsx(Zu,{title:"Expected Output",children:O?s.jsxs("div",{children:[s.jsx("textarea",{value:z,onChange:ee=>w(ee.target.value),className:"input-field w-full",rows:3,style:{fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:12},autoFocus:!0}),s.jsxs("div",{className:"flex gap-2 mt-2",children:[s.jsx("button",{onClick:Y,className:"btn btn-primary text-[12px]",children:"Save"}),s.jsx("button",{onClick:()=>{w(r.expected_output),L(!1)},className:"btn btn-ghost text-[12px]",children:"Cancel"})]})]}):s.jsx("div",{className:"p-3 rounded-lg text-[12px] cursor-pointer transition-all duration-150",style:{background:"var(--surface-2)",color:"var(--text-tertiary)",fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap",border:"1px solid var(--border-subtle)"},onClick:()=>L(!0),onMouseEnter:ee=>{ee.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:ee=>{ee.currentTarget.style.borderColor="var(--border-subtle)"},children:r.expected_output||s.jsx("span",{style:{fontStyle:"italic"},children:"Click to edit expected output..."})})}),s.jsx(Zu,{title:`Assertions (${r.assertions.length})`,action:s.jsx("button",{onClick:X,className:"btn btn-ghost text-[11px]",children:"+ Add"}),children:r.assertions.length===0?s.jsx("div",{className:"text-[12px] text-center py-4",style:{color:"var(--text-tertiary)"},children:'No assertions. Click "+ Add" to create one.'}):s.jsx("div",{className:"space-y-2",children:r.assertions.map(ee=>{const J=c==null?void 0:c.assertions.find(fe=>fe.assertion_id===ee.id);return s.jsx(Hy,{assertion:ee,result:J,onUpdate:fe=>Q(ee.id,fe),onDelete:()=>F(ee.id)},ee.id)})})}),(c==null?void 0:c.output)&&s.jsx(Yy,{output:c.output,durationMs:c.durationMs,tokens:c.tokens}),s.jsx(Gy,{evalId:r.id})]},r.id)}function Hy({assertion:r,result:c,onUpdate:f,onDelete:u}){const[d,m]=b.useState(!1),[x,g]=b.useState(r.text),[y,h]=b.useState(!1),S=()=>{f(x),m(!1)};return s.jsx("div",{className:"rounded-lg px-3 py-2.5 transition-all duration-150",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:s.jsxs("div",{className:"flex items-start gap-2",children:[c?s.jsx("span",{className:"mt-0.5 rounded-full flex-shrink-0",style:{width:18,height:18,display:"flex",alignItems:"center",justifyContent:"center",background:c.pass?"var(--green-muted)":"var(--red-muted)"},children:c.pass?s.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"3",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})}):s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"3",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):s.jsx("span",{className:"mt-0.5 w-[18px] h-[18px] rounded-full flex-shrink-0",style:{background:"var(--surface-4)"}}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"flex items-center gap-2 mb-0.5",children:s.jsx("span",{className:"text-[10px] font-mono font-semibold",style:{color:"var(--text-tertiary)"},children:r.id})}),d?s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{value:x,onChange:v=>g(v.target.value),onKeyDown:v=>{v.key==="Enter"&&S(),v.key==="Escape"&&m(!1)},className:"input-field flex-1 text-[12px]",autoFocus:!0}),s.jsx("button",{onClick:S,className:"btn btn-primary text-[11px]",children:"Save"})]}):s.jsx("div",{className:"text-[12px] cursor-pointer",style:{color:"var(--text-secondary)"},onClick:()=>{g(r.text),m(!0)},children:r.text}),(c==null?void 0:c.reasoning)&&s.jsx("button",{onClick:()=>h(!y),className:"text-[11px] mt-1 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:y?"Hide reasoning":"Show reasoning"}),y&&(c==null?void 0:c.reasoning)&&s.jsx("div",{className:"mt-1 text-[11px] p-2 rounded",style:{background:"var(--surface-1)",color:"var(--text-tertiary)"},children:c.reasoning})]}),s.jsx("button",{onClick:u,className:"btn btn-ghost p-1 opacity-0 group-hover:opacity-100",style:{color:"var(--text-tertiary)"},onMouseEnter:v=>{v.currentTarget.style.color="var(--red)",v.currentTarget.style.opacity="1"},onMouseLeave:v=>{v.currentTarget.style.color="var(--text-tertiary)",v.currentTarget.style.opacity=""},children:s.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})}function Zu({title:r,action:c,children:f}){return s.jsxs("div",{className:"mb-5",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:r}),c]}),f]})}function uh({result:r}){if(!r||r.status==null)return s.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:"--"});const c=r.status==="pass";return s.jsx("span",{className:"pill text-[10px]",style:{background:c?"var(--green-muted)":"var(--red-muted)",color:c?"var(--green)":"var(--red)"},children:r.passRate!=null?`${Math.round(r.passRate*100)}%`:r.status})}function qy({passRate:r}){const c=Math.round(r*100);return s.jsx("div",{className:"flex items-center gap-1",children:s.jsx("div",{className:"rounded-full overflow-hidden",style:{width:32,height:4,background:"var(--surface-4)"},children:s.jsx("div",{className:"h-full rounded-full",style:{width:`${c}%`,background:c>=80?"var(--green)":c>=50?"var(--yellow)":"var(--red)"}})})})}function Yy({output:r,durationMs:c,tokens:f}){const[u,d]=b.useState(!1);return s.jsxs("div",{className:"mb-5",children:[s.jsxs("button",{onClick:()=>d(!u),className:"flex items-center gap-2 text-[11px] font-semibold uppercase tracking-wider mb-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:u?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease"},children:s.jsx("polyline",{points:"9 18 15 12 9 6"})}),"LLM Output",c!=null&&s.jsxs("span",{style:{fontWeight:400},children:["(",(c/1e3).toFixed(1),"s)"]}),f!=null&&s.jsxs("span",{style:{fontWeight:400},children:["(",f," tokens)"]})]}),u&&s.jsx("pre",{className:"text-[12px] p-4 rounded-lg overflow-auto animate-fade-in",style:{background:"var(--surface-1)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",maxHeight:400,fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:r})]})}function Gy({evalId:r}){const{state:c,dispatch:f}=la(),{plugin:u,skill:d}=c,[m,x]=b.useState(!0),[g,y]=b.useState(!1),[h,S]=b.useState({}),v=h[r]??null,C=b.useCallback(async z=>{y(!0);try{const w=await ge.getCaseHistory(u,d,z);S(M=>({...M,[z]:w}))}catch{S(w=>({...w,[z]:[]}))}finally{y(!1)}},[u,d]);b.useEffect(()=>{m&&!h[r]&&C(r)},[r,u,d]);const O=b.useCallback(()=>{const z=!m;x(z),z&&!h[r]&&C(r)},[m,r,h,C]),L=v?v.slice(0,10):[];return s.jsxs("div",{className:"mb-5",children:[s.jsxs("button",{onClick:O,className:"flex items-center gap-2 text-[11px] font-semibold uppercase tracking-wider mb-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:m?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease"},children:s.jsx("polyline",{points:"9 18 15 12 9 6"})}),"Execution History",v&&v.length>0&&s.jsxs("span",{style:{fontWeight:400},children:["(",v.length," run",v.length!==1?"s":"",")"]})]}),m&&s.jsx("div",{className:"animate-fade-in",children:g?s.jsxs("div",{className:"flex items-center gap-2 py-3",children:[s.jsx("div",{className:"spinner",style:{width:14,height:14,borderWidth:1.5}}),s.jsx("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading history..."})]}):!v||v.length===0?s.jsx("div",{className:"text-[12px] py-3",style:{color:"var(--text-tertiary)"},children:"No history for this case"}):s.jsxs("div",{children:[L.length>=2&&s.jsx("div",{className:"mb-2",children:s.jsx(rh,{entries:L})}),s.jsx("div",{className:"space-y-2",children:L.map((z,w)=>s.jsxs("div",{className:"rounded-lg px-3 py-2.5",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[s.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:sh(z.timestamp)}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:z.model}),s.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}),s.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:ec(z.pass_rate)},children:[Math.round(z.pass_rate*100),"%"]})]}),s.jsxs("div",{className:"flex items-center gap-4 mb-1.5 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[z.durationMs!=null&&s.jsx("span",{children:ih(z.durationMs)}),z.tokens!=null&&s.jsxs("span",{children:[z.tokens>=1e3?`${(z.tokens/1e3).toFixed(1)}k`:z.tokens," tok"]})]}),s.jsx("div",{className:"space-y-0.5",children:z.assertions.map(M=>s.jsxs("div",{className:"flex items-start gap-1.5",children:[s.jsx("span",{className:"mt-0.5 rounded-full flex-shrink-0",style:{width:14,height:14,display:"flex",alignItems:"center",justifyContent:"center",background:M.pass?"var(--green-muted)":"var(--red-muted)"},children:M.pass?s.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"3",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})}):s.jsxs("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"3",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:M.text})]},M.id))})]},w))}),s.jsx("button",{onClick:()=>f({type:"SET_PANEL",panel:"history"}),className:"mt-2 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--accent)"},onMouseEnter:z=>{z.currentTarget.style.textDecoration="underline"},onMouseLeave:z=>{z.currentTarget.style.textDecoration="none"},children:"View full history →"})]})})]})}function zm({evals:r,onSave:c,onCancel:f}){const[u,d]=b.useState(""),[m,x]=b.useState(""),[g,y]=b.useState(""),[h,S]=b.useState([{id:`assert-${Date.now()}`,text:"",type:"boolean"}]),v=Math.max(0,...r.evals.map(O=>O.id))+1,C=()=>{if(!u.trim()||!m.trim())return;const O={id:v,name:u.trim(),prompt:m.trim(),expected_output:g.trim(),files:[],assertions:h.filter(L=>L.text.trim())};c({...r,evals:[...r.evals,O]})};return s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center animate-overlay-in",style:{background:"rgba(0,0,0,0.6)"},children:s.jsxs("div",{className:"w-full max-w-lg rounded-xl p-6 animate-modal-in",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"text-[15px] font-semibold mb-4",style:{color:"var(--text-primary)"},children:"New Test Case"}),s.jsxs("label",{className:"block mb-3",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Name"}),s.jsx("input",{value:u,onChange:O=>d(O.target.value),className:"input-field",placeholder:"e.g., auth-check",autoFocus:!0})]}),s.jsxs("label",{className:"block mb-3",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Prompt"}),s.jsx("textarea",{value:m,onChange:O=>x(O.target.value),className:"input-field",rows:3,placeholder:"User prompt to test..."})]}),s.jsxs("label",{className:"block mb-3",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Expected Output"}),s.jsx("textarea",{value:g,onChange:O=>y(O.target.value),className:"input-field",rows:2,placeholder:"Description of expected behavior..."})]}),s.jsxs("div",{className:"mb-4",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Assertions"}),h.map((O,L)=>s.jsxs("div",{className:"flex gap-2 mb-2",children:[s.jsx("input",{value:O.text,onChange:z=>S(h.map((w,M)=>M===L?{...w,text:z.target.value}:w)),className:"input-field flex-1 text-[12px]",placeholder:"e.g., Output includes a greeting"}),h.length>1&&s.jsx("button",{onClick:()=>S(h.filter((z,w)=>w!==L)),className:"btn btn-ghost p-1",style:{color:"var(--text-tertiary)"},children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},O.id)),s.jsx("button",{onClick:()=>S([...h,{id:`assert-${Date.now()}`,text:"",type:"boolean"}]),className:"text-[11px] mt-1 transition-colors duration-150",style:{color:"var(--accent)"},children:"+ Add Assertion"})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{onClick:f,className:"btn btn-secondary text-[12px]",children:"Cancel"}),s.jsx("button",{onClick:C,disabled:!u.trim()||!m.trim(),className:"btn btn-primary text-[12px]",children:"Save"})]})]})})}function Xy(){const{state:r,runBenchmark:c,cancelRun:f}=la(),{evals:u,isRunning:d,runMode:m,runScope:x,latestBenchmark:g,inlineResults:y,selectedCaseId:h}=r,[S,v]=b.useState("all"),C=(u==null?void 0:u.evals)??[],O=h!=null,L=w=>{c(w,S==="selected"&&O?{caseId:h}:"all")},z=C.filter(w=>{const M=y.get(w.id);return M&&M.status!=null}).length;return s.jsxs("div",{className:"p-5",children:[s.jsxs("div",{className:"rounded-xl p-4 mb-5",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Benchmark"}),s.jsx("div",{className:"flex items-center gap-1",children:["all","selected"].map(w=>s.jsx("button",{onClick:()=>v(w),disabled:w==="selected"&&!O,className:"px-3 py-1.5 rounded-md text-[11px] font-medium transition-all duration-150",style:{background:S===w?"var(--accent-muted)":"transparent",color:S===w?"var(--accent)":"var(--text-tertiary)",opacity:w==="selected"&&!O?.4:1},children:w==="all"?"All Cases":"Selected Case"},w))})]}),s.jsx("div",{className:"flex items-center gap-2",children:d?s.jsxs("button",{onClick:f,className:"btn text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:4},children:s.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1"})}),"Cancel"]}):s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>L("benchmark"),disabled:C.length===0,className:"btn btn-primary text-[12px]",children:"Run Benchmark"}),s.jsx("button",{onClick:()=>L("baseline"),disabled:C.length===0,className:"btn btn-secondary text-[12px]",children:"Run Baseline"}),s.jsx("button",{onClick:()=>L("comparison"),disabled:C.length===0,className:"btn btn-purple text-[12px]",children:"A/B Compare"})]})})]}),d&&C.length>0&&s.jsxs("div",{className:"mb-5",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("span",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:["Progress: ",z,"/",C.length," cases"]}),s.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[Math.round(z/C.length*100),"%"]})]}),s.jsx("div",{className:"rounded-full overflow-hidden",style:{height:6,background:"var(--surface-3)"},children:s.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${z/C.length*100}%`,background:"var(--accent)"}})})]}),s.jsx("div",{className:"space-y-3 stagger-children",children:C.map(w=>{const M=y.get(w.id);return s.jsx(Qy,{name:w.name,evalId:w.id,result:M,isRunning:d,onRun:V=>c("benchmark",{caseId:V}),onCompare:V=>c("comparison",{caseId:V})},w.id)})}),!d&&g&&g.cases.length>0&&s.jsxs("div",{className:"mt-5",children:[s.jsxs("div",{className:"rounded-xl p-4 mb-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Overall Pass Rate"}),s.jsx("span",{className:"text-[20px] font-bold",style:{color:(g.overall_pass_rate??0)>=.8?"var(--green)":(g.overall_pass_rate??0)>=.5?"var(--yellow)":"var(--red)"},children:g.overall_pass_rate!=null?`${Math.round(g.overall_pass_rate*100)}%`:"--"})]}),g.totalDurationMs!=null&&s.jsxs("div",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:["Total: ",(g.totalDurationMs/1e3).toFixed(1),"s",g.model&&` | Model: ${g.model}`]})]}),g.comparison&&s.jsxs("div",{className:"rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"Skill vs Baseline"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx(Dm,{label:"Skill",value:g.comparison.skillPassRate,color:"var(--accent)"}),s.jsx(Dm,{label:"Baseline",value:g.comparison.baselinePassRate,color:"var(--text-tertiary)"})]}),s.jsxs("div",{className:"mt-3 text-[12px] font-medium",style:{color:g.comparison.delta>0?"var(--green)":g.comparison.delta<0?"var(--red)":"var(--text-tertiary)"},children:["Delta: ",g.comparison.delta>0?"+":"",(g.comparison.delta*100).toFixed(1),"%",g.verdict&&` | ${g.verdict}`]})]})]})]})}function Qy({name:r,evalId:c,result:f,isRunning:u,onRun:d,onCompare:m}){const[x,g]=b.useState(!1),y=f&&f.status!=null,h=u&&!y;return s.jsxs("div",{className:"rounded-xl overflow-hidden transition-all duration-200",style:{background:"var(--surface-1)",border:h?"1px solid var(--accent)":"1px solid var(--border-subtle)",boxShadow:h?"0 0 12px rgba(99, 131, 255, 0.15)":"none"},children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[h&&s.jsx("span",{className:"spinner",style:{width:14,height:14,borderWidth:1.5}}),s.jsxs("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:["#",c," ",r]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[!u&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>d(c),className:"btn btn-primary text-[10px] px-2 py-1",children:"Run"}),s.jsx("button",{onClick:()=>m(c),className:"btn btn-purple text-[10px] px-2 py-1",children:"A/B"})]}),y&&s.jsx("span",{className:"pill text-[10px]",style:{background:f.status==="pass"?"var(--green-muted)":"var(--red-muted)",color:f.status==="pass"?"var(--green)":"var(--red)"},children:f.passRate!=null?`${Math.round(f.passRate*100)}%`:f.status}),!y&&!h&&u&&s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"queued"})]})]}),f&&f.assertions.length>0&&s.jsxs("div",{className:"px-4 pb-3",children:[s.jsx("div",{className:"space-y-1",children:f.assertions.map(S=>s.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[s.jsx("span",{style:{color:S.pass?"var(--green)":"var(--red)"},children:S.pass?"PASS":"FAIL"}),s.jsx("span",{style:{color:"var(--text-secondary)"},children:S.text})]},S.assertion_id))}),f.output&&s.jsx("button",{onClick:()=>g(!x),className:"text-[11px] mt-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:x?"Hide output":"Show output"}),x&&f.output&&s.jsx("pre",{className:"text-[11px] mt-2 p-3 rounded-lg overflow-auto",style:{background:"var(--surface-0)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",maxHeight:200,fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap"},children:f.output})]})]})}function Dm({label:r,value:c,color:f}){return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:r}),s.jsxs("span",{className:"text-[12px] font-semibold",style:{color:f},children:[Math.round(c*100),"%"]})]}),s.jsx("div",{className:"rounded-full overflow-hidden",style:{height:6,background:"var(--surface-3)"},children:s.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${c*100}%`,background:f}})})]})}const Ku={benchmark:"#6383ff",comparison:"#a78bfa",baseline:"#fb923c"},Om={benchmark:"Benchmark",comparison:"Comparison",baseline:"Baseline"},tc=600,lc=180,at=40,$u=tc-at*2,Dl=lc-at*2,Vy=[25,50,75,100];function Lm(r){return new Date(r).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Zy({entries:r}){const[c,f]=b.useState(null);if(r.length<2)return null;const u=r.length,d=r.map((g,y)=>{const h=at+y/(u-1)*$u,S=g.passRate*100,v=at+Dl-S/100*Dl;return{x:h,y:v,pct:S,entry:g}}),m=d.map(g=>`${g.x},${g.y}`).join(" "),x=Array.from(new Set(r.map(g=>g.type)));return s.jsxs("div",{className:"glass-card p-5 animate-fade-in",style:{position:"relative"},children:[s.jsx("div",{className:"text-[13px] font-semibold mb-2",style:{color:"var(--text-primary)"},children:"Pass Rate Trend"}),s.jsx("div",{className:"flex items-center gap-5 mb-3",children:x.map(g=>s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-3 h-3 rounded-full",style:{background:Ku[g]??"var(--text-tertiary)"}}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:Om[g]??g})]},g))}),s.jsxs("svg",{width:tc,height:lc,viewBox:`0 0 ${tc} ${lc}`,style:{display:"block",overflow:"visible"},children:[Vy.map(g=>{const y=at+Dl-g/100*Dl;return s.jsxs("g",{children:[s.jsx("line",{x1:at,y1:y,x2:at+$u,y2:y,stroke:"var(--border-subtle)",strokeWidth:.5,strokeDasharray:"4 4"}),s.jsxs("text",{x:at-8,y:y+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:[g,"%"]})]},g)}),s.jsx("line",{x1:at,y1:at+Dl,x2:at+$u,y2:at+Dl,stroke:"var(--border-subtle)",strokeWidth:1}),s.jsx("text",{x:at-8,y:at+Dl+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:"0%"}),s.jsx("polyline",{points:m,fill:"none",stroke:"var(--border-subtle)",strokeWidth:1.5,strokeLinejoin:"round"}),d.map((g,y)=>s.jsx("circle",{cx:g.x,cy:g.y,r:5,fill:Ku[g.entry.type]??"var(--text-tertiary)",stroke:"var(--surface-2)",strokeWidth:2,style:{cursor:"pointer",transition:"r 0.15s ease"},onMouseEnter:h=>{h.currentTarget.setAttribute("r","7"),f({x:g.x,y:g.y,entry:g.entry})},onMouseLeave:h=>{h.currentTarget.setAttribute("r","5"),f(null)}},y)),Ky(u).map(g=>s.jsx("text",{x:d[g].x,y:at+Dl+16,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:10},children:Lm(r[g].timestamp)},g))]}),c&&s.jsxs("div",{style:{position:"absolute",left:c.x,top:c.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:[s.jsx("div",{className:"text-[11px] font-medium",style:{color:"var(--text-primary)"},children:Lm(c.entry.timestamp)}),s.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-tertiary)"},children:c.entry.model}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("span",{className:"text-[9px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:Ku[c.entry.type]??"var(--text-tertiary)",color:"#fff"},children:Om[c.entry.type]??c.entry.type}),s.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--text-primary)"},children:[Math.round(c.entry.passRate*100),"%"]})]})]})]})}function Ky(r){return r<=3?Array.from({length:r},(c,f)=>f):r<=6?[0,Math.floor(r/2),r-1]:[0,Math.floor(r/3),Math.floor(2*r/3),r-1]}function hi(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function $y(r){return r>=1e3?`${(r/1e3).toFixed(1)}s`:`${Math.round(r)}ms`}function Jy({rate:r,label:c}){const f=Math.round(r*100);return s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("span",{className:"text-[11px] truncate",style:{color:"var(--text-primary)",maxWidth:"70%"},children:c}),s.jsxs("span",{className:"text-[11px] font-semibold",style:{color:hi(r)},children:[f,"%"]})]}),s.jsx("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:"var(--surface-3)"},children:s.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${f}%`,background:hi(r)}})})]})})}function Wy({points:r}){if(r.length<2)return null;const c=200,f=48,u=4,d=r.length,m=r.map((y,h)=>{const S=u+h/(d-1)*(c-u*2),v=u+(f-u*2)-y.passRate*(f-u*2);return{x:S,y:v}}),x=`M ${m[0].x},${f-u} `+m.map(y=>`L ${y.x},${y.y}`).join(" ")+` L ${m[m.length-1].x},${f-u} Z`,g=m.map((y,h)=>`${h===0?"M":"L"} ${y.x},${y.y}`).join(" ");return s.jsxs("svg",{width:c,height:f,style:{display:"block"},children:[s.jsx("path",{d:x,fill:"var(--accent-muted)"}),s.jsx("path",{d:g,fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),s.jsx("circle",{cx:m[m.length-1].x,cy:m[m.length-1].y,r:3,fill:"var(--accent)"})]})}function Fy({plugin:r,skill:c}){const f=xi(),[u,d]=b.useState(null),[m,x]=b.useState(!0);if(b.useEffect(()=>{x(!0),ge.getStats(r,c).then(d).catch(()=>d(null)).finally(()=>x(!1))},[r,c]),m)return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"skeleton h-24 rounded-xl"}),s.jsx("div",{className:"skeleton h-48 rounded-xl"}),s.jsx("div",{className:"skeleton h-36 rounded-xl"})]});if(!u||u.totalRuns===0)return s.jsxs("div",{className:"text-center py-12",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"var(--surface-2)"},children:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",children:[s.jsx("path",{d:"M18 20V10"}),s.jsx("path",{d:"M12 20V4"}),s.jsx("path",{d:"M6 20v-6"})]})}),s.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark data yet"}),s.jsx("p",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:"Run some benchmarks to see statistics"})]});const g=u.trendPoints.length>0?u.trendPoints[u.trendPoints.length-1].passRate:0,y=u.trendPoints.length>0?u.trendPoints[0].passRate:0,h=g-y,S=u.assertionStats.slice(0,10);return s.jsxs("div",{className:"space-y-4 stagger-children",children:[s.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Total Runs"}),s.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:u.totalRuns})]}),s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Latest Pass Rate"}),s.jsxs("div",{className:"text-[24px] font-bold",style:{color:hi(g)},children:[Math.round(g*100),"%"]})]}),s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Trend"}),s.jsxs("div",{className:"text-[24px] font-bold",style:{color:h>=0?"var(--green)":"var(--red)"},children:[h>=0?"+":"",Math.round(h*100),"%"]})]}),s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Models Tested"}),s.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:u.modelStats.length})]})]}),u.trendPoints.length>=2&&s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Pass Rate Over Time"}),s.jsx(Wy,{points:u.trendPoints})]}),u.modelStats.length>0&&s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Model Performance"}),s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[s.jsx("thead",{children:s.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[s.jsx("th",{style:{textAlign:"left",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Model"}),s.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Runs"}),s.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Pass Rate"}),s.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Duration"})]})}),s.jsx("tbody",{children:u.modelStats.map(v=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[s.jsx("td",{style:{padding:"8px",color:"var(--text-primary)",fontWeight:500},children:v.model}),s.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:v.runs}),s.jsx("td",{style:{padding:"8px",textAlign:"center"},children:s.jsxs("span",{className:"font-semibold",style:{color:hi(v.avgPassRate)},children:[Math.round(v.avgPassRate*100),"%"]})}),s.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:$y(v.avgDurationMs)})]},v.model))})]})]}),S.length>0&&s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Weakest Assertions"}),s.jsx("div",{className:"space-y-3",children:S.map(v=>s.jsxs("button",{className:"block w-full text-left rounded-lg p-2 -mx-2 transition-colors duration-150",style:{background:"transparent"},onMouseEnter:C=>{C.currentTarget.style.background="var(--surface-2)"},onMouseLeave:C=>{C.currentTarget.style.background="transparent"},onClick:()=>f(`/skills/${r}/${c}/history?tab=per-eval`),children:[s.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[s.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:["#",v.evalId]}),s.jsx("span",{className:"text-[10px] truncate",style:{color:"var(--text-tertiary)"},children:v.evalName}),s.jsxs("span",{className:"text-[10px] ml-auto flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[v.totalRuns," runs"]})]}),s.jsx(Jy,{rate:v.passRate,label:v.text})]},`${v.evalId}:${v.id}`))})]})]})}function Py({plugin:r,skill:c}){const[f,u]=b.useState(null),[d,m]=b.useState(null),[x,g]=b.useState({}),[y,h]=b.useState({});b.useEffect(()=>{ge.getEvals(r,c).then(u).catch(()=>u(null))},[r,c]);async function S(v){if(d===v){m(null);return}if(m(v),!x[v]){h(C=>({...C,[v]:!0}));try{const C=await ge.getCaseHistory(r,c,v);g(O=>({...O,[v]:C}))}catch{g(C=>({...C,[v]:[]}))}finally{h(C=>({...C,[v]:!1}))}}}return f?s.jsx("div",{className:"space-y-2 stagger-children",children:f.evals.map(v=>{const C=x[v.id]||[],O=d===v.id,L=y[v.id],z=C.length>0?C[0].pass_rate:null;return s.jsxs("div",{className:"glass-card overflow-hidden",children:[s.jsxs("button",{onClick:()=>S(v.id),className:"w-full text-left p-4 flex items-center gap-3 transition-colors duration-150",style:{background:O?"var(--surface-2)":"transparent"},onMouseEnter:w=>{O||(w.currentTarget.style.background="var(--surface-2)")},onMouseLeave:w=>{O||(w.currentTarget.style.background="transparent")},children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",strokeLinecap:"round",style:{transform:O?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease",flexShrink:0},children:s.jsx("polyline",{points:"9 18 15 12 9 6"})}),s.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:["#",v.id]}),s.jsx("span",{className:"text-[13px] font-medium flex-1 truncate",style:{color:"var(--text-primary)"},children:v.name}),C.length>=2&&s.jsx(rh,{entries:C}),z!=null&&s.jsxs("span",{className:"text-[12px] font-semibold flex-shrink-0",style:{color:ec(z)},children:[Math.round(z*100),"%"]}),C.length>0&&s.jsxs("span",{className:"text-[10px] flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[C.length," runs"]})]}),O&&s.jsx("div",{className:"border-t animate-fade-in",style:{borderColor:"var(--border-subtle)"},children:L?s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx("div",{className:"spinner",style:{width:14,height:14}}),s.jsx("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading history..."})]}):C.length===0?s.jsx("div",{className:"p-4",children:s.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"No history for this eval case"})}):s.jsx("div",{className:"divide-y",style:{borderColor:"var(--border-subtle)"},children:C.map((w,M)=>s.jsxs("div",{className:"p-4",style:{background:M===0?"var(--surface-2)":"transparent"},children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:sh(w.timestamp)}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:w.model}),s.jsx("span",{className:"pill",style:{fontSize:9,padding:"1px 6px",background:w.type==="benchmark"?"rgba(99,131,255,0.15)":w.type==="comparison"?"var(--purple-muted)":"rgba(251,146,60,0.15)",color:w.type==="benchmark"?"#6383ff":w.type==="comparison"?"var(--purple)":"#fb923c"},children:w.type}),s.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:ec(w.pass_rate)},children:[Math.round(w.pass_rate*100),"%"]})]}),s.jsxs("div",{className:"flex items-center gap-4 mb-2 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[w.durationMs!=null&&s.jsx("span",{children:ih(w.durationMs)}),w.tokens!=null&&s.jsxs("span",{children:[w.tokens>=1e3?`${(w.tokens/1e3).toFixed(1)}k`:w.tokens," tok"]})]}),s.jsx("div",{className:"space-y-1",children:w.assertions.map(V=>s.jsxs("div",{className:"flex items-start gap-2 py-0.5",children:[s.jsx("div",{className:"w-3.5 h-3.5 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:V.pass?"var(--green)":"var(--red)"},children:s.jsx("svg",{width:"7",height:"7",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",children:V.pass?s.jsx("polyline",{points:"20 6 9 17 4 12"}):s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-[11px]",style:{color:"var(--text-primary)"},children:V.text}),V.reasoning&&s.jsx("div",{className:"text-[10px] mt-0.5",style:{color:"var(--text-tertiary)"},children:V.reasoning})]})]},V.id))})]},M))})})]},v.id)})}):s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No eval cases found"})})}function Iy(){const{state:r,dispatch:c}=la(),{plugin:f,skill:u}=r,[d,m]=b.useState("timeline"),[x,g]=b.useState([]),[y,h]=b.useState(!0),[S,v]=b.useState(""),[C,O]=b.useState(""),[L,z]=b.useState(!1),[w,M]=b.useState([]),[V,Y]=b.useState(null),[X,Q]=b.useState(!1),[F,$]=b.useState(null),[G,ae]=b.useState(!1);b.useEffect(()=>{h(!0),ge.getHistory(f,u,{model:S||void 0,type:C||void 0}).then(te=>{g(te),te.length>=2&&ge.compareRuns(f,u,te[0].timestamp,te[1].timestamp).then(ye=>{const Ne=ye.regressions.filter(D=>D.change==="regression");c({type:"SET_REGRESSIONS",regressions:Ne})}).catch(()=>{})}).catch(()=>{}).finally(()=>h(!1))},[f,u,S,C]);const ee=b.useCallback(async te=>{if(L){M(ye=>ye.includes(te)?ye.filter(Ne=>Ne!==te):ye.length>=2?[ye[1],te]:[...ye,te]);return}ae(!0);try{const ye=await ge.getHistoryEntry(f,u,te);$(ye)}catch{}finally{ae(!1)}},[f,u,L]),J=b.useCallback(async()=>{if(w.length===2){Q(!0);try{const te=await ge.compareRuns(f,u,w[0],w[1]);Y(te)}catch{}finally{Q(!1)}}},[f,u,w]),fe=[...new Set(x.map(te=>te.model))];return y?s.jsxs("div",{className:"p-5",children:[s.jsx("div",{className:"skeleton h-5 w-32 mb-4"}),s.jsx("div",{className:"skeleton h-48 rounded-xl mb-4"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"skeleton h-12 rounded-lg"}),s.jsx("div",{className:"skeleton h-12 rounded-lg"})]})]}):s.jsxs("div",{className:"p-5",children:[s.jsx("div",{className:"flex items-center gap-1 mb-4",children:["timeline","per-eval","statistics"].map(te=>s.jsx("button",{onClick:()=>m(te),className:"px-4 py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:d===te?"var(--accent-muted)":"transparent",color:d===te?"var(--accent)":"var(--text-tertiary)"},children:te==="timeline"?"Timeline":te==="per-eval"?"Per Eval":"Statistics"},te))}),d==="timeline"&&s.jsxs("div",{children:[x.length>0&&s.jsx("div",{className:"mb-5 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:s.jsx(Zy,{entries:x})}),s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsxs("select",{value:S,onChange:te=>v(te.target.value),className:"input-field text-[12px]",style:{width:150},children:[s.jsx("option",{value:"",children:"All Models"}),fe.map(te=>s.jsx("option",{value:te,children:te},te))]}),s.jsxs("select",{value:C,onChange:te=>O(te.target.value),className:"input-field text-[12px]",style:{width:150},children:[s.jsx("option",{value:"",children:"All Types"}),s.jsx("option",{value:"benchmark",children:"Benchmark"}),s.jsx("option",{value:"comparison",children:"Comparison"}),s.jsx("option",{value:"baseline",children:"Baseline"})]}),s.jsx("div",{className:"flex-1"}),s.jsx("button",{onClick:()=>{z(!L),M([]),Y(null)},className:`btn text-[12px] ${L?"btn-primary":"btn-secondary"}`,children:L?"Exit Compare":"Compare Runs"}),L&&w.length===2&&s.jsx("button",{onClick:J,disabled:X,className:"btn btn-primary text-[12px]",children:X?"Comparing...":"Compare"})]}),s.jsx("div",{className:"space-y-2",children:x.length===0?s.jsx("div",{className:"text-center py-8 text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark runs yet"}):x.map(te=>{const ye=w.includes(te.timestamp);return s.jsx("button",{onClick:()=>ee(te.timestamp),className:"w-full text-left rounded-lg px-4 py-3 transition-all duration-150",style:{background:ye?"var(--accent-muted)":"var(--surface-1)",border:ye?"1px solid var(--accent)":"1px solid var(--border-subtle)"},onMouseEnter:Ne=>{ye||(Ne.currentTarget.style.borderColor="var(--border-hover)")},onMouseLeave:Ne=>{ye||(Ne.currentTarget.style.borderColor="var(--border-subtle)")},children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[L&&s.jsx("span",{className:"w-4 h-4 rounded border flex items-center justify-center",style:{borderColor:ye?"var(--accent)":"var(--border-default)",background:ye?"var(--accent)":"transparent"},children:ye&&s.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})})}),s.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:new Date(te.timestamp).toLocaleString()}),s.jsx("span",{className:"pill text-[9px]",style:{background:te.type==="comparison"?"var(--purple-muted)":te.type==="baseline"?"var(--surface-3)":"var(--accent-muted)",color:te.type==="comparison"?"var(--purple)":te.type==="baseline"?"var(--text-tertiary)":"var(--accent)"},children:te.type})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:te.model}),s.jsxs("span",{className:"text-[12px] font-semibold",style:{color:te.passRate>=.8?"var(--green)":te.passRate>=.5?"var(--yellow)":"var(--red)"},children:[Math.round(te.passRate*100),"%"]})]})]})},te.timestamp)})}),V&&s.jsx(e1,{result:V}),F&&!L&&s.jsx(t1,{run:F,onClose:()=>$(null)})]}),d==="per-eval"&&s.jsx(Py,{plugin:f,skill:u}),d==="statistics"&&s.jsx(Fy,{plugin:f,skill:u})]})}function e1({result:r}){const c=r.regressions.filter(u=>u.change==="regression"),f=r.regressions.filter(u=>u.change==="improvement");return s.jsxs("div",{className:"mt-4 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:["Comparison: ",new Date(r.runA.timestamp).toLocaleDateString()," vs ",new Date(r.runB.timestamp).toLocaleDateString()]}),c.length>0&&s.jsxs("div",{className:"mb-3",children:[s.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--red)"},children:["Regressions (",c.length,")"]}),c.map(u=>s.jsxs("div",{className:"text-[12px] py-1",style:{color:"var(--text-secondary)"},children:["#",u.evalId," ",u.evalName,": ",s.jsx("span",{style:{color:"var(--red)"},children:u.assertionId})," (was passing, now failing)"]},`${u.evalId}-${u.assertionId}`))]}),f.length>0&&s.jsxs("div",{className:"mb-3",children:[s.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--green)"},children:["Improvements (",f.length,")"]}),f.map(u=>s.jsxs("div",{className:"text-[12px] py-1",style:{color:"var(--text-secondary)"},children:["#",u.evalId," ",u.evalName,": ",s.jsx("span",{style:{color:"var(--green)"},children:u.assertionId})," (was failing, now passing)"]},`${u.evalId}-${u.assertionId}`))]}),s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-2 mt-3",style:{color:"var(--text-tertiary)"},children:"Case Diffs"}),s.jsx("div",{className:"rounded-lg overflow-hidden",style:{border:"1px solid var(--border-subtle)"},children:s.jsxs("table",{className:"w-full text-[12px]",children:[s.jsx("thead",{children:s.jsxs("tr",{style:{background:"var(--surface-2)"},children:[s.jsx("th",{className:"text-left px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Case"}),s.jsx("th",{className:"text-right px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Run A"}),s.jsx("th",{className:"text-right px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Run B"})]})}),s.jsx("tbody",{children:r.caseDiffs.map(u=>s.jsxs("tr",{style:{borderTop:"1px solid var(--border-subtle)"},children:[s.jsxs("td",{className:"px-3 py-2",style:{color:"var(--text-secondary)"},children:["#",u.eval_id," ",u.eval_name]}),s.jsx("td",{className:"text-right px-3 py-2",style:{color:u.passRateA!=null?u.passRateA>=.8?"var(--green)":u.passRateA>=.5?"var(--yellow)":"var(--red)":"var(--text-tertiary)"},children:u.passRateA!=null?`${Math.round(u.passRateA*100)}%`:u.statusA}),s.jsx("td",{className:"text-right px-3 py-2",style:{color:u.passRateB!=null?u.passRateB>=.8?"var(--green)":u.passRateB>=.5?"var(--yellow)":"var(--red)":"var(--text-tertiary)"},children:u.passRateB!=null?`${Math.round(u.passRateB*100)}%`:u.statusB})]},u.eval_id))})]})})]})}function t1({run:r,onClose:c}){return s.jsxs("div",{className:"mt-4 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:["Run: ",new Date(r.timestamp).toLocaleString()]}),s.jsx("button",{onClick:c,className:"btn btn-ghost text-[11px]",children:"Close"})]}),s.jsxs("div",{className:"text-[11px] mb-3",style:{color:"var(--text-tertiary)"},children:["Model: ",r.model," | Cases: ",r.cases.length," | Pass Rate: ",r.overall_pass_rate!=null?`${Math.round(r.overall_pass_rate*100)}%`:"--"]}),s.jsx("div",{className:"space-y-2",children:r.cases.map(f=>s.jsx("div",{className:"rounded-lg px-3 py-2",style:{background:"var(--surface-2)"},children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-secondary)"},children:["#",f.eval_id," ",f.eval_name]}),s.jsx("span",{className:"text-[11px] font-semibold",style:{color:f.status==="pass"?"var(--green)":"var(--red)"},children:f.pass_rate!=null?`${Math.round(f.pass_rate*100)}%`:f.status})]})},f.eval_id))})]})}function l1({plugin:r,skill:c}){const[f,u]=b.useState([]),[d,m]=b.useState([]),[x,g]=b.useState(!0),[y,h]=b.useState(null);b.useEffect(()=>{ge.getDependencies(r,c).then(v=>{u(v.mcpDependencies),m(v.skillDependencies)}).catch(()=>{}).finally(()=>g(!1))},[r,c]);async function S(v,C){try{await navigator.clipboard.writeText(C),h(v),setTimeout(()=>h(null),2e3)}catch{}}return x?null:f.length===0&&d.length===0?s.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"}):s.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[s.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:[s.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(234,179,8,0.15)"},children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#eab308",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.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"}),s.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"})]})}),s.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Dependencies"}),s.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:f.length+d.length})]}),s.jsxs("div",{className:"px-5 py-4",children:[f.length>0&&s.jsxs("div",{className:"space-y-3 mb-4",children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"MCP Servers"}),f.map(v=>s.jsxs("div",{className:"p-3 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:v.server}),s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:v.transport})]}),s.jsx("button",{onClick:()=>S(v.server,v.configSnippet),className:"btn btn-ghost text-[11px] py-1 px-2",style:{color:y===v.server?"var(--green)":"var(--accent)"},children:y===v.server?s.jsxs(s.Fragment,{children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})})," Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),s.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"]})})]}),s.jsx("div",{className:"text-[11px] mb-2 font-mono",style:{color:"var(--text-tertiary)"},children:v.url}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:v.matchedTools.map(C=>s.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--surface-3)",color:"var(--text-secondary)"},children:C},C))})]},v.server))]}),d.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-2",style:{color:"var(--text-tertiary)"},children:"Skill Dependencies"}),s.jsx("div",{className:"space-y-1.5",children:d.map(v=>s.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:[s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.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"})}),s.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:v.name}),s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:v.source==="frontmatter"?"frontmatter":"referenced"})]},v.name))})]})]})]})}function a1(){const{state:r}=la(),{plugin:c,skill:f}=r,[u,d]=b.useState(null),[m,x]=b.useState(!0);return b.useEffect(()=>{ge.getDependencies(c,f).then(d).catch(()=>{}).finally(()=>x(!1))},[c,f]),m?s.jsxs("div",{className:"p-5",children:[s.jsx("div",{className:"skeleton h-5 w-32 mb-4"}),s.jsx("div",{className:"skeleton h-32 rounded-xl"})]}):u?s.jsx("div",{className:"p-5 max-w-3xl",children:s.jsx(l1,{plugin:c,skill:f})}):s.jsx("div",{className:"flex items-center justify-center h-full text-[13px]",style:{color:"var(--text-tertiary)"},children:"No dependency information available"})}function n1(){const{state:r,dispatch:c,saveContent:f}=la(),u=b.useCallback(d=>{const m=d.ctrlKey||d.metaKey;if(m&&d.key>="1"&&d.key<="5"){d.preventDefault(),c({type:"SET_PANEL",panel:["editor","tests","run","history","deps"][parseInt(d.key)-1]});return}if(m&&d.key==="s"&&!d.shiftKey){d.preventDefault(),r.isDirty&&f();return}},[r.isDirty,f,c]);return b.useEffect(()=>(window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)),[u]),r.loading?s.jsx("div",{className:"flex items-center justify-center h-screen",style:{background:"var(--surface-0)"},children:s.jsxs("div",{className:"flex flex-col items-center gap-3",children:[s.jsx("div",{className:"spinner spinner-lg"}),s.jsx("span",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"Loading workspace..."})]})}):s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"48px 1fr",gridTemplateRows:"auto 1fr",height:"100%",overflow:"hidden"},children:[s.jsx("div",{style:{gridColumn:"1 / -1"},children:s.jsx(Ry,{state:r})}),s.jsx("div",{style:{gridRow:2},children:s.jsx(ky,{activePanel:r.activePanel,onPanelChange:d=>c({type:"SET_PANEL",panel:d}),isDirty:r.isDirty,isRunning:r.isRunning,hasRegressions:r.regressions.length>0})}),s.jsx("div",{style:{gridRow:2,overflow:"auto",background:"var(--surface-0)"},children:s.jsxs("div",{className:"animate-fade-in",children:[r.activePanel==="editor"&&s.jsx(Ly,{}),r.activePanel==="tests"&&s.jsx(Uy,{}),r.activePanel==="run"&&s.jsx(Xy,{}),r.activePanel==="history"&&s.jsx(Iy,{}),r.activePanel==="deps"&&s.jsx(a1,{})]},r.activePanel)})]})}function s1(){const{plugin:r,skill:c}=Tv();return!r||!c?s.jsx("div",{className:"px-10 py-8",children:s.jsx("p",{style:{color:"var(--red)"},children:"Missing plugin or skill parameter."})}):s.jsx(Cy,{plugin:r,skill:c,children:s.jsx(n1,{})})}const Um={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"}},i1=[{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 r1(){const[r,c]=b.useState([]),[f,u]=b.useState(null),[d,m]=b.useState(null),[x,g]=b.useState(null),[y,h]=b.useState(""),[S,v]=b.useState(!1),[C,O]=b.useState("preview"),{events:L,running:z,error:w,start:M}=ah();b.useEffect(()=>{ge.getSkills().then(c).catch(()=>{})},[]),b.useEffect(()=>{if(!f){m(null),g(null);return}fetch(`/api/skills/${f.plugin}/${f.skill}/description`).then(G=>G.json()).then(G=>{m(G.description),g(G.rawContent||null)}).catch(()=>{m(null),g(null)})},[f]);function V(){if(!f)return;const ae=y.trim().split(`
|
|
67
|
+
`).filter(Boolean).map(ee=>{const J=ee.startsWith("!");return{prompt:J?ee.slice(1).trim():ee.trim(),expected:J?"should_not_activate":"should_activate"}});M(`/api/skills/${f.plugin}/${f.skill}/activation-test`,{prompts:ae})}function Y(G){const ae=y.trim(),ee=ae?`${ae}
|
|
68
|
+
${G.join(`
|
|
69
|
+
`)}`:G.join(`
|
|
70
|
+
`);h(ee)}const X=[];let Q=null;for(const G of L)G.event==="prompt_result"&&X.push(G.data),G.event==="done"&&(Q=G.data);const F=X.filter(G=>G.classification==="TP"||G.classification==="TN"),$=X.filter(G=>G.classification==="FP"||G.classification==="FN");return s.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"text-[22px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Description Activation Test"}),s.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 ",s.jsx("strong",{children:"auto-activation quality"})," of your skill description."]})]}),s.jsxs("div",{className:"grid grid-cols-5 gap-5 mb-6",children:[s.jsxs("div",{className:"col-span-3 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-[12px] font-medium mb-1.5 block",style:{color:"var(--text-secondary)"},children:"Skill"}),s.jsxs("select",{className:"input-field",value:f?`${f.plugin}/${f.skill}`:"",onChange:G=>{const[ae,ee]=G.target.value.split("/");u(ae&&ee?{plugin:ae,skill:ee}:null)},children:[s.jsx("option",{value:"",children:"Select a skill..."}),r.map(G=>s.jsxs("option",{value:`${G.plugin}/${G.skill}`,children:[G.plugin," / ",G.skill]},`${G.plugin}/${G.skill}`))]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsx("label",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:"Test Prompts"}),s.jsx("div",{className:"flex gap-1.5",children:i1.map(G=>s.jsxs("button",{onClick:()=>Y(G.prompts),className:"text-[10px] px-2 py-1 rounded-md transition-colors duration-150",style:{background:"var(--surface-2)",color:"var(--text-tertiary)"},onMouseEnter:ae=>{ae.currentTarget.style.color="var(--text-primary)",ae.currentTarget.style.background="var(--surface-3)"},onMouseLeave:ae=>{ae.currentTarget.style.color="var(--text-tertiary)",ae.currentTarget.style.background="var(--surface-2)"},children:["+ ",G.label]},G.label))})]}),s.jsx("textarea",{className:"input-field h-32 resize-y font-mono text-[12px]",value:y,onChange:G=>h(G.target.value),placeholder:`How do I write a unit test?
|
|
71
|
+
What edge cases should I test?
|
|
72
|
+
!What's the weather like today?
|
|
73
|
+
!Write me a poem about flowers`}),s.jsxs("div",{className:"flex items-center gap-4 mt-1.5 text-[11px]",style:{color:"var(--text-tertiary)"},children:[s.jsx("span",{children:"One prompt per line"}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("code",{className:"px-1 rounded",style:{background:"var(--surface-2)"},children:"!"})," prefix = should NOT activate"]}),s.jsxs("span",{children:[y.trim().split(`
|
|
74
|
+
`).filter(Boolean).length," prompt",y.trim().split(`
|
|
75
|
+
`).filter(Boolean).length!==1?"s":""]})]})]})]}),s.jsx("div",{className:"col-span-2",children:s.jsxs("div",{className:"glass-card h-full flex flex-col",children:[s.jsxs("button",{onClick:()=>v(!S),className:"w-full p-3 flex items-center justify-between text-left flex-shrink-0",style:{borderBottom:S?"1px solid var(--border-subtle)":void 0},children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Skill Description"}),s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:S?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:s.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),S&&s.jsxs("div",{className:"flex-1 flex flex-col min-h-0 animate-fade-in",children:[x&&s.jsx("div",{className:"flex gap-0 border-b flex-shrink-0",style:{borderColor:"var(--border-subtle)"},children:["preview","raw"].map(G=>s.jsx("button",{onClick:()=>O(G),className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider transition-colors duration-150",style:{color:C===G?"var(--text-primary)":"var(--text-tertiary)",borderBottom:C===G?"2px solid var(--accent)":"2px solid transparent"},children:G==="raw"?"Raw MD":"Preview"},G))}),s.jsx("div",{className:"p-3 flex-1 overflow-auto",style:{maxHeight:320},children:f?!d&&!x?s.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading description..."}):C==="raw"&&x?s.jsx("pre",{className:"text-[11px] leading-relaxed whitespace-pre-wrap break-words font-mono",style:{color:"var(--text-secondary)",margin:0},children:x}):s.jsx("div",{className:"text-[12px] leading-relaxed skill-md-preview",style:{color:"var(--text-secondary)"},dangerouslySetInnerHTML:{__html:u1(x||d||"")}}):s.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Select a skill to see its description"})})]}),!S&&d&&s.jsx("div",{className:"px-3 pb-3 pt-1",children:s.jsxs("div",{className:"text-[11px] truncate",style:{color:"var(--text-tertiary)"},children:[d.slice(0,100),d.length>100?"...":""]})})]})})]}),s.jsx("button",{onClick:V,disabled:z||!f||!y.trim(),className:"btn btn-primary mb-7",children:z?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)",width:14,height:14}})," Testing..."]}):s.jsxs(s.Fragment,{children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("circle",{cx:"12",cy:"12",r:"6"}),s.jsx("circle",{cx:"12",cy:"12",r:"2"})]})," Run Activation Test"]})}),w&&s.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:w}),X.length>0&&s.jsxs("div",{className:"space-y-5 mb-6",children:[$.length>0&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),s.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),s.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--red)"},children:["Incorrect (",$.length,")"]}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"— These need attention"})]}),s.jsx("div",{className:"space-y-1.5 stagger-children",children:$.map((G,ae)=>s.jsx(Bm,{result:G},`incorrect-${ae}`))})]}),F.length>0&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("polyline",{points:"16 10 11 15 8 12"})]}),s.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--green)"},children:["Correct (",F.length,")"]})]}),s.jsx("div",{className:"space-y-1.5 stagger-children",children:F.map((G,ae)=>s.jsx(Bm,{result:G},`correct-${ae}`))})]})]}),Q&&s.jsxs("div",{className:"glass-card p-6 animate-fade-in-scale",style:{borderColor:"var(--border-active)",borderWidth:2},children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-4",style:{color:"var(--text-tertiary)"},children:"Summary"}),s.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-5",children:[s.jsx(Ju,{label:"Precision",value:Q.precision,description:"Of all activations, how many were correct?",detail:`${Q.tp} true / ${Q.tp+Q.fp} total activations`}),s.jsx(Ju,{label:"Recall",value:Q.recall,description:"Of expected activations, how many fired?",detail:`${Q.tp} activated / ${Q.tp+Q.fn} expected`}),s.jsx(Ju,{label:"Reliability",value:Q.reliability,description:"Overall correct classification rate",detail:`${Q.tp+Q.tn} correct / ${Q.total} total`})]}),s.jsxs("div",{className:"pt-4",style:{borderTop:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-3 text-center",style:{color:"var(--text-tertiary)"},children:"Confusion Matrix"}),s.jsxs("div",{className:"grid grid-cols-2 gap-2 max-w-xs mx-auto",children:[s.jsx(ci,{label:"True Positive",abbr:"TP",count:Q.tp,bg:"var(--green-muted)",color:"var(--green)",description:"Correctly activated"}),s.jsx(ci,{label:"False Positive",abbr:"FP",count:Q.fp,bg:"var(--red-muted)",color:"var(--red)",description:"Wrongly activated"}),s.jsx(ci,{label:"False Negative",abbr:"FN",count:Q.fn,bg:"rgba(248,113,113,0.06)",color:"rgba(248,113,113,0.6)",description:"Missed activation"}),s.jsx(ci,{label:"True Negative",abbr:"TN",count:Q.tn,bg:"rgba(52,211,153,0.06)",color:"rgba(52,211,153,0.6)",description:"Correctly silent"})]})]})]}),z&&X.length===0&&s.jsxs("div",{className:"text-center py-16 animate-fade-in",children:[s.jsx("div",{className:"spinner-lg mx-auto mb-4"}),s.jsx("p",{className:"text-[14px]",style:{color:"var(--text-secondary)"},children:"Testing activation against skill description..."})]})]})}function Bm({result:r}){const c=Um[r.classification]||Um.FN,f=r.classification==="TP"||r.classification==="TN";return s.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl transition-all duration-200",style:{background:c.bg,border:"1px solid transparent"},children:[s.jsx("div",{className:"flex-shrink-0 mt-0.5",children:s.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:`color-mix(in srgb, ${c.text} 20%, transparent)`},children:f?s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:c.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})}):s.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:c.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:r.prompt})}),s.jsxs("div",{className:"flex items-center gap-3 text-[12px]",children:[s.jsx("span",{className:"pill",style:{background:"rgba(0,0,0,0.1)",color:c.text,fontWeight:700,fontSize:"10px",padding:"1px 6px"},children:r.classification}),s.jsx("span",{style:{color:r.activate?"var(--green)":"var(--text-tertiary)"},children:r.activate?"Activated":"Silent"}),s.jsx("span",{style:{color:"var(--text-tertiary)"},children:"·"}),s.jsxs("span",{style:{color:"var(--text-tertiary)"},children:["Expected: ",r.expected==="should_activate"?"activate":"stay silent"]}),s.jsx("span",{style:{color:"var(--text-tertiary)"},children:"·"}),s.jsxs("span",{style:{color:"var(--text-tertiary)"},children:[r.confidence," confidence"]})]}),r.reasoning&&s.jsx("div",{className:"text-[11px] mt-1.5",style:{color:"var(--text-tertiary)"},children:r.reasoning})]})]})}function Ju({label:r,value:c,description:f,detail:u}){const d=Math.round(c*100),m=d>=80?"var(--green)":d>=60?"var(--yellow)":"var(--red)";return s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"text-[28px] font-bold tracking-tight",style:{color:m},children:[d,"%"]}),s.jsx("div",{className:"text-[12px] font-medium mt-0.5",style:{color:"var(--text-secondary)"},children:r}),s.jsx("div",{className:"text-[10px] mt-1",style:{color:"var(--text-tertiary)"},children:f}),s.jsx("div",{className:"text-[10px] mt-0.5 font-mono",style:{color:"var(--text-tertiary)"},children:u})]})}function ci({label:r,abbr:c,count:f,bg:u,color:d,description:m}){return s.jsxs("div",{className:"text-center p-3 rounded-lg",style:{background:u},children:[s.jsx("div",{className:"text-[20px] font-bold",style:{color:d},children:f}),s.jsx("div",{className:"text-[11px] font-semibold",style:{color:d},children:c}),s.jsx("div",{className:"text-[9px] mt-0.5",style:{color:"var(--text-tertiary)"},children:m})]})}function u1(r){const f=r.replace(/^---[\s\S]*?---\n?/,"").split(`
|
|
76
|
+
`),u=[];let d=!1,m=[],x=!1,g=[];function y(){if(!x||g.length===0)return;x=!1;const h=g.map(O=>O.split("|").slice(1,-1).map(z=>z.trim())),S=h[0],v=h.filter((O,L)=>!(L===0||L===1&&h[L].every(z=>/^[-:\s]+$/.test(z))));let C='<table style="width:100%;border-collapse:collapse;font-size:11px;margin:8px 0">';S&&(C+=`<thead><tr>${S.map(O=>`<th style="text-align:left;padding:4px 8px;border-bottom:1px solid var(--border-subtle);color:var(--text-secondary);font-weight:600">${ea(O)}</th>`).join("")}</tr></thead>`),C+=`<tbody>${v.map(O=>`<tr>${O.map(L=>`<td style="padding:4px 8px;border-bottom:1px solid var(--border-subtle);color:var(--text-tertiary)">${ea(L)}</td>`).join("")}</tr>`).join("")}</tbody></table>`,u.push(C),g=[]}for(const h of f){if(h.startsWith("```")){d?(u.push(`<pre style="background:var(--surface-2);padding:8px 12px;border-radius:6px;font-size:11px;overflow-x:auto;margin:6px 0;color:var(--text-secondary)">${ea(m.join(`
|
|
77
|
+
`))}</pre>`),m=[],d=!1):(y(),d=!0);continue}if(d){m.push(h);continue}if(h.trim().startsWith("|")&&h.trim().endsWith("|")){x||(x=!0),g.push(h.trim());continue}else y();if(/^---+$/.test(h.trim())){u.push('<hr style="border:none;border-top:1px solid var(--border-subtle);margin:12px 0" />');continue}const S=h.match(/^(#{1,4})\s+(.+)$/);if(S){const C=S[1].length,O=["","16px","14px","13px","12px"],L=["","700","600","600","600"],z=["","16px 0 8px","12px 0 6px","10px 0 4px","8px 0 4px"];u.push(`<div style="font-size:${O[C]};font-weight:${L[C]};margin:${z[C]};color:var(--text-primary)">${oi(ea(S[2]))}</div>`);continue}if(/^[-*]\s+/.test(h.trim())){const C=h.trim().replace(/^[-*]\s+/,"");u.push(`<div style="padding-left:16px;margin:2px 0;color:var(--text-secondary)"><span style="color:var(--text-tertiary);margin-right:6px">•</span>${oi(ea(C))}</div>`);continue}const v=h.trim().match(/^(\d+)\.\s+(.+)$/);if(v){u.push(`<div style="padding-left:16px;margin:2px 0;color:var(--text-secondary)"><span style="color:var(--text-tertiary);margin-right:6px">${v[1]}.</span>${oi(ea(v[2]))}</div>`);continue}if(!h.trim()){u.push('<div style="height:6px"></div>');continue}u.push(`<div style="margin:2px 0;color:var(--text-secondary)">${oi(ea(h))}</div>`)}return y(),u.join(`
|
|
78
|
+
`)}function ea(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function oi(r){return r.replace(/\*\*(.+?)\*\*/g,'<strong style="color:var(--text-primary)">$1</strong>').replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/`([^`]+)`/g,'<code style="background:var(--surface-2);padding:1px 4px;border-radius:3px;font-size:10px">$1</code>')}function Wu(r){return r.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function c1(r,c,f,u){const m=`.../${r.split("/").slice(-2).join("/")}`;switch(c){case 1:return`${m}/${f}/skills/${u}/SKILL.md`;case 2:return`${m}/plugins/${f}/skills/${u}/SKILL.md`;case 3:return`${m}/skills/${u}/SKILL.md`}}function o1(){const r=xi(),[c,f]=b.useState(null),[u,d]=b.useState(!0),[m,x]=b.useState(null),[g,y]=b.useState(null),[h,S]=b.useState(""),[v,C]=b.useState(3),[O,L]=b.useState(""),[z,w]=b.useState(""),[M,V]=b.useState(""),[Y,X]=b.useState(""),[Q,F]=b.useState(""),[$,G]=b.useState(""),[ae,ee]=b.useState(!1),[J,fe]=b.useState(null);b.useEffect(()=>{ge.getProjectLayout().then(Z=>{f(Z),C(Z.suggestedLayout);const N=Z.detectedLayouts.find(q=>q.layout===Z.suggestedLayout);N!=null&&N.existingPlugins.length&&L(N.existingPlugins[0])}).catch(()=>{}).finally(()=>d(!1)),ge.getConfig().then(y).catch(()=>{}),ge.getSkillCreatorStatus().then(x).catch(()=>{})},[]);const te=b.useMemo(()=>{if(!c)return[];const Z=c.detectedLayouts.find(N=>N.layout===v);return(Z==null?void 0:Z.existingPlugins)||[]},[c,v]),ye=O==="__new__"?z:O,Ne=c?c1(c.root,v,ye||"{plugin}",h||"{skill}"):"",D=b.useMemo(()=>c?c.detectedLayouts.filter(Z=>Z.layout!==4):[],[c]),K=b.useMemo(()=>{const Z=["---"];return M?Z.push(`description: "${M.replace(/"/g,'\\"')}"`):Z.push('description: ""'),Q.trim()&&Z.push(`allowed-tools: ${Q.trim()}`),Y&&Z.push(`model: ${Y}`),Z.push("---"),Z.push(""),$.trim()?Z.push($.trim()):(Z.push(`# /${h||"skill-name"}`),Z.push(""),Z.push("You are a helpful assistant.")),Z.join(`
|
|
79
|
+
`)},[h,M,Y,Q,$]),ie=(g==null?void 0:g.provider)==="claude-cli"&&m!==null;async function Ee(){if(fe(null),!h.trim()){fe("Skill name is required");return}if(!M.trim()){fe("Description is required");return}if(v!==3&&!ye.trim()){fe("Plugin name is required");return}ee(!0);try{const Z=await ge.createSkill({name:Wu(h),plugin:ye||"",layout:v,description:M,model:Y||void 0,allowedTools:Q||void 0,body:$});r(`/skills/${Z.plugin}/${Z.skill}`)}catch(Z){fe(Z.message)}finally{ee(!1)}}return s.jsxs("div",{className:"px-10 py-8 max-w-6xl",children:[s.jsxs("div",{className:"mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[12px] mb-3",style:{color:"var(--text-tertiary)"},children:[s.jsx(rl,{to:"/",className:"hover:underline",style:{color:"var(--text-tertiary)"},children:"Skills"}),s.jsx("span",{children:"/"}),s.jsx("span",{style:{color:"var(--text-secondary)"},children:"New Skill"})]}),s.jsx("h2",{className:"text-[22px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Create a New Skill"}),s.jsx("p",{className:"text-[13px] mt-1",style:{color:"var(--text-tertiary)"},children:"Define your skill's metadata, content, and placement"})]}),ie&&s.jsx("div",{className:"mb-6 px-4 py-3 rounded-lg text-[13px]",style:{background:m.installed?"var(--accent-muted)":"var(--surface-2)",border:m.installed?"1px solid var(--accent)":"1px solid var(--border-subtle)",color:"var(--text-primary)"},children:m.installed?s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 mt-0.5",children:[s.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),s.jsx("path",{d:"M2 17l10 5 10-5"}),s.jsx("path",{d:"M2 12l10 5 10-5"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:"AI-Assisted Authoring Available"}),s.jsxs("span",{className:"ml-1",style:{color:"var(--text-secondary)"},children:["— Run ",s.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-3)"},children:"/skill-creator"})," in Claude Code for guided skill creation with the full methodology. This form creates the basic structure."]})]})]}):s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 mt-0.5",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),s.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),s.jsxs("div",{children:[s.jsxs("span",{style:{color:"var(--text-secondary)"},children:["Tip: Install the Skill Creator for AI-assisted authoring —"," "]}),s.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-3)"},children:m.installCommand})]})]})}),u&&s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"skeleton h-10 w-full rounded-lg"}),s.jsx("div",{className:"skeleton h-10 w-full rounded-lg"}),s.jsx("div",{className:"skeleton h-10 w-full rounded-lg"})]}),!u&&c&&s.jsxs("div",{className:"flex gap-6",children:[s.jsxs("div",{className:"flex-1 min-w-0 space-y-5",children:[s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Location"}),D.length>1&&s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Layout"}),s.jsxs("div",{className:"flex gap-2",children:[D.map(Z=>s.jsx("button",{onClick:()=>{C(Z.layout);const N=Z.existingPlugins[0];L(N||""),w("")},className:"px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:v===Z.layout?"var(--accent)":"var(--surface-3)",color:v===Z.layout?"#fff":"var(--text-secondary)",border:`1px solid ${v===Z.layout?"var(--accent)":"var(--border-subtle)"}`},children:Z.label},Z.layout)),!D.find(Z=>Z.layout===3)&&s.jsx("button",{onClick:()=>{C(3),L("")},className:"px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:v===3?"var(--accent)":"var(--surface-3)",color:v===3?"#fff":"var(--text-secondary)",border:`1px solid ${v===3?"var(--accent)":"var(--border-subtle)"}`},children:"Root skills/"})]})]}),v!==3&&s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Plugin"}),s.jsxs("select",{value:O,onChange:Z=>{L(Z.target.value),w("")},className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"},children:[te.map(Z=>s.jsx("option",{value:Z,children:Z},Z)),s.jsx("option",{value:"__new__",children:"+ New plugin..."})]}),O==="__new__"&&s.jsx("input",{type:"text",value:z,onChange:Z=>w(Wu(Z.target.value)),placeholder:"my-plugin",className:"w-full mt-2 px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]}),s.jsx("div",{className:"px-3 py-2 rounded-lg text-[11px] font-mono",style:{background:"var(--surface-0)",color:"var(--text-tertiary)",border:"1px solid var(--border-subtle)"},children:Ne})]}),s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Skill Details"}),s.jsxs("div",{className:"mb-4",children:[s.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:["Name ",s.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),s.jsx("input",{type:"text",value:h,onChange:Z=>S(Wu(Z.target.value)),placeholder:"my-skill",className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]}),s.jsxs("div",{className:"mb-4",children:[s.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:["Description ",s.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),s.jsx("textarea",{value:M,onChange:Z=>V(Z.target.value),placeholder:"Brief description — used for auto-activation keywords",rows:2,className:"w-full px-3 py-2 rounded-lg text-[13px] resize-none",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}}),s.jsx("p",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:"This text is used by Claude to decide when to activate the skill"})]}),s.jsxs("div",{className:"flex gap-4 mb-4",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Model"}),s.jsxs("select",{value:Y,onChange:Z=>X(Z.target.value),className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"},children:[s.jsx("option",{value:"",children:"Any (default)"}),s.jsx("option",{value:"opus",children:"Opus"}),s.jsx("option",{value:"sonnet",children:"Sonnet"}),s.jsx("option",{value:"haiku",children:"Haiku"})]})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Allowed Tools"}),s.jsx("input",{type:"text",value:Q,onChange:Z=>F(Z.target.value),placeholder:"Read, Write, Edit, Bash, Glob, Grep",className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]})]})]}),s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"System Prompt"}),s.jsx("textarea",{value:$,onChange:Z=>G(Z.target.value),placeholder:`# /my-skill
|
|
80
|
+
|
|
81
|
+
You are an expert at...
|
|
82
|
+
|
|
83
|
+
## Workflow
|
|
84
|
+
|
|
85
|
+
1. First, understand the request
|
|
86
|
+
2. Then, implement the solution
|
|
87
|
+
3. Finally, verify the result`,rows:12,className:"w-full px-3 py-2 rounded-lg text-[13px] font-mono resize-y",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)",minHeight:"200px"}})]}),J&&s.jsx("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:J}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:Ee,disabled:ae||!h||!M,className:"px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:ae||!h||!M?"var(--surface-3)":"var(--accent)",color:ae||!h||!M?"var(--text-tertiary)":"#fff",cursor:ae||!h||!M?"not-allowed":"pointer",opacity:ae?.7:1},children:ae?"Creating...":"Create Skill"}),s.jsx(rl,{to:"/",className:"px-4 py-2.5 rounded-lg text-[13px] font-medium",style:{color:"var(--text-secondary)"},children:"Cancel"})]})]}),s.jsx("div",{className:"w-[340px] flex-shrink-0",children:s.jsx("div",{className:"sticky top-8",children:s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"SKILL.md Preview"}),s.jsx("pre",{className:"text-[11px] font-mono leading-relaxed overflow-auto max-h-[500px] p-3 rounded-lg",style:{background:"var(--surface-0)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:K})]})})})]})]})}function f1(){const[r,c]=b.useState(null),[f,u]=b.useState(!1),[d,m]=b.useState(!1),x=b.useRef(null);b.useEffect(()=>{ge.getConfig().then(c).catch(()=>{})},[]),b.useEffect(()=>{function h(S){x.current&&!x.current.contains(S.target)&&u(!1)}return f&&document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[f]);async function g(h,S){m(!0);try{const v=await ge.setConfig(h.id,S.id);c(v),u(!1)}catch{const v=await ge.getConfig();c(v)}finally{m(!1)}}if(!r)return null;const y=d1(r);return s.jsxs("div",{ref:x,className:"relative",children:[s.jsxs("button",{onClick:()=>u(!f),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:h=>{h.currentTarget.style.borderColor="var(--accent)"},onMouseLeave:h=>{h.currentTarget.style.borderColor="var(--border-subtle)"},children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"3"}),s.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"})]}),s.jsx("span",{className:"flex-1 text-left font-medium truncate",children:y}),s.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:f?"rotate(180deg)":"rotate(0)",transition:"transform 0.15s ease"},children:s.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),f&&s.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:[s.jsx("div",{className:"px-4 py-2.5",style:{borderBottom:"1px solid var(--border-subtle)"},children:s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Select Model"})}),s.jsx("div",{className:"py-1 max-h-80 overflow-y-auto",children:r.providers.map(h=>s.jsxs("div",{children:[s.jsxs("div",{className:"px-4 py-1.5 flex items-center gap-2",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:h.available?"var(--green)":"var(--text-tertiary)",opacity:h.available?1:.3}}),s.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",opacity:h.available?1:.5},children:h.label})]}),h.models.map(S=>{const v=ch(r,h.id,S.id),C=!h.available||d;return s.jsxs("button",{onClick:()=>!C&&g(h,S),disabled:C,className:"w-full px-4 py-2 flex items-center gap-2.5 text-left transition-all duration-100",style:{background:v?"var(--accent-muted)":"transparent",color:C?"var(--text-tertiary)":"var(--text-primary)",opacity:C?.4:1,cursor:C?"not-allowed":"pointer"},onMouseEnter:O=>{!C&&!v&&(O.currentTarget.style.background="var(--surface-3)")},onMouseLeave:O=>{v||(O.currentTarget.style.background="transparent")},children:[s.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0 flex items-center justify-center",style:{border:`2px solid ${v?"var(--accent)":"var(--border-subtle)"}`},children:v&&s.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}})}),s.jsx("span",{className:"text-[12px]",style:{fontWeight:v?600:400},title:S.id,children:S.label})]},`${h.id}-${S.id}`)})]},h.id))})]})]})}function ch(r,c,f){return r.provider!==c?!1:c==="claude-cli"?r.model===`claude-${f}`:r.model===f}function d1(r){for(const c of r.providers)for(const f of c.models)if(ch(r,c.id,f.id))return f.label;return r.model}function m1({active:r}){return s.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:[s.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"}),s.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),s.jsx("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})]})}function h1({active:r}){return s.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:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("circle",{cx:"12",cy:"12",r:"6"}),s.jsx("circle",{cx:"12",cy:"12",r:"2"})]})}function p1({active:r}){return s.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:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"16"}),s.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"12"})]})}const x1=[{path:"/",label:"Skills",Icon:m1},{path:"/create",label:"New Skill",Icon:p1},{path:"/activation",label:"Activation Test",Icon:h1}];function v1(){const r=Gt(),[c,f]=b.useState(null);return b.useEffect(()=>{ge.getConfig().then(u=>f(u.projectName)).catch(()=>{})},[]),s.jsxs("div",{className:"flex h-screen",children:[s.jsxs("nav",{className:"w-[220px] flex flex-col flex-shrink-0",style:{background:"var(--surface-1)",borderRight:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"px-5 py-5",style:{borderBottom:"1px solid var(--border-subtle)"},children:s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"var(--accent-muted)"},children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[14px] font-semibold",style:{color:"var(--text-primary)",letterSpacing:"-0.01em"},children:"Skill Builder"}),s.jsx("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:c||"vskill"})]})]})}),s.jsxs("div",{className:"flex-1 px-3 py-3",children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest px-2 mb-2",style:{color:"var(--text-tertiary)"},children:"Navigation"}),x1.map(u=>{const d=r.pathname===u.path;return s.jsxs(rl,{to:u.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:d?"var(--accent)":"transparent",color:d?"#fff":"var(--text-secondary)"},onMouseEnter:m=>{d||(m.currentTarget.style.background="var(--surface-3)",m.currentTarget.style.color="var(--text-primary)")},onMouseLeave:m=>{d||(m.currentTarget.style.background="transparent",m.currentTarget.style.color="var(--text-secondary)")},children:[s.jsx(u.Icon,{active:d}),u.label]},u.path)})]}),s.jsxs("div",{className:"px-3 py-3",style:{borderTop:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest px-2 mb-2",style:{color:"var(--text-tertiary)"},children:"Model"}),s.jsx(f1,{})]})]}),s.jsx("main",{className:"flex-1 overflow-hidden",style:{background:"var(--surface-0)"},children:s.jsx("div",{className:"h-full",children:s.jsxs(qv,{children:[s.jsx(Hn,{path:"/",element:s.jsx("div",{className:"overflow-auto h-full animate-fade-in",children:s.jsx(Ny,{})})}),s.jsx(Hn,{path:"/create",element:s.jsx("div",{className:"overflow-auto h-full animate-fade-in",children:s.jsx(o1,{})})}),s.jsx(Hn,{path:"/skills/:plugin/:skill",element:s.jsx(s1,{})}),s.jsx(Hn,{path:"/activation",element:s.jsx("div",{className:"overflow-auto h-full animate-fade-in",children:s.jsx(r1,{})})})]})},r.pathname)})]})}Gx.createRoot(document.getElementById("root")).render(s.jsx(b.StrictMode,{children:s.jsx(fy,{children:s.jsx(v1,{})})}));
|