vskill 0.2.104 → 0.2.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,70 @@
|
|
|
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 h of m)if(h.type==="childList")for(const v of h.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&o(v)}).observe(document,{childList:!0,subtree:!0});function d(m){const h={};return m.integrity&&(h.integrity=m.integrity),m.referrerPolicy&&(h.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?h.credentials="include":m.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(m){if(m.ep)return;m.ep=!0;const h=d(m);fetch(m.href,h)}})();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 Bf;function Bp(){if(Bf)return Cn;Bf=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function d(o,m,h){var v=null;if(h!==void 0&&(v=""+h),m.key!==void 0&&(v=""+m.key),"key"in m){h={};for(var j in m)j!=="key"&&(h[j]=m[j])}else h=m;return m=h.ref,{$$typeof:r,type:o,key:v,ref:m!==void 0?m:null,props:h}}return Cn.Fragment=u,Cn.jsx=d,Cn.jsxs=d,Cn}var Uf;function Up(){return Uf||(Uf=1,fc.exports=Bp()),fc.exports}var n=Up(),mc={exports:{}},oe={};/**
|
|
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 Hf;function Hp(){if(Hf)return oe;Hf=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),v=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),k=Symbol.iterator;function U(S){return S===null||typeof S!="object"?null:(S=k&&S[k]||S["@@iterator"],typeof S=="function"?S:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q=Object.assign,G={};function ne(S,T,L){this.props=S,this.context=T,this.refs=G,this.updater=L||H}ne.prototype.isReactComponent={},ne.prototype.setState=function(S,T){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,T,"setState")},ne.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function I(){}I.prototype=ne.prototype;function re(S,T,L){this.props=S,this.context=T,this.refs=G,this.updater=L||H}var K=re.prototype=new I;K.constructor=re,Q(K,ne.prototype),K.isPureReactComponent=!0;var se=Array.isArray;function $(){}var le={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function me(S,T,L){var Y=L.ref;return{$$typeof:r,type:S,key:T,ref:Y!==void 0?Y:null,props:L}}function xe(S,T){return me(S.type,T,S.props)}function je(S){return typeof S=="object"&&S!==null&&S.$$typeof===r}function Se(S){var T={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(L){return T[L]})}var X=/\/+/g;function J(S,T){return typeof S=="object"&&S!==null&&S.key!=null?Se(""+S.key):T.toString(36)}function F(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then($,$):(S.status="pending",S.then(function(T){S.status==="pending"&&(S.status="fulfilled",S.value=T)},function(T){S.status==="pending"&&(S.status="rejected",S.reason=T)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function M(S,T,L,Y,V){var te=typeof S;(te==="undefined"||te==="boolean")&&(S=null);var ce=!1;if(S===null)ce=!0;else switch(te){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(S.$$typeof){case r:case u:ce=!0;break;case N:return ce=S._init,M(ce(S._payload),T,L,Y,V)}}if(ce)return V=V(S),ce=Y===""?"."+J(S,0):Y,se(V)?(L="",ce!=null&&(L=ce.replace(X,"$&/")+"/"),M(V,T,L,"",function(za){return za})):V!=null&&(je(V)&&(V=xe(V,L+(V.key==null||S&&S.key===V.key?"":(""+V.key).replace(X,"$&/")+"/")+ce)),T.push(V)),1;ce=0;var Ze=Y===""?".":Y+":";if(se(S))for(var Ue=0;Ue<S.length;Ue++)Y=S[Ue],te=Ze+J(Y,Ue),ce+=M(Y,T,L,te,V);else if(Ue=U(S),typeof Ue=="function")for(S=Ue.call(S),Ue=0;!(Y=S.next()).done;)Y=Y.value,te=Ze+J(Y,Ue++),ce+=M(Y,T,L,te,V);else if(te==="object"){if(typeof S.then=="function")return M(F(S),T,L,Y,V);throw T=String(S),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return ce}function z(S,T,L){if(S==null)return S;var Y=[],V=0;return M(S,Y,"","",function(te){return T.call(L,te,V++)}),Y}function O(S){if(S._status===-1){var T=S._result;T=T(),T.then(function(L){(S._status===0||S._status===-1)&&(S._status=1,S._result=L)},function(L){(S._status===0||S._status===-1)&&(S._status=2,S._result=L)}),S._status===-1&&(S._status=0,S._result=T)}if(S._status===1)return S._result.default;throw S._result}var ee=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},Z={map:z,forEach:function(S,T,L){z(S,function(){T.apply(this,arguments)},L)},count:function(S){var T=0;return z(S,function(){T++}),T},toArray:function(S){return z(S,function(T){return T})||[]},only:function(S){if(!je(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return oe.Activity=b,oe.Children=Z,oe.Component=ne,oe.Fragment=d,oe.Profiler=m,oe.PureComponent=re,oe.StrictMode=o,oe.Suspense=p,oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=le,oe.__COMPILER_RUNTIME={__proto__:null,c:function(S){return le.H.useMemoCache(S)}},oe.cache=function(S){return function(){return S.apply(null,arguments)}},oe.cacheSignal=function(){return null},oe.cloneElement=function(S,T,L){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var Y=Q({},S.props),V=S.key;if(T!=null)for(te in T.key!==void 0&&(V=""+T.key),T)!W.call(T,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&T.ref===void 0||(Y[te]=T[te]);var te=arguments.length-2;if(te===1)Y.children=L;else if(1<te){for(var ce=Array(te),Ze=0;Ze<te;Ze++)ce[Ze]=arguments[Ze+2];Y.children=ce}return me(S.type,V,Y)},oe.createContext=function(S){return S={$$typeof:v,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:h,_context:S},S},oe.createElement=function(S,T,L){var Y,V={},te=null;if(T!=null)for(Y in T.key!==void 0&&(te=""+T.key),T)W.call(T,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(V[Y]=T[Y]);var ce=arguments.length-2;if(ce===1)V.children=L;else if(1<ce){for(var Ze=Array(ce),Ue=0;Ue<ce;Ue++)Ze[Ue]=arguments[Ue+2];V.children=Ze}if(S&&S.defaultProps)for(Y in ce=S.defaultProps,ce)V[Y]===void 0&&(V[Y]=ce[Y]);return me(S,te,V)},oe.createRef=function(){return{current:null}},oe.forwardRef=function(S){return{$$typeof:j,render:S}},oe.isValidElement=je,oe.lazy=function(S){return{$$typeof:N,_payload:{_status:-1,_result:S},_init:O}},oe.memo=function(S,T){return{$$typeof:x,type:S,compare:T===void 0?null:T}},oe.startTransition=function(S){var T=le.T,L={};le.T=L;try{var Y=S(),V=le.S;V!==null&&V(L,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then($,ee)}catch(te){ee(te)}finally{T!==null&&L.types!==null&&(T.types=L.types),le.T=T}},oe.unstable_useCacheRefresh=function(){return le.H.useCacheRefresh()},oe.use=function(S){return le.H.use(S)},oe.useActionState=function(S,T,L){return le.H.useActionState(S,T,L)},oe.useCallback=function(S,T){return le.H.useCallback(S,T)},oe.useContext=function(S){return le.H.useContext(S)},oe.useDebugValue=function(){},oe.useDeferredValue=function(S,T){return le.H.useDeferredValue(S,T)},oe.useEffect=function(S,T){return le.H.useEffect(S,T)},oe.useEffectEvent=function(S){return le.H.useEffectEvent(S)},oe.useId=function(){return le.H.useId()},oe.useImperativeHandle=function(S,T,L){return le.H.useImperativeHandle(S,T,L)},oe.useInsertionEffect=function(S,T){return le.H.useInsertionEffect(S,T)},oe.useLayoutEffect=function(S,T){return le.H.useLayoutEffect(S,T)},oe.useMemo=function(S,T){return le.H.useMemo(S,T)},oe.useOptimistic=function(S,T){return le.H.useOptimistic(S,T)},oe.useReducer=function(S,T,L){return le.H.useReducer(S,T,L)},oe.useRef=function(S){return le.H.useRef(S)},oe.useState=function(S){return le.H.useState(S)},oe.useSyncExternalStore=function(S,T,L){return le.H.useSyncExternalStore(S,T,L)},oe.useTransition=function(){return le.H.useTransition()},oe.version="19.2.4",oe}var qf;function Rc(){return qf||(qf=1,mc.exports=Hp()),mc.exports}var g=Rc(),xc={exports:{}},An={},pc={exports:{}},vc={};/**
|
|
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 Yf;function qp(){return Yf||(Yf=1,(function(r){function u(M,z){var O=M.length;M.push(z);e:for(;0<O;){var ee=O-1>>>1,Z=M[ee];if(0<m(Z,z))M[ee]=z,M[O]=Z,O=ee;else break e}}function d(M){return M.length===0?null:M[0]}function o(M){if(M.length===0)return null;var z=M[0],O=M.pop();if(O!==z){M[0]=O;e:for(var ee=0,Z=M.length,S=Z>>>1;ee<S;){var T=2*(ee+1)-1,L=M[T],Y=T+1,V=M[Y];if(0>m(L,O))Y<Z&&0>m(V,L)?(M[ee]=V,M[Y]=O,ee=Y):(M[ee]=L,M[T]=O,ee=T);else if(Y<Z&&0>m(V,O))M[ee]=V,M[Y]=O,ee=Y;else break e}}return z}function m(M,z){var O=M.sortIndex-z.sortIndex;return O!==0?O:M.id-z.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;r.unstable_now=function(){return h.now()}}else{var v=Date,j=v.now();r.unstable_now=function(){return v.now()-j}}var p=[],x=[],N=1,b=null,k=3,U=!1,H=!1,Q=!1,G=!1,ne=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,re=typeof setImmediate<"u"?setImmediate:null;function K(M){for(var z=d(x);z!==null;){if(z.callback===null)o(x);else if(z.startTime<=M)o(x),z.sortIndex=z.expirationTime,u(p,z);else break;z=d(x)}}function se(M){if(Q=!1,K(M),!H)if(d(p)!==null)H=!0,$||($=!0,Se());else{var z=d(x);z!==null&&F(se,z.startTime-M)}}var $=!1,le=-1,W=5,me=-1;function xe(){return G?!0:!(r.unstable_now()-me<W)}function je(){if(G=!1,$){var M=r.unstable_now();me=M;var z=!0;try{e:{H=!1,Q&&(Q=!1,I(le),le=-1),U=!0;var O=k;try{t:{for(K(M),b=d(p);b!==null&&!(b.expirationTime>M&&xe());){var ee=b.callback;if(typeof ee=="function"){b.callback=null,k=b.priorityLevel;var Z=ee(b.expirationTime<=M);if(M=r.unstable_now(),typeof Z=="function"){b.callback=Z,K(M),z=!0;break t}b===d(p)&&o(p),K(M)}else o(p);b=d(p)}if(b!==null)z=!0;else{var S=d(x);S!==null&&F(se,S.startTime-M),z=!1}}break e}finally{b=null,k=O,U=!1}z=void 0}}finally{z?Se():$=!1}}}var Se;if(typeof re=="function")Se=function(){re(je)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,J=X.port2;X.port1.onmessage=je,Se=function(){J.postMessage(null)}}else Se=function(){ne(je,0)};function F(M,z){le=ne(function(){M(r.unstable_now())},z)}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(M){M.callback=null},r.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<M?Math.floor(1e3/M):5},r.unstable_getCurrentPriorityLevel=function(){return k},r.unstable_next=function(M){switch(k){case 1:case 2:case 3:var z=3;break;default:z=k}var O=k;k=z;try{return M()}finally{k=O}},r.unstable_requestPaint=function(){G=!0},r.unstable_runWithPriority=function(M,z){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var O=k;k=M;try{return z()}finally{k=O}},r.unstable_scheduleCallback=function(M,z,O){var ee=r.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?ee+O:ee):O=ee,M){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=O+Z,M={id:N++,callback:z,priorityLevel:M,startTime:O,expirationTime:Z,sortIndex:-1},O>ee?(M.sortIndex=O,u(x,M),d(p)===null&&M===d(x)&&(Q?(I(le),le=-1):Q=!0,F(se,O-ee))):(M.sortIndex=Z,u(p,M),H||U||(H=!0,$||($=!0,Se()))),M},r.unstable_shouldYield=xe,r.unstable_wrapCallback=function(M){var z=k;return function(){var O=k;k=z;try{return M.apply(this,arguments)}finally{k=O}}}})(vc)),vc}var Gf;function Yp(){return Gf||(Gf=1,pc.exports=qp()),pc.exports}var hc={exports:{}},et={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Vf;function Gp(){if(Vf)return et;Vf=1;var r=Rc();function u(p){var x="https://react.dev/errors/"+p;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var N=2;N<arguments.length;N++)x+="&args[]="+encodeURIComponent(arguments[N])}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 d(){}var o={d:{f:d,r:function(){throw Error(u(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},m=Symbol.for("react.portal");function h(p,x,N){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:b==null?null:""+b,children:p,containerInfo:x,implementation:N}}var v=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(p,x){if(p==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,et.createPortal=function(p,x){var N=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 h(p,x,null,N)},et.flushSync=function(p){var x=v.T,N=o.p;try{if(v.T=null,o.p=2,p)return p()}finally{v.T=x,o.p=N,o.d.f()}},et.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))},et.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},et.preinit=function(p,x){if(typeof p=="string"&&x&&typeof x.as=="string"){var N=x.as,b=j(N,x.crossOrigin),k=typeof x.integrity=="string"?x.integrity:void 0,U=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;N==="style"?o.d.S(p,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:b,integrity:k,fetchPriority:U}):N==="script"&&o.d.X(p,{crossOrigin:b,integrity:k,fetchPriority:U,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},et.preinitModule=function(p,x){if(typeof p=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var N=j(x.as,x.crossOrigin);o.d.M(p,{crossOrigin:N,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)},et.preload=function(p,x){if(typeof p=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var N=x.as,b=j(N,x.crossOrigin);o.d.L(p,N,{crossOrigin:b,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})}},et.preloadModule=function(p,x){if(typeof p=="string")if(x){var N=j(x.as,x.crossOrigin);o.d.m(p,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:N,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(p)},et.requestFormReset=function(p){o.d.r(p)},et.unstable_batchedUpdates=function(p,x){return p(x)},et.useFormState=function(p,x,N){return v.H.useFormState(p,x,N)},et.useFormStatus=function(){return v.H.useHostTransitionStatus()},et.version="19.2.4",et}var Qf;function Vp(){if(Qf)return hc.exports;Qf=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(),hc.exports=Gp(),hc.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 Xf;function Qp(){if(Xf)return An;Xf=1;var r=Yp(),u=Rc(),d=Vp();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 h(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 v(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function j(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(h(e)!==e)throw Error(o(188))}function x(e){var t=e.alternate;if(!t){if(t=h(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,f=s.child;f;){if(f===l){c=!0,l=s,a=i;break}if(f===a){c=!0,a=s,l=i;break}f=f.sibling}if(!c){for(f=i.child;f;){if(f===l){c=!0,l=i,a=s;break}if(f===a){c=!0,a=i,l=s;break}f=f.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 N(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=N(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,k=Symbol.for("react.element"),U=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),re=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),se=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),xe=Symbol.for("react.memo_cache_sentinel"),je=Symbol.iterator;function Se(e){return e===null||typeof e!="object"?null:(e=je&&e[je]||e["@@iterator"],typeof e=="function"?e:null)}var X=Symbol.for("react.client.reference");function J(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===X?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Q:return"Fragment";case ne:return"Profiler";case G:return"StrictMode";case se:return"Suspense";case $:return"SuspenseList";case me:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case re:return e.displayName||"Context";case I:return(e._context.displayName||"Context")+".Consumer";case K:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case le:return t=e.displayName||null,t!==null?t:J(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return J(e(t))}catch{}}return null}var F=Array.isArray,M=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O={pending:!1,data:null,method:null,action:null},ee=[],Z=-1;function S(e){return{current:e}}function T(e){0>Z||(e.current=ee[Z],ee[Z]=null,Z--)}function L(e,t){Z++,ee[Z]=e.current,e.current=t}var Y=S(null),V=S(null),te=S(null),ce=S(null);function Ze(e,t){switch(L(te,t),L(V,e),L(Y,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?sf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=sf(t),e=rf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}T(Y),L(Y,e)}function Ue(){T(Y),T(V),T(te)}function za(e){e.memoizedState!==null&&L(ce,e);var t=Y.current,l=rf(t,e.type);t!==l&&(L(V,e),L(Y,l))}function _n(e){V.current===e&&(T(Y),T(V)),ce.current===e&&(T(ce),Sn._currentValue=O)}var Js,Oc;function _l(e){if(Js===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Js=t&&t[1]||"",Oc=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Js+e+Oc}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 q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(w){var R=w}Reflect.construct(e,[],q)}else{try{q.call()}catch(w){R=w}e.call(q.prototype)}}else{try{throw Error()}catch(w){R=w}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(w){if(w&&R&&typeof w.stack=="string")return[w.stack,R.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],f=i[1];if(c&&f){var y=c.split(`
|
|
44
|
+
`),_=f.split(`
|
|
45
|
+
`);for(s=a=0;a<y.length&&!y[a].includes("DetermineComponentFrameRoot");)a++;for(;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;if(a===y.length||s===_.length)for(a=y.length-1,s=_.length-1;1<=a&&0<=s&&y[a]!==_[s];)s--;for(;1<=a&&0<=s;a--,s--)if(y[a]!==_[s]){if(a!==1||s!==1)do if(a--,s--,0>s||y[a]!==_[s]){var D=`
|
|
46
|
+
`+y[a].replace(" at new "," at ");return e.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",e.displayName)),D}while(1<=a&&0<=s);break}}}finally{$s=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?_l(l):""}function xm(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 Dc(e){try{var t="",l=null;do t+=xm(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,pm=r.unstable_shouldYield,vm=r.unstable_requestPaint,ot=r.unstable_now,hm=r.unstable_getCurrentPriorityLevel,Lc=r.unstable_ImmediatePriority,Bc=r.unstable_UserBlockingPriority,kn=r.unstable_NormalPriority,ym=r.unstable_LowPriority,Uc=r.unstable_IdlePriority,gm=r.log,bm=r.unstable_setDisableYieldValue,wa=null,dt=null;function ll(e){if(typeof gm=="function"&&bm(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(wa,e)}catch{}}var ft=Math.clz32?Math.clz32:Nm,jm=Math.log,Sm=Math.LN2;function Nm(e){return e>>>=0,e===0?32:31-(jm(e)/Sm|0)|0}var Rn=256,Mn=262144,zn=4194304;function kl(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 wn(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 f=a&134217727;return f!==0?(a=f&~i,a!==0?s=kl(a):(c&=f,c!==0?s=kl(c):l||(l=f&~e,l!==0&&(s=kl(l))))):(f=a&~i,f!==0?s=kl(f):c!==0?s=kl(c):l||(l=a&~e,l!==0&&(s=kl(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 Oa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Em(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 Hc(){var e=zn;return zn<<=1,(zn&62914560)===0&&(zn=4194304),e}function ei(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Da(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Tm(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 f=e.entanglements,y=e.expirationTimes,_=e.hiddenUpdates;for(l=c&~l;0<l;){var D=31-ft(l),q=1<<D;f[D]=0,y[D]=-1;var R=_[D];if(R!==null)for(_[D]=null,D=0;D<R.length;D++){var w=R[D];w!==null&&(w.lane&=-536870913)}l&=~q}a!==0&&qc(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function qc(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 Yc(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 Gc(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 Vc(){var e=z.p;return e!==0?e:(e=window.event,e===void 0?32:Rf(e.type))}function Qc(e,t){var l=z.p;try{return z.p=e,t()}finally{z.p=l}}var al=Math.random().toString(36).slice(2),$e="__reactFiber$"+al,at="__reactProps$"+al,Jl="__reactContainer$"+al,ai="__reactEvents$"+al,Cm="__reactListeners$"+al,Am="__reactHandles$"+al,Xc="__reactResources$"+al,La="__reactMarker$"+al;function ni(e){delete e[$e],delete e[at],delete e[ai],delete e[Cm],delete e[Am]}function $l(e){var t=e[$e];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Jl]||l[$e]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=xf(e);e!==null;){if(l=e[$e])return l;e=xf(e)}return t}e=l,l=e.parentNode}return null}function Wl(e){if(e=e[$e]||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[Xc];return t||(t=e[Xc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[La]=!0}var Zc=new Set,Kc={};function Rl(e,t){Il(e,t),Il(e+"Capture",t)}function Il(e,t){for(Kc[e]=t,e=0;e<t.length;e++)Zc.add(t[e])}var _m=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]*$"),Jc={},$c={};function km(e){return Fs.call($c,e)?!0:Fs.call(Jc,e)?!1:_m.test(e)?$c[e]=!0:(Jc[e]=!0,!1)}function On(e,t,l){if(km(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 Dn(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 Ut(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 Wc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Rm(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=Wc(e)?"checked":"value";e._valueTracker=Rm(e,t,""+e[t])}}function Fc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Wc(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 Mm=/[\n"\\]/g;function jt(e){return e.replace(Mm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ii(e,t,l,a,s,i,c,f){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"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.name=""+bt(f):e.removeAttribute("name")}function Ic(e,t,l,a,s,i,c,f){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,f||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=f?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 Pc(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 eu(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(o(92));if(F(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 zm=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 tu(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||zm.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function lu(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&&tu(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&tu(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 wm=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"]]),Om=/^[\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 Om.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ht(){}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 au(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&&Fc(a)}break e;case"textarea":Pc(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Pl(e,!!l.multiple,t,!1)}}}var di=!1;function nu(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,au(t),e)))for(t=0;t<e.length;t++)au(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 qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fi=!1;if(qt)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 su(){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 iu(){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 f in e)e.hasOwnProperty(f)&&(l=e[f],this[f]=l?l(i):i[f]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?qn:iu,this.isPropagationStopped=iu,this}return b(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 Ml={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yn=nt(Ml),qa=b({},Ml,{view:0,detail:0}),Dm=nt(qa),xi,pi,Ya,Gn=b({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hi,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,pi=e.screenY-Ya.screenY):pi=xi=0,Ya=e),xi)},movementY:function(e){return"movementY"in e?e.movementY:pi}}),ru=nt(Gn),Lm=b({},Gn,{dataTransfer:0}),Bm=nt(Lm),Um=b({},qa,{relatedTarget:0}),vi=nt(Um),Hm=b({},Ml,{animationName:0,elapsedTime:0,pseudoElement:0}),qm=nt(Hm),Ym=b({},Ml,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gm=nt(Ym),Vm=b({},Ml,{data:0}),cu=nt(Vm),Qm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xm={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"},Zm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Km(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zm[e])?!!t[e]:!1}function hi(){return Km}var Jm=b({},qa,{key:function(e){if(e.key){var t=Qm[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"?Xm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hi,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}}),$m=nt(Jm),Wm=b({},Gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uu=nt(Wm),Fm=b({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hi}),Im=nt(Fm),Pm=b({},Ml,{propertyName:0,elapsedTime:0,pseudoElement:0}),ex=nt(Pm),tx=b({},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}),lx=nt(tx),ax=b({},Ml,{newState:0,oldState:0}),nx=nt(ax),sx=[9,13,27,32],yi=qt&&"CompositionEvent"in window,Ga=null;qt&&"documentMode"in document&&(Ga=document.documentMode);var ix=qt&&"TextEvent"in window&&!Ga,ou=qt&&(!yi||Ga&&8<Ga&&11>=Ga),du=" ",fu=!1;function mu(e,t){switch(e){case"keyup":return sx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var aa=!1;function rx(e,t){switch(e){case"compositionend":return xu(t);case"keypress":return t.which!==32?null:(fu=!0,du);case"textInput":return e=t.data,e===du&&fu?null:e;default:return null}}function cx(e,t){if(aa)return e==="compositionend"||!yi&&mu(e,t)?(e=su(),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 ou&&t.locale!=="ko"?null:t.data;default:return null}}var ux={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 pu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ux[e.type]:t==="textarea"}function vu(e,t,l,a){ta?la?la.push(a):la=[a]:ta=a,t=Ms(t,"onChange"),0<t.length&&(l=new Yn("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Va=null,Qa=null;function ox(e){Pd(e,0)}function Vn(e){var t=Ba(e);if(Fc(t))return e}function hu(e,t){if(e==="change")return t}var yu=!1;if(qt){var gi;if(qt){var bi="oninput"in document;if(!bi){var gu=document.createElement("div");gu.setAttribute("oninput","return;"),bi=typeof gu.oninput=="function"}gi=bi}else gi=!1;yu=gi&&(!document.documentMode||9<document.documentMode)}function bu(){Va&&(Va.detachEvent("onpropertychange",ju),Qa=Va=null)}function ju(e){if(e.propertyName==="value"&&Vn(Qa)){var t=[];vu(t,Qa,e,oi(e)),nu(ox,t)}}function dx(e,t,l){e==="focusin"?(bu(),Va=t,Qa=l,Va.attachEvent("onpropertychange",ju)):e==="focusout"&&bu()}function fx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vn(Qa)}function mx(e,t){if(e==="click")return Vn(t)}function xx(e,t){if(e==="input"||e==="change")return Vn(t)}function px(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:px;function Xa(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 Su(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nu(e,t){var l=Su(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=Su(l)}}function Eu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Eu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tu(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 vx=qt&&"documentMode"in document&&11>=document.documentMode,na=null,Si=null,Za=null,Ni=!1;function Cu(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&&Xa(Za,a)||(Za=a,a=Ms(Si,"onSelect"),0<a.length&&(t=new Yn("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=na)))}function zl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var sa={animationend:zl("Animation","AnimationEnd"),animationiteration:zl("Animation","AnimationIteration"),animationstart:zl("Animation","AnimationStart"),transitionrun:zl("Transition","TransitionRun"),transitionstart:zl("Transition","TransitionStart"),transitioncancel:zl("Transition","TransitionCancel"),transitionend:zl("Transition","TransitionEnd")},Ei={},Au={};qt&&(Au=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 wl(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 Au)return Ei[e]=t[l];return e}var _u=wl("animationend"),ku=wl("animationiteration"),Ru=wl("animationstart"),hx=wl("transitionrun"),yx=wl("transitionstart"),gx=wl("transitioncancel"),Mu=wl("transitionend"),zu=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 Rt(e,t){zu.set(e,t),Rl(t,[e])}var Qn=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 Xn(){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&&wu(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 Ol(e,t){return Zn(e,null,null,t),Kn(e)}function wu(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<pn)throw pn=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 bx(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 bx(e,t,l,a)}function _i(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yt(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 Ou(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=Tp(e,l,Y.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case me:return e=xt(31,l,t,s),e.elementType=me,e.lanes=i,e;case Q:return Dl(l.children,s,i,t);case G:c=8,s|=24;break;case ne:return e=xt(12,l,t,s|2),e.elementType=ne,e.lanes=i,e;case se:return e=xt(13,l,t,s),e.elementType=se,e.lanes=i,e;case $:return e=xt(19,l,t,s),e.elementType=$,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case re:c=10;break e;case I:c=9;break e;case K:c=11;break e;case le:c=14;break e;case W: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 Dl(e,t,l,a){return e=xt(7,e,a,t),e.lanes=l,e}function ki(e,t,l){return e=xt(6,e,null,t),e.lanes=l,e}function Du(e){var t=xt(18,null,null,0);return t.stateNode=e,t}function Ri(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 Lu=new WeakMap;function Nt(e,t){if(typeof e=="object"&&e!==null){var l=Lu.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Dc(t)},Lu.set(e,t),t)}return{value:e,source:t,stack:Dc(t)}}var ca=[],ua=0,$n=null,Ka=0,Et=[],Tt=0,sl=null,wt=1,Ot="";function Gt(e,t){ca[ua++]=Ka,ca[ua++]=$n,$n=e,Ka=t}function Bu(e,t,l){Et[Tt++]=wt,Et[Tt++]=Ot,Et[Tt++]=sl,sl=e;var a=wt;e=Ot;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,wt=1<<32-ft(t)+s|l<<s|a,Ot=i+e}else wt=1<<i|l<<s|a,Ot=e}function Mi(e){e.return!==null&&(Gt(e,1),Bu(e,1,0))}function zi(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,Ot=Et[--Tt],Et[Tt]=null,wt=Et[--Tt],Et[Tt]=null}function Uu(e,t){Et[Tt++]=wt,Et[Tt++]=Ot,Et[Tt++]=sl,wt=t.id,Ot=t.overflow,sl=e}var We=null,ze=null,be=!1,il=null,Ct=!1,wi=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)),wi}function Hu(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[$e]=e,t[at]=a,l){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(l=0;l<hn.length;l++)ve(hn[l],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),Ic(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),eu(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||af(t.textContent,l)?(a.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),a.onScroll!=null&&ve("scroll",t),a.onScrollEnd!=null&&ve("scrollend",t),a.onClick!=null&&(t.onclick=Ht),t=!0):t=!1,t||rl(e,!0)}function qu(e){for(We=e.return;We;)switch(We.tag){case 5:case 31:case 13:Ct=!1;return;case 27:case 3:Ct=!0;return;default:We=We.return}}function oa(e){if(e!==We)return!1;if(!be)return qu(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&&ze&&rl(e),qu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ze=mf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ze=mf(e)}else t===27?(t=ze,jl(e.type)?(e=lc,lc=null,ze=e):ze=t):ze=We?_t(e.stateNode.nextSibling):null;return!0}function Ll(){ze=We=null,be=!1}function Oi(){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 Di=S(null),Bl=null,Vt=null;function cl(e,t,l){L(Di,t._currentValue),t._currentValue=l}function Qt(e){e._currentValue=Di.current,T(Di)}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 f=i;i=s;for(var y=0;y<t.length;y++)if(f.context===t[y]){i.lanes|=l,f=i.alternate,f!==null&&(f.lanes|=l),Li(i.return,l,e),a||(c=null);break e}i=f.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 f=s.type;mt(s.pendingProps.value,c.value)||(e!==null?e.push(f):e=[f])}}else if(s===ce.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,Vt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Fe(e){return Yu(Bl,e)}function Fn(e,t){return Bl===null&&Ul(e),Yu(e,t)}function Yu(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Vt===null){if(e===null)throw Error(o(308));Vt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vt=Vt.next=t;return l}var jx=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()})}},Sx=r.unstable_scheduleCallback,Nx=r.unstable_NormalPriority,Ye={$$typeof:re,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ui(){return{controller:new jx,data:new Map,refCount:0}}function $a(e){e.refCount--,e.refCount===0&&Sx(Nx,function(){e.controller.abort()})}var Wa=null,Hi=0,fa=0,ma=null;function Ex(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(Gu,Gu),t}function Gu(){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 Tx(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 Vu=M.S;M.S=function(e,t){Ad=ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ex(e,t),Vu!==null&&Vu(e,t)};var Hl=S(null);function qi(){var e=Hl.current;return e!==null?e:Me.pooledCache}function In(e,t){t===null?L(Hl,Hl.current):L(Hl,t.pool)}function Qu(){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 Xu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zu(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Ht,Ht),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ju(e),e;default:if(typeof t.status=="string")t.then(Ht,Ht);else{if(e=Me,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,Ju(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 Ku(){if(Yl===null)throw Error(o(459));var e=Yl;return Yl=null,e}function Ju(e){if(e===xa||e===Pn)throw Error(o(483))}var pa=null,Fa=0;function ts(e){var t=Fa;return Fa+=1,pa===null&&(pa=[]),Zu(pa,e,t)}function Ia(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ls(e,t){throw t.$$typeof===k?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function $u(e){function t(C,E){if(e){var A=C.deletions;A===null?(C.deletions=[E],C.flags|=16):A.push(E)}}function l(C,E){if(!e)return null;for(;E!==null;)t(C,E),E=E.sibling;return null}function a(C){for(var E=new Map;C!==null;)C.key!==null?E.set(C.key,C):E.set(C.index,C),C=C.sibling;return E}function s(C,E){return C=Yt(C,E),C.index=0,C.sibling=null,C}function i(C,E,A){return C.index=A,e?(A=C.alternate,A!==null?(A=A.index,A<E?(C.flags|=67108866,E):A):(C.flags|=67108866,E)):(C.flags|=1048576,E)}function c(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function f(C,E,A,B){return E===null||E.tag!==6?(E=ki(A,C.mode,B),E.return=C,E):(E=s(E,A),E.return=C,E)}function y(C,E,A,B){var ie=A.type;return ie===Q?D(C,E,A.props.children,B,A.key):E!==null&&(E.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===W&&ql(ie)===E.type)?(E=s(E,A.props),Ia(E,A),E.return=C,E):(E=Jn(A.type,A.key,A.props,null,C.mode,B),Ia(E,A),E.return=C,E)}function _(C,E,A,B){return E===null||E.tag!==4||E.stateNode.containerInfo!==A.containerInfo||E.stateNode.implementation!==A.implementation?(E=Ri(A,C.mode,B),E.return=C,E):(E=s(E,A.children||[]),E.return=C,E)}function D(C,E,A,B,ie){return E===null||E.tag!==7?(E=Dl(A,C.mode,B,ie),E.return=C,E):(E=s(E,A),E.return=C,E)}function q(C,E,A){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=ki(""+E,C.mode,A),E.return=C,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case U:return A=Jn(E.type,E.key,E.props,null,C.mode,A),Ia(A,E),A.return=C,A;case H:return E=Ri(E,C.mode,A),E.return=C,E;case W:return E=ql(E),q(C,E,A)}if(F(E)||Se(E))return E=Dl(E,C.mode,A,null),E.return=C,E;if(typeof E.then=="function")return q(C,ts(E),A);if(E.$$typeof===re)return q(C,Fn(C,E),A);ls(C,E)}return null}function R(C,E,A,B){var ie=E!==null?E.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ie!==null?null:f(C,E,""+A,B);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case U:return A.key===ie?y(C,E,A,B):null;case H:return A.key===ie?_(C,E,A,B):null;case W:return A=ql(A),R(C,E,A,B)}if(F(A)||Se(A))return ie!==null?null:D(C,E,A,B,null);if(typeof A.then=="function")return R(C,E,ts(A),B);if(A.$$typeof===re)return R(C,E,Fn(C,A),B);ls(C,A)}return null}function w(C,E,A,B,ie){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return C=C.get(A)||null,f(E,C,""+B,ie);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case U:return C=C.get(B.key===null?A:B.key)||null,y(E,C,B,ie);case H:return C=C.get(B.key===null?A:B.key)||null,_(E,C,B,ie);case W:return B=ql(B),w(C,E,A,B,ie)}if(F(B)||Se(B))return C=C.get(A)||null,D(E,C,B,ie,null);if(typeof B.then=="function")return w(C,E,A,ts(B),ie);if(B.$$typeof===re)return w(C,E,A,Fn(E,B),ie);ls(E,B)}return null}function P(C,E,A,B){for(var ie=null,Ne=null,ae=E,fe=E=0,ye=null;ae!==null&&fe<A.length;fe++){ae.index>fe?(ye=ae,ae=null):ye=ae.sibling;var Ee=R(C,ae,A[fe],B);if(Ee===null){ae===null&&(ae=ye);break}e&&ae&&Ee.alternate===null&&t(C,ae),E=i(Ee,E,fe),Ne===null?ie=Ee:Ne.sibling=Ee,Ne=Ee,ae=ye}if(fe===A.length)return l(C,ae),be&&Gt(C,fe),ie;if(ae===null){for(;fe<A.length;fe++)ae=q(C,A[fe],B),ae!==null&&(E=i(ae,E,fe),Ne===null?ie=ae:Ne.sibling=ae,Ne=ae);return be&&Gt(C,fe),ie}for(ae=a(ae);fe<A.length;fe++)ye=w(ae,C,fe,A[fe],B),ye!==null&&(e&&ye.alternate!==null&&ae.delete(ye.key===null?fe:ye.key),E=i(ye,E,fe),Ne===null?ie=ye:Ne.sibling=ye,Ne=ye);return e&&ae.forEach(function(Cl){return t(C,Cl)}),be&&Gt(C,fe),ie}function ue(C,E,A,B){if(A==null)throw Error(o(151));for(var ie=null,Ne=null,ae=E,fe=E=0,ye=null,Ee=A.next();ae!==null&&!Ee.done;fe++,Ee=A.next()){ae.index>fe?(ye=ae,ae=null):ye=ae.sibling;var Cl=R(C,ae,Ee.value,B);if(Cl===null){ae===null&&(ae=ye);break}e&&ae&&Cl.alternate===null&&t(C,ae),E=i(Cl,E,fe),Ne===null?ie=Cl:Ne.sibling=Cl,Ne=Cl,ae=ye}if(Ee.done)return l(C,ae),be&&Gt(C,fe),ie;if(ae===null){for(;!Ee.done;fe++,Ee=A.next())Ee=q(C,Ee.value,B),Ee!==null&&(E=i(Ee,E,fe),Ne===null?ie=Ee:Ne.sibling=Ee,Ne=Ee);return be&&Gt(C,fe),ie}for(ae=a(ae);!Ee.done;fe++,Ee=A.next())Ee=w(ae,C,fe,Ee.value,B),Ee!==null&&(e&&Ee.alternate!==null&&ae.delete(Ee.key===null?fe:Ee.key),E=i(Ee,E,fe),Ne===null?ie=Ee:Ne.sibling=Ee,Ne=Ee);return e&&ae.forEach(function(Lp){return t(C,Lp)}),be&&Gt(C,fe),ie}function Re(C,E,A,B){if(typeof A=="object"&&A!==null&&A.type===Q&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case U:e:{for(var ie=A.key;E!==null;){if(E.key===ie){if(ie=A.type,ie===Q){if(E.tag===7){l(C,E.sibling),B=s(E,A.props.children),B.return=C,C=B;break e}}else if(E.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===W&&ql(ie)===E.type){l(C,E.sibling),B=s(E,A.props),Ia(B,A),B.return=C,C=B;break e}l(C,E);break}else t(C,E);E=E.sibling}A.type===Q?(B=Dl(A.props.children,C.mode,B,A.key),B.return=C,C=B):(B=Jn(A.type,A.key,A.props,null,C.mode,B),Ia(B,A),B.return=C,C=B)}return c(C);case H:e:{for(ie=A.key;E!==null;){if(E.key===ie)if(E.tag===4&&E.stateNode.containerInfo===A.containerInfo&&E.stateNode.implementation===A.implementation){l(C,E.sibling),B=s(E,A.children||[]),B.return=C,C=B;break e}else{l(C,E);break}else t(C,E);E=E.sibling}B=Ri(A,C.mode,B),B.return=C,C=B}return c(C);case W:return A=ql(A),Re(C,E,A,B)}if(F(A))return P(C,E,A,B);if(Se(A)){if(ie=Se(A),typeof ie!="function")throw Error(o(150));return A=ie.call(A),ue(C,E,A,B)}if(typeof A.then=="function")return Re(C,E,ts(A),B);if(A.$$typeof===re)return Re(C,E,Fn(C,A),B);ls(C,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,E!==null&&E.tag===6?(l(C,E.sibling),B=s(E,A),B.return=C,C=B):(l(C,E),B=ki(A,C.mode,B),B.return=C,C=B),c(C)):l(C,E)}return function(C,E,A,B){try{Fa=0;var ie=Re(C,E,A,B);return pa=null,ie}catch(ae){if(ae===xa||ae===Pn)throw ae;var Ne=xt(29,ae,null,C.mode);return Ne.lanes=B,Ne.return=C,Ne}finally{}}}var Gl=$u(!0),Wu=$u(!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 Vi(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,(Te&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),wu(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,Yc(e,l)}}function Qi(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 Xi=!1;function en(){if(Xi){var e=ma;if(e!==null)throw e}}function tn(e,t,l,a){Xi=!1;var s=e.updateQueue;ul=!1;var i=s.firstBaseUpdate,c=s.lastBaseUpdate,f=s.shared.pending;if(f!==null){s.shared.pending=null;var y=f,_=y.next;y.next=null,c===null?i=_:c.next=_,c=y;var D=e.alternate;D!==null&&(D=D.updateQueue,f=D.lastBaseUpdate,f!==c&&(f===null?D.firstBaseUpdate=_:f.next=_,D.lastBaseUpdate=y))}if(i!==null){var q=s.baseState;c=0,D=_=y=null,f=i;do{var R=f.lane&-536870913,w=R!==f.lane;if(w?(he&R)===R:(a&R)===R){R!==0&&R===fa&&(Xi=!0),D!==null&&(D=D.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});e:{var P=e,ue=f;R=t;var Re=l;switch(ue.tag){case 1:if(P=ue.payload,typeof P=="function"){q=P.call(Re,q,R);break e}q=P;break e;case 3:P.flags=P.flags&-65537|128;case 0:if(P=ue.payload,R=typeof P=="function"?P.call(Re,q,R):P,R==null)break e;q=b({},q,R);break e;case 2:ul=!0}}R=f.callback,R!==null&&(e.flags|=64,w&&(e.flags|=8192),w=s.callbacks,w===null?s.callbacks=[R]:w.push(R))}else w={lane:R,tag:f.tag,payload:f.payload,callback:f.callback,next:null},D===null?(_=D=w,y=q):D=D.next=w,c|=R;if(f=f.next,f===null){if(f=s.shared.pending,f===null)break;w=f,f=w.next,w.next=null,s.lastBaseUpdate=w,s.shared.pending=null}}while(!0);D===null&&(y=q),s.baseState=y,s.firstBaseUpdate=_,s.lastBaseUpdate=D,i===null&&(s.shared.lanes=0),vl|=c,e.lanes=c,e.memoizedState=q}}function Fu(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Iu(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Fu(l[e],t)}var va=S(null),as=S(0);function Pu(e,t){e=Pt,L(as,e),L(va,t),Pt=e|t.baseLanes}function Zi(){L(as,Pt),L(va,va.current)}function Ki(){Pt=as.current,T(va),T(as)}var pt=S(null),At=null;function fl(e){var t=e.alternate;L(He,He.current&1),L(pt,e),At===null&&(t===null||va.current!==null||t.memoizedState!==null)&&(At=e)}function Ji(e){L(He,He.current),L(pt,e),At===null&&(At=e)}function eo(e){e.tag===22?(L(He,He.current),L(pt,e),At===null&&(At=e)):ml()}function ml(){L(He,He.current),L(pt,pt.current)}function vt(e){T(pt),At===e&&(At=null),T(He)}var He=S(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,de=null,_e=null,Ge=null,ss=!1,ha=!1,Vl=!1,is=0,ln=0,ya=null,Cx=0;function De(){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,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Uo:dr,Vl=!1,i=l(a,s),Vl=!1,ha&&(i=lo(t,l,a,s)),to(e),i}function to(e){M.H=sn;var t=_e!==null&&_e.next!==null;if(Xt=0,Ge=_e=de=null,ss=!1,ln=0,ya=null,t)throw Error(o(300));e===null||Ve||(e=e.dependencies,e!==null&&Wn(e)&&(Ve=!0))}function lo(e,t,l,a){de=e;var s=0;do{if(ha&&(ya=null),ln=0,ha=!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)}M.H=Ho,i=t(l,a)}while(ha);return i}function Ax(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?an(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(de.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=de=null,ha=!1,ln=is=0,ya=null}function tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?de.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function qe(){if(_e===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Ge===null?de.memoizedState:Ge.next;if(t!==null)Ge=t,_e=e;else{if(e===null)throw de.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?de.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=Zu(ya,e,t),t=de,(Ge===null?t.memoizedState:Ge.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Uo:dr),e}function cs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return an(e);if(e.$$typeof===re)return Fe(e)}throw Error(o(438,String(e)))}function er(e){var t=null,l=de.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=de.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(),de.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]=xe;return t.index++,l}function Zt(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 f=c=null,y=null,_=t,D=!1;do{var q=_.lane&-536870913;if(q!==_.lane?(he&q)===q:(Xt&q)===q){var R=_.revertLane;if(R===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),q===fa&&(D=!0);else if((Xt&R)===R){_=_.next,R===fa&&(D=!0);continue}else q={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},y===null?(f=y=q,c=i):y=y.next=q,de.lanes|=R,vl|=R;q=_.action,Vl&&l(i,q),i=_.hasEagerState?_.eagerState:l(i,q)}else R={lane:q,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},y===null?(f=y=R,c=i):y=y.next=R,de.lanes|=q,vl|=q;_=_.next}while(_!==null&&_!==t);if(y===null?c=i:y.next=f,!mt(i,e.memoizedState)&&(Ve=!0,D&&(l=ma,l!==null)))throw l;e.memoizedState=i,e.baseState=c,e.baseQueue=y,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)||(Ve=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function ao(e,t,l){var a=de,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,Ve=!0),s=s.queue,sr(io.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},so.bind(null,a,s,l,t),null),Me===null)throw Error(o(349));i||(Xt&127)!==0||no(a,t,l)}return l}function no(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=de.updateQueue,t===null?(t=rs(),de.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function so(e,t,l,a){t.value=l,t.getSnapshot=a,ro(t)&&co(e)}function io(e,t,l){return l(function(){ro(t)&&co(e)})}function ro(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!mt(e,l)}catch{return!0}}function co(e){var t=Ol(e,2);t!==null&&ut(t,e,2)}function ar(e){var t=tt();if(typeof e=="function"){var l=e;if(e=l(),Vl){ll(!0);try{l()}finally{ll(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:e},t}function uo(e,t,l,a){return e.baseState=l,tr(e,_e,typeof a=="function"?a:Zt)}function _x(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)}};M.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,oo(t,i)):(i.next=l.next,t.pending=l.next=i)}}function oo(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=M.T,c={};M.T=c;try{var f=l(s,a),y=M.S;y!==null&&y(c,f),fo(e,t,f)}catch(_){nr(e,t,_)}finally{i!==null&&c.types!==null&&(i.types=c.types),M.T=i}}else try{i=l(s,a),fo(e,t,i)}catch(_){nr(e,t,_)}}function fo(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){mo(e,t,a)},function(a){return nr(e,t,a)}):mo(e,t,l)}function mo(e,t,l){t.status="fulfilled",t.value=l,xo(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,oo(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,xo(t),t=t.next;while(t!==a)}e.action=null}function xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function po(e,t){return t}function vo(e,t){if(be){var l=Me.formState;if(l!==null){e:{var a=de;if(be){if(ze){t:{for(var s=ze,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){ze=_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:po,lastRenderedState:t},l.queue=a,l=Do.bind(null,de,a),a.dispatch=l,a=ar(!1),i=or.bind(null,de,!1,a.queue),a=tt(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=_x.bind(null,de,s,i,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function ho(e){var t=qe();return yo(t,_e,e)}function yo(e,t,l){if(t=tr(e,t,po)[0],e=us(Zt)[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&&(de.flags|=2048,ga(9,{destroy:void 0},kx.bind(null,s,l),null)),[a,i,e]}function kx(e,t){e.action=t}function go(e){var t=qe(),l=_e;if(l!==null)return yo(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=de.updateQueue,t===null&&(t=rs(),de.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 bo(){return qe().memoizedState}function os(e,t,l,a){var s=tt();de.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):(de.flags|=e,s.memoizedState=ga(1|t,i,l,a))}function jo(e,t){os(8390656,8,e,t)}function sr(e,t){ds(2048,8,e,t)}function Rx(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=rs(),de.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function So(e){var t=qe().memoizedState;return Rx({ref:t,nextImpl:e}),function(){if((Te&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function No(e,t){return ds(4,2,e,t)}function Eo(e,t){return ds(4,4,e,t)}function To(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 Co(e,t,l){l=l!=null?l.concat([e]):null,ds(4,4,To.bind(null,t,e),l)}function ir(){}function Ao(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 _o(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(),Vl){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&&(he&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=kd(),de.lanes|=e,vl|=e,l)}function ko(e,t,l,a){return mt(l,t)?l:va.current!==null?(e=rr(e,l,a),mt(e,t)||(Ve=!0),e):(Xt&42)===0||(Xt&1073741824)!==0&&(he&261930)===0?(Ve=!0,e.memoizedState=l):(e=kd(),de.lanes|=e,vl|=e,t)}function Ro(e,t,l,a,s){var i=z.p;z.p=i!==0&&8>i?i:8;var c=M.T,f={};M.T=f,or(e,!1,t,l);try{var y=s(),_=M.S;if(_!==null&&_(f,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var D=Tx(y,a);nn(e,t,D,gt(e))}else nn(e,t,a,gt(e))}catch(q){nn(e,t,{then:function(){},status:"rejected",reason:q},gt())}finally{z.p=i,c!==null&&f.types!==null&&(c.types=f.types),M.T=c}}function Mx(){}function cr(e,t,l,a){if(e.tag!==5)throw Error(o(476));var s=Mo(e).queue;Ro(e,s,t,O,l===null?Mx:function(){return zo(e),l(a)})}function Mo(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:O,baseState:O,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:O},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function zo(e){var t=Mo(e);t.next===null&&(t=e.alternate.memoizedState),nn(e,t.next.queue,{},gt())}function ur(){return Fe(Sn)}function wo(){return qe().memoizedState}function Oo(){return qe().memoizedState}function zx(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 wx(e,t,l){var a=gt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fs(e)?Lo(t,l):(l=Ai(e,t,l,a),l!==null&&(ut(l,e,a),Bo(l,t,a)))}function Do(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))Lo(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,f=i(c,l);if(s.hasEagerState=!0,s.eagerState=f,mt(f,c))return Zn(e,t,s,0),Me===null&&Xn(),!1}catch{}finally{}if(l=Ai(e,t,s,a),l!==null)return ut(l,e,a),Bo(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===de||t!==null&&t===de}function Lo(e,t){ha=ss=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Bo(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Yc(e,l)}}var sn={readContext:Fe,use:cs,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useLayoutEffect:De,useInsertionEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useSyncExternalStore:De,useId:De,useHostTransitionStatus:De,useFormState:De,useActionState:De,useOptimistic:De,useMemoCache:De,useCacheRefresh:De};sn.useEffectEvent=De;var Uo={readContext:Fe,use:cs,useCallback:function(e,t){return tt().memoizedState=[e,t===void 0?null:t],e},useContext:Fe,useEffect:jo,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,os(4194308,4,To.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(Vl){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(Vl){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=wx.bind(null,de,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=Do.bind(null,de,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=Ro.bind(null,de,e.queue,!0,!1),tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=de,s=tt();if(be){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),Me===null)throw Error(o(349));(he&127)!==0||no(a,t,l)}s.memoizedState=l;var i={value:l,getSnapshot:t};return s.queue=i,jo(io.bind(null,a,i,e),[e]),a.flags|=2048,ga(9,{destroy:void 0},so.bind(null,a,i,l,t),null),l},useId:function(){var e=tt(),t=Me.identifierPrefix;if(be){var l=Ot,a=wt;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=Cx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ur,useFormState:vo,useActionState:vo,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,de,!0,l),l.dispatch=t,[e,t]},useMemoCache:er,useCacheRefresh:function(){return tt().memoizedState=zx.bind(null,de)},useEffectEvent:function(e){var t=tt(),l={impl:e};return t.memoizedState=l,function(){if((Te&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},dr={readContext:Fe,use:cs,useCallback:Ao,useContext:Fe,useEffect:sr,useImperativeHandle:Co,useInsertionEffect:No,useLayoutEffect:Eo,useMemo:_o,useReducer:us,useRef:bo,useState:function(){return us(Zt)},useDebugValue:ir,useDeferredValue:function(e,t){var l=qe();return ko(l,_e.memoizedState,e,t)},useTransition:function(){var e=us(Zt)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:an(e),t]},useSyncExternalStore:ao,useId:wo,useHostTransitionStatus:ur,useFormState:ho,useActionState:ho,useOptimistic:function(e,t){var l=qe();return uo(l,_e,e,t)},useMemoCache:er,useCacheRefresh:Oo};dr.useEffectEvent=So;var Ho={readContext:Fe,use:cs,useCallback:Ao,useContext:Fe,useEffect:sr,useImperativeHandle:Co,useInsertionEffect:No,useLayoutEffect:Eo,useMemo:_o,useReducer:lr,useRef:bo,useState:function(){return lr(Zt)},useDebugValue:ir,useDeferredValue:function(e,t){var l=qe();return _e===null?rr(l,e,t):ko(l,_e.memoizedState,e,t)},useTransition:function(){var e=lr(Zt)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:an(e),t]},useSyncExternalStore:ao,useId:wo,useHostTransitionStatus:ur,useFormState:go,useActionState:go,useOptimistic:function(e,t){var l=qe();return _e!==null?uo(l,_e,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:er,useCacheRefresh:Oo};Ho.useEffectEvent=So;function fr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:b({},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 qo(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?!Xa(l,a)||!Xa(s,i):!0}function Yo(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 Ql(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=b({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Go(e){Qn(e)}function Vo(e){console.error(e)}function Qo(e){Qn(e)}function ms(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Xo(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 Zo(e){return e=ol(e),e.tag=3,e}function Ko(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(){Xo(t,l,a)}}var c=l.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){Xo(t,l,a),typeof s!="function"&&(hl===null?hl=new Set([this]):hl.add(this));var f=a.stack;this.componentDidCatch(a.value,{componentStack:f!==null?f:""})})}function Ox(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=pt.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=pt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==wi&&(e=Error(o(422),{cause:a}),Ja(Nt(e,l)))):(a!==wi&&(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),Qi(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),Qi(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"&&(hl===null||!hl.has(i))))return l.flags|=65536,s&=-s,l.lanes|=s,s=Zo(s),Ko(s,e,l,a),Qi(l,s),!1}l=l.return}while(l!==null);return!1}var pr=Error(o(461)),Ve=!1;function Ie(e,t,l,a){t.child=e===null?Wu(t,null,l,a):Gl(t,e.child,l,a)}function Jo(e,t,l,a,s){l=l.render;var i=t.ref;if("ref"in a){var c={};for(var f in a)f!=="ref"&&(c[f]=a[f])}else c=a;return Ul(t),a=Wi(e,t,l,c,i,s),f=Fi(),e!==null&&!Ve?(Ii(e,t,s),Kt(e,t,s)):(be&&f&&Mi(t),t.flags|=1,Ie(e,t,a,s),t.child)}function $o(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,Wo(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:Xa,l(c,a)&&e.ref===t.ref)return Kt(e,t,s)}return t.flags|=1,e=Yt(i,a),e.ref=t.ref,e.return=t,t.child=e}function Wo(e,t,l,a,s){if(e!==null){var i=e.memoizedProps;if(Xa(i,a)&&e.ref===t.ref)if(Ve=!1,t.pendingProps=a=i,Nr(e,s))(e.flags&131072)!==0&&(Ve=!0);else return t.lanes=e.lanes,Kt(e,t,s)}return vr(e,t,l,a,s)}function Fo(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 Io(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?Pu(t,i):Zi(),eo(t);else return a=t.lanes=536870912,Io(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(In(t,i.cachePool),Pu(t,i),ml(),t.memoizedState=null):(e!==null&&In(t,null),Zi(),ml());return Ie(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 Io(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(),eo(t),e!==null&&da(e,t,a,!0),t.childLanes=s,null}function xs(e,t){return t=vs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Po(e,t,l){return Gl(t,e.child,null,l),e=xs(t,t.pendingProps),e.flags|=2,vt(t),t.memoizedState=null,e}function Dx(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=ze)?(e=ff(e,Ct),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sl!==null?{id:wt,overflow:Ot}:null,retryLane:536870912,hydrationErrors:null},l=Du(e),l.return=t,t.child=l,We=t,ze=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=Po(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ve||da(e,t,l,!1),s=(l&e.childLanes)!==0,Ve||s){if(a=Me,a!==null&&(c=Gc(a,l),c!==0&&c!==i.retryLane))throw i.retryLane=c,Ol(e,c),ut(a,e,c),pr;Ts(),t=Po(e,t,l)}else e=i.treeContext,ze=_t(c.nextSibling),We=t,be=!0,il=null,Ct=!1,e!==null&&Uu(t,e),t=xs(t,a),t.flags|=4096;return t}return e=Yt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ps(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 vr(e,t,l,a,s){return Ul(t),l=Wi(e,t,l,a,void 0,s),a=Fi(),e!==null&&!Ve?(Ii(e,t,s),Kt(e,t,s)):(be&&a&&Mi(t),t.flags|=1,Ie(e,t,l,s),t.child)}function ed(e,t,l,a,s,i){return Ul(t),t.updateQueue=null,l=lo(t,a,l,s),to(e),a=Fi(),e!==null&&!Ve?(Ii(e,t,i),Kt(e,t,i)):(be&&a&&Mi(t),t.flags|=1,Ie(e,t,l,i),t.child)}function td(e,t,l,a,s){if(Ul(t),t.stateNode===null){var i=ra,c=l.contextType;typeof c=="object"&&c!==null&&(i=Fe(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?Fe(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 f=t.memoizedProps,y=Ql(l,f);i.props=y;var _=i.context,D=l.contextType;c=ra,typeof D=="object"&&D!==null&&(c=Fe(D));var q=l.getDerivedStateFromProps;D=typeof q=="function"||typeof i.getSnapshotBeforeUpdate=="function",f=t.pendingProps!==f,D||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(f||_!==c)&&Yo(t,i,a,c),ul=!1;var R=t.memoizedState;i.state=R,tn(t,a,i,s),en(),_=t.memoizedState,f||R!==_||ul?(typeof q=="function"&&(fr(t,l,q,a),_=t.memoizedState),(y=ul||qo(t,l,y,a,R,_,c))?(D||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=y):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Vi(e,t),c=t.memoizedProps,D=Ql(l,c),i.props=D,q=t.pendingProps,R=i.context,_=l.contextType,y=ra,typeof _=="object"&&_!==null&&(y=Fe(_)),f=l.getDerivedStateFromProps,(_=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==q||R!==y)&&Yo(t,i,a,y),ul=!1,R=t.memoizedState,i.state=R,tn(t,a,i,s),en();var w=t.memoizedState;c!==q||R!==w||ul||e!==null&&e.dependencies!==null&&Wn(e.dependencies)?(typeof f=="function"&&(fr(t,l,f,a),w=t.memoizedState),(D=ul||qo(t,l,D,a,R,w,y)||e!==null&&e.dependencies!==null&&Wn(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,w,y),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,w,y)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=w),i.props=a,i.state=w,i.context=y,a=D):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,ps(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)):Ie(e,t,l,s),t.memoizedState=i.state,e=t.child):e=Kt(e,t,s),e}function ld(e,t,l,a){return Ll(),t.flags|=256,Ie(e,t,l,a),t.child}var hr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yr(e){return{baseLanes:e,cachePool:Qu()}}function gr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=yt),e}function ad(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=ze)?(e=ff(e,Ct),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sl!==null?{id:wt,overflow:Ot}:null,retryLane:536870912,hydrationErrors:null},l=Du(e),l.return=t,t.child=l,We=t,ze=null)):e=null,e===null)throw rl(t);return tc(e)?t.lanes=32:t.lanes=536870912,null}var f=a.children;return a=a.fallback,s?(ml(),s=t.mode,f=vs({mode:"hidden",children:f},s),a=Dl(a,s,l,null),f.return=t,a.return=t,f.sibling=a,t.child=f,a=t.child,a.memoizedState=yr(l),a.childLanes=gr(e,c,l),t.memoizedState=hr,rn(null,a)):(fl(t),br(t,f))}var y=e.memoizedState;if(y!==null&&(f=y.dehydrated,f!==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(),f=a.fallback,s=t.mode,a=vs({mode:"visible",children:a.children},s),f=Dl(f,s,l,null),f.flags|=2,a.return=t,f.return=t,a.sibling=f,t.child=a,Gl(t,e.child,null,l),a=t.child,a.memoizedState=yr(l),a.childLanes=gr(e,c,l),t.memoizedState=hr,t=rn(null,a));else if(fl(t),tc(f)){if(c=f.nextSibling&&f.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(Ve||da(e,t,l,!1),c=(l&e.childLanes)!==0,Ve||c){if(c=Me,c!==null&&(a=Gc(c,l),a!==0&&a!==y.retryLane))throw y.retryLane=a,Ol(e,a),ut(c,e,a),pr;ec(f)||Ts(),t=jr(e,t,l)}else ec(f)?(t.flags|=192,t.child=e.child,t=null):(e=y.treeContext,ze=_t(f.nextSibling),We=t,be=!0,il=null,Ct=!1,e!==null&&Uu(t,e),t=br(t,a.children),t.flags|=4096);return t}return s?(ml(),f=a.fallback,s=t.mode,y=e.child,_=y.sibling,a=Yt(y,{mode:"hidden",children:a.children}),a.subtreeFlags=y.subtreeFlags&65011712,_!==null?f=Yt(_,f):(f=Dl(f,s,l,null),f.flags|=2),f.return=t,a.return=t,a.sibling=f,t.child=a,rn(null,a),a=t.child,f=e.child.memoizedState,f===null?f=yr(l):(s=f.cachePool,s!==null?(y=Ye._currentValue,s=s.parent!==y?{parent:y,pool:y}:s):s=Qu(),f={baseLanes:f.baseLanes|l,cachePool:s}),a.memoizedState=f,a.childLanes=gr(e,c,l),t.memoizedState=hr,rn(e.child,a)):(fl(t),l=e.child,e=l.sibling,l=Yt(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=vs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vs(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 nd(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 sd(e,t,l){var a=t.pendingProps,s=a.revealOrder,i=a.tail;a=a.children;var c=He.current,f=(c&2)!==0;if(f?(c=c&1|2,t.flags|=128):c&=1,L(He,c),Ie(e,t,a,l),a=be?Ka:0,!f&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nd(e,l,t);else if(e.tag===19)nd(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 Kt(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),vl|=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=Yt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Yt(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 Lx(e,t,l){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),cl(t,Ye,e.memoizedState.cache),Ll();break;case 27:case 5:za(t);break;case 4:Ze(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?ad(e,t,l):(fl(t),e=Kt(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 sd(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),L(He,He.current),a)break;return null;case 22:return t.lanes=0,Fo(e,t,l,t.pendingProps);case 24:cl(t,Ye,e.memoizedState.cache)}return Kt(e,t,l)}function id(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ve=!0;else{if(!Nr(e,l)&&(t.flags&128)===0)return Ve=!1,Lx(e,t,l);Ve=(e.flags&131072)!==0}else Ve=!1,be&&(t.flags&1048576)!==0&&Bu(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=Ql(e,a),t.tag=1,t=td(null,t,e,a,l)):(t.tag=0,t=vr(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===K){t.tag=11,t=Jo(null,t,e,a,l);break e}else if(s===le){t.tag=14,t=$o(null,t,e,a,l);break e}}throw t=J(e)||e,Error(o(306,t,""))}}return t;case 0:return vr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=Ql(a,t.pendingProps),td(e,t,a,s,l);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,Vi(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=ld(e,t,a,l);break e}else if(a!==s){s=Nt(Error(o(424)),t),Ja(s),t=ld(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(ze=_t(e.firstChild),We=t,be=!0,il=null,Ct=!0,l=Wu(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ll(),a===s){t=Kt(e,t,l);break e}Ie(e,t,a,l)}t=t.child}return t;case 26:return ps(e,t),e===null?(l=yf(t.type,null,t.pendingProps,null))?t.memoizedState=l:be||(l=t.type,e=t.pendingProps,a=zs(te.current).createElement(l),a[$e]=t,a[at]=e,Pe(a,l,e),Ke(a),t.stateNode=a):t.memoizedState=yf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return za(t),e===null&&be&&(a=t.stateNode=pf(t.type,t.pendingProps,te.current),We=t,Ct=!0,s=ze,jl(t.type)?(lc=s,ze=_t(a.firstChild)):ze=s),Ie(e,t,t.pendingProps.children,l),ps(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&be&&((s=a=ze)&&(a=fp(a,t.type,t.pendingProps,Ct),a!==null?(t.stateNode=a,We=t,ze=_t(a.firstChild),Ct=!1,s=!0):s=!1),s||rl(t)),za(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,Ax,null,null,l),Sn._currentValue=s),ps(e,t),Ie(e,t,a,l),t.child;case 6:return e===null&&be&&((e=l=ze)&&(l=mp(l,t.pendingProps,Ct),l!==null?(t.stateNode=l,We=t,ze=null,e=!0):e=!1),e||rl(t)),null;case 13:return ad(e,t,l);case 4:return Ze(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Gl(t,null,a,l):Ie(e,t,a,l),t.child;case 11:return Jo(e,t,t.type,t.pendingProps,l);case 7:return Ie(e,t,t.pendingProps,l),t.child;case 8:return Ie(e,t,t.pendingProps.children,l),t.child;case 12:return Ie(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,cl(t,t.type,a.value),Ie(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,Ul(t),s=Fe(s),a=a(s),t.flags|=1,Ie(e,t,a,l),t.child;case 14:return $o(e,t,t.type,t.pendingProps,l);case 15:return Wo(e,t,t.type,t.pendingProps,l);case 19:return sd(e,t,l);case 31:return Dx(e,t,l);case 22:return Fo(e,t,l,t.pendingProps);case 24:return Ul(t),a=Fe(Ye),e===null?(s=qi(),s===null&&(s=Me,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&&(Vi(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))),Ie(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Jt(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(wd())e.flags|=8192;else throw Yl=es,Yi}else e.flags&=-16777217}function rd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Nf(t))if(wd())e.flags|=8192;else throw Yl=es,Yi}function hs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Hc():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 we(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 Bx(e,t,l){var a=t.pendingProps;switch(zi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return we(t),null;case 1:return we(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)?Jt(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Oi())),we(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(Jt(t),i!==null?(we(t),rd(t,i)):(we(t),Er(t,s,null,a,l))):i?i!==e.memoizedState?(Jt(t),we(t),rd(t,i)):(we(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Jt(t),we(t),Er(t,s,e,a,l)),null;case 27:if(_n(t),l=te.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Jt(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return we(t),null}e=Y.current,oa(t)?Hu(t):(e=pf(s,a,l),t.stateNode=e,Jt(t))}return we(t),null;case 5:if(_n(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Jt(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return we(t),null}if(i=Y.current,oa(t))Hu(t);else{var c=zs(te.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[$e]=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(Pe(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&&Jt(t)}}return we(t),Er(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Jt(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=te.current,oa(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=We,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[$e]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||af(e.nodeValue,l)),e||rl(t,!0)}else e=zs(e).createTextNode(a),e[$e]=t,t.stateNode=e}return we(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[$e]=t}else Ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;we(t),e=!1}else l=Oi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(vt(t),t):(vt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return we(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[$e]=t}else Ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;we(t),s=!1}else s=Oi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(vt(t),t):(vt(t),null)}return vt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,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),hs(t,t.updateQueue),we(t),null);case 4:return Ue(),e===null&&Zr(t.stateNode.containerInfo),we(t),null;case 10:return Qt(t.type),we(t),null;case 19:if(T(He),a=t.memoizedState,a===null)return we(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,hs(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Ou(l,e),l=l.sibling;return L(He,He.current&1|2),be&&Gt(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,hs(t,e),cn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!be)return we(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,L(He,s?l&1|2:l&1),be&&Gt(t,a.treeForkCount),e):(we(t),null);case 22:case 23:return vt(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&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),l=t.updateQueue,l!==null&&hs(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&&T(Hl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Qt(Ye),we(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Ux(e,t){switch(zi(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(vt(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(vt(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 T(He),null;case 4:return Ue(),null;case 10:return Qt(t.type),null;case 22:case 23:return vt(t),Ki(),e!==null&&T(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 cd(e,t){switch(zi(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&&vt(t);break;case 13:vt(t);break;case 19:T(He);break;case 10:Qt(t.type);break;case 22:case 23:vt(t),Ki(),e!==null&&T(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(f){Ae(t,t.return,f)}}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,f=c.destroy;if(f!==void 0){c.destroy=void 0,s=t;var y=l,_=f;try{_()}catch(D){Ae(s,y,D)}}}a=a.next}while(a!==i)}}catch(D){Ae(t,t.return,D)}}function ud(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Iu(t,l)}catch(a){Ae(e,e.return,a)}}}function od(e,t,l){l.props=Ql(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 Dt(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 dd(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;ip(a,e.type,l,t),a[at]=t}catch(s){Ae(e,e.return,s)}}function fd(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||fd(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=Ht));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 md(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Pe(t,a,l),t[$e]=e,t[at]=l}catch(i){Ae(e,e.return,i)}}var $t=!1,Qe=!1,_r=!1,xd=typeof WeakSet=="function"?WeakSet:Set,Je=null;function Hx(e,t){if(e=e.containerInfo,$r=Hs,e=Tu(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,f=-1,y=-1,_=0,D=0,q=e,R=null;t:for(;;){for(var w;q!==l||s!==0&&q.nodeType!==3||(f=c+s),q!==i||a!==0&&q.nodeType!==3||(y=c+a),q.nodeType===3&&(c+=q.nodeValue.length),(w=q.firstChild)!==null;)R=q,q=w;for(;;){if(q===e)break t;if(R===l&&++_===s&&(f=c),R===i&&++D===a&&(y=c),(w=q.nextSibling)!==null)break;q=R,R=q.parentNode}q=w}l=f===-1||y===-1?null:{start:f,end:y}}else l=null}l=l||{start:0,end:0}}else l=null;for(Wr={focusedElem:e,selectionRange:l},Hs=!1,Je=t;Je!==null;)if(t=Je,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Je=e;else for(;Je!==null;){switch(t=Je,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=Ql(l.type,s);e=a.getSnapshotBeforeUpdate(P,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ue){Ae(l,l.return,ue)}}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,Je=e;break}Je=t.return}}function pd(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Ft(e,l),a&4&&un(5,l);break;case 1:if(Ft(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(c){Ae(l,l.return,c)}else{var s=Ql(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){Ae(l,l.return,c)}}a&64&&ud(l),a&512&&on(l,l.return);break;case 3:if(Ft(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{Iu(e,t)}catch(c){Ae(l,l.return,c)}}break;case 27:t===null&&a&4&&md(l);case 26:case 5:Ft(e,l),t===null&&a&4&&dd(l),a&512&&on(l,l.return);break;case 12:Ft(e,l);break;case 31:Ft(e,l),a&4&&yd(e,l);break;case 13:Ft(e,l),a&4&&gd(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Jx.bind(null,l),xp(e,l))));break;case 22:if(a=l.memoizedState!==null||$t,!a){t=t!==null&&t.memoizedState!==null||Qe,s=$t;var i=Qe;$t=a,(Qe=t)&&!i?It(e,l,(l.subtreeFlags&8772)!==0):Ft(e,l),$t=s,Qe=i}break;case 30:break;default:Ft(e,l)}}function vd(e){var t=e.alternate;t!==null&&(e.alternate=null,vd(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 Oe=null,st=!1;function Wt(e,t,l){for(l=l.child;l!==null;)hd(e,t,l),l=l.sibling}function hd(e,t,l){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(wa,l)}catch{}switch(l.tag){case 26:Qe||Dt(l,t),Wt(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Qe||Dt(l,t);var a=Oe,s=st;jl(l.type)&&(Oe=l.stateNode,st=!1),Wt(e,t,l),gn(l.stateNode),Oe=a,st=s;break;case 5:Qe||Dt(l,t);case 6:if(a=Oe,s=st,Oe=null,Wt(e,t,l),Oe=a,st=s,Oe!==null)if(st)try{(Oe.nodeType===9?Oe.body:Oe.nodeName==="HTML"?Oe.ownerDocument.body:Oe).removeChild(l.stateNode)}catch(i){Ae(l,t,i)}else try{Oe.removeChild(l.stateNode)}catch(i){Ae(l,t,i)}break;case 18:Oe!==null&&(st?(e=Oe,of(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Ma(e)):of(Oe,l.stateNode));break;case 4:a=Oe,s=st,Oe=l.stateNode.containerInfo,st=!0,Wt(e,t,l),Oe=a,st=s;break;case 0:case 11:case 14:case 15:xl(2,l,t),Qe||xl(4,l,t),Wt(e,t,l);break;case 1:Qe||(Dt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&od(l,t,a)),Wt(e,t,l);break;case 21:Wt(e,t,l);break;case 22:Qe=(a=Qe)||l.memoizedState!==null,Wt(e,t,l),Qe=a;break;default:Wt(e,t,l)}}function yd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ma(e)}catch(l){Ae(t,t.return,l)}}}function gd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ma(e)}catch(l){Ae(t,t.return,l)}}function qx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xd),t;default:throw Error(o(435,e.tag))}}function gs(e,t){var l=qx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=$x.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,f=c;e:for(;f!==null;){switch(f.tag){case 27:if(jl(f.type)){Oe=f.stateNode,st=!1;break e}break;case 5:Oe=f.stateNode,st=!1;break e;case 3:case 4:Oe=f.stateNode.containerInfo,st=!0;break e}f=f.return}if(Oe===null)throw Error(o(160));hd(i,c,s),Oe=null,st=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bd(t,e),t=t.sibling}var Mt=null;function bd(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&&(Qe||l===null||Dt(l,l.return)),a&64&&$t&&(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=Mt;if(it(t,e),rt(e),a&512&&(Qe||l===null||Dt(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[$e]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),Pe(i,a,l),i[$e]=e,Ke(i),a=i;break e;case"link":var c=jf("link","href",s).get(a+(l.href||""));if(c){for(var f=0;f<c.length;f++)if(i=c[f],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(f,1);break t}}i=s.createElement(a),Pe(i,a,l),s.head.appendChild(i);break;case"meta":if(c=jf("meta","content",s).get(a+(l.content||""))){for(f=0;f<c.length;f++)if(i=c[f],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(f,1);break t}}i=s.createElement(a),Pe(i,a,l),s.head.appendChild(i);break;default:throw Error(o(468,a))}i[$e]=e,Ke(i),a=i}e.stateNode=a}else Sf(s,e.type,e.stateNode);else e.stateNode=bf(s,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Sf(s,e.type,e.stateNode):bf(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&&(Qe||l===null||Dt(l,l.return)),l!==null&&a&4&&Tr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(it(t,e),rt(e),a&512&&(Qe||l===null||Dt(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(Ds=null,s=Mt,Mt=ws(t.containerInfo),it(t,e),Mt=s,rt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Ma(t.containerInfo)}catch(P){Ae(e,e.return,P)}_r&&(_r=!1,jd(e));break;case 4:a=Mt,Mt=ws(e.stateNode.containerInfo),it(t,e),rt(e),Mt=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 y=l!==null&&l.memoizedState!==null,_=$t,D=Qe;if($t=_||s,Qe=D||y,it(t,e),Qe=D,$t=_,rt(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||y||$t||Qe||Xl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){y=l=t;try{if(i=y.stateNode,s)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{f=y.stateNode;var q=y.memoizedProps.style,R=q!=null&&q.hasOwnProperty("display")?q.display:null;f.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(P){Ae(y,y.return,P)}}}else if(t.tag===6){if(l===null){y=t;try{y.stateNode.nodeValue=s?"":y.memoizedProps}catch(P){Ae(y,y.return,P)}}}else if(t.tag===18){if(l===null){y=t;try{var w=y.stateNode;s?df(w,!0):df(y.stateNode,!1)}catch(P){Ae(y,y.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(fd(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 f=Cr(e);ys(e,f,c);break;case 3:case 4:var y=l.stateNode.containerInfo,_=Cr(e);Ar(e,_,y);break;default:throw Error(o(161))}}catch(D){Ae(e,e.return,D)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ft(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pd(e,t.alternate,t),t=t.sibling}function Xl(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),Xl(t);break;case 1:Dt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&od(t,t.return,l),Xl(t);break;case 27:gn(t.stateNode);case 26:case 5:Dt(t,t.return),Xl(t);break;case 22:t.memoizedState===null&&Xl(t);break;case 30:Xl(t);break;default:Xl(t)}e=e.sibling}}function It(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:It(s,i,l),un(4,i);break;case 1:if(It(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 f=a.stateNode;try{var y=s.shared.hiddenCallbacks;if(y!==null)for(s.shared.hiddenCallbacks=null,s=0;s<y.length;s++)Fu(y[s],f)}catch(_){Ae(a,a.return,_)}}l&&c&64&&ud(i),on(i,i.return);break;case 27:md(i);case 26:case 5:It(s,i,l),l&&a===null&&c&4&&dd(i),on(i,i.return);break;case 12:It(s,i,l);break;case 31:It(s,i,l),l&&c&4&&yd(s,i);break;case 13:It(s,i,l),l&&c&4&&gd(s,i);break;case 22:i.memoizedState===null&&It(s,i,l),on(i,i.return);break;case 30:break;default:It(s,i,l)}t=t.sibling}}function kr(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 Rr(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 zt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sd(e,t,l,a),t=t.sibling}function Sd(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:zt(e,t,l,a),s&2048&&un(9,t);break;case 1:zt(e,t,l,a);break;case 3:zt(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){zt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,f=i.onPostCommit;typeof f=="function"&&f(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(y){Ae(t,t.return,y)}}else zt(e,t,l,a);break;case 31:zt(e,t,l,a);break;case 13:zt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?zt(e,t,l,a):dn(e,t):i._visibility&2?zt(e,t,l,a):(i._visibility|=2,ba(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&kr(c,t);break;case 24:zt(e,t,l,a),s&2048&&Rr(t.alternate,t);break;default:zt(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,f=l,y=a,_=c.flags;switch(c.tag){case 0:case 11:case 15:ba(i,c,f,y,s),un(8,c);break;case 23:break;case 22:var D=c.stateNode;c.memoizedState!==null?D._visibility&2?ba(i,c,f,y,s):dn(i,c):(D._visibility|=2,ba(i,c,f,y,s)),s&&_&2048&&kr(c.alternate,c);break;case 24:ba(i,c,f,y,s),s&&_&2048&&Rr(c.alternate,c);break;default:ba(i,c,f,y,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&&kr(a.alternate,a);break;case 24:dn(l,a),s&2048&&Rr(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;)Nd(e,t,l),e=e.sibling}function Nd(e,t,l){switch(e.tag){case 26:ja(e,t,l),e.flags&fn&&e.memoizedState!==null&&Cp(l,Mt,e.memoizedState,e.memoizedProps);break;case 5:ja(e,t,l);break;case 3:case 4:var a=Mt;Mt=ws(e.stateNode.containerInfo),ja(e,t,l),Mt=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 Ed(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];Je=a,Cd(a,e)}Ed(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Td(e),e=e.sibling}function Td(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];Je=a,Cd(a,e)}Ed(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 Cd(e,t){for(;Je!==null;){var l=Je;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,Je=a;else e:for(l=e;Je!==null;){a=Je;var s=a.sibling,i=a.return;if(vd(a),a===l){Je=null;break e}if(s!==null){s.return=i,Je=s;break e}Je=i}}}var Yx={getCacheForType:function(e){var t=Fe(Ye),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Fe(Ye).controller.signal}},Gx=typeof WeakMap=="function"?WeakMap:Map,Te=0,Me=null,pe=null,he=0,Ce=0,ht=null,pl=!1,Sa=!1,Mr=!1,Pt=0,Le=0,vl=0,Zl=0,zr=0,yt=0,Na=0,xn=null,ct=null,wr=!1,js=0,Ad=0,Ss=1/0,Ns=null,hl=null,Xe=0,yl=null,Ea=null,el=0,Or=0,Dr=null,_d=null,pn=0,Lr=null;function gt(){return(Te&2)!==0&&he!==0?he&-he:M.T!==null?Gr():Vc()}function kd(){if(yt===0)if((he&536870912)===0||be){var e=Mn;Mn<<=1,(Mn&3932160)===0&&(Mn=262144),yt=e}else yt=536870912;return e=pt.current,e!==null&&(e.flags|=32),yt}function ut(e,t,l){(e===Me&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Ta(e,0),gl(e,he,yt,!1)),Da(e,l),((Te&2)===0||e!==Me)&&(e===Me&&((Te&2)===0&&(Zl|=l),Le===4&&gl(e,he,yt,!1)),Lt(e))}function Rd(e,t,l){if((Te&6)!==0)throw Error(o(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Oa(e,t),s=a?Xx(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&&!Vx(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 f=e;s=xn;var y=f.current.memoizedState.isDehydrated;if(y&&(Ta(f,c).flags|=256),c=Ur(f,c,!1),c!==2){if(Mr&&!y){f.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,!pl);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,!pl),wn(a,0,!0)!==0)break e;el=t,a.timeoutHandle=cf(Md.bind(null,a,l,ct,Ns,wr,t,yt,Zl,Na,pl,i,"Throttled",-0,0),s);break e}Md(a,l,ct,Ns,wr,t,yt,Zl,Na,pl,i,null,-0,0)}}break}while(!0);Lt(e)}function Md(e,t,l,a,s,i,c,f,y,_,D,q,R,w){if(e.timeoutHandle=-1,q=t.subtreeFlags,q&8192||(q&16785408)===16785408){q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ht},Nd(t,i,q);var P=(i&62914560)===i?js-ot():(i&4194048)===i?Ad-ot():0;if(P=Ap(q,P),P!==null){el=i,e.cancelPendingCommit=P(Hd.bind(null,e,t,i,l,a,s,c,f,y,D,q,null,R,w)),gl(e,i,c,!_);return}}Hd(e,t,i,l,a,s,c,f,y)}function Vx(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&=~zr,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&&qc(e,l,t)}function Es(){return(Te&6)===0?(vn(0),!1):!0}function Br(){if(pe!==null){if(Ce===0)var e=pe.return;else e=pe,Vt=Bl=null,Pi(e),pa=null,Fa=0,e=pe;for(;e!==null;)cd(e.alternate,e),e=e.return;pe=null}}function Ta(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,up(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),el=0,Br(),Me=e,pe=l=Yt(e.current,null),he=t,Ce=0,ht=null,pl=!1,Sa=Oa(e,t),Mr=!1,Na=yt=zr=Zl=vl=Le=0,ct=xn=null,wr=!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 Pt=t,Xn(),l}function zd(e,t){de=null,M.H=sn,t===xa||t===Pn?(t=Ku(),Ce=3):t===Yi?(t=Ku(),Ce=4):Ce=t===pr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ht=t,pe===null&&(Le=1,ms(e,Nt(t,e.current)))}function wd(){var e=pt.current;return e===null?!0:(he&4194048)===he?At===null:(he&62914560)===he||(he&536870912)!==0?e===At:!1}function Od(){var e=M.H;return M.H=sn,e===null?sn:e}function Dd(){var e=M.A;return M.A=Yx,e}function Ts(){Le=4,pl||(he&4194048)!==he&&pt.current!==null||(Sa=!0),(vl&134217727)===0&&(Zl&134217727)===0||Me===null||gl(Me,he,yt,!1)}function Ur(e,t,l){var a=Te;Te|=2;var s=Od(),i=Dd();(Me!==e||he!==t)&&(Ns=null,Ta(e,t)),t=!1;var c=Le;e:do try{if(Ce!==0&&pe!==null){var f=pe,y=ht;switch(Ce){case 8:Br(),c=6;break e;case 3:case 2:case 9:case 6:pt.current===null&&(t=!0);var _=Ce;if(Ce=0,ht=null,Ca(e,f,y,_),l&&Sa){c=0;break e}break;default:_=Ce,Ce=0,ht=null,Ca(e,f,y,_)}}Qx(),c=Le;break}catch(D){zd(e,D)}while(!0);return t&&e.shellSuspendCounter++,Vt=Bl=null,Te=a,M.H=s,M.A=i,pe===null&&(Me=null,he=0,Xn()),c}function Qx(){for(;pe!==null;)Ld(pe)}function Xx(e,t){var l=Te;Te|=2;var a=Od(),s=Dd();Me!==e||he!==t?(Ns=null,Ss=ot()+500,Ta(e,t)):Sa=Oa(e,t);e:do try{if(Ce!==0&&pe!==null){t=pe;var i=ht;t:switch(Ce){case 1:Ce=0,ht=null,Ca(e,t,i,1);break;case 2:case 9:if(Xu(i)){Ce=0,ht=null,Bd(t);break}t=function(){Ce!==2&&Ce!==9||Me!==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:Xu(i)?(Ce=0,ht=null,Bd(t)):(Ce=0,ht=null,Ca(e,t,i,7));break;case 5:var c=null;switch(pe.tag){case 26:c=pe.memoizedState;case 5:case 27:var f=pe;if(c?Nf(c):f.stateNode.complete){Ce=0,ht=null;var y=f.sibling;if(y!==null)pe=y;else{var _=f.return;_!==null?(pe=_,Cs(_)):pe=null}break t}}Ce=0,ht=null,Ca(e,t,i,5);break;case 6:Ce=0,ht=null,Ca(e,t,i,6);break;case 8:Br(),Le=6;break e;default:throw Error(o(462))}}Zx();break}catch(D){zd(e,D)}while(!0);return Vt=Bl=null,M.H=a,M.A=s,Te=l,pe!==null?0:(Me=null,he=0,Xn(),Le)}function Zx(){for(;pe!==null&&!pm();)Ld(pe)}function Ld(e){var t=id(e.alternate,e,Pt);e.memoizedProps=e.pendingProps,t===null?Cs(e):pe=t}function Bd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=ed(l,t,t.pendingProps,t.type,void 0,he);break;case 11:t=ed(l,t,t.pendingProps,t.type.render,t.ref,he);break;case 5:Pi(t);default:cd(l,t),t=pe=Ou(t,Pt),t=id(l,t,Pt)}e.memoizedProps=e.pendingProps,t===null?Cs(e):pe=t}function Ca(e,t,l,a){Vt=Bl=null,Pi(t),pa=null,Fa=0;var s=t.return;try{if(Ox(e,s,t,l,he)){Le=1,ms(e,Nt(l,e.current)),pe=null;return}}catch(i){if(s!==null)throw pe=s,i;Le=1,ms(e,Nt(l,e.current)),pe=null;return}t.flags&32768?(be||a===1?e=!0:Sa||(he&536870912)!==0?e=!1:(pl=e=!0,(a===2||a===9||a===3||a===6)&&(a=pt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Ud(t,e)):Cs(t)}function Cs(e){var t=e;do{if((t.flags&32768)!==0){Ud(t,pl);return}e=t.return;var l=Bx(t.alternate,t,Pt);if(l!==null){pe=l;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);Le===0&&(Le=5)}function Ud(e,t){do{var l=Ux(e.alternate,e);if(l!==null){l.flags&=32767,pe=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){pe=e;return}pe=e=l}while(e!==null);Le=6,pe=null}function Hd(e,t,l,a,s,i,c,f,y){e.cancelPendingCommit=null;do As();while(Xe!==0);if((Te&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,Tm(e,l,i,c,f,y),e===Me&&(pe=Me=null,he=0),Ea=t,yl=e,el=l,Or=i,Dr=s,_d=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wx(kn,function(){return Qd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null,s=z.p,z.p=2,c=Te,Te|=4;try{Hx(e,t,l)}finally{Te=c,z.p=s,M.T=a}}Xe=1,qd(),Yd(),Gd()}}function qd(){if(Xe===1){Xe=0;var e=yl,t=Ea,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null;var a=z.p;z.p=2;var s=Te;Te|=4;try{bd(t,e);var i=Wr,c=Tu(e.containerInfo),f=i.focusedElem,y=i.selectionRange;if(c!==f&&f&&f.ownerDocument&&Eu(f.ownerDocument.documentElement,f)){if(y!==null&&ji(f)){var _=y.start,D=y.end;if(D===void 0&&(D=_),"selectionStart"in f)f.selectionStart=_,f.selectionEnd=Math.min(D,f.value.length);else{var q=f.ownerDocument||document,R=q&&q.defaultView||window;if(R.getSelection){var w=R.getSelection(),P=f.textContent.length,ue=Math.min(y.start,P),Re=y.end===void 0?ue:Math.min(y.end,P);!w.extend&&ue>Re&&(c=Re,Re=ue,ue=c);var C=Nu(f,ue),E=Nu(f,Re);if(C&&E&&(w.rangeCount!==1||w.anchorNode!==C.node||w.anchorOffset!==C.offset||w.focusNode!==E.node||w.focusOffset!==E.offset)){var A=q.createRange();A.setStart(C.node,C.offset),w.removeAllRanges(),ue>Re?(w.addRange(A),w.extend(E.node,E.offset)):(A.setEnd(E.node,E.offset),w.addRange(A))}}}}for(q=[],w=f;w=w.parentNode;)w.nodeType===1&&q.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<q.length;f++){var B=q[f];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}Hs=!!$r,Wr=$r=null}finally{Te=s,z.p=a,M.T=l}}e.current=t,Xe=2}}function Yd(){if(Xe===2){Xe=0;var e=yl,t=Ea,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=M.T,M.T=null;var a=z.p;z.p=2;var s=Te;Te|=4;try{pd(e,t.alternate,t)}finally{Te=s,z.p=a,M.T=l}}Xe=3}}function Gd(){if(Xe===4||Xe===3){Xe=0,vm();var e=yl,t=Ea,l=el,a=_d;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Xe=5:(Xe=0,Ea=yl=null,Vd(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(hl=null),li(l),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(wa,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=M.T,s=z.p,z.p=2,M.T=null;try{for(var i=e.onRecoverableError,c=0;c<a.length;c++){var f=a[c];i(f.value,{componentStack:f.stack})}}finally{M.T=t,z.p=s}}(el&3)!==0&&As(),Lt(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===Lr?pn++:(pn=0,Lr=e):pn=0,vn(0)}}function Vd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$a(t)))}function As(){return qd(),Yd(),Gd(),Qd()}function Qd(){if(Xe!==5)return!1;var e=yl,t=Or;Or=0;var l=li(el),a=M.T,s=z.p;try{z.p=32>l?32:l,M.T=null,l=Dr,Dr=null;var i=yl,c=el;if(Xe=0,Ea=yl=null,el=0,(Te&6)!==0)throw Error(o(331));var f=Te;if(Te|=4,Td(i.current),Sd(i,i.current,c,l),Te=f,vn(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(wa,i)}catch{}return!0}finally{z.p=s,M.T=a,Vd(e,t)}}function Xd(e,t,l){t=Nt(l,t),t=xr(e.stateNode,t,2),e=dl(e,t,2),e!==null&&(Da(e,2),Lt(e))}function Ae(e,t,l){if(e.tag===3)Xd(e,e,l);else for(;t!==null;){if(t.tag===3){Xd(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(hl===null||!hl.has(a))){e=Nt(l,e),l=Zo(2),a=dl(t,l,2),a!==null&&(Ko(l,a,t,e),Da(a,2),Lt(a));break}}t=t.return}}function Hr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Gx;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)||(Mr=!0,s.add(l),e=Kx.bind(null,e,t,l),t.then(e,e))}function Kx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Me===e&&(he&l)===l&&(Le===4||Le===3&&(he&62914560)===he&&300>ot()-js?(Te&2)===0&&Ta(e,0):zr|=l,Na===he&&(Na=0)),Lt(e)}function Zd(e,t){t===0&&(t=Hc()),e=Ol(e,t),e!==null&&(Da(e,t),Lt(e))}function Jx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Zd(e,l)}function $x(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),Zd(e,l)}function Wx(e,t){return Is(e,t)}var _s=null,Aa=null,qr=!1,ks=!1,Yr=!1,bl=0;function Lt(e){e!==Aa&&e.next===null&&(Aa===null?_s=Aa=e:Aa=Aa.next=e),ks=!0,qr||(qr=!0,Ix())}function vn(e,t){if(!Yr&&ks){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,f=a.pingedLanes;i=(1<<31-ft(42|e)+1)-1,i&=s&~(c&~f),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Wd(a,i))}else i=he,i=wn(a,a===Me?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Oa(a,i)||(l=!0,Wd(a,i));a=a.next}while(l);Yr=!1}}function Fx(){Kd()}function Kd(){ks=qr=!1;var e=0;bl!==0&&cp()&&(e=bl);for(var t=ot(),l=null,a=_s;a!==null;){var s=a.next,i=Jd(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)&&(ks=!0)),a=s}Xe!==0&&Xe!==5||vn(e),bl!==0&&(bl=0)}function Jd(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-ft(i),f=1<<c,y=s[c];y===-1?((f&l)===0||(f&a)!==0)&&(s[c]=Em(f,t)):y<=t&&(e.expiredLanes|=f),i&=~f}if(t=Me,l=he,l=wn(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||Oa(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ps(a),li(l)){case 2:case 8:l=Bc;break;case 32:l=kn;break;case 268435456:l=Uc;break;default:l=kn}return a=$d.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 $d(e,t){if(Xe!==0&&Xe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(As()&&e.callbackNode!==l)return null;var a=he;return a=wn(e,e===Me?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Rd(e,a,t),Jd(e,ot()),e.callbackNode!=null&&e.callbackNode===l?$d.bind(null,e):null)}function Wd(e,t){if(As())return null;Rd(e,t,!0)}function Ix(){op(function(){(Te&6)!==0?Is(Lc,Fx):Kd()})}function Gr(){if(bl===0){var e=fa;e===0&&(e=Rn,Rn<<=1,(Rn&261888)===0&&(Rn=256)),bl=e}return bl}function Fd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Bn(""+e)}function Id(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 Px(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var i=Fd((s[at]||null).action),c=a.submitter;c&&(t=(t=c[at]||null)?Fd(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var f=new Yn("action","action",null,a,s);e.push({event:f,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(bl!==0){var y=c?Id(s,c):new FormData(s);cr(l,{pending:!0,data:y,method:s.method,action:i},null,y)}}else typeof i=="function"&&(f.preventDefault(),y=c?Id(s,c):new FormData(s),cr(l,{pending:!0,data:y,method:s.method,action:i},i,y))},currentTarget:s}]})}}for(var Vr=0;Vr<Ti.length;Vr++){var Qr=Ti[Vr],ep=Qr.toLowerCase(),tp=Qr[0].toUpperCase()+Qr.slice(1);Rt(ep,"on"+tp)}Rt(_u,"onAnimationEnd"),Rt(ku,"onAnimationIteration"),Rt(Ru,"onAnimationStart"),Rt("dblclick","onDoubleClick"),Rt("focusin","onFocus"),Rt("focusout","onBlur"),Rt(hx,"onTransitionRun"),Rt(yx,"onTransitionStart"),Rt(gx,"onTransitionCancel"),Rt(Mu,"onTransitionEnd"),Il("onMouseEnter",["mouseout","mouseover"]),Il("onMouseLeave",["mouseout","mouseover"]),Il("onPointerEnter",["pointerout","pointerover"]),Il("onPointerLeave",["pointerout","pointerover"]),Rl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Rl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Rl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Rl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Rl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Rl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hn="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(" "),lp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hn));function Pd(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 f=a[c],y=f.instance,_=f.currentTarget;if(f=f.listener,y!==i&&s.isPropagationStopped())break e;i=f,s.currentTarget=_;try{i(s)}catch(D){Qn(D)}s.currentTarget=null,i=y}else for(c=0;c<a.length;c++){if(f=a[c],y=f.instance,_=f.currentTarget,f=f.listener,y!==i&&s.isPropagationStopped())break e;i=f,s.currentTarget=_;try{i(s)}catch(D){Qn(D)}s.currentTarget=null,i=y}}}}function ve(e,t){var l=t[ai];l===void 0&&(l=t[ai]=new Set);var a=e+"__bubble";l.has(a)||(ef(t,e,2,!1),l.add(a))}function Xr(e,t,l){var a=0;t&&(a|=4),ef(l,e,a,t)}var Rs="_reactListening"+Math.random().toString(36).slice(2);function Zr(e){if(!e[Rs]){e[Rs]=!0,Zc.forEach(function(l){l!=="selectionchange"&&(lp.has(l)||Xr(l,!1,e),Xr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Rs]||(t[Rs]=!0,Xr("selectionchange",!1,t))}}function ef(e,t,l,a){switch(Rf(t)){case 2:var s=Rp;break;case 8:s=Mp;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 f=a.stateNode.containerInfo;if(f===s)break;if(c===4)for(c=a.return;c!==null;){var y=c.tag;if((y===3||y===4)&&c.stateNode.containerInfo===s)return;c=c.return}for(;f!==null;){if(c=$l(f),c===null)return;if(y=c.tag,y===5||y===6||y===26||y===27){a=i=c;continue e}f=f.parentNode}}a=a.return}nu(function(){var _=i,D=oi(l),q=[];e:{var R=zu.get(e);if(R!==void 0){var w=Yn,P=e;switch(e){case"keypress":if(Hn(l)===0)break e;case"keydown":case"keyup":w=$m;break;case"focusin":P="focus",w=vi;break;case"focusout":P="blur",w=vi;break;case"beforeblur":case"afterblur":w=vi;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":w=ru;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=Bm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=Im;break;case _u:case ku:case Ru:w=qm;break;case Mu:w=ex;break;case"scroll":case"scrollend":w=Dm;break;case"wheel":w=lx;break;case"copy":case"cut":case"paste":w=Gm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=uu;break;case"toggle":case"beforetoggle":w=nx}var ue=(t&4)!==0,Re=!ue&&(e==="scroll"||e==="scrollend"),C=ue?R!==null?R+"Capture":null:R;ue=[];for(var E=_,A;E!==null;){var B=E;if(A=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||A===null||C===null||(B=Ua(E,C),B!=null&&ue.push(yn(E,B,A))),Re)break;E=E.return}0<ue.length&&(R=new w(R,P,null,l,D),q.push({event:R,listeners:ue}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",R&&l!==ui&&(P=l.relatedTarget||l.fromElement)&&($l(P)||P[Jl]))break e;if((w||R)&&(R=D.window===D?D:(R=D.ownerDocument)?R.defaultView||R.parentWindow:window,w?(P=l.relatedTarget||l.toElement,w=_,P=P?$l(P):null,P!==null&&(Re=h(P),ue=P.tag,P!==Re||ue!==5&&ue!==27&&ue!==6)&&(P=null)):(w=null,P=_),w!==P)){if(ue=ru,B="onMouseLeave",C="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(ue=uu,B="onPointerLeave",C="onPointerEnter",E="pointer"),Re=w==null?R:Ba(w),A=P==null?R:Ba(P),R=new ue(B,E+"leave",w,l,D),R.target=Re,R.relatedTarget=A,B=null,$l(D)===_&&(ue=new ue(C,E+"enter",P,l,D),ue.target=A,ue.relatedTarget=Re,B=ue),Re=B,w&&P)t:{for(ue=ap,C=w,E=P,A=0,B=C;B;B=ue(B))A++;B=0;for(var ie=E;ie;ie=ue(ie))B++;for(;0<A-B;)C=ue(C),A--;for(;0<B-A;)E=ue(E),B--;for(;A--;){if(C===E||E!==null&&C===E.alternate){ue=C;break t}C=ue(C),E=ue(E)}ue=null}else ue=null;w!==null&&tf(q,R,w,ue,!1),P!==null&&Re!==null&&tf(q,Re,P,ue,!0)}}e:{if(R=_?Ba(_):window,w=R.nodeName&&R.nodeName.toLowerCase(),w==="select"||w==="input"&&R.type==="file")var Ne=hu;else if(pu(R))if(yu)Ne=xx;else{Ne=fx;var ae=dx}else w=R.nodeName,!w||w.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?_&&ci(_.elementType)&&(Ne=hu):Ne=mx;if(Ne&&(Ne=Ne(e,_))){vu(q,Ne,l,D);break e}ae&&ae(e,R,_),e==="focusout"&&_&&R.type==="number"&&_.memoizedProps.value!=null&&ri(R,"number",R.value)}switch(ae=_?Ba(_):window,e){case"focusin":(pu(ae)||ae.contentEditable==="true")&&(na=ae,Si=_,Za=null);break;case"focusout":Za=Si=na=null;break;case"mousedown":Ni=!0;break;case"contextmenu":case"mouseup":case"dragend":Ni=!1,Cu(q,l,D);break;case"selectionchange":if(vx)break;case"keydown":case"keyup":Cu(q,l,D)}var fe;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?mu(e,l)&&(ye="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ye="onCompositionStart");ye&&(ou&&l.locale!=="ko"&&(aa||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&aa&&(fe=su()):(nl=D,mi="value"in nl?nl.value:nl.textContent,aa=!0)),ae=Ms(_,ye),0<ae.length&&(ye=new cu(ye,e,null,l,D),q.push({event:ye,listeners:ae}),fe?ye.data=fe:(fe=xu(l),fe!==null&&(ye.data=fe)))),(fe=ix?rx(e,l):cx(e,l))&&(ye=Ms(_,"onBeforeInput"),0<ye.length&&(ae=new cu("onBeforeInput","beforeinput",null,l,D),q.push({event:ae,listeners:ye}),ae.data=fe)),Px(q,e,_,l,D)}Pd(q,t)})}function yn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Ms(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 ap(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tf(e,t,l,a,s){for(var i=t._reactName,c=[];l!==null&&l!==a;){var f=l,y=f.alternate,_=f.stateNode;if(f=f.tag,y!==null&&y===a)break;f!==5&&f!==26&&f!==27||_===null||(y=_,s?(_=Ua(l,i),_!=null&&c.unshift(yn(l,_,y))):s||(_=Ua(l,i),_!=null&&c.push(yn(l,_,y)))),l=l.return}c.length!==0&&e.push({event:t,listeners:c})}var np=/\r\n?/g,sp=/\u0000|\uFFFD/g;function lf(e){return(typeof e=="string"?e:""+e).replace(np,`
|
|
49
|
+
`).replace(sp,"")}function af(e,t){return t=lf(t),lf(e)===t}function ke(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":Dn(e,"class",a);break;case"tabIndex":Dn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Dn(e,l,a);break;case"style":lu(e,a,i);break;case"data":if(t!=="object"){Dn(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"&&ke(e,t,"name",s.name,s,null),ke(e,t,"formEncType",s.formEncType,s,null),ke(e,t,"formMethod",s.formMethod,s,null),ke(e,t,"formTarget",s.formTarget,s,null)):(ke(e,t,"encType",s.encType,s,null),ke(e,t,"method",s.method,s,null),ke(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=Ht);break;case"onScroll":a!=null&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(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":ve("beforetoggle",e),ve("toggle",e),On(e,"popover",a);break;case"xlinkActuate":Ut(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Ut(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Ut(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Ut(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Ut(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Ut(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Ut(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Ut(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Ut(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":On(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=wm.get(l)||l,On(e,l,a))}}function Jr(e,t,l,a,s,i){switch(l){case"style":lu(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&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Ht);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kc.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,""):On(e,l,a)}}}function Pe(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var a=!1,s=!1,i;for(i in l)if(l.hasOwnProperty(i)){var 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:ke(e,t,i,c,l,null)}}s&&ke(e,t,"srcSet",l.srcSet,l,null),a&&ke(e,t,"src",l.src,l,null);return;case"input":ve("invalid",e);var f=i=c=s=null,y=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var D=l[a];if(D!=null)switch(a){case"name":s=D;break;case"type":c=D;break;case"checked":y=D;break;case"defaultChecked":_=D;break;case"value":i=D;break;case"defaultValue":f=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(o(137,t));break;default:ke(e,t,a,D,l,null)}}Ic(e,i,f,y,_,c,s,!1);return;case"select":ve("invalid",e),a=c=i=null;for(s in l)if(l.hasOwnProperty(s)&&(f=l[s],f!=null))switch(s){case"value":i=f;break;case"defaultValue":c=f;break;case"multiple":a=f;default:ke(e,t,s,f,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":ve("invalid",e),i=s=a=null;for(c in l)if(l.hasOwnProperty(c)&&(f=l[c],f!=null))switch(c){case"value":a=f;break;case"defaultValue":s=f;break;case"children":i=f;break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:ke(e,t,c,f,l,null)}eu(e,a,s,i);return;case"option":for(y in l)if(l.hasOwnProperty(y)&&(a=l[y],a!=null))switch(y){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:ke(e,t,y,a,l,null)}return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(a=0;a<hn.length;a++)ve(hn[a],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ke(e,t,_,a,l,null)}return;default:if(ci(t)){for(D in l)l.hasOwnProperty(D)&&(a=l[D],a!==void 0&&Jr(e,t,D,a,l,void 0));return}}for(f in l)l.hasOwnProperty(f)&&(a=l[f],a!=null&&ke(e,t,f,a,l,null))}function ip(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,f=null,y=null,_=null,D=null;for(w in l){var q=l[w];if(l.hasOwnProperty(w)&&q!=null)switch(w){case"checked":break;case"value":break;case"defaultValue":y=q;default:a.hasOwnProperty(w)||ke(e,t,w,null,a,q)}}for(var R in a){var w=a[R];if(q=l[R],a.hasOwnProperty(R)&&(w!=null||q!=null))switch(R){case"type":i=w;break;case"name":s=w;break;case"checked":_=w;break;case"defaultChecked":D=w;break;case"value":c=w;break;case"defaultValue":f=w;break;case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(o(137,t));break;default:w!==q&&ke(e,t,R,w,a,q)}}ii(e,c,f,y,_,D,i,s);return;case"select":w=c=f=R=null;for(i in l)if(y=l[i],l.hasOwnProperty(i)&&y!=null)switch(i){case"value":break;case"multiple":w=y;default:a.hasOwnProperty(i)||ke(e,t,i,null,a,y)}for(s in a)if(i=a[s],y=l[s],a.hasOwnProperty(s)&&(i!=null||y!=null))switch(s){case"value":R=i;break;case"defaultValue":f=i;break;case"multiple":c=i;default:i!==y&&ke(e,t,s,i,a,y)}t=f,l=c,a=w,R!=null?Pl(e,!!l,R,!1):!!a!=!!l&&(t!=null?Pl(e,!!l,t,!0):Pl(e,!!l,l?[]:"",!1));return;case"textarea":w=R=null;for(f in l)if(s=l[f],l.hasOwnProperty(f)&&s!=null&&!a.hasOwnProperty(f))switch(f){case"value":break;case"children":break;default:ke(e,t,f,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":R=s;break;case"defaultValue":w=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(o(91));break;default:s!==i&&ke(e,t,c,s,a,i)}Pc(e,R,w);return;case"option":for(var P in l)if(R=l[P],l.hasOwnProperty(P)&&R!=null&&!a.hasOwnProperty(P))switch(P){case"selected":e.selected=!1;break;default:ke(e,t,P,null,a,R)}for(y in a)if(R=a[y],w=l[y],a.hasOwnProperty(y)&&R!==w&&(R!=null||w!=null))switch(y){case"selected":e.selected=R&&typeof R!="function"&&typeof R!="symbol";break;default:ke(e,t,y,R,a,w)}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 ue in l)R=l[ue],l.hasOwnProperty(ue)&&R!=null&&!a.hasOwnProperty(ue)&&ke(e,t,ue,null,a,R);for(_ in a)if(R=a[_],w=l[_],a.hasOwnProperty(_)&&R!==w&&(R!=null||w!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(o(137,t));break;default:ke(e,t,_,R,a,w)}return;default:if(ci(t)){for(var Re in l)R=l[Re],l.hasOwnProperty(Re)&&R!==void 0&&!a.hasOwnProperty(Re)&&Jr(e,t,Re,void 0,a,R);for(D in a)R=a[D],w=l[D],!a.hasOwnProperty(D)||R===w||R===void 0&&w===void 0||Jr(e,t,D,R,a,w);return}}for(var C in l)R=l[C],l.hasOwnProperty(C)&&R!=null&&!a.hasOwnProperty(C)&&ke(e,t,C,null,a,R);for(q in a)R=a[q],w=l[q],!a.hasOwnProperty(q)||R===w||R==null&&w==null||ke(e,t,q,R,a,w)}function nf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rp(){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,f=s.duration;if(i&&f&&nf(c)){for(c=0,f=s.responseEnd,a+=1;a<l.length;a++){var y=l[a],_=y.startTime;if(_>f)break;var D=y.transferSize,q=y.initiatorType;D&&nf(q)&&(y=y.responseEnd,c+=D*(y<f?1:(f-_)/(y-_)))}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 zs(e){return e.nodeType===9?e:e.ownerDocument}function sf(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 rf(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 cp(){var e=window.event;return e&&e.type==="popstate"?e===Ir?!1:(Ir=e,!0):(Ir=null,!1)}var cf=typeof setTimeout=="function"?setTimeout:void 0,up=typeof clearTimeout=="function"?clearTimeout:void 0,uf=typeof Promise=="function"?Promise:void 0,op=typeof queueMicrotask=="function"?queueMicrotask:typeof uf<"u"?function(e){return uf.resolve(null).then(e).catch(dp)}:cf;function dp(e){setTimeout(function(){throw e})}function jl(e){return e==="head"}function of(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),Ma(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,f=i.nodeName;i[La]||f==="SCRIPT"||f==="STYLE"||f==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=c}}else l==="body"&&gn(e.ownerDocument.body);l=s}while(l);Ma(t)}function df(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 fp(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 mp(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 ff(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 xp(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 mf(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 xf(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 pf(e,t,l){switch(t=zs(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 kt=new Map,vf=new Set;function ws(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var tl=z.d;z.d={f:pp,r:vp,D:hp,C:yp,L:gp,m:bp,X:Sp,S:jp,M:Np};function pp(){var e=tl.f(),t=Es();return e||t}function vp(e){var t=Wl(e);t!==null&&t.tag===5&&t.type==="form"?zo(t):tl.r(e)}var _a=typeof document>"u"?null:document;function hf(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+'"]'),vf.has(s)||(vf.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),Pe(t,"link",e),Ke(t),a.head.appendChild(t)))}}function hp(e){tl.D(e),hf("dns-prefetch",e,null)}function yp(e,t){tl.C(e,t),hf("preconnect",e,t)}function gp(e,t,l){tl.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=ka(e);break;case"script":i=Ra(e)}kt.has(i)||(e=b({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),kt.set(i,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(bn(i))||t==="script"&&a.querySelector(jn(i))||(t=a.createElement("link"),Pe(t,"link",e),Ke(t),a.head.appendChild(t)))}}function bp(e,t){tl.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=Ra(e)}if(!kt.has(i)&&(e=b({rel:"modulepreload",href:e},t),kt.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"),Pe(a,"link",e),Ke(a),l.head.appendChild(a)}}}function jp(e,t,l){tl.S(e,t,l);var a=_a;if(a&&e){var s=Fl(a).hoistableStyles,i=ka(e);t=t||"default";var c=s.get(i);if(!c){var f={loading:0,preload:null};if(c=a.querySelector(bn(i)))f.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},l),(l=kt.get(i))&&ac(e,l);var y=c=a.createElement("link");Ke(y),Pe(y,"link",e),y._p=new Promise(function(_,D){y.onload=_,y.onerror=D}),y.addEventListener("load",function(){f.loading|=1}),y.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Os(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:f},s.set(i,c)}}}function Sp(e,t){tl.X(e,t);var l=_a;if(l&&e){var a=Fl(l).hoistableScripts,s=Ra(e),i=a.get(s);i||(i=l.querySelector(jn(s)),i||(e=b({src:e,async:!0},t),(t=kt.get(s))&&nc(e,t),i=l.createElement("script"),Ke(i),Pe(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function Np(e,t){tl.M(e,t);var l=_a;if(l&&e){var a=Fl(l).hoistableScripts,s=Ra(e),i=a.get(s);i||(i=l.querySelector(jn(s)),i||(e=b({src:e,async:!0,type:"module"},t),(t=kt.get(s))&&nc(e,t),i=l.createElement("script"),Ke(i),Pe(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function yf(e,t,l,a){var s=(s=te.current)?ws(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=ka(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=ka(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),kt.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},kt.set(e,l),i||Ep(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=Ra(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 ka(e){return'href="'+jt(e)+'"'}function bn(e){return'link[rel="stylesheet"]['+e+"]"}function gf(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Ep(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}),Pe(t,"link",l),Ke(t),e.head.appendChild(t))}function Ra(e){return'[src="'+jt(e)+'"]'}function jn(e){return"script[async]"+e}function bf(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,Ke(a),a;var s=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ke(a),Pe(a,"style",s),Os(a,l.precedence,e),t.instance=a;case"stylesheet":s=ka(l.href);var i=e.querySelector(bn(s));if(i)return t.state.loading|=4,t.instance=i,Ke(i),i;a=gf(l),(s=kt.get(s))&&ac(a,s),i=(e.ownerDocument||e).createElement("link"),Ke(i);var c=i;return c._p=new Promise(function(f,y){c.onload=f,c.onerror=y}),Pe(i,"link",a),t.state.loading|=4,Os(i,l.precedence,e),t.instance=i;case"script":return i=Ra(l.src),(s=e.querySelector(jn(i)))?(t.instance=s,Ke(s),s):(a=l,(s=kt.get(i))&&(a=b({},l),nc(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ke(s),Pe(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,Os(a,l.precedence,e));return t.instance}function Os(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 f=a[c];if(f.dataset.precedence===t)i=f;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 Ds=null;function jf(e,t,l){if(Ds===null){var a=new Map,s=Ds=new Map;s.set(l,a)}else s=Ds,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[$e]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var f=a.get(c);f?f.push(i):a.set(c,[i])}}return a}function Sf(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Tp(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 Nf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Cp(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=ka(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,Ke(i);return}i=t.ownerDocument||t,a=gf(a),(s=kt.get(s))&&ac(a,s),i=i.createElement("link"),Ke(i);var c=i;c._p=new Promise(function(f,y){c.onload=f,c.onerror=y}),Pe(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 Ap(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*rp());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(_p,e),Bs=null,Ls.call(e))}function _p(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:re,Provider:null,Consumer:null,_currentValue:O,_currentValue2:O,_threadCount:0};function kp(e,t,l,a,s,i,c,f,y){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=y,this.incompleteTransitions=new Map}function Ef(e,t,l,a,s,i,c,f,y,_,D,q){return e=new kp(e,t,l,c,y,_,D,q,f),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 Tf(e){return e?(e=ra,e):ra}function Cf(e,t,l,a,s,i){s=Tf(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 Af(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){Af(e,t),(e=e.alternate)&&Af(e,t)}function _f(e){if(e.tag===13||e.tag===31){var t=Ol(e,67108864);t!==null&&ut(t,e,67108864),ic(e,67108864)}}function kf(e){if(e.tag===13||e.tag===31){var t=gt();t=ti(t);var l=Ol(e,t);l!==null&&ut(l,e,t),ic(e,t)}}var Hs=!0;function Rp(e,t,l,a){var s=M.T;M.T=null;var i=z.p;try{z.p=2,rc(e,t,l,a)}finally{z.p=i,M.T=s}}function Mp(e,t,l,a){var s=M.T;M.T=null;var i=z.p;try{z.p=8,rc(e,t,l,a)}finally{z.p=i,M.T=s}}function rc(e,t,l,a){if(Hs){var s=cc(a);if(s===null)Kr(e,t,a,qs,l),Mf(e,a);else if(wp(s,e,t,l,a))a.stopPropagation();else if(Mf(e,a),t&4&&-1<zp.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=kl(i.pendingLanes);if(c!==0){var f=i;for(f.pendingLanes|=2,f.entangledLanes|=2;c;){var y=1<<31-ft(c);f.entanglements[1]|=y,c&=~y}Lt(i),(Te&6)===0&&(Ss=ot()+500,vn(0))}}break;case 31:case 13:f=Ol(i,2),f!==null&&ut(f,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=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=v(t),e!==null)return e;e=null}else if(l===31){if(e=j(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return qs=e,null}function Rf(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(hm()){case Lc:return 2;case Bc:return 8;case kn:case ym:return 32;case Uc:return 268435456;default:return 32}default:return 32}}var oc=!1,Sl=null,Nl=null,El=null,Nn=new Map,En=new Map,Tl=[],zp="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 Mf(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&&_f(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function wp(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 zf(e){var t=$l(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=v(l),t!==null){e.blockedOn=t,Qc(e.priority,function(){kf(l)});return}}else if(t===31){if(t=j(l),t!==null){e.blockedOn=t,Qc(e.priority,function(){kf(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&&_f(t),e.blockedOn=l,!1;t.shift()}return!0}function wf(e,t,l){Ys(e)&&l.delete(t)}function Op(){oc=!1,Sl!==null&&Ys(Sl)&&(Sl=null),Nl!==null&&Ys(Nl)&&(Nl=null),El!==null&&Ys(El)&&(El=null),Nn.forEach(wf),En.forEach(wf)}function Gs(e,t){e.blockedOn===t&&(e.blockedOn=null,oc||(oc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Op)))}var Vs=null;function Of(e){Vs!==e&&(Vs=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Vs===e&&(Vs=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 Ma(e){function t(y){return Gs(y,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);)zf(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||Of(l);else if(c){var f=null;if(i&&i.hasAttribute("formAction")){if(s=i,c=i[at]||null)f=c.formAction;else if(uc(s)!==null)continue}else f=c.action;typeof f=="function"?l[a+1]=f:(l.splice(a,3),a-=3),Of(l)}}}function Df(){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}Qs.prototype.render=dc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,a=gt();Cf(l,a,e,t,null,null)},Qs.prototype.unmount=dc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cf(e.current,2,null,e,null,null),Es(),t[Jl]=null}};function Qs(e){this._internalRoot=e}Qs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vc();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&&zf(e)}};var Lf=u.version;if(Lf!=="19.2.4")throw Error(o(527,Lf,"19.2.4"));z.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?N(e):null,e=e===null?null:e.stateNode,e};var Dp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xs.isDisabled&&Xs.supportsFiber)try{wa=Xs.inject(Dp),dt=Xs}catch{}}return An.createRoot=function(e,t){if(!m(e))throw Error(o(299));var l=!1,a="",s=Go,i=Vo,c=Qo;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=Ef(e,1,!1,null,null,l,a,null,s,i,c,Df),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=Go,c=Vo,f=Qo,y=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&&(f=l.onRecoverableError),l.formState!==void 0&&(y=l.formState)),t=Ef(e,1,!0,t,l??null,a,s,y,i,c,f,Df),t.context=Tf(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,Da(t,l),Lt(t),e[Jl]=t.current,Zr(e),new Qs(t)},An.version="19.2.4",An}var Zf;function Xp(){if(Zf)return xc.exports;Zf=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=Qp(),xc.exports}var Zp=Xp();const Kp="";class Jp extends Error{constructor(u,d){super(u),this.name="ApiError",this.status=d}}async function Be(r,u){const d=await fetch(`${Kp}${r}`,u);if(!d.ok){const o=await d.json().catch(()=>({error:d.statusText}));throw new Jp(o.error||`HTTP ${d.status}`,d.status)}return d.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,d){return Be(`/api/skills/${r}/${u}/evals`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)})},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,d){const o=new URLSearchParams;d!=null&&d.model&&o.set("model",d.model),d!=null&&d.type&&o.set("type",d.type),d!=null&&d.from&&o.set("from",d.from),d!=null&&d.to&&o.set("to",d.to);const m=o.toString();return Be(`/api/skills/${r}/${u}/history${m?"?"+m:""}`)},getHistoryEntry(r,u,d){return Be(`/api/skills/${r}/${u}/history/${encodeURIComponent(d)}`)},compareRuns(r,u,d,o){return Be(`/api/skills/${r}/${u}/history-compare?a=${encodeURIComponent(d)}&b=${encodeURIComponent(o)}`)},getCaseHistory(r,u,d,o){const m=new URLSearchParams;o&&m.set("model",o);const h=m.toString();return Be(`/api/skills/${r}/${u}/history/case/${d}${h?"?"+h:""}`)},deleteHistoryEntry(r,u,d){return Be(`/api/skills/${r}/${u}/history/${encodeURIComponent(d)}`,{method:"DELETE"})},improveSkill(r,u,d){return Be(`/api/skills/${r}/${u}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)})},instructEdit(r,u,d){return Be(`/api/skills/${r}/${u}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:"instruct",...d})})},applyImprovement(r,u,d){return Be(`/api/skills/${r}/${u}/apply-improvement`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:d})})},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 $p(r){const[u,d]=g.useState(()=>typeof window>"u"?!1:window.matchMedia(r).matches);return g.useEffect(()=>{const o=window.matchMedia(r);d(o.matches);const m=h=>d(h.matches);return o.addEventListener("change",m),()=>o.removeEventListener("change",m)},[r]),u}const Wp={selectedSkill:null,mode:"browse",searchQuery:"",skills:[],skillsLoading:!0,skillsError:null,isMobile:!1,mobileView:"list"};function Fp(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 im=g.createContext(null);function Kl(){const r=g.useContext(im);if(!r)throw new Error("useStudio must be used within StudioProvider");return r}function Ip({children:r}){const[u,d]=g.useReducer(Fp,Wp),o=$p("(max-width: 767px)");g.useEffect(()=>{d({type:"SET_MOBILE",isMobile:o})},[o]);const m=g.useCallback(()=>{d({type:"SET_SKILLS_LOADING",loading:!0}),ge.getSkills().then(b=>d({type:"SET_SKILLS",skills:b})).catch(b=>d({type:"SET_SKILLS_ERROR",error:b.message}))},[]);g.useEffect(()=>{m()},[m]);const h=g.useCallback(b=>{d({type:"SELECT_SKILL",skill:b})},[]),v=g.useCallback(()=>{d({type:"CLEAR_SELECTION"})},[]),j=g.useCallback(b=>{d({type:"SET_MODE",mode:b})},[]),p=g.useCallback(b=>{d({type:"SET_SEARCH",query:b})},[]),x=g.useCallback(b=>{d({type:"SET_MOBILE_VIEW",view:b})},[]),N=g.useMemo(()=>({state:u,selectSkill:h,clearSelection:v,setMode:j,setSearch:p,setMobileView:x,refreshSkills:m}),[u,h,v,j,p,x,m]);return n.jsx(im.Provider,{value:N,children:r})}function Pp({left:r,right:u}){const{state:d}=Kl();return d.isMobile?n.jsx("div",{style:{height:"100vh",overflow:"hidden",background:"var(--surface-0)"},children:d.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 ev(){const{state:r,setSearch:u}=Kl(),[d,o]=g.useState(r.searchQuery),m=g.useRef(null);g.useEffect(()=>(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{u(d)},200),()=>{m.current&&clearTimeout(m.current)}),[d,u]),g.useEffect(()=>{r.searchQuery===""&&d!==""&&o("")},[r.searchQuery]);const h=new Set(r.skills.map(v=>v.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:d,onChange:v=>o(v.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:v=>{v.currentTarget.style.borderColor="var(--accent)"},onBlur:v=>{v.currentTarget.style.borderColor="var(--border-subtle)"}}),d&&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 ",h," plugin",h!==1?"s":""]})]})}const Kf={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"},stale:{bg:"var(--orange-muted)",text:"var(--orange)",dot:"var(--orange)",label:"Stale"},missing:{bg:"var(--surface-3)",text:"var(--text-tertiary)",dot:"var(--text-tertiary)",label:"No evals"}};function tv({skill:r,isSelected:u,onSelect:d}){const o=Kf[r.benchmarkStatus]||Kf.missing;return n.jsxs("button",{onClick:d,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 lv(){const{state:r,selectSkill:u}=Kl(),{skills:d,searchQuery:o,selectedSkill:m}=r,h=g.useMemo(()=>{var N;const j=o.toLowerCase(),p=j?d.filter(b=>b.skill.toLowerCase().includes(j)||b.plugin.toLowerCase().includes(j)):d,x={};for(const b of p)(x[N=b.plugin]||(x[N]=[])).push(b);return x},[d,o]),v=Object.entries(h);return r.skillsLoading?n.jsx("div",{className:"px-3 py-4 space-y-3",children:[1,2,3].map(j=>n.jsx("div",{className:"skeleton h-14 w-full rounded-lg"},j))}):v.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:v.map(([j,p])=>n.jsxs("div",{children:[n.jsx(av,{plugin:j,count:p.length}),p.map(x=>{const N=(m==null?void 0:m.plugin)===x.plugin&&(m==null?void 0:m.skill)===x.skill;return n.jsx(tv,{skill:x,isSelected:N,onSelect:()=>u({plugin:x.plugin,skill:x.skill})},`${x.plugin}/${x.skill}`)})]},j))})}function av({plugin:r,count:u}){const[d,o]=g.useState(!1),m=`/images/icons/${r}.webp`;return n.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[d?n.jsx("svg",{width:"16",height:"16",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("img",{src:m,width:16,height:16,alt:"",onError:()=>o(!0),style:{objectFit:"contain"}}),n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:r}),n.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:["(",u,")"]}),n.jsx("div",{className:"flex-1 h-px",style:{background:"var(--border-subtle)"}})]})}function nv(){const[r,u]=g.useState(null),[d,o]=g.useState(!1),[m,h]=g.useState(!1),v=g.useRef(null);g.useEffect(()=>{ge.getConfig().then(u).catch(()=>{})},[]),g.useEffect(()=>{function N(b){v.current&&!v.current.contains(b.target)&&o(!1)}return d&&document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[d]);async function j(N,b){h(!0);try{const k=await ge.setConfig(N.id,b.id);u(k),o(!1)}catch{const k=await ge.getConfig();u(k)}finally{h(!1)}}if(!r)return null;const p=iv(r),x=sv(r);return n.jsxs("div",{ref:v,className:"relative",children:[n.jsxs("button",{onClick:()=>o(!d),className:"w-full flex items-center gap-2 px-2.5 py-1.5 rounded-lg text-[11px] transition-all duration-150",style:{background:d?"var(--surface-3)":"var(--surface-2)",border:`1px solid ${d?"var(--accent)":"var(--border-subtle)"}`,cursor:"pointer"},onMouseEnter:N=>{d||(N.currentTarget.style.borderColor="var(--accent)")},onMouseLeave:N=>{d||(N.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:d?"rotate(180deg)":"rotate(0)",transition:"transform 0.15s ease",flexShrink:0},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),d&&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(N=>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:N.available?"var(--green)":"var(--text-tertiary)",opacity:N.available?1:.3}}),n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",opacity:N.available?1:.5},children:N.label})]}),N.models.map(b=>{const k=rm(r,N.id,b.id),U=!N.available||m;return n.jsxs("button",{onClick:()=>!U&&j(N,b),disabled:U,className:"w-full px-3 py-1.5 flex items-center gap-2.5 text-left transition-all duration-100",style:{background:k?"var(--accent-muted)":"transparent",color:U?"var(--text-tertiary)":"var(--text-primary)",opacity:U?.4:1,cursor:U?"not-allowed":"pointer"},onMouseEnter:H=>{!U&&!k&&(H.currentTarget.style.background="var(--surface-3)")},onMouseLeave:H=>{k||(H.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 ${k?"var(--accent)":"var(--border-subtle)"}`},children:k&&n.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}})}),n.jsx("span",{className:"text-[12px]",style:{fontWeight:k?600:400},title:b.id,children:b.label})]},`${N.id}-${b.id}`)})]},N.id))})]})]})}function rm(r,u,d){return r.provider!==u?!1:u==="claude-cli"?r.model===`claude-${d}`:r.model===d}function sv(r){return r.providers.find(u=>u.id===r.provider)}function iv(r){for(const u of r.providers)for(const d of u.models)if(rm(r,u.id,d.id))return d.label;return r.model}function rv(){const{state:r,setMode:u}=Kl(),[d,o]=g.useState(null);return g.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:d||"vskill"})]})]}),n.jsx("div",{className:"mt-3",children:n.jsx(nv,{})})]}),n.jsx(ev,{}),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(lv,{})})]})}const cv="modulepreload",uv=function(r){return"/"+r},Jf={},ov=function(u,d,o){let m=Promise.resolve();if(d&&d.length>0){let v=function(x){return Promise.all(x.map(N=>Promise.resolve(N).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const j=document.querySelector("meta[property=csp-nonce]"),p=(j==null?void 0:j.nonce)||(j==null?void 0:j.getAttribute("nonce"));m=v(d.map(x=>{if(x=uv(x),x in Jf)return;Jf[x]=!0;const N=x.endsWith(".css"),b=N?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${x}"]${b}`))return;const k=document.createElement("link");if(k.rel=N?"stylesheet":cv,N||(k.as="script"),k.crossOrigin="",k.href=x,p&&k.setAttribute("nonce",p),document.head.appendChild(k),N)return new Promise((U,H)=>{k.addEventListener("load",U),k.addEventListener("error",()=>H(new Error(`Unable to preload CSS for ${x}`)))})}))}function h(v){const j=new Event("vite:preloadError",{cancelable:!0});if(j.payload=v,window.dispatchEvent(j),!j.defaultPrevented)throw v}return m.then(v=>{for(const j of v||[])j.status==="rejected"&&h(j.reason);return u().catch(h)})};function yc(){const[r,u]=g.useState([]),[d,o]=g.useState(!1),[m,h]=g.useState(!1),[v,j]=g.useState(null),p=g.useRef(null),x=g.useCallback(async(b,k)=>{u([]),o(!0),h(!1),j(null);const U=new AbortController;p.current=U;try{const H=await fetch(b,{method:"POST",headers:{"Content-Type":"application/json"},body:k?JSON.stringify(k):void 0,signal:U.signal});if(!H.ok||!H.body)throw new Error(`HTTP ${H.status}`);const Q=H.body.getReader(),G=new TextDecoder;let ne="",I="";for(;;){const{done:re,value:K}=await Q.read();if(re)break;ne+=G.decode(K,{stream:!0});const se=ne.split(`
|
|
50
|
+
`);ne=se.pop()||"";for(const $ of se)if($.startsWith("event: "))I=$.slice(7).trim();else if($.startsWith("data: ")){try{const le=JSON.parse($.slice(6)),W={event:I,data:le};I==="done"?(h(!0),u(me=>[...me,W])):u(me=>[...me,W])}catch{}I=""}}}catch(H){H.name!=="AbortError"&&j(H.message)}finally{o(!1),p.current=null}},[]),N=g.useCallback(()=>{var b;(b=p.current)==null||b.abort()},[]);return{events:r,running:d,done:m,error:v,start:x,stop:N}}function dv(r){const u=g.useRef(r);u.current=r;const[d,o]=g.useState(new Set),m=g.useRef(new Map),h=g.useCallback(async(x,N,b)=>{var U;(U=m.current.get(x))==null||U.abort();const k=new AbortController;m.current.set(x,k),o(H=>{const Q=new Set(H);return Q.add(x),Q});try{const H=await fetch(N,{method:"POST",headers:{"Content-Type":"application/json"},body:b?JSON.stringify(b):void 0,signal:k.signal});if(!H.ok||!H.body)throw new Error(`HTTP ${H.status}`);const Q=H.body.getReader(),G=new TextDecoder;let ne="",I="";for(;;){const{done:re,value:K}=await Q.read();if(re)break;ne+=G.decode(K,{stream:!0});const se=ne.split(`
|
|
51
|
+
`);ne=se.pop()||"";for(const $ of se)if($.startsWith("event: "))I=$.slice(7).trim();else if($.startsWith("data: ")){try{const le=JSON.parse($.slice(6)),W={event:I,data:le};u.current.onEvent(x,W)}catch{}I=""}}u.current.onDone(x)}catch(H){H.name!=="AbortError"&&u.current.onError(x,H.message)}finally{o(H=>{const Q=new Set(H);return Q.delete(x),Q}),m.current.delete(x)}},[]),v=g.useCallback(x=>{var N;(N=m.current.get(x))==null||N.abort()},[]),j=g.useCallback(()=>{for(const x of m.current.values())x.abort()},[]),p=d.size>0;return{runningSet:d,startCase:h,stopCase:v,stopAll:j,isAnyCaseRunning:p}}const fv={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,aiEditClassifiedError:null,aiEditProgress:[],aiEditEvalChanges:[],aiEditEvalSelections:new Map,aiEditEvalsRetry:null,generateEvalsLoading:!1,generateEvalsProgress:[],generateEvalsError:null,regressions:[],iterationCount:0,activationPrompts:"",activationResults:[],activationSummary:null,activationRunning:!1,activationError:null,loading:!0,error:null};function mv(r,u){var d,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 v of u.benchmark.cases)m.set(v.eval_id,{status:v.status,passRate:v.pass_rate,errorMessage:v.error_message||void 0,durationMs:v.durationMs,tokens:v.tokens,output:v.output,assertions:v.assertions.map(j=>({assertion_id:j.id,text:j.text,pass:j.pass,reasoning:j.reasoning}))});const h=((o=(d=u.evals)==null?void 0:d.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:h,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),h=m.get(u.caseId);m.set(u.caseId,{status:"complete",mode:h==null?void 0:h.mode});const v=new Map(r.inlineResults);return v.set(u.caseId,u.result),{...r,caseRunStates:m,inlineResults:v}}case"CASE_RUN_ERROR":{const m=new Map(r.caseRunStates),h=m.get(u.caseId);m.set(u.caseId,{status:"error",mode:h==null?void 0:h.mode});const v=new Map(r.inlineResults);return v.set(u.caseId,{status:"error",errorMessage:u.error,assertions:[]}),{...r,caseRunStates:m,inlineResults:v}}case"CASE_RUN_CANCEL":{const m=new Map(r.caseRunStates),h=m.get(u.caseId);return m.set(u.caseId,{status:"cancelled",mode:h==null?void 0:h.mode}),{...r,caseRunStates:m}}case"BULK_RUN_START":{const m=new Map(r.caseRunStates);for(const h of u.caseIds)m.set(h,{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[h,v]of m)(v.status==="running"||v.status==="queued")&&m.set(h,{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,aiEditClassifiedError:null,aiEditProgress:[],aiEditEvalChanges:[],aiEditEvalSelections:new Map,aiEditEvalsRetry:null};case"CLOSE_AI_EDIT":return{...r,aiEditOpen:!1,aiEditLoading:!1,aiEditResult:null,aiEditError:null,aiEditClassifiedError:null,aiEditProgress:[],aiEditEvalChanges:[],aiEditEvalSelections:new Map,aiEditEvalsRetry:null};case"AI_EDIT_LOADING":return{...r,aiEditLoading:!0,aiEditError:null,aiEditClassifiedError:null,aiEditProgress:[]};case"AI_EDIT_PROGRESS":return{...r,aiEditProgress:[...r.aiEditProgress,u.entry]};case"AI_EDIT_RESULT":{const m=u.evalChanges??[],h=new Map;for(let v=0;v<m.length;v++)h.set(v,!0);return{...r,aiEditLoading:!1,aiEditResult:{improved:u.improved,reasoning:u.reasoning,evalChanges:m},aiEditEvalChanges:m,aiEditEvalSelections:h}}case"AI_EDIT_ERROR":return{...r,aiEditLoading:!1,aiEditError:u.message,aiEditClassifiedError:u.classified??null};case"GENERATE_EVALS_START":return{...r,generateEvalsLoading:!0,generateEvalsProgress:[],generateEvalsError:null};case"GENERATE_EVALS_PROGRESS":return{...r,generateEvalsProgress:[...r.generateEvalsProgress,u.entry]};case"GENERATE_EVALS_DONE":return{...r,generateEvalsLoading:!1,evals:u.evals};case"GENERATE_EVALS_ERROR":return{...r,generateEvalsLoading:!1,generateEvalsError:u.classified};case"TOGGLE_EVAL_CHANGE":{const m=new Map(r.aiEditEvalSelections);return m.set(u.index,!m.get(u.index)),{...r,aiEditEvalSelections:m}}case"SELECT_ALL_EVAL_CHANGES":{const m=new Map(r.aiEditEvalSelections);for(const h of m.keys())m.set(h,!0);return{...r,aiEditEvalSelections:m}}case"DESELECT_ALL_EVAL_CHANGES":{const m=new Map(r.aiEditEvalSelections);for(const h of m.keys())m.set(h,!1);return{...r,aiEditEvalSelections:m}}case"SET_EVALS_RETRY":return{...r,aiEditEvalsRetry:u.evalsFile};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 cm=g.createContext(null);function Bt(){const r=g.useContext(cm);if(!r)throw new Error("useWorkspace must be used within WorkspaceProvider");return r}function xv({plugin:r,skill:u,children:d}){const[o,m]=g.useReducer(mv,{...fv,plugin:r,skill:u}),h=g.useRef(new Set),v=g.useRef(new Set),j=g.useRef(new Map),p=g.useCallback((T,L)=>{const Y=L.data;let V=j.current.get(T);if(V||(V={assertions:[]},j.current.set(T,V)),L.event==="output_ready"&&(V.output=Y.output,Y.durationMs!=null&&(V.durationMs=Y.durationMs),Y.tokens!=null&&(V.tokens=Y.tokens)),L.event==="assertion_result"){const te={assertion_id:Y.assertion_id,text:Y.text,pass:Y.pass,reasoning:Y.reasoning};V.assertions.find(ce=>ce.assertion_id===te.assertion_id)||V.assertions.push(te)}L.event==="case_complete"&&(V.status=Y.status,V.passRate=Y.pass_rate,V.errorMessage=Y.error_message||void 0),m({type:"UPDATE_INLINE_RESULT",evalId:T,result:{...V,assertions:[...V.assertions]}})},[]),x=g.useCallback(T=>{if(v.current.has(T))return;v.current.add(T);const L=j.current.get(T)??{assertions:[]};m({type:"CASE_RUN_COMPLETE",caseId:T,result:{...L,assertions:[...L.assertions]}}),h.current.has(T)&&(h.current.delete(T),h.current.size===0&&ge.getLatestBenchmark(r,u).then(Y=>m({type:"BULK_RUN_COMPLETE",benchmark:Y})).catch(()=>m({type:"BULK_RUN_COMPLETE",benchmark:null})))},[r,u]),N=g.useCallback((T,L)=>{v.current.has(T)||(v.current.add(T),m({type:"CASE_RUN_ERROR",caseId:T,error:L}),h.current.has(T)&&(h.current.delete(T),h.current.size===0&&ge.getLatestBenchmark(r,u).then(Y=>m({type:"BULK_RUN_COMPLETE",benchmark:Y})).catch(()=>m({type:"BULK_RUN_COMPLETE",benchmark:null}))))},[r,u]),{startCase:b,stopCase:k,stopAll:U}=dv({onEvent:p,onDone:x,onError:N});g.useEffect(()=>()=>{U()},[U]),g.useEffect(()=>{let T=!1;async function L(){try{const[Y,V,te]=await Promise.allSettled([ge.getSkillDetail(r,u),ge.getEvals(r,u),ge.getLatestBenchmark(r,u)]);if(T)return;m({type:"INIT_DATA",skillContent:Y.status==="fulfilled"?Y.value.skillContent:"",evals:V.status==="fulfilled"?V.value:null,benchmark:te.status==="fulfilled"?te.value:null})}catch(Y){T||m({type:"SET_ERROR",error:Y.message})}}return L(),()=>{T=!0}},[r,u]);const H=g.useCallback(async()=>{try{await ge.applyImprovement(r,u,o.skillContent),m({type:"CONTENT_SAVED"})}catch(T){m({type:"SET_ERROR",error:T.message})}},[r,u,o.skillContent]),Q=g.useCallback(async T=>{try{const L=await ge.saveEvals(r,u,T);m({type:"SET_EVALS",evals:L})}catch(L){m({type:"SET_ERROR",error:L.message})}},[r,u]),G=g.useCallback((T,L="benchmark")=>{const Y=o.caseRunStates.get(T);if((Y==null?void 0:Y.status)!=="running")if(j.current.delete(T),v.current.delete(T),m({type:"CASE_RUN_START",caseId:T,mode:L}),L==="comparison"){const V=`/api/skills/${r}/${u}/compare`;b(T,V,{eval_ids:[T]})}else{const V=`/api/skills/${r}/${u}/benchmark/case/${T}`;b(T,V,L==="baseline"?{baseline_only:!0}:void 0)}},[r,u,o.caseRunStates,b]),ne=g.useCallback((T="benchmark")=>{var V;const L=((V=o.evals)==null?void 0:V.evals)??[];if(L.length===0)return;const Y=L.map(te=>te.id);for(const te of Y)j.current.delete(te),v.current.delete(te);m({type:"BULK_RUN_START",caseIds:Y,mode:T}),h.current=new Set(Y);for(const te of Y)if(T==="comparison")b(te,`/api/skills/${r}/${u}/compare`,{eval_ids:[te]});else{const ce=`/api/skills/${r}/${u}/benchmark/case/${te}`;b(te,ce,T==="baseline"?{baseline_only:!0}:void 0)}},[r,u,o.evals,b]),I=g.useCallback(T=>{k(T),m({type:"CASE_RUN_CANCEL",caseId:T}),h.current.delete(T),v.current.add(T)},[k]),re=g.useCallback(()=>{U(),m({type:"CANCEL_ALL"}),h.current.clear()},[U]),K=g.useCallback(async(T,L)=>{m({type:"OPEN_IMPROVE",evalId:T})},[]),se=g.useCallback(async(T,L)=>{try{await ge.applyImprovement(r,u,L),m({type:"SET_CONTENT",content:L}),m({type:"CONTENT_SAVED"}),m({type:"CLOSE_IMPROVE"}),G(T,"benchmark")}catch(Y){m({type:"SET_ERROR",error:Y.message})}},[r,u,G]),$=yc(),le=g.useRef(null);g.useEffect(()=>{if($.events.length)for(const T of $.events){const L=T.data;if(T.event==="progress"&&m({type:"AI_EDIT_PROGRESS",entry:{timestamp:Date.now(),phase:L.phase,message:L.message}}),T.event==="done"){const Y=L.improved,V=L.reasoning,te=L.evalChanges??[];m({type:"AI_EDIT_RESULT",improved:Y,reasoning:V,evalChanges:te})}if(T.event==="error"){const Y=L;m({type:"AI_EDIT_ERROR",message:Y.description||"Unknown error",classified:Y})}}},[$.events]),g.useEffect(()=>{$.error&&m({type:"AI_EDIT_ERROR",message:$.error})},[$.error]),g.useEffect(()=>()=>{$.stop()},[$.stop]);const W=g.useCallback(async(T,L,Y)=>{m({type:"AI_EDIT_LOADING"}),le.current=$.stop,$.start(`/api/skills/${r}/${u}/improve?sse`,{mode:"instruct",instruction:T,content:o.skillContent,evals:o.evals??{skill_name:u,evals:[]},provider:L,model:Y})},[r,u,o.skillContent,o.evals,$]),me=g.useCallback(()=>{$.stop(),m({type:"AI_EDIT_ERROR",message:"Cancelled"})},[$]),xe=g.useCallback(async()=>{const T=o.aiEditResult;if(T!=null&&T.improved)try{if(await ge.applyImprovement(r,u,T.improved),m({type:"SET_CONTENT",content:T.improved}),m({type:"CONTENT_SAVED"}),o.aiEditEvalChanges.length>0&&Array.from(o.aiEditEvalSelections.values()).some(Boolean)){const{mergeEvalChanges:Y}=await ov(async()=>{const{mergeEvalChanges:ce}=await import("./mergeEvalChanges-Dpbbs4d4.js");return{mergeEvalChanges:ce}},[]),V=o.evals??{skill_name:u,evals:[]},te=Y(V,o.aiEditEvalChanges,o.aiEditEvalSelections);try{const ce=await ge.saveEvals(r,u,te);m({type:"SET_EVALS",evals:ce})}catch(ce){m({type:"SET_EVALS_RETRY",evalsFile:te}),m({type:"SET_ERROR",error:`SKILL.md saved, but test cases failed to save: ${ce.message}. You can retry from the AI Edit panel.`});return}}m({type:"CLOSE_AI_EDIT"})}catch(L){m({type:"SET_ERROR",error:L.message})}},[r,u,o.aiEditResult,o.evals,o.aiEditEvalChanges,o.aiEditEvalSelections]),je=g.useCallback(()=>{m({type:"CLOSE_AI_EDIT"})},[]),Se=g.useCallback(T=>{m({type:"TOGGLE_EVAL_CHANGE",index:T})},[]),X=g.useCallback(()=>{m({type:"SELECT_ALL_EVAL_CHANGES"})},[]),J=g.useCallback(()=>{m({type:"DESELECT_ALL_EVAL_CHANGES"})},[]),F=g.useCallback(async()=>{const T=o.aiEditEvalsRetry;if(T)try{const L=await ge.saveEvals(r,u,T);m({type:"SET_EVALS",evals:L}),m({type:"SET_ERROR",error:null}),m({type:"CLOSE_AI_EDIT"})}catch(L){m({type:"SET_ERROR",error:`Retry failed: ${L.message}`})}},[r,u,o.aiEditEvalsRetry]),M=g.useCallback(async()=>{try{const T=await ge.getSkillDetail(r,u);m({type:"SET_CONTENT",content:T.skillContent}),m({type:"CONTENT_SAVED"})}catch{}},[r,u]),z=yc();g.useEffect(()=>{if(z.events.length)for(const T of z.events){const L=T.data;if(T.event==="progress"&&m({type:"GENERATE_EVALS_PROGRESS",entry:{timestamp:Date.now(),phase:L.phase,message:L.message}}),T.event==="done"){const Y=L;ge.saveEvals(r,u,Y).then(V=>m({type:"GENERATE_EVALS_DONE",evals:V})).catch(V=>m({type:"SET_ERROR",error:V.message}))}T.event==="error"&&m({type:"GENERATE_EVALS_ERROR",classified:L})}},[z.events,r,u]),g.useEffect(()=>{z.error&&m({type:"SET_ERROR",error:z.error})},[z.error]),g.useEffect(()=>()=>{z.stop()},[z.stop]);const O=g.useCallback(async()=>{m({type:"GENERATE_EVALS_START"}),z.start(`/api/skills/${r}/${u}/generate-evals?sse`)},[r,u,z]),ee=yc();g.useEffect(()=>()=>{ee.stop()},[ee.stop]),g.useEffect(()=>{if(ee.events.length)for(const T of ee.events)T.event==="prompt_result"&&m({type:"ACTIVATION_RESULT",result:T.data}),T.event==="done"&&m({type:"ACTIVATION_DONE",summary:T.data})},[ee.events]),g.useEffect(()=>{ee.error&&m({type:"ACTIVATION_ERROR",error:ee.error})},[ee.error]);const Z=g.useCallback(T=>{const Y=T.trim().split(`
|
|
52
|
+
`).filter(Boolean).map(V=>V.startsWith("!")?{prompt:V.slice(1).trim(),expected:"should_not_activate"}:V.startsWith("+")?{prompt:V.slice(1).trim(),expected:"should_activate"}:{prompt:V.trim(),expected:"auto"});m({type:"ACTIVATION_START"}),ee.start(`/api/skills/${r}/${u}/activation-test`,{prompts:Y})},[r,u,ee]),S=g.useMemo(()=>({state:o,dispatch:m,saveContent:H,saveEvals:Q,runCase:G,runAll:ne,cancelCase:I,cancelAll:re,improveForCase:K,applyImproveAndRerun:se,refreshSkillContent:M,generateEvals:O,runActivationTest:Z,submitAiEdit:W,cancelAiEdit:me,applyAiEdit:xe,discardAiEdit:je,toggleEvalChange:Se,selectAllEvalChanges:X,deselectAllEvalChanges:J,retryEvalsSave:F}),[o,H,Q,G,ne,I,re,K,se,M,O,Z,W,me,xe,je,Se,X,J,F]);return n.jsx(cm.Provider,{value:S,children:d})}function pv({state:r}){const{plugin:u,skill:d,evals:o,latestBenchmark:m,isDirty:h,caseRunStates:v,regressions:j,iterationCount:p}=r,x=Array.from(v.values()).some(Q=>Q.status==="running"||Q.status==="queued"),N=m==null?void 0:m.overall_pass_rate,b=(o==null?void 0:o.evals.reduce((Q,G)=>Q+G.assertions.length,0))??0,k=(o==null?void 0:o.evals.length)??0,U=N!=null?N>=80?"var(--green)":N>=50?"var(--yellow)":"var(--red)":"var(--text-tertiary)",H=N!=null?N>=80?"var(--green-muted)":N>=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(vv,{}),n.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:d}),h&&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:[j.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"})]}),j.length," regression",j.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:H,color:U},children:N!=null?`${Math.round(N*100)}%`:"--"}),n.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[k," case",k!==1?"s":""," / ",b," assert",b!==1?"s":""]})]})]})}function vv(){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 hv=[{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 yv({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 gv({activePanel:r,onPanelChange:u,isDirty:d,isRunning:o,hasRegressions:m,isActivationRunning:h}){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:hv.map((v,j)=>n.jsxs("div",{className:"flex items-center",children:[j>0&&n.jsx("div",{style:{width:1,height:20,background:"var(--border-subtle)",margin:"0 6px",flexShrink:0}}),v.tabs.map(p=>{const x=r===p.id,N=p.id==="editor"&&d||p.id==="run"&&o||p.id==="activation"&&h||p.id==="history"&&m,b=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:k=>{x||(k.currentTarget.style.color="var(--text-secondary)")},onMouseLeave:k=>{x||(k.currentTarget.style.color="var(--text-tertiary)")},children:[n.jsx(yv,{id:p.id}),p.label,N&&n.jsx("span",{className:"absolute top-1.5 right-1 rounded-full",style:{width:5,height:5,background:b}})]},p.id)})]},v.label))})}function bv(r){const u=r.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);if(!u)return{metadata:{},body:r};const d=u[1],o=u[2].trim(),m={},h=d.split(`
|
|
53
|
+
`);let v="",j=!1;for(const p of h){const x=p.match(/^[ \t]+([\w-]+):\s*(.*)$/);if(x&&v&&j){const k=x[1],U=x[2].trim();let H=m[v];if((typeof H!="object"||Array.isArray(H))&&(H={},m[v]=H),!U)H[k]=[];else{const Q=U.match(/^\[(.+)\]$/);Q?H[k]=Q[1].split(",").map(G=>G.trim().replace(/^["']|["']$/g,"")).filter(Boolean):H[k]=U.replace(/^["']|["']$/g,"")}continue}const N=p.match(/^\s+-\s+(.+)$/);if(N&&v){j=!1;const k=m[v];Array.isArray(k)?k.push(N[1].trim().replace(/^["']|["']$/g,"")):m[v]=[N[1].trim().replace(/^["']|["']$/g,"")];continue}const b=p.match(/^([\w-]+):\s*(.*)$/);if(b){v=b[1];const k=b[2].trim();if(j=!1,!k){m[v]={},j=!0;continue}const U=k.match(/^\[(.+)\]$/);if(U){m[v]=U[1].split(",").map(H=>H.trim().replace(/^["']|["']$/g,"")).filter(Boolean);continue}m[v]=k.replace(/^["']|["']$/g,"")}}return{metadata:m,body:o}}function um(r){if(!r)return"";let u=jv(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 jv(r){const u=r.split(`
|
|
54
|
+
`),d=[];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=$f(u[o]);o+=2;const h=[];for(;o<u.length&&u[o].trim().startsWith("|");)h.push($f(u[o])),o++;const v='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)"',j='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 ${v}>${x}</th>`;p+="</tr></thead><tbody>";for(const x of h){p+="<tr>";for(const N of x)p+=`<td ${j}>${N}</td>`;p+="</tr>"}p+="</tbody></table>",d.push(p)}else d.push(u[o]),o++;return d.join(`
|
|
55
|
+
`)}function $f(r){return r.split("|").map(u=>u.trim()).filter(u=>u.length>0)}function Mc(r,u){const d=r.split(`
|
|
56
|
+
`),o=u.split(`
|
|
57
|
+
`);if(d.length>1e3||o.length>1e3)return[...d.map(N=>({type:"unchanged",content:N}))];const m=d.length,h=o.length,v=Array.from({length:m+1},()=>new Array(h+1).fill(0));for(let N=1;N<=m;N++)for(let b=1;b<=h;b++)d[N-1]===o[b-1]?v[N][b]=v[N-1][b-1]+1:v[N][b]=Math.max(v[N-1][b],v[N][b-1]);const j=[];let p=m,x=h;for(;p>0||x>0;)p>0&&x>0&&d[p-1]===o[x-1]?(j.push({type:"unchanged",content:d[p-1]}),p--,x--):x>0&&(p===0||v[p][x-1]>=v[p-1][x])?(j.push({type:"added",content:o[x-1]}),x--):(j.push({type:"removed",content:d[p-1]}),p--);return j.reverse()}function Sv(r,u){if(u&&new Set(["generating","comparing","judging","judging_assertion","preparing","parsing"]).has(r))return n.jsx("div",{className:"spinner",style:{width:10,height:10,flexShrink:0}});const o=new Set(["generating","comparing","preparing"]);return n.jsx("div",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{background:o.has(r)?"var(--accent)":"var(--green)"}})}function zc({entries:r,isRunning:u}){const[d,o]=g.useState(!1),m=g.useRef(null);return g.useEffect(()=>{m.current&&!d&&(m.current.scrollTop=m.current.scrollHeight)},[r,d]),r.length===0&&!u?null:n.jsxs("div",{className:"mt-2 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("button",{onClick:()=>o(!d),className:"w-full flex items-center justify-between px-3 py-2 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:h=>{h.currentTarget.style.color="var(--text-primary)"},onMouseLeave:h=>{h.currentTarget.style.color="var(--text-tertiary)"},children:[n.jsxs("span",{className:"flex items-center gap-2",children:[u&&n.jsx("div",{className:"spinner",style:{width:10,height:10}}),"Progress Log (",r.length,")"]}),n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:d?"rotate(0)":"rotate(180deg)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),!d&&n.jsx("div",{ref:m,className:"px-3 pb-3 space-y-1 max-h-48 overflow-y-auto",children:r.map((h,v)=>{const j=v===r.length-1&&u,p=v===0?"0s":`+${((h.timestamp-r[0].timestamp)/1e3).toFixed(1)}s`;return n.jsxs("div",{className:"flex items-center gap-2 text-[11px] animate-fade-in",style:{opacity:j?1:.7},children:[Sv(h.phase,j),n.jsx("span",{className:"font-mono flex-shrink-0",style:{color:"var(--text-tertiary)",width:40},children:p}),n.jsx("span",{style:{color:j?"var(--text-primary)":"var(--text-secondary)"},children:h.message}),h.current!=null&&h.total!=null&&n.jsxs("span",{className:"font-mono flex-shrink-0",style:{color:"var(--text-tertiary)"},children:["[",h.current,"/",h.total,"]"]})]},v)})})]})}const Wf={rate_limit:{icon:"⏱",color:"var(--amber, #f59e0b)"},context_window:{icon:"⚠",color:"var(--amber, #f59e0b)"},auth:{icon:"🔒",color:"var(--red, #ef4444)"},timeout:{icon:"⌛",color:"var(--amber, #f59e0b)"},provider_unavailable:{icon:"⚡",color:"var(--red, #ef4444)"},parse_error:{icon:"❓",color:"var(--amber, #f59e0b)"},unknown:{icon:"❌",color:"var(--red, #ef4444)"}};function wc({error:r,onRetry:u,onDismiss:d}){const[o,m]=g.useState(null),h=g.useRef(null);g.useEffect(()=>(r.category==="rate_limit"&&r.retryAfterMs?m(Math.ceil(r.retryAfterMs/1e3)):m(null),()=>{h.current&&clearInterval(h.current)}),[r]),g.useEffect(()=>{if(!(o==null||o<=0))return h.current=setInterval(()=>{m(p=>p==null||p<=1?(h.current&&clearInterval(h.current),0):p-1)},1e3),()=>{h.current&&clearInterval(h.current)}},[o!=null&&o>0]);const v=Wf[r.category]||Wf.unknown,j=o!=null&&o>0;return n.jsxs("div",{className:"rounded-lg overflow-hidden animate-fade-in",style:{border:`1px solid color-mix(in srgb, ${v.color} 30%, transparent)`,background:`color-mix(in srgb, ${v.color} 6%, var(--surface-1))`},children:[n.jsxs("div",{className:"flex items-center justify-between px-3.5 py-2.5",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{style:{fontSize:14},children:v.icon}),n.jsx("span",{className:"text-[12px] font-semibold",style:{color:v.color},children:r.title})]}),d&&n.jsx("button",{onClick:d,className:"w-5 h-5 rounded flex items-center justify-center",style:{color:"var(--text-tertiary)"},children:n.jsxs("svg",{width:"10",height:"10",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"})]})})]}),n.jsxs("div",{className:"px-3.5 pb-3",children:[n.jsx("p",{className:"text-[11.5px] mb-1.5",style:{color:"var(--text-secondary)"},children:r.description}),n.jsx("p",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:r.hint}),(u||o!=null)&&n.jsx("div",{className:"flex items-center gap-2 mt-2.5",children:u&&n.jsx("button",{onClick:u,disabled:j,className:"btn btn-secondary text-[11px]",style:{padding:"4px 10px",opacity:j?.5:1},children:j?`Retry in ${o}s`:"Retry"})})]})]})}function Nv({plugin:r,skill:u,skillContent:d,onApplied:o}){const[m,h]=g.useState("closed"),[v,j]=g.useState(null),[p,x]=g.useState("claude-cli"),[N,b]=g.useState("opus"),[k,U]=g.useState([]),[H,Q]=g.useState(""),[G,ne]=g.useState(""),[I,re]=g.useState(null),[K,se]=g.useState(null),[$,le]=g.useState([]),[W,me]=g.useState(!1),xe=g.useRef(null);g.useEffect(()=>{ge.getConfig().then(z=>{j(z),z.providers.find(ee=>ee.id==="claude-cli"&&ee.available)&&(x("claude-cli"),b("opus"))}).catch(()=>{})},[]),g.useEffect(()=>()=>{var z;(z=xe.current)==null||z.abort()},[]);function je(){return v==null?void 0:v.providers.find(z=>z.id===p&&z.available)}const Se=g.useCallback(()=>{var z;(z=xe.current)==null||z.abort(),h("open")},[]);async function X(){h("loading"),re(null),se(null),le([]);const z=new AbortController;xe.current=z;try{const O=await fetch(`/api/skills/${encodeURIComponent(r)}/${encodeURIComponent(u)}/improve?sse`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:p,model:N}),signal:z.signal});if(!O.ok||!O.body)throw new Error(`HTTP ${O.status}`);const ee=O.body.getReader(),Z=new TextDecoder;let S="",T="";for(;;){const{done:L,value:Y}=await ee.read();if(L)break;S+=Z.decode(Y,{stream:!0});const V=S.split(`
|
|
58
|
+
`);S=V.pop()||"";for(const te of V)if(te.startsWith("event: "))T=te.slice(7).trim();else if(te.startsWith("data: ")){try{const ce=JSON.parse(te.slice(6));T==="progress"?le(Ze=>[...Ze,{phase:ce.phase,message:ce.message,timestamp:Date.now()}]):T==="done"||T==="complete"?(Q(ce.improved),ne(ce.reasoning||""),U(Mc(ce.original||d,ce.improved)),h("diff_shown")):T==="error"&&(re(ce.message||ce.description||"Unknown error"),ce.category&&se(ce),h("open"))}catch{}T=""}}}catch(O){O.name!=="AbortError"&&(re(O.message),h("open"))}finally{xe.current=null}}async function J(){me(!0);try{await ge.applyImprovement(r,u,H),o(H),h("closed")}catch(z){re(z.message)}finally{me(!1)}}function F(){h("closed"),U([]),Q(""),ne(""),re(null)}if(m==="closed")return n.jsxs("button",{onClick:()=>h("open"),className:"btn btn-secondary mb-5",disabled:!d,children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]}),"Improve Skill"]});const M=je();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:F,className:"w-7 h-7 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:z=>{z.currentTarget.style.background="var(--surface-3)"},onMouseLeave:z=>{z.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(n.Fragment,{children:[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:z=>{x(z.target.value);const O=v==null?void 0:v.providers.find(ee=>ee.id===z.target.value);O!=null&&O.models[0]&&b(O.models[0].id)},disabled:m==="loading",children:v==null?void 0:v.providers.filter(z=>z.available).map(z=>n.jsx("option",{value:z.id,children:z.label},z.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:N,onChange:z=>b(z.target.value),disabled:m==="loading",children:M==null?void 0:M.models.map(z=>n.jsx("option",{value:z.id,children:z.label},z.id))})]}),m==="loading"?n.jsx("button",{onClick:Se,className:"btn btn-secondary flex-shrink-0",children:"Cancel"}):n.jsx("button",{onClick:X,className:"btn btn-primary flex-shrink-0",children:"Improve"})]}),m==="loading"&&$.length>0&&n.jsx("div",{className:"mt-3",children:n.jsx(zc,{entries:$,isRunning:!0})})]}),I&&n.jsx("div",{className:"mb-4",children:K?n.jsx(wc,{error:K,onRetry:X,onDismiss:()=>{re(null),se(null)}}):n.jsx("div",{className:"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:k.map((z,O)=>n.jsxs("div",{className:"px-3 py-0.5 text-[11px] font-mono",style:{background:z.type==="added"?"rgba(34,197,94,0.1)":z.type==="removed"?"rgba(239,68,68,0.1)":"transparent",color:z.type==="added"?"var(--green)":z.type==="removed"?"var(--red)":"var(--text-secondary)",borderLeft:z.type==="added"?"3px solid var(--green)":z.type==="removed"?"3px solid var(--red)":"3px solid transparent"},children:[n.jsx("span",{style:{userSelect:"none",opacity:.5,marginRight:8},children:z.type==="added"?"+":z.type==="removed"?"-":" "}),z.content]},O))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:J,disabled:W,className:"btn btn-primary",children:W?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:F,className:"btn btn-secondary",children:"Discard"})]})]})]})]})}const Ff={remove:{bg:"var(--red-muted)",color:"var(--red)",label:"REMOVE"},modify:{bg:"rgba(251,191,36,0.15)",color:"#fbbf24",label:"MODIFY"},add:{bg:"var(--green-muted)",color:"var(--green)",label:"ADD"}},Ev={remove:"var(--red)",modify:"#fbbf24",add:"var(--green)"};function Tv({change:r,index:u,selected:d,onToggle:o,originalEval:m}){var b;const[h,v]=g.useState(!1),j=Ff[r.action]??Ff.add,p=Ev[r.action]??"var(--border-subtle)",x=r.action==="remove"?(m==null?void 0:m.name)??`Eval #${r.evalId}`:((b=r.eval)==null?void 0:b.name)??"Unnamed",N=g.useCallback(()=>o(u),[o,u]);return n.jsxs("div",{className:"rounded-lg transition-all duration-150",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderLeft:`3px solid ${p}`,opacity:d?1:.5},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5",children:[n.jsx("input",{type:"checkbox",checked:d,onChange:N,className:"flex-shrink-0",style:{accentColor:"var(--accent)"}}),n.jsx("span",{className:"pill text-[9px] font-bold flex-shrink-0",style:{background:j.bg,color:j.color,padding:"1px 6px"},children:j.label}),n.jsx("span",{className:"text-[12px] font-medium truncate",style:{color:"var(--text-primary)"},children:x}),n.jsx("span",{className:"text-[11px] truncate flex-1",style:{color:"var(--text-tertiary)"},children:r.reason}),n.jsx("button",{onClick:()=>v(!h),className:"flex-shrink-0 w-5 h-5 flex items-center justify-center rounded transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:k=>{k.currentTarget.style.background="var(--surface-3)"},onMouseLeave:k=>{k.currentTarget.style.background="transparent"},children:n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:h?"rotate(90deg)":"rotate(0)",transition:"transform 0.15s ease"},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})})})]}),h&&n.jsxs("div",{className:"px-4 pb-3 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)"},children:[r.action==="add"&&r.eval&&n.jsx(Cv,{evalCase:r.eval}),r.action==="modify"&&r.eval&&m&&n.jsx(Av,{original:m,proposed:r.eval}),r.action==="remove"&&m&&n.jsx(_v,{evalCase:m})]})]})}function Cv({evalCase:r}){var u;return n.jsxs("div",{className:"pt-2.5 space-y-2",children:[n.jsx(Tc,{label:"Prompt",value:r.prompt}),n.jsx(Tc,{label:"Expected",value:r.expected_output}),n.jsxs("div",{children:[n.jsxs("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:["Assertions (",((u=r.assertions)==null?void 0:u.length)??0,")"]}),n.jsx("div",{className:"mt-1 space-y-1",children:(r.assertions??[]).map(d=>n.jsxs("div",{className:"text-[11px] flex items-start gap-1.5",style:{color:"var(--text-secondary)"},children:[n.jsx("span",{style:{color:"var(--green)"},children:"+"})," ",d.text]},d.id))})]})]})}function Av({original:r,proposed:u}){const d=[];r.name!==u.name&&d.push({label:"Name",old:r.name,new:u.name}),r.prompt!==u.prompt&&d.push({label:"Prompt",old:r.prompt,new:u.prompt}),r.expected_output!==u.expected_output&&d.push({label:"Expected",old:r.expected_output,new:u.expected_output});const o=r.assertions??[],m=u.assertions??[],h=new Set(o.map(x=>x.text)),v=new Set(m.map(x=>x.text)),j=m.filter(x=>!h.has(x.text)),p=o.filter(x=>!v.has(x.text));return n.jsxs("div",{className:"pt-2.5 space-y-2",children:[d.map(x=>n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:x.label}),n.jsxs("div",{className:"mt-1 text-[11px] font-mono rounded p-2",style:{background:"var(--surface-1)"},children:[n.jsxs("div",{style:{color:"var(--red)",textDecoration:"line-through"},children:["- ",Cc(x.old,120)]}),n.jsxs("div",{style:{color:"var(--green)"},children:["+ ",Cc(x.new,120)]})]})]},x.label)),(j.length>0||p.length>0)&&n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"Assertions"}),n.jsxs("div",{className:"mt-1 space-y-0.5",children:[p.map(x=>n.jsxs("div",{className:"text-[11px]",style:{color:"var(--red)"},children:["- ",x.text]},x.id)),j.map(x=>n.jsxs("div",{className:"text-[11px]",style:{color:"var(--green)"},children:["+ ",x.text]},x.id))]})]}),d.length===0&&j.length===0&&p.length===0&&n.jsx("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"No visible field changes"})]})}function _v({evalCase:r}){var u;return n.jsxs("div",{className:"pt-2.5 space-y-2",style:{opacity:.7},children:[n.jsx(Tc,{label:"Prompt",value:r.prompt}),n.jsxs("div",{children:[n.jsxs("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:["Assertions (",((u=r.assertions)==null?void 0:u.length)??0,")"]}),n.jsx("div",{className:"mt-1 space-y-0.5",children:(r.assertions??[]).map(d=>n.jsx("div",{className:"text-[11px]",style:{color:"var(--red)",textDecoration:"line-through"},children:d.text},d.id))})]})]})}function Tc({label:r,value:u}){return n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:r}),n.jsx("div",{className:"mt-0.5 text-[11px] p-2 rounded font-mono",style:{background:"var(--surface-1)",color:"var(--text-secondary)",whiteSpace:"pre-wrap"},children:Cc(u,300)})]})}function Cc(r,u){return r.length>u?r.slice(0,u)+"...":r}const If={remove:0,modify:1,add:2};function kv({changes:r,selections:u,currentEvals:d,onToggle:o,onSelectAll:m,onDeselectAll:h}){if(r.length===0)return null;const v=r.map((p,x)=>({change:p,originalIndex:x}));v.sort((p,x)=>(If[p.change.action]??2)-(If[x.change.action]??2));const j=Array.from(u.values()).filter(Boolean).length;return n.jsxs("div",{className:"mt-3 animate-fade-in",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-[11px] font-semibold",style:{color:"var(--text-primary)"},children:"Test Case Changes"}),n.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:["(",j,"/",r.length," selected)"]})]}),n.jsxs("div",{className:"flex gap-1.5",children:[n.jsx("button",{onClick:m,className:"text-[10px] px-2 py-0.5 rounded transition-colors duration-150",style:{color:"var(--accent)",background:"transparent"},onMouseEnter:p=>{p.currentTarget.style.background="var(--accent-muted)"},onMouseLeave:p=>{p.currentTarget.style.background="transparent"},children:"Select All"}),n.jsx("button",{onClick:h,className:"text-[10px] px-2 py-0.5 rounded transition-colors duration-150",style:{color:"var(--text-tertiary)",background:"transparent"},onMouseEnter:p=>{p.currentTarget.style.background="var(--surface-3)"},onMouseLeave:p=>{p.currentTarget.style.background="transparent"},children:"Deselect All"})]})]}),n.jsx("div",{className:"space-y-1.5 overflow-auto",style:{maxHeight:240},children:v.map(({change:p,originalIndex:x})=>n.jsx(Tv,{change:p,index:x,selected:u.get(x)??!1,onToggle:o,originalEval:p.evalId!=null?d.find(N=>N.id===p.evalId):void 0},x))})]})}function Rv(){var z;const{state:r,dispatch:u,submitAiEdit:d,applyAiEdit:o,discardAiEdit:m,cancelAiEdit:h,toggleEvalChange:v,selectAllEvalChanges:j,deselectAllEvalChanges:p,retryEvalsSave:x}=Bt(),{aiEditLoading:N,aiEditResult:b,aiEditError:k,aiEditClassifiedError:U,aiEditProgress:H,aiEditEvalChanges:Q,aiEditEvalSelections:G,aiEditEvalsRetry:ne}=r,[I,re]=g.useState(""),[K,se]=g.useState(null),[$,le]=g.useState("claude-cli"),[W,me]=g.useState("opus"),xe=g.useRef(null);g.useEffect(()=>{var O;(O=xe.current)==null||O.focus()},[]),g.useEffect(()=>{ge.getConfig().then(O=>{se(O),O.providers.find(Z=>Z.id==="claude-cli"&&Z.available)&&(le("claude-cli"),me("opus"))}).catch(()=>{})},[]);const je=K==null?void 0:K.providers.find(O=>O.id===$&&O.available),Se=g.useCallback(()=>{const O=I.trim();!O||N||d(O,$,W)},[I,N,d,$,W]),X=g.useCallback(O=>{O.key==="Enter"&&!O.shiftKey&&(O.preventDefault(),Se()),O.key==="Escape"&&(O.preventDefault(),N?h():m())},[Se,N,h,m]),J=g.useCallback(()=>{u({type:"CLOSE_AI_EDIT"}),u({type:"OPEN_AI_EDIT"})},[u]),F=b?Mc(r.skillContent,b.improved):[],M=((z=r.evals)==null?void 0:z.evals)??[];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:O=>{O.currentTarget.style.background="var(--surface-3)"},onMouseLeave:O=>{O.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:[!b&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-end gap-2.5",children:[n.jsx("div",{className:"flex-1",children:n.jsx("textarea",{ref:xe,value:I,onChange:O=>re(O.target.value),onKeyDown:X,placeholder:"e.g., Add an error handling section...",disabled:N,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:O=>{const ee=O.currentTarget;ee.style.height="auto",ee.style.height=Math.min(ee.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:$,onChange:O=>{le(O.target.value);const ee=K==null?void 0:K.providers.find(Z=>Z.id===O.target.value);ee!=null&&ee.models[0]&&me(ee.models[0].id)},disabled:N,style:{width:"100%"},children:K==null?void 0:K.providers.filter(O=>O.available).map(O=>n.jsx("option",{value:O.id,children:O.label},O.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:O=>me(O.target.value),disabled:N,style:{width:"100%"},children:je==null?void 0:je.models.map(O=>n.jsx("option",{value:O.id,children:O.label},O.id))})]}),N?n.jsx("button",{onClick:h,className:"btn btn-secondary flex-shrink-0 text-[11px]",style:{padding:"6px 14px"},children:"Cancel"}):n.jsx("button",{onClick:Se,disabled:!I.trim(),className:"btn btn-primary flex-shrink-0 text-[11px]",style:{padding:"6px 14px"},children:"Submit"})]}),N&&H.length>0&&n.jsx("div",{className:"mt-2.5",children:n.jsx(zc,{entries:H,isRunning:!0})})]}),k&&n.jsx("div",{className:"mt-3",children:U?n.jsx(wc,{error:U,onRetry:J,onDismiss:m}):n.jsx("div",{className:"px-3 py-2.5 rounded-lg text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:k})}),b&&n.jsxs("div",{className:"animate-fade-in",children:[b.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: "}),b.reasoning]}),n.jsx("div",{className:"mb-1",children:n.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--text-primary)"},children:"SKILL.md Changes"})}),n.jsx("div",{className:"rounded-lg overflow-hidden mb-3",style:{border:"1px solid var(--border-subtle)",maxHeight:300,overflowY:"auto"},children:F.map((O,ee)=>n.jsxs("div",{className:"px-3 py-0.5 text-[10.5px] font-mono",style:{background:O.type==="added"?"rgba(34,197,94,0.1)":O.type==="removed"?"rgba(239,68,68,0.1)":"transparent",color:O.type==="added"?"var(--green)":O.type==="removed"?"var(--red)":"var(--text-secondary)",borderLeft:O.type==="added"?"3px solid var(--green)":O.type==="removed"?"3px solid var(--red)":"3px solid transparent"},children:[n.jsx("span",{style:{userSelect:"none",opacity:.5,marginRight:8},children:O.type==="added"?"+":O.type==="removed"?"-":" "}),O.content]},ee))}),n.jsx(kv,{changes:Q,selections:G,currentEvals:M,onToggle:v,onSelectAll:j,onDeselectAll:p}),ne&&n.jsxs("div",{className:"mt-3 px-3 py-2.5 rounded-lg text-[12px] flex items-center justify-between",style:{background:"rgba(251,191,36,0.12)",border:"1px solid rgba(251,191,36,0.3)",color:"#fbbf24"},children:[n.jsx("span",{children:"Test case save failed. SKILL.md was saved successfully."}),n.jsx("button",{onClick:x,className:"btn text-[11px]",style:{background:"rgba(251,191,36,0.2)",color:"#fbbf24",padding:"3px 10px"},children:"Retry Save"})]}),n.jsxs("div",{className:"flex gap-2 mt-3",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:J,className:"btn btn-ghost text-[11px]",style:{padding:"5px 12px"},children:"Try Again"})]})]})]})]})}function Mv({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 zv({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 wv({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 Ov({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 Dv(){const{state:r,dispatch:u,saveContent:d}=Bt(),{plugin:o,skill:m,skillContent:h,isDirty:v,improveTarget:j,aiEditOpen:p}=r,[x,N]=g.useState("split"),[b,k]=g.useState(!1),U=g.useRef(null),{metadata:H,body:Q}=bv(h),G=H["allowed-tools"],ne=Array.isArray(G)?G:typeof G=="string"?[G]:[],I=H.name,re=H.description,K=H.metadata,se=typeof K=="object"&&!Array.isArray(K)?K:null,$=H.version||(se==null?void 0:se.version),le=H.tags||(se==null?void 0:se.tags),W=Array.isArray(le)?le:typeof le=="string"?le.split(",").map(J=>J.trim()).filter(Boolean):[],me=new Set(["name","description","metadata","allowed-tools","version","tags"]),xe=Object.entries(H).filter(([J])=>!me.has(J)),je=g.useCallback(async()=>{k(!0),await d(),k(!1)},[d]),Se=g.useCallback(J=>{(J.ctrlKey||J.metaKey)&&J.key==="s"&&(J.preventDefault(),J.stopPropagation(),v&&je()),(J.ctrlKey||J.metaKey)&&J.key==="k"&&(J.preventDefault(),J.stopPropagation(),u({type:p?"CLOSE_AI_EDIT":"OPEN_AI_EDIT"}))},[v,je,p,u]),X=[{mode:"raw",icon:n.jsx(Mv,{}),label:"Editor"},{mode:"split",icon:n.jsx(zv,{}),label:"Split"},{mode:"preview",icon:n.jsx(wv,{}),label:"Preview"}];return n.jsxs("div",{className:"flex flex-col h-full",onKeyDown:Se,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:X.map(({mode:J,icon:F,label:M})=>n.jsxs("button",{onClick:()=>N(J),title:M,className:"flex items-center gap-1.5 rounded-md transition-all duration-150",style:{padding:"5px 10px",background:x===J?"var(--surface-4)":"transparent",color:x===J?"var(--text-primary)":"var(--text-tertiary)",fontSize:11,fontWeight:x===J?600:400,border:"none",cursor:"pointer"},children:[F,n.jsx("span",{style:{letterSpacing:"0.01em"},children:M})]},J))}),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(Ov,{size:13}),n.jsx("span",{children:"AI Edit"})]}),n.jsx("div",{style:{width:1,height:16,background:"var(--border-subtle)"}}),v&&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:je,disabled:!v||b,className:"btn btn-primary text-[11px]",style:{padding:"5px 14px"},children:b?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:U,value:h,onChange:J=>u({type:"SET_CONTENT",content:J.target.value}),onKeyDown:Se,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||$||re)&&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}),$&&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",$]})]}),re&&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:re})]}),W.length>0&&n.jsx("div",{className:"flex flex-wrap items-center gap-1.5",style:{marginBottom:16},children:W.map(J=>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:J},J))}),ne.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"}),ne.map(J=>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:J},J))]})}),xe.length>0&&n.jsx("div",{style:{marginBottom:16,padding:"8px 0",borderTop:"1px solid var(--border-subtle)",borderBottom:"1px solid var(--border-subtle)"},children:xe.map(([J,F],M)=>{const z=Array.isArray(F)?F.join(", "):typeof F=="object"?Object.entries(F).map(([O,ee])=>`${O}: ${Array.isArray(ee)?ee.join(", "):ee}`).join(" | "):F;return n.jsxs("div",{className:"flex items-baseline gap-3",style:{padding:"4px 0",borderTop:M>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:J}),n.jsx("span",{style:{fontSize:12,color:"var(--text-secondary)"},children:z})]},J)})}),(I||re||W.length>0||ne.length>0||xe.length>0)&&Q&&n.jsx("div",{style:{height:1,background:"linear-gradient(90deg, var(--accent) 0%, var(--border-subtle) 40%, transparent 100%)",marginBottom:20,opacity:.5}}),Q&&n.jsx("div",{className:"text-[13px] leading-relaxed overflow-x-auto",style:{color:"var(--text-secondary)",wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:um(Q)}})]})})]}),p&&n.jsx(Rv,{}),j!==null&&o&&m&&n.jsx("div",{style:{borderTop:"1px solid var(--border-subtle)"},children:n.jsx(Nv,{plugin:o,skill:m,skillContent:h,onApplied:J=>{u({type:"SET_CONTENT",content:J}),u({type:"CONTENT_SAVED"}),u({type:"CLOSE_IMPROVE"})}})})]})}function Ac(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function om(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 dm(r){return r==null?"--":r>=1e3?`${(r/1e3).toFixed(1)}s`:`${r}ms`}function fm({entries:r}){if(r.length<2)return null;const u=80,d=24,o=2,m=r.slice().reverse(),h=m.length,v=m.map((j,p)=>{const x=o+p/(h-1)*(u-o*2),N=o+(d-o*2)-j.pass_rate*(d-o*2);return`${x},${N}`});return n.jsxs("svg",{width:u,height:d,style:{display:"block",flexShrink:0},children:[n.jsx("polyline",{points:v.join(" "),fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),v.length>0&&n.jsx("circle",{cx:parseFloat(v[v.length-1].split(",")[0]),cy:parseFloat(v[v.length-1].split(",")[1]),r:2.5,fill:"var(--accent)"})]})}function Lv(r,u,d){const[o,m]=g.useState(null),[h,v]=g.useState(!1),j=g.useRef("");g.useEffect(()=>{const x=`${r}/${u}/${d}`;j.current!==x&&(j.current=x,v(!0),ge.getCaseHistory(r,u,d).then(N=>m(N)).catch(()=>m([])).finally(()=>v(!1)))},[r,u,d]);const p=g.useCallback(()=>{v(!0),j.current="",ge.getCaseHistory(r,u,d).then(x=>m(x)).catch(()=>m([])).finally(()=>v(!1))},[r,u,d]);return{entries:o,loading:h,refetch:p}}function Bv(r,u,d){const o={flaky:!1,nonDiscriminating:!1,regression:!1};if(!d||d.length===0)return o;const h=d.slice(0,10).map(p=>p.assertions.find(x=>x.id===r)).filter(Boolean);if(h.length>=2){const x=h.filter(N=>N.pass).length/h.length;x>=.3&&x<=.7&&(o.flaky=!0)}const v=d.find(p=>p.type==="benchmark"),j=d.find(p=>p.type==="baseline");if(v&&j){const p=v.assertions.find(N=>N.id===r),x=j.assertions.find(N=>N.id===r);p!=null&&p.pass&&(x!=null&&x.pass)&&(o.nonDiscriminating=!0)}if(u&&!u.pass&&d.length>=1){const x=d[0].assertions.find(N=>N.id===r);x!=null&&x.pass&&(o.regression=!0)}return o}function Uv(){var le;const{state:r,dispatch:u,saveEvals:d,runCase:o,runAll:m,cancelCase:h,cancelAll:v,generateEvals:j}=Bt(),{evals:p,selectedCaseId:x,inlineResults:N,caseRunStates:b,generateEvalsLoading:k,generateEvalsProgress:U,generateEvalsError:H}=r,Q=g.useMemo(()=>{for(const W of b.values())if(W.status==="running"||W.status==="queued")return!0;return!1},[b]),[G,ne]=g.useState(!1),I={skill_name:r.skill,evals:[]},re=p??I,K=re.evals,se=K.find(W=>W.id===x)??null,$=g.useCallback(()=>{j()},[j]);return!p||K.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:()=>ne(!0),className:"btn btn-primary text-[12px]",children:"Create Test Case"}),n.jsx("button",{onClick:$,disabled:k,className:"btn btn-secondary text-[12px]",children:k?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}})," Generating..."]}):"Generate with AI"})]}),k&&U.length>0&&n.jsx("div",{className:"w-full max-w-md mt-3",children:n.jsx(zc,{entries:U,isRunning:!0})}),H&&n.jsx("div",{className:"w-full max-w-md mt-3",children:n.jsx(wc,{error:H,onRetry:$})}),G&&n.jsx(Pf,{evals:re,onSave:W=>{d(W),ne(!1)},onCancel:()=>ne(!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 flex items-center justify-between",style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:["Test Cases (",K.length,")"]}),n.jsx("div",{className:"flex items-center gap-1.5",children:Q?n.jsx("button",{onClick:v,className:"btn text-[10px] px-2 py-0.5",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:"Cancel All"}):n.jsxs(n.Fragment,{children:[n.jsx("button",{onClick:()=>m("benchmark"),disabled:K.length===0,className:"btn btn-primary text-[10px] px-2 py-0.5",children:"Run All"}),n.jsx("button",{onClick:()=>m("comparison"),disabled:K.length===0,className:"btn btn-purple text-[10px] px-2 py-0.5",children:"Compare All"})]})})]}),n.jsx("div",{className:"py-1",children:K.map(W=>{const me=N.get(W.id),xe=x===W.id;return n.jsxs("button",{onClick:()=>u({type:"SELECT_CASE",caseId:W.id}),className:"w-full text-left px-3 py-2.5 transition-all duration-150",style:{background:xe?"var(--accent-muted)":"transparent",borderLeft:xe?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:je=>{xe||(je.currentTarget.style.background="var(--surface-2)")},onMouseLeave:je=>{xe||(je.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:xe?"var(--text-primary)":"var(--text-secondary)"},children:["#",W.id," ",W.name]}),n.jsx(mm,{result:me})]}),n.jsxs("div",{className:"text-[11px] flex items-center gap-2",style:{color:"var(--text-tertiary)"},children:[W.assertions.length," assertion",W.assertions.length!==1?"s":"",(me==null?void 0:me.passRate)!=null&&n.jsx(Yv,{passRate:me.passRate})]})]},W.id)})}),n.jsx("div",{className:"px-3 py-2",children:n.jsx("button",{onClick:()=>ne(!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:W=>{W.currentTarget.style.borderColor="var(--accent)",W.currentTarget.style.color="var(--accent)"},onMouseLeave:W=>{W.currentTarget.style.borderColor="var(--border-default)",W.currentTarget.style.color="var(--text-tertiary)"},children:"+ Add Test Case"})})]}),n.jsx("div",{className:"overflow-auto",children:se?n.jsx(Hv,{evalCase:se,result:N.get(se.id),evals:p,caseStatus:((le=b.get(se.id))==null?void 0:le.status)??"idle",onSaveEvals:d,onRun:W=>o(W,"benchmark"),onCompare:W=>o(W,"comparison"),onCancel:W=>h(W),onImprove:W=>u({type:"OPEN_IMPROVE",evalId:W})}):n.jsx("div",{className:"flex items-center justify-center h-full text-[13px]",style:{color:"var(--text-tertiary)"},children:"Select a test case"})}),G&&n.jsx(Pf,{evals:re,onSave:W=>{d(W),ne(!1)},onCancel:()=>ne(!1)})]})}function Hv({evalCase:r,result:u,evals:d,caseStatus:o,onSaveEvals:m,onRun:h,onCompare:v,onCancel:j,onImprove:p}){const{state:x}=Bt(),{plugin:N,skill:b}=x,{entries:k,loading:U}=Lv(N,b,r.id),[H,Q]=g.useState(!1),[G,ne]=g.useState(r.prompt),[I,re]=g.useState(!1),[K,se]=g.useState(r.expected_output);g.useState(()=>{ne(r.prompt),se(r.expected_output)});const $=g.useCallback(F=>{m({...d,evals:d.evals.map(M=>M.id===F.id?F:M)})},[d,m]),le=g.useCallback(()=>{$({...r,prompt:G}),Q(!1)},[r,G,$]),W=g.useCallback(()=>{$({...r,expected_output:K}),re(!1)},[r,K,$]),me=g.useCallback(()=>{$({...r,assertions:[...r.assertions,{id:`assert-${Date.now()}`,text:"New assertion",type:"boolean"}]})},[r,$]),xe=g.useCallback((F,M)=>{$({...r,assertions:r.assertions.map(z=>z.id===F?{...z,text:M}:z)})},[r,$]),je=g.useCallback(F=>{$({...r,assertions:r.assertions.filter(M=>M.id!==F)})},[r,$]),Se=g.useCallback(()=>{confirm("Delete this test case?")&&m({...d,evals:d.evals.filter(F=>F.id!==r.id)})},[d,r.id,m]),X=u&&u.assertions.length>0&&u.assertions.every(F=>F.pass),J=u&&u.assertions.some(F=>!F.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(mm,{result:u})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[o==="running"||o==="queued"?n.jsxs("button",{onClick:()=>j(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:()=>h(r.id),className:"btn btn-primary text-[12px]",children:"Run"}),n.jsx("button",{onClick:()=>v(r.id),className:"btn btn-purple text-[12px]",children:"A/B Compare"})]}),J&&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:Se,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"})]})})]})]}),X&&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(gc,{title:"Prompt",children:H?n.jsxs("div",{children:[n.jsx("textarea",{value:G,onChange:F=>ne(F.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:le,className:"btn btn-primary text-[12px]",children:"Save"}),n.jsx("button",{onClick:()=>{ne(r.prompt),Q(!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)",maxHeight:200,overflowY:"auto"},onClick:()=>Q(!0),onMouseEnter:F=>{F.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:F=>{F.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(gc,{title:"Expected Output",children:I?n.jsxs("div",{children:[n.jsx("textarea",{value:K,onChange:F=>se(F.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:W,className:"btn btn-primary text-[12px]",children:"Save"}),n.jsx("button",{onClick:()=>{se(r.expected_output),re(!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)",maxHeight:200,overflowY:"auto"},onClick:()=>re(!0),onMouseEnter:F=>{F.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:F=>{F.currentTarget.style.borderColor="var(--border-subtle)"},children:r.expected_output||n.jsx("span",{style:{fontStyle:"italic"},children:"Click to edit expected output..."})})}),n.jsx(gc,{title:`Assertions (${r.assertions.length})`,action:n.jsx("button",{onClick:me,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(F=>{const M=u==null?void 0:u.assertions.find(O=>O.assertion_id===F.id),z=Bv(F.id,M,k);return n.jsx(qv,{assertion:F,result:M,badges:z,onUpdate:O=>xe(F.id,O),onDelete:()=>je(F.id)},F.id)})})}),(u==null?void 0:u.output)&&n.jsx(Gv,{output:u.output,durationMs:u.durationMs,tokens:u.tokens}),n.jsx(Vv,{evalId:r.id,sharedEntries:k,sharedLoading:U})]},r.id)}function qv({assertion:r,result:u,badges:d,onUpdate:o,onDelete:m}){const[h,v]=g.useState(!1),[j,p]=g.useState(r.text),[x,N]=g.useState(!1),b=()=>{o(j),v(!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 rounded-full flex-shrink-0",style:{width:18,height:18,border:"1.5px dashed var(--text-tertiary)",background:"transparent"},title:"Not run yet"}),(d==null?void 0:d.regression)&&n.jsx("span",{className:"mt-0.5 flex-shrink-0",title:"Regression: was passing, now failing",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:16,height:18,color:"var(--red)",fontSize:14,fontWeight:700,lineHeight:1},children:n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("polyline",{points:"19 12 12 19 5 12"})]})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("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}),(d==null?void 0:d.flaky)&&n.jsx("span",{title:"Flaky: 30-70% pass rate across recent runs",style:{display:"inline-block",fontSize:9,fontWeight:600,lineHeight:1,padding:"2px 6px",borderRadius:9999,background:"rgba(234, 179, 8, 0.15)",color:"#ca8a04",whiteSpace:"nowrap"},children:"Flaky"}),(d==null?void 0:d.nonDiscriminating)&&n.jsx("span",{title:"Non-discriminating: passes on both skill and baseline runs",style:{display:"inline-block",fontSize:9,fontWeight:600,lineHeight:1,padding:"2px 6px",borderRadius:9999,background:"var(--surface-3)",color:"var(--text-tertiary)",whiteSpace:"nowrap"},children:"Non-Discrim."})]}),h?n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:j,onChange:k=>p(k.target.value),onKeyDown:k=>{k.key==="Enter"&&b(),k.key==="Escape"&&v(!1)},className:"input-field flex-1 text-[12px]",autoFocus:!0}),n.jsx("button",{onClick:b,className:"btn btn-primary text-[11px]",children:"Save"})]}):n.jsx("div",{className:"text-[12px] cursor-pointer",style:{color:"var(--text-secondary)"},onClick:()=>{p(r.text),v(!0)},children:r.text}),(u==null?void 0:u.reasoning)&&n.jsx("button",{onClick:()=>N(!x),className:"text-[11px] mt-1 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:x?"Hide reasoning":"Show reasoning"}),x&&(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:m,className:"btn btn-ghost p-1 opacity-0 group-hover:opacity-100",style:{color:"var(--text-tertiary)"},onMouseEnter:k=>{k.currentTarget.style.color="var(--red)",k.currentTarget.style.opacity="1"},onMouseLeave:k=>{k.currentTarget.style.color="var(--text-tertiary)",k.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 gc({title:r,action:u,children:d}){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]}),d]})}function mm({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 Yv({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 Gv({output:r,durationMs:u,tokens:d}){const[o,m]=g.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)"]}),d!=null&&n.jsxs("span",{style:{fontWeight:400},children:["(",d," 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 Vv({evalId:r,sharedEntries:u,sharedLoading:d}){const{state:o,dispatch:m}=Bt(),{plugin:h,skill:v}=o,[j,p]=g.useState(!0),x=u??null,N=d??!1,b=g.useCallback(()=>{p(!j)},[j]),k=x?x.slice(0,10):[];return n.jsxs("div",{className:"mb-5",children:[n.jsxs("button",{onClick:b,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",x&&x.length>0&&n.jsxs("span",{style:{fontWeight:400},children:["(",x.length," run",x.length!==1?"s":"",")"]})]}),j&&n.jsx("div",{className:"animate-fade-in",children:N?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..."})]}):!x||x.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:[k.length>=2&&n.jsx("div",{className:"mb-2",children:n.jsx(fm,{entries:k})}),n.jsx("div",{className:"space-y-2",children:k.map((U,H)=>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:om(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:Ac(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:dm(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(Q=>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:Q.pass?"var(--green-muted)":"var(--red-muted)"},children:Q.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:Q.text})]},Q.id))})]},H))}),n.jsx("button",{onClick:()=>m({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 Pf({evals:r,onSave:u,onCancel:d}){const[o,m]=g.useState(""),[h,v]=g.useState(""),[j,p]=g.useState(""),[x,N]=g.useState([{id:`assert-${Date.now()}`,text:"",type:"boolean"}]),b=Math.max(0,...r.evals.map(U=>U.id))+1,k=()=>{if(!o.trim()||!h.trim())return;const U={id:b,name:o.trim(),prompt:h.trim(),expected_output:j.trim(),files:[],assertions:x.filter(H=>H.text.trim())};u({...r,evals:[...r.evals,U]})};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:U=>m(U.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:h,onChange:U=>v(U.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:j,onChange:U=>p(U.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((U,H)=>n.jsxs("div",{className:"flex gap-2 mb-2",children:[n.jsx("input",{value:U.text,onChange:Q=>N(x.map((G,ne)=>ne===H?{...G,text:Q.target.value}:G)),className:"input-field flex-1 text-[12px]",placeholder:"e.g., Output includes a greeting"}),x.length>1&&n.jsx("button",{onClick:()=>N(x.filter((Q,G)=>G!==H)),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"})]})})]},U.id)),n.jsx("button",{onClick:()=>N([...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:d,className:"btn btn-secondary text-[12px]",children:"Cancel"}),n.jsx("button",{onClick:k,disabled:!o.trim()||!h.trim(),className:"btn btn-primary text-[12px]",children:"Save"})]})]})})}function Qv(){const{state:r,runCase:u,runAll:d,cancelCase:o,cancelAll:m}=Bt(),{evals:h,caseRunStates:v,bulkRunActive:j,latestBenchmark:p,inlineResults:x}=r,N=(h==null?void 0:h.evals)??[],b=g.useMemo(()=>{for(const H of v.values())if(H.status==="running"||H.status==="queued")return!0;return!1},[v]),k=N.filter(H=>{const Q=v.get(H.id);return Q&&(Q.status==="complete"||Q.status==="error"||Q.status==="cancelled")}).length,U=N.filter(H=>{const Q=v.get(H.id);return Q&&(Q.status==="running"||Q.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"}),b&&n.jsxs("span",{className:"text-[11px] font-medium",style:{color:"var(--accent)"},children:[U," running"]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[b&&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:()=>d("comparison"),disabled:N.length===0||b,className:"btn btn-primary text-[12px]",children:"Compare All"}),n.jsx("button",{onClick:()=>d("benchmark"),disabled:N.length===0||b,className:"btn btn-secondary text-[12px]",children:"Skill Only"}),n.jsx("button",{onClick:()=>d("baseline"),disabled:N.length===0||b,className:"btn btn-secondary text-[12px]",children:"Baseline Only"})]})]}),b&&N.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: ",k,"/",N.length," cases"]}),n.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[Math.round(k/N.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:`${k/N.length*100}%`,background:"var(--accent)"}})})]}),n.jsx("div",{className:"space-y-3 stagger-children",children:N.map(H=>{const Q=x.get(H.id),G=v.get(H.id),ne=(G==null?void 0:G.status)??"idle";return n.jsx(Zv,{name:H.name,evalId:H.id,result:Q,caseStatus:ne,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)},H.id)})}),!b&&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.overall_pass_rate===1&&!p.comparison&&n.jsx("button",{onClick:()=>d("comparison"),disabled:N.length===0,className:"text-[13px] font-semibold mt-3 w-full rounded-lg transition-opacity duration-150",style:{padding:"10px 0",background:"var(--green, #22c55e)",color:"#fff",border:"none",cursor:"pointer",opacity:N.length===0?.5:1},children:"Run Final A/B Comparison"})]}),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(em,{label:"Skill",value:p.comparison.skillPassRate,color:"var(--accent)"}),n.jsx(em,{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 Xv={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 Zv({name:r,evalId:u,result:d,caseStatus:o,runMode:m,onRun:h,onBaseline:v,onCompare:j,onCancel:p}){const[x,N]=g.useState(!1),b=o==="running"||o==="queued",k=o==="complete"||o==="error";return n.jsxs("div",{className:"rounded-xl overflow-hidden transition-all duration-200",style:{background:"var(--surface-1)",border:b?"1px solid var(--accent)":"1px solid var(--border-subtle)",boxShadow:b?"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&&(b||k)&&(()=>{const U=Xv[m];return U?n.jsx("span",{className:"pill text-[9px] font-semibold",style:{background:U.bg,color:U.color,padding:"1px 6px"},children:U.label}):null})()]}),n.jsxs("div",{className:"flex items-center gap-2",children:[b?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:()=>j(u),className:"btn btn-primary text-[10px] px-2 py-1",children:"Compare"}),n.jsx("button",{onClick:()=>h(u),className:"btn btn-secondary text-[10px] px-2 py-1",children:"Skill"}),n.jsx("button",{onClick:()=>v(u),className:"btn btn-secondary text-[10px] px-2 py-1",children:"Base"})]}),d&&d.status!=null&&n.jsx("span",{className:"pill text-[10px]",style:{background:d.status==="pass"?"var(--green-muted)":(d.status==="error","var(--red-muted)"),color:d.status==="pass"?"var(--green)":"var(--red)"},children:d.passRate!=null?`${Math.round(d.passRate*100)}%`:d.status}),o==="cancelled"&&n.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:"cancelled"})]})]}),d&&d.assertions.length>0&&n.jsxs("div",{className:"px-4 pb-3",children:[n.jsx("div",{className:"space-y-1",children:d.assertions.map(U=>n.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[n.jsx("span",{style:{color:U.pass?"var(--green)":"var(--red)"},children:U.pass?"PASS":"FAIL"}),n.jsx("span",{style:{color:"var(--text-secondary)"},children:U.text})]},U.assertion_id))}),d.output&&n.jsx("button",{onClick:()=>N(!x),className:"text-[11px] mt-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:x?"Hide output":"Show output"}),x&&d.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:d.output})]}),d&&d.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:d.errorMessage})})]})}function em({label:r,value:u,color:d}){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:d},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:d}})})]})}const tm={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)"}},Kv=[{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 Jv(){const{state:r,dispatch:u,runActivationTest:d}=Bt(),{plugin:o,skill:m,activationPrompts:h,activationResults:v,activationSummary:j,activationRunning:p,activationError:x}=r,[N,b]=g.useState(h),[k,U]=g.useState(null),[H,Q]=g.useState(!1);g.useEffect(()=>{u({type:"SET_ACTIVATION_PROMPTS",prompts:N})},[N,u]),g.useEffect(()=>{fetch(`/api/skills/${o}/${m}/description`).then(K=>K.json()).then(K=>U(K.rawContent||K.description||null)).catch(()=>U(null))},[o,m]);function G(){d(N)}function ne(K){const se=N.trim(),$=se?`${se}
|
|
59
|
+
${K.join(`
|
|
60
|
+
`)}`:K.join(`
|
|
61
|
+
`);b($)}const I=v.filter(K=>K.classification==="TP"||K.classification==="TN"),re=v.filter(K=>K.classification==="FP"||K.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:Kv.map(K=>n.jsxs("button",{onClick:()=>ne(K.prompts),className:"text-[10px] px-2 py-1 rounded-md transition-colors duration-150",style:{background:"var(--surface-2)",color:"var(--text-tertiary)"},onMouseEnter:se=>{se.currentTarget.style.color="var(--text-primary)",se.currentTarget.style.background="var(--surface-3)"},onMouseLeave:se=>{se.currentTarget.style.color="var(--text-tertiary)",se.currentTarget.style.background="var(--surface-2)"},children:["+ ",K.label]},K.label))})]}),n.jsx("textarea",{className:"input-field h-32 resize-y font-mono text-[12px]",value:N,onChange:K=>b(K.target.value),placeholder:`How do I write a unit test?
|
|
62
|
+
What edge cases should I test?
|
|
63
|
+
+Deploy this to production
|
|
64
|
+
!What's the weather like today?
|
|
65
|
+
!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:[N.trim().split(`
|
|
66
|
+
`).filter(Boolean).length," prompt",N.trim().split(`
|
|
67
|
+
`).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 ${H?"flex-1":""}`,children:[n.jsxs("button",{onClick:()=>Q(!H),className:"w-full p-3 flex items-center justify-between text-left flex-shrink-0",style:{borderBottom:H?"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:H?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),H&&k&&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:um(k)}})}),!H&&k&&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:k.replace(/^---[\s\S]*?---\s*/,"").trim().slice(0,150)})})]})})]}),n.jsx("button",{onClick:G,disabled:p||!N.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}),v.length>0&&n.jsxs("div",{className:"space-y-5 mb-5",children:[re.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 (",re.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:re.map((K,se)=>n.jsx(lm,{result:K},`incorrect-${se}`))})]}),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((K,se)=>n.jsx(lm,{result:K},`correct-${se}`))})]})]}),j&&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"}),j.autoClassifiedCount!=null&&j.autoClassifiedCount>0&&n.jsxs("div",{className:"text-[11px] mb-3",style:{color:"var(--text-tertiary)"},children:[j.autoClassifiedCount," of ",j.total," prompts auto-classified from skill name and tags"]}),n.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-5",children:[n.jsx(bc,{label:"Precision",value:j.precision,description:"Of all activations, how many were correct?",detail:`${j.tp} true / ${j.tp+j.fp} total activations`}),n.jsx(bc,{label:"Recall",value:j.recall,description:"Of expected activations, how many fired?",detail:`${j.tp} activated / ${j.tp+j.fn} expected`}),n.jsx(bc,{label:"Reliability",value:j.reliability,description:"Overall correct classification rate",detail:`${j.tp+j.tn} correct / ${j.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:j.tp,bg:"var(--green-muted)",color:"var(--green)",description:"Correctly activated"}),n.jsx(Zs,{label:"False Positive",abbr:"FP",count:j.fp,bg:"var(--red-muted)",color:"var(--red)",description:"Wrongly activated"}),n.jsx(Zs,{label:"False Negative",abbr:"FN",count:j.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:j.tn,bg:"rgba(52,211,153,0.06)",color:"rgba(52,211,153,0.6)",description:"Correctly silent"})]})]})]}),p&&v.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 lm({result:r}){const u=tm[r.classification]||tm.FN,d=r.classification==="TP"||r.classification==="TN";return n.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl transition-all duration-200",style:{background:u.bg,border:"1px solid transparent"},children:[n.jsx("div",{className:"flex-shrink-0 mt-0.5",children:n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:`color-mix(in srgb, ${u.text} 20%, transparent)`},children:d?n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:u.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}):n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:u.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"flex items-center gap-2 mb-1",children:n.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:r.prompt})}),n.jsxs("div",{className:"flex items-center gap-3 text-[12px]",children:[n.jsx("span",{className:"pill",style:{background:"rgba(0,0,0,0.1)",color:u.text,fontWeight:700,fontSize:"10px",padding:"1px 6px"},children:r.classification}),n.jsx("span",{style:{color:r.activate?"var(--green)":"var(--text-tertiary)"},children:r.activate?"Activated":"Silent"}),n.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 bc({label:r,value:u,description:d,detail:o}){const m=Math.round(u*100),h=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:h},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:d}),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:d,color:o,description:m}){return n.jsxs("div",{className:"text-center p-3 rounded-lg",style:{background:d},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 jc={benchmark:"#6383ff",comparison:"#a78bfa",baseline:"#fb923c"},am={benchmark:"Benchmark",comparison:"Comparison",baseline:"Baseline"},_c=600,kc=180,lt=40,Sc=_c-lt*2,Al=kc-lt*2,$v=[25,50,75,100];function nm(r){return new Date(r).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Wv({entries:r}){const[u,d]=g.useState(null);if(r.length<2)return null;const o=r.length,m=r.map((j,p)=>{const x=lt+p/(o-1)*Sc,N=j.passRate*100,b=lt+Al-N/100*Al;return{x,y:b,pct:N,entry:j}}),h=m.map(j=>`${j.x},${j.y}`).join(" "),v=Array.from(new Set(r.map(j=>j.type)));return n.jsxs("div",{className:"glass-card p-5 animate-fade-in",style:{position:"relative"},children:[n.jsx("div",{className:"text-[13px] font-semibold mb-2",style:{color:"var(--text-primary)"},children:"Pass Rate Trend"}),n.jsx("div",{className:"flex items-center gap-5 mb-3",children:v.map(j=>n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-3 h-3 rounded-full",style:{background:jc[j]??"var(--text-tertiary)"}}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:am[j]??j})]},j))}),n.jsxs("svg",{width:_c,height:kc,viewBox:`0 0 ${_c} ${kc}`,style:{display:"block",overflow:"visible"},children:[$v.map(j=>{const p=lt+Al-j/100*Al;return n.jsxs("g",{children:[n.jsx("line",{x1:lt,y1:p,x2:lt+Sc,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:[j,"%"]})]},j)}),n.jsx("line",{x1:lt,y1:lt+Al,x2:lt+Sc,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:h,fill:"none",stroke:"var(--border-subtle)",strokeWidth:1.5,strokeLinejoin:"round"}),m.map((j,p)=>n.jsx("circle",{cx:j.x,cy:j.y,r:5,fill:jc[j.entry.type]??"var(--text-tertiary)",stroke:"var(--surface-2)",strokeWidth:2,style:{cursor:"pointer",transition:"r 0.15s ease"},onMouseEnter:x=>{x.currentTarget.setAttribute("r","7"),d({x:j.x,y:j.y,entry:j.entry})},onMouseLeave:x=>{x.currentTarget.setAttribute("r","5"),d(null)}},p)),Fv(o).map(j=>n.jsx("text",{x:m[j].x,y:lt+Al+16,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:10},children:nm(r[j].timestamp)},j))]}),u&&n.jsxs("div",{style:{position:"absolute",left:u.x,top:u.y-12,transform:"translate(-50%, -100%)",background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:8,padding:"8px 12px",pointerEvents:"none",zIndex:10,whiteSpace:"nowrap"},children:[n.jsx("div",{className:"text-[11px] font-medium",style:{color:"var(--text-primary)"},children:nm(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:jc[u.entry.type]??"var(--text-tertiary)",color:"#fff"},children:am[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 Fv(r){return r<=3?Array.from({length:r},(u,d)=>d):r<=6?[0,Math.floor(r/2),r-1]:[0,Math.floor(r/3),Math.floor(2*r/3),r-1]}function Ks(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function Iv(r){return r>=1e3?`${(r/1e3).toFixed(1)}s`:`${Math.round(r)}ms`}function Pv({rate:r,label:u}){const d=Math.round(r*100);return n.jsx("div",{className:"flex items-center gap-3",children:n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-[11px] truncate",style:{color:"var(--text-primary)",maxWidth:"70%"},children:u}),n.jsxs("span",{className:"text-[11px] font-semibold",style:{color:Ks(r)},children:[d,"%"]})]}),n.jsx("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:"var(--surface-3)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${d}%`,background:Ks(r)}})})]})})}function eh({points:r}){if(r.length<2)return null;const u=200,d=48,o=4,m=r.length,h=r.map((p,x)=>{const N=o+x/(m-1)*(u-o*2),b=o+(d-o*2)-p.passRate*(d-o*2);return{x:N,y:b}}),v=`M ${h[0].x},${d-o} `+h.map(p=>`L ${p.x},${p.y}`).join(" ")+` L ${h[h.length-1].x},${d-o} Z`,j=h.map((p,x)=>`${x===0?"M":"L"} ${p.x},${p.y}`).join(" ");return n.jsxs("svg",{width:u,height:d,style:{display:"block"},children:[n.jsx("path",{d:v,fill:"var(--accent-muted)"}),n.jsx("path",{d:j,fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),n.jsx("circle",{cx:h[h.length-1].x,cy:h[h.length-1].y,r:3,fill:"var(--accent)"})]})}function th({plugin:r,skill:u}){const[d,o]=g.useState(null),[m,h]=g.useState(!0);if(g.useEffect(()=>{h(!0),ge.getStats(r,u).then(o).catch(()=>o(null)).finally(()=>h(!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(!d||d.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 v=d.trendPoints.length>0?d.trendPoints[d.trendPoints.length-1].passRate:0,j=d.trendPoints.length>0?d.trendPoints[0].passRate:0,p=v-j,x=d.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:d.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(v)},children:[Math.round(v*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:d.modelStats.length})]})]}),d.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(eh,{points:d.trendPoints})]}),d.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:d.modelStats.map(N=>n.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("td",{style:{padding:"8px",color:"var(--text-primary)",fontWeight:500},children:N.model}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:N.runs}),n.jsx("td",{style:{padding:"8px",textAlign:"center"},children:n.jsxs("span",{className:"font-semibold",style:{color:Ks(N.avgPassRate)},children:[Math.round(N.avgPassRate*100),"%"]})}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:Iv(N.avgDurationMs)})]},N.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(N=>n.jsxs("button",{className:"block w-full text-left rounded-lg p-2 -mx-2 transition-colors duration-150",style:{background:"transparent"},onMouseEnter:b=>{b.currentTarget.style.background="var(--surface-2)"},onMouseLeave:b=>{b.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:["#",N.evalId]}),n.jsx("span",{className:"text-[10px] truncate",style:{color:"var(--text-tertiary)"},children:N.evalName}),n.jsxs("span",{className:"text-[10px] ml-auto flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[N.totalRuns," runs"]})]}),n.jsx(Pv,{rate:N.passRate,label:N.text})]},`${N.evalId}:${N.id}`))})]})]})}function lh({plugin:r,skill:u}){const[d,o]=g.useState(null),[m,h]=g.useState(null),[v,j]=g.useState({}),[p,x]=g.useState({});g.useEffect(()=>{ge.getEvals(r,u).then(o).catch(()=>o(null))},[r,u]);async function N(b){if(m===b){h(null);return}if(h(b),!v[b]){x(k=>({...k,[b]:!0}));try{const k=await ge.getCaseHistory(r,u,b);j(U=>({...U,[b]:k}))}catch{j(k=>({...k,[b]:[]}))}finally{x(k=>({...k,[b]:!1}))}}}return d?n.jsx("div",{className:"space-y-2 stagger-children",children:d.evals.map(b=>{const k=v[b.id]||[],U=m===b.id,H=p[b.id],Q=k.length>0?k[0].pass_rate:null;return n.jsxs("div",{className:"glass-card overflow-hidden",children:[n.jsxs("button",{onClick:()=>N(b.id),className:"w-full text-left p-4 flex items-center gap-3 transition-colors duration-150",style:{background:U?"var(--surface-2)":"transparent"},onMouseEnter:G=>{U||(G.currentTarget.style.background="var(--surface-2)")},onMouseLeave:G=>{U||(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:U?"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:["#",b.id]}),n.jsx("span",{className:"text-[13px] font-medium flex-1 truncate",style:{color:"var(--text-primary)"},children:b.name}),k.length>=2&&n.jsx(fm,{entries:k}),Q!=null&&n.jsxs("span",{className:"text-[12px] font-semibold flex-shrink-0",style:{color:Ac(Q)},children:[Math.round(Q*100),"%"]}),k.length>0&&n.jsxs("span",{className:"text-[10px] flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[k.length," runs"]})]}),U&&n.jsx("div",{className:"border-t animate-fade-in",style:{borderColor:"var(--border-subtle)"},children:H?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..."})]}):k.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:k.map((G,ne)=>n.jsxs("div",{className:"p-4",style:{background:ne===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:om(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:Ac(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:dm(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))})]},ne))})})]},b.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 ah(){const{state:r,dispatch:u}=Bt(),{plugin:d,skill:o}=r,[m,h]=g.useState("timeline"),[v,j]=g.useState([]),[p,x]=g.useState(!0),[N,b]=g.useState(""),[k,U]=g.useState(""),[H,Q]=g.useState(!1),[G,ne]=g.useState([]),[I,re]=g.useState(null),[K,se]=g.useState(!1),[$,le]=g.useState(null),[W,me]=g.useState(!1);g.useEffect(()=>{x(!0),ge.getHistory(d,o,{model:N||void 0,type:k||void 0}).then(X=>{j(X),X.length>=2&&ge.compareRuns(d,o,X[0].timestamp,X[1].timestamp).then(J=>{const F=J.regressions.filter(M=>M.change==="regression");u({type:"SET_REGRESSIONS",regressions:F})}).catch(()=>{})}).catch(()=>{}).finally(()=>x(!1))},[d,o,N,k]);const xe=g.useCallback(async X=>{if(H){ne(J=>J.includes(X)?J.filter(F=>F!==X):J.length>=2?[J[1],X]:[...J,X]);return}me(!0);try{const J=await ge.getHistoryEntry(d,o,X);le(J)}catch{}finally{me(!1)}},[d,o,H]),je=g.useCallback(async()=>{if(G.length===2){se(!0);try{const X=await ge.compareRuns(d,o,G[0],G[1]);re(X)}catch{}finally{se(!1)}}},[d,o,G]),Se=[...new Set(v.map(X=>X.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(X=>n.jsx("button",{onClick:()=>h(X),className:"px-4 py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:m===X?"var(--accent-muted)":"transparent",color:m===X?"var(--accent)":"var(--text-tertiary)"},children:X==="timeline"?"Timeline":X==="per-eval"?"Per Eval":"Statistics"},X))}),m==="timeline"&&n.jsxs("div",{children:[v.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(Wv,{entries:v})}),n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsxs("select",{value:N,onChange:X=>b(X.target.value),className:"input-field text-[12px]",style:{width:150},children:[n.jsx("option",{value:"",children:"All Models"}),Se.map(X=>n.jsx("option",{value:X,children:X},X))]}),n.jsxs("select",{value:k,onChange:X=>U(X.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:()=>{Q(!H),ne([]),re(null)},className:`btn text-[12px] ${H?"btn-primary":"btn-secondary"}`,children:H?"Exit Compare":"Compare Runs"}),H&&G.length===2&&n.jsx("button",{onClick:je,disabled:K,className:"btn btn-primary text-[12px]",children:K?"Comparing...":"Compare"})]}),n.jsx("div",{className:"space-y-2",children:v.length===0?n.jsx("div",{className:"text-center py-8 text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark runs yet"}):v.map(X=>{const J=G.includes(X.timestamp);return n.jsx("button",{onClick:()=>xe(X.timestamp),className:"w-full text-left rounded-lg px-4 py-3 transition-all duration-150",style:{background:J?"var(--accent-muted)":"var(--surface-1)",border:J?"1px solid var(--accent)":"1px solid var(--border-subtle)"},onMouseEnter:F=>{J||(F.currentTarget.style.borderColor="var(--border-hover)")},onMouseLeave:F=>{J||(F.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:[H&&n.jsx("span",{className:"w-4 h-4 rounded border flex items-center justify-center",style:{borderColor:J?"var(--accent)":"var(--border-default)",background:J?"var(--accent)":"transparent"},children:J&&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(X.timestamp).toLocaleString()}),n.jsx("span",{className:"pill text-[9px]",style:{background:X.type==="comparison"?"var(--purple-muted)":X.type==="baseline"?"var(--surface-3)":X.type==="model-compare"?"rgba(56,189,248,0.15)":X.type==="improve"||X.type==="instruct"?"rgba(168,85,247,0.15)":"var(--accent-muted)",color:X.type==="comparison"?"var(--purple)":X.type==="baseline"?"var(--text-tertiary)":X.type==="model-compare"?"#38bdf8":X.type==="improve"||X.type==="instruct"?"#a855f7":"var(--accent)"},children:X.type==="model-compare"?"model compare":X.type==="improve"?"ai improve":X.type==="instruct"?"ai edit":X.type})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:X.model}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:X.passRate>=.8?"var(--green)":X.passRate>=.5?"var(--yellow)":"var(--red)"},children:[Math.round(X.passRate*100),"%"]})]})]})},X.timestamp)})}),I&&n.jsx(nh,{result:I}),$&&!H&&n.jsx(sh,{run:$,onClose:()=>le(null)})]}),m==="per-eval"&&n.jsx(lh,{plugin:d,skill:o}),m==="statistics"&&n.jsx(th,{plugin:d,skill:o})]})}function nh({result:r}){const u=r.regressions.filter(o=>o.change==="regression"),d=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}`))]}),d.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 (",d.length,")"]}),d.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 sh({run:r,onClose:u}){return(r.type==="improve"||r.type==="instruct")&&r.improve?n.jsx(ih,{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(d=>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:["#",d.eval_id," ",d.eval_name]}),n.jsx("span",{className:"text-[11px] font-semibold",style:{color:d.status==="pass"?"var(--green)":"var(--red)"},children:d.pass_rate!=null?`${Math.round(d.pass_rate*100)}%`:d.status})]})},d.eval_id))})]})}function ih({run:r,onClose:u}){var h;const d=g.useMemo(()=>r.improve?Mc(r.improve.original,r.improve.improved):[],[r.improve]),o=g.useMemo(()=>{const v=d.filter(p=>p.type==="added").length,j=d.filter(p=>p.type==="removed").length;return{added:v,removed:j}},[d]),m=g.useMemo(()=>{let v=0,j=0;return d.map(p=>p.type==="removed"?(v++,{...p,origNum:v,newNum:null}):p.type==="added"?(j++,{...p,origNum:null,newNum:j}):(v++,j++,{...p,origNum:v,newNum:j}))},[d]);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:v=>{v.currentTarget.style.background="var(--surface-3)"},onMouseLeave:v=>{v.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})]}),((h=r.improve)==null?void 0:h.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((v,j)=>n.jsxs("tr",{style:{background:v.type==="added"?"rgba(34,197,94,0.08)":v.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:v.type==="removed"?"rgba(239,68,68,0.5)":"var(--text-tertiary)",opacity:v.origNum?.6:.2,borderRight:"1px solid var(--border-subtle)"},children:v.origNum??""}),n.jsx("td",{className:"text-right select-none px-2",style:{width:40,fontSize:10,color:v.type==="added"?"rgba(34,197,94,0.5)":"var(--text-tertiary)",opacity:v.newNum?.6:.2,borderRight:"1px solid var(--border-subtle)"},children:v.newNum??""}),n.jsx("td",{className:"select-none text-center",style:{width:20,fontSize:11,fontWeight:700,color:v.type==="added"?"var(--green)":v.type==="removed"?"var(--red)":"transparent",borderRight:v.type==="added"?"2px solid var(--green)":v.type==="removed"?"2px solid var(--red)":"2px solid transparent"},children:v.type==="added"?"+":v.type==="removed"?"-":" "}),n.jsx("td",{className:"px-3 py-px whitespace-pre-wrap",style:{fontSize:11,lineHeight:1.6,color:v.type==="added"?"var(--green)":v.type==="removed"?"var(--red)":"var(--text-secondary)"},children:v.content||""})]},j))})})})]})}function rh({plugin:r,skill:u}){const[d,o]=g.useState([]),[m,h]=g.useState([]),[v,j]=g.useState(!0),[p,x]=g.useState(null);g.useEffect(()=>{ge.getDependencies(r,u).then(b=>{o(b.mcpDependencies),h(b.skillDependencies)}).catch(()=>{}).finally(()=>j(!1))},[r,u]);async function N(b,k){try{await navigator.clipboard.writeText(k),x(b),setTimeout(()=>x(null),2e3)}catch{}}return v?null:d.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:d.length+m.length})]}),n.jsxs("div",{className:"px-5 py-4",children:[d.length>0&&n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"MCP Servers"}),d.map(b=>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:b.server}),n.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:b.transport})]}),n.jsx("button",{onClick:()=>N(b.server,b.configSnippet),className:"btn btn-ghost text-[11px] py-1 px-2",style:{color:p===b.server?"var(--green)":"var(--accent)"},children:p===b.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:b.url}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:b.matchedTools.map(k=>n.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--surface-3)",color:"var(--text-secondary)"},children:k},k))})]},b.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(b=>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:b.name}),n.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:b.source==="frontmatter"?"frontmatter":"referenced"})]},b.name))})]})]})]})}function ch(){const{state:r}=Bt(),{plugin:u,skill:d}=r,[o,m]=g.useState(null),[h,v]=g.useState(!0);return g.useEffect(()=>{ge.getDependencies(u,d).then(m).catch(()=>{}).finally(()=>v(!1))},[u,d]),h?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(rh,{plugin:u,skill:d})}):n.jsx("div",{className:"flex items-center justify-center h-full text-[13px]",style:{color:"var(--text-tertiary)"},children:"No dependency information available"})}const uh=["editor","tests","run","activation","history","deps"];function oh(r){return r!=null&&uh.includes(r)}function dh(){const{state:r,dispatch:u,saveContent:d}=Bt();g.useEffect(()=>{const v=new URLSearchParams(window.location.search).get("panel");oh(v)&&v!==r.activePanel&&u({type:"SET_PANEL",panel:v})},[]),g.useEffect(()=>{const h=new URLSearchParams(window.location.search);h.set("panel",r.activePanel);const v=`${window.location.pathname}?${h.toString()}${window.location.hash}`;history.replaceState(null,"",v)},[r.activePanel]);const o=g.useCallback(h=>{const v=h.ctrlKey||h.metaKey;if(v&&h.key>="1"&&h.key<="6"){h.preventDefault(),u({type:"SET_PANEL",panel:["editor","tests","run","activation","history","deps"][parseInt(h.key)-1]});return}if(v&&h.key==="s"&&!h.shiftKey){h.preventDefault(),r.isDirty&&d();return}},[r.isDirty,d,u]);if(g.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(h=>h.status==="running"||h.status==="queued");return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[n.jsx(pv,{state:r}),n.jsx(gv,{activePanel:r.activePanel,onPanelChange:h=>u({type:"SET_PANEL",panel:h}),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(Dv,{}),r.activePanel==="tests"&&n.jsx(Uv,{}),r.activePanel==="run"&&n.jsx(Qv,{}),r.activePanel==="activation"&&n.jsx(Jv,{}),r.activePanel==="history"&&n.jsx(ah,{}),r.activePanel==="deps"&&n.jsx(ch,{})]},r.activePanel)})]})}function Nc(r,u=!0){let d=r.toLowerCase().replace(/[^a-z0-9]+/g,"-");return u&&(d=d.replace(/^-+|-+$/g,"")),d}function fh(r,u,d,o){const h=`.../${r.split("/").slice(-2).join("/")}`;switch(u){case 1:return`${h}/${d}/skills/${o}/SKILL.md`;case 2:return`${h}/plugins/${d}/skills/${o}/SKILL.md`;case 3:return`${h}/skills/${o}/SKILL.md`}}function mh({onCreated:r,onCancel:u}){const[d,o]=g.useState(null),[m,h]=g.useState(!0),[v,j]=g.useState(null),[p,x]=g.useState(null),[N,b]=g.useState(""),[k,U]=g.useState(3),[H,Q]=g.useState(""),[G,ne]=g.useState(""),[I,re]=g.useState(""),[K,se]=g.useState(""),[$,le]=g.useState(""),[W,me]=g.useState(""),[xe,je]=g.useState(!1),[Se,X]=g.useState(null);g.useEffect(()=>{ge.getProjectLayout().then(Z=>{o(Z),U(Z.suggestedLayout);const S=Z.detectedLayouts.find(T=>T.layout===Z.suggestedLayout);S!=null&&S.existingPlugins.length&&Q(S.existingPlugins[0])}).catch(()=>{}).finally(()=>h(!1)),ge.getConfig().then(x).catch(()=>{}),ge.getSkillCreatorStatus().then(j).catch(()=>{})},[]);const J=g.useMemo(()=>{var Z;return d?((Z=d.detectedLayouts.find(S=>S.layout===k))==null?void 0:Z.existingPlugins)||[]:[]},[d,k]),F=H==="__new__"?G:H,M=d?fh(d.root,k,F||"{plugin}",N||"{skill}"):"",z=g.useMemo(()=>d?d.detectedLayouts.filter(Z=>Z.layout!==4):[],[d]),O=(p==null?void 0:p.provider)==="claude-cli"&&v!==null;async function ee(){if(X(null),!N.trim()){X("Skill name is required");return}if(!I.trim()){X("Description is required");return}if(k!==3&&!F.trim()){X("Plugin name is required");return}je(!0);try{const Z=await ge.createSkill({name:Nc(N),plugin:F||"",layout:k,description:I,model:K||void 0,allowedTools:$||void 0,body:W});r(Z.plugin,Z.skill)}catch(Z){X(Z.message)}finally{je(!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"})]}),O&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:v.installed?"var(--accent-muted)":"var(--surface-2)",border:v.installed?"1px solid var(--accent)":"1px solid var(--border-subtle)",color:"var(--text-primary)"},children:v.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:v.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"})]}):d?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"}),z.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:z.map(Z=>n.jsx("button",{onClick:()=>{U(Z.layout),Q(Z.existingPlugins[0]||""),ne("")},className:"px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:k===Z.layout?"var(--accent)":"var(--surface-3)",color:k===Z.layout?"#fff":"var(--text-secondary)",border:`1px solid ${k===Z.layout?"var(--accent)":"var(--border-subtle)"}`,cursor:"pointer"},children:Z.label},Z.layout))})]}),k!==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:H,onChange:Z=>{Q(Z.target.value),ne("")},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:[J.map(Z=>n.jsx("option",{value:Z,children:Z},Z)),n.jsx("option",{value:"__new__",children:"+ New plugin..."})]}),H==="__new__"&&n.jsx("input",{type:"text",value:G,onChange:Z=>ne(Nc(Z.target.value)),placeholder:"my-plugin",className:"w-full mt-2 px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]}),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:M})]}),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:N,onChange:Z=>b(Nc(Z.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:Z=>re(Z.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:K,onChange:Z=>se(Z.target.value),className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"},children:[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:$,onChange:Z=>le(Z.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:W,onChange:Z=>me(Z.target.value),placeholder:`# /my-skill
|
|
68
|
+
|
|
69
|
+
You are an expert at...
|
|
70
|
+
`,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"}})]}),Se&&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:Se}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("button",{onClick:ee,disabled:xe||!N||!I,className:"px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:xe||!N||!I?"var(--surface-3)":"var(--accent)",color:xe||!N||!I?"var(--text-tertiary)":"#fff",cursor:xe||!N||!I?"not-allowed":"pointer",border:"none"},children:xe?"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 xh(){return n.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center",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"})]})})}function Ec({variant:r,message:u,onRetry:d}){const{setMode:o,setSearch:m}=Kl(),[h,v]=g.useState(!1);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:"mb-5",children:h?n.jsx(xh,{}):n.jsx("img",{src:"/images/empty-studio.webp",width:128,height:128,alt:"",onError:()=>v(!0),style:{objectFit:"contain"}})}),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"}),d&&n.jsx("button",{onClick:d,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 sm(){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 ph(){const{state:r,selectSkill:u,setMode:d,refreshSkills:o}=Kl();if(r.mode==="create")return n.jsxs("div",{className:"h-full overflow-auto animate-fade-in",children:[n.jsx(sm,{}),n.jsx(mh,{onCreated:(v,j)=>{d("browse"),o(),u({plugin:v,skill:j})},onCancel:()=>d("browse")})]});if(!r.selectedSkill)return r.skillsError?n.jsx(Ec,{variant:"error",message:r.skillsError,onRetry:o}):!r.skillsLoading&&r.skills.length===0?n.jsx(Ec,{variant:"no-skills"}):n.jsx(Ec,{variant:"no-selection"});const{plugin:m,skill:h}=r.selectedSkill;return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsx(sm,{}),n.jsx("div",{className:"flex-1 overflow-hidden",children:n.jsx(xv,{plugin:m,skill:h,children:n.jsx(dh,{})},`${m}/${h}`)})]})}function vh(){return n.jsx(Ip,{children:n.jsx(Pp,{left:n.jsx(rv,{}),right:n.jsx(ph,{})})})}Zp.createRoot(document.getElementById("root")).render(n.jsx(g.StrictMode,{children:n.jsx(vh,{})}));
|