gossipcat 0.4.19 → 0.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-dashboard/assets/index-Ci46EANB.css +1 -0
- package/dist-dashboard/assets/index-aXAMEMbl.js +70 -0
- package/dist-dashboard/index.html +2 -2
- package/dist-mcp/default-skills/code-review.md +6 -5
- package/dist-mcp/mcp-server.js +40193 -41877
- package/docs/HANDBOOK.md +19 -0
- package/package.json +1 -1
- package/scripts/postinstall.js +100 -11
- package/dist-dashboard/assets/index-DmoFYGg1.css +0 -1
- package/dist-dashboard/assets/index-oIF838yl.js +0 -68
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
var Gh=Object.defineProperty;var Xh=(u,c,m)=>c in u?Gh(u,c,{enumerable:!0,configurable:!0,writable:!0,value:m}):u[c]=m;var Pe=(u,c,m)=>Xh(u,typeof c!="symbol"?c+"":c,m);(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const x of f)if(x.type==="childList")for(const _ of x.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&o(_)}).observe(document,{childList:!0,subtree:!0});function m(f){const x={};return f.integrity&&(x.integrity=f.integrity),f.referrerPolicy&&(x.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?x.credentials="include":f.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function o(f){if(f.ep)return;f.ep=!0;const x=m(f);fetch(f.href,x)}})();var Mc={exports:{}},Xa={};/**
|
|
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 $f;function Qh(){if($f)return Xa;$f=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function m(o,f,x){var _=null;if(x!==void 0&&(_=""+x),f.key!==void 0&&(_=""+f.key),"key"in f){x={};for(var y in f)y!=="key"&&(x[y]=f[y])}else x=f;return f=x.ref,{$$typeof:u,type:o,key:_,ref:f!==void 0?f:null,props:x}}return Xa.Fragment=c,Xa.jsx=m,Xa.jsxs=m,Xa}var Jf;function Zh(){return Jf||(Jf=1,Mc.exports=Qh()),Mc.exports}var i=Zh(),Ac={exports:{}},xe={};/**
|
|
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 Ff;function Vh(){if(Ff)return xe;Ff=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),_=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),Y=Symbol.iterator;function Q(g){return g===null||typeof g!="object"?null:(g=Y&&g[Y]||g["@@iterator"],typeof g=="function"?g:null)}var ae={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},J=Object.assign,V={};function me(g,C,G){this.props=g,this.context=C,this.refs=V,this.updater=G||ae}me.prototype.isReactComponent={},me.prototype.setState=function(g,C){if(typeof g!="object"&&typeof g!="function"&&g!=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,g,C,"setState")},me.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function $(){}$.prototype=me.prototype;function K(g,C,G){this.props=g,this.context=C,this.refs=V,this.updater=G||ae}var X=K.prototype=new $;X.constructor=K,J(X,me.prototype),X.isPureReactComponent=!0;var z=Array.isArray;function ue(){}var Z={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function ie(g,C,G){var k=G.ref;return{$$typeof:u,type:g,key:C,ref:k!==void 0?k:null,props:G}}function de(g,C){return ie(g.type,C,g.props)}function Ee(g){return typeof g=="object"&&g!==null&&g.$$typeof===u}function H(g){var C={"=":"=0",":":"=2"};return"$"+g.replace(/[=:]/g,function(G){return C[G]})}var I=/\/+/g;function oe(g,C){return typeof g=="object"&&g!==null&&g.key!=null?H(""+g.key):C.toString(36)}function L(g){switch(g.status){case"fulfilled":return g.value;case"rejected":throw g.reason;default:switch(typeof g.status=="string"?g.then(ue,ue):(g.status="pending",g.then(function(C){g.status==="pending"&&(g.status="fulfilled",g.value=C)},function(C){g.status==="pending"&&(g.status="rejected",g.reason=C)})),g.status){case"fulfilled":return g.value;case"rejected":throw g.reason}}throw g}function S(g,C,G,k,ne){var ce=typeof g;(ce==="undefined"||ce==="boolean")&&(g=null);var pe=!1;if(g===null)pe=!0;else switch(ce){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(g.$$typeof){case u:case c:pe=!0;break;case M:return pe=g._init,S(pe(g._payload),C,G,k,ne)}}if(pe)return ne=ne(g),pe=k===""?"."+oe(g,0):k,z(ne)?(G="",pe!=null&&(G=pe.replace(I,"$&/")+"/"),S(ne,C,G,"",function(Yt){return Yt})):ne!=null&&(Ee(ne)&&(ne=de(ne,G+(ne.key==null||g&&g.key===ne.key?"":(""+ne.key).replace(I,"$&/")+"/")+pe)),C.push(ne)),1;pe=0;var ke=k===""?".":k+":";if(z(g))for(var fe=0;fe<g.length;fe++)k=g[fe],ce=ke+oe(k,fe),pe+=S(k,C,G,ce,ne);else if(fe=Q(g),typeof fe=="function")for(g=fe.call(g),fe=0;!(k=g.next()).done;)k=k.value,ce=ke+oe(k,fe++),pe+=S(k,C,G,ce,ne);else if(ce==="object"){if(typeof g.then=="function")return S(L(g),C,G,k,ne);throw C=String(g),Error("Objects are not valid as a React child (found: "+(C==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.")}return pe}function B(g,C,G){if(g==null)return g;var k=[],ne=0;return S(g,k,"","",function(ce){return C.call(G,ce,ne++)}),k}function F(g){if(g._status===-1){var C=g._result;C=C(),C.then(function(G){(g._status===0||g._status===-1)&&(g._status=1,g._result=G)},function(G){(g._status===0||g._status===-1)&&(g._status=2,g._result=G)}),g._status===-1&&(g._status=0,g._result=C)}if(g._status===1)return g._result.default;throw g._result}var D=typeof reportError=="function"?reportError:function(g){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var C=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof g=="object"&&g!==null&&typeof g.message=="string"?String(g.message):String(g),error:g});if(!window.dispatchEvent(C))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",g);return}console.error(g)},P={map:B,forEach:function(g,C,G){B(g,function(){C.apply(this,arguments)},G)},count:function(g){var C=0;return B(g,function(){C++}),C},toArray:function(g){return B(g,function(C){return C})||[]},only:function(g){if(!Ee(g))throw Error("React.Children.only expected to receive a single React element child.");return g}};return xe.Activity=w,xe.Children=P,xe.Component=me,xe.Fragment=m,xe.Profiler=f,xe.PureComponent=K,xe.StrictMode=o,xe.Suspense=b,xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,xe.__COMPILER_RUNTIME={__proto__:null,c:function(g){return Z.H.useMemoCache(g)}},xe.cache=function(g){return function(){return g.apply(null,arguments)}},xe.cacheSignal=function(){return null},xe.cloneElement=function(g,C,G){if(g==null)throw Error("The argument must be a React element, but you passed "+g+".");var k=J({},g.props),ne=g.key;if(C!=null)for(ce in C.key!==void 0&&(ne=""+C.key),C)!W.call(C,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&C.ref===void 0||(k[ce]=C[ce]);var ce=arguments.length-2;if(ce===1)k.children=G;else if(1<ce){for(var pe=Array(ce),ke=0;ke<ce;ke++)pe[ke]=arguments[ke+2];k.children=pe}return ie(g.type,ne,k)},xe.createContext=function(g){return g={$$typeof:_,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null},g.Provider=g,g.Consumer={$$typeof:x,_context:g},g},xe.createElement=function(g,C,G){var k,ne={},ce=null;if(C!=null)for(k in C.key!==void 0&&(ce=""+C.key),C)W.call(C,k)&&k!=="key"&&k!=="__self"&&k!=="__source"&&(ne[k]=C[k]);var pe=arguments.length-2;if(pe===1)ne.children=G;else if(1<pe){for(var ke=Array(pe),fe=0;fe<pe;fe++)ke[fe]=arguments[fe+2];ne.children=ke}if(g&&g.defaultProps)for(k in pe=g.defaultProps,pe)ne[k]===void 0&&(ne[k]=pe[k]);return ie(g,ce,ne)},xe.createRef=function(){return{current:null}},xe.forwardRef=function(g){return{$$typeof:y,render:g}},xe.isValidElement=Ee,xe.lazy=function(g){return{$$typeof:M,_payload:{_status:-1,_result:g},_init:F}},xe.memo=function(g,C){return{$$typeof:h,type:g,compare:C===void 0?null:C}},xe.startTransition=function(g){var C=Z.T,G={};Z.T=G;try{var k=g(),ne=Z.S;ne!==null&&ne(G,k),typeof k=="object"&&k!==null&&typeof k.then=="function"&&k.then(ue,D)}catch(ce){D(ce)}finally{C!==null&&G.types!==null&&(C.types=G.types),Z.T=C}},xe.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},xe.use=function(g){return Z.H.use(g)},xe.useActionState=function(g,C,G){return Z.H.useActionState(g,C,G)},xe.useCallback=function(g,C){return Z.H.useCallback(g,C)},xe.useContext=function(g){return Z.H.useContext(g)},xe.useDebugValue=function(){},xe.useDeferredValue=function(g,C){return Z.H.useDeferredValue(g,C)},xe.useEffect=function(g,C){return Z.H.useEffect(g,C)},xe.useEffectEvent=function(g){return Z.H.useEffectEvent(g)},xe.useId=function(){return Z.H.useId()},xe.useImperativeHandle=function(g,C,G){return Z.H.useImperativeHandle(g,C,G)},xe.useInsertionEffect=function(g,C){return Z.H.useInsertionEffect(g,C)},xe.useLayoutEffect=function(g,C){return Z.H.useLayoutEffect(g,C)},xe.useMemo=function(g,C){return Z.H.useMemo(g,C)},xe.useOptimistic=function(g,C){return Z.H.useOptimistic(g,C)},xe.useReducer=function(g,C,G){return Z.H.useReducer(g,C,G)},xe.useRef=function(g){return Z.H.useRef(g)},xe.useState=function(g){return Z.H.useState(g)},xe.useSyncExternalStore=function(g,C,G){return Z.H.useSyncExternalStore(g,C,G)},xe.useTransition=function(){return Z.H.useTransition()},xe.version="19.2.4",xe}var Wf;function Zc(){return Wf||(Wf=1,Ac.exports=Vh()),Ac.exports}var R=Zc(),zc={exports:{}},Qa={},Cc={exports:{}},Dc={};/**
|
|
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 If;function Kh(){return If||(If=1,(function(u){function c(S,B){var F=S.length;S.push(B);e:for(;0<F;){var D=F-1>>>1,P=S[D];if(0<f(P,B))S[D]=B,S[F]=P,F=D;else break e}}function m(S){return S.length===0?null:S[0]}function o(S){if(S.length===0)return null;var B=S[0],F=S.pop();if(F!==B){S[0]=F;e:for(var D=0,P=S.length,g=P>>>1;D<g;){var C=2*(D+1)-1,G=S[C],k=C+1,ne=S[k];if(0>f(G,F))k<P&&0>f(ne,G)?(S[D]=ne,S[k]=F,D=k):(S[D]=G,S[C]=F,D=C);else if(k<P&&0>f(ne,F))S[D]=ne,S[k]=F,D=k;else break e}}return B}function f(S,B){var F=S.sortIndex-B.sortIndex;return F!==0?F:S.id-B.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;u.unstable_now=function(){return x.now()}}else{var _=Date,y=_.now();u.unstable_now=function(){return _.now()-y}}var b=[],h=[],M=1,w=null,Y=3,Q=!1,ae=!1,J=!1,V=!1,me=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function X(S){for(var B=m(h);B!==null;){if(B.callback===null)o(h);else if(B.startTime<=S)o(h),B.sortIndex=B.expirationTime,c(b,B);else break;B=m(h)}}function z(S){if(J=!1,X(S),!ae)if(m(b)!==null)ae=!0,ue||(ue=!0,H());else{var B=m(h);B!==null&&L(z,B.startTime-S)}}var ue=!1,Z=-1,W=5,ie=-1;function de(){return V?!0:!(u.unstable_now()-ie<W)}function Ee(){if(V=!1,ue){var S=u.unstable_now();ie=S;var B=!0;try{e:{ae=!1,J&&(J=!1,$(Z),Z=-1),Q=!0;var F=Y;try{t:{for(X(S),w=m(b);w!==null&&!(w.expirationTime>S&&de());){var D=w.callback;if(typeof D=="function"){w.callback=null,Y=w.priorityLevel;var P=D(w.expirationTime<=S);if(S=u.unstable_now(),typeof P=="function"){w.callback=P,X(S),B=!0;break t}w===m(b)&&o(b),X(S)}else o(b);w=m(b)}if(w!==null)B=!0;else{var g=m(h);g!==null&&L(z,g.startTime-S),B=!1}}break e}finally{w=null,Y=F,Q=!1}B=void 0}}finally{B?H():ue=!1}}}var H;if(typeof K=="function")H=function(){K(Ee)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,oe=I.port2;I.port1.onmessage=Ee,H=function(){oe.postMessage(null)}}else H=function(){me(Ee,0)};function L(S,B){Z=me(function(){S(u.unstable_now())},B)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(S){S.callback=null},u.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<S?Math.floor(1e3/S):5},u.unstable_getCurrentPriorityLevel=function(){return Y},u.unstable_next=function(S){switch(Y){case 1:case 2:case 3:var B=3;break;default:B=Y}var F=Y;Y=B;try{return S()}finally{Y=F}},u.unstable_requestPaint=function(){V=!0},u.unstable_runWithPriority=function(S,B){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var F=Y;Y=S;try{return B()}finally{Y=F}},u.unstable_scheduleCallback=function(S,B,F){var D=u.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?D+F:D):F=D,S){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=F+P,S={id:M++,callback:B,priorityLevel:S,startTime:F,expirationTime:P,sortIndex:-1},F>D?(S.sortIndex=F,c(h,S),m(b)===null&&S===m(h)&&(J?($(Z),Z=-1):J=!0,L(z,F-D))):(S.sortIndex=P,c(b,S),ae||Q||(ae=!0,ue||(ue=!0,H()))),S},u.unstable_shouldYield=de,u.unstable_wrapCallback=function(S){var B=Y;return function(){var F=Y;Y=B;try{return S.apply(this,arguments)}finally{Y=F}}}})(Dc)),Dc}var Pf;function $h(){return Pf||(Pf=1,Cc.exports=Kh()),Cc.exports}var Oc={exports:{}},st={};/**
|
|
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 em;function Jh(){if(em)return st;em=1;var u=Zc();function c(b){var h="https://react.dev/errors/"+b;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var M=2;M<arguments.length;M++)h+="&args[]="+encodeURIComponent(arguments[M])}return"Minified React error #"+b+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(){}var o={d:{f:m,r:function(){throw Error(c(522))},D:m,C:m,L:m,m,X:m,S:m,M:m},p:0,findDOMNode:null},f=Symbol.for("react.portal");function x(b,h,M){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:w==null?null:""+w,children:b,containerInfo:h,implementation:M}}var _=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(b,h){if(b==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return st.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,st.createPortal=function(b,h){var M=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(c(299));return x(b,h,null,M)},st.flushSync=function(b){var h=_.T,M=o.p;try{if(_.T=null,o.p=2,b)return b()}finally{_.T=h,o.p=M,o.d.f()}},st.preconnect=function(b,h){typeof b=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(b,h))},st.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},st.preinit=function(b,h){if(typeof b=="string"&&h&&typeof h.as=="string"){var M=h.as,w=y(M,h.crossOrigin),Y=typeof h.integrity=="string"?h.integrity:void 0,Q=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;M==="style"?o.d.S(b,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:w,integrity:Y,fetchPriority:Q}):M==="script"&&o.d.X(b,{crossOrigin:w,integrity:Y,fetchPriority:Q,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},st.preinitModule=function(b,h){if(typeof b=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var M=y(h.as,h.crossOrigin);o.d.M(b,{crossOrigin:M,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(b)},st.preload=function(b,h){if(typeof b=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var M=h.as,w=y(M,h.crossOrigin);o.d.L(b,M,{crossOrigin:w,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},st.preloadModule=function(b,h){if(typeof b=="string")if(h){var M=y(h.as,h.crossOrigin);o.d.m(b,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:M,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(b)},st.requestFormReset=function(b){o.d.r(b)},st.unstable_batchedUpdates=function(b,h){return b(h)},st.useFormState=function(b,h,M){return _.H.useFormState(b,h,M)},st.useFormStatus=function(){return _.H.useHostTransitionStatus()},st.version="19.2.4",st}var tm;function Fh(){if(tm)return Oc.exports;tm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(c){console.error(c)}}return u(),Oc.exports=Jh(),Oc.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 nm;function Wh(){if(nm)return Qa;nm=1;var u=$h(),c=Zc(),m=Fh();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function x(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function _(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 y(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 b(e){if(x(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return b(a),e;if(s===l)return b(a),t;s=s.sibling}throw Error(o(188))}if(n.return!==l.return)n=a,l=s;else{for(var r=!1,d=a.child;d;){if(d===n){r=!0,n=a,l=s;break}if(d===l){r=!0,l=a,n=s;break}d=d.sibling}if(!r){for(d=s.child;d;){if(d===n){r=!0,n=s,l=a;break}if(d===l){r=!0,l=s,n=a;break}d=d.sibling}if(!r)throw Error(o(189))}}if(n.alternate!==l)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function M(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=M(e),t!==null)return t;e=e.sibling}return null}var w=Object.assign,Y=Symbol.for("react.element"),Q=Symbol.for("react.transitional.element"),ae=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),K=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),de=Symbol.for("react.memo_cache_sentinel"),Ee=Symbol.iterator;function H(e){return e===null||typeof e!="object"?null:(e=Ee&&e[Ee]||e["@@iterator"],typeof e=="function"?e:null)}var I=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===I?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case J:return"Fragment";case me:return"Profiler";case V:return"StrictMode";case z:return"Suspense";case ue:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case ae:return"Portal";case K:return e.displayName||"Context";case $:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:oe(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}var L=Array.isArray,S=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=m.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},D=[],P=-1;function g(e){return{current:e}}function C(e){0>P||(e.current=D[P],D[P]=null,P--)}function G(e,t){P++,D[P]=e.current,e.current=t}var k=g(null),ne=g(null),ce=g(null),pe=g(null);function ke(e,t){switch(G(ce,t),G(ne,e),G(k,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pf(t),e=bf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}C(k),G(k,e)}function fe(){C(k),C(ne),C(ce)}function Yt(e){e.memoizedState!==null&&G(pe,e);var t=k.current,n=bf(t,e.type);t!==n&&(G(ne,e),G(k,n))}function Vt(e){ne.current===e&&(C(k),C(ne)),pe.current===e&&(C(pe),Ba._currentValue=F)}var Bn,Yn;function Kt(e){if(Bn===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Bn=t&&t[1]||"",Yn=-1<n.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Bn+e+Yn}var Ln=!1;function ol(e,t){if(!e||Ln)return"";Ln=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={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(A){var E=A}Reflect.construct(e,[],q)}else{try{q.call()}catch(A){E=A}e.call(q.prototype)}}else{try{throw Error()}catch(A){E=A}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(A){if(A&&E&&typeof A.stack=="string")return[A.stack,E.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=l.DetermineComponentFrameRoot(),r=s[0],d=s[1];if(r&&d){var p=r.split(`
|
|
44
|
-
`),T=d.split(`
|
|
45
|
-
`);for(a=l=0;l<p.length&&!p[l].includes("DetermineComponentFrameRoot");)l++;for(;a<T.length&&!T[a].includes("DetermineComponentFrameRoot");)a++;if(l===p.length||a===T.length)for(l=p.length-1,a=T.length-1;1<=l&&0<=a&&p[l]!==T[a];)a--;for(;1<=l&&0<=a;l--,a--)if(p[l]!==T[a]){if(l!==1||a!==1)do if(l--,a--,0>a||p[l]!==T[a]){var O=`
|
|
46
|
-
`+p[l].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),O}while(1<=l&&0<=a);break}}}finally{Ln=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Kt(n):""}function Gn(e,t){switch(e.tag){case 26:case 27:case 5:return Kt(e.type);case 16:return Kt("Lazy");case 13:return e.child!==t&&t!==null?Kt("Suspense Fallback"):Kt("Suspense");case 19:return Kt("SuspenseList");case 0:case 15:return ol(e.type,!1);case 11:return ol(e.type.render,!1);case 1:return ol(e.type,!0);case 31:return Kt("Activity");default:return""}}function dl(e){try{var t="",n=null;do t+=Gn(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
-
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}var te=Object.prototype.hasOwnProperty,Ue=u.unstable_scheduleCallback,Fe=u.unstable_cancelCallback,et=u.unstable_shouldYield,qt=u.unstable_requestPaint,qe=u.unstable_now,Xn=u.unstable_getCurrentPriorityLevel,Qn=u.unstable_ImmediatePriority,$c=u.unstable_UserBlockingPriority,Ka=u.unstable_NormalPriority,Sm=u.unstable_LowPriority,Jc=u.unstable_IdlePriority,Tm=u.log,_m=u.unstable_setDisableYieldValue,Wl=null,pt=null;function mn(e){if(typeof Tm=="function"&&_m(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Wl,e)}catch{}}var bt=Math.clz32?Math.clz32:Am,Em=Math.log,Mm=Math.LN2;function Am(e){return e>>>=0,e===0?32:31-(Em(e)/Mm|0)|0}var $a=256,Ja=262144,Fa=4194304;function Zn(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 Wa(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,s=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var d=l&134217727;return d!==0?(l=d&~s,l!==0?a=Zn(l):(r&=d,r!==0?a=Zn(r):n||(n=d&~e,n!==0&&(a=Zn(n))))):(d=l&~s,d!==0?a=Zn(d):r!==0?a=Zn(r):n||(n=l&~e,n!==0&&(a=Zn(n)))),a===0?0:t!==0&&t!==a&&(t&s)===0&&(s=a&-a,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:a}function Il(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function zm(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 Fc(){var e=Fa;return Fa<<=1,(Fa&62914560)===0&&(Fa=4194304),e}function hs(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Cm(e,t,n,l,a,s){var r=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var d=e.entanglements,p=e.expirationTimes,T=e.hiddenUpdates;for(n=r&~n;0<n;){var O=31-bt(n),q=1<<O;d[O]=0,p[O]=-1;var E=T[O];if(E!==null)for(T[O]=null,O=0;O<E.length;O++){var A=E[O];A!==null&&(A.lane&=-536870913)}n&=~q}l!==0&&Wc(e,l,0),s!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=s&~(r&~t))}function Wc(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-bt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Ic(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-bt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Pc(e,t){var n=t&-t;return n=(n&42)!==0?1:gs(n),(n&(e.suspendedLanes|t))!==0?0:n}function gs(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 ps(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function er(){var e=B.p;return e!==0?e:(e=window.event,e===void 0?32:Lf(e.type))}function tr(e,t){var n=B.p;try{return B.p=e,t()}finally{B.p=n}}var xn=Math.random().toString(36).slice(2),tt="__reactFiber$"+xn,ot="__reactProps$"+xn,fl="__reactContainer$"+xn,bs="__reactEvents$"+xn,Dm="__reactListeners$"+xn,Om="__reactHandles$"+xn,nr="__reactResources$"+xn,ea="__reactMarker$"+xn;function vs(e){delete e[tt],delete e[ot],delete e[bs],delete e[Dm],delete e[Om]}function ml(e){var t=e[tt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fl]||n[tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_f(e);e!==null;){if(n=e[tt])return n;e=_f(e)}return t}e=n,n=e.parentNode}return null}function xl(e){if(e=e[tt]||e[fl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ta(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function hl(e){var t=e[nr];return t||(t=e[nr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function We(e){e[ea]=!0}var lr=new Set,ar={};function Vn(e,t){gl(e,t),gl(e+"Capture",t)}function gl(e,t){for(ar[e]=t,e=0;e<t.length;e++)lr.add(t[e])}var Rm=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]*$"),ir={},sr={};function wm(e){return te.call(sr,e)?!0:te.call(ir,e)?!1:Rm.test(e)?sr[e]=!0:(ir[e]=!0,!1)}function Ia(e,t,n){if(wm(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Pa(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function $t(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function Et(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ur(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Um(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,s=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(r){n=""+r,s.call(this,r)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(r){n=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ys(e){if(!e._valueTracker){var t=ur(e)?"checked":"value";e._valueTracker=Um(e,t,""+e[t])}}function cr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=ur(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function ei(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 qm=/[\n"\\]/g;function Mt(e){return e.replace(qm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function js(e,t,n,l,a,s,r,d){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Et(t)):e.value!==""+Et(t)&&(e.value=""+Et(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?Ns(e,r,Et(t)):n!=null?Ns(e,r,Et(n)):l!=null&&e.removeAttribute("value"),a==null&&s!=null&&(e.defaultChecked=!!s),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+Et(d):e.removeAttribute("name")}function rr(e,t,n,l,a,s,r,d){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){ys(e);return}n=n!=null?""+Et(n):"",t=t!=null?""+Et(t):n,d||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=d?e.checked:!!l,e.defaultChecked=!!l,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),ys(e)}function Ns(e,t,n){t==="number"&&ei(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function pl(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Et(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function or(e,t,n){if(t!=null&&(t=""+Et(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Et(n):""}function dr(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(o(92));if(L(l)){if(1<l.length)throw Error(o(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=Et(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),ys(e)}function bl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Hm=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 fr(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Hm.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function mr(e,t,n){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&fr(e,a,l)}else for(var s in t)t.hasOwnProperty(s)&&fr(e,s,t[s])}function Ss(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 km=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"]]),Bm=/^[\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 ti(e){return Bm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Jt(){}var Ts=null;function _s(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vl=null,yl=null;function xr(e){var t=xl(e);if(t&&(e=t.stateNode)){var n=e[ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(js(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Mt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[ot]||null;if(!a)throw Error(o(90));js(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&cr(l)}break e;case"textarea":or(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&pl(e,!!n.multiple,t,!1)}}}var Es=!1;function hr(e,t,n){if(Es)return e(t,n);Es=!0;try{var l=e(t);return l}finally{if(Es=!1,(vl!==null||yl!==null)&&(Gi(),vl&&(t=vl,e=yl,yl=vl=null,xr(t),e)))for(t=0;t<e.length;t++)xr(e[t])}}function na(e,t){var n=e.stateNode;if(n===null)return null;var l=n[ot]||null;if(l===null)return null;n=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var Ft=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ms=!1;if(Ft)try{var la={};Object.defineProperty(la,"passive",{get:function(){Ms=!0}}),window.addEventListener("test",la,la),window.removeEventListener("test",la,la)}catch{Ms=!1}var hn=null,As=null,ni=null;function gr(){if(ni)return ni;var e,t=As,n=t.length,l,a="value"in hn?hn.value:hn.textContent,s=a.length;for(e=0;e<n&&t[e]===a[e];e++);var r=n-e;for(l=1;l<=r&&t[n-l]===a[s-l];l++);return ni=a.slice(e,1<l?1-l:void 0)}function li(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 ai(){return!0}function pr(){return!1}function dt(e){function t(n,l,a,s,r){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=s,this.target=r,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(s):s[d]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ai:pr,this.isPropagationStopped=pr,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ai)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ai)},persist:function(){},isPersistent:ai}),t}var Kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ii=dt(Kn),aa=w({},Kn,{view:0,detail:0}),Ym=dt(aa),zs,Cs,ia,si=w({},aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Os,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!==ia&&(ia&&e.type==="mousemove"?(zs=e.screenX-ia.screenX,Cs=e.screenY-ia.screenY):Cs=zs=0,ia=e),zs)},movementY:function(e){return"movementY"in e?e.movementY:Cs}}),br=dt(si),Lm=w({},si,{dataTransfer:0}),Gm=dt(Lm),Xm=w({},aa,{relatedTarget:0}),Ds=dt(Xm),Qm=w({},Kn,{animationName:0,elapsedTime:0,pseudoElement:0}),Zm=dt(Qm),Vm=w({},Kn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Km=dt(Vm),$m=w({},Kn,{data:0}),vr=dt($m),Jm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fm={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"},Wm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Im(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wm[e])?!!t[e]:!1}function Os(){return Im}var Pm=w({},aa,{key:function(e){if(e.key){var t=Jm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=li(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Fm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Os,charCode:function(e){return e.type==="keypress"?li(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?li(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ex=dt(Pm),tx=w({},si,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yr=dt(tx),nx=w({},aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Os}),lx=dt(nx),ax=w({},Kn,{propertyName:0,elapsedTime:0,pseudoElement:0}),ix=dt(ax),sx=w({},si,{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}),ux=dt(sx),cx=w({},Kn,{newState:0,oldState:0}),rx=dt(cx),ox=[9,13,27,32],Rs=Ft&&"CompositionEvent"in window,sa=null;Ft&&"documentMode"in document&&(sa=document.documentMode);var dx=Ft&&"TextEvent"in window&&!sa,jr=Ft&&(!Rs||sa&&8<sa&&11>=sa),Nr=" ",Sr=!1;function Tr(e,t){switch(e){case"keyup":return ox.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _r(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jl=!1;function fx(e,t){switch(e){case"compositionend":return _r(t);case"keypress":return t.which!==32?null:(Sr=!0,Nr);case"textInput":return e=t.data,e===Nr&&Sr?null:e;default:return null}}function mx(e,t){if(jl)return e==="compositionend"||!Rs&&Tr(e,t)?(e=gr(),ni=As=hn=null,jl=!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 jr&&t.locale!=="ko"?null:t.data;default:return null}}var xx={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 Er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xx[e.type]:t==="textarea"}function Mr(e,t,n,l){vl?yl?yl.push(l):yl=[l]:vl=l,t=Ji(t,"onChange"),0<t.length&&(n=new ii("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var ua=null,ca=null;function hx(e){df(e,0)}function ui(e){var t=ta(e);if(cr(t))return e}function Ar(e,t){if(e==="change")return t}var zr=!1;if(Ft){var ws;if(Ft){var Us="oninput"in document;if(!Us){var Cr=document.createElement("div");Cr.setAttribute("oninput","return;"),Us=typeof Cr.oninput=="function"}ws=Us}else ws=!1;zr=ws&&(!document.documentMode||9<document.documentMode)}function Dr(){ua&&(ua.detachEvent("onpropertychange",Or),ca=ua=null)}function Or(e){if(e.propertyName==="value"&&ui(ca)){var t=[];Mr(t,ca,e,_s(e)),hr(hx,t)}}function gx(e,t,n){e==="focusin"?(Dr(),ua=t,ca=n,ua.attachEvent("onpropertychange",Or)):e==="focusout"&&Dr()}function px(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ui(ca)}function bx(e,t){if(e==="click")return ui(t)}function vx(e,t){if(e==="input"||e==="change")return ui(t)}function yx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vt=typeof Object.is=="function"?Object.is:yx;function ra(e,t){if(vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!te.call(t,a)||!vt(e[a],t[a]))return!1}return!0}function Rr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wr(e,t){var n=Rr(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Rr(n)}}function Ur(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ur(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ei(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ei(e.document)}return t}function qs(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 jx=Ft&&"documentMode"in document&&11>=document.documentMode,Nl=null,Hs=null,oa=null,ks=!1;function Hr(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ks||Nl==null||Nl!==ei(l)||(l=Nl,"selectionStart"in l&&qs(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),oa&&ra(oa,l)||(oa=l,l=Ji(Hs,"onSelect"),0<l.length&&(t=new ii("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=Nl)))}function $n(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sl={animationend:$n("Animation","AnimationEnd"),animationiteration:$n("Animation","AnimationIteration"),animationstart:$n("Animation","AnimationStart"),transitionrun:$n("Transition","TransitionRun"),transitionstart:$n("Transition","TransitionStart"),transitioncancel:$n("Transition","TransitionCancel"),transitionend:$n("Transition","TransitionEnd")},Bs={},kr={};Ft&&(kr=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function Jn(e){if(Bs[e])return Bs[e];if(!Sl[e])return e;var t=Sl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in kr)return Bs[e]=t[n];return e}var Br=Jn("animationend"),Yr=Jn("animationiteration"),Lr=Jn("animationstart"),Nx=Jn("transitionrun"),Sx=Jn("transitionstart"),Tx=Jn("transitioncancel"),Gr=Jn("transitionend"),Xr=new Map,Ys="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(" ");Ys.push("scrollEnd");function Ht(e,t){Xr.set(e,t),Vn(t,[e])}var ci=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)},At=[],Tl=0,Ls=0;function ri(){for(var e=Tl,t=Ls=Tl=0;t<e;){var n=At[t];At[t++]=null;var l=At[t];At[t++]=null;var a=At[t];At[t++]=null;var s=At[t];if(At[t++]=null,l!==null&&a!==null){var r=l.pending;r===null?a.next=a:(a.next=r.next,r.next=a),l.pending=a}s!==0&&Qr(n,a,s)}}function oi(e,t,n,l){At[Tl++]=e,At[Tl++]=t,At[Tl++]=n,At[Tl++]=l,Ls|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Gs(e,t,n,l){return oi(e,t,n,l),di(e)}function Fn(e,t){return oi(e,null,null,t),di(e)}function Qr(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,s=e.return;s!==null;)s.childLanes|=n,l=s.alternate,l!==null&&(l.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(a=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,a&&t!==null&&(a=31-bt(n),e=s.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),s):null}function di(e){if(50<Oa)throw Oa=0,Wu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _l={};function _x(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,n,l){return new _x(e,t,n,l)}function Xs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wt(e,t){var n=e.alternate;return n===null?(n=yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Zr(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function fi(e,t,n,l,a,s){var r=0;if(l=e,typeof e=="function")Xs(e)&&(r=1);else if(typeof e=="string")r=Ch(e,n,k.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ie:return e=yt(31,n,t,a),e.elementType=ie,e.lanes=s,e;case J:return Wn(n.children,a,s,t);case V:r=8,a|=24;break;case me:return e=yt(12,n,t,a|2),e.elementType=me,e.lanes=s,e;case z:return e=yt(13,n,t,a),e.elementType=z,e.lanes=s,e;case ue:return e=yt(19,n,t,a),e.elementType=ue,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case K:r=10;break e;case $:r=9;break e;case X:r=11;break e;case Z:r=14;break e;case W:r=16,l=null;break e}r=29,n=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=yt(r,n,t,a),t.elementType=e,t.type=l,t.lanes=s,t}function Wn(e,t,n,l){return e=yt(7,e,l,t),e.lanes=n,e}function Qs(e,t,n){return e=yt(6,e,null,t),e.lanes=n,e}function Vr(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function Zs(e,t,n){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kr=new WeakMap;function zt(e,t){if(typeof e=="object"&&e!==null){var n=Kr.get(e);return n!==void 0?n:(t={value:e,source:t,stack:dl(t)},Kr.set(e,t),t)}return{value:e,source:t,stack:dl(t)}}var El=[],Ml=0,mi=null,da=0,Ct=[],Dt=0,gn=null,Lt=1,Gt="";function It(e,t){El[Ml++]=da,El[Ml++]=mi,mi=e,da=t}function $r(e,t,n){Ct[Dt++]=Lt,Ct[Dt++]=Gt,Ct[Dt++]=gn,gn=e;var l=Lt;e=Gt;var a=32-bt(l)-1;l&=~(1<<a),n+=1;var s=32-bt(t)+a;if(30<s){var r=a-a%5;s=(l&(1<<r)-1).toString(32),l>>=r,a-=r,Lt=1<<32-bt(t)+a|n<<a|l,Gt=s+e}else Lt=1<<s|n<<a|l,Gt=e}function Vs(e){e.return!==null&&(It(e,1),$r(e,1,0))}function Ks(e){for(;e===mi;)mi=El[--Ml],El[Ml]=null,da=El[--Ml],El[Ml]=null;for(;e===gn;)gn=Ct[--Dt],Ct[Dt]=null,Gt=Ct[--Dt],Ct[Dt]=null,Lt=Ct[--Dt],Ct[Dt]=null}function Jr(e,t){Ct[Dt++]=Lt,Ct[Dt++]=Gt,Ct[Dt++]=gn,Lt=t.id,Gt=t.overflow,gn=e}var nt=null,Re=null,Ne=!1,pn=null,Ot=!1,$s=Error(o(519));function bn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fa(zt(t,e)),$s}function Fr(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[tt]=e,t[ot]=l,n){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(n=0;n<wa.length;n++)ve(wa[n],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),rr(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),dr(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||hf(t.textContent,n)?(l.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),l.onScroll!=null&&ve("scroll",t),l.onScrollEnd!=null&&ve("scrollend",t),l.onClick!=null&&(t.onclick=Jt),t=!0):t=!1,t||bn(e,!0)}function Wr(e){for(nt=e.return;nt;)switch(nt.tag){case 5:case 31:case 13:Ot=!1;return;case 27:case 3:Ot=!0;return;default:nt=nt.return}}function Al(e){if(e!==nt)return!1;if(!Ne)return Wr(e),Ne=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||fc(e.type,e.memoizedProps)),n=!n),n&&Re&&bn(e),Wr(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Re=Tf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Re=Tf(e)}else t===27?(t=Re,On(e.type)?(e=pc,pc=null,Re=e):Re=t):Re=nt?wt(e.stateNode.nextSibling):null;return!0}function In(){Re=nt=null,Ne=!1}function Js(){var e=pn;return e!==null&&(ht===null?ht=e:ht.push.apply(ht,e),pn=null),e}function fa(e){pn===null?pn=[e]:pn.push(e)}var Fs=g(null),Pn=null,Pt=null;function vn(e,t,n){G(Fs,t._currentValue),t._currentValue=n}function en(e){e._currentValue=Fs.current,C(Fs)}function Ws(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Is(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){var r=a.child;s=s.firstContext;e:for(;s!==null;){var d=s;s=a;for(var p=0;p<t.length;p++)if(d.context===t[p]){s.lanes|=n,d=s.alternate,d!==null&&(d.lanes|=n),Ws(s.return,n,e),l||(r=null);break e}s=d.next}}else if(a.tag===18){if(r=a.return,r===null)throw Error(o(341));r.lanes|=n,s=r.alternate,s!==null&&(s.lanes|=n),Ws(r,n,e),r=null}else r=a.child;if(r!==null)r.return=a;else for(r=a;r!==null;){if(r===e){r=null;break}if(a=r.sibling,a!==null){a.return=r.return,r=a;break}r=r.return}a=r}}function zl(e,t,n,l){e=null;for(var a=t,s=!1;a!==null;){if(!s){if((a.flags&524288)!==0)s=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var r=a.alternate;if(r===null)throw Error(o(387));if(r=r.memoizedProps,r!==null){var d=a.type;vt(a.pendingProps.value,r.value)||(e!==null?e.push(d):e=[d])}}else if(a===pe.current){if(r=a.alternate,r===null)throw Error(o(387));r.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Ba):e=[Ba])}a=a.return}e!==null&&Is(t,e,n,l),t.flags|=262144}function xi(e){for(e=e.firstContext;e!==null;){if(!vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function el(e){Pn=e,Pt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function lt(e){return Ir(Pn,e)}function hi(e,t){return Pn===null&&el(e),Ir(e,t)}function Ir(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Pt===null){if(e===null)throw Error(o(308));Pt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pt=Pt.next=t;return n}var Ex=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Mx=u.unstable_scheduleCallback,Ax=u.unstable_NormalPriority,Qe={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ps(){return{controller:new Ex,data:new Map,refCount:0}}function ma(e){e.refCount--,e.refCount===0&&Mx(Ax,function(){e.controller.abort()})}var xa=null,eu=0,Cl=0,Dl=null;function zx(e,t){if(xa===null){var n=xa=[];eu=0,Cl=lc(),Dl={status:"pending",value:void 0,then:function(l){n.push(l)}}}return eu++,t.then(Pr,Pr),t}function Pr(){if(--eu===0&&xa!==null){Dl!==null&&(Dl.status="fulfilled");var e=xa;xa=null,Cl=0,Dl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Cx(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var eo=S.S;S.S=function(e,t){kd=qe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&zx(e,t),eo!==null&&eo(e,t)};var tl=g(null);function tu(){var e=tl.current;return e!==null?e:Oe.pooledCache}function gi(e,t){t===null?G(tl,tl.current):G(tl,t.pool)}function to(){var e=tu();return e===null?null:{parent:Qe._currentValue,pool:e}}var Ol=Error(o(460)),nu=Error(o(474)),pi=Error(o(542)),bi={then:function(){}};function no(e){return e=e.status,e==="fulfilled"||e==="rejected"}function lo(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Jt,Jt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,io(e),e;default:if(typeof t.status=="string")t.then(Jt,Jt);else{if(e=Oe,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,io(e),e}throw ll=t,Ol}}function nl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ll=n,Ol):n}}var ll=null;function ao(){if(ll===null)throw Error(o(459));var e=ll;return ll=null,e}function io(e){if(e===Ol||e===pi)throw Error(o(483))}var Rl=null,ha=0;function vi(e){var t=ha;return ha+=1,Rl===null&&(Rl=[]),lo(Rl,e,t)}function ga(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yi(e,t){throw t.$$typeof===Y?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function so(e){function t(j,v){if(e){var N=j.deletions;N===null?(j.deletions=[v],j.flags|=16):N.push(v)}}function n(j,v){if(!e)return null;for(;v!==null;)t(j,v),v=v.sibling;return null}function l(j){for(var v=new Map;j!==null;)j.key!==null?v.set(j.key,j):v.set(j.index,j),j=j.sibling;return v}function a(j,v){return j=Wt(j,v),j.index=0,j.sibling=null,j}function s(j,v,N){return j.index=N,e?(N=j.alternate,N!==null?(N=N.index,N<v?(j.flags|=67108866,v):N):(j.flags|=67108866,v)):(j.flags|=1048576,v)}function r(j){return e&&j.alternate===null&&(j.flags|=67108866),j}function d(j,v,N,U){return v===null||v.tag!==6?(v=Qs(N,j.mode,U),v.return=j,v):(v=a(v,N),v.return=j,v)}function p(j,v,N,U){var se=N.type;return se===J?O(j,v,N.props.children,U,N.key):v!==null&&(v.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===W&&nl(se)===v.type)?(v=a(v,N.props),ga(v,N),v.return=j,v):(v=fi(N.type,N.key,N.props,null,j.mode,U),ga(v,N),v.return=j,v)}function T(j,v,N,U){return v===null||v.tag!==4||v.stateNode.containerInfo!==N.containerInfo||v.stateNode.implementation!==N.implementation?(v=Zs(N,j.mode,U),v.return=j,v):(v=a(v,N.children||[]),v.return=j,v)}function O(j,v,N,U,se){return v===null||v.tag!==7?(v=Wn(N,j.mode,U,se),v.return=j,v):(v=a(v,N),v.return=j,v)}function q(j,v,N){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return v=Qs(""+v,j.mode,N),v.return=j,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Q:return N=fi(v.type,v.key,v.props,null,j.mode,N),ga(N,v),N.return=j,N;case ae:return v=Zs(v,j.mode,N),v.return=j,v;case W:return v=nl(v),q(j,v,N)}if(L(v)||H(v))return v=Wn(v,j.mode,N,null),v.return=j,v;if(typeof v.then=="function")return q(j,vi(v),N);if(v.$$typeof===K)return q(j,hi(j,v),N);yi(j,v)}return null}function E(j,v,N,U){var se=v!==null?v.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return se!==null?null:d(j,v,""+N,U);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Q:return N.key===se?p(j,v,N,U):null;case ae:return N.key===se?T(j,v,N,U):null;case W:return N=nl(N),E(j,v,N,U)}if(L(N)||H(N))return se!==null?null:O(j,v,N,U,null);if(typeof N.then=="function")return E(j,v,vi(N),U);if(N.$$typeof===K)return E(j,v,hi(j,N),U);yi(j,N)}return null}function A(j,v,N,U,se){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return j=j.get(N)||null,d(v,j,""+U,se);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case Q:return j=j.get(U.key===null?N:U.key)||null,p(v,j,U,se);case ae:return j=j.get(U.key===null?N:U.key)||null,T(v,j,U,se);case W:return U=nl(U),A(j,v,N,U,se)}if(L(U)||H(U))return j=j.get(N)||null,O(v,j,U,se,null);if(typeof U.then=="function")return A(j,v,N,vi(U),se);if(U.$$typeof===K)return A(j,v,N,hi(v,U),se);yi(v,U)}return null}function ee(j,v,N,U){for(var se=null,Se=null,le=v,ge=v=0,je=null;le!==null&&ge<N.length;ge++){le.index>ge?(je=le,le=null):je=le.sibling;var Te=E(j,le,N[ge],U);if(Te===null){le===null&&(le=je);break}e&&le&&Te.alternate===null&&t(j,le),v=s(Te,v,ge),Se===null?se=Te:Se.sibling=Te,Se=Te,le=je}if(ge===N.length)return n(j,le),Ne&&It(j,ge),se;if(le===null){for(;ge<N.length;ge++)le=q(j,N[ge],U),le!==null&&(v=s(le,v,ge),Se===null?se=le:Se.sibling=le,Se=le);return Ne&&It(j,ge),se}for(le=l(le);ge<N.length;ge++)je=A(le,j,ge,N[ge],U),je!==null&&(e&&je.alternate!==null&&le.delete(je.key===null?ge:je.key),v=s(je,v,ge),Se===null?se=je:Se.sibling=je,Se=je);return e&&le.forEach(function(Hn){return t(j,Hn)}),Ne&&It(j,ge),se}function re(j,v,N,U){if(N==null)throw Error(o(151));for(var se=null,Se=null,le=v,ge=v=0,je=null,Te=N.next();le!==null&&!Te.done;ge++,Te=N.next()){le.index>ge?(je=le,le=null):je=le.sibling;var Hn=E(j,le,Te.value,U);if(Hn===null){le===null&&(le=je);break}e&&le&&Hn.alternate===null&&t(j,le),v=s(Hn,v,ge),Se===null?se=Hn:Se.sibling=Hn,Se=Hn,le=je}if(Te.done)return n(j,le),Ne&&It(j,ge),se;if(le===null){for(;!Te.done;ge++,Te=N.next())Te=q(j,Te.value,U),Te!==null&&(v=s(Te,v,ge),Se===null?se=Te:Se.sibling=Te,Se=Te);return Ne&&It(j,ge),se}for(le=l(le);!Te.done;ge++,Te=N.next())Te=A(le,j,ge,Te.value,U),Te!==null&&(e&&Te.alternate!==null&&le.delete(Te.key===null?ge:Te.key),v=s(Te,v,ge),Se===null?se=Te:Se.sibling=Te,Se=Te);return e&&le.forEach(function(Lh){return t(j,Lh)}),Ne&&It(j,ge),se}function De(j,v,N,U){if(typeof N=="object"&&N!==null&&N.type===J&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case Q:e:{for(var se=N.key;v!==null;){if(v.key===se){if(se=N.type,se===J){if(v.tag===7){n(j,v.sibling),U=a(v,N.props.children),U.return=j,j=U;break e}}else if(v.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===W&&nl(se)===v.type){n(j,v.sibling),U=a(v,N.props),ga(U,N),U.return=j,j=U;break e}n(j,v);break}else t(j,v);v=v.sibling}N.type===J?(U=Wn(N.props.children,j.mode,U,N.key),U.return=j,j=U):(U=fi(N.type,N.key,N.props,null,j.mode,U),ga(U,N),U.return=j,j=U)}return r(j);case ae:e:{for(se=N.key;v!==null;){if(v.key===se)if(v.tag===4&&v.stateNode.containerInfo===N.containerInfo&&v.stateNode.implementation===N.implementation){n(j,v.sibling),U=a(v,N.children||[]),U.return=j,j=U;break e}else{n(j,v);break}else t(j,v);v=v.sibling}U=Zs(N,j.mode,U),U.return=j,j=U}return r(j);case W:return N=nl(N),De(j,v,N,U)}if(L(N))return ee(j,v,N,U);if(H(N)){if(se=H(N),typeof se!="function")throw Error(o(150));return N=se.call(N),re(j,v,N,U)}if(typeof N.then=="function")return De(j,v,vi(N),U);if(N.$$typeof===K)return De(j,v,hi(j,N),U);yi(j,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,v!==null&&v.tag===6?(n(j,v.sibling),U=a(v,N),U.return=j,j=U):(n(j,v),U=Qs(N,j.mode,U),U.return=j,j=U),r(j)):n(j,v)}return function(j,v,N,U){try{ha=0;var se=De(j,v,N,U);return Rl=null,se}catch(le){if(le===Ol||le===pi)throw le;var Se=yt(29,le,null,j.mode);return Se.lanes=U,Se.return=j,Se}finally{}}}var al=so(!0),uo=so(!1),yn=!1;function lu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function au(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 jn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Nn(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(_e&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=di(e),Qr(e,null,n),t}return oi(e,l,t,n),di(e)}function pa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Ic(e,n)}}function iu(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var r={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?a=s=r:s=s.next=r,n=n.next}while(n!==null);s===null?a=s=t:s=s.next=t}else a=s=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:s,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var su=!1;function ba(){if(su){var e=Dl;if(e!==null)throw e}}function va(e,t,n,l){su=!1;var a=e.updateQueue;yn=!1;var s=a.firstBaseUpdate,r=a.lastBaseUpdate,d=a.shared.pending;if(d!==null){a.shared.pending=null;var p=d,T=p.next;p.next=null,r===null?s=T:r.next=T,r=p;var O=e.alternate;O!==null&&(O=O.updateQueue,d=O.lastBaseUpdate,d!==r&&(d===null?O.firstBaseUpdate=T:d.next=T,O.lastBaseUpdate=p))}if(s!==null){var q=a.baseState;r=0,O=T=p=null,d=s;do{var E=d.lane&-536870913,A=E!==d.lane;if(A?(ye&E)===E:(l&E)===E){E!==0&&E===Cl&&(su=!0),O!==null&&(O=O.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var ee=e,re=d;E=t;var De=n;switch(re.tag){case 1:if(ee=re.payload,typeof ee=="function"){q=ee.call(De,q,E);break e}q=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=re.payload,E=typeof ee=="function"?ee.call(De,q,E):ee,E==null)break e;q=w({},q,E);break e;case 2:yn=!0}}E=d.callback,E!==null&&(e.flags|=64,A&&(e.flags|=8192),A=a.callbacks,A===null?a.callbacks=[E]:A.push(E))}else A={lane:E,tag:d.tag,payload:d.payload,callback:d.callback,next:null},O===null?(T=O=A,p=q):O=O.next=A,r|=E;if(d=d.next,d===null){if(d=a.shared.pending,d===null)break;A=d,d=A.next,A.next=null,a.lastBaseUpdate=A,a.shared.pending=null}}while(!0);O===null&&(p=q),a.baseState=p,a.firstBaseUpdate=T,a.lastBaseUpdate=O,s===null&&(a.shared.lanes=0),Mn|=r,e.lanes=r,e.memoizedState=q}}function co(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function ro(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)co(n[e],t)}var wl=g(null),ji=g(0);function oo(e,t){e=on,G(ji,e),G(wl,t),on=e|t.baseLanes}function uu(){G(ji,on),G(wl,wl.current)}function cu(){on=ji.current,C(wl),C(ji)}var jt=g(null),Rt=null;function Sn(e){var t=e.alternate;G(Le,Le.current&1),G(jt,e),Rt===null&&(t===null||wl.current!==null||t.memoizedState!==null)&&(Rt=e)}function ru(e){G(Le,Le.current),G(jt,e),Rt===null&&(Rt=e)}function fo(e){e.tag===22?(G(Le,Le.current),G(jt,e),Rt===null&&(Rt=e)):Tn()}function Tn(){G(Le,Le.current),G(jt,jt.current)}function Nt(e){C(jt),Rt===e&&(Rt=null),C(Le)}var Le=g(0);function Ni(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hc(n)||gc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==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 tn=0,he=null,ze=null,Ze=null,Si=!1,Ul=!1,il=!1,Ti=0,ya=0,ql=null,Dx=0;function Be(){throw Error(o(321))}function ou(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vt(e[n],t[n]))return!1;return!0}function du(e,t,n,l,a,s){return tn=s,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,S.H=e===null||e.memoizedState===null?Jo:Eu,il=!1,s=n(l,a),il=!1,Ul&&(s=xo(t,n,l,a)),mo(e),s}function mo(e){S.H=Sa;var t=ze!==null&&ze.next!==null;if(tn=0,Ze=ze=he=null,Si=!1,ya=0,ql=null,t)throw Error(o(300));e===null||Ve||(e=e.dependencies,e!==null&&xi(e)&&(Ve=!0))}function xo(e,t,n,l){he=e;var a=0;do{if(Ul&&(ql=null),ya=0,Ul=!1,25<=a)throw Error(o(301));if(a+=1,Ze=ze=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}S.H=Fo,s=t(n,l)}while(Ul);return s}function Ox(){var e=S.H,t=e.useState()[0];return t=typeof t.then=="function"?ja(t):t,e=e.useState()[0],(ze!==null?ze.memoizedState:null)!==e&&(he.flags|=1024),t}function fu(){var e=Ti!==0;return Ti=0,e}function mu(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function xu(e){if(Si){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Si=!1}tn=0,Ze=ze=he=null,Ul=!1,ya=Ti=0,ql=null}function ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?he.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Ge(){if(ze===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ze===null?he.memoizedState:Ze.next;if(t!==null)Ze=t,ze=e;else{if(e===null)throw he.alternate===null?Error(o(467)):Error(o(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ze===null?he.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function _i(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ja(e){var t=ya;return ya+=1,ql===null&&(ql=[]),e=lo(ql,e,t),t=he,(Ze===null?t.memoizedState:Ze.next)===null&&(t=t.alternate,S.H=t===null||t.memoizedState===null?Jo:Eu),e}function Ei(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ja(e);if(e.$$typeof===K)return lt(e)}throw Error(o(438,String(e)))}function hu(e){var t=null,n=he.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=he.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=_i(),he.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=de;return t.index++,n}function nn(e,t){return typeof t=="function"?t(e):t}function Mi(e){var t=Ge();return gu(t,ze,e)}function gu(e,t,n){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=n;var a=e.baseQueue,s=l.pending;if(s!==null){if(a!==null){var r=a.next;a.next=s.next,s.next=r}t.baseQueue=a=s,l.pending=null}if(s=e.baseState,a===null)e.memoizedState=s;else{t=a.next;var d=r=null,p=null,T=t,O=!1;do{var q=T.lane&-536870913;if(q!==T.lane?(ye&q)===q:(tn&q)===q){var E=T.revertLane;if(E===0)p!==null&&(p=p.next={lane:0,revertLane:0,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),q===Cl&&(O=!0);else if((tn&E)===E){T=T.next,E===Cl&&(O=!0);continue}else q={lane:0,revertLane:T.revertLane,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},p===null?(d=p=q,r=s):p=p.next=q,he.lanes|=E,Mn|=E;q=T.action,il&&n(s,q),s=T.hasEagerState?T.eagerState:n(s,q)}else E={lane:q,revertLane:T.revertLane,gesture:T.gesture,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},p===null?(d=p=E,r=s):p=p.next=E,he.lanes|=q,Mn|=q;T=T.next}while(T!==null&&T!==t);if(p===null?r=s:p.next=d,!vt(s,e.memoizedState)&&(Ve=!0,O&&(n=Dl,n!==null)))throw n;e.memoizedState=s,e.baseState=r,e.baseQueue=p,l.lastRenderedState=s}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function pu(e){var t=Ge(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,s=t.memoizedState;if(a!==null){n.pending=null;var r=a=a.next;do s=e(s,r.action),r=r.next;while(r!==a);vt(s,t.memoizedState)||(Ve=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,l]}function ho(e,t,n){var l=he,a=Ge(),s=Ne;if(s){if(n===void 0)throw Error(o(407));n=n()}else n=t();var r=!vt((ze||a).memoizedState,n);if(r&&(a.memoizedState=n,Ve=!0),a=a.queue,yu(bo.bind(null,l,a,e),[e]),a.getSnapshot!==t||r||Ze!==null&&Ze.memoizedState.tag&1){if(l.flags|=2048,Hl(9,{destroy:void 0},po.bind(null,l,a,n,t),null),Oe===null)throw Error(o(349));s||(tn&127)!==0||go(l,t,n)}return n}function go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=he.updateQueue,t===null?(t=_i(),he.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function po(e,t,n,l){t.value=n,t.getSnapshot=l,vo(t)&&yo(e)}function bo(e,t,n){return n(function(){vo(t)&&yo(e)})}function vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vt(e,n)}catch{return!0}}function yo(e){var t=Fn(e,2);t!==null&>(t,e,2)}function bu(e){var t=ut();if(typeof e=="function"){var n=e;if(e=n(),il){mn(!0);try{n()}finally{mn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nn,lastRenderedState:e},t}function jo(e,t,n,l){return e.baseState=n,gu(e,ze,typeof l=="function"?l:nn)}function Rx(e,t,n,l,a){if(Ci(e))throw Error(o(485));if(e=t.action,e!==null){var s={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){s.listeners.push(r)}};S.T!==null?n(!0):s.isTransition=!1,l(s),n=t.pending,n===null?(s.next=t.pending=s,No(t,s)):(s.next=n.next,t.pending=n.next=s)}}function No(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var s=S.T,r={};S.T=r;try{var d=n(a,l),p=S.S;p!==null&&p(r,d),So(e,t,d)}catch(T){vu(e,t,T)}finally{s!==null&&r.types!==null&&(s.types=r.types),S.T=s}}else try{s=n(a,l),So(e,t,s)}catch(T){vu(e,t,T)}}function So(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){To(e,t,l)},function(l){return vu(e,t,l)}):To(e,t,n)}function To(e,t,n){t.status="fulfilled",t.value=n,_o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,No(e,n)))}function vu(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,_o(t),t=t.next;while(t!==l)}e.action=null}function _o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Eo(e,t){return t}function Mo(e,t){if(Ne){var n=Oe.formState;if(n!==null){e:{var l=he;if(Ne){if(Re){t:{for(var a=Re,s=Ot;a.nodeType!==8;){if(!s){a=null;break t}if(a=wt(a.nextSibling),a===null){a=null;break t}}s=a.data,a=s==="F!"||s==="F"?a:null}if(a){Re=wt(a.nextSibling),l=a.data==="F!";break e}}bn(l)}l=!1}l&&(t=n[0])}}return n=ut(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:t},n.queue=l,n=Vo.bind(null,he,l),l.dispatch=n,l=bu(!1),s=_u.bind(null,he,!1,l.queue),l=ut(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Rx.bind(null,he,a,s,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Ao(e){var t=Ge();return zo(t,ze,e)}function zo(e,t,n){if(t=gu(e,t,Eo)[0],e=Mi(nn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ja(t)}catch(r){throw r===Ol?pi:r}else l=t;t=Ge();var a=t.queue,s=a.dispatch;return n!==t.memoizedState&&(he.flags|=2048,Hl(9,{destroy:void 0},wx.bind(null,a,n),null)),[l,s,e]}function wx(e,t){e.action=t}function Co(e){var t=Ge(),n=ze;if(n!==null)return zo(t,n,e);Ge(),t=t.memoizedState,n=Ge();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Hl(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=he.updateQueue,t===null&&(t=_i(),he.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Do(){return Ge().memoizedState}function Ai(e,t,n,l){var a=ut();he.flags|=e,a.memoizedState=Hl(1|t,{destroy:void 0},n,l===void 0?null:l)}function zi(e,t,n,l){var a=Ge();l=l===void 0?null:l;var s=a.memoizedState.inst;ze!==null&&l!==null&&ou(l,ze.memoizedState.deps)?a.memoizedState=Hl(t,s,n,l):(he.flags|=e,a.memoizedState=Hl(1|t,s,n,l))}function Oo(e,t){Ai(8390656,8,e,t)}function yu(e,t){zi(2048,8,e,t)}function Ux(e){he.flags|=4;var t=he.updateQueue;if(t===null)t=_i(),he.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ro(e){var t=Ge().memoizedState;return Ux({ref:t,nextImpl:e}),function(){if((_e&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function wo(e,t){return zi(4,2,e,t)}function Uo(e,t){return zi(4,4,e,t)}function qo(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ho(e,t,n){n=n!=null?n.concat([e]):null,zi(4,4,qo.bind(null,t,e),n)}function ju(){}function ko(e,t){var n=Ge();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&ou(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Bo(e,t){var n=Ge();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&ou(t,l[1]))return l[0];if(l=e(),il){mn(!0);try{e()}finally{mn(!1)}}return n.memoizedState=[l,t],l}function Nu(e,t,n){return n===void 0||(tn&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Yd(),he.lanes|=e,Mn|=e,n)}function Yo(e,t,n,l){return vt(n,t)?n:wl.current!==null?(e=Nu(e,n,l),vt(e,t)||(Ve=!0),e):(tn&42)===0||(tn&1073741824)!==0&&(ye&261930)===0?(Ve=!0,e.memoizedState=n):(e=Yd(),he.lanes|=e,Mn|=e,t)}function Lo(e,t,n,l,a){var s=B.p;B.p=s!==0&&8>s?s:8;var r=S.T,d={};S.T=d,_u(e,!1,t,n);try{var p=a(),T=S.S;if(T!==null&&T(d,p),p!==null&&typeof p=="object"&&typeof p.then=="function"){var O=Cx(p,l);Na(e,t,O,_t(e))}else Na(e,t,l,_t(e))}catch(q){Na(e,t,{then:function(){},status:"rejected",reason:q},_t())}finally{B.p=s,r!==null&&d.types!==null&&(r.types=d.types),S.T=r}}function qx(){}function Su(e,t,n,l){if(e.tag!==5)throw Error(o(476));var a=Go(e).queue;Lo(e,a,t,F,n===null?qx:function(){return Xo(e),n(l)})}function Go(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:nn,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:nn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xo(e){var t=Go(e);t.next===null&&(t=e.alternate.memoizedState),Na(e,t.next.queue,{},_t())}function Tu(){return lt(Ba)}function Qo(){return Ge().memoizedState}function Zo(){return Ge().memoizedState}function Hx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=_t();e=jn(n);var l=Nn(t,e,n);l!==null&&(gt(l,t,n),pa(l,t,n)),t={cache:Ps()},e.payload=t;return}t=t.return}}function kx(e,t,n){var l=_t();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ci(e)?Ko(t,n):(n=Gs(e,t,n,l),n!==null&&(gt(n,e,l),$o(n,t,l)))}function Vo(e,t,n){var l=_t();Na(e,t,n,l)}function Na(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ci(e))Ko(t,a);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var r=t.lastRenderedState,d=s(r,n);if(a.hasEagerState=!0,a.eagerState=d,vt(d,r))return oi(e,t,a,0),Oe===null&&ri(),!1}catch{}finally{}if(n=Gs(e,t,a,l),n!==null)return gt(n,e,l),$o(n,t,l),!0}return!1}function _u(e,t,n,l){if(l={lane:2,revertLane:lc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ci(e)){if(t)throw Error(o(479))}else t=Gs(e,n,l,2),t!==null&>(t,e,2)}function Ci(e){var t=e.alternate;return e===he||t!==null&&t===he}function Ko(e,t){Ul=Si=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $o(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Ic(e,n)}}var Sa={readContext:lt,use:Ei,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useLayoutEffect:Be,useInsertionEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useSyncExternalStore:Be,useId:Be,useHostTransitionStatus:Be,useFormState:Be,useActionState:Be,useOptimistic:Be,useMemoCache:Be,useCacheRefresh:Be};Sa.useEffectEvent=Be;var Jo={readContext:lt,use:Ei,useCallback:function(e,t){return ut().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:Oo,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ai(4194308,4,qo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ai(4194308,4,e,t)},useInsertionEffect:function(e,t){Ai(4,2,e,t)},useMemo:function(e,t){var n=ut();t=t===void 0?null:t;var l=e();if(il){mn(!0);try{e()}finally{mn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=ut();if(n!==void 0){var a=n(t);if(il){mn(!0);try{n(t)}finally{mn(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=kx.bind(null,he,e),[l.memoizedState,e]},useRef:function(e){var t=ut();return e={current:e},t.memoizedState=e},useState:function(e){e=bu(e);var t=e.queue,n=Vo.bind(null,he,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ju,useDeferredValue:function(e,t){var n=ut();return Nu(n,e,t)},useTransition:function(){var e=bu(!1);return e=Lo.bind(null,he,e.queue,!0,!1),ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=he,a=ut();if(Ne){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Oe===null)throw Error(o(349));(ye&127)!==0||go(l,t,n)}a.memoizedState=n;var s={value:n,getSnapshot:t};return a.queue=s,Oo(bo.bind(null,l,s,e),[e]),l.flags|=2048,Hl(9,{destroy:void 0},po.bind(null,l,s,n,t),null),n},useId:function(){var e=ut(),t=Oe.identifierPrefix;if(Ne){var n=Gt,l=Lt;n=(l&~(1<<32-bt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ti++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Dx++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Tu,useFormState:Mo,useActionState:Mo,useOptimistic:function(e){var t=ut();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=_u.bind(null,he,!0,n),n.dispatch=t,[e,t]},useMemoCache:hu,useCacheRefresh:function(){return ut().memoizedState=Hx.bind(null,he)},useEffectEvent:function(e){var t=ut(),n={impl:e};return t.memoizedState=n,function(){if((_e&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},Eu={readContext:lt,use:Ei,useCallback:ko,useContext:lt,useEffect:yu,useImperativeHandle:Ho,useInsertionEffect:wo,useLayoutEffect:Uo,useMemo:Bo,useReducer:Mi,useRef:Do,useState:function(){return Mi(nn)},useDebugValue:ju,useDeferredValue:function(e,t){var n=Ge();return Yo(n,ze.memoizedState,e,t)},useTransition:function(){var e=Mi(nn)[0],t=Ge().memoizedState;return[typeof e=="boolean"?e:ja(e),t]},useSyncExternalStore:ho,useId:Qo,useHostTransitionStatus:Tu,useFormState:Ao,useActionState:Ao,useOptimistic:function(e,t){var n=Ge();return jo(n,ze,e,t)},useMemoCache:hu,useCacheRefresh:Zo};Eu.useEffectEvent=Ro;var Fo={readContext:lt,use:Ei,useCallback:ko,useContext:lt,useEffect:yu,useImperativeHandle:Ho,useInsertionEffect:wo,useLayoutEffect:Uo,useMemo:Bo,useReducer:pu,useRef:Do,useState:function(){return pu(nn)},useDebugValue:ju,useDeferredValue:function(e,t){var n=Ge();return ze===null?Nu(n,e,t):Yo(n,ze.memoizedState,e,t)},useTransition:function(){var e=pu(nn)[0],t=Ge().memoizedState;return[typeof e=="boolean"?e:ja(e),t]},useSyncExternalStore:ho,useId:Qo,useHostTransitionStatus:Tu,useFormState:Co,useActionState:Co,useOptimistic:function(e,t){var n=Ge();return ze!==null?jo(n,ze,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:hu,useCacheRefresh:Zo};Fo.useEffectEvent=Ro;function Mu(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:w({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Au={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=_t(),a=jn(l);a.payload=t,n!=null&&(a.callback=n),t=Nn(e,a,l),t!==null&&(gt(t,e,l),pa(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=_t(),a=jn(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Nn(e,a,l),t!==null&&(gt(t,e,l),pa(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_t(),l=jn(n);l.tag=2,t!=null&&(l.callback=t),t=Nn(e,l,n),t!==null&&(gt(t,e,n),pa(t,e,n))}};function Wo(e,t,n,l,a,s,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,s,r):t.prototype&&t.prototype.isPureReactComponent?!ra(n,l)||!ra(a,s):!0}function Io(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Au.enqueueReplaceState(t,t.state,null)}function sl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=w({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Po(e){ci(e)}function ed(e){console.error(e)}function td(e){ci(e)}function Di(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function nd(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function zu(e,t,n){return n=jn(n),n.tag=3,n.payload={element:null},n.callback=function(){Di(e,t)},n}function ld(e){return e=jn(e),e.tag=3,e}function ad(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var s=l.value;e.payload=function(){return a(s)},e.callback=function(){nd(t,n,l)}}var r=n.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){nd(t,n,l),typeof a!="function"&&(An===null?An=new Set([this]):An.add(this));var d=l.stack;this.componentDidCatch(l.value,{componentStack:d!==null?d:""})})}function Bx(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&zl(t,n,a,!0),n=jt.current,n!==null){switch(n.tag){case 31:case 13:return Rt===null?Xi():n.alternate===null&&Ye===0&&(Ye=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===bi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),ec(e,l,a)),!1;case 22:return n.flags|=65536,l===bi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),ec(e,l,a)),!1}throw Error(o(435,n.tag))}return ec(e,l,a),Xi(),!1}if(Ne)return t=jt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==$s&&(e=Error(o(422),{cause:l}),fa(zt(e,n)))):(l!==$s&&(t=Error(o(423),{cause:l}),fa(zt(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=zt(l,n),a=zu(e.stateNode,l,a),iu(e,a),Ye!==4&&(Ye=2)),!1;var s=Error(o(520),{cause:l});if(s=zt(s,n),Da===null?Da=[s]:Da.push(s),Ye!==4&&(Ye=2),t===null)return!0;l=zt(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=zu(n.stateNode,l,e),iu(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(An===null||!An.has(s))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ld(a),ad(a,e,n,l),iu(n,a),!1}n=n.return}while(n!==null);return!1}var Cu=Error(o(461)),Ve=!1;function at(e,t,n,l){t.child=e===null?uo(t,null,n,l):al(t,e.child,n,l)}function id(e,t,n,l,a){n=n.render;var s=t.ref;if("ref"in l){var r={};for(var d in l)d!=="ref"&&(r[d]=l[d])}else r=l;return el(t),l=du(e,t,n,r,s,a),d=fu(),e!==null&&!Ve?(mu(e,t,a),ln(e,t,a)):(Ne&&d&&Vs(t),t.flags|=1,at(e,t,l,a),t.child)}function sd(e,t,n,l,a){if(e===null){var s=n.type;return typeof s=="function"&&!Xs(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,ud(e,t,s,l,a)):(e=fi(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!ku(e,a)){var r=s.memoizedProps;if(n=n.compare,n=n!==null?n:ra,n(r,l)&&e.ref===t.ref)return ln(e,t,a)}return t.flags|=1,e=Wt(s,l),e.ref=t.ref,e.return=t,t.child=e}function ud(e,t,n,l,a){if(e!==null){var s=e.memoizedProps;if(ra(s,l)&&e.ref===t.ref)if(Ve=!1,t.pendingProps=l=s,ku(e,a))(e.flags&131072)!==0&&(Ve=!0);else return t.lanes=e.lanes,ln(e,t,a)}return Du(e,t,n,l,a)}function cd(e,t,n,l){var a=l.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~s}else l=0,t.child=null;return rd(e,t,s,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&gi(t,s!==null?s.cachePool:null),s!==null?oo(t,s):uu(),fo(t);else return l=t.lanes=536870912,rd(e,t,s!==null?s.baseLanes|n:n,n,l)}else s!==null?(gi(t,s.cachePool),oo(t,s),Tn(),t.memoizedState=null):(e!==null&&gi(t,null),uu(),Tn());return at(e,t,a,n),t.child}function Ta(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rd(e,t,n,l,a){var s=tu();return s=s===null?null:{parent:Qe._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&gi(t,null),uu(),fo(t),e!==null&&zl(e,t,l,!0),t.childLanes=a,null}function Oi(e,t){return t=wi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function od(e,t,n){return al(t,e.child,null,n),e=Oi(t,t.pendingProps),e.flags|=2,Nt(t),t.memoizedState=null,e}function Yx(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(l.mode==="hidden")return e=Oi(t,l),t.lanes=536870912,Ta(null,e);if(ru(t),(e=Re)?(e=Sf(e,Ot),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gn!==null?{id:Lt,overflow:Gt}:null,retryLane:536870912,hydrationErrors:null},n=Vr(e),n.return=t,t.child=n,nt=t,Re=null)):e=null,e===null)throw bn(t);return t.lanes=536870912,null}return Oi(t,l)}var s=e.memoizedState;if(s!==null){var r=s.dehydrated;if(ru(t),a)if(t.flags&256)t.flags&=-257,t=od(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ve||zl(e,t,n,!1),a=(n&e.childLanes)!==0,Ve||a){if(l=Oe,l!==null&&(r=Pc(l,n),r!==0&&r!==s.retryLane))throw s.retryLane=r,Fn(e,r),gt(l,e,r),Cu;Xi(),t=od(e,t,n)}else e=s.treeContext,Re=wt(r.nextSibling),nt=t,Ne=!0,pn=null,Ot=!1,e!==null&&Jr(t,e),t=Oi(t,l),t.flags|=4096;return t}return e=Wt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ri(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Du(e,t,n,l,a){return el(t),n=du(e,t,n,l,void 0,a),l=fu(),e!==null&&!Ve?(mu(e,t,a),ln(e,t,a)):(Ne&&l&&Vs(t),t.flags|=1,at(e,t,n,a),t.child)}function dd(e,t,n,l,a,s){return el(t),t.updateQueue=null,n=xo(t,l,n,a),mo(e),l=fu(),e!==null&&!Ve?(mu(e,t,s),ln(e,t,s)):(Ne&&l&&Vs(t),t.flags|=1,at(e,t,n,s),t.child)}function fd(e,t,n,l,a){if(el(t),t.stateNode===null){var s=_l,r=n.contextType;typeof r=="object"&&r!==null&&(s=lt(r)),s=new n(l,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Au,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=l,s.state=t.memoizedState,s.refs={},lu(t),r=n.contextType,s.context=typeof r=="object"&&r!==null?lt(r):_l,s.state=t.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(Mu(t,n,r,l),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(r=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),r!==s.state&&Au.enqueueReplaceState(s,s.state,null),va(t,l,s,a),ba(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){s=t.stateNode;var d=t.memoizedProps,p=sl(n,d);s.props=p;var T=s.context,O=n.contextType;r=_l,typeof O=="object"&&O!==null&&(r=lt(O));var q=n.getDerivedStateFromProps;O=typeof q=="function"||typeof s.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,O||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d||T!==r)&&Io(t,s,l,r),yn=!1;var E=t.memoizedState;s.state=E,va(t,l,s,a),ba(),T=t.memoizedState,d||E!==T||yn?(typeof q=="function"&&(Mu(t,n,q,l),T=t.memoizedState),(p=yn||Wo(t,n,p,l,E,T,r))?(O||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=T),s.props=l,s.state=T,s.context=r,l=p):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{s=t.stateNode,au(e,t),r=t.memoizedProps,O=sl(n,r),s.props=O,q=t.pendingProps,E=s.context,T=n.contextType,p=_l,typeof T=="object"&&T!==null&&(p=lt(T)),d=n.getDerivedStateFromProps,(T=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(r!==q||E!==p)&&Io(t,s,l,p),yn=!1,E=t.memoizedState,s.state=E,va(t,l,s,a),ba();var A=t.memoizedState;r!==q||E!==A||yn||e!==null&&e.dependencies!==null&&xi(e.dependencies)?(typeof d=="function"&&(Mu(t,n,d,l),A=t.memoizedState),(O=yn||Wo(t,n,O,l,E,A,p)||e!==null&&e.dependencies!==null&&xi(e.dependencies))?(T||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(l,A,p),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(l,A,p)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||r===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=A),s.props=l,s.state=A,s.context=p,l=O):(typeof s.componentDidUpdate!="function"||r===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),l=!1)}return s=l,Ri(e,t),l=(t.flags&128)!==0,s||l?(s=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&l?(t.child=al(t,e.child,null,a),t.child=al(t,null,n,a)):at(e,t,n,a),t.memoizedState=s.state,e=t.child):e=ln(e,t,a),e}function md(e,t,n,l){return In(),t.flags|=256,at(e,t,n,l),t.child}var Ou={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ru(e){return{baseLanes:e,cachePool:to()}}function wu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Tt),e}function xd(e,t,n){var l=t.pendingProps,a=!1,s=(t.flags&128)!==0,r;if((r=s)||(r=e!==null&&e.memoizedState===null?!1:(Le.current&2)!==0),r&&(a=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(a?Sn(t):Tn(),(e=Re)?(e=Sf(e,Ot),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gn!==null?{id:Lt,overflow:Gt}:null,retryLane:536870912,hydrationErrors:null},n=Vr(e),n.return=t,t.child=n,nt=t,Re=null)):e=null,e===null)throw bn(t);return gc(e)?t.lanes=32:t.lanes=536870912,null}var d=l.children;return l=l.fallback,a?(Tn(),a=t.mode,d=wi({mode:"hidden",children:d},a),l=Wn(l,a,n,null),d.return=t,l.return=t,d.sibling=l,t.child=d,l=t.child,l.memoizedState=Ru(n),l.childLanes=wu(e,r,n),t.memoizedState=Ou,Ta(null,l)):(Sn(t),Uu(t,d))}var p=e.memoizedState;if(p!==null&&(d=p.dehydrated,d!==null)){if(s)t.flags&256?(Sn(t),t.flags&=-257,t=qu(e,t,n)):t.memoizedState!==null?(Tn(),t.child=e.child,t.flags|=128,t=null):(Tn(),d=l.fallback,a=t.mode,l=wi({mode:"visible",children:l.children},a),d=Wn(d,a,n,null),d.flags|=2,l.return=t,d.return=t,l.sibling=d,t.child=l,al(t,e.child,null,n),l=t.child,l.memoizedState=Ru(n),l.childLanes=wu(e,r,n),t.memoizedState=Ou,t=Ta(null,l));else if(Sn(t),gc(d)){if(r=d.nextSibling&&d.nextSibling.dataset,r)var T=r.dgst;r=T,l=Error(o(419)),l.stack="",l.digest=r,fa({value:l,source:null,stack:null}),t=qu(e,t,n)}else if(Ve||zl(e,t,n,!1),r=(n&e.childLanes)!==0,Ve||r){if(r=Oe,r!==null&&(l=Pc(r,n),l!==0&&l!==p.retryLane))throw p.retryLane=l,Fn(e,l),gt(r,e,l),Cu;hc(d)||Xi(),t=qu(e,t,n)}else hc(d)?(t.flags|=192,t.child=e.child,t=null):(e=p.treeContext,Re=wt(d.nextSibling),nt=t,Ne=!0,pn=null,Ot=!1,e!==null&&Jr(t,e),t=Uu(t,l.children),t.flags|=4096);return t}return a?(Tn(),d=l.fallback,a=t.mode,p=e.child,T=p.sibling,l=Wt(p,{mode:"hidden",children:l.children}),l.subtreeFlags=p.subtreeFlags&65011712,T!==null?d=Wt(T,d):(d=Wn(d,a,n,null),d.flags|=2),d.return=t,l.return=t,l.sibling=d,t.child=l,Ta(null,l),l=t.child,d=e.child.memoizedState,d===null?d=Ru(n):(a=d.cachePool,a!==null?(p=Qe._currentValue,a=a.parent!==p?{parent:p,pool:p}:a):a=to(),d={baseLanes:d.baseLanes|n,cachePool:a}),l.memoizedState=d,l.childLanes=wu(e,r,n),t.memoizedState=Ou,Ta(e.child,l)):(Sn(t),n=e.child,e=n.sibling,n=Wt(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Uu(e,t){return t=wi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function wi(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function qu(e,t,n){return al(t,e.child,null,n),e=Uu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hd(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ws(e.return,t,n)}function Hu(e,t,n,l,a,s){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:s}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=l,r.tail=n,r.tailMode=a,r.treeForkCount=s)}function gd(e,t,n){var l=t.pendingProps,a=l.revealOrder,s=l.tail;l=l.children;var r=Le.current,d=(r&2)!==0;if(d?(r=r&1|2,t.flags|=128):r&=1,G(Le,r),at(e,t,l,n),l=Ne?da:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hd(e,n,t);else if(e.tag===19)hd(e,n,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(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Ni(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Hu(t,!1,a,n,s,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Ni(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Hu(t,!0,n,null,s,l);break;case"together":Hu(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ln(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Mn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(zl(e,t,n,!1),(n&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,n=Wt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Wt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ku(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&xi(e)))}function Lx(e,t,n){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),vn(t,Qe,e.memoizedState.cache),In();break;case 27:case 5:Yt(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:vn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ru(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Sn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?xd(e,t,n):(Sn(t),e=ln(e,t,n),e!==null?e.sibling:null);Sn(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(zl(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return gd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),G(Le,Le.current),l)break;return null;case 22:return t.lanes=0,cd(e,t,n,t.pendingProps);case 24:vn(t,Qe,e.memoizedState.cache)}return ln(e,t,n)}function pd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ve=!0;else{if(!ku(e,n)&&(t.flags&128)===0)return Ve=!1,Lx(e,t,n);Ve=(e.flags&131072)!==0}else Ve=!1,Ne&&(t.flags&1048576)!==0&&$r(t,da,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=nl(t.elementType),t.type=e,typeof e=="function")Xs(e)?(l=sl(e,l),t.tag=1,t=fd(null,t,e,l,n)):(t.tag=0,t=Du(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===X){t.tag=11,t=id(null,t,e,l,n);break e}else if(a===Z){t.tag=14,t=sd(null,t,e,l,n);break e}}throw t=oe(e)||e,Error(o(306,t,""))}}return t;case 0:return Du(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=sl(l,t.pendingProps),fd(e,t,l,a,n);case 3:e:{if(ke(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var s=t.memoizedState;a=s.element,au(e,t),va(t,l,null,n);var r=t.memoizedState;if(l=r.cache,vn(t,Qe,l),l!==s.cache&&Is(t,[Qe],n,!0),ba(),l=r.element,s.isDehydrated)if(s={element:l,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=md(e,t,l,n);break e}else if(l!==a){a=zt(Error(o(424)),t),fa(a),t=md(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Re=wt(e.firstChild),nt=t,Ne=!0,pn=null,Ot=!0,n=uo(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(In(),l===a){t=ln(e,t,n);break e}at(e,t,l,n)}t=t.child}return t;case 26:return Ri(e,t),e===null?(n=zf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ne||(n=t.type,e=t.pendingProps,l=Fi(ce.current).createElement(n),l[tt]=t,l[ot]=e,it(l,n,e),We(l),t.stateNode=l):t.memoizedState=zf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Yt(t),e===null&&Ne&&(l=t.stateNode=Ef(t.type,t.pendingProps,ce.current),nt=t,Ot=!0,a=Re,On(t.type)?(pc=a,Re=wt(l.firstChild)):Re=a),at(e,t,t.pendingProps.children,n),Ri(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((a=l=Re)&&(l=ph(l,t.type,t.pendingProps,Ot),l!==null?(t.stateNode=l,nt=t,Re=wt(l.firstChild),Ot=!1,a=!0):a=!1),a||bn(t)),Yt(t),a=t.type,s=t.pendingProps,r=e!==null?e.memoizedProps:null,l=s.children,fc(a,s)?l=null:r!==null&&fc(a,r)&&(t.flags|=32),t.memoizedState!==null&&(a=du(e,t,Ox,null,null,n),Ba._currentValue=a),Ri(e,t),at(e,t,l,n),t.child;case 6:return e===null&&Ne&&((e=n=Re)&&(n=bh(n,t.pendingProps,Ot),n!==null?(t.stateNode=n,nt=t,Re=null,e=!0):e=!1),e||bn(t)),null;case 13:return xd(e,t,n);case 4:return ke(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=al(t,null,l,n):at(e,t,l,n),t.child;case 11:return id(e,t,t.type,t.pendingProps,n);case 7:return at(e,t,t.pendingProps,n),t.child;case 8:return at(e,t,t.pendingProps.children,n),t.child;case 12:return at(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,vn(t,t.type,l.value),at(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,el(t),a=lt(a),l=l(a),t.flags|=1,at(e,t,l,n),t.child;case 14:return sd(e,t,t.type,t.pendingProps,n);case 15:return ud(e,t,t.type,t.pendingProps,n);case 19:return gd(e,t,n);case 31:return Yx(e,t,n);case 22:return cd(e,t,n,t.pendingProps);case 24:return el(t),l=lt(Qe),e===null?(a=tu(),a===null&&(a=Oe,s=Ps(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=n),a=s),t.memoizedState={parent:l,cache:a},lu(t),vn(t,Qe,a)):((e.lanes&n)!==0&&(au(e,t),va(t,null,null,n),ba()),a=e.memoizedState,s=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),vn(t,Qe,l)):(l=s.cache,vn(t,Qe,l),l!==a.cache&&Is(t,[Qe],n,!0))),at(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function an(e){e.flags|=4}function Bu(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Qd())e.flags|=8192;else throw ll=bi,nu}else e.flags&=-16777217}function bd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wf(t))if(Qd())e.flags|=8192;else throw ll=bi,nu}function Ui(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Fc():536870912,e.lanes|=t,Ll|=t)}function _a(e,t){if(!Ne)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function we(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Gx(e,t,n){var l=t.pendingProps;switch(Ks(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 n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),en(Qe),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Al(t)?an(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Js())),we(t),null;case 26:var a=t.type,s=t.memoizedState;return e===null?(an(t),s!==null?(we(t),bd(t,s)):(we(t),Bu(t,a,null,l,n))):s?s!==e.memoizedState?(an(t),we(t),bd(t,s)):(we(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&an(t),we(t),Bu(t,a,e,l,n)),null;case 27:if(Vt(t),n=ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&an(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return we(t),null}e=k.current,Al(t)?Fr(t):(e=Ef(a,l,n),t.stateNode=e,an(t))}return we(t),null;case 5:if(Vt(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&an(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return we(t),null}if(s=k.current,Al(t))Fr(t);else{var r=Fi(ce.current);switch(s){case 1:s=r.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:s=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":s=r.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":s=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":s=r.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof l.is=="string"?r.createElement("select",{is:l.is}):r.createElement("select"),l.multiple?s.multiple=!0:l.size&&(s.size=l.size);break;default:s=typeof l.is=="string"?r.createElement(a,{is:l.is}):r.createElement(a)}}s[tt]=t,s[ot]=l;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)s.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=s;e:switch(it(s,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&an(t)}}return we(t),Bu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&an(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ce.current,Al(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=nt,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[tt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||hf(e.nodeValue,n)),e||bn(t,!0)}else e=Fi(e).createTextNode(l),e[tt]=t,t.stateNode=e}return we(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Al(t),n!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[tt]=t}else In(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;we(t),e=!1}else n=Js(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Nt(t),t):(Nt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return we(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Al(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(o(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));a[tt]=t}else In(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;we(t),a=!1}else a=Js(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Nt(t),t):(Nt(t),null)}return Nt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ui(t,t.updateQueue),we(t),null);case 4:return fe(),e===null&&uc(t.stateNode.containerInfo),we(t),null;case 10:return en(t.type),we(t),null;case 19:if(C(Le),l=t.memoizedState,l===null)return we(t),null;if(a=(t.flags&128)!==0,s=l.rendering,s===null)if(a)_a(l,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Ni(e),s!==null){for(t.flags|=128,_a(l,!1),e=s.updateQueue,t.updateQueue=e,Ui(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Zr(n,e),n=n.sibling;return G(Le,Le.current&1|2),Ne&&It(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&qe()>Yi&&(t.flags|=128,a=!0,_a(l,!1),t.lanes=4194304)}else{if(!a)if(e=Ni(s),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ui(t,e),_a(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!Ne)return we(t),null}else 2*qe()-l.renderingStartTime>Yi&&n!==536870912&&(t.flags|=128,a=!0,_a(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=qe(),e.sibling=null,n=Le.current,G(Le,a?n&1|2:n&1),Ne&&It(t,l.treeForkCount),e):(we(t),null);case 22:case 23:return Nt(t),cu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),n=t.updateQueue,n!==null&&Ui(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&C(tl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),en(Qe),we(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Xx(e,t){switch(Ks(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return en(Qe),fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Vt(t),null;case 31:if(t.memoizedState!==null){if(Nt(t),t.alternate===null)throw Error(o(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Nt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return C(Le),null;case 4:return fe(),null;case 10:return en(t.type),null;case 22:case 23:return Nt(t),cu(),e!==null&&C(tl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return en(Qe),null;case 25:return null;default:return null}}function vd(e,t){switch(Ks(t),t.tag){case 3:en(Qe),fe();break;case 26:case 27:case 5:Vt(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&Nt(t);break;case 13:Nt(t);break;case 19:C(Le);break;case 10:en(t.type);break;case 22:case 23:Nt(t),cu(),e!==null&&C(tl);break;case 24:en(Qe)}}function Ea(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var s=n.create,r=n.inst;l=s(),r.destroy=l}n=n.next}while(n!==a)}}catch(d){Ae(t,t.return,d)}}function _n(e,t,n){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){var r=l.inst,d=r.destroy;if(d!==void 0){r.destroy=void 0,a=t;var p=n,T=d;try{T()}catch(O){Ae(a,p,O)}}}l=l.next}while(l!==s)}}catch(O){Ae(t,t.return,O)}}function yd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ro(t,n)}catch(l){Ae(e,e.return,l)}}}function jd(e,t,n){n.props=sl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Ae(e,t,l)}}function Ma(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){Ae(e,t,a)}}function Xt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Ae(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Ae(e,t,a)}else n.current=null}function Nd(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){Ae(e,e.return,a)}}function Yu(e,t,n){try{var l=e.stateNode;dh(l,e.type,n,t),l[ot]=t}catch(a){Ae(e,e.return,a)}}function Sd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&On(e.type)||e.tag===4}function Lu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sd(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&&On(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 Gu(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jt));else if(l!==4&&(l===27&&On(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gu(e,t,n),e=e.sibling;e!==null;)Gu(e,t,n),e=e.sibling}function qi(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&On(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qi(e,t,n),e=e.sibling;e!==null;)qi(e,t,n),e=e.sibling}function Td(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);it(t,l,n),t[tt]=e,t[ot]=n}catch(s){Ae(e,e.return,s)}}var sn=!1,Ke=!1,Xu=!1,_d=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function Qx(e,t){if(e=e.containerInfo,oc=ls,e=qr(e),qs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var r=0,d=-1,p=-1,T=0,O=0,q=e,E=null;t:for(;;){for(var A;q!==n||a!==0&&q.nodeType!==3||(d=r+a),q!==s||l!==0&&q.nodeType!==3||(p=r+l),q.nodeType===3&&(r+=q.nodeValue.length),(A=q.firstChild)!==null;)E=q,q=A;for(;;){if(q===e)break t;if(E===n&&++T===a&&(d=r),E===s&&++O===l&&(p=r),(A=q.nextSibling)!==null)break;q=E,E=q.parentNode}q=A}n=d===-1||p===-1?null:{start:d,end:p}}else n=null}n=n||{start:0,end:0}}else n=null;for(dc={focusedElem:e,selectionRange:n},ls=!1,Ie=t;Ie!==null;)if(t=Ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ie=e;else for(;Ie!==null;){switch(t=Ie,s=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(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,n=t,a=s.memoizedProps,s=s.memoizedState,l=n.stateNode;try{var ee=sl(n.type,a);e=l.getSnapshotBeforeUpdate(ee,s),l.__reactInternalSnapshotBeforeUpdate=e}catch(re){Ae(n,n.return,re)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)xc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":xc(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,Ie=e;break}Ie=t.return}}function Ed(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:cn(e,n),l&4&&Ea(5,n);break;case 1:if(cn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(r){Ae(n,n.return,r)}else{var a=sl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){Ae(n,n.return,r)}}l&64&&yd(n),l&512&&Ma(n,n.return);break;case 3:if(cn(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ro(e,t)}catch(r){Ae(n,n.return,r)}}break;case 27:t===null&&l&4&&Td(n);case 26:case 5:cn(e,n),t===null&&l&4&&Nd(n),l&512&&Ma(n,n.return);break;case 12:cn(e,n);break;case 31:cn(e,n),l&4&&zd(e,n);break;case 13:cn(e,n),l&4&&Cd(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Px.bind(null,n),vh(e,n))));break;case 22:if(l=n.memoizedState!==null||sn,!l){t=t!==null&&t.memoizedState!==null||Ke,a=sn;var s=Ke;sn=l,(Ke=t)&&!s?rn(e,n,(n.subtreeFlags&8772)!==0):cn(e,n),sn=a,Ke=s}break;case 30:break;default:cn(e,n)}}function Md(e){var t=e.alternate;t!==null&&(e.alternate=null,Md(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&vs(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 He=null,ft=!1;function un(e,t,n){for(n=n.child;n!==null;)Ad(e,t,n),n=n.sibling}function Ad(e,t,n){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Wl,n)}catch{}switch(n.tag){case 26:Ke||Xt(n,t),un(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ke||Xt(n,t);var l=He,a=ft;On(n.type)&&(He=n.stateNode,ft=!1),un(e,t,n),qa(n.stateNode),He=l,ft=a;break;case 5:Ke||Xt(n,t);case 6:if(l=He,a=ft,He=null,un(e,t,n),He=l,ft=a,He!==null)if(ft)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(n.stateNode)}catch(s){Ae(n,t,s)}else try{He.removeChild(n.stateNode)}catch(s){Ae(n,t,s)}break;case 18:He!==null&&(ft?(e=He,jf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Jl(e)):jf(He,n.stateNode));break;case 4:l=He,a=ft,He=n.stateNode.containerInfo,ft=!0,un(e,t,n),He=l,ft=a;break;case 0:case 11:case 14:case 15:_n(2,n,t),Ke||_n(4,n,t),un(e,t,n);break;case 1:Ke||(Xt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&jd(n,t,l)),un(e,t,n);break;case 21:un(e,t,n);break;case 22:Ke=(l=Ke)||n.memoizedState!==null,un(e,t,n),Ke=l;break;default:un(e,t,n)}}function zd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Jl(e)}catch(n){Ae(t,t.return,n)}}}function Cd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Jl(e)}catch(n){Ae(t,t.return,n)}}function Zx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _d),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _d),t;default:throw Error(o(435,e.tag))}}function Hi(e,t){var n=Zx(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=eh.bind(null,e,l);l.then(a,a)}})}function mt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],s=e,r=t,d=r;e:for(;d!==null;){switch(d.tag){case 27:if(On(d.type)){He=d.stateNode,ft=!1;break e}break;case 5:He=d.stateNode,ft=!1;break e;case 3:case 4:He=d.stateNode.containerInfo,ft=!0;break e}d=d.return}if(He===null)throw Error(o(160));Ad(s,r,a),He=null,ft=!1,s=a.alternate,s!==null&&(s.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Dd(t,e),t=t.sibling}var kt=null;function Dd(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:mt(t,e),xt(e),l&4&&(_n(3,e,e.return),Ea(3,e),_n(5,e,e.return));break;case 1:mt(t,e),xt(e),l&512&&(Ke||n===null||Xt(n,n.return)),l&64&&sn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=kt;if(mt(t,e),xt(e),l&512&&(Ke||n===null||Xt(n,n.return)),l&4){var s=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":s=a.getElementsByTagName("title")[0],(!s||s[ea]||s[tt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=a.createElement(l),a.head.insertBefore(s,a.querySelector("head > title"))),it(s,l,n),s[tt]=e,We(s),l=s;break e;case"link":var r=Of("link","href",a).get(l+(n.href||""));if(r){for(var d=0;d<r.length;d++)if(s=r[d],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(d,1);break t}}s=a.createElement(l),it(s,l,n),a.head.appendChild(s);break;case"meta":if(r=Of("meta","content",a).get(l+(n.content||""))){for(d=0;d<r.length;d++)if(s=r[d],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(d,1);break t}}s=a.createElement(l),it(s,l,n),a.head.appendChild(s);break;default:throw Error(o(468,l))}s[tt]=e,We(s),l=s}e.stateNode=l}else Rf(a,e.type,e.stateNode);else e.stateNode=Df(a,l,e.memoizedProps);else s!==l?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,l===null?Rf(a,e.type,e.stateNode):Df(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Yu(e,e.memoizedProps,n.memoizedProps)}break;case 27:mt(t,e),xt(e),l&512&&(Ke||n===null||Xt(n,n.return)),n!==null&&l&4&&Yu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(mt(t,e),xt(e),l&512&&(Ke||n===null||Xt(n,n.return)),e.flags&32){a=e.stateNode;try{bl(a,"")}catch(ee){Ae(e,e.return,ee)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,Yu(e,a,n!==null?n.memoizedProps:a)),l&1024&&(Xu=!0);break;case 6:if(mt(t,e),xt(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(ee){Ae(e,e.return,ee)}}break;case 3:if(Pi=null,a=kt,kt=Wi(t.containerInfo),mt(t,e),kt=a,xt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Jl(t.containerInfo)}catch(ee){Ae(e,e.return,ee)}Xu&&(Xu=!1,Od(e));break;case 4:l=kt,kt=Wi(e.stateNode.containerInfo),mt(t,e),xt(e),kt=l;break;case 12:mt(t,e),xt(e);break;case 31:mt(t,e),xt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Hi(e,l)));break;case 13:mt(t,e),xt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Bi=qe()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Hi(e,l)));break;case 22:a=e.memoizedState!==null;var p=n!==null&&n.memoizedState!==null,T=sn,O=Ke;if(sn=T||a,Ke=O||p,mt(t,e),Ke=O,sn=T,xt(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||p||sn||Ke||ul(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){p=n=t;try{if(s=p.stateNode,a)r=s.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{d=p.stateNode;var q=p.memoizedProps.style,E=q!=null&&q.hasOwnProperty("display")?q.display:null;d.style.display=E==null||typeof E=="boolean"?"":(""+E).trim()}}catch(ee){Ae(p,p.return,ee)}}}else if(t.tag===6){if(n===null){p=t;try{p.stateNode.nodeValue=a?"":p.memoizedProps}catch(ee){Ae(p,p.return,ee)}}}else if(t.tag===18){if(n===null){p=t;try{var A=p.stateNode;a?Nf(A,!0):Nf(p.stateNode,!1)}catch(ee){Ae(p,p.return,ee)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Hi(e,n))));break;case 19:mt(t,e),xt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Hi(e,l)));break;case 30:break;case 21:break;default:mt(t,e),xt(e)}}function xt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(Sd(l)){n=l;break}l=l.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var a=n.stateNode,s=Lu(e);qi(e,s,a);break;case 5:var r=n.stateNode;n.flags&32&&(bl(r,""),n.flags&=-33);var d=Lu(e);qi(e,d,r);break;case 3:case 4:var p=n.stateNode.containerInfo,T=Lu(e);Gu(e,T,p);break;default:throw Error(o(161))}}catch(O){Ae(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Od(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Od(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function cn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ed(e,t.alternate,t),t=t.sibling}function ul(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:_n(4,t,t.return),ul(t);break;case 1:Xt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&jd(t,t.return,n),ul(t);break;case 27:qa(t.stateNode);case 26:case 5:Xt(t,t.return),ul(t);break;case 22:t.memoizedState===null&&ul(t);break;case 30:ul(t);break;default:ul(t)}e=e.sibling}}function rn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,s=t,r=s.flags;switch(s.tag){case 0:case 11:case 15:rn(a,s,n),Ea(4,s);break;case 1:if(rn(a,s,n),l=s,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(T){Ae(l,l.return,T)}if(l=s,a=l.updateQueue,a!==null){var d=l.stateNode;try{var p=a.shared.hiddenCallbacks;if(p!==null)for(a.shared.hiddenCallbacks=null,a=0;a<p.length;a++)co(p[a],d)}catch(T){Ae(l,l.return,T)}}n&&r&64&&yd(s),Ma(s,s.return);break;case 27:Td(s);case 26:case 5:rn(a,s,n),n&&l===null&&r&4&&Nd(s),Ma(s,s.return);break;case 12:rn(a,s,n);break;case 31:rn(a,s,n),n&&r&4&&zd(a,s);break;case 13:rn(a,s,n),n&&r&4&&Cd(a,s);break;case 22:s.memoizedState===null&&rn(a,s,n),Ma(s,s.return);break;case 30:break;default:rn(a,s,n)}t=t.sibling}}function Qu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ma(n))}function Zu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e))}function Bt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rd(e,t,n,l),t=t.sibling}function Rd(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Bt(e,t,n,l),a&2048&&Ea(9,t);break;case 1:Bt(e,t,n,l);break;case 3:Bt(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e)));break;case 12:if(a&2048){Bt(e,t,n,l),e=t.stateNode;try{var s=t.memoizedProps,r=s.id,d=s.onPostCommit;typeof d=="function"&&d(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(p){Ae(t,t.return,p)}}else Bt(e,t,n,l);break;case 31:Bt(e,t,n,l);break;case 13:Bt(e,t,n,l);break;case 23:break;case 22:s=t.stateNode,r=t.alternate,t.memoizedState!==null?s._visibility&2?Bt(e,t,n,l):Aa(e,t):s._visibility&2?Bt(e,t,n,l):(s._visibility|=2,kl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Qu(r,t);break;case 24:Bt(e,t,n,l),a&2048&&Zu(t.alternate,t);break;default:Bt(e,t,n,l)}}function kl(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,r=t,d=n,p=l,T=r.flags;switch(r.tag){case 0:case 11:case 15:kl(s,r,d,p,a),Ea(8,r);break;case 23:break;case 22:var O=r.stateNode;r.memoizedState!==null?O._visibility&2?kl(s,r,d,p,a):Aa(s,r):(O._visibility|=2,kl(s,r,d,p,a)),a&&T&2048&&Qu(r.alternate,r);break;case 24:kl(s,r,d,p,a),a&&T&2048&&Zu(r.alternate,r);break;default:kl(s,r,d,p,a)}t=t.sibling}}function Aa(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:Aa(n,l),a&2048&&Qu(l.alternate,l);break;case 24:Aa(n,l),a&2048&&Zu(l.alternate,l);break;default:Aa(n,l)}t=t.sibling}}var za=8192;function Bl(e,t,n){if(e.subtreeFlags&za)for(e=e.child;e!==null;)wd(e,t,n),e=e.sibling}function wd(e,t,n){switch(e.tag){case 26:Bl(e,t,n),e.flags&za&&e.memoizedState!==null&&Dh(n,kt,e.memoizedState,e.memoizedProps);break;case 5:Bl(e,t,n);break;case 3:case 4:var l=kt;kt=Wi(e.stateNode.containerInfo),Bl(e,t,n),kt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=za,za=16777216,Bl(e,t,n),za=l):Bl(e,t,n));break;default:Bl(e,t,n)}}function Ud(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 Ca(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ie=l,Hd(l,e)}Ud(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)qd(e),e=e.sibling}function qd(e){switch(e.tag){case 0:case 11:case 15:Ca(e),e.flags&2048&&_n(9,e,e.return);break;case 3:Ca(e);break;case 12:Ca(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ki(e)):Ca(e);break;default:Ca(e)}}function ki(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ie=l,Hd(l,e)}Ud(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_n(8,t,t.return),ki(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ki(t));break;default:ki(t)}e=e.sibling}}function Hd(e,t){for(;Ie!==null;){var n=Ie;switch(n.tag){case 0:case 11:case 15:_n(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ma(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Ie=l;else e:for(n=e;Ie!==null;){l=Ie;var a=l.sibling,s=l.return;if(Md(l),l===n){Ie=null;break e}if(a!==null){a.return=s,Ie=a;break e}Ie=s}}}var Vx={getCacheForType:function(e){var t=lt(Qe),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return lt(Qe).controller.signal}},Kx=typeof WeakMap=="function"?WeakMap:Map,_e=0,Oe=null,be=null,ye=0,Me=0,St=null,En=!1,Yl=!1,Vu=!1,on=0,Ye=0,Mn=0,cl=0,Ku=0,Tt=0,Ll=0,Da=null,ht=null,$u=!1,Bi=0,kd=0,Yi=1/0,Li=null,An=null,$e=0,zn=null,Gl=null,dn=0,Ju=0,Fu=null,Bd=null,Oa=0,Wu=null;function _t(){return(_e&2)!==0&&ye!==0?ye&-ye:S.T!==null?lc():er()}function Yd(){if(Tt===0)if((ye&536870912)===0||Ne){var e=Ja;Ja<<=1,(Ja&3932160)===0&&(Ja=262144),Tt=e}else Tt=536870912;return e=jt.current,e!==null&&(e.flags|=32),Tt}function gt(e,t,n){(e===Oe&&(Me===2||Me===9)||e.cancelPendingCommit!==null)&&(Xl(e,0),Cn(e,ye,Tt,!1)),Pl(e,n),((_e&2)===0||e!==Oe)&&(e===Oe&&((_e&2)===0&&(cl|=n),Ye===4&&Cn(e,ye,Tt,!1)),Qt(e))}function Ld(e,t,n){if((_e&6)!==0)throw Error(o(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Il(e,t),a=l?Fx(e,t):Pu(e,t,!0),s=l;do{if(a===0){Yl&&!l&&Cn(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!$x(n)){a=Pu(e,t,!1),s=!1;continue}if(a===2){if(s=t,e.errorRecoveryDisabledLanes&s)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var d=e;a=Da;var p=d.current.memoizedState.isDehydrated;if(p&&(Xl(d,r).flags|=256),r=Pu(d,r,!1),r!==2){if(Vu&&!p){d.errorRecoveryDisabledLanes|=s,cl|=s,a=4;break e}s=ht,ht=a,s!==null&&(ht===null?ht=s:ht.push.apply(ht,s))}a=r}if(s=!1,a!==2)continue}}if(a===1){Xl(e,0),Cn(e,t,0,!0);break}e:{switch(l=e,s=a,s){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Cn(l,t,Tt,!En);break e;case 2:ht=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(a=Bi+300-qe(),10<a)){if(Cn(l,t,Tt,!En),Wa(l,0,!0)!==0)break e;dn=t,l.timeoutHandle=vf(Gd.bind(null,l,n,ht,Li,$u,t,Tt,cl,Ll,En,s,"Throttled",-0,0),a);break e}Gd(l,n,ht,Li,$u,t,Tt,cl,Ll,En,s,null,-0,0)}}break}while(!0);Qt(e)}function Gd(e,t,n,l,a,s,r,d,p,T,O,q,E,A){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:Jt},wd(t,s,q);var ee=(s&62914560)===s?Bi-qe():(s&4194048)===s?kd-qe():0;if(ee=Oh(q,ee),ee!==null){dn=s,e.cancelPendingCommit=ee(Fd.bind(null,e,t,s,n,l,a,r,d,p,O,q,null,E,A)),Cn(e,s,r,!T);return}}Fd(e,t,s,n,l,a,r,d,p)}function $x(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],s=a.getSnapshot;a=a.value;try{if(!vt(s(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Cn(e,t,n,l){t&=~Ku,t&=~cl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var s=31-bt(a),r=1<<s;l[s]=-1,a&=~r}n!==0&&Wc(e,n,t)}function Gi(){return(_e&6)===0?(Ra(0),!1):!0}function Iu(){if(be!==null){if(Me===0)var e=be.return;else e=be,Pt=Pn=null,xu(e),Rl=null,ha=0,e=be;for(;e!==null;)vd(e.alternate,e),e=e.return;be=null}}function Xl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,xh(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),dn=0,Iu(),Oe=e,be=n=Wt(e.current,null),ye=t,Me=0,St=null,En=!1,Yl=Il(e,t),Vu=!1,Ll=Tt=Ku=cl=Mn=Ye=0,ht=Da=null,$u=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-bt(l),s=1<<a;t|=e[a],l&=~s}return on=t,ri(),n}function Xd(e,t){he=null,S.H=Sa,t===Ol||t===pi?(t=ao(),Me=3):t===nu?(t=ao(),Me=4):Me=t===Cu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,St=t,be===null&&(Ye=1,Di(e,zt(t,e.current)))}function Qd(){var e=jt.current;return e===null?!0:(ye&4194048)===ye?Rt===null:(ye&62914560)===ye||(ye&536870912)!==0?e===Rt:!1}function Zd(){var e=S.H;return S.H=Sa,e===null?Sa:e}function Vd(){var e=S.A;return S.A=Vx,e}function Xi(){Ye=4,En||(ye&4194048)!==ye&&jt.current!==null||(Yl=!0),(Mn&134217727)===0&&(cl&134217727)===0||Oe===null||Cn(Oe,ye,Tt,!1)}function Pu(e,t,n){var l=_e;_e|=2;var a=Zd(),s=Vd();(Oe!==e||ye!==t)&&(Li=null,Xl(e,t)),t=!1;var r=Ye;e:do try{if(Me!==0&&be!==null){var d=be,p=St;switch(Me){case 8:Iu(),r=6;break e;case 3:case 2:case 9:case 6:jt.current===null&&(t=!0);var T=Me;if(Me=0,St=null,Ql(e,d,p,T),n&&Yl){r=0;break e}break;default:T=Me,Me=0,St=null,Ql(e,d,p,T)}}Jx(),r=Ye;break}catch(O){Xd(e,O)}while(!0);return t&&e.shellSuspendCounter++,Pt=Pn=null,_e=l,S.H=a,S.A=s,be===null&&(Oe=null,ye=0,ri()),r}function Jx(){for(;be!==null;)Kd(be)}function Fx(e,t){var n=_e;_e|=2;var l=Zd(),a=Vd();Oe!==e||ye!==t?(Li=null,Yi=qe()+500,Xl(e,t)):Yl=Il(e,t);e:do try{if(Me!==0&&be!==null){t=be;var s=St;t:switch(Me){case 1:Me=0,St=null,Ql(e,t,s,1);break;case 2:case 9:if(no(s)){Me=0,St=null,$d(t);break}t=function(){Me!==2&&Me!==9||Oe!==e||(Me=7),Qt(e)},s.then(t,t);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:no(s)?(Me=0,St=null,$d(t)):(Me=0,St=null,Ql(e,t,s,7));break;case 5:var r=null;switch(be.tag){case 26:r=be.memoizedState;case 5:case 27:var d=be;if(r?wf(r):d.stateNode.complete){Me=0,St=null;var p=d.sibling;if(p!==null)be=p;else{var T=d.return;T!==null?(be=T,Qi(T)):be=null}break t}}Me=0,St=null,Ql(e,t,s,5);break;case 6:Me=0,St=null,Ql(e,t,s,6);break;case 8:Iu(),Ye=6;break e;default:throw Error(o(462))}}Wx();break}catch(O){Xd(e,O)}while(!0);return Pt=Pn=null,S.H=l,S.A=a,_e=n,be!==null?0:(Oe=null,ye=0,ri(),Ye)}function Wx(){for(;be!==null&&!et();)Kd(be)}function Kd(e){var t=pd(e.alternate,e,on);e.memoizedProps=e.pendingProps,t===null?Qi(e):be=t}function $d(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=dd(n,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=dd(n,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:xu(t);default:vd(n,t),t=be=Zr(t,on),t=pd(n,t,on)}e.memoizedProps=e.pendingProps,t===null?Qi(e):be=t}function Ql(e,t,n,l){Pt=Pn=null,xu(t),Rl=null,ha=0;var a=t.return;try{if(Bx(e,a,t,n,ye)){Ye=1,Di(e,zt(n,e.current)),be=null;return}}catch(s){if(a!==null)throw be=a,s;Ye=1,Di(e,zt(n,e.current)),be=null;return}t.flags&32768?(Ne||l===1?e=!0:Yl||(ye&536870912)!==0?e=!1:(En=e=!0,(l===2||l===9||l===3||l===6)&&(l=jt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Jd(t,e)):Qi(t)}function Qi(e){var t=e;do{if((t.flags&32768)!==0){Jd(t,En);return}e=t.return;var n=Gx(t.alternate,t,on);if(n!==null){be=n;return}if(t=t.sibling,t!==null){be=t;return}be=t=e}while(t!==null);Ye===0&&(Ye=5)}function Jd(e,t){do{var n=Xx(e.alternate,e);if(n!==null){n.flags&=32767,be=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){be=e;return}be=e=n}while(e!==null);Ye=6,be=null}function Fd(e,t,n,l,a,s,r,d,p){e.cancelPendingCommit=null;do Zi();while($e!==0);if((_e&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(s=t.lanes|t.childLanes,s|=Ls,Cm(e,n,s,r,d,p),e===Oe&&(be=Oe=null,ye=0),Gl=t,zn=e,dn=n,Ju=s,Fu=a,Bd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,th(Ka,function(){return tf(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=S.T,S.T=null,a=B.p,B.p=2,r=_e,_e|=4;try{Qx(e,t,n)}finally{_e=r,B.p=a,S.T=l}}$e=1,Wd(),Id(),Pd()}}function Wd(){if($e===1){$e=0;var e=zn,t=Gl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=S.T,S.T=null;var l=B.p;B.p=2;var a=_e;_e|=4;try{Dd(t,e);var s=dc,r=qr(e.containerInfo),d=s.focusedElem,p=s.selectionRange;if(r!==d&&d&&d.ownerDocument&&Ur(d.ownerDocument.documentElement,d)){if(p!==null&&qs(d)){var T=p.start,O=p.end;if(O===void 0&&(O=T),"selectionStart"in d)d.selectionStart=T,d.selectionEnd=Math.min(O,d.value.length);else{var q=d.ownerDocument||document,E=q&&q.defaultView||window;if(E.getSelection){var A=E.getSelection(),ee=d.textContent.length,re=Math.min(p.start,ee),De=p.end===void 0?re:Math.min(p.end,ee);!A.extend&&re>De&&(r=De,De=re,re=r);var j=wr(d,re),v=wr(d,De);if(j&&v&&(A.rangeCount!==1||A.anchorNode!==j.node||A.anchorOffset!==j.offset||A.focusNode!==v.node||A.focusOffset!==v.offset)){var N=q.createRange();N.setStart(j.node,j.offset),A.removeAllRanges(),re>De?(A.addRange(N),A.extend(v.node,v.offset)):(N.setEnd(v.node,v.offset),A.addRange(N))}}}}for(q=[],A=d;A=A.parentNode;)A.nodeType===1&&q.push({element:A,left:A.scrollLeft,top:A.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<q.length;d++){var U=q[d];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}ls=!!oc,dc=oc=null}finally{_e=a,B.p=l,S.T=n}}e.current=t,$e=2}}function Id(){if($e===2){$e=0;var e=zn,t=Gl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=S.T,S.T=null;var l=B.p;B.p=2;var a=_e;_e|=4;try{Ed(e,t.alternate,t)}finally{_e=a,B.p=l,S.T=n}}$e=3}}function Pd(){if($e===4||$e===3){$e=0,qt();var e=zn,t=Gl,n=dn,l=Bd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?$e=5:($e=0,Gl=zn=null,ef(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(An=null),ps(n),t=t.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(Wl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=S.T,a=B.p,B.p=2,S.T=null;try{for(var s=e.onRecoverableError,r=0;r<l.length;r++){var d=l[r];s(d.value,{componentStack:d.stack})}}finally{S.T=t,B.p=a}}(dn&3)!==0&&Zi(),Qt(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===Wu?Oa++:(Oa=0,Wu=e):Oa=0,Ra(0)}}function ef(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ma(t)))}function Zi(){return Wd(),Id(),Pd(),tf()}function tf(){if($e!==5)return!1;var e=zn,t=Ju;Ju=0;var n=ps(dn),l=S.T,a=B.p;try{B.p=32>n?32:n,S.T=null,n=Fu,Fu=null;var s=zn,r=dn;if($e=0,Gl=zn=null,dn=0,(_e&6)!==0)throw Error(o(331));var d=_e;if(_e|=4,qd(s.current),Rd(s,s.current,r,n),_e=d,Ra(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Wl,s)}catch{}return!0}finally{B.p=a,S.T=l,ef(e,t)}}function nf(e,t,n){t=zt(n,t),t=zu(e.stateNode,t,2),e=Nn(e,t,2),e!==null&&(Pl(e,2),Qt(e))}function Ae(e,t,n){if(e.tag===3)nf(e,e,n);else for(;t!==null;){if(t.tag===3){nf(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(An===null||!An.has(l))){e=zt(n,e),n=ld(2),l=Nn(t,n,2),l!==null&&(ad(n,l,t,e),Pl(l,2),Qt(l));break}}t=t.return}}function ec(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Kx;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(Vu=!0,a.add(n),e=Ix.bind(null,e,t,n),t.then(e,e))}function Ix(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Oe===e&&(ye&n)===n&&(Ye===4||Ye===3&&(ye&62914560)===ye&&300>qe()-Bi?(_e&2)===0&&Xl(e,0):Ku|=n,Ll===ye&&(Ll=0)),Qt(e)}function lf(e,t){t===0&&(t=Fc()),e=Fn(e,t),e!==null&&(Pl(e,t),Qt(e))}function Px(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lf(e,n)}function eh(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),lf(e,n)}function th(e,t){return Ue(e,t)}var Vi=null,Zl=null,tc=!1,Ki=!1,nc=!1,Dn=0;function Qt(e){e!==Zl&&e.next===null&&(Zl===null?Vi=Zl=e:Zl=Zl.next=e),Ki=!0,tc||(tc=!0,lh())}function Ra(e,t){if(!nc&&Ki){nc=!0;do for(var n=!1,l=Vi;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var s=0;else{var r=l.suspendedLanes,d=l.pingedLanes;s=(1<<31-bt(42|e)+1)-1,s&=a&~(r&~d),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,cf(l,s))}else s=ye,s=Wa(l,l===Oe?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||Il(l,s)||(n=!0,cf(l,s));l=l.next}while(n);nc=!1}}function nh(){af()}function af(){Ki=tc=!1;var e=0;Dn!==0&&mh()&&(e=Dn);for(var t=qe(),n=null,l=Vi;l!==null;){var a=l.next,s=sf(l,t);s===0?(l.next=null,n===null?Vi=a:n.next=a,a===null&&(Zl=n)):(n=l,(e!==0||(s&3)!==0)&&(Ki=!0)),l=a}$e!==0&&$e!==5||Ra(e),Dn!==0&&(Dn=0)}function sf(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var r=31-bt(s),d=1<<r,p=a[r];p===-1?((d&n)===0||(d&l)!==0)&&(a[r]=zm(d,t)):p<=t&&(e.expiredLanes|=d),s&=~d}if(t=Oe,n=ye,n=Wa(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Me===2||Me===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Fe(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Il(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Fe(l),ps(n)){case 2:case 8:n=$c;break;case 32:n=Ka;break;case 268435456:n=Jc;break;default:n=Ka}return l=uf.bind(null,e),n=Ue(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Fe(l),e.callbackPriority=2,e.callbackNode=null,2}function uf(e,t){if($e!==0&&$e!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Zi()&&e.callbackNode!==n)return null;var l=ye;return l=Wa(e,e===Oe?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Ld(e,l,t),sf(e,qe()),e.callbackNode!=null&&e.callbackNode===n?uf.bind(null,e):null)}function cf(e,t){if(Zi())return null;Ld(e,t,!0)}function lh(){hh(function(){(_e&6)!==0?Ue(Qn,nh):af()})}function lc(){if(Dn===0){var e=Cl;e===0&&(e=$a,$a<<=1,($a&261888)===0&&($a=256)),Dn=e}return Dn}function rf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ti(""+e)}function of(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function ah(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var s=rf((a[ot]||null).action),r=l.submitter;r&&(t=(t=r[ot]||null)?rf(t.formAction):r.getAttribute("formAction"),t!==null&&(s=t,r=null));var d=new ii("action","action",null,l,a);e.push({event:d,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Dn!==0){var p=r?of(a,r):new FormData(a);Su(n,{pending:!0,data:p,method:a.method,action:s},null,p)}}else typeof s=="function"&&(d.preventDefault(),p=r?of(a,r):new FormData(a),Su(n,{pending:!0,data:p,method:a.method,action:s},s,p))},currentTarget:a}]})}}for(var ac=0;ac<Ys.length;ac++){var ic=Ys[ac],ih=ic.toLowerCase(),sh=ic[0].toUpperCase()+ic.slice(1);Ht(ih,"on"+sh)}Ht(Br,"onAnimationEnd"),Ht(Yr,"onAnimationIteration"),Ht(Lr,"onAnimationStart"),Ht("dblclick","onDoubleClick"),Ht("focusin","onFocus"),Ht("focusout","onBlur"),Ht(Nx,"onTransitionRun"),Ht(Sx,"onTransitionStart"),Ht(Tx,"onTransitionCancel"),Ht(Gr,"onTransitionEnd"),gl("onMouseEnter",["mouseout","mouseover"]),gl("onMouseLeave",["mouseout","mouseover"]),gl("onPointerEnter",["pointerout","pointerover"]),gl("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wa="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(" "),uh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wa));function df(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var s=void 0;if(t)for(var r=l.length-1;0<=r;r--){var d=l[r],p=d.instance,T=d.currentTarget;if(d=d.listener,p!==s&&a.isPropagationStopped())break e;s=d,a.currentTarget=T;try{s(a)}catch(O){ci(O)}a.currentTarget=null,s=p}else for(r=0;r<l.length;r++){if(d=l[r],p=d.instance,T=d.currentTarget,d=d.listener,p!==s&&a.isPropagationStopped())break e;s=d,a.currentTarget=T;try{s(a)}catch(O){ci(O)}a.currentTarget=null,s=p}}}}function ve(e,t){var n=t[bs];n===void 0&&(n=t[bs]=new Set);var l=e+"__bubble";n.has(l)||(ff(t,e,2,!1),n.add(l))}function sc(e,t,n){var l=0;t&&(l|=4),ff(n,e,l,t)}var $i="_reactListening"+Math.random().toString(36).slice(2);function uc(e){if(!e[$i]){e[$i]=!0,lr.forEach(function(n){n!=="selectionchange"&&(uh.has(n)||sc(n,!1,e),sc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$i]||(t[$i]=!0,sc("selectionchange",!1,t))}}function ff(e,t,n,l){switch(Lf(t)){case 2:var a=Uh;break;case 8:a=qh;break;default:a=Nc}n=a.bind(null,t,n,e),a=void 0,!Ms||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function cc(e,t,n,l,a){var s=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var r=l.tag;if(r===3||r===4){var d=l.stateNode.containerInfo;if(d===a)break;if(r===4)for(r=l.return;r!==null;){var p=r.tag;if((p===3||p===4)&&r.stateNode.containerInfo===a)return;r=r.return}for(;d!==null;){if(r=ml(d),r===null)return;if(p=r.tag,p===5||p===6||p===26||p===27){l=s=r;continue e}d=d.parentNode}}l=l.return}hr(function(){var T=s,O=_s(n),q=[];e:{var E=Xr.get(e);if(E!==void 0){var A=ii,ee=e;switch(e){case"keypress":if(li(n)===0)break e;case"keydown":case"keyup":A=ex;break;case"focusin":ee="focus",A=Ds;break;case"focusout":ee="blur",A=Ds;break;case"beforeblur":case"afterblur":A=Ds;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":A=br;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":A=Gm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":A=lx;break;case Br:case Yr:case Lr:A=Zm;break;case Gr:A=ix;break;case"scroll":case"scrollend":A=Ym;break;case"wheel":A=ux;break;case"copy":case"cut":case"paste":A=Km;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":A=yr;break;case"toggle":case"beforetoggle":A=rx}var re=(t&4)!==0,De=!re&&(e==="scroll"||e==="scrollend"),j=re?E!==null?E+"Capture":null:E;re=[];for(var v=T,N;v!==null;){var U=v;if(N=U.stateNode,U=U.tag,U!==5&&U!==26&&U!==27||N===null||j===null||(U=na(v,j),U!=null&&re.push(Ua(v,U,N))),De)break;v=v.return}0<re.length&&(E=new A(E,ee,null,n,O),q.push({event:E,listeners:re}))}}if((t&7)===0){e:{if(E=e==="mouseover"||e==="pointerover",A=e==="mouseout"||e==="pointerout",E&&n!==Ts&&(ee=n.relatedTarget||n.fromElement)&&(ml(ee)||ee[fl]))break e;if((A||E)&&(E=O.window===O?O:(E=O.ownerDocument)?E.defaultView||E.parentWindow:window,A?(ee=n.relatedTarget||n.toElement,A=T,ee=ee?ml(ee):null,ee!==null&&(De=x(ee),re=ee.tag,ee!==De||re!==5&&re!==27&&re!==6)&&(ee=null)):(A=null,ee=T),A!==ee)){if(re=br,U="onMouseLeave",j="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(re=yr,U="onPointerLeave",j="onPointerEnter",v="pointer"),De=A==null?E:ta(A),N=ee==null?E:ta(ee),E=new re(U,v+"leave",A,n,O),E.target=De,E.relatedTarget=N,U=null,ml(O)===T&&(re=new re(j,v+"enter",ee,n,O),re.target=N,re.relatedTarget=De,U=re),De=U,A&&ee)t:{for(re=ch,j=A,v=ee,N=0,U=j;U;U=re(U))N++;U=0;for(var se=v;se;se=re(se))U++;for(;0<N-U;)j=re(j),N--;for(;0<U-N;)v=re(v),U--;for(;N--;){if(j===v||v!==null&&j===v.alternate){re=j;break t}j=re(j),v=re(v)}re=null}else re=null;A!==null&&mf(q,E,A,re,!1),ee!==null&&De!==null&&mf(q,De,ee,re,!0)}}e:{if(E=T?ta(T):window,A=E.nodeName&&E.nodeName.toLowerCase(),A==="select"||A==="input"&&E.type==="file")var Se=Ar;else if(Er(E))if(zr)Se=vx;else{Se=px;var le=gx}else A=E.nodeName,!A||A.toLowerCase()!=="input"||E.type!=="checkbox"&&E.type!=="radio"?T&&Ss(T.elementType)&&(Se=Ar):Se=bx;if(Se&&(Se=Se(e,T))){Mr(q,Se,n,O);break e}le&&le(e,E,T),e==="focusout"&&T&&E.type==="number"&&T.memoizedProps.value!=null&&Ns(E,"number",E.value)}switch(le=T?ta(T):window,e){case"focusin":(Er(le)||le.contentEditable==="true")&&(Nl=le,Hs=T,oa=null);break;case"focusout":oa=Hs=Nl=null;break;case"mousedown":ks=!0;break;case"contextmenu":case"mouseup":case"dragend":ks=!1,Hr(q,n,O);break;case"selectionchange":if(jx)break;case"keydown":case"keyup":Hr(q,n,O)}var ge;if(Rs)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else jl?Tr(e,n)&&(je="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(je="onCompositionStart");je&&(jr&&n.locale!=="ko"&&(jl||je!=="onCompositionStart"?je==="onCompositionEnd"&&jl&&(ge=gr()):(hn=O,As="value"in hn?hn.value:hn.textContent,jl=!0)),le=Ji(T,je),0<le.length&&(je=new vr(je,e,null,n,O),q.push({event:je,listeners:le}),ge?je.data=ge:(ge=_r(n),ge!==null&&(je.data=ge)))),(ge=dx?fx(e,n):mx(e,n))&&(je=Ji(T,"onBeforeInput"),0<je.length&&(le=new vr("onBeforeInput","beforeinput",null,n,O),q.push({event:le,listeners:je}),le.data=ge)),ah(q,e,T,n,O)}df(q,t)})}function Ua(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ji(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,s=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||s===null||(a=na(e,n),a!=null&&l.unshift(Ua(e,a,s)),a=na(e,t),a!=null&&l.push(Ua(e,a,s))),e.tag===3)return l;e=e.return}return[]}function ch(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function mf(e,t,n,l,a){for(var s=t._reactName,r=[];n!==null&&n!==l;){var d=n,p=d.alternate,T=d.stateNode;if(d=d.tag,p!==null&&p===l)break;d!==5&&d!==26&&d!==27||T===null||(p=T,a?(T=na(n,s),T!=null&&r.unshift(Ua(n,T,p))):a||(T=na(n,s),T!=null&&r.push(Ua(n,T,p)))),n=n.return}r.length!==0&&e.push({event:t,listeners:r})}var rh=/\r\n?/g,oh=/\u0000|\uFFFD/g;function xf(e){return(typeof e=="string"?e:""+e).replace(rh,`
|
|
49
|
-
`).replace(oh,"")}function hf(e,t){return t=xf(t),xf(e)===t}function Ce(e,t,n,l,a,s){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||bl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&bl(e,""+l);break;case"className":Pa(e,"class",l);break;case"tabIndex":Pa(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Pa(e,n,l);break;case"style":mr(e,l,s);break;case"data":if(t!=="object"){Pa(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ti(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(n==="formAction"?(t!=="input"&&Ce(e,t,"name",a.name,a,null),Ce(e,t,"formEncType",a.formEncType,a,null),Ce(e,t,"formMethod",a.formMethod,a,null),Ce(e,t,"formTarget",a.formTarget,a,null)):(Ce(e,t,"encType",a.encType,a,null),Ce(e,t,"method",a.method,a,null),Ce(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ti(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Jt);break;case"onScroll":l!=null&&ve("scroll",e);break;case"onScrollEnd":l!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(o(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=ti(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":ve("beforetoggle",e),ve("toggle",e),Ia(e,"popover",l);break;case"xlinkActuate":$t(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":$t(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":$t(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":$t(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":$t(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":$t(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":$t(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":$t(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":$t(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ia(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=km.get(n)||n,Ia(e,n,l))}}function rc(e,t,n,l,a,s){switch(n){case"style":mr(e,l,s);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(o(60));e.innerHTML=n}}break;case"children":typeof l=="string"?bl(e,l):(typeof l=="number"||typeof l=="bigint")&&bl(e,""+l);break;case"onScroll":l!=null&&ve("scroll",e);break;case"onScrollEnd":l!=null&&ve("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Jt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ar.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),s=e[ot]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,a),typeof l=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):Ia(e,n,l)}}}function it(e,t,n){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 l=!1,a=!1,s;for(s in n)if(n.hasOwnProperty(s)){var r=n[s];if(r!=null)switch(s){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ce(e,t,s,r,n,null)}}a&&Ce(e,t,"srcSet",n.srcSet,n,null),l&&Ce(e,t,"src",n.src,n,null);return;case"input":ve("invalid",e);var d=s=r=a=null,p=null,T=null;for(l in n)if(n.hasOwnProperty(l)){var O=n[l];if(O!=null)switch(l){case"name":a=O;break;case"type":r=O;break;case"checked":p=O;break;case"defaultChecked":T=O;break;case"value":s=O;break;case"defaultValue":d=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(o(137,t));break;default:Ce(e,t,l,O,n,null)}}rr(e,s,d,p,T,r,a,!1);return;case"select":ve("invalid",e),l=r=s=null;for(a in n)if(n.hasOwnProperty(a)&&(d=n[a],d!=null))switch(a){case"value":s=d;break;case"defaultValue":r=d;break;case"multiple":l=d;default:Ce(e,t,a,d,n,null)}t=s,n=r,e.multiple=!!l,t!=null?pl(e,!!l,t,!1):n!=null&&pl(e,!!l,n,!0);return;case"textarea":ve("invalid",e),s=a=l=null;for(r in n)if(n.hasOwnProperty(r)&&(d=n[r],d!=null))switch(r){case"value":l=d;break;case"defaultValue":a=d;break;case"children":s=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:Ce(e,t,r,d,n,null)}dr(e,l,a,s);return;case"option":for(p in n)if(n.hasOwnProperty(p)&&(l=n[p],l!=null))switch(p){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ce(e,t,p,l,n,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(l=0;l<wa.length;l++)ve(wa[l],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(T in n)if(n.hasOwnProperty(T)&&(l=n[T],l!=null))switch(T){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ce(e,t,T,l,n,null)}return;default:if(Ss(t)){for(O in n)n.hasOwnProperty(O)&&(l=n[O],l!==void 0&&rc(e,t,O,l,n,void 0));return}}for(d in n)n.hasOwnProperty(d)&&(l=n[d],l!=null&&Ce(e,t,d,l,n,null))}function dh(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,s=null,r=null,d=null,p=null,T=null,O=null;for(A in n){var q=n[A];if(n.hasOwnProperty(A)&&q!=null)switch(A){case"checked":break;case"value":break;case"defaultValue":p=q;default:l.hasOwnProperty(A)||Ce(e,t,A,null,l,q)}}for(var E in l){var A=l[E];if(q=n[E],l.hasOwnProperty(E)&&(A!=null||q!=null))switch(E){case"type":s=A;break;case"name":a=A;break;case"checked":T=A;break;case"defaultChecked":O=A;break;case"value":r=A;break;case"defaultValue":d=A;break;case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(o(137,t));break;default:A!==q&&Ce(e,t,E,A,l,q)}}js(e,r,d,p,T,O,s,a);return;case"select":A=r=d=E=null;for(s in n)if(p=n[s],n.hasOwnProperty(s)&&p!=null)switch(s){case"value":break;case"multiple":A=p;default:l.hasOwnProperty(s)||Ce(e,t,s,null,l,p)}for(a in l)if(s=l[a],p=n[a],l.hasOwnProperty(a)&&(s!=null||p!=null))switch(a){case"value":E=s;break;case"defaultValue":d=s;break;case"multiple":r=s;default:s!==p&&Ce(e,t,a,s,l,p)}t=d,n=r,l=A,E!=null?pl(e,!!n,E,!1):!!l!=!!n&&(t!=null?pl(e,!!n,t,!0):pl(e,!!n,n?[]:"",!1));return;case"textarea":A=E=null;for(d in n)if(a=n[d],n.hasOwnProperty(d)&&a!=null&&!l.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:Ce(e,t,d,null,l,a)}for(r in l)if(a=l[r],s=n[r],l.hasOwnProperty(r)&&(a!=null||s!=null))switch(r){case"value":E=a;break;case"defaultValue":A=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(o(91));break;default:a!==s&&Ce(e,t,r,a,l,s)}or(e,E,A);return;case"option":for(var ee in n)if(E=n[ee],n.hasOwnProperty(ee)&&E!=null&&!l.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:Ce(e,t,ee,null,l,E)}for(p in l)if(E=l[p],A=n[p],l.hasOwnProperty(p)&&E!==A&&(E!=null||A!=null))switch(p){case"selected":e.selected=E&&typeof E!="function"&&typeof E!="symbol";break;default:Ce(e,t,p,E,l,A)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var re in n)E=n[re],n.hasOwnProperty(re)&&E!=null&&!l.hasOwnProperty(re)&&Ce(e,t,re,null,l,E);for(T in l)if(E=l[T],A=n[T],l.hasOwnProperty(T)&&E!==A&&(E!=null||A!=null))switch(T){case"children":case"dangerouslySetInnerHTML":if(E!=null)throw Error(o(137,t));break;default:Ce(e,t,T,E,l,A)}return;default:if(Ss(t)){for(var De in n)E=n[De],n.hasOwnProperty(De)&&E!==void 0&&!l.hasOwnProperty(De)&&rc(e,t,De,void 0,l,E);for(O in l)E=l[O],A=n[O],!l.hasOwnProperty(O)||E===A||E===void 0&&A===void 0||rc(e,t,O,E,l,A);return}}for(var j in n)E=n[j],n.hasOwnProperty(j)&&E!=null&&!l.hasOwnProperty(j)&&Ce(e,t,j,null,l,E);for(q in l)E=l[q],A=n[q],!l.hasOwnProperty(q)||E===A||E==null&&A==null||Ce(e,t,q,E,l,A)}function gf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fh(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],s=a.transferSize,r=a.initiatorType,d=a.duration;if(s&&d&&gf(r)){for(r=0,d=a.responseEnd,l+=1;l<n.length;l++){var p=n[l],T=p.startTime;if(T>d)break;var O=p.transferSize,q=p.initiatorType;O&&gf(q)&&(p=p.responseEnd,r+=O*(p<d?1:(d-T)/(p-T)))}if(--l,t+=8*(s+r)/(a.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 oc=null,dc=null;function Fi(e){return e.nodeType===9?e:e.ownerDocument}function pf(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 bf(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 fc(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 mc=null;function mh(){var e=window.event;return e&&e.type==="popstate"?e===mc?!1:(mc=e,!0):(mc=null,!1)}var vf=typeof setTimeout=="function"?setTimeout:void 0,xh=typeof clearTimeout=="function"?clearTimeout:void 0,yf=typeof Promise=="function"?Promise:void 0,hh=typeof queueMicrotask=="function"?queueMicrotask:typeof yf<"u"?function(e){return yf.resolve(null).then(e).catch(gh)}:vf;function gh(e){setTimeout(function(){throw e})}function On(e){return e==="head"}function jf(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),Jl(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")qa(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,qa(n);for(var s=n.firstChild;s;){var r=s.nextSibling,d=s.nodeName;s[ea]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=r}}else n==="body"&&qa(e.ownerDocument.body);n=a}while(n);Jl(t)}function Nf(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function xc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":xc(n),vs(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function ph(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ea])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=wt(e.nextSibling),e===null)break}return null}function bh(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=wt(e.nextSibling),e===null))return null;return e}function Sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=wt(e.nextSibling),e===null))return null;return e}function hc(e){return e.data==="$?"||e.data==="$~"}function gc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function vh(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function wt(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 pc=null;function Tf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return wt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function _f(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Ef(e,t,n){switch(t=Fi(n),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 qa(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);vs(e)}var Ut=new Map,Mf=new Set;function Wi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fn=B.d;B.d={f:yh,r:jh,D:Nh,C:Sh,L:Th,m:_h,X:Mh,S:Eh,M:Ah};function yh(){var e=fn.f(),t=Gi();return e||t}function jh(e){var t=xl(e);t!==null&&t.tag===5&&t.type==="form"?Xo(t):fn.r(e)}var Vl=typeof document>"u"?null:document;function Af(e,t,n){var l=Vl;if(l&&typeof t=="string"&&t){var a=Mt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Mf.has(a)||(Mf.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),it(t,"link",e),We(t),l.head.appendChild(t)))}}function Nh(e){fn.D(e),Af("dns-prefetch",e,null)}function Sh(e,t){fn.C(e,t),Af("preconnect",e,t)}function Th(e,t,n){fn.L(e,t,n);var l=Vl;if(l&&e&&t){var a='link[rel="preload"][as="'+Mt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Mt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Mt(n.imageSizes)+'"]')):a+='[href="'+Mt(e)+'"]';var s=a;switch(t){case"style":s=Kl(e);break;case"script":s=$l(e)}Ut.has(s)||(e=w({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ut.set(s,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(Ha(s))||t==="script"&&l.querySelector(ka(s))||(t=l.createElement("link"),it(t,"link",e),We(t),l.head.appendChild(t)))}}function _h(e,t){fn.m(e,t);var n=Vl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Mt(l)+'"][href="'+Mt(e)+'"]',s=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=$l(e)}if(!Ut.has(s)&&(e=w({rel:"modulepreload",href:e},t),Ut.set(s,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ka(s)))return}l=n.createElement("link"),it(l,"link",e),We(l),n.head.appendChild(l)}}}function Eh(e,t,n){fn.S(e,t,n);var l=Vl;if(l&&e){var a=hl(l).hoistableStyles,s=Kl(e);t=t||"default";var r=a.get(s);if(!r){var d={loading:0,preload:null};if(r=l.querySelector(Ha(s)))d.loading=5;else{e=w({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ut.get(s))&&bc(e,n);var p=r=l.createElement("link");We(p),it(p,"link",e),p._p=new Promise(function(T,O){p.onload=T,p.onerror=O}),p.addEventListener("load",function(){d.loading|=1}),p.addEventListener("error",function(){d.loading|=2}),d.loading|=4,Ii(r,t,l)}r={type:"stylesheet",instance:r,count:1,state:d},a.set(s,r)}}}function Mh(e,t){fn.X(e,t);var n=Vl;if(n&&e){var l=hl(n).hoistableScripts,a=$l(e),s=l.get(a);s||(s=n.querySelector(ka(a)),s||(e=w({src:e,async:!0},t),(t=Ut.get(a))&&vc(e,t),s=n.createElement("script"),We(s),it(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function Ah(e,t){fn.M(e,t);var n=Vl;if(n&&e){var l=hl(n).hoistableScripts,a=$l(e),s=l.get(a);s||(s=n.querySelector(ka(a)),s||(e=w({src:e,async:!0,type:"module"},t),(t=Ut.get(a))&&vc(e,t),s=n.createElement("script"),We(s),it(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function zf(e,t,n,l){var a=(a=ce.current)?Wi(a):null;if(!a)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Kl(n.href),n=hl(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Kl(n.href);var s=hl(a).hoistableStyles,r=s.get(e);if(r||(a=a.ownerDocument||a,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,r),(s=a.querySelector(Ha(e)))&&!s._p&&(r.instance=s,r.state.loading=5),Ut.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ut.set(e,n),s||zh(a,e,n,r.state))),t&&l===null)throw Error(o(528,""));return r}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=$l(n),n=hl(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Kl(e){return'href="'+Mt(e)+'"'}function Ha(e){return'link[rel="stylesheet"]['+e+"]"}function Cf(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function zh(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),it(t,"link",n),We(t),e.head.appendChild(t))}function $l(e){return'[src="'+Mt(e)+'"]'}function ka(e){return"script[async]"+e}function Df(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Mt(n.href)+'"]');if(l)return t.instance=l,We(l),l;var a=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),We(l),it(l,"style",a),Ii(l,n.precedence,e),t.instance=l;case"stylesheet":a=Kl(n.href);var s=e.querySelector(Ha(a));if(s)return t.state.loading|=4,t.instance=s,We(s),s;l=Cf(n),(a=Ut.get(a))&&bc(l,a),s=(e.ownerDocument||e).createElement("link"),We(s);var r=s;return r._p=new Promise(function(d,p){r.onload=d,r.onerror=p}),it(s,"link",l),t.state.loading|=4,Ii(s,n.precedence,e),t.instance=s;case"script":return s=$l(n.src),(a=e.querySelector(ka(s)))?(t.instance=a,We(a),a):(l=n,(a=Ut.get(s))&&(l=w({},n),vc(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),We(a),it(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Ii(l,n.precedence,e));return t.instance}function Ii(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,s=a,r=0;r<l.length;r++){var d=l[r];if(d.dataset.precedence===t)s=d;else if(s!==a)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function bc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Pi=null;function Of(e,t,n){if(Pi===null){var l=new Map,a=Pi=new Map;a.set(n,l)}else a=Pi,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var s=n[a];if(!(s[ea]||s[tt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var r=s.getAttribute(t)||"";r=e+r;var d=l.get(r);d?d.push(s):l.set(r,[s])}}return l}function Rf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Ch(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function wf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Dh(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=Kl(l.href),s=t.querySelector(Ha(a));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=es.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,We(s);return}s=t.ownerDocument||t,l=Cf(l),(a=Ut.get(a))&&bc(l,a),s=s.createElement("link"),We(s);var r=s;r._p=new Promise(function(d,p){r.onload=d,r.onerror=p}),it(s,"link",l),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=es.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var yc=0;function Oh(e,t){return e.stylesheets&&e.count===0&&ns(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&yc===0&&(yc=62500*fh());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>yc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function es(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ns(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ts=null;function ns(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ts=new Map,t.forEach(Rh,e),ts=null,es.call(e))}function Rh(e,t){if(!(t.state.loading&4)){var n=ts.get(e);if(n)var l=n.get(null);else{n=new Map,ts.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<a.length;s++){var r=a[s];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(n.set(r.dataset.precedence,r),l=r)}l&&n.set(null,l)}a=t.instance,r=a.getAttribute("data-precedence"),s=n.get(r)||l,s===l&&n.set(null,a),n.set(r,a),this.count++,l=es.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),s?s.parentNode.insertBefore(a,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Ba={$$typeof:K,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function wh(e,t,n,l,a,s,r,d,p){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=hs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hs(0),this.hiddenUpdates=hs(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=s,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=p,this.incompleteTransitions=new Map}function Uf(e,t,n,l,a,s,r,d,p,T,O,q){return e=new wh(e,t,n,r,p,T,O,q,d),t=1,s===!0&&(t|=24),s=yt(3,null,null,t),e.current=s,s.stateNode=e,t=Ps(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:l,isDehydrated:n,cache:t},lu(s),e}function qf(e){return e?(e=_l,e):_l}function Hf(e,t,n,l,a,s){a=qf(a),l.context===null?l.context=a:l.pendingContext=a,l=jn(t),l.payload={element:n},s=s===void 0?null:s,s!==null&&(l.callback=s),n=Nn(e,l,t),n!==null&&(gt(n,e,t),pa(n,e,t))}function kf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function jc(e,t){kf(e,t),(e=e.alternate)&&kf(e,t)}function Bf(e){if(e.tag===13||e.tag===31){var t=Fn(e,67108864);t!==null&>(t,e,67108864),jc(e,67108864)}}function Yf(e){if(e.tag===13||e.tag===31){var t=_t();t=gs(t);var n=Fn(e,t);n!==null&>(n,e,t),jc(e,t)}}var ls=!0;function Uh(e,t,n,l){var a=S.T;S.T=null;var s=B.p;try{B.p=2,Nc(e,t,n,l)}finally{B.p=s,S.T=a}}function qh(e,t,n,l){var a=S.T;S.T=null;var s=B.p;try{B.p=8,Nc(e,t,n,l)}finally{B.p=s,S.T=a}}function Nc(e,t,n,l){if(ls){var a=Sc(l);if(a===null)cc(e,t,l,as,n),Gf(e,l);else if(kh(a,e,t,n,l))l.stopPropagation();else if(Gf(e,l),t&4&&-1<Hh.indexOf(e)){for(;a!==null;){var s=xl(a);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var r=Zn(s.pendingLanes);if(r!==0){var d=s;for(d.pendingLanes|=2,d.entangledLanes|=2;r;){var p=1<<31-bt(r);d.entanglements[1]|=p,r&=~p}Qt(s),(_e&6)===0&&(Yi=qe()+500,Ra(0))}}break;case 31:case 13:d=Fn(s,2),d!==null&>(d,s,2),Gi(),jc(s,2)}if(s=Sc(l),s===null&&cc(e,t,l,as,n),s===a)break;a=s}a!==null&&l.stopPropagation()}else cc(e,t,l,null,n)}}function Sc(e){return e=_s(e),Tc(e)}var as=null;function Tc(e){if(as=null,e=ml(e),e!==null){var t=x(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=_(t),e!==null)return e;e=null}else if(n===31){if(e=y(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return as=e,null}function Lf(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(Xn()){case Qn:return 2;case $c:return 8;case Ka:case Sm:return 32;case Jc:return 268435456;default:return 32}default:return 32}}var _c=!1,Rn=null,wn=null,Un=null,Ya=new Map,La=new Map,qn=[],Hh="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 Gf(e,t){switch(e){case"focusin":case"focusout":Rn=null;break;case"dragenter":case"dragleave":wn=null;break;case"mouseover":case"mouseout":Un=null;break;case"pointerover":case"pointerout":Ya.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":La.delete(t.pointerId)}}function Ga(e,t,n,l,a,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:s,targetContainers:[a]},t!==null&&(t=xl(t),t!==null&&Bf(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function kh(e,t,n,l,a){switch(t){case"focusin":return Rn=Ga(Rn,e,t,n,l,a),!0;case"dragenter":return wn=Ga(wn,e,t,n,l,a),!0;case"mouseover":return Un=Ga(Un,e,t,n,l,a),!0;case"pointerover":var s=a.pointerId;return Ya.set(s,Ga(Ya.get(s)||null,e,t,n,l,a)),!0;case"gotpointercapture":return s=a.pointerId,La.set(s,Ga(La.get(s)||null,e,t,n,l,a)),!0}return!1}function Xf(e){var t=ml(e.target);if(t!==null){var n=x(t);if(n!==null){if(t=n.tag,t===13){if(t=_(n),t!==null){e.blockedOn=t,tr(e.priority,function(){Yf(n)});return}}else if(t===31){if(t=y(n),t!==null){e.blockedOn=t,tr(e.priority,function(){Yf(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function is(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sc(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Ts=l,n.target.dispatchEvent(l),Ts=null}else return t=xl(n),t!==null&&Bf(t),e.blockedOn=n,!1;t.shift()}return!0}function Qf(e,t,n){is(e)&&n.delete(t)}function Bh(){_c=!1,Rn!==null&&is(Rn)&&(Rn=null),wn!==null&&is(wn)&&(wn=null),Un!==null&&is(Un)&&(Un=null),Ya.forEach(Qf),La.forEach(Qf)}function ss(e,t){e.blockedOn===t&&(e.blockedOn=null,_c||(_c=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,Bh)))}var us=null;function Zf(e){us!==e&&(us=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){us===e&&(us=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(Tc(l||n)===null)continue;break}var s=xl(n);s!==null&&(e.splice(t,3),t-=3,Su(s,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Jl(e){function t(p){return ss(p,e)}Rn!==null&&ss(Rn,e),wn!==null&&ss(wn,e),Un!==null&&ss(Un,e),Ya.forEach(t),La.forEach(t);for(var n=0;n<qn.length;n++){var l=qn[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<qn.length&&(n=qn[0],n.blockedOn===null);)Xf(n),n.blockedOn===null&&qn.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],s=n[l+1],r=a[ot]||null;if(typeof s=="function")r||Zf(n);else if(r){var d=null;if(s&&s.hasAttribute("formAction")){if(a=s,r=s[ot]||null)d=r.formAction;else if(Tc(a)!==null)continue}else d=r.action;typeof d=="function"?n[l+1]=d:(n.splice(l,3),l-=3),Zf(n)}}}function Vf(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(r){return a=r})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function Ec(e){this._internalRoot=e}cs.prototype.render=Ec.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current,l=_t();Hf(n,l,e,t,null,null)},cs.prototype.unmount=Ec.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Hf(e.current,2,null,e,null,null),Gi(),t[fl]=null}};function cs(e){this._internalRoot=e}cs.prototype.unstable_scheduleHydration=function(e){if(e){var t=er();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qn.length&&t!==0&&t<qn[n].priority;n++);qn.splice(n,0,e),n===0&&Xf(e)}};var Kf=c.version;if(Kf!=="19.2.4")throw Error(o(527,Kf,"19.2.4"));B.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=h(t),e=e!==null?M(e):null,e=e===null?null:e.stateNode,e};var Yh={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:S,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rs.isDisabled&&rs.supportsFiber)try{Wl=rs.inject(Yh),pt=rs}catch{}}return Qa.createRoot=function(e,t){if(!f(e))throw Error(o(299));var n=!1,l="",a=Po,s=ed,r=td;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=Uf(e,1,!1,null,null,n,l,null,a,s,r,Vf),e[fl]=t.current,uc(e),new Ec(t)},Qa.hydrateRoot=function(e,t,n){if(!f(e))throw Error(o(299));var l=!1,a="",s=Po,r=ed,d=td,p=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(r=n.onCaughtError),n.onRecoverableError!==void 0&&(d=n.onRecoverableError),n.formState!==void 0&&(p=n.formState)),t=Uf(e,1,!0,t,n??null,l,a,p,s,r,d,Vf),t.context=qf(null),n=t.current,l=_t(),l=gs(l),a=jn(l),a.callback=null,Nn(n,a,l),n=l,t.current.lanes=n,Pl(t,n),Qt(t),e[fl]=t.current,uc(e),new cs(t)},Qa.version="19.2.4",Qa}var lm;function Ih(){if(lm)return zc.exports;lm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(c){console.error(c)}}return u(),zc.exports=Wh(),zc.exports}var Ph=Ih();const rl="/dashboard";function am(){const u=window.location.pathname;return u===rl||u===rl+"/"?"/":u.startsWith(rl+"/")?u.slice(rl.length):u||"/"}function Lc(u){return u==="/"||u===""?rl+"/":rl+(u.startsWith("/")?u:"/"+u)}function e0(u){const c=Lc(u);c!==window.location.pathname+window.location.search&&window.history.pushState({},"",c),window.dispatchEvent(new Event("dashboard:navigate"))}typeof document<"u"&&!window.__dashboardRouterInstalled&&(window.__dashboardRouterInstalled=!0,document.addEventListener("click",u=>{var o,f;if(u.defaultPrevented||u.button!==0||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey)return;const c=(f=(o=u.target)==null?void 0:o.closest)==null?void 0:f.call(o,"a");if(!c)return;const m=c.getAttribute("href");m&&(c.hasAttribute("target")||c.hasAttribute("download")||m.startsWith(rl)&&(u.preventDefault(),m!==window.location.pathname+window.location.search&&window.history.pushState({},"",m),window.dispatchEvent(new Event("dashboard:navigate"))))}),window.addEventListener("popstate",()=>{window.dispatchEvent(new Event("dashboard:navigate"))}));function mm(){const[u,c]=R.useState(am());return R.useEffect(()=>{const m=()=>c(am());return window.addEventListener("popstate",m),window.addEventListener("dashboard:navigate",m),()=>{window.removeEventListener("popstate",m),window.removeEventListener("dashboard:navigate",m)}},[]),u}function t0({onLogin:u,error:c}){const[m,o]=R.useState(""),f=x=>{x.preventDefault(),m.trim()&&u(m.trim())};return i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:i.jsxs("div",{className:"w-full max-w-sm rounded-xl border border-border bg-card p-8 text-center shadow-2xl",children:[i.jsx("div",{className:"crt-logo mx-auto mb-4",style:{width:"fit-content"},children:i.jsx("img",{src:"/dashboard/assets/gossip-mini.png",alt:"gossipcat",className:"crt-logo-img h-56 w-56 object-contain drop-shadow-[0_0_28px_rgba(139,92,246,0.45)]"})}),i.jsx("p",{className:"mb-1 text-[30px] font-bold tracking-tight text-foreground",style:{fontFamily:"'Space Grotesk', system-ui, sans-serif",letterSpacing:"-0.02em",textShadow:"0 0 24px rgba(139,92,246,0.4)"},children:"Gossipcat"}),i.jsx("p",{className:"mb-6 text-sm text-muted-foreground",children:"Authenticate to access the dashboard"}),i.jsxs("form",{onSubmit:f,children:[i.jsx("input",{type:"password",value:m,onChange:x=>o(x.target.value),placeholder:"Dashboard key",autoFocus:!0,className:"w-full rounded-lg border border-border bg-background px-4 py-3 font-mono text-sm text-foreground outline-none placeholder:text-muted-foreground focus:border-primary focus:ring-2 focus:ring-primary/20"}),i.jsx("button",{type:"submit",className:"mt-4 w-full rounded-lg bg-primary px-4 py-3 text-sm font-semibold text-primary-foreground transition hover:opacity-90",children:"Unlock"})]}),c&&i.jsx("p",{className:"mt-3 text-sm text-destructive",children:"Invalid key. Check your terminal for the correct key."})]})})}let rt=null,os=3e3,Rc=null;const Gc=new Set;function xm(){if((rt==null?void 0:rt.readyState)===WebSocket.OPEN||(rt==null?void 0:rt.readyState)===WebSocket.CONNECTING)return;const u=location.protocol==="https:"?"wss:":"ws:";rt=new WebSocket(`${u}//${location.host}/dashboard/ws`),rt.onopen=()=>{os=3e3},rt.onmessage=c=>{try{const m=JSON.parse(c.data);Gc.forEach(o=>o(m))}catch{}},rt.onclose=()=>{rt=null,Rc&&clearTimeout(Rc),Rc=setTimeout(()=>{os=Math.min(os*1.5,3e4),xm()},os)},rt.onerror=()=>{}}function hm(u){return Gc.add(u),()=>Gc.delete(u)}function n0(){return(rt==null?void 0:rt.readyState)??WebSocket.CLOSED}const l0=[{to:"/",label:"Dashboard",match:u=>u==="/"},{to:"/team",label:"Team",match:u=>u==="/team"||u.startsWith("/agent/")},{to:"/debates",label:"Debates",match:u=>u==="/debates"},{to:"/tasks",label:"Tasks",match:u=>u==="/tasks"},{to:"/signals",label:"Signals",match:u=>u==="/signals"},{to:"/logs",label:"Logs",match:u=>u==="/logs"}];function im(){const[u,c]=R.useState(!1),m=mm();return R.useEffect(()=>{const o=setInterval(()=>{c(n0()===WebSocket.OPEN)},2e3);return()=>clearInterval(o)},[]),i.jsxs("nav",{className:"relative flex items-center justify-between border-b border-border px-6 py-3.5",children:[i.jsxs("div",{className:"flex items-center gap-6",children:[i.jsxs("a",{href:Lc("/"),className:"flex items-center gap-3 leading-none",children:[i.jsx("img",{src:"/dashboard/assets/gossip-mini.png",alt:"",className:"h-10 w-10 object-contain"}),i.jsx("span",{className:"text-[17px] font-bold text-primary",children:"gossipcat"})]}),i.jsx("div",{className:"flex gap-1",children:l0.map(o=>{const f=o.match(m);return i.jsx("a",{href:Lc(o.to),className:`rounded-md px-3.5 py-1.5 font-mono text-[13px] transition ${f?"bg-primary/10 font-semibold text-primary":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"}`,children:o.label},o.to)})})]}),i.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border bg-card px-3.5 py-1.5 font-mono text-xs text-muted-foreground",children:[i.jsx("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${u?"bg-confirmed shadow-[0_0_6px_rgba(52,211,153,0.5)]":"bg-destructive"}`}),u?"Connected":"Disconnected"]})]})}function gm(u){let c=u.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");c=c.replace(/```(\w*)\n?([\s\S]*?)```/g,(x,_,y)=>`<pre class="md-code-block"><code>${y.trimEnd()}</code></pre>`),c=c.replace(/`([^`\n]+)`/g,'<code class="md-inline-code">$1</code>'),c=c.replace(/\*\*([^*\n]+)\*\*/g,"<strong>$1</strong>"),c=c.replace(/(^|[^*])\*([^*\n]+)\*(?!\*)/g,"$1<em>$2</em>");const m=c.split(`
|
|
50
|
-
`),o=[];let f=!1;for(let x=0;x<m.length;x++){const _=m[x],y=_.match(/^###\s+(.+)$/),b=_.match(/^##\s+(.+)$/),h=_.match(/^#\s+(.+)$/);if(y){f&&(o.push("</ul>"),f=!1),o.push(`<h3 class="md-h3">${y[1]}</h3>`);continue}if(b){f&&(o.push("</ul>"),f=!1),o.push(`<h2 class="md-h2">${b[1]}</h2>`);continue}if(h){f&&(o.push("</ul>"),f=!1),o.push(`<h1 class="md-h1">${h[1]}</h1>`);continue}const M=_.match(/^(\s*)[*-]\s+(.+)$/);if(M){f||(o.push('<ul class="md-list">'),f=!0),o.push(`<li>${M[2]}</li>`);continue}if(_.trim()===""){f&&(o.push("</ul>"),f=!1),o.push("");continue}f&&(o.push("</ul>"),f=!1),o.push(_)}return f&&o.push("</ul>"),o.join(`
|
|
51
|
-
`)}function ms(u){let c=u.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");return c=c.replace(/^\[(FINDING|SUGGESTION|INSIGHT)\]\s*/i,""),c=c.replace(/<agent_finding[^&]*>/g,""),c=c.replace(/<\/agent_finding>/g,""),c=c.replace(/<cite\s+tag="file">([^&]+)<\/cite>/g,'<code class="cite-file">$1</code>'),c=c.replace(/<cite\s+tag="fn">([^&]+)<\/cite>/g,'<code class="cite-fn">$1</code>'),c=c.replace(/<fn>([^&]+)<\/fn>/g,'<code class="cite-fn">$1</code>'),c=c.replace(/```(\w*)\n?([\s\S]*?)```/g,'<pre class="inline-code-block"><code>$2</code></pre>'),c=c.replace(/`([^`]+)`/g,'<code class="inline-code">$1</code>'),c=c.replace(/\*\*([^*\n]+)\*\*/g,'<strong class="font-semibold text-foreground">$1</strong>'),c=c.replace(/(^|[^*])\*([^*\n]+)\*(?!\*)/g,"$1<em>$2</em>"),c}function Xe(u){const c=Date.now(),m=typeof u=="string"?new Date(u).getTime():u,o=Math.max(0,Math.floor((c-m)/1e3));return o<60?"just now":o<3600?Math.floor(o/60)+"m ago":o<86400?Math.floor(o/3600)+"h ago":Math.floor(o/86400)+"d ago"}function a0(u){if(!u)return"—";const c=Math.round(u/1e3);return c<60?c+"s":Math.floor(c/60)+"m "+c%60+"s"}function Xc(u){const c=u.split("-").filter(Boolean);return c.length>=2?(c[0][0]+c[1][0]).toUpperCase():(c[0]||u).slice(0,2).toUpperCase()}const sm=["#8b5cf6","#06b6d4","#f97316","#34d399","#f43f5e","#fbbf24","#60a5fa","#e879f9"];function Va(u){let c=0;for(let m=0;m<u.length;m++)c=c*31+u.charCodeAt(m)>>>0;return sm[c%sm.length]}function i0(u){return u==null||u<=0?"—":u<1e3?`${u}ms`:u<6e4?`${(u/1e3).toFixed(1)}s`:`${(u/6e4).toFixed(1)}m`}function ds({value:u,unit:c,label:m,valueClass:o,pulse:f}){return i.jsxs("div",{className:"flex flex-col items-center py-4 px-3 text-center",children:[i.jsxs("div",{className:"flex items-baseline gap-1",children:[f&&i.jsxs("span",{className:"relative mr-1 inline-flex h-2 w-2",children:[i.jsx("span",{className:"absolute inline-flex h-2 w-2 animate-ping rounded-full bg-unverified/60"}),i.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-unverified"})]}),i.jsx("span",{className:`font-mono text-2xl font-bold leading-none ${o}`,children:u}),c&&i.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:c})]}),i.jsx("div",{className:"mt-1.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:m})]})}function s0({overview:u,activeTasks:c}){const m=u.relayCount+u.nativeCount,o=u.tasksCompleted+u.tasksFailed>0?Math.round(u.tasksCompleted/(u.tasksCompleted+u.tasksFailed)*100):100,f=u.totalFindings>0?Math.round(u.confirmedFindings/u.totalFindings*100):0;return i.jsxs("div",{className:"rounded-lg border border-border bg-card",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-border bg-primary/[0.03] px-3.5 py-3",children:[i.jsx("div",{className:"font-mono text-[11px] font-bold uppercase tracking-widest text-primary",children:"System Pulse"}),i.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-[10px] text-confirmed",children:[i.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-confirmed shadow-[0_0_6px_rgba(52,211,153,0.5)]"}),"LIVE"]})]}),i.jsxs("div",{className:"relative grid grid-cols-2 border-b border-border",children:[i.jsx("span",{className:"pointer-events-none absolute left-0 right-0 top-1/2 h-px bg-border"}),i.jsx("span",{className:"pointer-events-none absolute bottom-0 left-1/2 top-0 w-px bg-border"}),i.jsx(ds,{value:u.agentsOnline,unit:`/${m}`,label:"Agents Online",valueClass:"text-confirmed"}),i.jsx(ds,{value:c,label:"Active Tasks",valueClass:c>0?"text-unverified":"text-muted-foreground",pulse:c>0}),i.jsx(ds,{value:u.consensusRuns,label:"Consensus",valueClass:"text-foreground"}),i.jsx(ds,{value:`${f}%`,label:"Confirmed",valueClass:"text-confirmed"})]}),i.jsxs("div",{className:"px-3.5 py-3",children:[i.jsxs("div",{className:"flex items-center justify-between py-1 font-mono text-[11px]",children:[i.jsx("span",{className:"text-muted-foreground",children:"tasks completed"}),i.jsx("span",{className:"font-semibold text-foreground tabular-nums",children:u.tasksCompleted})]}),i.jsxs("div",{className:"flex items-center justify-between py-1 font-mono text-[11px]",children:[i.jsx("span",{className:"text-muted-foreground",children:"signals total"}),i.jsx("span",{className:"font-semibold text-foreground tabular-nums",children:u.totalSignals})]}),i.jsxs("div",{className:"flex items-center justify-between py-1 font-mono text-[11px]",children:[i.jsx("span",{className:"text-muted-foreground",children:"actionable"}),i.jsx("span",{className:"font-semibold text-unverified tabular-nums",children:u.actionableFindings})]}),u.tasksFailed>0&&i.jsxs("div",{className:"flex items-center justify-between py-1 font-mono text-[11px]",children:[i.jsx("span",{className:"text-muted-foreground",children:"tasks failed"}),i.jsx("span",{className:"font-semibold text-destructive tabular-nums",children:u.tasksFailed})]}),i.jsxs("div",{className:"flex items-center justify-between py-1 font-mono text-[11px]",children:[i.jsx("span",{className:"text-muted-foreground",children:"avg duration"}),i.jsx("span",{className:"font-semibold text-foreground tabular-nums",children:i0(u.avgDurationMs)})]}),i.jsxs("div",{className:"flex items-center justify-between py-1 font-mono text-[11px]",children:[i.jsx("span",{className:"text-muted-foreground",children:"success rate"}),i.jsxs("span",{className:`font-semibold tabular-nums ${o>=95?"text-confirmed":o>=80?"text-unverified":"text-destructive"}`,children:[o,"%"]})]})]}),i.jsx(u0,{hourly:u.hourlyActivity||[]}),u.lastConsensusTimestamp&&i.jsxs("div",{className:"border-t border-border px-3.5 py-2 font-mono text-[10px] text-muted-foreground/60",children:["last consensus ",Xe(u.lastConsensusTimestamp)]})]})}function u0({hourly:u}){const c=u.length===12?u:new Array(12).fill(0),m=Math.max(1,...c);return i.jsxs("div",{className:"border-t border-border bg-primary/[0.02] px-3.5 py-3",children:[i.jsx("div",{className:"mb-2 font-mono text-[9px] font-bold uppercase tracking-widest text-muted-foreground/60",children:"Activity Last 12h"}),i.jsx("div",{className:"flex h-6 items-end gap-0.5",children:c.map((o,f)=>{const x=11-f,_=o/m*100,y=f===11,b=x===0?"last hour":`${x}h ago`;return i.jsx("div",{className:`relative flex-1 cursor-pointer rounded-sm transition-opacity hover:opacity-100 ${y?"bg-chart opacity-90":"bg-chart opacity-40"}`,style:{height:`${Math.max(8,_)}%`},"data-tooltip":`${b}
|
|
52
|
-
${o} task${o===1?"":"s"}`,"data-tooltip-pos":"bottom"},f)})}),i.jsxs("div",{className:"mt-1 flex justify-between font-mono text-[9px] text-muted-foreground/40",children:[i.jsx("span",{children:"12h ago"}),i.jsx("span",{children:"now"})]})]})}function fs(u){var c,m;return((c=u.bench)==null?void 0:c.state)==="benched"?"benched":u.circuitOpen?"struggling":((m=u.bench)==null?void 0:m.state)==="kept-for-coverage"?"kept-for-coverage":null}function pm(u){var c;return((c=u.scores.bench)==null?void 0:c.state)==="benched"||u.scores.circuitOpen}function c0(u){var m,o;const c=u.scores;return((m=c.bench)==null?void 0:m.state)==="benched"?c.bench.reason==="chronic-low-accuracy"?{label:"benched (chronic)",cls:"bg-destructive/15 text-destructive"}:c.bench.reason==="burst-hallucination"?{label:"benched (burst)",cls:"bg-destructive/15 text-destructive"}:{label:"benched",cls:"bg-destructive/15 text-destructive"}:((o=c.bench)==null?void 0:o.state)==="kept-for-coverage"?{label:"kept for coverage",cls:"border border-unverified/40 text-unverified"}:c.circuitOpen?{label:`struggling (${c.consecutiveFailures} fails)`,cls:"bg-unverified/15 text-unverified"}:{label:"",cls:""}}function r0({agents:u}){const c=u.filter(pm);return c.length===0?null:i.jsxs("div",{className:"rounded-lg border border-border bg-card",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-border bg-destructive/[0.04] px-3.5 py-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center rounded-sm bg-destructive/15 font-mono text-[11px] font-bold text-destructive",children:"!"}),i.jsx("span",{className:"font-mono text-[11px] font-bold uppercase tracking-widest text-destructive",children:"Agents Needing Attention"})]}),i.jsx("span",{className:"rounded-full border border-destructive/20 bg-destructive/10 px-2 py-0.5 font-mono text-xs font-bold text-destructive",children:c.length})]}),i.jsx("div",{children:c.map((m,o)=>{var y,b;const f=(y=m.lastTask)!=null&&y.timestamp?Xe(m.lastTask.timestamp):"",x=c0(m),_=((b=m.scores.bench)==null?void 0:b.state)==="benched";return i.jsxs("a",{href:`/dashboard/agent/${encodeURIComponent(m.id)}`,className:`block px-3.5 py-3 transition hover:bg-destructive/[0.03] ${o>0?"border-t border-border/40":""}`,children:[i.jsxs("div",{className:"mb-1 flex items-center gap-2.5",children:[i.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${_?"bg-destructive shadow-[0_0_6px_rgba(248,113,113,0.6)]":"bg-unverified"}`}),i.jsx("span",{className:"text-sm font-semibold text-foreground",children:m.id}),x.label&&i.jsx("span",{className:`shrink-0 rounded-sm px-1.5 py-0.5 font-mono text-[9px] font-bold uppercase ${x.cls}`,children:x.label})]}),i.jsxs("div",{className:"flex items-center justify-between pl-4 font-mono text-[10px] text-muted-foreground",children:[i.jsxs("span",{children:[m.scores.consecutiveFailures," consecutive fails"]}),f&&i.jsx("span",{className:"text-muted-foreground/50",children:f})]})]},m.id)})})]})}const Vc="/dashboard/api";async function Je(u,c){const m=await fetch(`${Vc}/${u}`,{credentials:"include",...c});if(m.status===401)throw new Error("unauthorized");if(!m.ok)throw new Error(`API error: ${m.status}`);return m.json()}async function o0(u){return(await fetch(`${Vc}/auth`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:u})})).ok}async function d0(){try{return(await fetch(`${Vc}/overview`,{credentials:"include"})).ok}catch{return!1}}const f0=7200*1e3;function m0(u){const c=Date.now()-new Date(u).getTime();return c<0?"0s":c<6e4?`${Math.floor(c/1e3)}s`:c<36e5?`${Math.floor(c/6e4)}m ${Math.floor(c%6e4/1e3)}s`:`${Math.floor(c/36e5)}h ${Math.floor(c%36e5/6e4)}m`}function x0({onCountChange:u}){const[c,m]=R.useState([]),[,o]=R.useState(0);R.useEffect(()=>{let y=!1;const b=async()=>{var M;try{const w=await Je("active-tasks");y||(m(w.tasks||[]),u==null||u(((M=w.tasks)==null?void 0:M.length)||0))}catch{}};b();const h=setInterval(b,5e3);return()=>{y=!0,clearInterval(h)}},[u]),R.useEffect(()=>{if(c.length===0)return;const y=setInterval(()=>o(b=>b+1),1e3);return()=>clearInterval(y)},[c.length]);const f=Date.now(),x=c.filter(y=>f-new Date(y.startedAt).getTime()<f0),_=c.length-x.length;return x.length===0?null:i.jsxs("div",{className:"rounded-lg border border-border bg-card/60 px-4 py-2.5",children:[i.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[i.jsx("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-confirmed shadow-[0_0_6px_rgba(52,211,153,0.5)]"}),i.jsx("span",{className:"font-mono text-xs font-bold uppercase tracking-widest text-foreground",children:"Live"}),i.jsxs("span",{className:"font-mono text-[11px] text-muted-foreground",children:[x.length," active"]}),_>0&&i.jsxs("span",{className:"font-mono text-[10px] text-muted-foreground/50",children:["· ",_," stale"]})]}),i.jsx("div",{className:"max-h-40 space-y-1 overflow-y-auto",children:x.map(y=>i.jsxs("div",{className:"grid items-center gap-3",style:{gridTemplateColumns:"minmax(120px, auto) 1fr auto"},children:[i.jsx("span",{className:"font-mono text-[11px] font-semibold text-foreground truncate",children:y.agentId}),i.jsx("span",{className:"min-w-0 truncate text-[11px] text-muted-foreground",children:y.task}),i.jsx("span",{className:"font-mono text-[11px] text-muted-foreground whitespace-nowrap tabular-nums",children:m0(y.startedAt)})]},y.taskId))})]})}function Qc(u){return u.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Fl({title:u,hint:c,compact:m=!1}){return i.jsxs("div",{className:`text-center ${m?"py-3":"py-6"}`,children:[i.jsx("div",{className:"font-mono text-xs text-muted-foreground",children:u}),c&&i.jsx("div",{className:"mt-1 font-mono text-[10px] text-muted-foreground/60",children:c})]})}const wc=5,Uc={agreement:{label:"CONFIRMED",filter:"confirmed",cls:"text-confirmed bg-confirmed/10"},consensus_verified:{label:"CONFIRMED",filter:"confirmed",cls:"text-confirmed bg-confirmed/10"},disagreement:{label:"DISPUTED",filter:"disputed",cls:"text-disputed bg-disputed/10"},hallucination_caught:{label:"DISPUTED",filter:"disputed",cls:"text-disputed bg-disputed/10"},unverified:{label:"UNVERIFIED",filter:"unverified",cls:"text-unverified bg-unverified/10"},unique_confirmed:{label:"UNIQUE",filter:"unique",cls:"text-unique bg-unique/10"},unique_unconfirmed:{label:"UNIQUE",filter:"unique",cls:"text-unique bg-unique/10"},new_finding:{label:"NEW",filter:"unique",cls:"text-unique bg-unique/10"}},um=[{key:"all",label:"All",cls:"text-muted-foreground border-border/40 hover:border-border/60",activeCls:"text-foreground bg-muted border-border"},{key:"confirmed",label:"Confirmed",cls:"text-confirmed/50 border-confirmed/20 hover:border-confirmed/40",activeCls:"text-confirmed bg-confirmed/10 border-confirmed/40"},{key:"unique",label:"Unique",cls:"text-unique/50 border-unique/20 hover:border-unique/40",activeCls:"text-unique bg-unique/10 border-unique/40"},{key:"disputed",label:"Disputed",cls:"text-disputed/50 border-disputed/20 hover:border-disputed/40",activeCls:"text-disputed bg-disputed/10 border-disputed/40"},{key:"unverified",label:"Unverified",cls:"text-unverified/50 border-unverified/20 hover:border-unverified/40",activeCls:"text-unverified bg-unverified/10 border-unverified/40"},{key:"insight",label:"Insight",cls:"text-zinc-500 border-zinc-500/20 hover:border-zinc-500/40",activeCls:"text-zinc-400 bg-zinc-500/10 border-zinc-500/40"}],h0=[{key:"all",label:"All",cls:"text-muted-foreground border-border/40 hover:border-border/60",activeCls:"text-foreground bg-muted border-border"},{key:"critical",label:"Critical",cls:"text-red-400/50 border-red-400/20 hover:border-red-400/40",activeCls:"text-red-400 bg-red-400/10 border-red-400/40"},{key:"high",label:"High",cls:"text-orange-400/50 border-orange-400/20 hover:border-orange-400/40",activeCls:"text-orange-400 bg-orange-400/10 border-orange-400/40"},{key:"medium",label:"Medium",cls:"text-yellow-400/50 border-yellow-400/20 hover:border-yellow-400/40",activeCls:"text-yellow-400 bg-yellow-400/10 border-yellow-400/40"},{key:"low",label:"Low",cls:"text-muted-foreground/50 border-border/40 hover:border-border/60",activeCls:"text-muted-foreground bg-muted/50 border-border"}],g0={critical:"text-red-400 bg-red-500/10",high:"text-orange-400 bg-orange-500/10",medium:"text-yellow-400 bg-yellow-500/10",low:"text-muted-foreground bg-muted/50"},p0="[&_.cite-file]:rounded [&_.cite-file]:bg-blue-500/10 [&_.cite-file]:px-1 [&_.cite-file]:font-mono [&_.cite-file]:text-blue-400 [&_.cite-fn]:rounded [&_.cite-fn]:bg-purple-500/10 [&_.cite-fn]:px-1 [&_.cite-fn]:font-mono [&_.cite-fn]:text-purple-400 [&_.inline-code]:rounded [&_.inline-code]:bg-muted [&_.inline-code]:px-1 [&_.inline-code]:py-0.5 [&_.inline-code]:font-mono [&_.inline-code]:text-[11px] [&_.inline-code]:text-foreground/80 [&_.inline-code-block]:my-1.5 [&_.inline-code-block]:block [&_.inline-code-block]:rounded [&_.inline-code-block]:bg-muted/70 [&_.inline-code-block]:p-2 [&_.inline-code-block]:font-mono [&_.inline-code-block]:text-[11px] [&_.inline-code-block]:text-foreground/70 [&_.inline-code-block]:overflow-x-auto",b0={HTML_ENTITY_ENCODED_TAGS:"HTML-entity-encoded <agent_finding> tags — parser saw 0 tags",HTML_ENTITY_MIXED_PAYLOAD:"Mixed raw + HTML-entity-encoded tags — some findings dropped",SCHEMA_DRIFT_PHASE2_VERDICT_TOKENS:"Schema drift — Phase-2 consensus verdict types emitted (confirmed/disputed/unique/verdict)",SCHEMA_DRIFT_INVENTED_TYPE_TOKENS:"Schema drift — invented <agent_finding> type names (valid: finding | suggestion | insight)",SCHEMA_DRIFT_NESTED_SUBTAGS:'Schema drift — nested <type>...</type> subtags instead of type="..." attribute'};function v0({f:u,reviewInfo:c,diagnostics:m}){const o=u.tag==="confirmed"?"text-confirmed bg-confirmed/10 border-confirmed/20":u.tag==="disputed"?"text-disputed bg-disputed/10 border-disputed/20":u.tag==="unverified"?"text-unverified bg-unverified/10 border-unverified/20":"text-unique bg-unique/10 border-unique/20",f=u.severity&&g0[u.severity]||"",x=u.findingType==="suggestion"?"💡 SUGGESTION":u.findingType==="insight"?"INSIGHT":null,_=u.findingType==="suggestion"?"text-blue-400 bg-blue-500/10":u.findingType==="insight"?"text-zinc-400 bg-zinc-500/10":"",y=u.finding.match(/<cite\s+tag="file">([^<]+)<\/cite>/),b=y?y[1]:null;return i.jsxs("div",{className:"rounded-md border border-border/40 hover:border-border/60 transition-colors bg-card/30 px-4 py-3.5",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[i.jsx("span",{className:`shrink-0 rounded border px-2 py-1 font-mono text-[10px] font-bold ${o}`,children:u.tag.toUpperCase()}),u.severity&&i.jsx("span",{className:`shrink-0 rounded border px-2 py-1 font-mono text-[10px] font-bold ${f}`,children:u.severity.toUpperCase()}),x&&i.jsx("span",{className:`shrink-0 rounded border px-2 py-1 font-mono text-[10px] font-bold ${_}`,children:x}),b&&i.jsx("span",{className:"bg-blue-500/10 px-2 py-1 font-mono text-[10px] text-blue-400 border border-blue-500/15 rounded",children:b}),i.jsx("span",{className:"ml-auto font-mono text-[10px] text-muted-foreground/40",children:u.originalAgentId}),u.confirmedBy&&u.confirmedBy.length>0&&(()=>{const h=[...new Set(u.confirmedBy)];return i.jsxs("span",{className:"cursor-help rounded px-1 py-0.5 font-mono text-[10px] text-confirmed/50 transition hover:bg-confirmed/10","data-tooltip":`Verified by:
|
|
53
|
-
${h.join(", ")}`,"data-tooltip-pos":"left",children:["+",h.length," ✓"]})})(),u.disputedBy&&u.disputedBy.length>0&&i.jsxs("span",{className:"cursor-help rounded px-1 py-0.5 font-mono text-[10px] text-disputed/50 transition hover:bg-disputed/10","data-tooltip":`Disputed by:
|
|
54
|
-
${u.disputedBy.map(h=>h.agentId).join(", ")}`,"data-tooltip-pos":"left",children:[u.disputedBy.length," ⚡"]}),u.unverifiedBy&&u.unverifiedBy.length>0&&i.jsxs("span",{className:"cursor-help rounded px-1 py-0.5 font-mono text-[10px] text-unverified/50 transition hover:bg-unverified/10","data-tooltip":`Unverified by:
|
|
55
|
-
${u.unverifiedBy.map(h=>h.agentId).join(", ")}`,"data-tooltip-pos":"left",children:[u.unverifiedBy.length," ◇"]})]}),m&&m.length>0&&i.jsx("div",{className:"mt-1.5 mb-1 space-y-1",children:m.map((h,M)=>i.jsxs("div",{className:"rounded border border-unverified/20 bg-unverified/5 px-2.5 py-1.5","data-diagnostic-code":h.code,children:[i.jsxs("div",{className:"font-mono text-[10px] font-bold uppercase tracking-wider text-unverified/80",children:["⚠ ",h.code]}),i.jsx("div",{className:"mt-0.5 text-[11px] text-muted-foreground/80",dangerouslySetInnerHTML:{__html:Qc(b0[h.code])+" — "+Qc(h.message)}})]},M))}),u.disputedBy&&u.disputedBy.length>0&&i.jsx("div",{className:"mt-1.5 mb-1 rounded border border-disputed/10 bg-disputed/5 px-2.5 py-1.5",children:u.disputedBy.map((h,M)=>i.jsxs("div",{className:"text-[11px]",children:[i.jsx("span",{className:"font-mono font-bold text-disputed/70",children:h.agentId}),i.jsxs("span",{className:"text-muted-foreground/60",children:[" — ",h.reason||h.evidence||"No reason given"]})]},M))}),i.jsx("div",{className:`font-inter text-xs leading-relaxed text-muted-foreground ${p0}`,dangerouslySetInnerHTML:{__html:ms(u.finding)}}),c&&i.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5",children:[c.reviewers.map(h=>i.jsx("span",{title:h,className:"inline-flex h-4 w-4 items-center justify-center rounded-full font-mono text-[7px] font-bold text-background opacity-70",style:{backgroundColor:Va(h)},children:Xc(h)},h)),i.jsxs("span",{className:`rounded px-1.5 py-0.5 font-mono text-[9px] font-bold ${c.assigned>=c.targetK?"text-confirmed/70 bg-confirmed/5":"text-unverified/70 bg-unverified/5"}`,children:[c.assigned>=c.targetK?"✓":"⚠"," ",c.assigned,"/",c.targetK]})]})]})}function bm({consensus:u,reports:c,showAll:m=!1,hideHeader:o=!1,filteredRuns:f}){const x=f??u.runs,_=m?x:x.slice(0,wc);!m&&x.length>wc;const[y,b]=R.useState(null),[h,M]=R.useState("all"),[w,Y]=R.useState("all"),[Q,ae]=R.useState(1),[J,V]=R.useState([]),[me,$]=R.useState(0),[K,X]=R.useState(!1),[z,ue]=R.useState({});R.useEffect(()=>{if(!m&&(c!=null&&c.reports)&&(V(c.reports),$(c.totalReports??c.reports.length),ae(1)),c!=null&&c.roundRetractions){const L={};for(const S of c.roundRetractions)L[S.consensus_id]={reason:S.reason,retracted_at:S.retracted_at};ue(L)}},[c,m]),R.useEffect(()=>{if(!m)return;let L=!1;return(async()=>{var S;try{const B=await Je("consensus-reports?page=1&pageSize=200");if(L)return;if(V(B.reports||[]),$(B.totalReports??(((S=B.reports)==null?void 0:S.length)||0)),ae(1),B.roundRetractions){const F={};for(const D of B.roundRetractions)F[D.consensus_id]={reason:D.reason,retracted_at:D.retracted_at};ue(F)}}catch{}})(),()=>{L=!0}},[m]);const Z=J.slice().sort((L,S)=>S.timestamp.localeCompare(L.timestamp)),W=10,[ie,de]=R.useState(0),Ee=Math.max(1,Math.ceil(Z.length/W)),H=Math.min(ie,Ee-1),I=m?Z.slice(H*W,(H+1)*W):Z.slice(0,wc),oe=L=>{const S=new Date,B=new Date(L),F=P=>new Date(P.getFullYear(),P.getMonth(),P.getDate()).getTime(),D=Math.round((F(S)-F(B))/864e5);return D<=0?"Today":D===1?"Yesterday":D<7?`${D} days ago`:D<30?`${Math.floor(D/7)} weeks ago`:B.toISOString().slice(0,10)};return i.jsxs("section",{children:[!o&&i.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[i.jsxs("h2",{className:"font-mono text-xs font-bold uppercase tracking-widest text-foreground",children:["Consensus Rounds ",i.jsx("span",{className:"text-primary",children:u.totalRuns??u.runs.length})]}),!m&&i.jsx("a",{href:"/dashboard/debates",className:"font-mono text-xs text-muted-foreground transition hover:text-primary",children:"view all"})]}),I.length>0?i.jsxs("div",{className:"space-y-2",children:[I.map((L,S)=>{const B=S>0?I[S-1]:null,F=m?oe(L.timestamp):null,D=m&&B?oe(B.timestamp):null,P=m&&F!==D,g={};if(L.crossReviewAssignments||L.crossReviewCoverage){const te={};if(L.crossReviewAssignments)for(const[Ue,Fe]of Object.entries(L.crossReviewAssignments))for(const et of Fe)(te[et]??(te[et]=[])).push(Ue);if(L.crossReviewCoverage)for(const Ue of L.crossReviewCoverage)g[Ue.findingId]={reviewers:te[Ue.findingId]||[],assigned:Ue.assigned,targetK:Ue.targetK};else for(const[Ue,Fe]of Object.entries(te))g[Ue]={reviewers:Fe,assigned:Fe.length,targetK:Fe.length}}const C=[...L.confirmed,...L.disputed,...L.unverified,...L.unique,...L.insights||[]],G=h==="all"?C:h==="insight"?C.filter(te=>te.findingType==="insight"||te.findingType==="suggestion"):C.filter(te=>te.tag===h),k=w==="all"?G:G.filter(te=>te.severity===w),ne=y===L.id,ce=(()=>{const te=new Set;return Ue=>{var qt;const Fe=(qt=L.authorDiagnostics)==null?void 0:qt[Ue.originalAgentId];if(!Fe||Fe.length===0)return;const et=Fe.filter(qe=>{const Xn=`${Ue.originalAgentId}:${qe.code}`;return te.has(Xn)?!1:(te.add(Xn),!0)});return et.length>0?et:void 0}})(),pe=C.length||1,ke=L.confirmed.length,fe=L.disputed.length,Yt=L.unverified.length,Vt=L.unique.length,Bn=(L.insights||[]).length,Yn=(()=>{if(pe<=1)return"border-l-border/40";const te=ke/pe,Ue=fe/pe;return te>=.5?"border-l-confirmed/60":Ue>=.4?"border-l-disputed/60":"border-l-unverified/50"})(),Kt=[{count:ke,textCls:"text-confirmed",label:"confirmed"},{count:fe,textCls:"text-disputed",label:"disputed"},{count:Yt,textCls:"text-unverified",label:"unverified"},{count:Vt,textCls:"text-unique",label:"unique"},{count:Bn,textCls:"text-zinc-400",label:"insights"}].filter(te=>te.count>0),Ln=[...new Set(C.map(te=>te.originalAgentId).filter(Boolean))],ol=Ln.slice(0,5),Gn=z[L.id],dl=!!Gn;return i.jsxs("div",{children:[P&&i.jsxs("div",{className:`mb-2 flex items-center gap-3 ${S>0?"mt-4":""}`,children:[i.jsx("span",{className:"font-mono text-[10px] font-bold uppercase tracking-widest text-muted-foreground",children:F}),i.jsx("div",{className:"h-px flex-1 bg-border/30"})]}),i.jsxs("div",{className:`group rounded-md border-l-2 border border-border/40 transition-all duration-150
|
|
56
|
-
${Yn}
|
|
57
|
-
${dl?"opacity-60 line-through decoration-disputed/40":""}
|
|
58
|
-
${ne?"bg-card border-r-border/60 border-t-border/60 border-b-border/60":"bg-card/50 hover:bg-card/70 hover:border-r-border/60 hover:border-t-border/60 hover:border-b-border/60 hover:shadow-sm hover:shadow-black/20 hover:-translate-y-px"}`,"data-retracted":dl?"true":void 0,children:[dl&&i.jsxs("div",{className:"no-underline rounded-t-md border-b border-disputed/30 bg-disputed/10 px-3 py-2 font-mono text-[11px] text-disputed",style:{textDecoration:"none"},children:[i.jsx("span",{className:"font-bold",children:"⚠ RETRACTED"}),Gn.retracted_at&&i.jsxs("span",{className:"ml-2 text-disputed/70",children:["on ",Gn.retracted_at.slice(0,10)]}),Gn.reason&&i.jsxs("span",{className:"ml-2 text-muted-foreground/80",children:["— ",Gn.reason]})]}),i.jsxs("button",{className:"flex w-full items-start gap-3 px-3 py-2.5 text-left","aria-expanded":ne,onClick:()=>{const te=!ne;b(te?L.id:null),te&&(M("all"),Y("all"))},children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-mono text-sm font-bold text-foreground",children:C.length}),i.jsx("span",{className:"text-[11px] text-muted-foreground/70",children:"findings"}),i.jsx("span",{className:"text-muted-foreground/30 text-[10px]",children:"·"}),i.jsxs("span",{className:"text-[11px] text-muted-foreground/60",children:[L.rounds,"r"]}),ol.length>0&&i.jsxs("div",{className:"flex items-center gap-1 ml-1",children:[ol.map(te=>i.jsx("span",{title:te,className:"inline-flex h-4 w-4 items-center justify-center rounded-full font-mono text-[8px] font-bold text-background",style:{backgroundColor:Va(te)},children:Xc(te)},te)),Ln.length>5&&i.jsxs("span",{className:"font-mono text-[9px] text-muted-foreground/40",children:["+",Ln.length-5]})]}),i.jsx("span",{className:"shrink-0 rounded border border-border/30 bg-muted/40 px-1.5 py-0.5 font-mono text-[10px] font-semibold text-muted-foreground",title:L.id,children:L.id.slice(0,8)}),L.droppedFindingsByType&&Object.keys(L.droppedFindingsByType).length>0&&(()=>{const te=Object.entries(L.droppedFindingsByType),Ue=te.reduce((et,[,qt])=>et+qt,0),Fe=te.map(([et,qt])=>`${et}:${qt}`).join(", ");return i.jsxs("span",{className:"shrink-0 rounded border border-unverified/20 bg-unverified/5 px-1.5 py-0.5 font-mono text-[10px] font-semibold text-unverified",title:`Silently dropped <agent_finding> tags with invalid type=: ${Fe}. These never reach the dashboard, scores, or signals.`,children:[Ue," dropped"]})})(),i.jsx("span",{className:"ml-auto font-mono text-[10px] text-muted-foreground/50 shrink-0",children:Xe(L.timestamp)})]}),i.jsx("div",{className:"mt-1.5 flex items-center gap-3",children:Kt.map(te=>i.jsxs("span",{className:`font-mono text-[10px] font-semibold ${te.textCls}`,children:[te.count," ",te.label]},te.label))}),L.topic&&i.jsxs("div",{className:"mt-1.5 flex items-start gap-2",children:[i.jsx("span",{className:"shrink-0 rounded border border-border/30 bg-muted/30 px-1.5 py-0.5 font-mono text-[9px] font-bold uppercase tracking-wider text-muted-foreground/50",children:"Topic"}),i.jsx("span",{className:"font-inter text-[11px] leading-relaxed text-muted-foreground/70",children:L.topic})]})]}),i.jsx("span",{className:`mt-1 shrink-0 font-mono text-[10px] text-muted-foreground/40 transition-transform duration-150 ${ne?"rotate-90 text-primary/60":"group-hover:text-muted-foreground/60"}`,children:"▸"})]}),ne&&i.jsxs("div",{className:"border-t border-border/20 px-4 pb-4 pt-3",children:[i.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[i.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/50",children:"Type:"}),um.map(te=>i.jsx("button",{onClick:()=>M(te.key),className:`rounded-md border px-3 py-1.5 font-mono text-[10px] font-medium transition ${h===te.key?te.activeCls:te.cls}`,children:te.label},te.key))]}),i.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[i.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/50",children:"Severity:"}),h0.map(te=>i.jsx("button",{onClick:()=>Y(te.key),className:`rounded-md border px-3 py-1.5 font-mono text-[10px] font-medium transition ${w===te.key?te.activeCls:te.cls}`,children:te.label},te.key))]}),(L.crossReviewAssignments||L.crossReviewCoverage)&&(()=>{const te=L.crossReviewAssignments||{},Ue=Object.entries(te),Fe=L.crossReviewCoverage||[],et=Fe.length,qt=Fe.filter(qe=>qe.assigned<qe.targetK);return i.jsxs("details",{className:"mb-3 rounded-md border border-border/30 bg-card/30",children:[i.jsxs("summary",{className:"flex cursor-pointer items-center gap-2 px-3 py-2 font-mono text-[10px] font-bold uppercase tracking-widest text-muted-foreground select-none",children:["Cross-Review Assignments",L.partialReview&&i.jsx("span",{className:"rounded border border-unverified/15 bg-unverified/5 px-1.5 py-0.5 font-mono text-[9px] font-bold normal-case tracking-normal text-unverified",children:"partial"}),i.jsxs("span",{className:"ml-auto font-mono text-[9px] font-normal normal-case tracking-normal text-muted-foreground/50",children:[Ue.length," reviewers · ",et," findings"]})]}),i.jsxs("div",{className:"border-t border-border/20 px-3 pb-3 pt-2 space-y-2",children:[Ue.map(([qe,Xn])=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{title:qe,className:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full font-mono text-[8px] font-bold text-background",style:{backgroundColor:Va(qe)},children:Xc(qe)}),i.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:qe}),i.jsxs("span",{className:"font-mono text-[10px] text-muted-foreground/40",children:["(",Xn.length,")"]}),i.jsx("div",{className:"flex flex-wrap gap-1 ml-1",children:Xn.map(Qn=>i.jsx("span",{className:"rounded bg-muted/50 px-1.5 py-0.5 font-mono text-[9px] text-muted-foreground",children:Qn.length>12?Qn.slice(0,12)+"…":Qn},Qn))})]},qe)),et>0&&i.jsx("div",{className:"mt-1 pt-1.5 border-t border-border/15",children:qt.length>0?i.jsxs("span",{className:"rounded border border-unverified/15 bg-unverified/5 px-2 py-1 font-mono text-[10px] font-semibold text-unverified",children:["⚠ ",qt.length," of ",et," findings under-reviewed"]}):i.jsxs("span",{className:"font-mono text-[10px] font-semibold text-confirmed/60",children:["✓ All ",et," findings fully covered"]})})]})]})})(),i.jsx("div",{className:"space-y-3",children:k.length===0?i.jsx("div",{className:"py-4 text-center text-xs text-muted-foreground",children:"No findings match this filter."}):k.map((te,Ue)=>i.jsx(v0,{f:te,reviewInfo:te.id?g[te.id]:void 0,diagnostics:ce(te)},Ue))})]})]})]},L.id)}),m&&Ee>1&&i.jsxs("div",{className:"flex items-center justify-center gap-3 pt-4 font-mono text-[11px] text-muted-foreground",children:[i.jsx("button",{onClick:()=>de(L=>Math.max(0,L-1)),disabled:H===0,className:"rounded-sm border border-border/40 bg-card px-3 py-1 transition hover:bg-accent/50 disabled:opacity-30",children:"◂ Prev"}),i.jsxs("span",{children:["Page ",H+1," of ",Ee]}),i.jsx("button",{onClick:()=>de(L=>Math.min(Ee-1,L+1)),disabled:H>=Ee-1,className:"rounded-sm border border-border/40 bg-card px-3 py-1 transition hover:bg-accent/50 disabled:opacity-30",children:"Next ▸"})]})]}):_.length===0?i.jsx(Fl,{title:"No consensus runs yet",hint:"Dispatch a consensus round with gossip_dispatch to populate this view."}):i.jsx("div",{className:"space-y-2",children:_.map((L,S)=>{const B=L.counts,F=(B.agreement||0)+(B.disagreement||0)+(B.hallucination||0)+(B.unverified||0)+(B.unique||0)+(B.new||0),D=F||1,P=y===L.taskId,g=[{key:"confirmed",count:B.agreement||0,color:"bg-confirmed",text:"text-confirmed",label:"confirmed"},{key:"disputed",count:(B.disagreement||0)+(B.hallucination||0),color:"bg-disputed",text:"text-disputed",label:"disputed"},{key:"unverified",count:B.unverified||0,color:"bg-unverified",text:"text-unverified",label:"unverified"},{key:"unique",count:(B.unique||0)+(B.new||0),color:"bg-unique",text:"text-unique",label:"unique"}],C=L.signals.filter(k=>{if(k.signal==="signal_retracted")return!1;if(h==="all")return!!Uc[k.signal];const ne=Uc[k.signal];return ne&&ne.filter===h}),G=!!L.retracted;return i.jsxs("div",{className:`rounded-md border bg-card transition ${P?"border-primary/25":"border-border"} ${G?"opacity-60":""}`,"data-retracted":G?"true":void 0,title:G&&L.retractionReason?`Retracted: ${L.retractionReason}`:void 0,children:[G&&i.jsxs("div",{className:"rounded-t-md border-b border-disputed/30 bg-disputed/50 px-3 py-1.5 font-mono text-[10px] text-disputed-foreground",style:{textDecoration:"none"},children:[i.jsx("span",{className:"font-bold uppercase tracking-wider",children:"⚠ Retracted"}),L.retractedAt&&i.jsxs("span",{className:"ml-2 text-disputed-foreground/80",children:["on ",L.retractedAt.slice(0,10)]}),L.retractionReason&&i.jsxs("span",{className:"ml-2 text-muted-foreground/90",children:["— ",L.retractionReason]})]}),i.jsxs("button",{"aria-expanded":P,onClick:()=>{const k=!P;b(k?L.taskId:null),k&&(M("all"),Y("all"))},className:"flex w-full items-center p-3 text-left transition hover:bg-accent/50",children:[i.jsx("span",{className:`mr-3 font-mono text-xs text-muted-foreground transition ${P?"text-primary":""}`,children:P?"▾":"▸"}),i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("span",{className:"font-mono text-[10px] text-primary/50",children:L.taskId}),i.jsxs("span",{className:`font-mono text-sm font-semibold text-foreground ${G?"line-through decoration-disputed/40":""}`,children:[F," findings"]}),i.jsxs("div",{className:"flex gap-1.5",children:[L.agents.slice(0,4).map(k=>i.jsx("span",{className:"rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:k.split("-").map(ne=>ne[0]).join("").toUpperCase().slice(0,2)},k)),L.agents.length>4&&i.jsxs("span",{className:"font-mono text-[10px] text-muted-foreground",children:["+",L.agents.length-4]})]})]}),i.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:Xe(L.timestamp)})]}),i.jsx("div",{className:"mt-2 flex gap-2",children:g.map(k=>k.count>0&&i.jsxs("span",{className:`font-mono text-[10px] font-semibold ${k.text} ${G?"line-through decoration-disputed/40":""}`,children:[k.count," ",k.label]},k.key))}),i.jsx("div",{className:"mt-2 flex h-1.5 overflow-hidden rounded-sm",children:g.map(k=>k.count>0&&i.jsx("div",{className:`${k.color} transition-all`,style:{width:`${k.count/D*100}%`}},k.key))})]})]}),P&&i.jsxs("div",{className:"border-t border-border px-4 pb-3 pt-3",children:[i.jsx("div",{className:"mb-3 flex gap-1.5",children:um.map(k=>i.jsx("button",{onClick:()=>M(k.key),className:`rounded-sm px-2 py-0.5 font-mono text-[10px] font-semibold transition ${h===k.key?k.activeCls:k.cls} hover:opacity-80`,children:k.label},k.key))}),C.length===0?i.jsx("div",{className:"py-4 text-center text-xs text-muted-foreground",children:"No findings match this filter."}):i.jsx("div",{className:"space-y-2",children:C.map((k,ne)=>{const ce=Uc[k.signal];return ce?i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("span",{className:`shrink-0 rounded-sm px-1.5 py-0.5 font-mono text-[9px] font-bold ${ce.cls}`,children:ce.label}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("span",{className:"text-xs text-muted-foreground [&_.cite-file]:rounded [&_.cite-file]:bg-blue-500/10 [&_.cite-file]:px-1 [&_.cite-file]:font-mono [&_.cite-file]:text-blue-400 [&_.cite-fn]:rounded [&_.cite-fn]:bg-purple-500/10 [&_.cite-fn]:px-1 [&_.cite-fn]:font-mono [&_.cite-fn]:text-purple-400",children:i.jsx("span",{dangerouslySetInnerHTML:{__html:ms(k.evidence||"")}})}),i.jsxs("span",{className:"ml-2 font-mono text-[10px] text-muted-foreground/50",children:[k.agentId,k.counterpartId?` + ${k.counterpartId}`:""]})]})]},ne):null})})]})]},L.taskId+S)})})]})}function y0(u){let c=0;for(let m=0;m<u.length;m++)c=(c<<5)-c+u.charCodeAt(m)|0;return Math.abs(c)}class j0{constructor(c){Pe(this,"s");this.s=c}next(){return this.s=this.s*1103515245+12345&2147483647,this.s%1e4/1e4}range(c,m){return c+this.next()*(m-c)}}function ct(u,c){const m=parseInt(u.slice(1,3),16),o=parseInt(u.slice(3,5),16),f=parseInt(u.slice(5,7),16);return`rgba(${m},${o},${f},${Math.max(0,Math.min(1,c))})`}function N0(u){const c=Math.max(0,u);return Math.min(1.4,Math.pow(c/2e3,.55))}class S0{constructor(c,m,o,f,x,_,y=.5){Pe(this,"ctx");Pe(this,"size");Pe(this,"accuracy");Pe(this,"uniqueness");Pe(this,"impact");Pe(this,"colorHex");Pe(this,"time",0);Pe(this,"variant");Pe(this,"scale");Pe(this,"exp");Pe(this,"particles",[]);Pe(this,"baseRotation");Pe(this,"armSeeds");Pe(this,"binaryCenters");Pe(this,"jetAxis");Pe(this,"tailAngle");const b=c.getContext("2d");if(!b)throw new Error("Canvas 2D context unavailable");this.ctx=b,this.size=c.width/2,this.accuracy=Math.max(0,Math.min(1,f)),this.uniqueness=Math.max(0,Math.min(1,x)),this.impact=Math.max(0,Math.min(1,y)),this.colorHex=_;const h=y0(m);this.variant=h%12;const M=new j0(h),w=N0(o);this.exp=w,this.scale=.2+w*.95;const Y=Math.max(3,Math.round(4+w*180));this._buildVariant(M,Y),this.baseRotation=M.next()*Math.PI*2}_buildVariant(c,m){const o=this.variant;if(o===0){this.armSeeds=[];for(let x=0;x<2;x++)this.armSeeds.push(c.next()*Math.PI*2);for(let x=0;x<m;x++){const _=x%2,y=c.next(),b=this.armSeeds[_]+y*Math.PI*2.4,h=c.range(-.04,.04)*Math.PI*2,M=b+h,w=(.08+y*.38)*this.size*this.scale;this.particles.push(this._mkParticle(c,w,M,1,1))}}else if(o===1)for(let f=0;f<m;f++){const x=c.range(.34,.42)*this.size*this.scale,_=c.next()*Math.PI*2;this.particles.push(this._mkParticle(c,x,_,1,1))}else if(o===2){const f=[.16,.28,.42];for(let x=0;x<m;x++){const _=x%3,y=(f[_]+c.range(-.015,.015))*this.size*this.scale,b=c.next()*Math.PI*2;this.particles.push(this._mkParticle(c,y,b,1,1))}}else if(o===3){const f=.18*this.size*this.scale;this.binaryCenters=[{x:-f,y:0},{x:f,y:0}];for(let x=0;x<m;x++){const _=x%2,y=c.range(.04,.22)*this.size*this.scale,b=c.next()*Math.PI*2,h=this._mkParticle(c,y,b,1,1);h.binaryCore=_,h.angularVelocity*=_===0?1:-1,this.particles.push(h)}}else if(o===4)for(let f=0;f<m;f++){const x=c.range(.05,.32)*this.size*this.scale,_=c.next()*Math.PI*2,y=c.range(.7,1.3),b=c.range(.7,1.3),h=this._mkParticle(c,x,_,y,b);h.orbitTilt=c.range(0,Math.PI),this.particles.push(h)}else if(o===5){this.jetAxis=c.next()*Math.PI*2;const f=Math.floor(m*.7),x=m-f;for(let _=0;_<f;_++){const y=_%2===0?1:-1,b=c.next(),h=c.range(-.18,.18),M=this._mkParticle(c,b*.44*this.size*this.scale,0,1,1);M.jetSide=y,M.jetProgress=b,M.jetSpread=h,M.jetSpeed=c.range(.15,.35)*.001,M.size=c.range(.6,1.4),this.particles.push(M)}for(let _=0;_<x;_++){const y=c.range(.35,.42)*this.size*this.scale,b=c.next()*Math.PI*2,h=this._mkParticle(c,y,b,1,1);h.isDisk=!0,h.brightness*=.35,this.particles.push(h)}}else if(o===6)for(let f=0;f<m;f++){const x=c.next()*Math.PI*2,_=c.range(.05,.45)*this.size*this.scale,y=this._mkParticle(c,_,x,1,1);y.isNebula=!0,y.driftAngle=c.next()*Math.PI*2,y.driftSpeed=c.range(6e-4,.0014),y.driftPhase=c.next()*Math.PI*2,y.size=c.range(.8,2.2),y.brightness*=.6,this.particles.push(y)}else if(o===7){this.tailAngle=c.next()*Math.PI*2;const f=.1*this.size*this.scale,x=Math.floor(m*.3);for(let y=0;y<x;y++){const b=c.range(0,f),h=c.next()*Math.PI*2,M=this._mkParticle(c,b,h,1,1);M.size=c.range(.8,1.8),this.particles.push(M)}const _=m-x;for(let y=0;y<_;y++){const b=c.next(),h=f+b*.26*this.size*this.scale,M=(1-b*.5)*c.range(-.05,.05)*this.size*this.scale,w=this._mkParticle(c,0,0,1,1);w.isComet=!0,w.cometTailDist=h,w.cometPerp=M,w.cometT=b,w.brightness*=1-b*.6,w.size=(1-b*.5)*c.range(.6,1.2),this.particles.push(w)}}else if(o===8)for(let f=0;f<m;f++){const x=f%3,_=c.range(.3,.42)*this.size*this.scale,y=c.next()*Math.PI*2,b=this._mkParticle(c,_,y,1,1);b.gyroPlane=x,b.gyroAxis=x===0?"z":x===1?"x":"y",this.particles.push(b)}else if(o===9)for(let f=0;f<m;f++){const x=c.range(.06,.42)*this.size*this.scale,y=x/(.42*this.size*this.scale)*4*Math.PI+c.range(-.2,.2),b=this._mkParticle(c,x,y,1,1);b.isMaelstrom=!0,this.particles.push(b)}else if(o===10)for(let f=0;f<m;f++){const x=f/m,_=c.range(.35,.4)*this.size*this.scale,y=x*Math.PI*2+c.range(-.03,.03),b=this._mkParticle(c,_,y,1,1);b.ouroT=x,this.particles.push(b)}else for(let f=0;f<m;f++){const x=f%2,_=c.next(),y=this._mkParticle(c,0,0,1,1);y.isHelix=!0,y.helixStrand=x,y.helixT=_,y.helixSpeed=c.range(.3,.6)*.001,this.particles.push(y)}}_mkParticle(c,m,o,f,x){const _=8e-4+(.42*this.size-m)*4e-5,y=c.next()*Math.PI*2,b=c.range(.05,.3)*this.size;return{baseRadius:m,angle:o,angularVelocity:_*(c.next()>.5?1:.85),size:c.range(.5,1.8),brightness:c.range(.4,1),wobblePhase:c.next()*Math.PI*2,wobbleSpeed:c.range(.5,1.2),ellipX:f,ellipY:x,orbitTilt:0,binaryCore:0,chaosX:Math.cos(y)*b,chaosY:Math.sin(y)*b,chaosDriftPhase:c.next()*Math.PI*2,chaosDriftSpeed:c.range(3e-4,8e-4)}}update(c){this.time+=c}draw(){const{ctx:c,size:m,time:o,accuracy:f,uniqueness:x,impact:_,colorHex:y,variant:b}=this,h=m/2,M=m/2;c.clearRect(0,0,m,m);const w=.4+this.exp*.6,Y=f*w,Q=x*w,ae=_*w,J=.2+Y*.8,V=.3+ae*1.9,me=Q,$=Math.min(1,Math.max(0,(this.exp-.15)*1.8)),K=1-$,X=c.createRadialGradient(h,M,0,h,M,m*.45);if(X.addColorStop(0,ct(y,.05*J)),X.addColorStop(.4,ct(y,.015)),X.addColorStop(1,"transparent"),c.fillStyle=X,c.fillRect(0,0,m,m),b===0&&this.armSeeds){const z=o*5e-4*V;for(const ue of this.armSeeds){const Z=ue+z;c.beginPath();for(let W=0;W<1;W+=.02){const ie=Z+W*Math.PI*2.4,de=(.08+W*.38)*m*this.scale,Ee=h+Math.cos(ie)*de,H=M+Math.sin(ie)*de;W===0?c.moveTo(Ee,H):c.lineTo(Ee,H)}c.strokeStyle=ct(y,.12*J),c.lineWidth=1,c.stroke()}}for(const z of this.particles){const ue=Math.sin(o*z.wobbleSpeed*.001+z.wobblePhase)*1.2,Z=z.baseRadius+ue,W=z.angle+o*z.angularVelocity*V;let ie,de;if(b===3&&this.binaryCenters){const H=this.binaryCenters[z.binaryCore];ie=h+H.x+Math.cos(W)*Z,de=M+H.y+Math.sin(W)*Z}else if(b===4){const H=Math.cos(z.orbitTilt),I=Math.sin(z.orbitTilt),oe=Math.cos(W)*Z*z.ellipX,L=Math.sin(W)*Z*z.ellipY;ie=h+oe*H-L*I,de=M+oe*I+L*H}else if(b===5&&z.jetSide!==void 0&&!z.isDisk&&this.jetAxis!==void 0){const H=(z.jetProgress+o*z.jetSpeed*V)%1,I=H*.44*m*this.scale,oe=this.jetAxis+Math.PI/2;ie=h+Math.cos(this.jetAxis)*I*z.jetSide+Math.cos(oe)*z.jetSpread*I,de=M+Math.sin(this.jetAxis)*I*z.jetSide+Math.sin(oe)*z.jetSpread*I,z._fadeMul=Math.sin(H*Math.PI)*.9+.1}else if(b===6&&z.isNebula){const H=o*z.driftSpeed*V,I=Math.sin(H+z.driftPhase)*2;ie=h+Math.cos(z.angle+H*.3)*Z+Math.cos(z.driftAngle)*I,de=M+Math.sin(z.angle+H*.3)*Z+Math.sin(z.driftAngle)*I}else if(b===7&&z.isComet&&this.tailAngle!==void 0){const H=(z.cometT+o*3e-4*V)%1,I=z.cometTailDist+H*.06*m*this.scale,oe=this.tailAngle+Math.PI/2;ie=h+Math.cos(this.tailAngle)*I+Math.cos(oe)*z.cometPerp,de=M+Math.sin(this.tailAngle)*I+Math.sin(oe)*z.cometPerp}else if(b===8&&z.gyroAxis){const H=o*1e-4*V;z.gyroAxis==="z"?(ie=h+Math.cos(W)*Z,de=M+Math.sin(W)*Z*.3):z.gyroAxis==="x"?(ie=h+Math.cos(W)*Z*.3+Math.sin(H)*Z*.1,de=M+Math.sin(W)*Z):(ie=h+Math.sin(W+H)*Z*.6,de=M+Math.cos(W+H)*Z*.8)}else if(b===9){const H=(o*5e-4*V+z.wobblePhase)%1,I=Z*(1-H*.85);ie=h+Math.cos(W)*I,de=M+Math.sin(W)*I,z._fadeMul=1-H}else if(b===10&&z.ouroT!==void 0){const H=(z.ouroT+o*3e-4*V)%1,I=H*Math.PI*2;ie=h+Math.cos(I)*Z,de=M+Math.sin(I)*Z;const oe=Math.cos(H*Math.PI*2)*.5+.5;z._fadeMul=.3+oe*.9}else if(b===11&&z.helixT!==void 0){const H=(z.helixT+o*z.helixSpeed*V)%1,I=(H-.5)*.65*m*this.scale,oe=z.helixStrand===0?0:Math.PI,L=.15*m*this.scale,S=Math.sin(H*Math.PI*3+oe)*L;ie=h+S,de=M+I,z._fadeMul=.4+(Math.cos(H*Math.PI*3+oe)+1)/2*.6}else ie=h+Math.cos(W)*Z*z.ellipX,de=M+Math.sin(W)*Z*z.ellipY;if(K>.01){const H=o*z.chaosDriftSpeed,I=Math.cos(H+z.chaosDriftPhase)*2,oe=Math.sin(H*1.13+z.chaosDriftPhase)*2,L=h+z.chaosX+I,S=M+z.chaosY+oe;ie=L*K+ie*$,de=S*K+de*$}const Ee=z._fadeMul!==void 0?z._fadeMul:1;if(b<=4&&$>.5){const H=2+Math.floor(_*3);for(let I=0;I<H;I++){const oe=z.angularVelocity*V*(I+1)*80,L=W-oe;let S,B;if(b===3&&this.binaryCenters){const D=this.binaryCenters[z.binaryCore];S=h+D.x+Math.cos(L)*Z,B=M+D.y+Math.sin(L)*Z}else if(b===4){const D=Math.cos(z.orbitTilt),P=Math.sin(z.orbitTilt),g=Math.cos(L)*Z*z.ellipX,C=Math.sin(L)*Z*z.ellipY;S=h+g*D-C*P,B=M+g*P+C*D}else S=h+Math.cos(L)*Z*z.ellipX,B=M+Math.sin(L)*Z*z.ellipY;const F=(1-I/H)*.3*z.brightness*J*$;c.beginPath(),c.arc(S,B,z.size*(1-I*.25),0,Math.PI*2),c.fillStyle=ct(y,F),c.fill()}}else if(b===6&&z.isNebula){const H=z.size*3,I=c.createRadialGradient(ie,de,0,ie,de,H);I.addColorStop(0,ct(y,z.brightness*J*.4)),I.addColorStop(1,"transparent"),c.fillStyle=I,c.beginPath(),c.arc(ie,de,H,0,Math.PI*2),c.fill()}c.beginPath(),c.arc(ie,de,z.size,0,Math.PI*2),c.fillStyle=ct(y,z.brightness*J*Ee),c.fill()}if(me>.05)for(let ue=0;ue<3;ue++){const Z=(o*7e-4*me+ue*.33)%1;if(Z>.5)continue;const W=(ue*1.618*Math.PI+o*1e-4)%(Math.PI*2),ie=m*.5*(1-Z*1.6);if(ie<3)continue;const de=h+Math.cos(W)*ie,Ee=M+Math.sin(W)*ie,H=Z<.2?Z/.2:1-(Z-.2)/.3,I=5+(1-Z)*4,oe=c.createRadialGradient(de,Ee,0,de,Ee,I);oe.addColorStop(0,ct("#ffffff",H*.95)),oe.addColorStop(.3,ct(y,H*.7)),oe.addColorStop(1,"transparent"),c.fillStyle=oe,c.beginPath(),c.arc(de,Ee,I,0,Math.PI*2),c.fill()}if(b!==3){const z=.9+.1*Math.sin(o*.003),ue=(1+this.exp*9+f*2)*this.scale,Z=Math.min(ue*(3+_*2),m*.4),W=c.createRadialGradient(h,M,0,h,M,Z);W.addColorStop(0,ct("#ffffff",.95*z*J)),W.addColorStop(.2,ct(y,.75*z*J)),W.addColorStop(.5,ct(y,.2*J)),W.addColorStop(1,"transparent"),c.fillStyle=W,c.beginPath(),c.arc(h,M,Z,0,Math.PI*2),c.fill(),c.beginPath(),c.arc(h,M,ue*z,0,Math.PI*2),c.fillStyle=ct("#ffffff",.95),c.fill()}else if(this.binaryCenters)for(const z of this.binaryCenters){const ue=h+z.x,Z=M+z.y,W=(.8+this.exp*5+f*1.5)*this.scale,ie=Math.min(W*3.5,m*.22),de=c.createRadialGradient(ue,Z,0,ue,Z,ie);de.addColorStop(0,ct("#ffffff",.9*J)),de.addColorStop(.3,ct(y,.6*J)),de.addColorStop(1,"transparent"),c.fillStyle=de,c.beginPath(),c.arc(ue,Z,ie,0,Math.PI*2),c.fill(),c.beginPath(),c.arc(ue,Z,W,0,Math.PI*2),c.fillStyle=ct("#ffffff",.9),c.fill()}}}function Kc({agentId:u,size:c=64,signals:m=0,accuracy:o=.5,uniqueness:f=.5,impact:x=.5}){const _=R.useRef(null),y=R.useRef(null),b=R.useRef(0),h=R.useRef(!0);return R.useEffect(()=>{const M=_.current;if(!M)return;M.width=c*2,M.height=c*2;const w=M.getContext("2d");if(!w)return;w.scale(2,2);const Y=Va(u),Q=new S0(M,u,m,o,f,Y,x);y.current=Q,Q.draw();const ae=()=>{h.current&&(Q.update(16),Q.draw()),b.current=requestAnimationFrame(ae)};return b.current=requestAnimationFrame(ae),()=>{cancelAnimationFrame(b.current),y.current=null}},[u,c,m,o,f,x]),R.useEffect(()=>{const M=_.current;if(!M)return;const w=new IntersectionObserver(([Y])=>{h.current=Y.isIntersecting},{threshold:.1});return w.observe(M),()=>w.disconnect()},[]),i.jsx("canvas",{ref:_,"aria-hidden":"true",className:"shrink-0",style:{width:c,height:c,borderRadius:"50%"}})}function qc(u){return`${Math.round(u*100)}%`}function T0(u){return u>=1.2?"good":u>=.8?"mid":"low"}function _0(u){return u>=.7?"good":u>=.4?"mid":"low"}function E0({agent:u}){var y;const c=u.scores,m=(y=u.lastTask)!=null&&y.timestamp?Xe(u.lastTask.timestamp):"",o=T0(c.dispatchWeight),f=o==="good"?"text-confirmed":o==="low"?"text-disputed":"text-foreground",x=_0(c.accuracy),_=x==="good"?"bg-confirmed":x==="mid"?"bg-unverified":"bg-disputed";return i.jsxs("a",{href:`/dashboard/agent/${encodeURIComponent(u.id)}`,className:"group relative block rounded-xl border border-border bg-card p-3 transition-all hover:-translate-y-0.5 hover:border-primary/30 hover:bg-card/90",children:[i.jsxs("div",{className:"mb-2.5 flex items-center gap-2.5",children:[i.jsx("div",{className:"relative shrink-0",children:i.jsx(Kc,{agentId:u.id,size:48,animate:u.online,signals:c.signals,accuracy:c.accuracy,uniqueness:c.uniqueness,impact:c.impactScore})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-foreground",children:u.id}),(()=>{const b=fs(c);return b==="benched"?i.jsx("span",{className:"shrink-0 rounded-sm bg-destructive/10 px-1 py-0.5 font-mono text-[8px] font-bold text-destructive","data-tooltip":`Benched (${c.bench.reason??"auto"}). Excluded from dispatch until recovery.`,children:"BENCHED"}):b==="struggling"?i.jsx("span",{className:"shrink-0 rounded-sm bg-unverified/10 px-1 py-0.5 font-mono text-[8px] font-bold text-unverified","data-tooltip":"Struggling: consecutive failures tripped the circuit breaker.",children:"STRUGGLING"}):b==="kept-for-coverage"?i.jsx("span",{className:"shrink-0 rounded-sm border border-unverified/40 px-1 py-0.5 font-mono text-[8px] font-bold text-unverified","data-tooltip":`Would bench (${c.bench.reason??"rule"}), but kept as sole provider of a category.`,children:"KEPT FOR COVERAGE"}):null})()]}),i.jsxs("div",{className:"mt-1 flex items-center gap-2 font-inter text-[10px] text-muted-foreground/60",children:[i.jsxs("span",{className:`rounded-sm border border-border/60 bg-background/60 px-1.5 py-0.5 font-bold tabular-nums ${f}`,"data-tooltip":`Dispatch weight ${c.dispatchWeight.toFixed(2)}
|
|
59
|
-
Scale 0.3 → 2.0`,"data-tooltip-pos":"bottom",children:[c.dispatchWeight.toFixed(2)," wt"]}),i.jsxs("span",{className:"truncate",children:[c.signals," signals",m?` · ${m}`:""]})]})]})]}),i.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/30 bg-background/40 px-2.5 py-2",children:[i.jsx(Hc,{label:"accuracy",value:c.accuracy,fillClass:_,tooltip:`Accuracy ${qc(c.accuracy)}
|
|
60
|
-
Ratio of confirmed findings.
|
|
61
|
-
Higher = more trustworthy.`}),i.jsx(Hc,{label:"unique",value:c.uniqueness,fillClass:"bg-unique",tooltip:`Uniqueness ${qc(c.uniqueness)}
|
|
62
|
-
Findings others missed.
|
|
63
|
-
Higher = this agent sees what peers don't.`}),i.jsx(Hc,{label:"impact",value:c.impactScore,fillClass:"bg-[var(--color-impact)]",tooltip:`Impact ${qc(c.impactScore)}
|
|
64
|
-
Severity-weighted findings.
|
|
65
|
-
Critical and high findings count more.`})]})]})}function Hc({label:u,value:c,fillClass:m,tooltip:o}){const f=Number.isFinite(c)?c:0;return i.jsxs("div",{className:"grid grid-cols-[60px_1fr_38px] items-center gap-2.5",children:[i.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wider text-muted-foreground","data-tooltip":o,children:u}),i.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-background/80",children:i.jsx("div",{className:`h-full rounded-full transition-all ${m}`,style:{width:`${Math.max(0,Math.min(100,f*100))}%`}})}),i.jsxs("span",{className:"text-right font-mono text-[11px] font-bold tabular-nums text-foreground",children:[Math.round(f*100),"%"]})]})}function M0({agents:u}){const c=[...u].sort((f,x)=>{var M,w,Y,Q;const _=((M=f.lastTask)==null?void 0:M.timestamp)??"",y=((w=x.lastTask)==null?void 0:w.timestamp)??"";if(_!==y)return y.localeCompare(_);const b=((Y=f.scores)==null?void 0:Y.signals)||0,h=((Q=x.scores)==null?void 0:Q.signals)||0;return b!==h?h-b:f.id.localeCompare(x.id)}),m=c.slice(0,4),o=c.length>4;return i.jsxs("section",{children:[i.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[i.jsxs("h2",{className:"font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:["Team ",i.jsx("span",{className:"text-primary",children:u.length})]}),o&&i.jsx("a",{href:"/dashboard/team",className:"font-mono text-xs text-muted-foreground transition hover:text-primary",children:"view all"})]}),i.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:m.map(f=>i.jsx(E0,{agent:f},f.id))})]})}const A0={completed:{label:"COMPLETED",cls:"text-confirmed bg-confirmed/10"},failed:{label:"FAILED",cls:"text-destructive bg-destructive/10"},cancelled:{label:"CANCELLED",cls:"text-muted-foreground bg-muted/30"},running:{label:"RUNNING",cls:"text-unverified bg-unverified/10 animate-pulse"}};function z0({task:u,onClose:c}){if(R.useEffect(()=>{if(!u)return;const f=x=>{x.key==="Escape"&&c()};return document.addEventListener("keydown",f),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",f),document.body.style.overflow=""}},[u,c]),!u)return null;const m=A0[u.status],o=(u.inputTokens||0)+(u.outputTokens||0);return i.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center overflow-y-auto bg-background/80 p-6 backdrop-blur-sm",onClick:c,children:i.jsxs("div",{className:"relative mt-12 w-full max-w-3xl rounded-lg border border-border bg-card shadow-2xl",onClick:f=>f.stopPropagation(),children:[i.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-border/60 px-5 py-4",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:`shrink-0 rounded-sm px-1.5 py-0.5 font-mono text-[9px] font-bold ${m.cls}`,children:m.label}),i.jsx("span",{className:"shrink-0 rounded border border-amber-500/30 bg-amber-500/10 px-1.5 py-0.5 font-mono text-[10px] font-semibold text-amber-400",children:u.taskId.slice(0,8)}),i.jsx("a",{href:`/dashboard/agent/${encodeURIComponent(u.agentId)}`,className:"truncate font-mono text-xs text-muted-foreground transition hover:text-primary",children:u.agentId})]}),i.jsxs("div",{className:"mt-2 flex flex-wrap gap-3 font-mono text-[10px] text-muted-foreground",children:[i.jsx("span",{children:Xe(u.timestamp)}),u.duration!=null&&i.jsxs("span",{children:["· ",a0(u.duration)]}),o>0&&i.jsxs("span",{children:["· ",o.toLocaleString()," tokens (",(u.inputTokens||0).toLocaleString()," in / ",(u.outputTokens||0).toLocaleString()," out)"]})]})]}),i.jsx("button",{onClick:c,className:"shrink-0 rounded-md border border-border/40 bg-card px-2 py-1 font-mono text-xs text-muted-foreground transition hover:bg-accent/50 hover:text-foreground","aria-label":"Close",children:"✕"})]}),i.jsxs("div",{className:"max-h-[calc(100vh-220px)] space-y-5 overflow-y-auto px-5 py-4",children:[i.jsxs("section",{children:[i.jsx("h3",{className:"mb-2 font-mono text-[10px] font-bold uppercase tracking-widest text-muted-foreground",children:"Task"}),i.jsx("div",{className:"task-md rounded-md border border-border/40 bg-background/40 p-3 text-xs leading-relaxed text-foreground/90 overflow-x-auto",dangerouslySetInnerHTML:{__html:gm(u.task)}})]}),u.result?i.jsxs("section",{children:[i.jsx("h3",{className:"mb-2 font-mono text-[10px] font-bold uppercase tracking-widest text-muted-foreground",children:"Result"}),i.jsx("div",{className:"rounded-md border border-border/40 bg-background/40 p-3 font-mono text-xs leading-relaxed text-foreground/90 whitespace-pre-wrap [&_.cite-file]:rounded [&_.cite-file]:bg-blue-500/10 [&_.cite-file]:px-1 [&_.cite-file]:text-blue-400 [&_.cite-fn]:rounded [&_.cite-fn]:bg-purple-500/10 [&_.cite-fn]:px-1 [&_.cite-fn]:text-purple-400 [&_.inline-code]:rounded [&_.inline-code]:bg-muted/40 [&_.inline-code]:px-1 [&_.inline-code-block]:my-2 [&_.inline-code-block]:block [&_.inline-code-block]:rounded [&_.inline-code-block]:bg-muted/30 [&_.inline-code-block]:p-2",dangerouslySetInnerHTML:{__html:ms(u.result)}})]}):i.jsxs("section",{children:[i.jsx("h3",{className:"mb-2 font-mono text-[10px] font-bold uppercase tracking-widest text-muted-foreground",children:"Result"}),i.jsx("div",{className:"rounded-md border border-border/40 bg-background/40 p-3 text-center font-mono text-xs text-muted-foreground",children:u.status==="running"?"Task is still running...":"No result recorded."})]})]})]})})}const C0=8;function D0(u){const c=u.toLowerCase();return c==="completed"||c==="done"||c==="success"||c==="succeeded"?"completed":c==="running"||c==="active"||c==="in_progress"||c==="pending"?"running":c==="failed"||c==="error"||c==="errored"||c==="timeout"||c==="timed_out"?"failed":c==="cancelled"||c==="canceled"||c==="queued"||c==="waiting"?"cancelled":"unknown"}const O0={completed:{label:"Done",iconBox:"bg-confirmed/10 border-confirmed/30",text:"text-confirmed",pulse:!1},running:{label:"Running",iconBox:"bg-unverified/10 border-unverified/30",text:"text-unverified",pulse:!0},failed:{label:"Failed",iconBox:"bg-destructive/10 border-destructive/30",text:"text-destructive",pulse:!1},cancelled:{label:"Cancelled",iconBox:"bg-muted-foreground/10 border-muted-foreground/25",text:"text-muted-foreground",pulse:!1},unknown:{label:"Unknown",iconBox:"bg-muted-foreground/10 border-muted-foreground/25",text:"text-muted-foreground",pulse:!1}},R0={completed:i.jsx("polyline",{points:"5 12 10 17 19 7"}),running:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"12",cy:"12",r:"3",fill:"currentColor",stroke:"none"}),i.jsx("circle",{cx:"12",cy:"12",r:"8",opacity:"0.45"})]}),failed:i.jsxs(i.Fragment,{children:[i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"}),i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"})]}),cancelled:i.jsx("line",{x1:"6",y1:"12",x2:"18",y2:"12"}),unknown:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M9.5 9a2.5 2.5 0 1 1 3.5 2.3c-.8.4-1 .9-1 1.7"}),i.jsx("line",{x1:"12",y1:"16.5",x2:"12",y2:"16.5"})]})};function w0(u){return u.length>8?u.slice(0,8):u}function U0({tasks:u,limit:c=C0}){const m=u.items.slice(0,c),o=u.items.length>c;return i.jsxs("section",{className:"flex h-full flex-col",children:[i.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[i.jsxs("h2",{className:"font-mono text-xs font-bold uppercase tracking-widest text-foreground",children:["Tasks ",i.jsx("span",{className:"text-primary",children:u.total})]}),o&&i.jsx("a",{href:"/dashboard/tasks",className:"font-mono text-xs text-muted-foreground transition hover:text-foreground",children:"view all"})]}),i.jsx("div",{className:"flex-1 rounded-md border border-border/40 bg-card/80",children:m.length===0?i.jsx(Fl,{title:"No tasks yet",hint:"Dispatch with gossip_run to populate this view."}):m.map((f,x)=>{const _=D0(f.status),y=O0[_];return i.jsxs("div",{className:`flex items-start gap-3 px-3.5 py-2.5 hover:bg-accent/20 transition-colors ${x>0?"border-t border-border/20":""}`,children:[i.jsx("span",{className:`mt-0.5 flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-full border ${y.iconBox} ${y.text} ${y.pulse?"animate-pulse":""}`,"aria-label":`Status: ${y.label}`,"data-tooltip":y.label,children:i.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:R0[_]})}),i.jsx("span",{className:"mt-0.5 shrink-0 rounded border border-border/40 bg-background/60 px-1.5 py-0.5 font-mono text-[10px] font-semibold text-muted-foreground","data-tooltip":f.taskId,children:w0(f.taskId)}),i.jsx("span",{className:"min-w-0 flex-1 line-clamp-2 font-inter text-[11px] leading-snug text-muted-foreground",children:f.task}),i.jsx("span",{className:"mt-0.5 shrink-0 font-mono text-xs font-bold text-foreground",children:f.agentId}),i.jsx("span",{className:"mt-0.5 shrink-0 font-mono text-[10px] text-muted-foreground/50",children:Xe(f.timestamp)})]},f.taskId)})})]})}const q0=new Set(["shipped","closed"]);function vm(u){var f,x,_,y;if(u.filename==="MEMORY.md")return"record";const c=u.filename.split("_")[0].toLowerCase(),m=(x=(f=u.frontmatter)==null?void 0:f.type)==null?void 0:x.toLowerCase(),o=(y=(_=u.frontmatter)==null?void 0:_.status)==null?void 0:y.toLowerCase();return c==="session"?"session":c==="feedback"||c==="user"?"rule":c==="project"?o&&q0.has(o)?"record":"backlog":c==="gossip"?"record":m==="session"?"session":m==="feedback"||m==="user"?"rule":m==="reference"?"record":"backlog"}const ym=[{type:"backlog",label:"Backlog",blurb:"Open work, pending decisions"},{type:"record",label:"Record",blurb:"Shipped & closed reference"},{type:"session",label:"Session",blurb:"Per-session recaps"},{type:"rule",label:"Rule",blurb:"Feedback & user preferences"}];function H0(u){return u.origin?`${u.origin}/${u.filename}`:u.filename}function k0(u){const c=new Set,m=[];for(const o of u){const f=H0(o);c.has(f)||(c.add(f),m.push(o))}return m}const B0={backlog:"text-primary",record:"text-text-dim",session:"text-confirmed",rule:"text-unverified"},Y0={backlog:"border-primary/30 bg-primary/[0.06]",record:"border-text-dim/30 bg-text-dim/[0.08]",session:"border-confirmed/30 bg-confirmed/[0.06]",rule:"border-unverified/30 bg-unverified/[0.06]"};function L0({folder:u,memories:c,onBack:m,onOpen:o}){const f=ym.find(b=>b.type===u),x=B0[u],_=Y0[u],y=R.useMemo(()=>[...c].sort((b,h)=>b.filename<h.filename?1:-1),[c]);return i.jsxs("section",{className:"flex h-full flex-col",children:[i.jsxs("div",{className:"mb-3 flex items-center gap-2 font-mono text-xs",children:[i.jsx("button",{onClick:m,className:"font-bold uppercase tracking-widest text-muted-foreground transition hover:text-primary",children:"Memory"}),i.jsx("span",{className:"text-muted-foreground/40",children:"›"}),i.jsx("span",{className:`font-bold uppercase tracking-widest ${x}`,children:f.label}),i.jsx("span",{className:"ml-1 text-muted-foreground/60",children:y.length})]}),y.length===0?i.jsx("div",{className:"flex-1",children:i.jsx(Fl,{title:`No ${f.label.toLowerCase()} memories`,hint:f.blurb})}):i.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:y.map(b=>{const h=G0(b),M=X0(b),w=Q0(b.frontmatter);return i.jsxs("button",{onClick:()=>o(b),className:"group flex flex-col gap-1.5 rounded-md border border-border/40 bg-muted p-3 text-left transition hover:border-primary/30 hover:bg-accent/40",children:[i.jsx("span",{className:`inline-block w-fit rounded-sm border px-1.5 py-[1px] font-mono text-[9px] font-bold uppercase tracking-[0.14em] ${_} ${x}`,children:f.label}),i.jsx("span",{className:"line-clamp-2 text-[13px] font-medium leading-snug text-foreground group-hover:text-primary",children:h}),i.jsxs("div",{className:"flex items-center justify-between gap-2 font-mono text-[10px] text-muted-foreground/70",children:[i.jsx("span",{className:"min-w-0 truncate",children:M}),w&&i.jsx("span",{className:"shrink-0",children:Xe(w)})]})]},`${b.agentId||""}/${b.filename}`)})})]})}function G0(u){var o;const c=(o=u.frontmatter)==null?void 0:o.name;if(c)return c;const m=u.content.split(`
|
|
66
|
-
`).find(f=>f.trim().length>0);if(m){const f=m.replace(/^#+\s*/,"").trim();if(f)return f.slice(0,80)}return u.filename.replace(/\.md$/,"")}function X0(u){const c=u.filename.replace(/\.md$/,"");return c||(u.agentId==="_project"?"project":u.agentId||"unknown")}function Q0(u){if(u)for(const c of["timestamp","updated","updatedAt","modified","created","date"]){const m=u[c];if(m&&!isNaN(new Date(m).getTime()))return m}}function Z0({memory:u,onClose:c}){if(R.useEffect(()=>{if(!u)return;const y=b=>{b.key==="Escape"&&c()};return document.addEventListener("keydown",y),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=""}},[u,c]),!u)return null;const m=vm(u),o=u.agentId==="_project"?"project":u.agentId||"unknown",f=`.gossip/agents/${u.agentId||"_project"}/memory/knowledge/${u.filename}`,x=V0(u.frontmatter),_=Object.entries(u.frontmatter||{});return i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center overflow-y-auto bg-background/80 p-6 backdrop-blur-sm",onClick:c,children:i.jsxs("div",{className:"relative flex max-h-[calc(100vh-48px)] w-full max-w-xl flex-col overflow-hidden rounded-lg border border-primary/30 bg-card",style:{boxShadow:"0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(139, 92, 246, 0.06)"},onClick:y=>y.stopPropagation(),children:[i.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/60 px-4 py-3.5",children:[i.jsx("span",{className:"shrink-0 rounded-sm border border-primary/30 bg-primary/[0.06] px-1.5 py-0.5 font-mono text-[9px] font-bold uppercase tracking-[0.14em] text-primary",children:m}),i.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs font-medium text-foreground",children:u.filename}),i.jsx("button",{onClick:c,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground transition hover:bg-muted hover:text-foreground","aria-label":"Close",children:i.jsx("span",{className:"text-base leading-none",children:"✕"})})]}),i.jsxs("div",{className:"flex-1 space-y-4 overflow-y-auto px-4 py-4 text-[13px] leading-relaxed text-foreground",children:[i.jsxs("section",{children:[i.jsx("h3",{className:"mb-1.5 font-mono text-[10px] font-semibold uppercase tracking-[0.14em] text-primary",children:"Owner"}),i.jsxs("div",{className:"flex flex-wrap gap-3 font-mono text-[11px] text-muted-foreground",children:[i.jsx("span",{children:o}),x&&i.jsxs("span",{children:["· updated ",Xe(x)]})]}),i.jsx("div",{className:"mt-1 truncate font-mono text-[10px] text-muted-foreground/60",children:f})]}),_.length>0&&i.jsxs("section",{children:[i.jsx("h3",{className:"mb-1.5 font-mono text-[10px] font-semibold uppercase tracking-[0.14em] text-primary",children:"Frontmatter"}),i.jsx("div",{className:"overflow-hidden rounded-md border border-border/40 bg-background/40",children:i.jsx("table",{className:"w-full text-left font-mono text-[11px]",children:i.jsx("tbody",{children:_.map(([y,b])=>i.jsxs("tr",{className:"border-b border-border/20 last:border-b-0",children:[i.jsx("td",{className:"w-32 px-3 py-1.5 text-muted-foreground/70",children:y}),i.jsx("td",{className:"px-3 py-1.5 break-all text-foreground/90",children:b})]},y))})})})]}),i.jsxs("section",{children:[i.jsx("h3",{className:"mb-1.5 font-mono text-[10px] font-semibold uppercase tracking-[0.14em] text-primary",children:"Content"}),i.jsx("div",{className:"task-md overflow-x-auto rounded-md border border-border/40 bg-background/40 p-3 text-xs leading-relaxed text-foreground/90",dangerouslySetInnerHTML:{__html:gm(u.content)}})]})]})]})})}function V0(u){if(u)for(const c of["timestamp","updated","updatedAt","modified","created","date"]){const m=u[c];if(m&&!isNaN(new Date(m).getTime()))return m}}const K0=new Set(["shipped","closed"]),$0={backlog:"text-primary",record:"text-text-dim",session:"text-confirmed",rule:"text-unverified"},J0={backlog:{bg:"bg-primary",glow:"rgba(139, 92, 246, 0.6)"},record:{bg:"bg-text-dim",glow:"rgba(102, 102, 116, 0.55)"},session:{bg:"bg-confirmed",glow:"rgba(52, 211, 153, 0.55)"},rule:{bg:"bg-unverified",glow:"rgba(251, 191, 36, 0.55)"}},F0={backlog:"bg-primary/[0.06] border-primary/30",record:"bg-text-dim/[0.08] border-text-dim/20",session:"bg-confirmed/[0.06] border-confirmed/25",rule:"bg-unverified/[0.06] border-unverified/25"},W0={backlog:i.jsx("path",{d:"M20 7h-7L10.3 4.3A1 1 0 0 0 9.6 4H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z"}),record:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),i.jsx("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})]}),session:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"12",cy:"12",r:"10"}),i.jsx("polyline",{points:"12 6 12 12 16 14"})]}),rule:i.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})},I0=1440*60*1e3;function P0({memories:u,heading:c="Memory",statusFilter:m=!1}){const[o,f]=R.useState(null),[x,_]=R.useState(null),[y,b]=R.useState("all"),h=R.useMemo(()=>k0(u),[u]),M=R.useMemo(()=>!m||y==="all"?h:h.filter(Y=>{var ae;const Q=(((ae=Y.frontmatter)==null?void 0:ae.status)||"").toLowerCase();return y==="shipped"?K0.has(Q):Q==="open"||!Q}),[h,m,y]),w=R.useMemo(()=>{const Y={backlog:[],record:[],session:[],rule:[]},Q={backlog:!1,record:!1,session:!1,rule:!1},ae=Date.now();for(const J of M){const V=vm(J);Y[V].push(J),!Q[V]&&eg(J,ae)&&(Q[V]=!0)}return{buckets:Y,recent:Q}},[M]);return o?i.jsxs(i.Fragment,{children:[i.jsx(L0,{folder:o,memories:w.buckets[o],onBack:()=>f(null),onOpen:_}),i.jsx(Z0,{memory:x,onClose:()=>_(null)})]}):i.jsxs("section",{className:"flex h-full flex-col",children:[i.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[i.jsxs("h2",{className:"font-mono text-xs font-bold uppercase tracking-widest text-foreground",children:[c," ",i.jsx("span",{className:"text-primary",children:M.length})]}),m&&i.jsx("div",{className:"flex gap-1 font-mono text-[10px]",role:"tablist","aria-label":"Status filter",children:["all","open","shipped"].map(Y=>i.jsx("button",{role:"tab","aria-selected":y===Y,onClick:()=>b(Y),className:`rounded-sm border px-2 py-0.5 uppercase tracking-widest transition ${y===Y?"border-primary/50 bg-primary/10 text-primary":"border-border/30 text-muted-foreground hover:border-primary/30 hover:text-foreground"}`,children:Y},Y))})]}),i.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:ym.map(({type:Y,label:Q,blurb:ae})=>{const J=w.buckets[Y].length,V=w.recent[Y],me=$0[Y],$=J0[Y],K=F0[Y],X=J===0;return i.jsxs("button",{onClick:()=>f(Y),disabled:X,className:`group relative grid grid-cols-[auto_1fr_auto] grid-rows-[auto_auto] items-center gap-x-3 gap-y-1 rounded-md border bg-muted p-3.5 text-left transition ${X?"cursor-default border-border/20 opacity-55":"border-border/40 hover:border-primary/30 hover:bg-accent/40"}`,children:[i.jsxs("span",{className:`relative row-span-2 flex h-9 w-9 items-center justify-center rounded-sm border ${K} ${me}`,"aria-hidden":!0,children:[V&&i.jsx("span",{className:`pointer-events-none absolute -right-1 -top-1 h-1.5 w-1.5 rounded-full ${$.bg}`,style:{boxShadow:`0 0 8px ${$.glow}`},"data-tooltip":"Activity in the last 24h","aria-label":"Activity in the last 24h"}),i.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:W0[Y]})]}),i.jsx("span",{className:"self-end font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:Q}),i.jsx("span",{className:`row-span-2 self-center font-mono text-sm font-bold tabular-nums ${X?"text-muted-foreground/40":me}`,children:J}),i.jsx("span",{className:"self-start font-mono text-[10px] leading-snug text-muted-foreground/70",children:ae})]},Y)})})]})}function eg(u,c){const m=u.frontmatter;if(!m)return!1;for(const o of["lastAccessed","updated","timestamp","updatedAt","modified","created","date"]){const f=m[o];if(!f)continue;const x=new Date(f).getTime();if(!isNaN(x)&&c-x<=I0)return!0}return!1}function tg(u){const c=new Map;for(const o of u){const f=c.get(o.agentId)??[];f.push(o),c.set(o.agentId,f)}const m=[];for(const[o,f]of c){f.sort((_,y)=>_.day.localeCompare(y.day));const x=f.length>0?f[f.length-1].accuracy:0;m.push({agentId:o,points:f,latest:x})}return m.sort((o,f)=>f.latest-o.latest),m}function ng({values:u}){if(u.length===0)return i.jsx("svg",{width:120,height:20});if(u.length===1){const x=20-u[0]*20;return i.jsx("svg",{width:120,height:20,children:i.jsx("circle",{cx:120/2,cy:x,r:2,fill:"currentColor"})})}const o=120/(u.length-1),f=u.map((x,_)=>`${(_*o).toFixed(1)},${(20-x*20).toFixed(1)}`).join(" ");return i.jsx("svg",{width:120,height:20,className:"text-primary",children:i.jsx("polyline",{points:f,fill:"none",stroke:"currentColor",strokeWidth:1.5})})}function lg(){const[u,c]=R.useState(null),[m,o]=R.useState(null);R.useEffect(()=>{Je("fleet-trend?days=30").then(c).catch(x=>o(String((x==null?void 0:x.message)??x)))},[]);const f=R.useMemo(()=>u?tg(u.points):[],[u]);return i.jsxs("section",{className:"rounded-lg border border-border bg-card p-4",children:[i.jsxs("header",{className:"mb-3 flex items-baseline justify-between",children:[i.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:"Fleet Health Trend"}),i.jsx("span",{className:"text-xs text-muted-foreground",children:"last 30d"})]}),m&&i.jsx("p",{className:"text-xs text-muted-foreground",children:"unavailable"}),!m&&u&&f.length===0&&i.jsx("p",{className:"text-xs text-muted-foreground",children:"no recent consensus signals"}),!m&&f.length>0&&i.jsx("ul",{className:"space-y-1.5",children:f.map(x=>i.jsxs("li",{className:"flex items-center justify-between gap-3 text-xs",children:[i.jsx("span",{className:"truncate font-mono text-foreground",children:x.agentId}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(ng,{values:x.points.map(_=>_.accuracy)}),i.jsxs("span",{className:"w-10 text-right tabular-nums text-muted-foreground",children:[Math.round(x.latest*100),"%"]})]})]},x.agentId))})]})}const kc=[{key:"passed",label:"passed",bar:"bg-emerald-400",dot:"bg-emerald-400",text:"text-emerald-400"},{key:"pending",label:"pending",bar:"bg-sky-400",dot:"bg-sky-400",text:"text-sky-400"},{key:"insufficient_evidence",label:"insufficient",bar:"bg-yellow-400",dot:"bg-yellow-400",text:"text-yellow-400"},{key:"inconclusive",label:"inconclusive",bar:"bg-orange-400",dot:"bg-orange-400",text:"text-orange-400"},{key:"silent_skill",label:"silent",bar:"bg-zinc-500",dot:"bg-zinc-500",text:"text-zinc-400"},{key:"failed",label:"failed",bar:"bg-red-400",dot:"bg-red-400",text:"text-red-400"}];function ag({overview:u}){const c=u==null?void 0:u.skillVerdictSummary,m=c?kc.reduce((o,f)=>o+(c[f.key]??0),0):0;return i.jsxs("section",{className:"rounded-lg border border-border bg-card p-4",children:[i.jsxs("header",{className:"mb-3 flex items-baseline justify-between",children:[i.jsx("h3",{className:"font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:"Skill Verdicts"}),i.jsxs("span",{className:"font-mono text-[10px] text-muted-foreground/70",children:[m," total"]})]}),!c||m===0?i.jsx("p",{className:"font-mono text-[11px] text-muted-foreground/60",children:"no skill verdicts yet"}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"mb-3 flex h-2 w-full gap-px overflow-hidden rounded-sm bg-muted/40",children:kc.map(o=>{const f=c[o.key]??0;if(f===0)return null;const x=f/m*100;return i.jsx("div",{className:o.bar,style:{width:`${x}%`},title:`${o.label}: ${f}`},o.key)})}),i.jsx("ul",{className:"grid grid-cols-3 gap-x-4 gap-y-1.5 font-mono text-[11px]",children:kc.map(o=>{const f=c[o.key]??0,x=f===0;return i.jsxs("li",{className:`flex items-center gap-1.5 ${x?"opacity-40":""}`,children:[i.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${o.dot}`}),i.jsx("span",{className:"text-muted-foreground",children:o.label}),i.jsx("span",{className:`ml-auto tabular-nums ${x?"text-muted-foreground/50":o.text}`,children:f})]},o.key)})})]})]})}const ig={agreement:"confirmed",consensus_verified:"confirmed",unique_confirmed:"unique",unique_unconfirmed:"unique?",disagreement:"disputed",hallucination_caught:"hallucination",new_finding:"new",unverified:"unverified"};function sg(u,c){return u?u.length>c?u.slice(0,c-1)+"…":u:""}function ug(){const[u,c]=R.useState(null),[m,o]=R.useState(null);return R.useEffect(()=>{Je("signals?limit=5").then(f=>c(f.items??[])).catch(f=>o(String((f==null?void 0:f.message)??f)))},[]),i.jsxs("section",{className:"rounded-lg border border-border bg-card p-4",children:[i.jsxs("header",{className:"mb-3 flex items-baseline justify-between",children:[i.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:"Recent Signals"}),i.jsx("button",{type:"button",onClick:()=>e0("/signals"),className:"text-xs text-primary hover:underline",children:"all signals →"})]}),m&&i.jsx("p",{className:"text-xs text-muted-foreground",children:"unavailable"}),!m&&u&&u.length===0&&i.jsx("p",{className:"text-xs text-muted-foreground",children:"no signals recorded"}),!m&&u&&u.length>0&&i.jsx("ul",{className:"space-y-1.5",children:u.map((f,x)=>i.jsxs("li",{className:"flex items-center gap-2 text-xs",children:[i.jsx("span",{className:"w-14 shrink-0 text-muted-foreground tabular-nums",children:Xe(f.timestamp)}),i.jsx("span",{className:"w-20 shrink-0 font-mono uppercase tracking-wide text-foreground",children:ig[f.signal]??f.signal}),i.jsx("span",{className:"w-24 shrink-0 truncate font-mono text-muted-foreground",children:f.agentId}),i.jsx("span",{className:"flex-1 truncate text-muted-foreground",children:sg(f.evidence??"",80)})]},`${f.timestamp}-${x}`))})]})}const cm=["bg-disputed","bg-unverified","bg-unique","bg-muted-foreground/60","bg-primary/70","bg-confirmed/70"];function rm(u){let c=0;for(let m=0;m<u.length;m++)c=c*31+u.charCodeAt(m)>>>0;return cm[c%cm.length]}function cg({overview:u}){const c=u==null?void 0:u.droppedFindingTypeCounts,m=c?Object.entries(c).sort((f,x)=>x[1]-f[1]):[],o=m.reduce((f,[,x])=>f+x,0);return i.jsxs("section",{className:"rounded-lg border border-border bg-card p-4",children:[i.jsxs("header",{className:"mb-3 flex items-baseline justify-between",children:[i.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:"Dropped Finding Types"}),i.jsx("span",{className:"text-xs text-muted-foreground",children:"last 20 rounds"})]}),o===0?i.jsx("p",{className:"text-xs text-muted-foreground",children:"all clean — no invalid types"}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"mb-3 flex h-3 w-full overflow-hidden rounded",children:m.map(([f,x])=>{const _=x/o*100;return i.jsx("div",{className:rm(f),style:{width:`${_}%`},title:`invalid type "${f}" emitted ${x} times in last 20 consensus rounds`},f)})}),i.jsx("ul",{className:"space-y-1 text-xs",children:m.map(([f,x])=>i.jsxs("li",{className:"flex items-center gap-2",children:[i.jsx("span",{className:`h-2 w-2 rounded-sm ${rm(f)}`}),i.jsx("span",{className:"truncate font-mono text-foreground",children:f}),i.jsx("span",{className:"ml-auto tabular-nums text-muted-foreground",children:x})]},f))})]})]})}function rg({categoryAccuracy:u,categoryCorrect:c,categoryHallucinated:m}){const o=Object.keys(u??{});if(o.length===0)return i.jsx(Fl,{title:"No category data yet",hint:"Accuracy accrues after ≥5 signals per category.",compact:!0});const f=o.map(x=>{const _=Math.max(0,Math.min(1,u[x]??0)),y=(c==null?void 0:c[x])??0,b=(m==null?void 0:m[x])??0;return{key:x,acc:_,c:y,h:b,n:y+b}}).sort((x,_)=>_.acc-x.acc);return i.jsx("div",{className:"space-y-2",children:f.map(x=>{const _=x.acc>=.9?"bg-confirmed":x.acc>=.7?"bg-unverified":"bg-disputed",y=x.n>0?`${x.c} correct / ${x.h} hallucinated / ${x.n} total`:void 0;return i.jsxs("div",{className:`grid grid-cols-[128px_1fr_auto_44px] items-center gap-3 ${x.n>0&&x.n<10?"opacity-50":""}`,title:x.n>0&&x.n<10?`${y} — low sample (n<10)`:y,children:[i.jsx("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:x.key.replace(/_/g," ")}),i.jsx("div",{className:"h-2 overflow-hidden rounded-sm bg-muted/30",children:i.jsx("div",{className:`h-full rounded-sm transition-all ${_}`,style:{width:`${x.acc*100}%`}})}),i.jsx("span",{className:"shrink-0 text-right font-mono text-[10px] tabular-nums text-muted-foreground/60 w-16",children:x.n>0?i.jsxs(i.Fragment,{children:[x.c,"/",x.n,x.h>0&&i.jsxs("span",{className:"ml-1 text-disputed/70",children:["·",x.h,"✗"]})]}):"—"}),i.jsxs("span",{className:"text-right font-mono text-[11px] font-bold tabular-nums text-foreground",children:[Math.round(x.acc*100),"%"]})]},x.key)})})}const og={pending:"border-border/50 bg-muted/30 text-muted-foreground",passed:"border-confirmed/40 bg-confirmed/10 text-confirmed",failed:"border-disputed/40 bg-disputed/10 text-disputed",silent_skill:"border-unverified/40 bg-unverified/10 text-unverified",insufficient_evidence:"border-unverified/40 bg-unverified/10 text-unverified",inconclusive:"border-unique/40 bg-unique/10 text-unique",flagged_for_manual_review:"border-disputed/40 bg-disputed/10 text-disputed"};function dg(u){const c=Math.round(u*100),m=c>0?"+":"",o=c>0?"text-confirmed":c<0?"text-disputed":"text-muted-foreground";return{text:`${m}${c}pp`,cls:o}}function fg({slot:u}){const c=u.status,m=c?og[c]:"border-border/50 bg-muted/30 text-muted-foreground",o=c==="inconclusive"&&(u.inconclusiveStrikes??0)>0,f=u.forcedDevelops??[],x=f.length>0?f[f.length-1]:null,_=typeof u.effectiveness=="number"?dg(u.effectiveness):null;return i.jsxs("div",{className:`rounded-md border bg-card/80 p-3 ${u.enabled?"border-border/50":"border-border/30 opacity-60"}`,children:[i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[i.jsxs("span",{className:`font-mono text-xs font-semibold ${u.enabled?"text-foreground":"text-muted-foreground line-through"}`,children:[u.mode==="contextual"&&"⚡ ",u.name]}),i.jsx("span",{className:"rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[9px] text-muted-foreground",children:u.source}),u.mode==="contextual"&&i.jsx("span",{className:"rounded-sm border border-amber-500/30 bg-amber-500/10 px-1.5 py-0.5 font-mono text-[9px] text-amber-400",children:"contextual"})]}),i.jsxs("div",{className:"mt-1 font-mono text-[10px] text-muted-foreground/60",children:["bound ",Xe(u.boundAt)]})]}),c&&i.jsx("span",{className:`shrink-0 rounded-sm border px-1.5 py-0.5 font-mono text-[9px] font-bold uppercase ${m}`,children:c.replace(/_/g," ")})]}),i.jsxs("div",{className:"mt-2 flex items-center gap-3 font-mono text-[10px]",children:[_&&i.jsx("span",{className:_.cls,title:"Effectiveness: change in hallucination rate pre/post",children:_.text}),o&&i.jsxs("span",{className:"text-unique",title:u.inconclusiveAt?`last strike ${Xe(u.inconclusiveAt)}`:void 0,children:[u.inconclusiveStrikes," strike",u.inconclusiveStrikes===1?"":"s"]})]}),f.length>0&&i.jsxs("div",{className:"mt-2 border-t border-border/40 pt-2 font-mono text-[10px] text-muted-foreground",title:x!=null&&x.reason?`latest: ${x.reason}`:void 0,children:["forced ",f.length," time",f.length===1?"":"s",x&&` · last ${Xe(x.timestamp)}`]})]})}function mg({open:u,onOpenChange:c,children:m}){return R.useEffect(()=>{if(!u)return;const o=x=>{x.key==="Escape"&&c(!1)};document.addEventListener("keydown",o);const f=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=f}},[u,c]),u?i.jsxs("div",{className:"fixed inset-0 z-50",children:[i.jsx("div",{className:"absolute inset-0 bg-background/70 backdrop-blur-sm",onClick:()=>c(!1)}),i.jsx("div",{className:"absolute inset-y-0 right-0 flex",children:i.jsx("div",{onClick:o=>o.stopPropagation(),className:"contents",children:m})})]}):null}function xg({side:u="right",className:c="",children:m,...o}){return i.jsx("div",{className:`h-full border-l border-border/60 bg-card shadow-xl p-6 ${c}`,...o,children:m})}function hg({className:u="",...c}){return i.jsx("div",{className:`mb-2 ${u}`,...c})}function gg({className:u="",...c}){return i.jsx("h2",{className:`font-semibold ${u}`,...c})}function pg({citation:u}){const c=u.snippet.split(`
|
|
67
|
-
`);return i.jsxs("div",{className:"rounded-md border border-border/40 bg-card/60 overflow-hidden",children:[i.jsx("div",{className:"flex items-center justify-between px-3 py-1 border-b border-border/40 bg-muted/40",children:i.jsxs("span",{className:"font-mono text-[10px] text-muted-foreground",children:[u.file,":",u.line]})}),i.jsx("pre",{className:"px-3 py-2 font-mono text-[11px] leading-relaxed overflow-x-auto",children:c.map((m,o)=>i.jsx("div",{className:"whitespace-pre",children:m||" "},o))})]})}const bg={critical:"text-red-400 bg-red-500/10",high:"text-orange-400 bg-orange-500/10",medium:"text-yellow-400 bg-yellow-500/10",low:"text-muted-foreground bg-muted/50"},vg={confirmed:"bg-confirmed",disputed:"bg-disputed",unverified:"bg-unverified",unique:"bg-unique",insight:"bg-muted",newFinding:"bg-unique"};function xs({open:u,onOpenChange:c,consensusId:m,findingId:o}){const[f,x]=R.useState(null),[_,y]=R.useState(null);return R.useEffect(()=>{if(!u||!m||!o){x(null),y(null);return}x(null),y(null),Je(`finding/${encodeURIComponent(m)}/${encodeURIComponent(o)}`).then(x).catch(b=>y(b.message||"failed to load finding"))},[u,m,o]),i.jsx(mg,{open:u,onOpenChange:c,children:i.jsxs(xg,{side:"right",className:"w-[480px] sm:w-[480px] sm:max-w-[480px] overflow-y-auto",children:[i.jsx(hg,{children:i.jsx(gg,{className:"font-mono text-sm",children:"Finding detail"})}),_&&i.jsx("div",{className:"mt-4 text-[11px] text-disputed",children:_}),!_&&!f&&i.jsx("div",{className:"mt-4 text-[11px] text-muted-foreground",children:"Loading…"}),f&&i.jsxs("div",{className:"mt-4 space-y-4",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsx("span",{className:`font-mono text-[9px] uppercase tracking-widest px-2 py-0.5 rounded ${vg[f.finding.tag]||"bg-muted"}`,children:f.finding.tag}),f.finding.severity&&i.jsx("span",{className:`font-mono text-[9px] uppercase tracking-widest px-2 py-0.5 rounded ${bg[f.finding.severity]||"bg-muted"}`,children:f.finding.severity}),i.jsxs("span",{className:"font-mono text-[9px] text-muted-foreground",children:["by ",f.finding.originalAgentId]}),f.retracted&&i.jsx("span",{className:"font-mono text-[9px] uppercase tracking-widest px-2 py-0.5 rounded bg-disputed/50",children:"retracted"})]}),i.jsx("div",{className:"text-[12px] leading-relaxed whitespace-pre-wrap",children:f.finding.finding.replace(/<cite tag="file">[^<]+<\/cite>/g,"").trim()}),f.citations.length>0&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("div",{className:"font-mono text-[10px] uppercase tracking-widest text-muted-foreground",children:"Citations"}),f.citations.map((b,h)=>i.jsx(pg,{citation:b},h))]}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("div",{className:"font-mono text-[10px] uppercase tracking-widest text-muted-foreground",children:"Coverage"}),f.finding.confirmedBy.length>0&&i.jsxs("div",{className:"text-[11px]",children:[i.jsx("span",{className:"text-confirmed",children:"✓"})," confirmed by ",f.finding.confirmedBy.join(", ")]}),f.finding.disputedBy.map((b,h)=>i.jsxs("div",{className:"text-[11px]",children:[i.jsx("span",{className:"text-disputed",children:"✗"})," disputed by ",b.agentId,": ",i.jsx("span",{className:"text-muted-foreground",children:b.reason})]},h)),f.finding.confirmedBy.length===0&&f.finding.disputedBy.length===0&&i.jsx("div",{className:"text-[11px] text-muted-foreground",children:"No peer review"})]}),f.signals.length>0&&i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"font-mono text-[10px] uppercase tracking-widest text-muted-foreground",children:["Signals (",f.signals.length,")"]}),i.jsx("div",{className:"space-y-1",children:f.signals.map((b,h)=>i.jsxs("div",{className:"text-[11px] border-l-2 border-border/40 pl-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-mono font-semibold",children:b.signal}),i.jsx("span",{className:"text-muted-foreground",children:"·"}),i.jsx("span",{children:b.agentId}),b.counterpartId&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-muted-foreground",children:"→"}),i.jsx("span",{children:b.counterpartId})]}),i.jsx("span",{className:"text-muted-foreground ml-auto",children:Xe(b.timestamp)})]}),b.evidence&&i.jsx("div",{className:"text-muted-foreground mt-0.5",children:b.evidence.slice(0,200)})]},h))})]}),i.jsx("div",{className:"pt-2 border-t border-border/40",children:i.jsxs("a",{href:`#/consensus/${f.consensusId}`,className:"font-mono text-[10px] text-primary hover:underline",children:["→ consensus round ",f.consensusId]})})]})]})})}const yg={agreement:"text-confirmed bg-confirmed/10",consensus_verified:"text-confirmed bg-confirmed/10",unique_confirmed:"text-unique bg-unique/10",unique_unconfirmed:"text-unique bg-unique/10",new_finding:"text-unique bg-unique/10",disagreement:"text-disputed bg-disputed/10",hallucination_caught:"text-disputed bg-disputed/10",unverified:"text-unverified bg-unverified/10"};function jg({agentId:u}){const[c,m]=R.useState([]),[o,f]=R.useState(!0),[x,_]=R.useState("all"),[y,b]=R.useState(null);R.useEffect(()=>{let Y=!1;return f(!0),Je(`signals?agent=${encodeURIComponent(u)}&limit=100`).then(Q=>{Y||(m(Q.items||[]),f(!1))}).catch(()=>{Y||(m([]),f(!1))}),()=>{Y=!0}},[u]);const h=[...c].sort((Y,Q)=>(Q.timestamp||"").localeCompare(Y.timestamp||"")),M=x==="all"||x==="signals"?h:[],w=({k:Y,label:Q,enabled:ae})=>i.jsx("button",{type:"button",onClick:()=>ae&&_(Y),disabled:!ae,className:`rounded-sm px-2 py-0.5 font-mono text-[10px] font-semibold transition ${x===Y?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"} ${ae?"":"opacity-40 cursor-not-allowed"}`,children:Q});return i.jsxs("div",{className:"rounded-md border border-border/40 bg-card/80 px-4 py-3",children:[i.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[i.jsx("span",{className:"font-mono text-[10px] font-bold uppercase tracking-widest text-muted-foreground",children:"Activity"}),i.jsxs("div",{className:"flex gap-1",children:[i.jsx(w,{k:"all",label:"All",enabled:!0}),i.jsx(w,{k:"signals",label:"Signals",enabled:!0}),i.jsx(w,{k:"tasks",label:"Tasks (none yet)",enabled:!1}),i.jsx(w,{k:"skills",label:"Skills (none yet)",enabled:!1})]})]}),o?i.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:"Loading…"}):M.length===0?i.jsx(Fl,{title:"No activity yet",hint:"Signals, task completions, and skill binds will appear here.",compact:!0}):i.jsx("div",{className:"space-y-1",children:M.map((Y,Q)=>{const ae=yg[Y.signal]||"text-muted-foreground bg-muted",J=!!(Y.consensusId&&Y.findingId),V=i.jsxs("div",{className:"flex items-start gap-2 py-1.5",children:[i.jsx("span",{className:"shrink-0 font-mono text-[9px] text-muted-foreground/60 tabular-nums w-16",children:Xe(Y.timestamp)}),i.jsx("span",{className:`shrink-0 rounded-sm px-1.5 py-0.5 font-mono text-[9px] font-bold ${ae}`,children:Y.signal}),i.jsxs("div",{className:"min-w-0 flex-1 text-[11px] text-muted-foreground",children:[Y.counterpartId&&i.jsxs("span",{className:"font-mono text-[10px] text-muted-foreground/70",children:["→ ",Y.counterpartId," · "]}),Y.evidence&&i.jsx("span",{children:Y.evidence.length>160?Y.evidence.slice(0,160)+"…":Y.evidence})]})]});return J?i.jsx("button",{type:"button",onClick:()=>b({consensusId:Y.consensusId,findingId:Y.findingId}),className:"w-full rounded-sm text-left transition hover:bg-accent/40",children:V},Q):i.jsx("div",{children:V},Q)})}),i.jsx(xs,{open:!!y,onOpenChange:Y=>{Y||b(null)},consensusId:(y==null?void 0:y.consensusId)??null,findingId:(y==null?void 0:y.findingId)??null})]})}function Ng(){const u=R.useRef(null),[c,m]=R.useState(0);return R.useEffect(()=>{const o=u.current;if(!o||typeof ResizeObserver>"u")return;const f=new ResizeObserver(x=>{for(const _ of x)m(_.contentRect.width)});return f.observe(o),()=>f.disconnect()},[]),[u,c]}const Sg={agreement:"bg-confirmed",consensus_verified:"bg-confirmed",unique_confirmed:"bg-unique",unique_unconfirmed:"bg-unique/50",disagreement:"bg-disputed/70",hallucination_caught:"bg-disputed",new_finding:"bg-unique",unverified:"bg-unverified",citation_fabricated:"bg-amber-500"},Tg={agreement:"Confirmed",consensus_verified:"Confirmed",unique_confirmed:"Unique (confirmed)",unique_unconfirmed:"Unique",disagreement:"Disputed",hallucination_caught:"Hallucination",new_finding:"New finding",unverified:"Unverified",citation_fabricated:"Fabricated citation"},_g=6,Eg=500,jm=100,Mg=150;function Ag(u){if(u<=0)return jm;const c=Math.floor(u/_g);return Math.max(1,Math.min(c,Eg))}function zg({agentId:u}){const[c,m]=R.useState([]),[o,f]=R.useState(0),[x,_]=R.useState(!1),[y,b]=R.useState(null),[h,M]=Ng(),[w,Y]=R.useState(jm),Q=R.useRef(null);R.useEffect(()=>{if(M<=0)return;const $=Ag(M);return Q.current&&clearTimeout(Q.current),Q.current=setTimeout(()=>{Y(K=>K===$?K:$)},Mg),()=>{Q.current&&clearTimeout(Q.current)}},[M]),R.useEffect(()=>{Je(`signals?agent=${encodeURIComponent(u)}&limit=${w}`).then($=>{m($.items||[]),f($.total||0)}).catch(()=>{})},[u,w]);const ae=R.useMemo(()=>[...c].reverse(),[c]),J={confirmed:0,disputed:0,unique:0,unverified:0,fabricated:0};for(const $ of c)$.signal==="agreement"||$.signal==="consensus_verified"?J.confirmed++:$.signal==="disagreement"||$.signal==="hallucination_caught"?J.disputed++:$.signal==="unique_confirmed"||$.signal==="unique_unconfirmed"||$.signal==="new_finding"?J.unique++:$.signal==="unverified"?J.unverified++:$.signal==="citation_fabricated"&&J.fabricated++;const V=c.length,me=o>V;return c.length===0?i.jsx("div",{ref:h,className:"rounded-md border border-border/40 bg-card/80 px-4 py-3",children:i.jsx(Fl,{title:"No signal history yet",hint:"Signals are recorded during consensus rounds.",compact:!0})}):i.jsxs("div",{ref:h,className:"rounded-md border border-border/40 bg-card/80 px-4 py-3",children:[i.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-baseline gap-2",children:[i.jsx("span",{className:"font-mono text-[10px] font-bold uppercase tracking-widest text-muted-foreground",children:"Signal Timeline"}),i.jsx("span",{className:"font-mono text-[9px] text-muted-foreground/50",children:me?`last ${V} of ${o}`:`${o} total`})]}),i.jsxs("div",{className:"flex items-center gap-3 font-mono text-[10px]",children:[i.jsxs("span",{className:"text-confirmed",children:[J.confirmed," confirmed"]}),J.disputed>0&&i.jsxs("span",{className:"text-disputed",children:[J.disputed," disputed"]}),J.unique>0&&i.jsxs("span",{className:"text-unique",children:[J.unique," unique"]}),J.unverified>0&&i.jsxs("span",{className:"text-unverified",children:[J.unverified," unverified"]}),J.fabricated>0&&i.jsxs("span",{className:"text-amber-500",children:[J.fabricated," fabricated"]})]})]}),i.jsx("div",{className:"flex items-center gap-0.5",children:ae.map(($,K)=>{const X=!!($.consensusId&&$.findingId);return i.jsx("button",{type:"button",disabled:!X,onClick:()=>{$.consensusId&&$.findingId&&(b({consensusId:$.consensusId,findingId:$.findingId}),_(!0))},className:`h-4 min-w-[4px] max-w-[12px] flex-1 rounded-sm transition-opacity hover:opacity-80 ${Sg[$.signal]||"bg-muted"} ${X?"cursor-pointer":"cursor-default"}`,title:`${Tg[$.signal]||$.signal} — ${Xe($.timestamp)}${X?" (click for detail)":""}`},K)})}),i.jsx("div",{className:"mt-2 flex flex-wrap gap-3",children:[{color:"bg-confirmed",label:"Confirmed"},{color:"bg-disputed",label:"Disputed"},{color:"bg-unique",label:"Unique (confirmed)"},{color:"bg-unique/50",label:"Unique (unconfirmed)"},{color:"bg-unverified",label:"Unverified"},{color:"bg-amber-500",label:"Fabricated citation"}].map($=>i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("div",{className:`h-2 w-2 rounded-sm ${$.color}`}),i.jsx("span",{className:"font-mono text-[9px] text-muted-foreground/60",children:$.label})]},$.label))}),i.jsx(xs,{open:x,onOpenChange:_,consensusId:(y==null?void 0:y.consensusId)??null,findingId:(y==null?void 0:y.findingId)??null})]})}function Cg(u){const c=u.toLowerCase();return c==="completed"||c==="done"||c==="success"||c==="succeeded"?"completed":c==="running"||c==="active"||c==="in_progress"||c==="pending"?"running":c==="failed"||c==="error"||c==="errored"||c==="timeout"||c==="timed_out"?"failed":c==="cancelled"||c==="canceled"||c==="queued"||c==="waiting"?"cancelled":"unknown"}const Dg={completed:{label:"Done",iconBox:"bg-confirmed/10 border-confirmed/30",text:"text-confirmed",pulse:!1},running:{label:"Running",iconBox:"bg-unverified/10 border-unverified/30",text:"text-unverified",pulse:!0},failed:{label:"Failed",iconBox:"bg-destructive/10 border-destructive/30",text:"text-destructive",pulse:!1},cancelled:{label:"Cancelled",iconBox:"bg-muted-foreground/10 border-muted-foreground/25",text:"text-muted-foreground",pulse:!1},unknown:{label:"Unknown",iconBox:"bg-muted-foreground/10 border-muted-foreground/25",text:"text-muted-foreground",pulse:!1}},Og={completed:i.jsx("polyline",{points:"5 12 10 17 19 7"}),running:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"12",cy:"12",r:"3",fill:"currentColor",stroke:"none"}),i.jsx("circle",{cx:"12",cy:"12",r:"8",opacity:"0.45"})]}),failed:i.jsxs(i.Fragment,{children:[i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"}),i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"})]}),cancelled:i.jsx("line",{x1:"6",y1:"12",x2:"18",y2:"12"}),unknown:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M9.5 9a2.5 2.5 0 1 1 3.5 2.3c-.8.4-1 .9-1 1.7"}),i.jsx("line",{x1:"12",y1:"16.5",x2:"12",y2:"16.5"})]})};function Rg(u){if(!u)return"—";if(u<1e3)return"< 1s";if(u<6e4)return Math.floor(u/1e3)+"s";if(u<36e5){const o=Math.floor(u/6e4),f=Math.floor(u%6e4/1e3);return f>0?`${o}m ${f}s`:`${o}m`}const c=Math.floor(u/36e5),m=Math.floor(u%36e5/6e4);return m>0?`${c}h ${m}m`:`${c}h`}function Nm({task:u,onClick:c}){const m=Cg(u.status),o=Dg[m];return i.jsxs("tr",{className:`border-b border-border hover:bg-accent/30 transition-colors ${c?"cursor-pointer":""}`,onClick:c?f=>{f.target.closest("a")||c(u)}:void 0,children:[i.jsx("td",{className:"py-2.5 pl-4 pr-2",children:i.jsxs("span",{className:"inline-flex items-center gap-2","aria-label":`Status: ${o.label}`,children:[i.jsx("span",{className:`flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-full border ${o.iconBox} ${o.text} ${o.pulse?"animate-pulse":""}`,"aria-hidden":!0,children:i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:Og[m]})}),i.jsx("span",{className:`font-mono text-[10px] font-semibold uppercase tracking-wider ${o.text}`,children:o.label})]})}),i.jsx("td",{className:"py-2.5 pr-3",children:i.jsx("span",{className:"rounded border border-amber-500/25 bg-amber-500/8 px-2 py-1 font-mono text-[10px] font-semibold text-amber-400",children:u.taskId.slice(0,8)})}),i.jsx("td",{className:"py-2.5 pr-3 font-mono text-xs text-muted-foreground",children:i.jsxs("a",{href:`/dashboard/agent/${encodeURIComponent(u.agentId)}`,className:"inline-flex items-center gap-1.5 transition hover:text-primary",children:[i.jsx("span",{className:"inline-block h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:Va(u.agentId)}}),u.agentId]})}),i.jsx("td",{className:"py-2.5 pr-3 font-inter text-sm text-foreground/80",children:(()=>{const f=u.task.replace(/\n.*/s,"");return f.length>100?f.slice(0,100)+"…":f})()}),i.jsx("td",{className:"py-2.5 pr-3 font-mono text-xs text-muted-foreground",children:m==="running"?"running":Rg(u.duration)}),i.jsx("td",{className:"py-2.5 pr-4 text-right font-mono text-xs text-muted-foreground",children:Xe(u.timestamp)})]})}const wg=3,Ug=720*60*60*1e3;function qg({agentId:u,agents:c,tasks:m,consensus:o}){const f=c.find(D=>D.id===u),[x,_]=R.useState([]),[y,b]=R.useState([]),[h,M]=R.useState(null),[w,Y]=R.useState(null),[Q,ae]=R.useState(null),[J,V]=R.useState(0),[me,$]=R.useState(0);R.useEffect(()=>{Je(`memory/${u}`).then(D=>{_(D.knowledge||[])}).catch(()=>_([]))},[u]),R.useEffect(()=>{let D=!1;return Je("consensus-reports?page=1&pageSize=200").then(P=>{D||b(P.reports||[])}).catch(()=>{D||b([])}),()=>{D=!0}},[]);const K=R.useMemo(()=>{var C;const D=Date.now(),P=new Map;for(const G of y){const k=Date.parse(G.timestamp);if(Number.isNaN(k)||D-k>Ug)continue;const ne=(C=G.authorDiagnostics)==null?void 0:C[u];if(ne)for(const ce of ne)P.set(ce.code,(P.get(ce.code)??0)+1)}const g=[];for(const[G,k]of P)k>=wg&&g.push({code:G,count:k});return g},[y,u]);if(!f)return i.jsxs("div",{className:"py-20 text-center text-muted-foreground",children:["Agent not found: ",u]});const X=f.scores,z=(m==null?void 0:m.items.filter(D=>D.agentId===u))||[],ue=(o==null?void 0:o.runs.filter(D=>D.agents.includes(u)))||[],Z=[{label:"accuracy",value:X.accuracy,fill:X.accuracy>=.7?"bg-confirmed":X.accuracy>=.4?"bg-unverified":"bg-disputed"},{label:"reliability",value:X.reliability,fill:"bg-chart"},{label:"unique",value:X.uniqueness,fill:"bg-unique"},{label:"impact",value:X.impactScore,fill:"bg-[var(--color-impact)]"}],W=X.unverifiedsEmitted??0,ie=X.unverifiedsReceived??0,de=W+ie,Ee=[{label:"Signals",value:String(X.signals),color:"text-foreground"},{label:"Agreements",value:String(X.agreements),color:"text-confirmed"},{label:"Disagreements",value:String(X.disagreements),color:"text-disputed"},{label:"Hallucinations",value:String(X.hallucinations),color:X.hallucinations>0?"text-disputed":"text-muted-foreground"},{label:"Unverified",value:de>0?`${W}↑ ${ie}↓`:"0",color:de>0?"text-unverified":"text-muted-foreground",title:de>0?`${W} emitted (as reviewer) · ${ie} received (as author)`:void 0},{label:"Tokens",value:f.totalTokens.toLocaleString(),color:"text-foreground"}],H=10,I=Math.max(1,Math.ceil(z.length/H)),oe=Math.min(J,I-1),L=z.slice(oe*H,(oe+1)*H),S=R.useMemo(()=>{const D=new Map;for(const P of x){const g=P.filename.match(/^(\d{4}-\d{2}-\d{2})/),C=g?g[1]:"undated",G=D.get(C)||[];G.push(P),D.set(C,G)}return Array.from(D.entries()).sort(([P],[g])=>P==="undated"?1:g==="undated"?-1:g.localeCompare(P)).map(([P,g])=>({day:P,items:g}))},[x]),B=Math.min(me,Math.max(0,S.length-1)),F=S[B];return i.jsxs(i.Fragment,{children:[(()=>{const D=fs(X);return D==="benched"?i.jsx("div",{className:"mb-6 rounded-lg border border-destructive/30 bg-destructive/5 px-4 py-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-mono text-xs font-bold text-destructive",children:"BENCHED"}),i.jsxs("span",{className:"text-xs text-destructive/70",children:["Auto-bench rule fired (",X.bench.reason??"unknown","). Agent excluded from dispatch until scores recover."]})]})}):D==="struggling"?i.jsx("div",{className:"mb-6 rounded-lg border border-unverified/30 bg-unverified/5 px-4 py-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-mono text-xs font-bold text-unverified",children:"STRUGGLING"}),i.jsxs("span",{className:"text-xs text-unverified/70",children:[X.consecutiveFailures,"+ consecutive failures. Deprioritized until clean signals recorded."]})]})}):D==="kept-for-coverage"?i.jsx("div",{className:"mb-6 rounded-lg border border-unverified/30 bg-unverified/5 px-4 py-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-mono text-xs font-bold text-unverified",children:"KEPT FOR COVERAGE"}),i.jsxs("span",{className:"text-xs text-unverified/70",children:["Would be benched (",X.bench.reason??"rule","), but is the sole provider of a category — kept to preserve coverage."]})]})}):null})(),K.length>0&&i.jsx("div",{className:"mb-6 space-y-2",children:K.map(({code:D,count:P})=>i.jsxs("div",{className:"rounded-lg border border-unverified/30 bg-unverified/5 px-4 py-3","data-diagnostic-code":D,children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-mono text-xs font-bold text-unverified",children:"PARSE DIAGNOSTIC"}),i.jsx("span",{className:"font-mono text-[11px] text-unverified/80",dangerouslySetInnerHTML:{__html:Qc(D)}}),i.jsxs("span",{className:"font-mono text-[11px] text-unverified/60",children:["· ",P," fires in 30d"]})]}),i.jsxs("div",{className:"mt-1 text-xs text-muted-foreground/80",children:["This agent's raw output has repeatedly tripped ",i.jsx("span",{className:"font-mono",children:D}),". Inspect recent consensus rounds on this page for the per-finding banner, or check upstream pipeline layers (sanitizer / renderer / relay encoding)."]})]},D))}),i.jsx("div",{className:"relative mb-6 rounded-xl border border-border bg-card p-5",children:i.jsxs("div",{className:"flex items-center gap-6",children:[i.jsx("div",{className:"relative shrink-0",children:i.jsx(Kc,{agentId:f.id,size:120,signals:X.signals,accuracy:X.accuracy,uniqueness:X.uniqueness,impact:X.impactScore})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("h1",{className:"truncate font-mono text-2xl font-bold text-foreground",children:f.id}),i.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[f.provider,"/",f.model]}),i.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[i.jsx("span",{className:`rounded-sm px-2 py-0.5 font-mono text-[10px] font-semibold ${f.native?"text-primary bg-primary/10":"text-confirmed bg-confirmed/10"}`,children:f.native?"NATIVE":"RELAY"}),f.preset&&i.jsx("span",{className:"rounded-sm bg-muted px-2 py-0.5 font-mono text-[10px] text-muted-foreground",children:f.preset}),(()=>{const D=fs(X);return D==="benched"?i.jsx("span",{className:"rounded-sm bg-destructive/10 px-2 py-0.5 font-mono text-[10px] font-bold text-destructive",children:"BENCHED"}):D==="struggling"?i.jsxs("span",{className:"rounded-sm bg-unverified/10 px-2 py-0.5 font-mono text-[10px] font-bold text-unverified",children:["STRUGGLING (",X.consecutiveFailures," FAILS)"]}):D==="kept-for-coverage"?i.jsx("span",{className:"rounded-sm border border-unverified/40 px-2 py-0.5 font-mono text-[10px] font-bold text-unverified",children:"KEPT FOR COVERAGE"}):X.consecutiveFailures>0?i.jsxs("span",{className:"rounded-sm bg-unverified/10 px-2 py-0.5 font-mono text-[10px] font-bold text-unverified",children:[X.consecutiveFailures," CONSECUTIVE FAILS"]}):null})(),i.jsxs("span",{className:"font-mono text-[10px] text-muted-foreground/60",children:[X.signals," signals",f.lastTask?` · ${Xe(f.lastTask.timestamp)}`:""]})]})]}),i.jsxs("div",{className:"flex shrink-0 flex-col items-end rounded-md border border-border bg-background/60 px-3 py-2","data-tooltip":`Dispatch weight ${X.dispatchWeight.toFixed(2)}
|
|
68
|
-
Scale 0.3 → 2.0`,"data-tooltip-pos":"left",children:[i.jsx("span",{className:"font-mono text-2xl font-bold tabular-nums leading-none text-foreground",children:X.dispatchWeight.toFixed(2)}),i.jsx("span",{className:"mt-1 font-mono text-[9px] uppercase text-muted-foreground/50",children:"weight"})]})]})}),i.jsx("section",{className:"mb-6",children:i.jsx(zg,{agentId:u})}),i.jsxs("section",{className:"mb-8 grid grid-cols-1 gap-6 lg:grid-cols-2",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"mb-3 font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:"Metrics"}),i.jsxs("div",{className:"rounded-lg border border-border/40 bg-card/80 p-4 shadow-[inset_0_1px_3px_rgba(0,0,0,0.35)]",children:[i.jsx("div",{className:"space-y-2.5",children:Z.map(D=>i.jsxs("div",{className:"grid grid-cols-[72px_1fr_44px] items-center gap-3",children:[i.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:D.label}),i.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-background/80",children:i.jsx("div",{className:`h-full rounded-full transition-all ${D.fill}`,style:{width:`${Math.max(0,Math.min(100,D.value*100))}%`}})}),i.jsxs("span",{className:"text-right font-mono text-[11px] font-bold tabular-nums text-foreground",children:[Math.round(D.value*100),"%"]})]},D.label))}),i.jsx("div",{className:"mt-4 grid grid-cols-6 gap-px overflow-hidden rounded-md border border-border/30 bg-border/30",children:Ee.map(D=>i.jsxs("div",{className:"bg-background/60 px-2 py-2 text-center",title:D.title,children:[i.jsx("div",{className:`font-mono text-sm font-bold tabular-nums ${D.color}`,children:D.value}),i.jsx("div",{className:"mt-0.5 font-mono text-[9px] uppercase tracking-wider text-muted-foreground/70",children:D.label})]},D.label))})]})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"mb-3 font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:"Category Competency"}),i.jsx(rg,{categoryAccuracy:X.categoryAccuracy,categoryCorrect:X.categoryCorrect,categoryHallucinated:X.categoryHallucinated})]})]}),(f.skillSlots.length>0||f.skills.length>0)&&i.jsxs("section",{className:"mb-8",children:[i.jsxs("h2",{className:"mb-3 font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:["Skills ",i.jsx("span",{className:"text-primary",children:f.skillSlots.length||f.skills.length})]}),f.skillSlots.length>0?i.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:f.skillSlots.map(D=>i.jsx(fg,{slot:D},D.name))}):i.jsx("div",{className:"flex flex-wrap gap-1.5",children:f.skills.map(D=>i.jsx("span",{className:"rounded-sm border border-border bg-card px-2.5 py-1 font-mono text-xs text-muted-foreground",children:D},D))})]}),i.jsxs("section",{className:"mb-8",children:[i.jsxs("h2",{className:"mb-3 font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:["Consensus Runs ",i.jsx("span",{className:"text-primary",children:ue.length})]}),ue.length>0?i.jsx("div",{className:"space-y-2",children:ue.slice(0,20).map((D,P)=>{const g=D.counts,C=(g.agreement||0)+(g.disagreement||0)+(g.hallucination||0)+(g.unverified||0)+(g.unique||0)+(g.new||0),G=C||1,k=[{key:"confirmed",count:g.agreement||0,color:"bg-confirmed",text:"text-confirmed"},{key:"disputed",count:(g.disagreement||0)+(g.hallucination||0),color:"bg-disputed",text:"text-disputed"},{key:"unverified",count:g.unverified||0,color:"bg-unverified",text:"text-unverified"},{key:"unique",count:(g.unique||0)+(g.new||0),color:"bg-unique",text:"text-unique"}],ne={agreement:{label:"CONFIRMED",cls:"text-confirmed bg-confirmed/10"},consensus_verified:{label:"CONFIRMED",cls:"text-confirmed bg-confirmed/10"},disagreement:{label:"DISPUTED",cls:"text-disputed bg-disputed/10"},hallucination_caught:{label:"DISPUTED",cls:"text-disputed bg-disputed/10"},unverified:{label:"UNVERIFIED",cls:"text-unverified bg-unverified/10"},unique_confirmed:{label:"UNIQUE",cls:"text-unique bg-unique/10"},unique_unconfirmed:{label:"UNIQUE",cls:"text-unique bg-unique/10"},new_finding:{label:"NEW",cls:"text-unique bg-unique/10"}},ce=D.signals.filter(fe=>fe.signal!=="signal_retracted"&&ne[fe.signal]),pe=D.taskId+":"+P,ke=w===pe;return i.jsxs("div",{className:"rounded-md border border-border/40 bg-card",children:[i.jsx("button",{type:"button",onClick:()=>Y(ke?null:pe),disabled:ce.length===0,className:`flex w-full items-center p-3 text-left transition ${ce.length>0?"hover:bg-accent/20":"cursor-default"}`,children:i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"font-mono text-sm font-semibold text-foreground",children:[ce.length>0&&i.jsx("span",{className:"mr-1.5 inline-block text-muted-foreground",children:ke?"▾":"▸"}),C," findings"]}),i.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:Xe(D.timestamp)})]}),i.jsx("div",{className:"mt-1.5 flex gap-2",children:k.map(fe=>fe.count>0&&i.jsxs("span",{className:`font-mono text-[10px] font-semibold ${fe.text}`,children:[fe.count," ",fe.key]},fe.key))}),i.jsx("div",{className:"mt-1.5 flex h-1.5 overflow-hidden rounded-sm",children:k.map(fe=>fe.count>0&&i.jsx("div",{className:fe.color,style:{width:`${fe.count/G*100}%`}},fe.key))})]})}),ke&&ce.length>0&&i.jsx("div",{className:"border-t border-border/30 px-3 pb-2 pt-2",children:i.jsx("div",{className:"space-y-1",children:ce.map((fe,Yt)=>{const Vt=ne[fe.signal],Bn=!!(fe.findingId&&D.taskId),Yn=i.jsxs("div",{className:"flex items-start gap-2 py-1",children:[i.jsx("span",{className:`shrink-0 rounded-sm px-1.5 py-0.5 font-mono text-[9px] font-bold ${Vt.cls}`,children:Vt.label}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("span",{className:"text-xs text-muted-foreground [&_.cite-file]:rounded [&_.cite-file]:bg-blue-500/10 [&_.cite-file]:px-1 [&_.cite-file]:font-mono [&_.cite-file]:text-blue-400 [&_.cite-fn]:rounded [&_.cite-fn]:bg-purple-500/10 [&_.cite-fn]:px-1 [&_.cite-fn]:font-mono [&_.cite-fn]:text-purple-400",dangerouslySetInnerHTML:{__html:ms(fe.evidence||"")}}),i.jsxs("span",{className:"ml-2 font-mono text-[10px] text-muted-foreground/50",children:[fe.agentId,fe.counterpartId?` + ${fe.counterpartId}`:""]})]})]});return Bn?i.jsx("button",{type:"button",onClick:()=>ae({consensusId:D.taskId,findingId:fe.findingId}),className:"block w-full rounded-sm text-left transition hover:bg-accent/40",children:Yn},Yt):i.jsx("div",{children:Yn},Yt)})})})]},pe)})}):i.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"No consensus participation recorded."})]}),i.jsx("section",{className:"mb-8",children:i.jsx(jg,{agentId:u})}),i.jsx(xs,{open:!!Q,onOpenChange:D=>{D||ae(null)},consensusId:(Q==null?void 0:Q.consensusId)??null,findingId:(Q==null?void 0:Q.findingId)??null}),i.jsxs("section",{className:"mb-8",children:[i.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[i.jsxs("h2",{className:"font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:["Tasks ",i.jsx("span",{className:"text-primary",children:z.length})]}),I>1&&i.jsxs("div",{className:"flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[i.jsx("button",{onClick:()=>V(D=>Math.max(0,D-1)),disabled:oe===0,className:"rounded-sm border border-border/40 bg-card px-2 py-0.5 transition hover:bg-accent/50 disabled:opacity-30",children:"◂ Prev"}),i.jsxs("span",{children:[oe+1," / ",I]}),i.jsx("button",{onClick:()=>V(D=>Math.min(I-1,D+1)),disabled:oe>=I-1,className:"rounded-sm border border-border/40 bg-card px-2 py-0.5 transition hover:bg-accent/50 disabled:opacity-30",children:"Next ▸"})]})]}),z.length>0?i.jsx("div",{className:"overflow-hidden rounded-md border border-border/40",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border bg-card",children:[i.jsx("th",{className:"py-2 pl-4 pr-2 text-xs font-medium text-muted-foreground",style:{width:32}}),i.jsx("th",{className:"py-2 pr-3 font-mono text-xs font-medium text-muted-foreground",children:"ID"}),i.jsx("th",{className:"py-2 pr-3 font-mono text-xs font-medium text-muted-foreground",children:"Agent"}),i.jsx("th",{className:"py-2 pr-3 text-xs font-medium text-muted-foreground",children:"Description"}),i.jsx("th",{className:"py-2 pr-3 font-mono text-xs font-medium text-muted-foreground",children:"Duration"}),i.jsx("th",{className:"py-2 pr-4 text-right font-mono text-xs font-medium text-muted-foreground",children:"When"})]})}),i.jsx("tbody",{children:L.map(D=>i.jsx(Nm,{task:D},D.taskId))})]})}):i.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"No tasks recorded."})]}),i.jsxs("section",{className:"mb-8",children:[i.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[i.jsxs("h2",{className:"font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:["Memory ",i.jsxs("span",{className:"text-primary",children:[x.length," files"]}),F&&i.jsxs("span",{className:"ml-2 font-mono text-[10px] text-muted-foreground",children:["· ",F.day," (",F.items.length,")"]})]}),S.length>1&&i.jsxs("div",{className:"flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[i.jsx("button",{onClick:()=>$(D=>Math.max(0,D-1)),disabled:B===0,className:"rounded-sm border border-border/40 bg-card px-2 py-0.5 transition hover:bg-accent/50 disabled:opacity-30",children:"◂ Newer"}),i.jsxs("span",{children:[B+1," / ",S.length]}),i.jsx("button",{onClick:()=>$(D=>Math.min(S.length-1,D+1)),disabled:B>=S.length-1,className:"rounded-sm border border-border/40 bg-card px-2 py-0.5 transition hover:bg-accent/50 disabled:opacity-30",children:"Older ▸"})]})]}),F&&F.items.length>0?i.jsx("div",{className:"space-y-1.5",children:F.items.map(D=>{var G,k;const P=h===D.filename,g=((G=D.frontmatter)==null?void 0:G.type)||"memory",C=((k=D.frontmatter)==null?void 0:k.name)||D.filename.replace(/\.md$/,"");return i.jsxs("div",{className:"rounded-md border border-border/40 bg-card/80",children:[i.jsxs("button",{onClick:()=>M(P?null:D.filename),className:"flex w-full items-center gap-2 p-3 text-left transition hover:bg-accent/50",children:[i.jsx("span",{className:`font-mono text-xs ${P?"text-primary":"text-muted-foreground"}`,children:P?"▾":"▸"}),i.jsx("span",{className:"shrink-0 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[9px] font-bold uppercase text-muted-foreground",children:g}),i.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",children:C}),i.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-muted-foreground",children:D.filename})]}),P&&i.jsx("div",{className:"border-t border-border px-4 py-3",children:i.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs leading-relaxed text-muted-foreground",children:D.content})})]},D.filename)})}):i.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"No memory files."})]})]})}const om={dispatch:"text-muted-foreground/80",consensus:"text-primary/70",error:"text-disputed",timeout:"text-unverified",worker:"text-muted-foreground/70",gemini:"text-muted-foreground/70",skill:"text-muted-foreground/80",boot:"text-muted-foreground/50",relay:"text-muted-foreground/80",gossip:"text-muted-foreground/80",utility:"text-muted-foreground/60",memory:"text-muted-foreground/80",persist:"text-muted-foreground/50",toolserver:"text-muted-foreground/50",other:"text-muted-foreground/70"},Hg=[[/^\[gossipcat\]\s*\[worker:/,"worker"],[/^\[gossipcat\]\s*\[Gemini\]/,"gemini"],[/^\[gossipcat\]\s*\[ToolServer\]/,"toolserver"],[/^\[gossipcat\]\s*dispatch\b/,"dispatch"],[/^\[gossipcat\]\s*relay\b/,"relay"],[/^\[gossipcat\]\s*Cross-review\b/,"consensus"],[/^\[gossipcat\]\s*Consensus\b/,"consensus"],[/^\[gossipcat\]\s*Skill\b/,"skill"],[/^\[gossipcat\]\s*Bootstrap\b/,"boot"],[/^\[gossipcat\]\s*Booted:/,"boot"],[/^\[gossipcat\]\s*Dashboard:/,"boot"],[/^\[gossipcat\]\s*Adaptive\b/,"boot"],[/^\[gossipcat\]\s*Gossip\b/,"gossip"],[/^\[gossipcat\]\s*utility\b/,"utility"],[/^\[gossipcat\]\s*Compacted\b/,"memory"],[/native agent/,"boot"],[/persist|Persist/,"persist"],[/timeout|Timeout|timed.out/,"timeout"],[/^\[gossipcat\].*(?:Error|error|failed|Failed)/,"error"]];function kg(u){for(const[c,m]of Hg)if(c.test(u))return m;return"other"}const Bg=[{key:"all",label:"All"},{key:"dispatch",label:"Dispatch"},{key:"consensus",label:"Consensus"},{key:"error",label:"Errors"},{key:"timeout",label:"Timeouts"},{key:"worker",label:"Workers"},{key:"skill",label:"Skills"},{key:"relay",label:"Relay"},{key:"boot",label:"Boot"}],dm=1e3;function Yg(){const[u,c]=R.useState([]),[m,o]=R.useState(0),[f,x]=R.useState(0),[_,y]=R.useState("all"),[b,h]=R.useState(!0),[M,w]=R.useState(!0),Y=R.useRef(null),Q=R.useRef(0);R.useEffect(()=>{let V=!1;return(async()=>{try{const $=await Je("logs?tail=500");if(V)return;c($.entries),o($.totalLines),x($.fileSize),Q.current=$.totalLines+1}catch{}})(),()=>{V=!0}},[]),R.useEffect(()=>{if(M)return hm(V=>{var $;if(V.type!=="log_lines")return;const me=($=V.data)==null?void 0:$.lines;me!=null&&me.length&&c(K=>{const X=me.map((ue,Z)=>({line:Q.current+Z,text:ue,category:kg(ue)}));Q.current+=me.length,o(ue=>ue+me.length);const z=[...K,...X];return z.length>dm?z.slice(-dm):z})})},[M]),R.useEffect(()=>{b&&Y.current&&Y.current.scrollIntoView({behavior:"smooth"})},[u,b]);const ae=_==="all"?u:u.filter(V=>V.category===_),J=R.useCallback(V=>V<1024?`${V} B`:V<1048576?`${(V/1024).toFixed(1)} KB`:`${(V/1048576).toFixed(1)} MB`,[]);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[i.jsxs("h2",{className:"font-mono text-xs font-bold uppercase tracking-widest text-foreground",children:["MCP Log ",i.jsxs("span",{className:"text-primary",children:[m," lines"]})]}),i.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/50",children:J(f)}),M&&i.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-confirmed",children:[i.jsx("span",{className:"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-confirmed"}),"live"]})]}),i.jsxs("div",{className:"mb-3 flex items-center gap-1.5",children:[Bg.map(V=>i.jsx("button",{onClick:()=>y(V.key),className:`rounded-sm px-2.5 py-1 font-mono text-[10px] font-semibold transition ${_===V.key?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:V.label},V.key)),i.jsxs("div",{className:"ml-auto flex gap-1.5",children:[i.jsx("button",{onClick:()=>w(!M),className:`rounded-sm px-2.5 py-1 font-mono text-[10px] font-semibold transition ${M?"bg-confirmed/10 text-confirmed":"text-muted-foreground"}`,children:M?"● Live":"○ Paused"}),i.jsx("button",{onClick:()=>h(!b),className:`rounded-sm px-2.5 py-1 font-mono text-[10px] font-semibold transition ${b?"bg-primary/10 text-primary":"text-muted-foreground"}`,children:b?"⤓ Auto":"⤓ Scroll"})]})]}),i.jsx("div",{className:"overflow-hidden rounded-md border border-border bg-card",children:i.jsxs("div",{className:"max-h-[70vh] overflow-y-auto p-3 font-mono text-xs leading-relaxed",children:[ae.map(V=>i.jsxs("div",{className:"flex gap-2 hover:bg-muted/30",children:[i.jsx("span",{className:"w-10 shrink-0 select-none text-right text-muted-foreground/30",children:V.line}),i.jsx("span",{className:om[V.category]||om.other,children:V.text})]},V.line)),ae.length===0&&i.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:u.length===0?"Loading...":"No matching log entries."}),i.jsx("div",{ref:Y})]})})]})}const Lg=["critical","high","medium","low"],Gg=["manual","impl","meta","auto-provisional"];function fm(u,c){return u.includes(c)?u.filter(m=>m!==c):[...u,c]}const Zt="mb-1 block font-mono text-[9px] font-semibold uppercase tracking-widest text-muted-foreground/70",kn="w-full rounded border border-border bg-background px-2 py-1 font-mono text-[10px] text-foreground focus:border-primary focus:outline-none";function Xg({filters:u,onChange:c,agents:m,signalTypes:o}){const f=x=>_=>{const y=_.target.value;c({[x]:y===""?void 0:y})};return i.jsxs("aside",{className:"space-y-3 rounded-md border border-border/60 bg-card/70 p-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h2",{className:"font-mono text-[11px] font-semibold uppercase tracking-widest text-primary",children:"Filters"}),i.jsx("button",{type:"button",className:"font-mono text-[9px] text-muted-foreground/70 hover:text-foreground",onClick:()=>c({agents:[],counterpart:void 0,signals:[],category:void 0,severity:void 0,since:void 0,until:void 0,consensusId:void 0,findingId:void 0,source:void 0}),children:"clear"})]}),i.jsxs("div",{children:[i.jsxs("label",{className:Zt,children:["Agents (",u.agents.length," selected)"]}),i.jsxs("div",{className:"max-h-32 overflow-y-auto rounded border border-border/60 bg-background p-1",children:[m.length===0&&i.jsx("div",{className:"px-1 py-0.5 font-mono text-[10px] text-muted-foreground/50",children:"no agents"}),m.map(x=>i.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 px-1 py-0.5 font-mono text-[10px] text-foreground hover:bg-muted/40",children:[i.jsx("input",{type:"checkbox",className:"h-3 w-3",checked:u.agents.includes(x),onChange:()=>c({agents:fm(u.agents,x)})}),i.jsx("span",{children:x})]},x))]})]}),i.jsxs("div",{children:[i.jsx("label",{className:Zt,children:"Counterpart"}),i.jsxs("select",{className:kn,value:u.counterpart??"",onChange:f("counterpart"),children:[i.jsx("option",{value:"",children:"any"}),m.map(x=>i.jsx("option",{value:x,children:x},x))]})]}),i.jsxs("div",{children:[i.jsxs("label",{className:Zt,children:["Signal types (",u.signals.length,")"]}),i.jsxs("div",{className:"max-h-32 overflow-y-auto rounded border border-border/60 bg-background p-1",children:[o.length===0&&i.jsx("div",{className:"px-1 py-0.5 font-mono text-[10px] text-muted-foreground/50",children:"no signals"}),o.map(x=>i.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 px-1 py-0.5 font-mono text-[10px] text-foreground hover:bg-muted/40",children:[i.jsx("input",{type:"checkbox",className:"h-3 w-3",checked:u.signals.includes(x),onChange:()=>c({signals:fm(u.signals,x)})}),i.jsx("span",{children:x})]},x))]})]}),i.jsxs("div",{children:[i.jsx("label",{className:Zt,children:"Severity"}),i.jsxs("select",{className:kn,value:u.severity??"",onChange:f("severity"),children:[i.jsx("option",{value:"",children:"any"}),Lg.map(x=>i.jsx("option",{value:x,children:x},x))]})]}),i.jsxs("div",{children:[i.jsx("label",{className:Zt,children:"Source"}),i.jsxs("select",{className:kn,value:u.source??"",onChange:f("source"),children:[i.jsx("option",{value:"",children:"any"}),Gg.map(x=>i.jsx("option",{value:x,children:x},x))]})]}),i.jsxs("div",{children:[i.jsx("label",{className:Zt,children:"Category"}),i.jsx("input",{type:"text",className:kn,value:u.category??"",onChange:f("category"),placeholder:"e.g. trust_boundaries"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[i.jsxs("div",{children:[i.jsx("label",{className:Zt,children:"Since"}),i.jsx("input",{type:"datetime-local",className:kn,value:u.since?u.since.slice(0,16):"",onChange:x=>c({since:x.target.value?new Date(x.target.value).toISOString():void 0})})]}),i.jsxs("div",{children:[i.jsx("label",{className:Zt,children:"Until"}),i.jsx("input",{type:"datetime-local",className:kn,value:u.until?u.until.slice(0,16):"",onChange:x=>c({until:x.target.value?new Date(x.target.value).toISOString():void 0})})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:Zt,children:"Consensus ID (prefix)"}),i.jsx("input",{type:"text",className:kn,value:u.consensusId??"",onChange:f("consensusId"),placeholder:"e.g. d07eac46"})]}),i.jsxs("div",{children:[i.jsx("label",{className:Zt,children:"Finding ID (prefix)"}),i.jsx("input",{type:"text",className:kn,value:u.findingId??"",onChange:f("findingId"),placeholder:"e.g. d07eac46-5f464e89:sonnet"})]})]})}const Qg={agents:[],signals:[]},Zg=["agreement","consensus_verified","unique_confirmed","unique_unconfirmed","disagreement","hallucination_caught","new_finding","unverified","impl_test_pass","impl_test_fail","impl_typecheck_pass","impl_typecheck_fail","task_completed","tool_turns","format_compliance"],Vg={critical:"text-red-400 bg-red-500/10",high:"text-orange-400 bg-orange-500/10",medium:"text-yellow-400 bg-yellow-500/10",low:"text-muted-foreground bg-muted/50"},Za=100;function Kg(u,c,m=Za){const o=new URLSearchParams;o.set("limit",String(m)),o.set("offset",String(c)),u.agents.length===1&&o.set("agent",u.agents[0]),u.counterpart&&o.set("counterpart",u.counterpart);for(const f of u.signals)o.append("signal",f);return u.category&&o.set("category",u.category),u.severity&&o.set("severity",u.severity),u.since&&o.set("since",u.since),u.until&&o.set("until",u.until),u.consensusId&&o.set("consensus_id",u.consensusId),u.findingId&&o.set("finding_id",u.findingId),u.source&&o.set("source",u.source),o}function Bc(u,c){return u?u.length>c?u.slice(0,c)+"…":u:""}function $g(){const[u,c]=R.useState(Qg),[m,o]=R.useState([]),[f,x]=R.useState(0),[_,y]=R.useState(0),[b,h]=R.useState(!1),[M,w]=R.useState(null),[Y,Q]=R.useState([]),[ae,J]=R.useState(!1),[V,me]=R.useState(null),[$,K]=R.useState(null),X=R.useRef(null),z=R.useRef(0),ue=R.useCallback(async(H,I)=>{const oe=++z.current;h(!0),w(null);try{const L=Kg(H,I*Za),S=await Je(`signals?${L.toString()}`);if(oe!==z.current)return;o(S.items??[]),y(S.total??0)}catch(L){if(oe!==z.current)return;w(L instanceof Error?L.message:"fetch failed")}finally{oe===z.current&&h(!1)}},[]);R.useEffect(()=>{Je("agents").then(H=>{const I=(H??[]).map(oe=>oe.id).filter(Boolean).sort();I.length>0&&Q(I)}).catch(()=>{})},[]),R.useEffect(()=>{x(0)},[u]),R.useEffect(()=>(X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{ue(u,f)},250),()=>{X.current&&clearTimeout(X.current)}),[u,f,ue]);const Z=R.useCallback(H=>{c(I=>({...I,...H}))},[]),W=Math.max(1,Math.ceil(_/Za)),ie=Math.min(f,W-1),de=(H,I)=>{!H||!I||(me(H),K(I),J(!0))},Ee=R.useMemo(()=>{const H=[];return u.agents.length&&H.push(`${u.agents.length} agents`),u.signals.length&&H.push(`${u.signals.length} signals`),u.severity&&H.push(u.severity),u.source&&H.push(u.source),(u.since||u.until)&&H.push("time window"),H.length?H.join(" · "):"all signals"},[u]);return i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"flex items-baseline justify-between",children:i.jsxs("div",{children:[i.jsx("h1",{className:"font-mono text-sm font-bold uppercase tracking-widest text-primary",children:"Signals"}),i.jsxs("p",{className:"mt-0.5 font-mono text-[10px] text-muted-foreground/70",children:[Ee," — showing ",m.length," of ",_]})]})}),i.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-[260px_1fr] lg:items-start",children:[i.jsx(Xg,{filters:u,onChange:Z,agents:Y,signalTypes:Zg}),i.jsxs("section",{className:"min-w-0 overflow-hidden rounded-md border border-border/60 bg-card/70",children:[M&&i.jsx("div",{className:"border-b border-border/60 bg-disputed/10 px-3 py-2 font-mono text-[10px] text-disputed",children:M}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full border-collapse font-mono text-[10px]",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border/60 text-left text-muted-foreground/70",children:[i.jsx("th",{className:"px-2 py-1.5 font-semibold uppercase tracking-widest",children:"Time"}),i.jsx("th",{className:"px-2 py-1.5 font-semibold uppercase tracking-widest",children:"Agent"}),i.jsx("th",{className:"px-2 py-1.5 font-semibold uppercase tracking-widest",children:"Signal"}),i.jsx("th",{className:"px-2 py-1.5 font-semibold uppercase tracking-widest",children:"Counterpart"}),i.jsx("th",{className:"px-2 py-1.5 font-semibold uppercase tracking-widest",children:"Sev"}),i.jsx("th",{className:"px-2 py-1.5 font-semibold uppercase tracking-widest",children:"Finding"}),i.jsx("th",{className:"px-2 py-1.5 font-semibold uppercase tracking-widest",children:"Consensus"}),i.jsx("th",{className:"px-2 py-1.5 font-semibold uppercase tracking-widest",children:"Evidence"})]})}),i.jsxs("tbody",{children:[m.length===0&&!b&&i.jsx("tr",{children:i.jsx("td",{colSpan:8,className:"px-2 py-8 text-center text-muted-foreground/50",children:"no signals match these filters"})}),m.map((H,I)=>{const oe=!!(H.consensusId&&H.findingId);return i.jsxs("tr",{className:`border-b border-border/30 ${oe?"cursor-pointer hover:bg-muted/30":""}`,onClick:()=>oe&&de(H.consensusId,H.findingId),children:[i.jsx("td",{className:"whitespace-nowrap px-2 py-1 text-muted-foreground/80",title:H.timestamp,children:Xe(H.timestamp)}),i.jsx("td",{className:"whitespace-nowrap px-2 py-1 text-foreground",children:H.agentId}),i.jsx("td",{className:"whitespace-nowrap px-2 py-1 text-foreground",children:H.signal}),i.jsx("td",{className:"whitespace-nowrap px-2 py-1 text-muted-foreground/80",children:H.counterpartId??"—"}),i.jsx("td",{className:"whitespace-nowrap px-2 py-1",children:H.severity?i.jsx("span",{className:`rounded px-1 py-0.5 text-[9px] uppercase ${Vg[H.severity]??"bg-muted"}`,children:H.severity}):i.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),i.jsx("td",{className:"whitespace-nowrap px-2 py-1 text-muted-foreground/70",title:H.findingId,children:H.findingId?Bc(H.findingId,24):"—"}),i.jsx("td",{className:"whitespace-nowrap px-2 py-1 text-muted-foreground/70",title:H.consensusId,children:H.consensusId?Bc(H.consensusId,16):"—"}),i.jsx("td",{className:"max-w-[300px] truncate px-2 py-1 text-muted-foreground/80",title:H.evidence,children:Bc(H.evidence,80)})]},`${H.timestamp}-${H.agentId}-${I}`)})]})]})}),i.jsxs("div",{className:"flex items-center justify-between border-t border-border/60 px-3 py-2",children:[i.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/60",children:b?"loading…":`${ie*Za+1}–${ie*Za+m.length} of ${_}`}),i.jsxs("div",{className:"flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[i.jsx("button",{type:"button",onClick:()=>x(H=>Math.max(0,H-1)),disabled:ie===0||b,className:"rounded-sm border border-border/40 bg-card px-2 py-0.5 transition hover:bg-accent/50 disabled:opacity-30",children:"◂ Prev"}),i.jsxs("span",{className:"tabular-nums",children:[ie+1," / ",W]}),i.jsx("button",{type:"button",onClick:()=>x(H=>Math.min(W-1,H+1)),disabled:ie>=W-1||b,className:"rounded-sm border border-border/40 bg-card px-2 py-0.5 transition hover:bg-accent/50 disabled:opacity-30",children:"Next ▸"})]})]})]})]}),i.jsx(xs,{open:ae,onOpenChange:J,consensusId:V,findingId:$})]})}function Jg(){const[u,c]=R.useState(null),[m,o]=R.useState(!1);R.useEffect(()=>{d0().then(c)},[]);const f=R.useCallback(async x=>{o(!1),await o0(x)?c(!0):o(!0)},[]);return{authed:u,login:f,error:m}}function Fg(u){R.useEffect(()=>(xm(),hm(u)),[u])}const Wg=5e3;function Ig(){const[u,c]=R.useState({overview:null,agents:null,tasks:null,consensus:null,consensusReports:null,nativeMemories:null,gossipMemories:null,memories:null,loading:!0,error:null}),m=R.useRef(!1),o=R.useCallback(async()=>{if(!m.current){m.current=!0;try{const[f,x,_,y,b,h,M]=await Promise.all([Je("overview"),Je("agents"),Je("tasks?limit=2000"),Je("consensus?pageSize=500"),Je("consensus-reports?page=1&pageSize=5").catch(()=>({reports:[]})),Je("native-memory").catch(()=>({knowledge:[]})),Je("gossip-memory").catch(()=>({knowledge:[]}))]),w=[...h.knowledge||[]].map(Q=>({...Q,origin:"native"})).sort((Q,ae)=>ae.filename>Q.filename?1:-1),Y=[...M.knowledge||[]].map(Q=>({...Q,origin:"gossip"})).sort((Q,ae)=>ae.filename>Q.filename?1:-1);c({overview:f,agents:x,tasks:_,consensus:y,consensusReports:b,nativeMemories:w,gossipMemories:Y,memories:w,loading:!1,error:null})}catch(f){c(x=>({...x,loading:!1,error:f.message}))}finally{m.current=!1}}},[]);return R.useEffect(()=>{o()},[o]),R.useEffect(()=>{const f=setInterval(()=>{o()},Wg);return()=>clearInterval(f)},[o]),{...u,refresh:o}}function Pg({agents:u,tasks:c}){const[m,o]=R.useState("weight"),[f,x]=R.useState("desc"),[_,y]=R.useState(""),b=R.useMemo(()=>{const K=new Map;if(c)for(const X of c.items){const z=K.get(X.agentId);(!z||X.timestamp>z.timestamp)&&K.set(X.agentId,X)}return K},[c]),h=u.filter(pm).length,M=u.filter(K=>K.scores.accuracy>=.5).length,w=u.reduce((K,X)=>K+X.scores.signals,0),Y=u.reduce((K,X)=>K+X.totalTokens,0),Q=_.trim().toLowerCase(),ae=Q?u.filter(K=>K.id.toLowerCase().includes(Q)||K.provider.toLowerCase().includes(Q)||K.model.toLowerCase().includes(Q)):u,J=K=>{const X=K.scores;switch(m){case"weight":return X.dispatchWeight;case"accuracy":return X.accuracy;case"uniqueness":return X.uniqueness;case"impact":return X.impactScore;case"signals":return X.signals;case"agreements":return X.agreements;case"hallucinations":return X.hallucinations;case"lastTask":{const z=b.get(K.id);return z?new Date(z.timestamp).getTime():0}}},V=[...ae].sort((K,X)=>{const z=J(K),ue=J(X);return f==="desc"?ue-z:z-ue}),me=K=>{m===K?x(X=>X==="desc"?"asc":"desc"):(o(K),x("desc"))},$=K=>m===K?f==="desc"?"▾":"▴":"";return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mb-6",children:[i.jsxs("h1",{className:"font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:["Team ",i.jsx("span",{className:"ml-2 text-primary",children:u.length})]}),i.jsx("div",{className:"mt-2 grid grid-cols-2 gap-px overflow-hidden rounded-md border border-border/40 bg-border/30 sm:grid-cols-4",children:[{label:"Healthy",value:M,color:"text-confirmed"},{label:"Benched",value:h,color:h>0?"text-destructive":"text-muted-foreground"},{label:"Total Signals",value:w.toLocaleString(),color:"text-foreground"},{label:"Tokens Used",value:Y.toLocaleString(),color:"text-foreground"}].map(K=>i.jsxs("div",{className:"bg-card/80 px-4 py-3",children:[i.jsx("div",{className:`font-mono text-lg font-bold tabular-nums ${K.color}`,children:K.value}),i.jsx("div",{className:"mt-0.5 font-mono text-[10px] uppercase tracking-wider text-muted-foreground/70",children:K.label})]},K.label))})]}),i.jsx("div",{className:"mb-3",children:i.jsx("input",{type:"text",value:_,onChange:K=>y(K.target.value),placeholder:"Search agents by id, provider, or model...",className:"w-full max-w-md rounded-md border border-border/40 bg-card/80 px-3 py-1.5 font-mono text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-primary/40 focus:outline-none"})}),i.jsx("div",{className:"overflow-hidden rounded-md border border-border/40 bg-card/80",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsxs("colgroup",{children:[i.jsx("col",{style:{width:44}}),i.jsx("col",{}),i.jsx("col",{style:{width:80}}),i.jsx("col",{style:{width:260}}),i.jsx("col",{style:{width:80}}),i.jsx("col",{style:{width:60}}),i.jsx("col",{})]}),i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border/40 bg-muted/20 font-mono text-[10px] uppercase tracking-wider text-muted-foreground/80",children:[i.jsx("th",{className:"py-2.5 pl-5 pr-2 text-center",children:"#"}),i.jsx("th",{className:"py-2.5 pr-3 text-left",children:"Agent"}),i.jsxs("th",{className:"py-2.5 pr-4 text-right cursor-pointer select-none hover:text-foreground",onClick:()=>me("weight"),children:["Weight ",$("weight")]}),i.jsx("th",{className:"py-2.5 pr-4 text-left align-top",children:i.jsxs("div",{className:"flex items-center gap-2 text-[10px]",children:[i.jsxs("button",{onClick:()=>me("accuracy"),className:"flex items-center gap-1 hover:text-foreground",children:[i.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-confirmed"}),"Acc",$("accuracy")]}),i.jsx("span",{className:"text-muted-foreground/30",children:"·"}),i.jsxs("button",{onClick:()=>me("uniqueness"),className:"flex items-center gap-1 hover:text-foreground",children:[i.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-unique"}),"Unq",$("uniqueness")]}),i.jsx("span",{className:"text-muted-foreground/30",children:"·"}),i.jsxs("button",{onClick:()=>me("impact"),className:"flex items-center gap-1 hover:text-foreground",children:[i.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-[var(--color-impact)]"}),"Imp",$("impact")]})]})}),i.jsxs("th",{className:"py-2.5 pr-4 text-right cursor-pointer select-none hover:text-foreground",onClick:()=>me("signals"),children:["Signals ",$("signals")]}),i.jsxs("th",{className:"py-2.5 pr-4 text-right cursor-pointer select-none hover:text-foreground",onClick:()=>me("hallucinations"),"data-tooltip":"Hallucinations — fabricated findings caught by cross-review",children:["Halluc ",$("hallucinations")]}),i.jsxs("th",{className:"py-2.5 pr-5 text-left cursor-pointer select-none hover:text-foreground",onClick:()=>me("lastTask"),children:["Last Task ",$("lastTask")]})]})}),i.jsx("tbody",{children:V.map((K,X)=>{const z=K.scores,ue=b.get(K.id),Z=z.dispatchWeight>=1.2?"text-confirmed":z.dispatchWeight>=.8?"text-foreground":"text-disputed",W=f==="desc"&&(m==="weight"||m==="accuracy"||m==="impact")?X+1:null;return i.jsxs("tr",{className:"group border-t border-border/20 align-top transition-colors hover:bg-accent/20",children:[i.jsx("td",{className:"py-3 pl-5 pr-2 text-center align-top",children:i.jsx("span",{className:`font-mono text-[11px] tabular-nums ${W===1?"font-bold text-primary":W===2||W===3?"font-semibold text-foreground/80":"text-muted-foreground/40"}`,children:W??"·"})}),i.jsx("td",{className:"py-2.5 pr-3 align-top",children:i.jsxs("a",{href:`/dashboard/agent/${encodeURIComponent(K.id)}`,className:"flex items-center gap-3",children:[i.jsx(Kc,{agentId:K.id,size:32,signals:z.signals,accuracy:z.accuracy,uniqueness:z.uniqueness,impact:z.impactScore}),i.jsxs("div",{className:"min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground group-hover:text-primary",children:K.id}),(()=>{const ie=fs(z);return ie==="benched"?i.jsx("span",{className:"shrink-0 rounded bg-destructive/15 px-1 font-mono text-[8px] font-bold uppercase tracking-wider text-destructive","data-tooltip":`Benched (${z.bench.reason??"auto"}). Excluded from dispatch until recovery.`,children:"benched"}):ie==="struggling"?i.jsx("span",{className:"shrink-0 rounded bg-unverified/15 px-1 font-mono text-[8px] font-bold uppercase tracking-wider text-unverified","data-tooltip":"Struggling: consecutive failures tripped the circuit breaker. Deprioritized until new clean signals recover the score.",children:"struggling"}):ie==="kept-for-coverage"?i.jsx("span",{className:"shrink-0 rounded border border-unverified/40 px-1 font-mono text-[8px] font-bold uppercase tracking-wider text-unverified","data-tooltip":`Would bench (${z.bench.reason??"rule"}), but kept as sole provider of a category.`,children:"kept for coverage"}):null})()]}),i.jsxs("div",{className:"truncate font-mono text-[10px] text-muted-foreground/50",children:[K.provider,"/",K.model]})]})]})}),i.jsx("td",{className:"py-3 pr-4 text-right align-top",children:i.jsx("span",{className:`font-mono text-sm font-bold tabular-nums ${Z}`,children:z.dispatchWeight.toFixed(2)})}),i.jsx("td",{className:"py-3 pr-4 align-top",children:i.jsxs("div",{className:"space-y-1",children:[i.jsx(Yc,{label:"A",value:z.accuracy,fillClass:z.accuracy>=.7?"bg-confirmed":z.accuracy>=.4?"bg-unverified":"bg-disputed"}),i.jsx(Yc,{label:"U",value:z.uniqueness,fillClass:"bg-unique"}),i.jsx(Yc,{label:"I",value:z.impactScore,fillClass:"bg-[var(--color-impact)]"})]})}),i.jsx("td",{className:"py-3 pr-4 text-right align-top font-mono text-xs tabular-nums text-foreground",children:z.signals.toLocaleString()}),i.jsx("td",{className:"py-3 pr-4 text-right align-top font-mono text-xs tabular-nums",children:i.jsx("span",{className:z.hallucinations>0?"font-bold text-destructive":"text-muted-foreground/40","data-tooltip":`Agreements ${z.agreements} · Disagreements ${z.disagreements} · Hallucinations ${z.hallucinations}`,children:z.hallucinations})}),i.jsx("td",{className:"py-3 pr-5 align-top",children:ue?i.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[i.jsx("span",{className:"shrink-0 rounded border border-amber-500/30 bg-amber-500/10 px-1.5 py-0.5 font-mono text-[9px] font-semibold text-amber-400",children:ue.taskId.slice(0,8)}),i.jsx("span",{className:"truncate font-inter text-[11px] text-muted-foreground/80",style:{maxWidth:260},children:ue.task}),i.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-muted-foreground/50",children:Xe(ue.timestamp)})]}):i.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/30",children:"no tasks"})})]},K.id)})})]})})]})}function Yc({label:u,value:c,fillClass:m}){return i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"w-2 font-mono text-[8px] uppercase text-muted-foreground/50",children:u}),i.jsx("div",{className:"h-1 flex-1 overflow-hidden rounded-full bg-background/60",children:i.jsx("div",{className:`h-full rounded-full ${m}`,style:{width:`${Math.max(0,Math.min(100,c*100))}%`}})}),i.jsxs("span",{className:"w-8 text-right font-mono text-[10px] tabular-nums text-foreground/80",children:[Math.round(c*100),"%"]})]})}function ep({tasks:u}){const[c,m]=R.useState(""),[o,f]=R.useState(0),[x,_]=R.useState(null),y=100,b=u.items.filter(V=>V.status==="completed").length,h=u.items.filter(V=>V.status==="failed").length,M=u.items.filter(V=>V.status==="running").length,w=c.trim().toLowerCase(),Y=w?u.items.filter(V=>{var me,$,K,X;return((me=V.task)==null?void 0:me.toLowerCase().includes(w))||(($=V.agentId)==null?void 0:$.toLowerCase().includes(w))||((K=V.taskId)==null?void 0:K.toLowerCase().includes(w))||((X=V.status)==null?void 0:X.toLowerCase().includes(w))}):u.items,Q=Math.max(1,Math.ceil(Y.length/y)),ae=Math.min(o,Q-1),J=Y.slice(ae*y,(ae+1)*y);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mb-6",children:[i.jsxs("h1",{className:"font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:["Tasks ",i.jsx("span",{className:"ml-2 text-primary",children:u.total})]}),i.jsxs("div",{className:"mt-2 flex gap-4 font-mono text-[11px] text-muted-foreground",children:[i.jsxs("span",{children:[i.jsx("span",{className:"text-confirmed",children:b})," completed"]}),h>0&&i.jsxs("span",{children:[i.jsx("span",{className:"text-destructive",children:h})," failed"]}),M>0&&i.jsxs("span",{children:[i.jsx("span",{className:"text-unverified",children:M})," running"]}),i.jsxs("span",{children:["showing ",J.length," of ",Y.length,w&&` (filtered from ${u.items.length})`]})]})]}),i.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[i.jsx("input",{type:"text",value:c,onChange:V=>{m(V.target.value),f(0)},placeholder:"Search tasks by description, agent, id, status...",className:"w-full max-w-md rounded-md border border-border/40 bg-card/80 px-3 py-1.5 font-mono text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-primary/40 focus:outline-none"}),Q>1&&i.jsxs("div",{className:"flex shrink-0 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[i.jsx("button",{onClick:()=>f(V=>Math.max(0,V-1)),disabled:ae===0,className:"rounded-sm border border-border/40 bg-card px-2 py-0.5 transition hover:bg-accent/50 disabled:opacity-30",children:"◂ Prev"}),i.jsxs("span",{children:[ae+1," / ",Q]}),i.jsx("button",{onClick:()=>f(V=>Math.min(Q-1,V+1)),disabled:ae>=Q-1,className:"rounded-sm border border-border/40 bg-card px-2 py-0.5 transition hover:bg-accent/50 disabled:opacity-30",children:"Next ▸"})]})]}),i.jsx("div",{className:"overflow-hidden rounded-md border border-border/40 bg-card/80",children:J.length===0?i.jsx("div",{className:"py-12 text-center text-sm text-muted-foreground",children:w?"No tasks match your search.":"No tasks yet."}):i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border/40 bg-muted/30",children:[i.jsx("th",{className:"py-2.5 pl-4 pr-2 text-xs font-medium text-muted-foreground",style:{width:32}}),i.jsx("th",{className:"py-2.5 pr-3 font-mono text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"ID"}),i.jsx("th",{className:"py-2.5 pr-3 font-mono text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Agent"}),i.jsx("th",{className:"py-2.5 pr-3 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Description"}),i.jsx("th",{className:"py-2.5 pr-3 font-mono text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Duration"}),i.jsx("th",{className:"py-2.5 pr-4 text-right font-mono text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"When"})]})}),i.jsx("tbody",{children:J.map(V=>i.jsx(Nm,{task:V,onClick:_},V.taskId))})]})}),i.jsx(z0,{task:x,onClose:()=>_(null)})]})}function tp({consensus:u,consensusReports:c}){const[m,o]=R.useState(!1),f=m?u.runs:u.runs.filter(h=>!h.retracted),x=u.runs.filter(h=>h.retracted).length,_=f.reduce((h,M)=>h+(M.counts.agreement||0),0),y=f.reduce((h,M)=>h+((M.counts.disagreement||0)+(M.counts.hallucination||0)),0),b=f.reduce((h,M)=>h+(M.counts.unverified||0),0);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mb-6",children:[i.jsxs("h1",{className:"font-mono text-[11px] font-bold uppercase tracking-widest text-foreground",children:["Debates ",i.jsx("span",{className:"ml-2 text-foreground",children:f.length}),!m&&x>0&&i.jsxs("span",{className:"ml-2 font-normal normal-case tracking-normal text-muted-foreground/60",children:["/ ",u.totalRuns??u.runs.length," total"]})]}),i.jsxs("div",{className:"mt-2 flex gap-4 font-mono text-[11px] text-muted-foreground",children:[i.jsxs("span",{children:[i.jsx("span",{className:"text-confirmed",children:_})," confirmed"]}),i.jsxs("span",{children:[i.jsx("span",{className:"text-disputed",children:y})," disputed"]}),b>0&&i.jsxs("span",{children:[i.jsx("span",{className:"text-unverified",children:b})," unverified"]}),i.jsxs("span",{children:[u.totalSignals," total signals"]})]}),x>0&&i.jsxs("div",{className:"mt-2 flex items-center gap-2 font-mono text-[11px] text-muted-foreground/70",children:[i.jsx("span",{children:m?`${x} retracted run${x===1?"":"s"} shown`:`${x} retracted run${x===1?"":"s"} hidden`}),i.jsx("button",{type:"button",onClick:()=>o(h=>!h),className:"rounded-sm border border-border/40 bg-card px-2 py-0.5 text-[10px] transition hover:bg-accent/50 hover:text-foreground",children:m?"hide":"show"})]})]}),i.jsx(bm,{consensus:u,filteredRuns:f,reports:c,showAll:!0,hideHeader:!0})]})}function np(){const u=mm(),{overview:c,agents:m,tasks:o,consensus:f,consensusReports:x,nativeMemories:_,gossipMemories:y,loading:b,refresh:h}=Ig(),[M,w]=R.useState(0),Y=R.useCallback(J=>{J.type!=="log_lines"&&h()},[h]);if(Fg(Y),b||!c||!f)return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx(im,{}),i.jsx("div",{className:"flex items-center justify-center py-20 text-muted-foreground",children:"Loading dashboard..."})]});let Q;const ae=u.match(/^\/agent\/(.+)$/);if(ae&&m){const J=decodeURIComponent(ae[1]);Q=i.jsx(qg,{agentId:J,agents:m,tasks:o,consensus:f})}else u==="/team"&&m?Q=i.jsx(Pg,{agents:m,tasks:o}):u==="/tasks"&&o?Q=i.jsx(ep,{tasks:o}):u==="/debates"&&f?Q=i.jsx(tp,{consensus:f,consensusReports:x}):u==="/logs"?Q=i.jsx(Yg,{}):u==="/signals"?Q=i.jsx($g,{}):Q=i.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-[280px_1fr] lg:items-start",children:[i.jsxs("aside",{className:"space-y-4 lg:sticky lg:top-4",children:[i.jsx(s0,{overview:c,activeTasks:M}),m&&i.jsx(r0,{agents:m})]}),i.jsxs("main",{className:"min-w-0 space-y-6",children:[i.jsx(x0,{onCountChange:w}),o&&i.jsx(U0,{tasks:o,limit:5}),m&&i.jsx(M0,{agents:m}),i.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[i.jsx(lg,{}),i.jsx(ag,{overview:c})]}),i.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[i.jsx(ug,{}),i.jsx(cg,{overview:c})]}),i.jsx(bm,{consensus:f,reports:x}),(y||_)&&i.jsx(P0,{memories:[...y??[],..._??[]],heading:"Memory",statusFilter:!0})]})]});return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx(im,{}),i.jsx("main",{className:"mx-auto max-w-7xl space-y-6 px-6 py-6",children:Q})]})}function lp(){const{authed:u,login:c,error:m}=Jg();return u===null?i.jsx("div",{className:"flex min-h-screen items-center justify-center text-muted-foreground",children:"Loading..."}):u?i.jsx(np,{}):i.jsx(t0,{onLogin:c,error:m})}Ph.createRoot(document.getElementById("root")).render(i.jsx(R.StrictMode,{children:i.jsx(lp,{})}));
|