@axlsdk/studio 0.14.0 → 0.15.0
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/README.md +68 -10
- package/dist/chunk-IPDMFFTQ.js +2142 -0
- package/dist/chunk-IPDMFFTQ.js.map +1 -0
- package/dist/cli.cjs +1094 -117
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/assets/index-CLKKOaE2.css +1 -0
- package/dist/client/assets/index-rvds50cZ.js +278 -0
- package/dist/client/index.html +2 -2
- package/dist/{connection-manager-B7AWpsCD.d.cts → connection-manager-BMPahDuY.d.cts} +63 -1
- package/dist/{connection-manager-B7AWpsCD.d.ts → connection-manager-BMPahDuY.d.ts} +63 -1
- package/dist/middleware.cjs +1123 -123
- package/dist/middleware.cjs.map +1 -1
- package/dist/middleware.d.cts +52 -5
- package/dist/middleware.d.ts +52 -5
- package/dist/middleware.js +30 -7
- package/dist/middleware.js.map +1 -1
- package/dist/server/index.cjs +1097 -116
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +165 -28
- package/dist/server/index.d.ts +165 -28
- package/dist/server/index.js +7 -3
- package/package.json +10 -6
- package/dist/chunk-HUKUQDYL.js +0 -1163
- package/dist/chunk-HUKUQDYL.js.map +0 -1
- package/dist/client/assets/index-7aDhMztu.css +0 -1
- package/dist/client/assets/index-Bzr3vDPz.js +0 -255
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
var Zv=Object.defineProperty;var Jp=s=>{throw TypeError(s)};var $v=(s,r,u)=>r in s?Zv(s,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):s[r]=u;var Pr=(s,r,u)=>$v(s,typeof r!="symbol"?r+"":r,u),od=(s,r,u)=>r.has(s)||Jp("Cannot "+u);var S=(s,r,u)=>(od(s,r,"read from private field"),u?u.call(s):r.get(s)),ye=(s,r,u)=>r.has(s)?Jp("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,u),fe=(s,r,u,c)=>(od(s,r,"write to private field"),c?c.call(s,u):r.set(s,u),u),Ae=(s,r,u)=>(od(s,r,"access private method"),u);var Du=(s,r,u,c)=>({set _(d){fe(s,r,d,u)},get _(){return S(s,r,c)}});(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&c(m)}).observe(document,{childList:!0,subtree:!0});function u(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function c(d){if(d.ep)return;d.ep=!0;const h=u(d);fetch(d.href,h)}})();var cd={exports:{}},ei={};/**
|
|
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 Fp;function Jv(){if(Fp)return ei;Fp=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function u(c,d,h){var m=null;if(h!==void 0&&(m=""+h),d.key!==void 0&&(m=""+d.key),"key"in d){h={};for(var p in d)p!=="key"&&(h[p]=d[p])}else h=d;return d=h.ref,{$$typeof:s,type:c,key:m,ref:d!==void 0?d:null,props:h}}return ei.Fragment=r,ei.jsx=u,ei.jsxs=u,ei}var Wp;function Fv(){return Wp||(Wp=1,cd.exports=Jv()),cd.exports}var a=Fv(),dd={exports:{}},Ce={};/**
|
|
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 Ip;function Wv(){if(Ip)return Ce;Ip=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),m=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),C=Symbol.iterator;function w(E){return E===null||typeof E!="object"?null:(E=C&&E[C]||E["@@iterator"],typeof E=="function"?E:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,_={};function L(E,H,ee){this.props=E,this.context=H,this.refs=_,this.updater=ee||k}L.prototype.isReactComponent={},L.prototype.setState=function(E,H){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,H,"setState")},L.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function J(){}J.prototype=L.prototype;function O(E,H,ee){this.props=E,this.context=H,this.refs=_,this.updater=ee||k}var A=O.prototype=new J;A.constructor=O,U(A,L.prototype),A.isPureReactComponent=!0;var V=Array.isArray;function q(){}var T={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function Z(E,H,ee){var re=ee.ref;return{$$typeof:s,type:E,key:H,ref:re!==void 0?re:null,props:ee}}function F(E,H){return Z(E.type,H,E.props)}function Q(E){return typeof E=="object"&&E!==null&&E.$$typeof===s}function z(E){var H={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(ee){return H[ee]})}var ne=/\/+/g;function oe(E,H){return typeof E=="object"&&E!==null&&E.key!=null?z(""+E.key):H.toString(36)}function de(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(q,q):(E.status="pending",E.then(function(H){E.status==="pending"&&(E.status="fulfilled",E.value=H)},function(H){E.status==="pending"&&(E.status="rejected",E.reason=H)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function D(E,H,ee,re,ce){var ve=typeof E;(ve==="undefined"||ve==="boolean")&&(E=null);var ie=!1;if(E===null)ie=!0;else switch(ve){case"bigint":case"string":case"number":ie=!0;break;case"object":switch(E.$$typeof){case s:case r:ie=!0;break;case j:return ie=E._init,D(ie(E._payload),H,ee,re,ce)}}if(ie)return ce=ce(E),ie=re===""?"."+oe(E,0):re,V(ce)?(ee="",ie!=null&&(ee=ie.replace(ne,"$&/")+"/"),D(ce,H,ee,"",function(mt){return mt})):ce!=null&&(Q(ce)&&(ce=F(ce,ee+(ce.key==null||E&&E.key===ce.key?"":(""+ce.key).replace(ne,"$&/")+"/")+ie)),H.push(ce)),1;ie=0;var Se=re===""?".":re+":";if(V(E))for(var Oe=0;Oe<E.length;Oe++)re=E[Oe],ve=Se+oe(re,Oe),ie+=D(re,H,ee,ve,ce);else if(Oe=w(E),typeof Oe=="function")for(E=Oe.call(E),Oe=0;!(re=E.next()).done;)re=re.value,ve=Se+oe(re,Oe++),ie+=D(re,H,ee,ve,ce);else if(ve==="object"){if(typeof E.then=="function")return D(de(E),H,ee,re,ce);throw H=String(E),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return ie}function P(E,H,ee){if(E==null)return E;var re=[],ce=0;return D(E,re,"","",function(ve){return H.call(ee,ve,ce++)}),re}function se(E){if(E._status===-1){var H=E._result;H=H(),H.then(function(ee){(E._status===0||E._status===-1)&&(E._status=1,E._result=ee)},function(ee){(E._status===0||E._status===-1)&&(E._status=2,E._result=ee)}),E._status===-1&&(E._status=0,E._result=H)}if(E._status===1)return E._result.default;throw E._result}var xe=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=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(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},Ee={map:P,forEach:function(E,H,ee){P(E,function(){H.apply(this,arguments)},ee)},count:function(E){var H=0;return P(E,function(){H++}),H},toArray:function(E){return P(E,function(H){return H})||[]},only:function(E){if(!Q(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return Ce.Activity=y,Ce.Children=Ee,Ce.Component=L,Ce.Fragment=u,Ce.Profiler=d,Ce.PureComponent=O,Ce.StrictMode=c,Ce.Suspense=x,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(E){return T.H.useMemoCache(E)}},Ce.cache=function(E){return function(){return E.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(E,H,ee){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var re=U({},E.props),ce=E.key;if(H!=null)for(ve in H.key!==void 0&&(ce=""+H.key),H)!B.call(H,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&H.ref===void 0||(re[ve]=H[ve]);var ve=arguments.length-2;if(ve===1)re.children=ee;else if(1<ve){for(var ie=Array(ve),Se=0;Se<ve;Se++)ie[Se]=arguments[Se+2];re.children=ie}return Z(E.type,ce,re)},Ce.createContext=function(E){return E={$$typeof:m,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:h,_context:E},E},Ce.createElement=function(E,H,ee){var re,ce={},ve=null;if(H!=null)for(re in H.key!==void 0&&(ve=""+H.key),H)B.call(H,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(ce[re]=H[re]);var ie=arguments.length-2;if(ie===1)ce.children=ee;else if(1<ie){for(var Se=Array(ie),Oe=0;Oe<ie;Oe++)Se[Oe]=arguments[Oe+2];ce.children=Se}if(E&&E.defaultProps)for(re in ie=E.defaultProps,ie)ce[re]===void 0&&(ce[re]=ie[re]);return Z(E,ve,ce)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(E){return{$$typeof:p,render:E}},Ce.isValidElement=Q,Ce.lazy=function(E){return{$$typeof:j,_payload:{_status:-1,_result:E},_init:se}},Ce.memo=function(E,H){return{$$typeof:g,type:E,compare:H===void 0?null:H}},Ce.startTransition=function(E){var H=T.T,ee={};T.T=ee;try{var re=E(),ce=T.S;ce!==null&&ce(ee,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(q,xe)}catch(ve){xe(ve)}finally{H!==null&&ee.types!==null&&(H.types=ee.types),T.T=H}},Ce.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},Ce.use=function(E){return T.H.use(E)},Ce.useActionState=function(E,H,ee){return T.H.useActionState(E,H,ee)},Ce.useCallback=function(E,H){return T.H.useCallback(E,H)},Ce.useContext=function(E){return T.H.useContext(E)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(E,H){return T.H.useDeferredValue(E,H)},Ce.useEffect=function(E,H){return T.H.useEffect(E,H)},Ce.useEffectEvent=function(E){return T.H.useEffectEvent(E)},Ce.useId=function(){return T.H.useId()},Ce.useImperativeHandle=function(E,H,ee){return T.H.useImperativeHandle(E,H,ee)},Ce.useInsertionEffect=function(E,H){return T.H.useInsertionEffect(E,H)},Ce.useLayoutEffect=function(E,H){return T.H.useLayoutEffect(E,H)},Ce.useMemo=function(E,H){return T.H.useMemo(E,H)},Ce.useOptimistic=function(E,H){return T.H.useOptimistic(E,H)},Ce.useReducer=function(E,H,ee){return T.H.useReducer(E,H,ee)},Ce.useRef=function(E){return T.H.useRef(E)},Ce.useState=function(E){return T.H.useState(E)},Ce.useSyncExternalStore=function(E,H,ee){return T.H.useSyncExternalStore(E,H,ee)},Ce.useTransition=function(){return T.H.useTransition()},Ce.version="19.2.4",Ce}var Pp;function Kd(){return Pp||(Pp=1,dd.exports=Wv()),dd.exports}var b=Kd(),fd={exports:{}},ti={},hd={exports:{}},md={};/**
|
|
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 ex;function Iv(){return ex||(ex=1,(function(s){function r(D,P){var se=D.length;D.push(P);e:for(;0<se;){var xe=se-1>>>1,Ee=D[xe];if(0<d(Ee,P))D[xe]=P,D[se]=Ee,se=xe;else break e}}function u(D){return D.length===0?null:D[0]}function c(D){if(D.length===0)return null;var P=D[0],se=D.pop();if(se!==P){D[0]=se;e:for(var xe=0,Ee=D.length,E=Ee>>>1;xe<E;){var H=2*(xe+1)-1,ee=D[H],re=H+1,ce=D[re];if(0>d(ee,se))re<Ee&&0>d(ce,ee)?(D[xe]=ce,D[re]=se,xe=re):(D[xe]=ee,D[H]=se,xe=H);else if(re<Ee&&0>d(ce,se))D[xe]=ce,D[re]=se,xe=re;else break e}}return P}function d(D,P){var se=D.sortIndex-P.sortIndex;return se!==0?se:D.id-P.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;s.unstable_now=function(){return h.now()}}else{var m=Date,p=m.now();s.unstable_now=function(){return m.now()-p}}var x=[],g=[],j=1,y=null,C=3,w=!1,k=!1,U=!1,_=!1,L=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function A(D){for(var P=u(g);P!==null;){if(P.callback===null)c(g);else if(P.startTime<=D)c(g),P.sortIndex=P.expirationTime,r(x,P);else break;P=u(g)}}function V(D){if(U=!1,A(D),!k)if(u(x)!==null)k=!0,q||(q=!0,z());else{var P=u(g);P!==null&&de(V,P.startTime-D)}}var q=!1,T=-1,B=5,Z=-1;function F(){return _?!0:!(s.unstable_now()-Z<B)}function Q(){if(_=!1,q){var D=s.unstable_now();Z=D;var P=!0;try{e:{k=!1,U&&(U=!1,J(T),T=-1),w=!0;var se=C;try{t:{for(A(D),y=u(x);y!==null&&!(y.expirationTime>D&&F());){var xe=y.callback;if(typeof xe=="function"){y.callback=null,C=y.priorityLevel;var Ee=xe(y.expirationTime<=D);if(D=s.unstable_now(),typeof Ee=="function"){y.callback=Ee,A(D),P=!0;break t}y===u(x)&&c(x),A(D)}else c(x);y=u(x)}if(y!==null)P=!0;else{var E=u(g);E!==null&&de(V,E.startTime-D),P=!1}}break e}finally{y=null,C=se,w=!1}P=void 0}}finally{P?z():q=!1}}}var z;if(typeof O=="function")z=function(){O(Q)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,oe=ne.port2;ne.port1.onmessage=Q,z=function(){oe.postMessage(null)}}else z=function(){L(Q,0)};function de(D,P){T=L(function(){D(s.unstable_now())},P)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(D){D.callback=null},s.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<D?Math.floor(1e3/D):5},s.unstable_getCurrentPriorityLevel=function(){return C},s.unstable_next=function(D){switch(C){case 1:case 2:case 3:var P=3;break;default:P=C}var se=C;C=P;try{return D()}finally{C=se}},s.unstable_requestPaint=function(){_=!0},s.unstable_runWithPriority=function(D,P){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var se=C;C=D;try{return P()}finally{C=se}},s.unstable_scheduleCallback=function(D,P,se){var xe=s.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?xe+se:xe):se=xe,D){case 1:var Ee=-1;break;case 2:Ee=250;break;case 5:Ee=1073741823;break;case 4:Ee=1e4;break;default:Ee=5e3}return Ee=se+Ee,D={id:j++,callback:P,priorityLevel:D,startTime:se,expirationTime:Ee,sortIndex:-1},se>xe?(D.sortIndex=se,r(g,D),u(x)===null&&D===u(g)&&(U?(J(T),T=-1):U=!0,de(V,se-xe))):(D.sortIndex=Ee,r(x,D),k||w||(k=!0,q||(q=!0,z()))),D},s.unstable_shouldYield=F,s.unstable_wrapCallback=function(D){var P=C;return function(){var se=C;C=P;try{return D.apply(this,arguments)}finally{C=se}}}})(md)),md}var tx;function Pv(){return tx||(tx=1,hd.exports=Iv()),hd.exports}var pd={exports:{}},Gt={};/**
|
|
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 lx;function ey(){if(lx)return Gt;lx=1;var s=Kd();function r(x){var g="https://react.dev/errors/"+x;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)g+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+x+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var c={d:{f:u,r:function(){throw Error(r(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},d=Symbol.for("react.portal");function h(x,g,j){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:y==null?null:""+y,children:x,containerInfo:g,implementation:j}}var m=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(x,g){if(x==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,Gt.createPortal=function(x,g){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return h(x,g,null,j)},Gt.flushSync=function(x){var g=m.T,j=c.p;try{if(m.T=null,c.p=2,x)return x()}finally{m.T=g,c.p=j,c.d.f()}},Gt.preconnect=function(x,g){typeof x=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,c.d.C(x,g))},Gt.prefetchDNS=function(x){typeof x=="string"&&c.d.D(x)},Gt.preinit=function(x,g){if(typeof x=="string"&&g&&typeof g.as=="string"){var j=g.as,y=p(j,g.crossOrigin),C=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;j==="style"?c.d.S(x,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:C,fetchPriority:w}):j==="script"&&c.d.X(x,{crossOrigin:y,integrity:C,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Gt.preinitModule=function(x,g){if(typeof x=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var j=p(g.as,g.crossOrigin);c.d.M(x,{crossOrigin:j,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&c.d.M(x)},Gt.preload=function(x,g){if(typeof x=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var j=g.as,y=p(j,g.crossOrigin);c.d.L(x,j,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Gt.preloadModule=function(x,g){if(typeof x=="string")if(g){var j=p(g.as,g.crossOrigin);c.d.m(x,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:j,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else c.d.m(x)},Gt.requestFormReset=function(x){c.d.r(x)},Gt.unstable_batchedUpdates=function(x,g){return x(g)},Gt.useFormState=function(x,g,j){return m.H.useFormState(x,g,j)},Gt.useFormStatus=function(){return m.H.useHostTransitionStatus()},Gt.version="19.2.4",Gt}var nx;function ty(){if(nx)return pd.exports;nx=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(r){console.error(r)}}return s(),pd.exports=ey(),pd.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 ax;function ly(){if(ax)return ti;ax=1;var s=Pv(),r=Kd(),u=ty();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function m(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 p(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 x(e){if(h(e)!==e)throw Error(c(188))}function g(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(c(188));return t!==e?null:e}for(var l=e,n=t;;){var i=l.return;if(i===null)break;var o=i.alternate;if(o===null){if(n=i.return,n!==null){l=n;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===l)return x(i),e;if(o===n)return x(i),t;o=o.sibling}throw Error(c(188))}if(l.return!==n.return)l=i,n=o;else{for(var f=!1,v=i.child;v;){if(v===l){f=!0,l=i,n=o;break}if(v===n){f=!0,n=i,l=o;break}v=v.sibling}if(!f){for(v=o.child;v;){if(v===l){f=!0,l=o,n=i;break}if(v===n){f=!0,n=o,l=i;break}v=v.sibling}if(!f)throw Error(c(189))}}if(l.alternate!==n)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,C=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),O=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function z(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||e["@@iterator"],typeof e=="function"?e:null)}var ne=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case U:return"Fragment";case L:return"Profiler";case _:return"StrictMode";case V:return"Suspense";case q:return"SuspenseList";case Z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case O:return e.displayName||"Context";case J:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case T:return t=e.displayName||null,t!==null?t:oe(e.type)||"Memo";case B:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}var de=Array.isArray,D=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},xe=[],Ee=-1;function E(e){return{current:e}}function H(e){0>Ee||(e.current=xe[Ee],xe[Ee]=null,Ee--)}function ee(e,t){Ee++,xe[Ee]=e.current,e.current=t}var re=E(null),ce=E(null),ve=E(null),ie=E(null);function Se(e,t){switch(ee(ve,t),ee(ce,e),ee(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?vp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=vp(t),e=yp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(re),ee(re,e)}function Oe(){H(re),H(ce),H(ve)}function mt(e){e.memoizedState!==null&&ee(ie,e);var t=re.current,l=yp(t,e.type);t!==l&&(ee(ce,e),ee(re,l))}function Xt(e){ce.current===e&&(H(re),H(ce)),ie.current===e&&(H(ie),Jr._currentValue=se)}var il,Pe;function gt(e){if(il===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);il=t&&t[1]||"",Pe=-1<l.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+il+e+Pe}var tt=!1;function Ct(e,t){if(!e||tt)return"";tt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var te=function(){throw Error()};if(Object.defineProperty(te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(te,[])}catch(K){var X=K}Reflect.construct(e,[],te)}else{try{te.call()}catch(K){X=K}e.call(te.prototype)}}else{try{throw Error()}catch(K){X=K}(te=e())&&typeof te.catch=="function"&&te.catch(function(){})}}catch(K){if(K&&X&&typeof K.stack=="string")return[K.stack,X.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=n.DetermineComponentFrameRoot(),f=o[0],v=o[1];if(f&&v){var N=f.split(`
|
|
44
|
-
`),Y=v.split(`
|
|
45
|
-
`);for(i=n=0;n<N.length&&!N[n].includes("DetermineComponentFrameRoot");)n++;for(;i<Y.length&&!Y[i].includes("DetermineComponentFrameRoot");)i++;if(n===N.length||i===Y.length)for(n=N.length-1,i=Y.length-1;1<=n&&0<=i&&N[n]!==Y[i];)i--;for(;1<=n&&0<=i;n--,i--)if(N[n]!==Y[i]){if(n!==1||i!==1)do if(n--,i--,0>i||N[n]!==Y[i]){var $=`
|
|
46
|
-
`+N[n].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=n&&0<=i);break}}}finally{tt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?gt(l):""}function qe(e,t){switch(e.tag){case 26:case 27:case 5:return gt(e.type);case 16:return gt("Lazy");case 13:return e.child!==t&&t!==null?gt("Suspense Fallback"):gt("Suspense");case 19:return gt("SuspenseList");case 0:case 15:return Ct(e.type,!1);case 11:return Ct(e.type.render,!1);case 1:return Ct(e.type,!0);case 31:return gt("Activity");default:return""}}function jl(e){try{var t="",l=null;do t+=qe(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
-
Error generating stack: `+n.message+`
|
|
48
|
-
`+n.stack}}var tn=Object.prototype.hasOwnProperty,Dl=s.unstable_scheduleCallback,At=s.unstable_cancelCallback,vt=s.unstable_shouldYield,ln=s.unstable_requestPaint,Kt=s.unstable_now,eo=s.unstable_getCurrentPriorityLevel,ar=s.unstable_ImmediatePriority,to=s.unstable_UserBlockingPriority,ba=s.unstable_NormalPriority,vi=s.unstable_LowPriority,sr=s.unstable_IdlePriority,yi=s.log,Ia=s.unstable_setDisableYieldValue,Nl=null,Vt=null;function Dt(e){if(typeof yi=="function"&&Ia(e),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(Nl,e)}catch{}}var Zt=Math.clz32?Math.clz32:De,lt=Math.log,rr=Math.LN2;function De(e){return e>>>=0,e===0?32:31-(lt(e)/rr|0)|0}var Pa=256,es=262144,ts=4194304;function nn(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 ls(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var i=0,o=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var v=n&134217727;return v!==0?(n=v&~o,n!==0?i=nn(n):(f&=v,f!==0?i=nn(f):l||(l=v&~e,l!==0&&(i=nn(l))))):(v=n&~o,v!==0?i=nn(v):f!==0?i=nn(f):l||(l=n&~e,l!==0&&(i=nn(l)))),i===0?0:t!==0&&t!==i&&(t&o)===0&&(o=i&-i,l=t&-t,o>=l||o===32&&(l&4194048)!==0)?t:i}function Yl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ns(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 an(){var e=ts;return ts<<=1,(ts&62914560)===0&&(ts=4194304),e}function ja(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function ul(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ir(e,t,l,n,i,o){var f=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var v=e.entanglements,N=e.expirationTimes,Y=e.hiddenUpdates;for(l=f&~l;0<l;){var $=31-Zt(l),te=1<<$;v[$]=0,N[$]=-1;var X=Y[$];if(X!==null)for(Y[$]=null,$=0;$<X.length;$++){var K=X[$];K!==null&&(K.lane&=-536870913)}l&=~te}n!==0&&bi(e,n,0),o!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=o&~(f&~t))}function bi(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Zt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function ur(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-Zt(l),i=1<<n;i&t|e[n]&t&&(e[n]|=t),l&=~i}}function or(e,t){var l=t&-t;return l=(l&42)!==0?1:cr(l),(l&(e.suspendedLanes|t))!==0?0:l}function cr(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 sn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hn(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:Gp(e.type))}function ji(e,t){var l=P.p;try{return P.p=e,t()}finally{P.p=l}}var Xl=Math.random().toString(36).slice(2),yt="__reactFiber$"+Xl,Bt="__reactProps$"+Xl,rn="__reactContainer$"+Xl,as="__reactEvents$"+Xl,Ni="__reactListeners$"+Xl,Si="__reactHandles$"+Xl,dr="__reactResources$"+Xl,W="__reactMarker$"+Xl;function ae(e){delete e[yt],delete e[Bt],delete e[as],delete e[Ni],delete e[Si]}function ue(e){var t=e[yt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[rn]||l[yt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=wp(e);e!==null;){if(l=e[yt])return l;e=wp(e)}return t}e=l,l=e.parentNode}return null}function je(e){if(e=e[yt]||e[rn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function he(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Te(e){var t=e[dr];return t||(t=e[dr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ge(e){e[W]=!0}var Qe=new Set,Ze={};function Ue(e,t){Ge(e,t),Ge(e+"Capture",t)}function Ge(e,t){for(Ze[e]=t,e=0;e<t.length;e++)Qe.add(t[e])}var un=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]*$"),It={},Qt={};function kt(e){return tn.call(Qt,e)?!0:tn.call(It,e)?!1:un.test(e)?Qt[e]=!0:(It[e]=!0,!1)}function Sl(e,t,l){if(kt(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function $t(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function wt(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+n)}}function Tt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function on(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ei(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(f){l=""+f,o.call(this,f)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(f){l=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cn(e){if(!e._valueTracker){var t=on(e)?"checked":"value";e._valueTracker=Ei(e,t,""+e[t])}}function Na(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=on(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}function Ci(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 Qg=/[\n"\\]/g;function El(e){return e.replace(Qg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function lo(e,t,l,n,i,o,f,v){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tt(t)):e.value!==""+Tt(t)&&(e.value=""+Tt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?no(e,f,Tt(t)):l!=null?no(e,f,Tt(l)):n!=null&&e.removeAttribute("value"),i==null&&o!=null&&(e.defaultChecked=!!o),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+Tt(v):e.removeAttribute("name")}function ff(e,t,l,n,i,o,f,v){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||l!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){cn(e);return}l=l!=null?""+Tt(l):"",t=t!=null?""+Tt(t):l,v||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=v?e.checked:!!n,e.defaultChecked=!!n,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),cn(e)}function no(e,t,l){t==="number"&&Ci(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ss(e,t,l,n){if(e=e.options,t){t={};for(var i=0;i<l.length;i++)t["$"+l[i]]=!0;for(l=0;l<e.length;l++)i=t.hasOwnProperty("$"+e[l].value),e[l].selected!==i&&(e[l].selected=i),i&&n&&(e[l].defaultSelected=!0)}else{for(l=""+Tt(l),t=null,i=0;i<e.length;i++){if(e[i].value===l){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function hf(e,t,l){if(t!=null&&(t=""+Tt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Tt(l):""}function mf(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(c(92));if(de(n)){if(1<n.length)throw Error(c(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=Tt(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),cn(e)}function rs(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Gg=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 pf(e,t,l){var n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||Gg.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function xf(e,t,l){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var i in t)n=t[i],t.hasOwnProperty(i)&&l[i]!==n&&pf(e,i,n)}else for(var o in t)t.hasOwnProperty(o)&&pf(e,o,t[o])}function ao(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 Yg=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"]]),Xg=/^[\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 wi(e){return Xg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function dn(){}var so=null;function ro(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var is=null,us=null;function gf(e){var t=je(e);if(t&&(e=t.stateNode)){var l=e[Bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(lo(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+El(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var i=n[Bt]||null;if(!i)throw Error(c(90));lo(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&Na(n)}break e;case"textarea":hf(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ss(e,!!l.multiple,t,!1)}}}var io=!1;function vf(e,t,l){if(io)return e(t,l);io=!0;try{var n=e(t);return n}finally{if(io=!1,(is!==null||us!==null)&&(hu(),is&&(t=is,e=us,us=is=null,gf(t),e)))for(t=0;t<e.length;t++)gf(e[t])}}function fr(e,t){var l=e.stateNode;if(l===null)return null;var n=l[Bt]||null;if(n===null)return null;l=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(c(231,t,typeof l));return l}var fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uo=!1;if(fn)try{var hr={};Object.defineProperty(hr,"passive",{get:function(){uo=!0}}),window.addEventListener("test",hr,hr),window.removeEventListener("test",hr,hr)}catch{uo=!1}var Ln=null,oo=null,Ti=null;function yf(){if(Ti)return Ti;var e,t=oo,l=t.length,n,i="value"in Ln?Ln.value:Ln.textContent,o=i.length;for(e=0;e<l&&t[e]===i[e];e++);var f=l-e;for(n=1;n<=f&&t[l-n]===i[o-n];n++);return Ti=i.slice(e,1<n?1-n:void 0)}function Mi(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 Oi(){return!0}function bf(){return!1}function Pt(e){function t(l,n,i,o,f){this._reactName=l,this._targetInst=i,this.type=n,this.nativeEvent=o,this.target=f,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(l=e[v],this[v]=l?l(o):o[v]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Oi:bf,this.isPropagationStopped=bf,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Oi)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Oi)},persist:function(){},isPersistent:Oi}),t}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ai=Pt(Sa),mr=y({},Sa,{view:0,detail:0}),Kg=Pt(mr),co,fo,pr,ki=y({},mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mo,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!==pr&&(pr&&e.type==="mousemove"?(co=e.screenX-pr.screenX,fo=e.screenY-pr.screenY):fo=co=0,pr=e),co)},movementY:function(e){return"movementY"in e?e.movementY:fo}}),jf=Pt(ki),Vg=y({},ki,{dataTransfer:0}),Zg=Pt(Vg),$g=y({},mr,{relatedTarget:0}),ho=Pt($g),Jg=y({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),Fg=Pt(Jg),Wg=y({},Sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ig=Pt(Wg),Pg=y({},Sa,{data:0}),Nf=Pt(Pg),e0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t0={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"},l0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function n0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=l0[e])?!!t[e]:!1}function mo(){return n0}var a0=y({},mr,{key:function(e){if(e.key){var t=e0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Mi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?t0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mo,charCode:function(e){return e.type==="keypress"?Mi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),s0=Pt(a0),r0=y({},ki,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sf=Pt(r0),i0=y({},mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mo}),u0=Pt(i0),o0=y({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),c0=Pt(o0),d0=y({},ki,{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}),f0=Pt(d0),h0=y({},Sa,{newState:0,oldState:0}),m0=Pt(h0),p0=[9,13,27,32],po=fn&&"CompositionEvent"in window,xr=null;fn&&"documentMode"in document&&(xr=document.documentMode);var x0=fn&&"TextEvent"in window&&!xr,Ef=fn&&(!po||xr&&8<xr&&11>=xr),Cf=" ",wf=!1;function Tf(e,t){switch(e){case"keyup":return p0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var os=!1;function g0(e,t){switch(e){case"compositionend":return Mf(t);case"keypress":return t.which!==32?null:(wf=!0,Cf);case"textInput":return e=t.data,e===Cf&&wf?null:e;default:return null}}function v0(e,t){if(os)return e==="compositionend"||!po&&Tf(e,t)?(e=yf(),Ti=oo=Ln=null,os=!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 Ef&&t.locale!=="ko"?null:t.data;default:return null}}var y0={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 Of(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!y0[e.type]:t==="textarea"}function Af(e,t,l,n){is?us?us.push(n):us=[n]:is=n,t=bu(t,"onChange"),0<t.length&&(l=new Ai("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var gr=null,vr=null;function b0(e){fp(e,0)}function Ri(e){var t=he(e);if(Na(t))return e}function kf(e,t){if(e==="change")return t}var Rf=!1;if(fn){var xo;if(fn){var go="oninput"in document;if(!go){var zf=document.createElement("div");zf.setAttribute("oninput","return;"),go=typeof zf.oninput=="function"}xo=go}else xo=!1;Rf=xo&&(!document.documentMode||9<document.documentMode)}function _f(){gr&&(gr.detachEvent("onpropertychange",Df),vr=gr=null)}function Df(e){if(e.propertyName==="value"&&Ri(vr)){var t=[];Af(t,vr,e,ro(e)),vf(b0,t)}}function j0(e,t,l){e==="focusin"?(_f(),gr=t,vr=l,gr.attachEvent("onpropertychange",Df)):e==="focusout"&&_f()}function N0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ri(vr)}function S0(e,t){if(e==="click")return Ri(t)}function E0(e,t){if(e==="input"||e==="change")return Ri(t)}function C0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ol=typeof Object.is=="function"?Object.is:C0;function yr(e,t){if(ol(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var i=l[n];if(!tn.call(t,i)||!ol(e[i],t[i]))return!1}return!0}function Uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hf(e,t){var l=Uf(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Uf(l)}}function Lf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ci(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Ci(e.document)}return t}function vo(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 w0=fn&&"documentMode"in document&&11>=document.documentMode,cs=null,yo=null,br=null,bo=!1;function Bf(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;bo||cs==null||cs!==Ci(n)||(n=cs,"selectionStart"in n&&vo(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),br&&yr(br,n)||(br=n,n=bu(yo,"onSelect"),0<n.length&&(t=new Ai("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=cs)))}function Ea(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ds={animationend:Ea("Animation","AnimationEnd"),animationiteration:Ea("Animation","AnimationIteration"),animationstart:Ea("Animation","AnimationStart"),transitionrun:Ea("Transition","TransitionRun"),transitionstart:Ea("Transition","TransitionStart"),transitioncancel:Ea("Transition","TransitionCancel"),transitionend:Ea("Transition","TransitionEnd")},jo={},Qf={};fn&&(Qf=document.createElement("div").style,"AnimationEvent"in window||(delete ds.animationend.animation,delete ds.animationiteration.animation,delete ds.animationstart.animation),"TransitionEvent"in window||delete ds.transitionend.transition);function Ca(e){if(jo[e])return jo[e];if(!ds[e])return e;var t=ds[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Qf)return jo[e]=t[l];return e}var Gf=Ca("animationend"),Yf=Ca("animationiteration"),Xf=Ca("animationstart"),T0=Ca("transitionrun"),M0=Ca("transitionstart"),O0=Ca("transitioncancel"),Kf=Ca("transitionend"),Vf=new Map,No="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(" ");No.push("scrollEnd");function Ul(e,t){Vf.set(e,t),Ue(t,[e])}var zi=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)},Cl=[],fs=0,So=0;function _i(){for(var e=fs,t=So=fs=0;t<e;){var l=Cl[t];Cl[t++]=null;var n=Cl[t];Cl[t++]=null;var i=Cl[t];Cl[t++]=null;var o=Cl[t];if(Cl[t++]=null,n!==null&&i!==null){var f=n.pending;f===null?i.next=i:(i.next=f.next,f.next=i),n.pending=i}o!==0&&Zf(l,i,o)}}function Di(e,t,l,n){Cl[fs++]=e,Cl[fs++]=t,Cl[fs++]=l,Cl[fs++]=n,So|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Eo(e,t,l,n){return Di(e,t,l,n),Ui(e)}function wa(e,t){return Di(e,null,null,t),Ui(e)}function Zf(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var i=!1,o=e.return;o!==null;)o.childLanes|=l,n=o.alternate,n!==null&&(n.childLanes|=l),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(i=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,i&&t!==null&&(i=31-Zt(l),e=o.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=l|536870912),o):null}function Ui(e){if(50<Gr)throw Gr=0,zc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hs={};function A0(e,t,l,n){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cl(e,t,l,n){return new A0(e,t,l,n)}function Co(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hn(e,t){var l=e.alternate;return l===null?(l=cl(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function $f(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Hi(e,t,l,n,i,o){var f=0;if(n=e,typeof e=="function")Co(e)&&(f=1);else if(typeof e=="string")f=Dv(e,l,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Z:return e=cl(31,l,t,i),e.elementType=Z,e.lanes=o,e;case U:return Ta(l.children,i,o,t);case _:f=8,i|=24;break;case L:return e=cl(12,l,t,i|2),e.elementType=L,e.lanes=o,e;case V:return e=cl(13,l,t,i),e.elementType=V,e.lanes=o,e;case q:return e=cl(19,l,t,i),e.elementType=q,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:f=10;break e;case J:f=9;break e;case A:f=11;break e;case T:f=14;break e;case B:f=16,n=null;break e}f=29,l=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=cl(f,l,t,i),t.elementType=e,t.type=n,t.lanes=o,t}function Ta(e,t,l,n){return e=cl(7,e,n,t),e.lanes=l,e}function wo(e,t,l){return e=cl(6,e,null,t),e.lanes=l,e}function Jf(e){var t=cl(18,null,null,0);return t.stateNode=e,t}function To(e,t,l){return t=cl(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ff=new WeakMap;function wl(e,t){if(typeof e=="object"&&e!==null){var l=Ff.get(e);return l!==void 0?l:(t={value:e,source:t,stack:jl(t)},Ff.set(e,t),t)}return{value:e,source:t,stack:jl(t)}}var ms=[],ps=0,Li=null,jr=0,Tl=[],Ml=0,qn=null,Kl=1,Vl="";function mn(e,t){ms[ps++]=jr,ms[ps++]=Li,Li=e,jr=t}function Wf(e,t,l){Tl[Ml++]=Kl,Tl[Ml++]=Vl,Tl[Ml++]=qn,qn=e;var n=Kl;e=Vl;var i=32-Zt(n)-1;n&=~(1<<i),l+=1;var o=32-Zt(t)+i;if(30<o){var f=i-i%5;o=(n&(1<<f)-1).toString(32),n>>=f,i-=f,Kl=1<<32-Zt(t)+i|l<<i|n,Vl=o+e}else Kl=1<<o|l<<i|n,Vl=e}function Mo(e){e.return!==null&&(mn(e,1),Wf(e,1,0))}function Oo(e){for(;e===Li;)Li=ms[--ps],ms[ps]=null,jr=ms[--ps],ms[ps]=null;for(;e===qn;)qn=Tl[--Ml],Tl[Ml]=null,Vl=Tl[--Ml],Tl[Ml]=null,Kl=Tl[--Ml],Tl[Ml]=null}function If(e,t){Tl[Ml++]=Kl,Tl[Ml++]=Vl,Tl[Ml++]=qn,Kl=t.id,Vl=t.overflow,qn=e}var Ut=null,at=null,He=!1,Bn=null,Ol=!1,Ao=Error(c(519));function Qn(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Nr(wl(t,e)),Ao}function Pf(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[yt]=e,t[Bt]=n,l){case"dialog":Re("cancel",t),Re("close",t);break;case"iframe":case"object":case"embed":Re("load",t);break;case"video":case"audio":for(l=0;l<Xr.length;l++)Re(Xr[l],t);break;case"source":Re("error",t);break;case"img":case"image":case"link":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"input":Re("invalid",t),ff(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),mf(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||xp(t.textContent,l)?(n.popover!=null&&(Re("beforetoggle",t),Re("toggle",t)),n.onScroll!=null&&Re("scroll",t),n.onScrollEnd!=null&&Re("scrollend",t),n.onClick!=null&&(t.onclick=dn),t=!0):t=!1,t||Qn(e,!0)}function eh(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:Ol=!1;return;case 27:case 3:Ol=!0;return;default:Ut=Ut.return}}function xs(e){if(e!==Ut)return!1;if(!He)return eh(e),He=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||$c(e.type,e.memoizedProps)),l=!l),l&&at&&Qn(e),eh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));at=Cp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));at=Cp(e)}else t===27?(t=at,ta(e.type)?(e=Pc,Pc=null,at=e):at=t):at=Ut?kl(e.stateNode.nextSibling):null;return!0}function Ma(){at=Ut=null,He=!1}function ko(){var e=Bn;return e!==null&&(nl===null?nl=e:nl.push.apply(nl,e),Bn=null),e}function Nr(e){Bn===null?Bn=[e]:Bn.push(e)}var Ro=E(null),Oa=null,pn=null;function Gn(e,t,l){ee(Ro,t._currentValue),t._currentValue=l}function xn(e){e._currentValue=Ro.current,H(Ro)}function zo(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function _o(e,t,l,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var f=i.child;o=o.firstContext;e:for(;o!==null;){var v=o;o=i;for(var N=0;N<t.length;N++)if(v.context===t[N]){o.lanes|=l,v=o.alternate,v!==null&&(v.lanes|=l),zo(o.return,l,e),n||(f=null);break e}o=v.next}}else if(i.tag===18){if(f=i.return,f===null)throw Error(c(341));f.lanes|=l,o=f.alternate,o!==null&&(o.lanes|=l),zo(f,l,e),f=null}else f=i.child;if(f!==null)f.return=i;else for(f=i;f!==null;){if(f===e){f=null;break}if(i=f.sibling,i!==null){i.return=f.return,f=i;break}f=f.return}i=f}}function gs(e,t,l,n){e=null;for(var i=t,o=!1;i!==null;){if(!o){if((i.flags&524288)!==0)o=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var f=i.alternate;if(f===null)throw Error(c(387));if(f=f.memoizedProps,f!==null){var v=i.type;ol(i.pendingProps.value,f.value)||(e!==null?e.push(v):e=[v])}}else if(i===ie.current){if(f=i.alternate,f===null)throw Error(c(387));f.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Jr):e=[Jr])}i=i.return}e!==null&&_o(t,e,l,n),t.flags|=262144}function qi(e){for(e=e.firstContext;e!==null;){if(!ol(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Aa(e){Oa=e,pn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return th(Oa,e)}function Bi(e,t){return Oa===null&&Aa(e),th(e,t)}function th(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},pn===null){if(e===null)throw Error(c(308));pn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pn=pn.next=t;return l}var k0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},R0=s.unstable_scheduleCallback,z0=s.unstable_NormalPriority,bt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Do(){return{controller:new k0,data:new Map,refCount:0}}function Sr(e){e.refCount--,e.refCount===0&&R0(z0,function(){e.controller.abort()})}var Er=null,Uo=0,vs=0,ys=null;function _0(e,t){if(Er===null){var l=Er=[];Uo=0,vs=qc(),ys={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Uo++,t.then(lh,lh),t}function lh(){if(--Uo===0&&Er!==null){ys!==null&&(ys.status="fulfilled");var e=Er;Er=null,vs=0,ys=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function D0(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(i){l.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<l.length;i++)(0,l[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<l.length;i++)(0,l[i])(void 0)}),n}var nh=D.S;D.S=function(e,t){Bm=Kt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&_0(e,t),nh!==null&&nh(e,t)};var ka=E(null);function Ho(){var e=ka.current;return e!==null?e:et.pooledCache}function Qi(e,t){t===null?ee(ka,ka.current):ee(ka,t.pool)}function ah(){var e=Ho();return e===null?null:{parent:bt._currentValue,pool:e}}var bs=Error(c(460)),Lo=Error(c(474)),Gi=Error(c(542)),Yi={then:function(){}};function sh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function rh(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(dn,dn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uh(e),e;default:if(typeof t.status=="string")t.then(dn,dn);else{if(e=et,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uh(e),e}throw za=t,bs}}function Ra(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(za=l,bs):l}}var za=null;function ih(){if(za===null)throw Error(c(459));var e=za;return za=null,e}function uh(e){if(e===bs||e===Gi)throw Error(c(483))}var js=null,Cr=0;function Xi(e){var t=Cr;return Cr+=1,js===null&&(js=[]),rh(js,e,t)}function wr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ki(e,t){throw t.$$typeof===C?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function oh(e){function t(R,M){if(e){var G=R.deletions;G===null?(R.deletions=[M],R.flags|=16):G.push(M)}}function l(R,M){if(!e)return null;for(;M!==null;)t(R,M),M=M.sibling;return null}function n(R){for(var M=new Map;R!==null;)R.key!==null?M.set(R.key,R):M.set(R.index,R),R=R.sibling;return M}function i(R,M){return R=hn(R,M),R.index=0,R.sibling=null,R}function o(R,M,G){return R.index=G,e?(G=R.alternate,G!==null?(G=G.index,G<M?(R.flags|=67108866,M):G):(R.flags|=67108866,M)):(R.flags|=1048576,M)}function f(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function v(R,M,G,I){return M===null||M.tag!==6?(M=wo(G,R.mode,I),M.return=R,M):(M=i(M,G),M.return=R,M)}function N(R,M,G,I){var be=G.type;return be===U?$(R,M,G.props.children,I,G.key):M!==null&&(M.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===B&&Ra(be)===M.type)?(M=i(M,G.props),wr(M,G),M.return=R,M):(M=Hi(G.type,G.key,G.props,null,R.mode,I),wr(M,G),M.return=R,M)}function Y(R,M,G,I){return M===null||M.tag!==4||M.stateNode.containerInfo!==G.containerInfo||M.stateNode.implementation!==G.implementation?(M=To(G,R.mode,I),M.return=R,M):(M=i(M,G.children||[]),M.return=R,M)}function $(R,M,G,I,be){return M===null||M.tag!==7?(M=Ta(G,R.mode,I,be),M.return=R,M):(M=i(M,G),M.return=R,M)}function te(R,M,G){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=wo(""+M,R.mode,G),M.return=R,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case w:return G=Hi(M.type,M.key,M.props,null,R.mode,G),wr(G,M),G.return=R,G;case k:return M=To(M,R.mode,G),M.return=R,M;case B:return M=Ra(M),te(R,M,G)}if(de(M)||z(M))return M=Ta(M,R.mode,G,null),M.return=R,M;if(typeof M.then=="function")return te(R,Xi(M),G);if(M.$$typeof===O)return te(R,Bi(R,M),G);Ki(R,M)}return null}function X(R,M,G,I){var be=M!==null?M.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return be!==null?null:v(R,M,""+G,I);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case w:return G.key===be?N(R,M,G,I):null;case k:return G.key===be?Y(R,M,G,I):null;case B:return G=Ra(G),X(R,M,G,I)}if(de(G)||z(G))return be!==null?null:$(R,M,G,I,null);if(typeof G.then=="function")return X(R,M,Xi(G),I);if(G.$$typeof===O)return X(R,M,Bi(R,G),I);Ki(R,G)}return null}function K(R,M,G,I,be){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return R=R.get(G)||null,v(M,R,""+I,be);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case w:return R=R.get(I.key===null?G:I.key)||null,N(M,R,I,be);case k:return R=R.get(I.key===null?G:I.key)||null,Y(M,R,I,be);case B:return I=Ra(I),K(R,M,G,I,be)}if(de(I)||z(I))return R=R.get(G)||null,$(M,R,I,be,null);if(typeof I.then=="function")return K(R,M,G,Xi(I),be);if(I.$$typeof===O)return K(R,M,G,Bi(M,I),be);Ki(M,I)}return null}function me(R,M,G,I){for(var be=null,Ye=null,pe=M,Me=M=0,_e=null;pe!==null&&Me<G.length;Me++){pe.index>Me?(_e=pe,pe=null):_e=pe.sibling;var Xe=X(R,pe,G[Me],I);if(Xe===null){pe===null&&(pe=_e);break}e&&pe&&Xe.alternate===null&&t(R,pe),M=o(Xe,M,Me),Ye===null?be=Xe:Ye.sibling=Xe,Ye=Xe,pe=_e}if(Me===G.length)return l(R,pe),He&&mn(R,Me),be;if(pe===null){for(;Me<G.length;Me++)pe=te(R,G[Me],I),pe!==null&&(M=o(pe,M,Me),Ye===null?be=pe:Ye.sibling=pe,Ye=pe);return He&&mn(R,Me),be}for(pe=n(pe);Me<G.length;Me++)_e=K(pe,R,Me,G[Me],I),_e!==null&&(e&&_e.alternate!==null&&pe.delete(_e.key===null?Me:_e.key),M=o(_e,M,Me),Ye===null?be=_e:Ye.sibling=_e,Ye=_e);return e&&pe.forEach(function(ra){return t(R,ra)}),He&&mn(R,Me),be}function Ne(R,M,G,I){if(G==null)throw Error(c(151));for(var be=null,Ye=null,pe=M,Me=M=0,_e=null,Xe=G.next();pe!==null&&!Xe.done;Me++,Xe=G.next()){pe.index>Me?(_e=pe,pe=null):_e=pe.sibling;var ra=X(R,pe,Xe.value,I);if(ra===null){pe===null&&(pe=_e);break}e&&pe&&ra.alternate===null&&t(R,pe),M=o(ra,M,Me),Ye===null?be=ra:Ye.sibling=ra,Ye=ra,pe=_e}if(Xe.done)return l(R,pe),He&&mn(R,Me),be;if(pe===null){for(;!Xe.done;Me++,Xe=G.next())Xe=te(R,Xe.value,I),Xe!==null&&(M=o(Xe,M,Me),Ye===null?be=Xe:Ye.sibling=Xe,Ye=Xe);return He&&mn(R,Me),be}for(pe=n(pe);!Xe.done;Me++,Xe=G.next())Xe=K(pe,R,Me,Xe.value,I),Xe!==null&&(e&&Xe.alternate!==null&&pe.delete(Xe.key===null?Me:Xe.key),M=o(Xe,M,Me),Ye===null?be=Xe:Ye.sibling=Xe,Ye=Xe);return e&&pe.forEach(function(Vv){return t(R,Vv)}),He&&mn(R,Me),be}function Ie(R,M,G,I){if(typeof G=="object"&&G!==null&&G.type===U&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case w:e:{for(var be=G.key;M!==null;){if(M.key===be){if(be=G.type,be===U){if(M.tag===7){l(R,M.sibling),I=i(M,G.props.children),I.return=R,R=I;break e}}else if(M.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===B&&Ra(be)===M.type){l(R,M.sibling),I=i(M,G.props),wr(I,G),I.return=R,R=I;break e}l(R,M);break}else t(R,M);M=M.sibling}G.type===U?(I=Ta(G.props.children,R.mode,I,G.key),I.return=R,R=I):(I=Hi(G.type,G.key,G.props,null,R.mode,I),wr(I,G),I.return=R,R=I)}return f(R);case k:e:{for(be=G.key;M!==null;){if(M.key===be)if(M.tag===4&&M.stateNode.containerInfo===G.containerInfo&&M.stateNode.implementation===G.implementation){l(R,M.sibling),I=i(M,G.children||[]),I.return=R,R=I;break e}else{l(R,M);break}else t(R,M);M=M.sibling}I=To(G,R.mode,I),I.return=R,R=I}return f(R);case B:return G=Ra(G),Ie(R,M,G,I)}if(de(G))return me(R,M,G,I);if(z(G)){if(be=z(G),typeof be!="function")throw Error(c(150));return G=be.call(G),Ne(R,M,G,I)}if(typeof G.then=="function")return Ie(R,M,Xi(G),I);if(G.$$typeof===O)return Ie(R,M,Bi(R,G),I);Ki(R,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,M!==null&&M.tag===6?(l(R,M.sibling),I=i(M,G),I.return=R,R=I):(l(R,M),I=wo(G,R.mode,I),I.return=R,R=I),f(R)):l(R,M)}return function(R,M,G,I){try{Cr=0;var be=Ie(R,M,G,I);return js=null,be}catch(pe){if(pe===bs||pe===Gi)throw pe;var Ye=cl(29,pe,null,R.mode);return Ye.lanes=I,Ye.return=R,Ye}finally{}}}var _a=oh(!0),ch=oh(!1),Yn=!1;function qo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bo(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 Xn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Kn(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ke&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=Ui(e),Zf(e,null,l),t}return Di(e,n,t,l),Ui(e)}function Tr(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,ur(e,l)}}function Qo(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var i=null,o=null;if(l=l.firstBaseUpdate,l!==null){do{var f={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};o===null?i=o=f:o=o.next=f,l=l.next}while(l!==null);o===null?i=o=t:o=o.next=t}else i=o=t;l={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Go=!1;function Mr(){if(Go){var e=ys;if(e!==null)throw e}}function Or(e,t,l,n){Go=!1;var i=e.updateQueue;Yn=!1;var o=i.firstBaseUpdate,f=i.lastBaseUpdate,v=i.shared.pending;if(v!==null){i.shared.pending=null;var N=v,Y=N.next;N.next=null,f===null?o=Y:f.next=Y,f=N;var $=e.alternate;$!==null&&($=$.updateQueue,v=$.lastBaseUpdate,v!==f&&(v===null?$.firstBaseUpdate=Y:v.next=Y,$.lastBaseUpdate=N))}if(o!==null){var te=i.baseState;f=0,$=Y=N=null,v=o;do{var X=v.lane&-536870913,K=X!==v.lane;if(K?(ze&X)===X:(n&X)===X){X!==0&&X===vs&&(Go=!0),$!==null&&($=$.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var me=e,Ne=v;X=t;var Ie=l;switch(Ne.tag){case 1:if(me=Ne.payload,typeof me=="function"){te=me.call(Ie,te,X);break e}te=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=Ne.payload,X=typeof me=="function"?me.call(Ie,te,X):me,X==null)break e;te=y({},te,X);break e;case 2:Yn=!0}}X=v.callback,X!==null&&(e.flags|=64,K&&(e.flags|=8192),K=i.callbacks,K===null?i.callbacks=[X]:K.push(X))}else K={lane:X,tag:v.tag,payload:v.payload,callback:v.callback,next:null},$===null?(Y=$=K,N=te):$=$.next=K,f|=X;if(v=v.next,v===null){if(v=i.shared.pending,v===null)break;K=v,v=K.next,K.next=null,i.lastBaseUpdate=K,i.shared.pending=null}}while(!0);$===null&&(N=te),i.baseState=N,i.firstBaseUpdate=Y,i.lastBaseUpdate=$,o===null&&(i.shared.lanes=0),Fn|=f,e.lanes=f,e.memoizedState=te}}function dh(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function fh(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)dh(l[e],t)}var Ns=E(null),Vi=E(0);function hh(e,t){e=Cn,ee(Vi,e),ee(Ns,t),Cn=e|t.baseLanes}function Yo(){ee(Vi,Cn),ee(Ns,Ns.current)}function Xo(){Cn=Vi.current,H(Ns),H(Vi)}var dl=E(null),Al=null;function Vn(e){var t=e.alternate;ee(pt,pt.current&1),ee(dl,e),Al===null&&(t===null||Ns.current!==null||t.memoizedState!==null)&&(Al=e)}function Ko(e){ee(pt,pt.current),ee(dl,e),Al===null&&(Al=e)}function mh(e){e.tag===22?(ee(pt,pt.current),ee(dl,e),Al===null&&(Al=e)):Zn()}function Zn(){ee(pt,pt.current),ee(dl,dl.current)}function fl(e){H(dl),Al===e&&(Al=null),H(pt)}var pt=E(0);function Zi(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Wc(l)||Ic(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var gn=0,we=null,Fe=null,jt=null,$i=!1,Ss=!1,Da=!1,Ji=0,Ar=0,Es=null,U0=0;function ot(){throw Error(c(321))}function Vo(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!ol(e[l],t[l]))return!1;return!0}function Zo(e,t,l,n,i,o){return gn=o,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Wh:uc,Da=!1,o=l(n,i),Da=!1,Ss&&(o=xh(t,l,n,i)),ph(e),o}function ph(e){D.H=zr;var t=Fe!==null&&Fe.next!==null;if(gn=0,jt=Fe=we=null,$i=!1,Ar=0,Es=null,t)throw Error(c(300));e===null||Nt||(e=e.dependencies,e!==null&&qi(e)&&(Nt=!0))}function xh(e,t,l,n){we=e;var i=0;do{if(Ss&&(Es=null),Ar=0,Ss=!1,25<=i)throw Error(c(301));if(i+=1,jt=Fe=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=Ih,o=t(l,n)}while(Ss);return o}function H0(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?kr(t):t,e=e.useState()[0],(Fe!==null?Fe.memoizedState:null)!==e&&(we.flags|=1024),t}function $o(){var e=Ji!==0;return Ji=0,e}function Jo(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Fo(e){if($i){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$i=!1}gn=0,jt=Fe=we=null,Ss=!1,Ar=Ji=0,Es=null}function Jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?we.memoizedState=jt=e:jt=jt.next=e,jt}function xt(){if(Fe===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=jt===null?we.memoizedState:jt.next;if(t!==null)jt=t,Fe=e;else{if(e===null)throw we.alternate===null?Error(c(467)):Error(c(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},jt===null?we.memoizedState=jt=e:jt=jt.next=e}return jt}function Fi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kr(e){var t=Ar;return Ar+=1,Es===null&&(Es=[]),e=rh(Es,e,t),t=we,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Wh:uc),e}function Wi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return kr(e);if(e.$$typeof===O)return Ht(e)}throw Error(c(438,String(e)))}function Wo(e){var t=null,l=we.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=we.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Fi(),we.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=F;return t.index++,l}function vn(e,t){return typeof t=="function"?t(e):t}function Ii(e){var t=xt();return Io(t,Fe,e)}function Io(e,t,l){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=l;var i=e.baseQueue,o=n.pending;if(o!==null){if(i!==null){var f=i.next;i.next=o.next,o.next=f}t.baseQueue=i=o,n.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var v=f=null,N=null,Y=t,$=!1;do{var te=Y.lane&-536870913;if(te!==Y.lane?(ze&te)===te:(gn&te)===te){var X=Y.revertLane;if(X===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),te===vs&&($=!0);else if((gn&X)===X){Y=Y.next,X===vs&&($=!0);continue}else te={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},N===null?(v=N=te,f=o):N=N.next=te,we.lanes|=X,Fn|=X;te=Y.action,Da&&l(o,te),o=Y.hasEagerState?Y.eagerState:l(o,te)}else X={lane:te,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},N===null?(v=N=X,f=o):N=N.next=X,we.lanes|=te,Fn|=te;Y=Y.next}while(Y!==null&&Y!==t);if(N===null?f=o:N.next=v,!ol(o,e.memoizedState)&&(Nt=!0,$&&(l=ys,l!==null)))throw l;e.memoizedState=o,e.baseState=f,e.baseQueue=N,n.lastRenderedState=o}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Po(e){var t=xt(),l=t.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=e;var n=l.dispatch,i=l.pending,o=t.memoizedState;if(i!==null){l.pending=null;var f=i=i.next;do o=e(o,f.action),f=f.next;while(f!==i);ol(o,t.memoizedState)||(Nt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),l.lastRenderedState=o}return[o,n]}function gh(e,t,l){var n=we,i=xt(),o=He;if(o){if(l===void 0)throw Error(c(407));l=l()}else l=t();var f=!ol((Fe||i).memoizedState,l);if(f&&(i.memoizedState=l,Nt=!0),i=i.queue,lc(bh.bind(null,n,i,e),[e]),i.getSnapshot!==t||f||jt!==null&&jt.memoizedState.tag&1){if(n.flags|=2048,Cs(9,{destroy:void 0},yh.bind(null,n,i,l,t),null),et===null)throw Error(c(349));o||(gn&127)!==0||vh(n,t,l)}return l}function vh(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=we.updateQueue,t===null?(t=Fi(),we.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function yh(e,t,l,n){t.value=l,t.getSnapshot=n,jh(t)&&Nh(e)}function bh(e,t,l){return l(function(){jh(t)&&Nh(e)})}function jh(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!ol(e,l)}catch{return!0}}function Nh(e){var t=wa(e,2);t!==null&&al(t,e,2)}function ec(e){var t=Jt();if(typeof e=="function"){var l=e;if(e=l(),Da){Dt(!0);try{l()}finally{Dt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vn,lastRenderedState:e},t}function Sh(e,t,l,n){return e.baseState=l,Io(e,Fe,typeof n=="function"?n:vn)}function L0(e,t,l,n,i){if(tu(e))throw Error(c(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){o.listeners.push(f)}};D.T!==null?l(!0):o.isTransition=!1,n(o),l=t.pending,l===null?(o.next=t.pending=o,Eh(t,o)):(o.next=l.next,t.pending=l.next=o)}}function Eh(e,t){var l=t.action,n=t.payload,i=e.state;if(t.isTransition){var o=D.T,f={};D.T=f;try{var v=l(i,n),N=D.S;N!==null&&N(f,v),Ch(e,t,v)}catch(Y){tc(e,t,Y)}finally{o!==null&&f.types!==null&&(o.types=f.types),D.T=o}}else try{o=l(i,n),Ch(e,t,o)}catch(Y){tc(e,t,Y)}}function Ch(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){wh(e,t,n)},function(n){return tc(e,t,n)}):wh(e,t,l)}function wh(e,t,l){t.status="fulfilled",t.value=l,Th(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Eh(e,l)))}function tc(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,Th(t),t=t.next;while(t!==n)}e.action=null}function Th(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Mh(e,t){return t}function Oh(e,t){if(He){var l=et.formState;if(l!==null){e:{var n=we;if(He){if(at){t:{for(var i=at,o=Ol;i.nodeType!==8;){if(!o){i=null;break t}if(i=kl(i.nextSibling),i===null){i=null;break t}}o=i.data,i=o==="F!"||o==="F"?i:null}if(i){at=kl(i.nextSibling),n=i.data==="F!";break e}}Qn(n)}n=!1}n&&(t=l[0])}}return l=Jt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mh,lastRenderedState:t},l.queue=n,l=$h.bind(null,we,n),n.dispatch=l,n=ec(!1),o=ic.bind(null,we,!1,n.queue),n=Jt(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,l=L0.bind(null,we,i,o,l),i.dispatch=l,n.memoizedState=e,[t,l,!1]}function Ah(e){var t=xt();return kh(t,Fe,e)}function kh(e,t,l){if(t=Io(e,t,Mh)[0],e=Ii(vn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=kr(t)}catch(f){throw f===bs?Gi:f}else n=t;t=xt();var i=t.queue,o=i.dispatch;return l!==t.memoizedState&&(we.flags|=2048,Cs(9,{destroy:void 0},q0.bind(null,i,l),null)),[n,o,e]}function q0(e,t){e.action=t}function Rh(e){var t=xt(),l=Fe;if(l!==null)return kh(t,l,e);xt(),t=t.memoizedState,l=xt();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function Cs(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=we.updateQueue,t===null&&(t=Fi(),we.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function zh(){return xt().memoizedState}function Pi(e,t,l,n){var i=Jt();we.flags|=e,i.memoizedState=Cs(1|t,{destroy:void 0},l,n===void 0?null:n)}function eu(e,t,l,n){var i=xt();n=n===void 0?null:n;var o=i.memoizedState.inst;Fe!==null&&n!==null&&Vo(n,Fe.memoizedState.deps)?i.memoizedState=Cs(t,o,l,n):(we.flags|=e,i.memoizedState=Cs(1|t,o,l,n))}function _h(e,t){Pi(8390656,8,e,t)}function lc(e,t){eu(2048,8,e,t)}function B0(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=Fi(),we.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Dh(e){var t=xt().memoizedState;return B0({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Uh(e,t){return eu(4,2,e,t)}function Hh(e,t){return eu(4,4,e,t)}function Lh(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function qh(e,t,l){l=l!=null?l.concat([e]):null,eu(4,4,Lh.bind(null,t,e),l)}function nc(){}function Bh(e,t){var l=xt();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Vo(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function Qh(e,t){var l=xt();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Vo(t,n[1]))return n[0];if(n=e(),Da){Dt(!0);try{e()}finally{Dt(!1)}}return l.memoizedState=[n,t],n}function ac(e,t,l){return l===void 0||(gn&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Gm(),we.lanes|=e,Fn|=e,l)}function Gh(e,t,l,n){return ol(l,t)?l:Ns.current!==null?(e=ac(e,l,n),ol(e,t)||(Nt=!0),e):(gn&42)===0||(gn&1073741824)!==0&&(ze&261930)===0?(Nt=!0,e.memoizedState=l):(e=Gm(),we.lanes|=e,Fn|=e,t)}function Yh(e,t,l,n,i){var o=P.p;P.p=o!==0&&8>o?o:8;var f=D.T,v={};D.T=v,ic(e,!1,t,l);try{var N=i(),Y=D.S;if(Y!==null&&Y(v,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var $=D0(N,n);Rr(e,t,$,pl(e))}else Rr(e,t,n,pl(e))}catch(te){Rr(e,t,{then:function(){},status:"rejected",reason:te},pl())}finally{P.p=o,f!==null&&v.types!==null&&(f.types=v.types),D.T=f}}function Q0(){}function sc(e,t,l,n){if(e.tag!==5)throw Error(c(476));var i=Xh(e).queue;Yh(e,i,t,se,l===null?Q0:function(){return Kh(e),l(n)})}function Xh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vn,lastRenderedState:se},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vn,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Kh(e){var t=Xh(e);t.next===null&&(t=e.alternate.memoizedState),Rr(e,t.next.queue,{},pl())}function rc(){return Ht(Jr)}function Vh(){return xt().memoizedState}function Zh(){return xt().memoizedState}function G0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=pl();e=Xn(l);var n=Kn(t,e,l);n!==null&&(al(n,t,l),Tr(n,t,l)),t={cache:Do()},e.payload=t;return}t=t.return}}function Y0(e,t,l){var n=pl();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},tu(e)?Jh(t,l):(l=Eo(e,t,l,n),l!==null&&(al(l,e,n),Fh(l,t,n)))}function $h(e,t,l){var n=pl();Rr(e,t,l,n)}function Rr(e,t,l,n){var i={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(tu(e))Jh(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var f=t.lastRenderedState,v=o(f,l);if(i.hasEagerState=!0,i.eagerState=v,ol(v,f))return Di(e,t,i,0),et===null&&_i(),!1}catch{}finally{}if(l=Eo(e,t,i,n),l!==null)return al(l,e,n),Fh(l,t,n),!0}return!1}function ic(e,t,l,n){if(n={lane:2,revertLane:qc(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},tu(e)){if(t)throw Error(c(479))}else t=Eo(e,l,n,2),t!==null&&al(t,e,2)}function tu(e){var t=e.alternate;return e===we||t!==null&&t===we}function Jh(e,t){Ss=$i=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Fh(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,ur(e,l)}}var zr={readContext:Ht,use:Wi,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};zr.useEffectEvent=ot;var Wh={readContext:Ht,use:Wi,useCallback:function(e,t){return Jt().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:_h,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Pi(4194308,4,Lh.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Pi(4194308,4,e,t)},useInsertionEffect:function(e,t){Pi(4,2,e,t)},useMemo:function(e,t){var l=Jt();t=t===void 0?null:t;var n=e();if(Da){Dt(!0);try{e()}finally{Dt(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=Jt();if(l!==void 0){var i=l(t);if(Da){Dt(!0);try{l(t)}finally{Dt(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=Y0.bind(null,we,e),[n.memoizedState,e]},useRef:function(e){var t=Jt();return e={current:e},t.memoizedState=e},useState:function(e){e=ec(e);var t=e.queue,l=$h.bind(null,we,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:nc,useDeferredValue:function(e,t){var l=Jt();return ac(l,e,t)},useTransition:function(){var e=ec(!1);return e=Yh.bind(null,we,e.queue,!0,!1),Jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=we,i=Jt();if(He){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),et===null)throw Error(c(349));(ze&127)!==0||vh(n,t,l)}i.memoizedState=l;var o={value:l,getSnapshot:t};return i.queue=o,_h(bh.bind(null,n,o,e),[e]),n.flags|=2048,Cs(9,{destroy:void 0},yh.bind(null,n,o,l,t),null),l},useId:function(){var e=Jt(),t=et.identifierPrefix;if(He){var l=Vl,n=Kl;l=(n&~(1<<32-Zt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ji++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=U0++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:rc,useFormState:Oh,useActionState:Oh,useOptimistic:function(e){var t=Jt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=ic.bind(null,we,!0,l),l.dispatch=t,[e,t]},useMemoCache:Wo,useCacheRefresh:function(){return Jt().memoizedState=G0.bind(null,we)},useEffectEvent:function(e){var t=Jt(),l={impl:e};return t.memoizedState=l,function(){if((Ke&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},uc={readContext:Ht,use:Wi,useCallback:Bh,useContext:Ht,useEffect:lc,useImperativeHandle:qh,useInsertionEffect:Uh,useLayoutEffect:Hh,useMemo:Qh,useReducer:Ii,useRef:zh,useState:function(){return Ii(vn)},useDebugValue:nc,useDeferredValue:function(e,t){var l=xt();return Gh(l,Fe.memoizedState,e,t)},useTransition:function(){var e=Ii(vn)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:kr(e),t]},useSyncExternalStore:gh,useId:Vh,useHostTransitionStatus:rc,useFormState:Ah,useActionState:Ah,useOptimistic:function(e,t){var l=xt();return Sh(l,Fe,e,t)},useMemoCache:Wo,useCacheRefresh:Zh};uc.useEffectEvent=Dh;var Ih={readContext:Ht,use:Wi,useCallback:Bh,useContext:Ht,useEffect:lc,useImperativeHandle:qh,useInsertionEffect:Uh,useLayoutEffect:Hh,useMemo:Qh,useReducer:Po,useRef:zh,useState:function(){return Po(vn)},useDebugValue:nc,useDeferredValue:function(e,t){var l=xt();return Fe===null?ac(l,e,t):Gh(l,Fe.memoizedState,e,t)},useTransition:function(){var e=Po(vn)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:kr(e),t]},useSyncExternalStore:gh,useId:Vh,useHostTransitionStatus:rc,useFormState:Rh,useActionState:Rh,useOptimistic:function(e,t){var l=xt();return Fe!==null?Sh(l,Fe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Wo,useCacheRefresh:Zh};Ih.useEffectEvent=Dh;function oc(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:y({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var cc={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=pl(),i=Xn(n);i.payload=t,l!=null&&(i.callback=l),t=Kn(e,i,n),t!==null&&(al(t,e,n),Tr(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=pl(),i=Xn(n);i.tag=1,i.payload=t,l!=null&&(i.callback=l),t=Kn(e,i,n),t!==null&&(al(t,e,n),Tr(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=pl(),n=Xn(l);n.tag=2,t!=null&&(n.callback=t),t=Kn(e,n,l),t!==null&&(al(t,e,l),Tr(t,e,l))}};function Ph(e,t,l,n,i,o,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,f):t.prototype&&t.prototype.isPureReactComponent?!yr(l,n)||!yr(i,o):!0}function em(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&cc.enqueueReplaceState(t,t.state,null)}function Ua(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=y({},l));for(var i in e)l[i]===void 0&&(l[i]=e[i])}return l}function tm(e){zi(e)}function lm(e){console.error(e)}function nm(e){zi(e)}function lu(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function am(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function dc(e,t,l){return l=Xn(l),l.tag=3,l.payload={element:null},l.callback=function(){lu(e,t)},l}function sm(e){return e=Xn(e),e.tag=3,e}function rm(e,t,l,n){var i=l.type.getDerivedStateFromError;if(typeof i=="function"){var o=n.value;e.payload=function(){return i(o)},e.callback=function(){am(t,l,n)}}var f=l.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){am(t,l,n),typeof i!="function"&&(Wn===null?Wn=new Set([this]):Wn.add(this));var v=n.stack;this.componentDidCatch(n.value,{componentStack:v!==null?v:""})})}function X0(e,t,l,n,i){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&gs(t,l,i,!0),l=dl.current,l!==null){switch(l.tag){case 31:case 13:return Al===null?mu():l.alternate===null&&ct===0&&(ct=3),l.flags&=-257,l.flags|=65536,l.lanes=i,n===Yi?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),Uc(e,n,i)),!1;case 22:return l.flags|=65536,n===Yi?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),Uc(e,n,i)),!1}throw Error(c(435,l.tag))}return Uc(e,n,i),mu(),!1}if(He)return t=dl.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Ao&&(e=Error(c(422),{cause:n}),Nr(wl(e,l)))):(n!==Ao&&(t=Error(c(423),{cause:n}),Nr(wl(t,l))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=wl(n,l),i=dc(e.stateNode,n,i),Qo(e,i),ct!==4&&(ct=2)),!1;var o=Error(c(520),{cause:n});if(o=wl(o,l),Qr===null?Qr=[o]:Qr.push(o),ct!==4&&(ct=2),t===null)return!0;n=wl(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=i&-i,l.lanes|=e,e=dc(l.stateNode,n,e),Qo(l,e),!1;case 1:if(t=l.type,o=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Wn===null||!Wn.has(o))))return l.flags|=65536,i&=-i,l.lanes|=i,i=sm(i),rm(i,e,l,n),Qo(l,i),!1}l=l.return}while(l!==null);return!1}var fc=Error(c(461)),Nt=!1;function Lt(e,t,l,n){t.child=e===null?ch(t,null,l,n):_a(t,e.child,l,n)}function im(e,t,l,n,i){l=l.render;var o=t.ref;if("ref"in n){var f={};for(var v in n)v!=="ref"&&(f[v]=n[v])}else f=n;return Aa(t),n=Zo(e,t,l,f,o,i),v=$o(),e!==null&&!Nt?(Jo(e,t,i),yn(e,t,i)):(He&&v&&Mo(t),t.flags|=1,Lt(e,t,n,i),t.child)}function um(e,t,l,n,i){if(e===null){var o=l.type;return typeof o=="function"&&!Co(o)&&o.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=o,om(e,t,o,n,i)):(e=Hi(l.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!bc(e,i)){var f=o.memoizedProps;if(l=l.compare,l=l!==null?l:yr,l(f,n)&&e.ref===t.ref)return yn(e,t,i)}return t.flags|=1,e=hn(o,n),e.ref=t.ref,e.return=t,t.child=e}function om(e,t,l,n,i){if(e!==null){var o=e.memoizedProps;if(yr(o,n)&&e.ref===t.ref)if(Nt=!1,t.pendingProps=n=o,bc(e,i))(e.flags&131072)!==0&&(Nt=!0);else return t.lanes=e.lanes,yn(e,t,i)}return hc(e,t,l,n,i)}function cm(e,t,l,n){var i=n.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|l:l,e!==null){for(n=t.child=e.child,i=0;n!==null;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~o}else n=0,t.child=null;return dm(e,t,o,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Qi(t,o!==null?o.cachePool:null),o!==null?hh(t,o):Yo(),mh(t);else return n=t.lanes=536870912,dm(e,t,o!==null?o.baseLanes|l:l,l,n)}else o!==null?(Qi(t,o.cachePool),hh(t,o),Zn(),t.memoizedState=null):(e!==null&&Qi(t,null),Yo(),Zn());return Lt(e,t,i,l),t.child}function _r(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dm(e,t,l,n,i){var o=Ho();return o=o===null?null:{parent:bt._currentValue,pool:o},t.memoizedState={baseLanes:l,cachePool:o},e!==null&&Qi(t,null),Yo(),mh(t),e!==null&&gs(e,t,n,!0),t.childLanes=i,null}function nu(e,t){return t=su({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fm(e,t,l){return _a(t,e.child,null,l),e=nu(t,t.pendingProps),e.flags|=2,fl(t),t.memoizedState=null,e}function K0(e,t,l){var n=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(He){if(n.mode==="hidden")return e=nu(t,n),t.lanes=536870912,_r(null,e);if(Ko(t),(e=at)?(e=Ep(e,Ol),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:Kl,overflow:Vl}:null,retryLane:536870912,hydrationErrors:null},l=Jf(e),l.return=t,t.child=l,Ut=t,at=null)):e=null,e===null)throw Qn(t);return t.lanes=536870912,null}return nu(t,n)}var o=e.memoizedState;if(o!==null){var f=o.dehydrated;if(Ko(t),i)if(t.flags&256)t.flags&=-257,t=fm(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Nt||gs(e,t,l,!1),i=(l&e.childLanes)!==0,Nt||i){if(n=et,n!==null&&(f=or(n,l),f!==0&&f!==o.retryLane))throw o.retryLane=f,wa(e,f),al(n,e,f),fc;mu(),t=fm(e,t,l)}else e=o.treeContext,at=kl(f.nextSibling),Ut=t,He=!0,Bn=null,Ol=!1,e!==null&&If(t,e),t=nu(t,n),t.flags|=4096;return t}return e=hn(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function au(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(c(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function hc(e,t,l,n,i){return Aa(t),l=Zo(e,t,l,n,void 0,i),n=$o(),e!==null&&!Nt?(Jo(e,t,i),yn(e,t,i)):(He&&n&&Mo(t),t.flags|=1,Lt(e,t,l,i),t.child)}function hm(e,t,l,n,i,o){return Aa(t),t.updateQueue=null,l=xh(t,n,l,i),ph(e),n=$o(),e!==null&&!Nt?(Jo(e,t,o),yn(e,t,o)):(He&&n&&Mo(t),t.flags|=1,Lt(e,t,l,o),t.child)}function mm(e,t,l,n,i){if(Aa(t),t.stateNode===null){var o=hs,f=l.contextType;typeof f=="object"&&f!==null&&(o=Ht(f)),o=new l(n,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=cc,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=n,o.state=t.memoizedState,o.refs={},qo(t),f=l.contextType,o.context=typeof f=="object"&&f!==null?Ht(f):hs,o.state=t.memoizedState,f=l.getDerivedStateFromProps,typeof f=="function"&&(oc(t,l,f,n),o.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(f=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),f!==o.state&&cc.enqueueReplaceState(o,o.state,null),Or(t,n,o,i),Mr(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){o=t.stateNode;var v=t.memoizedProps,N=Ua(l,v);o.props=N;var Y=o.context,$=l.contextType;f=hs,typeof $=="object"&&$!==null&&(f=Ht($));var te=l.getDerivedStateFromProps;$=typeof te=="function"||typeof o.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,$||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(v||Y!==f)&&em(t,o,n,f),Yn=!1;var X=t.memoizedState;o.state=X,Or(t,n,o,i),Mr(),Y=t.memoizedState,v||X!==Y||Yn?(typeof te=="function"&&(oc(t,l,te,n),Y=t.memoizedState),(N=Yn||Ph(t,l,N,n,X,Y,f))?($||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=Y),o.props=n,o.state=Y,o.context=f,n=N):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Bo(e,t),f=t.memoizedProps,$=Ua(l,f),o.props=$,te=t.pendingProps,X=o.context,Y=l.contextType,N=hs,typeof Y=="object"&&Y!==null&&(N=Ht(Y)),v=l.getDerivedStateFromProps,(Y=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(f!==te||X!==N)&&em(t,o,n,N),Yn=!1,X=t.memoizedState,o.state=X,Or(t,n,o,i),Mr();var K=t.memoizedState;f!==te||X!==K||Yn||e!==null&&e.dependencies!==null&&qi(e.dependencies)?(typeof v=="function"&&(oc(t,l,v,n),K=t.memoizedState),($=Yn||Ph(t,l,$,n,X,K,N)||e!==null&&e.dependencies!==null&&qi(e.dependencies))?(Y||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,K,N),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,K,N)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||f===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=K),o.props=n,o.state=K,o.context=N,n=$):(typeof o.componentDidUpdate!="function"||f===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),n=!1)}return o=n,au(e,t),n=(t.flags&128)!==0,o||n?(o=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&n?(t.child=_a(t,e.child,null,i),t.child=_a(t,null,l,i)):Lt(e,t,l,i),t.memoizedState=o.state,e=t.child):e=yn(e,t,i),e}function pm(e,t,l,n){return Ma(),t.flags|=256,Lt(e,t,l,n),t.child}var mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pc(e){return{baseLanes:e,cachePool:ah()}}function xc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=ml),e}function xm(e,t,l){var n=t.pendingProps,i=!1,o=(t.flags&128)!==0,f;if((f=o)||(f=e!==null&&e.memoizedState===null?!1:(pt.current&2)!==0),f&&(i=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(He){if(i?Vn(t):Zn(),(e=at)?(e=Ep(e,Ol),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:Kl,overflow:Vl}:null,retryLane:536870912,hydrationErrors:null},l=Jf(e),l.return=t,t.child=l,Ut=t,at=null)):e=null,e===null)throw Qn(t);return Ic(e)?t.lanes=32:t.lanes=536870912,null}var v=n.children;return n=n.fallback,i?(Zn(),i=t.mode,v=su({mode:"hidden",children:v},i),n=Ta(n,i,l,null),v.return=t,n.return=t,v.sibling=n,t.child=v,n=t.child,n.memoizedState=pc(l),n.childLanes=xc(e,f,l),t.memoizedState=mc,_r(null,n)):(Vn(t),gc(t,v))}var N=e.memoizedState;if(N!==null&&(v=N.dehydrated,v!==null)){if(o)t.flags&256?(Vn(t),t.flags&=-257,t=vc(e,t,l)):t.memoizedState!==null?(Zn(),t.child=e.child,t.flags|=128,t=null):(Zn(),v=n.fallback,i=t.mode,n=su({mode:"visible",children:n.children},i),v=Ta(v,i,l,null),v.flags|=2,n.return=t,v.return=t,n.sibling=v,t.child=n,_a(t,e.child,null,l),n=t.child,n.memoizedState=pc(l),n.childLanes=xc(e,f,l),t.memoizedState=mc,t=_r(null,n));else if(Vn(t),Ic(v)){if(f=v.nextSibling&&v.nextSibling.dataset,f)var Y=f.dgst;f=Y,n=Error(c(419)),n.stack="",n.digest=f,Nr({value:n,source:null,stack:null}),t=vc(e,t,l)}else if(Nt||gs(e,t,l,!1),f=(l&e.childLanes)!==0,Nt||f){if(f=et,f!==null&&(n=or(f,l),n!==0&&n!==N.retryLane))throw N.retryLane=n,wa(e,n),al(f,e,n),fc;Wc(v)||mu(),t=vc(e,t,l)}else Wc(v)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,at=kl(v.nextSibling),Ut=t,He=!0,Bn=null,Ol=!1,e!==null&&If(t,e),t=gc(t,n.children),t.flags|=4096);return t}return i?(Zn(),v=n.fallback,i=t.mode,N=e.child,Y=N.sibling,n=hn(N,{mode:"hidden",children:n.children}),n.subtreeFlags=N.subtreeFlags&65011712,Y!==null?v=hn(Y,v):(v=Ta(v,i,l,null),v.flags|=2),v.return=t,n.return=t,n.sibling=v,t.child=n,_r(null,n),n=t.child,v=e.child.memoizedState,v===null?v=pc(l):(i=v.cachePool,i!==null?(N=bt._currentValue,i=i.parent!==N?{parent:N,pool:N}:i):i=ah(),v={baseLanes:v.baseLanes|l,cachePool:i}),n.memoizedState=v,n.childLanes=xc(e,f,l),t.memoizedState=mc,_r(e.child,n)):(Vn(t),l=e.child,e=l.sibling,l=hn(l,{mode:"visible",children:n.children}),l.return=t,l.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=l,t.memoizedState=null,l)}function gc(e,t){return t=su({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function su(e,t){return e=cl(22,e,null,t),e.lanes=0,e}function vc(e,t,l){return _a(t,e.child,null,l),e=gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gm(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),zo(e.return,t,l)}function yc(e,t,l,n,i,o){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:i,treeForkCount:o}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=n,f.tail=l,f.tailMode=i,f.treeForkCount=o)}function vm(e,t,l){var n=t.pendingProps,i=n.revealOrder,o=n.tail;n=n.children;var f=pt.current,v=(f&2)!==0;if(v?(f=f&1|2,t.flags|=128):f&=1,ee(pt,f),Lt(e,t,n,l),n=He?jr:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gm(e,l,t);else if(e.tag===19)gm(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(l=t.child,i=null;l!==null;)e=l.alternate,e!==null&&Zi(e)===null&&(i=l),l=l.sibling;l=i,l===null?(i=t.child,t.child=null):(i=l.sibling,l.sibling=null),yc(t,!1,i,l,o,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Zi(e)===null){t.child=i;break}e=i.sibling,i.sibling=l,l=i,i=e}yc(t,!0,l,null,o,n);break;case"together":yc(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function yn(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Fn|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(gs(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,l=hn(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=hn(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function bc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&qi(e)))}function V0(e,t,l){switch(t.tag){case 3:Se(t,t.stateNode.containerInfo),Gn(t,bt,e.memoizedState.cache),Ma();break;case 27:case 5:mt(t);break;case 4:Se(t,t.stateNode.containerInfo);break;case 10:Gn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ko(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Vn(t),t.flags|=128,null):(l&t.child.childLanes)!==0?xm(e,t,l):(Vn(t),e=yn(e,t,l),e!==null?e.sibling:null);Vn(t);break;case 19:var i=(e.flags&128)!==0;if(n=(l&t.childLanes)!==0,n||(gs(e,t,l,!1),n=(l&t.childLanes)!==0),i){if(n)return vm(e,t,l);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ee(pt,pt.current),n)break;return null;case 22:return t.lanes=0,cm(e,t,l,t.pendingProps);case 24:Gn(t,bt,e.memoizedState.cache)}return yn(e,t,l)}function ym(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Nt=!0;else{if(!bc(e,l)&&(t.flags&128)===0)return Nt=!1,V0(e,t,l);Nt=(e.flags&131072)!==0}else Nt=!1,He&&(t.flags&1048576)!==0&&Wf(t,jr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Ra(t.elementType),t.type=e,typeof e=="function")Co(e)?(n=Ua(e,n),t.tag=1,t=mm(null,t,e,n,l)):(t.tag=0,t=hc(null,t,e,n,l));else{if(e!=null){var i=e.$$typeof;if(i===A){t.tag=11,t=im(null,t,e,n,l);break e}else if(i===T){t.tag=14,t=um(null,t,e,n,l);break e}}throw t=oe(e)||e,Error(c(306,t,""))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,i=Ua(n,t.pendingProps),mm(e,t,n,i,l);case 3:e:{if(Se(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var o=t.memoizedState;i=o.element,Bo(e,t),Or(t,n,null,l);var f=t.memoizedState;if(n=f.cache,Gn(t,bt,n),n!==o.cache&&_o(t,[bt],l,!0),Mr(),n=f.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=pm(e,t,n,l);break e}else if(n!==i){i=wl(Error(c(424)),t),Nr(i),t=pm(e,t,n,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(at=kl(e.firstChild),Ut=t,He=!0,Bn=null,Ol=!0,l=ch(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ma(),n===i){t=yn(e,t,l);break e}Lt(e,t,n,l)}t=t.child}return t;case 26:return au(e,t),e===null?(l=Ap(t.type,null,t.pendingProps,null))?t.memoizedState=l:He||(l=t.type,e=t.pendingProps,n=ju(ve.current).createElement(l),n[yt]=t,n[Bt]=e,qt(n,l,e),ge(n),t.stateNode=n):t.memoizedState=Ap(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return mt(t),e===null&&He&&(n=t.stateNode=Tp(t.type,t.pendingProps,ve.current),Ut=t,Ol=!0,i=at,ta(t.type)?(Pc=i,at=kl(n.firstChild)):at=i),Lt(e,t,t.pendingProps.children,l),au(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&He&&((i=n=at)&&(n=Nv(n,t.type,t.pendingProps,Ol),n!==null?(t.stateNode=n,Ut=t,at=kl(n.firstChild),Ol=!1,i=!0):i=!1),i||Qn(t)),mt(t),i=t.type,o=t.pendingProps,f=e!==null?e.memoizedProps:null,n=o.children,$c(i,o)?n=null:f!==null&&$c(i,f)&&(t.flags|=32),t.memoizedState!==null&&(i=Zo(e,t,H0,null,null,l),Jr._currentValue=i),au(e,t),Lt(e,t,n,l),t.child;case 6:return e===null&&He&&((e=l=at)&&(l=Sv(l,t.pendingProps,Ol),l!==null?(t.stateNode=l,Ut=t,at=null,e=!0):e=!1),e||Qn(t)),null;case 13:return xm(e,t,l);case 4:return Se(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=_a(t,null,n,l):Lt(e,t,n,l),t.child;case 11:return im(e,t,t.type,t.pendingProps,l);case 7:return Lt(e,t,t.pendingProps,l),t.child;case 8:return Lt(e,t,t.pendingProps.children,l),t.child;case 12:return Lt(e,t,t.pendingProps.children,l),t.child;case 10:return n=t.pendingProps,Gn(t,t.type,n.value),Lt(e,t,n.children,l),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,Aa(t),i=Ht(i),n=n(i),t.flags|=1,Lt(e,t,n,l),t.child;case 14:return um(e,t,t.type,t.pendingProps,l);case 15:return om(e,t,t.type,t.pendingProps,l);case 19:return vm(e,t,l);case 31:return K0(e,t,l);case 22:return cm(e,t,l,t.pendingProps);case 24:return Aa(t),n=Ht(bt),e===null?(i=Ho(),i===null&&(i=et,o=Do(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=l),i=o),t.memoizedState={parent:n,cache:i},qo(t),Gn(t,bt,i)):((e.lanes&l)!==0&&(Bo(e,t),Or(t,null,null,l),Mr()),i=e.memoizedState,o=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Gn(t,bt,n)):(n=o.cache,Gn(t,bt,n),n!==i.cache&&_o(t,[bt],l,!0))),Lt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function bn(e){e.flags|=4}function jc(e,t,l,n,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Vm())e.flags|=8192;else throw za=Yi,Lo}else e.flags&=-16777217}function bm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Dp(t))if(Vm())e.flags|=8192;else throw za=Yi,Lo}function ru(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?an():536870912,e.lanes|=t,Os|=t)}function Dr(e,t){if(!He)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function st(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var i=e.child;i!==null;)l|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)l|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function Z0(e,t,l){var n=t.pendingProps;switch(Oo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return st(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),xn(bt),Oe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(xs(t)?bn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ko())),st(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(bn(t),o!==null?(st(t),bm(t,o)):(st(t),jc(t,i,null,n,l))):o?o!==e.memoizedState?(bn(t),st(t),bm(t,o)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&bn(t),st(t),jc(t,i,e,n,l)),null;case 27:if(Xt(t),l=ve.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&bn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return st(t),null}e=re.current,xs(t)?Pf(t):(e=Tp(i,n,l),t.stateNode=e,bn(t))}return st(t),null;case 5:if(Xt(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&bn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return st(t),null}if(o=re.current,xs(t))Pf(t);else{var f=ju(ve.current);switch(o){case 1:o=f.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:o=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":o=f.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":o=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":o=f.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof n.is=="string"?f.createElement("select",{is:n.is}):f.createElement("select"),n.multiple?o.multiple=!0:n.size&&(o.size=n.size);break;default:o=typeof n.is=="string"?f.createElement(i,{is:n.is}):f.createElement(i)}}o[yt]=t,o[Bt]=n;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)o.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=o;e:switch(qt(o,i,n),i){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&bn(t)}}return st(t),jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&bn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=ve.current,xs(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,i=Ut,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[yt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||xp(e.nodeValue,l)),e||Qn(t,!0)}else e=ju(e).createTextNode(n),e[yt]=t,t.stateNode=e}return st(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=xs(t),l!==null){if(e===null){if(!n)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[yt]=t}else Ma(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else l=ko(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(fl(t),t):(fl(t),null);if((t.flags&128)!==0)throw Error(c(558))}return st(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=xs(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(c(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(c(317));i[yt]=t}else Ma(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),i=!1}else i=ko(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(fl(t),t):(fl(t),null)}return fl(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==i&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),ru(t,t.updateQueue),st(t),null);case 4:return Oe(),e===null&&Yc(t.stateNode.containerInfo),st(t),null;case 10:return xn(t.type),st(t),null;case 19:if(H(pt),n=t.memoizedState,n===null)return st(t),null;if(i=(t.flags&128)!==0,o=n.rendering,o===null)if(i)Dr(n,!1);else{if(ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Zi(e),o!==null){for(t.flags|=128,Dr(n,!1),e=o.updateQueue,t.updateQueue=e,ru(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)$f(l,e),l=l.sibling;return ee(pt,pt.current&1|2),He&&mn(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Kt()>du&&(t.flags|=128,i=!0,Dr(n,!1),t.lanes=4194304)}else{if(!i)if(e=Zi(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,ru(t,e),Dr(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!He)return st(t),null}else 2*Kt()-n.renderingStartTime>du&&l!==536870912&&(t.flags|=128,i=!0,Dr(n,!1),t.lanes=4194304);n.isBackwards?(o.sibling=t.child,t.child=o):(e=n.last,e!==null?e.sibling=o:t.child=o,n.last=o)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Kt(),e.sibling=null,l=pt.current,ee(pt,i?l&1|2:l&1),He&&mn(t,n.treeForkCount),e):(st(t),null);case 22:case 23:return fl(t),Xo(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),l=t.updateQueue,l!==null&&ru(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&H(ka),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),xn(bt),st(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function $0(e,t){switch(Oo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xn(bt),Oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Xt(t),null;case 31:if(t.memoizedState!==null){if(fl(t),t.alternate===null)throw Error(c(340));Ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fl(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(pt),null;case 4:return Oe(),null;case 10:return xn(t.type),null;case 22:case 23:return fl(t),Xo(),e!==null&&H(ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xn(bt),null;case 25:return null;default:return null}}function jm(e,t){switch(Oo(t),t.tag){case 3:xn(bt),Oe();break;case 26:case 27:case 5:Xt(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&fl(t);break;case 13:fl(t);break;case 19:H(pt);break;case 10:xn(t.type);break;case 22:case 23:fl(t),Xo(),e!==null&&H(ka);break;case 24:xn(bt)}}function Ur(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var i=n.next;l=i;do{if((l.tag&e)===e){n=void 0;var o=l.create,f=l.inst;n=o(),f.destroy=n}l=l.next}while(l!==i)}}catch(v){Je(t,t.return,v)}}function $n(e,t,l){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var o=i.next;n=o;do{if((n.tag&e)===e){var f=n.inst,v=f.destroy;if(v!==void 0){f.destroy=void 0,i=t;var N=l,Y=v;try{Y()}catch($){Je(i,N,$)}}}n=n.next}while(n!==o)}}catch($){Je(t,t.return,$)}}function Nm(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{fh(t,l)}catch(n){Je(e,e.return,n)}}}function Sm(e,t,l){l.props=Ua(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){Je(e,t,n)}}function Hr(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(i){Je(e,t,i)}}function Zl(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(i){Je(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(i){Je(e,t,i)}else l.current=null}function Em(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(i){Je(e,e.return,i)}}function Nc(e,t,l){try{var n=e.stateNode;xv(n,e.type,l,t),n[Bt]=t}catch(i){Je(e,e.return,i)}}function Cm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ta(e.type)||e.tag===4}function Sc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cm(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&&ta(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 Ec(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=dn));else if(n!==4&&(n===27&&ta(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Ec(e,t,l),e=e.sibling;e!==null;)Ec(e,t,l),e=e.sibling}function iu(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(n!==4&&(n===27&&ta(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(iu(e,t,l),e=e.sibling;e!==null;)iu(e,t,l),e=e.sibling}function wm(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);qt(t,n,l),t[yt]=e,t[Bt]=l}catch(o){Je(e,e.return,o)}}var jn=!1,St=!1,Cc=!1,Tm=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function J0(e,t){if(e=e.containerInfo,Vc=Mu,e=qf(e),vo(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{l.nodeType,o.nodeType}catch{l=null;break e}var f=0,v=-1,N=-1,Y=0,$=0,te=e,X=null;t:for(;;){for(var K;te!==l||i!==0&&te.nodeType!==3||(v=f+i),te!==o||n!==0&&te.nodeType!==3||(N=f+n),te.nodeType===3&&(f+=te.nodeValue.length),(K=te.firstChild)!==null;)X=te,te=K;for(;;){if(te===e)break t;if(X===l&&++Y===i&&(v=f),X===o&&++$===n&&(N=f),(K=te.nextSibling)!==null)break;te=X,X=te.parentNode}te=K}l=v===-1||N===-1?null:{start:v,end:N}}else l=null}l=l||{start:0,end:0}}else l=null;for(Zc={focusedElem:e,selectionRange:l},Mu=!1,Rt=t;Rt!==null;)if(t=Rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Rt=e;else for(;Rt!==null;){switch(t=Rt,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)i=e[l],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,l=t,i=o.memoizedProps,o=o.memoizedState,n=l.stateNode;try{var me=Ua(l.type,i);e=n.getSnapshotBeforeUpdate(me,o),n.__reactInternalSnapshotBeforeUpdate=e}catch(Ne){Je(l,l.return,Ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Fc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Rt=e;break}Rt=t.return}}function Mm(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:Sn(e,l),n&4&&Ur(5,l);break;case 1:if(Sn(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(f){Je(l,l.return,f)}else{var i=Ua(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Je(l,l.return,f)}}n&64&&Nm(l),n&512&&Hr(l,l.return);break;case 3:if(Sn(e,l),n&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{fh(e,t)}catch(f){Je(l,l.return,f)}}break;case 27:t===null&&n&4&&wm(l);case 26:case 5:Sn(e,l),t===null&&n&4&&Em(l),n&512&&Hr(l,l.return);break;case 12:Sn(e,l);break;case 31:Sn(e,l),n&4&&km(e,l);break;case 13:Sn(e,l),n&4&&Rm(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=av.bind(null,l),Ev(e,l))));break;case 22:if(n=l.memoizedState!==null||jn,!n){t=t!==null&&t.memoizedState!==null||St,i=jn;var o=St;jn=n,(St=t)&&!o?En(e,l,(l.subtreeFlags&8772)!==0):Sn(e,l),jn=i,St=o}break;case 30:break;default:Sn(e,l)}}function Om(e){var t=e.alternate;t!==null&&(e.alternate=null,Om(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ae(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 rt=null,el=!1;function Nn(e,t,l){for(l=l.child;l!==null;)Am(e,t,l),l=l.sibling}function Am(e,t,l){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(Nl,l)}catch{}switch(l.tag){case 26:St||Zl(l,t),Nn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:St||Zl(l,t);var n=rt,i=el;ta(l.type)&&(rt=l.stateNode,el=!1),Nn(e,t,l),Vr(l.stateNode),rt=n,el=i;break;case 5:St||Zl(l,t);case 6:if(n=rt,i=el,rt=null,Nn(e,t,l),rt=n,el=i,rt!==null)if(el)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(l.stateNode)}catch(o){Je(l,t,o)}else try{rt.removeChild(l.stateNode)}catch(o){Je(l,t,o)}break;case 18:rt!==null&&(el?(e=rt,Np(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Hs(e)):Np(rt,l.stateNode));break;case 4:n=rt,i=el,rt=l.stateNode.containerInfo,el=!0,Nn(e,t,l),rt=n,el=i;break;case 0:case 11:case 14:case 15:$n(2,l,t),St||$n(4,l,t),Nn(e,t,l);break;case 1:St||(Zl(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&Sm(l,t,n)),Nn(e,t,l);break;case 21:Nn(e,t,l);break;case 22:St=(n=St)||l.memoizedState!==null,Nn(e,t,l),St=n;break;default:Nn(e,t,l)}}function km(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hs(e)}catch(l){Je(t,t.return,l)}}}function Rm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hs(e)}catch(l){Je(t,t.return,l)}}function F0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Tm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Tm),t;default:throw Error(c(435,e.tag))}}function uu(e,t){var l=F0(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var i=sv.bind(null,e,n);n.then(i,i)}})}function tl(e,t){var l=t.deletions;if(l!==null)for(var n=0;n<l.length;n++){var i=l[n],o=e,f=t,v=f;e:for(;v!==null;){switch(v.tag){case 27:if(ta(v.type)){rt=v.stateNode,el=!1;break e}break;case 5:rt=v.stateNode,el=!1;break e;case 3:case 4:rt=v.stateNode.containerInfo,el=!0;break e}v=v.return}if(rt===null)throw Error(c(160));Am(o,f,i),rt=null,el=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)zm(t,e),t=t.sibling}var Hl=null;function zm(e,t){var l=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tl(t,e),ll(e),n&4&&($n(3,e,e.return),Ur(3,e),$n(5,e,e.return));break;case 1:tl(t,e),ll(e),n&512&&(St||l===null||Zl(l,l.return)),n&64&&jn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var i=Hl;if(tl(t,e),ll(e),n&512&&(St||l===null||Zl(l,l.return)),n&4){var o=l!==null?l.memoizedState:null;if(n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null){e:{n=e.type,l=e.memoizedProps,i=i.ownerDocument||i;t:switch(n){case"title":o=i.getElementsByTagName("title")[0],(!o||o[W]||o[yt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=i.createElement(n),i.head.insertBefore(o,i.querySelector("head > title"))),qt(o,n,l),o[yt]=e,ge(o),n=o;break e;case"link":var f=zp("link","href",i).get(n+(l.href||""));if(f){for(var v=0;v<f.length;v++)if(o=f[v],o.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&o.getAttribute("rel")===(l.rel==null?null:l.rel)&&o.getAttribute("title")===(l.title==null?null:l.title)&&o.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){f.splice(v,1);break t}}o=i.createElement(n),qt(o,n,l),i.head.appendChild(o);break;case"meta":if(f=zp("meta","content",i).get(n+(l.content||""))){for(v=0;v<f.length;v++)if(o=f[v],o.getAttribute("content")===(l.content==null?null:""+l.content)&&o.getAttribute("name")===(l.name==null?null:l.name)&&o.getAttribute("property")===(l.property==null?null:l.property)&&o.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&o.getAttribute("charset")===(l.charSet==null?null:l.charSet)){f.splice(v,1);break t}}o=i.createElement(n),qt(o,n,l),i.head.appendChild(o);break;default:throw Error(c(468,n))}o[yt]=e,ge(o),n=o}e.stateNode=n}else _p(i,e.type,e.stateNode);else e.stateNode=Rp(i,n,e.memoizedProps);else o!==n?(o===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):o.count--,n===null?_p(i,e.type,e.stateNode):Rp(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Nc(e,e.memoizedProps,l.memoizedProps)}break;case 27:tl(t,e),ll(e),n&512&&(St||l===null||Zl(l,l.return)),l!==null&&n&4&&Nc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(tl(t,e),ll(e),n&512&&(St||l===null||Zl(l,l.return)),e.flags&32){i=e.stateNode;try{rs(i,"")}catch(me){Je(e,e.return,me)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,Nc(e,i,l!==null?l.memoizedProps:i)),n&1024&&(Cc=!0);break;case 6:if(tl(t,e),ll(e),n&4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,l=e.stateNode;try{l.nodeValue=n}catch(me){Je(e,e.return,me)}}break;case 3:if(Eu=null,i=Hl,Hl=Nu(t.containerInfo),tl(t,e),Hl=i,ll(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{Hs(t.containerInfo)}catch(me){Je(e,e.return,me)}Cc&&(Cc=!1,_m(e));break;case 4:n=Hl,Hl=Nu(e.stateNode.containerInfo),tl(t,e),ll(e),Hl=n;break;case 12:tl(t,e),ll(e);break;case 31:tl(t,e),ll(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,uu(e,n)));break;case 13:tl(t,e),ll(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(cu=Kt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,uu(e,n)));break;case 22:i=e.memoizedState!==null;var N=l!==null&&l.memoizedState!==null,Y=jn,$=St;if(jn=Y||i,St=$||N,tl(t,e),St=$,jn=Y,ll(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(l===null||N||jn||St||Ha(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){N=l=t;try{if(o=N.stateNode,i)f=o.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{v=N.stateNode;var te=N.memoizedProps.style,X=te!=null&&te.hasOwnProperty("display")?te.display:null;v.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(me){Je(N,N.return,me)}}}else if(t.tag===6){if(l===null){N=t;try{N.stateNode.nodeValue=i?"":N.memoizedProps}catch(me){Je(N,N.return,me)}}}else if(t.tag===18){if(l===null){N=t;try{var K=N.stateNode;i?Sp(K,!0):Sp(N.stateNode,!1)}catch(me){Je(N,N.return,me)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,uu(e,l))));break;case 19:tl(t,e),ll(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,uu(e,n)));break;case 30:break;case 21:break;default:tl(t,e),ll(e)}}function ll(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(Cm(n)){l=n;break}n=n.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var i=l.stateNode,o=Sc(e);iu(e,o,i);break;case 5:var f=l.stateNode;l.flags&32&&(rs(f,""),l.flags&=-33);var v=Sc(e);iu(e,v,f);break;case 3:case 4:var N=l.stateNode.containerInfo,Y=Sc(e);Ec(e,Y,N);break;default:throw Error(c(161))}}catch($){Je(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _m(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_m(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Mm(e,t.alternate,t),t=t.sibling}function Ha(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),Ha(t);break;case 1:Zl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Sm(t,t.return,l),Ha(t);break;case 27:Vr(t.stateNode);case 26:case 5:Zl(t,t.return),Ha(t);break;case 22:t.memoizedState===null&&Ha(t);break;case 30:Ha(t);break;default:Ha(t)}e=e.sibling}}function En(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,o=t,f=o.flags;switch(o.tag){case 0:case 11:case 15:En(i,o,l),Ur(4,o);break;case 1:if(En(i,o,l),n=o,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(Y){Je(n,n.return,Y)}if(n=o,i=n.updateQueue,i!==null){var v=n.stateNode;try{var N=i.shared.hiddenCallbacks;if(N!==null)for(i.shared.hiddenCallbacks=null,i=0;i<N.length;i++)dh(N[i],v)}catch(Y){Je(n,n.return,Y)}}l&&f&64&&Nm(o),Hr(o,o.return);break;case 27:wm(o);case 26:case 5:En(i,o,l),l&&n===null&&f&4&&Em(o),Hr(o,o.return);break;case 12:En(i,o,l);break;case 31:En(i,o,l),l&&f&4&&km(i,o);break;case 13:En(i,o,l),l&&f&4&&Rm(i,o);break;case 22:o.memoizedState===null&&En(i,o,l),Hr(o,o.return);break;case 30:break;default:En(i,o,l)}t=t.sibling}}function wc(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Sr(l))}function Tc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Sr(e))}function Ll(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dm(e,t,l,n),t=t.sibling}function Dm(e,t,l,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ll(e,t,l,n),i&2048&&Ur(9,t);break;case 1:Ll(e,t,l,n);break;case 3:Ll(e,t,l,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Sr(e)));break;case 12:if(i&2048){Ll(e,t,l,n),e=t.stateNode;try{var o=t.memoizedProps,f=o.id,v=o.onPostCommit;typeof v=="function"&&v(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Je(t,t.return,N)}}else Ll(e,t,l,n);break;case 31:Ll(e,t,l,n);break;case 13:Ll(e,t,l,n);break;case 23:break;case 22:o=t.stateNode,f=t.alternate,t.memoizedState!==null?o._visibility&2?Ll(e,t,l,n):Lr(e,t):o._visibility&2?Ll(e,t,l,n):(o._visibility|=2,ws(e,t,l,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&wc(f,t);break;case 24:Ll(e,t,l,n),i&2048&&Tc(t.alternate,t);break;default:Ll(e,t,l,n)}}function ws(e,t,l,n,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,f=t,v=l,N=n,Y=f.flags;switch(f.tag){case 0:case 11:case 15:ws(o,f,v,N,i),Ur(8,f);break;case 23:break;case 22:var $=f.stateNode;f.memoizedState!==null?$._visibility&2?ws(o,f,v,N,i):Lr(o,f):($._visibility|=2,ws(o,f,v,N,i)),i&&Y&2048&&wc(f.alternate,f);break;case 24:ws(o,f,v,N,i),i&&Y&2048&&Tc(f.alternate,f);break;default:ws(o,f,v,N,i)}t=t.sibling}}function Lr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,i=n.flags;switch(n.tag){case 22:Lr(l,n),i&2048&&wc(n.alternate,n);break;case 24:Lr(l,n),i&2048&&Tc(n.alternate,n);break;default:Lr(l,n)}t=t.sibling}}var qr=8192;function Ts(e,t,l){if(e.subtreeFlags&qr)for(e=e.child;e!==null;)Um(e,t,l),e=e.sibling}function Um(e,t,l){switch(e.tag){case 26:Ts(e,t,l),e.flags&qr&&e.memoizedState!==null&&Uv(l,Hl,e.memoizedState,e.memoizedProps);break;case 5:Ts(e,t,l);break;case 3:case 4:var n=Hl;Hl=Nu(e.stateNode.containerInfo),Ts(e,t,l),Hl=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=qr,qr=16777216,Ts(e,t,l),qr=n):Ts(e,t,l));break;default:Ts(e,t,l)}}function Hm(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 Br(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];Rt=n,qm(n,e)}Hm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lm(e),e=e.sibling}function Lm(e){switch(e.tag){case 0:case 11:case 15:Br(e),e.flags&2048&&$n(9,e,e.return);break;case 3:Br(e);break;case 12:Br(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ou(e)):Br(e);break;default:Br(e)}}function ou(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];Rt=n,qm(n,e)}Hm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:$n(8,t,t.return),ou(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,ou(t));break;default:ou(t)}e=e.sibling}}function qm(e,t){for(;Rt!==null;){var l=Rt;switch(l.tag){case 0:case 11:case 15:$n(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Sr(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,Rt=n;else e:for(l=e;Rt!==null;){n=Rt;var i=n.sibling,o=n.return;if(Om(n),n===l){Rt=null;break e}if(i!==null){i.return=o,Rt=i;break e}Rt=o}}}var W0={getCacheForType:function(e){var t=Ht(bt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Ht(bt).controller.signal}},I0=typeof WeakMap=="function"?WeakMap:Map,Ke=0,et=null,ke=null,ze=0,$e=0,hl=null,Jn=!1,Ms=!1,Mc=!1,Cn=0,ct=0,Fn=0,La=0,Oc=0,ml=0,Os=0,Qr=null,nl=null,Ac=!1,cu=0,Bm=0,du=1/0,fu=null,Wn=null,Mt=0,In=null,As=null,wn=0,kc=0,Rc=null,Qm=null,Gr=0,zc=null;function pl(){return(Ke&2)!==0&&ze!==0?ze&-ze:D.T!==null?qc():Hn()}function Gm(){if(ml===0)if((ze&536870912)===0||He){var e=es;es<<=1,(es&3932160)===0&&(es=262144),ml=e}else ml=536870912;return e=dl.current,e!==null&&(e.flags|=32),ml}function al(e,t,l){(e===et&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(ks(e,0),Pn(e,ze,ml,!1)),ul(e,l),((Ke&2)===0||e!==et)&&(e===et&&((Ke&2)===0&&(La|=l),ct===4&&Pn(e,ze,ml,!1)),$l(e))}function Ym(e,t,l){if((Ke&6)!==0)throw Error(c(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Yl(e,t),i=n?tv(e,t):Dc(e,t,!0),o=n;do{if(i===0){Ms&&!n&&Pn(e,t,0,!1);break}else{if(l=e.current.alternate,o&&!P0(l)){i=Dc(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var v=e;i=Qr;var N=v.current.memoizedState.isDehydrated;if(N&&(ks(v,f).flags|=256),f=Dc(v,f,!1),f!==2){if(Mc&&!N){v.errorRecoveryDisabledLanes|=o,La|=o,i=4;break e}o=nl,nl=i,o!==null&&(nl===null?nl=o:nl.push.apply(nl,o))}i=f}if(o=!1,i!==2)continue}}if(i===1){ks(e,0),Pn(e,t,0,!0);break}e:{switch(n=e,o=i,o){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Pn(n,t,ml,!Jn);break e;case 2:nl=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(i=cu+300-Kt(),10<i)){if(Pn(n,t,ml,!Jn),ls(n,0,!0)!==0)break e;wn=t,n.timeoutHandle=bp(Xm.bind(null,n,l,nl,fu,Ac,t,ml,La,Os,Jn,o,"Throttled",-0,0),i);break e}Xm(n,l,nl,fu,Ac,t,ml,La,Os,Jn,o,null,-0,0)}}break}while(!0);$l(e)}function Xm(e,t,l,n,i,o,f,v,N,Y,$,te,X,K){if(e.timeoutHandle=-1,te=t.subtreeFlags,te&8192||(te&16785408)===16785408){te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:dn},Um(t,o,te);var me=(o&62914560)===o?cu-Kt():(o&4194048)===o?Bm-Kt():0;if(me=Hv(te,me),me!==null){wn=o,e.cancelPendingCommit=me(Im.bind(null,e,t,o,l,n,i,f,v,N,$,te,null,X,K)),Pn(e,o,f,!Y);return}}Im(e,t,o,l,n,i,f,v,N)}function P0(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var i=l[n],o=i.getSnapshot;i=i.value;try{if(!ol(o(),i))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Pn(e,t,l,n){t&=~Oc,t&=~La,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var o=31-Zt(i),f=1<<o;n[o]=-1,i&=~f}l!==0&&bi(e,l,t)}function hu(){return(Ke&6)===0?(Yr(0),!1):!0}function _c(){if(ke!==null){if($e===0)var e=ke.return;else e=ke,pn=Oa=null,Fo(e),js=null,Cr=0,e=ke;for(;e!==null;)jm(e.alternate,e),e=e.return;ke=null}}function ks(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,yv(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),wn=0,_c(),et=e,ke=l=hn(e.current,null),ze=t,$e=0,hl=null,Jn=!1,Ms=Yl(e,t),Mc=!1,Os=ml=Oc=La=Fn=ct=0,nl=Qr=null,Ac=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-Zt(n),o=1<<i;t|=e[i],n&=~o}return Cn=t,_i(),l}function Km(e,t){we=null,D.H=zr,t===bs||t===Gi?(t=ih(),$e=3):t===Lo?(t=ih(),$e=4):$e=t===fc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,hl=t,ke===null&&(ct=1,lu(e,wl(t,e.current)))}function Vm(){var e=dl.current;return e===null?!0:(ze&4194048)===ze?Al===null:(ze&62914560)===ze||(ze&536870912)!==0?e===Al:!1}function Zm(){var e=D.H;return D.H=zr,e===null?zr:e}function $m(){var e=D.A;return D.A=W0,e}function mu(){ct=4,Jn||(ze&4194048)!==ze&&dl.current!==null||(Ms=!0),(Fn&134217727)===0&&(La&134217727)===0||et===null||Pn(et,ze,ml,!1)}function Dc(e,t,l){var n=Ke;Ke|=2;var i=Zm(),o=$m();(et!==e||ze!==t)&&(fu=null,ks(e,t)),t=!1;var f=ct;e:do try{if($e!==0&&ke!==null){var v=ke,N=hl;switch($e){case 8:_c(),f=6;break e;case 3:case 2:case 9:case 6:dl.current===null&&(t=!0);var Y=$e;if($e=0,hl=null,Rs(e,v,N,Y),l&&Ms){f=0;break e}break;default:Y=$e,$e=0,hl=null,Rs(e,v,N,Y)}}ev(),f=ct;break}catch($){Km(e,$)}while(!0);return t&&e.shellSuspendCounter++,pn=Oa=null,Ke=n,D.H=i,D.A=o,ke===null&&(et=null,ze=0,_i()),f}function ev(){for(;ke!==null;)Jm(ke)}function tv(e,t){var l=Ke;Ke|=2;var n=Zm(),i=$m();et!==e||ze!==t?(fu=null,du=Kt()+500,ks(e,t)):Ms=Yl(e,t);e:do try{if($e!==0&&ke!==null){t=ke;var o=hl;t:switch($e){case 1:$e=0,hl=null,Rs(e,t,o,1);break;case 2:case 9:if(sh(o)){$e=0,hl=null,Fm(t);break}t=function(){$e!==2&&$e!==9||et!==e||($e=7),$l(e)},o.then(t,t);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:sh(o)?($e=0,hl=null,Fm(t)):($e=0,hl=null,Rs(e,t,o,7));break;case 5:var f=null;switch(ke.tag){case 26:f=ke.memoizedState;case 5:case 27:var v=ke;if(f?Dp(f):v.stateNode.complete){$e=0,hl=null;var N=v.sibling;if(N!==null)ke=N;else{var Y=v.return;Y!==null?(ke=Y,pu(Y)):ke=null}break t}}$e=0,hl=null,Rs(e,t,o,5);break;case 6:$e=0,hl=null,Rs(e,t,o,6);break;case 8:_c(),ct=6;break e;default:throw Error(c(462))}}lv();break}catch($){Km(e,$)}while(!0);return pn=Oa=null,D.H=n,D.A=i,Ke=l,ke!==null?0:(et=null,ze=0,_i(),ct)}function lv(){for(;ke!==null&&!vt();)Jm(ke)}function Jm(e){var t=ym(e.alternate,e,Cn);e.memoizedProps=e.pendingProps,t===null?pu(e):ke=t}function Fm(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=hm(l,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=hm(l,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:Fo(t);default:jm(l,t),t=ke=$f(t,Cn),t=ym(l,t,Cn)}e.memoizedProps=e.pendingProps,t===null?pu(e):ke=t}function Rs(e,t,l,n){pn=Oa=null,Fo(t),js=null,Cr=0;var i=t.return;try{if(X0(e,i,t,l,ze)){ct=1,lu(e,wl(l,e.current)),ke=null;return}}catch(o){if(i!==null)throw ke=i,o;ct=1,lu(e,wl(l,e.current)),ke=null;return}t.flags&32768?(He||n===1?e=!0:Ms||(ze&536870912)!==0?e=!1:(Jn=e=!0,(n===2||n===9||n===3||n===6)&&(n=dl.current,n!==null&&n.tag===13&&(n.flags|=16384))),Wm(t,e)):pu(t)}function pu(e){var t=e;do{if((t.flags&32768)!==0){Wm(t,Jn);return}e=t.return;var l=Z0(t.alternate,t,Cn);if(l!==null){ke=l;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);ct===0&&(ct=5)}function Wm(e,t){do{var l=$0(e.alternate,e);if(l!==null){l.flags&=32767,ke=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ke=e;return}ke=e=l}while(e!==null);ct=6,ke=null}function Im(e,t,l,n,i,o,f,v,N){e.cancelPendingCommit=null;do xu();while(Mt!==0);if((Ke&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(o=t.lanes|t.childLanes,o|=So,ir(e,l,o,f,v,N),e===et&&(ke=et=null,ze=0),As=t,In=e,wn=l,kc=o,Rc=i,Qm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,rv(ba,function(){return np(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null,i=P.p,P.p=2,f=Ke,Ke|=4;try{J0(e,t,l)}finally{Ke=f,P.p=i,D.T=n}}Mt=1,Pm(),ep(),tp()}}function Pm(){if(Mt===1){Mt=0;var e=In,t=As,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var n=P.p;P.p=2;var i=Ke;Ke|=4;try{zm(t,e);var o=Zc,f=qf(e.containerInfo),v=o.focusedElem,N=o.selectionRange;if(f!==v&&v&&v.ownerDocument&&Lf(v.ownerDocument.documentElement,v)){if(N!==null&&vo(v)){var Y=N.start,$=N.end;if($===void 0&&($=Y),"selectionStart"in v)v.selectionStart=Y,v.selectionEnd=Math.min($,v.value.length);else{var te=v.ownerDocument||document,X=te&&te.defaultView||window;if(X.getSelection){var K=X.getSelection(),me=v.textContent.length,Ne=Math.min(N.start,me),Ie=N.end===void 0?Ne:Math.min(N.end,me);!K.extend&&Ne>Ie&&(f=Ie,Ie=Ne,Ne=f);var R=Hf(v,Ne),M=Hf(v,Ie);if(R&&M&&(K.rangeCount!==1||K.anchorNode!==R.node||K.anchorOffset!==R.offset||K.focusNode!==M.node||K.focusOffset!==M.offset)){var G=te.createRange();G.setStart(R.node,R.offset),K.removeAllRanges(),Ne>Ie?(K.addRange(G),K.extend(M.node,M.offset)):(G.setEnd(M.node,M.offset),K.addRange(G))}}}}for(te=[],K=v;K=K.parentNode;)K.nodeType===1&&te.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<te.length;v++){var I=te[v];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}Mu=!!Vc,Zc=Vc=null}finally{Ke=i,P.p=n,D.T=l}}e.current=t,Mt=2}}function ep(){if(Mt===2){Mt=0;var e=In,t=As,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var n=P.p;P.p=2;var i=Ke;Ke|=4;try{Mm(e,t.alternate,t)}finally{Ke=i,P.p=n,D.T=l}}Mt=3}}function tp(){if(Mt===4||Mt===3){Mt=0,ln();var e=In,t=As,l=wn,n=Qm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Mt=5:(Mt=0,As=In=null,lp(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Wn=null),sn(l),t=t.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(Nl,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=D.T,i=P.p,P.p=2,D.T=null;try{for(var o=e.onRecoverableError,f=0;f<n.length;f++){var v=n[f];o(v.value,{componentStack:v.stack})}}finally{D.T=t,P.p=i}}(wn&3)!==0&&xu(),$l(e),i=e.pendingLanes,(l&261930)!==0&&(i&42)!==0?e===zc?Gr++:(Gr=0,zc=e):Gr=0,Yr(0)}}function lp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Sr(t)))}function xu(){return Pm(),ep(),tp(),np()}function np(){if(Mt!==5)return!1;var e=In,t=kc;kc=0;var l=sn(wn),n=D.T,i=P.p;try{P.p=32>l?32:l,D.T=null,l=Rc,Rc=null;var o=In,f=wn;if(Mt=0,As=In=null,wn=0,(Ke&6)!==0)throw Error(c(331));var v=Ke;if(Ke|=4,Lm(o.current),Dm(o,o.current,f,l),Ke=v,Yr(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(Nl,o)}catch{}return!0}finally{P.p=i,D.T=n,lp(e,t)}}function ap(e,t,l){t=wl(l,t),t=dc(e.stateNode,t,2),e=Kn(e,t,2),e!==null&&(ul(e,2),$l(e))}function Je(e,t,l){if(e.tag===3)ap(e,e,l);else for(;t!==null;){if(t.tag===3){ap(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Wn===null||!Wn.has(n))){e=wl(l,e),l=sm(2),n=Kn(t,l,2),n!==null&&(rm(l,n,t,e),ul(n,2),$l(n));break}}t=t.return}}function Uc(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new I0;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(l)||(Mc=!0,i.add(l),e=nv.bind(null,e,t,l),t.then(e,e))}function nv(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,et===e&&(ze&l)===l&&(ct===4||ct===3&&(ze&62914560)===ze&&300>Kt()-cu?(Ke&2)===0&&ks(e,0):Oc|=l,Os===ze&&(Os=0)),$l(e)}function sp(e,t){t===0&&(t=an()),e=wa(e,t),e!==null&&(ul(e,t),$l(e))}function av(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),sp(e,l)}function sv(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(l=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(t),sp(e,l)}function rv(e,t){return Dl(e,t)}var gu=null,zs=null,Hc=!1,vu=!1,Lc=!1,ea=0;function $l(e){e!==zs&&e.next===null&&(zs===null?gu=zs=e:zs=zs.next=e),vu=!0,Hc||(Hc=!0,uv())}function Yr(e,t){if(!Lc&&vu){Lc=!0;do for(var l=!1,n=gu;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var o=0;else{var f=n.suspendedLanes,v=n.pingedLanes;o=(1<<31-Zt(42|e)+1)-1,o&=i&~(f&~v),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(l=!0,op(n,o))}else o=ze,o=ls(n,n===et?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||Yl(n,o)||(l=!0,op(n,o));n=n.next}while(l);Lc=!1}}function iv(){rp()}function rp(){vu=Hc=!1;var e=0;ea!==0&&vv()&&(e=ea);for(var t=Kt(),l=null,n=gu;n!==null;){var i=n.next,o=ip(n,t);o===0?(n.next=null,l===null?gu=i:l.next=i,i===null&&(zs=l)):(l=n,(e!==0||(o&3)!==0)&&(vu=!0)),n=i}Mt!==0&&Mt!==5||Yr(e),ea!==0&&(ea=0)}function ip(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var f=31-Zt(o),v=1<<f,N=i[f];N===-1?((v&l)===0||(v&n)!==0)&&(i[f]=ns(v,t)):N<=t&&(e.expiredLanes|=v),o&=~v}if(t=et,l=ze,l=ls(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&($e===2||$e===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&At(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Yl(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&At(n),sn(l)){case 2:case 8:l=to;break;case 32:l=ba;break;case 268435456:l=sr;break;default:l=ba}return n=up.bind(null,e),l=Dl(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&At(n),e.callbackPriority=2,e.callbackNode=null,2}function up(e,t){if(Mt!==0&&Mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(xu()&&e.callbackNode!==l)return null;var n=ze;return n=ls(e,e===et?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Ym(e,n,t),ip(e,Kt()),e.callbackNode!=null&&e.callbackNode===l?up.bind(null,e):null)}function op(e,t){if(xu())return null;Ym(e,t,!0)}function uv(){bv(function(){(Ke&6)!==0?Dl(ar,iv):rp()})}function qc(){if(ea===0){var e=vs;e===0&&(e=Pa,Pa<<=1,(Pa&261888)===0&&(Pa=256)),ea=e}return ea}function cp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:wi(""+e)}function dp(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function ov(e,t,l,n,i){if(t==="submit"&&l&&l.stateNode===i){var o=cp((i[Bt]||null).action),f=n.submitter;f&&(t=(t=f[Bt]||null)?cp(t.formAction):f.getAttribute("formAction"),t!==null&&(o=t,f=null));var v=new Ai("action","action",null,n,i);e.push({event:v,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(ea!==0){var N=f?dp(i,f):new FormData(i);sc(l,{pending:!0,data:N,method:i.method,action:o},null,N)}}else typeof o=="function"&&(v.preventDefault(),N=f?dp(i,f):new FormData(i),sc(l,{pending:!0,data:N,method:i.method,action:o},o,N))},currentTarget:i}]})}}for(var Bc=0;Bc<No.length;Bc++){var Qc=No[Bc],cv=Qc.toLowerCase(),dv=Qc[0].toUpperCase()+Qc.slice(1);Ul(cv,"on"+dv)}Ul(Gf,"onAnimationEnd"),Ul(Yf,"onAnimationIteration"),Ul(Xf,"onAnimationStart"),Ul("dblclick","onDoubleClick"),Ul("focusin","onFocus"),Ul("focusout","onBlur"),Ul(T0,"onTransitionRun"),Ul(M0,"onTransitionStart"),Ul(O0,"onTransitionCancel"),Ul(Kf,"onTransitionEnd"),Ge("onMouseEnter",["mouseout","mouseover"]),Ge("onMouseLeave",["mouseout","mouseover"]),Ge("onPointerEnter",["pointerout","pointerover"]),Ge("onPointerLeave",["pointerout","pointerover"]),Ue("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ue("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ue("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ue("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ue("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ue("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xr="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(" "),fv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xr));function fp(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],i=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var f=n.length-1;0<=f;f--){var v=n[f],N=v.instance,Y=v.currentTarget;if(v=v.listener,N!==o&&i.isPropagationStopped())break e;o=v,i.currentTarget=Y;try{o(i)}catch($){zi($)}i.currentTarget=null,o=N}else for(f=0;f<n.length;f++){if(v=n[f],N=v.instance,Y=v.currentTarget,v=v.listener,N!==o&&i.isPropagationStopped())break e;o=v,i.currentTarget=Y;try{o(i)}catch($){zi($)}i.currentTarget=null,o=N}}}}function Re(e,t){var l=t[as];l===void 0&&(l=t[as]=new Set);var n=e+"__bubble";l.has(n)||(hp(t,e,2,!1),l.add(n))}function Gc(e,t,l){var n=0;t&&(n|=4),hp(l,e,n,t)}var yu="_reactListening"+Math.random().toString(36).slice(2);function Yc(e){if(!e[yu]){e[yu]=!0,Qe.forEach(function(l){l!=="selectionchange"&&(fv.has(l)||Gc(l,!1,e),Gc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yu]||(t[yu]=!0,Gc("selectionchange",!1,t))}}function hp(e,t,l,n){switch(Gp(t)){case 2:var i=Bv;break;case 8:i=Qv;break;default:i=ad}l=i.bind(null,t,l,e),i=void 0,!uo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,l,{capture:!0,passive:i}):e.addEventListener(t,l,!0):i!==void 0?e.addEventListener(t,l,{passive:i}):e.addEventListener(t,l,!1)}function Xc(e,t,l,n,i){var o=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var f=n.tag;if(f===3||f===4){var v=n.stateNode.containerInfo;if(v===i)break;if(f===4)for(f=n.return;f!==null;){var N=f.tag;if((N===3||N===4)&&f.stateNode.containerInfo===i)return;f=f.return}for(;v!==null;){if(f=ue(v),f===null)return;if(N=f.tag,N===5||N===6||N===26||N===27){n=o=f;continue e}v=v.parentNode}}n=n.return}vf(function(){var Y=o,$=ro(l),te=[];e:{var X=Vf.get(e);if(X!==void 0){var K=Ai,me=e;switch(e){case"keypress":if(Mi(l)===0)break e;case"keydown":case"keyup":K=s0;break;case"focusin":me="focus",K=ho;break;case"focusout":me="blur",K=ho;break;case"beforeblur":case"afterblur":K=ho;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=jf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=Zg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=u0;break;case Gf:case Yf:case Xf:K=Fg;break;case Kf:K=c0;break;case"scroll":case"scrollend":K=Kg;break;case"wheel":K=f0;break;case"copy":case"cut":case"paste":K=Ig;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Sf;break;case"toggle":case"beforetoggle":K=m0}var Ne=(t&4)!==0,Ie=!Ne&&(e==="scroll"||e==="scrollend"),R=Ne?X!==null?X+"Capture":null:X;Ne=[];for(var M=Y,G;M!==null;){var I=M;if(G=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||G===null||R===null||(I=fr(M,R),I!=null&&Ne.push(Kr(M,I,G))),Ie)break;M=M.return}0<Ne.length&&(X=new K(X,me,null,l,$),te.push({event:X,listeners:Ne}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",X&&l!==so&&(me=l.relatedTarget||l.fromElement)&&(ue(me)||me[rn]))break e;if((K||X)&&(X=$.window===$?$:(X=$.ownerDocument)?X.defaultView||X.parentWindow:window,K?(me=l.relatedTarget||l.toElement,K=Y,me=me?ue(me):null,me!==null&&(Ie=h(me),Ne=me.tag,me!==Ie||Ne!==5&&Ne!==27&&Ne!==6)&&(me=null)):(K=null,me=Y),K!==me)){if(Ne=jf,I="onMouseLeave",R="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=Sf,I="onPointerLeave",R="onPointerEnter",M="pointer"),Ie=K==null?X:he(K),G=me==null?X:he(me),X=new Ne(I,M+"leave",K,l,$),X.target=Ie,X.relatedTarget=G,I=null,ue($)===Y&&(Ne=new Ne(R,M+"enter",me,l,$),Ne.target=G,Ne.relatedTarget=Ie,I=Ne),Ie=I,K&&me)t:{for(Ne=hv,R=K,M=me,G=0,I=R;I;I=Ne(I))G++;I=0;for(var be=M;be;be=Ne(be))I++;for(;0<G-I;)R=Ne(R),G--;for(;0<I-G;)M=Ne(M),I--;for(;G--;){if(R===M||M!==null&&R===M.alternate){Ne=R;break t}R=Ne(R),M=Ne(M)}Ne=null}else Ne=null;K!==null&&mp(te,X,K,Ne,!1),me!==null&&Ie!==null&&mp(te,Ie,me,Ne,!0)}}e:{if(X=Y?he(Y):window,K=X.nodeName&&X.nodeName.toLowerCase(),K==="select"||K==="input"&&X.type==="file")var Ye=kf;else if(Of(X))if(Rf)Ye=E0;else{Ye=N0;var pe=j0}else K=X.nodeName,!K||K.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Y&&ao(Y.elementType)&&(Ye=kf):Ye=S0;if(Ye&&(Ye=Ye(e,Y))){Af(te,Ye,l,$);break e}pe&&pe(e,X,Y),e==="focusout"&&Y&&X.type==="number"&&Y.memoizedProps.value!=null&&no(X,"number",X.value)}switch(pe=Y?he(Y):window,e){case"focusin":(Of(pe)||pe.contentEditable==="true")&&(cs=pe,yo=Y,br=null);break;case"focusout":br=yo=cs=null;break;case"mousedown":bo=!0;break;case"contextmenu":case"mouseup":case"dragend":bo=!1,Bf(te,l,$);break;case"selectionchange":if(w0)break;case"keydown":case"keyup":Bf(te,l,$)}var Me;if(po)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else os?Tf(e,l)&&(_e="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(_e="onCompositionStart");_e&&(Ef&&l.locale!=="ko"&&(os||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&os&&(Me=yf()):(Ln=$,oo="value"in Ln?Ln.value:Ln.textContent,os=!0)),pe=bu(Y,_e),0<pe.length&&(_e=new Nf(_e,e,null,l,$),te.push({event:_e,listeners:pe}),Me?_e.data=Me:(Me=Mf(l),Me!==null&&(_e.data=Me)))),(Me=x0?g0(e,l):v0(e,l))&&(_e=bu(Y,"onBeforeInput"),0<_e.length&&(pe=new Nf("onBeforeInput","beforeinput",null,l,$),te.push({event:pe,listeners:_e}),pe.data=Me)),ov(te,e,Y,l,$)}fp(te,t)})}function Kr(e,t,l){return{instance:e,listener:t,currentTarget:l}}function bu(e,t){for(var l=t+"Capture",n=[];e!==null;){var i=e,o=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||o===null||(i=fr(e,l),i!=null&&n.unshift(Kr(e,i,o)),i=fr(e,t),i!=null&&n.push(Kr(e,i,o))),e.tag===3)return n;e=e.return}return[]}function hv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function mp(e,t,l,n,i){for(var o=t._reactName,f=[];l!==null&&l!==n;){var v=l,N=v.alternate,Y=v.stateNode;if(v=v.tag,N!==null&&N===n)break;v!==5&&v!==26&&v!==27||Y===null||(N=Y,i?(Y=fr(l,o),Y!=null&&f.unshift(Kr(l,Y,N))):i||(Y=fr(l,o),Y!=null&&f.push(Kr(l,Y,N)))),l=l.return}f.length!==0&&e.push({event:t,listeners:f})}var mv=/\r\n?/g,pv=/\u0000|\uFFFD/g;function pp(e){return(typeof e=="string"?e:""+e).replace(mv,`
|
|
49
|
-
`).replace(pv,"")}function xp(e,t){return t=pp(t),pp(e)===t}function We(e,t,l,n,i,o){switch(l){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||rs(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&rs(e,""+n);break;case"className":$t(e,"class",n);break;case"tabIndex":$t(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":$t(e,l,n);break;case"style":xf(e,n,o);break;case"data":if(t!=="object"){$t(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=wi(""+n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(l==="formAction"?(t!=="input"&&We(e,t,"name",i.name,i,null),We(e,t,"formEncType",i.formEncType,i,null),We(e,t,"formMethod",i.formMethod,i,null),We(e,t,"formTarget",i.formTarget,i,null)):(We(e,t,"encType",i.encType,i,null),We(e,t,"method",i.method,i,null),We(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=wi(""+n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=dn);break;case"onScroll":n!=null&&Re("scroll",e);break;case"onScrollEnd":n!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(l=n.__html,l!=null){if(i.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=wi(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""+n):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":Re("beforetoggle",e),Re("toggle",e),Sl(e,"popover",n);break;case"xlinkActuate":wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":wt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":wt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":wt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":wt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Sl(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Yg.get(l)||l,Sl(e,l,n))}}function Kc(e,t,l,n,i,o){switch(l){case"style":xf(e,n,o);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(l=n.__html,l!=null){if(i.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"children":typeof n=="string"?rs(e,n):(typeof n=="number"||typeof n=="bigint")&&rs(e,""+n);break;case"onScroll":n!=null&&Re("scroll",e);break;case"onScrollEnd":n!=null&&Re("scrollend",e);break;case"onClick":n!=null&&(e.onclick=dn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ze.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(i=l.endsWith("Capture"),t=l.slice(2,i?l.length-7:void 0),o=e[Bt]||null,o=o!=null?o[l]:null,typeof o=="function"&&e.removeEventListener(t,o,i),typeof n=="function")){typeof o!="function"&&o!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,n,i);break e}l in e?e[l]=n:n===!0?e.setAttribute(l,""):Sl(e,l,n)}}}function qt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var n=!1,i=!1,o;for(o in l)if(l.hasOwnProperty(o)){var f=l[o];if(f!=null)switch(o){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:We(e,t,o,f,l,null)}}i&&We(e,t,"srcSet",l.srcSet,l,null),n&&We(e,t,"src",l.src,l,null);return;case"input":Re("invalid",e);var v=o=f=i=null,N=null,Y=null;for(n in l)if(l.hasOwnProperty(n)){var $=l[n];if($!=null)switch(n){case"name":i=$;break;case"type":f=$;break;case"checked":N=$;break;case"defaultChecked":Y=$;break;case"value":o=$;break;case"defaultValue":v=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(c(137,t));break;default:We(e,t,n,$,l,null)}}ff(e,o,v,N,Y,f,i,!1);return;case"select":Re("invalid",e),n=f=o=null;for(i in l)if(l.hasOwnProperty(i)&&(v=l[i],v!=null))switch(i){case"value":o=v;break;case"defaultValue":f=v;break;case"multiple":n=v;default:We(e,t,i,v,l,null)}t=o,l=f,e.multiple=!!n,t!=null?ss(e,!!n,t,!1):l!=null&&ss(e,!!n,l,!0);return;case"textarea":Re("invalid",e),o=i=n=null;for(f in l)if(l.hasOwnProperty(f)&&(v=l[f],v!=null))switch(f){case"value":n=v;break;case"defaultValue":i=v;break;case"children":o=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(c(91));break;default:We(e,t,f,v,l,null)}mf(e,n,i,o);return;case"option":for(N in l)if(l.hasOwnProperty(N)&&(n=l[N],n!=null))switch(N){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:We(e,t,N,n,l,null)}return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(n=0;n<Xr.length;n++)Re(Xr[n],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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(Y in l)if(l.hasOwnProperty(Y)&&(n=l[Y],n!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:We(e,t,Y,n,l,null)}return;default:if(ao(t)){for($ in l)l.hasOwnProperty($)&&(n=l[$],n!==void 0&&Kc(e,t,$,n,l,void 0));return}}for(v in l)l.hasOwnProperty(v)&&(n=l[v],n!=null&&We(e,t,v,n,l,null))}function xv(e,t,l,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,o=null,f=null,v=null,N=null,Y=null,$=null;for(K in l){var te=l[K];if(l.hasOwnProperty(K)&&te!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":N=te;default:n.hasOwnProperty(K)||We(e,t,K,null,n,te)}}for(var X in n){var K=n[X];if(te=l[X],n.hasOwnProperty(X)&&(K!=null||te!=null))switch(X){case"type":o=K;break;case"name":i=K;break;case"checked":Y=K;break;case"defaultChecked":$=K;break;case"value":f=K;break;case"defaultValue":v=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(c(137,t));break;default:K!==te&&We(e,t,X,K,n,te)}}lo(e,f,v,N,Y,$,o,i);return;case"select":K=f=v=X=null;for(o in l)if(N=l[o],l.hasOwnProperty(o)&&N!=null)switch(o){case"value":break;case"multiple":K=N;default:n.hasOwnProperty(o)||We(e,t,o,null,n,N)}for(i in n)if(o=n[i],N=l[i],n.hasOwnProperty(i)&&(o!=null||N!=null))switch(i){case"value":X=o;break;case"defaultValue":v=o;break;case"multiple":f=o;default:o!==N&&We(e,t,i,o,n,N)}t=v,l=f,n=K,X!=null?ss(e,!!l,X,!1):!!n!=!!l&&(t!=null?ss(e,!!l,t,!0):ss(e,!!l,l?[]:"",!1));return;case"textarea":K=X=null;for(v in l)if(i=l[v],l.hasOwnProperty(v)&&i!=null&&!n.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:We(e,t,v,null,n,i)}for(f in n)if(i=n[f],o=l[f],n.hasOwnProperty(f)&&(i!=null||o!=null))switch(f){case"value":X=i;break;case"defaultValue":K=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(c(91));break;default:i!==o&&We(e,t,f,i,n,o)}hf(e,X,K);return;case"option":for(var me in l)if(X=l[me],l.hasOwnProperty(me)&&X!=null&&!n.hasOwnProperty(me))switch(me){case"selected":e.selected=!1;break;default:We(e,t,me,null,n,X)}for(N in n)if(X=n[N],K=l[N],n.hasOwnProperty(N)&&X!==K&&(X!=null||K!=null))switch(N){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:We(e,t,N,X,n,K)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ne in l)X=l[Ne],l.hasOwnProperty(Ne)&&X!=null&&!n.hasOwnProperty(Ne)&&We(e,t,Ne,null,n,X);for(Y in n)if(X=n[Y],K=l[Y],n.hasOwnProperty(Y)&&X!==K&&(X!=null||K!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(c(137,t));break;default:We(e,t,Y,X,n,K)}return;default:if(ao(t)){for(var Ie in l)X=l[Ie],l.hasOwnProperty(Ie)&&X!==void 0&&!n.hasOwnProperty(Ie)&&Kc(e,t,Ie,void 0,n,X);for($ in n)X=n[$],K=l[$],!n.hasOwnProperty($)||X===K||X===void 0&&K===void 0||Kc(e,t,$,X,n,K);return}}for(var R in l)X=l[R],l.hasOwnProperty(R)&&X!=null&&!n.hasOwnProperty(R)&&We(e,t,R,null,n,X);for(te in n)X=n[te],K=l[te],!n.hasOwnProperty(te)||X===K||X==null&&K==null||We(e,t,te,X,n,K)}function gp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var i=l[n],o=i.transferSize,f=i.initiatorType,v=i.duration;if(o&&v&&gp(f)){for(f=0,v=i.responseEnd,n+=1;n<l.length;n++){var N=l[n],Y=N.startTime;if(Y>v)break;var $=N.transferSize,te=N.initiatorType;$&&gp(te)&&(N=N.responseEnd,f+=$*(N<v?1:(v-Y)/(N-Y)))}if(--n,t+=8*(o+f)/(i.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 Vc=null,Zc=null;function ju(e){return e.nodeType===9?e:e.ownerDocument}function vp(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 yp(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 $c(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 Jc=null;function vv(){var e=window.event;return e&&e.type==="popstate"?e===Jc?!1:(Jc=e,!0):(Jc=null,!1)}var bp=typeof setTimeout=="function"?setTimeout:void 0,yv=typeof clearTimeout=="function"?clearTimeout:void 0,jp=typeof Promise=="function"?Promise:void 0,bv=typeof queueMicrotask=="function"?queueMicrotask:typeof jp<"u"?function(e){return jp.resolve(null).then(e).catch(jv)}:bp;function jv(e){setTimeout(function(){throw e})}function ta(e){return e==="head"}function Np(e,t){var l=t,n=0;do{var i=l.nextSibling;if(e.removeChild(l),i&&i.nodeType===8)if(l=i.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(i),Hs(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Vr(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Vr(l);for(var o=l.firstChild;o;){var f=o.nextSibling,v=o.nodeName;o[W]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&o.rel.toLowerCase()==="stylesheet"||l.removeChild(o),o=f}}else l==="body"&&Vr(e.ownerDocument.body);l=i}while(l);Hs(t)}function Sp(e,t){var l=e;e=0;do{var n=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function Fc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Fc(l),ae(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Nv(e,t,l,n){for(;e.nodeType===1;){var i=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[W])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=kl(e.nextSibling),e===null)break}return null}function Sv(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=kl(e.nextSibling),e===null))return null;return e}function Ep(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=kl(e.nextSibling),e===null))return null;return e}function Wc(e){return e.data==="$?"||e.data==="$~"}function Ic(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ev(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function kl(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 Cp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return kl(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function wp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Tp(e,t,l){switch(t=ju(l),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Vr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ae(e)}var Rl=new Map,Mp=new Set;function Nu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tn=P.d;P.d={f:Cv,r:wv,D:Tv,C:Mv,L:Ov,m:Av,X:Rv,S:kv,M:zv};function Cv(){var e=Tn.f(),t=hu();return e||t}function wv(e){var t=je(e);t!==null&&t.tag===5&&t.type==="form"?Kh(t):Tn.r(e)}var _s=typeof document>"u"?null:document;function Op(e,t,l){var n=_s;if(n&&typeof t=="string"&&t){var i=El(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof l=="string"&&(i+='[crossorigin="'+l+'"]'),Mp.has(i)||(Mp.add(i),e={rel:e,crossOrigin:l,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),qt(t,"link",e),ge(t),n.head.appendChild(t)))}}function Tv(e){Tn.D(e),Op("dns-prefetch",e,null)}function Mv(e,t){Tn.C(e,t),Op("preconnect",e,t)}function Ov(e,t,l){Tn.L(e,t,l);var n=_s;if(n&&e&&t){var i='link[rel="preload"][as="'+El(t)+'"]';t==="image"&&l&&l.imageSrcSet?(i+='[imagesrcset="'+El(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(i+='[imagesizes="'+El(l.imageSizes)+'"]')):i+='[href="'+El(e)+'"]';var o=i;switch(t){case"style":o=Ds(e);break;case"script":o=Us(e)}Rl.has(o)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Rl.set(o,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(Zr(o))||t==="script"&&n.querySelector($r(o))||(t=n.createElement("link"),qt(t,"link",e),ge(t),n.head.appendChild(t)))}}function Av(e,t){Tn.m(e,t);var l=_s;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+El(n)+'"][href="'+El(e)+'"]',o=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Us(e)}if(!Rl.has(o)&&(e=y({rel:"modulepreload",href:e},t),Rl.set(o,e),l.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector($r(o)))return}n=l.createElement("link"),qt(n,"link",e),ge(n),l.head.appendChild(n)}}}function kv(e,t,l){Tn.S(e,t,l);var n=_s;if(n&&e){var i=Te(n).hoistableStyles,o=Ds(e);t=t||"default";var f=i.get(o);if(!f){var v={loading:0,preload:null};if(f=n.querySelector(Zr(o)))v.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Rl.get(o))&&ed(e,l);var N=f=n.createElement("link");ge(N),qt(N,"link",e),N._p=new Promise(function(Y,$){N.onload=Y,N.onerror=$}),N.addEventListener("load",function(){v.loading|=1}),N.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Su(f,t,n)}f={type:"stylesheet",instance:f,count:1,state:v},i.set(o,f)}}}function Rv(e,t){Tn.X(e,t);var l=_s;if(l&&e){var n=Te(l).hoistableScripts,i=Us(e),o=n.get(i);o||(o=l.querySelector($r(i)),o||(e=y({src:e,async:!0},t),(t=Rl.get(i))&&td(e,t),o=l.createElement("script"),ge(o),qt(o,"link",e),l.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(i,o))}}function zv(e,t){Tn.M(e,t);var l=_s;if(l&&e){var n=Te(l).hoistableScripts,i=Us(e),o=n.get(i);o||(o=l.querySelector($r(i)),o||(e=y({src:e,async:!0,type:"module"},t),(t=Rl.get(i))&&td(e,t),o=l.createElement("script"),ge(o),qt(o,"link",e),l.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(i,o))}}function Ap(e,t,l,n){var i=(i=ve.current)?Nu(i):null;if(!i)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Ds(l.href),l=Te(i).hoistableStyles,n=l.get(t),n||(n={type:"style",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Ds(l.href);var o=Te(i).hoistableStyles,f=o.get(e);if(f||(i=i.ownerDocument||i,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,f),(o=i.querySelector(Zr(e)))&&!o._p&&(f.instance=o,f.state.loading=5),Rl.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Rl.set(e,l),o||_v(i,e,l,f.state))),t&&n===null)throw Error(c(528,""));return f}if(t&&n!==null)throw Error(c(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Us(l),l=Te(i).hoistableScripts,n=l.get(t),n||(n={type:"script",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Ds(e){return'href="'+El(e)+'"'}function Zr(e){return'link[rel="stylesheet"]['+e+"]"}function kp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function _v(e,t,l,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),qt(t,"link",l),ge(t),e.head.appendChild(t))}function Us(e){return'[src="'+El(e)+'"]'}function $r(e){return"script[async]"+e}function Rp(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+El(l.href)+'"]');if(n)return t.instance=n,ge(n),n;var i=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),ge(n),qt(n,"style",i),Su(n,l.precedence,e),t.instance=n;case"stylesheet":i=Ds(l.href);var o=e.querySelector(Zr(i));if(o)return t.state.loading|=4,t.instance=o,ge(o),o;n=kp(l),(i=Rl.get(i))&&ed(n,i),o=(e.ownerDocument||e).createElement("link"),ge(o);var f=o;return f._p=new Promise(function(v,N){f.onload=v,f.onerror=N}),qt(o,"link",n),t.state.loading|=4,Su(o,l.precedence,e),t.instance=o;case"script":return o=Us(l.src),(i=e.querySelector($r(o)))?(t.instance=i,ge(i),i):(n=l,(i=Rl.get(o))&&(n=y({},l),td(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),ge(i),qt(i,"link",n),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Su(n,l.precedence,e));return t.instance}function Su(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,o=i,f=0;f<n.length;f++){var v=n[f];if(v.dataset.precedence===t)o=v;else if(o!==i)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function ed(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function td(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Eu=null;function zp(e,t,l){if(Eu===null){var n=new Map,i=Eu=new Map;i.set(l,n)}else i=Eu,n=i.get(l),n||(n=new Map,i.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),i=0;i<l.length;i++){var o=l[i];if(!(o[W]||o[yt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var f=o.getAttribute(t)||"";f=e+f;var v=n.get(f);v?v.push(o):n.set(f,[o])}}return n}function _p(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Dv(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Dp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Uv(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var i=Ds(n.href),o=t.querySelector(Zr(i));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Cu.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=o,ge(o);return}o=t.ownerDocument||t,n=kp(n),(i=Rl.get(i))&&ed(n,i),o=o.createElement("link"),ge(o);var f=o;f._p=new Promise(function(v,N){f.onload=v,f.onerror=N}),qt(o,"link",n),l.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Cu.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var ld=0;function Hv(e,t){return e.stylesheets&&e.count===0&&Tu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&Tu(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&ld===0&&(ld=62500*gv());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Tu(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>ld?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function Cu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var wu=null;function Tu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,wu=new Map,t.forEach(Lv,e),wu=null,Cu.call(e))}function Lv(e,t){if(!(t.state.loading&4)){var l=wu.get(e);if(l)var n=l.get(null);else{l=new Map,wu.set(e,l);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<i.length;o++){var f=i[o];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(l.set(f.dataset.precedence,f),n=f)}n&&l.set(null,n)}i=t.instance,f=i.getAttribute("data-precedence"),o=l.get(f)||n,o===n&&l.set(null,i),l.set(f,i),this.count++,n=Cu.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),o?o.parentNode.insertBefore(i,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Jr={$$typeof:O,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function qv(e,t,l,n,i,o,f,v,N){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=ja(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ja(0),this.hiddenUpdates=ja(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=o,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Up(e,t,l,n,i,o,f,v,N,Y,$,te){return e=new qv(e,t,l,f,N,Y,$,te,v),t=1,o===!0&&(t|=24),o=cl(3,null,null,t),e.current=o,o.stateNode=e,t=Do(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:n,isDehydrated:l,cache:t},qo(o),e}function Hp(e){return e?(e=hs,e):hs}function Lp(e,t,l,n,i,o){i=Hp(i),n.context===null?n.context=i:n.pendingContext=i,n=Xn(t),n.payload={element:l},o=o===void 0?null:o,o!==null&&(n.callback=o),l=Kn(e,n,t),l!==null&&(al(l,e,t),Tr(l,e,t))}function qp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function nd(e,t){qp(e,t),(e=e.alternate)&&qp(e,t)}function Bp(e){if(e.tag===13||e.tag===31){var t=wa(e,67108864);t!==null&&al(t,e,67108864),nd(e,67108864)}}function Qp(e){if(e.tag===13||e.tag===31){var t=pl();t=cr(t);var l=wa(e,t);l!==null&&al(l,e,t),nd(e,t)}}var Mu=!0;function Bv(e,t,l,n){var i=D.T;D.T=null;var o=P.p;try{P.p=2,ad(e,t,l,n)}finally{P.p=o,D.T=i}}function Qv(e,t,l,n){var i=D.T;D.T=null;var o=P.p;try{P.p=8,ad(e,t,l,n)}finally{P.p=o,D.T=i}}function ad(e,t,l,n){if(Mu){var i=sd(n);if(i===null)Xc(e,t,n,Ou,l),Yp(e,n);else if(Yv(i,e,t,l,n))n.stopPropagation();else if(Yp(e,n),t&4&&-1<Gv.indexOf(e)){for(;i!==null;){var o=je(i);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var f=nn(o.pendingLanes);if(f!==0){var v=o;for(v.pendingLanes|=2,v.entangledLanes|=2;f;){var N=1<<31-Zt(f);v.entanglements[1]|=N,f&=~N}$l(o),(Ke&6)===0&&(du=Kt()+500,Yr(0))}}break;case 31:case 13:v=wa(o,2),v!==null&&al(v,o,2),hu(),nd(o,2)}if(o=sd(n),o===null&&Xc(e,t,n,Ou,l),o===i)break;i=o}i!==null&&n.stopPropagation()}else Xc(e,t,n,null,l)}}function sd(e){return e=ro(e),rd(e)}var Ou=null;function rd(e){if(Ou=null,e=ue(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=m(t),e!==null)return e;e=null}else if(l===31){if(e=p(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ou=e,null}function Gp(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(eo()){case ar:return 2;case to:return 8;case ba:case vi:return 32;case sr:return 268435456;default:return 32}default:return 32}}var id=!1,la=null,na=null,aa=null,Fr=new Map,Wr=new Map,sa=[],Gv="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 Yp(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":na=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":Fr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wr.delete(t.pointerId)}}function Ir(e,t,l,n,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},t!==null&&(t=je(t),t!==null&&Bp(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Yv(e,t,l,n,i){switch(t){case"focusin":return la=Ir(la,e,t,l,n,i),!0;case"dragenter":return na=Ir(na,e,t,l,n,i),!0;case"mouseover":return aa=Ir(aa,e,t,l,n,i),!0;case"pointerover":var o=i.pointerId;return Fr.set(o,Ir(Fr.get(o)||null,e,t,l,n,i)),!0;case"gotpointercapture":return o=i.pointerId,Wr.set(o,Ir(Wr.get(o)||null,e,t,l,n,i)),!0}return!1}function Xp(e){var t=ue(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=m(l),t!==null){e.blockedOn=t,ji(e.priority,function(){Qp(l)});return}}else if(t===31){if(t=p(l),t!==null){e.blockedOn=t,ji(e.priority,function(){Qp(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Au(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=sd(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);so=n,l.target.dispatchEvent(n),so=null}else return t=je(l),t!==null&&Bp(t),e.blockedOn=l,!1;t.shift()}return!0}function Kp(e,t,l){Au(e)&&l.delete(t)}function Xv(){id=!1,la!==null&&Au(la)&&(la=null),na!==null&&Au(na)&&(na=null),aa!==null&&Au(aa)&&(aa=null),Fr.forEach(Kp),Wr.forEach(Kp)}function ku(e,t){e.blockedOn===t&&(e.blockedOn=null,id||(id=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Xv)))}var Ru=null;function Vp(e){Ru!==e&&(Ru=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Ru===e&&(Ru=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(rd(n||l)===null)continue;break}var o=je(l);o!==null&&(e.splice(t,3),t-=3,sc(o,{pending:!0,data:i,method:l.method,action:n},n,i))}}))}function Hs(e){function t(N){return ku(N,e)}la!==null&&ku(la,e),na!==null&&ku(na,e),aa!==null&&ku(aa,e),Fr.forEach(t),Wr.forEach(t);for(var l=0;l<sa.length;l++){var n=sa[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<sa.length&&(l=sa[0],l.blockedOn===null);)Xp(l),l.blockedOn===null&&sa.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var i=l[n],o=l[n+1],f=i[Bt]||null;if(typeof o=="function")f||Vp(l);else if(f){var v=null;if(o&&o.hasAttribute("formAction")){if(i=o,f=o[Bt]||null)v=f.formAction;else if(rd(i)!==null)continue}else v=f.action;typeof v=="function"?l[n+1]=v:(l.splice(n,3),n-=3),Vp(l)}}}function Zp(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(f){return i=f})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function ud(e){this._internalRoot=e}zu.prototype.render=ud.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var l=t.current,n=pl();Lp(l,n,e,t,null,null)},zu.prototype.unmount=ud.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lp(e.current,2,null,e,null,null),hu(),t[rn]=null}};function zu(e){this._internalRoot=e}zu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hn();e={blockedOn:null,target:e,priority:t};for(var l=0;l<sa.length&&t!==0&&t<sa[l].priority;l++);sa.splice(l,0,e),l===0&&Xp(e)}};var $p=r.version;if($p!=="19.2.4")throw Error(c(527,$p,"19.2.4"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=g(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var Kv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_u.isDisabled&&_u.supportsFiber)try{Nl=_u.inject(Kv),Vt=_u}catch{}}return ti.createRoot=function(e,t){if(!d(e))throw Error(c(299));var l=!1,n="",i=tm,o=lm,f=nm;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=Up(e,1,!1,null,null,l,n,null,i,o,f,Zp),e[rn]=t.current,Yc(e),new ud(t)},ti.hydrateRoot=function(e,t,l){if(!d(e))throw Error(c(299));var n=!1,i="",o=tm,f=lm,v=nm,N=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(i=l.identifierPrefix),l.onUncaughtError!==void 0&&(o=l.onUncaughtError),l.onCaughtError!==void 0&&(f=l.onCaughtError),l.onRecoverableError!==void 0&&(v=l.onRecoverableError),l.formState!==void 0&&(N=l.formState)),t=Up(e,1,!0,t,l??null,n,i,N,o,f,v,Zp),t.context=Hp(null),l=t.current,n=pl(),n=cr(n),i=Xn(n),i.callback=null,Kn(l,i,n),l=n,t.current.lanes=l,ul(t,l),$l(t),e[rn]=t.current,Yc(e),new zu(t)},ti.version="19.2.4",ti}var sx;function ny(){if(sx)return fd.exports;sx=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(r){console.error(r)}}return s(),fd.exports=ly(),fd.exports}var ay=ny(),er=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sy={setTimeout:(s,r)=>setTimeout(s,r),clearTimeout:s=>clearTimeout(s),setInterval:(s,r)=>setInterval(s,r),clearInterval:s=>clearInterval(s)},ua,Xd,zx,ry=(zx=class{constructor(){ye(this,ua,sy);ye(this,Xd,!1)}setTimeoutProvider(s){fe(this,ua,s)}setTimeout(s,r){return S(this,ua).setTimeout(s,r)}clearTimeout(s){S(this,ua).clearTimeout(s)}setInterval(s,r){return S(this,ua).setInterval(s,r)}clearInterval(s){S(this,ua).clearInterval(s)}},ua=new WeakMap,Xd=new WeakMap,zx),qa=new ry;function iy(s){setTimeout(s,0)}var Ja=typeof window>"u"||"Deno"in globalThis;function Wt(){}function uy(s,r){return typeof s=="function"?s(r):s}function jd(s){return typeof s=="number"&&s>=0&&s!==1/0}function Xx(s,r){return Math.max(s+(r||0)-Date.now(),0)}function ga(s,r){return typeof s=="function"?s(r):s}function _l(s,r){return typeof s=="function"?s(r):s}function rx(s,r){const{type:u="all",exact:c,fetchStatus:d,predicate:h,queryKey:m,stale:p}=s;if(m){if(c){if(r.queryHash!==Vd(m,r.options))return!1}else if(!si(r.queryKey,m))return!1}if(u!=="all"){const x=r.isActive();if(u==="active"&&!x||u==="inactive"&&x)return!1}return!(typeof p=="boolean"&&r.isStale()!==p||d&&d!==r.state.fetchStatus||h&&!h(r))}function ix(s,r){const{exact:u,status:c,predicate:d,mutationKey:h}=s;if(h){if(!r.options.mutationKey)return!1;if(u){if(Fa(r.options.mutationKey)!==Fa(h))return!1}else if(!si(r.options.mutationKey,h))return!1}return!(c&&r.state.status!==c||d&&!d(r))}function Vd(s,r){return((r==null?void 0:r.queryKeyHashFn)||Fa)(s)}function Fa(s){return JSON.stringify(s,(r,u)=>Nd(u)?Object.keys(u).sort().reduce((c,d)=>(c[d]=u[d],c),{}):u)}function si(s,r){return s===r?!0:typeof s!=typeof r?!1:s&&r&&typeof s=="object"&&typeof r=="object"?Object.keys(r).every(u=>si(s[u],r[u])):!1}var oy=Object.prototype.hasOwnProperty;function Kx(s,r,u=0){if(s===r)return s;if(u>500)return r;const c=ux(s)&&ux(r);if(!c&&!(Nd(s)&&Nd(r)))return r;const h=(c?s:Object.keys(s)).length,m=c?r:Object.keys(r),p=m.length,x=c?new Array(p):{};let g=0;for(let j=0;j<p;j++){const y=c?j:m[j],C=s[y],w=r[y];if(C===w){x[y]=C,(c?j<h:oy.call(s,y))&&g++;continue}if(C===null||w===null||typeof C!="object"||typeof w!="object"){x[y]=w;continue}const k=Kx(C,w,u+1);x[y]=k,k===C&&g++}return h===p&&g===h?s:x}function Xu(s,r){if(!r||Object.keys(s).length!==Object.keys(r).length)return!1;for(const u in s)if(s[u]!==r[u])return!1;return!0}function ux(s){return Array.isArray(s)&&s.length===Object.keys(s).length}function Nd(s){if(!ox(s))return!1;const r=s.constructor;if(r===void 0)return!0;const u=r.prototype;return!(!ox(u)||!u.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(s)!==Object.prototype)}function ox(s){return Object.prototype.toString.call(s)==="[object Object]"}function cy(s){return new Promise(r=>{qa.setTimeout(r,s)})}function Sd(s,r,u){return typeof u.structuralSharing=="function"?u.structuralSharing(s,r):u.structuralSharing!==!1?Kx(s,r):r}function dy(s,r,u=0){const c=[...s,r];return u&&c.length>u?c.slice(1):c}function fy(s,r,u=0){const c=[r,...s];return u&&c.length>u?c.slice(0,-1):c}var Zd=Symbol();function Vx(s,r){return!s.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!s.queryFn||s.queryFn===Zd?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}function $d(s,r){return typeof s=="function"?s(...r):!!s}function hy(s,r,u){let c=!1,d;return Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(d??(d=r()),c||(c=!0,d.aborted?u():d.addEventListener("abort",u,{once:!0})),d)}),s}var Ba,oa,Qs,_x,my=(_x=class extends er{constructor(){super();ye(this,Ba);ye(this,oa);ye(this,Qs);fe(this,Qs,r=>{if(!Ja&&window.addEventListener){const u=()=>r();return window.addEventListener("visibilitychange",u,!1),()=>{window.removeEventListener("visibilitychange",u)}}})}onSubscribe(){S(this,oa)||this.setEventListener(S(this,Qs))}onUnsubscribe(){var r;this.hasListeners()||((r=S(this,oa))==null||r.call(this),fe(this,oa,void 0))}setEventListener(r){var u;fe(this,Qs,r),(u=S(this,oa))==null||u.call(this),fe(this,oa,r(c=>{typeof c=="boolean"?this.setFocused(c):this.onFocus()}))}setFocused(r){S(this,Ba)!==r&&(fe(this,Ba,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(u=>{u(r)})}isFocused(){var r;return typeof S(this,Ba)=="boolean"?S(this,Ba):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},Ba=new WeakMap,oa=new WeakMap,Qs=new WeakMap,_x),Jd=new my;function Ed(){let s,r;const u=new Promise((d,h)=>{s=d,r=h});u.status="pending",u.catch(()=>{});function c(d){Object.assign(u,d),delete u.resolve,delete u.reject}return u.resolve=d=>{c({status:"fulfilled",value:d}),s(d)},u.reject=d=>{c({status:"rejected",reason:d}),r(d)},u}var py=iy;function xy(){let s=[],r=0,u=p=>{p()},c=p=>{p()},d=py;const h=p=>{r?s.push(p):d(()=>{u(p)})},m=()=>{const p=s;s=[],p.length&&d(()=>{c(()=>{p.forEach(x=>{u(x)})})})};return{batch:p=>{let x;r++;try{x=p()}finally{r--,r||m()}return x},batchCalls:p=>(...x)=>{h(()=>{p(...x)})},schedule:h,setNotifyFunction:p=>{u=p},setBatchNotifyFunction:p=>{c=p},setScheduler:p=>{d=p}}}var Ot=xy(),Gs,ca,Ys,Dx,gy=(Dx=class extends er{constructor(){super();ye(this,Gs,!0);ye(this,ca);ye(this,Ys);fe(this,Ys,r=>{if(!Ja&&window.addEventListener){const u=()=>r(!0),c=()=>r(!1);return window.addEventListener("online",u,!1),window.addEventListener("offline",c,!1),()=>{window.removeEventListener("online",u),window.removeEventListener("offline",c)}}})}onSubscribe(){S(this,ca)||this.setEventListener(S(this,Ys))}onUnsubscribe(){var r;this.hasListeners()||((r=S(this,ca))==null||r.call(this),fe(this,ca,void 0))}setEventListener(r){var u;fe(this,Ys,r),(u=S(this,ca))==null||u.call(this),fe(this,ca,r(this.setOnline.bind(this)))}setOnline(r){S(this,Gs)!==r&&(fe(this,Gs,r),this.listeners.forEach(c=>{c(r)}))}isOnline(){return S(this,Gs)}},Gs=new WeakMap,ca=new WeakMap,Ys=new WeakMap,Dx),Ku=new gy;function vy(s){return Math.min(1e3*2**s,3e4)}function Zx(s){return(s??"online")==="online"?Ku.isOnline():!0}var Cd=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function $x(s){let r=!1,u=0,c;const d=Ed(),h=()=>d.status!=="pending",m=U=>{var _;if(!h()){const L=new Cd(U);C(L),(_=s.onCancel)==null||_.call(s,L)}},p=()=>{r=!0},x=()=>{r=!1},g=()=>Jd.isFocused()&&(s.networkMode==="always"||Ku.isOnline())&&s.canRun(),j=()=>Zx(s.networkMode)&&s.canRun(),y=U=>{h()||(c==null||c(),d.resolve(U))},C=U=>{h()||(c==null||c(),d.reject(U))},w=()=>new Promise(U=>{var _;c=L=>{(h()||g())&&U(L)},(_=s.onPause)==null||_.call(s)}).then(()=>{var U;c=void 0,h()||(U=s.onContinue)==null||U.call(s)}),k=()=>{if(h())return;let U;const _=u===0?s.initialPromise:void 0;try{U=_??s.fn()}catch(L){U=Promise.reject(L)}Promise.resolve(U).then(y).catch(L=>{var q;if(h())return;const J=s.retry??(Ja?0:3),O=s.retryDelay??vy,A=typeof O=="function"?O(u,L):O,V=J===!0||typeof J=="number"&&u<J||typeof J=="function"&&J(u,L);if(r||!V){C(L);return}u++,(q=s.onFail)==null||q.call(s,u,L),cy(A).then(()=>g()?void 0:w()).then(()=>{r?C(L):k()})})};return{promise:d,status:()=>d.status,cancel:m,continue:()=>(c==null||c(),d),cancelRetry:p,continueRetry:x,canStart:j,start:()=>(j()?k():w().then(k),d)}}var Qa,Ux,Jx=(Ux=class{constructor(){ye(this,Qa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),jd(this.gcTime)&&fe(this,Qa,qa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(Ja?1/0:300*1e3))}clearGcTimeout(){S(this,Qa)&&(qa.clearTimeout(S(this,Qa)),fe(this,Qa,void 0))}},Qa=new WeakMap,Ux),Ga,Xs,zl,Ya,zt,oi,Xa,ql,Mn,Hx,yy=(Hx=class extends Jx{constructor(r){super();ye(this,ql);ye(this,Ga);ye(this,Xs);ye(this,zl);ye(this,Ya);ye(this,zt);ye(this,oi);ye(this,Xa);fe(this,Xa,!1),fe(this,oi,r.defaultOptions),this.setOptions(r.options),this.observers=[],fe(this,Ya,r.client),fe(this,zl,S(this,Ya).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,fe(this,Ga,dx(this.options)),this.state=r.state??S(this,Ga),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var r;return(r=S(this,zt))==null?void 0:r.promise}setOptions(r){if(this.options={...S(this,oi),...r},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const u=dx(this.options);u.data!==void 0&&(this.setState(cx(u.data,u.dataUpdatedAt)),fe(this,Ga,u))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,zl).remove(this)}setData(r,u){const c=Sd(this.state.data,r,this.options);return Ae(this,ql,Mn).call(this,{data:c,type:"success",dataUpdatedAt:u==null?void 0:u.updatedAt,manual:u==null?void 0:u.manual}),c}setState(r,u){Ae(this,ql,Mn).call(this,{type:"setState",state:r,setStateOptions:u})}cancel(r){var c,d;const u=(c=S(this,zt))==null?void 0:c.promise;return(d=S(this,zt))==null||d.cancel(r),u?u.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Ga))}isActive(){return this.observers.some(r=>_l(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Zd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>ga(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!Xx(this.state.dataUpdatedAt,r)}onFocus(){var u;const r=this.observers.find(c=>c.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(u=S(this,zt))==null||u.continue()}onOnline(){var u;const r=this.observers.find(c=>c.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(u=S(this,zt))==null||u.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),S(this,zl).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(u=>u!==r),this.observers.length||(S(this,zt)&&(S(this,Xa)?S(this,zt).cancel({revert:!0}):S(this,zt).cancelRetry()),this.scheduleGc()),S(this,zl).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,ql,Mn).call(this,{type:"invalidate"})}async fetch(r,u){var x,g,j,y,C,w,k,U,_,L,J,O;if(this.state.fetchStatus!=="idle"&&((x=S(this,zt))==null?void 0:x.status())!=="rejected"){if(this.state.data!==void 0&&(u!=null&&u.cancelRefetch))this.cancel({silent:!0});else if(S(this,zt))return S(this,zt).continueRetry(),S(this,zt).promise}if(r&&this.setOptions(r),!this.options.queryFn){const A=this.observers.find(V=>V.options.queryFn);A&&this.setOptions(A.options)}const c=new AbortController,d=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(fe(this,Xa,!0),c.signal)})},h=()=>{const A=Vx(this.options,u),q=(()=>{const T={client:S(this,Ya),queryKey:this.queryKey,meta:this.meta};return d(T),T})();return fe(this,Xa,!1),this.options.persister?this.options.persister(A,q,this):A(q)},p=(()=>{const A={fetchOptions:u,options:this.options,queryKey:this.queryKey,client:S(this,Ya),state:this.state,fetchFn:h};return d(A),A})();(g=this.options.behavior)==null||g.onFetch(p,this),fe(this,Xs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((j=p.fetchOptions)==null?void 0:j.meta))&&Ae(this,ql,Mn).call(this,{type:"fetch",meta:(y=p.fetchOptions)==null?void 0:y.meta}),fe(this,zt,$x({initialPromise:u==null?void 0:u.initialPromise,fn:p.fetchFn,onCancel:A=>{A instanceof Cd&&A.revert&&this.setState({...S(this,Xs),fetchStatus:"idle"}),c.abort()},onFail:(A,V)=>{Ae(this,ql,Mn).call(this,{type:"failed",failureCount:A,error:V})},onPause:()=>{Ae(this,ql,Mn).call(this,{type:"pause"})},onContinue:()=>{Ae(this,ql,Mn).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const A=await S(this,zt).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(w=(C=S(this,zl).config).onSuccess)==null||w.call(C,A,this),(U=(k=S(this,zl).config).onSettled)==null||U.call(k,A,this.state.error,this),A}catch(A){if(A instanceof Cd){if(A.silent)return S(this,zt).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ae(this,ql,Mn).call(this,{type:"error",error:A}),(L=(_=S(this,zl).config).onError)==null||L.call(_,A,this),(O=(J=S(this,zl).config).onSettled)==null||O.call(J,this.state.data,A,this),A}finally{this.scheduleGc()}}},Ga=new WeakMap,Xs=new WeakMap,zl=new WeakMap,Ya=new WeakMap,zt=new WeakMap,oi=new WeakMap,Xa=new WeakMap,ql=new WeakSet,Mn=function(r){const u=c=>{switch(r.type){case"failed":return{...c,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...c,fetchStatus:"paused"};case"continue":return{...c,fetchStatus:"fetching"};case"fetch":return{...c,...Fx(c.data,this.options),fetchMeta:r.meta??null};case"success":const d={...c,...cx(r.data,r.dataUpdatedAt),dataUpdateCount:c.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,Xs,r.manual?d:void 0),d;case"error":const h=r.error;return{...c,error:h,errorUpdateCount:c.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:c.fetchFailureCount+1,fetchFailureReason:h,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...c,isInvalidated:!0};case"setState":return{...c,...r.state}}};this.state=u(this.state),Ot.batch(()=>{this.observers.forEach(c=>{c.onQueryUpdate()}),S(this,zl).notify({query:this,type:"updated",action:r})})},Hx);function Fx(s,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Zx(r.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function cx(s,r){return{data:s,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function dx(s){const r=typeof s.initialData=="function"?s.initialData():s.initialData,u=r!==void 0,c=u?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:u?c??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:u?"success":"pending",fetchStatus:"idle"}}var sl,Le,ci,Ft,Ka,Ks,On,da,di,Vs,Zs,Va,Za,fa,$s,Ve,ai,wd,Td,Md,Od,Ad,kd,Rd,Wx,Lx,by=(Lx=class extends er{constructor(r,u){super();ye(this,Ve);ye(this,sl);ye(this,Le);ye(this,ci);ye(this,Ft);ye(this,Ka);ye(this,Ks);ye(this,On);ye(this,da);ye(this,di);ye(this,Vs);ye(this,Zs);ye(this,Va);ye(this,Za);ye(this,fa);ye(this,$s,new Set);this.options=u,fe(this,sl,r),fe(this,da,null),fe(this,On,Ed()),this.bindMethods(),this.setOptions(u)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,Le).addObserver(this),fx(S(this,Le),this.options)?Ae(this,Ve,ai).call(this):this.updateResult(),Ae(this,Ve,Od).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zd(S(this,Le),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zd(S(this,Le),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,Ve,Ad).call(this),Ae(this,Ve,kd).call(this),S(this,Le).removeObserver(this)}setOptions(r){const u=this.options,c=S(this,Le);if(this.options=S(this,sl).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof _l(this.options.enabled,S(this,Le))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,Ve,Rd).call(this),S(this,Le).setOptions(this.options),u._defaulted&&!Xu(this.options,u)&&S(this,sl).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,Le),observer:this});const d=this.hasListeners();d&&hx(S(this,Le),c,this.options,u)&&Ae(this,Ve,ai).call(this),this.updateResult(),d&&(S(this,Le)!==c||_l(this.options.enabled,S(this,Le))!==_l(u.enabled,S(this,Le))||ga(this.options.staleTime,S(this,Le))!==ga(u.staleTime,S(this,Le)))&&Ae(this,Ve,wd).call(this);const h=Ae(this,Ve,Td).call(this);d&&(S(this,Le)!==c||_l(this.options.enabled,S(this,Le))!==_l(u.enabled,S(this,Le))||h!==S(this,fa))&&Ae(this,Ve,Md).call(this,h)}getOptimisticResult(r){const u=S(this,sl).getQueryCache().build(S(this,sl),r),c=this.createResult(u,r);return Ny(this,c)&&(fe(this,Ft,c),fe(this,Ks,this.options),fe(this,Ka,S(this,Le).state)),c}getCurrentResult(){return S(this,Ft)}trackResult(r,u){return new Proxy(r,{get:(c,d)=>(this.trackProp(d),u==null||u(d),d==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&S(this,On).status==="pending"&&S(this,On).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(c,d))})}trackProp(r){S(this,$s).add(r)}getCurrentQuery(){return S(this,Le)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const u=S(this,sl).defaultQueryOptions(r),c=S(this,sl).getQueryCache().build(S(this,sl),u);return c.fetch().then(()=>this.createResult(c,u))}fetch(r){return Ae(this,Ve,ai).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,Ft)))}createResult(r,u){var Z;const c=S(this,Le),d=this.options,h=S(this,Ft),m=S(this,Ka),p=S(this,Ks),g=r!==c?r.state:S(this,ci),{state:j}=r;let y={...j},C=!1,w;if(u._optimisticResults){const F=this.hasListeners(),Q=!F&&fx(r,u),z=F&&hx(r,c,u,d);(Q||z)&&(y={...y,...Fx(j.data,r.options)}),u._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:k,errorUpdatedAt:U,status:_}=y;w=y.data;let L=!1;if(u.placeholderData!==void 0&&w===void 0&&_==="pending"){let F;h!=null&&h.isPlaceholderData&&u.placeholderData===(p==null?void 0:p.placeholderData)?(F=h.data,L=!0):F=typeof u.placeholderData=="function"?u.placeholderData((Z=S(this,Zs))==null?void 0:Z.state.data,S(this,Zs)):u.placeholderData,F!==void 0&&(_="success",w=Sd(h==null?void 0:h.data,F,u),C=!0)}if(u.select&&w!==void 0&&!L)if(h&&w===(m==null?void 0:m.data)&&u.select===S(this,di))w=S(this,Vs);else try{fe(this,di,u.select),w=u.select(w),w=Sd(h==null?void 0:h.data,w,u),fe(this,Vs,w),fe(this,da,null)}catch(F){fe(this,da,F)}S(this,da)&&(k=S(this,da),w=S(this,Vs),U=Date.now(),_="error");const J=y.fetchStatus==="fetching",O=_==="pending",A=_==="error",V=O&&J,q=w!==void 0,B={status:_,fetchStatus:y.fetchStatus,isPending:O,isSuccess:_==="success",isError:A,isInitialLoading:V,isLoading:V,data:w,dataUpdatedAt:y.dataUpdatedAt,error:k,errorUpdatedAt:U,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>g.dataUpdateCount||y.errorUpdateCount>g.errorUpdateCount,isFetching:J,isRefetching:J&&!O,isLoadingError:A&&!q,isPaused:y.fetchStatus==="paused",isPlaceholderData:C,isRefetchError:A&&q,isStale:Fd(r,u),refetch:this.refetch,promise:S(this,On),isEnabled:_l(u.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const F=B.data!==void 0,Q=B.status==="error"&&!F,z=de=>{Q?de.reject(B.error):F&&de.resolve(B.data)},ne=()=>{const de=fe(this,On,B.promise=Ed());z(de)},oe=S(this,On);switch(oe.status){case"pending":r.queryHash===c.queryHash&&z(oe);break;case"fulfilled":(Q||B.data!==oe.value)&&ne();break;case"rejected":(!Q||B.error!==oe.reason)&&ne();break}}return B}updateResult(){const r=S(this,Ft),u=this.createResult(S(this,Le),this.options);if(fe(this,Ka,S(this,Le).state),fe(this,Ks,this.options),S(this,Ka).data!==void 0&&fe(this,Zs,S(this,Le)),Xu(u,r))return;fe(this,Ft,u);const c=()=>{if(!r)return!0;const{notifyOnChangeProps:d}=this.options,h=typeof d=="function"?d():d;if(h==="all"||!h&&!S(this,$s).size)return!0;const m=new Set(h??S(this,$s));return this.options.throwOnError&&m.add("error"),Object.keys(S(this,Ft)).some(p=>{const x=p;return S(this,Ft)[x]!==r[x]&&m.has(x)})};Ae(this,Ve,Wx).call(this,{listeners:c()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,Ve,Od).call(this)}},sl=new WeakMap,Le=new WeakMap,ci=new WeakMap,Ft=new WeakMap,Ka=new WeakMap,Ks=new WeakMap,On=new WeakMap,da=new WeakMap,di=new WeakMap,Vs=new WeakMap,Zs=new WeakMap,Va=new WeakMap,Za=new WeakMap,fa=new WeakMap,$s=new WeakMap,Ve=new WeakSet,ai=function(r){Ae(this,Ve,Rd).call(this);let u=S(this,Le).fetch(this.options,r);return r!=null&&r.throwOnError||(u=u.catch(Wt)),u},wd=function(){Ae(this,Ve,Ad).call(this);const r=ga(this.options.staleTime,S(this,Le));if(Ja||S(this,Ft).isStale||!jd(r))return;const c=Xx(S(this,Ft).dataUpdatedAt,r)+1;fe(this,Va,qa.setTimeout(()=>{S(this,Ft).isStale||this.updateResult()},c))},Td=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,Le)):this.options.refetchInterval)??!1},Md=function(r){Ae(this,Ve,kd).call(this),fe(this,fa,r),!(Ja||_l(this.options.enabled,S(this,Le))===!1||!jd(S(this,fa))||S(this,fa)===0)&&fe(this,Za,qa.setInterval(()=>{(this.options.refetchIntervalInBackground||Jd.isFocused())&&Ae(this,Ve,ai).call(this)},S(this,fa)))},Od=function(){Ae(this,Ve,wd).call(this),Ae(this,Ve,Md).call(this,Ae(this,Ve,Td).call(this))},Ad=function(){S(this,Va)&&(qa.clearTimeout(S(this,Va)),fe(this,Va,void 0))},kd=function(){S(this,Za)&&(qa.clearInterval(S(this,Za)),fe(this,Za,void 0))},Rd=function(){const r=S(this,sl).getQueryCache().build(S(this,sl),this.options);if(r===S(this,Le))return;const u=S(this,Le);fe(this,Le,r),fe(this,ci,r.state),this.hasListeners()&&(u==null||u.removeObserver(this),r.addObserver(this))},Wx=function(r){Ot.batch(()=>{r.listeners&&this.listeners.forEach(u=>{u(S(this,Ft))}),S(this,sl).getQueryCache().notify({query:S(this,Le),type:"observerResultsUpdated"})})},Lx);function jy(s,r){return _l(r.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&r.retryOnMount===!1)}function fx(s,r){return jy(s,r)||s.state.data!==void 0&&zd(s,r,r.refetchOnMount)}function zd(s,r,u){if(_l(r.enabled,s)!==!1&&ga(r.staleTime,s)!=="static"){const c=typeof u=="function"?u(s):u;return c==="always"||c!==!1&&Fd(s,r)}return!1}function hx(s,r,u,c){return(s!==r||_l(c.enabled,s)===!1)&&(!u.suspense||s.state.status!=="error")&&Fd(s,u)}function Fd(s,r){return _l(r.enabled,s)!==!1&&s.isStaleByTime(ga(r.staleTime,s))}function Ny(s,r){return!Xu(s.getCurrentResult(),r)}function mx(s){return{onFetch:(r,u)=>{var j,y,C,w,k;const c=r.options,d=(C=(y=(j=r.fetchOptions)==null?void 0:j.meta)==null?void 0:y.fetchMore)==null?void 0:C.direction,h=((w=r.state.data)==null?void 0:w.pages)||[],m=((k=r.state.data)==null?void 0:k.pageParams)||[];let p={pages:[],pageParams:[]},x=0;const g=async()=>{let U=!1;const _=O=>{hy(O,()=>r.signal,()=>U=!0)},L=Vx(r.options,r.fetchOptions),J=async(O,A,V)=>{if(U)return Promise.reject();if(A==null&&O.pages.length)return Promise.resolve(O);const T=(()=>{const Q={client:r.client,queryKey:r.queryKey,pageParam:A,direction:V?"backward":"forward",meta:r.options.meta};return _(Q),Q})(),B=await L(T),{maxPages:Z}=r.options,F=V?fy:dy;return{pages:F(O.pages,B,Z),pageParams:F(O.pageParams,A,Z)}};if(d&&h.length){const O=d==="backward",A=O?Sy:px,V={pages:h,pageParams:m},q=A(c,V);p=await J(V,q,O)}else{const O=s??h.length;do{const A=x===0?m[0]??c.initialPageParam:px(c,p);if(x>0&&A==null)break;p=await J(p,A),x++}while(x<O)}return p};r.options.persister?r.fetchFn=()=>{var U,_;return(_=(U=r.options).persister)==null?void 0:_.call(U,g,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},u)}:r.fetchFn=g}}}function px(s,{pages:r,pageParams:u}){const c=r.length-1;return r.length>0?s.getNextPageParam(r[c],r,u[c],u):void 0}function Sy(s,{pages:r,pageParams:u}){var c;return r.length>0?(c=s.getPreviousPageParam)==null?void 0:c.call(s,r[0],r,u[0],u):void 0}var fi,Fl,Yt,$a,Wl,ia,qx,Ey=(qx=class extends Jx{constructor(r){super();ye(this,Wl);ye(this,fi);ye(this,Fl);ye(this,Yt);ye(this,$a);fe(this,fi,r.client),this.mutationId=r.mutationId,fe(this,Yt,r.mutationCache),fe(this,Fl,[]),this.state=r.state||Ix(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){S(this,Fl).includes(r)||(S(this,Fl).push(r),this.clearGcTimeout(),S(this,Yt).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){fe(this,Fl,S(this,Fl).filter(u=>u!==r)),this.scheduleGc(),S(this,Yt).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){S(this,Fl).length||(this.state.status==="pending"?this.scheduleGc():S(this,Yt).remove(this))}continue(){var r;return((r=S(this,$a))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var m,p,x,g,j,y,C,w,k,U,_,L,J,O,A,V,q,T;const u=()=>{Ae(this,Wl,ia).call(this,{type:"continue"})},c={client:S(this,fi),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,$a,$x({fn:()=>this.options.mutationFn?this.options.mutationFn(r,c):Promise.reject(new Error("No mutationFn found")),onFail:(B,Z)=>{Ae(this,Wl,ia).call(this,{type:"failed",failureCount:B,error:Z})},onPause:()=>{Ae(this,Wl,ia).call(this,{type:"pause"})},onContinue:u,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,Yt).canRun(this)}));const d=this.state.status==="pending",h=!S(this,$a).canStart();try{if(d)u();else{Ae(this,Wl,ia).call(this,{type:"pending",variables:r,isPaused:h}),S(this,Yt).config.onMutate&&await S(this,Yt).config.onMutate(r,this,c);const Z=await((p=(m=this.options).onMutate)==null?void 0:p.call(m,r,c));Z!==this.state.context&&Ae(this,Wl,ia).call(this,{type:"pending",context:Z,variables:r,isPaused:h})}const B=await S(this,$a).start();return await((g=(x=S(this,Yt).config).onSuccess)==null?void 0:g.call(x,B,r,this.state.context,this,c)),await((y=(j=this.options).onSuccess)==null?void 0:y.call(j,B,r,this.state.context,c)),await((w=(C=S(this,Yt).config).onSettled)==null?void 0:w.call(C,B,null,this.state.variables,this.state.context,this,c)),await((U=(k=this.options).onSettled)==null?void 0:U.call(k,B,null,r,this.state.context,c)),Ae(this,Wl,ia).call(this,{type:"success",data:B}),B}catch(B){try{await((L=(_=S(this,Yt).config).onError)==null?void 0:L.call(_,B,r,this.state.context,this,c))}catch(Z){Promise.reject(Z)}try{await((O=(J=this.options).onError)==null?void 0:O.call(J,B,r,this.state.context,c))}catch(Z){Promise.reject(Z)}try{await((V=(A=S(this,Yt).config).onSettled)==null?void 0:V.call(A,void 0,B,this.state.variables,this.state.context,this,c))}catch(Z){Promise.reject(Z)}try{await((T=(q=this.options).onSettled)==null?void 0:T.call(q,void 0,B,r,this.state.context,c))}catch(Z){Promise.reject(Z)}throw Ae(this,Wl,ia).call(this,{type:"error",error:B}),B}finally{S(this,Yt).runNext(this)}}},fi=new WeakMap,Fl=new WeakMap,Yt=new WeakMap,$a=new WeakMap,Wl=new WeakSet,ia=function(r){const u=c=>{switch(r.type){case"failed":return{...c,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...c,isPaused:!0};case"continue":return{...c,isPaused:!1};case"pending":return{...c,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...c,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...c,data:void 0,error:r.error,failureCount:c.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=u(this.state),Ot.batch(()=>{S(this,Fl).forEach(c=>{c.onMutationUpdate(r)}),S(this,Yt).notify({mutation:this,type:"updated",action:r})})},qx);function Ix(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var An,Bl,hi,Bx,Cy=(Bx=class extends er{constructor(r={}){super();ye(this,An);ye(this,Bl);ye(this,hi);this.config=r,fe(this,An,new Set),fe(this,Bl,new Map),fe(this,hi,0)}build(r,u,c){const d=new Ey({client:r,mutationCache:this,mutationId:++Du(this,hi)._,options:r.defaultMutationOptions(u),state:c});return this.add(d),d}add(r){S(this,An).add(r);const u=Uu(r);if(typeof u=="string"){const c=S(this,Bl).get(u);c?c.push(r):S(this,Bl).set(u,[r])}this.notify({type:"added",mutation:r})}remove(r){if(S(this,An).delete(r)){const u=Uu(r);if(typeof u=="string"){const c=S(this,Bl).get(u);if(c)if(c.length>1){const d=c.indexOf(r);d!==-1&&c.splice(d,1)}else c[0]===r&&S(this,Bl).delete(u)}}this.notify({type:"removed",mutation:r})}canRun(r){const u=Uu(r);if(typeof u=="string"){const c=S(this,Bl).get(u),d=c==null?void 0:c.find(h=>h.state.status==="pending");return!d||d===r}else return!0}runNext(r){var c;const u=Uu(r);if(typeof u=="string"){const d=(c=S(this,Bl).get(u))==null?void 0:c.find(h=>h!==r&&h.state.isPaused);return(d==null?void 0:d.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ot.batch(()=>{S(this,An).forEach(r=>{this.notify({type:"removed",mutation:r})}),S(this,An).clear(),S(this,Bl).clear()})}getAll(){return Array.from(S(this,An))}find(r){const u={exact:!0,...r};return this.getAll().find(c=>ix(u,c))}findAll(r={}){return this.getAll().filter(u=>ix(r,u))}notify(r){Ot.batch(()=>{this.listeners.forEach(u=>{u(r)})})}resumePausedMutations(){const r=this.getAll().filter(u=>u.state.isPaused);return Ot.batch(()=>Promise.all(r.map(u=>u.continue().catch(Wt))))}},An=new WeakMap,Bl=new WeakMap,hi=new WeakMap,Bx);function Uu(s){var r;return(r=s.options.scope)==null?void 0:r.id}var kn,ha,rl,Rn,_n,Qu,_d,Qx,wy=(Qx=class extends er{constructor(u,c){super();ye(this,_n);ye(this,kn);ye(this,ha);ye(this,rl);ye(this,Rn);fe(this,kn,u),this.setOptions(c),this.bindMethods(),Ae(this,_n,Qu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(u){var d;const c=this.options;this.options=S(this,kn).defaultMutationOptions(u),Xu(this.options,c)||S(this,kn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,rl),observer:this}),c!=null&&c.mutationKey&&this.options.mutationKey&&Fa(c.mutationKey)!==Fa(this.options.mutationKey)?this.reset():((d=S(this,rl))==null?void 0:d.state.status)==="pending"&&S(this,rl).setOptions(this.options)}onUnsubscribe(){var u;this.hasListeners()||(u=S(this,rl))==null||u.removeObserver(this)}onMutationUpdate(u){Ae(this,_n,Qu).call(this),Ae(this,_n,_d).call(this,u)}getCurrentResult(){return S(this,ha)}reset(){var u;(u=S(this,rl))==null||u.removeObserver(this),fe(this,rl,void 0),Ae(this,_n,Qu).call(this),Ae(this,_n,_d).call(this)}mutate(u,c){var d;return fe(this,Rn,c),(d=S(this,rl))==null||d.removeObserver(this),fe(this,rl,S(this,kn).getMutationCache().build(S(this,kn),this.options)),S(this,rl).addObserver(this),S(this,rl).execute(u)}},kn=new WeakMap,ha=new WeakMap,rl=new WeakMap,Rn=new WeakMap,_n=new WeakSet,Qu=function(){var c;const u=((c=S(this,rl))==null?void 0:c.state)??Ix();fe(this,ha,{...u,isPending:u.status==="pending",isSuccess:u.status==="success",isError:u.status==="error",isIdle:u.status==="idle",mutate:this.mutate,reset:this.reset})},_d=function(u){Ot.batch(()=>{var c,d,h,m,p,x,g,j;if(S(this,Rn)&&this.hasListeners()){const y=S(this,ha).variables,C=S(this,ha).context,w={client:S(this,kn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((u==null?void 0:u.type)==="success"){try{(d=(c=S(this,Rn)).onSuccess)==null||d.call(c,u.data,y,C,w)}catch(k){Promise.reject(k)}try{(m=(h=S(this,Rn)).onSettled)==null||m.call(h,u.data,null,y,C,w)}catch(k){Promise.reject(k)}}else if((u==null?void 0:u.type)==="error"){try{(x=(p=S(this,Rn)).onError)==null||x.call(p,u.error,y,C,w)}catch(k){Promise.reject(k)}try{(j=(g=S(this,Rn)).onSettled)==null||j.call(g,void 0,u.error,y,C,w)}catch(k){Promise.reject(k)}}}this.listeners.forEach(y=>{y(S(this,ha))})})},Qx),Il,Gx,Ty=(Gx=class extends er{constructor(r={}){super();ye(this,Il);this.config=r,fe(this,Il,new Map)}build(r,u,c){const d=u.queryKey,h=u.queryHash??Vd(d,u);let m=this.get(h);return m||(m=new yy({client:r,queryKey:d,queryHash:h,options:r.defaultQueryOptions(u),state:c,defaultOptions:r.getQueryDefaults(d)}),this.add(m)),m}add(r){S(this,Il).has(r.queryHash)||(S(this,Il).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const u=S(this,Il).get(r.queryHash);u&&(r.destroy(),u===r&&S(this,Il).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){Ot.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return S(this,Il).get(r)}getAll(){return[...S(this,Il).values()]}find(r){const u={exact:!0,...r};return this.getAll().find(c=>rx(u,c))}findAll(r={}){const u=this.getAll();return Object.keys(r).length>0?u.filter(c=>rx(r,c)):u}notify(r){Ot.batch(()=>{this.listeners.forEach(u=>{u(r)})})}onFocus(){Ot.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){Ot.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},Il=new WeakMap,Gx),dt,ma,pa,Js,Fs,xa,Ws,Is,Yx,My=(Yx=class{constructor(s={}){ye(this,dt);ye(this,ma);ye(this,pa);ye(this,Js);ye(this,Fs);ye(this,xa);ye(this,Ws);ye(this,Is);fe(this,dt,s.queryCache||new Ty),fe(this,ma,s.mutationCache||new Cy),fe(this,pa,s.defaultOptions||{}),fe(this,Js,new Map),fe(this,Fs,new Map),fe(this,xa,0)}mount(){Du(this,xa)._++,S(this,xa)===1&&(fe(this,Ws,Jd.subscribe(async s=>{s&&(await this.resumePausedMutations(),S(this,dt).onFocus())})),fe(this,Is,Ku.subscribe(async s=>{s&&(await this.resumePausedMutations(),S(this,dt).onOnline())})))}unmount(){var s,r;Du(this,xa)._--,S(this,xa)===0&&((s=S(this,Ws))==null||s.call(this),fe(this,Ws,void 0),(r=S(this,Is))==null||r.call(this),fe(this,Is,void 0))}isFetching(s){return S(this,dt).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return S(this,ma).findAll({...s,status:"pending"}).length}getQueryData(s){var u;const r=this.defaultQueryOptions({queryKey:s});return(u=S(this,dt).get(r.queryHash))==null?void 0:u.state.data}ensureQueryData(s){const r=this.defaultQueryOptions(s),u=S(this,dt).build(this,r),c=u.state.data;return c===void 0?this.fetchQuery(s):(s.revalidateIfStale&&u.isStaleByTime(ga(r.staleTime,u))&&this.prefetchQuery(r),Promise.resolve(c))}getQueriesData(s){return S(this,dt).findAll(s).map(({queryKey:r,state:u})=>{const c=u.data;return[r,c]})}setQueryData(s,r,u){const c=this.defaultQueryOptions({queryKey:s}),d=S(this,dt).get(c.queryHash),h=d==null?void 0:d.state.data,m=uy(r,h);if(m!==void 0)return S(this,dt).build(this,c).setData(m,{...u,manual:!0})}setQueriesData(s,r,u){return Ot.batch(()=>S(this,dt).findAll(s).map(({queryKey:c})=>[c,this.setQueryData(c,r,u)]))}getQueryState(s){var u;const r=this.defaultQueryOptions({queryKey:s});return(u=S(this,dt).get(r.queryHash))==null?void 0:u.state}removeQueries(s){const r=S(this,dt);Ot.batch(()=>{r.findAll(s).forEach(u=>{r.remove(u)})})}resetQueries(s,r){const u=S(this,dt);return Ot.batch(()=>(u.findAll(s).forEach(c=>{c.reset()}),this.refetchQueries({type:"active",...s},r)))}cancelQueries(s,r={}){const u={revert:!0,...r},c=Ot.batch(()=>S(this,dt).findAll(s).map(d=>d.cancel(u)));return Promise.all(c).then(Wt).catch(Wt)}invalidateQueries(s,r={}){return Ot.batch(()=>(S(this,dt).findAll(s).forEach(u=>{u.invalidate()}),(s==null?void 0:s.refetchType)==="none"?Promise.resolve():this.refetchQueries({...s,type:(s==null?void 0:s.refetchType)??(s==null?void 0:s.type)??"active"},r)))}refetchQueries(s,r={}){const u={...r,cancelRefetch:r.cancelRefetch??!0},c=Ot.batch(()=>S(this,dt).findAll(s).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let h=d.fetch(void 0,u);return u.throwOnError||(h=h.catch(Wt)),d.state.fetchStatus==="paused"?Promise.resolve():h}));return Promise.all(c).then(Wt)}fetchQuery(s){const r=this.defaultQueryOptions(s);r.retry===void 0&&(r.retry=!1);const u=S(this,dt).build(this,r);return u.isStaleByTime(ga(r.staleTime,u))?u.fetch(r):Promise.resolve(u.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(Wt).catch(Wt)}fetchInfiniteQuery(s){return s.behavior=mx(s.pages),this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(Wt).catch(Wt)}ensureInfiniteQueryData(s){return s.behavior=mx(s.pages),this.ensureQueryData(s)}resumePausedMutations(){return Ku.isOnline()?S(this,ma).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,dt)}getMutationCache(){return S(this,ma)}getDefaultOptions(){return S(this,pa)}setDefaultOptions(s){fe(this,pa,s)}setQueryDefaults(s,r){S(this,Js).set(Fa(s),{queryKey:s,defaultOptions:r})}getQueryDefaults(s){const r=[...S(this,Js).values()],u={};return r.forEach(c=>{si(s,c.queryKey)&&Object.assign(u,c.defaultOptions)}),u}setMutationDefaults(s,r){S(this,Fs).set(Fa(s),{mutationKey:s,defaultOptions:r})}getMutationDefaults(s){const r=[...S(this,Fs).values()],u={};return r.forEach(c=>{si(s,c.mutationKey)&&Object.assign(u,c.defaultOptions)}),u}defaultQueryOptions(s){if(s._defaulted)return s;const r={...S(this,pa).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return r.queryHash||(r.queryHash=Vd(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===Zd&&(r.enabled=!1),r}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...S(this,pa).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){S(this,dt).clear(),S(this,ma).clear()}},dt=new WeakMap,ma=new WeakMap,pa=new WeakMap,Js=new WeakMap,Fs=new WeakMap,xa=new WeakMap,Ws=new WeakMap,Is=new WeakMap,Yx),Px=b.createContext(void 0),mi=s=>{const r=b.useContext(Px);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},Oy=({client:s,children:r})=>(b.useEffect(()=>(s.mount(),()=>{s.unmount()}),[s]),a.jsx(Px.Provider,{value:s,children:r})),eg=b.createContext(!1),Ay=()=>b.useContext(eg);eg.Provider;function ky(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var Ry=b.createContext(ky()),zy=()=>b.useContext(Ry),_y=(s,r,u)=>{const c=u!=null&&u.state.error&&typeof s.throwOnError=="function"?$d(s.throwOnError,[u.state.error,u]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||c)&&(r.isReset()||(s.retryOnMount=!1))},Dy=s=>{b.useEffect(()=>{s.clearReset()},[s])},Uy=({result:s,errorResetBoundary:r,throwOnError:u,query:c,suspense:d})=>s.isError&&!r.isReset()&&!s.isFetching&&c&&(d&&s.data===void 0||$d(u,[s.error,c])),Hy=s=>{if(s.suspense){const u=d=>d==="static"?d:Math.max(d??1e3,1e3),c=s.staleTime;s.staleTime=typeof c=="function"?(...d)=>u(c(...d)):u(c),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},Ly=(s,r)=>s.isLoading&&s.isFetching&&!r,qy=(s,r)=>(s==null?void 0:s.suspense)&&r.isPending,xx=(s,r,u)=>r.fetchOptimistic(s).catch(()=>{u.clearReset()});function By(s,r,u){var C,w,k,U;const c=Ay(),d=zy(),h=mi(),m=h.defaultQueryOptions(s);(w=(C=h.getDefaultOptions().queries)==null?void 0:C._experimental_beforeQuery)==null||w.call(C,m);const p=h.getQueryCache().get(m.queryHash);m._optimisticResults=c?"isRestoring":"optimistic",Hy(m),_y(m,d,p),Dy(d);const x=!h.getQueryCache().get(m.queryHash),[g]=b.useState(()=>new r(h,m)),j=g.getOptimisticResult(m),y=!c&&s.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(_=>{const L=y?g.subscribe(Ot.batchCalls(_)):Wt;return g.updateResult(),L},[g,y]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),b.useEffect(()=>{g.setOptions(m)},[m,g]),qy(m,j))throw xx(m,g,d);if(Uy({result:j,errorResetBoundary:d,throwOnError:m.throwOnError,query:p,suspense:m.suspense}))throw j.error;if((U=(k=h.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||U.call(k,m,j),m.experimental_prefetchInRender&&!Ja&&Ly(j,c)){const _=x?xx(m,g,d):p==null?void 0:p.promise;_==null||_.catch(Wt).finally(()=>{g.updateResult()})}return m.notifyOnChangeProps?j:g.trackResult(j)}function vl(s,r){return By(s,by)}function Dd(s,r){const u=mi(),[c]=b.useState(()=>new wy(u,s));b.useEffect(()=>{c.setOptions(s)},[c,s]);const d=b.useSyncExternalStore(b.useCallback(m=>c.subscribe(Ot.batchCalls(m)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),h=b.useCallback((m,p)=>{c.mutate(m,p).catch(Wt)},[c]);if(d.error&&$d(c.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:h,mutateAsync:d.mutate}}const Qy=new My({defaultOptions:{queries:{staleTime:5e3,retry:1}}});/**
|
|
50
|
-
* react-router v7.13.0
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Remix Software Inc.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
-
*
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/var gx="popstate";function Gy(s={}){function r(c,d){let{pathname:h,search:m,hash:p}=c.location;return Ud("",{pathname:h,search:m,hash:p},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function u(c,d){return typeof d=="string"?d:ri(d)}return Xy(r,u,null,s)}function it(s,r){if(s===!1||s===null||typeof s>"u")throw new Error(r)}function Gl(s,r){if(!s){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Yy(){return Math.random().toString(36).substring(2,10)}function vx(s,r){return{usr:s.state,key:s.key,idx:r}}function Ud(s,r,u=null,c){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof r=="string"?tr(r):r,state:u,key:r&&r.key||c||Yy()}}function ri({pathname:s="/",search:r="",hash:u=""}){return r&&r!=="?"&&(s+=r.charAt(0)==="?"?r:"?"+r),u&&u!=="#"&&(s+=u.charAt(0)==="#"?u:"#"+u),s}function tr(s){let r={};if(s){let u=s.indexOf("#");u>=0&&(r.hash=s.substring(u),s=s.substring(0,u));let c=s.indexOf("?");c>=0&&(r.search=s.substring(c),s=s.substring(0,c)),s&&(r.pathname=s)}return r}function Xy(s,r,u,c={}){let{window:d=document.defaultView,v5Compat:h=!1}=c,m=d.history,p="POP",x=null,g=j();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function j(){return(m.state||{idx:null}).idx}function y(){p="POP";let _=j(),L=_==null?null:_-g;g=_,x&&x({action:p,location:U.location,delta:L})}function C(_,L){p="PUSH";let J=Ud(U.location,_,L);g=j()+1;let O=vx(J,g),A=U.createHref(J);try{m.pushState(O,"",A)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;d.location.assign(A)}h&&x&&x({action:p,location:U.location,delta:1})}function w(_,L){p="REPLACE";let J=Ud(U.location,_,L);g=j();let O=vx(J,g),A=U.createHref(J);m.replaceState(O,"",A),h&&x&&x({action:p,location:U.location,delta:0})}function k(_){return Ky(_)}let U={get action(){return p},get location(){return s(d,m)},listen(_){if(x)throw new Error("A history only accepts one active listener");return d.addEventListener(gx,y),x=_,()=>{d.removeEventListener(gx,y),x=null}},createHref(_){return r(d,_)},createURL:k,encodeLocation(_){let L=k(_);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:C,replace:w,go(_){return m.go(_)}};return U}function Ky(s,r=!1){let u="http://localhost";typeof window<"u"&&(u=window.location.origin!=="null"?window.location.origin:window.location.href),it(u,"No window.location.(origin|href) available to create URL");let c=typeof s=="string"?s:ri(s);return c=c.replace(/ $/,"%20"),!r&&c.startsWith("//")&&(c=u+c),new URL(c,u)}function tg(s,r,u="/"){return Vy(s,r,u,!1)}function Vy(s,r,u,c){let d=typeof r=="string"?tr(r):r,h=Dn(d.pathname||"/",u);if(h==null)return null;let m=lg(s);Zy(m);let p=null;for(let x=0;p==null&&x<m.length;++x){let g=ab(h);p=lb(m[x],g,c)}return p}function lg(s,r=[],u=[],c="",d=!1){let h=(m,p,x=d,g)=>{let j={relativePath:g===void 0?m.path||"":g,caseSensitive:m.caseSensitive===!0,childrenIndex:p,route:m};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(c)&&x)return;it(j.relativePath.startsWith(c),`Absolute route path "${j.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(c.length)}let y=zn([c,j.relativePath]),C=u.concat(j);m.children&&m.children.length>0&&(it(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),lg(m.children,r,C,y,x)),!(m.path==null&&!m.index)&&r.push({path:y,score:eb(y,m.index),routesMeta:C})};return s.forEach((m,p)=>{var x;if(m.path===""||!((x=m.path)!=null&&x.includes("?")))h(m,p);else for(let g of ng(m.path))h(m,p,!0,g)}),r}function ng(s){let r=s.split("/");if(r.length===0)return[];let[u,...c]=r,d=u.endsWith("?"),h=u.replace(/\?$/,"");if(c.length===0)return d?[h,""]:[h];let m=ng(c.join("/")),p=[];return p.push(...m.map(x=>x===""?h:[h,x].join("/"))),d&&p.push(...m),p.map(x=>s.startsWith("/")&&x===""?"/":x)}function Zy(s){s.sort((r,u)=>r.score!==u.score?u.score-r.score:tb(r.routesMeta.map(c=>c.childrenIndex),u.routesMeta.map(c=>c.childrenIndex)))}var $y=/^:[\w-]+$/,Jy=3,Fy=2,Wy=1,Iy=10,Py=-2,yx=s=>s==="*";function eb(s,r){let u=s.split("/"),c=u.length;return u.some(yx)&&(c+=Py),r&&(c+=Fy),u.filter(d=>!yx(d)).reduce((d,h)=>d+($y.test(h)?Jy:h===""?Wy:Iy),c)}function tb(s,r){return s.length===r.length&&s.slice(0,-1).every((c,d)=>c===r[d])?s[s.length-1]-r[r.length-1]:0}function lb(s,r,u=!1){let{routesMeta:c}=s,d={},h="/",m=[];for(let p=0;p<c.length;++p){let x=c[p],g=p===c.length-1,j=h==="/"?r:r.slice(h.length)||"/",y=Vu({path:x.relativePath,caseSensitive:x.caseSensitive,end:g},j),C=x.route;if(!y&&g&&u&&!c[c.length-1].route.index&&(y=Vu({path:x.relativePath,caseSensitive:x.caseSensitive,end:!1},j)),!y)return null;Object.assign(d,y.params),m.push({params:d,pathname:zn([h,y.pathname]),pathnameBase:ub(zn([h,y.pathnameBase])),route:C}),y.pathnameBase!=="/"&&(h=zn([h,y.pathnameBase]))}return m}function Vu(s,r){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[u,c]=nb(s.path,s.caseSensitive,s.end),d=r.match(u);if(!d)return null;let h=d[0],m=h.replace(/(.)\/+$/,"$1"),p=d.slice(1);return{params:c.reduce((g,{paramName:j,isOptional:y},C)=>{if(j==="*"){let k=p[C]||"";m=h.slice(0,h.length-k.length).replace(/(.)\/+$/,"$1")}const w=p[C];return y&&!w?g[j]=void 0:g[j]=(w||"").replace(/%2F/g,"/"),g},{}),pathname:h,pathnameBase:m,pattern:s}}function nb(s,r=!1,u=!0){Gl(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let c=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,p,x)=>(c.push({paramName:p,isOptional:x!=null}),x?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(c.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,r?void 0:"i"),c]}function ab(s){try{return s.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Gl(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),s}}function Dn(s,r){if(r==="/")return s;if(!s.toLowerCase().startsWith(r.toLowerCase()))return null;let u=r.endsWith("/")?r.length-1:r.length,c=s.charAt(u);return c&&c!=="/"?null:s.slice(u)||"/"}var sb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function rb(s,r="/"){let{pathname:u,search:c="",hash:d=""}=typeof s=="string"?tr(s):s,h;return u?(u=u.replace(/\/\/+/g,"/"),u.startsWith("/")?h=bx(u.substring(1),"/"):h=bx(u,r)):h=r,{pathname:h,search:ob(c),hash:cb(d)}}function bx(s,r){let u=r.replace(/\/+$/,"").split("/");return s.split("/").forEach(d=>{d===".."?u.length>1&&u.pop():d!=="."&&u.push(d)}),u.length>1?u.join("/"):"/"}function xd(s,r,u,c){return`Cannot include a '${s}' character in a manually specified \`to.${r}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${u}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ib(s){return s.filter((r,u)=>u===0||r.route.path&&r.route.path.length>0)}function Wd(s){let r=ib(s);return r.map((u,c)=>c===r.length-1?u.pathname:u.pathnameBase)}function Id(s,r,u,c=!1){let d;typeof s=="string"?d=tr(s):(d={...s},it(!d.pathname||!d.pathname.includes("?"),xd("?","pathname","search",d)),it(!d.pathname||!d.pathname.includes("#"),xd("#","pathname","hash",d)),it(!d.search||!d.search.includes("#"),xd("#","search","hash",d)));let h=s===""||d.pathname==="",m=h?"/":d.pathname,p;if(m==null)p=u;else{let y=r.length-1;if(!c&&m.startsWith("..")){let C=m.split("/");for(;C[0]==="..";)C.shift(),y-=1;d.pathname=C.join("/")}p=y>=0?r[y]:"/"}let x=rb(d,p),g=m&&m!=="/"&&m.endsWith("/"),j=(h||m===".")&&u.endsWith("/");return!x.pathname.endsWith("/")&&(g||j)&&(x.pathname+="/"),x}var zn=s=>s.join("/").replace(/\/\/+/g,"/"),ub=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),ob=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,cb=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,db=class{constructor(s,r,u,c=!1){this.status=s,this.statusText=r||"",this.internal=c,u instanceof Error?(this.data=u.toString(),this.error=u):this.data=u}};function fb(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function hb(s){return s.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ag=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function sg(s,r){let u=s;if(typeof u!="string"||!sb.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let c=u,d=!1;if(ag)try{let h=new URL(window.location.href),m=u.startsWith("//")?new URL(h.protocol+u):new URL(u),p=Dn(m.pathname,r);m.origin===h.origin&&p!=null?u=p+m.search+m.hash:d=!0}catch{Gl(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:d,to:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var rg=["POST","PUT","PATCH","DELETE"];new Set(rg);var mb=["GET",...rg];new Set(mb);var lr=b.createContext(null);lr.displayName="DataRouter";var Fu=b.createContext(null);Fu.displayName="DataRouterState";var pb=b.createContext(!1),ig=b.createContext({isTransitioning:!1});ig.displayName="ViewTransition";var xb=b.createContext(new Map);xb.displayName="Fetchers";var gb=b.createContext(null);gb.displayName="Await";var bl=b.createContext(null);bl.displayName="Navigation";var pi=b.createContext(null);pi.displayName="Location";var en=b.createContext({outlet:null,matches:[],isDataRoute:!1});en.displayName="Route";var Pd=b.createContext(null);Pd.displayName="RouteError";var ug="REACT_ROUTER_ERROR",vb="REDIRECT",yb="ROUTE_ERROR_RESPONSE";function bb(s){if(s.startsWith(`${ug}:${vb}:{`))try{let r=JSON.parse(s.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function jb(s){if(s.startsWith(`${ug}:${yb}:{`))try{let r=JSON.parse(s.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new db(r.status,r.statusText,r.data)}catch{}}function Nb(s,{relative:r}={}){it(nr(),"useHref() may be used only in the context of a <Router> component.");let{basename:u,navigator:c}=b.useContext(bl),{hash:d,pathname:h,search:m}=xi(s,{relative:r}),p=h;return u!=="/"&&(p=h==="/"?u:zn([u,h])),c.createHref({pathname:p,search:m,hash:d})}function nr(){return b.useContext(pi)!=null}function ya(){return it(nr(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(pi).location}var og="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function cg(s){b.useContext(bl).static||b.useLayoutEffect(s)}function dg(){let{isDataRoute:s}=b.useContext(en);return s?Db():Sb()}function Sb(){it(nr(),"useNavigate() may be used only in the context of a <Router> component.");let s=b.useContext(lr),{basename:r,navigator:u}=b.useContext(bl),{matches:c}=b.useContext(en),{pathname:d}=ya(),h=JSON.stringify(Wd(c)),m=b.useRef(!1);return cg(()=>{m.current=!0}),b.useCallback((x,g={})=>{if(Gl(m.current,og),!m.current)return;if(typeof x=="number"){u.go(x);return}let j=Id(x,JSON.parse(h),d,g.relative==="path");s==null&&r!=="/"&&(j.pathname=j.pathname==="/"?r:zn([r,j.pathname])),(g.replace?u.replace:u.push)(j,g.state,g)},[r,u,h,d,s])}b.createContext(null);function xi(s,{relative:r}={}){let{matches:u}=b.useContext(en),{pathname:c}=ya(),d=JSON.stringify(Wd(u));return b.useMemo(()=>Id(s,JSON.parse(d),c,r==="path"),[s,d,c,r])}function Eb(s,r){return fg(s,r)}function fg(s,r,u,c,d){var J;it(nr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:h}=b.useContext(bl),{matches:m}=b.useContext(en),p=m[m.length-1],x=p?p.params:{},g=p?p.pathname:"/",j=p?p.pathnameBase:"/",y=p&&p.route;{let O=y&&y.path||"";mg(g,!y||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
-
|
|
60
|
-
Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let C=ya(),w;if(r){let O=typeof r=="string"?tr(r):r;it(j==="/"||((J=O.pathname)==null?void 0:J.startsWith(j)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${j}" but pathname "${O.pathname}" was given in the \`location\` prop.`),w=O}else w=C;let k=w.pathname||"/",U=k;if(j!=="/"){let O=j.replace(/^\//,"").split("/");U="/"+k.replace(/^\//,"").split("/").slice(O.length).join("/")}let _=tg(s,{pathname:U});Gl(y||_!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),Gl(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let L=Ob(_&&_.map(O=>Object.assign({},O,{params:Object.assign({},x,O.params),pathname:zn([j,h.encodeLocation?h.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?j:zn([j,h.encodeLocation?h.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),m,u,c,d);return r&&L?b.createElement(pi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},L):L}function Cb(){let s=_b(),r=fb(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),u=s instanceof Error?s.stack:null,c="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:c},h={padding:"2px 4px",backgroundColor:c},m=null;return console.error("Error handled by React Router default ErrorBoundary:",s),m=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:h},"ErrorBoundary")," or"," ",b.createElement("code",{style:h},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},r),u?b.createElement("pre",{style:d},u):null,m)}var wb=b.createElement(Cb,null),hg=class extends b.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,r){return r.location!==s.location||r.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:r.error,location:r.location,revalidation:s.revalidation||r.revalidation}}componentDidCatch(s,r){this.props.onError?this.props.onError(s,r):console.error("React Router caught the following error during render",s)}render(){let s=this.state.error;if(this.context&&typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){const u=jb(s.digest);u&&(s=u)}let r=s!==void 0?b.createElement(en.Provider,{value:this.props.routeContext},b.createElement(Pd.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?b.createElement(Tb,{error:s},r):r}};hg.contextType=pb;var gd=new WeakMap;function Tb({children:s,error:r}){let{basename:u}=b.useContext(bl);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let c=bb(r.digest);if(c){let d=gd.get(r);if(d)throw d;let h=sg(c.location,u);if(ag&&!gd.get(r))if(h.isExternal||c.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:c.replace}));throw gd.set(r,m),m}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return s}function Mb({routeContext:s,match:r,children:u}){let c=b.useContext(lr);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(en.Provider,{value:s},u)}function Ob(s,r=[],u=null,c=null,d=null){if(s==null){if(!u)return null;if(u.errors)s=u.matches;else if(r.length===0&&!u.initialized&&u.matches.length>0)s=u.matches;else return null}let h=s,m=u==null?void 0:u.errors;if(m!=null){let j=h.findIndex(y=>y.route.id&&(m==null?void 0:m[y.route.id])!==void 0);it(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),h=h.slice(0,Math.min(h.length,j+1))}let p=!1,x=-1;if(u)for(let j=0;j<h.length;j++){let y=h[j];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(x=j),y.route.id){let{loaderData:C,errors:w}=u,k=y.route.loader&&!C.hasOwnProperty(y.route.id)&&(!w||w[y.route.id]===void 0);if(y.route.lazy||k){p=!0,x>=0?h=h.slice(0,x+1):h=[h[0]];break}}}let g=u&&c?(j,y)=>{var C,w;c(j,{location:u.location,params:((w=(C=u.matches)==null?void 0:C[0])==null?void 0:w.params)??{},unstable_pattern:hb(u.matches),errorInfo:y})}:void 0;return h.reduceRight((j,y,C)=>{let w,k=!1,U=null,_=null;u&&(w=m&&y.route.id?m[y.route.id]:void 0,U=y.route.errorElement||wb,p&&(x<0&&C===0?(mg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,_=null):x===C&&(k=!0,_=y.route.hydrateFallbackElement||null)));let L=r.concat(h.slice(0,C+1)),J=()=>{let O;return w?O=U:k?O=_:y.route.Component?O=b.createElement(y.route.Component,null):y.route.element?O=y.route.element:O=j,b.createElement(Mb,{match:y,routeContext:{outlet:j,matches:L,isDataRoute:u!=null},children:O})};return u&&(y.route.ErrorBoundary||y.route.errorElement||C===0)?b.createElement(hg,{location:u.location,revalidation:u.revalidation,component:U,error:w,children:J(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:g}):J()},null)}function ef(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ab(s){let r=b.useContext(lr);return it(r,ef(s)),r}function kb(s){let r=b.useContext(Fu);return it(r,ef(s)),r}function Rb(s){let r=b.useContext(en);return it(r,ef(s)),r}function tf(s){let r=Rb(s),u=r.matches[r.matches.length-1];return it(u.route.id,`${s} can only be used on routes that contain a unique "id"`),u.route.id}function zb(){return tf("useRouteId")}function _b(){var c;let s=b.useContext(Pd),r=kb("useRouteError"),u=tf("useRouteError");return s!==void 0?s:(c=r.errors)==null?void 0:c[u]}function Db(){let{router:s}=Ab("useNavigate"),r=tf("useNavigate"),u=b.useRef(!1);return cg(()=>{u.current=!0}),b.useCallback(async(d,h={})=>{Gl(u.current,og),u.current&&(typeof d=="number"?await s.navigate(d):await s.navigate(d,{fromRouteId:r,...h}))},[s,r])}var jx={};function mg(s,r,u){!r&&!jx[s]&&(jx[s]=!0,Gl(!1,u))}b.memo(Ub);function Ub({routes:s,future:r,state:u,onError:c}){return fg(s,void 0,u,c,r)}function Hb({to:s,replace:r,state:u,relative:c}){it(nr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=b.useContext(bl);Gl(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:h}=b.useContext(en),{pathname:m}=ya(),p=dg(),x=Id(s,Wd(h),m,c==="path"),g=JSON.stringify(x);return b.useEffect(()=>{p(JSON.parse(g),{replace:r,state:u,relative:c})},[p,g,c,r,u]),null}function Jl(s){it(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Lb({basename:s="/",children:r=null,location:u,navigationType:c="POP",navigator:d,static:h=!1,unstable_useTransitions:m}){it(!nr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=s.replace(/^\/*/,"/"),x=b.useMemo(()=>({basename:p,navigator:d,static:h,unstable_useTransitions:m,future:{}}),[p,d,h,m]);typeof u=="string"&&(u=tr(u));let{pathname:g="/",search:j="",hash:y="",state:C=null,key:w="default"}=u,k=b.useMemo(()=>{let U=Dn(g,p);return U==null?null:{location:{pathname:U,search:j,hash:y,state:C,key:w},navigationType:c}},[p,g,j,y,C,w,c]);return Gl(k!=null,`<Router basename="${p}"> is not able to match the URL "${g}${j}${y}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:b.createElement(bl.Provider,{value:x},b.createElement(pi.Provider,{children:r,value:k}))}function qb({children:s,location:r}){return Eb(Hd(s),r)}function Hd(s,r=[]){let u=[];return b.Children.forEach(s,(c,d)=>{if(!b.isValidElement(c))return;let h=[...r,d];if(c.type===b.Fragment){u.push.apply(u,Hd(c.props.children,h));return}it(c.type===Jl,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),it(!c.props.index||!c.props.children,"An index route cannot have child routes.");let m={id:c.props.id||h.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(m.children=Hd(c.props.children,h)),u.push(m)}),u}var Gu="get",Yu="application/x-www-form-urlencoded";function Wu(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function Bb(s){return Wu(s)&&s.tagName.toLowerCase()==="button"}function Qb(s){return Wu(s)&&s.tagName.toLowerCase()==="form"}function Gb(s){return Wu(s)&&s.tagName.toLowerCase()==="input"}function Yb(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function Xb(s,r){return s.button===0&&(!r||r==="_self")&&!Yb(s)}var Hu=null;function Kb(){if(Hu===null)try{new FormData(document.createElement("form"),0),Hu=!1}catch{Hu=!0}return Hu}var Vb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vd(s){return s!=null&&!Vb.has(s)?(Gl(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Yu}"`),null):s}function Zb(s,r){let u,c,d,h,m;if(Qb(s)){let p=s.getAttribute("action");c=p?Dn(p,r):null,u=s.getAttribute("method")||Gu,d=vd(s.getAttribute("enctype"))||Yu,h=new FormData(s)}else if(Bb(s)||Gb(s)&&(s.type==="submit"||s.type==="image")){let p=s.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let x=s.getAttribute("formaction")||p.getAttribute("action");if(c=x?Dn(x,r):null,u=s.getAttribute("formmethod")||p.getAttribute("method")||Gu,d=vd(s.getAttribute("formenctype"))||vd(p.getAttribute("enctype"))||Yu,h=new FormData(p,s),!Kb()){let{name:g,type:j,value:y}=s;if(j==="image"){let C=g?`${g}.`:"";h.append(`${C}x`,"0"),h.append(`${C}y`,"0")}else g&&h.append(g,y)}}else{if(Wu(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');u=Gu,c=null,d=Yu,m=s}return h&&d==="text/plain"&&(m=h,h=void 0),{action:c,method:u.toLowerCase(),encType:d,formData:h,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function lf(s,r){if(s===!1||s===null||typeof s>"u")throw new Error(r)}function $b(s,r,u,c){let d=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return u?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${c}`:d.pathname=`${d.pathname}.${c}`:d.pathname==="/"?d.pathname=`_root.${c}`:r&&Dn(d.pathname,r)==="/"?d.pathname=`${r.replace(/\/$/,"")}/_root.${c}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${c}`,d}async function Jb(s,r){if(s.id in r)return r[s.id];try{let u=await import(s.module);return r[s.id]=u,u}catch(u){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(u),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Fb(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function Wb(s,r,u){let c=await Promise.all(s.map(async d=>{let h=r.routes[d.route.id];if(h){let m=await Jb(h,u);return m.links?m.links():[]}return[]}));return t1(c.flat(1).filter(Fb).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Nx(s,r,u,c,d,h){let m=(x,g)=>u[g]?x.route.id!==u[g].route.id:!0,p=(x,g)=>{var j;return u[g].pathname!==x.pathname||((j=u[g].route.path)==null?void 0:j.endsWith("*"))&&u[g].params["*"]!==x.params["*"]};return h==="assets"?r.filter((x,g)=>m(x,g)||p(x,g)):h==="data"?r.filter((x,g)=>{var y;let j=c.routes[x.route.id];if(!j||!j.hasLoader)return!1;if(m(x,g)||p(x,g))return!0;if(x.route.shouldRevalidate){let C=x.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((y=u[0])==null?void 0:y.params)||{},nextUrl:new URL(s,window.origin),nextParams:x.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function Ib(s,r,{includeHydrateFallback:u}={}){return Pb(s.map(c=>{let d=r.routes[c.route.id];if(!d)return[];let h=[d.module];return d.clientActionModule&&(h=h.concat(d.clientActionModule)),d.clientLoaderModule&&(h=h.concat(d.clientLoaderModule)),u&&d.hydrateFallbackModule&&(h=h.concat(d.hydrateFallbackModule)),d.imports&&(h=h.concat(d.imports)),h}).flat(1))}function Pb(s){return[...new Set(s)]}function e1(s){let r={},u=Object.keys(s).sort();for(let c of u)r[c]=s[c];return r}function t1(s,r){let u=new Set;return new Set(r),s.reduce((c,d)=>{let h=JSON.stringify(e1(d));return u.has(h)||(u.add(h),c.push({key:h,link:d})),c},[])}function pg(){let s=b.useContext(lr);return lf(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function l1(){let s=b.useContext(Fu);return lf(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var nf=b.createContext(void 0);nf.displayName="FrameworkContext";function xg(){let s=b.useContext(nf);return lf(s,"You must render this element inside a <HydratedRouter> element"),s}function n1(s,r){let u=b.useContext(nf),[c,d]=b.useState(!1),[h,m]=b.useState(!1),{onFocus:p,onBlur:x,onMouseEnter:g,onMouseLeave:j,onTouchStart:y}=r,C=b.useRef(null);b.useEffect(()=>{if(s==="render"&&m(!0),s==="viewport"){let U=L=>{L.forEach(J=>{m(J.isIntersecting)})},_=new IntersectionObserver(U,{threshold:.5});return C.current&&_.observe(C.current),()=>{_.disconnect()}}},[s]),b.useEffect(()=>{if(c){let U=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(U)}}},[c]);let w=()=>{d(!0)},k=()=>{d(!1),m(!1)};return u?s!=="intent"?[h,C,{}]:[h,C,{onFocus:li(p,w),onBlur:li(x,k),onMouseEnter:li(g,w),onMouseLeave:li(j,k),onTouchStart:li(y,w)}]:[!1,C,{}]}function li(s,r){return u=>{s&&s(u),u.defaultPrevented||r(u)}}function a1({page:s,...r}){let{router:u}=pg(),c=b.useMemo(()=>tg(u.routes,s,u.basename),[u.routes,s,u.basename]);return c?b.createElement(r1,{page:s,matches:c,...r}):null}function s1(s){let{manifest:r,routeModules:u}=xg(),[c,d]=b.useState([]);return b.useEffect(()=>{let h=!1;return Wb(s,r,u).then(m=>{h||d(m)}),()=>{h=!0}},[s,r,u]),c}function r1({page:s,matches:r,...u}){let c=ya(),{future:d,manifest:h,routeModules:m}=xg(),{basename:p}=pg(),{loaderData:x,matches:g}=l1(),j=b.useMemo(()=>Nx(s,r,g,h,c,"data"),[s,r,g,h,c]),y=b.useMemo(()=>Nx(s,r,g,h,c,"assets"),[s,r,g,h,c]),C=b.useMemo(()=>{if(s===c.pathname+c.search+c.hash)return[];let U=new Set,_=!1;if(r.forEach(J=>{var A;let O=h.routes[J.route.id];!O||!O.hasLoader||(!j.some(V=>V.route.id===J.route.id)&&J.route.id in x&&((A=m[J.route.id])!=null&&A.shouldRevalidate)||O.hasClientLoader?_=!0:U.add(J.route.id))}),U.size===0)return[];let L=$b(s,p,d.unstable_trailingSlashAwareDataRequests,"data");return _&&U.size>0&&L.searchParams.set("_routes",r.filter(J=>U.has(J.route.id)).map(J=>J.route.id).join(",")),[L.pathname+L.search]},[p,d.unstable_trailingSlashAwareDataRequests,x,c,h,j,r,s,m]),w=b.useMemo(()=>Ib(y,h),[y,h]),k=s1(y);return b.createElement(b.Fragment,null,C.map(U=>b.createElement("link",{key:U,rel:"prefetch",as:"fetch",href:U,...u})),w.map(U=>b.createElement("link",{key:U,rel:"modulepreload",href:U,...u})),k.map(({key:U,link:_})=>b.createElement("link",{key:U,nonce:u.nonce,..._,crossOrigin:_.crossOrigin??u.crossOrigin})))}function i1(...s){return r=>{s.forEach(u=>{typeof u=="function"?u(r):u!=null&&(u.current=r)})}}var u1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{u1&&(window.__reactRouterVersion="7.13.0")}catch{}function o1({basename:s,children:r,unstable_useTransitions:u,window:c}){let d=b.useRef();d.current==null&&(d.current=Gy({window:c,v5Compat:!0}));let h=d.current,[m,p]=b.useState({action:h.action,location:h.location}),x=b.useCallback(g=>{u===!1?p(g):b.startTransition(()=>p(g))},[u]);return b.useLayoutEffect(()=>h.listen(x),[h,x]),b.createElement(Lb,{basename:s,children:r,location:m.location,navigationType:m.action,navigator:h,unstable_useTransitions:u})}var gg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vg=b.forwardRef(function({onClick:r,discover:u="render",prefetch:c="none",relative:d,reloadDocument:h,replace:m,state:p,target:x,to:g,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:C,...w},k){let{basename:U,unstable_useTransitions:_}=b.useContext(bl),L=typeof g=="string"&&gg.test(g),J=sg(g,U);g=J.to;let O=Nb(g,{relative:d}),[A,V,q]=n1(c,w),T=f1(g,{replace:m,state:p,target:x,preventScrollReset:j,relative:d,viewTransition:y,unstable_defaultShouldRevalidate:C,unstable_useTransitions:_});function B(F){r&&r(F),F.defaultPrevented||T(F)}let Z=b.createElement("a",{...w,...q,href:J.absoluteURL||O,onClick:J.isExternal||h?r:B,ref:i1(k,V),target:x,"data-discover":!L&&u==="render"?"true":void 0});return A&&!L?b.createElement(b.Fragment,null,Z,b.createElement(a1,{page:O})):Z});vg.displayName="Link";var yg=b.forwardRef(function({"aria-current":r="page",caseSensitive:u=!1,className:c="",end:d=!1,style:h,to:m,viewTransition:p,children:x,...g},j){let y=xi(m,{relative:g.relative}),C=ya(),w=b.useContext(Fu),{navigator:k,basename:U}=b.useContext(bl),_=w!=null&&g1(y)&&p===!0,L=k.encodeLocation?k.encodeLocation(y).pathname:y.pathname,J=C.pathname,O=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;u||(J=J.toLowerCase(),O=O?O.toLowerCase():null,L=L.toLowerCase()),O&&U&&(O=Dn(O,U)||O);const A=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let V=J===L||!d&&J.startsWith(L)&&J.charAt(A)==="/",q=O!=null&&(O===L||!d&&O.startsWith(L)&&O.charAt(L.length)==="/"),T={isActive:V,isPending:q,isTransitioning:_},B=V?r:void 0,Z;typeof c=="function"?Z=c(T):Z=[c,V?"active":null,q?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let F=typeof h=="function"?h(T):h;return b.createElement(vg,{...g,"aria-current":B,className:Z,ref:j,style:F,to:m,viewTransition:p},typeof x=="function"?x(T):x)});yg.displayName="NavLink";var c1=b.forwardRef(({discover:s="render",fetcherKey:r,navigate:u,reloadDocument:c,replace:d,state:h,method:m=Gu,action:p,onSubmit:x,relative:g,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:C,...w},k)=>{let{unstable_useTransitions:U}=b.useContext(bl),_=p1(),L=x1(p,{relative:g}),J=m.toLowerCase()==="get"?"get":"post",O=typeof p=="string"&&gg.test(p),A=V=>{if(x&&x(V),V.defaultPrevented)return;V.preventDefault();let q=V.nativeEvent.submitter,T=(q==null?void 0:q.getAttribute("formmethod"))||m,B=()=>_(q||V.currentTarget,{fetcherKey:r,method:T,navigate:u,replace:d,state:h,relative:g,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:C});U&&u!==!1?b.startTransition(()=>B()):B()};return b.createElement("form",{ref:k,method:J,action:L,onSubmit:c?x:A,...w,"data-discover":!O&&s==="render"?"true":void 0})});c1.displayName="Form";function d1(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function bg(s){let r=b.useContext(lr);return it(r,d1(s)),r}function f1(s,{target:r,replace:u,state:c,preventScrollReset:d,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:p,unstable_useTransitions:x}={}){let g=dg(),j=ya(),y=xi(s,{relative:h});return b.useCallback(C=>{if(Xb(C,r)){C.preventDefault();let w=u!==void 0?u:ri(j)===ri(y),k=()=>g(s,{replace:w,state:c,preventScrollReset:d,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:p});x?b.startTransition(()=>k()):k()}},[j,g,y,u,c,r,s,d,h,m,p,x])}var h1=0,m1=()=>`__${String(++h1)}__`;function p1(){let{router:s}=bg("useSubmit"),{basename:r}=b.useContext(bl),u=zb(),c=s.fetch,d=s.navigate;return b.useCallback(async(h,m={})=>{let{action:p,method:x,encType:g,formData:j,body:y}=Zb(h,r);if(m.navigate===!1){let C=m.fetcherKey||m1();await c(C,u,m.action||p,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:j,body:y,formMethod:m.method||x,formEncType:m.encType||g,flushSync:m.flushSync})}else await d(m.action||p,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:j,body:y,formMethod:m.method||x,formEncType:m.encType||g,replace:m.replace,state:m.state,fromRouteId:u,flushSync:m.flushSync,viewTransition:m.viewTransition})},[c,d,r,u])}function x1(s,{relative:r}={}){let{basename:u}=b.useContext(bl),c=b.useContext(en);it(c,"useFormAction must be used inside a RouteContext");let[d]=c.matches.slice(-1),h={...xi(s||".",{relative:r})},m=ya();if(s==null){h.search=m.search;let p=new URLSearchParams(h.search),x=p.getAll("index");if(x.some(j=>j==="")){p.delete("index"),x.filter(y=>y).forEach(y=>p.append("index",y));let j=p.toString();h.search=j?`?${j}`:""}}return(!s||s===".")&&d.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),u!=="/"&&(h.pathname=h.pathname==="/"?u:zn([u,h.pathname])),ri(h)}function g1(s,{relative:r}={}){let u=b.useContext(ig);it(u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=bg("useViewTransitionState"),d=xi(s,{relative:r});if(!u.isTransitioning)return!1;let h=Dn(u.currentLocation.pathname,c)||u.currentLocation.pathname,m=Dn(u.nextLocation.pathname,c)||u.nextLocation.pathname;return Vu(d.pathname,m)!=null||Vu(d.pathname,h)!=null}/**
|
|
61
|
-
* @license lucide-react v0.474.0 - ISC
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the ISC license.
|
|
64
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const v1=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jg=(...s)=>s.filter((r,u,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===u).join(" ").trim();/**
|
|
66
|
-
* @license lucide-react v0.474.0 - ISC
|
|
67
|
-
*
|
|
68
|
-
* This source code is licensed under the ISC license.
|
|
69
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/var y1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
71
|
-
* @license lucide-react v0.474.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const b1=b.forwardRef(({color:s="currentColor",size:r=24,strokeWidth:u=2,absoluteStrokeWidth:c,className:d="",children:h,iconNode:m,...p},x)=>b.createElement("svg",{ref:x,...y1,width:r,height:r,stroke:s,strokeWidth:c?Number(u)*24/Number(r):u,className:jg("lucide",d),...p},[...m.map(([g,j])=>b.createElement(g,j)),...Array.isArray(h)?h:[h]]));/**
|
|
76
|
-
* @license lucide-react v0.474.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const Be=(s,r)=>{const u=b.forwardRef(({className:c,...d},h)=>b.createElement(b1,{ref:h,iconNode:r,className:jg(`lucide-${v1(s)}`,c),...d}));return u.displayName=`${s}`,u};/**
|
|
81
|
-
* @license lucide-react v0.474.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the ISC license.
|
|
84
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const j1=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Ng=Be("Activity",j1);/**
|
|
86
|
-
* @license lucide-react v0.474.0 - ISC
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the ISC license.
|
|
89
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const N1=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],S1=Be("ArrowLeftRight",N1);/**
|
|
91
|
-
* @license lucide-react v0.474.0 - ISC
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the ISC license.
|
|
94
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const E1=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],C1=Be("ArrowLeft",E1);/**
|
|
96
|
-
* @license lucide-react v0.474.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const w1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ii=Be("ArrowRight",w1);/**
|
|
101
|
-
* @license lucide-react v0.474.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const T1=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],Sg=Be("Brain",T1);/**
|
|
106
|
-
* @license lucide-react v0.474.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const M1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Eg=Be("Check",M1);/**
|
|
111
|
-
* @license lucide-react v0.474.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const O1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Wa=Be("ChevronDown",O1);/**
|
|
116
|
-
* @license lucide-react v0.474.0 - ISC
|
|
117
|
-
*
|
|
118
|
-
* This source code is licensed under the ISC license.
|
|
119
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const A1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],k1=Be("ChevronLeft",A1);/**
|
|
121
|
-
* @license lucide-react v0.474.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const R1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pl=Be("ChevronRight",R1);/**
|
|
126
|
-
* @license lucide-react v0.474.0 - ISC
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the ISC license.
|
|
129
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const z1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],_1=Be("ChevronUp",z1);/**
|
|
131
|
-
* @license lucide-react v0.474.0 - ISC
|
|
132
|
-
*
|
|
133
|
-
* This source code is licensed under the ISC license.
|
|
134
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const D1=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],Cg=Be("ChevronsDownUp",D1);/**
|
|
136
|
-
* @license lucide-react v0.474.0 - ISC
|
|
137
|
-
*
|
|
138
|
-
* This source code is licensed under the ISC license.
|
|
139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const U1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],wg=Be("ChevronsUpDown",U1);/**
|
|
141
|
-
* @license lucide-react v0.474.0 - ISC
|
|
142
|
-
*
|
|
143
|
-
* This source code is licensed under the ISC license.
|
|
144
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const H1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Sx=Be("Clock",H1);/**
|
|
146
|
-
* @license lucide-react v0.474.0 - ISC
|
|
147
|
-
*
|
|
148
|
-
* This source code is licensed under the ISC license.
|
|
149
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const L1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],q1=Be("Copy",L1);/**
|
|
151
|
-
* @license lucide-react v0.474.0 - ISC
|
|
152
|
-
*
|
|
153
|
-
* This source code is licensed under the ISC license.
|
|
154
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const B1=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],Tg=Be("DollarSign",B1);/**
|
|
156
|
-
* @license lucide-react v0.474.0 - ISC
|
|
157
|
-
*
|
|
158
|
-
* This source code is licensed under the ISC license.
|
|
159
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/const Q1=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],G1=Be("Download",Q1);/**
|
|
161
|
-
* @license lucide-react v0.474.0 - ISC
|
|
162
|
-
*
|
|
163
|
-
* This source code is licensed under the ISC license.
|
|
164
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
-
*/const Y1=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],qs=Be("FlaskConical",Y1);/**
|
|
166
|
-
* @license lucide-react v0.474.0 - ISC
|
|
167
|
-
*
|
|
168
|
-
* This source code is licensed under the ISC license.
|
|
169
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/const X1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],af=Be("Layers",X1);/**
|
|
171
|
-
* @license lucide-react v0.474.0 - ISC
|
|
172
|
-
*
|
|
173
|
-
* This source code is licensed under the ISC license.
|
|
174
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
-
*/const K1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],V1=Be("LoaderCircle",K1);/**
|
|
176
|
-
* @license lucide-react v0.474.0 - ISC
|
|
177
|
-
*
|
|
178
|
-
* This source code is licensed under the ISC license.
|
|
179
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
-
*/const Z1=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]],$1=Be("MessageSquarePlus",Z1);/**
|
|
181
|
-
* @license lucide-react v0.474.0 - ISC
|
|
182
|
-
*
|
|
183
|
-
* This source code is licensed under the ISC license.
|
|
184
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
-
*/const J1=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],Mg=Be("MessageSquare",J1);/**
|
|
186
|
-
* @license lucide-react v0.474.0 - ISC
|
|
187
|
-
*
|
|
188
|
-
* This source code is licensed under the ISC license.
|
|
189
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
-
*/const F1=[["path",{d:"M5 12h14",key:"1ays0h"}]],W1=Be("Minus",F1);/**
|
|
191
|
-
* @license lucide-react v0.474.0 - ISC
|
|
192
|
-
*
|
|
193
|
-
* This source code is licensed under the ISC license.
|
|
194
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const I1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],P1=Be("Pencil",I1);/**
|
|
196
|
-
* @license lucide-react v0.474.0 - ISC
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the ISC license.
|
|
199
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/const ej=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],sf=Be("Play",ej);/**
|
|
201
|
-
* @license lucide-react v0.474.0 - ISC
|
|
202
|
-
*
|
|
203
|
-
* This source code is licensed under the ISC license.
|
|
204
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
-
*/const tj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Og=Be("Plus",tj);/**
|
|
206
|
-
* @license lucide-react v0.474.0 - ISC
|
|
207
|
-
*
|
|
208
|
-
* This source code is licensed under the ISC license.
|
|
209
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
-
*/const lj=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],nj=Be("RefreshCw",lj);/**
|
|
211
|
-
* @license lucide-react v0.474.0 - ISC
|
|
212
|
-
*
|
|
213
|
-
* This source code is licensed under the ISC license.
|
|
214
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
-
*/const aj=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],sj=Be("RotateCcw",aj);/**
|
|
216
|
-
* @license lucide-react v0.474.0 - ISC
|
|
217
|
-
*
|
|
218
|
-
* This source code is licensed under the ISC license.
|
|
219
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
-
*/const rj=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ld=Be("Search",rj);/**
|
|
221
|
-
* @license lucide-react v0.474.0 - ISC
|
|
222
|
-
*
|
|
223
|
-
* This source code is licensed under the ISC license.
|
|
224
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/const ij=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],uj=Be("Send",ij);/**
|
|
226
|
-
* @license lucide-react v0.474.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/const oj=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],cj=Be("ShieldCheck",oj);/**
|
|
231
|
-
* @license lucide-react v0.474.0 - ISC
|
|
232
|
-
*
|
|
233
|
-
* This source code is licensed under the ISC license.
|
|
234
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
-
*/const dj=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],rf=Be("Trash2",dj);/**
|
|
236
|
-
* @license lucide-react v0.474.0 - ISC
|
|
237
|
-
*
|
|
238
|
-
* This source code is licensed under the ISC license.
|
|
239
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
-
*/const fj=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],hj=Be("Upload",fj);/**
|
|
241
|
-
* @license lucide-react v0.474.0 - ISC
|
|
242
|
-
*
|
|
243
|
-
* This source code is licensed under the ISC license.
|
|
244
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
-
*/const mj=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Ag=Be("Users",mj);/**
|
|
246
|
-
* @license lucide-react v0.474.0 - ISC
|
|
247
|
-
*
|
|
248
|
-
* This source code is licensed under the ISC license.
|
|
249
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
-
*/const pj=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],kg=Be("Wrench",pj);function le(...s){return s.filter(Boolean).join(" ")}function ut(s){return s===0?"$0.00":s<.01?`$${s.toFixed(4)}`:`$${s.toFixed(2)}`}function ht(s){return s<1e3?`${Math.round(s)}ms`:s<6e4?`${(s/1e3).toFixed(1)}s`:`${(s/6e4).toFixed(1)}m`}function Ql(s){return s.toLocaleString()}function gi(s,r=80){const u=c=>c.length<=r?c:c.slice(0,r-3)+"…";if(typeof s=="string")return u(s);if(typeof s=="object"&&s!==null&&!Array.isArray(s)){const c=s;for(const d of["question","prompt","text","input","query","message","content","name","title"])if(typeof c[d]=="string"&&c[d].length>0)return u(c[d]);for(const d of Object.values(c))if(typeof d=="string"&&d.length>0)return u(d)}return u(JSON.stringify(s))}function xj(s){switch(s){case"running":return"text-blue-500";case"completed":return"text-green-500";case"failed":return"text-red-500";case"waiting":return"text-amber-500";default:return"text-gray-500"}}const gj=[{to:"/playground",label:"Playground",icon:Mg},{to:"/workflows",label:"Workflows",icon:sf},{to:"/traces",label:"Traces",icon:Ng},{to:"/costs",label:"Costs",icon:Tg},{to:"/memory",label:"Memory",icon:Sg},{to:"/sessions",label:"Sessions",icon:Ag},{to:"/tools",label:"Tools",icon:kg},{to:"/evals",label:"Evals",icon:qs}];function vj(){return a.jsxs("aside",{className:"w-56 border-r border-[hsl(var(--border))] bg-[hsl(var(--card))] flex flex-col h-screen",children:[a.jsx("div",{className:"p-4 border-b border-[hsl(var(--border))]",children:a.jsx("h1",{className:"text-lg font-semibold tracking-tight",children:"Axl Studio"})}),a.jsx("nav",{className:"flex-1 p-2 space-y-0.5",children:gj.map(({to:s,label:r,icon:u})=>a.jsxs(yg,{to:s,className:({isActive:c})=>le("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm transition-colors",c?"bg-[hsl(var(--accent))] text-[hsl(var(--accent-foreground))] font-medium":"text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]"),children:[a.jsx(u,{size:16}),r]},s))}),a.jsx("div",{className:"p-4 border-t border-[hsl(var(--border))] text-xs text-[hsl(var(--muted-foreground))]",children:"@axlsdk/studio"})]})}function Iu({title:s,description:r,actions:u,className:c}){return a.jsxs("header",{className:le("shrink-0 flex items-center justify-between gap-6 px-6 py-4 min-h-[68px]","border-b border-[hsl(var(--border))]",c),children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("h2",{className:"text-xl font-semibold leading-tight",children:s}),a.jsx("div",{className:"mt-1 text-xs text-[hsl(var(--muted-foreground))] truncate",children:r??" "})]}),u&&a.jsx("div",{className:"flex items-center gap-2 shrink-0",children:u})]})}function Ps({title:s,description:r,actions:u,children:c}){return a.jsxs("div",{className:"flex flex-col h-screen",children:[a.jsx(Iu,{title:s,description:r,actions:u}),a.jsx("main",{className:"flex-1 overflow-auto p-6",children:c})]})}function gl({title:s,description:r,icon:u}){return a.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[u&&a.jsx("div",{className:"mb-3 text-[hsl(var(--muted-foreground))]",children:u}),a.jsx("h3",{className:"text-sm font-medium text-[hsl(var(--foreground))]",children:s}),r&&a.jsx("p",{className:"text-sm text-[hsl(var(--muted-foreground))] mt-1 max-w-sm",children:r})]})}function yj({text:s,className:r}){return a.jsxs("div",{className:`whitespace-pre-wrap ${r??""}`,children:[s,a.jsx("span",{className:"animate-pulse",children:"|"})]})}function Rg(s){if(s==null)return"null";if(Array.isArray(s))return"array";const r=typeof s;return r==="object"?"object":r==="number"?"number":r==="boolean"?"boolean":"string"}function bj(s,r){if(r==="array"){const u=s;return u.length===0?"[]":`[${u.length}]`}if(r==="object"){const u=Object.keys(s);return u.length===0?"{}":u.length<=4?`{ ${u.join(", ")} }`:`{ ${u.slice(0,3).join(", ")}, …${u.length-3} more }`}return""}function jj(s,r){return r==="array"?s.map((u,c)=>[c,u]):r==="object"?Object.entries(s):[]}const xl={key:"text-[hsl(var(--foreground))]",string:"text-emerald-700 dark:text-emerald-400",number:"text-blue-600 dark:text-blue-400",boolean:"text-amber-600 dark:text-amber-400",null:"text-[hsl(var(--muted-foreground))] italic",punct:"text-[hsl(var(--muted-foreground))]"},ni="w-3.5 shrink-0 flex items-center justify-center pt-0.5",zg="inline-flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-md border border-[hsl(var(--border))] text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer";function Nj({text:s}){const[r,u]=b.useState(!1),c=b.useRef(void 0);b.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]);const d=b.useCallback(h=>{h.stopPropagation(),navigator.clipboard.writeText(s),u(!0),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>u(!1),2e3)},[s]);return a.jsxs("button",{onClick:d,className:zg,children:[r?a.jsx(Eg,{size:10,className:"text-emerald-500"}):a.jsx(q1,{size:10}),r?"Copied":"Copy"]})}function Sj({value:s,type:r}){if(r==="null")return a.jsx("span",{className:xl.null,children:"null"});if(r==="boolean")return a.jsx("span",{className:xl.boolean,children:String(s)});if(r==="number")return a.jsx("span",{className:xl.number,children:String(s)});if(r==="string"){const u=s;return u.includes(`
|
|
251
|
-
`)&&u.length>80?a.jsxs("span",{className:xl.string,children:['"',u,'"']}):a.jsxs("span",{className:xl.string,children:['"',u,'"']})}return null}const Lu=100,Ej=b.memo(function s({value:r,label:u,depth:c,expandDepth:d,isLast:h}){const m=Rg(r),p=m==="object"||m==="array",[x,g]=b.useState(c<d),[j,y]=b.useState(!1),C=h?"":",",w=u!=null?typeof u=="number"?a.jsxs("span",{className:xl.punct,children:[u,": "]}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:xl.key,children:['"',u,'"']}),a.jsx("span",{className:xl.punct,children:": "})]}):null;if(!p)return a.jsxs("div",{className:"flex items-start leading-relaxed hover:bg-[hsl(var(--accent))]/40 rounded",children:[a.jsx("span",{className:ni}),a.jsxs("span",{children:[w,a.jsx(Sj,{value:r,type:m}),a.jsx("span",{className:xl.punct,children:C})]})]});const k=jj(r,m),U=m==="array"?"[":"{",_=m==="array"?"]":"}";return k.length===0?a.jsxs("div",{className:"flex items-start leading-relaxed",children:[a.jsx("span",{className:ni}),a.jsxs("span",{children:[w,a.jsxs("span",{className:xl.punct,children:[U,_,C]})]})]}):a.jsxs("div",{children:[a.jsxs("div",{className:le("flex items-start leading-relaxed hover:bg-[hsl(var(--accent))]/40 rounded cursor-pointer",x&&"hidden"),onClick:()=>g(!0),children:[a.jsx("span",{className:ni,children:a.jsx(Pl,{size:10,className:"text-[hsl(var(--muted-foreground))]"})}),a.jsxs("span",{children:[w,a.jsxs("span",{className:xl.punct,children:[bj(r,m),C]})]})]}),a.jsxs("div",{className:le(!x&&"hidden"),children:[a.jsxs("div",{className:"flex items-start leading-relaxed hover:bg-[hsl(var(--accent))]/40 rounded cursor-pointer",onClick:()=>g(!1),children:[a.jsx("span",{className:ni,children:a.jsx(Pl,{size:10,className:"text-[hsl(var(--muted-foreground))] rotate-90 transition-transform"})}),a.jsxs("span",{children:[w,a.jsx("span",{className:xl.punct,children:U})]})]}),a.jsxs("div",{className:"pl-5 border-l border-[hsl(var(--border))]/40 ml-1.5",children:[(j?k:k.slice(0,Lu)).map(([L,J],O,A)=>a.jsx(s,{value:J,label:L,depth:c+1,expandDepth:d,isLast:!j&&k.length>Lu?!1:O===A.length-1},typeof L=="number"?L:String(L))),!j&&k.length>Lu&&a.jsxs("button",{onClick:L=>{L.stopPropagation(),y(!0)},className:"text-[10px] text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] py-1 transition-colors",children:["Show all ",k.length," items (",k.length-Lu," more)"]})]}),a.jsxs("div",{className:"flex items-start leading-relaxed",children:[a.jsx("span",{className:ni}),a.jsxs("span",{className:xl.punct,children:[_,C]})]})]})]})});function _t({data:s,defaultExpandDepth:r,maxHeight:u,className:c,collapsed:d}){const h=r??(d?0:2),m=u??"24rem",p=JSON.stringify(s,null,2),[x,g]=b.useState(0),[j,y]=b.useState(h),C=j===1/0,w=b.useCallback(()=>{y(_=>_===1/0?0:1/0),g(_=>_+1)},[]),k=Rg(s),U=k==="object"||k==="array";return a.jsxs("div",{className:le("relative group/json",c),children:[a.jsxs("div",{className:"absolute top-2 right-2 flex items-center gap-1 opacity-0 group-hover/json:opacity-100 transition-opacity z-10",children:[U&&a.jsxs("button",{onClick:_=>{_.stopPropagation(),w()},className:zg,children:[C?a.jsx(Cg,{size:10}):a.jsx(wg,{size:10}),C?"Collapse":"Expand"]}),a.jsx(Nj,{text:p})]}),a.jsx("div",{className:"text-xs font-mono overflow-auto rounded-lg bg-[hsl(var(--secondary))] p-3",style:{maxHeight:m},children:a.jsx(Ej,{value:s,depth:0,expandDepth:j,isLast:!0},x)})]})}function ui({items:s,value:r,onSelect:u,getKey:c,getLabel:d,getDescription:h,searchMatch:m,placeholder:p="Select…",searchPlaceholder:x="Search…",emptyLabel:g="No results",shortcut:j=!1,variant:y="picker",triggerClassName:C,popoverWidth:w,ariaLabel:k}){const U=w??(y==="filter"?260:440),[_,L]=b.useState(!1),[J,O]=b.useState(""),[A,V]=b.useState(0),q=b.useRef(!1),T=b.useRef(null),B=b.useRef(null),Z=b.useRef(null),F=b.useRef(null),[Q,z]=b.useState(!1),ne=b.useId(),oe=`cmdpicker-pop-${ne}`,de=H=>`cmdpicker-opt-${ne}-${H}`,D=b.useMemo(()=>{const H=J.trim().toLowerCase();return H?m?s.filter(ee=>m(ee,H)):s.filter(ee=>d(ee).toLowerCase().includes(H)):s},[s,J,m,d]),P=b.useMemo(()=>{if(!r)return null;const H=s.find(ee=>c(ee)===r);return H?d(H):null},[s,r,c]);b.useEffect(()=>{if(q.current){V(ee=>Math.max(0,Math.min(ee,D.length-1)));return}const H=D.findIndex(ee=>c(ee)===r);V(H>=0?H:0)},[D,r,c]),b.useEffect(()=>{var re;if(!_){O(""),q.current=!1;return}const H=425,ee=(re=F.current)==null?void 0:re.getBoundingClientRect();if(ee){const ce=window.innerHeight-ee.bottom,ve=ee.top;z(ce<H&&ve>ce)}requestAnimationFrame(()=>{var ce;return(ce=Z.current)==null?void 0:ce.focus()})},[_]),b.useEffect(()=>{if(!_)return;const H=ee=>{var ce,ve;const re=ee.target;(ce=T.current)!=null&&ce.contains(re)||(ve=B.current)!=null&&ve.contains(re)||L(!1)};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[_]),b.useEffect(()=>{if(!j)return;const H=ee=>{var re;if((ee.metaKey||ee.ctrlKey)&&ee.key==="k"){const ce=ee.target,ve=!!(ce&&((re=B.current)!=null&&re.contains(ce)));if(((ce==null?void 0:ce.tagName)==="INPUT"||(ce==null?void 0:ce.tagName)==="TEXTAREA"||(ce==null?void 0:ce.isContentEditable)===!0)&&!ve)return;ee.preventDefault(),L(Se=>!Se)}};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[j]);const se=b.useCallback(H=>{u(H),L(!1),requestAnimationFrame(()=>{var ee;return(ee=F.current)==null?void 0:ee.focus()})},[u]),xe=b.useCallback(H=>{var ee;if(H.key==="ArrowDown")H.preventDefault(),q.current=!0,V(re=>Math.min(re+1,Math.max(0,D.length-1)));else if(H.key==="ArrowUp")H.preventDefault(),q.current=!0,V(re=>Math.max(re-1,0));else if(H.key==="Enter"){H.preventDefault();const re=D[A];re&&se(c(re))}else H.key==="Escape"?(H.preventDefault(),L(!1),(ee=F.current)==null||ee.focus()):H.key==="Tab"&&L(!1)},[D,A,se,c]),Ee=P??p,E=y==="filter";return a.jsxs("div",{ref:T,className:"relative inline-flex",children:[a.jsxs("button",{ref:F,type:"button",onClick:()=>L(H=>!H),"aria-haspopup":"listbox","aria-expanded":_,"aria-controls":_?oe:void 0,"aria-label":k??(P?`Selected: ${P}`:p),className:le("group inline-flex items-center gap-2 text-sm cursor-pointer transition-colors","focus:outline-none focus-visible:bg-[hsl(var(--muted))]","hover:bg-[hsl(var(--muted))]",E?"px-3 py-1.5 text-xs":"pl-4 pr-3 py-2 min-w-[240px] max-w-[320px]",C),children:[!E&&a.jsx(Ld,{size:13,className:"text-[hsl(var(--muted-foreground))] shrink-0"}),a.jsx("span",{className:le("flex-1 text-left truncate",E?"":"font-medium",!P&&"text-[hsl(var(--muted-foreground))] font-normal"),children:Ee}),E?a.jsx(Wa,{size:12,className:"text-[hsl(var(--muted-foreground))] shrink-0 opacity-70"}):j?a.jsxs("kbd",{className:le("hidden md:inline-flex items-center gap-0.5 px-1.5 py-0.5 text-[10px] font-mono rounded","border border-[hsl(var(--border))] bg-[hsl(var(--background))]","text-[hsl(var(--muted-foreground))]"),children:[a.jsx("span",{className:"text-xs leading-none",children:"⌘"}),"K"]}):null]}),_&&a.jsxs("div",{ref:B,id:oe,role:"listbox","aria-label":k??p,"aria-activedescendant":D[A]?de(A):void 0,style:{width:U},className:le("absolute right-0 z-50",Q?"bottom-[calc(100%+8px)]":"top-[calc(100%+8px)]","rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--background))]","shadow-2xl overflow-hidden popover-enter"),children:[a.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-[hsl(var(--border))]",children:[a.jsx(Ld,{size:14,className:"text-[hsl(var(--muted-foreground))] shrink-0"}),a.jsx("input",{ref:Z,type:"text",value:J,onChange:H=>{O(H.target.value),q.current=!1},onKeyDown:xe,placeholder:x,"aria-label":x,className:le("flex-1 bg-transparent text-sm focus:outline-none","placeholder:text-[hsl(var(--muted-foreground))]")}),a.jsx("kbd",{className:le("text-[10px] font-mono px-1.5 py-0.5 rounded","border border-[hsl(var(--border))]","text-[hsl(var(--muted-foreground))]"),children:"ESC"})]}),a.jsx("div",{className:"max-h-[340px] overflow-y-auto py-1.5",children:D.length===0?a.jsx("div",{className:"px-4 py-8 text-center text-xs text-[hsl(var(--muted-foreground))]",children:J?`No results for "${J}"`:g}):D.map((H,ee)=>{const re=c(H),ce=d(H),ve=h==null?void 0:h(H),ie=ee===A,Se=re===r;return a.jsxs("button",{id:de(ee),type:"button",role:"option","aria-selected":ie,onClick:()=>se(re),onMouseEnter:()=>{q.current=!0,V(ee)},className:le("w-full flex items-center gap-3 px-4 py-2.5 text-left cursor-pointer","transition-colors",ie&&"bg-[hsl(var(--muted))]"),children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-sm font-medium truncate",children:ce||p}),ve&&a.jsx("div",{className:"text-[10px] uppercase tracking-[0.08em] text-[hsl(var(--muted-foreground))] mt-0.5 truncate",children:ve})]}),Se&&a.jsx(Eg,{size:14,className:"text-[hsl(var(--muted-foreground))] shrink-0","aria-label":"Currently selected"})]},re||`__empty__${ee}`)})}),a.jsxs("div",{className:le("flex items-center justify-between px-4 py-2 border-t border-[hsl(var(--border))]","bg-[hsl(var(--muted))]/40 text-[10px] text-[hsl(var(--muted-foreground))]"),children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("kbd",{className:"font-mono opacity-70",children:"↑↓"})," navigate"]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("kbd",{className:"font-mono opacity-70",children:"↵"})," select"]})]}),a.jsxs("span",{className:"tabular-nums",children:[D.length," of ",s.length]})]})]})]})}const Cj=(window.__AXL_STUDIO_BASE__??"")+"/api";async function nt(s,r){const u=await fetch(`${Cj}${s}`,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(u.status===413)throw new Error(`Request body too large (HTTP 413). If you're importing a large eval file through an embedded Studio middleware, raise your host framework's JSON body limit on the Studio mount. See the Studio README "Host body limits" section.`);if(!(u.headers.get("content-type")??"").includes("application/json")){const m=(await u.text().catch(()=>"")).slice(0,200).trim();throw new Error(`Server returned HTTP ${u.status} with non-JSON response`+(m?`: ${m}`:""))}let d;try{d=await u.json()}catch(h){throw new Error(`Failed to parse server response as JSON (HTTP ${u.status}): ${h instanceof Error?h.message:String(h)}`)}if(!d.ok)throw new Error(d.error.message);return d.data}const wj=()=>nt("/health"),Tj=()=>nt("/workflows"),Mj=s=>nt(`/workflows/${encodeURIComponent(s)}`),Oj=(s,r,u=!1)=>nt(`/workflows/${encodeURIComponent(s)}/execute`,{method:"POST",body:JSON.stringify({input:r,stream:u})}),Aj=()=>nt("/executions"),kj=()=>nt("/sessions"),Rj=s=>nt(`/sessions/${encodeURIComponent(s)}`),zj=s=>nt(`/sessions/${encodeURIComponent(s)}`,{method:"DELETE"}),_j=()=>nt("/agents"),Dj=()=>nt("/tools"),Uj=s=>nt(`/tools/${encodeURIComponent(s)}`),Hj=(s,r)=>nt(`/tools/${encodeURIComponent(s)}/test`,{method:"POST",body:JSON.stringify({input:r})}),Lj=s=>nt(`/memory/${encodeURIComponent(s)}`),qj=(s,r,u)=>nt(`/memory/${encodeURIComponent(s)}/${encodeURIComponent(r)}`,{method:"PUT",body:JSON.stringify({value:u})}),Bj=(s,r)=>nt(`/memory/${encodeURIComponent(s)}/${encodeURIComponent(r)}`,{method:"DELETE"}),Qj=(s,r,u)=>nt("/memory/search",{method:"POST",body:JSON.stringify({query:s,scope:r,limit:u})}),Gj=()=>nt("/costs"),Yj=()=>nt("/costs/reset",{method:"POST"}),Xj=()=>nt("/evals"),Kj=()=>nt("/evals/history"),Vj=(s,r)=>nt(`/evals/${encodeURIComponent(s)}/run`,{method:"POST",body:r!=null&&r.runs&&r.runs>1?JSON.stringify({runs:r.runs}):void 0}),Zj=(s,r)=>nt(`/evals/${encodeURIComponent(s)}/rescore`,{method:"POST",body:JSON.stringify({resultId:r})}),$j=(s,r,u)=>nt("/evals/compare",{method:"POST",body:JSON.stringify({baselineId:s,candidateId:r,options:u})}),Jj=(s,r)=>nt("/evals/import",{method:"POST",body:JSON.stringify({result:s,eval:r})}),Fj=s=>nt(`/evals/history/${encodeURIComponent(s)}`,{method:"DELETE"}),Wj=(s,r,u)=>nt("/playground/chat",{method:"POST",body:JSON.stringify({message:s,sessionId:r,agent:u})});class Ij{constructor(){Pr(this,"ws",null);Pr(this,"listeners",new Map);Pr(this,"reconnectTimer",null);Pr(this,"url");const r=window.location.protocol==="https:"?"wss:":"ws:",u=window.__AXL_STUDIO_BASE__??"";this.url=`${r}//${window.location.host}${u}/ws`}connect(){var r;((r=this.ws)==null?void 0:r.readyState)!==WebSocket.OPEN&&(this.ws=new WebSocket(this.url),this.ws.onopen=()=>{for(const u of this.listeners.keys())this.send({type:"subscribe",channel:u})},this.ws.onmessage=u=>{try{const c=JSON.parse(u.data);if(c.type==="event"&&c.channel){const d=this.listeners.get(c.channel);if(d)for(const m of d)m(c.data);const h=c.channel.indexOf(":");if(h>0){const m=c.channel.substring(0,h)+":*",p=this.listeners.get(m);if(p)for(const x of p)x(c.data)}}}catch{}},this.ws.onclose=()=>{this.scheduleReconnect()},this.ws.onerror=()=>{var u;(u=this.ws)==null||u.close()})}scheduleReconnect(){this.reconnectTimer||(this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},2e3))}send(r){var u;((u=this.ws)==null?void 0:u.readyState)===WebSocket.OPEN&&this.ws.send(JSON.stringify(r))}subscribe(r,u){let c=this.listeners.get(r);return c||(c=new Set,this.listeners.set(r,c),this.send({type:"subscribe",channel:r})),c.add(u),this.connect(),()=>{c.delete(u),c.size===0&&(this.listeners.delete(r),this.send({type:"unsubscribe",channel:r}))}}disconnect(){var r;this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(r=this.ws)==null||r.close(),this.ws=null}}const Pj=new Ij;function uf(s,r){const u=b.useRef(r);u.current=r,b.useEffect(()=>{if(s)return Pj.subscribe(s,c=>u.current(c))},[s])}const Ex={tokens:"",events:[],done:!1,error:null,result:null};function _g(s){const[r,u]=b.useState(Ex),c=b.useRef(null);b.useEffect(()=>{s!==c.current&&(c.current=s,s&&u(Ex))},[s]);const d=b.useCallback(h=>{const m=h;u(p=>{switch(m.type){case"token":return{...p,tokens:p.tokens+m.data,events:[...p.events,m]};case"done":return{...p,done:!0,result:m.data,events:[...p.events,m]};case"error":return{...p,done:!0,error:m.message,events:[...p.events,m]};default:return{...p,events:[...p.events,m]}}})},[]);return uf(s?`execution:${s}`:null,d),r}function eN(){const[s,r]=b.useState([]),[u,c]=b.useState(""),[d,h]=b.useState(null),[m,p]=b.useState(null),[x,g]=b.useState(""),[j,y]=b.useState(!1),[C,w]=b.useState(0),[k,U]=b.useState({input:0,output:0}),_=b.useRef(null),L=b.useRef(0),{data:J=[]}=vl({queryKey:["agents"],queryFn:_j}),O=_g(m);b.useEffect(()=>{O.tokens&&j&&r(B=>{const Z=B[B.length-1];return(Z==null?void 0:Z.role)==="assistant"?[...B.slice(0,-1),{...Z,content:O.tokens}]:[...B,{role:"assistant",content:O.tokens}]}),O.done&&(y(!1),p(null),O.error&&r(B=>{const Z=B[B.length-1];return(Z==null?void 0:Z.role)==="assistant"&&!Z.content?[...B.slice(0,-1),{role:"assistant",content:`Error: ${O.error}`}]:[...B,{role:"assistant",content:`Error: ${O.error}`}]}))},[O.tokens,O.done,O.error,j]),b.useEffect(()=>{const B=[],Z=[],F=[];for(const Q of O.events){if(Q.type==="tool_call"&&B.push({name:Q.name,args:Q.args,callId:Q.callId}),Q.type==="tool_result"){const z=Q.callId?B.find(ne=>ne.callId===Q.callId):B.find(ne=>ne.name===Q.name&&!ne.result);z&&(z.result=Q.result)}Q.type==="handoff"&&Z.push({source:Q.source,target:Q.target,mode:Q.mode??"oneway"}),Q.type==="tool_approval"&&F.push({tool:Q.name,approved:Q.approved})}(B.length>0||Z.length>0||F.length>0)&&r(Q=>{const z=Q[Q.length-1];return(z==null?void 0:z.role)==="assistant"?[...Q.slice(0,-1),{...z,toolCalls:B.length>0?B:z.toolCalls,handoffs:Z.length>0?Z:z.handoffs,approvals:F.length>0?F:z.approvals}]:Q})},[O.events]),b.useEffect(()=>{const B=O.events.slice(L.current);if(B.length===0)return;L.current=O.events.length;let Z=0,F=0,Q=0;for(const z of B)z.type==="agent_end"&&z.cost&&(Z+=z.cost),z.type==="step"&&z.data.tokens&&(F+=z.data.tokens.input??0,Q+=z.data.tokens.output??0);Z>0&&w(z=>z+Z),(F>0||Q>0)&&U(z=>({input:z.input+F,output:z.output+Q}))},[O.events]),b.useEffect(()=>{var B;(B=_.current)==null||B.scrollIntoView({behavior:"smooth"})},[s]);const A=b.useCallback(async()=>{if(!u.trim()||j)return;const B=u.trim();c(""),r(Z=>[...Z,{role:"user",content:B}]),y(!0);try{const Z=await Wj(B,d??void 0,x||void 0);h(Z.sessionId),p(Z.executionId)}catch(Z){y(!1),r(F=>[...F,{role:"assistant",content:`Error: ${Z instanceof Error?Z.message:String(Z)}`}])}},[u,j,d,x]),V=B=>{B.key==="Enter"&&!B.shiftKey&&(B.preventDefault(),A())},q=C>0||k.input>0,T=s.length;return a.jsx(Ps,{title:"Agent Playground",description:T>0?a.jsxs(a.Fragment,{children:[a.jsxs("span",{children:[T," message",T!==1?"s":""]}),d&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsxs("span",{className:"font-mono",children:["session ",d.slice(0,8)]})]})]}):J.length>0?a.jsxs(a.Fragment,{children:[a.jsxs("span",{children:[J.length," registered agent",J.length!==1?"s":""]}),a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsx("span",{children:"pick one or use the default"})]}):"Interactive chat with registered agents",actions:a.jsxs(a.Fragment,{children:[q&&a.jsxs("div",{className:"flex items-center gap-1.5",children:[C>0&&a.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))]",children:ut(C)}),k.input>0&&a.jsxs("span",{className:"px-1.5 py-0.5 rounded text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))]",children:[Ql(k.input+k.output)," tok"]})]}),a.jsxs("div",{className:le("inline-flex items-stretch rounded-full bg-[hsl(var(--background))]","ring-1 ring-[hsl(var(--input))] shadow-sm","hover:ring-[hsl(var(--ring))] focus-within:ring-[hsl(var(--ring))]","transition-shadow"),children:[a.jsx(ui,{items:J,value:x,onSelect:g,getKey:B=>B.name,getLabel:B=>B.name,getDescription:B=>a.jsxs(a.Fragment,{children:[a.jsx("span",{children:B.model}),B.tools.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"opacity-40 mx-1",children:"·"}),a.jsxs("span",{children:[B.tools.length," tool",B.tools.length!==1?"s":""]})]}),B.handoffs.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"opacity-40 mx-1",children:"·"}),a.jsxs("span",{children:[B.handoffs.length," handoff",B.handoffs.length!==1?"s":""]})]})]}),searchMatch:(B,Z)=>B.name.toLowerCase().includes(Z)||B.model.toLowerCase().includes(Z)||B.tools.some(F=>F.toLowerCase().includes(Z)),placeholder:"Default agent",searchPlaceholder:"Search agents…",emptyLabel:"No agents registered",shortcut:!0,triggerClassName:"rounded-l-full",ariaLabel:"Select an agent"}),a.jsxs("button",{onClick:()=>{r([]),h(null),p(null),w(0),U({input:0,output:0})},className:le("inline-flex items-center gap-1.5 pl-3.5 pr-4 py-2 text-sm font-medium cursor-pointer","border-l border-[hsl(var(--input))] rounded-r-full","hover:bg-[hsl(var(--muted))] transition-colors","focus:outline-none focus-visible:bg-[hsl(var(--muted))]"),children:[a.jsx($1,{size:12}),"New chat"]})]})]}),children:a.jsxs("div",{className:"flex flex-col h-full max-w-3xl mx-auto",children:[a.jsxs("div",{className:"flex-1 overflow-auto space-y-4 pb-4",children:[s.length===0&&a.jsx(gl,{title:"Start a conversation",description:"Type a message below to chat with an agent. Tool calls, handoffs, and streaming responses will be displayed in real-time."}),s.map((B,Z)=>a.jsx("div",{className:`flex ${B.role==="user"?"justify-end":"justify-start"}`,children:a.jsxs("div",{className:`max-w-[80%] rounded-xl px-4 py-2.5 text-sm ${B.role==="user"?"bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]":"bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))]"}`,children:[B.role==="assistant"&&j&&Z===s.length-1?a.jsx(yj,{text:B.content}):a.jsx("div",{className:"whitespace-pre-wrap",children:B.content}),B.handoffs&&B.handoffs.length>0&&a.jsx("div",{className:"mt-2 space-y-1 border-t border-[hsl(var(--border))] pt-2",children:B.handoffs.map((F,Q)=>a.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[a.jsx(ii,{size:12,className:"text-amber-500"}),a.jsx("span",{className:"font-medium",children:F.source}),a.jsx(ii,{size:10}),a.jsx("span",{className:"font-medium",children:F.target}),a.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:["(",F.mode,")"]})]},Q))}),B.approvals&&B.approvals.length>0&&a.jsx("div",{className:"mt-2 space-y-1 border-t border-[hsl(var(--border))] pt-2",children:B.approvals.map((F,Q)=>a.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[a.jsx(cj,{size:12,className:F.approved?"text-green-500":"text-red-500"}),a.jsxs("span",{children:["Tool ",a.jsx("span",{className:"font-mono",children:F.tool}),":"," ",F.approved?"approved":"denied"]})]},Q))}),B.toolCalls&&B.toolCalls.length>0&&a.jsx("div",{className:"mt-2 space-y-2 border-t border-[hsl(var(--border))] pt-2",children:B.toolCalls.map((F,Q)=>a.jsxs("div",{className:"text-xs",children:[a.jsxs("div",{className:"font-medium mb-1",children:["Tool: ",F.name]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("div",{className:"text-[hsl(var(--muted-foreground))]",children:"Input:"}),a.jsx(_t,{data:F.args,collapsed:!0}),F.result!==void 0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"text-[hsl(var(--muted-foreground))]",children:"Output:"}),a.jsx(_t,{data:F.result,collapsed:!0})]})]})]},Q))})]})},Z)),a.jsx("div",{ref:_})]}),a.jsx("div",{className:"border-t border-[hsl(var(--border))] pt-4",children:a.jsxs("div",{className:"flex items-end gap-2",children:[a.jsx("textarea",{value:u,onChange:B=>c(B.target.value),onKeyDown:V,placeholder:"Type a message...",rows:1,className:"flex-1 px-3 py-2.5 text-sm rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))] resize-none focus:outline-none focus:ring-2 focus:ring-[hsl(var(--ring))]"}),a.jsx("button",{onClick:A,disabled:!u.trim()||j,className:"p-2.5 rounded-xl bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] hover:opacity-90 disabled:opacity-50 transition-opacity",children:a.jsx(uj,{size:16})})]})})]})})}function Dg({value:s,onChange:r,placeholder:u,className:c}){const[d,h]=b.useState(!1),[m,p]=b.useState(null),x=b.useRef(null),g=b.useCallback(y=>{const C=y.target.value;r(C);try{C.trim()&&JSON.parse(C),p(null)}catch(w){p(w instanceof Error?w.message:"Invalid JSON")}},[r]);b.useEffect(()=>{var y;d&&((y=x.current)==null||y.focus())},[d]);let j=null;try{j=s.trim()?JSON.parse(s):{}}catch{}return j===null||d?a.jsxs("div",{className:c,children:[a.jsx("textarea",{ref:x,value:s,onChange:g,onBlur:()=>{m||h(!1)},placeholder:u??"{}",className:"w-full h-40 p-3 text-xs font-mono rounded-xl bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] border-none resize-y focus:outline-none focus:ring-2 focus:ring-[hsl(var(--ring))]",spellCheck:!1}),m&&a.jsx("p",{className:"text-xs text-red-500 mt-1",children:m})]}):a.jsx("div",{className:c,children:a.jsxs("div",{children:[a.jsx(_t,{data:j,maxHeight:"12rem"}),a.jsxs("button",{onClick:()=>h(!0),className:"mt-1.5 inline-flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-md text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",children:[a.jsx(P1,{size:10}),"Edit"]})]})})}function Ug({schema:s,onSubmit:r,submitLabel:u="Submit",className:c}){const[d,h]=b.useState({}),m=s.properties??{},p=new Set(s.required??[]),x=b.useCallback(g=>{g.preventDefault();const j={};for(const[y,C]of Object.entries(m)){const w=d[y]??"";if(!(!w&&!p.has(y)))if(C.type==="number")j[y]=Number(w);else if(C.type==="boolean")j[y]=w==="true";else if(C.type==="object"||C.type==="array")try{j[y]=JSON.parse(w)}catch{j[y]=w}else j[y]=w}r(j)},[d,m,p,r]);return a.jsxs("form",{onSubmit:x,className:`space-y-3 ${c??""}`,children:[Object.entries(m).map(([g,j])=>a.jsxs("div",{children:[a.jsxs("label",{className:"block text-xs font-medium text-[hsl(var(--foreground))] mb-1",children:[g,p.has(g)&&a.jsx("span",{className:"text-red-500 ml-0.5",children:"*"}),j.description&&a.jsxs("span",{className:"text-[hsl(var(--muted-foreground))] font-normal ml-1",children:["- ",j.description]})]}),j.enum?a.jsxs("select",{value:d[g]??"",onChange:y=>h({...d,[g]:y.target.value}),className:"w-full px-2 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[a.jsx("option",{value:"",children:"Select..."}),j.enum.map(y=>a.jsx("option",{value:y,children:y},y))]}):j.type==="boolean"?a.jsxs("select",{value:d[g]??"",onChange:y=>h({...d,[g]:y.target.value}),className:"w-full px-2 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[a.jsx("option",{value:"",children:"Select..."}),a.jsx("option",{value:"true",children:"true"}),a.jsx("option",{value:"false",children:"false"})]}):a.jsx("input",{type:j.type==="number"?"number":"text",value:d[g]??"",onChange:y=>h({...d,[g]:y.target.value}),placeholder:j.type??"string",className:"w-full px-2 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] bg-[hsl(var(--background))]"})]},g)),a.jsx("button",{type:"submit",className:"px-4 py-2 text-sm font-medium rounded-md bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] hover:opacity-90 transition-opacity",children:u})]})}function Hg({status:s,className:r}){return a.jsxs("span",{className:le("inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium",xj(s),s==="running"&&"animate-pulse",r),children:[a.jsx("span",{className:le("w-1.5 h-1.5 rounded-full",s==="running"&&"bg-blue-500",s==="completed"&&"bg-green-500",s==="failed"&&"bg-red-500",s==="waiting"&&"bg-amber-500")}),s]})}function ft({label:s,value:r,subtitle:u,subtitleColor:c,accent:d,tint:h,badge:m}){return a.jsxs("div",{className:le("px-4 py-3.5 rounded-xl",h||"bg-[hsl(var(--card))] border border-[hsl(var(--border))]"),children:[a.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:s}),m?a.jsx("div",{className:"mt-1",children:m}):a.jsx("p",{className:le("text-2xl font-semibold mt-1 font-mono tracking-tight",d),children:r}),u&&a.jsx("p",{className:le("text-xs mt-0.5",c??"text-[hsl(var(--muted-foreground))]"),children:u})]})}const tN={agent_call:"bg-blue-500",tool_call:"bg-purple-500",tool_call_complete:"bg-purple-400",workflow_start:"bg-green-500",workflow_complete:"bg-green-400",handoff:"bg-amber-500",await_human:"bg-red-500",vote_start:"bg-cyan-500",spawn:"bg-indigo-500"};function Zu(s){return tN[s]??"bg-slate-500"}function Lg(s){const r=s.type;return r==="workflow_start"||r==="workflow_complete"?0:r==="agent_call"||r==="spawn"||r==="vote_start"?1:r==="tool_call"||r==="tool_call_complete"||r==="handoff"?2:1}function lN(){const[s,r]=b.useState(""),[u,c]=b.useState("{}"),[d,h]=b.useState(!0),[m,p]=b.useState(null),[x,g]=b.useState(void 0),[j,y]=b.useState(null),[C,w]=b.useState("idle"),{data:k=[]}=vl({queryKey:["workflows"],queryFn:Tj}),{data:U}=vl({queryKey:["workflow",s],queryFn:()=>Mj(s),enabled:!!s}),_=_g(m),L=b.useCallback(async Q=>{if(s){g(void 0),y(null),w("running");try{const z=await Oj(s,Q,!0);z.streaming&&z.executionId?p(z.executionId):(g(z.result),w("completed"))}catch(z){y(z instanceof Error?z.message:String(z)),w("failed")}}},[s]),J=b.useCallback(()=>{try{const Q=JSON.parse(u);L(Q)}catch(Q){y(Q instanceof Error?Q.message:String(Q)),w("failed")}},[u,L]),O=b.useCallback(Q=>{r(Q),c("{}"),g(void 0),y(null),w("idle")},[]),A=k.find(Q=>Q.name===s),V=b.useCallback(Q=>{L(Q)},[L]);b.useEffect(()=>{_.done&&C==="running"&&(w(_.error?"failed":"completed"),_.error&&y(_.error),_.result!==void 0&&g(_.result),p(null))},[_.done,_.error,_.result,C]);const q=_.events.filter(Q=>Q.type==="step").map(Q=>Q.data),T=!!(U!=null&&U.inputSchema),B=Math.max(...q.map(Q=>Q.duration??0),1),Z=q.reduce((Q,z)=>Q+(z.duration??0),0),F=q.reduce((Q,z)=>Q+(z.cost??0),0);return a.jsxs("div",{className:"flex flex-col h-screen",children:[a.jsx(Iu,{title:"Workflow Runner",description:A?a.jsxs(a.Fragment,{children:[a.jsx("span",{children:A.name}),(A.hasInputSchema||A.hasOutputSchema)&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsxs("span",{children:[A.hasInputSchema&&"input schema",A.hasInputSchema&&A.hasOutputSchema&&" · ",A.hasOutputSchema&&"output schema"]})]})]}):k.length>0?`${k.length} registered workflow${k.length!==1?"s":""} · select one to run`:"No workflows registered",actions:k.length>0&&a.jsxs("div",{className:le("inline-flex items-stretch rounded-full bg-[hsl(var(--background))] shrink-0","ring-1 ring-[hsl(var(--input))] shadow-sm","hover:ring-[hsl(var(--ring))] focus-within:ring-[hsl(var(--ring))]","transition-shadow"),children:[a.jsx(ui,{items:k,value:s,onSelect:O,getKey:Q=>Q.name,getLabel:Q=>Q.name,getDescription:Q=>{const z=[];return Q.hasInputSchema&&z.push("input schema"),Q.hasOutputSchema&&z.push("output schema"),z.length>0?z.join(" · "):"no schema"},placeholder:"Select workflow",searchPlaceholder:"Search workflows…",emptyLabel:"No workflows registered",shortcut:!0,triggerClassName:"rounded-l-full",ariaLabel:"Select a workflow"}),a.jsxs("button",{onClick:J,disabled:!s||C==="running",className:le("inline-flex items-center gap-1.5 pl-3.5 pr-4 py-2 text-sm font-medium cursor-pointer","bg-[hsl(var(--foreground))] text-[hsl(var(--background))] rounded-r-full","hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-[hsl(var(--foreground))]","disabled:opacity-40 disabled:cursor-not-allowed transition-opacity"),children:[a.jsx(sf,{size:12,className:le("fill-current",C==="running"&&"animate-spin fill-none")}),C==="running"?"Running…":"Run"]})]})}),a.jsxs("div",{className:"flex-1 min-h-0 flex border-t border-[hsl(var(--border))]",children:[a.jsxs("div",{className:"w-[400px] xl:w-[480px] shrink-0 border-r border-[hsl(var(--border))] overflow-y-auto p-5 space-y-4",children:[T&&a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("button",{onClick:()=>h(!0),className:le("px-3 py-1 text-xs rounded-lg transition-colors",d?"bg-[hsl(var(--foreground))] text-[hsl(var(--background))]":"text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]"),children:"Form"}),a.jsx("button",{onClick:()=>h(!1),className:le("px-3 py-1 text-xs rounded-lg transition-colors",d?"text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]":"bg-[hsl(var(--foreground))] text-[hsl(var(--background))]"),children:"JSON"})]}),T&&d?a.jsx(Ug,{schema:U.inputSchema,onSubmit:V,submitLabel:C==="running"?"Running…":"Execute"}):a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-2",children:"Input (JSON)"}),a.jsx(Dg,{value:u,onChange:c})]}),(U==null?void 0:U.outputSchema)!=null&&a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-2",children:"Output Schema"}),a.jsx(_t,{data:U.outputSchema,collapsed:!0})]})]}),a.jsx("div",{className:"flex-1 overflow-y-auto p-5",children:C==="idle"?a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx(gl,{icon:a.jsx(qs,{size:32}),title:"No execution",description:"Select a workflow and click Run to see results."})}):a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[a.jsx(ft,{label:"Status",badge:a.jsx(Hg,{status:C})}),a.jsx(ft,{label:"Steps",value:String(q.length)}),a.jsx(ft,{label:"Duration",value:Z>0?ht(Z):"—"}),a.jsx(ft,{label:"Cost",value:F>0?ut(F):"—"})]}),j&&a.jsx("div",{className:"p-4 rounded-xl bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 text-sm",children:j}),x!==void 0&&a.jsxs("div",{children:[a.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-2",children:"Result"}),a.jsx(_t,{data:x})]}),q.length>0&&a.jsxs("div",{children:[a.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-2",children:"Timeline"}),a.jsx("div",{className:"space-y-1",children:q.map((Q,z)=>{const ne=Lg(Q);return a.jsxs("details",{className:"group",children:[a.jsxs("summary",{className:"flex items-center gap-2 px-3 py-1.5 text-xs rounded-xl bg-[hsl(var(--secondary))] cursor-pointer hover:bg-[hsl(var(--accent))]",style:{marginLeft:`${ne*16}px`},children:[a.jsxs("span",{className:"font-mono text-[hsl(var(--muted-foreground))] w-8",children:["#",Q.step]}),a.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${Zu(Q.type)}`}),a.jsx("span",{className:"font-medium w-24 truncate",children:Q.type}),Q.agent&&a.jsx("span",{className:"text-blue-600 dark:text-blue-400 w-24 truncate",children:Q.agent}),Q.tool&&a.jsx("span",{className:"text-purple-600 dark:text-purple-400 w-24 truncate",children:Q.tool}),a.jsx("div",{className:"flex-1 h-3 bg-[hsl(var(--background))] rounded overflow-hidden",children:Q.duration!=null&&Q.duration>0&&a.jsx("div",{className:`h-full rounded ${Zu(Q.type)}`,style:{width:`${Math.max(Q.duration/B*100,2)}%`,opacity:.7}})}),Q.duration!=null&&a.jsx("span",{className:"text-[10px] font-mono text-[hsl(var(--muted-foreground))]",children:ht(Q.duration)})]}),a.jsxs("div",{className:"mt-1 mb-2 p-3 rounded-xl bg-[hsl(var(--card))] border border-[hsl(var(--border))]",style:{marginLeft:`${ne*16+32}px`},children:[Q.model&&a.jsxs("p",{className:"text-xs mb-1",children:[a.jsx("strong",{children:"Model:"})," ",Q.model]}),Q.tokens&&a.jsxs("p",{className:"text-xs mb-1",children:[a.jsx("strong",{children:"Tokens:"})," in=",Q.tokens.input," out=",Q.tokens.output,Q.tokens.reasoning?` reasoning=${Q.tokens.reasoning}`:""]}),Q.data!=null&&a.jsx(_t,{data:Q.data,collapsed:!0})]})]},z)})})]}),C==="running"&&q.length===0&&a.jsxs("div",{className:"flex items-center justify-center py-12 text-sm text-[hsl(var(--muted-foreground))]",children:[a.jsx(qs,{size:16,className:"animate-pulse mr-2"}),"Executing workflow…"]})]})})]})]})}function Ls({cost:s,className:r}){return a.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))] ${r??""}`,children:ut(s)})}function nN({ms:s,className:r}){return a.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))] ${r??""}`,children:ht(s)})}const aN={running:"border-l-blue-500",completed:"border-l-green-500",failed:"border-l-red-500"};function sN(s){const r=new Date(s),u=new Date;return r.getFullYear()===u.getFullYear()&&r.getMonth()===u.getMonth()&&r.getDate()===u.getDate()?r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}):r.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function rN(){const[s,r]=b.useState(null),[u,c]=b.useState([]),[d,h]=b.useState(""),[m,p]=b.useState(""),[x,g]=b.useState(new Set),{data:j=[],refetch:y}=vl({queryKey:["executions"],queryFn:Aj,refetchInterval:3e3});uf("trace:*",b.useCallback(T=>{c(B=>[...B.slice(-200),T])},[]));const C=s?s.steps:u;let w=C;d&&(w=w.filter(T=>T.type===d)),m&&(w=w.filter(T=>T.agent===m));const k=b.useMemo(()=>[...new Set(C.map(T=>T.type))].sort(),[C]),U=b.useMemo(()=>[...new Set(C.map(T=>T.agent).filter(T=>!!T))].sort(),[C]),_=b.useMemo(()=>[{value:"",label:"All types"},...k.map(T=>({value:T,label:T}))],[k]),L=b.useMemo(()=>[{value:"",label:"All agents"},...U.map(T=>({value:T,label:T}))],[U]),J=Math.max(...w.map(T=>T.duration??0),1),O=T=>{g(B=>{const Z=new Set(B);return Z.has(T)?Z.delete(T):Z.add(T),Z})},A=()=>{const T=w.map((B,Z)=>B.step??Z);g(new Set(T))},V=()=>{g(new Set)},q=b.useMemo(()=>{if(!s)return null;const T=[...new Set(s.steps.map(B=>B.model).filter(Boolean))];return{duration:s.duration,eventCount:s.steps.length,cost:s.totalCost,models:T}},[s]);return a.jsxs("div",{className:"flex flex-col h-screen",children:[a.jsx(Iu,{title:"Trace Explorer",description:s?a.jsxs(a.Fragment,{children:[a.jsx("span",{children:s.workflow}),a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsx("span",{className:"font-mono",children:s.executionId.slice(0,8)}),a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsxs("span",{children:[s.steps.length," event",s.steps.length!==1?"s":""]})]}):a.jsxs(a.Fragment,{children:[j.length," execution",j.length!==1?"s":"",a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),u.length," live event",u.length!==1?"s":""]}),actions:a.jsxs(a.Fragment,{children:[a.jsx(ui,{items:_,value:d,onSelect:h,getKey:T=>T.value,getLabel:T=>T.label,placeholder:"All types",searchPlaceholder:"Filter types…",variant:"filter",triggerClassName:le("rounded-full shadow-sm ring-1 transition-shadow",d?"ring-[hsl(var(--foreground))] text-[hsl(var(--foreground))] font-medium":"ring-[hsl(var(--input))]"),ariaLabel:"Filter by event type"}),U.length>0&&a.jsx(ui,{items:L,value:m,onSelect:p,getKey:T=>T.value,getLabel:T=>T.label,placeholder:"All agents",searchPlaceholder:"Filter agents…",variant:"filter",triggerClassName:le("rounded-full shadow-sm ring-1 transition-shadow",m?"ring-[hsl(var(--foreground))] text-[hsl(var(--foreground))] font-medium":"ring-[hsl(var(--input))]"),ariaLabel:"Filter by agent"}),a.jsxs("button",{onClick:()=>{y(),c([])},className:le("inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-full cursor-pointer","ring-1 ring-[hsl(var(--input))] bg-[hsl(var(--background))] shadow-sm","hover:bg-[hsl(var(--muted))] hover:ring-[hsl(var(--ring))]","focus:outline-none focus-visible:ring-[hsl(var(--ring))] transition-all"),children:[a.jsx(nj,{size:12}),"Refresh"]})]})}),a.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-6",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[a.jsxs("div",{className:"lg:col-span-1 space-y-2",children:[a.jsx("h3",{className:"text-sm font-medium mb-2",children:"Executions"}),a.jsxs("button",{onClick:()=>{r(null),g(new Set)},className:le("w-full text-left px-3 py-2 text-xs rounded-xl border",s?"border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]":"border-[hsl(var(--primary))] bg-[hsl(var(--accent))]"),children:["Live Events (",u.length,")"]}),j.map(T=>a.jsxs("button",{onClick:()=>{r(T),g(new Set)},className:le("w-full text-left px-3 py-2.5 text-xs rounded-xl border border-l-[3px] transition-colors",aN[T.status]??"border-l-slate-400",(s==null?void 0:s.executionId)===T.executionId?"border-[hsl(var(--primary))] bg-[hsl(var(--accent))]":"border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]"),children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"font-medium truncate",children:T.workflow}),a.jsx(Hg,{status:T.status})]}),a.jsxs("div",{className:"flex items-center justify-between mt-1",children:[a.jsxs("span",{className:"text-[hsl(var(--muted-foreground))] truncate",children:[T.executionId.slice(0,8),"… | ",T.steps.length," steps"]}),T.totalCost>0&&a.jsx(Ls,{cost:T.totalCost})]}),a.jsxs("div",{className:"flex items-center gap-2 mt-1 text-[10px] text-[hsl(var(--muted-foreground))]",children:[a.jsx("span",{children:sN(T.startedAt)}),T.duration>0&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-[hsl(var(--border))]",children:"·"}),a.jsx("span",{children:ht(T.duration)})]})]})]},T.executionId)),j.length===0&&a.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No executions yet"})]}),a.jsxs("div",{className:"lg:col-span-3",children:[q&&a.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-4",children:[a.jsx(ft,{label:"Duration",value:ht(q.duration)}),a.jsx(ft,{label:"Events",value:String(q.eventCount)}),a.jsx(ft,{label:"Cost",value:q.cost>0?ut(q.cost):"—"}),a.jsx(ft,{label:"Model",value:q.models.length>0?q.models[0]:"—",subtitle:q.models.length>1?`+${q.models.length-1} more`:void 0})]}),(s==null?void 0:s.status)==="completed"&&s.result!=null&&a.jsxs("div",{className:"mb-4",children:[a.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-2",children:"Result"}),a.jsx(_t,{data:s.result})]}),a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:[w.length," events"]}),w.length>0&&a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsxs("button",{onClick:A,className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded-md hover:bg-[hsl(var(--accent))] text-[hsl(var(--muted-foreground))]",title:"Expand all",children:[a.jsx(wg,{size:12}),"Expand"]}),a.jsxs("button",{onClick:V,className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded-md hover:bg-[hsl(var(--accent))] text-[hsl(var(--muted-foreground))]",title:"Collapse all",children:[a.jsx(Cg,{size:12}),"Collapse"]})]})]}),w.length===0?a.jsx(gl,{icon:a.jsx(Ng,{size:32}),title:"No trace events",description:"Execute a workflow to see trace events here."}):a.jsx("div",{className:"space-y-1",children:w.map((T,B)=>{const Z=Lg(T),F=T.step??B,Q=x.has(F);return a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>O(F),className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs rounded-xl bg-[hsl(var(--secondary))] cursor-pointer hover:bg-[hsl(var(--accent))] text-left",style:{marginLeft:`${Z*16}px`},children:[Q?a.jsx(Wa,{size:12,className:"shrink-0 text-[hsl(var(--muted-foreground))]"}):a.jsx(Pl,{size:12,className:"shrink-0 text-[hsl(var(--muted-foreground))]"}),a.jsxs("span",{className:"font-mono text-[hsl(var(--muted-foreground))] w-8",children:["#",T.step!=null?T.step:B]}),a.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${Zu(T.type)}`}),a.jsx("span",{className:"font-medium w-28 truncate",children:T.type}),T.agent&&a.jsx("span",{className:"text-blue-600 dark:text-blue-400 w-28 truncate",children:T.agent}),T.tool&&a.jsx("span",{className:"text-purple-600 dark:text-purple-400 w-28 truncate",children:T.tool}),a.jsx("div",{className:"flex-1 h-3 bg-[hsl(var(--background))] rounded overflow-hidden",children:T.duration!=null&&T.duration>0&&a.jsx("div",{className:`h-full rounded ${Zu(T.type)}`,style:{width:`${Math.max(T.duration/J*100,2)}%`,opacity:.7}})}),T.duration!=null&&a.jsx(nN,{ms:T.duration}),T.cost!=null&&T.cost>0&&a.jsx(Ls,{cost:T.cost})]}),Q&&a.jsxs("div",{className:"mt-1 mb-2 p-3 rounded-xl bg-[hsl(var(--card))] border border-[hsl(var(--border))]",style:{marginLeft:`${Z*16+32}px`},children:[T.model&&a.jsxs("p",{className:"text-xs mb-1",children:[a.jsx("strong",{children:"Model:"})," ",T.model]}),T.promptVersion&&a.jsxs("p",{className:"text-xs mb-1",children:[a.jsx("strong",{children:"Version:"})," ",T.promptVersion]}),T.tokens&&a.jsxs("p",{className:"text-xs mb-1",children:[a.jsx("strong",{children:"Tokens:"})," in=",T.tokens.input," out=",T.tokens.output,T.tokens.reasoning?` reasoning=${T.tokens.reasoning}`:""]}),T.data!=null&&a.jsx(_t,{data:T.data,collapsed:!0})]})]},F)})})]})]})})]})}function iN({tokens:s,label:r,className:u}){return a.jsxs("span",{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))] ${u??""}`,children:[r&&a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:r}),Ql(s)]})}function uN(){const[s,r]=b.useState(null),{data:u,refetch:c}=vl({queryKey:["costs"],queryFn:Gj});uf("costs",b.useCallback(g=>{r(g)},[]));const d=s??u,h=async()=>{await Yj(),r(null),c()};if(!d)return a.jsx(Ps,{title:"Cost Dashboard",description:"Spending across agents, models, and workflows",children:a.jsx(gl,{icon:a.jsx(Tg,{size:32}),title:"No cost data",description:"Execute workflows to see cost data."})});const m=d.totalTokens.reasoning>0,p=Object.keys(d.byAgent).length,x=Object.keys(d.byModel).length;return a.jsxs(Ps,{title:"Cost Dashboard",description:d.totalCost>0?a.jsxs(a.Fragment,{children:[a.jsxs("span",{children:[ut(d.totalCost)," total"]}),a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsxs("span",{children:[p," agent",p!==1?"s":""]}),a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsxs("span",{children:[x," model",x!==1?"s":""]})]}):"Spending across agents, models, and workflows",actions:a.jsxs("button",{type:"button",onClick:h,className:le("inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-full cursor-pointer","ring-1 ring-[hsl(var(--input))] bg-[hsl(var(--background))] shadow-sm","hover:bg-[hsl(var(--muted))] hover:ring-[hsl(var(--ring))]","focus:outline-none focus-visible:ring-[hsl(var(--ring))] transition-all"),children:[a.jsx(sj,{size:12}),"Reset"]}),children:[a.jsxs("div",{className:le("grid grid-cols-1 sm:grid-cols-2 gap-3 mb-8",m?"lg:grid-cols-4":"lg:grid-cols-3"),children:[a.jsx(ft,{label:"Total Cost",value:ut(d.totalCost),subtitle:"all time"}),a.jsx(ft,{label:"Input Tokens",value:Ql(d.totalTokens.input),subtitle:"prompt"}),a.jsx(ft,{label:"Output Tokens",value:Ql(d.totalTokens.output),subtitle:"completion"}),m&&a.jsx(ft,{label:"Reasoning Tokens",value:Ql(d.totalTokens.reasoning),subtitle:"thinking"})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium mb-3",children:"Cost by Agent"}),Object.keys(d.byAgent).length===0?a.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No agent data"}):a.jsx(yd,{headers:["Agent","Calls","Cost"],rows:Object.entries(d.byAgent).sort(([,g],[,j])=>j.cost-g.cost).map(([g,j])=>({key:g,cells:[a.jsx("span",{className:"font-mono",children:g}),a.jsx("span",{children:j.calls}),a.jsx(Ls,{cost:j.cost})],cost:j.cost})),maxCost:Math.max(...Object.values(d.byAgent).map(g=>g.cost))})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium mb-3",children:"Cost by Model"}),Object.keys(d.byModel).length===0?a.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No model data"}):a.jsx(yd,{headers:["Model","Calls","Tokens","Cost"],rows:Object.entries(d.byModel).sort(([,g],[,j])=>j.cost-g.cost).map(([g,j])=>({key:g,cells:[a.jsx("span",{className:"font-mono",children:g}),a.jsx("span",{children:j.calls}),a.jsx(iN,{tokens:j.tokens.input+j.tokens.output}),a.jsx(Ls,{cost:j.cost})],cost:j.cost})),maxCost:Math.max(...Object.values(d.byModel).map(g=>g.cost))})]}),a.jsxs("div",{className:"lg:col-span-2",children:[a.jsx("h3",{className:"text-sm font-medium mb-3",children:"Cost by Workflow"}),Object.keys(d.byWorkflow).length===0?a.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No workflow data"}):a.jsx(yd,{headers:["Workflow","Executions","Total Cost","Avg Cost"],rows:Object.entries(d.byWorkflow).sort(([,g],[,j])=>j.cost-g.cost).map(([g,j])=>({key:g,cells:[a.jsx("span",{className:"font-mono",children:g}),a.jsx("span",{children:j.executions}),a.jsx(Ls,{cost:j.cost}),a.jsx(Ls,{cost:j.executions>0?j.cost/j.executions:0})],cost:j.cost})),maxCost:Math.max(...Object.values(d.byWorkflow).map(g=>g.cost))})]})]})]})}function yd({headers:s,rows:r,maxCost:u}){return a.jsx("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsx("tr",{className:"border-b border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:s.map((c,d)=>a.jsx("th",{className:le("py-2 px-3 font-medium",d===0?"text-left":"text-right"),children:c},c))})}),a.jsx("tbody",{children:r.map(c=>a.jsx("tr",{className:"border-b last:border-b-0 border-[hsl(var(--border))]",children:c.cells.map((d,h)=>a.jsxs("td",{className:le("py-2 px-3 relative",h===0?"text-left":"text-right"),children:[h===c.cells.length-1&&u>0&&a.jsx("div",{className:"absolute inset-y-0 right-0 bg-[hsl(var(--primary)/0.08)] rounded-sm",style:{width:`${c.cost/u*100}%`}}),a.jsx("span",{className:"relative",children:d})]},h))},c.key))})]})})}function oN(){const[s,r]=b.useState("session"),[u,c]=b.useState(""),[d,h]=b.useState("{}"),[m,p]=b.useState(!1),[x,g]=b.useState(""),[j,y]=b.useState(null),[C,w]=b.useState(null),k=mi(),{data:U=[]}=vl({queryKey:["memory",s],queryFn:()=>Lj(s)}),_=Dd({mutationFn:({key:V,value:q})=>qj(s,V,q),onSuccess:()=>{k.invalidateQueries({queryKey:["memory",s]}),p(!1),c(""),h("{}")}}),L=Dd({mutationFn:V=>Bj(s,V),onSuccess:()=>{k.invalidateQueries({queryKey:["memory",s]}),w(null)}}),J=b.useCallback(async()=>{if(!x.trim())return;const V=await Qj(x,s);y(V.results)},[x,s]),O=b.useCallback(()=>{if(u.trim())try{const V=JSON.parse(d);_.mutate({key:u,value:V})}catch{_.mutate({key:u,value:d})}},[u,d,_]),A=b.useCallback(V=>{C===V?L.mutate(V):w(V)},[C,L]);return a.jsxs(Ps,{title:"Memory Browser",description:U.length>0?a.jsxs(a.Fragment,{children:[a.jsxs("span",{children:[U.length," entr",U.length!==1?"ies":"y"]}),a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsxs("span",{children:[s," scope"]})]}):"Key-value entries stored via ctx.remember()",actions:a.jsxs("button",{type:"button",onClick:()=>p(!m),className:le("inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-full cursor-pointer","bg-[hsl(var(--foreground))] text-[hsl(var(--background))] shadow-sm","hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))]","transition-opacity"),children:[a.jsx(Og,{size:12}),"Add entry"]}),children:[a.jsxs("div",{role:"tablist","aria-label":"Memory scope",className:"flex items-center gap-0 mb-4 border-b border-[hsl(var(--border))]",children:[["session","global"].map(V=>a.jsx("button",{type:"button",role:"tab","aria-selected":s===V,onClick:()=>{r(V),y(null),w(null)},className:le("px-3 py-2.5 text-sm -mb-px border-b-2 transition-colors",s===V?"border-[hsl(var(--foreground))] text-[hsl(var(--foreground))] font-medium":"border-transparent text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]"),children:V.charAt(0).toUpperCase()+V.slice(1)},V)),a.jsx("div",{className:"flex-1"}),a.jsxs("div",{className:"flex items-center gap-1 -mb-px pb-2",children:[a.jsx("input",{value:x,onChange:V=>g(V.target.value),onKeyDown:V=>V.key==="Enter"&&J(),placeholder:"Semantic search...",className:"px-2 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] bg-[hsl(var(--background))] w-48"}),a.jsx("button",{onClick:J,className:"p-1.5 rounded-md hover:bg-[hsl(var(--accent))]",children:a.jsx(Ld,{size:14})})]})]}),m&&a.jsxs("div",{className:"mb-4 p-4 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] space-y-3",children:[a.jsx("input",{value:u,onChange:V=>c(V.target.value),placeholder:"Key",className:"w-full px-2 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] bg-[hsl(var(--background))]"}),a.jsx(Dg,{value:d,onChange:h,placeholder:"Value (JSON)"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:O,disabled:!u.trim(),className:"px-3 py-1.5 text-sm rounded-md bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] hover:opacity-90 disabled:opacity-50",children:"Save"}),a.jsx("button",{onClick:()=>p(!1),className:"px-3 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))]",children:"Cancel"})]})]}),j&&a.jsxs("div",{className:"mb-4 p-4 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[a.jsx("h3",{className:"text-sm font-medium mb-2",children:"Search Results"}),j.length===0?a.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No results found"}):a.jsx(_t,{data:j})]}),U.length===0?a.jsx(gl,{icon:a.jsx(Sg,{size:32}),title:"No memory entries",description:`No entries in the ${s} scope. Use ctx.remember() in workflows or add entries manually.`}):a.jsx("div",{className:"space-y-2",children:U.map(V=>a.jsxs("div",{className:"p-3 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"text-sm font-mono font-medium",children:V.key}),a.jsx("div",{className:"flex items-center gap-1",children:C===V.key?a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:()=>A(V.key),className:"px-2 py-0.5 text-xs rounded bg-[hsl(var(--destructive))] text-[hsl(var(--destructive-foreground))]",children:"Confirm"}),a.jsx("button",{onClick:()=>w(null),className:"px-2 py-0.5 text-xs rounded border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))]",children:"Cancel"})]}):a.jsx("button",{onClick:()=>A(V.key),className:"p-1 rounded hover:bg-[hsl(var(--destructive))] hover:text-[hsl(var(--destructive-foreground))] text-[hsl(var(--muted-foreground))]",children:a.jsx(rf,{size:14})})})]}),a.jsx(_t,{data:V.value,collapsed:!0})]},V.key))})]})}function cN(s){try{return JSON.parse(s)}catch{return s}}function dN(s,r){if(r==="assistant"){const u=s.trim();if(u.startsWith("{")||u.startsWith("["))try{const c=JSON.parse(u);return a.jsx(_t,{data:c,collapsed:!0})}catch{}}return a.jsx("div",{className:"whitespace-pre-wrap",children:s})}function fN(){const[s,r]=b.useState(null),[u,c]=b.useState(null),[d,h]=b.useState(null),m=mi(),{data:p=[]}=vl({queryKey:["sessions"],queryFn:kj,refetchInterval:5e3}),{data:x}=vl({queryKey:["session",s],queryFn:()=>Rj(s),enabled:!!s}),g=Dd({mutationFn:zj,onSuccess:()=>{m.invalidateQueries({queryKey:["sessions"]}),r(null),h(null)}}),j=x!=null&&x.history?u!==null?x.history.slice(0,u+1):x.history:[];return a.jsx(Ps,{title:"Session Manager",description:p.length>0?s&&x?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"font-mono",children:x.id.slice(0,16)}),a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsxs("span",{children:[x.history.length," message",x.history.length!==1?"s":""]})]}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{children:[p.length," active session",p.length!==1?"s":""]}),a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsx("span",{children:"select one to replay"})]}):"Multi-turn conversations tracked via runtime.session()",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("h3",{className:"text-sm font-medium mb-2",children:["Sessions (",p.length,")"]}),p.length===0?a.jsx(gl,{icon:a.jsx(Ag,{size:24}),title:"No sessions",description:"Sessions are created when using runtime.session()"}):p.map(y=>a.jsxs("button",{onClick:()=>{r(y.id),c(null)},className:`w-full text-left px-3 py-2.5 text-xs rounded-xl border transition-colors ${s===y.id?"border-[hsl(var(--primary))] bg-[hsl(var(--accent))]":"border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]"}`,children:[a.jsx("div",{className:"font-mono truncate text-[11px]",title:y.id,children:y.id}),a.jsxs("div",{className:"flex items-center gap-1.5 text-[hsl(var(--muted-foreground))] mt-1",children:[a.jsx(Mg,{size:11}),a.jsxs("span",{children:[y.messageCount," message",y.messageCount!==1?"s":""]})]})]},y.id))]}),a.jsx("div",{className:"lg:col-span-2",children:x?a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium font-mono",children:x.id}),a.jsxs("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:[x.history.length," messages"]})]}),d===x.id?a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("button",{onClick:()=>g.mutate(x.id),className:"px-2 py-1 text-xs rounded-md bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:hover:bg-red-800",children:"Confirm"}),a.jsx("button",{onClick:()=>h(null),className:"px-2 py-1 text-xs rounded-md border border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]",children:"Cancel"})]}):a.jsxs("button",{onClick:()=>h(x.id),className:"flex items-center gap-1 px-2 py-1 text-xs rounded-md border border-red-300 text-red-600 hover:bg-red-50 dark:border-red-800 dark:text-red-400 dark:hover:bg-red-950",children:[a.jsx(rf,{size:12}),"Delete"]})]}),x.handoffHistory&&x.handoffHistory.length>0&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-xs font-medium mb-2",children:"Handoff Chain"}),a.jsx("div",{className:"flex items-center gap-1 flex-wrap",children:x.handoffHistory.map((y,C)=>a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"px-2 py-0.5 text-xs rounded bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300",children:y.source}),a.jsx(ii,{size:12,className:"text-[hsl(var(--muted-foreground))]"}),a.jsx("span",{className:"px-2 py-0.5 text-xs rounded bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300",children:y.target}),a.jsxs("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:["(",y.mode,")"]}),C<x.handoffHistory.length-1&&a.jsx("span",{className:"mx-1 text-[hsl(var(--muted-foreground))]",children:"|"})]},C))})]}),x.history.length>1&&a.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] p-3",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("label",{className:"text-xs font-medium",children:"Replay"}),a.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))] font-mono",children:u!==null?`${u+1} / ${x.history.length}`:`${x.history.length} / ${x.history.length}`})]}),a.jsx("input",{type:"range",min:0,max:x.history.length-1,value:u??x.history.length-1,onChange:y=>c(Number(y.target.value)),className:"w-full h-1.5 rounded-full appearance-none cursor-pointer bg-[hsl(var(--secondary))] [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-3.5 [&::-webkit-slider-thumb]:h-3.5 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-[hsl(var(--primary))] [&::-webkit-slider-thumb]:shadow-sm [&::-moz-range-thumb]:w-3.5 [&::-moz-range-thumb]:h-3.5 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-[hsl(var(--primary))] [&::-moz-range-thumb]:border-0"}),a.jsxs("div",{className:"flex justify-between mt-1",children:[a.jsx("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))]",children:"Start"}),a.jsx("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))]",children:"Latest"})]})]}),a.jsx("div",{className:"space-y-3",children:j.map((y,C)=>a.jsxs("div",{className:`p-3 rounded-xl text-sm ${y.role==="user"?"bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] ml-8":y.role==="assistant"?"bg-[hsl(var(--secondary))] mr-8":"bg-[hsl(var(--muted))] text-xs font-mono"}`,children:[a.jsx("div",{className:"text-xs font-medium mb-1 opacity-70",children:y.role}),dN(y.content,y.role),y.tool_calls&&y.tool_calls.length>0&&a.jsx("div",{className:"mt-2 space-y-1",children:y.tool_calls.map(w=>a.jsxs("details",{className:"text-xs",children:[a.jsx("summary",{className:"cursor-pointer font-mono",children:w.function.name}),a.jsx(_t,{data:cN(w.function.arguments),collapsed:!0})]},w.id))})]},C))})]}):a.jsx(gl,{title:"Select a session",description:"Click a session to view its history"})})]})})}function hN(){const[s,r]=b.useState(null),[u,c]=b.useState(void 0),[d,h]=b.useState(null),[m,p]=b.useState(!1),[x,g]=b.useState(!1),{data:j=[]}=vl({queryKey:["tools"],queryFn:Dj}),{data:y}=vl({queryKey:["tool",s],queryFn:()=>Uj(s),enabled:!!s}),C=b.useCallback(async k=>{if(s){c(null),h(null),p(!0);try{const U=await Hj(s,k);c(U.result)}catch(U){h(U instanceof Error?U.message:String(U))}finally{p(!1)}}},[s]),w=j.find(k=>k.name===s);return a.jsx(Ps,{title:"Tool Inspector",description:w?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"font-mono",children:w.name}),w.description&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsx("span",{children:w.description})]})]}):j.length>0?a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"whitespace-nowrap",children:[j.length," registered tool",j.length!==1?"s":""]}),a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsx("span",{children:"select one to inspect"})]}):"Registered tools with schemas and direct testing",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("h3",{className:"text-sm font-medium mb-2",children:["Tools (",j.length,")"]}),j.length===0?a.jsx(gl,{icon:a.jsx(kg,{size:24}),title:"No tools",description:"Register tools with runtime.registerTool()"}):j.map(k=>a.jsxs("button",{onClick:()=>{r(k.name),c(void 0),h(null),g(!1)},className:`w-full text-left px-3 py-2 text-xs rounded-xl border ${s===k.name?"border-[hsl(var(--primary))] bg-[hsl(var(--accent))]":"border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]"}`,children:[a.jsx("div",{className:"font-medium",children:k.name}),a.jsx("div",{className:"text-[hsl(var(--muted-foreground))] mt-0.5 truncate",children:k.description}),a.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[k.sensitive&&a.jsx("span",{className:"px-1 py-0.5 rounded bg-amber-100 dark:bg-amber-900 text-amber-700 dark:text-amber-300 text-[10px]",children:"sensitive"}),k.requireApproval&&a.jsx("span",{className:"px-1 py-0.5 rounded bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300 text-[10px]",children:"approval"})]})]},k.name))]}),a.jsx("div",{className:"lg:col-span-2",children:s?y?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-medium",children:y.name}),a.jsx("p",{className:"text-sm text-[hsl(var(--muted-foreground))]",children:y.description})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y.sensitive&&a.jsx("span",{className:"px-2 py-1 text-xs rounded-md bg-amber-100 dark:bg-amber-900 text-amber-700 dark:text-amber-300",children:"Sensitive"}),y.requireApproval&&a.jsx("span",{className:"px-2 py-1 text-xs rounded-md bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300",children:"Requires Approval"}),y.retry.attempts&&y.retry.attempts>1&&a.jsxs("span",{className:"px-2 py-1 text-xs rounded-md bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300",children:["Retry: ",y.retry.attempts,"x ",y.retry.backoff]}),y.hasHooks&&y.hooks&&a.jsxs("span",{className:"px-2 py-1 text-xs rounded-md bg-purple-100 dark:bg-purple-900 text-purple-700 dark:text-purple-300",children:["Hooks:"," ",[y.hooks.hasBefore&&"before",y.hooks.hasAfter&&"after"].filter(Boolean).join(" + ")]})]}),a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>g(!x),className:"flex items-center gap-1.5 text-sm font-medium text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors",children:[a.jsx(Pl,{size:14,className:le("transition-transform",x&&"rotate-90")}),"View raw schema"]}),x&&a.jsx("div",{className:"mt-2",children:a.jsx(_t,{data:y.inputSchema})})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-medium mb-2",children:"Test Tool"}),a.jsx("div",{className:"rounded-xl border border-[hsl(var(--border))] p-4 bg-[hsl(var(--card))]",children:a.jsx(Ug,{schema:y.inputSchema,onSubmit:C,submitLabel:m?"Running...":"Run Tool"})})]}),u!==void 0&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-medium mb-2",children:"Result"}),a.jsx("div",{className:"rounded-xl border border-[hsl(var(--border))] p-4 bg-[hsl(var(--card))]",children:a.jsx(_t,{data:u})})]}),d&&a.jsx("div",{className:"p-3 rounded-xl bg-red-50 dark:bg-red-950 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 text-sm",children:d})]}):a.jsxs("div",{className:"flex items-center gap-2 text-sm text-[hsl(var(--muted-foreground))]",children:[a.jsx(V1,{size:16,className:"animate-spin"}),"Loading tool details..."]}):a.jsx(gl,{title:"Select a tool",description:"Click a tool to view its schema and test it"})})]})})}function $u(s){return s>=.8?"bg-emerald-100 dark:bg-emerald-900/50 text-emerald-700 dark:text-emerald-300":s>=.5?"bg-amber-100 dark:bg-amber-900/40 text-amber-700 dark:text-amber-300":"bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-300"}function Pu(s){return s>=.8?"bg-emerald-500 dark:bg-emerald-400":s>=.5?"bg-amber-500 dark:bg-amber-400":"bg-red-500 dark:bg-red-400"}function Et(s){return s>=.8?"text-emerald-600 dark:text-emerald-400":s>=.5?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"}function Cx(s){return s>=.8?"bg-emerald-50/60 dark:bg-emerald-950/20":s>=.5?"bg-amber-50/60 dark:bg-amber-950/20":"bg-red-50/60 dark:bg-red-950/20"}function mN(s){var r;return Array.isArray((r=s.metadata)==null?void 0:r.models)?s.metadata.models.filter(u=>typeof u=="string"):[]}function Un(s){var r;return Array.isArray((r=s.metadata)==null?void 0:r.models)?s.metadata.models.filter(u=>typeof u=="string"):[]}function va(s){var c;const r=(c=s.metadata)==null?void 0:c.modelCounts;if(!r||typeof r!="object")return null;const u={};for(const[d,h]of Object.entries(r))typeof h=="number"&&(u[d]=h);return Object.keys(u).length>0?u:null}function Bs(s){var d,h;const r=(d=s._multiRun)==null?void 0:d.aggregate.workflows;if(Array.isArray(r)&&r.length>0){const m=r.filter(p=>typeof p=="string");if(m.length>0)return m}const u=(h=s.metadata)==null?void 0:h.workflows;if(Array.isArray(u)){const m=u.filter(p=>typeof p=="string");if(m.length>0)return m}const c=s.workflow;return typeof c=="string"&&c?[c]:[]}function qd(s){var c;const r=(c=s.metadata)==null?void 0:c.workflowCounts;if(!r||typeof r!="object")return null;const u={};for(const[d,h]of Object.entries(r))typeof h=="number"&&(u[d]=h);return Object.keys(u).length>0?u:null}function yl(s){const r=s.indexOf(":");return r>=0?s.slice(r+1):s}function qg(s){var c;const r=(c=s.metadata)==null?void 0:c.tokens;if(!r||typeof r!="object")return null;const u=r;return typeof u.input!="number"?null:{input:u.input,output:typeof u.output=="number"?u.output:0,reasoning:typeof u.reasoning=="number"?u.reasoning:0}}function pN(s){var u;const r=(u=s.metadata)==null?void 0:u.agentCalls;return typeof r=="number"?r:0}function Bd(s){const r={input:0,output:0,reasoning:0};for(const u of s.items){const c=qg(u);c&&(r.input+=c.input,r.output+=c.output,r.reasoning+=c.reasoning)}return r}function of(s){const r=new Map;for(const u of s){const c=u.data,d=va(c);if(d)for(const[h,m]of Object.entries(d))r.set(h,(r.get(h)??0)+m);else for(const h of Un(c))r.set(h,(r.get(h)??0)+1)}return[...r.entries()].sort((u,c)=>c[1]-u[1])}function wx(s){const r={input:0,output:0,reasoning:0};for(const u of s){const c=Bd(u);r.input+=c.input,r.output+=c.output,r.reasoning+=c.reasoning}return r}function Tx(s){return s.reduce((r,u)=>r+u.totalCost,0)}function xN({summary:s,items:r,totalCost:u,scorerTypes:c}){const d=s.scorers?Object.entries(s.scorers):[];return d.length===0&&!s.timing&&u<=0?null:a.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[a.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))]",children:a.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Scorer Summary"})}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-[hsl(var(--border))]",children:[a.jsx("th",{className:"text-left px-4 py-2 font-medium w-48",children:"Metric"}),a.jsx("th",{className:"px-4 py-2 w-28"}),a.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"Mean"}),a.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"P50"}),a.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"P95"}),a.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"Min"}),a.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"Max"})]})}),a.jsxs("tbody",{children:[d.map(([h,m])=>{const p=r.some(x=>!x.error&&x.scores[h]!=null);return a.jsxs("tr",{className:"border-b border-[hsl(var(--border))] last:border-b-0",children:[a.jsxs("td",{className:"px-4 py-2.5 font-mono text-[hsl(var(--foreground))]",children:[h,(c==null?void 0:c[h])==="llm"&&a.jsx("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-medium rounded bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400 align-middle",title:"LLM scorer — scores may vary between runs",children:"LLM"})]}),p?a.jsxs(a.Fragment,{children:[a.jsx("td",{className:"px-4 py-2.5",children:a.jsx("div",{className:"h-2 bg-[hsl(var(--secondary))] rounded-full overflow-hidden",children:a.jsx("div",{className:le("h-full rounded-full transition-all",Pu(m.mean)),style:{width:`${m.mean*100}%`}})})}),a.jsx("td",{className:le("px-3 py-2.5 text-right font-mono font-medium",Et(m.mean)),children:m.mean.toFixed(3)}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:m.p50.toFixed(3)}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:m.p95.toFixed(3)}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:m.min.toFixed(3)}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:m.max.toFixed(3)})]}):a.jsx("td",{colSpan:6,className:"px-3 py-2.5 text-center text-[hsl(var(--muted-foreground))]",children:"No valid scores"})]},h)}),s.timing&&a.jsxs("tr",{className:"border-t border-[hsl(var(--border))]",children:[a.jsx("td",{className:"px-4 py-2.5 font-mono text-[hsl(var(--muted-foreground))]",children:"Timing"}),a.jsx("td",{className:"px-4 py-2.5"}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ht(s.timing.mean)}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ht(s.timing.p50)}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ht(s.timing.p95)}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ht(s.timing.min)}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ht(s.timing.max)})]})]})]})}),u>0&&a.jsx("div",{className:"px-4 py-2 border-t border-[hsl(var(--border))] bg-[hsl(var(--muted))]/50",children:a.jsxs("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:["Total cost: ",a.jsx("span",{className:"font-mono font-medium",children:ut(u)})]})})]})}function gN({items:s,scorerNames:r,onSelectItem:u,errorFilter:c,onErrorFilterChange:d,scorerFilter:h,onScorerFilterChange:m,threshold:p,onThresholdChange:x,sortField:g,onSortFieldChange:j,sortDir:y,onSortDirChange:C}){const w=p!==""?parseFloat(p):null,k=c!=="all"||h!==""&&w!=null&&!isNaN(w),U=b.useMemo(()=>s.map((O,A)=>({item:O,index:A})),[s]),_=b.useMemo(()=>{let O=U;return c==="errors"?O=O.filter(({item:A})=>!!A.error):c==="no-errors"&&(O=O.filter(({item:A})=>!A.error)),h&&w!=null&&!isNaN(w)&&(O=O.filter(({item:A})=>{const V=A.scores[h];return V!=null&&V<w})),O},[U,c,h,w]),L=b.useMemo(()=>{const O=[..._],A=y==="asc"?1:-1;return O.sort((V,q)=>{let T,B;return g==="index"?(T=V.index,B=q.index):g==="duration"?(T=V.item.duration??1/0,B=q.item.duration??1/0):g==="cost"?(T=V.item.cost??1/0,B=q.item.cost??1/0):(T=V.item.scores[g]??-1/0,B=q.item.scores[g]??-1/0),(T-B)*A}),O},[_,g,y]),J=[{value:"index",label:"Item #"},{value:"duration",label:"Duration"},{value:"cost",label:"Cost"},...r.map(O=>({value:O,label:O}))];return a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3 flex-wrap",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"All Items"}),a.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))] font-mono tabular-nums",children:k?`${_.length} of ${s.length}`:String(s.length)}),k&&a.jsx("button",{onClick:()=>{d("all"),m(""),x("")},className:"text-xs text-[hsl(var(--primary))] hover:underline cursor-pointer",children:"Reset"})]}),a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsxs("select",{value:c,onChange:O=>d(O.target.value),className:"px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[a.jsx("option",{value:"all",children:"All"}),a.jsx("option",{value:"errors",children:"Errors"}),a.jsx("option",{value:"no-errors",children:"Passed"})]}),r.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("select",{value:h,onChange:O=>m(O.target.value),className:"px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[a.jsx("option",{value:"",children:"Score filter…"}),r.map(O=>a.jsx("option",{value:O,children:O},O))]}),h&&a.jsx("input",{type:"number",step:"0.1",min:"0",max:"1",placeholder:"< threshold",value:p,onChange:O=>x(O.target.value),className:"w-20 px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]"})]}),a.jsx("div",{className:"w-px h-4 bg-[hsl(var(--border))]"}),a.jsx("select",{value:g,onChange:O=>j(O.target.value),className:"px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:J.map(O=>a.jsx("option",{value:O.value,children:O.label},O.value))}),a.jsx("button",{onClick:()=>C(y==="asc"?"desc":"asc"),className:"px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",title:y==="asc"?"Ascending":"Descending",children:y==="asc"?"↑":"↓"})]})]}),L.length===0&&k&&a.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))] py-6 text-center",children:"No items match the current filters."}),L.length>0&&a.jsx("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"bg-[hsl(var(--muted))]",children:[a.jsx("th",{className:"text-left px-3 py-2.5 font-medium w-10",children:"#"}),a.jsx("th",{className:"text-left px-3 py-2.5 font-medium min-w-[180px]",children:"Input"}),r.map(O=>a.jsx("th",{className:"text-right px-2 py-2.5 font-medium font-mono max-w-24 truncate",title:O,children:O},O)),a.jsx("th",{className:"text-right px-3 py-2.5 font-medium w-16",children:"Duration"}),a.jsx("th",{className:"text-right px-3 py-2.5 font-medium w-16",children:"Cost"}),a.jsx("th",{className:"w-8"})]})}),a.jsx("tbody",{children:L.map(({item:O,index:A})=>a.jsxs("tr",{onClick:()=>u(A),className:"border-t border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))] cursor-pointer transition-colors group",children:[a.jsxs("td",{className:"px-3 py-2 font-mono text-[hsl(var(--muted-foreground))]",children:[A+1,O.error&&a.jsx("span",{className:"ml-1 text-red-500",title:"Workflow error",children:"!"}),!O.error&&O.scorerErrors&&O.scorerErrors.length>0&&a.jsx("span",{className:"ml-1 text-amber-500",title:"Scorer errors",children:"!"})]}),a.jsx("td",{className:"px-3 py-2 max-w-xs",children:a.jsx("span",{className:"text-[11px] leading-tight text-[hsl(var(--muted-foreground))] truncate block group-hover:text-[hsl(var(--foreground))] transition-colors",children:gi(O.input)})}),r.map(V=>{const q=O.scores[V];return a.jsx("td",{className:"text-right px-2 py-2 font-mono",children:q!=null?a.jsx("span",{className:le("font-medium tabular-nums",Et(q)),children:q.toFixed(2)}):a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"—"})},V)}),a.jsx("td",{className:"text-right px-3 py-2 font-mono text-[hsl(var(--muted-foreground))]",children:O.duration!=null?ht(O.duration):"—"}),a.jsx("td",{className:"text-right px-3 py-2 font-mono text-[hsl(var(--muted-foreground))]",children:O.cost!=null&&O.cost>0?ut(O.cost):"—"}),a.jsx("td",{className:"px-2 py-2",children:a.jsx(Pl,{size:12,className:"text-[hsl(var(--muted-foreground))] opacity-0 group-hover:opacity-60 transition-opacity"})})]},A))})]})})})]})}const Mx=300;function vN({text:s}){const[r,u]=b.useState(!1),c=s.length>Mx;return a.jsxs("div",{children:[a.jsx("pre",{className:"text-xs font-mono p-3 rounded-lg bg-[hsl(var(--secondary))] overflow-auto max-h-96 whitespace-pre-wrap leading-relaxed",children:c&&!r?s.slice(0,Mx)+"…":s}),c&&a.jsx("button",{onClick:()=>u(!r),className:"text-xs text-[hsl(var(--primary))] hover:underline mt-1.5 cursor-pointer",children:r?"Show less":"Show more"})]})}function bd({label:s,data:r}){return a.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[a.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))]/50 border-b border-[hsl(var(--border))]",children:a.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:s})}),a.jsx("div",{className:"p-4",children:a.jsx(_t,{data:r,collapsed:!0})})]})}function yN({item:s,itemIndex:r,scorerNames:u,onBack:c}){const d=s.scorerErrors??[],h=mN(s),m=qg(s),p=pN(s),x=s.cost??0,g=s.scorerCost??0,j=x+g;return a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("nav",{className:"flex items-center gap-1.5 text-sm",children:[a.jsx("button",{onClick:c,className:"text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors cursor-pointer",children:"Overview"}),a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"/"}),a.jsxs("span",{className:"font-medium",children:["Item #",r+1]}),s.error&&a.jsx("span",{className:"ml-1 inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-950/30",children:"Error"})]}),a.jsxs("div",{className:"flex items-center gap-2 text-xs text-[hsl(var(--muted-foreground))] font-mono",children:[h.length>0&&h.map(y=>a.jsx("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] text-[10px] font-medium",title:y,children:yl(y)},y)),m&&a.jsxs("span",{title:`Input: ${m.input.toLocaleString()} Output: ${m.output.toLocaleString()}${m.reasoning?` Reasoning: ${m.reasoning.toLocaleString()}`:""}`,children:[(m.input+m.output+m.reasoning).toLocaleString()," tok"]}),p>1&&a.jsxs("span",{title:`${p} agent calls for this item`,children:[p," calls"]}),s.duration!=null&&a.jsx("span",{children:ht(s.duration)}),j>0&&a.jsx("span",{children:ut(j)})]})]}),u.length>0&&a.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 py-3 px-4 rounded-xl bg-[hsl(var(--muted))]/50",children:u.map(y=>{const C=s.scores[y];return a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:y}),C!=null?a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("div",{className:"w-12 h-1.5 bg-[hsl(var(--secondary))] rounded-full overflow-hidden",children:a.jsx("div",{className:le("h-full rounded-full",Pu(C)),style:{width:`${C*100}%`}})}),a.jsx("span",{className:le("text-xs font-mono font-medium tabular-nums",Et(C)),children:C.toFixed(2)})]}):a.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))] font-mono",children:"—"})]},y)})}),s.error&&a.jsx("div",{className:"p-3 rounded-xl bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 text-xs font-mono",children:s.error}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[a.jsx(bd,{label:"Input",data:s.input}),a.jsx(bd,{label:"Output",data:s.output})]}),s.annotations!=null&&a.jsx(bd,{label:"Expected (Annotations)",data:s.annotations}),j>0&&x>0&&g>0&&a.jsxs("div",{className:"flex items-center gap-3 text-xs text-[hsl(var(--muted-foreground))] font-mono",children:[a.jsxs("span",{children:["Workflow: ",ut(x)]}),a.jsx("span",{children:"+"}),a.jsxs("span",{children:["Scoring: ",ut(g)]}),a.jsx("span",{children:"="}),a.jsx("span",{className:"font-medium text-[hsl(var(--foreground))]",children:ut(j)})]}),u.length>0&&a.jsxs("div",{className:"space-y-3",children:[a.jsx("h4",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Scorer Results"}),u.map(y=>{var U;const C=s.scores[y],w=(U=s.scoreDetails)==null?void 0:U[y],k=d.find(_=>_.includes(`"${y}"`));return a.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[a.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 bg-[hsl(var(--muted))]/50",children:[a.jsx("span",{className:"font-mono text-xs font-medium",children:y}),C!=null&&a.jsx("span",{className:le("px-2 py-0.5 rounded-full text-xs font-mono font-medium",$u(C)),children:C.toFixed(3)}),C==null&&!k&&a.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--muted-foreground))]",children:"null"}),a.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[(w==null?void 0:w.duration)!=null&&a.jsx("span",{className:"text-xs font-mono text-[hsl(var(--muted-foreground))]",children:ht(w.duration)}),(w==null?void 0:w.cost)!=null&&w.cost>0&&a.jsx("span",{className:"text-xs font-mono text-[hsl(var(--muted-foreground))]",children:ut(w.cost)})]})]}),((w==null?void 0:w.metadata)||k)&&a.jsxs("div",{className:"px-4 py-3 space-y-2",children:[(w==null?void 0:w.metadata)&&typeof w.metadata.reasoning=="string"&&w.metadata.reasoning.length>0&&a.jsxs("div",{children:[a.jsx("span",{className:"text-[11px] font-medium text-[hsl(var(--muted-foreground))] block mb-1.5 uppercase tracking-wider",children:"Reasoning"}),a.jsx(vN,{text:w.metadata.reasoning})]}),(w==null?void 0:w.metadata)&&(()=>{const _=Object.keys(w.metadata).filter(J=>J!=="reasoning");if(_.length===0)return null;const L={};for(const J of _)L[J]=w.metadata[J];return a.jsxs("div",{children:[a.jsx("span",{className:"text-[11px] font-medium text-[hsl(var(--muted-foreground))] block mb-1.5 uppercase tracking-wider",children:"Metadata"}),a.jsx(_t,{data:L,collapsed:!0})]})})(),k&&a.jsx("div",{className:"text-xs text-amber-600 dark:text-amber-400 font-mono p-2.5 rounded-lg bg-amber-50 dark:bg-amber-950/30",children:k})]})]},y)})]})]})}function bN(s,r){const u=r.map(c=>s.scores[c]).filter(c=>c!=null);return u.length===0?null:u.reduce((c,d)=>c+d,0)/u.length}function jN({items:s,scorerNames:r,selectedIndex:u,onSelectItem:c,onDeselectItem:d}){const h=b.useMemo(()=>s.map((p,x)=>({item:p,index:x,avg:bN(p,r),label:gi(p.input,60)})),[s,r]),m=s.filter(p=>p.error).length;return a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsx("div",{className:"shrink-0 px-4 py-3 border-b border-[hsl(var(--border))]",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("button",{onClick:d,className:le("text-xs font-medium transition-colors cursor-pointer",u==null?"text-[hsl(var(--foreground))]":"text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]"),children:[s.length," items"]}),m>0?a.jsxs("span",{className:"text-[10px] font-medium text-red-600 dark:text-red-400",children:[m," failed"]}):a.jsx("span",{className:"text-[10px] font-medium text-emerald-600 dark:text-emerald-400",children:"all passed"})]})}),a.jsx("div",{className:"flex-1 overflow-y-auto",children:h.map(({item:p,index:x,avg:g,label:j})=>{const y=u===x;return a.jsxs("button",{onClick:()=>c(x),className:le("w-full text-left px-4 py-2.5 flex items-center gap-3 border-b border-[hsl(var(--border))]/50 transition-colors group cursor-pointer",y?"bg-[hsl(var(--accent))] border-l-2 border-l-[hsl(var(--foreground))]":"hover:bg-[hsl(var(--accent))]/50 border-l-2 border-l-transparent"),children:[a.jsx("span",{className:le("text-[10px] font-mono w-5 shrink-0",y?"text-[hsl(var(--foreground))] font-medium":"text-[hsl(var(--muted-foreground))]"),children:x+1}),a.jsx("span",{className:le("flex-1 text-xs truncate leading-snug",y?"text-[hsl(var(--foreground))]":"text-[hsl(var(--muted-foreground))] group-hover:text-[hsl(var(--foreground))]"),children:j}),p.error&&a.jsx("span",{className:"text-[10px] text-red-500 shrink-0",title:"Workflow error",children:"!"}),!p.error&&p.scorerErrors&&p.scorerErrors.length>0&&a.jsx("span",{className:"text-[10px] text-amber-500 shrink-0",title:"Scorer errors",children:"!"}),g!=null?a.jsx("span",{className:le("text-[11px] font-mono font-medium shrink-0 tabular-nums",Et(g)),children:g.toFixed(2)}):a.jsx("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))] shrink-0",children:"-"}),a.jsx(Pl,{size:12,className:le("shrink-0 transition-all",y?"text-[hsl(var(--foreground))] opacity-100":"text-[hsl(var(--muted-foreground))] opacity-0 group-hover:opacity-60")})]},x)})})]})}function NN({name:s,scores:r,mean:u}){return r.length===0?a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"w-28 text-xs font-mono truncate text-[hsl(var(--muted-foreground))]",title:s,children:s}),a.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No valid scores"})]}):a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"w-28 text-xs font-mono truncate",title:s,children:s}),a.jsxs("div",{className:"flex-1 h-5 relative bg-[hsl(var(--secondary))] rounded",children:[[.25,.5,.75].map(c=>a.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-[hsl(var(--border))]",style:{left:`${c*100}%`}},c)),r.map((c,d)=>a.jsx("div",{className:le("absolute w-1 top-[3px] bottom-[3px] rounded-sm",Pu(c)),style:{left:`${Math.max(1,Math.min(99,c*100))}%`,transform:"translateX(-50%)",opacity:.45},title:c.toFixed(3)},d)),a.jsx("div",{className:"absolute top-0 bottom-0 w-0.5 bg-[hsl(var(--foreground))]",style:{left:`${u*100}%`,opacity:.3},title:`Mean: ${u.toFixed(3)}`})]}),a.jsx("span",{className:"w-12 text-xs font-mono text-right text-[hsl(var(--muted-foreground))] tabular-nums",children:u.toFixed(3)})]})}function SN({items:s,scorerNames:r}){const u=b.useMemo(()=>r.map(c=>{const d=[];for(const m of s){const p=m.scores[c];p!=null&&!m.error&&d.push(p)}const h=d.length>0?d.reduce((m,p)=>m+p,0)/d.length:0;return{name:c,scores:d,mean:h}}),[s,r]);return r.length===0?null:a.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[a.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))]",children:a.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Score Distribution"})}),a.jsxs("div",{className:"p-4 space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[a.jsx("span",{className:"w-28"}),a.jsxs("div",{className:"flex-1 flex justify-between text-[10px] font-mono text-[hsl(var(--muted-foreground))]",children:[a.jsx("span",{children:"0"}),a.jsx("span",{children:"0.25"}),a.jsx("span",{children:"0.5"}),a.jsx("span",{children:"0.75"}),a.jsx("span",{children:"1.0"})]}),a.jsx("span",{className:"w-12"})]}),u.map(c=>a.jsx(NN,{name:c.name,scores:c.scores,mean:c.mean},c.name))]})]})}function qu({field:s,current:r,dir:u,onSort:c,align:d,className:h,children:m}){const p=r===s;return a.jsxs("th",{className:le(d==="right"?"text-right":"text-left","px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",h,d==="left"&&"px-4"),onClick:()=>c(s),children:[m,p&&a.jsx("span",{className:"ml-0.5",children:u==="desc"?"▼":"▲"})]})}function EN({baseline:s,candidate:r,scorerNames:u,baselineRuns:c,candidateRuns:d,scorerTypes:h}){const[m,p]=b.useState(u[0]??""),[x,g]=b.useState("delta"),[j,y]=b.useState("desc"),[C,w]=b.useState(!1),k=c&&c.length>1||d&&d.length>1,U=(c==null?void 0:c.length)??1,_=(d==null?void 0:d.length)??1,[L,J]=b.useState(null),O=q=>{x===q?y(T=>T==="desc"?"asc":"desc"):(g(q),y(q==="index"?"asc":"desc"))},A=Math.min(s.items.length,r.items.length),V=b.useMemo(()=>{var B,Z,F,Q;const q=[],T=Math.min((c==null?void 0:c.length)??0,(d==null?void 0:d.length)??0);for(let z=0;z<A;z++){const ne=s.items[z].scores[m]??null,oe=r.items[z].scores[m]??null,de=ne!=null&&oe!=null?oe-ne:0;let D;if(T>1){D=[];for(let P=0;P<T;P++){const se=(Z=(B=c[P])==null?void 0:B.items[z])==null?void 0:Z.scores[m],xe=(Q=(F=d[P])==null?void 0:F.items[z])==null?void 0:Q.scores[m];se!=null&&xe!=null&&D.push(xe-se)}}q.push({index:z,input:s.items[z].input,baselineScore:ne,candidateScore:oe,delta:de,runDeltas:D})}return q.sort((z,ne)=>{let oe,de;switch(x){case"index":oe=z.index,de=ne.index;break;case"baseline":oe=z.baselineScore??-1,de=ne.baselineScore??-1;break;case"candidate":oe=z.candidateScore??-1,de=ne.candidateScore??-1;break;case"delta":default:oe=Math.abs(z.delta),de=Math.abs(ne.delta);break}return j==="desc"?de-oe:oe-de}),q},[s,r,m,x,j,A,c,d]);return u.length===0||A===0?null:a.jsxs("div",{className:"border border-[hsl(var(--border))] rounded-xl overflow-hidden",children:[a.jsxs("button",{onClick:()=>w(q=>!q),className:"w-full flex items-center gap-2 px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",children:[C?a.jsx(Pl,{className:"h-3.5 w-3.5 text-[hsl(var(--muted-foreground))]"}):a.jsx(Wa,{className:"h-3.5 w-3.5 text-[hsl(var(--muted-foreground))]"}),a.jsxs("h3",{className:"text-xs font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:["All Items (",A,")",k&&a.jsxs("span",{className:"normal-case tracking-normal font-normal ml-1.5 opacity-70",children:["—"," scores averaged across"," ",U===_?`${U} runs`:`${U} / ${_} runs`]})]})]}),!C&&a.jsxs("div",{children:[a.jsx("div",{className:"flex items-center gap-1.5 px-4 py-2 border-b border-[hsl(var(--border))] bg-[hsl(var(--card))] flex-wrap",children:u.map(q=>a.jsxs("button",{onClick:()=>p(q),className:le("px-2 py-1 text-[11px] font-mono rounded-md transition-colors cursor-pointer",m===q?"bg-[hsl(var(--foreground))] text-[hsl(var(--background))] font-medium":"bg-[hsl(var(--secondary))] text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))]"),children:[q,(h==null?void 0:h[q])==="llm"&&a.jsx("span",{className:"ml-1 text-[8px] opacity-70",children:"LLM"})]},q))}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-[hsl(var(--border))]",children:[a.jsx(qu,{field:"index",current:x,dir:j,onSort:O,align:"left",className:"w-10",children:"#"}),a.jsx("th",{className:"text-left px-3 py-2 font-medium",children:"Input"}),a.jsxs(qu,{field:"baseline",current:x,dir:j,onSort:O,align:"right",children:["Baseline",k&&U>1&&a.jsxs("span",{className:"font-normal opacity-60 ml-0.5",children:["(",U,")"]})]}),a.jsxs(qu,{field:"candidate",current:x,dir:j,onSort:O,align:"right",children:["Candidate",k&&_>1&&a.jsxs("span",{className:"font-normal opacity-60 ml-0.5",children:["(",_,")"]})]}),a.jsx(qu,{field:"delta",current:x,dir:j,onSort:O,align:"right",children:"Delta"})]})}),a.jsx("tbody",{children:V.map(q=>{const T=L===q.index,B=q.delta>0?"text-emerald-600 dark:text-emerald-400":q.delta<0?"text-red-600 dark:text-red-400":"text-[hsl(var(--muted-foreground))]";return a.jsxs("tr",{className:le("border-b border-[hsl(var(--border))] last:border-b-0 cursor-pointer hover:bg-[hsl(var(--accent))] transition-colors",T&&"bg-[hsl(var(--accent))]"),children:[a.jsx("td",{className:"px-4 py-2.5 font-mono text-[hsl(var(--muted-foreground))]",onClick:()=>J(T?null:q.index),children:q.index+1}),a.jsx("td",{className:"px-3 py-2.5 max-w-xs truncate",onClick:()=>J(T?null:q.index),children:gi(q.input)}),a.jsx("td",{className:le("px-3 py-2.5 text-right font-mono",q.baselineScore!=null?Et(q.baselineScore):"text-[hsl(var(--muted-foreground))]"),onClick:()=>J(T?null:q.index),children:q.baselineScore!=null?q.baselineScore.toFixed(3):"—"}),a.jsx("td",{className:le("px-3 py-2.5 text-right font-mono",q.candidateScore!=null?Et(q.candidateScore):"text-[hsl(var(--muted-foreground))]"),onClick:()=>J(T?null:q.index),children:q.candidateScore!=null?q.candidateScore.toFixed(3):"—"}),a.jsxs("td",{className:le("px-3 py-2.5 text-right",B),onClick:()=>J(T?null:q.index),children:[a.jsx("div",{className:"font-mono",children:q.delta!==0?`${q.delta>0?"+":""}${q.delta.toFixed(3)}`:"—"}),q.runDeltas&&q.runDeltas.length>1&&a.jsxs("div",{className:"flex items-center justify-end gap-0.5 mt-1",title:q.runDeltas.map((Z,F)=>`Run ${F+1}: ${Z>=0?"+":""}${Z.toFixed(3)}`).join(", "),children:[q.runDeltas.map((Z,F)=>a.jsx("div",{className:le("w-1.5 h-1.5 rounded-full",Z<0?"bg-red-500 dark:bg-red-400":Z>0?"bg-emerald-500 dark:bg-emerald-400":"bg-[hsl(var(--muted-foreground))]")},F)),a.jsxs("span",{className:"text-[9px] text-[hsl(var(--muted-foreground))] ml-0.5",children:[q.runDeltas.filter(Z=>q.delta<0?Z<0:Z>0).length,"/",q.runDeltas.length]})]})]})]},q.index)})})]})}),L!=null&&L<s.items.length&&L<r.items.length&&a.jsx(Bg,{baselineItem:s.items[L],candidateItem:r.items[L],scorer:m,baselineRunItems:c==null?void 0:c.map(q=>q.items[L]).filter(Boolean),candidateRunItems:d==null?void 0:d.map(q=>q.items[L]).filter(Boolean)})]})]})}function CN({text:s,children:r}){return a.jsxs("span",{className:"relative group/tip cursor-help",children:[r,a.jsx("span",{className:"invisible group-hover/tip:visible absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 px-2.5 py-1.5 text-[10px] leading-snug rounded-md bg-[hsl(var(--foreground))] text-[hsl(var(--background))] whitespace-normal w-56 z-50 shadow-md pointer-events-none",children:s})]})}function Ox({value:s,percent:r,invert:u,format:c}){const d=u?s<0:s>0,h=u?s>0:s<0,m=d?"text-emerald-600 dark:text-emerald-400":h?"text-red-600 dark:text-red-400":"text-[hsl(var(--muted-foreground))]",p=c?`${s>0?"+":s<0?"-":""}${c(Math.abs(s))}`:`${s>0?"+":""}${Math.abs(s)<100?s.toFixed(3):s.toFixed(0)}`,x=`${r>0?"+":""}${r.toFixed(1)}%`;return a.jsx("td",{className:le("px-3 py-2.5 text-right",m),children:a.jsxs("div",{className:"font-mono",children:[p," (",x,")"]})})}function Ax(s){return(s>=0?"+":"")+s.toFixed(4)}function wN({compareResult:s,baseline:r,candidate:u,isGroupComparison:c,baselineRuns:d,candidateRuns:h}){var F,Q;const[m,p]=b.useState(null),[x,g]=b.useState("delta"),[j,y]=b.useState("desc"),[C,w]=b.useState({}),k=(z,ne)=>{(m==null?void 0:m.type)===z&&(m==null?void 0:m.index)===ne?p(null):p({type:z,index:ne})},U=((F=r==null?void 0:r.metadata)==null?void 0:F.scorerTypes)??((Q=u==null?void 0:u.metadata)==null?void 0:Q.scorerTypes),_=(d==null?void 0:d.length)??1,L=(h==null?void 0:h.length)??1,J=c?`averaged across ${_===L?`${_} runs`:`${_} / ${L} runs`}`:null,O=b.useMemo(()=>{const z=Object.entries(s.scorers);return z.sort((ne,oe)=>{if(x==="delta"){const P=ne[1].significant===!0?1:0,se=oe[1].significant===!0?1:0;if(P!==se)return se-P}let de,D;switch(x){case"metric":return j==="asc"?ne[0].localeCompare(oe[0]):oe[0].localeCompare(ne[0]);case"baseline":de=ne[1].baselineMean,D=oe[1].baselineMean;break;case"candidate":de=ne[1].candidateMean,D=oe[1].candidateMean;break;case"delta":default:de=Math.abs(ne[1].delta),D=Math.abs(oe[1].delta);break}return j==="desc"?D-de:de-D}),z},[s.scorers,x,j]),A=O.some(([,z])=>z.ci!=null),V=z=>{x===z?y(ne=>ne==="desc"?"asc":"desc"):(g(z),y("desc"))},q=z=>x===z?j==="desc"?" ▼":" ▲":"",T=O.filter(([,z])=>z.significant===!0).length,B=s.regressions.length,Z=s.improvements.length;return a.jsxs("div",{className:"space-y-6",children:[O.length>0&&(()=>{const z=O.some(([,P])=>P.significant===!0&&P.delta<0),ne=O.some(([,P])=>P.significant===!0&&P.delta>0),oe=s.regressions.length>0,de=O.every(([,P])=>P.significant===!1),D=(P,se)=>{const xe=se.delta<0?se.pRegression!=null?`${Math.round(se.pRegression*100)}%`:null:se.pImprovement!=null?`${Math.round(se.pImprovement*100)}%`:null,Ee=`${se.delta>0?"+":""}${se.delta.toFixed(3)}`;return`${P} ${Ee}${xe?` (${xe} probability)`:""}`};if(z){const P=O.filter(([,se])=>se.significant===!0&&se.delta<0);return a.jsxs("div",{className:"flex items-start gap-2.5 px-4 py-3 rounded-xl border border-red-200 dark:border-red-900 bg-red-50 dark:bg-red-950/30",children:[a.jsx("div",{className:"h-6 w-6 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center shrink-0 mt-0.5",children:a.jsx("span",{className:"text-red-600 dark:text-red-400 text-xs font-bold",children:"✕"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200",children:"Significant regression detected"}),a.jsx("p",{className:"text-xs text-red-600 dark:text-red-400 mt-0.5",children:P.map(([se,xe])=>D(se,xe)).join("; ")})]})]})}if(ne){const P=O.filter(([,se])=>se.significant===!0&&se.delta>0);return a.jsxs("div",{className:"flex items-start gap-2.5 px-4 py-3 rounded-xl border border-emerald-200 dark:border-emerald-900 bg-emerald-50 dark:bg-emerald-950/30",children:[a.jsx("div",{className:"h-6 w-6 rounded-full bg-emerald-100 dark:bg-emerald-900/50 flex items-center justify-center shrink-0 mt-0.5",children:a.jsx("span",{className:"text-emerald-600 dark:text-emerald-400 text-xs font-bold",children:"✓"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-emerald-800 dark:text-emerald-200",children:"Significant improvement detected"}),a.jsx("p",{className:"text-xs text-emerald-600 dark:text-emerald-400 mt-0.5",children:P.map(([se,xe])=>D(se,xe)).join("; ")})]})]})}return oe&&de?a.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 rounded-xl border border-amber-200 dark:border-amber-900 bg-amber-50 dark:bg-amber-950/30",children:[a.jsx("div",{className:"h-6 w-6 rounded-full bg-amber-100 dark:bg-amber-900/50 flex items-center justify-center shrink-0",children:a.jsx("span",{className:"text-amber-600 dark:text-amber-400 text-xs font-bold",children:"~"})}),a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:[s.regressions.length," item regressions, but not statistically significant"]}),a.jsx("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:c?"Even with pooled multi-run data, the score differences are within normal variation.":"Score differences are within normal LLM variation. Consider multi-run for stronger confidence."})]})]}):a.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--muted))]",children:[a.jsx("div",{className:"h-6 w-6 rounded-full bg-emerald-100 dark:bg-emerald-900/50 flex items-center justify-center shrink-0",children:a.jsx("span",{className:"text-emerald-600 dark:text-emerald-400 text-xs font-bold",children:"✓"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium",children:"No significant changes"}),a.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"Scores are stable between baseline and candidate"})]})]})})(),(()=>{const z=(qe,jl)=>{const tn=jl&&jl.length>0?jl:qe?[qe]:[],Dl=new Set;for(const At of tn)for(const vt of Un(At))Dl.add(vt);return[...Dl]},ne=d&&d.length>0?d:r?[r]:[],oe=h&&h.length>0?h:u?[u]:[],de=(qe,jl)=>{const tn=jl&&jl.length>0?jl:qe?[qe]:[],Dl=new Set,At=[];for(const vt of tn)for(const ln of Bs(vt))Dl.has(ln)||(Dl.add(ln),At.push(ln));return At},D=z(r,d),P=z(u,h),se=de(r,d),xe=de(u,h),Ee=wx(ne),E=wx(oe),H=Ee.input+Ee.output+Ee.reasoning,ee=E.input+E.output+E.reasoning,re=Tx(ne),ce=Tx(oe),ve=se.length>0||xe.length>0,ie=new Set(se),Se=new Set(xe),Oe=ie.size!==Se.size||se.some(qe=>!Se.has(qe)),mt=D.length>0||P.length>0,Xt=H>0&&ee>0,il=re>0||ce>0;if(!ve&&!mt&&!Xt&&!il)return null;const Pe=new Set(D),gt=new Set(P),tt=Pe.size!==gt.size||D.some(qe=>!gt.has(qe)),Ct=H>0?(ee-H)/H*100:0;return a.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 rounded-lg bg-[hsl(var(--muted))]/50 text-xs flex-wrap",children:[ve&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-[hsl(var(--muted-foreground))] uppercase tracking-wider text-[10px] font-medium shrink-0",children:se.length>1||xe.length>1?"Workflows":"Workflow"}),a.jsx("div",{className:"flex items-center gap-1.5",children:se.length>0?se.map(qe=>a.jsx("span",{className:"px-1.5 py-0.5 rounded border border-[hsl(var(--border))] bg-[hsl(var(--background))] font-mono",title:qe,children:qe},qe)):a.jsx("span",{className:"text-[hsl(var(--muted-foreground))] italic",children:"unknown"})}),a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"→"}),a.jsx("div",{className:"flex items-center gap-1.5",children:xe.length>0?xe.map(qe=>a.jsx("span",{className:le("px-1.5 py-0.5 rounded font-mono",Oe?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"border border-[hsl(var(--border))] bg-[hsl(var(--background))]"),title:qe,children:qe},qe)):a.jsx("span",{className:"text-[hsl(var(--muted-foreground))] italic",children:"unknown"})}),Oe&&a.jsx("span",{className:"text-[10px] font-medium text-blue-600 dark:text-blue-400",children:"changed"})]}),mt&&a.jsxs(a.Fragment,{children:[ve&&a.jsx("span",{className:"text-[hsl(var(--border))]",children:"|"}),a.jsx("span",{className:"text-[hsl(var(--muted-foreground))] uppercase tracking-wider text-[10px] font-medium shrink-0",children:"Models"}),a.jsx("div",{className:"flex items-center gap-1.5",children:D.length>0?D.map(qe=>a.jsx("span",{className:"px-1.5 py-0.5 rounded border border-[hsl(var(--border))] bg-[hsl(var(--background))] font-mono",title:qe,children:yl(qe)},qe)):a.jsx("span",{className:"text-[hsl(var(--muted-foreground))] italic",children:"unknown"})}),a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"→"}),a.jsx("div",{className:"flex items-center gap-1.5",children:P.length>0?P.map(qe=>a.jsx("span",{className:le("px-1.5 py-0.5 rounded font-mono",tt?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"border border-[hsl(var(--border))] bg-[hsl(var(--background))]"),title:qe,children:yl(qe)},qe)):a.jsx("span",{className:"text-[hsl(var(--muted-foreground))] italic",children:"unknown"})}),tt&&a.jsx("span",{className:"text-[10px] font-medium text-blue-600 dark:text-blue-400",children:"changed"})]}),Xt&&a.jsxs(a.Fragment,{children:[mt&&a.jsx("span",{className:"text-[hsl(var(--border))]",children:"|"}),a.jsx("span",{className:"text-[hsl(var(--muted-foreground))] uppercase tracking-wider text-[10px] font-medium shrink-0",children:"Tokens"}),a.jsx("span",{className:"font-mono",children:H.toLocaleString()}),a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"→"}),a.jsx("span",{className:"font-mono",children:ee.toLocaleString()}),Math.abs(Ct)>=1&&a.jsxs("span",{className:le("text-[10px] font-medium",Ct>0?"text-red-600 dark:text-red-400":"text-emerald-600 dark:text-emerald-400"),children:[Ct>0?"+":"",Ct.toFixed(0),"%"]})]}),il&&a.jsxs(a.Fragment,{children:[(mt||Xt)&&a.jsx("span",{className:"text-[hsl(var(--border))]",children:"|"}),a.jsx("span",{className:"text-[hsl(var(--muted-foreground))] uppercase tracking-wider text-[10px] font-medium shrink-0",children:"Cost"}),a.jsx("span",{className:"font-mono",children:ut(re)}),a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"→"}),a.jsx("span",{className:"font-mono",children:ut(ce)}),re>0&&ce>0&&(()=>{const qe=(ce-re)/re*100;return Math.abs(qe)>=1?a.jsxs("span",{className:le("text-[10px] font-medium",qe>0?"text-red-600 dark:text-red-400":"text-emerald-600 dark:text-emerald-400"),children:[qe>0?"+":"",qe.toFixed(0),"%"]}):null})()]})]})})(),a.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[a.jsxs("div",{className:"px-3 py-2 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Significant"}),a.jsx("div",{className:"text-lg font-semibold mt-0.5",children:T})]}),a.jsxs("div",{className:"px-3 py-2 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Regressions"}),a.jsx("div",{className:le("text-lg font-semibold mt-0.5",B>0?"text-red-600 dark:text-red-400":""),children:B})]}),a.jsxs("div",{className:"px-3 py-2 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Improvements"}),a.jsx("div",{className:le("text-lg font-semibold mt-0.5",Z>0?"text-emerald-600 dark:text-emerald-400":""),children:Z})]}),s.cost&&a.jsxs("div",{className:"px-3 py-2 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Cost Delta"}),a.jsxs("div",{className:le("text-lg font-semibold mt-0.5",s.cost.delta>0?"text-red-600 dark:text-red-400":s.cost.delta<0?"text-emerald-600 dark:text-emerald-400":""),children:[s.cost.delta>0?"+":"",ut(Math.abs(s.cost.delta))]})]})]}),O.length>0&&a.jsxs("div",{className:"border border-[hsl(var(--border))] rounded-xl overflow-hidden",children:[a.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))]",children:a.jsxs("h3",{className:"text-xs font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:["Scorer Comparison",J&&a.jsxs("span",{className:"normal-case tracking-normal font-normal ml-1.5 opacity-70",children:["—"," ",J]})]})}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-[hsl(var(--border))]",children:[a.jsxs("th",{className:"text-left px-4 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>V("metric"),children:["Metric",q("metric")]}),a.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>V("baseline"),children:["Baseline",c&&_>1&&a.jsxs("span",{className:"font-normal opacity-60 ml-0.5",children:["(",_,")"]}),q("baseline")]}),a.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>V("candidate"),children:["Candidate",c&&L>1&&a.jsxs("span",{className:"font-normal opacity-60 ml-0.5",children:["(",L,")"]}),q("candidate")]}),a.jsx("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>V("delta"),children:A?a.jsxs(CN,{text:"Score delta with 95% confidence interval via paired bootstrap. If the CI excludes zero and the effect exceeds the practical threshold, the difference is significant (shown with a colored left border).",children:["Delta",q("delta")]}):a.jsxs(a.Fragment,{children:["Delta",q("delta")]})})]})}),a.jsxs("tbody",{children:[O.map(([z,ne])=>{const oe=ne.delta>0?"+":(ne.delta<0,""),de=ne.delta>0?"text-emerald-600 dark:text-emerald-400":ne.delta<0?"text-red-600 dark:text-red-400":"text-[hsl(var(--muted-foreground))]";return a.jsxs("tr",{className:le("border-b border-[hsl(var(--border))] last:border-b-0",ne.significant===!0&&ne.delta<0&&"border-l-[3px] border-l-red-500",ne.significant===!0&&ne.delta>0&&"border-l-[3px] border-l-emerald-500"),children:[a.jsxs("td",{className:"px-4 py-2.5 font-mono",children:[z,(U==null?void 0:U[z])==="llm"&&a.jsx("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-medium rounded bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400 align-middle",title:"LLM scorer — scores may vary between runs",children:"LLM"})]}),a.jsx("td",{className:le("px-3 py-2.5 text-right font-mono",Et(ne.baselineMean)),children:ne.baselineMean.toFixed(3)}),a.jsx("td",{className:le("px-3 py-2.5 text-right font-mono",Et(ne.candidateMean)),children:ne.candidateMean.toFixed(3)}),a.jsxs("td",{className:"px-3 py-2.5 text-right",children:[a.jsxs("div",{className:le("font-mono",de),children:[oe,Math.abs(ne.delta).toFixed(3)," (",oe,Math.abs(ne.deltaPercent).toFixed(1),"%)"]}),ne.ci&&a.jsxs("div",{className:"font-mono text-[10px] text-[hsl(var(--muted-foreground))] mt-0.5",children:["CI [",Ax(ne.ci.lower),", ",Ax(ne.ci.upper),"]"]}),ne.pRegression!=null&&ne.pImprovement!=null&&(()=>{const D=ne.pRegression??0,P=ne.pImprovement??0;if(D===0&&P===0)return null;let se,xe,Ee;if(D>P)xe=D,se="regression",Ee=Math.round(xe*100)>=95?"text-red-600 dark:text-red-400":"text-[hsl(var(--muted-foreground))]";else if(P>D)xe=P,se="improvement",Ee=Math.round(xe*100)>=95?"text-emerald-600 dark:text-emerald-400":"text-[hsl(var(--muted-foreground))]";else return null;const E=Math.round(xe*100);return a.jsxs("div",{className:le("text-[10px] mt-0.5",Ee),children:[E,"% probability of ",se,ne.n!=null&&a.jsxs("span",{className:"opacity-60 ml-1",children:["(n=",ne.n,")"]})]})})()]})]},z)}),s.timing&&a.jsxs("tr",{className:"border-t-2 border-[hsl(var(--border))]",children:[a.jsx("td",{className:"px-4 py-2.5 font-mono text-[hsl(var(--muted-foreground))]",children:"Timing (mean)"}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ht(s.timing.baselineMean)}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ht(s.timing.candidateMean)}),a.jsx(Ox,{value:s.timing.delta,percent:s.timing.deltaPercent,invert:!0,format:ht})]}),s.cost!=null&&a.jsxs("tr",{className:"border-t border-[hsl(var(--border))]",children:[a.jsx("td",{className:"px-4 py-2.5 font-mono text-[hsl(var(--muted-foreground))]",children:"Cost (total)"}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ut(s.cost.baselineTotal)}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ut(s.cost.candidateTotal)}),a.jsx(Ox,{value:s.cost.delta,percent:s.cost.deltaPercent,invert:!0,format:ut})]})]})]})})]}),[{type:"regression",items:s.regressions,borderColor:"border-red-200 dark:border-red-900",bgColor:"bg-red-50 dark:bg-red-950/30",textColor:"text-red-700 dark:text-red-300",deltaColor:"text-red-600 dark:text-red-400",label:"Regressions",direction:-1},{type:"improvement",items:s.improvements,borderColor:"border-emerald-200 dark:border-emerald-900",bgColor:"bg-emerald-50 dark:bg-emerald-950/30",textColor:"text-emerald-700 dark:text-emerald-300",deltaColor:"text-emerald-600 dark:text-emerald-400",label:"Improvements",direction:1}].filter(z=>z.items.length>0).map(z=>{const ne=d&&h&&d.length>1,oe=ne?Math.min(d.length,h.length):0,de=z.items.map((ie,Se)=>{var mt,Xt,il,Pe;let Oe=0;if(ne)for(let gt=0;gt<oe;gt++){const tt=(Xt=(mt=d[gt])==null?void 0:mt.items[ie.itemIndex])==null?void 0:Xt.scores[ie.scorer],Ct=(Pe=(il=h[gt])==null?void 0:il.items[ie.itemIndex])==null?void 0:Pe.scores[ie.scorer];tt!=null&&Ct!=null&&(z.direction<0?Ct<tt:Ct>tt)&&Oe++}return{...ie,originalIndex:Se,consistentCount:Oe,totalRuns:oe}});ne?de.sort((ie,Se)=>Se.consistentCount-ie.consistentCount||Math.abs(Se.delta)-Math.abs(ie.delta)):de.sort((ie,Se)=>Math.abs(Se.delta)-Math.abs(ie.delta));const D=[...new Set(z.items.map(ie=>ie.scorer))],P=D.length===1?D[0]:null,se=new Map;for(const ie of de)se.has(ie.scorer)||se.set(ie.scorer,[]),se.get(ie.scorer).push(ie);const xe=ie=>{const Se=(m==null?void 0:m.type)===z.type&&m.index===ie.originalIndex,Oe=r==null?void 0:r.items[ie.itemIndex],mt=u==null?void 0:u.items[ie.itemIndex],Xt=ie.input?gi(ie.input,40):`Item #${ie.itemIndex+1}`,il=ne?ie.consistentCount===oe?"":ie.consistentCount===0?"opacity-40":"opacity-65":"";return a.jsxs("div",{className:il,children:[a.jsxs("button",{onClick:()=>k(z.type,ie.originalIndex),className:"w-full text-left flex items-center gap-3 px-4 py-2.5 text-xs hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",children:[ne&&a.jsxs("span",{className:le("shrink-0 text-[10px] font-mono font-medium px-1.5 py-0.5 rounded",ie.consistentCount===oe?z.type==="regression"?"bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-300":"bg-emerald-100 dark:bg-emerald-900/40 text-emerald-700 dark:text-emerald-300":"bg-[hsl(var(--muted))] text-[hsl(var(--muted-foreground))]"),children:[ie.consistentCount,"/",oe]}),a.jsxs("span",{className:"min-w-0 truncate flex-1",children:[a.jsxs("span",{className:"font-mono text-[hsl(var(--muted-foreground))]",children:["#",ie.itemIndex+1]})," ",a.jsx("span",{children:Xt})]}),a.jsxs("span",{className:le("font-mono shrink-0",z.deltaColor),children:[ie.baselineScore.toFixed(2)," ","→"," ",ie.candidateScore.toFixed(2)," ",a.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:["(",ie.delta>0?"+":"",ie.delta.toFixed(2),")"]})]})]}),Se&&Oe&&mt&&a.jsx(Bg,{baselineItem:Oe,candidateItem:mt,scorer:ie.scorer,baselineRunItems:d==null?void 0:d.map(Pe=>Pe.items[ie.itemIndex]).filter(Boolean),candidateRunItems:h==null?void 0:h.map(Pe=>Pe.items[ie.itemIndex]).filter(Boolean)})]},ie.originalIndex)},Ee=5;let E,H;if(ne){const ie=Math.ceil(oe/2);E=de.filter(Se=>Se.consistentCount>=ie),H=de.filter(Se=>Se.consistentCount<ie)}else E=de.slice(0,Ee),H=de.slice(Ee);const ee=C[z.type]??!1,re=ne?`${H.length} likely noise (minority of runs)`:`${H.length} more`,ce=ie=>{const Se=new Map;for(const Oe of ie)Se.has(Oe.scorer)||Se.set(Oe.scorer,[]),Se.get(Oe.scorer).push(Oe);return Se},ve=ie=>{if(P)return a.jsx("div",{className:"divide-y divide-[hsl(var(--border))]",children:ie.map(xe)});const Se=ce(ie);return a.jsx("div",{children:[...Se.entries()].map(([Oe,mt])=>a.jsxs("div",{children:[a.jsxs("div",{className:le("px-4 py-2 border-b border-t border-[hsl(var(--border))]",z.type==="regression"?"bg-red-50/30 dark:bg-red-950/5":"bg-emerald-50/30 dark:bg-emerald-950/5"),children:[a.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:Oe}),a.jsxs("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))] ml-1.5",children:["(",mt.length,")"]})]}),a.jsx("div",{className:"divide-y divide-[hsl(var(--border))]",children:mt.map(xe)})]},Oe))})};return a.jsxs("div",{className:le("border rounded-lg overflow-hidden",z.borderColor),children:[a.jsx("div",{className:le("px-4 py-2.5 border-b",z.bgColor,z.borderColor),children:a.jsxs("h3",{className:le("text-xs font-medium",z.textColor),children:[z.label," (",E.length,H.length>0?` + ${H.length} noise`:"",")",J&&a.jsxs("span",{className:"font-normal opacity-70 ml-1",children:[" — ","scores ",J]})]})}),E.length>0?ve(E):a.jsxs("div",{className:"px-4 py-3 text-xs text-[hsl(var(--muted-foreground))]",children:["No reliable ",z.label.toLowerCase()," detected (all within noise)."]}),H.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("button",{onClick:()=>w(ie=>({...ie,[z.type]:!ee})),className:"w-full flex items-center justify-center gap-1.5 px-4 py-2 text-[11px] font-medium text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors border-t border-dashed border-[hsl(var(--border))] cursor-pointer",children:[ee?a.jsx(_1,{className:"h-3 w-3"}):a.jsx(Wa,{className:"h-3 w-3"}),ee?"Hide":"Show"," ",re]}),ee&&ve(H)]})]},z.type)}),r&&u&&a.jsx(EN,{baseline:r,candidate:u,scorerNames:O.map(([z])=>z),baselineRuns:d??void 0,candidateRuns:h??void 0,scorerTypes:U})]})}function kx({label:s,item:r,scorer:u}){var h,m;const c=(h=r.scoreDetails)==null?void 0:h[u],d=typeof((m=c==null?void 0:c.metadata)==null?void 0:m.reasoning)=="string"?c.metadata.reasoning:null;return a.jsxs("div",{className:"p-4 space-y-3",children:[a.jsx("h5",{className:"font-medium text-[hsl(var(--muted-foreground))] uppercase tracking-wider text-[10px]",children:s}),a.jsx(_t,{data:r.output,collapsed:!0}),(c==null?void 0:c.score)!=null&&a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"Score:"}),a.jsx("span",{className:le("px-2 py-0.5 rounded-full font-mono font-medium",$u(c.score)),children:c.score.toFixed(3)})]}),d&&a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-[hsl(var(--muted-foreground))] text-[10px] uppercase tracking-wider block mb-1",children:"Reasoning"}),a.jsx("pre",{className:"text-xs font-mono p-2 rounded-md bg-[hsl(var(--secondary))] overflow-auto max-h-48 whitespace-pre-wrap leading-relaxed",children:d})]})]})}function Bg({baselineItem:s,candidateItem:r,scorer:u,baselineRunItems:c,candidateRunItems:d}){var w,k,U,_;const[h,m]=b.useState(0),p=c&&c.length>1||d&&d.length>1,x=Math.max((c==null?void 0:c.length)??1,(d==null?void 0:d.length)??1),g=p&&c?c[h]??s:s,j=p&&d?d[h]??r:r,y=(k=(w=s.scoreDetails)==null?void 0:w[u])==null?void 0:k.score,C=(_=(U=r.scoreDetails)==null?void 0:U[u])==null?void 0:_.score;return a.jsxs("div",{className:"border-t border-[hsl(var(--border))] bg-[hsl(var(--card))] text-xs",children:[p&&(y!=null||C!=null)&&a.jsxs("div",{className:"flex items-center gap-4 px-4 py-2 border-b border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[a.jsxs("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:["Mean across ",x," runs"]}),a.jsxs("div",{className:"flex items-center gap-3",children:[y!=null&&a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"Baseline:"}),a.jsx("span",{className:le("font-mono font-medium",Et(y)),children:y.toFixed(3)})]}),C!=null&&a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"Candidate:"}),a.jsx("span",{className:le("font-mono font-medium",Et(C)),children:C.toFixed(3)})]}),y!=null&&C!=null&&a.jsxs("span",{className:le("font-mono",C-y>0?"text-emerald-600 dark:text-emerald-400":C-y<0?"text-red-600 dark:text-red-400":"text-[hsl(var(--muted-foreground))]"),children:["(",C-y>0?"+":"",(C-y).toFixed(3),")"]})]})]}),p&&a.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-[hsl(var(--border))] bg-[hsl(var(--muted))]",children:[a.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Run"}),a.jsx("div",{className:"flex items-center gap-0.5",children:Array.from({length:x},(L,J)=>a.jsx("button",{onClick:()=>m(J),className:le("px-2 py-0.5 rounded text-[10px] font-mono transition-colors cursor-pointer",J===h?"bg-[hsl(var(--foreground))] text-[hsl(var(--background))]":"text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]"),children:J+1},J))}),a.jsxs("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))] ml-auto",children:["Showing output and reasoning from run ",h+1," of ",x]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-0",children:[a.jsx("div",{className:"border-r border-[hsl(var(--border))]",children:a.jsx(kx,{label:"Baseline",item:g,scorer:u})}),a.jsx(kx,{label:"Candidate",item:j,scorer:u})]})]})}function Ju(s){const r=Date.now()-s;return r<6e4?"just now":r<36e5?`${Math.floor(r/6e4)}m ago`:r<864e5?`${Math.floor(r/36e5)}h ago`:new Date(s).toLocaleDateString()}function cf(s){return s.data.dataset??""}function TN(s){var r;return(r=s.data.metadata)==null?void 0:r.runGroupId}function MN(s){var d;const r=new Map,u=[];for(const h of s){const m=TN(h);m?(r.has(m)||r.set(m,[]),r.get(m).push(h)):u.push(h)}const c=[];for(const[h,m]of r){if(m.length===1){u.push(m[0]);continue}const p=m[0].data,x=Object.keys(((d=p.summary)==null?void 0:d.scorers)??{}),g={};for(const j of x){const y=m.map(C=>{var w,k,U;return((U=(k=(w=C.data.summary)==null?void 0:w.scorers)==null?void 0:k[j])==null?void 0:U.mean)??0});g[j]={mean:y.reduce((C,w)=>C+w,0)/y.length}}c.push({type:"group",groupId:h,entries:m.sort((j,y)=>y.timestamp-j.timestamp),evalName:m[0].eval,timestamp:Math.max(...m.map(j=>j.timestamp)),dataset:cf(m[0]),runCount:m.length,aggregateScorers:g})}for(const h of u)c.push({type:"single",entry:h});return c.sort((h,m)=>{const p=h.type==="group"?h.timestamp:h.entry.timestamp;return(m.type==="group"?m.timestamp:m.entry.timestamp)-p}),c}function df({scorers:s}){const r=Object.entries(s);return r.length===0?null:a.jsx("div",{className:"flex items-center gap-0.5 shrink-0",children:r.map(([u,c])=>a.jsx("div",{className:"relative h-3.5 w-4 rounded-sm bg-[hsl(var(--muted))] overflow-hidden",title:`${u}: ${c.mean.toFixed(3)}`,children:a.jsx("div",{className:le("absolute bottom-0 left-0 right-0 rounded-sm",Pu(c.mean)),style:{height:`${Math.max(0,Math.min(100,c.mean*100))}%`}})},u))})}function Qd({data:s}){var c;const r=(c=s.summary)==null?void 0:c.scorers;if(!r)return null;const u={};for(const[d,h]of Object.entries(r))u[d]={mean:h.mean};return a.jsx(df,{scorers:u})}function ON({selection:s,history:r,pickerItems:u,placeholder:c}){if(!s)return a.jsx("span",{className:"text-sm text-[hsl(var(--muted-foreground))]",children:c});if(s.groupIds&&s.groupIds.length>1){const x=u.find(g=>g.type==="group"&&g.entries.some(j=>j.id===s.id));if(x&&x.type==="group"){const g=of(x.entries);return a.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[a.jsx(df,{scorers:x.aggregateScorers}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"text-sm font-medium truncate",children:x.evalName}),a.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-medium bg-violet-100 dark:bg-violet-900/40 text-violet-700 dark:text-violet-300",children:[a.jsx(af,{className:"h-2.5 w-2.5"}),x.runCount," runs"]}),g.map(([j,y])=>a.jsxs("span",{className:"px-1 py-0.5 rounded bg-[hsl(var(--secondary))] font-mono text-[9px]",title:`${j} — ${y} calls`,children:[yl(j)," ",a.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:["(",y,")"]})]},j))]}),a.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-[hsl(var(--muted-foreground))]",children:[a.jsx(Sx,{className:"h-2.5 w-2.5"}),Ju(x.timestamp)]})]})]})}}const d=r.find(x=>x.id===s.id);if(!d)return a.jsx("span",{className:"text-sm text-[hsl(var(--muted-foreground))]",children:c});const h=d.data,m=Un(h),p=va(h);return a.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[a.jsx(Qd,{data:h}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"text-sm font-medium truncate",children:d.eval}),m.map(x=>a.jsxs("span",{className:"px-1 py-0.5 rounded bg-[hsl(var(--secondary))] font-mono text-[9px]",title:p?`${x} — ${p[x]} calls`:x,children:[yl(x),p&&a.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:[" (",p[x],")"]})]},x))]}),a.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-[hsl(var(--muted-foreground))]",children:[a.jsx(Sx,{className:"h-2.5 w-2.5"}),Ju(d.timestamp),a.jsx("span",{className:"opacity-50",children:"·"}),a.jsx("span",{className:"font-mono",children:d.id.slice(0,8)})]})]})]})}function Rx({label:s,selection:r,pickerItems:u,disabledSelection:c,history:d,onChange:h,filterDataset:m}){const[p,x]=b.useState(!1),[g,j]=b.useState(null),y=b.useRef(null);b.useEffect(()=>{function k(U){y.current&&!y.current.contains(U.target)&&(x(!1),j(null))}return p&&document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[p]);const C=m?u.filter(k=>k.type==="group"?k.dataset===m:cf(k.entry)===m):u,w=new Set((c==null?void 0:c.groupIds)??(c?[c.id]:[]));return a.jsxs("div",{ref:y,className:"flex-1 min-w-0 relative",children:[a.jsx("label",{className:"block text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-1.5",children:s}),a.jsxs("button",{onClick:()=>{x(!p),j(null)},className:le("w-full px-3 py-2 rounded-lg border text-left flex items-center justify-between gap-2 transition-colors min-h-[44px] cursor-pointer",p?"border-[hsl(var(--foreground))] ring-1 ring-[hsl(var(--foreground))]":"border-[hsl(var(--input))] hover:border-[hsl(var(--foreground))/30]","bg-[hsl(var(--background))]"),children:[a.jsx(ON,{selection:r,history:d,pickerItems:u,placeholder:`Select ${s.toLowerCase()}...`}),a.jsx(Wa,{className:le("h-3.5 w-3.5 shrink-0 text-[hsl(var(--muted-foreground))] transition-transform",p&&"rotate-180")})]}),p&&a.jsx("div",{className:"absolute z-50 top-full left-0 right-0 mt-1 max-h-72 overflow-y-auto rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--background))] shadow-lg",children:C.length===0?a.jsx("div",{className:"px-3 py-4 text-xs text-center text-[hsl(var(--muted-foreground))]",children:"No matching runs"}):C.map(k=>{var O;if(k.type==="group"){const A=g===k.groupId,V=(O=r==null?void 0:r.groupIds)==null?void 0:O.some(q=>k.entries.some(T=>T.id===q));return a.jsxs("div",{className:"border-b border-[hsl(var(--border))] last:border-b-0",children:[a.jsxs("div",{className:"flex items-stretch",children:[a.jsxs("button",{onClick:()=>{h({id:k.entries[0].id,groupIds:k.entries.map(q=>q.id)}),x(!1),j(null)},className:le("flex-1 text-left px-3 py-2.5 flex items-center gap-2.5 transition-colors cursor-pointer",V?"bg-[hsl(var(--accent))]":"hover:bg-[hsl(var(--accent))]"),children:[a.jsx(df,{scorers:k.aggregateScorers}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"text-xs font-medium truncate",children:k.evalName}),a.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[9px] font-medium bg-violet-100 dark:bg-violet-900/40 text-violet-700 dark:text-violet-300",children:[a.jsx(af,{className:"h-2 w-2"}),k.runCount," runs"]}),of(k.entries).map(([q,T])=>a.jsxs("span",{className:"px-1 py-0.5 rounded bg-[hsl(var(--secondary))] font-mono text-[9px]",title:`${q} — ${T} calls`,children:[yl(q)," ",a.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:["(",T,")"]})]},q))]}),a.jsxs("div",{className:"text-[10px] text-[hsl(var(--muted-foreground))]",children:[Ju(k.timestamp),a.jsxs("span",{className:"opacity-50",children:[" ","·"," "]}),"pooled comparison"]})]}),V&&a.jsx("div",{className:"shrink-0 h-1.5 w-1.5 rounded-full bg-[hsl(var(--foreground))]"})]}),a.jsx("button",{onClick:q=>{q.stopPropagation(),j(A?null:k.groupId)},className:"shrink-0 w-8 flex items-center justify-center border-l border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",title:A?"Hide individual runs":"Show individual runs",children:A?a.jsx(Wa,{className:"h-3 w-3 text-[hsl(var(--muted-foreground))]"}):a.jsx(Pl,{className:"h-3 w-3 text-[hsl(var(--muted-foreground))]"})})]}),A&&k.entries.map(q=>{var F;const T=q.data,B=(r==null?void 0:r.id)===q.id&&!(r!=null&&r.groupIds),Z=w.has(q.id);return a.jsxs("button",{onClick:()=>{h({id:q.id}),x(!1),j(null)},disabled:Z,className:le("w-full text-left pl-8 pr-3 py-2 flex items-center gap-2.5 transition-colors border-t border-[hsl(var(--border))] cursor-pointer","bg-[hsl(var(--muted))]/30",B?"bg-[hsl(var(--accent))]":"hover:bg-[hsl(var(--accent))]",Z&&"opacity-30 cursor-not-allowed"),children:[a.jsx(Qd,{data:T}),a.jsx("div",{className:"min-w-0 flex-1",children:a.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-[hsl(var(--muted-foreground))]",children:[a.jsxs("span",{children:["Run ",(((F=T.metadata)==null?void 0:F.runIndex)??0)+1]}),a.jsx("span",{className:"opacity-50",children:"·"}),a.jsx("span",{className:"font-mono",children:q.id.slice(0,8)}),(()=>{const Q=va(T);return Un(T).map(z=>a.jsxs("span",{className:"px-1 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] font-mono text-[9px]",title:Q?`${z} — ${Q[z]} calls`:z,children:[yl(z),Q&&a.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:[" ","(",Q[z],")"]})]},z))})()]})}),B&&a.jsx("div",{className:"shrink-0 h-1.5 w-1.5 rounded-full bg-[hsl(var(--foreground))]"})]},q.id)})]},k.groupId)}const{entry:U}=k,_=U.data,L=(r==null?void 0:r.id)===U.id,J=w.has(U.id);return a.jsxs("button",{onClick:()=>{h({id:U.id}),x(!1),j(null)},disabled:J,className:le("w-full text-left px-3 py-2.5 flex items-center gap-2.5 transition-colors border-b border-[hsl(var(--border))] last:border-b-0 cursor-pointer",L?"bg-[hsl(var(--accent))]":"hover:bg-[hsl(var(--accent))]",J&&"opacity-30 cursor-not-allowed"),children:[a.jsx(Qd,{data:_}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"text-xs font-medium truncate",children:U.eval}),(()=>{const A=va(_);return Un(_).map(V=>a.jsxs("span",{className:"px-1 py-0.5 rounded bg-[hsl(var(--secondary))] font-mono text-[9px]",title:A?`${V} — ${A[V]} calls`:V,children:[yl(V),A&&a.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:[" ","(",A[V],")"]})]},V))})()]}),a.jsxs("div",{className:"text-[10px] text-[hsl(var(--muted-foreground))]",children:[Ju(U.timestamp),a.jsxs("span",{className:"opacity-50",children:[" ","·"," "]}),a.jsx("span",{className:"font-mono",children:U.id.slice(0,8)}),a.jsxs("span",{className:"opacity-50",children:[" ","·"," "]}),_.summary.count," items"]})]}),L&&a.jsx("div",{className:"shrink-0 h-1.5 w-1.5 rounded-full bg-[hsl(var(--foreground))]"})]},U.id)})})]})}function AN({history:s,baselineSelection:r,candidateSelection:u,onBaselineChange:c,onCandidateChange:d,onCompare:h,comparing:m}){const p=b.useMemo(()=>MN(s),[s]),x=r?s.find(y=>y.id===r.id):null,g=x?cf(x):null,j=r!=null&&u!=null&&r.id!==u.id&&!m;return a.jsx("div",{className:"space-y-3",children:a.jsxs("div",{className:"flex items-end gap-2",children:[a.jsx(Rx,{label:"Baseline",selection:r,pickerItems:p,disabledSelection:u,history:s,onChange:c,filterDataset:null}),a.jsx("button",{onClick:()=>{if(r&&u){const y=r;c(u),d(y)}},disabled:!r||!u,className:"shrink-0 p-2 rounded-lg border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] disabled:opacity-30 transition-colors mb-[1px] cursor-pointer",title:"Swap baseline and candidate",children:a.jsx(S1,{className:"h-3.5 w-3.5 text-[hsl(var(--muted-foreground))]"})}),a.jsx(Rx,{label:"Candidate",selection:u,pickerItems:p,disabledSelection:r,history:s,onChange:d,filterDataset:g}),a.jsx("button",{onClick:h,disabled:!j,className:le("shrink-0 px-5 py-2 text-sm font-medium rounded-lg transition-all cursor-pointer","bg-[hsl(var(--foreground))] text-[hsl(var(--background))]","hover:opacity-90 disabled:opacity-40"),children:m?"Comparing…":"Compare"})]})})}function kN({currentIndex:s,totalRuns:r,aggregate:u,onIndexChange:c}){const d=s===-1,h=s>-1,m=s<r-1;return a.jsx("div",{className:"px-6",children:a.jsxs("div",{className:"flex items-center justify-between px-4 py-2 rounded-lg bg-[hsl(var(--muted))]",children:[a.jsx("button",{onClick:()=>c(s-1),disabled:!h,className:"p-1 rounded hover:bg-[hsl(var(--accent))] disabled:opacity-30 transition-colors cursor-pointer",children:a.jsx(k1,{size:16})}),a.jsxs("div",{className:"text-center",children:[a.jsx("span",{className:"text-sm font-medium",children:d?`Aggregate (${r} runs)`:`Run ${s+1} of ${r}`}),!d&&a.jsx("button",{onClick:()=>c(-1),className:"ml-3 text-xs text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] underline transition-colors cursor-pointer",children:"View aggregate"}),d&&(()=>{const p=Object.values(u.scorers),x=p.reduce((g,j)=>g+j.mean,0)/Math.max(p.length,1);return a.jsxs("div",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:["Overall mean: ",x.toFixed(3)," across ",p.length," scorer",p.length!==1?"s":""]})})()]}),a.jsx("button",{onClick:()=>c(s+1),disabled:!m,className:"p-1 rounded hover:bg-[hsl(var(--accent))] disabled:opacity-30 transition-colors cursor-pointer",children:a.jsx(Pl,{size:16})})]})})}function RN(s){var h;const r={},u=[];for(const m of s){const p=m.data;if(!((h=p.summary)!=null&&h.scorers))continue;const x=[];for(const[g,j]of Object.entries(p.summary.scorers))r[g]||(r[g]=[]),r[g].push(j.mean),x.push(j.mean);x.length>0&&u.push(x.reduce((g,j)=>g+j,0)/x.length)}const c={};for(const[m,p]of Object.entries(r)){const x=p.reduce((j,y)=>j+y,0)/p.length,g=p.length>1?Math.sqrt(p.reduce((j,y)=>j+(y-x)**2,0)/(p.length-1)):0;c[m]={mean:x,std:g}}let d=null;if(u.length>0){const m=u.reduce((x,g)=>x+g,0)/u.length,p=u.length>1?Math.sqrt(u.reduce((x,g)=>x+(g-m)**2,0)/(u.length-1)):0;d={mean:m,std:p}}return{scorers:c,overall:d}}function zN(s){const r=s.eval.replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,"")||"eval",u=s.id.slice(0,8),c=new Date(s.timestamp).toISOString().replace(/[-:]/g,"").replace(/\.\d{3}Z$/,"Z"),d=`${r}-${u}-${c}.json`,h=JSON.stringify(s.data,null,2),m=new Blob([h],{type:"application/json"}),p=URL.createObjectURL(m),x=document.createElement("a");x.href=p,x.download=d,document.body.appendChild(x),x.click(),document.body.removeChild(x),setTimeout(()=>URL.revokeObjectURL(p),0)}function _N({history:s,evalFilter:r,onEvalFilterChange:u,onSelect:c,onSelectGroup:d,onRescore:h,onDelete:m,registeredEvalNames:p,readOnly:x,expandedGroups:g,onToggleGroup:j}){const[y,C]=b.useState(null),w=[...new Set(s.map(A=>A.eval))].sort(),k=b.useMemo(()=>r?s.filter(A=>A.eval===r):s,[s,r]),{rows:U,scorerCols:_}=b.useMemo(()=>{var B,Z;const A=new Map,V=[];for(const F of k){const z=(B=F.data.metadata)==null?void 0:B.runGroupId;z?(A.has(z)||A.set(z,[]),A.get(z).push(F)):V.push(F)}const q=[];for(const[F,Q]of A)Q.sort((z,ne)=>ne.timestamp-z.timestamp),Q.length===1?q.push({type:"entry",entry:Q[0]}):q.push({type:"group",groupId:F,entries:Q,evalName:Q[0].eval,newestTimestamp:Q[0].timestamp});for(const F of V)q.push({type:"entry",entry:F});q.sort((F,Q)=>{const z=F.type==="group"?F.newestTimestamp:F.entry.timestamp;return(Q.type==="group"?Q.newestTimestamp:Q.entry.timestamp)-z});const T=new Set;for(const F of k){const Q=F.data;if((Z=Q.summary)!=null&&Z.scorers)for(const z of Object.keys(Q.summary.scorers))T.add(z)}return{rows:q,scorerCols:[...T].sort()}},[k]),L=b.useMemo(()=>{var V;const A={};for(const q of k){const B=(V=q.data.metadata)==null?void 0:V.scorerTypes;B&&Object.assign(A,B)}return A},[k]),J=8+_.length+(h?1:0),O=(A,V,q)=>{const T=A.data,B=y===A.id;return a.jsxs(b.Fragment,{children:[a.jsxs("tr",{"data-entry-id":A.id,className:le("border-t border-[hsl(var(--border))] cursor-pointer hover:bg-[hsl(var(--accent))] transition-colors",q&&!V&&"bg-[hsl(var(--accent))]/30",B&&"bg-[hsl(var(--accent))]/40"),onClick:()=>C(B?null:A.id),children:[a.jsx("td",{className:le("px-3 py-2.5 font-mono",V&&"pl-9"),children:a.jsxs("div",{className:"flex flex-col gap-0.5",children:[a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[V&&a.jsx("span",{className:"inline-block w-1 h-3 mr-0.5 rounded-sm bg-[hsl(var(--border))]"}),A.eval]}),(()=>{const Z=Bs(T);if(Z.length===0||Z.length===1&&Z[0]===A.eval)return null;const F=qd(T),Q=F?`Workflows: ${Z.map(z=>`${z} (${F[z]??"?"} calls)`).join(", ")}`:`Workflows: ${Z.join(", ")}`;return a.jsx("span",{className:"text-[10px] font-normal text-[hsl(var(--muted-foreground))] truncate max-w-[240px]",title:Q,children:Z.join(" · ")})})()]})}),a.jsx("td",{className:"px-3 py-2.5",children:(()=>{const Z=Un(T);if(Z.length===0)return a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"});const F=va(T);return a.jsx("span",{className:"inline-flex items-center gap-1 flex-wrap",children:Z.map(Q=>a.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] font-mono text-[10px]",title:F?`${Q} — ${F[Q]} calls`:Q,children:[yl(Q),F&&F[Q]!=null&&a.jsxs("span",{className:"ml-0.5 text-[hsl(var(--muted-foreground))]",children:["(",F[Q],")"]})]},Q))})})()}),a.jsx("td",{className:"px-3 py-2.5 text-[hsl(var(--muted-foreground))]",children:new Date(A.timestamp).toLocaleString()}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono",children:T.summary.count}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono",children:T.summary.failures>0?a.jsx("span",{className:"text-red-600 dark:text-red-400",children:T.summary.failures}):a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"0"})}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:T.duration>0?ht(T.duration):"-"}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:T.totalCost>0?ut(T.totalCost):"-"}),(()=>{var Q;const Z=Object.values(((Q=T.summary)==null?void 0:Q.scorers)??{}).map(z=>z.mean),F=Z.length>0?Z.reduce((z,ne)=>z+ne,0)/Z.length:null;return a.jsx("td",{className:"px-3 py-2.5 text-right font-mono font-medium border-l border-[hsl(var(--border))]",children:F!=null?a.jsx("span",{className:Et(F),children:F.toFixed(3)}):a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"})})})(),_.map(Z=>{var Q,z;const F=(z=(Q=T.summary)==null?void 0:Q.scorers)==null?void 0:z[Z];return a.jsx("td",{className:"px-3 py-2.5 text-right font-mono",children:F?a.jsxs("div",{children:[a.jsx("span",{className:Et(F.mean),children:F.mean.toFixed(3)}),F.min!==F.max&&a.jsxs("div",{className:"text-[9px] text-[hsl(var(--muted-foreground))]",children:[F.min.toFixed(2),"–",F.max.toFixed(2)]})]}):a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"})},Z)}),h&&a.jsx("td",{className:"px-3 py-2.5"})]}),B&&(()=>{var Q,z,ne;const Z=(Q=T.metadata)==null?void 0:Q.scorerTypes,F=(z=T.metadata)==null?void 0:z.originalId;return a.jsx("tr",{className:"border-t border-[hsl(var(--border))] bg-[hsl(var(--muted))]/50",children:a.jsx("td",{colSpan:J,className:"px-4 py-3",children:a.jsxs("div",{className:"flex items-center justify-between gap-4",children:[a.jsxs("div",{className:"flex items-center gap-4 text-[10px] text-[hsl(var(--muted-foreground))] flex-wrap",children:[a.jsxs("span",{children:["ID: ",a.jsx("span",{className:"font-mono",children:T.id.slice(0,8)})]}),a.jsxs("span",{children:["Dataset:"," ",a.jsx("span",{className:"font-medium text-[hsl(var(--foreground))]",children:T.dataset})]}),(()=>{const oe=Bs(T);return oe.length===0?null:a.jsxs("span",{children:[oe.length>1?"Workflows":"Workflow",":"," ",a.jsx("span",{className:"font-medium text-[hsl(var(--foreground))]",children:oe.join(", ")})]})})(),(()=>{const oe=Un(T);if(oe.length===0)return null;const de=va(T);return a.jsx("span",{className:"inline-flex items-center gap-1",children:oe.map(D=>a.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] font-mono",title:de?`${D} — ${de[D]} calls`:D,children:[yl(D),de&&de[D]!=null&&a.jsxs("span",{className:"ml-0.5 text-[hsl(var(--muted-foreground))]",children:["(",de[D],")"]})]},D))})})(),!!((ne=T.metadata)!=null&&ne.rescored)&&a.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400",children:"Rescored"}),F&&a.jsxs("span",{children:["from"," ",a.jsx("button",{onClick:oe=>{oe.stopPropagation(),C(F),requestAnimationFrame(()=>{var de;(de=document.querySelector(`[data-entry-id="${CSS.escape(F)}"]`))==null||de.scrollIntoView({behavior:"smooth",block:"center"})})},className:"font-mono underline hover:text-[hsl(var(--foreground))] transition-colors cursor-pointer",children:F.slice(0,8)})]}),Z&&Object.keys(Z).length>0&&a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:["Scorers:",Object.entries(Z).sort(([oe],[de])=>oe.localeCompare(de)).map(([oe,de])=>a.jsx("span",{className:le("px-1.5 py-0.5 rounded font-mono cursor-default",de==="llm"?"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400":"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"),title:de==="llm"?`${oe} — LLM scorer (scores may vary between runs)`:`${oe} — deterministic scorer`,children:oe},oe))]})]}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[h&&(()=>{const oe=!p||p.has(A.eval),de=oe&&!x,D=x?"Rescore unavailable — Studio is mounted in read-only mode.":oe?"Re-run scorers on saved outputs without re-executing the workflow":`Rescore unavailable — no registered eval named "${A.eval}". Imported CLI artifacts can only be rescored when the runtime has a matching registered eval config.`;return a.jsx("button",{onClick:P=>{P.stopPropagation(),de&&h(A.eval,A.id)},disabled:!de,className:le("px-2.5 py-1 text-[10px] font-medium rounded border border-[hsl(var(--input))] transition-colors",de?"hover:bg-[hsl(var(--accent))] cursor-pointer":"opacity-40 cursor-not-allowed"),title:D,children:"Rescore"})})(),a.jsx("button",{onClick:oe=>{oe.stopPropagation(),zN(A)},className:"p-1 rounded border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] cursor-pointer transition-colors",title:`Export this result as JSON (${A.eval}-${A.id.slice(0,8)}-...json)`,"aria-label":"Export result as JSON",children:a.jsx(G1,{size:12})}),m&&a.jsx("button",{onClick:oe=>{oe.stopPropagation(),!x&&m(A)},disabled:x,className:le("p-1 rounded border border-[hsl(var(--input))] transition-colors",x?"opacity-40 cursor-not-allowed":"hover:bg-red-50 hover:border-red-200 hover:text-red-600 dark:hover:bg-red-950/30 dark:hover:border-red-900 dark:hover:text-red-400 cursor-pointer"),title:x?"Delete unavailable — Studio is mounted in read-only mode.":"Delete this history entry","aria-label":"Delete history entry",children:a.jsx(rf,{size:12})}),a.jsxs("button",{onClick:oe=>{oe.stopPropagation(),c(T)},className:"inline-flex items-center gap-1 px-2.5 py-1 text-[10px] font-medium rounded border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",title:"Open full run details in the Run tab",children:["View Details",a.jsx(ii,{size:10})]})]})]})})})})()]},A.id)};return a.jsxs("div",{children:[w.length>1&&a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsxs("select",{value:r,onChange:A=>u(A.target.value),className:"px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[a.jsx("option",{value:"",children:"All evals"}),w.map(A=>a.jsx("option",{value:A,children:A},A))]}),r&&a.jsxs("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:[k.length," run",k.length!==1?"s":""]})]}),a.jsx("div",{className:"border border-[hsl(var(--border))] rounded-xl overflow-hidden",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"bg-[hsl(var(--muted))]",children:[a.jsx("th",{className:"text-left px-3 py-2.5 font-medium",children:"Eval"}),a.jsx("th",{className:"text-left px-3 py-2.5 font-medium",children:"Model"}),a.jsx("th",{className:"text-left px-3 py-2.5 font-medium",children:"Timestamp"}),a.jsx("th",{className:"text-right px-3 py-2.5 font-medium",children:"Items"}),a.jsx("th",{className:"text-right px-3 py-2.5 font-medium",children:"Failures"}),a.jsx("th",{className:"text-right px-3 py-2.5 font-medium",children:"Duration"}),a.jsx("th",{className:"text-right px-3 py-2.5 font-medium",children:"Cost"}),a.jsx("th",{className:"text-right px-3 py-2.5 font-medium border-l border-[hsl(var(--border))]",children:"Overall"}),_.map(A=>a.jsxs("th",{className:"text-right px-3 py-2.5 font-medium font-mono whitespace-nowrap",title:A,children:[A,L[A]==="llm"&&a.jsx("span",{className:"ml-1 px-1 py-0.5 text-[9px] font-medium rounded bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400 align-middle",title:"LLM scorer — scores may vary between runs",children:"LLM"})]},A)),h&&a.jsx("th",{className:"px-3 py-2.5 font-medium w-8"})]})}),a.jsx("tbody",{children:U.map((A,V)=>{if(A.type==="group"){const q=g.has(A.groupId),T=RN(A.entries),B=T.scorers,Z=A.entries.reduce((z,ne)=>z+ne.data.summary.count,0),F=A.entries.reduce((z,ne)=>z+ne.data.duration,0),Q=A.entries.reduce((z,ne)=>z+ne.data.totalCost,0);return a.jsxs(b.Fragment,{children:[a.jsxs("tr",{className:le("border-t border-[hsl(var(--border))] cursor-pointer hover:bg-[hsl(var(--accent))] transition-colors",V===0&&"bg-[hsl(var(--accent))]/30"),onClick:()=>j(A.groupId),children:[a.jsx("td",{className:"px-3 py-2.5 font-mono",children:a.jsxs("div",{className:"flex flex-col gap-0.5",children:[a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"shrink-0 p-0.5 -m-0.5",children:q?a.jsx(Wa,{size:14}):a.jsx(Pl,{size:14})}),A.evalName]}),(()=>{const z=new Set,ne=[];for(const oe of A.entries)for(const de of Bs(oe.data))z.has(de)||(z.add(de),ne.push(de));return ne.length===0||ne.length===1&&ne[0]===A.evalName?null:a.jsx("span",{className:"text-[10px] font-normal text-[hsl(var(--muted-foreground))] truncate max-w-[240px] pl-[22px]",title:`Workflows: ${ne.join(", ")}`,children:ne.join(" · ")})})()]})}),a.jsx("td",{className:"px-3 py-2.5",children:(()=>{const z=of(A.entries);return z.length===0?a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"}):a.jsx("span",{className:"inline-flex items-center gap-1 flex-wrap",children:z.map(([ne,oe])=>a.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] font-mono text-[10px]",title:`${ne} — ${oe} calls`,children:[yl(ne),a.jsxs("span",{className:"ml-0.5 text-[hsl(var(--muted-foreground))]",children:["(",oe,")"]})]},ne))})})()}),a.jsx("td",{className:"px-3 py-2.5 text-[hsl(var(--muted-foreground))]",children:new Date(A.newestTimestamp).toLocaleString()}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono",children:Z}),a.jsx("td",{className:"px-3 py-2.5 text-right",children:a.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded-md bg-[hsl(var(--secondary))] text-[hsl(var(--muted-foreground))]",children:[a.jsx(af,{size:10}),A.entries.length," runs"]})}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:F>0?ht(F):"-"}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:Q>0?ut(Q):"-"}),a.jsx("td",{className:"px-3 py-2.5 text-right font-mono font-medium border-l border-[hsl(var(--border))]",children:T.overall?a.jsxs("span",{className:Et(T.overall.mean),children:[T.overall.mean.toFixed(3),T.overall.std>0&&a.jsxs("span",{className:"text-[hsl(var(--muted-foreground))] font-normal",children:[" ± ",T.overall.std.toFixed(3)]})]}):a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"})}),_.map(z=>{const ne=B[z];return a.jsx("td",{className:"px-3 py-2.5 text-right font-mono",children:ne?a.jsxs("span",{className:Et(ne.mean),children:[ne.mean.toFixed(3),a.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:[" "," ± ",ne.std.toFixed(3)]})]}):a.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"})},z)}),h&&a.jsx("td",{className:"px-3 py-2.5"})]}),q&&a.jsxs(a.Fragment,{children:[d&&a.jsx("tr",{className:"border-t border-[hsl(var(--border))] bg-[hsl(var(--muted))]/50",children:a.jsx("td",{colSpan:J,className:"px-4 py-2.5",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))]",children:[A.entries.length," runs in this group"]}),a.jsxs("button",{onClick:z=>{z.stopPropagation(),d(A.entries)},className:"inline-flex items-center gap-1 px-2.5 py-1 text-[10px] font-medium rounded border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",title:"View combined statistics across all runs in this group",children:["View Aggregate",a.jsx(ii,{size:10})]})]})})}),A.entries.map(z=>O(z,!0,!1))]})]},A.groupId)}return O(A.entry,!1,V===0)})})]})})})]})}const Gd=1,Yd=25,DN=5,Bu=s=>Math.max(Gd,Math.min(Yd,Math.round(s)));function UN({evals:s,selectedEval:r,onSelectEval:u,runCount:c,onRunCountChange:d,running:h,onRun:m}){return a.jsxs("div",{className:le("inline-flex items-stretch rounded-full bg-[hsl(var(--background))]","ring-1 ring-[hsl(var(--input))] shadow-sm","hover:ring-[hsl(var(--ring))] focus-within:ring-[hsl(var(--ring))]","transition-shadow"),children:[a.jsx(ui,{items:s,value:r,onSelect:u,getKey:p=>p.name,getLabel:p=>p.name,getDescription:p=>a.jsxs(a.Fragment,{children:[a.jsx("span",{children:p.workflow}),a.jsx("span",{className:"opacity-40 mx-1",children:"·"}),a.jsx("span",{children:p.dataset}),a.jsx("span",{className:"opacity-40 mx-1",children:"·"}),a.jsxs("span",{children:[p.scorers.length," scorer",p.scorers.length!==1?"s":""]})]}),searchMatch:(p,x)=>p.name.toLowerCase().includes(x)||p.workflow.toLowerCase().includes(x)||p.dataset.toLowerCase().includes(x),placeholder:"Select eval",searchPlaceholder:"Search evals…",emptyLabel:"No evals registered",shortcut:!0,triggerClassName:"rounded-l-full",ariaLabel:"Select an eval"}),a.jsx(HN,{value:c,onChange:d,disabled:h}),a.jsxs("button",{type:"button",onClick:m,disabled:!r||h,className:le("inline-flex items-center gap-1.5 pl-3.5 pr-4 py-2 text-sm font-medium cursor-pointer","bg-[hsl(var(--foreground))] text-[hsl(var(--background))] rounded-r-full","hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-[hsl(var(--foreground))]","disabled:opacity-40 disabled:cursor-not-allowed transition-opacity"),children:[a.jsx(sf,{size:12,className:le("fill-current",h&&"animate-spin fill-none")}),h?"Running…":"Run"]})]})}function HN({value:s,onChange:r,disabled:u=!1}){const[c,d]=b.useState(!1),[h,m]=b.useState(""),p=b.useRef(null),x=b.useRef(!1),g=b.useCallback((L,J)=>{const O=(J?DN:1)*L;r(Bu(s+O))},[s,r]),j=b.useCallback(()=>{u||(x.current=!1,m(String(s)),d(!0))},[s,u]);b.useEffect(()=>{c||m(String(s))},[s,c]),b.useEffect(()=>{c&&requestAnimationFrame(()=>{var L,J;(L=p.current)==null||L.focus(),(J=p.current)==null||J.select()})},[c]);const y=b.useCallback(()=>{if(x.current){d(!1);return}x.current=!0;const L=parseInt(h,10);Number.isNaN(L)||r(Bu(L)),d(!1)},[h,r]),C=b.useCallback(()=>{x.current=!0,d(!1)},[]),w=b.useCallback(L=>{if(L.key==="Enter")L.preventDefault(),y();else if(L.key==="Escape")L.preventDefault(),C();else if(L.key==="ArrowUp"){L.preventDefault();const J=parseInt(h,10);Number.isNaN(J)||m(String(Bu(J+1)))}else if(L.key==="ArrowDown"){L.preventDefault();const J=parseInt(h,10);Number.isNaN(J)||m(String(Bu(J-1)))}},[y,C,h]),k=b.useCallback(L=>{u||(L.key==="Enter"||L.key===" "?(L.preventDefault(),j()):L.key==="ArrowUp"?(L.preventDefault(),g(1,L.shiftKey)):L.key==="ArrowDown"&&(L.preventDefault(),g(-1,L.shiftKey)))},[u,j,g]),U=s<=Gd,_=s>=Yd;return a.jsxs("div",{className:"flex items-stretch border-l border-[hsl(var(--input))]",role:"group","aria-label":"Run count",children:[a.jsx("button",{type:"button",onClick:L=>g(-1,L.shiftKey),disabled:u||U,title:"Decrease runs — Shift+click: −5","aria-label":"Decrease run count",className:le("flex items-center px-1.5 transition-colors cursor-pointer","text-[hsl(var(--muted-foreground))]","hover:bg-[hsl(var(--muted))] hover:text-[hsl(var(--foreground))]","focus:outline-none focus-visible:bg-[hsl(var(--muted))]","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-[hsl(var(--muted-foreground))]"),children:a.jsx(W1,{size:12,strokeWidth:2.5})}),c?a.jsx("input",{ref:p,type:"text",inputMode:"numeric",value:h,onChange:L=>m(L.target.value.replace(/[^0-9]/g,"").slice(0,2)),onKeyDown:w,onBlur:y,"aria-label":"Run count",className:le("w-10 text-center text-xs font-semibold tabular-nums bg-transparent","focus:outline-none text-[hsl(var(--foreground))]")}):a.jsxs("button",{type:"button",role:"spinbutton","aria-valuenow":s,"aria-valuemin":Gd,"aria-valuemax":Yd,"aria-valuetext":`${s} run${s!==1?"s":""}`,onClick:j,onKeyDown:k,disabled:u,title:"Click or press Enter to type a value — Arrow keys step","aria-label":`Run count: ${s}. Press Enter to edit, arrow keys to step.`,className:le("flex items-center justify-center min-w-[2.5rem] px-1 text-xs tabular-nums cursor-text","transition-colors hover:bg-[hsl(var(--muted))]","focus:outline-none focus-visible:bg-[hsl(var(--muted))]","disabled:opacity-60 disabled:cursor-not-allowed",s>1?"text-[hsl(var(--foreground))] font-semibold":"text-[hsl(var(--muted-foreground))]"),children:[a.jsx("span",{className:"opacity-50 mr-0.5",children:"×"}),s]}),a.jsx("button",{type:"button",onClick:L=>g(1,L.shiftKey),disabled:u||_,title:"Increase runs — Shift+click: +5","aria-label":"Increase run count",className:le("flex items-center px-1.5 transition-colors cursor-pointer","text-[hsl(var(--muted-foreground))]","hover:bg-[hsl(var(--muted))] hover:text-[hsl(var(--foreground))]","focus:outline-none focus-visible:bg-[hsl(var(--muted))]","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-[hsl(var(--muted-foreground))]"),children:a.jsx(Og,{size:12,strokeWidth:2.5})})]})}function LN(){var rn,as,Ni,Si,dr;const s=mi(),[r,u]=b.useState("run"),[c,d]=b.useState(""),[h,m]=b.useState(!1),[p,x]=b.useState(null),[g,j]=b.useState(null),[y,C]=b.useState(null),[w,k]=b.useState(1),[U,_]=b.useState(-1),[L,J]=b.useState(new Set),[O,A]=b.useState(null),[V,q]=b.useState(0),[T,B]=b.useState(null),[Z,F]=b.useState("all"),[Q,z]=b.useState(""),[ne,oe]=b.useState(""),[de,D]=b.useState("index"),[P,se]=b.useState("asc"),[xe,Ee]=b.useState("mean"),[E,H]=b.useState("asc"),[ee,re]=b.useState(""),[ce,ve]=b.useState(!1),[ie,Se]=b.useState(null),[Oe,mt]=b.useState(null),[Xt,il]=b.useState(null),[Pe,gt]=b.useState(null),[tt,Ct]=b.useState(null),[qe,jl]=b.useState(null),[tn,Dl]=b.useState(null),{data:At=[]}=vl({queryKey:["evals"],queryFn:Xj}),{data:vt=[]}=vl({queryKey:["evalHistory"],queryFn:Kj}),{data:ln,isLoading:Kt,isError:eo}=vl({queryKey:["health"],queryFn:wj,staleTime:1/0}),ar=!!(ln!=null&&ln.readOnly),ba=(!Kt||eo)&&!ar,vi=b.useRef(null),[sr,yi]=b.useState(!1),[Ia,Nl]=b.useState(null);b.useEffect(()=>{if(!Ia)return;const W=setTimeout(()=>Nl(null),6e3);return()=>clearTimeout(W)},[Ia]);const Vt=b.useCallback(async W=>{j(null),Nl(null),yi(!0);try{const ae=await W.text();let ue;try{ue=JSON.parse(ae)}catch{throw new Error(`${W.name} is not valid JSON`)}const{id:je}=await Jj(ue);await s.invalidateQueries({queryKey:["evalHistory"]}),Pe?tt?Nl(`Imported ${W.name} — added to history (both compare slots full)`):(Ct({id:je}),Nl(`Imported ${W.name} — selected as candidate`)):(gt({id:je}),Nl(`Imported ${W.name} — selected as baseline`))}catch(ae){j(ae instanceof Error?ae.message:String(ae))}finally{yi(!1)}},[s,Pe,tt]);b.useEffect(()=>{var he;if(Pe||tt||vt.length<2)return;const W=vt[0].eval,ae=vt.filter(Te=>Te.eval===W);if(ae.length<2)return;const ue=new Set,je=[];for(const Te of ae){const ge=(he=Te.data.metadata)==null?void 0:he.runGroupId,Qe=ge??Te.id;if(!ue.has(Qe)){if(ue.add(Qe),ge){const Ze=ae.filter(Ue=>{var Ge;return((Ge=Ue.data.metadata)==null?void 0:Ge.runGroupId)===ge}).map(Ue=>Ue.id);Ze.length>1?je.push({id:Ze[0],groupIds:Ze}):je.push({id:Ze[0]})}else je.push({id:Te.id});if(je.length>=2)break}}je.length>=2&&(Ct(je[0]),gt(je[1]))},[vt,Pe,tt]);const Dt=At.find(W=>W.name===c),Zt=b.useMemo(()=>new Set(At.map(W=>W.name)),[At]),lt=p==null?void 0:p._multiRun,rr=lt!=null&&U===-1,De=lt&&U>=0?lt.allRuns[U]:p;b.useEffect(()=>{C(null)},[U]);const Pa=b.useCallback(async()=>{if(c){m(!0),j(null),x(null),C(null),_(-1);try{const W=await Vj(c,w>1?{runs:w}:void 0);x(W),s.invalidateQueries({queryKey:["evalHistory"]})}catch(W){j(W instanceof Error?W.message:String(W))}finally{m(!1)}}},[c,w,s]),es=b.useCallback(async()=>{if(!(!Pe||!tt)){ve(!0),Se(null);try{const W=ge=>ge.groupIds&&ge.groupIds.length>1?ge.groupIds:ge.id,ae=W(Pe),ue=W(tt),je=ge=>{var Qt;const Qe=vt.find(kt=>kt.id===ge.id);if(!Qe)return null;const Ze=Qe.data;if(!ge.groupIds||ge.groupIds.length<=1)return Ze;const Ue=ge.groupIds.map(kt=>{var Sl;return(Sl=vt.find($t=>$t.id===kt))==null?void 0:Sl.data}).filter(kt=>kt!=null),Ge=Math.min(...Ue.map(kt=>kt.items.length)),un=Object.keys(((Qt=Ze.summary)==null?void 0:Qt.scorers)??{}),It=Array.from({length:Ge},(kt,Sl)=>{const $t={},wt={};for(const Tt of un){const on=Ue.map(cn=>{var Na;return(Na=cn.items[Sl])==null?void 0:Na.scores[Tt]}).filter(cn=>cn!=null),Ei=on.length>0?Math.round(on.reduce((cn,Na)=>cn+Na,0)/on.length*1e3)/1e3:null;$t[Tt]=Ei,wt[Tt]={score:Ei}}return{...Ze.items[Sl],scores:$t,scoreDetails:wt}});return{...Ze,items:It}};mt(je(Pe)),il(je(tt));const he=ge=>!ge.groupIds||ge.groupIds.length<=1?null:ge.groupIds.map(Qe=>{var Ze;return(Ze=vt.find(Ue=>Ue.id===Qe))==null?void 0:Ze.data}).filter(Qe=>Qe!=null);jl(he(Pe)),Dl(he(tt));const Te=await $j(ae,ue);Se(Te)}catch(W){j(W instanceof Error?W.message:String(W))}finally{ve(!1)}}},[vt,Pe,tt]),ts=b.useCallback(async(W,ae)=>{j(null);try{const ue=await Zj(W,ae);x(ue),C(null),_(-1),u("run"),s.invalidateQueries({queryKey:["evalHistory"]})}catch(ue){j(ue instanceof Error?ue.message:String(ue))}},[s]),nn=b.useCallback(async W=>{var je;j(null);const ae=W.id.slice(0,8);if(window.confirm(`Delete this eval history entry?
|
|
252
|
-
|
|
253
|
-
${W.eval} (${ae})
|
|
254
|
-
|
|
255
|
-
This cannot be undone.`))try{await Fj(W.id);const he=Te=>{var ge;return Te?Te.id===W.id?!0:!!((ge=Te.groupIds)!=null&&ge.includes(W.id)):!1};if(he(Pe)&>(null),he(tt)&&Ct(null),p){const Te=p.id===W.id,ge=!!((je=p._multiRun)!=null&&je.allRuns.some(Qe=>Qe.id===W.id));(Te||ge)&&(x(null),C(null),_(-1),A(null))}s.invalidateQueries({queryKey:["evalHistory"]})}catch(he){j(he instanceof Error?he.message:String(he))}},[s,Pe,tt,p]),ls=b.useCallback(W=>{J(ae=>{const ue=new Set(ae);return ue.has(W)?ue.delete(W):ue.add(W),ue})},[]),Yl=(rn=p==null?void 0:p.metadata)==null?void 0:rn.scorerTypes,ns=(as=De==null?void 0:De.summary)!=null&&as.scorers?Object.keys(De.summary.scorers):[],an=(Ni=De==null?void 0:De.summary)!=null&&Ni.scorers?Object.entries(De.summary.scorers):[],ja=an.length>0?an.reduce((W,[,ae])=>W+ae.mean,0)/an.length:0,ul=lt?Object.entries(lt.aggregate.scorers):[],ir=ul.length>0?ul.reduce((W,[,ae])=>W+ae.mean,0)/ul.length:0,bi=b.useMemo(()=>{if(!lt)return 0;const W=lt.allRuns,ae=Object.keys(lt.aggregate.scorers);if(ae.length===0||W.length<=1)return 0;const ue=W.map(he=>{const Te=ae.map(ge=>{var Qe,Ze,Ue;return(Ue=(Ze=(Qe=he.summary)==null?void 0:Qe.scorers)==null?void 0:Ze[ge])==null?void 0:Ue.mean}).filter(ge=>ge!=null);return Te.length>0?Te.reduce((ge,Qe)=>ge+Qe,0)/Te.length:0}),je=ue.reduce((he,Te)=>he+Te,0)/ue.length;return Math.sqrt(ue.reduce((he,Te)=>he+(Te-je)**2,0)/(ue.length-1))},[lt]),ur=lt?lt.allRuns.reduce((W,ae)=>W+ae.duration,0):0,or=lt?lt.allRuns.reduce((W,ae)=>W+ae.totalCost,0):0,cr=b.useMemo(()=>{if(!lt)return[];const W=Object.entries(lt.aggregate.scorers);return W.sort((ae,ue)=>{let je,he;switch(xe){case"scorer":return E==="asc"?ae[0].localeCompare(ue[0]):ue[0].localeCompare(ae[0]);case"mean":je=ae[1].mean,he=ue[1].mean;break;case"std":je=ae[1].std,he=ue[1].std;break;case"min":je=ae[1].min,he=ue[1].min;break;case"max":default:je=ae[1].max,he=ue[1].max;break}return E==="desc"?he-je:je-he}),W},[lt,xe,E]),sn=W=>{xe===W?H(ae=>ae==="desc"?"asc":"desc"):(Ee(W),H("asc"))},Hn=W=>xe===W?E==="desc"?" ▼":" ▲":"",ji=(W,ae)=>{if(ae===0)return"text-[hsl(var(--muted-foreground))]";const ue=W/ae;return ue<.02?"text-[hsl(var(--muted-foreground))]":ue<=.05?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"},Xl=5,yt=b.useMemo(()=>{var je;if(!rr||!p)return[];const W=p.items,ae=Object.keys(((je=p.summary)==null?void 0:je.scorers)??{});if(ae.length===0||W.length===0)return[];const ue=W.map((he,Te)=>{const ge=ae.map(Ze=>he.scores[Ze]).filter(Ze=>Ze!=null),Qe=ge.length>0?ge.reduce((Ze,Ue)=>Ze+Ue,0)/ge.length:1;return{item:he,index:Te,avgScore:Qe,scores:he.scores}});return ue.sort((he,Te)=>he.avgScore-Te.avgScore),ue.slice(0,Xl)},[rr,p]),Bt=["run","history","compare"];return a.jsxs("div",{className:"flex flex-col h-screen",children:[a.jsx(Iu,{title:"Eval Runner",description:Dt?a.jsxs(a.Fragment,{children:[a.jsx("span",{children:Dt.workflow}),a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsx("span",{children:Dt.dataset}),a.jsx("span",{className:"opacity-40 mx-1.5",children:"·"}),a.jsxs("span",{children:[Dt.scorers.length," scorer",Dt.scorers.length!==1?"s":""]})]}):At.length>0?`${At.length} registered eval${At.length!==1?"s":""} · select one to run`:"No evals registered",actions:a.jsxs(a.Fragment,{children:[ba&&a.jsxs(a.Fragment,{children:[a.jsx("input",{ref:vi,type:"file",accept:"application/json,.json",className:"hidden",onChange:W=>{var ue;const ae=(ue=W.target.files)==null?void 0:ue[0];ae&&Vt(ae),W.target.value=""}}),a.jsxs("button",{type:"button",onClick:()=>{var W;return(W=vi.current)==null?void 0:W.click()},disabled:sr,className:le("inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-full cursor-pointer","ring-1 ring-[hsl(var(--input))] bg-[hsl(var(--background))] shadow-sm","hover:bg-[hsl(var(--muted))] hover:ring-[hsl(var(--ring))]","focus:outline-none focus-visible:ring-[hsl(var(--ring))] transition-all","disabled:opacity-40 disabled:cursor-not-allowed"),title:"Import an eval result JSON file (e.g. from `axl-eval --output`). Imported entries persist as long as the runtime's state store does.",children:[a.jsx(hj,{size:12}),sr?"Importing…":"Import result"]})]}),At.length>0&&ba&&a.jsx(UN,{evals:At,selectedEval:c,onSelectEval:d,runCount:w,onRunCountChange:k,running:h,onRun:Pa})]})}),a.jsx("div",{role:"tablist","aria-label":"Eval views",className:"shrink-0 flex items-center gap-1 px-6 border-b border-[hsl(var(--border))]",children:Bt.map(W=>a.jsx("button",{type:"button",role:"tab","aria-selected":r===W,onClick:()=>u(W),className:le("px-3 py-2.5 text-sm -mb-px border-b-2 transition-colors cursor-pointer",r===W?"border-[hsl(var(--foreground))] text-[hsl(var(--foreground))] font-medium":"border-transparent text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]"),children:W.charAt(0).toUpperCase()+W.slice(1)},W))}),g&&a.jsx("div",{className:"shrink-0 px-6 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950/30",children:a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsx("div",{className:"text-sm text-red-700 dark:text-red-300 whitespace-pre-wrap break-words",children:g}),a.jsx("button",{onClick:()=>j(null),className:"shrink-0 text-xs text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-200 cursor-pointer","aria-label":"Dismiss error",children:"Dismiss"})]})}),Ia&&a.jsx("div",{className:"shrink-0 px-6 py-2 border-b border-emerald-200 dark:border-emerald-900 bg-emerald-50 dark:bg-emerald-950/30",children:a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsx("div",{className:"text-xs text-emerald-700 dark:text-emerald-300 whitespace-pre-wrap break-words",children:Ia}),a.jsx("button",{onClick:()=>Nl(null),className:"shrink-0 text-xs text-emerald-600 dark:text-emerald-400 hover:text-emerald-900 dark:hover:text-emerald-200 cursor-pointer","aria-label":"Dismiss import status",children:"Dismiss"})]})}),r==="run"&&a.jsx("div",{className:"flex-1 min-h-0 flex flex-col",children:At.length===0?a.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:a.jsx(gl,{icon:a.jsx(qs,{size:32}),title:"No evals registered",description:"Define evals with defineEval() and load them via the evals middleware option or runtime.registerEval()."})}):p?a.jsxs(a.Fragment,{children:[T==="history"&&a.jsx("div",{className:"shrink-0 px-6 pt-4",children:a.jsxs("button",{onClick:()=>{u("history"),B(null)},className:"inline-flex items-center gap-1.5 text-xs text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors cursor-pointer",children:[a.jsx(C1,{size:14}),"Back to History"]})}),lt&&a.jsx("div",{className:"shrink-0 pt-4",children:a.jsx(kN,{currentIndex:U,totalRuns:lt.allRuns.length,aggregate:lt.aggregate,onIndexChange:_})}),rr?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"shrink-0 px-6 py-4",children:[a.jsxs("div",{className:"flex items-start justify-between mb-3",children:[a.jsxs("div",{className:"flex-1 flex flex-wrap items-center gap-x-4 gap-y-1.5",children:[(()=>{const W=p?Bs(p):[];if(W.length===0)return null;const ae=p?qd(p):null;return a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:W.length>1?"Workflows":"Workflow"}),W.map(ue=>a.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] text-[10px] font-mono font-medium",title:ae?`${ue} — ${ae[ue]} calls`:ue,children:[ue,ae&&ae[ue]!=null&&a.jsxs("span",{className:"ml-1 text-[hsl(var(--muted-foreground))] font-normal",children:["(",ae[ue],")"]})]},ue))]})})(),(()=>{const W=p?Un(p):[];if(W.length===0)return null;const ae=p?va(p):null;return a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:W.length>1?"Models":"Model"}),W.map(ue=>a.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] text-[10px] font-mono font-medium",title:ae?`${ue} — ${ae[ue]} calls`:ue,children:[yl(ue),ae&&ae[ue]!=null&&a.jsxs("span",{className:"ml-1 text-[hsl(var(--muted-foreground))] font-normal",children:["(",ae[ue],")"]})]},ue))]})})()]}),a.jsx("button",{onClick:()=>{var ae;const W=(ae=p==null?void 0:p.metadata)==null?void 0:ae.runGroupId;if(W){const ue=vt.filter(je=>{var he;return((he=je.data.metadata)==null?void 0:he.runGroupId)===W}).map(je=>je.id);ue.length>0&&Ct({id:ue[0],groupIds:ue})}else if(p){const ue=vt.find(je=>je.id===p.id);ue&&Ct({id:ue.id})}u("compare")},className:"px-3 py-1.5 text-xs font-medium rounded-lg border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",children:"Compare with previous..."})]}),a.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3",children:[a.jsx(ft,{label:"Runs",value:String(lt.aggregate.runCount),subtitle:"individual runs"}),a.jsx(ft,{label:"Mean Score",value:ul.length>0?ir.toFixed(3):"—",accent:ul.length>0?Et(ir):void 0,tint:ul.length>0?Cx(ir):void 0,subtitle:ul.length>0?`± ${bi.toFixed(3)} across runs`:"across all scorers"}),a.jsx(ft,{label:"Total Duration",value:ur>0?ht(ur):"—",subtitle:"all runs combined"}),a.jsx(ft,{label:"Total Cost",value:or>0?ut(or):"—",subtitle:"all runs combined"}),(()=>{const W=lt.allRuns,ae={input:0,output:0,reasoning:0};for(const je of W){const he=Bd(je);ae.input+=he.input,ae.output+=he.output,ae.reasoning+=he.reasoning}const ue=ae.input+ae.output+ae.reasoning;return ue>0?a.jsx(ft,{label:"Total Tokens",value:Ql(ue),subtitle:`${Ql(ae.input)} in / ${Ql(ae.output)} out`}):null})()]})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto px-6 pb-6 space-y-6",children:[a.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[a.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))]",children:a.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Per-Scorer Aggregate"})}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-[hsl(var(--border))]",children:[a.jsxs("th",{className:"text-left px-4 py-2 font-medium w-48 cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>sn("scorer"),children:["Scorer",Hn("scorer")]}),a.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>sn("mean"),children:["Mean",Hn("mean")]}),a.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>sn("std"),children:["Std",Hn("std")]}),a.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>sn("min"),children:["Min",Hn("min")]}),a.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>sn("max"),children:["Max",Hn("max")]})]})}),a.jsx("tbody",{children:cr.map(([W,ae])=>a.jsxs("tr",{className:"border-b border-[hsl(var(--border))] last:border-b-0",children:[a.jsxs("td",{className:"px-4 py-2.5 font-mono",children:[W,(Yl==null?void 0:Yl[W])==="llm"&&a.jsx("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-medium rounded bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400 align-middle",title:"LLM scorer — scores may vary between runs",children:"LLM"})]}),a.jsx("td",{className:le("px-3 py-2.5 text-right font-mono font-medium",Et(ae.mean)),children:ae.mean.toFixed(3)}),a.jsx("td",{className:le("px-3 py-2.5 text-right font-mono",ji(ae.std,ae.mean)),children:ae.std.toFixed(3)}),a.jsx("td",{className:le("px-3 py-2.5 text-right font-mono",Et(ae.min)),children:ae.min.toFixed(3)}),a.jsx("td",{className:le("px-3 py-2.5 text-right font-mono",Et(ae.max)),children:ae.max.toFixed(3)})]},W))})]})})]}),yt.length>0&&a.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[a.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))]",children:a.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Lowest Scoring Items"})}),a.jsx("div",{className:"divide-y divide-[hsl(var(--border))]",children:yt.map(({item:W,index:ae,avgScore:ue,scores:je})=>{var Ze;const he=O===ae,Te=lt==null?void 0:lt.allRuns,ge=(Te==null?void 0:Te.length)??0,Qe=he&&Te?(Ze=Te[V])==null?void 0:Ze.items[ae]:null;return a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>{A(he?null:ae),q(0)},className:le("w-full text-left px-4 py-3 flex items-center gap-3 hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",he&&"bg-[hsl(var(--accent))]"),children:[a.jsxs("span",{className:"shrink-0 text-[10px] font-mono text-[hsl(var(--muted-foreground))] w-6 text-right",children:["#",ae+1]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("div",{className:"text-xs truncate",children:gi(W.input,60)}),a.jsx("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:Object.entries(je).map(([Ue,Ge])=>Ge!=null?a.jsxs("span",{className:le("inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-mono",$u(Ge)),title:Ue,children:[Ue,": ",Ge.toFixed(2)]},Ue):null)})]}),a.jsx("span",{className:le("shrink-0 text-xs font-mono font-medium",Et(ue)),children:ue.toFixed(3)})]}),he&&a.jsxs("div",{className:"border-t border-[hsl(var(--border))] bg-[hsl(var(--card))] text-xs",children:[ge>1&&a.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-[hsl(var(--border))] bg-[hsl(var(--muted))]",children:[a.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Run"}),a.jsx("div",{className:"flex items-center gap-0.5",children:Array.from({length:ge},(Ue,Ge)=>a.jsx("button",{onClick:()=>q(Ge),className:le("px-2 py-0.5 rounded text-[10px] font-mono transition-colors cursor-pointer",Ge===V?"bg-[hsl(var(--foreground))] text-[hsl(var(--background))]":"text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]"),children:Ge+1},Ge))})]}),a.jsxs("div",{className:"p-4 space-y-3",children:[Qe&&a.jsx("div",{className:"flex items-center gap-1.5 flex-wrap",children:Object.entries(Qe.scores).map(([Ue,Ge])=>Ge!=null?a.jsxs("span",{className:le("inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-mono",$u(Ge)),children:[Ue,": ",Ge.toFixed(3)]},Ue):null)}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-[hsl(var(--muted-foreground))] text-[10px] uppercase tracking-wider block mb-1",children:"Output"}),a.jsx(_t,{data:(Qe==null?void 0:Qe.output)??W.output,collapsed:!0})]}),(Qe==null?void 0:Qe.scoreDetails)&&Object.entries(Qe.scoreDetails).map(([Ue,Ge])=>{var It;const un=typeof((It=Ge==null?void 0:Ge.metadata)==null?void 0:It.reasoning)=="string"?Ge.metadata.reasoning:null;return un?a.jsxs("div",{children:[a.jsxs("span",{className:"font-medium text-[hsl(var(--muted-foreground))] text-[10px] uppercase tracking-wider block mb-1",children:[Ue," reasoning"]}),a.jsx("pre",{className:"text-xs font-mono p-2 rounded-md bg-[hsl(var(--secondary))] overflow-auto max-h-32 whitespace-pre-wrap leading-relaxed",children:un})]},Ue):null})]})]})]},ae)})})]})]})]}):De?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"shrink-0 px-6 py-4",children:[(()=>{const W=Bs(De),ae=qd(De),ue=Un(De),je=va(De);return W.length===0&&ue.length===0?null:a.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 mb-3",children:[W.length>0&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:W.length>1?"Workflows":"Workflow"}),W.map(he=>a.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] text-[10px] font-mono font-medium",title:ae?`${he} — ${ae[he]} calls`:he,children:[he,ae&&ae[he]!=null&&a.jsxs("span",{className:"ml-1 text-[hsl(var(--muted-foreground))] font-normal",children:["(",ae[he],")"]})]},he))]}),ue.length>0&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:ue.length>1?"Models":"Model"}),ue.map(he=>a.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] text-[10px] font-mono font-medium",title:je?`${he} — ${je[he]} calls`:he,children:[yl(he),je&&je[he]!=null&&a.jsxs("span",{className:"ml-1 text-[hsl(var(--muted-foreground))] font-normal",children:["(",je[he],")"]})]},he))]})]})})(),a.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3",children:[a.jsx(ft,{label:"Items",value:String(De.summary.count),subtitle:De.summary.failures>0?`${De.summary.failures} failed`:"all passed",subtitleColor:De.summary.failures>0?"text-red-600 dark:text-red-400":"text-emerald-600 dark:text-emerald-400"}),a.jsx(ft,{label:"Mean Score",value:an.length>0?ja.toFixed(3):"—",accent:an.length>0?Et(ja):void 0,tint:an.length>0?Cx(ja):void 0,subtitle:"across all scorers"}),a.jsx(ft,{label:"Duration",value:De.summary.timing?ht(De.summary.timing.mean):ht(De.duration),subtitle:De.summary.timing?`p95 ${ht(De.summary.timing.p95)}`:"total"}),a.jsx(ft,{label:"Cost",value:De.totalCost>0?ut(De.totalCost):"—",subtitle:"total"}),(()=>{const W=Bd(De),ae=W.input+W.output+W.reasoning;return ae>0?a.jsx(ft,{label:"Tokens",value:Ql(ae),subtitle:`${Ql(W.input)} in / ${Ql(W.output)} out`}):null})()]})]}),a.jsxs("div",{className:"flex flex-1 min-h-0 border-t border-[hsl(var(--border))]",children:[a.jsx("div",{className:"w-[340px] xl:w-[380px] shrink-0 border-r border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:a.jsx(jN,{items:De.items,scorerNames:ns,selectedIndex:y,onSelectItem:C,onDeselectItem:()=>C(null)})}),a.jsx("div",{className:"flex-1 overflow-y-auto",children:y!=null?a.jsx("div",{className:"p-6",children:a.jsx(yN,{item:De.items[y],itemIndex:y,scorerNames:ns,onBack:()=>C(null)})}):a.jsxs("div",{className:"p-6 space-y-6",children:[a.jsx(xN,{summary:De.summary,items:De.items,totalCost:De.totalCost,scorerTypes:Yl}),a.jsx(SN,{items:De.items,scorerNames:ns}),De.items.length>0&&a.jsx(gN,{items:De.items,scorerNames:ns,onSelectItem:C,errorFilter:Z,onErrorFilterChange:F,scorerFilter:Q,onScorerFilterChange:z,threshold:ne,onThresholdChange:oe,sortField:de,onSortFieldChange:D,sortDir:P,onSortDirChange:se})]})})]})]}):null]}):h?a.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4",children:[a.jsxs("div",{className:"relative",children:[a.jsx(qs,{size:28,className:"text-[hsl(var(--muted-foreground))]"}),a.jsx("div",{className:"absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full bg-emerald-500 animate-ping"}),a.jsx("div",{className:"absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full bg-emerald-500"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("p",{className:"text-sm font-medium",children:"Running evaluation…"}),a.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))] mt-1",children:Dt?`${Dt.dataset} · ${Dt.scorers.length} scorers`:c})]})]}):a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx(gl,{icon:a.jsx(qs,{size:32}),title:"No results",description:"Select an eval and run it to see results."})})}),r==="history"&&a.jsx("div",{className:"flex-1 overflow-auto p-6",children:vt.length===0?a.jsx(gl,{title:"No eval history",description:"Run evaluations to build history."}):a.jsx(_N,{history:vt,evalFilter:ee,onEvalFilterChange:re,onSelect:W=>{x(W),C(null),_(-1),B("history"),u("run")},onSelectGroup:W=>{var Ue,Ge,un;const ae=W.map(It=>It.data),ue=ae[0],je=Object.keys(((Ue=ue.summary)==null?void 0:Ue.scorers)??{}),he={};for(const It of je){const Qt=ae.map($t=>{var wt,Tt,on;return((on=(Tt=(wt=$t.summary)==null?void 0:wt.scorers)==null?void 0:Tt[It])==null?void 0:on.mean)??0}),kt=Qt.reduce(($t,wt)=>$t+wt,0)/Qt.length,Sl=Qt.length>1?Math.sqrt(Qt.reduce(($t,wt)=>$t+(wt-kt)**2,0)/(Qt.length-1)):0;he[It]={mean:Math.round(kt*1e3)/1e3,std:Math.round(Sl*1e3)/1e3,min:Math.round(Math.min(...Qt)*1e3)/1e3,max:Math.round(Math.max(...Qt)*1e3)/1e3}}const Te=new Set,ge=[];for(const It of ae){const Qt=(Ge=It.metadata)==null?void 0:Ge.workflows;if(Array.isArray(Qt))for(const kt of Qt)typeof kt=="string"&&!Te.has(kt)&&(Te.add(kt),ge.push(kt))}const Qe={runGroupId:((un=ue.metadata)==null?void 0:un.runGroupId)??"",runCount:ae.length,workflows:ge.length>0?ge:void 0,scorers:he},Ze={...ue,_multiRun:{aggregate:Qe,allRuns:ae}};x(Ze),C(null),_(-1),B("history"),u("run")},onRescore:ts,onDelete:nn,registeredEvalNames:Zt,readOnly:ar,expandedGroups:L,onToggleGroup:ls})}),r==="compare"&&a.jsx("div",{className:"flex-1 overflow-auto p-6",children:a.jsx("div",{className:"space-y-4",children:vt.length<2?a.jsx(gl,{title:"Need at least 2 eval runs",description:"Run evaluations to compare results."}):a.jsxs(a.Fragment,{children:[a.jsx(AN,{history:vt,baselineSelection:Pe,candidateSelection:tt,onBaselineChange:gt,onCandidateChange:Ct,onCompare:es,comparing:ce}),ie&&a.jsx(wN,{compareResult:ie,baseline:Oe,candidate:Xt,isGroupComparison:(((Si=Pe==null?void 0:Pe.groupIds)==null?void 0:Si.length)??0)>1||(((dr=tt==null?void 0:tt.groupIds)==null?void 0:dr.length)??0)>1,baselineRuns:qe,candidateRuns:tn})]})})})]})}function qN(){return a.jsx(o1,{basename:window.__AXL_STUDIO_BASE__||"/",children:a.jsxs("div",{className:"flex h-screen overflow-hidden",children:[a.jsx(vj,{}),a.jsx("div",{className:"flex-1 overflow-hidden",children:a.jsxs(qb,{children:[a.jsx(Jl,{path:"/playground",element:a.jsx(eN,{})}),a.jsx(Jl,{path:"/workflows",element:a.jsx(lN,{})}),a.jsx(Jl,{path:"/traces",element:a.jsx(rN,{})}),a.jsx(Jl,{path:"/costs",element:a.jsx(uN,{})}),a.jsx(Jl,{path:"/memory",element:a.jsx(oN,{})}),a.jsx(Jl,{path:"/sessions",element:a.jsx(fN,{})}),a.jsx(Jl,{path:"/tools",element:a.jsx(hN,{})}),a.jsx(Jl,{path:"/evals",element:a.jsx(LN,{})}),a.jsx(Jl,{path:"*",element:a.jsx(Hb,{to:"/playground",replace:!0})})]})})]})})}ay.createRoot(document.getElementById("root")).render(a.jsx(b.StrictMode,{children:a.jsx(Oy,{client:Qy,children:a.jsx(qN,{})})}));
|