vskill 0.2.95 → 0.2.97
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.
- package/dist/eval/__tests__/skill-scanner.test.js +48 -0
- package/dist/eval/__tests__/skill-scanner.test.js.map +1 -1
- package/dist/eval/benchmark-history.d.ts +4 -4
- package/dist/eval/benchmark-history.js.map +1 -1
- package/dist/eval/benchmark.d.ts +1 -1
- package/dist/eval/skill-scanner.js +8 -1
- package/dist/eval/skill-scanner.js.map +1 -1
- package/dist/eval-server/improve-routes.js +68 -31
- package/dist/eval-server/improve-routes.js.map +1 -1
- package/dist/eval-server/skill-create-routes.js +131 -0
- package/dist/eval-server/skill-create-routes.js.map +1 -1
- package/dist/eval-server/skill-resolver.js +4 -0
- package/dist/eval-server/skill-resolver.js.map +1 -1
- package/dist/eval-ui/assets/index-C1dQxNrc.js +69 -0
- package/dist/eval-ui/assets/index-COID0pSW.css +1 -0
- package/dist/eval-ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/eval-ui/assets/index-ChcvS97w.css +0 -1
- package/dist/eval-ui/assets/index-DwWa15yQ.js +0 -69
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))o(m);new MutationObserver(m=>{for(const j of m)if(j.type==="childList")for(const y of j.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&o(y)}).observe(document,{childList:!0,subtree:!0});function f(m){const j={};return m.integrity&&(j.integrity=m.integrity),m.referrerPolicy&&(j.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?j.credentials="include":m.crossOrigin==="anonymous"?j.credentials="omit":j.credentials="same-origin",j}function o(m){if(m.ep)return;m.ep=!0;const j=f(m);fetch(m.href,j)}})();var fc={exports:{}},Cn={};/**
|
|
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 Rf;function _v(){if(Rf)return Cn;Rf=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function f(o,m,j){var y=null;if(j!==void 0&&(y=""+j),m.key!==void 0&&(y=""+m.key),"key"in m){j={};for(var C in m)C!=="key"&&(j[C]=m[C])}else j=m;return m=j.ref,{$$typeof:r,type:o,key:y,ref:m!==void 0?m:null,props:j}}return Cn.Fragment=u,Cn.jsx=f,Cn.jsxs=f,Cn}var Of;function Mv(){return Of||(Of=1,fc.exports=_v()),fc.exports}var n=Mv(),mc={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 Df;function kv(){if(Df)return re;Df=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),y=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),z=Symbol.iterator;function Y(b){return b===null||typeof b!="object"?null:(b=z&&b[z]||b["@@iterator"],typeof b=="function"?b:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,G={};function Z(b,B,K){this.props=b,this.context=B,this.refs=G,this.updater=K||w}Z.prototype.isReactComponent={},Z.prototype.setState=function(b,B){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,B,"setState")},Z.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function I(){}I.prototype=Z.prototype;function ie(b,B,K){this.props=b,this.context=B,this.refs=G,this.updater=K||w}var Q=ie.prototype=new I;Q.constructor=ie,U(Q,Z.prototype),Q.isPureReactComponent=!0;var le=Array.isArray;function q(){}var J={H:null,A:null,T:null,S:null},fe=Object.prototype.hasOwnProperty;function Te(b,B,K){var ee=K.ref;return{$$typeof:r,type:b,key:B,ref:ee!==void 0?ee:null,props:K}}function ae(b,B){return Te(b.type,B,b.props)}function X(b){return typeof b=="object"&&b!==null&&b.$$typeof===r}function oe(b){var B={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(K){return B[K]})}var V=/\/+/g;function R(b,B){return typeof b=="object"&&b!==null&&b.key!=null?oe(""+b.key):B.toString(36)}function $(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(q,q):(b.status="pending",b.then(function(B){b.status==="pending"&&(b.status="fulfilled",b.value=B)},function(B){b.status==="pending"&&(b.status="rejected",b.reason=B)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function T(b,B,K,ee,ce){var xe=typeof b;(xe==="undefined"||xe==="boolean")&&(b=null);var Ee=!1;if(b===null)Ee=!0;else switch(xe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(b.$$typeof){case r:case u:Ee=!0;break;case S:return Ee=b._init,T(Ee(b._payload),B,K,ee,ce)}}if(Ee)return ce=ce(b),Ee=ee===""?"."+R(b,0):ee,le(ce)?(K="",Ee!=null&&(K=Ee.replace(V,"$&/")+"/"),T(ce,B,K,"",function(Ra){return Ra})):ce!=null&&(X(ce)&&(ce=ae(ce,K+(ce.key==null||b&&b.key===ce.key?"":(""+ce.key).replace(V,"$&/")+"/")+Ee)),B.push(ce)),1;Ee=0;var et=ee===""?".":ee+":";if(le(b))for(var Ue=0;Ue<b.length;Ue++)ee=b[Ue],xe=et+R(ee,Ue),Ee+=T(ee,B,K,xe,ce);else if(Ue=Y(b),typeof Ue=="function")for(b=Ue.call(b),Ue=0;!(ee=b.next()).done;)ee=ee.value,xe=et+R(ee,Ue++),Ee+=T(ee,B,K,xe,ce);else if(xe==="object"){if(typeof b.then=="function")return T($(b),B,K,ee,ce);throw B=String(b),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function H(b,B,K){if(b==null)return b;var ee=[],ce=0;return T(b,ee,"","",function(xe){return B.call(K,xe,ce++)}),ee}function W(b){if(b._status===-1){var B=b._result;B=B(),B.then(function(K){(b._status===0||b._status===-1)&&(b._status=1,b._result=K)},function(K){(b._status===0||b._status===-1)&&(b._status=2,b._result=K)}),b._status===-1&&(b._status=0,b._result=B)}if(b._status===1)return b._result.default;throw b._result}var me=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)},F={map:H,forEach:function(b,B,K){H(b,function(){B.apply(this,arguments)},K)},count:function(b){var B=0;return H(b,function(){B++}),B},toArray:function(b){return H(b,function(B){return B})||[]},only:function(b){if(!X(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};return re.Activity=h,re.Children=F,re.Component=Z,re.Fragment=f,re.Profiler=m,re.PureComponent=ie,re.StrictMode=o,re.Suspense=p,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=J,re.__COMPILER_RUNTIME={__proto__:null,c:function(b){return J.H.useMemoCache(b)}},re.cache=function(b){return function(){return b.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(b,B,K){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var ee=U({},b.props),ce=b.key;if(B!=null)for(xe in B.key!==void 0&&(ce=""+B.key),B)!fe.call(B,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&B.ref===void 0||(ee[xe]=B[xe]);var xe=arguments.length-2;if(xe===1)ee.children=K;else if(1<xe){for(var Ee=Array(xe),et=0;et<xe;et++)Ee[et]=arguments[et+2];ee.children=Ee}return Te(b.type,ce,ee)},re.createContext=function(b){return b={$$typeof:y,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:j,_context:b},b},re.createElement=function(b,B,K){var ee,ce={},xe=null;if(B!=null)for(ee in B.key!==void 0&&(xe=""+B.key),B)fe.call(B,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ce[ee]=B[ee]);var Ee=arguments.length-2;if(Ee===1)ce.children=K;else if(1<Ee){for(var et=Array(Ee),Ue=0;Ue<Ee;Ue++)et[Ue]=arguments[Ue+2];ce.children=et}if(b&&b.defaultProps)for(ee in Ee=b.defaultProps,Ee)ce[ee]===void 0&&(ce[ee]=Ee[ee]);return Te(b,xe,ce)},re.createRef=function(){return{current:null}},re.forwardRef=function(b){return{$$typeof:C,render:b}},re.isValidElement=X,re.lazy=function(b){return{$$typeof:S,_payload:{_status:-1,_result:b},_init:W}},re.memo=function(b,B){return{$$typeof:x,type:b,compare:B===void 0?null:B}},re.startTransition=function(b){var B=J.T,K={};J.T=K;try{var ee=b(),ce=J.S;ce!==null&&ce(K,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(q,me)}catch(xe){me(xe)}finally{B!==null&&K.types!==null&&(B.types=K.types),J.T=B}},re.unstable_useCacheRefresh=function(){return J.H.useCacheRefresh()},re.use=function(b){return J.H.use(b)},re.useActionState=function(b,B,K){return J.H.useActionState(b,B,K)},re.useCallback=function(b,B){return J.H.useCallback(b,B)},re.useContext=function(b){return J.H.useContext(b)},re.useDebugValue=function(){},re.useDeferredValue=function(b,B){return J.H.useDeferredValue(b,B)},re.useEffect=function(b,B){return J.H.useEffect(b,B)},re.useEffectEvent=function(b){return J.H.useEffectEvent(b)},re.useId=function(){return J.H.useId()},re.useImperativeHandle=function(b,B,K){return J.H.useImperativeHandle(b,B,K)},re.useInsertionEffect=function(b,B){return J.H.useInsertionEffect(b,B)},re.useLayoutEffect=function(b,B){return J.H.useLayoutEffect(b,B)},re.useMemo=function(b,B){return J.H.useMemo(b,B)},re.useOptimistic=function(b,B){return J.H.useOptimistic(b,B)},re.useReducer=function(b,B,K){return J.H.useReducer(b,B,K)},re.useRef=function(b){return J.H.useRef(b)},re.useState=function(b){return J.H.useState(b)},re.useSyncExternalStore=function(b,B,K){return J.H.useSyncExternalStore(b,B,K)},re.useTransition=function(){return J.H.useTransition()},re.version="19.2.4",re}var wf;function Ac(){return wf||(wf=1,mc.exports=kv()),mc.exports}var N=Ac(),xc={exports:{}},An={},vc={exports:{}},hc={};/**
|
|
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 Lf;function zv(){return Lf||(Lf=1,(function(r){function u(T,H){var W=T.length;T.push(H);e:for(;0<W;){var me=W-1>>>1,F=T[me];if(0<m(F,H))T[me]=H,T[W]=F,W=me;else break e}}function f(T){return T.length===0?null:T[0]}function o(T){if(T.length===0)return null;var H=T[0],W=T.pop();if(W!==H){T[0]=W;e:for(var me=0,F=T.length,b=F>>>1;me<b;){var B=2*(me+1)-1,K=T[B],ee=B+1,ce=T[ee];if(0>m(K,W))ee<F&&0>m(ce,K)?(T[me]=ce,T[ee]=W,me=ee):(T[me]=K,T[B]=W,me=B);else if(ee<F&&0>m(ce,W))T[me]=ce,T[ee]=W,me=ee;else break e}}return H}function m(T,H){var W=T.sortIndex-H.sortIndex;return W!==0?W:T.id-H.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var j=performance;r.unstable_now=function(){return j.now()}}else{var y=Date,C=y.now();r.unstable_now=function(){return y.now()-C}}var p=[],x=[],S=1,h=null,z=3,Y=!1,w=!1,U=!1,G=!1,Z=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,ie=typeof setImmediate<"u"?setImmediate:null;function Q(T){for(var H=f(x);H!==null;){if(H.callback===null)o(x);else if(H.startTime<=T)o(x),H.sortIndex=H.expirationTime,u(p,H);else break;H=f(x)}}function le(T){if(U=!1,Q(T),!w)if(f(p)!==null)w=!0,q||(q=!0,oe());else{var H=f(x);H!==null&&$(le,H.startTime-T)}}var q=!1,J=-1,fe=5,Te=-1;function ae(){return G?!0:!(r.unstable_now()-Te<fe)}function X(){if(G=!1,q){var T=r.unstable_now();Te=T;var H=!0;try{e:{w=!1,U&&(U=!1,I(J),J=-1),Y=!0;var W=z;try{t:{for(Q(T),h=f(p);h!==null&&!(h.expirationTime>T&&ae());){var me=h.callback;if(typeof me=="function"){h.callback=null,z=h.priorityLevel;var F=me(h.expirationTime<=T);if(T=r.unstable_now(),typeof F=="function"){h.callback=F,Q(T),H=!0;break t}h===f(p)&&o(p),Q(T)}else o(p);h=f(p)}if(h!==null)H=!0;else{var b=f(x);b!==null&&$(le,b.startTime-T),H=!1}}break e}finally{h=null,z=W,Y=!1}H=void 0}}finally{H?oe():q=!1}}}var oe;if(typeof ie=="function")oe=function(){ie(X)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,R=V.port2;V.port1.onmessage=X,oe=function(){R.postMessage(null)}}else oe=function(){Z(X,0)};function $(T,H){J=Z(function(){T(r.unstable_now())},H)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(T){T.callback=null},r.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<T?Math.floor(1e3/T):5},r.unstable_getCurrentPriorityLevel=function(){return z},r.unstable_next=function(T){switch(z){case 1:case 2:case 3:var H=3;break;default:H=z}var W=z;z=H;try{return T()}finally{z=W}},r.unstable_requestPaint=function(){G=!0},r.unstable_runWithPriority=function(T,H){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var W=z;z=T;try{return H()}finally{z=W}},r.unstable_scheduleCallback=function(T,H,W){var me=r.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?me+W:me):W=me,T){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=W+F,T={id:S++,callback:H,priorityLevel:T,startTime:W,expirationTime:F,sortIndex:-1},W>me?(T.sortIndex=W,u(x,T),f(p)===null&&T===f(x)&&(U?(I(J),J=-1):U=!0,$(le,W-me))):(T.sortIndex=F,u(p,T),w||Y||(w=!0,q||(q=!0,oe()))),T},r.unstable_shouldYield=ae,r.unstable_wrapCallback=function(T){var H=z;return function(){var W=z;z=H;try{return T.apply(this,arguments)}finally{z=W}}}})(hc)),hc}var Bf;function Rv(){return Bf||(Bf=1,vc.exports=zv()),vc.exports}var pc={exports:{}},Pe={};/**
|
|
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 Uf;function Ov(){if(Uf)return Pe;Uf=1;var r=Ac();function u(p){var x="https://react.dev/errors/"+p;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)x+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+p+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var o={d:{f,r:function(){throw Error(u(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},m=Symbol.for("react.portal");function j(p,x,S){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:h==null?null:""+h,children:p,containerInfo:x,implementation:S}}var y=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function C(p,x){if(p==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Pe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Pe.createPortal=function(p,x){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(u(299));return j(p,x,null,S)},Pe.flushSync=function(p){var x=y.T,S=o.p;try{if(y.T=null,o.p=2,p)return p()}finally{y.T=x,o.p=S,o.d.f()}},Pe.preconnect=function(p,x){typeof p=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(p,x))},Pe.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},Pe.preinit=function(p,x){if(typeof p=="string"&&x&&typeof x.as=="string"){var S=x.as,h=C(S,x.crossOrigin),z=typeof x.integrity=="string"?x.integrity:void 0,Y=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;S==="style"?o.d.S(p,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:h,integrity:z,fetchPriority:Y}):S==="script"&&o.d.X(p,{crossOrigin:h,integrity:z,fetchPriority:Y,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Pe.preinitModule=function(p,x){if(typeof p=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var S=C(x.as,x.crossOrigin);o.d.M(p,{crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(p)},Pe.preload=function(p,x){if(typeof p=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var S=x.as,h=C(S,x.crossOrigin);o.d.L(p,S,{crossOrigin:h,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},Pe.preloadModule=function(p,x){if(typeof p=="string")if(x){var S=C(x.as,x.crossOrigin);o.d.m(p,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(p)},Pe.requestFormReset=function(p){o.d.r(p)},Pe.unstable_batchedUpdates=function(p,x){return p(x)},Pe.useFormState=function(p,x,S){return y.H.useFormState(p,x,S)},Pe.useFormStatus=function(){return y.H.useHostTransitionStatus()},Pe.version="19.2.4",Pe}var Hf;function Dv(){if(Hf)return pc.exports;Hf=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),pc.exports=Ov(),pc.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 qf;function wv(){if(qf)return An;qf=1;var r=Rv(),u=Ac(),f=Dv();function o(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 m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function j(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 y(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function C(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(j(e)!==e)throw Error(o(188))}function x(e){var t=e.alternate;if(!t){if(t=j(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var i=s.alternate;if(i===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===l)return p(s),e;if(i===a)return p(s),t;i=i.sibling}throw Error(o(188))}if(l.return!==a.return)l=s,a=i;else{for(var c=!1,d=s.child;d;){if(d===l){c=!0,l=s,a=i;break}if(d===a){c=!0,a=s,l=i;break}d=d.sibling}if(!c){for(d=i.child;d;){if(d===l){c=!0,l=i,a=s;break}if(d===a){c=!0,a=i,l=s;break}d=d.sibling}if(!c)throw Error(o(189))}}if(l.alternate!==a)throw Error(o(190))}if(l.tag!==3)throw Error(o(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 h=Object.assign,z=Symbol.for("react.element"),Y=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),ie=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),Te=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=X&&e[X]||e["@@iterator"],typeof e=="function"?e:null)}var V=Symbol.for("react.client.reference");function R(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===V?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case U:return"Fragment";case Z:return"Profiler";case G:return"StrictMode";case le:return"Suspense";case q:return"SuspenseList";case Te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case ie:return e.displayName||"Context";case I:return(e._context.displayName||"Context")+".Consumer";case Q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case J:return t=e.displayName||null,t!==null?t:R(e.type)||"Memo";case fe:t=e._payload,e=e._init;try{return R(e(t))}catch{}}return null}var $=Array.isArray,T=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},me=[],F=-1;function b(e){return{current:e}}function B(e){0>F||(e.current=me[F],me[F]=null,F--)}function K(e,t){F++,me[F]=e.current,e.current=t}var ee=b(null),ce=b(null),xe=b(null),Ee=b(null);function et(e,t){switch(K(xe,t),K(ce,e),K(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ef(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ef(t),e=tf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(ee),K(ee,e)}function Ue(){B(ee),B(ce),B(xe)}function Ra(e){e.memoizedState!==null&&K(Ee,e);var t=ee.current,l=tf(t,e.type);t!==l&&(K(ce,e),K(ee,l))}function _n(e){ce.current===e&&(B(ee),B(ce)),Ee.current===e&&(B(Ee),Sn._currentValue=W)}var Js,Mc;function _l(e){if(Js===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Js=t&&t[1]||"",Mc=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Js+e+Mc}var $s=!1;function Ws(e,t){if(!e||$s)return"";$s=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(k){var M=k}Reflect.construct(e,[],L)}else{try{L.call()}catch(k){M=k}e.call(L.prototype)}}else{try{throw Error()}catch(k){M=k}(L=e())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(k){if(k&&M&&typeof k.stack=="string")return[k.stack,M.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),c=i[0],d=i[1];if(c&&d){var v=c.split(`
|
|
44
|
+
`),_=d.split(`
|
|
45
|
+
`);for(s=a=0;a<v.length&&!v[a].includes("DetermineComponentFrameRoot");)a++;for(;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;if(a===v.length||s===_.length)for(a=v.length-1,s=_.length-1;1<=a&&0<=s&&v[a]!==_[s];)s--;for(;1<=a&&0<=s;a--,s--)if(v[a]!==_[s]){if(a!==1||s!==1)do if(a--,s--,0>s||v[a]!==_[s]){var O=`
|
|
46
|
+
`+v[a].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),O}while(1<=a&&0<=s);break}}}finally{$s=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?_l(l):""}function sm(e,t){switch(e.tag){case 26:case 27:case 5:return _l(e.type);case 16:return _l("Lazy");case 13:return e.child!==t&&t!==null?_l("Suspense Fallback"):_l("Suspense");case 19:return _l("SuspenseList");case 0:case 15:return Ws(e.type,!1);case 11:return Ws(e.type.render,!1);case 1:return Ws(e.type,!0);case 31:return _l("Activity");default:return""}}function kc(e){try{var t="",l=null;do t+=sm(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var Fs=Object.prototype.hasOwnProperty,Is=r.unstable_scheduleCallback,Ps=r.unstable_cancelCallback,im=r.unstable_shouldYield,rm=r.unstable_requestPaint,ot=r.unstable_now,cm=r.unstable_getCurrentPriorityLevel,zc=r.unstable_ImmediatePriority,Rc=r.unstable_UserBlockingPriority,Mn=r.unstable_NormalPriority,um=r.unstable_LowPriority,Oc=r.unstable_IdlePriority,om=r.log,dm=r.unstable_setDisableYieldValue,Oa=null,dt=null;function ll(e){if(typeof om=="function"&&dm(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(Oa,e)}catch{}}var ft=Math.clz32?Math.clz32:xm,fm=Math.log,mm=Math.LN2;function xm(e){return e>>>=0,e===0?32:31-(fm(e)/mm|0)|0}var kn=256,zn=262144,Rn=4194304;function Ml(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 On(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var d=a&134217727;return d!==0?(a=d&~i,a!==0?s=Ml(a):(c&=d,c!==0?s=Ml(c):l||(l=d&~e,l!==0&&(s=Ml(l))))):(d=a&~i,d!==0?s=Ml(d):c!==0?s=Ml(c):l||(l=a&~e,l!==0&&(s=Ml(l)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:s}function Da(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vm(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 Dc(){var e=Rn;return Rn<<=1,(Rn&62914560)===0&&(Rn=4194304),e}function ei(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function wa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function hm(e,t,l,a,s,i){var c=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 d=e.entanglements,v=e.expirationTimes,_=e.hiddenUpdates;for(l=c&~l;0<l;){var O=31-ft(l),L=1<<O;d[O]=0,v[O]=-1;var M=_[O];if(M!==null)for(_[O]=null,O=0;O<M.length;O++){var k=M[O];k!==null&&(k.lane&=-536870913)}l&=~L}a!==0&&wc(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function wc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-ft(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Lc(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-ft(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function Bc(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 li(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Uc(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:Tf(e.type))}function Hc(e,t){var l=H.p;try{return H.p=e,t()}finally{H.p=l}}var al=Math.random().toString(36).slice(2),Je="__reactFiber$"+al,at="__reactProps$"+al,Jl="__reactContainer$"+al,ai="__reactEvents$"+al,pm="__reactListeners$"+al,ym="__reactHandles$"+al,qc="__reactResources$"+al,La="__reactMarker$"+al;function ni(e){delete e[Je],delete e[at],delete e[ai],delete e[pm],delete e[ym]}function $l(e){var t=e[Je];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Jl]||l[Je]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=uf(e);e!==null;){if(l=e[Je])return l;e=uf(e)}return t}e=l,l=e.parentNode}return null}function Wl(e){if(e=e[Je]||e[Jl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ba(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Fl(e){var t=e[qc];return t||(t=e[qc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ze(e){e[La]=!0}var Yc=new Set,Gc={};function kl(e,t){Il(e,t),Il(e+"Capture",t)}function Il(e,t){for(Gc[e]=t,e=0;e<t.length;e++)Yc.add(t[e])}var gm=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]*$"),Qc={},Xc={};function bm(e){return Fs.call(Xc,e)?!0:Fs.call(Qc,e)?!1:gm.test(e)?Xc[e]=!0:(Qc[e]=!0,!1)}function Dn(e,t,l){if(bm(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 wn(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 Bt(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 bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jm(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(c){l=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function si(e){if(!e._valueTracker){var t=Vc(e)?"checked":"value";e._valueTracker=jm(e,t,""+e[t])}}function Zc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Vc(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Ln(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 Sm=/[\n"\\]/g;function jt(e){return e.replace(Sm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ii(e,t,l,a,s,i,c,d){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+bt(t)):e.value!==""+bt(t)&&(e.value=""+bt(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?ri(e,c,bt(t)):l!=null?ri(e,c,bt(l)):a!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+bt(d):e.removeAttribute("name")}function Kc(e,t,l,a,s,i,c,d){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)){si(e);return}l=l!=null?""+bt(l):"",t=t!=null?""+bt(t):l,d||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=d?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),si(e)}function ri(e,t,l){t==="number"&&Ln(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Pl(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+bt(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Jc(e,t,l){if(t!=null&&(t=""+bt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+bt(l):""}function $c(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(o(92));if($(a)){if(1<a.length)throw Error(o(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=bt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),si(e)}function ea(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Nm=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||Nm.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Fc(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&Wc(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&Wc(e,i,t[i])}function ci(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 Em=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"]]),Tm=/^[\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 Bn(e){return Tm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ut(){}var ui=null;function oi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ta=null,la=null;function Ic(e){var t=Wl(e);if(t&&(e=t.stateNode)){var l=e[at]||null;e:switch(e=t.stateNode,t.type){case"input":if(ii(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="'+jt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[at]||null;if(!s)throw Error(o(90));ii(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Zc(a)}break e;case"textarea":Jc(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Pl(e,!!l.multiple,t,!1)}}}var di=!1;function Pc(e,t,l){if(di)return e(t,l);di=!0;try{var a=e(t);return a}finally{if(di=!1,(ta!==null||la!==null)&&(Es(),ta&&(t=ta,e=la,la=ta=null,Ic(t),e)))for(t=0;t<e.length;t++)Ic(e[t])}}function Ua(e,t){var l=e.stateNode;if(l===null)return null;var a=l[at]||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(o(231,t,typeof l));return l}var Ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fi=!1;if(Ht)try{var Ha={};Object.defineProperty(Ha,"passive",{get:function(){fi=!0}}),window.addEventListener("test",Ha,Ha),window.removeEventListener("test",Ha,Ha)}catch{fi=!1}var nl=null,mi=null,Un=null;function eu(){if(Un)return Un;var e,t=mi,l=t.length,a,s="value"in nl?nl.value:nl.textContent,i=s.length;for(e=0;e<l&&t[e]===s[e];e++);var c=l-e;for(a=1;a<=c&&t[l-a]===s[i-a];a++);return Un=s.slice(e,1<a?1-a:void 0)}function Hn(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 qn(){return!0}function tu(){return!1}function nt(e){function t(l,a,s,i,c){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(l=e[d],this[d]=l?l(i):i[d]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?qn:tu,this.isPropagationStopped=tu,this}return h(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=qn)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=qn)},persist:function(){},isPersistent:qn}),t}var zl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yn=nt(zl),qa=h({},zl,{view:0,detail:0}),Cm=nt(qa),xi,vi,Ya,Gn=h({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pi,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!==Ya&&(Ya&&e.type==="mousemove"?(xi=e.screenX-Ya.screenX,vi=e.screenY-Ya.screenY):vi=xi=0,Ya=e),xi)},movementY:function(e){return"movementY"in e?e.movementY:vi}}),lu=nt(Gn),Am=h({},Gn,{dataTransfer:0}),_m=nt(Am),Mm=h({},qa,{relatedTarget:0}),hi=nt(Mm),km=h({},zl,{animationName:0,elapsedTime:0,pseudoElement:0}),zm=nt(km),Rm=h({},zl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Om=nt(Rm),Dm=h({},zl,{data:0}),au=nt(Dm),wm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lm={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"},Bm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Um(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bm[e])?!!t[e]:!1}function pi(){return Um}var Hm=h({},qa,{key:function(e){if(e.key){var t=wm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Lm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pi,charCode:function(e){return e.type==="keypress"?Hn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qm=nt(Hm),Ym=h({},Gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nu=nt(Ym),Gm=h({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pi}),Qm=nt(Gm),Xm=h({},zl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vm=nt(Xm),Zm=h({},Gn,{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}),Km=nt(Zm),Jm=h({},zl,{newState:0,oldState:0}),$m=nt(Jm),Wm=[9,13,27,32],yi=Ht&&"CompositionEvent"in window,Ga=null;Ht&&"documentMode"in document&&(Ga=document.documentMode);var Fm=Ht&&"TextEvent"in window&&!Ga,su=Ht&&(!yi||Ga&&8<Ga&&11>=Ga),iu=" ",ru=!1;function cu(e,t){switch(e){case"keyup":return Wm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var aa=!1;function Im(e,t){switch(e){case"compositionend":return uu(t);case"keypress":return t.which!==32?null:(ru=!0,iu);case"textInput":return e=t.data,e===iu&&ru?null:e;default:return null}}function Pm(e,t){if(aa)return e==="compositionend"||!yi&&cu(e,t)?(e=eu(),Un=mi=nl=null,aa=!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 su&&t.locale!=="ko"?null:t.data;default:return null}}var ex={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 ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ex[e.type]:t==="textarea"}function du(e,t,l,a){ta?la?la.push(a):la=[a]:ta=a,t=zs(t,"onChange"),0<t.length&&(l=new Yn("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Qa=null,Xa=null;function tx(e){Jd(e,0)}function Qn(e){var t=Ba(e);if(Zc(t))return e}function fu(e,t){if(e==="change")return t}var mu=!1;if(Ht){var gi;if(Ht){var bi="oninput"in document;if(!bi){var xu=document.createElement("div");xu.setAttribute("oninput","return;"),bi=typeof xu.oninput=="function"}gi=bi}else gi=!1;mu=gi&&(!document.documentMode||9<document.documentMode)}function vu(){Qa&&(Qa.detachEvent("onpropertychange",hu),Xa=Qa=null)}function hu(e){if(e.propertyName==="value"&&Qn(Xa)){var t=[];du(t,Xa,e,oi(e)),Pc(tx,t)}}function lx(e,t,l){e==="focusin"?(vu(),Qa=t,Xa=l,Qa.attachEvent("onpropertychange",hu)):e==="focusout"&&vu()}function ax(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qn(Xa)}function nx(e,t){if(e==="click")return Qn(t)}function sx(e,t){if(e==="input"||e==="change")return Qn(t)}function ix(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:ix;function Va(e,t){if(mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!Fs.call(t,s)||!mt(e[s],t[s]))return!1}return!0}function pu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yu(e,t){var l=pu(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=pu(l)}}function gu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ln(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=Ln(e.document)}return t}function ji(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 rx=Ht&&"documentMode"in document&&11>=document.documentMode,na=null,Si=null,Za=null,Ni=!1;function ju(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ni||na==null||na!==Ln(a)||(a=na,"selectionStart"in a&&ji(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}),Za&&Va(Za,a)||(Za=a,a=zs(Si,"onSelect"),0<a.length&&(t=new Yn("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=na)))}function Rl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var sa={animationend:Rl("Animation","AnimationEnd"),animationiteration:Rl("Animation","AnimationIteration"),animationstart:Rl("Animation","AnimationStart"),transitionrun:Rl("Transition","TransitionRun"),transitionstart:Rl("Transition","TransitionStart"),transitioncancel:Rl("Transition","TransitionCancel"),transitionend:Rl("Transition","TransitionEnd")},Ei={},Su={};Ht&&(Su=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function Ol(e){if(Ei[e])return Ei[e];if(!sa[e])return e;var t=sa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Su)return Ei[e]=t[l];return e}var Nu=Ol("animationend"),Eu=Ol("animationiteration"),Tu=Ol("animationstart"),cx=Ol("transitionrun"),ux=Ol("transitionstart"),ox=Ol("transitioncancel"),Cu=Ol("transitionend"),Au=new Map,Ti="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(" ");Ti.push("scrollEnd");function kt(e,t){Au.set(e,t),kl(t,[e])}var Xn=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)},St=[],ia=0,Ci=0;function Vn(){for(var e=ia,t=Ci=ia=0;t<e;){var l=St[t];St[t++]=null;var a=St[t];St[t++]=null;var s=St[t];St[t++]=null;var i=St[t];if(St[t++]=null,a!==null&&s!==null){var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}i!==0&&_u(l,s,i)}}function Zn(e,t,l,a){St[ia++]=e,St[ia++]=t,St[ia++]=l,St[ia++]=a,Ci|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ai(e,t,l,a){return Zn(e,t,l,a),Kn(e)}function Dl(e,t){return Zn(e,null,null,t),Kn(e)}function _u(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-ft(l),e=i.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),i):null}function Kn(e){if(50<vn)throw vn=0,Lr=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ra={};function dx(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 xt(e,t,l,a){return new dx(e,t,l,a)}function _i(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qt(e,t){var l=e.alternate;return l===null?(l=xt(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 Mu(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 Jn(e,t,l,a,s,i){var c=0;if(a=e,typeof e=="function")_i(e)&&(c=1);else if(typeof e=="string")c=hv(e,l,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Te:return e=xt(31,l,t,s),e.elementType=Te,e.lanes=i,e;case U:return wl(l.children,s,i,t);case G:c=8,s|=24;break;case Z:return e=xt(12,l,t,s|2),e.elementType=Z,e.lanes=i,e;case le:return e=xt(13,l,t,s),e.elementType=le,e.lanes=i,e;case q:return e=xt(19,l,t,s),e.elementType=q,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ie:c=10;break e;case I:c=9;break e;case Q:c=11;break e;case J:c=14;break e;case fe:c=16,a=null;break e}c=29,l=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=xt(c,l,t,s),t.elementType=e,t.type=a,t.lanes=i,t}function wl(e,t,l,a){return e=xt(7,e,a,t),e.lanes=l,e}function Mi(e,t,l){return e=xt(6,e,null,t),e.lanes=l,e}function ku(e){var t=xt(18,null,null,0);return t.stateNode=e,t}function ki(e,t,l){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zu=new WeakMap;function Nt(e,t){if(typeof e=="object"&&e!==null){var l=zu.get(e);return l!==void 0?l:(t={value:e,source:t,stack:kc(t)},zu.set(e,t),t)}return{value:e,source:t,stack:kc(t)}}var ca=[],ua=0,$n=null,Ka=0,Et=[],Tt=0,sl=null,Ot=1,Dt="";function Yt(e,t){ca[ua++]=Ka,ca[ua++]=$n,$n=e,Ka=t}function Ru(e,t,l){Et[Tt++]=Ot,Et[Tt++]=Dt,Et[Tt++]=sl,sl=e;var a=Ot;e=Dt;var s=32-ft(a)-1;a&=~(1<<s),l+=1;var i=32-ft(t)+s;if(30<i){var c=s-s%5;i=(a&(1<<c)-1).toString(32),a>>=c,s-=c,Ot=1<<32-ft(t)+s|l<<s|a,Dt=i+e}else Ot=1<<i|l<<s|a,Dt=e}function zi(e){e.return!==null&&(Yt(e,1),Ru(e,1,0))}function Ri(e){for(;e===$n;)$n=ca[--ua],ca[ua]=null,Ka=ca[--ua],ca[ua]=null;for(;e===sl;)sl=Et[--Tt],Et[Tt]=null,Dt=Et[--Tt],Et[Tt]=null,Ot=Et[--Tt],Et[Tt]=null}function Ou(e,t){Et[Tt++]=Ot,Et[Tt++]=Dt,Et[Tt++]=sl,Ot=t.id,Dt=t.overflow,sl=e}var $e=null,Re=null,be=!1,il=null,Ct=!1,Oi=Error(o(519));function rl(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ja(Nt(t,e)),Oi}function Du(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Je]=e,t[at]=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<pn.length;l++)he(pn[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),Kc(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),$c(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||Id(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=Ut),t=!0):t=!1,t||rl(e,!0)}function wu(e){for($e=e.return;$e;)switch($e.tag){case 5:case 31:case 13:Ct=!1;return;case 27:case 3:Ct=!0;return;default:$e=$e.return}}function oa(e){if(e!==$e)return!1;if(!be)return wu(e),be=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Fr(e.type,e.memoizedProps)),l=!l),l&&Re&&rl(e),wu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Re=cf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Re=cf(e)}else t===27?(t=Re,jl(e.type)?(e=lc,lc=null,Re=e):Re=t):Re=$e?_t(e.stateNode.nextSibling):null;return!0}function Ll(){Re=$e=null,be=!1}function Di(){var e=il;return e!==null&&(ct===null?ct=e:ct.push.apply(ct,e),il=null),e}function Ja(e){il===null?il=[e]:il.push(e)}var wi=b(null),Bl=null,Gt=null;function cl(e,t,l){K(wi,t._currentValue),t._currentValue=l}function Qt(e){e._currentValue=wi.current,B(wi)}function Li(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 Bi(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var c=s.child;i=i.firstContext;e:for(;i!==null;){var d=i;i=s;for(var v=0;v<t.length;v++)if(d.context===t[v]){i.lanes|=l,d=i.alternate,d!==null&&(d.lanes|=l),Li(i.return,l,e),a||(c=null);break e}i=d.next}}else if(s.tag===18){if(c=s.return,c===null)throw Error(o(341));c.lanes|=l,i=c.alternate,i!==null&&(i.lanes|=l),Li(c,l,e),c=null}else c=s.child;if(c!==null)c.return=s;else for(c=s;c!==null;){if(c===e){c=null;break}if(s=c.sibling,s!==null){s.return=c.return,c=s;break}c=c.return}s=c}}function da(e,t,l,a){e=null;for(var s=t,i=!1;s!==null;){if(!i){if((s.flags&524288)!==0)i=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var c=s.alternate;if(c===null)throw Error(o(387));if(c=c.memoizedProps,c!==null){var d=s.type;mt(s.pendingProps.value,c.value)||(e!==null?e.push(d):e=[d])}}else if(s===Ee.current){if(c=s.alternate,c===null)throw Error(o(387));c.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Sn):e=[Sn])}s=s.return}e!==null&&Bi(t,e,l,a),t.flags|=262144}function Wn(e){for(e=e.firstContext;e!==null;){if(!mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ul(e){Bl=e,Gt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function We(e){return Lu(Bl,e)}function Fn(e,t){return Bl===null&&Ul(e),Lu(e,t)}function Lu(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Gt===null){if(e===null)throw Error(o(308));Gt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gt=Gt.next=t;return l}var fx=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()})}},mx=r.unstable_scheduleCallback,xx=r.unstable_NormalPriority,Ye={$$typeof:ie,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ui(){return{controller:new fx,data:new Map,refCount:0}}function $a(e){e.refCount--,e.refCount===0&&mx(xx,function(){e.controller.abort()})}var Wa=null,Hi=0,fa=0,ma=null;function vx(e,t){if(Wa===null){var l=Wa=[];Hi=0,fa=Gr(),ma={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Hi++,t.then(Bu,Bu),t}function Bu(){if(--Hi===0&&Wa!==null){ma!==null&&(ma.status="fulfilled");var e=Wa;Wa=null,fa=0,ma=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function hx(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var Uu=T.S;T.S=function(e,t){Sd=ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&vx(e,t),Uu!==null&&Uu(e,t)};var Hl=b(null);function qi(){var e=Hl.current;return e!==null?e:ze.pooledCache}function In(e,t){t===null?K(Hl,Hl.current):K(Hl,t.pool)}function Hu(){var e=qi();return e===null?null:{parent:Ye._currentValue,pool:e}}var xa=Error(o(460)),Yi=Error(o(474)),Pn=Error(o(542)),es={then:function(){}};function qu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yu(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Ut,Ut),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qu(e),e;default:if(typeof t.status=="string")t.then(Ut,Ut);else{if(e=ze,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qu(e),e}throw Yl=t,xa}}function ql(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Yl=l,xa):l}}var Yl=null;function Gu(){if(Yl===null)throw Error(o(459));var e=Yl;return Yl=null,e}function Qu(e){if(e===xa||e===Pn)throw Error(o(483))}var va=null,Fa=0;function ts(e){var t=Fa;return Fa+=1,va===null&&(va=[]),Yu(va,e,t)}function Ia(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ls(e,t){throw t.$$typeof===z?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Xu(e){function t(E,g){if(e){var A=E.deletions;A===null?(E.deletions=[g],E.flags|=16):A.push(g)}}function l(E,g){if(!e)return null;for(;g!==null;)t(E,g),g=g.sibling;return null}function a(E){for(var g=new Map;E!==null;)E.key!==null?g.set(E.key,E):g.set(E.index,E),E=E.sibling;return g}function s(E,g){return E=qt(E,g),E.index=0,E.sibling=null,E}function i(E,g,A){return E.index=A,e?(A=E.alternate,A!==null?(A=A.index,A<g?(E.flags|=67108866,g):A):(E.flags|=67108866,g)):(E.flags|=1048576,g)}function c(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function d(E,g,A,D){return g===null||g.tag!==6?(g=Mi(A,E.mode,D),g.return=E,g):(g=s(g,A),g.return=E,g)}function v(E,g,A,D){var ne=A.type;return ne===U?O(E,g,A.props.children,D,A.key):g!==null&&(g.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===fe&&ql(ne)===g.type)?(g=s(g,A.props),Ia(g,A),g.return=E,g):(g=Jn(A.type,A.key,A.props,null,E.mode,D),Ia(g,A),g.return=E,g)}function _(E,g,A,D){return g===null||g.tag!==4||g.stateNode.containerInfo!==A.containerInfo||g.stateNode.implementation!==A.implementation?(g=ki(A,E.mode,D),g.return=E,g):(g=s(g,A.children||[]),g.return=E,g)}function O(E,g,A,D,ne){return g===null||g.tag!==7?(g=wl(A,E.mode,D,ne),g.return=E,g):(g=s(g,A),g.return=E,g)}function L(E,g,A){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Mi(""+g,E.mode,A),g.return=E,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Y:return A=Jn(g.type,g.key,g.props,null,E.mode,A),Ia(A,g),A.return=E,A;case w:return g=ki(g,E.mode,A),g.return=E,g;case fe:return g=ql(g),L(E,g,A)}if($(g)||oe(g))return g=wl(g,E.mode,A,null),g.return=E,g;if(typeof g.then=="function")return L(E,ts(g),A);if(g.$$typeof===ie)return L(E,Fn(E,g),A);ls(E,g)}return null}function M(E,g,A,D){var ne=g!==null?g.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ne!==null?null:d(E,g,""+A,D);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case Y:return A.key===ne?v(E,g,A,D):null;case w:return A.key===ne?_(E,g,A,D):null;case fe:return A=ql(A),M(E,g,A,D)}if($(A)||oe(A))return ne!==null?null:O(E,g,A,D,null);if(typeof A.then=="function")return M(E,g,ts(A),D);if(A.$$typeof===ie)return M(E,g,Fn(E,A),D);ls(E,A)}return null}function k(E,g,A,D,ne){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return E=E.get(A)||null,d(g,E,""+D,ne);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case Y:return E=E.get(D.key===null?A:D.key)||null,v(g,E,D,ne);case w:return E=E.get(D.key===null?A:D.key)||null,_(g,E,D,ne);case fe:return D=ql(D),k(E,g,A,D,ne)}if($(D)||oe(D))return E=E.get(A)||null,O(g,E,D,ne,null);if(typeof D.then=="function")return k(E,g,A,ts(D),ne);if(D.$$typeof===ie)return k(E,g,A,Fn(g,D),ne);ls(g,D)}return null}function P(E,g,A,D){for(var ne=null,je=null,te=g,de=g=0,ye=null;te!==null&&de<A.length;de++){te.index>de?(ye=te,te=null):ye=te.sibling;var Se=M(E,te,A[de],D);if(Se===null){te===null&&(te=ye);break}e&&te&&Se.alternate===null&&t(E,te),g=i(Se,g,de),je===null?ne=Se:je.sibling=Se,je=Se,te=ye}if(de===A.length)return l(E,te),be&&Yt(E,de),ne;if(te===null){for(;de<A.length;de++)te=L(E,A[de],D),te!==null&&(g=i(te,g,de),je===null?ne=te:je.sibling=te,je=te);return be&&Yt(E,de),ne}for(te=a(te);de<A.length;de++)ye=k(te,E,de,A[de],D),ye!==null&&(e&&ye.alternate!==null&&te.delete(ye.key===null?de:ye.key),g=i(ye,g,de),je===null?ne=ye:je.sibling=ye,je=ye);return e&&te.forEach(function(Cl){return t(E,Cl)}),be&&Yt(E,de),ne}function se(E,g,A,D){if(A==null)throw Error(o(151));for(var ne=null,je=null,te=g,de=g=0,ye=null,Se=A.next();te!==null&&!Se.done;de++,Se=A.next()){te.index>de?(ye=te,te=null):ye=te.sibling;var Cl=M(E,te,Se.value,D);if(Cl===null){te===null&&(te=ye);break}e&&te&&Cl.alternate===null&&t(E,te),g=i(Cl,g,de),je===null?ne=Cl:je.sibling=Cl,je=Cl,te=ye}if(Se.done)return l(E,te),be&&Yt(E,de),ne;if(te===null){for(;!Se.done;de++,Se=A.next())Se=L(E,Se.value,D),Se!==null&&(g=i(Se,g,de),je===null?ne=Se:je.sibling=Se,je=Se);return be&&Yt(E,de),ne}for(te=a(te);!Se.done;de++,Se=A.next())Se=k(te,E,de,Se.value,D),Se!==null&&(e&&Se.alternate!==null&&te.delete(Se.key===null?de:Se.key),g=i(Se,g,de),je===null?ne=Se:je.sibling=Se,je=Se);return e&&te.forEach(function(Av){return t(E,Av)}),be&&Yt(E,de),ne}function ke(E,g,A,D){if(typeof A=="object"&&A!==null&&A.type===U&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case Y:e:{for(var ne=A.key;g!==null;){if(g.key===ne){if(ne=A.type,ne===U){if(g.tag===7){l(E,g.sibling),D=s(g,A.props.children),D.return=E,E=D;break e}}else if(g.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===fe&&ql(ne)===g.type){l(E,g.sibling),D=s(g,A.props),Ia(D,A),D.return=E,E=D;break e}l(E,g);break}else t(E,g);g=g.sibling}A.type===U?(D=wl(A.props.children,E.mode,D,A.key),D.return=E,E=D):(D=Jn(A.type,A.key,A.props,null,E.mode,D),Ia(D,A),D.return=E,E=D)}return c(E);case w:e:{for(ne=A.key;g!==null;){if(g.key===ne)if(g.tag===4&&g.stateNode.containerInfo===A.containerInfo&&g.stateNode.implementation===A.implementation){l(E,g.sibling),D=s(g,A.children||[]),D.return=E,E=D;break e}else{l(E,g);break}else t(E,g);g=g.sibling}D=ki(A,E.mode,D),D.return=E,E=D}return c(E);case fe:return A=ql(A),ke(E,g,A,D)}if($(A))return P(E,g,A,D);if(oe(A)){if(ne=oe(A),typeof ne!="function")throw Error(o(150));return A=ne.call(A),se(E,g,A,D)}if(typeof A.then=="function")return ke(E,g,ts(A),D);if(A.$$typeof===ie)return ke(E,g,Fn(E,A),D);ls(E,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,g!==null&&g.tag===6?(l(E,g.sibling),D=s(g,A),D.return=E,E=D):(l(E,g),D=Mi(A,E.mode,D),D.return=E,E=D),c(E)):l(E,g)}return function(E,g,A,D){try{Fa=0;var ne=ke(E,g,A,D);return va=null,ne}catch(te){if(te===xa||te===Pn)throw te;var je=xt(29,te,null,E.mode);return je.lanes=D,je.return=E,je}finally{}}}var Gl=Xu(!0),Vu=Xu(!1),ul=!1;function Gi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qi(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 ol(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function dl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ne&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Kn(e),_u(e,null,l),t}return Zn(e,a,t,l),Kn(e)}function Pa(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,Lc(e,l)}}function Xi(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var c={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?s=i=c:i=i.next=c,l=l.next}while(l!==null);i===null?s=i=t:i=i.next=t}else s=i=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Vi=!1;function en(){if(Vi){var e=ma;if(e!==null)throw e}}function tn(e,t,l,a){Vi=!1;var s=e.updateQueue;ul=!1;var i=s.firstBaseUpdate,c=s.lastBaseUpdate,d=s.shared.pending;if(d!==null){s.shared.pending=null;var v=d,_=v.next;v.next=null,c===null?i=_:c.next=_,c=v;var O=e.alternate;O!==null&&(O=O.updateQueue,d=O.lastBaseUpdate,d!==c&&(d===null?O.firstBaseUpdate=_:d.next=_,O.lastBaseUpdate=v))}if(i!==null){var L=s.baseState;c=0,O=_=v=null,d=i;do{var M=d.lane&-536870913,k=M!==d.lane;if(k?(pe&M)===M:(a&M)===M){M!==0&&M===fa&&(Vi=!0),O!==null&&(O=O.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var P=e,se=d;M=t;var ke=l;switch(se.tag){case 1:if(P=se.payload,typeof P=="function"){L=P.call(ke,L,M);break e}L=P;break e;case 3:P.flags=P.flags&-65537|128;case 0:if(P=se.payload,M=typeof P=="function"?P.call(ke,L,M):P,M==null)break e;L=h({},L,M);break e;case 2:ul=!0}}M=d.callback,M!==null&&(e.flags|=64,k&&(e.flags|=8192),k=s.callbacks,k===null?s.callbacks=[M]:k.push(M))}else k={lane:M,tag:d.tag,payload:d.payload,callback:d.callback,next:null},O===null?(_=O=k,v=L):O=O.next=k,c|=M;if(d=d.next,d===null){if(d=s.shared.pending,d===null)break;k=d,d=k.next,k.next=null,s.lastBaseUpdate=k,s.shared.pending=null}}while(!0);O===null&&(v=L),s.baseState=v,s.firstBaseUpdate=_,s.lastBaseUpdate=O,i===null&&(s.shared.lanes=0),hl|=c,e.lanes=c,e.memoizedState=L}}function Zu(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Ku(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Zu(l[e],t)}var ha=b(null),as=b(0);function Ju(e,t){e=It,K(as,e),K(ha,t),It=e|t.baseLanes}function Zi(){K(as,It),K(ha,ha.current)}function Ki(){It=as.current,B(ha),B(as)}var vt=b(null),At=null;function fl(e){var t=e.alternate;K(He,He.current&1),K(vt,e),At===null&&(t===null||ha.current!==null||t.memoizedState!==null)&&(At=e)}function Ji(e){K(He,He.current),K(vt,e),At===null&&(At=e)}function $u(e){e.tag===22?(K(He,He.current),K(vt,e),At===null&&(At=e)):ml()}function ml(){K(He,He.current),K(vt,vt.current)}function ht(e){B(vt),At===e&&(At=null),B(He)}var He=b(0);function ns(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ec(l)||tc(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 Xt=0,ue=null,_e=null,Ge=null,ss=!1,pa=!1,Ql=!1,is=0,ln=0,ya=null,px=0;function we(){throw Error(o(321))}function $i(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!mt(e[l],t[l]))return!1;return!0}function Wi(e,t,l,a,s,i){return Xt=i,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?Oo:dr,Ql=!1,i=l(a,s),Ql=!1,pa&&(i=Fu(t,l,a,s)),Wu(e),i}function Wu(e){T.H=sn;var t=_e!==null&&_e.next!==null;if(Xt=0,Ge=_e=ue=null,ss=!1,ln=0,ya=null,t)throw Error(o(300));e===null||Qe||(e=e.dependencies,e!==null&&Wn(e)&&(Qe=!0))}function Fu(e,t,l,a){ue=e;var s=0;do{if(pa&&(ya=null),ln=0,pa=!1,25<=s)throw Error(o(301));if(s+=1,Ge=_e=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}T.H=Do,i=t(l,a)}while(pa);return i}function yx(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?an(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(ue.flags|=1024),t}function Fi(){var e=is!==0;return is=0,e}function Ii(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Pi(e){if(ss){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ss=!1}Xt=0,Ge=_e=ue=null,pa=!1,ln=is=0,ya=null}function tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?ue.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function qe(){if(_e===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Ge===null?ue.memoizedState:Ge.next;if(t!==null)Ge=t,_e=e;else{if(e===null)throw ue.alternate===null?Error(o(467)):Error(o(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Ge===null?ue.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function an(e){var t=ln;return ln+=1,ya===null&&(ya=[]),e=Yu(ya,e,t),t=ue,(Ge===null?t.memoizedState:Ge.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?Oo:dr),e}function cs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return an(e);if(e.$$typeof===ie)return We(e)}throw Error(o(438,String(e)))}function er(e){var t=null,l=ue.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=ue.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=rs(),ue.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]=ae;return t.index++,l}function Vt(e,t){return typeof t=="function"?t(e):t}function us(e){var t=qe();return tr(t,_e,e)}function tr(e,t,l){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=l;var s=e.baseQueue,i=a.pending;if(i!==null){if(s!==null){var c=s.next;s.next=i.next,i.next=c}t.baseQueue=s=i,a.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var d=c=null,v=null,_=t,O=!1;do{var L=_.lane&-536870913;if(L!==_.lane?(pe&L)===L:(Xt&L)===L){var M=_.revertLane;if(M===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),L===fa&&(O=!0);else if((Xt&M)===M){_=_.next,M===fa&&(O=!0);continue}else L={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},v===null?(d=v=L,c=i):v=v.next=L,ue.lanes|=M,hl|=M;L=_.action,Ql&&l(i,L),i=_.hasEagerState?_.eagerState:l(i,L)}else M={lane:L,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},v===null?(d=v=M,c=i):v=v.next=M,ue.lanes|=L,hl|=L;_=_.next}while(_!==null&&_!==t);if(v===null?c=i:v.next=d,!mt(i,e.memoizedState)&&(Qe=!0,O&&(l=ma,l!==null)))throw l;e.memoizedState=i,e.baseState=c,e.baseQueue=v,a.lastRenderedState=i}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function lr(e){var t=qe(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,i=t.memoizedState;if(s!==null){l.pending=null;var c=s=s.next;do i=e(i,c.action),c=c.next;while(c!==s);mt(i,t.memoizedState)||(Qe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function Iu(e,t,l){var a=ue,s=qe(),i=be;if(i){if(l===void 0)throw Error(o(407));l=l()}else l=t();var c=!mt((_e||s).memoizedState,l);if(c&&(s.memoizedState=l,Qe=!0),s=s.queue,sr(to.bind(null,a,s,e),[e]),s.getSnapshot!==t||c||Ge!==null&&Ge.memoizedState.tag&1){if(a.flags|=2048,ga(9,{destroy:void 0},eo.bind(null,a,s,l,t),null),ze===null)throw Error(o(349));i||(Xt&127)!==0||Pu(a,t,l)}return l}function Pu(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ue.updateQueue,t===null?(t=rs(),ue.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function eo(e,t,l,a){t.value=l,t.getSnapshot=a,lo(t)&&ao(e)}function to(e,t,l){return l(function(){lo(t)&&ao(e)})}function lo(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!mt(e,l)}catch{return!0}}function ao(e){var t=Dl(e,2);t!==null&&ut(t,e,2)}function ar(e){var t=tt();if(typeof e=="function"){var l=e;if(e=l(),Ql){ll(!0);try{l()}finally{ll(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vt,lastRenderedState:e},t}function no(e,t,l,a){return e.baseState=l,tr(e,_e,typeof a=="function"?a:Vt)}function gx(e,t,l,a,s){if(fs(e))throw Error(o(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){i.listeners.push(c)}};T.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,so(t,i)):(i.next=l.next,t.pending=l.next=i)}}function so(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=T.T,c={};T.T=c;try{var d=l(s,a),v=T.S;v!==null&&v(c,d),io(e,t,d)}catch(_){nr(e,t,_)}finally{i!==null&&c.types!==null&&(i.types=c.types),T.T=i}}else try{i=l(s,a),io(e,t,i)}catch(_){nr(e,t,_)}}function io(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){ro(e,t,a)},function(a){return nr(e,t,a)}):ro(e,t,l)}function ro(e,t,l){t.status="fulfilled",t.value=l,co(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,so(e,l)))}function nr(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,co(t),t=t.next;while(t!==a)}e.action=null}function co(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function uo(e,t){return t}function oo(e,t){if(be){var l=ze.formState;if(l!==null){e:{var a=ue;if(be){if(Re){t:{for(var s=Re,i=Ct;s.nodeType!==8;){if(!i){s=null;break t}if(s=_t(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){Re=_t(s.nextSibling),a=s.data==="F!";break e}}rl(a)}a=!1}a&&(t=l[0])}}return l=tt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uo,lastRenderedState:t},l.queue=a,l=ko.bind(null,ue,a),a.dispatch=l,a=ar(!1),i=or.bind(null,ue,!1,a.queue),a=tt(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=gx.bind(null,ue,s,i,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function fo(e){var t=qe();return mo(t,_e,e)}function mo(e,t,l){if(t=tr(e,t,uo)[0],e=us(Vt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=an(t)}catch(c){throw c===xa?Pn:c}else a=t;t=qe();var s=t.queue,i=s.dispatch;return l!==t.memoizedState&&(ue.flags|=2048,ga(9,{destroy:void 0},bx.bind(null,s,l),null)),[a,i,e]}function bx(e,t){e.action=t}function xo(e){var t=qe(),l=_e;if(l!==null)return mo(t,l,e);qe(),t=t.memoizedState,l=qe();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function ga(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=ue.updateQueue,t===null&&(t=rs(),ue.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 vo(){return qe().memoizedState}function os(e,t,l,a){var s=tt();ue.flags|=e,s.memoizedState=ga(1|t,{destroy:void 0},l,a===void 0?null:a)}function ds(e,t,l,a){var s=qe();a=a===void 0?null:a;var i=s.memoizedState.inst;_e!==null&&a!==null&&$i(a,_e.memoizedState.deps)?s.memoizedState=ga(t,i,l,a):(ue.flags|=e,s.memoizedState=ga(1|t,i,l,a))}function ho(e,t){os(8390656,8,e,t)}function sr(e,t){ds(2048,8,e,t)}function jx(e){ue.flags|=4;var t=ue.updateQueue;if(t===null)t=rs(),ue.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 jx({ref:t,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function yo(e,t){return ds(4,2,e,t)}function go(e,t){return ds(4,4,e,t)}function bo(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 jo(e,t,l){l=l!=null?l.concat([e]):null,ds(4,4,bo.bind(null,t,e),l)}function ir(){}function So(e,t){var l=qe();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&$i(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function No(e,t){var l=qe();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&$i(t,a[1]))return a[0];if(a=e(),Ql){ll(!0);try{e()}finally{ll(!1)}}return l.memoizedState=[a,t],a}function rr(e,t,l){return l===void 0||(Xt&1073741824)!==0&&(pe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Ed(),ue.lanes|=e,hl|=e,l)}function Eo(e,t,l,a){return mt(l,t)?l:ha.current!==null?(e=rr(e,l,a),mt(e,t)||(Qe=!0),e):(Xt&42)===0||(Xt&1073741824)!==0&&(pe&261930)===0?(Qe=!0,e.memoizedState=l):(e=Ed(),ue.lanes|=e,hl|=e,t)}function To(e,t,l,a,s){var i=H.p;H.p=i!==0&&8>i?i:8;var c=T.T,d={};T.T=d,or(e,!1,t,l);try{var v=s(),_=T.S;if(_!==null&&_(d,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var O=hx(v,a);nn(e,t,O,gt(e))}else nn(e,t,a,gt(e))}catch(L){nn(e,t,{then:function(){},status:"rejected",reason:L},gt())}finally{H.p=i,c!==null&&d.types!==null&&(c.types=d.types),T.T=c}}function Sx(){}function cr(e,t,l,a){if(e.tag!==5)throw Error(o(476));var s=Co(e).queue;To(e,s,t,W,l===null?Sx:function(){return Ao(e),l(a)})}function Co(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vt,lastRenderedState:W},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vt,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ao(e){var t=Co(e);t.next===null&&(t=e.alternate.memoizedState),nn(e,t.next.queue,{},gt())}function ur(){return We(Sn)}function _o(){return qe().memoizedState}function Mo(){return qe().memoizedState}function Nx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=gt();e=ol(l);var a=dl(t,e,l);a!==null&&(ut(a,t,l),Pa(a,t,l)),t={cache:Ui()},e.payload=t;return}t=t.return}}function Ex(e,t,l){var a=gt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fs(e)?zo(t,l):(l=Ai(e,t,l,a),l!==null&&(ut(l,e,a),Ro(l,t,a)))}function ko(e,t,l){var a=gt();nn(e,t,l,a)}function nn(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(fs(e))zo(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,d=i(c,l);if(s.hasEagerState=!0,s.eagerState=d,mt(d,c))return Zn(e,t,s,0),ze===null&&Vn(),!1}catch{}finally{}if(l=Ai(e,t,s,a),l!==null)return ut(l,e,a),Ro(l,t,a),!0}return!1}function or(e,t,l,a){if(a={lane:2,revertLane:Gr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},fs(e)){if(t)throw Error(o(479))}else t=Ai(e,l,a,2),t!==null&&ut(t,e,2)}function fs(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function zo(e,t){pa=ss=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Ro(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Lc(e,l)}}var sn={readContext:We,use:cs,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useLayoutEffect:we,useInsertionEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useSyncExternalStore:we,useId:we,useHostTransitionStatus:we,useFormState:we,useActionState:we,useOptimistic:we,useMemoCache:we,useCacheRefresh:we};sn.useEffectEvent=we;var Oo={readContext:We,use:cs,useCallback:function(e,t){return tt().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:ho,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,os(4194308,4,bo.bind(null,t,e),l)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var l=tt();t=t===void 0?null:t;var a=e();if(Ql){ll(!0);try{e()}finally{ll(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=tt();if(l!==void 0){var s=l(t);if(Ql){ll(!0);try{l(t)}finally{ll(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=Ex.bind(null,ue,e),[a.memoizedState,e]},useRef:function(e){var t=tt();return e={current:e},t.memoizedState=e},useState:function(e){e=ar(e);var t=e.queue,l=ko.bind(null,ue,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:ir,useDeferredValue:function(e,t){var l=tt();return rr(l,e,t)},useTransition:function(){var e=ar(!1);return e=To.bind(null,ue,e.queue,!0,!1),tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ue,s=tt();if(be){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),ze===null)throw Error(o(349));(pe&127)!==0||Pu(a,t,l)}s.memoizedState=l;var i={value:l,getSnapshot:t};return s.queue=i,ho(to.bind(null,a,i,e),[e]),a.flags|=2048,ga(9,{destroy:void 0},eo.bind(null,a,i,l,t),null),l},useId:function(){var e=tt(),t=ze.identifierPrefix;if(be){var l=Dt,a=Ot;l=(a&~(1<<32-ft(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=is++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=px++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ur,useFormState:oo,useActionState:oo,useOptimistic:function(e){var t=tt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=or.bind(null,ue,!0,l),l.dispatch=t,[e,t]},useMemoCache:er,useCacheRefresh:function(){return tt().memoizedState=Nx.bind(null,ue)},useEffectEvent:function(e){var t=tt(),l={impl:e};return t.memoizedState=l,function(){if((Ne&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},dr={readContext:We,use:cs,useCallback:So,useContext:We,useEffect:sr,useImperativeHandle:jo,useInsertionEffect:yo,useLayoutEffect:go,useMemo:No,useReducer:us,useRef:vo,useState:function(){return us(Vt)},useDebugValue:ir,useDeferredValue:function(e,t){var l=qe();return Eo(l,_e.memoizedState,e,t)},useTransition:function(){var e=us(Vt)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:an(e),t]},useSyncExternalStore:Iu,useId:_o,useHostTransitionStatus:ur,useFormState:fo,useActionState:fo,useOptimistic:function(e,t){var l=qe();return no(l,_e,e,t)},useMemoCache:er,useCacheRefresh:Mo};dr.useEffectEvent=po;var Do={readContext:We,use:cs,useCallback:So,useContext:We,useEffect:sr,useImperativeHandle:jo,useInsertionEffect:yo,useLayoutEffect:go,useMemo:No,useReducer:lr,useRef:vo,useState:function(){return lr(Vt)},useDebugValue:ir,useDeferredValue:function(e,t){var l=qe();return _e===null?rr(l,e,t):Eo(l,_e.memoizedState,e,t)},useTransition:function(){var e=lr(Vt)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:an(e),t]},useSyncExternalStore:Iu,useId:_o,useHostTransitionStatus:ur,useFormState:xo,useActionState:xo,useOptimistic:function(e,t){var l=qe();return _e!==null?no(l,_e,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:er,useCacheRefresh:Mo};Do.useEffectEvent=po;function fr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:h({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var mr={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=gt(),s=ol(a);s.payload=t,l!=null&&(s.callback=l),t=dl(e,s,a),t!==null&&(ut(t,e,a),Pa(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=gt(),s=ol(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=dl(e,s,a),t!==null&&(ut(t,e,a),Pa(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=gt(),a=ol(l);a.tag=2,t!=null&&(a.callback=t),t=dl(e,a,l),t!==null&&(ut(t,e,l),Pa(t,e,l))}};function wo(e,t,l,a,s,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,c):t.prototype&&t.prototype.isPureReactComponent?!Va(l,a)||!Va(s,i):!0}function Lo(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&&mr.enqueueReplaceState(t,t.state,null)}function Xl(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=h({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Bo(e){Xn(e)}function Uo(e){console.error(e)}function Ho(e){Xn(e)}function ms(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function qo(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function xr(e,t,l){return l=ol(l),l.tag=3,l.payload={element:null},l.callback=function(){ms(e,t)},l}function Yo(e){return e=ol(e),e.tag=3,e}function Go(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var i=a.value;e.payload=function(){return s(i)},e.callback=function(){qo(t,l,a)}}var c=l.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){qo(t,l,a),typeof s!="function"&&(pl===null?pl=new Set([this]):pl.add(this));var d=a.stack;this.componentDidCatch(a.value,{componentStack:d!==null?d:""})})}function Tx(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&da(t,l,s,!0),l=vt.current,l!==null){switch(l.tag){case 31:case 13:return At===null?Ts():l.alternate===null&&Le===0&&(Le=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===es?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Hr(e,a,s)),!1;case 22:return l.flags|=65536,a===es?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)),Hr(e,a,s)),!1}throw Error(o(435,l.tag))}return Hr(e,a,s),Ts(),!1}if(be)return t=vt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==Oi&&(e=Error(o(422),{cause:a}),Ja(Nt(e,l)))):(a!==Oi&&(t=Error(o(423),{cause:a}),Ja(Nt(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=Nt(a,l),s=xr(e.stateNode,a,s),Xi(e,s),Le!==4&&(Le=2)),!1;var i=Error(o(520),{cause:a});if(i=Nt(i,l),xn===null?xn=[i]:xn.push(i),Le!==4&&(Le=2),t===null)return!0;a=Nt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=xr(l.stateNode,a,e),Xi(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"&&(pl===null||!pl.has(i))))return l.flags|=65536,s&=-s,l.lanes|=s,s=Yo(s),Go(s,e,l,a),Xi(l,s),!1}l=l.return}while(l!==null);return!1}var vr=Error(o(461)),Qe=!1;function Fe(e,t,l,a){t.child=e===null?Vu(t,null,l,a):Gl(t,e.child,l,a)}function Qo(e,t,l,a,s){l=l.render;var i=t.ref;if("ref"in a){var c={};for(var d in a)d!=="ref"&&(c[d]=a[d])}else c=a;return Ul(t),a=Wi(e,t,l,c,i,s),d=Fi(),e!==null&&!Qe?(Ii(e,t,s),Zt(e,t,s)):(be&&d&&zi(t),t.flags|=1,Fe(e,t,a,s),t.child)}function Xo(e,t,l,a,s){if(e===null){var i=l.type;return typeof i=="function"&&!_i(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Vo(e,t,i,a,s)):(e=Jn(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Nr(e,s)){var c=i.memoizedProps;if(l=l.compare,l=l!==null?l:Va,l(c,a)&&e.ref===t.ref)return Zt(e,t,s)}return t.flags|=1,e=qt(i,a),e.ref=t.ref,e.return=t,t.child=e}function Vo(e,t,l,a,s){if(e!==null){var i=e.memoizedProps;if(Va(i,a)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=a=i,Nr(e,s))(e.flags&131072)!==0&&(Qe=!0);else return t.lanes=e.lanes,Zt(e,t,s)}return hr(e,t,l,a,s)}function Zo(e,t,l,a){var s=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~i}else a=0,t.child=null;return Ko(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&In(t,i!==null?i.cachePool:null),i!==null?Ju(t,i):Zi(),$u(t);else return a=t.lanes=536870912,Ko(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(In(t,i.cachePool),Ju(t,i),ml(),t.memoizedState=null):(e!==null&&In(t,null),Zi(),ml());return Fe(e,t,s,l),t.child}function rn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ko(e,t,l,a,s){var i=qi();return i=i===null?null:{parent:Ye._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&In(t,null),Zi(),$u(t),e!==null&&da(e,t,a,!0),t.childLanes=s,null}function xs(e,t){return t=hs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jo(e,t,l){return Gl(t,e.child,null,l),e=xs(t,t.pendingProps),e.flags|=2,ht(t),t.memoizedState=null,e}function Cx(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(be){if(a.mode==="hidden")return e=xs(t,a),t.lanes=536870912,rn(null,e);if(Ji(t),(e=Re)?(e=rf(e,Ct),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sl!==null?{id:Ot,overflow:Dt}:null,retryLane:536870912,hydrationErrors:null},l=ku(e),l.return=t,t.child=l,$e=t,Re=null)):e=null,e===null)throw rl(t);return t.lanes=536870912,null}return xs(t,a)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(Ji(t),s)if(t.flags&256)t.flags&=-257,t=Jo(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Qe||da(e,t,l,!1),s=(l&e.childLanes)!==0,Qe||s){if(a=ze,a!==null&&(c=Bc(a,l),c!==0&&c!==i.retryLane))throw i.retryLane=c,Dl(e,c),ut(a,e,c),vr;Ts(),t=Jo(e,t,l)}else e=i.treeContext,Re=_t(c.nextSibling),$e=t,be=!0,il=null,Ct=!1,e!==null&&Ou(t,e),t=xs(t,a),t.flags|=4096;return t}return e=qt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vs(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(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function hr(e,t,l,a,s){return Ul(t),l=Wi(e,t,l,a,void 0,s),a=Fi(),e!==null&&!Qe?(Ii(e,t,s),Zt(e,t,s)):(be&&a&&zi(t),t.flags|=1,Fe(e,t,l,s),t.child)}function $o(e,t,l,a,s,i){return Ul(t),t.updateQueue=null,l=Fu(t,a,l,s),Wu(e),a=Fi(),e!==null&&!Qe?(Ii(e,t,i),Zt(e,t,i)):(be&&a&&zi(t),t.flags|=1,Fe(e,t,l,i),t.child)}function Wo(e,t,l,a,s){if(Ul(t),t.stateNode===null){var i=ra,c=l.contextType;typeof c=="object"&&c!==null&&(i=We(c)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=mr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Gi(t),c=l.contextType,i.context=typeof c=="object"&&c!==null?We(c):ra,i.state=t.memoizedState,c=l.getDerivedStateFromProps,typeof c=="function"&&(fr(t,l,c,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(c=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),c!==i.state&&mr.enqueueReplaceState(i,i.state,null),tn(t,a,i,s),en(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var d=t.memoizedProps,v=Xl(l,d);i.props=v;var _=i.context,O=l.contextType;c=ra,typeof O=="object"&&O!==null&&(c=We(O));var L=l.getDerivedStateFromProps;O=typeof L=="function"||typeof i.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,O||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(d||_!==c)&&Lo(t,i,a,c),ul=!1;var M=t.memoizedState;i.state=M,tn(t,a,i,s),en(),_=t.memoizedState,d||M!==_||ul?(typeof L=="function"&&(fr(t,l,L,a),_=t.memoizedState),(v=ul||wo(t,l,v,a,M,_,c))?(O||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=_),i.props=a,i.state=_,i.context=c,a=v):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Qi(e,t),c=t.memoizedProps,O=Xl(l,c),i.props=O,L=t.pendingProps,M=i.context,_=l.contextType,v=ra,typeof _=="object"&&_!==null&&(v=We(_)),d=l.getDerivedStateFromProps,(_=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==L||M!==v)&&Lo(t,i,a,v),ul=!1,M=t.memoizedState,i.state=M,tn(t,a,i,s),en();var k=t.memoizedState;c!==L||M!==k||ul||e!==null&&e.dependencies!==null&&Wn(e.dependencies)?(typeof d=="function"&&(fr(t,l,d,a),k=t.memoizedState),(O=ul||wo(t,l,O,a,M,k,v)||e!==null&&e.dependencies!==null&&Wn(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,k,v),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,k,v)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=k),i.props=a,i.state=k,i.context=v,a=O):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,vs(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=Gl(t,e.child,null,s),t.child=Gl(t,null,l,s)):Fe(e,t,l,s),t.memoizedState=i.state,e=t.child):e=Zt(e,t,s),e}function Fo(e,t,l,a){return Ll(),t.flags|=256,Fe(e,t,l,a),t.child}var pr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yr(e){return{baseLanes:e,cachePool:Hu()}}function gr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=yt),e}function Io(e,t,l){var a=t.pendingProps,s=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(He.current&2)!==0),c&&(s=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(be){if(s?fl(t):ml(),(e=Re)?(e=rf(e,Ct),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sl!==null?{id:Ot,overflow:Dt}:null,retryLane:536870912,hydrationErrors:null},l=ku(e),l.return=t,t.child=l,$e=t,Re=null)):e=null,e===null)throw rl(t);return tc(e)?t.lanes=32:t.lanes=536870912,null}var d=a.children;return a=a.fallback,s?(ml(),s=t.mode,d=hs({mode:"hidden",children:d},s),a=wl(a,s,l,null),d.return=t,a.return=t,d.sibling=a,t.child=d,a=t.child,a.memoizedState=yr(l),a.childLanes=gr(e,c,l),t.memoizedState=pr,rn(null,a)):(fl(t),br(t,d))}var v=e.memoizedState;if(v!==null&&(d=v.dehydrated,d!==null)){if(i)t.flags&256?(fl(t),t.flags&=-257,t=jr(e,t,l)):t.memoizedState!==null?(ml(),t.child=e.child,t.flags|=128,t=null):(ml(),d=a.fallback,s=t.mode,a=hs({mode:"visible",children:a.children},s),d=wl(d,s,l,null),d.flags|=2,a.return=t,d.return=t,a.sibling=d,t.child=a,Gl(t,e.child,null,l),a=t.child,a.memoizedState=yr(l),a.childLanes=gr(e,c,l),t.memoizedState=pr,t=rn(null,a));else if(fl(t),tc(d)){if(c=d.nextSibling&&d.nextSibling.dataset,c)var _=c.dgst;c=_,a=Error(o(419)),a.stack="",a.digest=c,Ja({value:a,source:null,stack:null}),t=jr(e,t,l)}else if(Qe||da(e,t,l,!1),c=(l&e.childLanes)!==0,Qe||c){if(c=ze,c!==null&&(a=Bc(c,l),a!==0&&a!==v.retryLane))throw v.retryLane=a,Dl(e,a),ut(c,e,a),vr;ec(d)||Ts(),t=jr(e,t,l)}else ec(d)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,Re=_t(d.nextSibling),$e=t,be=!0,il=null,Ct=!1,e!==null&&Ou(t,e),t=br(t,a.children),t.flags|=4096);return t}return s?(ml(),d=a.fallback,s=t.mode,v=e.child,_=v.sibling,a=qt(v,{mode:"hidden",children:a.children}),a.subtreeFlags=v.subtreeFlags&65011712,_!==null?d=qt(_,d):(d=wl(d,s,l,null),d.flags|=2),d.return=t,a.return=t,a.sibling=d,t.child=a,rn(null,a),a=t.child,d=e.child.memoizedState,d===null?d=yr(l):(s=d.cachePool,s!==null?(v=Ye._currentValue,s=s.parent!==v?{parent:v,pool:v}:s):s=Hu(),d={baseLanes:d.baseLanes|l,cachePool:s}),a.memoizedState=d,a.childLanes=gr(e,c,l),t.memoizedState=pr,rn(e.child,a)):(fl(t),l=e.child,e=l.sibling,l=qt(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=l,t.memoizedState=null,l)}function br(e,t){return t=hs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function hs(e,t){return e=xt(22,e,null,t),e.lanes=0,e}function jr(e,t,l){return Gl(t,e.child,null,l),e=br(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Po(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Li(e.return,t,l)}function Sr(e,t,l,a,s,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=l,c.tailMode=s,c.treeForkCount=i)}function ed(e,t,l){var a=t.pendingProps,s=a.revealOrder,i=a.tail;a=a.children;var c=He.current,d=(c&2)!==0;if(d?(c=c&1|2,t.flags|=128):c&=1,K(He,c),Fe(e,t,a,l),a=be?Ka:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Po(e,l,t);else if(e.tag===19)Po(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&ns(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),Sr(t,!1,s,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ns(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}Sr(t,!0,l,null,i,a);break;case"together":Sr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Zt(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),hl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(da(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=qt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=qt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Nr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Wn(e)))}function Ax(e,t,l){switch(t.tag){case 3:et(t,t.stateNode.containerInfo),cl(t,Ye,e.memoizedState.cache),Ll();break;case 27:case 5:Ra(t);break;case 4:et(t,t.stateNode.containerInfo);break;case 10:cl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ji(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(fl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Io(e,t,l):(fl(t),e=Zt(e,t,l),e!==null?e.sibling:null);fl(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(da(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return ed(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),K(He,He.current),a)break;return null;case 22:return t.lanes=0,Zo(e,t,l,t.pendingProps);case 24:cl(t,Ye,e.memoizedState.cache)}return Zt(e,t,l)}function td(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qe=!0;else{if(!Nr(e,l)&&(t.flags&128)===0)return Qe=!1,Ax(e,t,l);Qe=(e.flags&131072)!==0}else Qe=!1,be&&(t.flags&1048576)!==0&&Ru(t,Ka,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ql(t.elementType),t.type=e,typeof e=="function")_i(e)?(a=Xl(e,a),t.tag=1,t=Wo(null,t,e,a,l)):(t.tag=0,t=hr(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===Q){t.tag=11,t=Qo(null,t,e,a,l);break e}else if(s===J){t.tag=14,t=Xo(null,t,e,a,l);break e}}throw t=R(e)||e,Error(o(306,t,""))}}return t;case 0:return hr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=Xl(a,t.pendingProps),Wo(e,t,a,s,l);case 3:e:{if(et(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,Qi(e,t),tn(t,a,null,l);var c=t.memoizedState;if(a=c.cache,cl(t,Ye,a),a!==i.cache&&Bi(t,[Ye],l,!0),en(),a=c.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Fo(e,t,a,l);break e}else if(a!==s){s=Nt(Error(o(424)),t),Ja(s),t=Fo(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(Re=_t(e.firstChild),$e=t,be=!0,il=null,Ct=!0,l=Vu(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ll(),a===s){t=Zt(e,t,l);break e}Fe(e,t,a,l)}t=t.child}return t;case 26:return vs(e,t),e===null?(l=mf(t.type,null,t.pendingProps,null))?t.memoizedState=l:be||(l=t.type,e=t.pendingProps,a=Rs(xe.current).createElement(l),a[Je]=t,a[at]=e,Ie(a,l,e),Ze(a),t.stateNode=a):t.memoizedState=mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ra(t),e===null&&be&&(a=t.stateNode=of(t.type,t.pendingProps,xe.current),$e=t,Ct=!0,s=Re,jl(t.type)?(lc=s,Re=_t(a.firstChild)):Re=s),Fe(e,t,t.pendingProps.children,l),vs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&be&&((s=a=Re)&&(a=av(a,t.type,t.pendingProps,Ct),a!==null?(t.stateNode=a,$e=t,Re=_t(a.firstChild),Ct=!1,s=!0):s=!1),s||rl(t)),Ra(t),s=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,a=i.children,Fr(s,i)?a=null:c!==null&&Fr(s,c)&&(t.flags|=32),t.memoizedState!==null&&(s=Wi(e,t,yx,null,null,l),Sn._currentValue=s),vs(e,t),Fe(e,t,a,l),t.child;case 6:return e===null&&be&&((e=l=Re)&&(l=nv(l,t.pendingProps,Ct),l!==null?(t.stateNode=l,$e=t,Re=null,e=!0):e=!1),e||rl(t)),null;case 13:return Io(e,t,l);case 4:return et(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Gl(t,null,a,l):Fe(e,t,a,l),t.child;case 11:return Qo(e,t,t.type,t.pendingProps,l);case 7:return Fe(e,t,t.pendingProps,l),t.child;case 8:return Fe(e,t,t.pendingProps.children,l),t.child;case 12:return Fe(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,cl(t,t.type,a.value),Fe(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,Ul(t),s=We(s),a=a(s),t.flags|=1,Fe(e,t,a,l),t.child;case 14:return Xo(e,t,t.type,t.pendingProps,l);case 15:return Vo(e,t,t.type,t.pendingProps,l);case 19:return ed(e,t,l);case 31:return Cx(e,t,l);case 22:return Zo(e,t,l,t.pendingProps);case 24:return Ul(t),a=We(Ye),e===null?(s=qi(),s===null&&(s=ze,i=Ui(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=l),s=i),t.memoizedState={parent:a,cache:s},Gi(t),cl(t,Ye,s)):((e.lanes&l)!==0&&(Qi(e,t),tn(t,null,null,l),en()),s=e.memoizedState,i=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),cl(t,Ye,a)):(a=i.cache,cl(t,Ye,a),a!==s.cache&&Bi(t,[Ye],l,!0))),Fe(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Kt(e){e.flags|=4}function Er(e,t,l,a,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(_d())e.flags|=8192;else throw Yl=es,Yi}else e.flags&=-16777217}function ld(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!yf(t))if(_d())e.flags|=8192;else throw Yl=es,Yi}function ps(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Dc():536870912,e.lanes|=t,Na|=t)}function cn(e,t){if(!be)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 Oe(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function _x(e,t,l){var a=t.pendingProps;switch(Ri(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oe(t),null;case 1:return Oe(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Qt(Ye),Ue(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(oa(t)?Kt(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Di())),Oe(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(Kt(t),i!==null?(Oe(t),ld(t,i)):(Oe(t),Er(t,s,null,a,l))):i?i!==e.memoizedState?(Kt(t),Oe(t),ld(t,i)):(Oe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Kt(t),Oe(t),Er(t,s,e,a,l)),null;case 27:if(_n(t),l=xe.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Kt(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Oe(t),null}e=ee.current,oa(t)?Du(t):(e=of(s,a,l),t.stateNode=e,Kt(t))}return Oe(t),null;case 5:if(_n(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Kt(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Oe(t),null}if(i=ee.current,oa(t))Du(t);else{var c=Rs(xe.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?c.createElement(s,{is:a.is}):c.createElement(s)}}i[Je]=t,i[at]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=i;e:switch(Ie(i,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Kt(t)}}return Oe(t),Er(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Kt(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=xe.current,oa(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=$e,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[Je]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Id(e.nodeValue,l)),e||rl(t,!0)}else e=Rs(e).createTextNode(a),e[Je]=t,t.stateNode=e}return Oe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=oa(t),l!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Je]=t}else Ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),e=!1}else l=Di(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(ht(t),t):(ht(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Oe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=oa(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(o(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));s[Je]=t}else Ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),s=!1}else s=Di(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(ht(t),t):(ht(t),null)}return ht(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),ps(t,t.updateQueue),Oe(t),null);case 4:return Ue(),e===null&&Zr(t.stateNode.containerInfo),Oe(t),null;case 10:return Qt(t.type),Oe(t),null;case 19:if(B(He),a=t.memoizedState,a===null)return Oe(t),null;if(s=(t.flags&128)!==0,i=a.rendering,i===null)if(s)cn(a,!1);else{if(Le!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=ns(e),i!==null){for(t.flags|=128,cn(a,!1),e=i.updateQueue,t.updateQueue=e,ps(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Mu(l,e),l=l.sibling;return K(He,He.current&1|2),be&&Yt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ot()>Ss&&(t.flags|=128,s=!0,cn(a,!1),t.lanes=4194304)}else{if(!s)if(e=ns(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,ps(t,e),cn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!be)return Oe(t),null}else 2*ot()-a.renderingStartTime>Ss&&l!==536870912&&(t.flags|=128,s=!0,cn(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=ot(),e.sibling=null,l=He.current,K(He,s?l&1|2:l&1),be&&Yt(t,a.treeForkCount),e):(Oe(t),null);case 22:case 23:return ht(t),Ki(),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&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),l=t.updateQueue,l!==null&&ps(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&B(Hl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Qt(Ye),Oe(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Mx(e,t){switch(Ri(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qt(Ye),Ue(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _n(t),null;case 31:if(t.memoizedState!==null){if(ht(t),t.alternate===null)throw Error(o(340));Ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(He),null;case 4:return Ue(),null;case 10:return Qt(t.type),null;case 22:case 23:return ht(t),Ki(),e!==null&&B(Hl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qt(Ye),null;case 25:return null;default:return null}}function ad(e,t){switch(Ri(t),t.tag){case 3:Qt(Ye),Ue();break;case 26:case 27:case 5:_n(t);break;case 4:Ue();break;case 31:t.memoizedState!==null&&ht(t);break;case 13:ht(t);break;case 19:B(He);break;case 10:Qt(t.type);break;case 22:case 23:ht(t),Ki(),e!==null&&B(Hl);break;case 24:Qt(Ye)}}function un(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var i=l.create,c=l.inst;a=i(),c.destroy=a}l=l.next}while(l!==s)}}catch(d){Ae(t,t.return,d)}}function xl(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var i=s.next;a=i;do{if((a.tag&e)===e){var c=a.inst,d=c.destroy;if(d!==void 0){c.destroy=void 0,s=t;var v=l,_=d;try{_()}catch(O){Ae(s,v,O)}}}a=a.next}while(a!==i)}}catch(O){Ae(t,t.return,O)}}function nd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Ku(t,l)}catch(a){Ae(e,e.return,a)}}}function sd(e,t,l){l.props=Xl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ae(e,t,a)}}function on(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){Ae(e,t,s)}}function wt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){Ae(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){Ae(e,t,s)}else l.current=null}function id(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){Ae(e,e.return,s)}}function Tr(e,t,l){try{var a=e.stateNode;Fx(a,e.type,l,t),a[at]=t}catch(s){Ae(e,e.return,s)}}function rd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&jl(e.type)||e.tag===4}function Cr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rd(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&&jl(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 Ar(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=Ut));else if(a!==4&&(a===27&&jl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Ar(e,t,l),e=e.sibling;e!==null;)Ar(e,t,l),e=e.sibling}function ys(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&&jl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(ys(e,t,l),e=e.sibling;e!==null;)ys(e,t,l),e=e.sibling}function cd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Ie(t,a,l),t[Je]=e,t[at]=l}catch(i){Ae(e,e.return,i)}}var Jt=!1,Xe=!1,_r=!1,ud=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function kx(e,t){if(e=e.containerInfo,$r=Hs,e=bu(e),ji(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var c=0,d=-1,v=-1,_=0,O=0,L=e,M=null;t:for(;;){for(var k;L!==l||s!==0&&L.nodeType!==3||(d=c+s),L!==i||a!==0&&L.nodeType!==3||(v=c+a),L.nodeType===3&&(c+=L.nodeValue.length),(k=L.firstChild)!==null;)M=L,L=k;for(;;){if(L===e)break t;if(M===l&&++_===s&&(d=c),M===i&&++O===a&&(v=c),(k=L.nextSibling)!==null)break;L=M,M=L.parentNode}L=k}l=d===-1||v===-1?null:{start:d,end:v}}else l=null}l=l||{start:0,end:0}}else l=null;for(Wr={focusedElem:e,selectionRange:l},Hs=!1,Ke=t;Ke!==null;)if(t=Ke,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ke=e;else for(;Ke!==null;){switch(t=Ke,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,s=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var P=Xl(l.type,s);e=a.getSnapshotBeforeUpdate(P,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(se){Ae(l,l.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Pr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pr(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Ke=e;break}Ke=t.return}}function od(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Wt(e,l),a&4&&un(5,l);break;case 1:if(Wt(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(c){Ae(l,l.return,c)}else{var s=Xl(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){Ae(l,l.return,c)}}a&64&&nd(l),a&512&&on(l,l.return);break;case 3:if(Wt(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{Ku(e,t)}catch(c){Ae(l,l.return,c)}}break;case 27:t===null&&a&4&&cd(l);case 26:case 5:Wt(e,l),t===null&&a&4&&id(l),a&512&&on(l,l.return);break;case 12:Wt(e,l);break;case 31:Wt(e,l),a&4&&md(e,l);break;case 13:Wt(e,l),a&4&&xd(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Hx.bind(null,l),sv(e,l))));break;case 22:if(a=l.memoizedState!==null||Jt,!a){t=t!==null&&t.memoizedState!==null||Xe,s=Jt;var i=Xe;Jt=a,(Xe=t)&&!i?Ft(e,l,(l.subtreeFlags&8772)!==0):Wt(e,l),Jt=s,Xe=i}break;case 30:break;default:Wt(e,l)}}function dd(e){var t=e.alternate;t!==null&&(e.alternate=null,dd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ni(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,st=!1;function $t(e,t,l){for(l=l.child;l!==null;)fd(e,t,l),l=l.sibling}function fd(e,t,l){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Oa,l)}catch{}switch(l.tag){case 26:Xe||wt(l,t),$t(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Xe||wt(l,t);var a=De,s=st;jl(l.type)&&(De=l.stateNode,st=!1),$t(e,t,l),gn(l.stateNode),De=a,st=s;break;case 5:Xe||wt(l,t);case 6:if(a=De,s=st,De=null,$t(e,t,l),De=a,st=s,De!==null)if(st)try{(De.nodeType===9?De.body:De.nodeName==="HTML"?De.ownerDocument.body:De).removeChild(l.stateNode)}catch(i){Ae(l,t,i)}else try{De.removeChild(l.stateNode)}catch(i){Ae(l,t,i)}break;case 18:De!==null&&(st?(e=De,nf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),za(e)):nf(De,l.stateNode));break;case 4:a=De,s=st,De=l.stateNode.containerInfo,st=!0,$t(e,t,l),De=a,st=s;break;case 0:case 11:case 14:case 15:xl(2,l,t),Xe||xl(4,l,t),$t(e,t,l);break;case 1:Xe||(wt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&sd(l,t,a)),$t(e,t,l);break;case 21:$t(e,t,l);break;case 22:Xe=(a=Xe)||l.memoizedState!==null,$t(e,t,l),Xe=a;break;default:$t(e,t,l)}}function md(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{za(e)}catch(l){Ae(t,t.return,l)}}}function xd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{za(e)}catch(l){Ae(t,t.return,l)}}function zx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ud),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ud),t;default:throw Error(o(435,e.tag))}}function gs(e,t){var l=zx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=qx.bind(null,e,a);a.then(s,s)}})}function it(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],i=e,c=t,d=c;e:for(;d!==null;){switch(d.tag){case 27:if(jl(d.type)){De=d.stateNode,st=!1;break e}break;case 5:De=d.stateNode,st=!1;break e;case 3:case 4:De=d.stateNode.containerInfo,st=!0;break e}d=d.return}if(De===null)throw Error(o(160));fd(i,c,s),De=null,st=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vd(t,e),t=t.sibling}var zt=null;function vd(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:it(t,e),rt(e),a&4&&(xl(3,e,e.return),un(3,e),xl(5,e,e.return));break;case 1:it(t,e),rt(e),a&512&&(Xe||l===null||wt(l,l.return)),a&64&&Jt&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=zt;if(it(t,e),rt(e),a&512&&(Xe||l===null||wt(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":i=s.getElementsByTagName("title")[0],(!i||i[La]||i[Je]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),Ie(i,a,l),i[Je]=e,Ze(i),a=i;break e;case"link":var c=hf("link","href",s).get(a+(l.href||""));if(c){for(var d=0;d<c.length;d++)if(i=c[d],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)){c.splice(d,1);break t}}i=s.createElement(a),Ie(i,a,l),s.head.appendChild(i);break;case"meta":if(c=hf("meta","content",s).get(a+(l.content||""))){for(d=0;d<c.length;d++)if(i=c[d],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)){c.splice(d,1);break t}}i=s.createElement(a),Ie(i,a,l),s.head.appendChild(i);break;default:throw Error(o(468,a))}i[Je]=e,Ze(i),a=i}e.stateNode=a}else pf(s,e.type,e.stateNode);else e.stateNode=vf(s,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?pf(s,e.type,e.stateNode):vf(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Tr(e,e.memoizedProps,l.memoizedProps)}break;case 27:it(t,e),rt(e),a&512&&(Xe||l===null||wt(l,l.return)),l!==null&&a&4&&Tr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(it(t,e),rt(e),a&512&&(Xe||l===null||wt(l,l.return)),e.flags&32){s=e.stateNode;try{ea(s,"")}catch(P){Ae(e,e.return,P)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,Tr(e,s,l!==null?l.memoizedProps:s)),a&1024&&(_r=!0);break;case 6:if(it(t,e),rt(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(P){Ae(e,e.return,P)}}break;case 3:if(ws=null,s=zt,zt=Os(t.containerInfo),it(t,e),zt=s,rt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{za(t.containerInfo)}catch(P){Ae(e,e.return,P)}_r&&(_r=!1,hd(e));break;case 4:a=zt,zt=Os(e.stateNode.containerInfo),it(t,e),rt(e),zt=a;break;case 12:it(t,e),rt(e);break;case 31:it(t,e),rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 13:it(t,e),rt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(js=ot()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 22:s=e.memoizedState!==null;var v=l!==null&&l.memoizedState!==null,_=Jt,O=Xe;if(Jt=_||s,Xe=O||v,it(t,e),Xe=O,Jt=_,rt(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||v||Jt||Xe||Vl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){v=l=t;try{if(i=v.stateNode,s)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{d=v.stateNode;var L=v.memoizedProps.style,M=L!=null&&L.hasOwnProperty("display")?L.display:null;d.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(P){Ae(v,v.return,P)}}}else if(t.tag===6){if(l===null){v=t;try{v.stateNode.nodeValue=s?"":v.memoizedProps}catch(P){Ae(v,v.return,P)}}}else if(t.tag===18){if(l===null){v=t;try{var k=v.stateNode;s?sf(k,!0):sf(v.stateNode,!1)}catch(P){Ae(v,v.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,gs(e,l))));break;case 19:it(t,e),rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 30:break;case 21:break;default:it(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(rd(a)){l=a;break}a=a.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var s=l.stateNode,i=Cr(e);ys(e,i,s);break;case 5:var c=l.stateNode;l.flags&32&&(ea(c,""),l.flags&=-33);var d=Cr(e);ys(e,d,c);break;case 3:case 4:var v=l.stateNode.containerInfo,_=Cr(e);Ar(e,_,v);break;default:throw Error(o(161))}}catch(O){Ae(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;hd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wt(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)od(e,t.alternate,t),t=t.sibling}function Vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xl(4,t,t.return),Vl(t);break;case 1:wt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&sd(t,t.return,l),Vl(t);break;case 27:gn(t.stateNode);case 26:case 5:wt(t,t.return),Vl(t);break;case 22:t.memoizedState===null&&Vl(t);break;case 30:Vl(t);break;default:Vl(t)}e=e.sibling}}function Ft(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:Ft(s,i,l),un(4,i);break;case 1:if(Ft(s,i,l),a=i,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(_){Ae(a,a.return,_)}if(a=i,s=a.updateQueue,s!==null){var d=a.stateNode;try{var v=s.shared.hiddenCallbacks;if(v!==null)for(s.shared.hiddenCallbacks=null,s=0;s<v.length;s++)Zu(v[s],d)}catch(_){Ae(a,a.return,_)}}l&&c&64&&nd(i),on(i,i.return);break;case 27:cd(i);case 26:case 5:Ft(s,i,l),l&&a===null&&c&4&&id(i),on(i,i.return);break;case 12:Ft(s,i,l);break;case 31:Ft(s,i,l),l&&c&4&&md(s,i);break;case 13:Ft(s,i,l),l&&c&4&&xd(s,i);break;case 22:i.memoizedState===null&&Ft(s,i,l),on(i,i.return);break;case 30:break;default:Ft(s,i,l)}t=t.sibling}}function Mr(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&&$a(l))}function kr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$a(e))}function Rt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pd(e,t,l,a),t=t.sibling}function pd(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Rt(e,t,l,a),s&2048&&un(9,t);break;case 1:Rt(e,t,l,a);break;case 3:Rt(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$a(e)));break;case 12:if(s&2048){Rt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,d=i.onPostCommit;typeof d=="function"&&d(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){Ae(t,t.return,v)}}else Rt(e,t,l,a);break;case 31:Rt(e,t,l,a);break;case 13:Rt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?Rt(e,t,l,a):dn(e,t):i._visibility&2?Rt(e,t,l,a):(i._visibility|=2,ba(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Mr(c,t);break;case 24:Rt(e,t,l,a),s&2048&&kr(t.alternate,t);break;default:Rt(e,t,l,a)}}function ba(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,d=l,v=a,_=c.flags;switch(c.tag){case 0:case 11:case 15:ba(i,c,d,v,s),un(8,c);break;case 23:break;case 22:var O=c.stateNode;c.memoizedState!==null?O._visibility&2?ba(i,c,d,v,s):dn(i,c):(O._visibility|=2,ba(i,c,d,v,s)),s&&_&2048&&Mr(c.alternate,c);break;case 24:ba(i,c,d,v,s),s&&_&2048&&kr(c.alternate,c);break;default:ba(i,c,d,v,s)}t=t.sibling}}function dn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:dn(l,a),s&2048&&Mr(a.alternate,a);break;case 24:dn(l,a),s&2048&&kr(a.alternate,a);break;default:dn(l,a)}t=t.sibling}}var fn=8192;function ja(e,t,l){if(e.subtreeFlags&fn)for(e=e.child;e!==null;)yd(e,t,l),e=e.sibling}function yd(e,t,l){switch(e.tag){case 26:ja(e,t,l),e.flags&fn&&e.memoizedState!==null&&pv(l,zt,e.memoizedState,e.memoizedProps);break;case 5:ja(e,t,l);break;case 3:case 4:var a=zt;zt=Os(e.stateNode.containerInfo),ja(e,t,l),zt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=fn,fn=16777216,ja(e,t,l),fn=a):ja(e,t,l));break;default:ja(e,t,l)}}function gd(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 mn(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];Ke=a,jd(a,e)}gd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bd(e),e=e.sibling}function bd(e){switch(e.tag){case 0:case 11:case 15:mn(e),e.flags&2048&&xl(9,e,e.return);break;case 3:mn(e);break;case 12:mn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,bs(e)):mn(e);break;default:mn(e)}}function bs(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];Ke=a,jd(a,e)}gd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xl(8,t,t.return),bs(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,bs(t));break;default:bs(t)}e=e.sibling}}function jd(e,t){for(;Ke!==null;){var l=Ke;switch(l.tag){case 0:case 11:case 15:xl(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:$a(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Ke=a;else e:for(l=e;Ke!==null;){a=Ke;var s=a.sibling,i=a.return;if(dd(a),a===l){Ke=null;break e}if(s!==null){s.return=i,Ke=s;break e}Ke=i}}}var Rx={getCacheForType:function(e){var t=We(Ye),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return We(Ye).controller.signal}},Ox=typeof WeakMap=="function"?WeakMap:Map,Ne=0,ze=null,ve=null,pe=0,Ce=0,pt=null,vl=!1,Sa=!1,zr=!1,It=0,Le=0,hl=0,Zl=0,Rr=0,yt=0,Na=0,xn=null,ct=null,Or=!1,js=0,Sd=0,Ss=1/0,Ns=null,pl=null,Ve=0,yl=null,Ea=null,Pt=0,Dr=0,wr=null,Nd=null,vn=0,Lr=null;function gt(){return(Ne&2)!==0&&pe!==0?pe&-pe:T.T!==null?Gr():Uc()}function Ed(){if(yt===0)if((pe&536870912)===0||be){var e=zn;zn<<=1,(zn&3932160)===0&&(zn=262144),yt=e}else yt=536870912;return e=vt.current,e!==null&&(e.flags|=32),yt}function ut(e,t,l){(e===ze&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Ta(e,0),gl(e,pe,yt,!1)),wa(e,l),((Ne&2)===0||e!==ze)&&(e===ze&&((Ne&2)===0&&(Zl|=l),Le===4&&gl(e,pe,yt,!1)),Lt(e))}function Td(e,t,l){if((Ne&6)!==0)throw Error(o(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Da(e,t),s=a?Lx(e,t):Ur(e,t,!0),i=a;do{if(s===0){Sa&&!a&&gl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Dx(l)){s=Ur(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var d=e;s=xn;var v=d.current.memoizedState.isDehydrated;if(v&&(Ta(d,c).flags|=256),c=Ur(d,c,!1),c!==2){if(zr&&!v){d.errorRecoveryDisabledLanes|=i,Zl|=i,s=4;break e}i=ct,ct=s,i!==null&&(ct===null?ct=i:ct.push.apply(ct,i))}s=c}if(i=!1,s!==2)continue}}if(s===1){Ta(e,0),gl(e,t,0,!0);break}e:{switch(a=e,i=s,i){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:gl(a,t,yt,!vl);break e;case 2:ct=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(s=js+300-ot(),10<s)){if(gl(a,t,yt,!vl),On(a,0,!0)!==0)break e;Pt=t,a.timeoutHandle=lf(Cd.bind(null,a,l,ct,Ns,Or,t,yt,Zl,Na,vl,i,"Throttled",-0,0),s);break e}Cd(a,l,ct,Ns,Or,t,yt,Zl,Na,vl,i,null,-0,0)}}break}while(!0);Lt(e)}function Cd(e,t,l,a,s,i,c,d,v,_,O,L,M,k){if(e.timeoutHandle=-1,L=t.subtreeFlags,L&8192||(L&16785408)===16785408){L={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ut},yd(t,i,L);var P=(i&62914560)===i?js-ot():(i&4194048)===i?Sd-ot():0;if(P=yv(L,P),P!==null){Pt=i,e.cancelPendingCommit=P(Dd.bind(null,e,t,i,l,a,s,c,d,v,O,L,null,M,k)),gl(e,i,c,!_);return}}Dd(e,t,i,l,a,s,c,d,v)}function Dx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],i=s.getSnapshot;s=s.value;try{if(!mt(i(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gl(e,t,l,a){t&=~Rr,t&=~Zl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var i=31-ft(s),c=1<<i;a[i]=-1,s&=~c}l!==0&&wc(e,l,t)}function Es(){return(Ne&6)===0?(hn(0),!1):!0}function Br(){if(ve!==null){if(Ce===0)var e=ve.return;else e=ve,Gt=Bl=null,Pi(e),va=null,Fa=0,e=ve;for(;e!==null;)ad(e.alternate,e),e=e.return;ve=null}}function Ta(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,ev(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Pt=0,Br(),ze=e,ve=l=qt(e.current,null),pe=t,Ce=0,pt=null,vl=!1,Sa=Da(e,t),zr=!1,Na=yt=Rr=Zl=hl=Le=0,ct=xn=null,Or=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-ft(a),i=1<<s;t|=e[s],a&=~i}return It=t,Vn(),l}function Ad(e,t){ue=null,T.H=sn,t===xa||t===Pn?(t=Gu(),Ce=3):t===Yi?(t=Gu(),Ce=4):Ce=t===vr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pt=t,ve===null&&(Le=1,ms(e,Nt(t,e.current)))}function _d(){var e=vt.current;return e===null?!0:(pe&4194048)===pe?At===null:(pe&62914560)===pe||(pe&536870912)!==0?e===At:!1}function Md(){var e=T.H;return T.H=sn,e===null?sn:e}function kd(){var e=T.A;return T.A=Rx,e}function Ts(){Le=4,vl||(pe&4194048)!==pe&&vt.current!==null||(Sa=!0),(hl&134217727)===0&&(Zl&134217727)===0||ze===null||gl(ze,pe,yt,!1)}function Ur(e,t,l){var a=Ne;Ne|=2;var s=Md(),i=kd();(ze!==e||pe!==t)&&(Ns=null,Ta(e,t)),t=!1;var c=Le;e:do try{if(Ce!==0&&ve!==null){var d=ve,v=pt;switch(Ce){case 8:Br(),c=6;break e;case 3:case 2:case 9:case 6:vt.current===null&&(t=!0);var _=Ce;if(Ce=0,pt=null,Ca(e,d,v,_),l&&Sa){c=0;break e}break;default:_=Ce,Ce=0,pt=null,Ca(e,d,v,_)}}wx(),c=Le;break}catch(O){Ad(e,O)}while(!0);return t&&e.shellSuspendCounter++,Gt=Bl=null,Ne=a,T.H=s,T.A=i,ve===null&&(ze=null,pe=0,Vn()),c}function wx(){for(;ve!==null;)zd(ve)}function Lx(e,t){var l=Ne;Ne|=2;var a=Md(),s=kd();ze!==e||pe!==t?(Ns=null,Ss=ot()+500,Ta(e,t)):Sa=Da(e,t);e:do try{if(Ce!==0&&ve!==null){t=ve;var i=pt;t:switch(Ce){case 1:Ce=0,pt=null,Ca(e,t,i,1);break;case 2:case 9:if(qu(i)){Ce=0,pt=null,Rd(t);break}t=function(){Ce!==2&&Ce!==9||ze!==e||(Ce=7),Lt(e)},i.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:qu(i)?(Ce=0,pt=null,Rd(t)):(Ce=0,pt=null,Ca(e,t,i,7));break;case 5:var c=null;switch(ve.tag){case 26:c=ve.memoizedState;case 5:case 27:var d=ve;if(c?yf(c):d.stateNode.complete){Ce=0,pt=null;var v=d.sibling;if(v!==null)ve=v;else{var _=d.return;_!==null?(ve=_,Cs(_)):ve=null}break t}}Ce=0,pt=null,Ca(e,t,i,5);break;case 6:Ce=0,pt=null,Ca(e,t,i,6);break;case 8:Br(),Le=6;break e;default:throw Error(o(462))}}Bx();break}catch(O){Ad(e,O)}while(!0);return Gt=Bl=null,T.H=a,T.A=s,Ne=l,ve!==null?0:(ze=null,pe=0,Vn(),Le)}function Bx(){for(;ve!==null&&!im();)zd(ve)}function zd(e){var t=td(e.alternate,e,It);e.memoizedProps=e.pendingProps,t===null?Cs(e):ve=t}function Rd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=$o(l,t,t.pendingProps,t.type,void 0,pe);break;case 11:t=$o(l,t,t.pendingProps,t.type.render,t.ref,pe);break;case 5:Pi(t);default:ad(l,t),t=ve=Mu(t,It),t=td(l,t,It)}e.memoizedProps=e.pendingProps,t===null?Cs(e):ve=t}function Ca(e,t,l,a){Gt=Bl=null,Pi(t),va=null,Fa=0;var s=t.return;try{if(Tx(e,s,t,l,pe)){Le=1,ms(e,Nt(l,e.current)),ve=null;return}}catch(i){if(s!==null)throw ve=s,i;Le=1,ms(e,Nt(l,e.current)),ve=null;return}t.flags&32768?(be||a===1?e=!0:Sa||(pe&536870912)!==0?e=!1:(vl=e=!0,(a===2||a===9||a===3||a===6)&&(a=vt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Od(t,e)):Cs(t)}function Cs(e){var t=e;do{if((t.flags&32768)!==0){Od(t,vl);return}e=t.return;var l=_x(t.alternate,t,It);if(l!==null){ve=l;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Le===0&&(Le=5)}function Od(e,t){do{var l=Mx(e.alternate,e);if(l!==null){l.flags&=32767,ve=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ve=e;return}ve=e=l}while(e!==null);Le=6,ve=null}function Dd(e,t,l,a,s,i,c,d,v){e.cancelPendingCommit=null;do As();while(Ve!==0);if((Ne&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(i=t.lanes|t.childLanes,i|=Ci,hm(e,l,i,c,d,v),e===ze&&(ve=ze=null,pe=0),Ea=t,yl=e,Pt=l,Dr=i,wr=s,Nd=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Yx(Mn,function(){return Hd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=T.T,T.T=null,s=H.p,H.p=2,c=Ne,Ne|=4;try{kx(e,t,l)}finally{Ne=c,H.p=s,T.T=a}}Ve=1,wd(),Ld(),Bd()}}function wd(){if(Ve===1){Ve=0;var e=yl,t=Ea,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=T.T,T.T=null;var a=H.p;H.p=2;var s=Ne;Ne|=4;try{vd(t,e);var i=Wr,c=bu(e.containerInfo),d=i.focusedElem,v=i.selectionRange;if(c!==d&&d&&d.ownerDocument&&gu(d.ownerDocument.documentElement,d)){if(v!==null&&ji(d)){var _=v.start,O=v.end;if(O===void 0&&(O=_),"selectionStart"in d)d.selectionStart=_,d.selectionEnd=Math.min(O,d.value.length);else{var L=d.ownerDocument||document,M=L&&L.defaultView||window;if(M.getSelection){var k=M.getSelection(),P=d.textContent.length,se=Math.min(v.start,P),ke=v.end===void 0?se:Math.min(v.end,P);!k.extend&&se>ke&&(c=ke,ke=se,se=c);var E=yu(d,se),g=yu(d,ke);if(E&&g&&(k.rangeCount!==1||k.anchorNode!==E.node||k.anchorOffset!==E.offset||k.focusNode!==g.node||k.focusOffset!==g.offset)){var A=L.createRange();A.setStart(E.node,E.offset),k.removeAllRanges(),se>ke?(k.addRange(A),k.extend(g.node,g.offset)):(A.setEnd(g.node,g.offset),k.addRange(A))}}}}for(L=[],k=d;k=k.parentNode;)k.nodeType===1&&L.push({element:k,left:k.scrollLeft,top:k.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<L.length;d++){var D=L[d];D.element.scrollLeft=D.left,D.element.scrollTop=D.top}}Hs=!!$r,Wr=$r=null}finally{Ne=s,H.p=a,T.T=l}}e.current=t,Ve=2}}function Ld(){if(Ve===2){Ve=0;var e=yl,t=Ea,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=T.T,T.T=null;var a=H.p;H.p=2;var s=Ne;Ne|=4;try{od(e,t.alternate,t)}finally{Ne=s,H.p=a,T.T=l}}Ve=3}}function Bd(){if(Ve===4||Ve===3){Ve=0,rm();var e=yl,t=Ea,l=Pt,a=Nd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ve=5:(Ve=0,Ea=yl=null,Ud(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(pl=null),li(l),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Oa,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=T.T,s=H.p,H.p=2,T.T=null;try{for(var i=e.onRecoverableError,c=0;c<a.length;c++){var d=a[c];i(d.value,{componentStack:d.stack})}}finally{T.T=t,H.p=s}}(Pt&3)!==0&&As(),Lt(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===Lr?vn++:(vn=0,Lr=e):vn=0,hn(0)}}function Ud(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$a(t)))}function As(){return wd(),Ld(),Bd(),Hd()}function Hd(){if(Ve!==5)return!1;var e=yl,t=Dr;Dr=0;var l=li(Pt),a=T.T,s=H.p;try{H.p=32>l?32:l,T.T=null,l=wr,wr=null;var i=yl,c=Pt;if(Ve=0,Ea=yl=null,Pt=0,(Ne&6)!==0)throw Error(o(331));var d=Ne;if(Ne|=4,bd(i.current),pd(i,i.current,c,l),Ne=d,hn(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Oa,i)}catch{}return!0}finally{H.p=s,T.T=a,Ud(e,t)}}function qd(e,t,l){t=Nt(l,t),t=xr(e.stateNode,t,2),e=dl(e,t,2),e!==null&&(wa(e,2),Lt(e))}function Ae(e,t,l){if(e.tag===3)qd(e,e,l);else for(;t!==null;){if(t.tag===3){qd(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(pl===null||!pl.has(a))){e=Nt(l,e),l=Yo(2),a=dl(t,l,2),a!==null&&(Go(l,a,t,e),wa(a,2),Lt(a));break}}t=t.return}}function Hr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Ox;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(zr=!0,s.add(l),e=Ux.bind(null,e,t,l),t.then(e,e))}function Ux(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,ze===e&&(pe&l)===l&&(Le===4||Le===3&&(pe&62914560)===pe&&300>ot()-js?(Ne&2)===0&&Ta(e,0):Rr|=l,Na===pe&&(Na=0)),Lt(e)}function Yd(e,t){t===0&&(t=Dc()),e=Dl(e,t),e!==null&&(wa(e,t),Lt(e))}function Hx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Yd(e,l)}function qx(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),Yd(e,l)}function Yx(e,t){return Is(e,t)}var _s=null,Aa=null,qr=!1,Ms=!1,Yr=!1,bl=0;function Lt(e){e!==Aa&&e.next===null&&(Aa===null?_s=Aa=e:Aa=Aa.next=e),Ms=!0,qr||(qr=!0,Qx())}function hn(e,t){if(!Yr&&Ms){Yr=!0;do for(var l=!1,a=_s;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var i=0;else{var c=a.suspendedLanes,d=a.pingedLanes;i=(1<<31-ft(42|e)+1)-1,i&=s&~(c&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Vd(a,i))}else i=pe,i=On(a,a===ze?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Da(a,i)||(l=!0,Vd(a,i));a=a.next}while(l);Yr=!1}}function Gx(){Gd()}function Gd(){Ms=qr=!1;var e=0;bl!==0&&Px()&&(e=bl);for(var t=ot(),l=null,a=_s;a!==null;){var s=a.next,i=Qd(a,t);i===0?(a.next=null,l===null?_s=s:l.next=s,s===null&&(Aa=l)):(l=a,(e!==0||(i&3)!==0)&&(Ms=!0)),a=s}Ve!==0&&Ve!==5||hn(e),bl!==0&&(bl=0)}function Qd(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-ft(i),d=1<<c,v=s[c];v===-1?((d&l)===0||(d&a)!==0)&&(s[c]=vm(d,t)):v<=t&&(e.expiredLanes|=d),i&=~d}if(t=ze,l=pe,l=On(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&&Ps(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Da(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ps(a),li(l)){case 2:case 8:l=Rc;break;case 32:l=Mn;break;case 268435456:l=Oc;break;default:l=Mn}return a=Xd.bind(null,e),l=Is(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Ps(a),e.callbackPriority=2,e.callbackNode=null,2}function Xd(e,t){if(Ve!==0&&Ve!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(As()&&e.callbackNode!==l)return null;var a=pe;return a=On(e,e===ze?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Td(e,a,t),Qd(e,ot()),e.callbackNode!=null&&e.callbackNode===l?Xd.bind(null,e):null)}function Vd(e,t){if(As())return null;Td(e,t,!0)}function Qx(){tv(function(){(Ne&6)!==0?Is(zc,Gx):Gd()})}function Gr(){if(bl===0){var e=fa;e===0&&(e=kn,kn<<=1,(kn&261888)===0&&(kn=256)),bl=e}return bl}function Zd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Bn(""+e)}function Kd(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 Xx(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var i=Zd((s[at]||null).action),c=a.submitter;c&&(t=(t=c[at]||null)?Zd(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var d=new Yn("action","action",null,a,s);e.push({event:d,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(bl!==0){var v=c?Kd(s,c):new FormData(s);cr(l,{pending:!0,data:v,method:s.method,action:i},null,v)}}else typeof i=="function"&&(d.preventDefault(),v=c?Kd(s,c):new FormData(s),cr(l,{pending:!0,data:v,method:s.method,action:i},i,v))},currentTarget:s}]})}}for(var Qr=0;Qr<Ti.length;Qr++){var Xr=Ti[Qr],Vx=Xr.toLowerCase(),Zx=Xr[0].toUpperCase()+Xr.slice(1);kt(Vx,"on"+Zx)}kt(Nu,"onAnimationEnd"),kt(Eu,"onAnimationIteration"),kt(Tu,"onAnimationStart"),kt("dblclick","onDoubleClick"),kt("focusin","onFocus"),kt("focusout","onBlur"),kt(cx,"onTransitionRun"),kt(ux,"onTransitionStart"),kt(ox,"onTransitionCancel"),kt(Cu,"onTransitionEnd"),Il("onMouseEnter",["mouseout","mouseover"]),Il("onMouseLeave",["mouseout","mouseover"]),Il("onPointerEnter",["pointerout","pointerover"]),Il("onPointerLeave",["pointerout","pointerover"]),kl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kl("onBeforeInput",["compositionend","keypress","textInput","paste"]),kl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pn="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(" "),Kx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pn));function Jd(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var c=a.length-1;0<=c;c--){var d=a[c],v=d.instance,_=d.currentTarget;if(d=d.listener,v!==i&&s.isPropagationStopped())break e;i=d,s.currentTarget=_;try{i(s)}catch(O){Xn(O)}s.currentTarget=null,i=v}else for(c=0;c<a.length;c++){if(d=a[c],v=d.instance,_=d.currentTarget,d=d.listener,v!==i&&s.isPropagationStopped())break e;i=d,s.currentTarget=_;try{i(s)}catch(O){Xn(O)}s.currentTarget=null,i=v}}}}function he(e,t){var l=t[ai];l===void 0&&(l=t[ai]=new Set);var a=e+"__bubble";l.has(a)||($d(t,e,2,!1),l.add(a))}function Vr(e,t,l){var a=0;t&&(a|=4),$d(l,e,a,t)}var ks="_reactListening"+Math.random().toString(36).slice(2);function Zr(e){if(!e[ks]){e[ks]=!0,Yc.forEach(function(l){l!=="selectionchange"&&(Kx.has(l)||Vr(l,!1,e),Vr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ks]||(t[ks]=!0,Vr("selectionchange",!1,t))}}function $d(e,t,l,a){switch(Tf(t)){case 2:var s=jv;break;case 8:s=Sv;break;default:s=rc}l=s.bind(null,t,l,e),s=void 0,!fi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function Kr(e,t,l,a,s){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var d=a.stateNode.containerInfo;if(d===s)break;if(c===4)for(c=a.return;c!==null;){var v=c.tag;if((v===3||v===4)&&c.stateNode.containerInfo===s)return;c=c.return}for(;d!==null;){if(c=$l(d),c===null)return;if(v=c.tag,v===5||v===6||v===26||v===27){a=i=c;continue e}d=d.parentNode}}a=a.return}Pc(function(){var _=i,O=oi(l),L=[];e:{var M=Au.get(e);if(M!==void 0){var k=Yn,P=e;switch(e){case"keypress":if(Hn(l)===0)break e;case"keydown":case"keyup":k=qm;break;case"focusin":P="focus",k=hi;break;case"focusout":P="blur",k=hi;break;case"beforeblur":case"afterblur":k=hi;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":k=lu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=_m;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=Qm;break;case Nu:case Eu:case Tu:k=zm;break;case Cu:k=Vm;break;case"scroll":case"scrollend":k=Cm;break;case"wheel":k=Km;break;case"copy":case"cut":case"paste":k=Om;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=nu;break;case"toggle":case"beforetoggle":k=$m}var se=(t&4)!==0,ke=!se&&(e==="scroll"||e==="scrollend"),E=se?M!==null?M+"Capture":null:M;se=[];for(var g=_,A;g!==null;){var D=g;if(A=D.stateNode,D=D.tag,D!==5&&D!==26&&D!==27||A===null||E===null||(D=Ua(g,E),D!=null&&se.push(yn(g,D,A))),ke)break;g=g.return}0<se.length&&(M=new k(M,P,null,l,O),L.push({event:M,listeners:se}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",k=e==="mouseout"||e==="pointerout",M&&l!==ui&&(P=l.relatedTarget||l.fromElement)&&($l(P)||P[Jl]))break e;if((k||M)&&(M=O.window===O?O:(M=O.ownerDocument)?M.defaultView||M.parentWindow:window,k?(P=l.relatedTarget||l.toElement,k=_,P=P?$l(P):null,P!==null&&(ke=j(P),se=P.tag,P!==ke||se!==5&&se!==27&&se!==6)&&(P=null)):(k=null,P=_),k!==P)){if(se=lu,D="onMouseLeave",E="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(se=nu,D="onPointerLeave",E="onPointerEnter",g="pointer"),ke=k==null?M:Ba(k),A=P==null?M:Ba(P),M=new se(D,g+"leave",k,l,O),M.target=ke,M.relatedTarget=A,D=null,$l(O)===_&&(se=new se(E,g+"enter",P,l,O),se.target=A,se.relatedTarget=ke,D=se),ke=D,k&&P)t:{for(se=Jx,E=k,g=P,A=0,D=E;D;D=se(D))A++;D=0;for(var ne=g;ne;ne=se(ne))D++;for(;0<A-D;)E=se(E),A--;for(;0<D-A;)g=se(g),D--;for(;A--;){if(E===g||g!==null&&E===g.alternate){se=E;break t}E=se(E),g=se(g)}se=null}else se=null;k!==null&&Wd(L,M,k,se,!1),P!==null&&ke!==null&&Wd(L,ke,P,se,!0)}}e:{if(M=_?Ba(_):window,k=M.nodeName&&M.nodeName.toLowerCase(),k==="select"||k==="input"&&M.type==="file")var je=fu;else if(ou(M))if(mu)je=sx;else{je=ax;var te=lx}else k=M.nodeName,!k||k.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?_&&ci(_.elementType)&&(je=fu):je=nx;if(je&&(je=je(e,_))){du(L,je,l,O);break e}te&&te(e,M,_),e==="focusout"&&_&&M.type==="number"&&_.memoizedProps.value!=null&&ri(M,"number",M.value)}switch(te=_?Ba(_):window,e){case"focusin":(ou(te)||te.contentEditable==="true")&&(na=te,Si=_,Za=null);break;case"focusout":Za=Si=na=null;break;case"mousedown":Ni=!0;break;case"contextmenu":case"mouseup":case"dragend":Ni=!1,ju(L,l,O);break;case"selectionchange":if(rx)break;case"keydown":case"keyup":ju(L,l,O)}var de;if(yi)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else aa?cu(e,l)&&(ye="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ye="onCompositionStart");ye&&(su&&l.locale!=="ko"&&(aa||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&aa&&(de=eu()):(nl=O,mi="value"in nl?nl.value:nl.textContent,aa=!0)),te=zs(_,ye),0<te.length&&(ye=new au(ye,e,null,l,O),L.push({event:ye,listeners:te}),de?ye.data=de:(de=uu(l),de!==null&&(ye.data=de)))),(de=Fm?Im(e,l):Pm(e,l))&&(ye=zs(_,"onBeforeInput"),0<ye.length&&(te=new au("onBeforeInput","beforeinput",null,l,O),L.push({event:te,listeners:ye}),te.data=de)),Xx(L,e,_,l,O)}Jd(L,t)})}function yn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function zs(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=Ua(e,l),s!=null&&a.unshift(yn(e,s,i)),s=Ua(e,t),s!=null&&a.push(yn(e,s,i))),e.tag===3)return a;e=e.return}return[]}function Jx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wd(e,t,l,a,s){for(var i=t._reactName,c=[];l!==null&&l!==a;){var d=l,v=d.alternate,_=d.stateNode;if(d=d.tag,v!==null&&v===a)break;d!==5&&d!==26&&d!==27||_===null||(v=_,s?(_=Ua(l,i),_!=null&&c.unshift(yn(l,_,v))):s||(_=Ua(l,i),_!=null&&c.push(yn(l,_,v)))),l=l.return}c.length!==0&&e.push({event:t,listeners:c})}var $x=/\r\n?/g,Wx=/\u0000|\uFFFD/g;function Fd(e){return(typeof e=="string"?e:""+e).replace($x,`
|
|
49
|
+
`).replace(Wx,"")}function Id(e,t){return t=Fd(t),Fd(e)===t}function Me(e,t,l,a,s,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ea(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ea(e,""+a);break;case"className":wn(e,"class",a);break;case"tabIndex":wn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":wn(e,l,a);break;case"style":Fc(e,a,i);break;case"data":if(t!=="object"){wn(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=Bn(""+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",s.name,s,null),Me(e,t,"formEncType",s.formEncType,s,null),Me(e,t,"formMethod",s.formMethod,s,null),Me(e,t,"formTarget",s.formTarget,s,null)):(Me(e,t,"encType",s.encType,s,null),Me(e,t,"method",s.method,s,null),Me(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Bn(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Ut);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(o(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(o(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=Bn(""+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),Dn(e,"popover",a);break;case"xlinkActuate":Bt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Bt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Bt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Bt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Bt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Bt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Dn(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=Em.get(l)||l,Dn(e,l,a))}}function Jr(e,t,l,a,s,i){switch(l){case"style":Fc(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ea(e,a):(typeof a=="number"||typeof a=="bigint")&&ea(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=Ut);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gc.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),i=e[at]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Dn(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,s=!1,i;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];if(c!=null)switch(i){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Me(e,t,i,c,l,null)}}s&&Me(e,t,"srcSet",l.srcSet,l,null),a&&Me(e,t,"src",l.src,l,null);return;case"input":he("invalid",e);var d=i=c=s=null,v=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var O=l[a];if(O!=null)switch(a){case"name":s=O;break;case"type":c=O;break;case"checked":v=O;break;case"defaultChecked":_=O;break;case"value":i=O;break;case"defaultValue":d=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(o(137,t));break;default:Me(e,t,a,O,l,null)}}Kc(e,i,d,v,_,c,s,!1);return;case"select":he("invalid",e),a=c=i=null;for(s in l)if(l.hasOwnProperty(s)&&(d=l[s],d!=null))switch(s){case"value":i=d;break;case"defaultValue":c=d;break;case"multiple":a=d;default:Me(e,t,s,d,l,null)}t=i,l=c,e.multiple=!!a,t!=null?Pl(e,!!a,t,!1):l!=null&&Pl(e,!!a,l,!0);return;case"textarea":he("invalid",e),i=s=a=null;for(c in l)if(l.hasOwnProperty(c)&&(d=l[c],d!=null))switch(c){case"value":a=d;break;case"defaultValue":s=d;break;case"children":i=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:Me(e,t,c,d,l,null)}$c(e,a,s,i);return;case"option":for(v in l)if(l.hasOwnProperty(v)&&(a=l[v],a!=null))switch(v){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Me(e,t,v,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<pn.length;a++)he(pn[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(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Me(e,t,_,a,l,null)}return;default:if(ci(t)){for(O in l)l.hasOwnProperty(O)&&(a=l[O],a!==void 0&&Jr(e,t,O,a,l,void 0));return}}for(d in l)l.hasOwnProperty(d)&&(a=l[d],a!=null&&Me(e,t,d,a,l,null))}function Fx(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,c=null,d=null,v=null,_=null,O=null;for(k in l){var L=l[k];if(l.hasOwnProperty(k)&&L!=null)switch(k){case"checked":break;case"value":break;case"defaultValue":v=L;default:a.hasOwnProperty(k)||Me(e,t,k,null,a,L)}}for(var M in a){var k=a[M];if(L=l[M],a.hasOwnProperty(M)&&(k!=null||L!=null))switch(M){case"type":i=k;break;case"name":s=k;break;case"checked":_=k;break;case"defaultChecked":O=k;break;case"value":c=k;break;case"defaultValue":d=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(o(137,t));break;default:k!==L&&Me(e,t,M,k,a,L)}}ii(e,c,d,v,_,O,i,s);return;case"select":k=c=d=M=null;for(i in l)if(v=l[i],l.hasOwnProperty(i)&&v!=null)switch(i){case"value":break;case"multiple":k=v;default:a.hasOwnProperty(i)||Me(e,t,i,null,a,v)}for(s in a)if(i=a[s],v=l[s],a.hasOwnProperty(s)&&(i!=null||v!=null))switch(s){case"value":M=i;break;case"defaultValue":d=i;break;case"multiple":c=i;default:i!==v&&Me(e,t,s,i,a,v)}t=d,l=c,a=k,M!=null?Pl(e,!!l,M,!1):!!a!=!!l&&(t!=null?Pl(e,!!l,t,!0):Pl(e,!!l,l?[]:"",!1));return;case"textarea":k=M=null;for(d in l)if(s=l[d],l.hasOwnProperty(d)&&s!=null&&!a.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:Me(e,t,d,null,a,s)}for(c in a)if(s=a[c],i=l[c],a.hasOwnProperty(c)&&(s!=null||i!=null))switch(c){case"value":M=s;break;case"defaultValue":k=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(o(91));break;default:s!==i&&Me(e,t,c,s,a,i)}Jc(e,M,k);return;case"option":for(var P in l)if(M=l[P],l.hasOwnProperty(P)&&M!=null&&!a.hasOwnProperty(P))switch(P){case"selected":e.selected=!1;break;default:Me(e,t,P,null,a,M)}for(v in a)if(M=a[v],k=l[v],a.hasOwnProperty(v)&&M!==k&&(M!=null||k!=null))switch(v){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:Me(e,t,v,M,a,k)}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)M=l[se],l.hasOwnProperty(se)&&M!=null&&!a.hasOwnProperty(se)&&Me(e,t,se,null,a,M);for(_ in a)if(M=a[_],k=l[_],a.hasOwnProperty(_)&&M!==k&&(M!=null||k!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,t));break;default:Me(e,t,_,M,a,k)}return;default:if(ci(t)){for(var ke in l)M=l[ke],l.hasOwnProperty(ke)&&M!==void 0&&!a.hasOwnProperty(ke)&&Jr(e,t,ke,void 0,a,M);for(O in a)M=a[O],k=l[O],!a.hasOwnProperty(O)||M===k||M===void 0&&k===void 0||Jr(e,t,O,M,a,k);return}}for(var E in l)M=l[E],l.hasOwnProperty(E)&&M!=null&&!a.hasOwnProperty(E)&&Me(e,t,E,null,a,M);for(L in a)M=a[L],k=l[L],!a.hasOwnProperty(L)||M===k||M==null&&k==null||Me(e,t,L,M,a,k)}function Pd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ix(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],i=s.transferSize,c=s.initiatorType,d=s.duration;if(i&&d&&Pd(c)){for(c=0,d=s.responseEnd,a+=1;a<l.length;a++){var v=l[a],_=v.startTime;if(_>d)break;var O=v.transferSize,L=v.initiatorType;O&&Pd(L)&&(v=v.responseEnd,c+=O*(v<d?1:(d-_)/(v-_)))}if(--a,t+=8*(i+c)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var $r=null,Wr=null;function Rs(e){return e.nodeType===9?e:e.ownerDocument}function ef(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 tf(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 Fr(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 Ir=null;function Px(){var e=window.event;return e&&e.type==="popstate"?e===Ir?!1:(Ir=e,!0):(Ir=null,!1)}var lf=typeof setTimeout=="function"?setTimeout:void 0,ev=typeof clearTimeout=="function"?clearTimeout:void 0,af=typeof Promise=="function"?Promise:void 0,tv=typeof queueMicrotask=="function"?queueMicrotask:typeof af<"u"?function(e){return af.resolve(null).then(e).catch(lv)}:lf;function lv(e){setTimeout(function(){throw e})}function jl(e){return e==="head"}function nf(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),za(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")gn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,gn(l);for(var i=l.firstChild;i;){var c=i.nextSibling,d=i.nodeName;i[La]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=c}}else l==="body"&&gn(e.ownerDocument.body);l=s}while(l);za(t)}function sf(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 Pr(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":Pr(l),ni(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function av(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[La])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=_t(e.nextSibling),e===null)break}return null}function nv(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=_t(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_t(e.nextSibling),e===null))return null;return e}function ec(e){return e.data==="$?"||e.data==="$~"}function tc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function sv(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 _t(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 lc=null;function cf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return _t(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function uf(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 of(e,t,l){switch(t=Rs(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function gn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ni(e)}var Mt=new Map,df=new Set;function Os(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var el=H.d;H.d={f:iv,r:rv,D:cv,C:uv,L:ov,m:dv,X:mv,S:fv,M:xv};function iv(){var e=el.f(),t=Es();return e||t}function rv(e){var t=Wl(e);t!==null&&t.tag===5&&t.type==="form"?Ao(t):el.r(e)}var _a=typeof document>"u"?null:document;function ff(e,t,l){var a=_a;if(a&&typeof t=="string"&&t){var s=jt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),df.has(s)||(df.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),Ie(t,"link",e),Ze(t),a.head.appendChild(t)))}}function cv(e){el.D(e),ff("dns-prefetch",e,null)}function uv(e,t){el.C(e,t),ff("preconnect",e,t)}function ov(e,t,l){el.L(e,t,l);var a=_a;if(a&&e&&t){var s='link[rel="preload"][as="'+jt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+jt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+jt(l.imageSizes)+'"]')):s+='[href="'+jt(e)+'"]';var i=s;switch(t){case"style":i=Ma(e);break;case"script":i=ka(e)}Mt.has(i)||(e=h({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Mt.set(i,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(bn(i))||t==="script"&&a.querySelector(jn(i))||(t=a.createElement("link"),Ie(t,"link",e),Ze(t),a.head.appendChild(t)))}}function dv(e,t){el.m(e,t);var l=_a;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+jt(a)+'"][href="'+jt(e)+'"]',i=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ka(e)}if(!Mt.has(i)&&(e=h({rel:"modulepreload",href:e},t),Mt.set(i,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(jn(i)))return}a=l.createElement("link"),Ie(a,"link",e),Ze(a),l.head.appendChild(a)}}}function fv(e,t,l){el.S(e,t,l);var a=_a;if(a&&e){var s=Fl(a).hoistableStyles,i=Ma(e);t=t||"default";var c=s.get(i);if(!c){var d={loading:0,preload:null};if(c=a.querySelector(bn(i)))d.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Mt.get(i))&&ac(e,l);var v=c=a.createElement("link");Ze(v),Ie(v,"link",e),v._p=new Promise(function(_,O){v.onload=_,v.onerror=O}),v.addEventListener("load",function(){d.loading|=1}),v.addEventListener("error",function(){d.loading|=2}),d.loading|=4,Ds(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:d},s.set(i,c)}}}function mv(e,t){el.X(e,t);var l=_a;if(l&&e){var a=Fl(l).hoistableScripts,s=ka(e),i=a.get(s);i||(i=l.querySelector(jn(s)),i||(e=h({src:e,async:!0},t),(t=Mt.get(s))&&nc(e,t),i=l.createElement("script"),Ze(i),Ie(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function xv(e,t){el.M(e,t);var l=_a;if(l&&e){var a=Fl(l).hoistableScripts,s=ka(e),i=a.get(s);i||(i=l.querySelector(jn(s)),i||(e=h({src:e,async:!0,type:"module"},t),(t=Mt.get(s))&&nc(e,t),i=l.createElement("script"),Ze(i),Ie(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function mf(e,t,l,a){var s=(s=xe.current)?Os(s):null;if(!s)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Ma(l.href),l=Fl(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Ma(l.href);var i=Fl(s).hoistableStyles,c=i.get(e);if(c||(s=s.ownerDocument||s,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=s.querySelector(bn(e)))&&!i._p&&(c.instance=i,c.state.loading=5),Mt.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},Mt.set(e,l),i||vv(s,e,l,c.state))),t&&a===null)throw Error(o(528,""));return c}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ka(l),l=Fl(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Ma(e){return'href="'+jt(e)+'"'}function bn(e){return'link[rel="stylesheet"]['+e+"]"}function xf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function vv(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),Ze(t),e.head.appendChild(t))}function ka(e){return'[src="'+jt(e)+'"]'}function jn(e){return"script[async]"+e}function vf(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+jt(l.href)+'"]');if(a)return t.instance=a,Ze(a),a;var s=h({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ze(a),Ie(a,"style",s),Ds(a,l.precedence,e),t.instance=a;case"stylesheet":s=Ma(l.href);var i=e.querySelector(bn(s));if(i)return t.state.loading|=4,t.instance=i,Ze(i),i;a=xf(l),(s=Mt.get(s))&&ac(a,s),i=(e.ownerDocument||e).createElement("link"),Ze(i);var c=i;return c._p=new Promise(function(d,v){c.onload=d,c.onerror=v}),Ie(i,"link",a),t.state.loading|=4,Ds(i,l.precedence,e),t.instance=i;case"script":return i=ka(l.src),(s=e.querySelector(jn(i)))?(t.instance=s,Ze(s),s):(a=l,(s=Mt.get(i))&&(a=h({},l),nc(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ze(s),Ie(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ds(a,l.precedence,e));return t.instance}function Ds(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,i=s,c=0;c<a.length;c++){var d=a[c];if(d.dataset.precedence===t)i=d;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function ac(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function nc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ws=null;function hf(e,t,l){if(ws===null){var a=new Map,s=ws=new Map;s.set(l,a)}else s=ws,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var i=l[s];if(!(i[La]||i[Je]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var d=a.get(c);d?d.push(i):a.set(c,[i])}}return a}function pf(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function hv(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 yf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function pv(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=Ma(a.href),i=t.querySelector(bn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ls.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Ze(i);return}i=t.ownerDocument||t,a=xf(a),(s=Mt.get(s))&&ac(a,s),i=i.createElement("link"),Ze(i);var c=i;c._p=new Promise(function(d,v){c.onload=d,c.onerror=v}),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=Ls.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var sc=0;function yv(e,t){return e.stylesheets&&e.count===0&&Us(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&sc===0&&(sc=62500*Ix());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>sc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function Ls(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Us(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Bs=null;function Us(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Bs=new Map,t.forEach(gv,e),Bs=null,Ls.call(e))}function gv(e,t){if(!(t.state.loading&4)){var l=Bs.get(e);if(l)var a=l.get(null);else{l=new Map,Bs.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var c=s[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(l.set(c.dataset.precedence,c),a=c)}a&&l.set(null,a)}s=t.instance,c=s.getAttribute("data-precedence"),i=l.get(c)||a,i===a&&l.set(null,s),l.set(c,s),this.count++,a=Ls.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Sn={$$typeof:ie,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function bv(e,t,l,a,s,i,c,d,v){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=s,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function gf(e,t,l,a,s,i,c,d,v,_,O,L){return e=new bv(e,t,l,c,v,_,O,L,d),t=1,i===!0&&(t|=24),i=xt(3,null,null,t),e.current=i,i.stateNode=e,t=Ui(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Gi(i),e}function bf(e){return e?(e=ra,e):ra}function jf(e,t,l,a,s,i){s=bf(s),a.context===null?a.context=s:a.pendingContext=s,a=ol(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=dl(e,a,t),l!==null&&(ut(l,e,t),Pa(l,e,t))}function Sf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function ic(e,t){Sf(e,t),(e=e.alternate)&&Sf(e,t)}function Nf(e){if(e.tag===13||e.tag===31){var t=Dl(e,67108864);t!==null&&ut(t,e,67108864),ic(e,67108864)}}function Ef(e){if(e.tag===13||e.tag===31){var t=gt();t=ti(t);var l=Dl(e,t);l!==null&&ut(l,e,t),ic(e,t)}}var Hs=!0;function jv(e,t,l,a){var s=T.T;T.T=null;var i=H.p;try{H.p=2,rc(e,t,l,a)}finally{H.p=i,T.T=s}}function Sv(e,t,l,a){var s=T.T;T.T=null;var i=H.p;try{H.p=8,rc(e,t,l,a)}finally{H.p=i,T.T=s}}function rc(e,t,l,a){if(Hs){var s=cc(a);if(s===null)Kr(e,t,a,qs,l),Cf(e,a);else if(Ev(s,e,t,l,a))a.stopPropagation();else if(Cf(e,a),t&4&&-1<Nv.indexOf(e)){for(;s!==null;){var i=Wl(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=Ml(i.pendingLanes);if(c!==0){var d=i;for(d.pendingLanes|=2,d.entangledLanes|=2;c;){var v=1<<31-ft(c);d.entanglements[1]|=v,c&=~v}Lt(i),(Ne&6)===0&&(Ss=ot()+500,hn(0))}}break;case 31:case 13:d=Dl(i,2),d!==null&&ut(d,i,2),Es(),ic(i,2)}if(i=cc(a),i===null&&Kr(e,t,a,qs,l),i===s)break;s=i}s!==null&&a.stopPropagation()}else Kr(e,t,a,null,l)}}function cc(e){return e=oi(e),uc(e)}var qs=null;function uc(e){if(qs=null,e=$l(e),e!==null){var t=j(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=y(t),e!==null)return e;e=null}else if(l===31){if(e=C(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 qs=e,null}function Tf(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(cm()){case zc:return 2;case Rc:return 8;case Mn:case um:return 32;case Oc:return 268435456;default:return 32}default:return 32}}var oc=!1,Sl=null,Nl=null,El=null,Nn=new Map,En=new Map,Tl=[],Nv="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 Cf(e,t){switch(e){case"focusin":case"focusout":Sl=null;break;case"dragenter":case"dragleave":Nl=null;break;case"mouseover":case"mouseout":El=null;break;case"pointerover":case"pointerout":Nn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":En.delete(t.pointerId)}}function Tn(e,t,l,a,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Wl(t),t!==null&&Nf(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Ev(e,t,l,a,s){switch(t){case"focusin":return Sl=Tn(Sl,e,t,l,a,s),!0;case"dragenter":return Nl=Tn(Nl,e,t,l,a,s),!0;case"mouseover":return El=Tn(El,e,t,l,a,s),!0;case"pointerover":var i=s.pointerId;return Nn.set(i,Tn(Nn.get(i)||null,e,t,l,a,s)),!0;case"gotpointercapture":return i=s.pointerId,En.set(i,Tn(En.get(i)||null,e,t,l,a,s)),!0}return!1}function Af(e){var t=$l(e.target);if(t!==null){var l=j(t);if(l!==null){if(t=l.tag,t===13){if(t=y(l),t!==null){e.blockedOn=t,Hc(e.priority,function(){Ef(l)});return}}else if(t===31){if(t=C(l),t!==null){e.blockedOn=t,Hc(e.priority,function(){Ef(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 Ys(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=cc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);ui=a,l.target.dispatchEvent(a),ui=null}else return t=Wl(l),t!==null&&Nf(t),e.blockedOn=l,!1;t.shift()}return!0}function _f(e,t,l){Ys(e)&&l.delete(t)}function Tv(){oc=!1,Sl!==null&&Ys(Sl)&&(Sl=null),Nl!==null&&Ys(Nl)&&(Nl=null),El!==null&&Ys(El)&&(El=null),Nn.forEach(_f),En.forEach(_f)}function Gs(e,t){e.blockedOn===t&&(e.blockedOn=null,oc||(oc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Tv)))}var Qs=null;function Mf(e){Qs!==e&&(Qs=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Qs===e&&(Qs=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(uc(a||l)===null)continue;break}var i=Wl(l);i!==null&&(e.splice(t,3),t-=3,cr(i,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function za(e){function t(v){return Gs(v,e)}Sl!==null&&Gs(Sl,e),Nl!==null&&Gs(Nl,e),El!==null&&Gs(El,e),Nn.forEach(t),En.forEach(t);for(var l=0;l<Tl.length;l++){var a=Tl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Tl.length&&(l=Tl[0],l.blockedOn===null);)Af(l),l.blockedOn===null&&Tl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],i=l[a+1],c=s[at]||null;if(typeof i=="function")c||Mf(l);else if(c){var d=null;if(i&&i.hasAttribute("formAction")){if(s=i,c=i[at]||null)d=c.formAction;else if(uc(s)!==null)continue}else d=c.action;typeof d=="function"?l[a+1]=d:(l.splice(a,3),a-=3),Mf(l)}}}function kf(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return s=c})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function dc(e){this._internalRoot=e}Xs.prototype.render=dc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,a=gt();jf(l,a,e,t,null,null)},Xs.prototype.unmount=dc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jf(e.current,2,null,e,null,null),Es(),t[Jl]=null}};function Xs(e){this._internalRoot=e}Xs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Uc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Tl.length&&t!==0&&t<Tl[l].priority;l++);Tl.splice(l,0,e),l===0&&Af(e)}};var zf=u.version;if(zf!=="19.2.4")throw Error(o(527,zf,"19.2.4"));H.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=x(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Cv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vs.isDisabled&&Vs.supportsFiber)try{Oa=Vs.inject(Cv),dt=Vs}catch{}}return An.createRoot=function(e,t){if(!m(e))throw Error(o(299));var l=!1,a="",s=Bo,i=Uo,c=Ho;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=gf(e,1,!1,null,null,l,a,null,s,i,c,kf),e[Jl]=t.current,Zr(e),new dc(t)},An.hydrateRoot=function(e,t,l){if(!m(e))throw Error(o(299));var a=!1,s="",i=Bo,c=Uo,d=Ho,v=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(c=l.onCaughtError),l.onRecoverableError!==void 0&&(d=l.onRecoverableError),l.formState!==void 0&&(v=l.formState)),t=gf(e,1,!0,t,l??null,a,s,v,i,c,d,kf),t.context=bf(null),l=t.current,a=gt(),a=ti(a),s=ol(a),s.callback=null,dl(l,s,a),l=a,t.current.lanes=l,wa(t,l),Lt(t),e[Jl]=t.current,Zr(e),new Xs(t)},An.version="19.2.4",An}var Yf;function Lv(){if(Yf)return xc.exports;Yf=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),xc.exports=wv(),xc.exports}var Bv=Lv();const Uv="";class Hv extends Error{constructor(u,f){super(u),this.name="ApiError",this.status=f}}async function Be(r,u){const f=await fetch(`${Uv}${r}`,u);if(!f.ok){const o=await f.json().catch(()=>({error:f.statusText}));throw new Hv(o.error||`HTTP ${f.status}`,f.status)}return f.json()}const ge={getConfig(){return Be("/api/config")},setConfig(r,u){return Be("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:u})})},getSkills(){return Be("/api/skills")},getSkillDetail(r,u){return Be(`/api/skills/${r}/${u}`)},getEvals(r,u){return Be(`/api/skills/${r}/${u}/evals`)},saveEvals(r,u,f){return Be(`/api/skills/${r}/${u}/evals`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)})},generateEvals(r,u){return Be(`/api/skills/${r}/${u}/generate-evals`,{method:"POST"})},getLatestBenchmark(r,u){return Be(`/api/skills/${r}/${u}/benchmark/latest`)},getHistory(r,u,f){const o=new URLSearchParams;f!=null&&f.model&&o.set("model",f.model),f!=null&&f.type&&o.set("type",f.type),f!=null&&f.from&&o.set("from",f.from),f!=null&&f.to&&o.set("to",f.to);const m=o.toString();return Be(`/api/skills/${r}/${u}/history${m?"?"+m:""}`)},getHistoryEntry(r,u,f){return Be(`/api/skills/${r}/${u}/history/${encodeURIComponent(f)}`)},compareRuns(r,u,f,o){return Be(`/api/skills/${r}/${u}/history-compare?a=${encodeURIComponent(f)}&b=${encodeURIComponent(o)}`)},getCaseHistory(r,u,f,o){const m=new URLSearchParams;o&&m.set("model",o);const j=m.toString();return Be(`/api/skills/${r}/${u}/history/case/${f}${j?"?"+j:""}`)},deleteHistoryEntry(r,u,f){return Be(`/api/skills/${r}/${u}/history/${encodeURIComponent(f)}`,{method:"DELETE"})},improveSkill(r,u,f){return Be(`/api/skills/${r}/${u}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)})},instructEdit(r,u,f){return Be(`/api/skills/${r}/${u}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:"instruct",...f})})},applyImprovement(r,u,f){return Be(`/api/skills/${r}/${u}/apply-improvement`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:f})})},getStats(r,u){return Be(`/api/skills/${r}/${u}/stats`)},getDependencies(r,u){return Be(`/api/skills/${r}/${u}/dependencies`)},getProjectLayout(){return Be("/api/project-layout")},createSkill(r){return Be("/api/skills/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})},getSkillCreatorStatus(){return Be("/api/skill-creator-status")},generateSkill(r){return Be("/api/skills/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}};function qv(r){const[u,f]=N.useState(()=>typeof window>"u"?!1:window.matchMedia(r).matches);return N.useEffect(()=>{const o=window.matchMedia(r);f(o.matches);const m=j=>f(j.matches);return o.addEventListener("change",m),()=>o.removeEventListener("change",m)},[r]),u}const Yv={selectedSkill:null,mode:"browse",searchQuery:"",skills:[],skillsLoading:!0,skillsError:null,isMobile:!1,mobileView:"list"};function Gv(r,u){switch(u.type){case"SELECT_SKILL":return{...r,selectedSkill:u.skill,mode:"browse",mobileView:r.isMobile?"detail":r.mobileView};case"CLEAR_SELECTION":return{...r,selectedSkill:null};case"SET_MODE":return{...r,mode:u.mode,selectedSkill:u.mode==="create"?null:r.selectedSkill};case"SET_SEARCH":return{...r,searchQuery:u.query};case"SET_SKILLS":return{...r,skills:u.skills,skillsLoading:!1,skillsError:null};case"SET_SKILLS_ERROR":return{...r,skillsError:u.error,skillsLoading:!1};case"SET_SKILLS_LOADING":return{...r,skillsLoading:u.loading};case"SET_MOBILE":return{...r,isMobile:u.isMobile};case"SET_MOBILE_VIEW":return{...r,mobileView:u.view};default:return r}}const Ff=N.createContext(null);function Kl(){const r=N.useContext(Ff);if(!r)throw new Error("useStudio must be used within StudioProvider");return r}function Qv({children:r}){const[u,f]=N.useReducer(Gv,Yv),o=qv("(max-width: 767px)");N.useEffect(()=>{f({type:"SET_MOBILE",isMobile:o})},[o]);const m=N.useCallback(()=>{f({type:"SET_SKILLS_LOADING",loading:!0}),ge.getSkills().then(h=>f({type:"SET_SKILLS",skills:h})).catch(h=>f({type:"SET_SKILLS_ERROR",error:h.message}))},[]);N.useEffect(()=>{m()},[m]);const j=N.useCallback(h=>{f({type:"SELECT_SKILL",skill:h})},[]),y=N.useCallback(()=>{f({type:"CLEAR_SELECTION"})},[]),C=N.useCallback(h=>{f({type:"SET_MODE",mode:h})},[]),p=N.useCallback(h=>{f({type:"SET_SEARCH",query:h})},[]),x=N.useCallback(h=>{f({type:"SET_MOBILE_VIEW",view:h})},[]),S=N.useMemo(()=>({state:u,selectSkill:j,clearSelection:y,setMode:C,setSearch:p,setMobileView:x,refreshSkills:m}),[u,j,y,C,p,x,m]);return n.jsx(Ff.Provider,{value:S,children:r})}function Xv({left:r,right:u}){const{state:f}=Kl();return f.isMobile?n.jsx("div",{style:{height:"100vh",overflow:"hidden",background:"var(--surface-0)"},children:f.mobileView==="list"?n.jsx("div",{style:{height:"100%",overflowY:"auto",background:"var(--surface-1)"},children:r}):n.jsx("div",{style:{height:"100%",overflowY:"auto"},children:u})}):n.jsxs("div",{className:"studio-grid",style:{display:"grid",gridTemplateColumns:"280px 1px 1fr",height:"100vh",overflow:"hidden"},children:[n.jsx("div",{style:{overflowY:"auto",background:"var(--surface-1)"},children:r}),n.jsx("div",{style:{background:"var(--border-subtle)"}}),n.jsx("div",{style:{overflowY:"auto",background:"var(--surface-0)"},children:u})]})}function Vv(){const{state:r,setSearch:u}=Kl(),[f,o]=N.useState(r.searchQuery),m=N.useRef(null);N.useEffect(()=>(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{u(f)},200),()=>{m.current&&clearTimeout(m.current)}),[f,u]),N.useEffect(()=>{r.searchQuery===""&&f!==""&&o("")},[r.searchQuery]);const j=new Set(r.skills.map(y=>y.plugin)).size;return n.jsxs("div",{className:"px-3 py-2",children:[n.jsxs("div",{className:"relative",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{position:"absolute",left:10,top:"50%",transform:"translateY(-50%)"},children:[n.jsx("circle",{cx:"11",cy:"11",r:"8"}),n.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),n.jsx("input",{type:"text",value:f,onChange:y=>o(y.target.value),placeholder:"Search skills...",className:"w-full py-2 pl-8 pr-3 rounded-lg text-[13px] transition-colors duration-150",style:{background:"var(--surface-2)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)",outline:"none"},onFocus:y=>{y.currentTarget.style.borderColor="var(--accent)"},onBlur:y=>{y.currentTarget.style.borderColor="var(--border-subtle)"}}),f&&n.jsx("button",{onClick:()=>{o(""),u("")},style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",color:"var(--text-tertiary)",padding:2},children:n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),!r.skillsLoading&&n.jsxs("div",{className:"text-[11px] mt-1.5 px-1",style:{color:"var(--text-tertiary)"},children:[r.skills.length," skill",r.skills.length!==1?"s":""," across ",j," plugin",j!==1?"s":""]})]})}const Gf={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 Zv({skill:r,isSelected:u,onSelect:f}){const o=Gf[r.benchmarkStatus]||Gf.missing;return n.jsxs("button",{onClick:f,className:"w-full text-left px-3 py-2.5 transition-all duration-150",style:{background:u?"var(--surface-2)":"transparent",cursor:"pointer",borderTop:"none",borderRight:"none",borderBottom:"1px solid var(--border-subtle)",borderLeft:u?"2px solid var(--accent)":"2px solid transparent",display:"block"},onMouseEnter:m=>{u||(m.currentTarget.style.background="var(--surface-2)")},onMouseLeave:m=>{u||(m.currentTarget.style.background="transparent")},children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-[13px] font-medium truncate",style:{color:"var(--text-primary)"},children:r.skill}),n.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-medium px-1.5 py-0.5 rounded-full flex-shrink-0 ml-2",style:{background:o.bg,color:o.text},children:[n.jsx("span",{className:"rounded-full",style:{width:5,height:5,background:o.dot}}),o.label]})]}),n.jsxs("div",{className:"flex items-center gap-2 text-[11px]",style:{color:"var(--text-tertiary)"},children:[n.jsxs("span",{children:[r.evalCount," eval",r.evalCount!==1?"s":""]}),n.jsx("span",{style:{color:"var(--border-subtle)"},children:"|"}),n.jsxs("span",{children:[r.assertionCount," assert",r.assertionCount!==1?"s":""]}),r.lastBenchmark&&n.jsxs(n.Fragment,{children:[n.jsx("span",{style:{color:"var(--border-subtle)"},children:"|"}),n.jsx("span",{children:new Date(r.lastBenchmark).toLocaleDateString()})]})]})]})}function Kv(){const{state:r,selectSkill:u}=Kl(),{skills:f,searchQuery:o,selectedSkill:m}=r,j=N.useMemo(()=>{var S;const C=o.toLowerCase(),p=C?f.filter(h=>h.skill.toLowerCase().includes(C)||h.plugin.toLowerCase().includes(C)):f,x={};for(const h of p)(x[S=h.plugin]||(x[S]=[])).push(h);return x},[f,o]),y=Object.entries(j);return r.skillsLoading?n.jsx("div",{className:"px-3 py-4 space-y-3",children:[1,2,3].map(C=>n.jsx("div",{className:"skeleton h-14 w-full rounded-lg"},C))}):y.length===0?n.jsx("div",{className:"px-4 py-8 text-center",children:n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No skills match your search"})}):n.jsx("div",{className:"flex-1",children:y.map(([C,p])=>n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[n.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:C}),n.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:["(",p.length,")"]}),n.jsx("div",{className:"flex-1 h-px",style:{background:"var(--border-subtle)"}})]}),p.map(x=>{const S=(m==null?void 0:m.plugin)===x.plugin&&(m==null?void 0:m.skill)===x.skill;return n.jsx(Zv,{skill:x,isSelected:S,onSelect:()=>u({plugin:x.plugin,skill:x.skill})},`${x.plugin}/${x.skill}`)})]},C))})}function Jv(){const[r,u]=N.useState(null),[f,o]=N.useState(!1),[m,j]=N.useState(!1),y=N.useRef(null);N.useEffect(()=>{ge.getConfig().then(u).catch(()=>{})},[]),N.useEffect(()=>{function S(h){y.current&&!y.current.contains(h.target)&&o(!1)}return f&&document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[f]);async function C(S,h){j(!0);try{const z=await ge.setConfig(S.id,h.id);u(z),o(!1)}catch{const z=await ge.getConfig();u(z)}finally{j(!1)}}if(!r)return null;const p=Wv(r),x=$v(r);return n.jsxs("div",{ref:y,className:"relative",children:[n.jsxs("button",{onClick:()=>o(!f),className:"w-full flex items-center gap-2 px-2.5 py-1.5 rounded-lg text-[11px] transition-all duration-150",style:{background:f?"var(--surface-3)":"var(--surface-2)",border:`1px solid ${f?"var(--accent)":"var(--border-subtle)"}`,cursor:"pointer"},onMouseEnter:S=>{f||(S.currentTarget.style.borderColor="var(--accent)")},onMouseLeave:S=>{f||(S.currentTarget.style.borderColor="var(--border-subtle)")},children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:x!=null&&x.available?"var(--green)":"var(--text-tertiary)"}}),n.jsx("span",{className:"flex-1 text-left font-medium truncate",style:{color:"var(--text-primary)"},children:p}),n.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",flexShrink:0},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),f&&n.jsxs("div",{className:"absolute top-full mt-1 left-0 right-0 rounded-xl shadow-xl z-50 overflow-hidden animate-fade-in",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)",minWidth:"240px"},children:[n.jsx("div",{className:"px-3 py-2",style:{borderBottom:"1px solid var(--border-subtle)"},children:n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Select Model"})}),n.jsx("div",{className:"py-1 max-h-72 overflow-y-auto",children:r.providers.map(S=>n.jsxs("div",{children:[n.jsxs("div",{className:"px-3 py-1.5 flex items-center gap-2",children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:S.available?"var(--green)":"var(--text-tertiary)",opacity:S.available?1:.3}}),n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",opacity:S.available?1:.5},children:S.label})]}),S.models.map(h=>{const z=If(r,S.id,h.id),Y=!S.available||m;return n.jsxs("button",{onClick:()=>!Y&&C(S,h),disabled:Y,className:"w-full px-3 py-1.5 flex items-center gap-2.5 text-left transition-all duration-100",style:{background:z?"var(--accent-muted)":"transparent",color:Y?"var(--text-tertiary)":"var(--text-primary)",opacity:Y?.4:1,cursor:Y?"not-allowed":"pointer"},onMouseEnter:w=>{!Y&&!z&&(w.currentTarget.style.background="var(--surface-3)")},onMouseLeave:w=>{z||(w.currentTarget.style.background="transparent")},children:[n.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0 flex items-center justify-center",style:{border:`2px solid ${z?"var(--accent)":"var(--border-subtle)"}`},children:z&&n.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}})}),n.jsx("span",{className:"text-[12px]",style:{fontWeight:z?600:400},title:h.id,children:h.label})]},`${S.id}-${h.id}`)})]},S.id))})]})]})}function If(r,u,f){return r.provider!==u?!1:u==="claude-cli"?r.model===`claude-${f}`:r.model===f}function $v(r){return r.providers.find(u=>u.id===r.provider)}function Wv(r){for(const u of r.providers)for(const f of u.models)if(If(r,u.id,f.id))return f.label;return r.model}function Fv(){const{state:r,setMode:u}=Kl(),[f,o]=N.useState(null);return N.useEffect(()=>{ge.getConfig().then(m=>o(m.projectName)).catch(()=>{})},[]),n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsxs("div",{className:"px-4 py-4 flex-shrink-0",style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:"var(--accent-muted)"},children:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})})}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("div",{className:"text-[14px] font-semibold truncate",style:{color:"var(--text-primary)",letterSpacing:"-0.01em"},children:"Skill Studio"}),n.jsx("div",{className:"text-[11px] truncate",style:{color:"var(--text-tertiary)"},children:f||"vskill"})]})]}),n.jsx("div",{className:"mt-3",children:n.jsx(Jv,{})})]}),n.jsx(Vv,{}),n.jsx("div",{className:"px-3 pb-2 flex-shrink-0",children:n.jsxs("button",{onClick:()=>u("create"),className:"w-full flex items-center justify-center gap-2 px-3 py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:r.mode==="create"?"var(--accent)":"var(--surface-3)",color:r.mode==="create"?"#fff":"var(--text-secondary)",border:"none",cursor:"pointer"},onMouseEnter:m=>{r.mode!=="create"&&(m.currentTarget.style.background="var(--surface-4)",m.currentTarget.style.color="var(--text-primary)")},onMouseLeave:m=>{r.mode!=="create"&&(m.currentTarget.style.background="var(--surface-3)",m.currentTarget.style.color="var(--text-secondary)")},children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"New Skill"]})}),n.jsx("div",{className:"flex-1 overflow-y-auto",style:{borderTop:"1px solid var(--border-subtle)"},children:n.jsx(Kv,{})})]})}function Iv(){const[r,u]=N.useState([]),[f,o]=N.useState(!1),[m,j]=N.useState(!1),[y,C]=N.useState(null),p=N.useRef(null),x=N.useCallback(async(h,z)=>{u([]),o(!0),j(!1),C(null);const Y=new AbortController;p.current=Y;try{const w=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:z?JSON.stringify(z):void 0,signal:Y.signal});if(!w.ok||!w.body)throw new Error(`HTTP ${w.status}`);const U=w.body.getReader(),G=new TextDecoder;let Z="",I="";for(;;){const{done:ie,value:Q}=await U.read();if(ie)break;Z+=G.decode(Q,{stream:!0});const le=Z.split(`
|
|
50
|
+
`);Z=le.pop()||"";for(const q of le)if(q.startsWith("event: "))I=q.slice(7).trim();else if(q.startsWith("data: ")){try{const J=JSON.parse(q.slice(6)),fe={event:I,data:J};I==="done"?(j(!0),u(Te=>[...Te,fe])):u(Te=>[...Te,fe])}catch{}I=""}}}catch(w){w.name!=="AbortError"&&C(w.message)}finally{o(!1),p.current=null}},[]),S=N.useCallback(()=>{var h;(h=p.current)==null||h.abort()},[]);return{events:r,running:f,done:m,error:y,start:x,stop:S}}function Pv(r){const u=N.useRef(r);u.current=r;const[f,o]=N.useState(new Set),m=N.useRef(new Map),j=N.useCallback(async(x,S,h)=>{var Y;(Y=m.current.get(x))==null||Y.abort();const z=new AbortController;m.current.set(x,z),o(w=>{const U=new Set(w);return U.add(x),U});try{const w=await fetch(S,{method:"POST",headers:{"Content-Type":"application/json"},body:h?JSON.stringify(h):void 0,signal:z.signal});if(!w.ok||!w.body)throw new Error(`HTTP ${w.status}`);const U=w.body.getReader(),G=new TextDecoder;let Z="",I="";for(;;){const{done:ie,value:Q}=await U.read();if(ie)break;Z+=G.decode(Q,{stream:!0});const le=Z.split(`
|
|
51
|
+
`);Z=le.pop()||"";for(const q of le)if(q.startsWith("event: "))I=q.slice(7).trim();else if(q.startsWith("data: ")){try{const J=JSON.parse(q.slice(6)),fe={event:I,data:J};u.current.onEvent(x,fe)}catch{}I=""}}u.current.onDone(x)}catch(w){w.name!=="AbortError"&&u.current.onError(x,w.message)}finally{o(w=>{const U=new Set(w);return U.delete(x),U}),m.current.delete(x)}},[]),y=N.useCallback(x=>{var S;(S=m.current.get(x))==null||S.abort()},[]),C=N.useCallback(()=>{for(const x of m.current.values())x.abort()},[]),p=f.size>0;return{runningSet:f,startCase:j,stopCase:y,stopAll:C,isAnyCaseRunning:p}}const eh={plugin:"",skill:"",skillContent:"",savedContent:"",isDirty:!1,evals:null,activePanel:"tests",selectedCaseId:null,caseRunStates:new Map,bulkRunActive:!1,runMode:null,latestBenchmark:null,inlineResults:new Map,improveTarget:null,aiEditOpen:!1,aiEditLoading:!1,aiEditResult:null,aiEditError:null,regressions:[],iterationCount:0,activationPrompts:"",activationResults:[],activationSummary:null,activationRunning:!1,activationError:null,loading:!0,error:null};function th(r,u){var f,o;switch(u.type){case"SET_LOADING":return{...r,loading:u.loading};case"SET_ERROR":return{...r,error:u.error};case"INIT_DATA":{const m=new Map;if(u.benchmark)for(const y of u.benchmark.cases)m.set(y.eval_id,{status:y.status,passRate:y.pass_rate,errorMessage:y.error_message||void 0,durationMs:y.durationMs,tokens:y.tokens,output:y.output,assertions:y.assertions.map(C=>({assertion_id:C.id,text:C.text,pass:C.pass,reasoning:C.reasoning}))});const j=((o=(f=u.evals)==null?void 0:f.evals[0])==null?void 0:o.id)??null;return{...r,skillContent:u.skillContent,savedContent:u.skillContent,isDirty:!1,evals:u.evals,latestBenchmark:u.benchmark,inlineResults:m,selectedCaseId:j,loading:!1,error:null}}case"SET_PANEL":return{...r,activePanel:u.panel};case"SET_CONTENT":return{...r,skillContent:u.content,isDirty:u.content!==r.savedContent};case"CONTENT_SAVED":return{...r,savedContent:r.skillContent,isDirty:!1};case"SET_EVALS":return{...r,evals:u.evals};case"SELECT_CASE":return{...r,selectedCaseId:u.caseId};case"CASE_RUN_START":{const m=new Map(r.caseRunStates);return m.set(u.caseId,{status:"running",startedAt:Date.now(),mode:u.mode}),{...r,caseRunStates:m,runMode:u.mode,activePanel:"run"}}case"CASE_RUN_COMPLETE":{const m=new Map(r.caseRunStates);m.set(u.caseId,{status:"complete"});const j=new Map(r.inlineResults);return j.set(u.caseId,u.result),{...r,caseRunStates:m,inlineResults:j}}case"CASE_RUN_ERROR":{const m=new Map(r.caseRunStates);m.set(u.caseId,{status:"error"});const j=new Map(r.inlineResults);return j.set(u.caseId,{status:"error",errorMessage:u.error,assertions:[]}),{...r,caseRunStates:m,inlineResults:j}}case"CASE_RUN_CANCEL":{const m=new Map(r.caseRunStates);return m.set(u.caseId,{status:"cancelled"}),{...r,caseRunStates:m}}case"BULK_RUN_START":{const m=new Map(r.caseRunStates);for(const j of u.caseIds)m.set(j,{status:"queued",mode:u.mode});return{...r,caseRunStates:m,bulkRunActive:!0,runMode:u.mode,activePanel:"run"}}case"BULK_RUN_COMPLETE":return{...r,bulkRunActive:!1,latestBenchmark:u.benchmark??r.latestBenchmark,iterationCount:r.iterationCount+1};case"CANCEL_ALL":{const m=new Map(r.caseRunStates);for(const[j,y]of m)(y.status==="running"||y.status==="queued")&&m.set(j,{status:"cancelled"});return{...r,caseRunStates:m,bulkRunActive:!1}}case"UPDATE_INLINE_RESULT":{const m=new Map(r.inlineResults);return m.set(u.evalId,u.result),{...r,inlineResults:m}}case"OPEN_IMPROVE":return{...r,improveTarget:u.evalId,activePanel:"editor"};case"CLOSE_IMPROVE":return{...r,improveTarget:null};case"OPEN_AI_EDIT":return{...r,aiEditOpen:!0,aiEditResult:null,aiEditError:null};case"CLOSE_AI_EDIT":return{...r,aiEditOpen:!1,aiEditLoading:!1,aiEditResult:null,aiEditError:null};case"AI_EDIT_LOADING":return{...r,aiEditLoading:!0,aiEditError:null};case"AI_EDIT_RESULT":return{...r,aiEditLoading:!1,aiEditResult:{improved:u.improved,reasoning:u.reasoning}};case"AI_EDIT_ERROR":return{...r,aiEditLoading:!1,aiEditError:u.message};case"SET_REGRESSIONS":return{...r,regressions:u.regressions};case"INCREMENT_ITERATION":return{...r,iterationCount:r.iterationCount+1};case"SET_ACTIVATION_PROMPTS":return{...r,activationPrompts:u.prompts};case"ACTIVATION_START":return{...r,activationRunning:!0,activationResults:[],activationSummary:null,activationError:null};case"ACTIVATION_RESULT":return{...r,activationResults:[...r.activationResults,u.result]};case"ACTIVATION_DONE":return{...r,activationRunning:!1,activationSummary:u.summary};case"ACTIVATION_ERROR":return{...r,activationRunning:!1,activationError:u.error};case"ACTIVATION_RESET":return{...r,activationResults:[],activationSummary:null,activationError:null};default:return r}}const Pf=N.createContext(null);function tl(){const r=N.useContext(Pf);if(!r)throw new Error("useWorkspace must be used within WorkspaceProvider");return r}function lh({plugin:r,skill:u,children:f}){const[o,m]=N.useReducer(th,{...eh,plugin:r,skill:u}),j=N.useRef(new Set),y=N.useRef(new Set),C=N.useRef(new Map),p=N.useCallback((R,$)=>{const T=$.data;let H=C.current.get(R);if(H||(H={assertions:[]},C.current.set(R,H)),$.event==="output_ready"&&(H.output=T.output,T.durationMs!=null&&(H.durationMs=T.durationMs),T.tokens!=null&&(H.tokens=T.tokens)),$.event==="assertion_result"){const W={assertion_id:T.assertion_id,text:T.text,pass:T.pass,reasoning:T.reasoning};H.assertions.find(me=>me.assertion_id===W.assertion_id)||H.assertions.push(W)}$.event==="case_complete"&&(H.status=T.status,H.passRate=T.pass_rate,H.errorMessage=T.error_message||void 0),m({type:"UPDATE_INLINE_RESULT",evalId:R,result:{...H,assertions:[...H.assertions]}})},[]),x=N.useCallback(R=>{if(y.current.has(R))return;y.current.add(R);const $=C.current.get(R)??{assertions:[]};m({type:"CASE_RUN_COMPLETE",caseId:R,result:{...$,assertions:[...$.assertions]}}),j.current.has(R)&&(j.current.delete(R),j.current.size===0&&ge.getLatestBenchmark(r,u).then(T=>m({type:"BULK_RUN_COMPLETE",benchmark:T})).catch(()=>m({type:"BULK_RUN_COMPLETE",benchmark:null})))},[r,u]),S=N.useCallback((R,$)=>{y.current.has(R)||(y.current.add(R),m({type:"CASE_RUN_ERROR",caseId:R,error:$}),j.current.has(R)&&(j.current.delete(R),j.current.size===0&&ge.getLatestBenchmark(r,u).then(T=>m({type:"BULK_RUN_COMPLETE",benchmark:T})).catch(()=>m({type:"BULK_RUN_COMPLETE",benchmark:null}))))},[r,u]),{startCase:h,stopCase:z,stopAll:Y}=Pv({onEvent:p,onDone:x,onError:S});N.useEffect(()=>()=>{Y()},[Y]),N.useEffect(()=>{let R=!1;async function $(){try{const[T,H,W]=await Promise.allSettled([ge.getSkillDetail(r,u),ge.getEvals(r,u),ge.getLatestBenchmark(r,u)]);if(R)return;m({type:"INIT_DATA",skillContent:T.status==="fulfilled"?T.value.skillContent:"",evals:H.status==="fulfilled"?H.value:null,benchmark:W.status==="fulfilled"?W.value:null})}catch(T){R||m({type:"SET_ERROR",error:T.message})}}return $(),()=>{R=!0}},[r,u]);const w=N.useCallback(async()=>{try{await ge.applyImprovement(r,u,o.skillContent),m({type:"CONTENT_SAVED"})}catch(R){m({type:"SET_ERROR",error:R.message})}},[r,u,o.skillContent]),U=N.useCallback(async R=>{try{const $=await ge.saveEvals(r,u,R);m({type:"SET_EVALS",evals:$})}catch($){m({type:"SET_ERROR",error:$.message})}},[r,u]),G=N.useCallback((R,$="benchmark")=>{const T=o.caseRunStates.get(R);if((T==null?void 0:T.status)!=="running")if(C.current.delete(R),y.current.delete(R),m({type:"CASE_RUN_START",caseId:R,mode:$}),$==="comparison"){const H=`/api/skills/${r}/${u}/compare`;h(R,H,{eval_ids:[R]})}else{const H=`/api/skills/${r}/${u}/benchmark/case/${R}`;h(R,H,$==="baseline"?{baseline_only:!0}:void 0)}},[r,u,o.caseRunStates,h]),Z=N.useCallback((R="benchmark")=>{var H;const $=((H=o.evals)==null?void 0:H.evals)??[];if($.length===0)return;const T=$.map(W=>W.id);for(const W of T)C.current.delete(W),y.current.delete(W);m({type:"BULK_RUN_START",caseIds:T,mode:R}),j.current=new Set(T);for(const W of T)if(R==="comparison")h(W,`/api/skills/${r}/${u}/compare`,{eval_ids:[W]});else{const me=`/api/skills/${r}/${u}/benchmark/case/${W}`;h(W,me,R==="baseline"?{baseline_only:!0}:void 0)}},[r,u,o.evals,h]),I=N.useCallback(R=>{z(R),m({type:"CASE_RUN_CANCEL",caseId:R}),j.current.delete(R),y.current.add(R)},[z]),ie=N.useCallback(()=>{Y(),m({type:"CANCEL_ALL"}),j.current.clear()},[Y]),Q=N.useCallback(async(R,$)=>{m({type:"OPEN_IMPROVE",evalId:R})},[]),le=N.useCallback(async(R,$)=>{try{await ge.applyImprovement(r,u,$),m({type:"SET_CONTENT",content:$}),m({type:"CONTENT_SAVED"}),m({type:"CLOSE_IMPROVE"}),G(R,"benchmark")}catch(T){m({type:"SET_ERROR",error:T.message})}},[r,u,G]),q=N.useCallback(async R=>{m({type:"AI_EDIT_LOADING"});try{const $=await ge.instructEdit(r,u,{instruction:R,content:o.skillContent});m({type:"AI_EDIT_RESULT",improved:$.improved,reasoning:$.reasoning})}catch($){m({type:"AI_EDIT_ERROR",message:$.message})}},[r,u,o.skillContent]),J=N.useCallback(async()=>{var $;const R=($=o.aiEditResult)==null?void 0:$.improved;if(R)try{await ge.applyImprovement(r,u,R),m({type:"SET_CONTENT",content:R}),m({type:"CONTENT_SAVED"}),m({type:"CLOSE_AI_EDIT"})}catch(T){m({type:"SET_ERROR",error:T.message})}},[r,u,o.aiEditResult]),fe=N.useCallback(()=>{m({type:"CLOSE_AI_EDIT"})},[]),Te=N.useCallback(async()=>{try{const R=await ge.getSkillDetail(r,u);m({type:"SET_CONTENT",content:R.skillContent}),m({type:"CONTENT_SAVED"})}catch{}},[r,u]),ae=N.useCallback(async()=>{try{const R=await ge.generateEvals(r,u),$=await ge.saveEvals(r,u,R);m({type:"SET_EVALS",evals:$})}catch(R){m({type:"SET_ERROR",error:R.message})}},[r,u]),X=Iv();N.useEffect(()=>()=>{X.stop()},[X.stop]),N.useEffect(()=>{if(X.events.length)for(const R of X.events)R.event==="prompt_result"&&m({type:"ACTIVATION_RESULT",result:R.data}),R.event==="done"&&m({type:"ACTIVATION_DONE",summary:R.data})},[X.events]),N.useEffect(()=>{X.error&&m({type:"ACTIVATION_ERROR",error:X.error})},[X.error]);const oe=N.useCallback(R=>{const T=R.trim().split(`
|
|
52
|
+
`).filter(Boolean).map(H=>H.startsWith("!")?{prompt:H.slice(1).trim(),expected:"should_not_activate"}:H.startsWith("+")?{prompt:H.slice(1).trim(),expected:"should_activate"}:{prompt:H.trim(),expected:"auto"});m({type:"ACTIVATION_START"}),X.start(`/api/skills/${r}/${u}/activation-test`,{prompts:T})},[r,u,X]),V=N.useMemo(()=>({state:o,dispatch:m,saveContent:w,saveEvals:U,runCase:G,runAll:Z,cancelCase:I,cancelAll:ie,improveForCase:Q,applyImproveAndRerun:le,refreshSkillContent:Te,generateEvals:ae,runActivationTest:oe,submitAiEdit:q,applyAiEdit:J,discardAiEdit:fe}),[o,w,U,G,Z,I,ie,Q,le,Te,ae,oe,q,J,fe]);return n.jsx(Pf.Provider,{value:V,children:f})}function ah({state:r}){const{plugin:u,skill:f,evals:o,latestBenchmark:m,isDirty:j,caseRunStates:y,regressions:C,iterationCount:p}=r,x=Array.from(y.values()).some(U=>U.status==="running"||U.status==="queued"),S=m==null?void 0:m.overall_pass_rate,h=(o==null?void 0:o.evals.reduce((U,G)=>U+G.assertions.length,0))??0,z=(o==null?void 0:o.evals.length)??0,Y=S!=null?S>=80?"var(--green)":S>=50?"var(--yellow)":"var(--red)":"var(--text-tertiary)",w=S!=null?S>=80?"var(--green-muted)":S>=50?"var(--yellow-muted)":"var(--red-muted)":"var(--surface-3)";return n.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)",flexShrink:0},children:[n.jsxs("div",{className:"flex items-center gap-2 text-[13px]",children:[n.jsx("span",{style:{color:"var(--text-tertiary)"},children:u}),n.jsx(nh,{}),n.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:f}),j&&n.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&&n.jsxs("span",{className:"ml-2 flex items-center gap-1.5 text-[11px]",style:{color:"var(--accent)"},children:[n.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}}),"Running..."]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[C.length>0&&n.jsxs("span",{className:"pill",style:{background:"var(--red-muted)",color:"var(--red)"},children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[n.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"}),n.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),n.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),C.length," regression",C.length>1?"s":""]}),p>0&&n.jsxs("span",{className:"pill",style:{background:"var(--purple-muted)",color:"var(--purple)"},children:["Iter ",p]}),n.jsx("span",{className:"pill",style:{background:w,color:Y},children:S!=null?`${Math.round(S*100)}%`:"--"}),n.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[z," case",z!==1?"s":""," / ",h," assert",h!==1?"s":""]})]})]})}function nh(){return n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})})}const sh=[{label:"Build",tabs:[{id:"editor",label:"Editor",shortcut:"1"},{id:"tests",label:"Tests",shortcut:"2"}]},{label:"Evaluate",tabs:[{id:"run",label:"Run",shortcut:"3"},{id:"activation",label:"Activation",shortcut:"4"}]},{label:"Insights",tabs:[{id:"history",label:"History",shortcut:"5"},{id:"deps",label:"Deps",shortcut:"6"}]}];function ih({id:r}){const u={width:14,height:14,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"};switch(r){case"editor":return n.jsxs("svg",{...u,children:[n.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),n.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]});case"tests":return n.jsxs("svg",{...u,children:[n.jsx("path",{d:"M9 11l3 3L22 4"}),n.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 n.jsx("svg",{...u,children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})});case"activation":return n.jsxs("svg",{...u,children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("circle",{cx:"12",cy:"12",r:"6"}),n.jsx("circle",{cx:"12",cy:"12",r:"2"})]});case"history":return n.jsxs("svg",{...u,children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"12 6 12 12 16 14"})]});case"deps":return n.jsxs("svg",{...u,children:[n.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),n.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}}function rh({activePanel:r,onPanelChange:u,isDirty:f,isRunning:o,hasRegressions:m,isActivationRunning:j}){return n.jsx("div",{className:"flex items-center gap-0.5 px-3 overflow-x-auto",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)",flexShrink:0},children:sh.map((y,C)=>n.jsxs("div",{className:"flex items-center",children:[C>0&&n.jsx("div",{style:{width:1,height:20,background:"var(--border-subtle)",margin:"0 6px",flexShrink:0}}),y.tabs.map(p=>{const x=r===p.id,S=p.id==="editor"&&f||p.id==="run"&&o||p.id==="activation"&&j||p.id==="history"&&m,h=p.id==="run"||p.id==="activation"?"var(--accent)":p.id==="history"?"var(--red)":"var(--yellow)";return n.jsxs("button",{onClick:()=>u(p.id),title:`${p.label} (Ctrl+${p.shortcut})`,className:"relative flex items-center gap-1.5 px-3 py-2.5 text-[12px] font-medium transition-colors duration-150",style:{background:"transparent",color:x?"var(--text-primary)":"var(--text-tertiary)",borderBottom:x?"2px solid var(--accent)":"2px solid transparent",cursor:"pointer",border:"none",borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:x?"var(--accent)":"transparent",whiteSpace:"nowrap"},onMouseEnter:z=>{x||(z.currentTarget.style.color="var(--text-secondary)")},onMouseLeave:z=>{x||(z.currentTarget.style.color="var(--text-tertiary)")},children:[n.jsx(ih,{id:p.id}),p.label,S&&n.jsx("span",{className:"absolute top-1.5 right-1 rounded-full",style:{width:5,height:5,background:h}})]},p.id)})]},y.label))})}function ch(r){const u=r.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);if(!u)return{metadata:{},body:r};const f=u[1],o=u[2].trim(),m={},j=f.split(`
|
|
53
|
+
`);let y="",C=!1;for(const p of j){const x=p.match(/^[ \t]+([\w-]+):\s*(.*)$/);if(x&&y&&C){const z=x[1],Y=x[2].trim();let w=m[y];if((typeof w!="object"||Array.isArray(w))&&(w={},m[y]=w),!Y)w[z]=[];else{const U=Y.match(/^\[(.+)\]$/);U?w[z]=U[1].split(",").map(G=>G.trim().replace(/^["']|["']$/g,"")).filter(Boolean):w[z]=Y.replace(/^["']|["']$/g,"")}continue}const S=p.match(/^\s+-\s+(.+)$/);if(S&&y){C=!1;const z=m[y];Array.isArray(z)?z.push(S[1].trim().replace(/^["']|["']$/g,"")):m[y]=[S[1].trim().replace(/^["']|["']$/g,"")];continue}const h=p.match(/^([\w-]+):\s*(.*)$/);if(h){y=h[1];const z=h[2].trim();if(C=!1,!z){m[y]={},C=!0;continue}const Y=z.match(/^\[(.+)\]$/);if(Y){m[y]=Y[1].split(",").map(w=>w.trim().replace(/^["']|["']$/g,"")).filter(Boolean);continue}m[y]=z.replace(/^["']|["']$/g,"")}}return{metadata:m,body:o}}function em(r){if(!r)return"";let u=uh(r);return u=u.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>'),u=u.replace(/^### (.+)$/gm,'<div style="font-weight:600;font-size:14px;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),u=u.replace(/^## (.+)$/gm,'<div style="font-weight:700;font-size:15px;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),u=u.replace(/^# (.+)$/gm,'<div style="font-weight:700;font-size:1rem;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),u=u.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:var(--accent);text-decoration:underline">$1</a>'),u=u.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),u=u.replace(/\*([^*]+)\*/g,"<em>$1</em>"),u=u.replace(/`([^`]+)`/g,'<code style="background:var(--surface-3);padding:0.1rem 0.3rem;border-radius:3px;font-size:0.85em">$1</code>'),u=u.replace(/^- (.+)$/gm,'<div style="padding-left:1rem;margin:0.15rem 0">• $1</div>'),u=u.replace(/^(\d+)\. (.+)$/gm,'<div style="padding-left:1rem;margin:0.15rem 0">$1. $2</div>'),u=u.replace(/\n\n/g,'<div style="height:0.5rem"></div>'),u=u.replace(/\n/g,"<br/>"),u}function uh(r){const u=r.split(`
|
|
54
|
+
`),f=[];let o=0;for(;o<u.length;)if(u[o].trim().startsWith("|")&&o+1<u.length&&u[o+1].trim().startsWith("|")&&/\|[\s-:]+\|/.test(u[o+1])){const m=Qf(u[o]);o+=2;const j=[];for(;o<u.length&&u[o].trim().startsWith("|");)j.push(Qf(u[o])),o++;const y='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)"',C='style="padding:0.4rem 0.6rem;font-size:12px;color:var(--text-secondary);border-bottom:1px solid var(--border-subtle)"';let p='<table style="width:100%;border-collapse:collapse;margin:0.5rem 0;border:1px solid var(--border-subtle);border-radius:6px;overflow:hidden">';p+="<thead><tr>";for(const x of m)p+=`<th ${y}>${x}</th>`;p+="</tr></thead><tbody>";for(const x of j){p+="<tr>";for(const S of x)p+=`<td ${C}>${S}</td>`;p+="</tr>"}p+="</tbody></table>",f.push(p)}else f.push(u[o]),o++;return f.join(`
|
|
55
|
+
`)}function Qf(r){return r.split("|").map(u=>u.trim()).filter(u=>u.length>0)}function _c(r,u){const f=r.split(`
|
|
56
|
+
`),o=u.split(`
|
|
57
|
+
`);if(f.length>1e3||o.length>1e3)return[...f.map(S=>({type:"unchanged",content:S}))];const m=f.length,j=o.length,y=Array.from({length:m+1},()=>new Array(j+1).fill(0));for(let S=1;S<=m;S++)for(let h=1;h<=j;h++)f[S-1]===o[h-1]?y[S][h]=y[S-1][h-1]+1:y[S][h]=Math.max(y[S-1][h],y[S][h-1]);const C=[];let p=m,x=j;for(;p>0||x>0;)p>0&&x>0&&f[p-1]===o[x-1]?(C.push({type:"unchanged",content:f[p-1]}),p--,x--):x>0&&(p===0||y[p][x-1]>=y[p-1][x])?(C.push({type:"added",content:o[x-1]}),x--):(C.push({type:"removed",content:f[p-1]}),p--);return C.reverse()}function oh({plugin:r,skill:u,skillContent:f,onApplied:o}){const[m,j]=N.useState("closed"),[y,C]=N.useState(null),[p,x]=N.useState("claude-cli"),[S,h]=N.useState("opus"),[z,Y]=N.useState([]),[w,U]=N.useState(""),[G,Z]=N.useState(""),[I,ie]=N.useState(null),[Q,le]=N.useState(!1);N.useEffect(()=>{ge.getConfig().then(X=>{C(X),X.providers.find(V=>V.id==="claude-cli"&&V.available)&&(x("claude-cli"),h("opus"))}).catch(()=>{})},[]);function q(){return y==null?void 0:y.providers.find(X=>X.id===p&&X.available)}async function J(){j("loading"),ie(null);try{const X=await ge.improveSkill(r,u,{provider:p,model:S});U(X.improved),Z(X.reasoning),Y(_c(X.original,X.improved)),j("diff_shown")}catch(X){ie(X.message),j("open")}}async function fe(){le(!0);try{await ge.applyImprovement(r,u,w),o(w),j("closed")}catch(X){ie(X.message)}finally{le(!1)}}function Te(){j("closed"),Y([]),U(""),Z(""),ie(null)}if(m==="closed")return n.jsxs("button",{onClick:()=>j("open"),className:"btn btn-secondary mb-5",disabled:!f,children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]}),"Improve Skill"]});const ae=q();return n.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden animate-fade-in",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5",style:{background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]})}),n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"AI Skill Improvement"})]}),n.jsx("button",{onClick:Te,className:"w-7 h-7 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:X=>{X.currentTarget.style.background="var(--surface-3)"},onMouseLeave:X=>{X.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsxs("div",{className:"px-5 py-4",children:[(m==="open"||m==="loading")&&n.jsxs("div",{className:"flex items-end gap-3 mb-4",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Provider"}),n.jsx("select",{className:"input-field text-[12px] py-1.5",value:p,onChange:X=>{x(X.target.value);const oe=y==null?void 0:y.providers.find(V=>V.id===X.target.value);oe!=null&&oe.models[0]&&h(oe.models[0].id)},disabled:m==="loading",children:y==null?void 0:y.providers.filter(X=>X.available).map(X=>n.jsx("option",{value:X.id,children:X.label},X.id))})]}),n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Model"}),n.jsx("select",{className:"input-field text-[12px] py-1.5",value:S,onChange:X=>h(X.target.value),disabled:m==="loading",children:ae==null?void 0:ae.models.map(X=>n.jsx("option",{value:X.id,children:X.label},X.id))})]}),n.jsx("button",{onClick:J,disabled:m==="loading",className:"btn btn-primary flex-shrink-0",children:m==="loading"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}})," Improving..."]}):"Improve"})]}),I&&n.jsx("div",{className:"mb-4 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:I}),m==="diff_shown"&&n.jsxs(n.Fragment,{children:[G&&n.jsxs("div",{className:"mb-4 px-4 py-3 rounded-lg text-[12px]",style:{background:"rgba(168,85,247,0.08)",color:"var(--text-secondary)",border:"1px solid rgba(168,85,247,0.2)"},children:[n.jsx("span",{className:"font-semibold",style:{color:"#a855f7"},children:"AI Reasoning: "}),G]}),n.jsx("div",{className:"rounded-lg overflow-hidden mb-4",style:{border:"1px solid var(--border-subtle)",maxHeight:"400px",overflowY:"auto"},children:z.map((X,oe)=>n.jsxs("div",{className:"px-3 py-0.5 text-[11px] font-mono",style:{background:X.type==="added"?"rgba(34,197,94,0.1)":X.type==="removed"?"rgba(239,68,68,0.1)":"transparent",color:X.type==="added"?"var(--green)":X.type==="removed"?"var(--red)":"var(--text-secondary)",borderLeft:X.type==="added"?"3px solid var(--green)":X.type==="removed"?"3px solid var(--red)":"3px solid transparent"},children:[n.jsx("span",{style:{userSelect:"none",opacity:.5,marginRight:8},children:X.type==="added"?"+":X.type==="removed"?"-":" "}),X.content]},oe))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:fe,disabled:Q,className:"btn btn-primary",children:Q?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}})," Applying..."]}):n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})})," Apply"]})}),n.jsx("button",{onClick:Te,className:"btn btn-secondary",children:"Discard"})]})]})]})]})}function dh(){const{state:r,dispatch:u,submitAiEdit:f,applyAiEdit:o,discardAiEdit:m}=tl(),{aiEditLoading:j,aiEditResult:y,aiEditError:C}=r,[p,x]=N.useState(""),[S,h]=N.useState(null),[z,Y]=N.useState("claude-cli"),[w,U]=N.useState("opus"),G=N.useRef(null);N.useEffect(()=>{var q;(q=G.current)==null||q.focus()},[]),N.useEffect(()=>{ge.getConfig().then(q=>{h(q),q.providers.find(fe=>fe.id==="claude-cli"&&fe.available)&&(Y("claude-cli"),U("opus"))}).catch(()=>{})},[]);const Z=S==null?void 0:S.providers.find(q=>q.id===z&&q.available),I=N.useCallback(()=>{const q=p.trim();!q||j||f(q)},[p,j,f]),ie=N.useCallback(q=>{q.key==="Enter"&&!q.shiftKey&&(q.preventDefault(),I()),q.key==="Escape"&&(q.preventDefault(),m())},[I,m]),Q=N.useCallback(()=>{u({type:"CLOSE_AI_EDIT"}),u({type:"OPEN_AI_EDIT"})},[u]),le=y?_c(r.skillContent,y.improved):[];return n.jsxs("div",{className:"animate-fade-in",style:{background:"var(--surface-1)",borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-2)"},children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-6 h-6 rounded-md flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M15 4V2"}),n.jsx("path",{d:"M15 16v-2"}),n.jsx("path",{d:"M8 9h2"}),n.jsx("path",{d:"M20 9h2"}),n.jsx("path",{d:"M17.8 11.8L19 13"}),n.jsx("path",{d:"M15 9h.01"}),n.jsx("path",{d:"M17.8 6.2L19 5"}),n.jsx("path",{d:"M11 6.2L9.7 5"}),n.jsx("path",{d:"M3 21l9-9"})]})}),n.jsx("span",{className:"text-[12px] font-semibold",style:{color:"var(--text-primary)"},children:"AI Edit"}),n.jsx("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:"Describe what to change — Enter to submit, Esc to dismiss"})]}),n.jsx("button",{onClick:m,className:"w-6 h-6 rounded-md flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:q=>{q.currentTarget.style.background="var(--surface-3)"},onMouseLeave:q=>{q.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsxs("div",{className:"px-4 py-3",children:[!y&&n.jsxs("div",{className:"flex items-end gap-2.5",children:[n.jsx("div",{className:"flex-1",children:n.jsx("textarea",{ref:G,value:p,onChange:q=>x(q.target.value),onKeyDown:ie,placeholder:"e.g., Add an error handling section...",disabled:j,rows:1,className:"w-full resize-none outline-none",style:{background:"var(--surface-0)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)",borderRadius:6,padding:"8px 12px",fontSize:12.5,lineHeight:1.5,fontFamily:"var(--font-mono, 'JetBrains Mono', ui-monospace, monospace)",minHeight:36,maxHeight:96},onInput:q=>{const J=q.currentTarget;J.style.height="auto",J.style.height=Math.min(J.scrollHeight,96)+"px"}})}),n.jsxs("div",{style:{minWidth:100},children:[n.jsx("label",{className:"text-[10px] font-medium mb-0.5 block",style:{color:"var(--text-tertiary)"},children:"Provider"}),n.jsx("select",{className:"input-field text-[11px] py-1",value:z,onChange:q=>{Y(q.target.value);const J=S==null?void 0:S.providers.find(fe=>fe.id===q.target.value);J!=null&&J.models[0]&&U(J.models[0].id)},disabled:j,style:{width:"100%"},children:S==null?void 0:S.providers.filter(q=>q.available).map(q=>n.jsx("option",{value:q.id,children:q.label},q.id))})]}),n.jsxs("div",{style:{minWidth:80},children:[n.jsx("label",{className:"text-[10px] font-medium mb-0.5 block",style:{color:"var(--text-tertiary)"},children:"Model"}),n.jsx("select",{className:"input-field text-[11px] py-1",value:w,onChange:q=>U(q.target.value),disabled:j,style:{width:"100%"},children:Z==null?void 0:Z.models.map(q=>n.jsx("option",{value:q.id,children:q.label},q.id))})]}),n.jsx("button",{onClick:I,disabled:j||!p.trim(),className:"btn btn-primary flex-shrink-0 text-[11px]",style:{padding:"6px 14px"},children:j?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{width:11,height:11,borderWidth:1.5}})," Editing..."]}):"Submit"})]}),C&&n.jsx("div",{className:"mt-3 px-3 py-2.5 rounded-lg text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:C}),y&&n.jsxs("div",{className:"animate-fade-in",children:[y.reasoning&&n.jsxs("div",{className:"mb-3 px-3 py-2.5 rounded-lg text-[11.5px]",style:{background:"rgba(168,85,247,0.08)",color:"var(--text-secondary)",border:"1px solid rgba(168,85,247,0.2)"},children:[n.jsx("span",{className:"font-semibold",style:{color:"#a855f7"},children:"AI Reasoning: "}),y.reasoning]}),n.jsx("div",{className:"rounded-lg overflow-hidden mb-3",style:{border:"1px solid var(--border-subtle)",maxHeight:300,overflowY:"auto"},children:le.map((q,J)=>n.jsxs("div",{className:"px-3 py-0.5 text-[10.5px] font-mono",style:{background:q.type==="added"?"rgba(34,197,94,0.1)":q.type==="removed"?"rgba(239,68,68,0.1)":"transparent",color:q.type==="added"?"var(--green)":q.type==="removed"?"var(--red)":"var(--text-secondary)",borderLeft:q.type==="added"?"3px solid var(--green)":q.type==="removed"?"3px solid var(--red)":"3px solid transparent"},children:[n.jsx("span",{style:{userSelect:"none",opacity:.5,marginRight:8},children:q.type==="added"?"+":q.type==="removed"?"-":" "}),q.content]},J))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs("button",{onClick:o,className:"btn btn-primary text-[11px]",style:{padding:"5px 12px"},children:[n.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}),"Apply"]}),n.jsx("button",{onClick:m,className:"btn btn-secondary text-[11px]",style:{padding:"5px 12px"},children:"Discard"}),n.jsx("button",{onClick:Q,className:"btn btn-ghost text-[11px]",style:{padding:"5px 12px"},children:"Try Again"})]})]})]})]})}function fh({size:r=15}){return n.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("polyline",{points:"16 18 22 12 16 6"}),n.jsx("polyline",{points:"8 6 2 12 8 18"})]})}function mh({size:r=15}){return n.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"3"}),n.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"21"})]})}function xh({size:r=15}){return n.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),n.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function vh({size:r=15}){return n.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M15 4V2"}),n.jsx("path",{d:"M15 16v-2"}),n.jsx("path",{d:"M8 9h2"}),n.jsx("path",{d:"M20 9h2"}),n.jsx("path",{d:"M17.8 11.8L19 13"}),n.jsx("path",{d:"M15 9h.01"}),n.jsx("path",{d:"M17.8 6.2L19 5"}),n.jsx("path",{d:"M11 6.2L9.7 5"}),n.jsx("path",{d:"M3 21l9-9"})]})}function hh(){const{state:r,dispatch:u,saveContent:f}=tl(),{plugin:o,skill:m,skillContent:j,isDirty:y,improveTarget:C,aiEditOpen:p}=r,[x,S]=N.useState("split"),[h,z]=N.useState(!1),Y=N.useRef(null),{metadata:w,body:U}=ch(j),G=w["allowed-tools"],Z=Array.isArray(G)?G:typeof G=="string"?[G]:[],I=w.name,ie=w.description,Q=w.metadata,le=typeof Q=="object"&&!Array.isArray(Q)?Q:null,q=w.version||(le==null?void 0:le.version),J=w.tags||(le==null?void 0:le.tags),fe=Array.isArray(J)?J:typeof J=="string"?J.split(",").map(R=>R.trim()).filter(Boolean):[],Te=new Set(["name","description","metadata","allowed-tools","version","tags"]),ae=Object.entries(w).filter(([R])=>!Te.has(R)),X=N.useCallback(async()=>{z(!0),await f(),z(!1)},[f]),oe=N.useCallback(R=>{(R.ctrlKey||R.metaKey)&&R.key==="s"&&(R.preventDefault(),R.stopPropagation(),y&&X()),(R.ctrlKey||R.metaKey)&&R.key==="k"&&(R.preventDefault(),R.stopPropagation(),u({type:p?"CLOSE_AI_EDIT":"OPEN_AI_EDIT"}))},[y,X,p,u]),V=[{mode:"raw",icon:n.jsx(fh,{}),label:"Editor"},{mode:"split",icon:n.jsx(mh,{}),label:"Split"},{mode:"preview",icon:n.jsx(xh,{}),label:"Preview"}];return n.jsxs("div",{className:"flex flex-col h-full",onKeyDown:oe,tabIndex:-1,children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsx("div",{className:"flex items-center",style:{background:"var(--surface-2)",borderRadius:8,padding:2,gap:1},children:V.map(({mode:R,icon:$,label:T})=>n.jsxs("button",{onClick:()=>S(R),title:T,className:"flex items-center gap-1.5 rounded-md transition-all duration-150",style:{padding:"5px 10px",background:x===R?"var(--surface-4)":"transparent",color:x===R?"var(--text-primary)":"var(--text-tertiary)",fontSize:11,fontWeight:x===R?600:400,border:"none",cursor:"pointer"},children:[$,n.jsx("span",{style:{letterSpacing:"0.01em"},children:T})]},R))}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("button",{onClick:()=>u({type:p?"CLOSE_AI_EDIT":"OPEN_AI_EDIT"}),title:"Edit with AI (Ctrl+K)",className:"flex items-center gap-1.5 rounded-md transition-all duration-150",style:{padding:"4px 10px",fontSize:11,fontWeight:p?600:400,border:"none",cursor:"pointer",color:p?"#a855f7":"var(--text-tertiary)",background:p?"rgba(168,85,247,0.12)":"transparent"},children:[n.jsx(vh,{size:13}),n.jsx("span",{children:"AI Edit"})]}),n.jsx("div",{style:{width:1,height:16,background:"var(--border-subtle)"}}),y&&n.jsx("button",{onClick:()=>u({type:"SET_CONTENT",content:r.savedContent}),className:"btn btn-ghost text-[11px]",style:{padding:"4px 8px"},children:"Discard"}),n.jsx("button",{onClick:X,disabled:!y||h,className:"btn btn-primary text-[11px]",style:{padding:"5px 14px"},children:h?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"spinner",style:{width:11,height:11,borderWidth:1.5}})," Saving..."]}):"Save"})]})]}),n.jsxs("div",{className:"flex-1 overflow-hidden",style:{display:"grid",gridTemplateColumns:x==="raw"||x==="preview"?"1fr":"1fr 1fr"},children:[x!=="preview"&&n.jsx("div",{className:"flex flex-col overflow-hidden",style:{borderRight:x==="split"?"1px solid var(--border-subtle)":"none"},children:n.jsx("textarea",{ref:Y,value:j,onChange:R=>u({type:"SET_CONTENT",content:R.target.value}),onKeyDown:oe,spellCheck:!1,className:"flex-1 w-full resize-none outline-none",style:{background:"var(--surface-0)",color:"var(--text-primary)",fontFamily:"var(--font-mono, 'JetBrains Mono', ui-monospace, monospace)",fontSize:12.5,lineHeight:1.7,tabSize:2,border:"none",padding:"16px 20px"}})}),x!=="raw"&&n.jsx("div",{className:"overflow-auto",style:{background:"var(--surface-0)"},children:n.jsxs("div",{className:"animate-fade-in",style:{padding:"20px 24px",maxWidth:720},children:[(I||q||ie)&&n.jsxs("div",{style:{marginBottom:20},children:[n.jsxs("div",{className:"flex items-baseline gap-3",style:{marginBottom:8},children:[I&&n.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"var(--text-primary)",letterSpacing:"-0.02em",lineHeight:1.2,margin:0},children:I}),q&&n.jsxs("span",{style:{fontSize:10,fontWeight:600,color:"var(--accent)",background:"var(--accent-muted)",padding:"2px 7px",borderRadius:4,letterSpacing:"0.03em",fontFamily:"var(--font-mono, ui-monospace, monospace)"},children:["v",q]})]}),ie&&n.jsx("p",{style:{fontSize:12.5,lineHeight:1.65,color:"var(--text-secondary)",margin:0,paddingLeft:12,borderLeft:"2px solid var(--accent)",maxWidth:600},children:ie})]}),fe.length>0&&n.jsx("div",{className:"flex flex-wrap items-center gap-1.5",style:{marginBottom:16},children:fe.map(R=>n.jsx("span",{style:{fontSize:10,fontWeight:500,color:"var(--text-tertiary)",background:"var(--surface-2)",padding:"3px 8px",borderRadius:4,letterSpacing:"0.02em"},children:R},R))}),Z.length>0&&n.jsx("div",{style:{marginBottom:16},children:n.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[n.jsx("span",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--text-tertiary)",marginRight:4},children:"Tools"}),Z.map(R=>n.jsx("span",{style:{fontSize:10.5,fontFamily:"var(--font-mono, ui-monospace, monospace)",color:"var(--accent)",background:"var(--accent-muted)",padding:"2px 7px",borderRadius:4},children:R},R))]})}),ae.length>0&&n.jsx("div",{style:{marginBottom:16,padding:"8px 0",borderTop:"1px solid var(--border-subtle)",borderBottom:"1px solid var(--border-subtle)"},children:ae.map(([R,$],T)=>{const H=Array.isArray($)?$.join(", "):typeof $=="object"?Object.entries($).map(([W,me])=>`${W}: ${Array.isArray(me)?me.join(", "):me}`).join(" | "):$;return n.jsxs("div",{className:"flex items-baseline gap-3",style:{padding:"4px 0",borderTop:T>0?"1px solid var(--border-subtle)":"none"},children:[n.jsx("span",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--text-tertiary)",minWidth:80,flexShrink:0},children:R}),n.jsx("span",{style:{fontSize:12,color:"var(--text-secondary)"},children:H})]},R)})}),(I||ie||fe.length>0||Z.length>0||ae.length>0)&&U&&n.jsx("div",{style:{height:1,background:"linear-gradient(90deg, var(--accent) 0%, var(--border-subtle) 40%, transparent 100%)",marginBottom:20,opacity:.5}}),U&&n.jsx("div",{className:"text-[13px] leading-relaxed overflow-x-auto",style:{color:"var(--text-secondary)",wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:em(U)}})]})})]}),p&&n.jsx(dh,{}),C!==null&&o&&m&&n.jsx("div",{style:{borderTop:"1px solid var(--border-subtle)"},children:n.jsx(oh,{plugin:o,skill:m,skillContent:j,onApplied:R=>{u({type:"SET_CONTENT",content:R}),u({type:"CONTENT_SAVED"}),u({type:"CLOSE_IMPROVE"})}})})]})}function Ec(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function tm(r){const u=new Date(r);return u.toLocaleDateString(void 0,{month:"short",day:"numeric"})+", "+u.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function lm(r){return r==null?"--":r>=1e3?`${(r/1e3).toFixed(1)}s`:`${r}ms`}function am({entries:r}){if(r.length<2)return null;const u=80,f=24,o=2,m=r.slice().reverse(),j=m.length,y=m.map((C,p)=>{const x=o+p/(j-1)*(u-o*2),S=o+(f-o*2)-C.pass_rate*(f-o*2);return`${x},${S}`});return n.jsxs("svg",{width:u,height:f,style:{display:"block",flexShrink:0},children:[n.jsx("polyline",{points:y.join(" "),fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),y.length>0&&n.jsx("circle",{cx:parseFloat(y[y.length-1].split(",")[0]),cy:parseFloat(y[y.length-1].split(",")[1]),r:2.5,fill:"var(--accent)"})]})}function ph(){var ie;const{state:r,dispatch:u,saveEvals:f,runCase:o,cancelCase:m,generateEvals:j}=tl(),{evals:y,selectedCaseId:C,inlineResults:p,caseRunStates:x}=r,[S,h]=N.useState(!1),[z,Y]=N.useState(!1),w={skill_name:r.skill,evals:[]},U=y??w,G=U.evals,Z=G.find(Q=>Q.id===C)??null,I=N.useCallback(async()=>{Y(!0),await j(),Y(!1)},[j]);return!y||G.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 px-8",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center",style:{background:"var(--accent-muted)"},children:n.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M9 11l3 3L22 4"}),n.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]})}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-[14px] font-medium mb-1",style:{color:"var(--text-primary)"},children:"No test cases yet"}),n.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Create test cases to start evaluating your skill"})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:()=>h(!0),className:"btn btn-primary text-[12px]",children:"Create Test Case"}),n.jsx("button",{onClick:I,disabled:z,className:"btn btn-secondary text-[12px]",children:z?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}})," Generating..."]}):"Generate with AI"})]}),S&&n.jsx(Xf,{evals:U,onSave:Q=>{f(Q),h(!1)},onCancel:()=>h(!1)})]}):n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"280px 1fr",height:"100%",overflow:"hidden"},children:[n.jsxs("div",{className:"overflow-auto",style:{borderRight:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.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 (",G.length,")"]}),n.jsx("div",{className:"py-1",children:G.map(Q=>{const le=p.get(Q.id),q=C===Q.id;return n.jsxs("button",{onClick:()=>u({type:"SELECT_CASE",caseId:Q.id}),className:"w-full text-left px-3 py-2.5 transition-all duration-150",style:{background:q?"var(--accent-muted)":"transparent",borderLeft:q?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:J=>{q||(J.currentTarget.style.background="var(--surface-2)")},onMouseLeave:J=>{q||(J.currentTarget.style.background="transparent")},children:[n.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[n.jsxs("span",{className:"text-[12px] font-medium truncate",style:{color:q?"var(--text-primary)":"var(--text-secondary)"},children:["#",Q.id," ",Q.name]}),n.jsx(nm,{result:le})]}),n.jsxs("div",{className:"text-[11px] flex items-center gap-2",style:{color:"var(--text-tertiary)"},children:[Q.assertions.length," assertion",Q.assertions.length!==1?"s":"",(le==null?void 0:le.passRate)!=null&&n.jsx(bh,{passRate:le.passRate})]})]},Q.id)})}),n.jsx("div",{className:"px-3 py-2",children:n.jsx("button",{onClick:()=>h(!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:Q=>{Q.currentTarget.style.borderColor="var(--accent)",Q.currentTarget.style.color="var(--accent)"},onMouseLeave:Q=>{Q.currentTarget.style.borderColor="var(--border-default)",Q.currentTarget.style.color="var(--text-tertiary)"},children:"+ Add Test Case"})})]}),n.jsx("div",{className:"overflow-auto",children:Z?n.jsx(yh,{evalCase:Z,result:p.get(Z.id),evals:y,caseStatus:((ie=x.get(Z.id))==null?void 0:ie.status)??"idle",onSaveEvals:f,onRun:Q=>o(Q,"benchmark"),onCompare:Q=>o(Q,"comparison"),onCancel:Q=>m(Q),onImprove:Q=>u({type:"OPEN_IMPROVE",evalId:Q})}):n.jsx("div",{className:"flex items-center justify-center h-full text-[13px]",style:{color:"var(--text-tertiary)"},children:"Select a test case"})}),S&&n.jsx(Xf,{evals:U,onSave:Q=>{f(Q),h(!1)},onCancel:()=>h(!1)})]})}function yh({evalCase:r,result:u,evals:f,caseStatus:o,onSaveEvals:m,onRun:j,onCompare:y,onCancel:C,onImprove:p}){const[x,S]=N.useState(!1),[h,z]=N.useState(r.prompt),[Y,w]=N.useState(!1),[U,G]=N.useState(r.expected_output);N.useState(()=>{z(r.prompt),G(r.expected_output)});const Z=N.useCallback(ae=>{m({...f,evals:f.evals.map(X=>X.id===ae.id?ae:X)})},[f,m]),I=N.useCallback(()=>{Z({...r,prompt:h}),S(!1)},[r,h,Z]),ie=N.useCallback(()=>{Z({...r,expected_output:U}),w(!1)},[r,U,Z]),Q=N.useCallback(()=>{Z({...r,assertions:[...r.assertions,{id:`assert-${Date.now()}`,text:"New assertion",type:"boolean"}]})},[r,Z]),le=N.useCallback((ae,X)=>{Z({...r,assertions:r.assertions.map(oe=>oe.id===ae?{...oe,text:X}:oe)})},[r,Z]),q=N.useCallback(ae=>{Z({...r,assertions:r.assertions.filter(X=>X.id!==ae)})},[r,Z]),J=N.useCallback(()=>{confirm("Delete this test case?")&&m({...f,evals:f.evals.filter(ae=>ae.id!==r.id)})},[f,r.id,m]),fe=u&&u.assertions.length>0&&u.assertions.every(ae=>ae.pass),Te=u&&u.assertions.some(ae=>!ae.pass);return n.jsxs("div",{className:"p-5 animate-fade-in",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"text-[16px] font-semibold",style:{color:"var(--text-primary)"},children:["#",r.id," ",r.name]}),n.jsx(nm,{result:u})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[o==="running"||o==="queued"?n.jsxs("button",{onClick:()=>C(r.id),className:"btn text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:4},children:n.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1"})}),"Cancel"]}):n.jsxs(n.Fragment,{children:[n.jsx("button",{onClick:()=>j(r.id),className:"btn btn-primary text-[12px]",children:"Run"}),n.jsx("button",{onClick:()=>y(r.id),className:"btn btn-purple text-[12px]",children:"A/B Compare"})]}),Te&&o!=="running"&&o!=="queued"&&n.jsx("button",{onClick:()=>p(r.id),className:"btn btn-secondary text-[12px]",children:"Fix with AI"}),o!=="running"&&o!=="queued"&&n.jsx("button",{onClick:J,className:"btn btn-ghost text-[12px]",style:{color:"var(--red)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("polyline",{points:"3 6 5 6 21 6"}),n.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"})]})})]})]}),fe&&n.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:[n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"2.5",children:[n.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),n.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),n.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--green)"},children:"All assertions passing"})]}),n.jsx(yc,{title:"Prompt",children:x?n.jsxs("div",{children:[n.jsx("textarea",{value:h,onChange:ae=>z(ae.target.value),className:"input-field w-full",rows:4,style:{fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:12},autoFocus:!0}),n.jsxs("div",{className:"flex gap-2 mt-2",children:[n.jsx("button",{onClick:I,className:"btn btn-primary text-[12px]",children:"Save"}),n.jsx("button",{onClick:()=>{z(r.prompt),S(!1)},className:"btn btn-ghost text-[12px]",children:"Cancel"})]})]}):n.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:ae=>{ae.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:ae=>{ae.currentTarget.style.borderColor="var(--border-subtle)"},children:r.prompt||n.jsx("span",{style:{color:"var(--text-tertiary)",fontStyle:"italic"},children:"Click to edit prompt..."})})}),n.jsx(yc,{title:"Expected Output",children:Y?n.jsxs("div",{children:[n.jsx("textarea",{value:U,onChange:ae=>G(ae.target.value),className:"input-field w-full",rows:3,style:{fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:12},autoFocus:!0}),n.jsxs("div",{className:"flex gap-2 mt-2",children:[n.jsx("button",{onClick:ie,className:"btn btn-primary text-[12px]",children:"Save"}),n.jsx("button",{onClick:()=>{G(r.expected_output),w(!1)},className:"btn btn-ghost text-[12px]",children:"Cancel"})]})]}):n.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:()=>w(!0),onMouseEnter:ae=>{ae.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:ae=>{ae.currentTarget.style.borderColor="var(--border-subtle)"},children:r.expected_output||n.jsx("span",{style:{fontStyle:"italic"},children:"Click to edit expected output..."})})}),n.jsx(yc,{title:`Assertions (${r.assertions.length})`,action:n.jsx("button",{onClick:Q,className:"btn btn-ghost text-[11px]",children:"+ Add"}),children:r.assertions.length===0?n.jsx("div",{className:"text-[12px] text-center py-4",style:{color:"var(--text-tertiary)"},children:'No assertions. Click "+ Add" to create one.'}):n.jsx("div",{className:"space-y-2",children:r.assertions.map(ae=>{const X=u==null?void 0:u.assertions.find(oe=>oe.assertion_id===ae.id);return n.jsx(gh,{assertion:ae,result:X,onUpdate:oe=>le(ae.id,oe),onDelete:()=>q(ae.id)},ae.id)})})}),(u==null?void 0:u.output)&&n.jsx(jh,{output:u.output,durationMs:u.durationMs,tokens:u.tokens}),n.jsx(Sh,{evalId:r.id})]},r.id)}function gh({assertion:r,result:u,onUpdate:f,onDelete:o}){const[m,j]=N.useState(!1),[y,C]=N.useState(r.text),[p,x]=N.useState(!1),S=()=>{f(y),j(!1)};return n.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:n.jsxs("div",{className:"flex items-start gap-2",children:[u?n.jsx("span",{className:"mt-0.5 rounded-full flex-shrink-0",style:{width:18,height:18,display:"flex",alignItems:"center",justifyContent:"center",background:u.pass?"var(--green-muted)":"var(--red-muted)"},children:u.pass?n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"3",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}):n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"3",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):n.jsx("span",{className:"mt-0.5 w-[18px] h-[18px] rounded-full flex-shrink-0",style:{background:"var(--surface-4)"}}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"flex items-center gap-2 mb-0.5",children:n.jsx("span",{className:"text-[10px] font-mono font-semibold",style:{color:"var(--text-tertiary)"},children:r.id})}),m?n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:y,onChange:h=>C(h.target.value),onKeyDown:h=>{h.key==="Enter"&&S(),h.key==="Escape"&&j(!1)},className:"input-field flex-1 text-[12px]",autoFocus:!0}),n.jsx("button",{onClick:S,className:"btn btn-primary text-[11px]",children:"Save"})]}):n.jsx("div",{className:"text-[12px] cursor-pointer",style:{color:"var(--text-secondary)"},onClick:()=>{C(r.text),j(!0)},children:r.text}),(u==null?void 0:u.reasoning)&&n.jsx("button",{onClick:()=>x(!p),className:"text-[11px] mt-1 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:p?"Hide reasoning":"Show reasoning"}),p&&(u==null?void 0:u.reasoning)&&n.jsx("div",{className:"mt-1 text-[11px] p-2 rounded",style:{background:"var(--surface-1)",color:"var(--text-tertiary)"},children:u.reasoning})]}),n.jsx("button",{onClick:o,className:"btn btn-ghost p-1 opacity-0 group-hover:opacity-100",style:{color:"var(--text-tertiary)"},onMouseEnter:h=>{h.currentTarget.style.color="var(--red)",h.currentTarget.style.opacity="1"},onMouseLeave:h=>{h.currentTarget.style.color="var(--text-tertiary)",h.currentTarget.style.opacity=""},children:n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})}function yc({title:r,action:u,children:f}){return n.jsxs("div",{className:"mb-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:r}),u]}),f]})}function nm({result:r}){if(!r||r.status==null)return n.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:"--"});const u=r.status==="pass";return n.jsx("span",{className:"pill text-[10px]",style:{background:u?"var(--green-muted)":"var(--red-muted)",color:u?"var(--green)":"var(--red)"},children:r.passRate!=null?`${Math.round(r.passRate*100)}%`:r.status})}function bh({passRate:r}){const u=Math.round(r*100);return n.jsx("div",{className:"flex items-center gap-1",children:n.jsx("div",{className:"rounded-full overflow-hidden",style:{width:32,height:4,background:"var(--surface-4)"},children:n.jsx("div",{className:"h-full rounded-full",style:{width:`${u}%`,background:u>=80?"var(--green)":u>=50?"var(--yellow)":"var(--red)"}})})})}function jh({output:r,durationMs:u,tokens:f}){const[o,m]=N.useState(!1);return n.jsxs("div",{className:"mb-5",children:[n.jsxs("button",{onClick:()=>m(!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:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:o?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),"LLM Output",u!=null&&n.jsxs("span",{style:{fontWeight:400},children:["(",(u/1e3).toFixed(1),"s)"]}),f!=null&&n.jsxs("span",{style:{fontWeight:400},children:["(",f," tokens)"]})]}),o&&n.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 Sh({evalId:r}){const{state:u,dispatch:f}=tl(),{plugin:o,skill:m}=u,[j,y]=N.useState(!0),[C,p]=N.useState(!1),[x,S]=N.useState({}),h=x[r]??null,z=N.useCallback(async U=>{p(!0);try{const G=await ge.getCaseHistory(o,m,U);S(Z=>({...Z,[U]:G}))}catch{S(G=>({...G,[U]:[]}))}finally{p(!1)}},[o,m]);N.useEffect(()=>{j&&!x[r]&&z(r)},[r,o,m]);const Y=N.useCallback(()=>{const U=!j;y(U),U&&!x[r]&&z(r)},[j,r,x,z]),w=h?h.slice(0,10):[];return n.jsxs("div",{className:"mb-5",children:[n.jsxs("button",{onClick:Y,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:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:j?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),"Execution History",h&&h.length>0&&n.jsxs("span",{style:{fontWeight:400},children:["(",h.length," run",h.length!==1?"s":"",")"]})]}),j&&n.jsx("div",{className:"animate-fade-in",children:C?n.jsxs("div",{className:"flex items-center gap-2 py-3",children:[n.jsx("div",{className:"spinner",style:{width:14,height:14,borderWidth:1.5}}),n.jsx("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading history..."})]}):!h||h.length===0?n.jsx("div",{className:"text-[12px] py-3",style:{color:"var(--text-tertiary)"},children:"No history for this case"}):n.jsxs("div",{children:[w.length>=2&&n.jsx("div",{className:"mb-2",children:n.jsx(am,{entries:w})}),n.jsx("div",{className:"space-y-2",children:w.map((U,G)=>n.jsxs("div",{className:"rounded-lg px-3 py-2.5",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:tm(U.timestamp)}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:U.model}),n.jsx("span",{className:"pill",style:{fontSize:9,padding:"1px 6px",background:U.type==="benchmark"?"rgba(99,131,255,0.15)":U.type==="comparison"?"var(--purple-muted)":"rgba(251,146,60,0.15)",color:U.type==="benchmark"?"#6383ff":U.type==="comparison"?"var(--purple)":"#fb923c"},children:U.type}),n.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:Ec(U.pass_rate)},children:[Math.round(U.pass_rate*100),"%"]})]}),n.jsxs("div",{className:"flex items-center gap-4 mb-1.5 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[U.durationMs!=null&&n.jsx("span",{children:lm(U.durationMs)}),U.tokens!=null&&n.jsxs("span",{children:[U.tokens>=1e3?`${(U.tokens/1e3).toFixed(1)}k`:U.tokens," tok"]})]}),n.jsx("div",{className:"space-y-0.5",children:U.assertions.map(Z=>n.jsxs("div",{className:"flex items-start gap-1.5",children:[n.jsx("span",{className:"mt-0.5 rounded-full flex-shrink-0",style:{width:14,height:14,display:"flex",alignItems:"center",justifyContent:"center",background:Z.pass?"var(--green-muted)":"var(--red-muted)"},children:Z.pass?n.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"3",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}):n.jsxs("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"3",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:Z.text})]},Z.id))})]},G))}),n.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:U=>{U.currentTarget.style.textDecoration="underline"},onMouseLeave:U=>{U.currentTarget.style.textDecoration="none"},children:"View full history →"})]})})]})}function Xf({evals:r,onSave:u,onCancel:f}){const[o,m]=N.useState(""),[j,y]=N.useState(""),[C,p]=N.useState(""),[x,S]=N.useState([{id:`assert-${Date.now()}`,text:"",type:"boolean"}]),h=Math.max(0,...r.evals.map(Y=>Y.id))+1,z=()=>{if(!o.trim()||!j.trim())return;const Y={id:h,name:o.trim(),prompt:j.trim(),expected_output:C.trim(),files:[],assertions:x.filter(w=>w.text.trim())};u({...r,evals:[...r.evals,Y]})};return n.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:n.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:[n.jsx("div",{className:"text-[15px] font-semibold mb-4",style:{color:"var(--text-primary)"},children:"New Test Case"}),n.jsxs("label",{className:"block mb-3",children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Name"}),n.jsx("input",{value:o,onChange:Y=>m(Y.target.value),className:"input-field",placeholder:"e.g., auth-check",autoFocus:!0})]}),n.jsxs("label",{className:"block mb-3",children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Prompt"}),n.jsx("textarea",{value:j,onChange:Y=>y(Y.target.value),className:"input-field",rows:3,placeholder:"User prompt to test..."})]}),n.jsxs("label",{className:"block mb-3",children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Expected Output"}),n.jsx("textarea",{value:C,onChange:Y=>p(Y.target.value),className:"input-field",rows:2,placeholder:"Description of expected behavior..."})]}),n.jsxs("div",{className:"mb-4",children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Assertions"}),x.map((Y,w)=>n.jsxs("div",{className:"flex gap-2 mb-2",children:[n.jsx("input",{value:Y.text,onChange:U=>S(x.map((G,Z)=>Z===w?{...G,text:U.target.value}:G)),className:"input-field flex-1 text-[12px]",placeholder:"e.g., Output includes a greeting"}),x.length>1&&n.jsx("button",{onClick:()=>S(x.filter((U,G)=>G!==w)),className:"btn btn-ghost p-1",style:{color:"var(--text-tertiary)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},Y.id)),n.jsx("button",{onClick:()=>S([...x,{id:`assert-${Date.now()}`,text:"",type:"boolean"}]),className:"text-[11px] mt-1 transition-colors duration-150",style:{color:"var(--accent)"},children:"+ Add Assertion"})]}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx("button",{onClick:f,className:"btn btn-secondary text-[12px]",children:"Cancel"}),n.jsx("button",{onClick:z,disabled:!o.trim()||!j.trim(),className:"btn btn-primary text-[12px]",children:"Save"})]})]})})}function Nh(){const{state:r,runCase:u,runAll:f,cancelCase:o,cancelAll:m}=tl(),{evals:j,caseRunStates:y,bulkRunActive:C,latestBenchmark:p,inlineResults:x}=r,S=(j==null?void 0:j.evals)??[],h=N.useMemo(()=>{for(const w of y.values())if(w.status==="running"||w.status==="queued")return!0;return!1},[y]),z=S.filter(w=>{const U=y.get(w.id);return U&&(U.status==="complete"||U.status==="error"||U.status==="cancelled")}).length,Y=S.filter(w=>{const U=y.get(w.id);return U&&(U.status==="running"||U.status==="queued")}).length;return n.jsxs("div",{className:"p-5",children:[n.jsxs("div",{className:"rounded-xl p-4 mb-5",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Benchmark"}),h&&n.jsxs("span",{className:"text-[11px] font-medium",style:{color:"var(--accent)"},children:[Y," running"]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[h&&n.jsxs("button",{onClick:m,className:"btn text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:4},children:n.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1"})}),"Cancel All"]}),n.jsx("button",{onClick:()=>f("comparison"),disabled:S.length===0||h,className:"btn btn-primary text-[12px]",children:"Compare All"}),n.jsx("button",{onClick:()=>f("benchmark"),disabled:S.length===0||h,className:"btn btn-secondary text-[12px]",children:"Skill Only"}),n.jsx("button",{onClick:()=>f("baseline"),disabled:S.length===0||h,className:"btn btn-secondary text-[12px]",children:"Baseline Only"})]})]}),h&&S.length>0&&n.jsxs("div",{className:"mb-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("span",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:["Progress: ",z,"/",S.length," cases"]}),n.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[Math.round(z/S.length*100),"%"]})]}),n.jsx("div",{className:"rounded-full overflow-hidden",style:{height:6,background:"var(--surface-3)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${z/S.length*100}%`,background:"var(--accent)"}})})]}),n.jsx("div",{className:"space-y-3 stagger-children",children:S.map(w=>{const U=x.get(w.id),G=y.get(w.id),Z=(G==null?void 0:G.status)??"idle";return n.jsx(Th,{name:w.name,evalId:w.id,result:U,caseStatus:Z,runMode:(G==null?void 0:G.mode)??null,onRun:I=>u(I,"benchmark"),onBaseline:I=>u(I,"baseline"),onCompare:I=>u(I,"comparison"),onCancel:I=>o(I)},w.id)})}),!h&&p&&p.cases.length>0&&n.jsxs("div",{className:"mt-5",children:[n.jsxs("div",{className:"rounded-xl p-4 mb-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Overall Pass Rate"}),n.jsx("span",{className:"text-[20px] font-bold",style:{color:(p.overall_pass_rate??0)>=.8?"var(--green)":(p.overall_pass_rate??0)>=.5?"var(--yellow)":"var(--red)"},children:p.overall_pass_rate!=null?`${Math.round(p.overall_pass_rate*100)}%`:"--"})]}),p.totalDurationMs!=null&&n.jsxs("div",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:["Total: ",(p.totalDurationMs/1e3).toFixed(1),"s",p.model&&` | Model: ${p.model}`]})]}),p.comparison&&n.jsxs("div",{className:"rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"Skill vs Baseline"}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsx(Vf,{label:"Skill",value:p.comparison.skillPassRate,color:"var(--accent)"}),n.jsx(Vf,{label:"Baseline",value:p.comparison.baselinePassRate,color:"var(--text-tertiary)"})]}),n.jsxs("div",{className:"mt-3 text-[12px] font-medium",style:{color:p.comparison.delta>0?"var(--green)":p.comparison.delta<0?"var(--red)":"var(--text-tertiary)"},children:["Delta: ",p.comparison.delta>0?"+":"",(p.comparison.delta*100).toFixed(1),"%",p.verdict&&` | ${p.verdict}`]})]})]})]})}const Eh={benchmark:{label:"Skill",bg:"var(--accent-muted)",color:"var(--accent)"},baseline:{label:"Baseline",bg:"var(--surface-3)",color:"var(--text-tertiary)"},comparison:{label:"Compare",bg:"rgba(168,85,247,0.12)",color:"rgb(168,85,247)"}};function Th({name:r,evalId:u,result:f,caseStatus:o,runMode:m,onRun:j,onBaseline:y,onCompare:C,onCancel:p}){const[x,S]=N.useState(!1),h=o==="running"||o==="queued",z=o==="complete"||o==="error";return n.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:[n.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[o==="running"&&n.jsx("span",{className:"spinner",style:{width:14,height:14,borderWidth:1.5}}),o==="queued"&&n.jsx("span",{className:"text-[10px] font-medium",style:{color:"var(--text-tertiary)"},children:"queued"}),n.jsxs("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:["#",u," ",r]}),m&&(h||z)&&(()=>{const Y=Eh[m];return Y?n.jsx("span",{className:"pill text-[9px] font-semibold",style:{background:Y.bg,color:Y.color,padding:"1px 6px"},children:Y.label}):null})()]}),n.jsxs("div",{className:"flex items-center gap-2",children:[h?n.jsx("button",{onClick:()=>p(u),className:"btn text-[10px] px-2 py-1",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:"Cancel"}):n.jsxs(n.Fragment,{children:[n.jsx("button",{onClick:()=>C(u),className:"btn btn-primary text-[10px] px-2 py-1",children:"Compare"}),n.jsx("button",{onClick:()=>j(u),className:"btn btn-secondary text-[10px] px-2 py-1",children:"Skill"}),n.jsx("button",{onClick:()=>y(u),className:"btn btn-secondary text-[10px] px-2 py-1",children:"Base"})]}),f&&f.status!=null&&n.jsx("span",{className:"pill text-[10px]",style:{background:f.status==="pass"?"var(--green-muted)":(f.status==="error","var(--red-muted)"),color:f.status==="pass"?"var(--green)":"var(--red)"},children:f.passRate!=null?`${Math.round(f.passRate*100)}%`:f.status}),o==="cancelled"&&n.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:"cancelled"})]})]}),f&&f.assertions.length>0&&n.jsxs("div",{className:"px-4 pb-3",children:[n.jsx("div",{className:"space-y-1",children:f.assertions.map(Y=>n.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[n.jsx("span",{style:{color:Y.pass?"var(--green)":"var(--red)"},children:Y.pass?"PASS":"FAIL"}),n.jsx("span",{style:{color:"var(--text-secondary)"},children:Y.text})]},Y.assertion_id))}),f.output&&n.jsx("button",{onClick:()=>S(!x),className:"text-[11px] mt-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:x?"Hide output":"Show output"}),x&&f.output&&n.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})]}),f&&f.errorMessage&&n.jsx("div",{className:"px-4 pb-3",children:n.jsx("div",{className:"text-[11px] p-2 rounded-lg",style:{background:"var(--red-muted)",color:"var(--red)"},children:f.errorMessage})})]})}function Vf({label:r,value:u,color:f}){return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:r}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:f},children:[Math.round(u*100),"%"]})]}),n.jsx("div",{className:"rounded-full overflow-hidden",style:{height:6,background:"var(--surface-3)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${u*100}%`,background:f}})})]})}const Zf={TP:{bg:"var(--green-muted)",text:"var(--green)"},TN:{bg:"rgba(52,211,153,0.06)",text:"rgba(52,211,153,0.6)"},FP:{bg:"var(--red-muted)",text:"var(--red)"},FN:{bg:"rgba(248,113,113,0.06)",text:"rgba(248,113,113,0.6)"}},Ch=[{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 Ah(){const{state:r,dispatch:u,runActivationTest:f}=tl(),{plugin:o,skill:m,activationPrompts:j,activationResults:y,activationSummary:C,activationRunning:p,activationError:x}=r,[S,h]=N.useState(j),[z,Y]=N.useState(null),[w,U]=N.useState(!1);N.useEffect(()=>{u({type:"SET_ACTIVATION_PROMPTS",prompts:S})},[S,u]),N.useEffect(()=>{fetch(`/api/skills/${o}/${m}/description`).then(Q=>Q.json()).then(Q=>Y(Q.rawContent||Q.description||null)).catch(()=>Y(null))},[o,m]);function G(){f(S)}function Z(Q){const le=S.trim(),q=le?`${le}
|
|
58
|
+
${Q.join(`
|
|
59
|
+
`)}`:Q.join(`
|
|
60
|
+
`);h(q)}const I=y.filter(Q=>Q.classification==="TP"||Q.classification==="TN"),ie=y.filter(Q=>Q.classification==="FP"||Q.classification==="FN");return n.jsxs("div",{className:"p-5",children:[n.jsxs("div",{className:"mb-5",children:[n.jsx("div",{className:"text-[14px] font-semibold",style:{color:"var(--text-primary)"},children:"Activation Test"}),n.jsx("div",{className:"text-[12px] mt-1",style:{color:"var(--text-tertiary)"},children:"Test whether this skill's description activates for relevant prompts and stays silent for irrelevant ones."})]}),n.jsxs("div",{className:"grid grid-cols-5 gap-4 mb-5",children:[n.jsxs("div",{className:"col-span-3",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[n.jsx("label",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:"Test Prompts"}),n.jsx("div",{className:"flex gap-1.5",children:Ch.map(Q=>n.jsxs("button",{onClick:()=>Z(Q.prompts),className:"text-[10px] px-2 py-1 rounded-md transition-colors duration-150",style:{background:"var(--surface-2)",color:"var(--text-tertiary)"},onMouseEnter:le=>{le.currentTarget.style.color="var(--text-primary)",le.currentTarget.style.background="var(--surface-3)"},onMouseLeave:le=>{le.currentTarget.style.color="var(--text-tertiary)",le.currentTarget.style.background="var(--surface-2)"},children:["+ ",Q.label]},Q.label))})]}),n.jsx("textarea",{className:"input-field h-32 resize-y font-mono text-[12px]",value:S,onChange:Q=>h(Q.target.value),placeholder:`How do I write a unit test?
|
|
61
|
+
What edge cases should I test?
|
|
62
|
+
+Deploy this to production
|
|
63
|
+
!What's the weather like today?
|
|
64
|
+
!Write me a poem about flowers`}),n.jsxs("div",{className:"flex items-center gap-4 mt-1.5 text-[11px]",style:{color:"var(--text-tertiary)"},children:[n.jsx("span",{children:"One prompt per line"}),n.jsx("span",{children:"No prefix = auto-classify"}),n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx("code",{className:"px-1 rounded",style:{background:"var(--surface-2)"},children:"+"})," = must activate"]}),n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx("code",{className:"px-1 rounded",style:{background:"var(--surface-2)"},children:"!"})," = must NOT activate"]}),n.jsxs("span",{children:[S.trim().split(`
|
|
65
|
+
`).filter(Boolean).length," prompt",S.trim().split(`
|
|
66
|
+
`).filter(Boolean).length!==1?"s":""]})]})]}),n.jsx("div",{className:"col-span-2 flex flex-col",children:n.jsxs("div",{className:`glass-card flex flex-col ${w?"flex-1":""}`,children:[n.jsxs("button",{onClick:()=>U(!w),className:"w-full p-3 flex items-center justify-between text-left flex-shrink-0",style:{borderBottom:w?"1px solid var(--border-subtle)":void 0},children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Skill Description"}),n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:w?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),w&&z&&n.jsx("div",{className:"p-3 flex-1 overflow-auto animate-fade-in",style:{maxHeight:320},children:n.jsx("div",{className:"text-[12px] leading-relaxed",style:{color:"var(--text-secondary)"},dangerouslySetInnerHTML:{__html:em(z)}})}),!w&&z&&n.jsx("div",{className:"px-3 pb-3 pt-1",children:n.jsx("div",{className:"text-[11px] line-clamp-2 leading-relaxed",style:{color:"var(--text-tertiary)"},children:z.replace(/^---[\s\S]*?---\s*/,"").trim().slice(0,150)})})]})})]}),n.jsx("button",{onClick:G,disabled:p||!S.trim(),className:"btn btn-primary mb-5",children:p?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)",width:14,height:14}})," Testing..."]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("circle",{cx:"12",cy:"12",r:"6"}),n.jsx("circle",{cx:"12",cy:"12",r:"2"})]})," Run Activation Test"]})}),x&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:x}),y.length>0&&n.jsxs("div",{className:"space-y-5 mb-5",children:[ie.length>0&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),n.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--red)"},children:["Incorrect (",ie.length,")"]}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"— These need attention"})]}),n.jsx("div",{className:"space-y-1.5 stagger-children",children:ie.map((Q,le)=>n.jsx(Kf,{result:Q},`incorrect-${le}`))})]}),I.length>0&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"16 10 11 15 8 12"})]}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--green)"},children:["Correct (",I.length,")"]})]}),n.jsx("div",{className:"space-y-1.5 stagger-children",children:I.map((Q,le)=>n.jsx(Kf,{result:Q},`correct-${le}`))})]})]}),C&&n.jsxs("div",{className:"glass-card p-6 animate-fade-in-scale",style:{borderColor:"var(--border-active)",borderWidth:2},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-2",style:{color:"var(--text-tertiary)"},children:"Summary"}),C.autoClassifiedCount!=null&&C.autoClassifiedCount>0&&n.jsxs("div",{className:"text-[11px] mb-3",style:{color:"var(--text-tertiary)"},children:[C.autoClassifiedCount," of ",C.total," prompts auto-classified from skill name and tags"]}),n.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-5",children:[n.jsx(gc,{label:"Precision",value:C.precision,description:"Of all activations, how many were correct?",detail:`${C.tp} true / ${C.tp+C.fp} total activations`}),n.jsx(gc,{label:"Recall",value:C.recall,description:"Of expected activations, how many fired?",detail:`${C.tp} activated / ${C.tp+C.fn} expected`}),n.jsx(gc,{label:"Reliability",value:C.reliability,description:"Overall correct classification rate",detail:`${C.tp+C.tn} correct / ${C.total} total`})]}),n.jsxs("div",{className:"pt-4",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-3 text-center",style:{color:"var(--text-tertiary)"},children:"Confusion Matrix"}),n.jsxs("div",{className:"grid grid-cols-2 gap-2 max-w-xs mx-auto",children:[n.jsx(Zs,{label:"True Positive",abbr:"TP",count:C.tp,bg:"var(--green-muted)",color:"var(--green)",description:"Correctly activated"}),n.jsx(Zs,{label:"False Positive",abbr:"FP",count:C.fp,bg:"var(--red-muted)",color:"var(--red)",description:"Wrongly activated"}),n.jsx(Zs,{label:"False Negative",abbr:"FN",count:C.fn,bg:"rgba(248,113,113,0.06)",color:"rgba(248,113,113,0.6)",description:"Missed activation"}),n.jsx(Zs,{label:"True Negative",abbr:"TN",count:C.tn,bg:"rgba(52,211,153,0.06)",color:"rgba(52,211,153,0.6)",description:"Correctly silent"})]})]})]}),p&&y.length===0&&n.jsxs("div",{className:"text-center py-16 animate-fade-in",children:[n.jsx("div",{className:"spinner-lg mx-auto mb-4"}),n.jsx("p",{className:"text-[14px]",style:{color:"var(--text-secondary)"},children:"Testing activation against skill description..."})]})]})}function Kf({result:r}){const u=Zf[r.classification]||Zf.FN,f=r.classification==="TP"||r.classification==="TN";return n.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl transition-all duration-200",style:{background:u.bg,border:"1px solid transparent"},children:[n.jsx("div",{className:"flex-shrink-0 mt-0.5",children:n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:`color-mix(in srgb, ${u.text} 20%, transparent)`},children:f?n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:u.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}):n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:u.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"flex items-center gap-2 mb-1",children:n.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:r.prompt})}),n.jsxs("div",{className:"flex items-center gap-3 text-[12px]",children:[n.jsx("span",{className:"pill",style:{background:"rgba(0,0,0,0.1)",color:u.text,fontWeight:700,fontSize:"10px",padding:"1px 6px"},children:r.classification}),n.jsx("span",{style:{color:r.activate?"var(--green)":"var(--text-tertiary)"},children:r.activate?"Activated":"Silent"}),n.jsxs("span",{style:{color:"var(--text-tertiary)"},children:["Expected: ",r.expected==="should_activate"?"activate":"stay silent"]}),n.jsxs("span",{style:{color:"var(--text-tertiary)"},children:[r.confidence," confidence"]}),r.autoClassified&&n.jsx("span",{className:"pill",style:{background:"rgba(139,92,246,0.1)",color:"rgba(139,92,246,0.8)",fontSize:"9px",padding:"1px 5px"},children:"auto"})]}),r.reasoning&&n.jsx("div",{className:"text-[11px] mt-1.5",style:{color:"var(--text-tertiary)"},children:r.reasoning})]})]})}function gc({label:r,value:u,description:f,detail:o}){const m=Math.round(u*100),j=m>=80?"var(--green)":m>=60?"var(--yellow)":"var(--red)";return n.jsxs("div",{className:"text-center",children:[n.jsxs("div",{className:"text-[28px] font-bold tracking-tight",style:{color:j},children:[m,"%"]}),n.jsx("div",{className:"text-[12px] font-medium mt-0.5",style:{color:"var(--text-secondary)"},children:r}),n.jsx("div",{className:"text-[10px] mt-1",style:{color:"var(--text-tertiary)"},children:f}),n.jsx("div",{className:"text-[10px] mt-0.5 font-mono",style:{color:"var(--text-tertiary)"},children:o})]})}function Zs({abbr:r,count:u,bg:f,color:o,description:m}){return n.jsxs("div",{className:"text-center p-3 rounded-lg",style:{background:f},children:[n.jsx("div",{className:"text-[20px] font-bold",style:{color:o},children:u}),n.jsx("div",{className:"text-[11px] font-semibold",style:{color:o},children:r}),n.jsx("div",{className:"text-[9px] mt-0.5",style:{color:"var(--text-tertiary)"},children:m})]})}const bc={benchmark:"#6383ff",comparison:"#a78bfa",baseline:"#fb923c"},Jf={benchmark:"Benchmark",comparison:"Comparison",baseline:"Baseline"},Tc=600,Cc=180,lt=40,jc=Tc-lt*2,Al=Cc-lt*2,_h=[25,50,75,100];function $f(r){return new Date(r).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Mh({entries:r}){const[u,f]=N.useState(null);if(r.length<2)return null;const o=r.length,m=r.map((C,p)=>{const x=lt+p/(o-1)*jc,S=C.passRate*100,h=lt+Al-S/100*Al;return{x,y:h,pct:S,entry:C}}),j=m.map(C=>`${C.x},${C.y}`).join(" "),y=Array.from(new Set(r.map(C=>C.type)));return n.jsxs("div",{className:"glass-card p-5 animate-fade-in",style:{position:"relative"},children:[n.jsx("div",{className:"text-[13px] font-semibold mb-2",style:{color:"var(--text-primary)"},children:"Pass Rate Trend"}),n.jsx("div",{className:"flex items-center gap-5 mb-3",children:y.map(C=>n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-3 h-3 rounded-full",style:{background:bc[C]??"var(--text-tertiary)"}}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:Jf[C]??C})]},C))}),n.jsxs("svg",{width:Tc,height:Cc,viewBox:`0 0 ${Tc} ${Cc}`,style:{display:"block",overflow:"visible"},children:[_h.map(C=>{const p=lt+Al-C/100*Al;return n.jsxs("g",{children:[n.jsx("line",{x1:lt,y1:p,x2:lt+jc,y2:p,stroke:"var(--border-subtle)",strokeWidth:.5,strokeDasharray:"4 4"}),n.jsxs("text",{x:lt-8,y:p+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:[C,"%"]})]},C)}),n.jsx("line",{x1:lt,y1:lt+Al,x2:lt+jc,y2:lt+Al,stroke:"var(--border-subtle)",strokeWidth:1}),n.jsx("text",{x:lt-8,y:lt+Al+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:"0%"}),n.jsx("polyline",{points:j,fill:"none",stroke:"var(--border-subtle)",strokeWidth:1.5,strokeLinejoin:"round"}),m.map((C,p)=>n.jsx("circle",{cx:C.x,cy:C.y,r:5,fill:bc[C.entry.type]??"var(--text-tertiary)",stroke:"var(--surface-2)",strokeWidth:2,style:{cursor:"pointer",transition:"r 0.15s ease"},onMouseEnter:x=>{x.currentTarget.setAttribute("r","7"),f({x:C.x,y:C.y,entry:C.entry})},onMouseLeave:x=>{x.currentTarget.setAttribute("r","5"),f(null)}},p)),kh(o).map(C=>n.jsx("text",{x:m[C].x,y:lt+Al+16,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:10},children:$f(r[C].timestamp)},C))]}),u&&n.jsxs("div",{style:{position:"absolute",left:u.x,top:u.y-12,transform:"translate(-50%, -100%)",background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:8,padding:"8px 12px",pointerEvents:"none",zIndex:10,whiteSpace:"nowrap"},children:[n.jsx("div",{className:"text-[11px] font-medium",style:{color:"var(--text-primary)"},children:$f(u.entry.timestamp)}),n.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-tertiary)"},children:u.entry.model}),n.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[n.jsx("span",{className:"text-[9px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:bc[u.entry.type]??"var(--text-tertiary)",color:"#fff"},children:Jf[u.entry.type]??u.entry.type}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--text-primary)"},children:[Math.round(u.entry.passRate*100),"%"]})]})]})]})}function kh(r){return r<=3?Array.from({length:r},(u,f)=>f):r<=6?[0,Math.floor(r/2),r-1]:[0,Math.floor(r/3),Math.floor(2*r/3),r-1]}function Ks(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function zh(r){return r>=1e3?`${(r/1e3).toFixed(1)}s`:`${Math.round(r)}ms`}function Rh({rate:r,label:u}){const f=Math.round(r*100);return n.jsx("div",{className:"flex items-center gap-3",children:n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-[11px] truncate",style:{color:"var(--text-primary)",maxWidth:"70%"},children:u}),n.jsxs("span",{className:"text-[11px] font-semibold",style:{color:Ks(r)},children:[f,"%"]})]}),n.jsx("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:"var(--surface-3)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${f}%`,background:Ks(r)}})})]})})}function Oh({points:r}){if(r.length<2)return null;const u=200,f=48,o=4,m=r.length,j=r.map((p,x)=>{const S=o+x/(m-1)*(u-o*2),h=o+(f-o*2)-p.passRate*(f-o*2);return{x:S,y:h}}),y=`M ${j[0].x},${f-o} `+j.map(p=>`L ${p.x},${p.y}`).join(" ")+` L ${j[j.length-1].x},${f-o} Z`,C=j.map((p,x)=>`${x===0?"M":"L"} ${p.x},${p.y}`).join(" ");return n.jsxs("svg",{width:u,height:f,style:{display:"block"},children:[n.jsx("path",{d:y,fill:"var(--accent-muted)"}),n.jsx("path",{d:C,fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),n.jsx("circle",{cx:j[j.length-1].x,cy:j[j.length-1].y,r:3,fill:"var(--accent)"})]})}function Dh({plugin:r,skill:u}){const[f,o]=N.useState(null),[m,j]=N.useState(!0);if(N.useEffect(()=>{j(!0),ge.getStats(r,u).then(o).catch(()=>o(null)).finally(()=>j(!1))},[r,u]),m)return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"skeleton h-24 rounded-xl"}),n.jsx("div",{className:"skeleton h-48 rounded-xl"}),n.jsx("div",{className:"skeleton h-36 rounded-xl"})]});if(!f||f.totalRuns===0)return n.jsxs("div",{className:"text-center py-12",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"var(--surface-2)"},children:n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",children:[n.jsx("path",{d:"M18 20V10"}),n.jsx("path",{d:"M12 20V4"}),n.jsx("path",{d:"M6 20v-6"})]})}),n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark data yet"}),n.jsx("p",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:"Run some benchmarks to see statistics"})]});const y=f.trendPoints.length>0?f.trendPoints[f.trendPoints.length-1].passRate:0,C=f.trendPoints.length>0?f.trendPoints[0].passRate:0,p=y-C,x=f.assertionStats.slice(0,10);return n.jsxs("div",{className:"space-y-4 stagger-children",children:[n.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Total Runs"}),n.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:f.totalRuns})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Latest Pass Rate"}),n.jsxs("div",{className:"text-[24px] font-bold",style:{color:Ks(y)},children:[Math.round(y*100),"%"]})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Trend"}),n.jsxs("div",{className:"text-[24px] font-bold",style:{color:p>=0?"var(--green)":"var(--red)"},children:[p>=0?"+":"",Math.round(p*100),"%"]})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Models Tested"}),n.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:f.modelStats.length})]})]}),f.trendPoints.length>=2&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Pass Rate Over Time"}),n.jsx(Oh,{points:f.trendPoints})]}),f.modelStats.length>0&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Model Performance"}),n.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[n.jsx("thead",{children:n.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("th",{style:{textAlign:"left",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Model"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Runs"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Pass Rate"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Duration"})]})}),n.jsx("tbody",{children:f.modelStats.map(S=>n.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("td",{style:{padding:"8px",color:"var(--text-primary)",fontWeight:500},children:S.model}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:S.runs}),n.jsx("td",{style:{padding:"8px",textAlign:"center"},children:n.jsxs("span",{className:"font-semibold",style:{color:Ks(S.avgPassRate)},children:[Math.round(S.avgPassRate*100),"%"]})}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:zh(S.avgDurationMs)})]},S.model))})]})]}),x.length>0&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Weakest Assertions"}),n.jsx("div",{className:"space-y-3",children:x.map(S=>n.jsxs("button",{className:"block w-full text-left rounded-lg p-2 -mx-2 transition-colors duration-150",style:{background:"transparent"},onMouseEnter:h=>{h.currentTarget.style.background="var(--surface-2)"},onMouseLeave:h=>{h.currentTarget.style.background="transparent"},onClick:()=>{},children:[n.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[n.jsxs("span",{className:"text-[10px] font-mono px-1 py-0.5 rounded flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",S.evalId]}),n.jsx("span",{className:"text-[10px] truncate",style:{color:"var(--text-tertiary)"},children:S.evalName}),n.jsxs("span",{className:"text-[10px] ml-auto flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[S.totalRuns," runs"]})]}),n.jsx(Rh,{rate:S.passRate,label:S.text})]},`${S.evalId}:${S.id}`))})]})]})}function wh({plugin:r,skill:u}){const[f,o]=N.useState(null),[m,j]=N.useState(null),[y,C]=N.useState({}),[p,x]=N.useState({});N.useEffect(()=>{ge.getEvals(r,u).then(o).catch(()=>o(null))},[r,u]);async function S(h){if(m===h){j(null);return}if(j(h),!y[h]){x(z=>({...z,[h]:!0}));try{const z=await ge.getCaseHistory(r,u,h);C(Y=>({...Y,[h]:z}))}catch{C(z=>({...z,[h]:[]}))}finally{x(z=>({...z,[h]:!1}))}}}return f?n.jsx("div",{className:"space-y-2 stagger-children",children:f.evals.map(h=>{const z=y[h.id]||[],Y=m===h.id,w=p[h.id],U=z.length>0?z[0].pass_rate:null;return n.jsxs("div",{className:"glass-card overflow-hidden",children:[n.jsxs("button",{onClick:()=>S(h.id),className:"w-full text-left p-4 flex items-center gap-3 transition-colors duration-150",style:{background:Y?"var(--surface-2)":"transparent"},onMouseEnter:G=>{Y||(G.currentTarget.style.background="var(--surface-2)")},onMouseLeave:G=>{Y||(G.currentTarget.style.background="transparent")},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",strokeLinecap:"round",style:{transform:Y?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease",flexShrink:0},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",h.id]}),n.jsx("span",{className:"text-[13px] font-medium flex-1 truncate",style:{color:"var(--text-primary)"},children:h.name}),z.length>=2&&n.jsx(am,{entries:z}),U!=null&&n.jsxs("span",{className:"text-[12px] font-semibold flex-shrink-0",style:{color:Ec(U)},children:[Math.round(U*100),"%"]}),z.length>0&&n.jsxs("span",{className:"text-[10px] flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[z.length," runs"]})]}),Y&&n.jsx("div",{className:"border-t animate-fade-in",style:{borderColor:"var(--border-subtle)"},children:w?n.jsxs("div",{className:"p-4 flex items-center gap-2",children:[n.jsx("div",{className:"spinner",style:{width:14,height:14}}),n.jsx("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading history..."})]}):z.length===0?n.jsx("div",{className:"p-4",children:n.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"No history for this eval case"})}):n.jsx("div",{className:"divide-y",style:{borderColor:"var(--border-subtle)"},children:z.map((G,Z)=>n.jsxs("div",{className:"p-4",style:{background:Z===0?"var(--surface-2)":"transparent"},children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:tm(G.timestamp)}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:G.model}),n.jsx("span",{className:"pill",style:{fontSize:9,padding:"1px 6px",background:G.type==="benchmark"?"rgba(99,131,255,0.15)":G.type==="comparison"?"var(--purple-muted)":"rgba(251,146,60,0.15)",color:G.type==="benchmark"?"#6383ff":G.type==="comparison"?"var(--purple)":"#fb923c"},children:G.type}),n.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:Ec(G.pass_rate)},children:[Math.round(G.pass_rate*100),"%"]})]}),n.jsxs("div",{className:"flex items-center gap-4 mb-2 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[G.durationMs!=null&&n.jsx("span",{children:lm(G.durationMs)}),G.tokens!=null&&n.jsxs("span",{children:[G.tokens>=1e3?`${(G.tokens/1e3).toFixed(1)}k`:G.tokens," tok"]})]}),n.jsx("div",{className:"space-y-1",children:G.assertions.map(I=>n.jsxs("div",{className:"flex items-start gap-2 py-0.5",children:[n.jsx("div",{className:"w-3.5 h-3.5 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:I.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"7",height:"7",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",children:I.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[11px]",style:{color:"var(--text-primary)"},children:I.text}),I.reasoning&&n.jsx("div",{className:"text-[10px] mt-0.5",style:{color:"var(--text-tertiary)"},children:I.reasoning})]})]},I.id))})]},Z))})})]},h.id)})}):n.jsx("div",{className:"text-center py-12",children:n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No eval cases found"})})}function Lh(){const{state:r,dispatch:u}=tl(),{plugin:f,skill:o}=r,[m,j]=N.useState("timeline"),[y,C]=N.useState([]),[p,x]=N.useState(!0),[S,h]=N.useState(""),[z,Y]=N.useState(""),[w,U]=N.useState(!1),[G,Z]=N.useState([]),[I,ie]=N.useState(null),[Q,le]=N.useState(!1),[q,J]=N.useState(null),[fe,Te]=N.useState(!1);N.useEffect(()=>{x(!0),ge.getHistory(f,o,{model:S||void 0,type:z||void 0}).then(V=>{C(V),V.length>=2&&ge.compareRuns(f,o,V[0].timestamp,V[1].timestamp).then(R=>{const $=R.regressions.filter(T=>T.change==="regression");u({type:"SET_REGRESSIONS",regressions:$})}).catch(()=>{})}).catch(()=>{}).finally(()=>x(!1))},[f,o,S,z]);const ae=N.useCallback(async V=>{if(w){Z(R=>R.includes(V)?R.filter($=>$!==V):R.length>=2?[R[1],V]:[...R,V]);return}Te(!0);try{const R=await ge.getHistoryEntry(f,o,V);J(R)}catch{}finally{Te(!1)}},[f,o,w]),X=N.useCallback(async()=>{if(G.length===2){le(!0);try{const V=await ge.compareRuns(f,o,G[0],G[1]);ie(V)}catch{}finally{le(!1)}}},[f,o,G]),oe=[...new Set(y.map(V=>V.model))];return p?n.jsxs("div",{className:"p-5",children:[n.jsx("div",{className:"skeleton h-5 w-32 mb-4"}),n.jsx("div",{className:"skeleton h-48 rounded-xl mb-4"}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("div",{className:"skeleton h-12 rounded-lg"}),n.jsx("div",{className:"skeleton h-12 rounded-lg"})]})]}):n.jsxs("div",{className:"p-5",children:[n.jsx("div",{className:"flex items-center gap-1 mb-4",children:["timeline","per-eval","statistics"].map(V=>n.jsx("button",{onClick:()=>j(V),className:"px-4 py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:m===V?"var(--accent-muted)":"transparent",color:m===V?"var(--accent)":"var(--text-tertiary)"},children:V==="timeline"?"Timeline":V==="per-eval"?"Per Eval":"Statistics"},V))}),m==="timeline"&&n.jsxs("div",{children:[y.length>0&&n.jsx("div",{className:"mb-5 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:n.jsx(Mh,{entries:y})}),n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsxs("select",{value:S,onChange:V=>h(V.target.value),className:"input-field text-[12px]",style:{width:150},children:[n.jsx("option",{value:"",children:"All Models"}),oe.map(V=>n.jsx("option",{value:V,children:V},V))]}),n.jsxs("select",{value:z,onChange:V=>Y(V.target.value),className:"input-field text-[12px]",style:{width:150},children:[n.jsx("option",{value:"",children:"All Types"}),n.jsx("option",{value:"benchmark",children:"Benchmark"}),n.jsx("option",{value:"comparison",children:"Comparison"}),n.jsx("option",{value:"baseline",children:"Baseline"}),n.jsx("option",{value:"model-compare",children:"Model Compare"}),n.jsx("option",{value:"improve",children:"AI Improve"})]}),n.jsx("div",{className:"flex-1"}),n.jsx("button",{onClick:()=>{U(!w),Z([]),ie(null)},className:`btn text-[12px] ${w?"btn-primary":"btn-secondary"}`,children:w?"Exit Compare":"Compare Runs"}),w&&G.length===2&&n.jsx("button",{onClick:X,disabled:Q,className:"btn btn-primary text-[12px]",children:Q?"Comparing...":"Compare"})]}),n.jsx("div",{className:"space-y-2",children:y.length===0?n.jsx("div",{className:"text-center py-8 text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark runs yet"}):y.map(V=>{const R=G.includes(V.timestamp);return n.jsx("button",{onClick:()=>ae(V.timestamp),className:"w-full text-left rounded-lg px-4 py-3 transition-all duration-150",style:{background:R?"var(--accent-muted)":"var(--surface-1)",border:R?"1px solid var(--accent)":"1px solid var(--border-subtle)"},onMouseEnter:$=>{R||($.currentTarget.style.borderColor="var(--border-hover)")},onMouseLeave:$=>{R||($.currentTarget.style.borderColor="var(--border-subtle)")},children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[w&&n.jsx("span",{className:"w-4 h-4 rounded border flex items-center justify-center",style:{borderColor:R?"var(--accent)":"var(--border-default)",background:R?"var(--accent)":"transparent"},children:R&&n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})})}),n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:new Date(V.timestamp).toLocaleString()}),n.jsx("span",{className:"pill text-[9px]",style:{background:V.type==="comparison"?"var(--purple-muted)":V.type==="baseline"?"var(--surface-3)":V.type==="model-compare"?"rgba(56,189,248,0.15)":V.type==="improve"||V.type==="instruct"?"rgba(168,85,247,0.15)":"var(--accent-muted)",color:V.type==="comparison"?"var(--purple)":V.type==="baseline"?"var(--text-tertiary)":V.type==="model-compare"?"#38bdf8":V.type==="improve"||V.type==="instruct"?"#a855f7":"var(--accent)"},children:V.type==="model-compare"?"model compare":V.type==="improve"?"ai improve":V.type==="instruct"?"ai edit":V.type})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:V.model}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:V.passRate>=.8?"var(--green)":V.passRate>=.5?"var(--yellow)":"var(--red)"},children:[Math.round(V.passRate*100),"%"]})]})]})},V.timestamp)})}),I&&n.jsx(Bh,{result:I}),q&&!w&&n.jsx(Uh,{run:q,onClose:()=>J(null)})]}),m==="per-eval"&&n.jsx(wh,{plugin:f,skill:o}),m==="statistics"&&n.jsx(Dh,{plugin:f,skill:o})]})}function Bh({result:r}){const u=r.regressions.filter(o=>o.change==="regression"),f=r.regressions.filter(o=>o.change==="improvement");return n.jsxs("div",{className:"mt-4 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.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()]}),u.length>0&&n.jsxs("div",{className:"mb-3",children:[n.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--red)"},children:["Regressions (",u.length,")"]}),u.map(o=>n.jsxs("div",{className:"text-[12px] py-1",style:{color:"var(--text-secondary)"},children:["#",o.evalId," ",o.evalName,": ",n.jsx("span",{style:{color:"var(--red)"},children:o.assertionId})," (was passing, now failing)"]},`${o.evalId}-${o.assertionId}`))]}),f.length>0&&n.jsxs("div",{className:"mb-3",children:[n.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--green)"},children:["Improvements (",f.length,")"]}),f.map(o=>n.jsxs("div",{className:"text-[12px] py-1",style:{color:"var(--text-secondary)"},children:["#",o.evalId," ",o.evalName,": ",n.jsx("span",{style:{color:"var(--green)"},children:o.assertionId})," (was failing, now passing)"]},`${o.evalId}-${o.assertionId}`))]}),n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-2 mt-3",style:{color:"var(--text-tertiary)"},children:"Case Diffs"}),n.jsx("div",{className:"rounded-lg overflow-hidden",style:{border:"1px solid var(--border-subtle)"},children:n.jsxs("table",{className:"w-full text-[12px]",children:[n.jsx("thead",{children:n.jsxs("tr",{style:{background:"var(--surface-2)"},children:[n.jsx("th",{className:"text-left px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Case"}),n.jsx("th",{className:"text-right px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Run A"}),n.jsx("th",{className:"text-right px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Run B"})]})}),n.jsx("tbody",{children:r.caseDiffs.map(o=>n.jsxs("tr",{style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("td",{className:"px-3 py-2",style:{color:"var(--text-secondary)"},children:["#",o.eval_id," ",o.eval_name]}),n.jsx("td",{className:"text-right px-3 py-2",style:{color:o.passRateA!=null?o.passRateA>=.8?"var(--green)":o.passRateA>=.5?"var(--yellow)":"var(--red)":"var(--text-tertiary)"},children:o.passRateA!=null?`${Math.round(o.passRateA*100)}%`:o.statusA}),n.jsx("td",{className:"text-right px-3 py-2",style:{color:o.passRateB!=null?o.passRateB>=.8?"var(--green)":o.passRateB>=.5?"var(--yellow)":"var(--red)":"var(--text-tertiary)"},children:o.passRateB!=null?`${Math.round(o.passRateB*100)}%`:o.statusB})]},o.eval_id))})]})})]})}function Uh({run:r,onClose:u}){return(r.type==="improve"||r.type==="instruct")&&r.improve?n.jsx(Hh,{run:r,onClose:u}):n.jsxs("div",{className:"mt-4 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:["Run: ",new Date(r.timestamp).toLocaleString()]}),n.jsx("button",{onClick:u,className:"btn btn-ghost text-[11px]",children:"Close"})]}),n.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)}%`:"--"]}),n.jsx("div",{className:"space-y-2",children:r.cases.map(f=>n.jsx("div",{className:"rounded-lg px-3 py-2",style:{background:"var(--surface-2)"},children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-secondary)"},children:["#",f.eval_id," ",f.eval_name]}),n.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 Hh({run:r,onClose:u}){var j;const f=N.useMemo(()=>r.improve?_c(r.improve.original,r.improve.improved):[],[r.improve]),o=N.useMemo(()=>{const y=f.filter(p=>p.type==="added").length,C=f.filter(p=>p.type==="removed").length;return{added:y,removed:C}},[f]),m=N.useMemo(()=>{let y=0,C=0;return f.map(p=>p.type==="removed"?(y++,{...p,origNum:y,newNum:null}):p.type==="added"?(C++,{...p,origNum:null,newNum:C}):(y++,C++,{...p,origNum:y,newNum:C}))},[f]);return n.jsxs("div",{className:"mt-4 rounded-xl overflow-hidden animate-fade-in",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5",style:{background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"SKILL.md Changes"}),n.jsxs("div",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:[new Date(r.timestamp).toLocaleString()," · ",r.model]})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[n.jsxs("span",{style:{color:"var(--green)"},children:["+",o.added]}),n.jsxs("span",{style:{color:"var(--red)"},children:["-",o.removed]})]}),n.jsx("button",{onClick:u,className:"w-7 h-7 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:y=>{y.currentTarget.style.background="var(--surface-3)"},onMouseLeave:y=>{y.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})]}),((j=r.improve)==null?void 0:j.reasoning)&&n.jsxs("div",{className:"mx-4 mt-4 px-4 py-3 rounded-lg text-[12px]",style:{background:"rgba(168,85,247,0.06)",border:"1px solid rgba(168,85,247,0.15)",color:"var(--text-secondary)"},children:[n.jsx("span",{className:"font-semibold",style:{color:"#a855f7"},children:"AI Reasoning: "}),r.improve.reasoning]}),n.jsx("div",{className:"mx-4 my-4 rounded-lg overflow-hidden",style:{border:"1px solid var(--border-subtle)",maxHeight:480,overflowY:"auto"},children:n.jsx("table",{className:"w-full",style:{borderCollapse:"collapse",fontFamily:"var(--font-mono, monospace)"},children:n.jsx("tbody",{children:m.map((y,C)=>n.jsxs("tr",{style:{background:y.type==="added"?"rgba(34,197,94,0.08)":y.type==="removed"?"rgba(239,68,68,0.08)":"transparent"},children:[n.jsx("td",{className:"text-right select-none px-2",style:{width:40,fontSize:10,color:y.type==="removed"?"rgba(239,68,68,0.5)":"var(--text-tertiary)",opacity:y.origNum?.6:.2,borderRight:"1px solid var(--border-subtle)"},children:y.origNum??""}),n.jsx("td",{className:"text-right select-none px-2",style:{width:40,fontSize:10,color:y.type==="added"?"rgba(34,197,94,0.5)":"var(--text-tertiary)",opacity:y.newNum?.6:.2,borderRight:"1px solid var(--border-subtle)"},children:y.newNum??""}),n.jsx("td",{className:"select-none text-center",style:{width:20,fontSize:11,fontWeight:700,color:y.type==="added"?"var(--green)":y.type==="removed"?"var(--red)":"transparent",borderRight:y.type==="added"?"2px solid var(--green)":y.type==="removed"?"2px solid var(--red)":"2px solid transparent"},children:y.type==="added"?"+":y.type==="removed"?"-":" "}),n.jsx("td",{className:"px-3 py-px whitespace-pre-wrap",style:{fontSize:11,lineHeight:1.6,color:y.type==="added"?"var(--green)":y.type==="removed"?"var(--red)":"var(--text-secondary)"},children:y.content||""})]},C))})})})]})}function qh({plugin:r,skill:u}){const[f,o]=N.useState([]),[m,j]=N.useState([]),[y,C]=N.useState(!0),[p,x]=N.useState(null);N.useEffect(()=>{ge.getDependencies(r,u).then(h=>{o(h.mcpDependencies),j(h.skillDependencies)}).catch(()=>{}).finally(()=>C(!1))},[r,u]);async function S(h,z){try{await navigator.clipboard.writeText(z),x(h),setTimeout(()=>x(null),2e3)}catch{}}return y?null:f.length===0&&m.length===0?n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[12px]",style:{background:"var(--surface-2)",color:"var(--text-tertiary)",border:"1px solid var(--border-subtle)"},children:"No dependencies detected"}):n.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5 px-5 py-3.5",style:{background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(234,179,8,0.15)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#eab308",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),n.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Dependencies"}),n.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:f.length+m.length})]}),n.jsxs("div",{className:"px-5 py-4",children:[f.length>0&&n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"MCP Servers"}),f.map(h=>n.jsxs("div",{className:"p-3 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:h.server}),n.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:h.transport})]}),n.jsx("button",{onClick:()=>S(h.server,h.configSnippet),className:"btn btn-ghost text-[11px] py-1 px-2",style:{color:p===h.server?"var(--green)":"var(--accent)"},children:p===h.server?n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})})," Copied!"]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),n.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})," Copy Config"]})})]}),n.jsx("div",{className:"text-[11px] mb-2 font-mono",style:{color:"var(--text-tertiary)"},children:h.url}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:h.matchedTools.map(z=>n.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--surface-3)",color:"var(--text-secondary)"},children:z},z))})]},h.server))]}),m.length>0&&n.jsxs("div",{children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-2",style:{color:"var(--text-tertiary)"},children:"Skill Dependencies"}),n.jsx("div",{className:"space-y-1.5",children:m.map(h=>n.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"})}),n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:h.name}),n.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:h.source==="frontmatter"?"frontmatter":"referenced"})]},h.name))})]})]})]})}function Yh(){const{state:r}=tl(),{plugin:u,skill:f}=r,[o,m]=N.useState(null),[j,y]=N.useState(!0);return N.useEffect(()=>{ge.getDependencies(u,f).then(m).catch(()=>{}).finally(()=>y(!1))},[u,f]),j?n.jsxs("div",{className:"p-5",children:[n.jsx("div",{className:"skeleton h-5 w-32 mb-4"}),n.jsx("div",{className:"skeleton h-32 rounded-xl"})]}):o?n.jsx("div",{className:"p-5 max-w-3xl",children:n.jsx(qh,{plugin:u,skill:f})}):n.jsx("div",{className:"flex items-center justify-center h-full text-[13px]",style:{color:"var(--text-tertiary)"},children:"No dependency information available"})}function Gh(){const{state:r,dispatch:u,saveContent:f}=tl(),o=N.useCallback(j=>{const y=j.ctrlKey||j.metaKey;if(y&&j.key>="1"&&j.key<="6"){j.preventDefault(),u({type:"SET_PANEL",panel:["editor","tests","run","activation","history","deps"][parseInt(j.key)-1]});return}if(y&&j.key==="s"&&!j.shiftKey){j.preventDefault(),r.isDirty&&f();return}},[r.isDirty,f,u]);if(N.useEffect(()=>(window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)),[o]),r.loading)return n.jsx("div",{className:"flex items-center justify-center h-full",style:{background:"var(--surface-0)"},children:n.jsxs("div",{className:"flex flex-col items-center gap-3",children:[n.jsx("div",{className:"spinner spinner-lg"}),n.jsx("span",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"Loading workspace..."})]})});const m=Array.from(r.caseRunStates.values()).some(j=>j.status==="running"||j.status==="queued");return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[n.jsx(ah,{state:r}),n.jsx(rh,{activePanel:r.activePanel,onPanelChange:j=>u({type:"SET_PANEL",panel:j}),isDirty:r.isDirty,isRunning:m,hasRegressions:r.regressions.length>0,isActivationRunning:r.activationRunning}),n.jsx("div",{className:"flex-1 overflow-hidden",style:{background:"var(--surface-0)"},children:n.jsxs("div",{className:"animate-fade-in",style:{height:"100%",overflow:"auto"},children:[r.activePanel==="editor"&&n.jsx(hh,{}),r.activePanel==="tests"&&n.jsx(ph,{}),r.activePanel==="run"&&n.jsx(Nh,{}),r.activePanel==="activation"&&n.jsx(Ah,{}),r.activePanel==="history"&&n.jsx(Lh,{}),r.activePanel==="deps"&&n.jsx(Yh,{})]},r.activePanel)})]})}function Sc(r,u=!0){let f=r.toLowerCase().replace(/[^a-z0-9]+/g,"-");return u&&(f=f.replace(/^-+|-+$/g,"")),f}function Qh(r,u,f,o){const j=`.../${r.split("/").slice(-2).join("/")}`;switch(u){case 1:return`${j}/${f}/skills/${o}/SKILL.md`;case 2:return`${j}/plugins/${f}/skills/${o}/SKILL.md`;case 3:return`${j}/skills/${o}/SKILL.md`}}function Xh({onCreated:r,onCancel:u}){const[f,o]=N.useState(null),[m,j]=N.useState(!0),[y,C]=N.useState(null),[p,x]=N.useState(null),[S,h]=N.useState(""),[z,Y]=N.useState(3),[w,U]=N.useState(""),[G,Z]=N.useState(""),[I,ie]=N.useState(""),[Q,le]=N.useState(""),[q,J]=N.useState(""),[fe,Te]=N.useState(""),[ae,X]=N.useState(!1),[oe,V]=N.useState(null);N.useEffect(()=>{ge.getProjectLayout().then(F=>{o(F),Y(F.suggestedLayout);const b=F.detectedLayouts.find(B=>B.layout===F.suggestedLayout);b!=null&&b.existingPlugins.length&&U(b.existingPlugins[0])}).catch(()=>{}).finally(()=>j(!1)),ge.getConfig().then(x).catch(()=>{}),ge.getSkillCreatorStatus().then(C).catch(()=>{})},[]);const R=N.useMemo(()=>{var F;return f?((F=f.detectedLayouts.find(b=>b.layout===z))==null?void 0:F.existingPlugins)||[]:[]},[f,z]),$=w==="__new__"?G:w,T=f?Qh(f.root,z,$||"{plugin}",S||"{skill}"):"",H=N.useMemo(()=>f?f.detectedLayouts.filter(F=>F.layout!==4):[],[f]),W=(p==null?void 0:p.provider)==="claude-cli"&&y!==null;async function me(){if(V(null),!S.trim()){V("Skill name is required");return}if(!I.trim()){V("Description is required");return}if(z!==3&&!$.trim()){V("Plugin name is required");return}X(!0);try{const F=await ge.createSkill({name:Sc(S),plugin:$||"",layout:z,description:I,model:Q||void 0,allowedTools:q||void 0,body:fe});r(F.plugin,F.skill)}catch(F){V(F.message)}finally{X(!1)}}return n.jsxs("div",{className:"px-8 py-6 max-w-4xl animate-fade-in overflow-auto h-full",children:[n.jsxs("div",{className:"mb-5",children:[n.jsx("h2",{className:"text-[20px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Create a New Skill"}),n.jsx("p",{className:"text-[13px] mt-1",style:{color:"var(--text-tertiary)"},children:"Define your skill's metadata, content, and placement"})]}),W&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:y.installed?"var(--accent-muted)":"var(--surface-2)",border:y.installed?"1px solid var(--accent)":"1px solid var(--border-subtle)",color:"var(--text-primary)"},children:y.installed?n.jsxs("span",{children:[n.jsx("span",{className:"font-medium",children:"AI-Assisted Authoring Available"}),n.jsxs("span",{className:"ml-1",style:{color:"var(--text-secondary)"},children:["— Run ",n.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 creation."]})]}):n.jsxs("span",{style:{color:"var(--text-secondary)"},children:["Tip: Install the Skill Creator — ",n.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-3)"},children:y.installCommand})]})}),m?n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"skeleton h-10 w-full rounded-lg"}),n.jsx("div",{className:"skeleton h-10 w-full rounded-lg"})]}):f?n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Location"}),H.length>1&&n.jsxs("div",{className:"mb-3",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Layout"}),n.jsx("div",{className:"flex gap-2",children:H.map(F=>n.jsx("button",{onClick:()=>{Y(F.layout),U(F.existingPlugins[0]||""),Z("")},className:"px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:z===F.layout?"var(--accent)":"var(--surface-3)",color:z===F.layout?"#fff":"var(--text-secondary)",border:`1px solid ${z===F.layout?"var(--accent)":"var(--border-subtle)"}`,cursor:"pointer"},children:F.label},F.layout))})]}),z!==3&&n.jsxs("div",{className:"mb-3",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Plugin"}),n.jsxs("select",{value:w,onChange:F=>{U(F.target.value),Z("")},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:[R.map(F=>n.jsx("option",{value:F,children:F},F)),n.jsx("option",{value:"__new__",children:"+ New plugin..."})]}),w==="__new__"&&n.jsx("input",{type:"text",value:G,onChange:F=>Z(Sc(F.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)"}})]}),n.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:T})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Skill Details"}),n.jsxs("div",{className:"mb-3",children:[n.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:["Name ",n.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),n.jsx("input",{type:"text",value:S,onChange:F=>h(Sc(F.target.value,!1)),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)"}})]}),n.jsxs("div",{className:"mb-3",children:[n.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:["Description ",n.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),n.jsx("textarea",{value:I,onChange:F=>ie(F.target.value),placeholder:"Brief description",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)"}})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Model"}),n.jsxs("select",{value:Q,onChange:F=>le(F.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:[n.jsx("option",{value:"",children:"Any"}),n.jsx("option",{value:"opus",children:"Opus"}),n.jsx("option",{value:"sonnet",children:"Sonnet"}),n.jsx("option",{value:"haiku",children:"Haiku"})]})]}),n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Allowed Tools"}),n.jsx("input",{type:"text",value:q,onChange:F=>J(F.target.value),placeholder:"Read, Write, Edit...",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)"}})]})]})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"System Prompt"}),n.jsx("textarea",{value:fe,onChange:F=>Te(F.target.value),placeholder:`# /my-skill
|
|
67
|
+
|
|
68
|
+
You are an expert at...
|
|
69
|
+
`,rows:8,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:"150px"}})]}),oe&&n.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:oe}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("button",{onClick:me,disabled:ae||!S||!I,className:"px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:ae||!S||!I?"var(--surface-3)":"var(--accent)",color:ae||!S||!I?"var(--text-tertiary)":"#fff",cursor:ae||!S||!I?"not-allowed":"pointer",border:"none"},children:ae?"Creating...":"Create Skill"}),n.jsx("button",{onClick:u,className:"px-4 py-2.5 rounded-lg text-[13px] font-medium",style:{color:"var(--text-secondary)",background:"none",border:"none",cursor:"pointer"},children:"Cancel"})]})]}):null]})}function Nc({variant:r,message:u,onRetry:f}){const{setMode:o,setSearch:m}=Kl();return r==="no-selection"?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-8 animate-fade-in",children:[n.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mb-5",style:{background:"var(--surface-2)"},children:n.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),n.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),n.jsx("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})]})}),n.jsx("p",{className:"text-[14px] font-medium mb-1",style:{color:"var(--text-secondary)"},children:"Select a skill to view details"}),n.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Choose a skill from the list to edit, test, and evaluate"})]}):r==="no-skills"?n.jsxs("div",{className:"text-center py-12 px-4 animate-fade-in-scale",children:[n.jsx("div",{className:"w-14 h-14 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:"var(--surface-2)"},children:n.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"})})}),n.jsx("p",{className:"text-[14px] font-medium",style:{color:"var(--text-secondary)"},children:"No skills found"}),n.jsxs("p",{className:"text-[12px] mt-1 mb-4",style:{color:"var(--text-tertiary)"},children:["Check your ",n.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-2)"},children:"--root"})," directory, or create your first skill"]}),n.jsxs("button",{onClick:()=>o("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",border:"none",cursor:"pointer"},onMouseEnter:j=>{j.currentTarget.style.opacity="0.9"},onMouseLeave:j=>{j.currentTarget.style.opacity="1"},children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Create Your First Skill"]})]}):r==="error"?n.jsx("div",{className:"flex flex-col items-center justify-center h-full px-8 animate-fade-in",children:n.jsxs("div",{className:"px-5 py-4 rounded-lg text-center max-w-sm",style:{background:"var(--red-muted)",border:"1px solid rgba(248,113,113,0.2)"},children:[n.jsx("p",{className:"text-[13px] mb-3",style:{color:"var(--red)"},children:u||"Failed to load skill data"}),f&&n.jsx("button",{onClick:f,className:"px-4 py-2 rounded-lg text-[12px] font-medium",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"none",cursor:"pointer"},children:"Retry"})]})}):n.jsxs("div",{className:"px-4 py-8 text-center animate-fade-in",children:[n.jsx("p",{className:"text-[13px] mb-2",style:{color:"var(--text-tertiary)"},children:"No skills match your search"}),n.jsx("button",{onClick:()=>m(""),className:"text-[12px] font-medium",style:{color:"var(--accent)",background:"none",border:"none",cursor:"pointer",textDecoration:"underline"},children:"Clear search"})]})}function Wf(){const{state:r,setMobileView:u}=Kl();return r.isMobile?n.jsxs("button",{onClick:()=>u("list"),className:"flex items-center gap-1.5 px-3 py-2 text-[12px] font-medium",style:{background:"var(--surface-1)",color:"var(--text-secondary)",border:"none",borderBottom:"1px solid var(--border-subtle)",cursor:"pointer",width:"100%"},children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"15 18 9 12 15 6"})}),"Back to skills"]}):null}function Vh(){const{state:r,selectSkill:u,setMode:f,refreshSkills:o}=Kl();if(r.mode==="create")return n.jsxs("div",{className:"h-full overflow-auto animate-fade-in",children:[n.jsx(Wf,{}),n.jsx(Xh,{onCreated:(y,C)=>{f("browse"),o(),u({plugin:y,skill:C})},onCancel:()=>f("browse")})]});if(!r.selectedSkill)return r.skillsError?n.jsx(Nc,{variant:"error",message:r.skillsError,onRetry:o}):!r.skillsLoading&&r.skills.length===0?n.jsx(Nc,{variant:"no-skills"}):n.jsx(Nc,{variant:"no-selection"});const{plugin:m,skill:j}=r.selectedSkill;return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsx(Wf,{}),n.jsx("div",{className:"flex-1 overflow-hidden",children:n.jsx(lh,{plugin:m,skill:j,children:n.jsx(Gh,{})},`${m}/${j}`)})]})}function Zh(){return n.jsx(Qv,{children:n.jsx(Xv,{left:n.jsx(Fv,{}),right:n.jsx(Vh,{})})})}Bv.createRoot(document.getElementById("root")).render(n.jsx(N.StrictMode,{children:n.jsx(Zh,{})}));
|