agentv 4.11.2 → 4.12.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/dist/{chunk-MIP46NEN.js → chunk-4MEGL2E3.js} +5 -5
- package/dist/{chunk-MIP46NEN.js.map → chunk-4MEGL2E3.js.map} +1 -1
- package/dist/{chunk-FQGY6QXQ.js → chunk-CXAO4VPP.js} +43 -43
- package/dist/chunk-CXAO4VPP.js.map +1 -0
- package/dist/{chunk-7TJ2PON3.js → chunk-VVWPD4CN.js} +104 -89
- package/dist/chunk-VVWPD4CN.js.map +1 -0
- package/dist/cli.js +3 -3
- package/dist/{dist-HNSXNRVK.js → dist-D6EJ3O7Q.js} +20 -20
- package/dist/index.js +3 -3
- package/dist/{interactive-LRW3X5OF.js → interactive-SP2LWOQX.js} +3 -3
- package/dist/studio/assets/index-BdR2qr8G.js +65 -0
- package/dist/studio/assets/{index-VyDFrnoK.js → index-CkXzhDmw.js} +1 -1
- package/dist/studio/assets/index-XVVBVabi.css +1 -0
- package/dist/studio/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunk-7TJ2PON3.js.map +0 -1
- package/dist/chunk-FQGY6QXQ.js.map +0 -1
- package/dist/studio/assets/index-Bi-KHfNm.js +0 -65
- package/dist/studio/assets/index-D_j-w4UO.css +0 -1
- /package/dist/{dist-HNSXNRVK.js.map → dist-D6EJ3O7Q.js.map} +0 -0
- /package/dist/{interactive-LRW3X5OF.js.map → interactive-SP2LWOQX.js.map} +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var I0=n=>{throw TypeError(n)};var Po=(n,l,i)=>l.has(n)||I0("Cannot "+i);var _=(n,l,i)=>(Po(n,l,"read from private field"),i?i.call(n):l.get(n)),ce=(n,l,i)=>l.has(n)?I0("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(n):l.set(n,i),ne=(n,l,i,r)=>(Po(n,l,"write to private field"),r?r.call(n,i):l.set(n,i),i),ve=(n,l,i)=>(Po(n,l,"access private method"),i);var du=(n,l,i,r)=>({set _(o){ne(n,l,o,i)},get _(){return _(n,l,r)}});(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function i(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(o){if(o.ep)return;o.ep=!0;const d=i(o);fetch(o.href,d)}})();function Qx(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Fo={exports:{}},ji={};/**
|
|
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 W0;function Yx(){if(W0)return ji;W0=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var g in o)g!=="key"&&(d[g]=o[g])}else d=o;return o=d.ref,{$$typeof:n,type:r,key:h,ref:o!==void 0?o:null,props:d}}return ji.Fragment=l,ji.jsx=i,ji.jsxs=i,ji}var ey;function Gx(){return ey||(ey=1,Fo.exports=Yx()),Fo.exports}var f=Gx(),Jo={exports:{}},ye={};/**
|
|
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 ty;function Kx(){if(ty)return ye;ty=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.iterator;function j(T){return T===null||typeof T!="object"?null:(T=S&&T[S]||T["@@iterator"],typeof T=="function"?T:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function w(T,Y,q){this.props=T,this.context=Y,this.refs=C,this.updater=q||N}w.prototype.isReactComponent={},w.prototype.setState=function(T,Y){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,Y,"setState")},w.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function $(){}$.prototype=w.prototype;function X(T,Y,q){this.props=T,this.context=Y,this.refs=C,this.updater=q||N}var L=X.prototype=new $;L.constructor=X,E(L,w.prototype),L.isPureReactComponent=!0;var Z=Array.isArray;function ee(){}var P={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function J(T,Y,q){var W=q.ref;return{$$typeof:n,type:T,key:Y,ref:W!==void 0?W:null,props:q}}function K(T,Y){return J(T.type,Y,T.props)}function I(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function se(T){var Y={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(q){return Y[q]})}var le=/\/+/g;function ue(T,Y){return typeof T=="object"&&T!==null&&T.key!=null?se(""+T.key):Y.toString(36)}function te(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(ee,ee):(T.status="pending",T.then(function(Y){T.status==="pending"&&(T.status="fulfilled",T.value=Y)},function(Y){T.status==="pending"&&(T.status="rejected",T.reason=Y)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function D(T,Y,q,W,me){var xe=typeof T;(xe==="undefined"||xe==="boolean")&&(T=null);var be=!1;if(T===null)be=!0;else switch(xe){case"bigint":case"string":case"number":be=!0;break;case"object":switch(T.$$typeof){case n:case l:be=!0;break;case x:return be=T._init,D(be(T._payload),Y,q,W,me)}}if(be)return me=me(T),be=W===""?"."+ue(T,0):W,Z(me)?(q="",be!=null&&(q=be.replace(le,"$&/")+"/"),D(me,Y,q,"",function(ra){return ra})):me!=null&&(I(me)&&(me=K(me,q+(me.key==null||T&&T.key===me.key?"":(""+me.key).replace(le,"$&/")+"/")+be)),Y.push(me)),1;be=0;var Pe=W===""?".":W+":";if(Z(T))for(var He=0;He<T.length;He++)W=T[He],xe=Pe+ue(W,He),be+=D(W,Y,q,xe,me);else if(He=j(T),typeof He=="function")for(T=He.call(T),He=0;!(W=T.next()).done;)W=W.value,xe=Pe+ue(W,He++),be+=D(W,Y,q,xe,me);else if(xe==="object"){if(typeof T.then=="function")return D(te(T),Y,q,W,me);throw Y=String(T),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return be}function V(T,Y,q){if(T==null)return T;var W=[],me=0;return D(T,W,"","",function(xe){return Y.call(q,xe,me++)}),W}function ae(T){if(T._status===-1){var Y=T._result;Y=Y(),Y.then(function(q){(T._status===0||T._status===-1)&&(T._status=1,T._result=q)},function(q){(T._status===0||T._status===-1)&&(T._status=2,T._result=q)}),T._status===-1&&(T._status=0,T._result=Y)}if(T._status===1)return T._result.default;throw T._result}var he=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},fe={map:V,forEach:function(T,Y,q){V(T,function(){Y.apply(this,arguments)},q)},count:function(T){var Y=0;return V(T,function(){Y++}),Y},toArray:function(T){return V(T,function(Y){return Y})||[]},only:function(T){if(!I(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return ye.Activity=v,ye.Children=fe,ye.Component=w,ye.Fragment=i,ye.Profiler=o,ye.PureComponent=X,ye.StrictMode=r,ye.Suspense=p,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,ye.__COMPILER_RUNTIME={__proto__:null,c:function(T){return P.H.useMemoCache(T)}},ye.cache=function(T){return function(){return T.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(T,Y,q){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var W=E({},T.props),me=T.key;if(Y!=null)for(xe in Y.key!==void 0&&(me=""+Y.key),Y)!F.call(Y,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&Y.ref===void 0||(W[xe]=Y[xe]);var xe=arguments.length-2;if(xe===1)W.children=q;else if(1<xe){for(var be=Array(xe),Pe=0;Pe<xe;Pe++)be[Pe]=arguments[Pe+2];W.children=be}return J(T.type,me,W)},ye.createContext=function(T){return T={$$typeof:h,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:d,_context:T},T},ye.createElement=function(T,Y,q){var W,me={},xe=null;if(Y!=null)for(W in Y.key!==void 0&&(xe=""+Y.key),Y)F.call(Y,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(me[W]=Y[W]);var be=arguments.length-2;if(be===1)me.children=q;else if(1<be){for(var Pe=Array(be),He=0;He<be;He++)Pe[He]=arguments[He+2];me.children=Pe}if(T&&T.defaultProps)for(W in be=T.defaultProps,be)me[W]===void 0&&(me[W]=be[W]);return J(T,xe,me)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(T){return{$$typeof:g,render:T}},ye.isValidElement=I,ye.lazy=function(T){return{$$typeof:x,_payload:{_status:-1,_result:T},_init:ae}},ye.memo=function(T,Y){return{$$typeof:m,type:T,compare:Y===void 0?null:Y}},ye.startTransition=function(T){var Y=P.T,q={};P.T=q;try{var W=T(),me=P.S;me!==null&&me(q,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(ee,he)}catch(xe){he(xe)}finally{Y!==null&&q.types!==null&&(Y.types=q.types),P.T=Y}},ye.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},ye.use=function(T){return P.H.use(T)},ye.useActionState=function(T,Y,q){return P.H.useActionState(T,Y,q)},ye.useCallback=function(T,Y){return P.H.useCallback(T,Y)},ye.useContext=function(T){return P.H.useContext(T)},ye.useDebugValue=function(){},ye.useDeferredValue=function(T,Y){return P.H.useDeferredValue(T,Y)},ye.useEffect=function(T,Y){return P.H.useEffect(T,Y)},ye.useEffectEvent=function(T){return P.H.useEffectEvent(T)},ye.useId=function(){return P.H.useId()},ye.useImperativeHandle=function(T,Y,q){return P.H.useImperativeHandle(T,Y,q)},ye.useInsertionEffect=function(T,Y){return P.H.useInsertionEffect(T,Y)},ye.useLayoutEffect=function(T,Y){return P.H.useLayoutEffect(T,Y)},ye.useMemo=function(T,Y){return P.H.useMemo(T,Y)},ye.useOptimistic=function(T,Y){return P.H.useOptimistic(T,Y)},ye.useReducer=function(T,Y,q){return P.H.useReducer(T,Y,q)},ye.useRef=function(T){return P.H.useRef(T)},ye.useState=function(T){return P.H.useState(T)},ye.useSyncExternalStore=function(T,Y,q){return P.H.useSyncExternalStore(T,Y,q)},ye.useTransition=function(){return P.H.useTransition()},ye.version="19.2.4",ye}var ay;function Xi(){return ay||(ay=1,Jo.exports=Kx()),Jo.exports}var Q=Xi();const Oi=Qx(Q);var Io={exports:{}},Ni={},Wo={exports:{}},ef={};/**
|
|
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 ny;function Vx(){return ny||(ny=1,(function(n){function l(D,V){var ae=D.length;D.push(V);e:for(;0<ae;){var he=ae-1>>>1,fe=D[he];if(0<o(fe,V))D[he]=V,D[ae]=fe,ae=he;else break e}}function i(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var V=D[0],ae=D.pop();if(ae!==V){D[0]=ae;e:for(var he=0,fe=D.length,T=fe>>>1;he<T;){var Y=2*(he+1)-1,q=D[Y],W=Y+1,me=D[W];if(0>o(q,ae))W<fe&&0>o(me,q)?(D[he]=me,D[W]=ae,he=W):(D[he]=q,D[Y]=ae,he=Y);else if(W<fe&&0>o(me,ae))D[he]=me,D[W]=ae,he=W;else break e}}return V}function o(D,V){var ae=D.sortIndex-V.sortIndex;return ae!==0?ae:D.id-V.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,g=h.now();n.unstable_now=function(){return h.now()-g}}var p=[],m=[],x=1,v=null,S=3,j=!1,N=!1,E=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;function L(D){for(var V=i(m);V!==null;){if(V.callback===null)r(m);else if(V.startTime<=D)r(m),V.sortIndex=V.expirationTime,l(p,V);else break;V=i(m)}}function Z(D){if(E=!1,L(D),!N)if(i(p)!==null)N=!0,ee||(ee=!0,se());else{var V=i(m);V!==null&&te(Z,V.startTime-D)}}var ee=!1,P=-1,F=5,J=-1;function K(){return C?!0:!(n.unstable_now()-J<F)}function I(){if(C=!1,ee){var D=n.unstable_now();J=D;var V=!0;try{e:{N=!1,E&&(E=!1,$(P),P=-1),j=!0;var ae=S;try{t:{for(L(D),v=i(p);v!==null&&!(v.expirationTime>D&&K());){var he=v.callback;if(typeof he=="function"){v.callback=null,S=v.priorityLevel;var fe=he(v.expirationTime<=D);if(D=n.unstable_now(),typeof fe=="function"){v.callback=fe,L(D),V=!0;break t}v===i(p)&&r(p),L(D)}else r(p);v=i(p)}if(v!==null)V=!0;else{var T=i(m);T!==null&&te(Z,T.startTime-D),V=!1}}break e}finally{v=null,S=ae,j=!1}V=void 0}}finally{V?se():ee=!1}}}var se;if(typeof X=="function")se=function(){X(I)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,ue=le.port2;le.port1.onmessage=I,se=function(){ue.postMessage(null)}}else se=function(){w(I,0)};function te(D,V){P=w(function(){D(n.unstable_now())},V)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(D){D.callback=null},n.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"):F=0<D?Math.floor(1e3/D):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(D){switch(S){case 1:case 2:case 3:var V=3;break;default:V=S}var ae=S;S=V;try{return D()}finally{S=ae}},n.unstable_requestPaint=function(){C=!0},n.unstable_runWithPriority=function(D,V){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ae=S;S=D;try{return V()}finally{S=ae}},n.unstable_scheduleCallback=function(D,V,ae){var he=n.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?he+ae:he):ae=he,D){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=ae+fe,D={id:x++,callback:V,priorityLevel:D,startTime:ae,expirationTime:fe,sortIndex:-1},ae>he?(D.sortIndex=ae,l(m,D),i(p)===null&&D===i(m)&&(E?($(P),P=-1):E=!0,te(Z,ae-he))):(D.sortIndex=fe,l(p,D),N||j||(N=!0,ee||(ee=!0,se()))),D},n.unstable_shouldYield=K,n.unstable_wrapCallback=function(D){var V=S;return function(){var ae=S;S=V;try{return D.apply(this,arguments)}finally{S=ae}}}})(ef)),ef}var sy;function Xx(){return sy||(sy=1,Wo.exports=Vx()),Wo.exports}var tf={exports:{}},mt={};/**
|
|
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 ly;function Zx(){if(ly)return mt;ly=1;var n=Xi();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)m+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function d(p,m,x){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:p,containerInfo:m,implementation:x}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,mt.createPortal=function(p,m){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return d(p,m,null,x)},mt.flushSync=function(p){var m=h.T,x=r.p;try{if(h.T=null,r.p=2,p)return p()}finally{h.T=m,r.p=x,r.d.f()}},mt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},mt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},mt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var x=m.as,v=g(x,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,j=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;x==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:j}):x==="script"&&r.d.X(p,{crossOrigin:v,integrity:S,fetchPriority:j,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},mt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var x=g(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},mt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var x=m.as,v=g(x,m.crossOrigin);r.d.L(p,x,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},mt.preloadModule=function(p,m){if(typeof p=="string")if(m){var x=g(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},mt.requestFormReset=function(p){r.d.r(p)},mt.unstable_batchedUpdates=function(p,m){return p(m)},mt.useFormState=function(p,m,x){return h.H.useFormState(p,m,x)},mt.useFormStatus=function(){return h.H.useHostTransitionStatus()},mt.version="19.2.4",mt}var iy;function dg(){if(iy)return tf.exports;iy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),tf.exports=Zx(),tf.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 ry;function kx(){if(ry)return Ni;ry=1;var n=Xx(),l=Xi(),i=dg();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(r(188))}function m(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,s=t;;){var u=a.return;if(u===null)break;var c=u.alternate;if(c===null){if(s=u.return,s!==null){a=s;continue}break}if(u.child===c.child){for(c=u.child;c;){if(c===a)return p(u),e;if(c===s)return p(u),t;c=c.sibling}throw Error(r(188))}if(a.return!==s.return)a=u,s=c;else{for(var y=!1,b=u.child;b;){if(b===a){y=!0,a=u,s=c;break}if(b===s){y=!0,s=u,a=c;break}b=b.sibling}if(!y){for(b=c.child;b;){if(b===a){y=!0,a=c,s=u;break}if(b===s){y=!0,s=c,a=u;break}b=b.sibling}if(!y)throw Error(r(189))}}if(a.alternate!==s)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,S=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),X=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case w:return"Profiler";case C:return"StrictMode";case Z:return"Suspense";case ee:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case X:return e.displayName||"Context";case $:return(e._context.displayName||"Context")+".Consumer";case L:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:ue(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var te=Array.isArray,D=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},he=[],fe=-1;function T(e){return{current:e}}function Y(e){0>fe||(e.current=he[fe],he[fe]=null,fe--)}function q(e,t){fe++,he[fe]=e.current,e.current=t}var W=T(null),me=T(null),xe=T(null),be=T(null);function Pe(e,t){switch(q(xe,t),q(me,e),q(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?S0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=S0(t),e=j0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(W),q(W,e)}function He(){Y(W),Y(me),Y(xe)}function ra(e){e.memoizedState!==null&&q(be,e);var t=W.current,a=j0(t,e.type);t!==a&&(q(me,e),q(W,a))}function va(e){me.current===e&&(Y(W),Y(me)),be.current===e&&(Y(be),vi._currentValue=ae)}var Ss,Ml;function xa(e){if(Ss===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ss=t&&t[1]||"",Ml=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ss+e+Ml}var js=!1;function Ns(e,t){if(!e||js)return"";js=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var k=function(){throw Error()};if(Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(B){var U=B}Reflect.construct(e,[],k)}else{try{k.call()}catch(B){U=B}e.call(k.prototype)}}else{try{throw Error()}catch(B){U=B}(k=e())&&typeof k.catch=="function"&&k.catch(function(){})}}catch(B){if(B&&U&&typeof B.stack=="string")return[B.stack,U.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),y=c[0],b=c[1];if(y&&b){var R=y.split(`
|
|
44
|
+
`),z=b.split(`
|
|
45
|
+
`);for(u=s=0;s<R.length&&!R[s].includes("DetermineComponentFrameRoot");)s++;for(;u<z.length&&!z[u].includes("DetermineComponentFrameRoot");)u++;if(s===R.length||u===z.length)for(s=R.length-1,u=z.length-1;1<=s&&0<=u&&R[s]!==z[u];)u--;for(;1<=s&&0<=u;s--,u--)if(R[s]!==z[u]){if(s!==1||u!==1)do if(s--,u--,0>u||R[s]!==z[u]){var H=`
|
|
46
|
+
`+R[s].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=s&&0<=u);break}}}finally{js=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?xa(a):""}function ka(e,t){switch(e.tag){case 26:case 27:case 5:return xa(e.type);case 16:return xa("Lazy");case 13:return e.child!==t&&t!==null?xa("Suspense Fallback"):xa("Suspense");case 19:return xa("SuspenseList");case 0:case 15:return Ns(e.type,!1);case 11:return Ns(e.type.render,!1);case 1:return Ns(e.type,!0);case 31:return xa("Activity");default:return""}}function Rs(e){try{var t="",a=null;do t+=ka(e,a),a=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var ta=Object.prototype.hasOwnProperty,Cl=n.unstable_scheduleCallback,_s=n.unstable_cancelCallback,Lu=n.unstable_shouldYield,ki=n.unstable_requestPaint,Se=n.unstable_now,ht=n.unstable_getCurrentPriorityLevel,ua=n.unstable_ImmediatePriority,$i=n.unstable_UserBlockingPriority,Pi=n.unstable_NormalPriority,Sp=n.unstable_LowPriority,td=n.unstable_IdlePriority,jp=n.log,Np=n.unstable_setDisableYieldValue,Al=null,Ot=null;function $a(e){if(typeof jp=="function"&&Np(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(Al,e)}catch{}}var zt=Math.clz32?Math.clz32:Ep,Rp=Math.log,_p=Math.LN2;function Ep(e){return e>>>=0,e===0?32:31-(Rp(e)/_p|0)|0}var Fi=256,Ji=262144,Ii=4194304;function Bn(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 Wi(e,t,a){var s=e.pendingLanes;if(s===0)return 0;var u=0,c=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~c,s!==0?u=Bn(s):(y&=b,y!==0?u=Bn(y):a||(a=b&~e,a!==0&&(u=Bn(a))))):(b=s&~c,b!==0?u=Bn(b):y!==0?u=Bn(y):a||(a=s&~e,a!==0&&(u=Bn(a)))),u===0?0:t!==0&&t!==u&&(t&c)===0&&(c=u&-u,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:u}function wl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Tp(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 ad(){var e=Ii;return Ii<<=1,(Ii&62914560)===0&&(Ii=4194304),e}function Uu(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ol(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Mp(e,t,a,s,u,c){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var b=e.entanglements,R=e.expirationTimes,z=e.hiddenUpdates;for(a=y&~a;0<a;){var H=31-zt(a),k=1<<H;b[H]=0,R[H]=-1;var U=z[H];if(U!==null)for(z[H]=null,H=0;H<U.length;H++){var B=U[H];B!==null&&(B.lane&=-536870913)}a&=~k}s!==0&&nd(e,s,0),c!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=c&~(y&~t))}function nd(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-zt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&261930}function sd(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-zt(a),u=1<<s;u&t|e[s]&t&&(e[s]|=t),a&=~u}}function ld(e,t){var a=t&-t;return a=(a&42)!==0?1:Bu(a),(a&(e.suspendedLanes|t))!==0?0:a}function Bu(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 qu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function id(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:X0(e.type))}function rd(e,t){var a=V.p;try{return V.p=e,t()}finally{V.p=a}}var Pa=Math.random().toString(36).slice(2),rt="__reactFiber$"+Pa,jt="__reactProps$"+Pa,Es="__reactContainer$"+Pa,Hu="__reactEvents$"+Pa,Cp="__reactListeners$"+Pa,Ap="__reactHandles$"+Pa,ud="__reactResources$"+Pa,zl="__reactMarker$"+Pa;function Qu(e){delete e[rt],delete e[jt],delete e[Hu],delete e[Cp],delete e[Ap]}function Ts(e){var t=e[rt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Es]||a[rt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=C0(e);e!==null;){if(a=e[rt])return a;e=C0(e)}return t}e=a,a=e.parentNode}return null}function Ms(e){if(e=e[rt]||e[Es]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Dl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Cs(e){var t=e[ud];return t||(t=e[ud]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[zl]=!0}var cd=new Set,od={};function qn(e,t){As(e,t),As(e+"Capture",t)}function As(e,t){for(od[e]=t,e=0;e<t.length;e++)cd.add(t[e])}var wp=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]*$"),fd={},dd={};function Op(e){return ta.call(dd,e)?!0:ta.call(fd,e)?!1:wp.test(e)?dd[e]=!0:(fd[e]=!0,!1)}function er(e,t,a){if(Op(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function tr(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ba(e,t,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+s)}}function Kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zp(e,t,a){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,c=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(y){a=""+y,c.call(this,y)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yu(e){if(!e._valueTracker){var t=hd(e)?"checked":"value";e._valueTracker=zp(e,t,""+e[t])}}function md(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=hd(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function ar(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 Dp=/[\n"\\]/g;function Vt(e){return e.replace(Dp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gu(e,t,a,s,u,c,y,b){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Kt(t)):e.value!==""+Kt(t)&&(e.value=""+Kt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Ku(e,y,Kt(t)):a!=null?Ku(e,y,Kt(a)):s!=null&&e.removeAttribute("value"),u==null&&c!=null&&(e.defaultChecked=!!c),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Kt(b):e.removeAttribute("name")}function yd(e,t,a,s,u,c,y,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Yu(e);return}a=a!=null?""+Kt(a):"",t=t!=null?""+Kt(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??u,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Yu(e)}function Ku(e,t,a){t==="number"&&ar(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ws(e,t,a,s){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&s&&(e[a].defaultSelected=!0)}else{for(a=""+Kt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,s&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function gd(e,t,a){if(t!=null&&(t=""+Kt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Kt(a):""}function pd(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error(r(92));if(te(s)){if(1<s.length)throw Error(r(93));s=s[0]}a=s}a==null&&(a=""),t=a}a=Kt(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s),Yu(e)}function Os(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Lp=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 vd(e,t,a){var s=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,a):typeof a!="number"||a===0||Lp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function xd(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var u in t)s=t[u],t.hasOwnProperty(u)&&a[u]!==s&&vd(e,u,s)}else for(var c in t)t.hasOwnProperty(c)&&vd(e,c,t[c])}function Vu(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 Up=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"]]),Bp=/^[\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 nr(e){return Bp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Sa(){}var Xu=null;function Zu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zs=null,Ds=null;function bd(e){var t=Ms(e);if(t&&(e=t.stateNode)){var a=e[jt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Vt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var s=a[t];if(s!==e&&s.form===e.form){var u=s[jt]||null;if(!u)throw Error(r(90));Gu(s,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)s=a[t],s.form===e.form&&md(s)}break e;case"textarea":gd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ws(e,!!a.multiple,t,!1)}}}var ku=!1;function Sd(e,t,a){if(ku)return e(t,a);ku=!0;try{var s=e(t);return s}finally{if(ku=!1,(zs!==null||Ds!==null)&&(Vr(),zs&&(t=zs,e=Ds,Ds=zs=null,bd(t),e)))for(t=0;t<e.length;t++)bd(e[t])}}function Ll(e,t){var a=e.stateNode;if(a===null)return null;var s=a[jt]||null;if(s===null)return null;a=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$u=!1;if(ja)try{var Ul={};Object.defineProperty(Ul,"passive",{get:function(){$u=!0}}),window.addEventListener("test",Ul,Ul),window.removeEventListener("test",Ul,Ul)}catch{$u=!1}var Fa=null,Pu=null,sr=null;function jd(){if(sr)return sr;var e,t=Pu,a=t.length,s,u="value"in Fa?Fa.value:Fa.textContent,c=u.length;for(e=0;e<a&&t[e]===u[e];e++);var y=a-e;for(s=1;s<=y&&t[a-s]===u[c-s];s++);return sr=u.slice(e,1<s?1-s:void 0)}function lr(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 ir(){return!0}function Nd(){return!1}function Nt(e){function t(a,s,u,c,y){this._reactName=a,this._targetInst=u,this.type=s,this.nativeEvent=c,this.target=y,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ir:Nd,this.isPropagationStopped=Nd,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ir)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ir)},persist:function(){},isPersistent:ir}),t}var Hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rr=Nt(Hn),Bl=v({},Hn,{view:0,detail:0}),qp=Nt(Bl),Fu,Ju,ql,ur=v({},Bl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wu,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!==ql&&(ql&&e.type==="mousemove"?(Fu=e.screenX-ql.screenX,Ju=e.screenY-ql.screenY):Ju=Fu=0,ql=e),Fu)},movementY:function(e){return"movementY"in e?e.movementY:Ju}}),Rd=Nt(ur),Hp=v({},ur,{dataTransfer:0}),Qp=Nt(Hp),Yp=v({},Bl,{relatedTarget:0}),Iu=Nt(Yp),Gp=v({},Hn,{animationName:0,elapsedTime:0,pseudoElement:0}),Kp=Nt(Gp),Vp=v({},Hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Xp=Nt(Vp),Zp=v({},Hn,{data:0}),_d=Nt(Zp),kp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$p={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"},Pp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Fp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pp[e])?!!t[e]:!1}function Wu(){return Fp}var Jp=v({},Bl,{key:function(e){if(e.key){var t=kp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=lr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$p[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wu,charCode:function(e){return e.type==="keypress"?lr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?lr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ip=Nt(Jp),Wp=v({},ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ed=Nt(Wp),ev=v({},Bl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wu}),tv=Nt(ev),av=v({},Hn,{propertyName:0,elapsedTime:0,pseudoElement:0}),nv=Nt(av),sv=v({},ur,{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}),lv=Nt(sv),iv=v({},Hn,{newState:0,oldState:0}),rv=Nt(iv),uv=[9,13,27,32],ec=ja&&"CompositionEvent"in window,Hl=null;ja&&"documentMode"in document&&(Hl=document.documentMode);var cv=ja&&"TextEvent"in window&&!Hl,Td=ja&&(!ec||Hl&&8<Hl&&11>=Hl),Md=" ",Cd=!1;function Ad(e,t){switch(e){case"keyup":return uv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ls=!1;function ov(e,t){switch(e){case"compositionend":return wd(t);case"keypress":return t.which!==32?null:(Cd=!0,Md);case"textInput":return e=t.data,e===Md&&Cd?null:e;default:return null}}function fv(e,t){if(Ls)return e==="compositionend"||!ec&&Ad(e,t)?(e=jd(),sr=Pu=Fa=null,Ls=!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 Td&&t.locale!=="ko"?null:t.data;default:return null}}var dv={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 Od(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dv[e.type]:t==="textarea"}function zd(e,t,a,s){zs?Ds?Ds.push(s):Ds=[s]:zs=s,t=Jr(t,"onChange"),0<t.length&&(a=new rr("onChange","change",null,a,s),e.push({event:a,listeners:t}))}var Ql=null,Yl=null;function hv(e){y0(e,0)}function cr(e){var t=Dl(e);if(md(t))return e}function Dd(e,t){if(e==="change")return t}var Ld=!1;if(ja){var tc;if(ja){var ac="oninput"in document;if(!ac){var Ud=document.createElement("div");Ud.setAttribute("oninput","return;"),ac=typeof Ud.oninput=="function"}tc=ac}else tc=!1;Ld=tc&&(!document.documentMode||9<document.documentMode)}function Bd(){Ql&&(Ql.detachEvent("onpropertychange",qd),Yl=Ql=null)}function qd(e){if(e.propertyName==="value"&&cr(Yl)){var t=[];zd(t,Yl,e,Zu(e)),Sd(hv,t)}}function mv(e,t,a){e==="focusin"?(Bd(),Ql=t,Yl=a,Ql.attachEvent("onpropertychange",qd)):e==="focusout"&&Bd()}function yv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return cr(Yl)}function gv(e,t){if(e==="click")return cr(t)}function pv(e,t){if(e==="input"||e==="change")return cr(t)}function vv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:vv;function Gl(e,t){if(Dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var u=a[s];if(!ta.call(t,u)||!Dt(e[u],t[u]))return!1}return!0}function Hd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qd(e,t){var a=Hd(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Hd(a)}}function Yd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ar(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ar(e.document)}return t}function nc(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 xv=ja&&"documentMode"in document&&11>=document.documentMode,Us=null,sc=null,Kl=null,lc=!1;function Kd(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;lc||Us==null||Us!==ar(s)||(s=Us,"selectionStart"in s&&nc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Kl&&Gl(Kl,s)||(Kl=s,s=Jr(sc,"onSelect"),0<s.length&&(t=new rr("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=Us)))}function Qn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Bs={animationend:Qn("Animation","AnimationEnd"),animationiteration:Qn("Animation","AnimationIteration"),animationstart:Qn("Animation","AnimationStart"),transitionrun:Qn("Transition","TransitionRun"),transitionstart:Qn("Transition","TransitionStart"),transitioncancel:Qn("Transition","TransitionCancel"),transitionend:Qn("Transition","TransitionEnd")},ic={},Vd={};ja&&(Vd=document.createElement("div").style,"AnimationEvent"in window||(delete Bs.animationend.animation,delete Bs.animationiteration.animation,delete Bs.animationstart.animation),"TransitionEvent"in window||delete Bs.transitionend.transition);function Yn(e){if(ic[e])return ic[e];if(!Bs[e])return e;var t=Bs[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Vd)return ic[e]=t[a];return e}var Xd=Yn("animationend"),Zd=Yn("animationiteration"),kd=Yn("animationstart"),bv=Yn("transitionrun"),Sv=Yn("transitionstart"),jv=Yn("transitioncancel"),$d=Yn("transitionend"),Pd=new Map,rc="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(" ");rc.push("scrollEnd");function aa(e,t){Pd.set(e,t),qn(t,[e])}var or=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)},Xt=[],qs=0,uc=0;function fr(){for(var e=qs,t=uc=qs=0;t<e;){var a=Xt[t];Xt[t++]=null;var s=Xt[t];Xt[t++]=null;var u=Xt[t];Xt[t++]=null;var c=Xt[t];if(Xt[t++]=null,s!==null&&u!==null){var y=s.pending;y===null?u.next=u:(u.next=y.next,y.next=u),s.pending=u}c!==0&&Fd(a,u,c)}}function dr(e,t,a,s){Xt[qs++]=e,Xt[qs++]=t,Xt[qs++]=a,Xt[qs++]=s,uc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function cc(e,t,a,s){return dr(e,t,a,s),hr(e)}function Gn(e,t){return dr(e,null,null,t),hr(e)}function Fd(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var u=!1,c=e.return;c!==null;)c.childLanes|=a,s=c.alternate,s!==null&&(s.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(u=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,u&&t!==null&&(u=31-zt(a),e=c.hiddenUpdates,s=e[u],s===null?e[u]=[t]:s.push(t),t.lane=a|536870912),c):null}function hr(e){if(50<fi)throw fi=0,xo=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Hs={};function Nv(e,t,a,s){this.tag=e,this.key=a,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,t,a,s){return new Nv(e,t,a,s)}function oc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Na(e,t){var a=e.alternate;return a===null?(a=Lt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Jd(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function mr(e,t,a,s,u,c){var y=0;if(s=e,typeof e=="function")oc(e)&&(y=1);else if(typeof e=="string")y=Mx(e,a,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=Lt(31,a,t,u),e.elementType=J,e.lanes=c,e;case E:return Kn(a.children,u,c,t);case C:y=8,u|=24;break;case w:return e=Lt(12,a,t,u|2),e.elementType=w,e.lanes=c,e;case Z:return e=Lt(13,a,t,u),e.elementType=Z,e.lanes=c,e;case ee:return e=Lt(19,a,t,u),e.elementType=ee,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case X:y=10;break e;case $:y=9;break e;case L:y=11;break e;case P:y=14;break e;case F:y=16,s=null;break e}y=29,a=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=Lt(y,a,t,u),t.elementType=e,t.type=s,t.lanes=c,t}function Kn(e,t,a,s){return e=Lt(7,e,s,t),e.lanes=a,e}function fc(e,t,a){return e=Lt(6,e,null,t),e.lanes=a,e}function Id(e){var t=Lt(18,null,null,0);return t.stateNode=e,t}function dc(e,t,a){return t=Lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wd=new WeakMap;function Zt(e,t){if(typeof e=="object"&&e!==null){var a=Wd.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Rs(t)},Wd.set(e,t),t)}return{value:e,source:t,stack:Rs(t)}}var Qs=[],Ys=0,yr=null,Vl=0,kt=[],$t=0,Ja=null,ca=1,oa="";function Ra(e,t){Qs[Ys++]=Vl,Qs[Ys++]=yr,yr=e,Vl=t}function eh(e,t,a){kt[$t++]=ca,kt[$t++]=oa,kt[$t++]=Ja,Ja=e;var s=ca;e=oa;var u=32-zt(s)-1;s&=~(1<<u),a+=1;var c=32-zt(t)+u;if(30<c){var y=u-u%5;c=(s&(1<<y)-1).toString(32),s>>=y,u-=y,ca=1<<32-zt(t)+u|a<<u|s,oa=c+e}else ca=1<<c|a<<u|s,oa=e}function hc(e){e.return!==null&&(Ra(e,1),eh(e,1,0))}function mc(e){for(;e===yr;)yr=Qs[--Ys],Qs[Ys]=null,Vl=Qs[--Ys],Qs[Ys]=null;for(;e===Ja;)Ja=kt[--$t],kt[$t]=null,oa=kt[--$t],kt[$t]=null,ca=kt[--$t],kt[$t]=null}function th(e,t){kt[$t++]=ca,kt[$t++]=oa,kt[$t++]=Ja,ca=t.id,oa=t.overflow,Ja=e}var ut=null,Qe=null,Ee=!1,Ia=null,Pt=!1,yc=Error(r(519));function Wa(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xl(Zt(t,e)),yc}function ah(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[rt]=e,t[jt]=s,a){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(a=0;a<hi.length;a++)Ne(hi[a],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),yd(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),pd(t,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||s.suppressHydrationWarning===!0||x0(t.textContent,a)?(s.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),s.onScroll!=null&&Ne("scroll",t),s.onScrollEnd!=null&&Ne("scrollend",t),s.onClick!=null&&(t.onclick=Sa),t=!0):t=!1,t||Wa(e,!0)}function nh(e){for(ut=e.return;ut;)switch(ut.tag){case 5:case 31:case 13:Pt=!1;return;case 27:case 3:Pt=!0;return;default:ut=ut.return}}function Gs(e){if(e!==ut)return!1;if(!Ee)return nh(e),Ee=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Do(e.type,e.memoizedProps)),a=!a),a&&Qe&&Wa(e),nh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=M0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=M0(e)}else t===27?(t=Qe,mn(e.type)?(e=Ho,Ho=null,Qe=e):Qe=t):Qe=ut?Jt(e.stateNode.nextSibling):null;return!0}function Vn(){Qe=ut=null,Ee=!1}function gc(){var e=Ia;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Ia=null),e}function Xl(e){Ia===null?Ia=[e]:Ia.push(e)}var pc=T(null),Xn=null,_a=null;function en(e,t,a){q(pc,t._currentValue),t._currentValue=a}function Ea(e){e._currentValue=pc.current,Y(pc)}function vc(e,t,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===a)break;e=e.return}}function xc(e,t,a,s){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var c=u.dependencies;if(c!==null){var y=u.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=u;for(var R=0;R<t.length;R++)if(b.context===t[R]){c.lanes|=a,b=c.alternate,b!==null&&(b.lanes|=a),vc(c.return,a,e),s||(y=null);break e}c=b.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(r(341));y.lanes|=a,c=y.alternate,c!==null&&(c.lanes|=a),vc(y,a,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function Ks(e,t,a,s){e=null;for(var u=t,c=!1;u!==null;){if(!c){if((u.flags&524288)!==0)c=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var b=u.type;Dt(u.pendingProps.value,y.value)||(e!==null?e.push(b):e=[b])}}else if(u===be.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(vi):e=[vi])}u=u.return}e!==null&&xc(t,e,a,s),t.flags|=262144}function gr(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zn(e){Xn=e,_a=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ct(e){return sh(Xn,e)}function pr(e,t){return Xn===null&&Zn(e),sh(e,t)}function sh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},_a===null){if(e===null)throw Error(r(308));_a=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _a=_a.next=t;return a}var Rv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},_v=n.unstable_scheduleCallback,Ev=n.unstable_NormalPriority,Ie={$$typeof:X,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bc(){return{controller:new Rv,data:new Map,refCount:0}}function Zl(e){e.refCount--,e.refCount===0&&_v(Ev,function(){e.controller.abort()})}var kl=null,Sc=0,Vs=0,Xs=null;function Tv(e,t){if(kl===null){var a=kl=[];Sc=0,Vs=_o(),Xs={status:"pending",value:void 0,then:function(s){a.push(s)}}}return Sc++,t.then(lh,lh),t}function lh(){if(--Sc===0&&kl!==null){Xs!==null&&(Xs.status="fulfilled");var e=kl;kl=null,Vs=0,Xs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Mv(e,t){var a=[],s={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(s.status="rejected",s.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),s}var ih=D.S;D.S=function(e,t){Km=Se(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Tv(e,t),ih!==null&&ih(e,t)};var kn=T(null);function jc(){var e=kn.current;return e!==null?e:qe.pooledCache}function vr(e,t){t===null?q(kn,kn.current):q(kn,t.pool)}function rh(){var e=jc();return e===null?null:{parent:Ie._currentValue,pool:e}}var Zs=Error(r(460)),Nc=Error(r(474)),xr=Error(r(542)),br={then:function(){}};function uh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ch(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Sa,Sa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fh(e),e;default:if(typeof t.status=="string")t.then(Sa,Sa);else{if(e=qe,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=s}},function(s){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fh(e),e}throw Pn=t,Zs}}function $n(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Pn=a,Zs):a}}var Pn=null;function oh(){if(Pn===null)throw Error(r(459));var e=Pn;return Pn=null,e}function fh(e){if(e===Zs||e===xr)throw Error(r(483))}var ks=null,$l=0;function Sr(e){var t=$l;return $l+=1,ks===null&&(ks=[]),ch(ks,e,t)}function Pl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function jr(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function dh(e){function t(A,M){if(e){var O=A.deletions;O===null?(A.deletions=[M],A.flags|=16):O.push(M)}}function a(A,M){if(!e)return null;for(;M!==null;)t(A,M),M=M.sibling;return null}function s(A){for(var M=new Map;A!==null;)A.key!==null?M.set(A.key,A):M.set(A.index,A),A=A.sibling;return M}function u(A,M){return A=Na(A,M),A.index=0,A.sibling=null,A}function c(A,M,O){return A.index=O,e?(O=A.alternate,O!==null?(O=O.index,O<M?(A.flags|=67108866,M):O):(A.flags|=67108866,M)):(A.flags|=1048576,M)}function y(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function b(A,M,O,G){return M===null||M.tag!==6?(M=fc(O,A.mode,G),M.return=A,M):(M=u(M,O),M.return=A,M)}function R(A,M,O,G){var oe=O.type;return oe===E?H(A,M,O.props.children,G,O.key):M!==null&&(M.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===F&&$n(oe)===M.type)?(M=u(M,O.props),Pl(M,O),M.return=A,M):(M=mr(O.type,O.key,O.props,null,A.mode,G),Pl(M,O),M.return=A,M)}function z(A,M,O,G){return M===null||M.tag!==4||M.stateNode.containerInfo!==O.containerInfo||M.stateNode.implementation!==O.implementation?(M=dc(O,A.mode,G),M.return=A,M):(M=u(M,O.children||[]),M.return=A,M)}function H(A,M,O,G,oe){return M===null||M.tag!==7?(M=Kn(O,A.mode,G,oe),M.return=A,M):(M=u(M,O),M.return=A,M)}function k(A,M,O){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=fc(""+M,A.mode,O),M.return=A,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case j:return O=mr(M.type,M.key,M.props,null,A.mode,O),Pl(O,M),O.return=A,O;case N:return M=dc(M,A.mode,O),M.return=A,M;case F:return M=$n(M),k(A,M,O)}if(te(M)||se(M))return M=Kn(M,A.mode,O,null),M.return=A,M;if(typeof M.then=="function")return k(A,Sr(M),O);if(M.$$typeof===X)return k(A,pr(A,M),O);jr(A,M)}return null}function U(A,M,O,G){var oe=M!==null?M.key:null;if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return oe!==null?null:b(A,M,""+O,G);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case j:return O.key===oe?R(A,M,O,G):null;case N:return O.key===oe?z(A,M,O,G):null;case F:return O=$n(O),U(A,M,O,G)}if(te(O)||se(O))return oe!==null?null:H(A,M,O,G,null);if(typeof O.then=="function")return U(A,M,Sr(O),G);if(O.$$typeof===X)return U(A,M,pr(A,O),G);jr(A,O)}return null}function B(A,M,O,G,oe){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return A=A.get(O)||null,b(M,A,""+G,oe);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case j:return A=A.get(G.key===null?O:G.key)||null,R(M,A,G,oe);case N:return A=A.get(G.key===null?O:G.key)||null,z(M,A,G,oe);case F:return G=$n(G),B(A,M,O,G,oe)}if(te(G)||se(G))return A=A.get(O)||null,H(M,A,G,oe,null);if(typeof G.then=="function")return B(A,M,O,Sr(G),oe);if(G.$$typeof===X)return B(A,M,O,pr(M,G),oe);jr(M,G)}return null}function ie(A,M,O,G){for(var oe=null,Ce=null,re=M,pe=M=0,_e=null;re!==null&&pe<O.length;pe++){re.index>pe?(_e=re,re=null):_e=re.sibling;var Ae=U(A,re,O[pe],G);if(Ae===null){re===null&&(re=_e);break}e&&re&&Ae.alternate===null&&t(A,re),M=c(Ae,M,pe),Ce===null?oe=Ae:Ce.sibling=Ae,Ce=Ae,re=_e}if(pe===O.length)return a(A,re),Ee&&Ra(A,pe),oe;if(re===null){for(;pe<O.length;pe++)re=k(A,O[pe],G),re!==null&&(M=c(re,M,pe),Ce===null?oe=re:Ce.sibling=re,Ce=re);return Ee&&Ra(A,pe),oe}for(re=s(re);pe<O.length;pe++)_e=B(re,A,pe,O[pe],G),_e!==null&&(e&&_e.alternate!==null&&re.delete(_e.key===null?pe:_e.key),M=c(_e,M,pe),Ce===null?oe=_e:Ce.sibling=_e,Ce=_e);return e&&re.forEach(function(xn){return t(A,xn)}),Ee&&Ra(A,pe),oe}function de(A,M,O,G){if(O==null)throw Error(r(151));for(var oe=null,Ce=null,re=M,pe=M=0,_e=null,Ae=O.next();re!==null&&!Ae.done;pe++,Ae=O.next()){re.index>pe?(_e=re,re=null):_e=re.sibling;var xn=U(A,re,Ae.value,G);if(xn===null){re===null&&(re=_e);break}e&&re&&xn.alternate===null&&t(A,re),M=c(xn,M,pe),Ce===null?oe=xn:Ce.sibling=xn,Ce=xn,re=_e}if(Ae.done)return a(A,re),Ee&&Ra(A,pe),oe;if(re===null){for(;!Ae.done;pe++,Ae=O.next())Ae=k(A,Ae.value,G),Ae!==null&&(M=c(Ae,M,pe),Ce===null?oe=Ae:Ce.sibling=Ae,Ce=Ae);return Ee&&Ra(A,pe),oe}for(re=s(re);!Ae.done;pe++,Ae=O.next())Ae=B(re,A,pe,Ae.value,G),Ae!==null&&(e&&Ae.alternate!==null&&re.delete(Ae.key===null?pe:Ae.key),M=c(Ae,M,pe),Ce===null?oe=Ae:Ce.sibling=Ae,Ce=Ae);return e&&re.forEach(function(Hx){return t(A,Hx)}),Ee&&Ra(A,pe),oe}function Be(A,M,O,G){if(typeof O=="object"&&O!==null&&O.type===E&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case j:e:{for(var oe=O.key;M!==null;){if(M.key===oe){if(oe=O.type,oe===E){if(M.tag===7){a(A,M.sibling),G=u(M,O.props.children),G.return=A,A=G;break e}}else if(M.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===F&&$n(oe)===M.type){a(A,M.sibling),G=u(M,O.props),Pl(G,O),G.return=A,A=G;break e}a(A,M);break}else t(A,M);M=M.sibling}O.type===E?(G=Kn(O.props.children,A.mode,G,O.key),G.return=A,A=G):(G=mr(O.type,O.key,O.props,null,A.mode,G),Pl(G,O),G.return=A,A=G)}return y(A);case N:e:{for(oe=O.key;M!==null;){if(M.key===oe)if(M.tag===4&&M.stateNode.containerInfo===O.containerInfo&&M.stateNode.implementation===O.implementation){a(A,M.sibling),G=u(M,O.children||[]),G.return=A,A=G;break e}else{a(A,M);break}else t(A,M);M=M.sibling}G=dc(O,A.mode,G),G.return=A,A=G}return y(A);case F:return O=$n(O),Be(A,M,O,G)}if(te(O))return ie(A,M,O,G);if(se(O)){if(oe=se(O),typeof oe!="function")throw Error(r(150));return O=oe.call(O),de(A,M,O,G)}if(typeof O.then=="function")return Be(A,M,Sr(O),G);if(O.$$typeof===X)return Be(A,M,pr(A,O),G);jr(A,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,M!==null&&M.tag===6?(a(A,M.sibling),G=u(M,O),G.return=A,A=G):(a(A,M),G=fc(O,A.mode,G),G.return=A,A=G),y(A)):a(A,M)}return function(A,M,O,G){try{$l=0;var oe=Be(A,M,O,G);return ks=null,oe}catch(re){if(re===Zs||re===xr)throw re;var Ce=Lt(29,re,null,A.mode);return Ce.lanes=G,Ce.return=A,Ce}finally{}}}var Fn=dh(!0),hh=dh(!1),tn=!1;function Rc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _c(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 an(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function nn(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(we&2)!==0){var u=s.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),s.pending=t,t=hr(e),Fd(e,null,a),t}return dr(e,s,t,a),hr(e)}function Fl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,sd(e,a)}}function Ec(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var u=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?u=c=y:c=c.next=y,a=a.next}while(a!==null);c===null?u=c=t:c=c.next=t}else u=c=t;a={baseState:s.baseState,firstBaseUpdate:u,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Tc=!1;function Jl(){if(Tc){var e=Xs;if(e!==null)throw e}}function Il(e,t,a,s){Tc=!1;var u=e.updateQueue;tn=!1;var c=u.firstBaseUpdate,y=u.lastBaseUpdate,b=u.shared.pending;if(b!==null){u.shared.pending=null;var R=b,z=R.next;R.next=null,y===null?c=z:y.next=z,y=R;var H=e.alternate;H!==null&&(H=H.updateQueue,b=H.lastBaseUpdate,b!==y&&(b===null?H.firstBaseUpdate=z:b.next=z,H.lastBaseUpdate=R))}if(c!==null){var k=u.baseState;y=0,H=z=R=null,b=c;do{var U=b.lane&-536870913,B=U!==b.lane;if(B?(Re&U)===U:(s&U)===U){U!==0&&U===Vs&&(Tc=!0),H!==null&&(H=H.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ie=e,de=b;U=t;var Be=a;switch(de.tag){case 1:if(ie=de.payload,typeof ie=="function"){k=ie.call(Be,k,U);break e}k=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=de.payload,U=typeof ie=="function"?ie.call(Be,k,U):ie,U==null)break e;k=v({},k,U);break e;case 2:tn=!0}}U=b.callback,U!==null&&(e.flags|=64,B&&(e.flags|=8192),B=u.callbacks,B===null?u.callbacks=[U]:B.push(U))}else B={lane:U,tag:b.tag,payload:b.payload,callback:b.callback,next:null},H===null?(z=H=B,R=k):H=H.next=B,y|=U;if(b=b.next,b===null){if(b=u.shared.pending,b===null)break;B=b,b=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);H===null&&(R=k),u.baseState=R,u.firstBaseUpdate=z,u.lastBaseUpdate=H,c===null&&(u.shared.lanes=0),cn|=y,e.lanes=y,e.memoizedState=k}}function mh(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function yh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)mh(a[e],t)}var $s=T(null),Nr=T(0);function gh(e,t){e=La,q(Nr,e),q($s,t),La=e|t.baseLanes}function Mc(){q(Nr,La),q($s,$s.current)}function Cc(){La=Nr.current,Y($s),Y(Nr)}var Ut=T(null),Ft=null;function sn(e){var t=e.alternate;q(Fe,Fe.current&1),q(Ut,e),Ft===null&&(t===null||$s.current!==null||t.memoizedState!==null)&&(Ft=e)}function Ac(e){q(Fe,Fe.current),q(Ut,e),Ft===null&&(Ft=e)}function ph(e){e.tag===22?(q(Fe,Fe.current),q(Ut,e),Ft===null&&(Ft=e)):ln()}function ln(){q(Fe,Fe.current),q(Ut,Ut.current)}function Bt(e){Y(Ut),Ft===e&&(Ft=null),Y(Fe)}var Fe=T(0);function Rr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Bo(a)||qo(a)))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 Ta=0,ge=null,Le=null,We=null,_r=!1,Ps=!1,Jn=!1,Er=0,Wl=0,Fs=null,Cv=0;function Ze(){throw Error(r(321))}function wc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Dt(e[a],t[a]))return!1;return!0}function Oc(e,t,a,s,u,c){return Ta=c,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?em:kc,Jn=!1,c=a(s,u),Jn=!1,Ps&&(c=xh(t,a,s,u)),vh(e),c}function vh(e){D.H=ai;var t=Le!==null&&Le.next!==null;if(Ta=0,We=Le=ge=null,_r=!1,Wl=0,Fs=null,t)throw Error(r(300));e===null||et||(e=e.dependencies,e!==null&&gr(e)&&(et=!0))}function xh(e,t,a,s){ge=e;var u=0;do{if(Ps&&(Fs=null),Wl=0,Ps=!1,25<=u)throw Error(r(301));if(u+=1,We=Le=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}D.H=tm,c=t(a,s)}while(Ps);return c}function Av(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?ei(t):t,e=e.useState()[0],(Le!==null?Le.memoizedState:null)!==e&&(ge.flags|=1024),t}function zc(){var e=Er!==0;return Er=0,e}function Dc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Lc(e){if(_r){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_r=!1}Ta=0,We=Le=ge=null,Ps=!1,Wl=Er=0,Fs=null}function vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?ge.memoizedState=We=e:We=We.next=e,We}function Je(){if(Le===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=We===null?ge.memoizedState:We.next;if(t!==null)We=t,Le=e;else{if(e===null)throw ge.alternate===null?Error(r(467)):Error(r(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},We===null?ge.memoizedState=We=e:We=We.next=e}return We}function Tr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ei(e){var t=Wl;return Wl+=1,Fs===null&&(Fs=[]),e=ch(Fs,e,t),t=ge,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?em:kc),e}function Mr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ei(e);if(e.$$typeof===X)return ct(e)}throw Error(r(438,String(e)))}function Uc(e){var t=null,a=ge.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=ge.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Tr(),ge.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),s=0;s<e;s++)a[s]=K;return t.index++,a}function Ma(e,t){return typeof t=="function"?t(e):t}function Cr(e){var t=Je();return Bc(t,Le,e)}function Bc(e,t,a){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=a;var u=e.baseQueue,c=s.pending;if(c!==null){if(u!==null){var y=u.next;u.next=c.next,c.next=y}t.baseQueue=u=c,s.pending=null}if(c=e.baseState,u===null)e.memoizedState=c;else{t=u.next;var b=y=null,R=null,z=t,H=!1;do{var k=z.lane&-536870913;if(k!==z.lane?(Re&k)===k:(Ta&k)===k){var U=z.revertLane;if(U===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),k===Vs&&(H=!0);else if((Ta&U)===U){z=z.next,U===Vs&&(H=!0);continue}else k={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},R===null?(b=R=k,y=c):R=R.next=k,ge.lanes|=U,cn|=U;k=z.action,Jn&&a(c,k),c=z.hasEagerState?z.eagerState:a(c,k)}else U={lane:k,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},R===null?(b=R=U,y=c):R=R.next=U,ge.lanes|=k,cn|=k;z=z.next}while(z!==null&&z!==t);if(R===null?y=c:R.next=b,!Dt(c,e.memoizedState)&&(et=!0,H&&(a=Xs,a!==null)))throw a;e.memoizedState=c,e.baseState=y,e.baseQueue=R,s.lastRenderedState=c}return u===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function qc(e){var t=Je(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var s=a.dispatch,u=a.pending,c=t.memoizedState;if(u!==null){a.pending=null;var y=u=u.next;do c=e(c,y.action),y=y.next;while(y!==u);Dt(c,t.memoizedState)||(et=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,s]}function bh(e,t,a){var s=ge,u=Je(),c=Ee;if(c){if(a===void 0)throw Error(r(407));a=a()}else a=t();var y=!Dt((Le||u).memoizedState,a);if(y&&(u.memoizedState=a,et=!0),u=u.queue,Yc(Nh.bind(null,s,u,e),[e]),u.getSnapshot!==t||y||We!==null&&We.memoizedState.tag&1){if(s.flags|=2048,Js(9,{destroy:void 0},jh.bind(null,s,u,a,t),null),qe===null)throw Error(r(349));c||(Ta&127)!==0||Sh(s,t,a)}return a}function Sh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ge.updateQueue,t===null?(t=Tr(),ge.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function jh(e,t,a,s){t.value=a,t.getSnapshot=s,Rh(t)&&_h(e)}function Nh(e,t,a){return a(function(){Rh(t)&&_h(e)})}function Rh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Dt(e,a)}catch{return!0}}function _h(e){var t=Gn(e,2);t!==null&&Mt(t,e,2)}function Hc(e){var t=vt();if(typeof e=="function"){var a=e;if(e=a(),Jn){$a(!0);try{a()}finally{$a(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:e},t}function Eh(e,t,a,s){return e.baseState=a,Bc(e,Le,typeof s=="function"?s:Ma)}function wv(e,t,a,s,u){if(Or(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){c.listeners.push(y)}};D.T!==null?a(!0):c.isTransition=!1,s(c),a=t.pending,a===null?(c.next=t.pending=c,Th(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Th(e,t){var a=t.action,s=t.payload,u=e.state;if(t.isTransition){var c=D.T,y={};D.T=y;try{var b=a(u,s),R=D.S;R!==null&&R(y,b),Mh(e,t,b)}catch(z){Qc(e,t,z)}finally{c!==null&&y.types!==null&&(c.types=y.types),D.T=c}}else try{c=a(u,s),Mh(e,t,c)}catch(z){Qc(e,t,z)}}function Mh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){Ch(e,t,s)},function(s){return Qc(e,t,s)}):Ch(e,t,a)}function Ch(e,t,a){t.status="fulfilled",t.value=a,Ah(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Th(e,a)))}function Qc(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,Ah(t),t=t.next;while(t!==s)}e.action=null}function Ah(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function wh(e,t){return t}function Oh(e,t){if(Ee){var a=qe.formState;if(a!==null){e:{var s=ge;if(Ee){if(Qe){t:{for(var u=Qe,c=Pt;u.nodeType!==8;){if(!c){u=null;break t}if(u=Jt(u.nextSibling),u===null){u=null;break t}}c=u.data,u=c==="F!"||c==="F"?u:null}if(u){Qe=Jt(u.nextSibling),s=u.data==="F!";break e}}Wa(s)}s=!1}s&&(t=a[0])}}return a=vt(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wh,lastRenderedState:t},a.queue=s,a=Jh.bind(null,ge,s),s.dispatch=a,s=Hc(!1),c=Zc.bind(null,ge,!1,s.queue),s=vt(),u={state:t,dispatch:null,action:e,pending:null},s.queue=u,a=wv.bind(null,ge,u,c,a),u.dispatch=a,s.memoizedState=e,[t,a,!1]}function zh(e){var t=Je();return Dh(t,Le,e)}function Dh(e,t,a){if(t=Bc(e,t,wh)[0],e=Cr(Ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=ei(t)}catch(y){throw y===Zs?xr:y}else s=t;t=Je();var u=t.queue,c=u.dispatch;return a!==t.memoizedState&&(ge.flags|=2048,Js(9,{destroy:void 0},Ov.bind(null,u,a),null)),[s,c,e]}function Ov(e,t){e.action=t}function Lh(e){var t=Je(),a=Le;if(a!==null)return Dh(t,a,e);Je(),t=t.memoizedState,a=Je();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function Js(e,t,a,s){return e={tag:e,create:a,deps:s,inst:t,next:null},t=ge.updateQueue,t===null&&(t=Tr(),ge.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,t.lastEffect=e),e}function Uh(){return Je().memoizedState}function Ar(e,t,a,s){var u=vt();ge.flags|=e,u.memoizedState=Js(1|t,{destroy:void 0},a,s===void 0?null:s)}function wr(e,t,a,s){var u=Je();s=s===void 0?null:s;var c=u.memoizedState.inst;Le!==null&&s!==null&&wc(s,Le.memoizedState.deps)?u.memoizedState=Js(t,c,a,s):(ge.flags|=e,u.memoizedState=Js(1|t,c,a,s))}function Bh(e,t){Ar(8390656,8,e,t)}function Yc(e,t){wr(2048,8,e,t)}function zv(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=Tr(),ge.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function qh(e){var t=Je().memoizedState;return zv({ref:t,nextImpl:e}),function(){if((we&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Hh(e,t){return wr(4,2,e,t)}function Qh(e,t){return wr(4,4,e,t)}function Yh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gh(e,t,a){a=a!=null?a.concat([e]):null,wr(4,4,Yh.bind(null,t,e),a)}function Gc(){}function Kh(e,t){var a=Je();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&wc(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function Vh(e,t){var a=Je();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&wc(t,s[1]))return s[0];if(s=e(),Jn){$a(!0);try{e()}finally{$a(!1)}}return a.memoizedState=[s,t],s}function Kc(e,t,a){return a===void 0||(Ta&1073741824)!==0&&(Re&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Xm(),ge.lanes|=e,cn|=e,a)}function Xh(e,t,a,s){return Dt(a,t)?a:$s.current!==null?(e=Kc(e,a,s),Dt(e,t)||(et=!0),e):(Ta&42)===0||(Ta&1073741824)!==0&&(Re&261930)===0?(et=!0,e.memoizedState=a):(e=Xm(),ge.lanes|=e,cn|=e,t)}function Zh(e,t,a,s,u){var c=V.p;V.p=c!==0&&8>c?c:8;var y=D.T,b={};D.T=b,Zc(e,!1,t,a);try{var R=u(),z=D.S;if(z!==null&&z(b,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var H=Mv(R,s);ti(e,t,H,Qt(e))}else ti(e,t,s,Qt(e))}catch(k){ti(e,t,{then:function(){},status:"rejected",reason:k},Qt())}finally{V.p=c,y!==null&&b.types!==null&&(y.types=b.types),D.T=y}}function Dv(){}function Vc(e,t,a,s){if(e.tag!==5)throw Error(r(476));var u=kh(e).queue;Zh(e,u,t,ae,a===null?Dv:function(){return $h(e),a(s)})}function kh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:ae},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $h(e){var t=kh(e);t.next===null&&(t=e.alternate.memoizedState),ti(e,t.next.queue,{},Qt())}function Xc(){return ct(vi)}function Ph(){return Je().memoizedState}function Fh(){return Je().memoizedState}function Lv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Qt();e=an(a);var s=nn(t,e,a);s!==null&&(Mt(s,t,a),Fl(s,t,a)),t={cache:bc()},e.payload=t;return}t=t.return}}function Uv(e,t,a){var s=Qt();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Or(e)?Ih(t,a):(a=cc(e,t,a,s),a!==null&&(Mt(a,e,s),Wh(a,t,s)))}function Jh(e,t,a){var s=Qt();ti(e,t,a,s)}function ti(e,t,a,s){var u={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Or(e))Ih(t,u);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var y=t.lastRenderedState,b=c(y,a);if(u.hasEagerState=!0,u.eagerState=b,Dt(b,y))return dr(e,t,u,0),qe===null&&fr(),!1}catch{}finally{}if(a=cc(e,t,u,s),a!==null)return Mt(a,e,s),Wh(a,t,s),!0}return!1}function Zc(e,t,a,s){if(s={lane:2,revertLane:_o(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Or(e)){if(t)throw Error(r(479))}else t=cc(e,a,s,2),t!==null&&Mt(t,e,2)}function Or(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Ih(e,t){Ps=_r=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Wh(e,t,a){if((a&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,sd(e,a)}}var ai={readContext:ct,use:Mr,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useLayoutEffect:Ze,useInsertionEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useSyncExternalStore:Ze,useId:Ze,useHostTransitionStatus:Ze,useFormState:Ze,useActionState:Ze,useOptimistic:Ze,useMemoCache:Ze,useCacheRefresh:Ze};ai.useEffectEvent=Ze;var em={readContext:ct,use:Mr,useCallback:function(e,t){return vt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:Bh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ar(4194308,4,Yh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ar(4194308,4,e,t)},useInsertionEffect:function(e,t){Ar(4,2,e,t)},useMemo:function(e,t){var a=vt();t=t===void 0?null:t;var s=e();if(Jn){$a(!0);try{e()}finally{$a(!1)}}return a.memoizedState=[s,t],s},useReducer:function(e,t,a){var s=vt();if(a!==void 0){var u=a(t);if(Jn){$a(!0);try{a(t)}finally{$a(!1)}}}else u=t;return s.memoizedState=s.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},s.queue=e,e=e.dispatch=Uv.bind(null,ge,e),[s.memoizedState,e]},useRef:function(e){var t=vt();return e={current:e},t.memoizedState=e},useState:function(e){e=Hc(e);var t=e.queue,a=Jh.bind(null,ge,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Gc,useDeferredValue:function(e,t){var a=vt();return Kc(a,e,t)},useTransition:function(){var e=Hc(!1);return e=Zh.bind(null,ge,e.queue,!0,!1),vt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var s=ge,u=vt();if(Ee){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),qe===null)throw Error(r(349));(Re&127)!==0||Sh(s,t,a)}u.memoizedState=a;var c={value:a,getSnapshot:t};return u.queue=c,Bh(Nh.bind(null,s,c,e),[e]),s.flags|=2048,Js(9,{destroy:void 0},jh.bind(null,s,c,a,t),null),a},useId:function(){var e=vt(),t=qe.identifierPrefix;if(Ee){var a=oa,s=ca;a=(s&~(1<<32-zt(s)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Er++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Cv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Xc,useFormState:Oh,useActionState:Oh,useOptimistic:function(e){var t=vt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Zc.bind(null,ge,!0,a),a.dispatch=t,[e,t]},useMemoCache:Uc,useCacheRefresh:function(){return vt().memoizedState=Lv.bind(null,ge)},useEffectEvent:function(e){var t=vt(),a={impl:e};return t.memoizedState=a,function(){if((we&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},kc={readContext:ct,use:Mr,useCallback:Kh,useContext:ct,useEffect:Yc,useImperativeHandle:Gh,useInsertionEffect:Hh,useLayoutEffect:Qh,useMemo:Vh,useReducer:Cr,useRef:Uh,useState:function(){return Cr(Ma)},useDebugValue:Gc,useDeferredValue:function(e,t){var a=Je();return Xh(a,Le.memoizedState,e,t)},useTransition:function(){var e=Cr(Ma)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ei(e),t]},useSyncExternalStore:bh,useId:Ph,useHostTransitionStatus:Xc,useFormState:zh,useActionState:zh,useOptimistic:function(e,t){var a=Je();return Eh(a,Le,e,t)},useMemoCache:Uc,useCacheRefresh:Fh};kc.useEffectEvent=qh;var tm={readContext:ct,use:Mr,useCallback:Kh,useContext:ct,useEffect:Yc,useImperativeHandle:Gh,useInsertionEffect:Hh,useLayoutEffect:Qh,useMemo:Vh,useReducer:qc,useRef:Uh,useState:function(){return qc(Ma)},useDebugValue:Gc,useDeferredValue:function(e,t){var a=Je();return Le===null?Kc(a,e,t):Xh(a,Le.memoizedState,e,t)},useTransition:function(){var e=qc(Ma)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ei(e),t]},useSyncExternalStore:bh,useId:Ph,useHostTransitionStatus:Xc,useFormState:Lh,useActionState:Lh,useOptimistic:function(e,t){var a=Je();return Le!==null?Eh(a,Le,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Uc,useCacheRefresh:Fh};tm.useEffectEvent=qh;function $c(e,t,a,s){t=e.memoizedState,a=a(s,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Pc={enqueueSetState:function(e,t,a){e=e._reactInternals;var s=Qt(),u=an(s);u.payload=t,a!=null&&(u.callback=a),t=nn(e,u,s),t!==null&&(Mt(t,e,s),Fl(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=Qt(),u=an(s);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=nn(e,u,s),t!==null&&(Mt(t,e,s),Fl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Qt(),s=an(a);s.tag=2,t!=null&&(s.callback=t),t=nn(e,s,a),t!==null&&(Mt(t,e,a),Fl(t,e,a))}};function am(e,t,a,s,u,c,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,c,y):t.prototype&&t.prototype.isPureReactComponent?!Gl(a,s)||!Gl(u,c):!0}function nm(e,t,a,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,s),t.state!==e&&Pc.enqueueReplaceState(t,t.state,null)}function In(e,t){var a=t;if("ref"in t){a={};for(var s in t)s!=="ref"&&(a[s]=t[s])}if(e=e.defaultProps){a===t&&(a=v({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function sm(e){or(e)}function lm(e){console.error(e)}function im(e){or(e)}function zr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function rm(e,t,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Fc(e,t,a){return a=an(a),a.tag=3,a.payload={element:null},a.callback=function(){zr(e,t)},a}function um(e){return e=an(e),e.tag=3,e}function cm(e,t,a,s){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var c=s.value;e.payload=function(){return u(c)},e.callback=function(){rm(t,a,s)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){rm(t,a,s),typeof u!="function"&&(on===null?on=new Set([this]):on.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function Bv(e,t,a,s,u){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&Ks(t,a,u,!0),a=Ut.current,a!==null){switch(a.tag){case 31:case 13:return Ft===null?Xr():a.alternate===null&&ke===0&&(ke=3),a.flags&=-257,a.flags|=65536,a.lanes=u,s===br?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),jo(e,s,u)),!1;case 22:return a.flags|=65536,s===br?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([s]):a.add(s)),jo(e,s,u)),!1}throw Error(r(435,a.tag))}return jo(e,s,u),Xr(),!1}if(Ee)return t=Ut.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,s!==yc&&(e=Error(r(422),{cause:s}),Xl(Zt(e,a)))):(s!==yc&&(t=Error(r(423),{cause:s}),Xl(Zt(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,s=Zt(s,a),u=Fc(e.stateNode,s,u),Ec(e,u),ke!==4&&(ke=2)),!1;var c=Error(r(520),{cause:s});if(c=Zt(c,a),oi===null?oi=[c]:oi.push(c),ke!==4&&(ke=2),t===null)return!0;s=Zt(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=Fc(a.stateNode,s,e),Ec(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(on===null||!on.has(c))))return a.flags|=65536,u&=-u,a.lanes|=u,u=um(u),cm(u,e,a,s),Ec(a,u),!1}a=a.return}while(a!==null);return!1}var Jc=Error(r(461)),et=!1;function ot(e,t,a,s){t.child=e===null?hh(t,null,a,s):Fn(t,e.child,a,s)}function om(e,t,a,s,u){a=a.render;var c=t.ref;if("ref"in s){var y={};for(var b in s)b!=="ref"&&(y[b]=s[b])}else y=s;return Zn(t),s=Oc(e,t,a,y,c,u),b=zc(),e!==null&&!et?(Dc(e,t,u),Ca(e,t,u)):(Ee&&b&&hc(t),t.flags|=1,ot(e,t,s,u),t.child)}function fm(e,t,a,s,u){if(e===null){var c=a.type;return typeof c=="function"&&!oc(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,dm(e,t,c,s,u)):(e=mr(a.type,null,s,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!lo(e,u)){var y=c.memoizedProps;if(a=a.compare,a=a!==null?a:Gl,a(y,s)&&e.ref===t.ref)return Ca(e,t,u)}return t.flags|=1,e=Na(c,s),e.ref=t.ref,e.return=t,t.child=e}function dm(e,t,a,s,u){if(e!==null){var c=e.memoizedProps;if(Gl(c,s)&&e.ref===t.ref)if(et=!1,t.pendingProps=s=c,lo(e,u))(e.flags&131072)!==0&&(et=!0);else return t.lanes=e.lanes,Ca(e,t,u)}return Ic(e,t,a,s,u)}function hm(e,t,a,s){var u=s.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(s=t.child=e.child,u=0;s!==null;)u=u|s.lanes|s.childLanes,s=s.sibling;s=u&~c}else s=0,t.child=null;return mm(e,t,c,a,s)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vr(t,c!==null?c.cachePool:null),c!==null?gh(t,c):Mc(),ph(t);else return s=t.lanes=536870912,mm(e,t,c!==null?c.baseLanes|a:a,a,s)}else c!==null?(vr(t,c.cachePool),gh(t,c),ln(),t.memoizedState=null):(e!==null&&vr(t,null),Mc(),ln());return ot(e,t,u,a),t.child}function ni(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mm(e,t,a,s,u){var c=jc();return c=c===null?null:{parent:Ie._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&vr(t,null),Mc(),ph(t),e!==null&&Ks(e,t,s,!0),t.childLanes=u,null}function Dr(e,t){return t=Ur({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ym(e,t,a){return Fn(t,e.child,null,a),e=Dr(t,t.pendingProps),e.flags|=2,Bt(t),t.memoizedState=null,e}function qv(e,t,a){var s=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ee){if(s.mode==="hidden")return e=Dr(t,s),t.lanes=536870912,ni(null,e);if(Ac(t),(e=Qe)?(e=T0(e,Pt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ja!==null?{id:ca,overflow:oa}:null,retryLane:536870912,hydrationErrors:null},a=Id(e),a.return=t,t.child=a,ut=t,Qe=null)):e=null,e===null)throw Wa(t);return t.lanes=536870912,null}return Dr(t,s)}var c=e.memoizedState;if(c!==null){var y=c.dehydrated;if(Ac(t),u)if(t.flags&256)t.flags&=-257,t=ym(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(et||Ks(e,t,a,!1),u=(a&e.childLanes)!==0,et||u){if(s=qe,s!==null&&(y=ld(s,a),y!==0&&y!==c.retryLane))throw c.retryLane=y,Gn(e,y),Mt(s,e,y),Jc;Xr(),t=ym(e,t,a)}else e=c.treeContext,Qe=Jt(y.nextSibling),ut=t,Ee=!0,Ia=null,Pt=!1,e!==null&&th(t,e),t=Dr(t,s),t.flags|=4096;return t}return e=Na(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lr(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Ic(e,t,a,s,u){return Zn(t),a=Oc(e,t,a,s,void 0,u),s=zc(),e!==null&&!et?(Dc(e,t,u),Ca(e,t,u)):(Ee&&s&&hc(t),t.flags|=1,ot(e,t,a,u),t.child)}function gm(e,t,a,s,u,c){return Zn(t),t.updateQueue=null,a=xh(t,s,a,u),vh(e),s=zc(),e!==null&&!et?(Dc(e,t,c),Ca(e,t,c)):(Ee&&s&&hc(t),t.flags|=1,ot(e,t,a,c),t.child)}function pm(e,t,a,s,u){if(Zn(t),t.stateNode===null){var c=Hs,y=a.contextType;typeof y=="object"&&y!==null&&(c=ct(y)),c=new a(s,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Pc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=s,c.state=t.memoizedState,c.refs={},Rc(t),y=a.contextType,c.context=typeof y=="object"&&y!==null?ct(y):Hs,c.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&($c(t,a,y,s),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(y=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),y!==c.state&&Pc.enqueueReplaceState(c,c.state,null),Il(t,s,c,u),Jl(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,R=In(a,b);c.props=R;var z=c.context,H=a.contextType;y=Hs,typeof H=="object"&&H!==null&&(y=ct(H));var k=a.getDerivedStateFromProps;H=typeof k=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,H||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||z!==y)&&nm(t,c,s,y),tn=!1;var U=t.memoizedState;c.state=U,Il(t,s,c,u),Jl(),z=t.memoizedState,b||U!==z||tn?(typeof k=="function"&&($c(t,a,k,s),z=t.memoizedState),(R=tn||am(t,a,R,s,U,z,y))?(H||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=z),c.props=s,c.state=z,c.context=y,s=R):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{c=t.stateNode,_c(e,t),y=t.memoizedProps,H=In(a,y),c.props=H,k=t.pendingProps,U=c.context,z=a.contextType,R=Hs,typeof z=="object"&&z!==null&&(R=ct(z)),b=a.getDerivedStateFromProps,(z=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y!==k||U!==R)&&nm(t,c,s,R),tn=!1,U=t.memoizedState,c.state=U,Il(t,s,c,u),Jl();var B=t.memoizedState;y!==k||U!==B||tn||e!==null&&e.dependencies!==null&&gr(e.dependencies)?(typeof b=="function"&&($c(t,a,b,s),B=t.memoizedState),(H=tn||am(t,a,H,s,U,B,R)||e!==null&&e.dependencies!==null&&gr(e.dependencies))?(z||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,B,R),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,B,R)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=B),c.props=s,c.state=B,c.context=R,s=H):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),s=!1)}return c=s,Lr(e,t),s=(t.flags&128)!==0,c||s?(c=t.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&s?(t.child=Fn(t,e.child,null,u),t.child=Fn(t,null,a,u)):ot(e,t,a,u),t.memoizedState=c.state,e=t.child):e=Ca(e,t,u),e}function vm(e,t,a,s){return Vn(),t.flags|=256,ot(e,t,a,s),t.child}var Wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function eo(e){return{baseLanes:e,cachePool:rh()}}function to(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ht),e}function xm(e,t,a){var s=t.pendingProps,u=!1,c=(t.flags&128)!==0,y;if((y=c)||(y=e!==null&&e.memoizedState===null?!1:(Fe.current&2)!==0),y&&(u=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ee){if(u?sn(t):ln(),(e=Qe)?(e=T0(e,Pt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ja!==null?{id:ca,overflow:oa}:null,retryLane:536870912,hydrationErrors:null},a=Id(e),a.return=t,t.child=a,ut=t,Qe=null)):e=null,e===null)throw Wa(t);return qo(e)?t.lanes=32:t.lanes=536870912,null}var b=s.children;return s=s.fallback,u?(ln(),u=t.mode,b=Ur({mode:"hidden",children:b},u),s=Kn(s,u,a,null),b.return=t,s.return=t,b.sibling=s,t.child=b,s=t.child,s.memoizedState=eo(a),s.childLanes=to(e,y,a),t.memoizedState=Wc,ni(null,s)):(sn(t),ao(t,b))}var R=e.memoizedState;if(R!==null&&(b=R.dehydrated,b!==null)){if(c)t.flags&256?(sn(t),t.flags&=-257,t=no(e,t,a)):t.memoizedState!==null?(ln(),t.child=e.child,t.flags|=128,t=null):(ln(),b=s.fallback,u=t.mode,s=Ur({mode:"visible",children:s.children},u),b=Kn(b,u,a,null),b.flags|=2,s.return=t,b.return=t,s.sibling=b,t.child=s,Fn(t,e.child,null,a),s=t.child,s.memoizedState=eo(a),s.childLanes=to(e,y,a),t.memoizedState=Wc,t=ni(null,s));else if(sn(t),qo(b)){if(y=b.nextSibling&&b.nextSibling.dataset,y)var z=y.dgst;y=z,s=Error(r(419)),s.stack="",s.digest=y,Xl({value:s,source:null,stack:null}),t=no(e,t,a)}else if(et||Ks(e,t,a,!1),y=(a&e.childLanes)!==0,et||y){if(y=qe,y!==null&&(s=ld(y,a),s!==0&&s!==R.retryLane))throw R.retryLane=s,Gn(e,s),Mt(y,e,s),Jc;Bo(b)||Xr(),t=no(e,t,a)}else Bo(b)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,Qe=Jt(b.nextSibling),ut=t,Ee=!0,Ia=null,Pt=!1,e!==null&&th(t,e),t=ao(t,s.children),t.flags|=4096);return t}return u?(ln(),b=s.fallback,u=t.mode,R=e.child,z=R.sibling,s=Na(R,{mode:"hidden",children:s.children}),s.subtreeFlags=R.subtreeFlags&65011712,z!==null?b=Na(z,b):(b=Kn(b,u,a,null),b.flags|=2),b.return=t,s.return=t,s.sibling=b,t.child=s,ni(null,s),s=t.child,b=e.child.memoizedState,b===null?b=eo(a):(u=b.cachePool,u!==null?(R=Ie._currentValue,u=u.parent!==R?{parent:R,pool:R}:u):u=rh(),b={baseLanes:b.baseLanes|a,cachePool:u}),s.memoizedState=b,s.childLanes=to(e,y,a),t.memoizedState=Wc,ni(e.child,s)):(sn(t),a=e.child,e=a.sibling,a=Na(a,{mode:"visible",children:s.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function ao(e,t){return t=Ur({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ur(e,t){return e=Lt(22,e,null,t),e.lanes=0,e}function no(e,t,a){return Fn(t,e.child,null,a),e=ao(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bm(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),vc(e.return,t,a)}function so(e,t,a,s,u,c){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:u,treeForkCount:c}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=a,y.tailMode=u,y.treeForkCount=c)}function Sm(e,t,a){var s=t.pendingProps,u=s.revealOrder,c=s.tail;s=s.children;var y=Fe.current,b=(y&2)!==0;if(b?(y=y&1|2,t.flags|=128):y&=1,q(Fe,y),ot(e,t,s,a),s=Ee?Vl:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bm(e,a,t);else if(e.tag===19)bm(e,a,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(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&Rr(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),so(t,!1,u,a,c,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Rr(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}so(t,!0,a,null,c,s);break;case"together":so(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ca(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),cn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ks(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=Na(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Na(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function lo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&gr(e)))}function Hv(e,t,a){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),en(t,Ie,e.memoizedState.cache),Vn();break;case 27:case 5:ra(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:en(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ac(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(sn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?xm(e,t,a):(sn(t),e=Ca(e,t,a),e!==null?e.sibling:null);sn(t);break;case 19:var u=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(Ks(e,t,a,!1),s=(a&t.childLanes)!==0),u){if(s)return Sm(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),q(Fe,Fe.current),s)break;return null;case 22:return t.lanes=0,hm(e,t,a,t.pendingProps);case 24:en(t,Ie,e.memoizedState.cache)}return Ca(e,t,a)}function jm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)et=!0;else{if(!lo(e,a)&&(t.flags&128)===0)return et=!1,Hv(e,t,a);et=(e.flags&131072)!==0}else et=!1,Ee&&(t.flags&1048576)!==0&&eh(t,Vl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=$n(t.elementType),t.type=e,typeof e=="function")oc(e)?(s=In(e,s),t.tag=1,t=pm(null,t,e,s,a)):(t.tag=0,t=Ic(null,t,e,s,a));else{if(e!=null){var u=e.$$typeof;if(u===L){t.tag=11,t=om(null,t,e,s,a);break e}else if(u===P){t.tag=14,t=fm(null,t,e,s,a);break e}}throw t=ue(e)||e,Error(r(306,t,""))}}return t;case 0:return Ic(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,u=In(s,t.pendingProps),pm(e,t,s,u,a);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var c=t.memoizedState;u=c.element,_c(e,t),Il(t,s,null,a);var y=t.memoizedState;if(s=y.cache,en(t,Ie,s),s!==c.cache&&xc(t,[Ie],a,!0),Jl(),s=y.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=vm(e,t,s,a);break e}else if(s!==u){u=Zt(Error(r(424)),t),Xl(u),t=vm(e,t,s,a);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(Qe=Jt(e.firstChild),ut=t,Ee=!0,Ia=null,Pt=!0,a=hh(t,null,s,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Vn(),s===u){t=Ca(e,t,a);break e}ot(e,t,s,a)}t=t.child}return t;case 26:return Lr(e,t),e===null?(a=z0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ee||(a=t.type,e=t.pendingProps,s=Ir(xe.current).createElement(a),s[rt]=t,s[jt]=e,ft(s,a,e),st(s),t.stateNode=s):t.memoizedState=z0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ra(t),e===null&&Ee&&(s=t.stateNode=A0(t.type,t.pendingProps,xe.current),ut=t,Pt=!0,u=Qe,mn(t.type)?(Ho=u,Qe=Jt(s.firstChild)):Qe=u),ot(e,t,t.pendingProps.children,a),Lr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ee&&((u=s=Qe)&&(s=yx(s,t.type,t.pendingProps,Pt),s!==null?(t.stateNode=s,ut=t,Qe=Jt(s.firstChild),Pt=!1,u=!0):u=!1),u||Wa(t)),ra(t),u=t.type,c=t.pendingProps,y=e!==null?e.memoizedProps:null,s=c.children,Do(u,c)?s=null:y!==null&&Do(u,y)&&(t.flags|=32),t.memoizedState!==null&&(u=Oc(e,t,Av,null,null,a),vi._currentValue=u),Lr(e,t),ot(e,t,s,a),t.child;case 6:return e===null&&Ee&&((e=a=Qe)&&(a=gx(a,t.pendingProps,Pt),a!==null?(t.stateNode=a,ut=t,Qe=null,e=!0):e=!1),e||Wa(t)),null;case 13:return xm(e,t,a);case 4:return Pe(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Fn(t,null,s,a):ot(e,t,s,a),t.child;case 11:return om(e,t,t.type,t.pendingProps,a);case 7:return ot(e,t,t.pendingProps,a),t.child;case 8:return ot(e,t,t.pendingProps.children,a),t.child;case 12:return ot(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.pendingProps,en(t,t.type,s.value),ot(e,t,s.children,a),t.child;case 9:return u=t.type._context,s=t.pendingProps.children,Zn(t),u=ct(u),s=s(u),t.flags|=1,ot(e,t,s,a),t.child;case 14:return fm(e,t,t.type,t.pendingProps,a);case 15:return dm(e,t,t.type,t.pendingProps,a);case 19:return Sm(e,t,a);case 31:return qv(e,t,a);case 22:return hm(e,t,a,t.pendingProps);case 24:return Zn(t),s=ct(Ie),e===null?(u=jc(),u===null&&(u=qe,c=bc(),u.pooledCache=c,c.refCount++,c!==null&&(u.pooledCacheLanes|=a),u=c),t.memoizedState={parent:s,cache:u},Rc(t),en(t,Ie,u)):((e.lanes&a)!==0&&(_c(e,t),Il(t,null,null,a),Jl()),u=e.memoizedState,c=t.memoizedState,u.parent!==s?(u={parent:s,cache:s},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),en(t,Ie,s)):(s=c.cache,en(t,Ie,s),s!==u.cache&&xc(t,[Ie],a,!0))),ot(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Aa(e){e.flags|=4}function io(e,t,a,s,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Pm())e.flags|=8192;else throw Pn=br,Nc}else e.flags&=-16777217}function Nm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!q0(t))if(Pm())e.flags|=8192;else throw Pn=br,Nc}function Br(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ad():536870912,e.lanes|=t,tl|=t)}function si(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,s|=u.subtreeFlags&65011712,s|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,s|=u.subtreeFlags,s|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=s,e.childLanes=a,t}function Qv(e,t,a){var s=t.pendingProps;switch(mc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ea(Ie),He(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Gs(t)?Aa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gc())),Ye(t),null;case 26:var u=t.type,c=t.memoizedState;return e===null?(Aa(t),c!==null?(Ye(t),Nm(t,c)):(Ye(t),io(t,u,null,s,a))):c?c!==e.memoizedState?(Aa(t),Ye(t),Nm(t,c)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Aa(t),Ye(t),io(t,u,e,s,a)),null;case 27:if(va(t),a=xe.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Aa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}e=W.current,Gs(t)?ah(t):(e=A0(u,s,a),t.stateNode=e,Aa(t))}return Ye(t),null;case 5:if(va(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Aa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}if(c=W.current,Gs(t))ah(t);else{var y=Ir(xe.current);switch(c){case 1:c=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:c=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":c=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":c=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":c=y.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?y.createElement(u,{is:s.is}):y.createElement(u)}}c[rt]=t,c[jt]=s;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)c.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=c;e:switch(ft(c,u,s),u){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Aa(t)}}return Ye(t),io(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Aa(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=xe.current,Gs(t)){if(e=t.stateNode,a=t.memoizedProps,s=null,u=ut,u!==null)switch(u.tag){case 27:case 5:s=u.memoizedProps}e[rt]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||x0(e.nodeValue,a)),e||Wa(t,!0)}else e=Ir(e).createTextNode(s),e[rt]=t,t.stateNode=e}return Ye(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(s=Gs(t),a!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[rt]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else a=gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Bt(t),t):(Bt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ye(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Gs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[rt]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),u=!1}else u=gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Bt(t),t):(Bt(t),null)}return Bt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=s!==null,e=e!==null&&e.memoizedState!==null,a&&(s=t.child,u=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(u=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==u&&(s.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Br(t,t.updateQueue),Ye(t),null);case 4:return He(),e===null&&Co(t.stateNode.containerInfo),Ye(t),null;case 10:return Ea(t.type),Ye(t),null;case 19:if(Y(Fe),s=t.memoizedState,s===null)return Ye(t),null;if(u=(t.flags&128)!==0,c=s.rendering,c===null)if(u)si(s,!1);else{if(ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Rr(e),c!==null){for(t.flags|=128,si(s,!1),e=c.updateQueue,t.updateQueue=e,Br(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Jd(a,e),a=a.sibling;return q(Fe,Fe.current&1|2),Ee&&Ra(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Se()>Gr&&(t.flags|=128,u=!0,si(s,!1),t.lanes=4194304)}else{if(!u)if(e=Rr(c),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Br(t,e),si(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Ee)return Ye(t),null}else 2*Se()-s.renderingStartTime>Gr&&a!==536870912&&(t.flags|=128,u=!0,si(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(e=s.last,e!==null?e.sibling=c:t.child=c,s.last=c)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Se(),e.sibling=null,a=Fe.current,q(Fe,u?a&1|2:a&1),Ee&&Ra(t,s.treeForkCount),e):(Ye(t),null);case 22:case 23:return Bt(t),Cc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(a&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),a=t.updateQueue,a!==null&&Br(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==a&&(t.flags|=2048),e!==null&&Y(kn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ea(Ie),Ye(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Yv(e,t){switch(mc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ea(Ie),He(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return va(t),null;case 31:if(t.memoizedState!==null){if(Bt(t),t.alternate===null)throw Error(r(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Bt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Fe),null;case 4:return He(),null;case 10:return Ea(t.type),null;case 22:case 23:return Bt(t),Cc(),e!==null&&Y(kn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ea(Ie),null;case 25:return null;default:return null}}function Rm(e,t){switch(mc(t),t.tag){case 3:Ea(Ie),He();break;case 26:case 27:case 5:va(t);break;case 4:He();break;case 31:t.memoizedState!==null&&Bt(t);break;case 13:Bt(t);break;case 19:Y(Fe);break;case 10:Ea(t.type);break;case 22:case 23:Bt(t),Cc(),e!==null&&Y(kn);break;case 24:Ea(Ie)}}function li(e,t){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var u=s.next;a=u;do{if((a.tag&e)===e){s=void 0;var c=a.create,y=a.inst;s=c(),y.destroy=s}a=a.next}while(a!==u)}}catch(b){De(t,t.return,b)}}function rn(e,t,a){try{var s=t.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var c=u.next;s=c;do{if((s.tag&e)===e){var y=s.inst,b=y.destroy;if(b!==void 0){y.destroy=void 0,u=t;var R=a,z=b;try{z()}catch(H){De(u,R,H)}}}s=s.next}while(s!==c)}}catch(H){De(t,t.return,H)}}function _m(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{yh(t,a)}catch(s){De(e,e.return,s)}}}function Em(e,t,a){a.props=In(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){De(e,t,s)}}function ii(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(u){De(e,t,u)}}function fa(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(u){De(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){De(e,t,u)}else a.current=null}function Tm(e){var t=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(u){De(e,e.return,u)}}function ro(e,t,a){try{var s=e.stateNode;cx(s,e.type,a,t),s[jt]=t}catch(u){De(e,e.return,u)}}function Mm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&mn(e.type)||e.tag===4}function uo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mm(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&&mn(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 co(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Sa));else if(s!==4&&(s===27&&mn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(co(e,t,a),e=e.sibling;e!==null;)co(e,t,a),e=e.sibling}function qr(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(s!==4&&(s===27&&mn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(qr(e,t,a),e=e.sibling;e!==null;)qr(e,t,a),e=e.sibling}function Cm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);ft(t,s,a),t[rt]=e,t[jt]=a}catch(c){De(e,e.return,c)}}var wa=!1,tt=!1,oo=!1,Am=typeof WeakSet=="function"?WeakSet:Set,lt=null;function Gv(e,t){if(e=e.containerInfo,Oo=lu,e=Gd(e),nc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var u=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var y=0,b=-1,R=-1,z=0,H=0,k=e,U=null;t:for(;;){for(var B;k!==a||u!==0&&k.nodeType!==3||(b=y+u),k!==c||s!==0&&k.nodeType!==3||(R=y+s),k.nodeType===3&&(y+=k.nodeValue.length),(B=k.firstChild)!==null;)U=k,k=B;for(;;){if(k===e)break t;if(U===a&&++z===u&&(b=y),U===c&&++H===s&&(R=y),(B=k.nextSibling)!==null)break;k=U,U=k.parentNode}k=B}a=b===-1||R===-1?null:{start:b,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(zo={focusedElem:e,selectionRange:a},lu=!1,lt=t;lt!==null;)if(t=lt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,lt=e;else for(;lt!==null;){switch(t=lt,c=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(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,u=c.memoizedProps,c=c.memoizedState,s=a.stateNode;try{var ie=In(a.type,u);e=s.getSnapshotBeforeUpdate(ie,c),s.__reactInternalSnapshotBeforeUpdate=e}catch(de){De(a,a.return,de)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Uo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Uo(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,lt=e;break}lt=t.return}}function wm(e,t,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:za(e,a),s&4&&li(5,a);break;case 1:if(za(e,a),s&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){De(a,a.return,y)}else{var u=In(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){De(a,a.return,y)}}s&64&&_m(a),s&512&&ii(a,a.return);break;case 3:if(za(e,a),s&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{yh(e,t)}catch(y){De(a,a.return,y)}}break;case 27:t===null&&s&4&&Cm(a);case 26:case 5:za(e,a),t===null&&s&4&&Tm(a),s&512&&ii(a,a.return);break;case 12:za(e,a);break;case 31:za(e,a),s&4&&Dm(e,a);break;case 13:za(e,a),s&4&&Lm(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Jv.bind(null,a),px(e,a))));break;case 22:if(s=a.memoizedState!==null||wa,!s){t=t!==null&&t.memoizedState!==null||tt,u=wa;var c=tt;wa=s,(tt=t)&&!c?Da(e,a,(a.subtreeFlags&8772)!==0):za(e,a),wa=u,tt=c}break;case 30:break;default:za(e,a)}}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&&Qu(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 Ge=null,Rt=!1;function Oa(e,t,a){for(a=a.child;a!==null;)zm(e,t,a),a=a.sibling}function zm(e,t,a){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Al,a)}catch{}switch(a.tag){case 26:tt||fa(a,t),Oa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:tt||fa(a,t);var s=Ge,u=Rt;mn(a.type)&&(Ge=a.stateNode,Rt=!1),Oa(e,t,a),yi(a.stateNode),Ge=s,Rt=u;break;case 5:tt||fa(a,t);case 6:if(s=Ge,u=Rt,Ge=null,Oa(e,t,a),Ge=s,Rt=u,Ge!==null)if(Rt)try{(Ge.nodeType===9?Ge.body:Ge.nodeName==="HTML"?Ge.ownerDocument.body:Ge).removeChild(a.stateNode)}catch(c){De(a,t,c)}else try{Ge.removeChild(a.stateNode)}catch(c){De(a,t,c)}break;case 18:Ge!==null&&(Rt?(e=Ge,_0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),cl(e)):_0(Ge,a.stateNode));break;case 4:s=Ge,u=Rt,Ge=a.stateNode.containerInfo,Rt=!0,Oa(e,t,a),Ge=s,Rt=u;break;case 0:case 11:case 14:case 15:rn(2,a,t),tt||rn(4,a,t),Oa(e,t,a);break;case 1:tt||(fa(a,t),s=a.stateNode,typeof s.componentWillUnmount=="function"&&Em(a,t,s)),Oa(e,t,a);break;case 21:Oa(e,t,a);break;case 22:tt=(s=tt)||a.memoizedState!==null,Oa(e,t,a),tt=s;break;default:Oa(e,t,a)}}function Dm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{cl(e)}catch(a){De(t,t.return,a)}}}function Lm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{cl(e)}catch(a){De(t,t.return,a)}}function Kv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Am),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Am),t;default:throw Error(r(435,e.tag))}}function Hr(e,t){var a=Kv(e);t.forEach(function(s){if(!a.has(s)){a.add(s);var u=Iv.bind(null,e,s);s.then(u,u)}})}function _t(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var u=a[s],c=e,y=t,b=y;e:for(;b!==null;){switch(b.tag){case 27:if(mn(b.type)){Ge=b.stateNode,Rt=!1;break e}break;case 5:Ge=b.stateNode,Rt=!1;break e;case 3:case 4:Ge=b.stateNode.containerInfo,Rt=!0;break e}b=b.return}if(Ge===null)throw Error(r(160));zm(c,y,u),Ge=null,Rt=!1,c=u.alternate,c!==null&&(c.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Um(t,e),t=t.sibling}var na=null;function Um(e,t){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_t(t,e),Et(e),s&4&&(rn(3,e,e.return),li(3,e),rn(5,e,e.return));break;case 1:_t(t,e),Et(e),s&512&&(tt||a===null||fa(a,a.return)),s&64&&wa&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var u=na;if(_t(t,e),Et(e),s&512&&(tt||a===null||fa(a,a.return)),s&4){var c=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(s){case"title":c=u.getElementsByTagName("title")[0],(!c||c[zl]||c[rt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=u.createElement(s),u.head.insertBefore(c,u.querySelector("head > title"))),ft(c,s,a),c[rt]=e,st(c),s=c;break e;case"link":var y=U0("link","href",u).get(s+(a.href||""));if(y){for(var b=0;b<y.length;b++)if(c=y[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(b,1);break t}}c=u.createElement(s),ft(c,s,a),u.head.appendChild(c);break;case"meta":if(y=U0("meta","content",u).get(s+(a.content||""))){for(b=0;b<y.length;b++)if(c=y[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(b,1);break t}}c=u.createElement(s),ft(c,s,a),u.head.appendChild(c);break;default:throw Error(r(468,s))}c[rt]=e,st(c),s=c}e.stateNode=s}else B0(u,e.type,e.stateNode);else e.stateNode=L0(u,s,e.memoizedProps);else c!==s?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,s===null?B0(u,e.type,e.stateNode):L0(u,s,e.memoizedProps)):s===null&&e.stateNode!==null&&ro(e,e.memoizedProps,a.memoizedProps)}break;case 27:_t(t,e),Et(e),s&512&&(tt||a===null||fa(a,a.return)),a!==null&&s&4&&ro(e,e.memoizedProps,a.memoizedProps);break;case 5:if(_t(t,e),Et(e),s&512&&(tt||a===null||fa(a,a.return)),e.flags&32){u=e.stateNode;try{Os(u,"")}catch(ie){De(e,e.return,ie)}}s&4&&e.stateNode!=null&&(u=e.memoizedProps,ro(e,u,a!==null?a.memoizedProps:u)),s&1024&&(oo=!0);break;case 6:if(_t(t,e),Et(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(ie){De(e,e.return,ie)}}break;case 3:if(tu=null,u=na,na=Wr(t.containerInfo),_t(t,e),na=u,Et(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{cl(t.containerInfo)}catch(ie){De(e,e.return,ie)}oo&&(oo=!1,Bm(e));break;case 4:s=na,na=Wr(e.stateNode.containerInfo),_t(t,e),Et(e),na=s;break;case 12:_t(t,e),Et(e);break;case 31:_t(t,e),Et(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hr(e,s)));break;case 13:_t(t,e),Et(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Yr=Se()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hr(e,s)));break;case 22:u=e.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,z=wa,H=tt;if(wa=z||u,tt=H||R,_t(t,e),tt=H,wa=z,Et(e),s&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||R||wa||tt||Wn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){R=a=t;try{if(c=R.stateNode,u)y=c.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{b=R.stateNode;var k=R.memoizedProps.style,U=k!=null&&k.hasOwnProperty("display")?k.display:null;b.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ie){De(R,R.return,ie)}}}else if(t.tag===6){if(a===null){R=t;try{R.stateNode.nodeValue=u?"":R.memoizedProps}catch(ie){De(R,R.return,ie)}}}else if(t.tag===18){if(a===null){R=t;try{var B=R.stateNode;u?E0(B,!0):E0(R.stateNode,!1)}catch(ie){De(R,R.return,ie)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Hr(e,a))));break;case 19:_t(t,e),Et(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hr(e,s)));break;case 30:break;case 21:break;default:_t(t,e),Et(e)}}function Et(e){var t=e.flags;if(t&2){try{for(var a,s=e.return;s!==null;){if(Mm(s)){a=s;break}s=s.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var u=a.stateNode,c=uo(e);qr(e,c,u);break;case 5:var y=a.stateNode;a.flags&32&&(Os(y,""),a.flags&=-33);var b=uo(e);qr(e,b,y);break;case 3:case 4:var R=a.stateNode.containerInfo,z=uo(e);co(e,z,R);break;default:throw Error(r(161))}}catch(H){De(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Bm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function za(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)wm(e,t.alternate,t),t=t.sibling}function Wn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:rn(4,t,t.return),Wn(t);break;case 1:fa(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Em(t,t.return,a),Wn(t);break;case 27:yi(t.stateNode);case 26:case 5:fa(t,t.return),Wn(t);break;case 22:t.memoizedState===null&&Wn(t);break;case 30:Wn(t);break;default:Wn(t)}e=e.sibling}}function Da(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,u=e,c=t,y=c.flags;switch(c.tag){case 0:case 11:case 15:Da(u,c,a),li(4,c);break;case 1:if(Da(u,c,a),s=c,u=s.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(z){De(s,s.return,z)}if(s=c,u=s.updateQueue,u!==null){var b=s.stateNode;try{var R=u.shared.hiddenCallbacks;if(R!==null)for(u.shared.hiddenCallbacks=null,u=0;u<R.length;u++)mh(R[u],b)}catch(z){De(s,s.return,z)}}a&&y&64&&_m(c),ii(c,c.return);break;case 27:Cm(c);case 26:case 5:Da(u,c,a),a&&s===null&&y&4&&Tm(c),ii(c,c.return);break;case 12:Da(u,c,a);break;case 31:Da(u,c,a),a&&y&4&&Dm(u,c);break;case 13:Da(u,c,a),a&&y&4&&Lm(u,c);break;case 22:c.memoizedState===null&&Da(u,c,a),ii(c,c.return);break;case 30:break;default:Da(u,c,a)}t=t.sibling}}function fo(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Zl(a))}function ho(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zl(e))}function sa(e,t,a,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)qm(e,t,a,s),t=t.sibling}function qm(e,t,a,s){var u=t.flags;switch(t.tag){case 0:case 11:case 15:sa(e,t,a,s),u&2048&&li(9,t);break;case 1:sa(e,t,a,s);break;case 3:sa(e,t,a,s),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zl(e)));break;case 12:if(u&2048){sa(e,t,a,s),e=t.stateNode;try{var c=t.memoizedProps,y=c.id,b=c.onPostCommit;typeof b=="function"&&b(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){De(t,t.return,R)}}else sa(e,t,a,s);break;case 31:sa(e,t,a,s);break;case 13:sa(e,t,a,s);break;case 23:break;case 22:c=t.stateNode,y=t.alternate,t.memoizedState!==null?c._visibility&2?sa(e,t,a,s):ri(e,t):c._visibility&2?sa(e,t,a,s):(c._visibility|=2,Is(e,t,a,s,(t.subtreeFlags&10256)!==0||!1)),u&2048&&fo(y,t);break;case 24:sa(e,t,a,s),u&2048&&ho(t.alternate,t);break;default:sa(e,t,a,s)}}function Is(e,t,a,s,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,y=t,b=a,R=s,z=y.flags;switch(y.tag){case 0:case 11:case 15:Is(c,y,b,R,u),li(8,y);break;case 23:break;case 22:var H=y.stateNode;y.memoizedState!==null?H._visibility&2?Is(c,y,b,R,u):ri(c,y):(H._visibility|=2,Is(c,y,b,R,u)),u&&z&2048&&fo(y.alternate,y);break;case 24:Is(c,y,b,R,u),u&&z&2048&&ho(y.alternate,y);break;default:Is(c,y,b,R,u)}t=t.sibling}}function ri(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,s=t,u=s.flags;switch(s.tag){case 22:ri(a,s),u&2048&&fo(s.alternate,s);break;case 24:ri(a,s),u&2048&&ho(s.alternate,s);break;default:ri(a,s)}t=t.sibling}}var ui=8192;function Ws(e,t,a){if(e.subtreeFlags&ui)for(e=e.child;e!==null;)Hm(e,t,a),e=e.sibling}function Hm(e,t,a){switch(e.tag){case 26:Ws(e,t,a),e.flags&ui&&e.memoizedState!==null&&Cx(a,na,e.memoizedState,e.memoizedProps);break;case 5:Ws(e,t,a);break;case 3:case 4:var s=na;na=Wr(e.stateNode.containerInfo),Ws(e,t,a),na=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=ui,ui=16777216,Ws(e,t,a),ui=s):Ws(e,t,a));break;default:Ws(e,t,a)}}function Qm(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 ci(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];lt=s,Gm(s,e)}Qm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ym(e),e=e.sibling}function Ym(e){switch(e.tag){case 0:case 11:case 15:ci(e),e.flags&2048&&rn(9,e,e.return);break;case 3:ci(e);break;case 12:ci(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qr(e)):ci(e);break;default:ci(e)}}function Qr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];lt=s,Gm(s,e)}Qm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:rn(8,t,t.return),Qr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Qr(t));break;default:Qr(t)}e=e.sibling}}function Gm(e,t){for(;lt!==null;){var a=lt;switch(a.tag){case 0:case 11:case 15:rn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Zl(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,lt=s;else e:for(a=e;lt!==null;){s=lt;var u=s.sibling,c=s.return;if(Om(s),s===a){lt=null;break e}if(u!==null){u.return=c,lt=u;break e}lt=c}}}var Vv={getCacheForType:function(e){var t=ct(Ie),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return ct(Ie).controller.signal}},Xv=typeof WeakMap=="function"?WeakMap:Map,we=0,qe=null,je=null,Re=0,ze=0,qt=null,un=!1,el=!1,mo=!1,La=0,ke=0,cn=0,es=0,yo=0,Ht=0,tl=0,oi=null,Tt=null,go=!1,Yr=0,Km=0,Gr=1/0,Kr=null,on=null,at=0,fn=null,al=null,Ua=0,po=0,vo=null,Vm=null,fi=0,xo=null;function Qt(){return(we&2)!==0&&Re!==0?Re&-Re:D.T!==null?_o():id()}function Xm(){if(Ht===0)if((Re&536870912)===0||Ee){var e=Ji;Ji<<=1,(Ji&3932160)===0&&(Ji=262144),Ht=e}else Ht=536870912;return e=Ut.current,e!==null&&(e.flags|=32),Ht}function Mt(e,t,a){(e===qe&&(ze===2||ze===9)||e.cancelPendingCommit!==null)&&(nl(e,0),dn(e,Re,Ht,!1)),Ol(e,a),((we&2)===0||e!==qe)&&(e===qe&&((we&2)===0&&(es|=a),ke===4&&dn(e,Re,Ht,!1)),da(e))}function Zm(e,t,a){if((we&6)!==0)throw Error(r(327));var s=!a&&(t&127)===0&&(t&e.expiredLanes)===0||wl(e,t),u=s?$v(e,t):So(e,t,!0),c=s;do{if(u===0){el&&!s&&dn(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!Zv(a)){u=So(e,t,!1),c=!1;continue}if(u===2){if(c=t,e.errorRecoveryDisabledLanes&c)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var b=e;u=oi;var R=b.current.memoizedState.isDehydrated;if(R&&(nl(b,y).flags|=256),y=So(b,y,!1),y!==2){if(mo&&!R){b.errorRecoveryDisabledLanes|=c,es|=c,u=4;break e}c=Tt,Tt=u,c!==null&&(Tt===null?Tt=c:Tt.push.apply(Tt,c))}u=y}if(c=!1,u!==2)continue}}if(u===1){nl(e,0),dn(e,t,0,!0);break}e:{switch(s=e,c=u,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:dn(s,t,Ht,!un);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=Yr+300-Se(),10<u)){if(dn(s,t,Ht,!un),Wi(s,0,!0)!==0)break e;Ua=t,s.timeoutHandle=N0(km.bind(null,s,a,Tt,Kr,go,t,Ht,es,tl,un,c,"Throttled",-0,0),u);break e}km(s,a,Tt,Kr,go,t,Ht,es,tl,un,c,null,-0,0)}}break}while(!0);da(e)}function km(e,t,a,s,u,c,y,b,R,z,H,k,U,B){if(e.timeoutHandle=-1,k=t.subtreeFlags,k&8192||(k&16785408)===16785408){k={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Sa},Hm(t,c,k);var ie=(c&62914560)===c?Yr-Se():(c&4194048)===c?Km-Se():0;if(ie=Ax(k,ie),ie!==null){Ua=c,e.cancelPendingCommit=ie(t0.bind(null,e,t,c,a,s,u,y,b,R,H,k,null,U,B)),dn(e,c,y,!z);return}}t0(e,t,c,a,s,u,y,b,R)}function Zv(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var u=a[s],c=u.getSnapshot;u=u.value;try{if(!Dt(c(),u))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 dn(e,t,a,s){t&=~yo,t&=~es,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var u=t;0<u;){var c=31-zt(u),y=1<<c;s[c]=-1,u&=~y}a!==0&&nd(e,a,t)}function Vr(){return(we&6)===0?(di(0),!1):!0}function bo(){if(je!==null){if(ze===0)var e=je.return;else e=je,_a=Xn=null,Lc(e),ks=null,$l=0,e=je;for(;e!==null;)Rm(e.alternate,e),e=e.return;je=null}}function nl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,dx(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ua=0,bo(),qe=e,je=a=Na(e.current,null),Re=t,ze=0,qt=null,un=!1,el=wl(e,t),mo=!1,tl=Ht=yo=es=cn=ke=0,Tt=oi=null,go=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var u=31-zt(s),c=1<<u;t|=e[u],s&=~c}return La=t,fr(),a}function $m(e,t){ge=null,D.H=ai,t===Zs||t===xr?(t=oh(),ze=3):t===Nc?(t=oh(),ze=4):ze=t===Jc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qt=t,je===null&&(ke=1,zr(e,Zt(t,e.current)))}function Pm(){var e=Ut.current;return e===null?!0:(Re&4194048)===Re?Ft===null:(Re&62914560)===Re||(Re&536870912)!==0?e===Ft:!1}function Fm(){var e=D.H;return D.H=ai,e===null?ai:e}function Jm(){var e=D.A;return D.A=Vv,e}function Xr(){ke=4,un||(Re&4194048)!==Re&&Ut.current!==null||(el=!0),(cn&134217727)===0&&(es&134217727)===0||qe===null||dn(qe,Re,Ht,!1)}function So(e,t,a){var s=we;we|=2;var u=Fm(),c=Jm();(qe!==e||Re!==t)&&(Kr=null,nl(e,t)),t=!1;var y=ke;e:do try{if(ze!==0&&je!==null){var b=je,R=qt;switch(ze){case 8:bo(),y=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(t=!0);var z=ze;if(ze=0,qt=null,sl(e,b,R,z),a&&el){y=0;break e}break;default:z=ze,ze=0,qt=null,sl(e,b,R,z)}}kv(),y=ke;break}catch(H){$m(e,H)}while(!0);return t&&e.shellSuspendCounter++,_a=Xn=null,we=s,D.H=u,D.A=c,je===null&&(qe=null,Re=0,fr()),y}function kv(){for(;je!==null;)Im(je)}function $v(e,t){var a=we;we|=2;var s=Fm(),u=Jm();qe!==e||Re!==t?(Kr=null,Gr=Se()+500,nl(e,t)):el=wl(e,t);e:do try{if(ze!==0&&je!==null){t=je;var c=qt;t:switch(ze){case 1:ze=0,qt=null,sl(e,t,c,1);break;case 2:case 9:if(uh(c)){ze=0,qt=null,Wm(t);break}t=function(){ze!==2&&ze!==9||qe!==e||(ze=7),da(e)},c.then(t,t);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:uh(c)?(ze=0,qt=null,Wm(t)):(ze=0,qt=null,sl(e,t,c,7));break;case 5:var y=null;switch(je.tag){case 26:y=je.memoizedState;case 5:case 27:var b=je;if(y?q0(y):b.stateNode.complete){ze=0,qt=null;var R=b.sibling;if(R!==null)je=R;else{var z=b.return;z!==null?(je=z,Zr(z)):je=null}break t}}ze=0,qt=null,sl(e,t,c,5);break;case 6:ze=0,qt=null,sl(e,t,c,6);break;case 8:bo(),ke=6;break e;default:throw Error(r(462))}}Pv();break}catch(H){$m(e,H)}while(!0);return _a=Xn=null,D.H=s,D.A=u,we=a,je!==null?0:(qe=null,Re=0,fr(),ke)}function Pv(){for(;je!==null&&!Lu();)Im(je)}function Im(e){var t=jm(e.alternate,e,La);e.memoizedProps=e.pendingProps,t===null?Zr(e):je=t}function Wm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=gm(a,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=gm(a,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:Lc(t);default:Rm(a,t),t=je=Jd(t,La),t=jm(a,t,La)}e.memoizedProps=e.pendingProps,t===null?Zr(e):je=t}function sl(e,t,a,s){_a=Xn=null,Lc(t),ks=null,$l=0;var u=t.return;try{if(Bv(e,u,t,a,Re)){ke=1,zr(e,Zt(a,e.current)),je=null;return}}catch(c){if(u!==null)throw je=u,c;ke=1,zr(e,Zt(a,e.current)),je=null;return}t.flags&32768?(Ee||s===1?e=!0:el||(Re&536870912)!==0?e=!1:(un=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ut.current,s!==null&&s.tag===13&&(s.flags|=16384))),e0(t,e)):Zr(t)}function Zr(e){var t=e;do{if((t.flags&32768)!==0){e0(t,un);return}e=t.return;var a=Qv(t.alternate,t,La);if(a!==null){je=a;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);ke===0&&(ke=5)}function e0(e,t){do{var a=Yv(e.alternate,e);if(a!==null){a.flags&=32767,je=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=a}while(e!==null);ke=6,je=null}function t0(e,t,a,s,u,c,y,b,R){e.cancelPendingCommit=null;do kr();while(at!==0);if((we&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=uc,Mp(e,a,c,y,b,R),e===qe&&(je=qe=null,Re=0),al=t,fn=e,Ua=a,po=c,vo=u,Vm=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wv(Pi,function(){return i0(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=D.T,D.T=null,u=V.p,V.p=2,y=we,we|=4;try{Gv(e,t,a)}finally{we=y,V.p=u,D.T=s}}at=1,a0(),n0(),s0()}}function a0(){if(at===1){at=0;var e=fn,t=al,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var s=V.p;V.p=2;var u=we;we|=4;try{Um(t,e);var c=zo,y=Gd(e.containerInfo),b=c.focusedElem,R=c.selectionRange;if(y!==b&&b&&b.ownerDocument&&Yd(b.ownerDocument.documentElement,b)){if(R!==null&&nc(b)){var z=R.start,H=R.end;if(H===void 0&&(H=z),"selectionStart"in b)b.selectionStart=z,b.selectionEnd=Math.min(H,b.value.length);else{var k=b.ownerDocument||document,U=k&&k.defaultView||window;if(U.getSelection){var B=U.getSelection(),ie=b.textContent.length,de=Math.min(R.start,ie),Be=R.end===void 0?de:Math.min(R.end,ie);!B.extend&&de>Be&&(y=Be,Be=de,de=y);var A=Qd(b,de),M=Qd(b,Be);if(A&&M&&(B.rangeCount!==1||B.anchorNode!==A.node||B.anchorOffset!==A.offset||B.focusNode!==M.node||B.focusOffset!==M.offset)){var O=k.createRange();O.setStart(A.node,A.offset),B.removeAllRanges(),de>Be?(B.addRange(O),B.extend(M.node,M.offset)):(O.setEnd(M.node,M.offset),B.addRange(O))}}}}for(k=[],B=b;B=B.parentNode;)B.nodeType===1&&k.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<k.length;b++){var G=k[b];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}lu=!!Oo,zo=Oo=null}finally{we=u,V.p=s,D.T=a}}e.current=t,at=2}}function n0(){if(at===2){at=0;var e=fn,t=al,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var s=V.p;V.p=2;var u=we;we|=4;try{wm(e,t.alternate,t)}finally{we=u,V.p=s,D.T=a}}at=3}}function s0(){if(at===4||at===3){at=0,ki();var e=fn,t=al,a=Ua,s=Vm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,al=fn=null,l0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(on=null),qu(a),t=t.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(Al,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=D.T,u=V.p,V.p=2,D.T=null;try{for(var c=e.onRecoverableError,y=0;y<s.length;y++){var b=s[y];c(b.value,{componentStack:b.stack})}}finally{D.T=t,V.p=u}}(Ua&3)!==0&&kr(),da(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===xo?fi++:(fi=0,xo=e):fi=0,di(0)}}function l0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zl(t)))}function kr(){return a0(),n0(),s0(),i0()}function i0(){if(at!==5)return!1;var e=fn,t=po;po=0;var a=qu(Ua),s=D.T,u=V.p;try{V.p=32>a?32:a,D.T=null,a=vo,vo=null;var c=fn,y=Ua;if(at=0,al=fn=null,Ua=0,(we&6)!==0)throw Error(r(331));var b=we;if(we|=4,Ym(c.current),qm(c,c.current,y,a),we=b,di(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Al,c)}catch{}return!0}finally{V.p=u,D.T=s,l0(e,t)}}function r0(e,t,a){t=Zt(a,t),t=Fc(e.stateNode,t,2),e=nn(e,t,2),e!==null&&(Ol(e,2),da(e))}function De(e,t,a){if(e.tag===3)r0(e,e,a);else for(;t!==null;){if(t.tag===3){r0(t,e,a);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(on===null||!on.has(s))){e=Zt(a,e),a=um(2),s=nn(t,a,2),s!==null&&(cm(a,s,t,e),Ol(s,2),da(s));break}}t=t.return}}function jo(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new Xv;var u=new Set;s.set(t,u)}else u=s.get(t),u===void 0&&(u=new Set,s.set(t,u));u.has(a)||(mo=!0,u.add(a),e=Fv.bind(null,e,t,a),t.then(e,e))}function Fv(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qe===e&&(Re&a)===a&&(ke===4||ke===3&&(Re&62914560)===Re&&300>Se()-Yr?(we&2)===0&&nl(e,0):yo|=a,tl===Re&&(tl=0)),da(e)}function u0(e,t){t===0&&(t=ad()),e=Gn(e,t),e!==null&&(Ol(e,t),da(e))}function Jv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),u0(e,a)}function Iv(e,t){var a=0;switch(e.tag){case 31:case 13:var s=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),u0(e,a)}function Wv(e,t){return Cl(e,t)}var $r=null,ll=null,No=!1,Pr=!1,Ro=!1,hn=0;function da(e){e!==ll&&e.next===null&&(ll===null?$r=ll=e:ll=ll.next=e),Pr=!0,No||(No=!0,tx())}function di(e,t){if(!Ro&&Pr){Ro=!0;do for(var a=!1,s=$r;s!==null;){if(e!==0){var u=s.pendingLanes;if(u===0)var c=0;else{var y=s.suspendedLanes,b=s.pingedLanes;c=(1<<31-zt(42|e)+1)-1,c&=u&~(y&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,d0(s,c))}else c=Re,c=Wi(s,s===qe?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||wl(s,c)||(a=!0,d0(s,c));s=s.next}while(a);Ro=!1}}function ex(){c0()}function c0(){Pr=No=!1;var e=0;hn!==0&&fx()&&(e=hn);for(var t=Se(),a=null,s=$r;s!==null;){var u=s.next,c=o0(s,t);c===0?(s.next=null,a===null?$r=u:a.next=u,u===null&&(ll=a)):(a=s,(e!==0||(c&3)!==0)&&(Pr=!0)),s=u}at!==0&&at!==5||di(e),hn!==0&&(hn=0)}function o0(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,u=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var y=31-zt(c),b=1<<y,R=u[y];R===-1?((b&a)===0||(b&s)!==0)&&(u[y]=Tp(b,t)):R<=t&&(e.expiredLanes|=b),c&=~b}if(t=qe,a=Re,a=Wi(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===t&&(ze===2||ze===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&_s(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||wl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(s!==null&&_s(s),qu(a)){case 2:case 8:a=$i;break;case 32:a=Pi;break;case 268435456:a=td;break;default:a=Pi}return s=f0.bind(null,e),a=Cl(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&s!==null&&_s(s),e.callbackPriority=2,e.callbackNode=null,2}function f0(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(kr()&&e.callbackNode!==a)return null;var s=Re;return s=Wi(e,e===qe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Zm(e,s,t),o0(e,Se()),e.callbackNode!=null&&e.callbackNode===a?f0.bind(null,e):null)}function d0(e,t){if(kr())return null;Zm(e,t,!0)}function tx(){hx(function(){(we&6)!==0?Cl(ua,ex):c0()})}function _o(){if(hn===0){var e=Vs;e===0&&(e=Fi,Fi<<=1,(Fi&261888)===0&&(Fi=256)),hn=e}return hn}function h0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:nr(""+e)}function m0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function ax(e,t,a,s,u){if(t==="submit"&&a&&a.stateNode===u){var c=h0((u[jt]||null).action),y=s.submitter;y&&(t=(t=y[jt]||null)?h0(t.formAction):y.getAttribute("formAction"),t!==null&&(c=t,y=null));var b=new rr("action","action",null,s,u);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(hn!==0){var R=y?m0(u,y):new FormData(u);Vc(a,{pending:!0,data:R,method:u.method,action:c},null,R)}}else typeof c=="function"&&(b.preventDefault(),R=y?m0(u,y):new FormData(u),Vc(a,{pending:!0,data:R,method:u.method,action:c},c,R))},currentTarget:u}]})}}for(var Eo=0;Eo<rc.length;Eo++){var To=rc[Eo],nx=To.toLowerCase(),sx=To[0].toUpperCase()+To.slice(1);aa(nx,"on"+sx)}aa(Xd,"onAnimationEnd"),aa(Zd,"onAnimationIteration"),aa(kd,"onAnimationStart"),aa("dblclick","onDoubleClick"),aa("focusin","onFocus"),aa("focusout","onBlur"),aa(bv,"onTransitionRun"),aa(Sv,"onTransitionStart"),aa(jv,"onTransitionCancel"),aa($d,"onTransitionEnd"),As("onMouseEnter",["mouseout","mouseover"]),As("onMouseLeave",["mouseout","mouseover"]),As("onPointerEnter",["pointerout","pointerover"]),As("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hi="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(" "),lx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hi));function y0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],u=s.event;s=s.listeners;e:{var c=void 0;if(t)for(var y=s.length-1;0<=y;y--){var b=s[y],R=b.instance,z=b.currentTarget;if(b=b.listener,R!==c&&u.isPropagationStopped())break e;c=b,u.currentTarget=z;try{c(u)}catch(H){or(H)}u.currentTarget=null,c=R}else for(y=0;y<s.length;y++){if(b=s[y],R=b.instance,z=b.currentTarget,b=b.listener,R!==c&&u.isPropagationStopped())break e;c=b,u.currentTarget=z;try{c(u)}catch(H){or(H)}u.currentTarget=null,c=R}}}}function Ne(e,t){var a=t[Hu];a===void 0&&(a=t[Hu]=new Set);var s=e+"__bubble";a.has(s)||(g0(t,e,2,!1),a.add(s))}function Mo(e,t,a){var s=0;t&&(s|=4),g0(a,e,s,t)}var Fr="_reactListening"+Math.random().toString(36).slice(2);function Co(e){if(!e[Fr]){e[Fr]=!0,cd.forEach(function(a){a!=="selectionchange"&&(lx.has(a)||Mo(a,!1,e),Mo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fr]||(t[Fr]=!0,Mo("selectionchange",!1,t))}}function g0(e,t,a,s){switch(X0(t)){case 2:var u=zx;break;case 8:u=Dx;break;default:u=Vo}a=u.bind(null,t,a,e),u=void 0,!$u||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),s?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function Ao(e,t,a,s,u){var c=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var b=s.stateNode.containerInfo;if(b===u)break;if(y===4)for(y=s.return;y!==null;){var R=y.tag;if((R===3||R===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;b!==null;){if(y=Ts(b),y===null)return;if(R=y.tag,R===5||R===6||R===26||R===27){s=c=y;continue e}b=b.parentNode}}s=s.return}Sd(function(){var z=c,H=Zu(a),k=[];e:{var U=Pd.get(e);if(U!==void 0){var B=rr,ie=e;switch(e){case"keypress":if(lr(a)===0)break e;case"keydown":case"keyup":B=Ip;break;case"focusin":ie="focus",B=Iu;break;case"focusout":ie="blur",B=Iu;break;case"beforeblur":case"afterblur":B=Iu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=Rd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=Qp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=tv;break;case Xd:case Zd:case kd:B=Kp;break;case $d:B=nv;break;case"scroll":case"scrollend":B=qp;break;case"wheel":B=lv;break;case"copy":case"cut":case"paste":B=Xp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Ed;break;case"toggle":case"beforetoggle":B=rv}var de=(t&4)!==0,Be=!de&&(e==="scroll"||e==="scrollend"),A=de?U!==null?U+"Capture":null:U;de=[];for(var M=z,O;M!==null;){var G=M;if(O=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||O===null||A===null||(G=Ll(M,A),G!=null&&de.push(mi(M,G,O))),Be)break;M=M.return}0<de.length&&(U=new B(U,ie,null,a,H),k.push({event:U,listeners:de}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",U&&a!==Xu&&(ie=a.relatedTarget||a.fromElement)&&(Ts(ie)||ie[Es]))break e;if((B||U)&&(U=H.window===H?H:(U=H.ownerDocument)?U.defaultView||U.parentWindow:window,B?(ie=a.relatedTarget||a.toElement,B=z,ie=ie?Ts(ie):null,ie!==null&&(Be=d(ie),de=ie.tag,ie!==Be||de!==5&&de!==27&&de!==6)&&(ie=null)):(B=null,ie=z),B!==ie)){if(de=Rd,G="onMouseLeave",A="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(de=Ed,G="onPointerLeave",A="onPointerEnter",M="pointer"),Be=B==null?U:Dl(B),O=ie==null?U:Dl(ie),U=new de(G,M+"leave",B,a,H),U.target=Be,U.relatedTarget=O,G=null,Ts(H)===z&&(de=new de(A,M+"enter",ie,a,H),de.target=O,de.relatedTarget=Be,G=de),Be=G,B&&ie)t:{for(de=ix,A=B,M=ie,O=0,G=A;G;G=de(G))O++;G=0;for(var oe=M;oe;oe=de(oe))G++;for(;0<O-G;)A=de(A),O--;for(;0<G-O;)M=de(M),G--;for(;O--;){if(A===M||M!==null&&A===M.alternate){de=A;break t}A=de(A),M=de(M)}de=null}else de=null;B!==null&&p0(k,U,B,de,!1),ie!==null&&Be!==null&&p0(k,Be,ie,de,!0)}}e:{if(U=z?Dl(z):window,B=U.nodeName&&U.nodeName.toLowerCase(),B==="select"||B==="input"&&U.type==="file")var Ce=Dd;else if(Od(U))if(Ld)Ce=pv;else{Ce=yv;var re=mv}else B=U.nodeName,!B||B.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?z&&Vu(z.elementType)&&(Ce=Dd):Ce=gv;if(Ce&&(Ce=Ce(e,z))){zd(k,Ce,a,H);break e}re&&re(e,U,z),e==="focusout"&&z&&U.type==="number"&&z.memoizedProps.value!=null&&Ku(U,"number",U.value)}switch(re=z?Dl(z):window,e){case"focusin":(Od(re)||re.contentEditable==="true")&&(Us=re,sc=z,Kl=null);break;case"focusout":Kl=sc=Us=null;break;case"mousedown":lc=!0;break;case"contextmenu":case"mouseup":case"dragend":lc=!1,Kd(k,a,H);break;case"selectionchange":if(xv)break;case"keydown":case"keyup":Kd(k,a,H)}var pe;if(ec)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 Ls?Ad(e,a)&&(_e="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(_e="onCompositionStart");_e&&(Td&&a.locale!=="ko"&&(Ls||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Ls&&(pe=jd()):(Fa=H,Pu="value"in Fa?Fa.value:Fa.textContent,Ls=!0)),re=Jr(z,_e),0<re.length&&(_e=new _d(_e,e,null,a,H),k.push({event:_e,listeners:re}),pe?_e.data=pe:(pe=wd(a),pe!==null&&(_e.data=pe)))),(pe=cv?ov(e,a):fv(e,a))&&(_e=Jr(z,"onBeforeInput"),0<_e.length&&(re=new _d("onBeforeInput","beforeinput",null,a,H),k.push({event:re,listeners:_e}),re.data=pe)),ax(k,e,z,a,H)}y0(k,t)})}function mi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Jr(e,t){for(var a=t+"Capture",s=[];e!==null;){var u=e,c=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||c===null||(u=Ll(e,a),u!=null&&s.unshift(mi(e,u,c)),u=Ll(e,t),u!=null&&s.push(mi(e,u,c))),e.tag===3)return s;e=e.return}return[]}function ix(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function p0(e,t,a,s,u){for(var c=t._reactName,y=[];a!==null&&a!==s;){var b=a,R=b.alternate,z=b.stateNode;if(b=b.tag,R!==null&&R===s)break;b!==5&&b!==26&&b!==27||z===null||(R=z,u?(z=Ll(a,c),z!=null&&y.unshift(mi(a,z,R))):u||(z=Ll(a,c),z!=null&&y.push(mi(a,z,R)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var rx=/\r\n?/g,ux=/\u0000|\uFFFD/g;function v0(e){return(typeof e=="string"?e:""+e).replace(rx,`
|
|
49
|
+
`).replace(ux,"")}function x0(e,t){return t=v0(t),v0(e)===t}function Ue(e,t,a,s,u,c){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Os(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Os(e,""+s);break;case"className":tr(e,"class",s);break;case"tabIndex":tr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":tr(e,a,s);break;case"style":xd(e,s,c);break;case"data":if(t!=="object"){tr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=nr(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"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 c=="function"&&(a==="formAction"?(t!=="input"&&Ue(e,t,"name",u.name,u,null),Ue(e,t,"formEncType",u.formEncType,u,null),Ue(e,t,"formMethod",u.formMethod,u,null),Ue(e,t,"formTarget",u.formTarget,u,null)):(Ue(e,t,"encType",u.encType,u,null),Ue(e,t,"method",u.method,u,null),Ue(e,t,"target",u.target,u,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=nr(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=Sa);break;case"onScroll":s!=null&&Ne("scroll",e);break;case"onScrollEnd":s!=null&&Ne("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=nr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":Ne("beforetoggle",e),Ne("toggle",e),er(e,"popover",s);break;case"xlinkActuate":ba(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ba(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ba(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ba(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ba(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ba(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ba(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ba(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ba(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":er(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Up.get(a)||a,er(e,a,s))}}function wo(e,t,a,s,u,c){switch(a){case"style":xd(e,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof s=="string"?Os(e,s):(typeof s=="number"||typeof s=="bigint")&&Os(e,""+s);break;case"onScroll":s!=null&&Ne("scroll",e);break;case"onScrollEnd":s!=null&&Ne("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Sa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!od.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),c=e[jt]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,u),typeof s=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,u);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):er(e,a,s)}}}function ft(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("load",e);var s=!1,u=!1,c;for(c in a)if(a.hasOwnProperty(c)){var y=a[c];if(y!=null)switch(c){case"src":s=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,c,y,a,null)}}u&&Ue(e,t,"srcSet",a.srcSet,a,null),s&&Ue(e,t,"src",a.src,a,null);return;case"input":Ne("invalid",e);var b=c=y=u=null,R=null,z=null;for(s in a)if(a.hasOwnProperty(s)){var H=a[s];if(H!=null)switch(s){case"name":u=H;break;case"type":y=H;break;case"checked":R=H;break;case"defaultChecked":z=H;break;case"value":c=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:Ue(e,t,s,H,a,null)}}yd(e,c,b,R,z,y,u,!1);return;case"select":Ne("invalid",e),s=y=c=null;for(u in a)if(a.hasOwnProperty(u)&&(b=a[u],b!=null))switch(u){case"value":c=b;break;case"defaultValue":y=b;break;case"multiple":s=b;default:Ue(e,t,u,b,a,null)}t=c,a=y,e.multiple=!!s,t!=null?ws(e,!!s,t,!1):a!=null&&ws(e,!!s,a,!0);return;case"textarea":Ne("invalid",e),c=u=s=null;for(y in a)if(a.hasOwnProperty(y)&&(b=a[y],b!=null))switch(y){case"value":s=b;break;case"defaultValue":u=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:Ue(e,t,y,b,a,null)}pd(e,s,u,c);return;case"option":for(R in a)if(a.hasOwnProperty(R)&&(s=a[R],s!=null))switch(R){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ue(e,t,R,s,a,null)}return;case"dialog":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(s=0;s<hi.length;s++)Ne(hi[s],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("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(z in a)if(a.hasOwnProperty(z)&&(s=a[z],s!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,z,s,a,null)}return;default:if(Vu(t)){for(H in a)a.hasOwnProperty(H)&&(s=a[H],s!==void 0&&wo(e,t,H,s,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(s=a[b],s!=null&&Ue(e,t,b,s,a,null))}function cx(e,t,a,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,c=null,y=null,b=null,R=null,z=null,H=null;for(B in a){var k=a[B];if(a.hasOwnProperty(B)&&k!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":R=k;default:s.hasOwnProperty(B)||Ue(e,t,B,null,s,k)}}for(var U in s){var B=s[U];if(k=a[U],s.hasOwnProperty(U)&&(B!=null||k!=null))switch(U){case"type":c=B;break;case"name":u=B;break;case"checked":z=B;break;case"defaultChecked":H=B;break;case"value":y=B;break;case"defaultValue":b=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,t));break;default:B!==k&&Ue(e,t,U,B,s,k)}}Gu(e,y,b,R,z,H,c,u);return;case"select":B=y=b=U=null;for(c in a)if(R=a[c],a.hasOwnProperty(c)&&R!=null)switch(c){case"value":break;case"multiple":B=R;default:s.hasOwnProperty(c)||Ue(e,t,c,null,s,R)}for(u in s)if(c=s[u],R=a[u],s.hasOwnProperty(u)&&(c!=null||R!=null))switch(u){case"value":U=c;break;case"defaultValue":b=c;break;case"multiple":y=c;default:c!==R&&Ue(e,t,u,c,s,R)}t=b,a=y,s=B,U!=null?ws(e,!!a,U,!1):!!s!=!!a&&(t!=null?ws(e,!!a,t,!0):ws(e,!!a,a?[]:"",!1));return;case"textarea":B=U=null;for(b in a)if(u=a[b],a.hasOwnProperty(b)&&u!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Ue(e,t,b,null,s,u)}for(y in s)if(u=s[y],c=a[y],s.hasOwnProperty(y)&&(u!=null||c!=null))switch(y){case"value":U=u;break;case"defaultValue":B=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==c&&Ue(e,t,y,u,s,c)}gd(e,U,B);return;case"option":for(var ie in a)if(U=a[ie],a.hasOwnProperty(ie)&&U!=null&&!s.hasOwnProperty(ie))switch(ie){case"selected":e.selected=!1;break;default:Ue(e,t,ie,null,s,U)}for(R in s)if(U=s[R],B=a[R],s.hasOwnProperty(R)&&U!==B&&(U!=null||B!=null))switch(R){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ue(e,t,R,U,s,B)}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 de in a)U=a[de],a.hasOwnProperty(de)&&U!=null&&!s.hasOwnProperty(de)&&Ue(e,t,de,null,s,U);for(z in s)if(U=s[z],B=a[z],s.hasOwnProperty(z)&&U!==B&&(U!=null||B!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ue(e,t,z,U,s,B)}return;default:if(Vu(t)){for(var Be in a)U=a[Be],a.hasOwnProperty(Be)&&U!==void 0&&!s.hasOwnProperty(Be)&&wo(e,t,Be,void 0,s,U);for(H in s)U=s[H],B=a[H],!s.hasOwnProperty(H)||U===B||U===void 0&&B===void 0||wo(e,t,H,U,s,B);return}}for(var A in a)U=a[A],a.hasOwnProperty(A)&&U!=null&&!s.hasOwnProperty(A)&&Ue(e,t,A,null,s,U);for(k in s)U=s[k],B=a[k],!s.hasOwnProperty(k)||U===B||U==null&&B==null||Ue(e,t,k,U,s,B)}function b0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ox(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var u=a[s],c=u.transferSize,y=u.initiatorType,b=u.duration;if(c&&b&&b0(y)){for(y=0,b=u.responseEnd,s+=1;s<a.length;s++){var R=a[s],z=R.startTime;if(z>b)break;var H=R.transferSize,k=R.initiatorType;H&&b0(k)&&(R=R.responseEnd,y+=H*(R<b?1:(b-z)/(R-z)))}if(--s,t+=8*(c+y)/(u.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 Oo=null,zo=null;function Ir(e){return e.nodeType===9?e:e.ownerDocument}function S0(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 j0(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 Do(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 Lo=null;function fx(){var e=window.event;return e&&e.type==="popstate"?e===Lo?!1:(Lo=e,!0):(Lo=null,!1)}var N0=typeof setTimeout=="function"?setTimeout:void 0,dx=typeof clearTimeout=="function"?clearTimeout:void 0,R0=typeof Promise=="function"?Promise:void 0,hx=typeof queueMicrotask=="function"?queueMicrotask:typeof R0<"u"?function(e){return R0.resolve(null).then(e).catch(mx)}:N0;function mx(e){setTimeout(function(){throw e})}function mn(e){return e==="head"}function _0(e,t){var a=t,s=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(s===0){e.removeChild(u),cl(t);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")yi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,yi(a);for(var c=a.firstChild;c;){var y=c.nextSibling,b=c.nodeName;c[zl]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=y}}else a==="body"&&yi(e.ownerDocument.body);a=u}while(a);cl(t)}function E0(e,t){var a=e;e=0;do{var s=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=s}while(a)}function Uo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Uo(a),Qu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function yx(e,t,a,s){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[zl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Jt(e.nextSibling),e===null)break}return null}function gx(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Jt(e.nextSibling),e===null))return null;return e}function T0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Jt(e.nextSibling),e===null))return null;return e}function Bo(e){return e.data==="$?"||e.data==="$~"}function qo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function px(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var s=function(){t(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Jt(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 Ho=null;function M0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Jt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function C0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function A0(e,t,a){switch(t=Ir(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function yi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Qu(e)}var It=new Map,w0=new Set;function Wr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ba=V.d;V.d={f:vx,r:xx,D:bx,C:Sx,L:jx,m:Nx,X:_x,S:Rx,M:Ex};function vx(){var e=Ba.f(),t=Vr();return e||t}function xx(e){var t=Ms(e);t!==null&&t.tag===5&&t.type==="form"?$h(t):Ba.r(e)}var il=typeof document>"u"?null:document;function O0(e,t,a){var s=il;if(s&&typeof t=="string"&&t){var u=Vt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),w0.has(u)||(w0.add(u),e={rel:e,crossOrigin:a,href:t},s.querySelector(u)===null&&(t=s.createElement("link"),ft(t,"link",e),st(t),s.head.appendChild(t)))}}function bx(e){Ba.D(e),O0("dns-prefetch",e,null)}function Sx(e,t){Ba.C(e,t),O0("preconnect",e,t)}function jx(e,t,a){Ba.L(e,t,a);var s=il;if(s&&e&&t){var u='link[rel="preload"][as="'+Vt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Vt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Vt(a.imageSizes)+'"]')):u+='[href="'+Vt(e)+'"]';var c=u;switch(t){case"style":c=rl(e);break;case"script":c=ul(e)}It.has(c)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),It.set(c,e),s.querySelector(u)!==null||t==="style"&&s.querySelector(gi(c))||t==="script"&&s.querySelector(pi(c))||(t=s.createElement("link"),ft(t,"link",e),st(t),s.head.appendChild(t)))}}function Nx(e,t){Ba.m(e,t);var a=il;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Vt(s)+'"][href="'+Vt(e)+'"]',c=u;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=ul(e)}if(!It.has(c)&&(e=v({rel:"modulepreload",href:e},t),It.set(c,e),a.querySelector(u)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(pi(c)))return}s=a.createElement("link"),ft(s,"link",e),st(s),a.head.appendChild(s)}}}function Rx(e,t,a){Ba.S(e,t,a);var s=il;if(s&&e){var u=Cs(s).hoistableStyles,c=rl(e);t=t||"default";var y=u.get(c);if(!y){var b={loading:0,preload:null};if(y=s.querySelector(gi(c)))b.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=It.get(c))&&Qo(e,a);var R=y=s.createElement("link");st(R),ft(R,"link",e),R._p=new Promise(function(z,H){R.onload=z,R.onerror=H}),R.addEventListener("load",function(){b.loading|=1}),R.addEventListener("error",function(){b.loading|=2}),b.loading|=4,eu(y,t,s)}y={type:"stylesheet",instance:y,count:1,state:b},u.set(c,y)}}}function _x(e,t){Ba.X(e,t);var a=il;if(a&&e){var s=Cs(a).hoistableScripts,u=ul(e),c=s.get(u);c||(c=a.querySelector(pi(u)),c||(e=v({src:e,async:!0},t),(t=It.get(u))&&Yo(e,t),c=a.createElement("script"),st(c),ft(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(u,c))}}function Ex(e,t){Ba.M(e,t);var a=il;if(a&&e){var s=Cs(a).hoistableScripts,u=ul(e),c=s.get(u);c||(c=a.querySelector(pi(u)),c||(e=v({src:e,async:!0,type:"module"},t),(t=It.get(u))&&Yo(e,t),c=a.createElement("script"),st(c),ft(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(u,c))}}function z0(e,t,a,s){var u=(u=xe.current)?Wr(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=rl(a.href),a=Cs(u).hoistableStyles,s=a.get(t),s||(s={type:"style",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=rl(a.href);var c=Cs(u).hoistableStyles,y=c.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,y),(c=u.querySelector(gi(e)))&&!c._p&&(y.instance=c,y.state.loading=5),It.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},It.set(e,a),c||Tx(u,e,a,y.state))),t&&s===null)throw Error(r(528,""));return y}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ul(a),a=Cs(u).hoistableScripts,s=a.get(t),s||(s={type:"script",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function rl(e){return'href="'+Vt(e)+'"'}function gi(e){return'link[rel="stylesheet"]['+e+"]"}function D0(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Tx(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),ft(t,"link",a),st(t),e.head.appendChild(t))}function ul(e){return'[src="'+Vt(e)+'"]'}function pi(e){return"script[async]"+e}function L0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Vt(a.href)+'"]');if(s)return t.instance=s,st(s),s;var u=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),st(s),ft(s,"style",u),eu(s,a.precedence,e),t.instance=s;case"stylesheet":u=rl(a.href);var c=e.querySelector(gi(u));if(c)return t.state.loading|=4,t.instance=c,st(c),c;s=D0(a),(u=It.get(u))&&Qo(s,u),c=(e.ownerDocument||e).createElement("link"),st(c);var y=c;return y._p=new Promise(function(b,R){y.onload=b,y.onerror=R}),ft(c,"link",s),t.state.loading|=4,eu(c,a.precedence,e),t.instance=c;case"script":return c=ul(a.src),(u=e.querySelector(pi(c)))?(t.instance=u,st(u),u):(s=a,(u=It.get(c))&&(s=v({},a),Yo(s,u)),e=e.ownerDocument||e,u=e.createElement("script"),st(u),ft(u,"link",s),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,eu(s,a.precedence,e));return t.instance}function eu(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=s.length?s[s.length-1]:null,c=u,y=0;y<s.length;y++){var b=s[y];if(b.dataset.precedence===t)c=b;else if(c!==u)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Qo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var tu=null;function U0(e,t,a){if(tu===null){var s=new Map,u=tu=new Map;u.set(a,s)}else u=tu,s=u.get(a),s||(s=new Map,u.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var c=a[u];if(!(c[zl]||c[rt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var y=c.getAttribute(t)||"";y=e+y;var b=s.get(y);b?b.push(c):s.set(y,[c])}}return s}function B0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Mx(e,t,a){if(a===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 q0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Cx(e,t,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=rl(s.href),c=t.querySelector(gi(u));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=au.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,st(c);return}c=t.ownerDocument||t,s=D0(s),(u=It.get(u))&&Qo(s,u),c=c.createElement("link"),st(c);var y=c;y._p=new Promise(function(b,R){y.onload=b,y.onerror=R}),ft(c,"link",s),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=au.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Go=0;function Ax(e,t){return e.stylesheets&&e.count===0&&su(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var s=setTimeout(function(){if(e.stylesheets&&su(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Go===0&&(Go=62500*ox());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&su(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Go?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(u)}}:null}function au(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)su(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var nu=null;function su(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,nu=new Map,t.forEach(wx,e),nu=null,au.call(e))}function wx(e,t){if(!(t.state.loading&4)){var a=nu.get(e);if(a)var s=a.get(null);else{a=new Map,nu.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<u.length;c++){var y=u[c];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),s=y)}s&&a.set(null,s)}u=t.instance,y=u.getAttribute("data-precedence"),c=a.get(y)||s,c===s&&a.set(null,u),a.set(y,u),this.count++,s=au.bind(this),u.addEventListener("load",s),u.addEventListener("error",s),c?c.parentNode.insertBefore(u,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var vi={$$typeof:X,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function Ox(e,t,a,s,u,c,y,b,R){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=Uu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uu(0),this.hiddenUpdates=Uu(null),this.identifierPrefix=s,this.onUncaughtError=u,this.onCaughtError=c,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function H0(e,t,a,s,u,c,y,b,R,z,H,k){return e=new Ox(e,t,a,y,R,z,H,k,b),t=1,c===!0&&(t|=24),c=Lt(3,null,null,t),e.current=c,c.stateNode=e,t=bc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:s,isDehydrated:a,cache:t},Rc(c),e}function Q0(e){return e?(e=Hs,e):Hs}function Y0(e,t,a,s,u,c){u=Q0(u),s.context===null?s.context=u:s.pendingContext=u,s=an(t),s.payload={element:a},c=c===void 0?null:c,c!==null&&(s.callback=c),a=nn(e,s,t),a!==null&&(Mt(a,e,t),Fl(a,e,t))}function G0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Ko(e,t){G0(e,t),(e=e.alternate)&&G0(e,t)}function K0(e){if(e.tag===13||e.tag===31){var t=Gn(e,67108864);t!==null&&Mt(t,e,67108864),Ko(e,67108864)}}function V0(e){if(e.tag===13||e.tag===31){var t=Qt();t=Bu(t);var a=Gn(e,t);a!==null&&Mt(a,e,t),Ko(e,t)}}var lu=!0;function zx(e,t,a,s){var u=D.T;D.T=null;var c=V.p;try{V.p=2,Vo(e,t,a,s)}finally{V.p=c,D.T=u}}function Dx(e,t,a,s){var u=D.T;D.T=null;var c=V.p;try{V.p=8,Vo(e,t,a,s)}finally{V.p=c,D.T=u}}function Vo(e,t,a,s){if(lu){var u=Xo(s);if(u===null)Ao(e,t,s,iu,a),Z0(e,s);else if(Ux(u,e,t,a,s))s.stopPropagation();else if(Z0(e,s),t&4&&-1<Lx.indexOf(e)){for(;u!==null;){var c=Ms(u);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var y=Bn(c.pendingLanes);if(y!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;y;){var R=1<<31-zt(y);b.entanglements[1]|=R,y&=~R}da(c),(we&6)===0&&(Gr=Se()+500,di(0))}}break;case 31:case 13:b=Gn(c,2),b!==null&&Mt(b,c,2),Vr(),Ko(c,2)}if(c=Xo(s),c===null&&Ao(e,t,s,iu,a),c===u)break;u=c}u!==null&&s.stopPropagation()}else Ao(e,t,s,null,a)}}function Xo(e){return e=Zu(e),Zo(e)}var iu=null;function Zo(e){if(iu=null,e=Ts(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=g(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return iu=e,null}function X0(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(ht()){case ua:return 2;case $i:return 8;case Pi:case Sp:return 32;case td:return 268435456;default:return 32}default:return 32}}var ko=!1,yn=null,gn=null,pn=null,xi=new Map,bi=new Map,vn=[],Lx="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 Z0(e,t){switch(e){case"focusin":case"focusout":yn=null;break;case"dragenter":case"dragleave":gn=null;break;case"mouseover":case"mouseout":pn=null;break;case"pointerover":case"pointerout":xi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bi.delete(t.pointerId)}}function Si(e,t,a,s,u,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:c,targetContainers:[u]},t!==null&&(t=Ms(t),t!==null&&K0(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Ux(e,t,a,s,u){switch(t){case"focusin":return yn=Si(yn,e,t,a,s,u),!0;case"dragenter":return gn=Si(gn,e,t,a,s,u),!0;case"mouseover":return pn=Si(pn,e,t,a,s,u),!0;case"pointerover":var c=u.pointerId;return xi.set(c,Si(xi.get(c)||null,e,t,a,s,u)),!0;case"gotpointercapture":return c=u.pointerId,bi.set(c,Si(bi.get(c)||null,e,t,a,s,u)),!0}return!1}function k0(e){var t=Ts(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,rd(e.priority,function(){V0(a)});return}}else if(t===31){if(t=g(a),t!==null){e.blockedOn=t,rd(e.priority,function(){V0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ru(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Xo(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Xu=s,a.target.dispatchEvent(s),Xu=null}else return t=Ms(a),t!==null&&K0(t),e.blockedOn=a,!1;t.shift()}return!0}function $0(e,t,a){ru(e)&&a.delete(t)}function Bx(){ko=!1,yn!==null&&ru(yn)&&(yn=null),gn!==null&&ru(gn)&&(gn=null),pn!==null&&ru(pn)&&(pn=null),xi.forEach($0),bi.forEach($0)}function uu(e,t){e.blockedOn===t&&(e.blockedOn=null,ko||(ko=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Bx)))}var cu=null;function P0(e){cu!==e&&(cu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){cu===e&&(cu=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],u=e[t+2];if(typeof s!="function"){if(Zo(s||a)===null)continue;break}var c=Ms(a);c!==null&&(e.splice(t,3),t-=3,Vc(c,{pending:!0,data:u,method:a.method,action:s},s,u))}}))}function cl(e){function t(R){return uu(R,e)}yn!==null&&uu(yn,e),gn!==null&&uu(gn,e),pn!==null&&uu(pn,e),xi.forEach(t),bi.forEach(t);for(var a=0;a<vn.length;a++){var s=vn[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<vn.length&&(a=vn[0],a.blockedOn===null);)k0(a),a.blockedOn===null&&vn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var u=a[s],c=a[s+1],y=u[jt]||null;if(typeof c=="function")y||P0(a);else if(y){var b=null;if(c&&c.hasAttribute("formAction")){if(u=c,y=c[jt]||null)b=y.formAction;else if(Zo(u)!==null)continue}else b=y.action;typeof b=="function"?a[s+1]=b:(a.splice(s,3),s-=3),P0(a)}}}function F0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function $o(e){this._internalRoot=e}ou.prototype.render=$o.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,s=Qt();Y0(a,s,e,t,null,null)},ou.prototype.unmount=$o.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Y0(e.current,2,null,e,null,null),Vr(),t[Es]=null}};function ou(e){this._internalRoot=e}ou.prototype.unstable_scheduleHydration=function(e){if(e){var t=id();e={blockedOn:null,target:e,priority:t};for(var a=0;a<vn.length&&t!==0&&t<vn[a].priority;a++);vn.splice(a,0,e),a===0&&k0(e)}};var J0=l.version;if(J0!=="19.2.4")throw Error(r(527,J0,"19.2.4"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var qx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fu.isDisabled&&fu.supportsFiber)try{Al=fu.inject(qx),Ot=fu}catch{}}return Ni.createRoot=function(e,t){if(!o(e))throw Error(r(299));var a=!1,s="",u=sm,c=lm,y=im;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=H0(e,1,!1,null,null,a,s,null,u,c,y,F0),e[Es]=t.current,Co(e),new $o(t)},Ni.hydrateRoot=function(e,t,a){if(!o(e))throw Error(r(299));var s=!1,u="",c=sm,y=lm,b=im,R=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),t=H0(e,1,!0,t,a??null,s,u,R,c,y,b,F0),t.context=Q0(null),a=t.current,s=Qt(),s=Bu(s),u=an(s),u.callback=null,nn(a,u,s),a=s,t.current.lanes=a,Ol(t,a),da(t),e[Es]=t.current,Co(e),new ou(t)},Ni.version="19.2.4",Ni}var uy;function $x(){if(uy)return Io.exports;uy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Io.exports=kx(),Io.exports}var Px=$x(),Tl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ls,jn,hl,tg,Fx=(tg=class extends Tl{constructor(){super();ce(this,ls);ce(this,jn);ce(this,hl);ne(this,hl,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){_(this,jn)||this.setEventListener(_(this,hl))}onUnsubscribe(){var l;this.hasListeners()||((l=_(this,jn))==null||l.call(this),ne(this,jn,void 0))}setEventListener(l){var i;ne(this,hl,l),(i=_(this,jn))==null||i.call(this),ne(this,jn,l(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(l){_(this,ls)!==l&&(ne(this,ls,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(i=>{i(l)})}isFocused(){var l;return typeof _(this,ls)=="boolean"?_(this,ls):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},ls=new WeakMap,jn=new WeakMap,hl=new WeakMap,tg),qf=new Fx,Jx={setTimeout:(n,l)=>setTimeout(n,l),clearTimeout:n=>clearTimeout(n),setInterval:(n,l)=>setInterval(n,l),clearInterval:n=>clearInterval(n)},Nn,Bf,ag,Ix=(ag=class{constructor(){ce(this,Nn,Jx);ce(this,Bf,!1)}setTimeoutProvider(n){ne(this,Nn,n)}setTimeout(n,l){return _(this,Nn).setTimeout(n,l)}clearTimeout(n){_(this,Nn).clearTimeout(n)}setInterval(n,l){return _(this,Nn).setInterval(n,l)}clearInterval(n){_(this,Nn).clearInterval(n)}},Nn=new WeakMap,Bf=new WeakMap,ag),as=new Ix;function Wx(n){setTimeout(n,0)}var eb=typeof window>"u"||"Deno"in globalThis;function bt(){}function tb(n,l){return typeof n=="function"?n(l):n}function pf(n){return typeof n=="number"&&n>=0&&n!==1/0}function hg(n,l){return Math.max(n+(l||0)-Date.now(),0)}function zn(n,l){return typeof n=="function"?n(l):n}function ea(n,l){return typeof n=="function"?n(l):n}function cy(n,l){const{type:i="all",exact:r,fetchStatus:o,predicate:d,queryKey:h,stale:g}=n;if(h){if(r){if(l.queryHash!==Hf(h,l.options))return!1}else if(!zi(l.queryKey,h))return!1}if(i!=="all"){const p=l.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof g=="boolean"&&l.isStale()!==g||o&&o!==l.state.fetchStatus||d&&!d(l))}function oy(n,l){const{exact:i,status:r,predicate:o,mutationKey:d}=n;if(d){if(!l.options.mutationKey)return!1;if(i){if(ps(l.options.mutationKey)!==ps(d))return!1}else if(!zi(l.options.mutationKey,d))return!1}return!(r&&l.state.status!==r||o&&!o(l))}function Hf(n,l){return((l==null?void 0:l.queryKeyHashFn)||ps)(n)}function ps(n){return JSON.stringify(n,(l,i)=>vf(i)?Object.keys(i).sort().reduce((r,o)=>(r[o]=i[o],r),{}):i)}function zi(n,l){return n===l?!0:typeof n!=typeof l?!1:n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(l).every(i=>zi(n[i],l[i])):!1}var ab=Object.prototype.hasOwnProperty;function mg(n,l,i=0){if(n===l)return n;if(i>500)return l;const r=fy(n)&&fy(l);if(!r&&!(vf(n)&&vf(l)))return l;const d=(r?n:Object.keys(n)).length,h=r?l:Object.keys(l),g=h.length,p=r?new Array(g):{};let m=0;for(let x=0;x<g;x++){const v=r?x:h[x],S=n[v],j=l[v];if(S===j){p[v]=S,(r?x<d:ab.call(n,v))&&m++;continue}if(S===null||j===null||typeof S!="object"||typeof j!="object"){p[v]=j;continue}const N=mg(S,j,i+1);p[v]=N,N===S&&m++}return d===g&&m===d?n:p}function ju(n,l){if(!l||Object.keys(n).length!==Object.keys(l).length)return!1;for(const i in n)if(n[i]!==l[i])return!1;return!0}function fy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function vf(n){if(!dy(n))return!1;const l=n.constructor;if(l===void 0)return!0;const i=l.prototype;return!(!dy(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function dy(n){return Object.prototype.toString.call(n)==="[object Object]"}function nb(n){return new Promise(l=>{as.setTimeout(l,n)})}function xf(n,l,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,l):i.structuralSharing!==!1?mg(n,l):l}function sb(n,l,i=0){const r=[...n,l];return i&&r.length>i?r.slice(1):r}function lb(n,l,i=0){const r=[l,...n];return i&&r.length>i?r.slice(0,-1):r}var Qf=Symbol();function yg(n,l){return!n.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!n.queryFn||n.queryFn===Qf?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Yf(n,l){return typeof n=="function"?n(...l):!!n}function ib(n,l,i){let r=!1,o;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(o??(o=l()),r||(r=!0,o.aborted?i():o.addEventListener("abort",i,{once:!0})),o)}),n}var Di=(()=>{let n=()=>eb;return{isServer(){return n()},setIsServer(l){n=l}}})();function bf(){let n,l;const i=new Promise((o,d)=>{n=o,l=d});i.status="pending",i.catch(()=>{});function r(o){Object.assign(i,o),delete i.resolve,delete i.reject}return i.resolve=o=>{r({status:"fulfilled",value:o}),n(o)},i.reject=o=>{r({status:"rejected",reason:o}),l(o)},i}var rb=Wx;function ub(){let n=[],l=0,i=g=>{g()},r=g=>{g()},o=rb;const d=g=>{l?n.push(g):o(()=>{i(g)})},h=()=>{const g=n;n=[],g.length&&o(()=>{r(()=>{g.forEach(p=>{i(p)})})})};return{batch:g=>{let p;l++;try{p=g()}finally{l--,l||h()}return p},batchCalls:g=>(...p)=>{d(()=>{g(...p)})},schedule:d,setNotifyFunction:g=>{i=g},setBatchNotifyFunction:g=>{r=g},setScheduler:g=>{o=g}}}var nt=ub(),ml,Rn,yl,ng,cb=(ng=class extends Tl{constructor(){super();ce(this,ml,!0);ce(this,Rn);ce(this,yl);ne(this,yl,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l(!0),r=()=>l(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){_(this,Rn)||this.setEventListener(_(this,yl))}onUnsubscribe(){var l;this.hasListeners()||((l=_(this,Rn))==null||l.call(this),ne(this,Rn,void 0))}setEventListener(l){var i;ne(this,yl,l),(i=_(this,Rn))==null||i.call(this),ne(this,Rn,l(this.setOnline.bind(this)))}setOnline(l){_(this,ml)!==l&&(ne(this,ml,l),this.listeners.forEach(r=>{r(l)}))}isOnline(){return _(this,ml)}},ml=new WeakMap,Rn=new WeakMap,yl=new WeakMap,ng),Nu=new cb;function ob(n){return Math.min(1e3*2**n,3e4)}function gg(n){return(n??"online")==="online"?Nu.isOnline():!0}var Sf=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function pg(n){let l=!1,i=0,r;const o=bf(),d=()=>o.status!=="pending",h=E=>{var C;if(!d()){const w=new Sf(E);S(w),(C=n.onCancel)==null||C.call(n,w)}},g=()=>{l=!0},p=()=>{l=!1},m=()=>qf.isFocused()&&(n.networkMode==="always"||Nu.isOnline())&&n.canRun(),x=()=>gg(n.networkMode)&&n.canRun(),v=E=>{d()||(r==null||r(),o.resolve(E))},S=E=>{d()||(r==null||r(),o.reject(E))},j=()=>new Promise(E=>{var C;r=w=>{(d()||m())&&E(w)},(C=n.onPause)==null||C.call(n)}).then(()=>{var E;r=void 0,d()||(E=n.onContinue)==null||E.call(n)}),N=()=>{if(d())return;let E;const C=i===0?n.initialPromise:void 0;try{E=C??n.fn()}catch(w){E=Promise.reject(w)}Promise.resolve(E).then(v).catch(w=>{var ee;if(d())return;const $=n.retry??(Di.isServer()?0:3),X=n.retryDelay??ob,L=typeof X=="function"?X(i,w):X,Z=$===!0||typeof $=="number"&&i<$||typeof $=="function"&&$(i,w);if(l||!Z){S(w);return}i++,(ee=n.onFail)==null||ee.call(n,i,w),nb(L).then(()=>m()?void 0:j()).then(()=>{l?S(w):N()})})};return{promise:o,status:()=>o.status,cancel:h,continue:()=>(r==null||r(),o),cancelRetry:g,continueRetry:p,canStart:x,start:()=>(x()?N():j().then(N),o)}}var is,sg,vg=(sg=class{constructor(){ce(this,is)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pf(this.gcTime)&&ne(this,is,as.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Di.isServer()?1/0:300*1e3))}clearGcTimeout(){_(this,is)&&(as.clearTimeout(_(this,is)),ne(this,is,void 0))}},is=new WeakMap,sg),rs,gl,Wt,us,it,Qi,cs,Yt,xg,qa,lg,fb=(lg=class extends vg{constructor(l){super();ce(this,Yt);ce(this,rs);ce(this,gl);ce(this,Wt);ce(this,us);ce(this,it);ce(this,Qi);ce(this,cs);ne(this,cs,!1),ne(this,Qi,l.defaultOptions),this.setOptions(l.options),this.observers=[],ne(this,us,l.client),ne(this,Wt,_(this,us).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,ne(this,rs,my(this.options)),this.state=l.state??_(this,rs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var l;return(l=_(this,it))==null?void 0:l.promise}setOptions(l){if(this.options={..._(this,Qi),...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=my(this.options);i.data!==void 0&&(this.setState(hy(i.data,i.dataUpdatedAt)),ne(this,rs,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,Wt).remove(this)}setData(l,i){const r=xf(this.state.data,l,this.options);return ve(this,Yt,qa).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(l,i){ve(this,Yt,qa).call(this,{type:"setState",state:l,setStateOptions:i})}cancel(l){var r,o;const i=(r=_(this,it))==null?void 0:r.promise;return(o=_(this,it))==null||o.cancel(l),i?i.then(bt).catch(bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return _(this,rs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(l=>ea(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>zn(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!hg(this.state.dataUpdatedAt,l)}onFocus(){var i;const l=this.observers.find(r=>r.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(i=_(this,it))==null||i.continue()}onOnline(){var i;const l=this.observers.find(r=>r.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(i=_(this,it))==null||i.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),_(this,Wt).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(i=>i!==l),this.observers.length||(_(this,it)&&(_(this,cs)||ve(this,Yt,xg).call(this)?_(this,it).cancel({revert:!0}):_(this,it).cancelRetry()),this.scheduleGc()),_(this,Wt).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,Yt,qa).call(this,{type:"invalidate"})}async fetch(l,i){var p,m,x,v,S,j,N,E,C,w,$,X;if(this.state.fetchStatus!=="idle"&&((p=_(this,it))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(_(this,it))return _(this,it).continueRetry(),_(this,it).promise}if(l&&this.setOptions(l),!this.options.queryFn){const L=this.observers.find(Z=>Z.options.queryFn);L&&this.setOptions(L.options)}const r=new AbortController,o=L=>{Object.defineProperty(L,"signal",{enumerable:!0,get:()=>(ne(this,cs,!0),r.signal)})},d=()=>{const L=yg(this.options,i),ee=(()=>{const P={client:_(this,us),queryKey:this.queryKey,meta:this.meta};return o(P),P})();return ne(this,cs,!1),this.options.persister?this.options.persister(L,ee,this):L(ee)},g=(()=>{const L={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:_(this,us),state:this.state,fetchFn:d};return o(L),L})();(m=this.options.behavior)==null||m.onFetch(g,this),ne(this,gl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=g.fetchOptions)==null?void 0:x.meta))&&ve(this,Yt,qa).call(this,{type:"fetch",meta:(v=g.fetchOptions)==null?void 0:v.meta}),ne(this,it,pg({initialPromise:i==null?void 0:i.initialPromise,fn:g.fetchFn,onCancel:L=>{L instanceof Sf&&L.revert&&this.setState({..._(this,gl),fetchStatus:"idle"}),r.abort()},onFail:(L,Z)=>{ve(this,Yt,qa).call(this,{type:"failed",failureCount:L,error:Z})},onPause:()=>{ve(this,Yt,qa).call(this,{type:"pause"})},onContinue:()=>{ve(this,Yt,qa).call(this,{type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay,networkMode:g.options.networkMode,canRun:()=>!0}));try{const L=await _(this,it).start();if(L===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(L),(j=(S=_(this,Wt).config).onSuccess)==null||j.call(S,L,this),(E=(N=_(this,Wt).config).onSettled)==null||E.call(N,L,this.state.error,this),L}catch(L){if(L instanceof Sf){if(L.silent)return _(this,it).promise;if(L.revert){if(this.state.data===void 0)throw L;return this.state.data}}throw ve(this,Yt,qa).call(this,{type:"error",error:L}),(w=(C=_(this,Wt).config).onError)==null||w.call(C,L,this),(X=($=_(this,Wt).config).onSettled)==null||X.call($,this.state.data,L,this),L}finally{this.scheduleGc()}}},rs=new WeakMap,gl=new WeakMap,Wt=new WeakMap,us=new WeakMap,it=new WeakMap,Qi=new WeakMap,cs=new WeakMap,Yt=new WeakSet,xg=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},qa=function(l){const i=r=>{switch(l.type){case"failed":return{...r,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...bg(r.data,this.options),fetchMeta:l.meta??null};case"success":const o={...r,...hy(l.data,l.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ne(this,gl,l.manual?o:void 0),o;case"error":const d=l.error;return{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...l.state}}};this.state=i(this.state),nt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),_(this,Wt).notify({query:this,type:"updated",action:l})})},lg);function bg(n,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gg(l.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function hy(n,l){return{data:n,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function my(n){const l=typeof n.initialData=="function"?n.initialData():n.initialData,i=l!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Ct,Te,Yi,xt,os,pl,Ha,_n,Gi,vl,xl,fs,ds,En,bl,Oe,Ai,jf,Nf,Rf,_f,Ef,Tf,Mf,Sg,ig,db=(ig=class extends Tl{constructor(l,i){super();ce(this,Oe);ce(this,Ct);ce(this,Te);ce(this,Yi);ce(this,xt);ce(this,os);ce(this,pl);ce(this,Ha);ce(this,_n);ce(this,Gi);ce(this,vl);ce(this,xl);ce(this,fs);ce(this,ds);ce(this,En);ce(this,bl,new Set);this.options=i,ne(this,Ct,l),ne(this,_n,null),ne(this,Ha,bf()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,Te).addObserver(this),yy(_(this,Te),this.options)?ve(this,Oe,Ai).call(this):this.updateResult(),ve(this,Oe,_f).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cf(_(this,Te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cf(_(this,Te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,Oe,Ef).call(this),ve(this,Oe,Tf).call(this),_(this,Te).removeObserver(this)}setOptions(l){const i=this.options,r=_(this,Te);if(this.options=_(this,Ct).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ea(this.options.enabled,_(this,Te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,Oe,Mf).call(this),_(this,Te).setOptions(this.options),i._defaulted&&!ju(this.options,i)&&_(this,Ct).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,Te),observer:this});const o=this.hasListeners();o&&gy(_(this,Te),r,this.options,i)&&ve(this,Oe,Ai).call(this),this.updateResult(),o&&(_(this,Te)!==r||ea(this.options.enabled,_(this,Te))!==ea(i.enabled,_(this,Te))||zn(this.options.staleTime,_(this,Te))!==zn(i.staleTime,_(this,Te)))&&ve(this,Oe,jf).call(this);const d=ve(this,Oe,Nf).call(this);o&&(_(this,Te)!==r||ea(this.options.enabled,_(this,Te))!==ea(i.enabled,_(this,Te))||d!==_(this,En))&&ve(this,Oe,Rf).call(this,d)}getOptimisticResult(l){const i=_(this,Ct).getQueryCache().build(_(this,Ct),l),r=this.createResult(i,l);return mb(this,r)&&(ne(this,xt,r),ne(this,pl,this.options),ne(this,os,_(this,Te).state)),r}getCurrentResult(){return _(this,xt)}trackResult(l,i){return new Proxy(l,{get:(r,o)=>(this.trackProp(o),i==null||i(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&_(this,Ha).status==="pending"&&_(this,Ha).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(l){_(this,bl).add(l)}getCurrentQuery(){return _(this,Te)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const i=_(this,Ct).defaultQueryOptions(l),r=_(this,Ct).getQueryCache().build(_(this,Ct),i);return r.fetch().then(()=>this.createResult(r,i))}fetch(l){return ve(this,Oe,Ai).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,xt)))}createResult(l,i){var J;const r=_(this,Te),o=this.options,d=_(this,xt),h=_(this,os),g=_(this,pl),m=l!==r?l.state:_(this,Yi),{state:x}=l;let v={...x},S=!1,j;if(i._optimisticResults){const K=this.hasListeners(),I=!K&&yy(l,i),se=K&&gy(l,r,i,o);(I||se)&&(v={...v,...bg(x.data,l.options)}),i._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:N,errorUpdatedAt:E,status:C}=v;j=v.data;let w=!1;if(i.placeholderData!==void 0&&j===void 0&&C==="pending"){let K;d!=null&&d.isPlaceholderData&&i.placeholderData===(g==null?void 0:g.placeholderData)?(K=d.data,w=!0):K=typeof i.placeholderData=="function"?i.placeholderData((J=_(this,xl))==null?void 0:J.state.data,_(this,xl)):i.placeholderData,K!==void 0&&(C="success",j=xf(d==null?void 0:d.data,K,i),S=!0)}if(i.select&&j!==void 0&&!w)if(d&&j===(h==null?void 0:h.data)&&i.select===_(this,Gi))j=_(this,vl);else try{ne(this,Gi,i.select),j=i.select(j),j=xf(d==null?void 0:d.data,j,i),ne(this,vl,j),ne(this,_n,null)}catch(K){ne(this,_n,K)}_(this,_n)&&(N=_(this,_n),j=_(this,vl),E=Date.now(),C="error");const $=v.fetchStatus==="fetching",X=C==="pending",L=C==="error",Z=X&&$,ee=j!==void 0,F={status:C,fetchStatus:v.fetchStatus,isPending:X,isSuccess:C==="success",isError:L,isInitialLoading:Z,isLoading:Z,data:j,dataUpdatedAt:v.dataUpdatedAt,error:N,errorUpdatedAt:E,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:l.isFetched(),isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:$,isRefetching:$&&!X,isLoadingError:L&&!ee,isPaused:v.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:L&&ee,isStale:Gf(l,i),refetch:this.refetch,promise:_(this,Ha),isEnabled:ea(i.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const K=F.data!==void 0,I=F.status==="error"&&!K,se=te=>{I?te.reject(F.error):K&&te.resolve(F.data)},le=()=>{const te=ne(this,Ha,F.promise=bf());se(te)},ue=_(this,Ha);switch(ue.status){case"pending":l.queryHash===r.queryHash&&se(ue);break;case"fulfilled":(I||F.data!==ue.value)&&le();break;case"rejected":(!I||F.error!==ue.reason)&&le();break}}return F}updateResult(){const l=_(this,xt),i=this.createResult(_(this,Te),this.options);if(ne(this,os,_(this,Te).state),ne(this,pl,this.options),_(this,os).data!==void 0&&ne(this,xl,_(this,Te)),ju(i,l))return;ne(this,xt,i);const r=()=>{if(!l)return!0;const{notifyOnChangeProps:o}=this.options,d=typeof o=="function"?o():o;if(d==="all"||!d&&!_(this,bl).size)return!0;const h=new Set(d??_(this,bl));return this.options.throwOnError&&h.add("error"),Object.keys(_(this,xt)).some(g=>{const p=g;return _(this,xt)[p]!==l[p]&&h.has(p)})};ve(this,Oe,Sg).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,Oe,_f).call(this)}},Ct=new WeakMap,Te=new WeakMap,Yi=new WeakMap,xt=new WeakMap,os=new WeakMap,pl=new WeakMap,Ha=new WeakMap,_n=new WeakMap,Gi=new WeakMap,vl=new WeakMap,xl=new WeakMap,fs=new WeakMap,ds=new WeakMap,En=new WeakMap,bl=new WeakMap,Oe=new WeakSet,Ai=function(l){ve(this,Oe,Mf).call(this);let i=_(this,Te).fetch(this.options,l);return l!=null&&l.throwOnError||(i=i.catch(bt)),i},jf=function(){ve(this,Oe,Ef).call(this);const l=zn(this.options.staleTime,_(this,Te));if(Di.isServer()||_(this,xt).isStale||!pf(l))return;const r=hg(_(this,xt).dataUpdatedAt,l)+1;ne(this,fs,as.setTimeout(()=>{_(this,xt).isStale||this.updateResult()},r))},Nf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,Te)):this.options.refetchInterval)??!1},Rf=function(l){ve(this,Oe,Tf).call(this),ne(this,En,l),!(Di.isServer()||ea(this.options.enabled,_(this,Te))===!1||!pf(_(this,En))||_(this,En)===0)&&ne(this,ds,as.setInterval(()=>{(this.options.refetchIntervalInBackground||qf.isFocused())&&ve(this,Oe,Ai).call(this)},_(this,En)))},_f=function(){ve(this,Oe,jf).call(this),ve(this,Oe,Rf).call(this,ve(this,Oe,Nf).call(this))},Ef=function(){_(this,fs)&&(as.clearTimeout(_(this,fs)),ne(this,fs,void 0))},Tf=function(){_(this,ds)&&(as.clearInterval(_(this,ds)),ne(this,ds,void 0))},Mf=function(){const l=_(this,Ct).getQueryCache().build(_(this,Ct),this.options);if(l===_(this,Te))return;const i=_(this,Te);ne(this,Te,l),ne(this,Yi,l.state),this.hasListeners()&&(i==null||i.removeObserver(this),l.addObserver(this))},Sg=function(l){nt.batch(()=>{l.listeners&&this.listeners.forEach(i=>{i(_(this,xt))}),_(this,Ct).getQueryCache().notify({query:_(this,Te),type:"observerResultsUpdated"})})},ig);function hb(n,l){return ea(l.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&l.retryOnMount===!1)}function yy(n,l){return hb(n,l)||n.state.data!==void 0&&Cf(n,l,l.refetchOnMount)}function Cf(n,l,i){if(ea(l.enabled,n)!==!1&&zn(l.staleTime,n)!=="static"){const r=typeof i=="function"?i(n):i;return r==="always"||r!==!1&&Gf(n,l)}return!1}function gy(n,l,i,r){return(n!==l||ea(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Gf(n,i)}function Gf(n,l){return ea(l.enabled,n)!==!1&&n.isStaleByTime(zn(l.staleTime,n))}function mb(n,l){return!ju(n.getCurrentResult(),l)}function py(n){return{onFetch:(l,i)=>{var x,v,S,j,N;const r=l.options,o=(S=(v=(x=l.fetchOptions)==null?void 0:x.meta)==null?void 0:v.fetchMore)==null?void 0:S.direction,d=((j=l.state.data)==null?void 0:j.pages)||[],h=((N=l.state.data)==null?void 0:N.pageParams)||[];let g={pages:[],pageParams:[]},p=0;const m=async()=>{let E=!1;const C=X=>{ib(X,()=>l.signal,()=>E=!0)},w=yg(l.options,l.fetchOptions),$=async(X,L,Z)=>{if(E)return Promise.reject();if(L==null&&X.pages.length)return Promise.resolve(X);const P=(()=>{const I={client:l.client,queryKey:l.queryKey,pageParam:L,direction:Z?"backward":"forward",meta:l.options.meta};return C(I),I})(),F=await w(P),{maxPages:J}=l.options,K=Z?lb:sb;return{pages:K(X.pages,F,J),pageParams:K(X.pageParams,L,J)}};if(o&&d.length){const X=o==="backward",L=X?yb:vy,Z={pages:d,pageParams:h},ee=L(r,Z);g=await $(Z,ee,X)}else{const X=n??d.length;do{const L=p===0?h[0]??r.initialPageParam:vy(r,g);if(p>0&&L==null)break;g=await $(g,L),p++}while(p<X)}return g};l.options.persister?l.fetchFn=()=>{var E,C;return(C=(E=l.options).persister)==null?void 0:C.call(E,m,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},i)}:l.fetchFn=m}}}function vy(n,{pages:l,pageParams:i}){const r=l.length-1;return l.length>0?n.getNextPageParam(l[r],l,i[r],i):void 0}function yb(n,{pages:l,pageParams:i}){var r;return l.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,l[0],l,i[0],i):void 0}var Ki,ma,yt,hs,ya,bn,rg,gb=(rg=class extends vg{constructor(l){super();ce(this,ya);ce(this,Ki);ce(this,ma);ce(this,yt);ce(this,hs);ne(this,Ki,l.client),this.mutationId=l.mutationId,ne(this,yt,l.mutationCache),ne(this,ma,[]),this.state=l.state||jg(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){_(this,ma).includes(l)||(_(this,ma).push(l),this.clearGcTimeout(),_(this,yt).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){ne(this,ma,_(this,ma).filter(i=>i!==l)),this.scheduleGc(),_(this,yt).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){_(this,ma).length||(this.state.status==="pending"?this.scheduleGc():_(this,yt).remove(this))}continue(){var l;return((l=_(this,hs))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var h,g,p,m,x,v,S,j,N,E,C,w,$,X,L,Z,ee,P;const i=()=>{ve(this,ya,bn).call(this,{type:"continue"})},r={client:_(this,Ki),meta:this.options.meta,mutationKey:this.options.mutationKey};ne(this,hs,pg({fn:()=>this.options.mutationFn?this.options.mutationFn(l,r):Promise.reject(new Error("No mutationFn found")),onFail:(F,J)=>{ve(this,ya,bn).call(this,{type:"failed",failureCount:F,error:J})},onPause:()=>{ve(this,ya,bn).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,yt).canRun(this)}));const o=this.state.status==="pending",d=!_(this,hs).canStart();try{if(o)i();else{ve(this,ya,bn).call(this,{type:"pending",variables:l,isPaused:d}),_(this,yt).config.onMutate&&await _(this,yt).config.onMutate(l,this,r);const J=await((g=(h=this.options).onMutate)==null?void 0:g.call(h,l,r));J!==this.state.context&&ve(this,ya,bn).call(this,{type:"pending",context:J,variables:l,isPaused:d})}const F=await _(this,hs).start();return await((m=(p=_(this,yt).config).onSuccess)==null?void 0:m.call(p,F,l,this.state.context,this,r)),await((v=(x=this.options).onSuccess)==null?void 0:v.call(x,F,l,this.state.context,r)),await((j=(S=_(this,yt).config).onSettled)==null?void 0:j.call(S,F,null,this.state.variables,this.state.context,this,r)),await((E=(N=this.options).onSettled)==null?void 0:E.call(N,F,null,l,this.state.context,r)),ve(this,ya,bn).call(this,{type:"success",data:F}),F}catch(F){try{await((w=(C=_(this,yt).config).onError)==null?void 0:w.call(C,F,l,this.state.context,this,r))}catch(J){Promise.reject(J)}try{await((X=($=this.options).onError)==null?void 0:X.call($,F,l,this.state.context,r))}catch(J){Promise.reject(J)}try{await((Z=(L=_(this,yt).config).onSettled)==null?void 0:Z.call(L,void 0,F,this.state.variables,this.state.context,this,r))}catch(J){Promise.reject(J)}try{await((P=(ee=this.options).onSettled)==null?void 0:P.call(ee,void 0,F,l,this.state.context,r))}catch(J){Promise.reject(J)}throw ve(this,ya,bn).call(this,{type:"error",error:F}),F}finally{_(this,yt).runNext(this)}}},Ki=new WeakMap,ma=new WeakMap,yt=new WeakMap,hs=new WeakMap,ya=new WeakSet,bn=function(l){const i=r=>{switch(l.type){case"failed":return{...r,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...r,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:l.error,failureCount:r.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=i(this.state),nt.batch(()=>{_(this,ma).forEach(r=>{r.onMutationUpdate(l)}),_(this,yt).notify({mutation:this,type:"updated",action:l})})},rg);function jg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qa,la,Vi,ug,pb=(ug=class extends Tl{constructor(l={}){super();ce(this,Qa);ce(this,la);ce(this,Vi);this.config=l,ne(this,Qa,new Set),ne(this,la,new Map),ne(this,Vi,0)}build(l,i,r){const o=new gb({client:l,mutationCache:this,mutationId:++du(this,Vi)._,options:l.defaultMutationOptions(i),state:r});return this.add(o),o}add(l){_(this,Qa).add(l);const i=hu(l);if(typeof i=="string"){const r=_(this,la).get(i);r?r.push(l):_(this,la).set(i,[l])}this.notify({type:"added",mutation:l})}remove(l){if(_(this,Qa).delete(l)){const i=hu(l);if(typeof i=="string"){const r=_(this,la).get(i);if(r)if(r.length>1){const o=r.indexOf(l);o!==-1&&r.splice(o,1)}else r[0]===l&&_(this,la).delete(i)}}this.notify({type:"removed",mutation:l})}canRun(l){const i=hu(l);if(typeof i=="string"){const r=_(this,la).get(i),o=r==null?void 0:r.find(d=>d.state.status==="pending");return!o||o===l}else return!0}runNext(l){var r;const i=hu(l);if(typeof i=="string"){const o=(r=_(this,la).get(i))==null?void 0:r.find(d=>d!==l&&d.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nt.batch(()=>{_(this,Qa).forEach(l=>{this.notify({type:"removed",mutation:l})}),_(this,Qa).clear(),_(this,la).clear()})}getAll(){return Array.from(_(this,Qa))}find(l){const i={exact:!0,...l};return this.getAll().find(r=>oy(i,r))}findAll(l={}){return this.getAll().filter(i=>oy(l,i))}notify(l){nt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}resumePausedMutations(){const l=this.getAll().filter(i=>i.state.isPaused);return nt.batch(()=>Promise.all(l.map(i=>i.continue().catch(bt))))}},Qa=new WeakMap,la=new WeakMap,Vi=new WeakMap,ug);function hu(n){var l;return(l=n.options.scope)==null?void 0:l.id}var Ya,Tn,At,Ga,Xa,pu,Af,cg,vb=(cg=class extends Tl{constructor(i,r){super();ce(this,Xa);ce(this,Ya);ce(this,Tn);ce(this,At);ce(this,Ga);ne(this,Ya,i),this.setOptions(r),this.bindMethods(),ve(this,Xa,pu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var o;const r=this.options;this.options=_(this,Ya).defaultMutationOptions(i),ju(this.options,r)||_(this,Ya).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,At),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ps(r.mutationKey)!==ps(this.options.mutationKey)?this.reset():((o=_(this,At))==null?void 0:o.state.status)==="pending"&&_(this,At).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=_(this,At))==null||i.removeObserver(this)}onMutationUpdate(i){ve(this,Xa,pu).call(this),ve(this,Xa,Af).call(this,i)}getCurrentResult(){return _(this,Tn)}reset(){var i;(i=_(this,At))==null||i.removeObserver(this),ne(this,At,void 0),ve(this,Xa,pu).call(this),ve(this,Xa,Af).call(this)}mutate(i,r){var o;return ne(this,Ga,r),(o=_(this,At))==null||o.removeObserver(this),ne(this,At,_(this,Ya).getMutationCache().build(_(this,Ya),this.options)),_(this,At).addObserver(this),_(this,At).execute(i)}},Ya=new WeakMap,Tn=new WeakMap,At=new WeakMap,Ga=new WeakMap,Xa=new WeakSet,pu=function(){var r;const i=((r=_(this,At))==null?void 0:r.state)??jg();ne(this,Tn,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Af=function(i){nt.batch(()=>{var r,o,d,h,g,p,m,x;if(_(this,Ga)&&this.hasListeners()){const v=_(this,Tn).variables,S=_(this,Tn).context,j={client:_(this,Ya),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(o=(r=_(this,Ga)).onSuccess)==null||o.call(r,i.data,v,S,j)}catch(N){Promise.reject(N)}try{(h=(d=_(this,Ga)).onSettled)==null||h.call(d,i.data,null,v,S,j)}catch(N){Promise.reject(N)}}else if((i==null?void 0:i.type)==="error"){try{(p=(g=_(this,Ga)).onError)==null||p.call(g,i.error,v,S,j)}catch(N){Promise.reject(N)}try{(x=(m=_(this,Ga)).onSettled)==null||x.call(m,void 0,i.error,v,S,j)}catch(N){Promise.reject(N)}}}this.listeners.forEach(v=>{v(_(this,Tn))})})},cg),ga,og,xb=(og=class extends Tl{constructor(l={}){super();ce(this,ga);this.config=l,ne(this,ga,new Map)}build(l,i,r){const o=i.queryKey,d=i.queryHash??Hf(o,i);let h=this.get(d);return h||(h=new fb({client:l,queryKey:o,queryHash:d,options:l.defaultQueryOptions(i),state:r,defaultOptions:l.getQueryDefaults(o)}),this.add(h)),h}add(l){_(this,ga).has(l.queryHash)||(_(this,ga).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const i=_(this,ga).get(l.queryHash);i&&(l.destroy(),i===l&&_(this,ga).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){nt.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return _(this,ga).get(l)}getAll(){return[..._(this,ga).values()]}find(l){const i={exact:!0,...l};return this.getAll().find(r=>cy(i,r))}findAll(l={}){const i=this.getAll();return Object.keys(l).length>0?i.filter(r=>cy(l,r)):i}notify(l){nt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}onFocus(){nt.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){nt.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},ga=new WeakMap,og),$e,Mn,Cn,Sl,jl,An,Nl,Rl,fg,bb=(fg=class{constructor(n={}){ce(this,$e);ce(this,Mn);ce(this,Cn);ce(this,Sl);ce(this,jl);ce(this,An);ce(this,Nl);ce(this,Rl);ne(this,$e,n.queryCache||new xb),ne(this,Mn,n.mutationCache||new pb),ne(this,Cn,n.defaultOptions||{}),ne(this,Sl,new Map),ne(this,jl,new Map),ne(this,An,0)}mount(){du(this,An)._++,_(this,An)===1&&(ne(this,Nl,qf.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,$e).onFocus())})),ne(this,Rl,Nu.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,$e).onOnline())})))}unmount(){var n,l;du(this,An)._--,_(this,An)===0&&((n=_(this,Nl))==null||n.call(this),ne(this,Nl,void 0),(l=_(this,Rl))==null||l.call(this),ne(this,Rl,void 0))}isFetching(n){return _(this,$e).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return _(this,Mn).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=_(this,$e).get(l.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const l=this.defaultQueryOptions(n),i=_(this,$e).build(this,l),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(zn(l.staleTime,i))&&this.prefetchQuery(l),Promise.resolve(r))}getQueriesData(n){return _(this,$e).findAll(n).map(({queryKey:l,state:i})=>{const r=i.data;return[l,r]})}setQueryData(n,l,i){const r=this.defaultQueryOptions({queryKey:n}),o=_(this,$e).get(r.queryHash),d=o==null?void 0:o.state.data,h=tb(l,d);if(h!==void 0)return _(this,$e).build(this,r).setData(h,{...i,manual:!0})}setQueriesData(n,l,i){return nt.batch(()=>_(this,$e).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,l,i)]))}getQueryState(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=_(this,$e).get(l.queryHash))==null?void 0:i.state}removeQueries(n){const l=_(this,$e);nt.batch(()=>{l.findAll(n).forEach(i=>{l.remove(i)})})}resetQueries(n,l){const i=_(this,$e);return nt.batch(()=>(i.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},l)))}cancelQueries(n,l={}){const i={revert:!0,...l},r=nt.batch(()=>_(this,$e).findAll(n).map(o=>o.cancel(i)));return Promise.all(r).then(bt).catch(bt)}invalidateQueries(n,l={}){return nt.batch(()=>(_(this,$e).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},l)))}refetchQueries(n,l={}){const i={...l,cancelRefetch:l.cancelRefetch??!0},r=nt.batch(()=>_(this,$e).findAll(n).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let d=o.fetch(void 0,i);return i.throwOnError||(d=d.catch(bt)),o.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(bt)}fetchQuery(n){const l=this.defaultQueryOptions(n);l.retry===void 0&&(l.retry=!1);const i=_(this,$e).build(this,l);return i.isStaleByTime(zn(l.staleTime,i))?i.fetch(l):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(bt).catch(bt)}fetchInfiniteQuery(n){return n.behavior=py(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(bt).catch(bt)}ensureInfiniteQueryData(n){return n.behavior=py(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Nu.isOnline()?_(this,Mn).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,$e)}getMutationCache(){return _(this,Mn)}getDefaultOptions(){return _(this,Cn)}setDefaultOptions(n){ne(this,Cn,n)}setQueryDefaults(n,l){_(this,Sl).set(ps(n),{queryKey:n,defaultOptions:l})}getQueryDefaults(n){const l=[..._(this,Sl).values()],i={};return l.forEach(r=>{zi(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,l){_(this,jl).set(ps(n),{mutationKey:n,defaultOptions:l})}getMutationDefaults(n){const l=[..._(this,jl).values()],i={};return l.forEach(r=>{zi(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const l={..._(this,Cn).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return l.queryHash||(l.queryHash=Hf(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===Qf&&(l.enabled=!1),l}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{..._(this,Cn).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){_(this,$e).clear(),_(this,Mn).clear()}},$e=new WeakMap,Mn=new WeakMap,Cn=new WeakMap,Sl=new WeakMap,jl=new WeakMap,An=new WeakMap,Nl=new WeakMap,Rl=new WeakMap,fg),Ng=Q.createContext(void 0),Un=n=>{const l=Q.useContext(Ng);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},Sb=({client:n,children:l})=>(Q.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(Ng.Provider,{value:n,children:l})),Rg=Q.createContext(!1),jb=()=>Q.useContext(Rg);Rg.Provider;function Nb(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var Rb=Q.createContext(Nb()),_b=()=>Q.useContext(Rb),Eb=(n,l,i)=>{const r=i!=null&&i.state.error&&typeof n.throwOnError=="function"?Yf(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||r)&&(l.isReset()||(n.retryOnMount=!1))},Tb=n=>{Q.useEffect(()=>{n.clearReset()},[n])},Mb=({result:n,errorResetBoundary:l,throwOnError:i,query:r,suspense:o})=>n.isError&&!l.isReset()&&!n.isFetching&&r&&(o&&n.data===void 0||Yf(i,[n.error,r])),Cb=n=>{if(n.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...o)=>i(r(...o)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Ab=(n,l)=>n.isLoading&&n.isFetching&&!l,wb=(n,l)=>(n==null?void 0:n.suspense)&&l.isPending,xy=(n,l,i)=>l.fetchOptimistic(n).catch(()=>{i.clearReset()});function Ob(n,l,i){var S,j,N,E;const r=jb(),o=_b(),d=Un(),h=d.defaultQueryOptions(n);(j=(S=d.getDefaultOptions().queries)==null?void 0:S._experimental_beforeQuery)==null||j.call(S,h);const g=d.getQueryCache().get(h.queryHash);h._optimisticResults=r?"isRestoring":"optimistic",Cb(h),Eb(h,o,g),Tb(o);const p=!d.getQueryCache().get(h.queryHash),[m]=Q.useState(()=>new l(d,h)),x=m.getOptimisticResult(h),v=!r&&n.subscribed!==!1;if(Q.useSyncExternalStore(Q.useCallback(C=>{const w=v?m.subscribe(nt.batchCalls(C)):bt;return m.updateResult(),w},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),Q.useEffect(()=>{m.setOptions(h)},[h,m]),wb(h,x))throw xy(h,m,o);if(Mb({result:x,errorResetBoundary:o,throwOnError:h.throwOnError,query:g,suspense:h.suspense}))throw x.error;if((E=(N=d.getDefaultOptions().queries)==null?void 0:N._experimental_afterQuery)==null||E.call(N,h,x),h.experimental_prefetchInRender&&!Di.isServer()&&Ab(x,r)){const C=p?xy(h,m,o):g==null?void 0:g.promise;C==null||C.catch(bt).finally(()=>{m.updateResult()})}return h.notifyOnChangeProps?x:m.trackResult(x)}function Ve(n,l){return Ob(n,db)}function zb(n,l){const i=Un(),[r]=Q.useState(()=>new vb(i,n));Q.useEffect(()=>{r.setOptions(n)},[r,n]);const o=Q.useSyncExternalStore(Q.useCallback(h=>r.subscribe(nt.batchCalls(h)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),d=Q.useCallback((h,g)=>{r.mutate(h,g).catch(bt)},[r]);if(o.error&&Yf(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:d,mutateAsync:o.mutate}}var wi=typeof window<"u"?Q.useLayoutEffect:Q.useEffect;function af(n){const l=Q.useRef({value:n,prev:null}),i=l.current.value;return n!==i&&(l.current={value:n,prev:i}),l.current.prev}function Db(n,l,i={},r={}){Q.useEffect(()=>{if(!n.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([d])=>{l(d)},i);return o.observe(n.current),()=>{o.disconnect()}},[l,i,r.disabled,n])}function Lb(n){const l=Q.useRef(null);return Q.useImperativeHandle(n,()=>l.current,[]),l}var _g=!1;function Li(n){return n[n.length-1]}function Ub(n){return typeof n=="function"}function wn(n,l){return Ub(n)?n(l):n}var Bb=Object.prototype.hasOwnProperty,by=Object.prototype.propertyIsEnumerable,qb=()=>Object.create(null),ts=(n,l)=>Ka(n,l,qb);function Ka(n,l,i=()=>({}),r=0){if(n===l)return n;if(r>500)return l;const o=l,d=Ny(n)&&Ny(o);if(!d&&!(_l(n)&&_l(o)))return o;const h=d?n:Sy(n);if(!h)return o;const g=d?o:Sy(o);if(!g)return o;const p=h.length,m=g.length,x=d?new Array(m):i();let v=0;for(let S=0;S<m;S++){const j=d?S:g[S],N=n[j],E=o[j];if(N===E){x[j]=N,(d?S<p:Bb.call(n,j))&&v++;continue}if(N===null||E===null||typeof N!="object"||typeof E!="object"){x[j]=E;continue}const C=Ka(N,E,i,r+1);x[j]=C,C===N&&v++}return p===m&&v===p?n:x}function Sy(n){const l=Object.getOwnPropertyNames(n);for(const o of l)if(!by.call(n,o))return!1;const i=Object.getOwnPropertySymbols(n);if(i.length===0)return l;const r=l;for(const o of i){if(!by.call(n,o))return!1;r.push(o)}return r}function _l(n){if(!jy(n))return!1;const l=n.constructor;if(typeof l>"u")return!0;const i=l.prototype;return!(!jy(i)||!i.hasOwnProperty("isPrototypeOf"))}function jy(n){return Object.prototype.toString.call(n)==="[object Object]"}function Ny(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ms(n,l,i){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(Array.isArray(n)&&Array.isArray(l)){if(n.length!==l.length)return!1;for(let r=0,o=n.length;r<o;r++)if(!ms(n[r],l[r],i))return!1;return!0}if(_l(n)&&_l(l)){const r=(i==null?void 0:i.ignoreUndefined)??!0;if(i!=null&&i.partial){for(const h in l)if((!r||l[h]!==void 0)&&!ms(n[h],l[h],i))return!1;return!0}let o=0;if(!r)o=Object.keys(n).length;else for(const h in n)n[h]!==void 0&&o++;let d=0;for(const h in l)if((!r||l[h]!==void 0)&&(d++,d>o||!ms(n[h],l[h],i)))return!1;return o===d}return!1}function El(n){let l,i;const r=new Promise((o,d)=>{l=o,i=d});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,l(o),n==null||n(o)},r.reject=o=>{r.status="rejected",i(o)},r}function Ui(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function Hb(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function Ry(n){let l;try{l=decodeURI(n)}catch{l=n.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return Hb(l)}var Qb=["http:","https:","mailto:","tel:"];function Ru(n,l){if(!n)return!1;try{const i=new URL(n);return!l.has(i.protocol)}catch{return!1}}function Ri(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const l=/%25|%5C/gi;let i=0,r="",o;for(;(o=l.exec(n))!==null;)r+=Ry(n.slice(i,o.index))+o[0],i=l.lastIndex;r=r+Ry(i?n.slice(i):n);let d=!1;return r.startsWith("//")&&(d=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:d}}function Yb(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function Gb(n,l){if(n===l)return!0;if(n.length!==l.length)return!1;for(let i=0;i<n.length;i++)if(n[i]!==l[i])return!1;return!0}function Va(){throw new Error("Invariant failed")}function Bi(n){const l=new Map;let i,r;const o=d=>{d.next&&(d.prev?(d.prev.next=d.next,d.next.prev=d.prev,d.next=void 0,r&&(r.next=d,d.prev=r)):(d.next.prev=void 0,i=d.next,d.next=void 0,r&&(d.prev=r,r.next=d)),r=d)};return{get(d){const h=l.get(d);if(h)return o(h),h.value},set(d,h){if(l.size>=n&&i){const p=i;l.delete(p.key),p.next&&(i=p.next,p.next.prev=void 0),p===r&&(r=void 0)}const g=l.get(d);if(g)g.value=h,o(g);else{const p={key:d,value:h,prev:r};r&&(r.next=p),r=p,i||(i=p),l.set(d,p)}},clear(){l.clear(),i=void 0,r=void 0}}}var ns=4,Eg=5;function Kb(n){const l=n.indexOf("{");if(l===-1)return null;const i=n.indexOf("}",l);return i===-1||l+1>=n.length?null:[l,i]}function Kf(n,l,i=new Uint16Array(6)){const r=n.indexOf("/",l),o=r===-1?n.length:r,d=n.substring(l,o);if(!d||!d.includes("$"))return i[0]=0,i[1]=l,i[2]=l,i[3]=o,i[4]=o,i[5]=o,i;if(d==="$"){const g=n.length;return i[0]=2,i[1]=l,i[2]=l,i[3]=g,i[4]=g,i[5]=g,i}if(d.charCodeAt(0)===36)return i[0]=1,i[1]=l,i[2]=l+1,i[3]=o,i[4]=o,i[5]=o,i;const h=Kb(d);if(h){const[g,p]=h,m=d.charCodeAt(g+1);if(m===45){if(g+2<d.length&&d.charCodeAt(g+2)===36){const x=g+3,v=p;if(x<v)return i[0]=3,i[1]=l+g,i[2]=l+x,i[3]=l+v,i[4]=l+p+1,i[5]=o,i}}else if(m===36){const x=g+1,v=g+2;return v===p?(i[0]=2,i[1]=l+g,i[2]=l+x,i[3]=l+v,i[4]=l+p+1,i[5]=n.length,i):(i[0]=1,i[1]=l+g,i[2]=l+v,i[3]=l+p,i[4]=l+p+1,i[5]=o,i)}}return i[0]=0,i[1]=l,i[2]=l,i[3]=o,i[4]=o,i[5]=o,i}function wu(n,l,i,r,o,d,h){var p,m,x,v,S,j,N,E,C,w,$,X,L;h==null||h(i);let g=r;{const Z=i.fullPath??i.from,ee=Z.length,P=((p=i.options)==null?void 0:p.caseSensitive)??n,F=!!((x=(m=i.options)==null?void 0:m.params)!=null&&x.parse&&((S=(v=i.options)==null?void 0:v.skipRouteOnParseError)!=null&&S.params));for(;g<ee;){const K=Kf(Z,g,l);let I;const se=g,le=K[5];switch(g=le+1,d++,K[0]){case 0:{const ue=Z.substring(K[2],K[3]);if(P){const te=(j=o.static)==null?void 0:j.get(ue);if(te)I=te;else{o.static??(o.static=new Map);const D=ss(i.fullPath??i.from);D.parent=o,D.depth=d,I=D,o.static.set(ue,D)}}else{const te=ue.toLowerCase(),D=(N=o.staticInsensitive)==null?void 0:N.get(te);if(D)I=D;else{o.staticInsensitive??(o.staticInsensitive=new Map);const V=ss(i.fullPath??i.from);V.parent=o,V.depth=d,I=V,o.staticInsensitive.set(te,V)}}break}case 1:{const ue=Z.substring(se,K[1]),te=Z.substring(K[4],le),D=P&&!!(ue||te),V=ue?D?ue:ue.toLowerCase():void 0,ae=te?D?te:te.toLowerCase():void 0,he=!F&&((E=o.dynamic)==null?void 0:E.find(fe=>!fe.skipOnParamError&&fe.caseSensitive===D&&fe.prefix===V&&fe.suffix===ae));if(he)I=he;else{const fe=sf(1,i.fullPath??i.from,D,V,ae);I=fe,fe.depth=d,fe.parent=o,o.dynamic??(o.dynamic=[]),o.dynamic.push(fe)}break}case 3:{const ue=Z.substring(se,K[1]),te=Z.substring(K[4],le),D=P&&!!(ue||te),V=ue?D?ue:ue.toLowerCase():void 0,ae=te?D?te:te.toLowerCase():void 0,he=!F&&((C=o.optional)==null?void 0:C.find(fe=>!fe.skipOnParamError&&fe.caseSensitive===D&&fe.prefix===V&&fe.suffix===ae));if(he)I=he;else{const fe=sf(3,i.fullPath??i.from,D,V,ae);I=fe,fe.parent=o,fe.depth=d,o.optional??(o.optional=[]),o.optional.push(fe)}break}case 2:{const ue=Z.substring(se,K[1]),te=Z.substring(K[4],le),D=P&&!!(ue||te),V=ue?D?ue:ue.toLowerCase():void 0,ae=te?D?te:te.toLowerCase():void 0,he=sf(2,i.fullPath??i.from,D,V,ae);I=he,he.parent=o,he.depth=d,o.wildcard??(o.wildcard=[]),o.wildcard.push(he)}}o=I}if(F&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const K=ss(i.fullPath??i.from);K.kind=Eg,K.parent=o,d++,K.depth=d,o.pathless??(o.pathless=[]),o.pathless.push(K),o=K}const J=(i.path||!i.children)&&!i.isRoot;if(J&&Z.endsWith("/")){const K=ss(i.fullPath??i.from);K.kind=ns,K.parent=o,d++,K.depth=d,o.index=K,o=K}o.parse=(($=(w=i.options)==null?void 0:w.params)==null?void 0:$.parse)??null,o.skipOnParamError=F,o.parsingPriority=((L=(X=i.options)==null?void 0:X.skipRouteOnParseError)==null?void 0:L.priority)??0,J&&!o.route&&(o.route=i,o.fullPath=i.fullPath??i.from)}if(i.children)for(const Z of i.children)wu(n,l,Z,g,o,d,h)}function nf(n,l){if(n.skipOnParamError&&!l.skipOnParamError)return-1;if(!n.skipOnParamError&&l.skipOnParamError)return 1;if(n.skipOnParamError&&l.skipOnParamError&&(n.parsingPriority||l.parsingPriority))return l.parsingPriority-n.parsingPriority;if(n.prefix&&l.prefix&&n.prefix!==l.prefix){if(n.prefix.startsWith(l.prefix))return-1;if(l.prefix.startsWith(n.prefix))return 1}if(n.suffix&&l.suffix&&n.suffix!==l.suffix){if(n.suffix.endsWith(l.suffix))return-1;if(l.suffix.endsWith(n.suffix))return 1}return n.prefix&&!l.prefix?-1:!n.prefix&&l.prefix?1:n.suffix&&!l.suffix?-1:!n.suffix&&l.suffix?1:n.caseSensitive&&!l.caseSensitive?-1:!n.caseSensitive&&l.caseSensitive?1:0}function Sn(n){var l,i,r;if(n.pathless)for(const o of n.pathless)Sn(o);if(n.static)for(const o of n.static.values())Sn(o);if(n.staticInsensitive)for(const o of n.staticInsensitive.values())Sn(o);if((l=n.dynamic)!=null&&l.length){n.dynamic.sort(nf);for(const o of n.dynamic)Sn(o)}if((i=n.optional)!=null&&i.length){n.optional.sort(nf);for(const o of n.optional)Sn(o)}if((r=n.wildcard)!=null&&r.length){n.wildcard.sort(nf);for(const o of n.wildcard)Sn(o)}}function ss(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function sf(n,l,i,r,o){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:l,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:i,prefix:r,suffix:o}}function Vb(n,l){const i=ss("/"),r=new Uint16Array(6);for(const o of n)wu(!1,r,o,1,i,0);Sn(i),l.masksTree=i,l.flatCache=Bi(1e3)}function Xb(n,l){n||(n="/");const i=l.flatCache.get(n);if(i)return i;const r=Vf(n,l.masksTree);return l.flatCache.set(n,r),r}function Zb(n,l,i,r,o){n||(n="/"),r||(r="/");const d=l?`case\0${n}`:n;let h=o.singleCache.get(d);return h||(h=ss("/"),wu(l,new Uint16Array(6),{from:n},1,h,0),o.singleCache.set(d,h)),Vf(r,h,i)}function kb(n,l,i=!1){const r=i?n:`nofuzz\0${n}`,o=l.matchCache.get(r);if(o!==void 0)return o;n||(n="/");let d;try{d=Vf(n,l.segmentTree,i)}catch(h){if(h instanceof URIError)d=null;else throw h}return d&&(d.branch=Fb(d.route)),l.matchCache.set(r,d),d}function $b(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function Pb(n,l=!1,i){const r=ss(n.fullPath),o=new Uint16Array(6),d={},h={};let g=0;return wu(l,o,n,1,r,0,p=>{if(i==null||i(p,g),p.id in d&&Va(),d[p.id]=p,g!==0&&p.path){const m=$b(p.fullPath);(!h[m]||p.fullPath.endsWith("/"))&&(h[m]=p)}g++}),Sn(r),{processedTree:{segmentTree:r,singleCache:Bi(1e3),matchCache:Bi(1e3),flatCache:null,masksTree:null},routesById:d,routesByPath:h}}function Vf(n,l,i=!1){const r=n.split("/"),o=Ib(n,r,l,i);if(!o)return null;const[d]=Tg(n,r,o);return{route:o.node.route,rawParams:d,parsedParams:o.parsedParams}}function Tg(n,l,i){var x,v,S,j,N,E,C,w,$,X;const r=Jb(i.node);let o=null;const d=Object.create(null);let h=((x=i.extract)==null?void 0:x.part)??0,g=((v=i.extract)==null?void 0:v.node)??0,p=((S=i.extract)==null?void 0:S.path)??0,m=((j=i.extract)==null?void 0:j.segment)??0;for(;g<r.length;h++,g++,p++,m++){const L=r[g];if(L.kind===ns)break;if(L.kind===Eg){m--,h--,p--;continue}const Z=l[h],ee=p;if(Z&&(p+=Z.length),L.kind===1){o??(o=i.node.fullPath.split("/"));const P=o[m],F=((N=L.prefix)==null?void 0:N.length)??0;if(P.charCodeAt(F)===123){const J=((E=L.suffix)==null?void 0:E.length)??0,K=P.substring(F+2,P.length-J-1),I=Z.substring(F,Z.length-J);d[K]=decodeURIComponent(I)}else{const J=P.substring(1);d[J]=decodeURIComponent(Z)}}else if(L.kind===3){if(i.skipped&1<<g){h--,p=ee-1;continue}o??(o=i.node.fullPath.split("/"));const P=o[m],F=((C=L.prefix)==null?void 0:C.length)??0,J=((w=L.suffix)==null?void 0:w.length)??0,K=P.substring(F+3,P.length-J-1),I=L.suffix||L.prefix?Z.substring(F,Z.length-J):Z;I&&(d[K]=decodeURIComponent(I))}else if(L.kind===2){const P=L,F=n.substring(ee+((($=P.prefix)==null?void 0:$.length)??0),n.length-(((X=P.suffix)==null?void 0:X.length)??0)),J=decodeURIComponent(F);d["*"]=J,d._splat=J;break}}return i.rawParams&&Object.assign(d,i.rawParams),[d,{part:h,node:g,path:p,segment:m}]}function Fb(n){const l=[n];for(;n.parentRoute;)n=n.parentRoute,l.push(n);return l.reverse(),l}function Jb(n){const l=Array(n.depth+1);do l[n.depth]=n,n=n.parent;while(n);return l}function Ib(n,l,i,r){if(n==="/"&&i.index)return{node:i.index,skipped:0};const o=!Li(l),d=o&&n!=="/",h=l.length-(o?1:0),g=[{node:i,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let p=null,m=null,x=null;for(;g.length;){const v=g.pop(),{node:S,index:j,skipped:N,depth:E,statics:C,dynamics:w,optionals:$}=v;let{extract:X,rawParams:L,parsedParams:Z}=v;if(S.skipOnParamError){if(!lf(n,l,v))continue;L=v.rawParams,X=v.extract,Z=v.parsedParams}r&&S.route&&S.kind!==ns&&_i(m,v)&&(m=v);const ee=j===h;if(ee&&(S.route&&!d&&_i(x,v)&&(x=v),!S.optional&&!S.wildcard&&!S.index&&!S.pathless))continue;const P=ee?void 0:l[j];let F;if(ee&&S.index){const J={node:S.index,index:j,skipped:N,depth:E+1,statics:C,dynamics:w,optionals:$,extract:X,rawParams:L,parsedParams:Z};let K=!0;if(S.index.skipOnParamError&&(lf(n,l,J)||(K=!1)),K){if(C===h&&!w&&!$&&!N)return J;_i(x,J)&&(x=J)}}if(S.wildcard&&_i(p,v))for(const J of S.wildcard){const{prefix:K,suffix:I}=J;if(K&&(ee||!(J.caseSensitive?P:F??(F=P.toLowerCase())).startsWith(K)))continue;if(I){if(ee)continue;const le=l.slice(j).join("/").slice(-I.length);if((J.caseSensitive?le:le.toLowerCase())!==I)continue}const se={node:J,index:h,skipped:N,depth:E,statics:C,dynamics:w,optionals:$,extract:X,rawParams:L,parsedParams:Z};if(!(J.skipOnParamError&&!lf(n,l,se))){p=se;break}}if(S.optional){const J=N|1<<E,K=E+1;for(let I=S.optional.length-1;I>=0;I--){const se=S.optional[I];g.push({node:se,index:j,skipped:J,depth:K,statics:C,dynamics:w,optionals:$,extract:X,rawParams:L,parsedParams:Z})}if(!ee)for(let I=S.optional.length-1;I>=0;I--){const se=S.optional[I],{prefix:le,suffix:ue}=se;if(le||ue){const te=se.caseSensitive?P:F??(F=P.toLowerCase());if(le&&!te.startsWith(le)||ue&&!te.endsWith(ue))continue}g.push({node:se,index:j+1,skipped:N,depth:K,statics:C,dynamics:w,optionals:$+1,extract:X,rawParams:L,parsedParams:Z})}}if(!ee&&S.dynamic&&P)for(let J=S.dynamic.length-1;J>=0;J--){const K=S.dynamic[J],{prefix:I,suffix:se}=K;if(I||se){const le=K.caseSensitive?P:F??(F=P.toLowerCase());if(I&&!le.startsWith(I)||se&&!le.endsWith(se))continue}g.push({node:K,index:j+1,skipped:N,depth:E+1,statics:C,dynamics:w+1,optionals:$,extract:X,rawParams:L,parsedParams:Z})}if(!ee&&S.staticInsensitive){const J=S.staticInsensitive.get(F??(F=P.toLowerCase()));J&&g.push({node:J,index:j+1,skipped:N,depth:E+1,statics:C+1,dynamics:w,optionals:$,extract:X,rawParams:L,parsedParams:Z})}if(!ee&&S.static){const J=S.static.get(P);J&&g.push({node:J,index:j+1,skipped:N,depth:E+1,statics:C+1,dynamics:w,optionals:$,extract:X,rawParams:L,parsedParams:Z})}if(S.pathless){const J=E+1;for(let K=S.pathless.length-1;K>=0;K--){const I=S.pathless[K];g.push({node:I,index:j,skipped:N,depth:J,statics:C,dynamics:w,optionals:$,extract:X,rawParams:L,parsedParams:Z})}}}if(x&&p)return _i(p,x)?x:p;if(x)return x;if(p)return p;if(r&&m){let v=m.index;for(let j=0;j<m.index;j++)v+=l[j].length;const S=v===n.length?"/":n.slice(v);return m.rawParams??(m.rawParams=Object.create(null)),m.rawParams["**"]=decodeURIComponent(S),m}return null}function lf(n,l,i){try{const[r,o]=Tg(n,l,i);i.rawParams=r,i.extract=o;const d=i.node.parse(r);return i.parsedParams=Object.assign(Object.create(null),i.parsedParams,d),!0}catch{return null}}function _i(n,l){return n?l.statics>n.statics||l.statics===n.statics&&(l.dynamics>n.dynamics||l.dynamics===n.dynamics&&(l.optionals>n.optionals||l.optionals===n.optionals&&((l.node.kind===ns)>(n.node.kind===ns)||l.node.kind===ns==(n.node.kind===ns)&&l.depth>n.depth))):!0}function vu(n){return Xf(n.filter(l=>l!==void 0).join("/"))}function Xf(n){return n.replace(/\/{2,}/g,"/")}function Mg(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function Dn(n){const l=n.length;return l>1&&n[l-1]==="/"?n.replace(/\/{1,}$/,""):n}function Cg(n){return Dn(Mg(n))}function _u(n,l){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${l}/`?n.slice(0,-1):n}function Wb(n,l,i){return _u(n,i)===_u(l,i)}function eS({base:n,to:l,trailingSlash:i="never",cache:r}){const o=l.startsWith("/"),d=!o&&l===".";let h;if(r){h=o?l:d?n:n+"\0"+l;const v=r.get(h);if(v)return v}let g;if(d)g=n.split("/");else if(o)g=l.split("/");else{for(g=n.split("/");g.length>1&&Li(g)==="";)g.pop();const v=l.split("/");for(let S=0,j=v.length;S<j;S++){const N=v[S];N===""?S?S===j-1&&g.push(N):g=[N]:N===".."?g.pop():N==="."||g.push(N)}}g.length>1&&(Li(g)===""?i==="never"&&g.pop():i==="always"&&g.push(""));let p,m="";for(let v=0;v<g.length;v++){v>0&&(m+="/");const S=g[v];if(!S)continue;p=Kf(S,0,p);const j=p[0];if(j===0){m+=S;continue}const N=p[5],E=S.substring(0,p[1]),C=S.substring(p[4],N),w=S.substring(p[2],p[3]);j===1?m+=E||C?`${E}{$${w}}${C}`:`$${w}`:j===2?m+=E||C?`${E}{$}${C}`:"$":m+=`${E}{-$${w}}${C}`}m=Xf(m);const x=m||"/";return h&&r&&r.set(h,x),x}function tS(n){const l=new Map(n.map(o=>[encodeURIComponent(o),o])),i=Array.from(l.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(i,"g");return o=>o.replace(r,d=>l.get(d)??d)}function rf(n,l,i){const r=l[n];return typeof r!="string"?r:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>Ey(o,i)).join("/"):Ey(r,i)}function _y({path:n,params:l,decoder:i,...r}){let o=!1;const d=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:d,isMissingParams:o};if(!n.includes("$"))return{interpolatedPath:n,usedParams:d,isMissingParams:o};const h=n.length;let g=0,p,m="";for(;g<h;){const x=g;p=Kf(n,x,p);const v=p[5];if(g=v+1,x===v)continue;const S=p[0];if(S===0){m+="/"+n.substring(x,v);continue}if(S===2){const j=l._splat;d._splat=j,d["*"]=j;const N=n.substring(x,p[1]),E=n.substring(p[4],v);if(!j){o=!0,(N||E)&&(m+="/"+N+E);continue}const C=rf("_splat",l,i);m+="/"+N+C+E;continue}if(S===1){const j=n.substring(p[2],p[3]);!o&&!(j in l)&&(o=!0),d[j]=l[j];const N=n.substring(x,p[1]),E=n.substring(p[4],v),C=rf(j,l,i)??"undefined";m+="/"+N+C+E;continue}if(S===3){const j=n.substring(p[2],p[3]),N=l[j];if(N==null)continue;d[j]=N;const E=n.substring(x,p[1]),C=n.substring(p[4],v),w=rf(j,l,i)??"";m+="/"+E+w+C;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:d,interpolatedPath:m||"/",isMissingParams:o}}function Ey(n,l){const i=encodeURIComponent(n);return(l==null?void 0:l(i))??i}function St(n){return!!(n!=null&&n.isNotFound)}function aS(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var nS="tsr-scroll-restoration-v1_3";function sS(){const n=aS();if(!n)return null;let l={};try{const r=JSON.parse(n.getItem("tsr-scroll-restoration-v1_3")||"{}");_l(r)&&(l=r)}catch{}return{get state(){return l},set:r=>{l=wn(r,l)||l},persist:()=>{try{n.setItem(nS,JSON.stringify(l))}catch{}}}}var Ty=sS(),lS=n=>n.state.__TSR_key||n.href;function iS(n){const l=[];let i;for(;i=n.parentNode;)l.push(`${n.tagName}:nth-child(${Array.prototype.indexOf.call(i.children,n)+1})`),n=i;return`${l.reverse().join(" > ")}`.toLowerCase()}var mu=!1,Ei="window",My="data-scroll-restoration-id";function rS(n,l){if(!Ty)return;const i=Ty;if((n.options.scrollRestoration??!1)&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup||!i)return;n.isScrollRestorationSetup=!0,mu=!1;const r=n.options.getScrollRestorationKey||lS,o=new Map;window.history.scrollRestoration="manual";const d=g=>{if(!(mu||!n.isScrollRestoring))if(g.target===document||g.target===window)o.set(Ei,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=g.target;o.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},h=g=>{var m;if(!n.isScrollRestoring||!g||o.size===0||!i)return;const p=(m=i.state)[g]||(m[g]={});for(const[x,v]of o){let S;if(x===Ei)S=Ei;else if(x.isConnected){const j=x.getAttribute(My);S=j?`[${My}="${j}"]`:iS(x)}S&&(p[S]=v)}};document.addEventListener("scroll",d,!0),n.subscribe("onBeforeLoad",g=>{h(g.fromLocation?r(g.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{h(r(n.stores.resolvedLocation.state??n.stores.location.state)),i.persist()}),n.subscribe("onRendered",g=>{var v;const p=r(g.toLocation),m=n.options.scrollRestorationBehavior,x=n.options.scrollToTopSelectors;if(o.clear(),!n.resetNextScroll){n.resetNextScroll=!0;return}if(!(typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))){mu=!0;try{const S=n.isScrollRestoring?i.state[p]:void 0;let j=!1;if(S)for(const N in S){const E=S[N];if(!_l(E))continue;const{scrollX:C,scrollY:w}=E;if(!(!Number.isFinite(C)||!Number.isFinite(w))){if(N===Ei)window.scrollTo({top:w,left:C,behavior:m}),j=!0;else if(N){let $;try{$=document.querySelector(N)}catch{continue}$&&($.scrollLeft=C,$.scrollTop=w,j=!0)}}}if(!j){const N=n.history.location.hash.slice(1);if(N){const E=((v=window.history.state)==null?void 0:v.__hashScrollIntoViewOptions)??!0;if(E){const C=document.getElementById(N);C&&C.scrollIntoView(E)}}else{const E={top:0,left:0,behavior:m};if(window.scrollTo(E),x)for(const C of x){if(C===Ei)continue;const w=typeof C=="function"?C():document.querySelector(C);w&&w.scrollTo(E)}}}}finally{mu=!1}n.isScrollRestoring&&i.set(S=>(S[p]||(S[p]={}),S))}})}function uS(n,l=String){const i=new URLSearchParams;for(const r in n){const o=n[r];o!==void 0&&i.set(r,l(o))}return i.toString()}function uf(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function cS(n){const l=new URLSearchParams(n),i=Object.create(null);for(const[r,o]of l.entries()){const d=i[r];d==null?i[r]=uf(o):Array.isArray(d)?d.push(uf(o)):i[r]=[d,uf(o)]}return i}var oS=dS(JSON.parse),fS=hS(JSON.stringify,JSON.parse);function dS(n){return l=>{l[0]==="?"&&(l=l.substring(1));const i=cS(l);for(const r in i){const o=i[r];if(typeof o=="string")try{i[r]=n(o)}catch{}}return i}}function hS(n,l){const i=typeof l=="function";function r(o){if(typeof o=="object"&&o!==null)try{return n(o)}catch{}else if(i&&typeof o=="string")try{return l(o),n(o)}catch{}return o}return o=>{const d=uS(o,r);return d?`?${d}`:""}}var ys="__root__";function mS(n){if(n.statusCode=n.statusCode||n.code||307,!n._builtLocation&&!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const l=new Headers(n.headers);n.href&&l.get("Location")===null&&l.set("Location",n.href);const i=new Response(null,{status:n.statusCode,headers:l});if(i.options=n,n.throw)throw i;return i}function wt(n){return n instanceof Response&&!!n.options}function yS(n){return{input:({url:l})=>{for(const i of n)l=wf(i,l);return l},output:({url:l})=>{for(let i=n.length-1;i>=0;i--)l=Ag(n[i],l);return l}}}function gS(n){const l=Cg(n.basepath),i=`/${l}`,r=`${i}/`,o=n.caseSensitive?i:i.toLowerCase(),d=n.caseSensitive?r:r.toLowerCase();return{input:({url:h})=>{const g=n.caseSensitive?h.pathname:h.pathname.toLowerCase();return g===o?h.pathname="/":g.startsWith(d)&&(h.pathname=h.pathname.slice(i.length)),h},output:({url:h})=>(h.pathname=vu(["/",l,h.pathname]),h)}}function wf(n,l){var r;const i=(r=n==null?void 0:n.input)==null?void 0:r.call(n,{url:l});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return l}function Ag(n,l){var r;const i=(r=n==null?void 0:n.output)==null?void 0:r.call(n,{url:l});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return l}function pS(n,l){const{createMutableStore:i,createReadonlyStore:r,batch:o,init:d}=l,h=new Map,g=new Map,p=new Map,m=i(n.status),x=i(n.loadedAt),v=i(n.isLoading),S=i(n.isTransitioning),j=i(n.location),N=i(n.resolvedLocation),E=i(n.statusCode),C=i(n.redirect),w=i([]),$=i([]),X=i([]),L=r(()=>cf(h,w.state)),Z=r(()=>cf(g,$.state)),ee=r(()=>cf(p,X.state)),P=r(()=>w.state[0]),F=r(()=>w.state.some(V=>{var ae;return((ae=h.get(V))==null?void 0:ae.state.status)==="pending"})),J=r(()=>{var V;return{locationHref:j.state.href,resolvedLocationHref:(V=N.state)==null?void 0:V.href,status:m.state}}),K=r(()=>({status:m.state,loadedAt:x.state,isLoading:v.state,isTransitioning:S.state,matches:L.state,location:j.state,resolvedLocation:N.state,statusCode:E.state,redirect:C.state})),I=Bi(64);function se(V){let ae=I.get(V);return ae||(ae=r(()=>{const he=w.state;for(const fe of he){const T=h.get(fe);if(T&&T.routeId===V)return T.state}}),I.set(V,ae)),ae}const le={status:m,loadedAt:x,isLoading:v,isTransitioning:S,location:j,resolvedLocation:N,statusCode:E,redirect:C,matchesId:w,pendingMatchesId:$,cachedMatchesId:X,activeMatchesSnapshot:L,pendingMatchesSnapshot:Z,cachedMatchesSnapshot:ee,firstMatchId:P,hasPendingMatches:F,matchRouteReactivity:J,activeMatchStoresById:h,pendingMatchStoresById:g,cachedMatchStoresById:p,__store:K,getMatchStoreByRouteId:se,setActiveMatches:ue,setPendingMatches:te,setCachedMatches:D};ue(n.matches),d==null||d(le);function ue(V){of(V,h,w,i,o)}function te(V){of(V,g,$,i,o)}function D(V){of(V,p,X,i,o)}return le}function cf(n,l){const i=[];for(const r of l){const o=n.get(r);o&&i.push(o.state)}return i}function of(n,l,i,r,o){const d=n.map(g=>g.id),h=new Set(d);o(()=>{for(const g of l.keys())h.has(g)||l.delete(g);for(const g of n){const p=l.get(g.id);if(!p){const m=r(g);m.routeId=g.routeId,l.set(g.id,m);continue}p.routeId=g.routeId,p.state!==g&&p.setState(()=>g)}Gb(i.state,d)||i.setState(()=>d)})}var Of=n=>{var l;if(!n.rendered)return n.rendered=!0,(l=n.onReady)==null?void 0:l.call(n)},vS=n=>n.stores.matchesId.state.some(l=>{var i;return(i=n.stores.activeMatchStoresById.get(l))==null?void 0:i.state._forcePending}),Ou=(n,l)=>!!(n.preload&&!n.router.stores.activeMatchStoresById.has(l)),gs=(n,l,i=!0)=>{const r={...n.router.options.context??{}},o=i?l:l-1;for(let d=0;d<=o;d++){const h=n.matches[d];if(!h)continue;const g=n.router.getMatch(h.id);g&&Object.assign(r,g.__routeContext,g.__beforeLoadContext)}return r},Cy=(n,l)=>{if(!n.matches.length)return;const i=l.routeId,r=n.matches.findIndex(h=>h.routeId===n.router.routeTree.id),o=r>=0?r:0;let d=i?n.matches.findIndex(h=>h.routeId===i):n.firstBadMatchIndex??n.matches.length-1;d<0&&(d=o);for(let h=d;h>=0;h--){const g=n.matches[h];if(n.router.looseRoutesById[g.routeId].options.notFoundComponent)return h}return i?d:o},On=(n,l,i)=>{var r,o,d;if(!(!wt(i)&&!St(i)))throw wt(i)&&i.redirectHandled&&!i.options.reloadDocument||(l&&((r=l._nonReactive.beforeLoadPromise)==null||r.resolve(),(o=l._nonReactive.loaderPromise)==null||o.resolve(),l._nonReactive.beforeLoadPromise=void 0,l._nonReactive.loaderPromise=void 0,l._nonReactive.error=i,n.updateMatch(l.id,h=>({...h,status:wt(i)?"redirected":h.status==="pending"?"success":h.status,context:gs(n,l.index),isFetching:!1,error:i})),St(i)&&!i.routeId&&(i.routeId=l.routeId),(d=l._nonReactive.loadPromise)==null||d.resolve()),wt(i)&&(n.rendered=!0,i.options._fromLocation=n.location,i.redirectHandled=!0,i=n.router.resolveRedirect(i))),i},wg=(n,l)=>{const i=n.router.getMatch(l);return!!(!i||i._nonReactive.dehydrated)},Ay=(n,l,i)=>{const r=gs(n,i);n.updateMatch(l,o=>({...o,context:r}))},Ti=(n,l,i,r)=>{var g,p;const{id:o,routeId:d}=n.matches[l],h=n.router.looseRoutesById[d];if(i instanceof Promise)throw i;i.routerCode=r,n.firstBadMatchIndex??(n.firstBadMatchIndex=l),On(n,n.router.getMatch(o),i);try{(p=(g=h.options).onError)==null||p.call(g,i)}catch(m){i=m,On(n,n.router.getMatch(o),i)}n.updateMatch(o,m=>{var x,v;return(x=m._nonReactive.beforeLoadPromise)==null||x.resolve(),m._nonReactive.beforeLoadPromise=void 0,(v=m._nonReactive.loadPromise)==null||v.resolve(),{...m,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!n.preload&&!wt(i)&&!St(i)&&(n.serialError??(n.serialError=i))},Og=(n,l,i,r)=>{var d;if(r._nonReactive.pendingTimeout!==void 0)return;const o=i.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!Ou(n,l)&&(i.options.loader||i.options.beforeLoad||Dg(i))&&typeof o=="number"&&o!==1/0&&(i.options.pendingComponent??((d=n.router.options)==null?void 0:d.defaultPendingComponent))){const h=setTimeout(()=>{Of(n)},o);r._nonReactive.pendingTimeout=h}},xS=(n,l,i)=>{const r=n.router.getMatch(l);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Og(n,l,i,r);const o=()=>{const d=n.router.getMatch(l);d.preload&&(d.status==="redirected"||d.status==="notFound")&&On(n,d,d.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},bS=(n,l,i,r)=>{const o=n.router.getMatch(l);let d=o._nonReactive.loadPromise;o._nonReactive.loadPromise=El(()=>{d==null||d.resolve(),d=void 0});const{paramsError:h,searchError:g}=o;h&&Ti(n,i,h,"PARSE_PARAMS"),g&&Ti(n,i,g,"VALIDATE_SEARCH"),Og(n,l,r,o);const p=new AbortController;let m=!1;const x=()=>{m||(m=!0,n.updateMatch(l,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:p})))},v=()=>{var L;(L=o._nonReactive.beforeLoadPromise)==null||L.resolve(),o._nonReactive.beforeLoadPromise=void 0,n.updateMatch(l,Z=>({...Z,isFetching:!1}))};if(!r.options.beforeLoad){n.router.batch(()=>{x(),v()});return}o._nonReactive.beforeLoadPromise=El();const S={...gs(n,i,!1),...o.__routeContext},{search:j,params:N,cause:E}=o,C=Ou(n,l),w={search:j,abortController:p,params:N,preload:C,context:S,location:n.location,navigate:L=>n.router.navigate({...L,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:C?"preload":E,matches:n.matches,routeId:r.id,...n.router.options.additionalContext},$=L=>{if(L===void 0){n.router.batch(()=>{x(),v()});return}(wt(L)||St(L))&&(x(),Ti(n,i,L,"BEFORE_LOAD")),n.router.batch(()=>{x(),n.updateMatch(l,Z=>({...Z,__beforeLoadContext:L})),v()})};let X;try{if(X=r.options.beforeLoad(w),Ui(X))return x(),X.catch(L=>{Ti(n,i,L,"BEFORE_LOAD")}).then($)}catch(L){x(),Ti(n,i,L,"BEFORE_LOAD")}$(X)},SS=(n,l)=>{const{id:i,routeId:r}=n.matches[l],o=n.router.looseRoutesById[r],d=()=>g(),h=()=>bS(n,i,l,o),g=()=>{if(wg(n,i))return;const p=xS(n,i,o);return Ui(p)?p.then(h):h()};return d()},jS=(n,l,i)=>{var d,h,g,p,m,x;const r=n.router.getMatch(l);if(!r||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const o={ssr:n.router.options.ssr,matches:n.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(h=(d=i.options).head)==null?void 0:h.call(d,o),(p=(g=i.options).scripts)==null?void 0:p.call(g,o),(x=(m=i.options).headers)==null?void 0:x.call(m,o)]).then(([v,S,j])=>({meta:v==null?void 0:v.meta,links:v==null?void 0:v.links,headScripts:v==null?void 0:v.scripts,headers:j,scripts:S,styles:v==null?void 0:v.styles}))},zg=(n,l,i,r,o)=>{const d=l[r-1],{params:h,loaderDeps:g,abortController:p,cause:m}=n.router.getMatch(i),x=gs(n,r),v=Ou(n,i);return{params:h,deps:g,preload:!!v,parentMatchPromise:d,abortController:p,context:x,location:n.location,navigate:S=>n.router.navigate({...S,_fromLocation:n.location}),cause:v?"preload":m,route:o,...n.router.options.additionalContext}},wy=async(n,l,i,r,o)=>{var d,h,g,p,m;try{const x=n.router.getMatch(i);try{(!(_g??n.router.isServer)||x.ssr===!0)&&qi(o);const v=o.options.loader,S=typeof v=="function"?v:v==null?void 0:v.handler,j=S==null?void 0:S(zg(n,l,i,r,o)),N=!!S&&Ui(j);if((N||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||x._nonReactive.minPendingPromise)&&n.updateMatch(i,C=>({...C,isFetching:"loader"})),S){const C=N?await j:j;On(n,n.router.getMatch(i),C),C!==void 0&&n.updateMatch(i,w=>({...w,loaderData:C}))}o._lazyPromise&&await o._lazyPromise;const E=x._nonReactive.minPendingPromise;E&&await E,o._componentsPromise&&await o._componentsPromise,n.updateMatch(i,C=>({...C,error:void 0,context:gs(n,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(v){let S=v;if((S==null?void 0:S.name)==="AbortError"){if(x.abortController.signal.aborted){(d=x._nonReactive.loaderPromise)==null||d.resolve(),x._nonReactive.loaderPromise=void 0;return}n.updateMatch(i,N=>({...N,status:N.status==="pending"?"success":N.status,isFetching:!1,context:gs(n,r)}));return}const j=x._nonReactive.minPendingPromise;j&&await j,St(v)&&await((g=(h=o.options.notFoundComponent)==null?void 0:h.preload)==null?void 0:g.call(h)),On(n,n.router.getMatch(i),v);try{(m=(p=o.options).onError)==null||m.call(p,v)}catch(N){S=N,On(n,n.router.getMatch(i),N)}!wt(S)&&!St(S)&&await qi(o,["errorComponent"]),n.updateMatch(i,N=>({...N,error:S,context:gs(n,r),status:"error",isFetching:!1}))}}catch(x){const v=n.router.getMatch(i);v&&(v._nonReactive.loaderPromise=void 0),On(n,v,x)}},NS=async(n,l,i)=>{var j,N,E,C;async function r(w,$,X,L,Z){const ee=Date.now()-$.updatedAt,P=w?Z.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:Z.options.staleTime??n.router.options.defaultStaleTime??0,F=Z.options.shouldReload,J=typeof F=="function"?F(zg(n,l,o,i,Z)):F,{status:K,invalid:I}=L,se=ee>=P&&(!!n.forceStaleReload||L.cause==="enter"||X!==void 0&&X!==L.id);h=K==="success"&&(I||(J??se)),w&&Z.options.preload===!1||(h&&!n.sync&&x?(g=!0,(async()=>{var le,ue;try{await wy(n,l,o,i,Z);const te=n.router.getMatch(o);(le=te._nonReactive.loaderPromise)==null||le.resolve(),(ue=te._nonReactive.loadPromise)==null||ue.resolve(),te._nonReactive.loaderPromise=void 0,te._nonReactive.loadPromise=void 0}catch(te){wt(te)&&await n.router.navigate(te.options)}})()):K!=="success"||h?await wy(n,l,o,i,Z):Ay(n,o,i))}const{id:o,routeId:d}=n.matches[i];let h=!1,g=!1;const p=n.router.looseRoutesById[d],m=p.options.loader,x=((typeof m=="function"||m==null?void 0:m.staleReloadMode)??n.router.options.defaultStaleReloadMode)!=="blocking";if(wg(n,o)){if(!n.router.getMatch(o))return n.matches[i];Ay(n,o,i)}else{const w=n.router.getMatch(o),$=n.router.stores.matchesId.state[i],X=((j=$&&n.router.stores.activeMatchStoresById.get($)||null)==null?void 0:j.routeId)===d?$:(N=n.router.stores.activeMatchesSnapshot.state.find(Z=>Z.routeId===d))==null?void 0:N.id,L=Ou(n,o);if(w._nonReactive.loaderPromise){if(w.status==="success"&&!n.sync&&!w.preload&&x)return w;await w._nonReactive.loaderPromise;const Z=n.router.getMatch(o),ee=Z._nonReactive.error||Z.error;ee&&On(n,Z,ee),Z.status==="pending"&&await r(L,w,X,Z,p)}else{const Z=L&&!n.router.stores.activeMatchStoresById.has(o),ee=n.router.getMatch(o);ee._nonReactive.loaderPromise=El(),Z!==ee.preload&&n.updateMatch(o,P=>({...P,preload:Z})),await r(L,w,X,ee,p)}}const v=n.router.getMatch(o);g||((E=v._nonReactive.loaderPromise)==null||E.resolve(),(C=v._nonReactive.loadPromise)==null||C.resolve(),v._nonReactive.loadPromise=void 0),clearTimeout(v._nonReactive.pendingTimeout),v._nonReactive.pendingTimeout=void 0,g||(v._nonReactive.loaderPromise=void 0),v._nonReactive.dehydrated=void 0;const S=g?v.isFetching:!1;return S!==v.isFetching||v.invalid!==!1?(n.updateMatch(o,w=>({...w,isFetching:S,invalid:!1})),n.router.getMatch(o)):v};async function Oy(n){var S,j;const l=n,i=[];vS(l.router)&&Of(l);let r;for(let N=0;N<l.matches.length;N++){try{const E=SS(l,N);Ui(E)&&await E}catch(E){if(wt(E))throw E;if(St(E))r=E;else if(!l.preload)throw E;break}if(l.serialError)break}const o=l.firstBadMatchIndex??l.matches.length,d=r&&!l.preload?Cy(l,r):void 0,h=r&&l.preload?0:d!==void 0?Math.min(d+1,o):o;let g,p;for(let N=0;N<h;N++)i.push(NS(l,i,N));try{await Promise.all(i)}catch{const N=await Promise.allSettled(i);for(const E of N){if(E.status!=="rejected")continue;const C=E.reason;if(wt(C))throw C;St(C)?g??(g=C):p??(p=C)}if(p!==void 0)throw p}const m=g??(r&&!l.preload?r:void 0);let x=l.serialError?l.firstBadMatchIndex??0:l.matches.length-1;if(!m&&r&&l.preload)return l.matches;if(m){const N=Cy(l,m);N===void 0&&Va();const E=l.matches[N],C=l.router.looseRoutesById[E.routeId],w=(S=l.router.options)==null?void 0:S.defaultNotFoundComponent;!C.options.notFoundComponent&&w&&(C.options.notFoundComponent=w),m.routeId=E.routeId;const $=E.routeId===l.router.routeTree.id;l.updateMatch(E.id,X=>({...X,...$?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),x=N,await qi(C,["notFoundComponent"])}else if(!l.preload){const N=l.matches[0];N.globalNotFound||(j=l.router.getMatch(N.id))!=null&&j.globalNotFound&&l.updateMatch(N.id,E=>({...E,globalNotFound:!1,error:void 0}))}if(l.serialError&&l.firstBadMatchIndex!==void 0){const N=l.router.looseRoutesById[l.matches[l.firstBadMatchIndex].routeId];await qi(N,["errorComponent"])}for(let N=0;N<=x;N++){const{id:E,routeId:C}=l.matches[N],w=l.router.looseRoutesById[C];try{const $=jS(l,E,w);if($){const X=await $;l.updateMatch(E,L=>({...L,...X}))}}catch($){console.error(`Error executing head for route ${C}:`,$)}}const v=Of(l);if(Ui(v)&&await v,m)throw m;if(l.serialError&&!l.preload&&!l.onReady)throw l.serialError;return l.matches}function zy(n,l){const i=l.map(r=>{var o,d;return(d=(o=n.options[r])==null?void 0:o.preload)==null?void 0:d.call(o)}).filter(Boolean);if(i.length!==0)return Promise.all(i)}function qi(n,l=xu){!n._lazyLoaded&&n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(r=>{const{id:o,...d}=r.options;Object.assign(n.options,d),n._lazyLoaded=!0,n._lazyPromise=void 0}):n._lazyLoaded=!0);const i=()=>n._componentsLoaded?void 0:l===xu?(()=>{if(n._componentsPromise===void 0){const r=zy(n,xu);r?n._componentsPromise=r.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():zy(n,l);return n._lazyPromise?n._lazyPromise.then(i):i()}function Dg(n){var l;for(const i of xu)if((l=n.options[i])!=null&&l.preload)return!0;return!1}var xu=["component","errorComponent","pendingComponent","notFoundComponent"],Ln="__TSR_index",Dy="popstate",Ly="beforeunload";function RS(n){let l=n.getLocation();const i=new Set,r=h=>{l=n.getLocation(),i.forEach(g=>g({location:l,action:h}))},o=h=>{n.notifyOnIndexChange??!0?r(h):l=n.getLocation()},d=async({task:h,navigateOpts:g,...p})=>{var v,S;if((g==null?void 0:g.ignoreBlocker)??!1){h();return}const m=((v=n.getBlockers)==null?void 0:v.call(n))??[],x=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&x)for(const j of m){const N=Eu(p.path,p.state);if(await j.blockerFn({currentLocation:l,nextLocation:N,action:p.type})){(S=n.onBlocked)==null||S.call(n);return}}h()};return{get location(){return l},get length(){return n.getLength()},subscribers:i,subscribe:h=>(i.add(h),()=>{i.delete(h)}),push:(h,g,p)=>{const m=l.state[Ln];g=Uy(m+1,g),d({task:()=>{n.pushState(h,g),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:g})},replace:(h,g,p)=>{const m=l.state[Ln];g=Uy(m,g),d({task:()=>{n.replaceState(h,g),r({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:h,state:g})},go:(h,g)=>{d({task:()=>{n.go(h),o({type:"GO",index:h})},navigateOpts:g,type:"GO"})},back:h=>{d({task:()=>{n.back((h==null?void 0:h.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:h,type:"BACK"})},forward:h=>{d({task:()=>{n.forward((h==null?void 0:h.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:h,type:"FORWARD"})},canGoBack:()=>l.state[Ln]!==0,createHref:h=>n.createHref(h),block:h=>{var p;if(!n.setBlockers)return()=>{};const g=((p=n.getBlockers)==null?void 0:p.call(n))??[];return n.setBlockers([...g,h]),()=>{var x,v;const m=((x=n.getBlockers)==null?void 0:x.call(n))??[];(v=n.setBlockers)==null||v.call(n,m.filter(S=>S!==h))}},flush:()=>{var h;return(h=n.flush)==null?void 0:h.call(n)},destroy:()=>{var h;return(h=n.destroy)==null?void 0:h.call(n)},notify:r}}function Uy(n,l){l||(l={});const i=Zf();return{...l,key:i,__TSR_key:i,[Ln]:n}}function _S(n){var F,J;const l=typeof document<"u"?window:void 0,i=l.history.pushState,r=l.history.replaceState;let o=[];const d=()=>o,h=K=>o=K,g=(K=>K),p=(()=>Eu(`${l.location.pathname}${l.location.search}${l.location.hash}`,l.history.state));if(!((F=l.history.state)!=null&&F.__TSR_key)&&!((J=l.history.state)!=null&&J.key)){const K=Zf();l.history.replaceState({[Ln]:0,key:K,__TSR_key:K},"")}let m=p(),x,v=!1,S=!1,j=!1,N=!1;const E=()=>m;let C,w;const $=()=>{C&&(P._ignoreSubscribers=!0,(C.isPush?l.history.pushState:l.history.replaceState)(C.state,"",C.href),P._ignoreSubscribers=!1,C=void 0,w=void 0,x=void 0)},X=(K,I,se)=>{const le=g(I);w||(x=m),m=Eu(I,se),C={href:le,state:se,isPush:(C==null?void 0:C.isPush)||K==="push"},w||(w=Promise.resolve().then(()=>$()))},L=K=>{m=p(),P.notify({type:K})},Z=async()=>{if(S){S=!1;return}const K=p(),I=K.state[Ln]-m.state[Ln],se=I===1,le=I===-1,ue=!se&&!le||v;v=!1;const te=ue?"GO":le?"BACK":"FORWARD",D=ue?{type:"GO",index:I}:{type:le?"BACK":"FORWARD"};if(j)j=!1;else{const V=d();if(typeof document<"u"&&V.length){for(const ae of V)if(await ae.blockerFn({currentLocation:m,nextLocation:K,action:te})){S=!0,l.history.go(1),P.notify(D);return}}}m=p(),P.notify(D)},ee=K=>{if(N){N=!1;return}let I=!1;const se=d();if(typeof document<"u"&&se.length)for(const le of se){const ue=le.enableBeforeUnload??!0;if(ue===!0){I=!0;break}if(typeof ue=="function"&&ue()===!0){I=!0;break}}if(I)return K.preventDefault(),K.returnValue=""},P=RS({getLocation:E,getLength:()=>l.history.length,pushState:(K,I)=>X("push",K,I),replaceState:(K,I)=>X("replace",K,I),back:K=>(K&&(j=!0),N=!0,l.history.back()),forward:K=>{K&&(j=!0),N=!0,l.history.forward()},go:K=>{v=!0,l.history.go(K)},createHref:K=>g(K),flush:$,destroy:()=>{l.history.pushState=i,l.history.replaceState=r,l.removeEventListener(Ly,ee,{capture:!0}),l.removeEventListener(Dy,Z)},onBlocked:()=>{x&&m!==x&&(m=x)},getBlockers:d,setBlockers:h,notifyOnIndexChange:!1});return l.addEventListener(Ly,ee,{capture:!0}),l.addEventListener(Dy,Z),l.history.pushState=function(...K){const I=i.apply(l.history,K);return P._ignoreSubscribers||L("PUSH"),I},l.history.replaceState=function(...K){const I=r.apply(l.history,K);return P._ignoreSubscribers||L("REPLACE"),I},P}function ES(n){let l=n.replace(/[\x00-\x1f\x7f]/g,"");return l.startsWith("//")&&(l="/"+l.replace(/^\/+/,"")),l}function Eu(n,l){const i=ES(n),r=i.indexOf("#"),o=i.indexOf("?"),d=Zf();return{href:i,pathname:i.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:i.length),hash:r>-1?i.substring(r):"",search:o>-1?i.slice(o,r===-1?void 0:r):"",state:l||{[Ln]:0,key:d,__TSR_key:d}}}function Zf(){return(Math.random()+1).toString(36).substring(7)}function dl(n,l){const i=l,r=n;return{fromLocation:i,toLocation:r,pathChanged:(i==null?void 0:i.pathname)!==r.pathname,hrefChanged:(i==null?void 0:i.href)!==r.href,hashChanged:(i==null?void 0:i.hash)!==r.hash}}var TS=class{constructor(n,l){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=i=>i(),this.update=i=>{var x;const r=this.options,o=this.basepath??(r==null?void 0:r.basepath)??"/",d=this.basepath===void 0,h=r==null?void 0:r.rewrite;if(this.options={...r,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=tS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=_S()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let v;this.resolvePathCache=Bi(1e3),v=this.buildRouteTree(),this.setRoutes(v)}if(!this.stores&&this.latestLocation){const v=this.getStoreConfig(this);this.batch=v.batch,this.stores=pS(CS(this.latestLocation),v),rS(this)}let g=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(d||o!==p||h!==m){this.basepath=p;const v=[],S=Cg(p);S&&S!=="/"&&v.push(gS({basepath:p})),m&&v.push(m),this.rewrite=v.length===0?void 0:v.length===1?v[0]:yS(v),this.history&&this.updateLatestLocation(),g=!0}g&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((x=window.CSS)==null?void 0:x.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=Pb(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&Vb(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,r)=>{const o={eventType:i,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=i=>{this.subscribers.forEach(r=>{r.eventType===i.type&&r.fn(i)})},this.parseLocation=(i,r)=>{const o=({pathname:p,search:m,hash:x,href:v,state:S})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const w=this.options.parseSearch(m),$=this.options.stringifySearch(w);return{href:p+$+x,publicHref:v,pathname:Ri(p).path,external:!1,searchStr:$,search:ts(r==null?void 0:r.search,w),hash:Ri(x.slice(1)).path,state:Ka(r==null?void 0:r.state,S)}}const j=new URL(v,this.origin),N=wf(this.rewrite,j),E=this.options.parseSearch(N.search),C=this.options.stringifySearch(E);return N.search=C,{href:N.href.replace(N.origin,""),publicHref:v,pathname:Ri(N.pathname).path,external:!!this.rewrite&&N.origin!==this.origin,searchStr:C,search:ts(r==null?void 0:r.search,E),hash:Ri(N.hash.slice(1)).path,state:Ka(r==null?void 0:r.state,S)}},d=o(i),{__tempLocation:h,__tempKey:g}=d.state;if(h&&(!g||g===this.tempLocationKey)){const p=o(h);return p.state.key=d.state.key,p.state.__TSR_key=d.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:d}}return d},this.resolvePathWithBase=(i,r)=>eS({base:i,to:Xf(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,r,o)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},o):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>AS({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const r=this.getMatch(i);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(i=>{this.cancelMatch(i)}),this.stores.matchesId.state.forEach(i=>{var o;if(this.stores.pendingMatchStoresById.has(i))return;const r=(o=this.stores.activeMatchStoresById.get(i))==null?void 0:o.state;r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(i)})},this.buildLocation=i=>{const r=(d={})=>{var K,I;const h=d._fromLocation||this.pendingBuiltLocation||this.latestLocation,g=this.matchRoutesLightweight(h);d.from;const p=d.unsafeRelative==="path"?h.pathname:d.from??g.fullPath,m=this.resolvePathWithBase(p,"."),x=g.search,v=Object.assign(Object.create(null),g.params),S=d.to?this.resolvePathWithBase(m,`${d.to}`):this.resolvePathWithBase(m,"."),j=d.params===!1||d.params===null?Object.create(null):(d.params??!0)===!0?v:Object.assign(v,wn(d.params,v)),N=this.getMatchedRoutes(S);let E=N.matchedRoutes;if((!N.foundRoute||N.foundRoute.path!=="/"&&N.routeParams["**"])&&this.options.notFoundRoute&&(E=[...E,this.options.notFoundRoute]),Object.keys(j).length>0)for(const se of E){const le=((K=se.options.params)==null?void 0:K.stringify)??se.options.stringifyParams;if(le)try{Object.assign(j,le(j))}catch{}}const C=i.leaveParams?S:Ri(_y({path:S,params:j,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let w=x;if(i._includeValidateSearch&&((I=this.options.search)!=null&&I.strict)){const se={};E.forEach(le=>{if(le.options.validateSearch)try{Object.assign(se,bu(le.options.validateSearch,{...se,...w}))}catch{}}),w=se}w=wS({search:w,dest:d,destRoutes:E,_includeValidateSearch:i._includeValidateSearch}),w=ts(x,w);const $=this.options.stringifySearch(w),X=d.hash===!0?h.hash:d.hash?wn(d.hash,h.hash):void 0,L=X?`#${X}`:"";let Z=d.state===!0?h.state:d.state?wn(d.state,h.state):{};Z=Ka(h.state,Z);const ee=`${C}${$}${L}`;let P,F,J=!1;if(this.rewrite){const se=new URL(ee,this.origin),le=Ag(this.rewrite,se);P=se.href.replace(se.origin,""),le.origin!==this.origin?(F=le.href,J=!0):F=le.pathname+le.search+le.hash}else P=Yb(ee),F=P;return{publicHref:F,href:P,pathname:C,search:w,searchStr:$,state:Z,hash:X??"",external:J,unmaskOnReload:d.unmaskOnReload}},o=(d={},h)=>{const g=r(d);let p=h?r(h):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const x=Xb(g.pathname,this.processedTree);if(x){Object.assign(m,x.rawParams);const{from:v,params:S,...j}=x.route,N=S===!1||S===null?Object.create(null):(S??!0)===!0?m:Object.assign(m,wn(S,m));h={from:i.from,...j,params:N},p=r(h)}}}return p&&(g.maskedLocation=p),g};return i.mask?o(i,{from:i.from,...i.mask}):o(i)},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...o})=>{const d=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(x=>{o.state[x]=this.latestLocation.state[x]});const m=ms(o.state,this.latestLocation.state);return p.forEach(x=>{delete o.state[x]}),m},h=Dn(this.latestLocation.href)===Dn(o.href);let g=this.commitLocationPromise;if(this.commitLocationPromise=El(()=>{g==null||g.resolve(),g=void 0}),h&&d())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...x}=o;p&&(x={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...x,search:x.searchStr,state:{...x.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(x.unmaskOnReload??this.options.unmaskOnReload??!1)&&(x.state.__tempKey=this.tempLocationKey)),x.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,this.history[o.replace?"replace":"push"](x.publicHref,x.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:r,hashScrollIntoView:o,viewTransition:d,ignoreBlocker:h,href:g,...p}={})=>{if(g){const v=this.history.location.state.__TSR_index,S=Eu(g,{__TSR_index:i?v:v+1}),j=new URL(S.pathname,this.origin);p.to=wf(this.rewrite,j).pathname,p.search=this.options.parseSearch(S.search),p.hash=S.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const x=this.commitLocation({...m,viewTransition:d,replace:i,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:h});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),x},this.navigate=async({to:i,reloadDocument:r,href:o,publicHref:d,...h})=>{var p,m;let g=!1;if(o)try{new URL(`${o}`),g=!0}catch{}if(g&&!r&&(r=!0),r){if(i!==void 0||!o){const v=this.buildLocation({to:i,...h});o=o??v.publicHref,d=d??v.publicHref}const x=!g&&d?d:o;if(Ru(x,this.protocolAllowlist))return Promise.resolve();if(!h.ignoreBlocker){const v=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const S of v)if(S!=null&&S.blockerFn&&await S.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return h.replace?window.location.replace(x):window.location.href=x,Promise.resolve()}return this.buildAndCommitLocation({...h,href:o,to:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatchesSnapshot.state.filter(o=>!i.some(d=>d.id===o.id));this.batch(()=>{this.stores.status.setState(()=>"pending"),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(i),this.stores.setCachedMatches(r)})},this.load=async i=>{let r,o,d;const h=this.stores.resolvedLocation.state??this.stores.location.state;for(d=new Promise(p=>{this.startTransition(async()=>{var m;try{this.beforeLoad();const x=this.latestLocation,v=this.stores.resolvedLocation.state,S=dl(x,v);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...S}),this.emit({type:"onBeforeLoad",...S}),await Oy({router:this,sync:i==null?void 0:i.sync,forceStaleReload:h.href===x.href,matches:this.stores.pendingMatchesSnapshot.state,location:x,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var w,$;let j=null,N=null,E=null,C=null;this.batch(()=>{const X=this.stores.pendingMatchesSnapshot.state,L=X.length,Z=this.stores.activeMatchesSnapshot.state;j=L?Z.filter(F=>!this.stores.pendingMatchStoresById.has(F.id)):null;const ee=new Set;for(const F of this.stores.pendingMatchStoresById.values())F.routeId&&ee.add(F.routeId);const P=new Set;for(const F of this.stores.activeMatchStoresById.values())F.routeId&&P.add(F.routeId);N=L?Z.filter(F=>!ee.has(F.routeId)):null,E=L?X.filter(F=>!P.has(F.routeId)):null,C=L?X.filter(F=>P.has(F.routeId)):Z,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),L&&(this.stores.setActiveMatches(X),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...j.filter(F=>F.status!=="error"&&F.status!=="notFound"&&F.status!=="redirected")]),this.clearExpiredCache())});for(const[X,L]of[[N,"onLeave"],[E,"onEnter"],[C,"onStay"]])if(X)for(const Z of X)($=(w=this.looseRoutesById[Z.routeId].options)[L])==null||$.call(w,Z)})})}})}catch(x){wt(x)?(r=x,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):St(x)&&(o=x);const v=r?r.status:o?404:this.stores.activeMatchesSnapshot.state.some(S=>S.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>v),this.stores.redirect.setState(()=>r)})}this.latestLoadPromise===d&&((m=this.commitLocationPromise)==null||m.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=d,await d;this.latestLoadPromise&&d!==this.latestLoadPromise;)await this.latestLoadPromise;let g;this.hasNotFoundMatch()?g=404:this.stores.activeMatchesSnapshot.state.some(p=>p.status==="error")&&(g=500),g!==void 0&&this.stores.statusCode.setState(()=>g)},this.startViewTransition=i=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const d=this.latestLocation,h=this.stores.resolvedLocation.state,g=typeof r.types=="function"?r.types(dl(d,h)):r.types;if(g===!1){i();return}o={update:i,types:g}}else o=i;document.startViewTransition(o)}else i()},this.updateMatch=(i,r)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStoresById.get(i);if(o){o.setState(r);return}const d=this.stores.activeMatchStoresById.get(i);if(d){d.setState(r);return}const h=this.stores.cachedMatchStoresById.get(i);if(h){const g=r(h.state);g.status==="redirected"?this.stores.cachedMatchStoresById.delete(i)&&this.stores.cachedMatchesId.setState(p=>p.filter(m=>m!==i)):h.setState(()=>g)}})},this.getMatch=i=>{var r,o,d;return((r=this.stores.cachedMatchStoresById.get(i))==null?void 0:r.state)??((o=this.stores.pendingMatchStoresById.get(i))==null?void 0:o.state)??((d=this.stores.activeMatchStoresById.get(i))==null?void 0:d.state)},this.invalidate=i=>{const r=o=>{var d;return((d=i==null?void 0:i.filter)==null?void 0:d.call(i,o))??!0?{...o,invalid:!0,...i!=null&&i.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o};return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(r)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(r)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(r))}),this.shouldViewTransition=!1,this.load({sync:i==null?void 0:i.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const r=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const o=i.options._builtLocation??this.buildLocation(i.options),d=this.getParsedLocationHref(o);i.options.href=d,i.headers.set("Location",d)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const d=o.pathname+o.search+o.hash;i.options.href=d,i.headers.set("Location",d)}}catch{}if(i.options.href&&!i.options._builtLocation&&Ru(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const r=i==null?void 0:i.filter;r!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(o=>!r(o))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const i=Date.now(),r=o=>{const d=this.looseRoutesById[o.routeId];if(!d.options.loader)return!0;const h=(o.preload?d.options.preloadGcTime??this.options.defaultPreloadGcTime:d.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:i-o.updatedAt>=h};this.clearCache({filter:r})},this.loadRouteChunk=qi,this.preloadRoute=async i=>{const r=i._builtLocation??this.buildLocation(i);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:i});const d=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),h=new Set([...d,...this.stores.cachedMatchesId.state]),g=o.filter(p=>!h.has(p.id));if(g.length){const p=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...p,...g])}try{return o=await Oy({router:this,matches:o,location:r,preload:!0,updateMatch:(p,m)=>{d.has(p)?o=o.map(x=>x.id===p?m(x):x):this.updateMatch(p,m)}}),o}catch(p){if(wt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:r});St(p)||console.error(p);return}},this.matchRoute=(i,r)=>{const o={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},d=this.buildLocation(o);if(r!=null&&r.pending&&this.stores.status.state!=="pending")return!1;const h=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.state:r.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,g=Zb(d.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,h.pathname,this.processedTree);return!g||i.params&&!ms(g.rawParams,i.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?ms(h.search,d.search,{partial:!0})?g.rawParams:!1:g.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(i=>i.status==="notFound"||i.globalNotFound),this.getStoreConfig=l,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??fS,parseSearch:n.parseSearch??oS,protocolAllowlist:n.protocolAllowlist??Qb}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:n,routesByPath:l,processedTree:i}){this.routesById=n,this.routesByPath=l,this.processedTree=i;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(n){return n!=null&&n.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,l){var v,S;const i=this.getMatchedRoutes(n.pathname),{foundRoute:r,routeParams:o,parsedParams:d}=i;let{matchedRoutes:h}=i,g=!1;(r?r.path!=="/"&&o["**"]:Dn(n.pathname))&&(this.options.notFoundRoute?h=[...h,this.options.notFoundRoute]:g=!0);const p=g?zS(this.options.notFoundMode,h):void 0,m=new Array(h.length),x=new Map;for(const j of this.stores.activeMatchStoresById.values())j.routeId&&x.set(j.routeId,j.state);for(let j=0;j<h.length;j++){const N=h[j],E=m[j-1];let C,w,$;{const te=(E==null?void 0:E.search)??n.search,D=(E==null?void 0:E._strictSearch)??void 0;try{const V=bu(N.options.validateSearch,{...te})??void 0;C={...te,...V},w={...D,...V},$=void 0}catch(V){let ae=V;if(V instanceof Tu||(ae=new Tu(V.message,{cause:V})),l!=null&&l.throwOnError)throw ae;C=te,w={},$=ae}}const X=((S=(v=N.options).loaderDeps)==null?void 0:S.call(v,{search:C}))??"",L=X?JSON.stringify(X):"",{interpolatedPath:Z,usedParams:ee}=_y({path:N.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),P=N.id+Z+L,F=this.getMatch(P),J=x.get(N.id),K=(F==null?void 0:F._strictParams)??ee;let I;if(!F)try{By(N,ee,d,K)}catch(te){if(St(te)||wt(te)?I=te:I=new MS(te.message,{cause:te}),l!=null&&l.throwOnError)throw I}Object.assign(o,K);const se=J?"stay":"enter";let le;if(F)le={...F,cause:se,params:(J==null?void 0:J.params)??o,_strictParams:K,search:ts(J?J.search:F.search,C),_strictSearch:w};else{const te=N.options.loader||N.options.beforeLoad||N.lazyFn||Dg(N)?"pending":"success";le={id:P,ssr:N.options.ssr,index:j,routeId:N.id,params:(J==null?void 0:J.params)??o,_strictParams:K,pathname:Z,updatedAt:Date.now(),search:J?ts(J.search,C):C,_strictSearch:w,searchError:void 0,status:te,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:El()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:se,loaderDeps:J?Ka(J.loaderDeps,X):X,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:N.options.staticData||{},fullPath:N.fullPath}}l!=null&&l.preload||(le.globalNotFound=p===N.id),le.searchError=$;const ue=this.getParentContext(E);le.context={...ue,...le.__routeContext,...le.__beforeLoadContext},m[j]=le}for(let j=0;j<m.length;j++){const N=m[j],E=this.looseRoutesById[N.routeId],C=this.getMatch(N.id),w=x.get(N.routeId);if(N.params=w?ts(w.params,o):o,!C){const $=m[j-1],X=this.getParentContext($);if(E.options.context){const L={deps:N.loaderDeps,params:N.params,context:X??{},location:n,navigate:Z=>this.navigate({...Z,_fromLocation:n}),buildLocation:this.buildLocation,cause:N.cause,abortController:N.abortController,preload:!!N.preload,matches:m,routeId:E.id};N.__routeContext=E.options.context(L)??void 0}N.context={...X,...N.__routeContext,...N.__beforeLoadContext}}}return m}matchRoutesLightweight(n){var x;const{matchedRoutes:l,routeParams:i,parsedParams:r}=this.getMatchedRoutes(n.pathname),o=Li(l),d={...n.search};for(const v of l)try{Object.assign(d,bu(v.options.validateSearch,d))}catch{}const h=Li(this.stores.matchesId.state),g=h&&((x=this.stores.activeMatchStoresById.get(h))==null?void 0:x.state),p=g&&g.routeId===o.id&&g.pathname===n.pathname;let m;if(p)m=g.params;else{const v=Object.assign(Object.create(null),i);for(const S of l)try{By(S,i,r??{},v)}catch{}m=v}return{matchedRoutes:l,fullPath:o.fullPath,search:d,params:m}}},Tu=class extends Error{},MS=class extends Error{};function CS(n){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:n,matches:[],statusCode:200}}function bu(n,l){if(n==null)return{};if("~standard"in n){const i=n["~standard"].validate(l);if(i instanceof Promise)throw new Tu("Async validation not supported");if(i.issues)throw new Tu(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in n?n.parse(l):typeof n=="function"?n(l):{}}function AS({pathname:n,routesById:l,processedTree:i}){const r=Object.create(null),o=Dn(n);let d,h;const g=kb(o,i,!0);return g&&(d=g.route,Object.assign(r,g.rawParams),h=Object.assign(Object.create(null),g.parsedParams)),{matchedRoutes:(g==null?void 0:g.branch)||[l.__root__],routeParams:r,foundRoute:d,parsedParams:h}}function wS({search:n,dest:l,destRoutes:i,_includeValidateSearch:r}){return OS(i)(n,l,r??!1)}function OS(n){var o;const l={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const d of n){if("search"in d.options)(o=d.options.search)!=null&&o.middlewares&&l.middlewares.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const h=({search:g,next:p})=>{let m=g;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(m=d.options.preSearchFilters.reduce((v,S)=>S(v),g));const x=p(m);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((v,S)=>S(v),x):x};l.middlewares.push(h)}if(d.options.validateSearch){const h=({search:g,next:p})=>{const m=p(g);if(!l._includeValidateSearch)return m;try{return{...m,...bu(d.options.validateSearch,m)??void 0}}catch{return m}};l.middlewares.push(h)}}const i=({search:d})=>{const h=l.dest;return h.search?h.search===!0?d:wn(h.search,d):{}};l.middlewares.push(i);const r=(d,h,g)=>{if(d>=g.length)return h;const p=g[d];return p({search:h,next:x=>r(d+1,x,g)})};return function(h,g,p){return l.dest=g,l._includeValidateSearch=p,r(0,h,l.middlewares)}}function zS(n,l){if(n!=="root")for(let i=l.length-1;i>=0;i--){const r=l[i];if(r.children)return r.id}return ys}function By(n,l,i,r){var d;const o=((d=n.options.params)==null?void 0:d.parse)??n.options.parseParams;if(o)if(n.options.skipRouteOnParseError)for(const h in l)h in i&&(r[h]=i[h]);else{const h=o(r);Object.assign(r,h)}}var DS="Error preloading route! ☝️",Lg=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=l=>{var p,m;this.originalIndex=l.originalIndex;const i=this.options,r=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),r?this._path=ys:this.parentRoute||Va();let o=r?ys:i==null?void 0:i.path;o&&o!=="/"&&(o=Mg(o));const d=(i==null?void 0:i.id)||o;let h=r?ys:vu([this.parentRoute.id==="__root__"?"":this.parentRoute.id,d]);o==="__root__"&&(o="/"),h!=="__root__"&&(h=vu(["/",h]));const g=h==="__root__"?"/":vu([this.parentRoute.fullPath,o]);this._path=o,this._id=h,this._fullPath=g,this._to=Dn(g)},this.addChildren=l=>this._addFileChildren(l),this._addFileChildren=l=>(Array.isArray(l)&&(this.children=l),typeof l=="object"&&l!==null&&(this.children=Object.values(l)),this),this._addFileTypes=()=>this,this.updateLoader=l=>(Object.assign(this.options,l),this),this.update=l=>(Object.assign(this.options,l),this),this.lazy=l=>(this.lazyFn=l,this),this.redirect=l=>mS({from:this.fullPath,...l}),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},LS=class extends Lg{constructor(n){super(n)}};function US(n){if(typeof document<"u"&&document.querySelector){const l=n.stores.location.state,i=l.state.__hashScrollIntoViewOptions??!0;if(i&&l.hash!==""){const r=document.getElementById(l.hash);r&&r.scrollIntoView(i)}}}function kf(n){const l=n.errorComponent??$f;return f.jsx(BS,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:i,reset:r})=>i?Q.createElement(l,{error:i,reset:r}):n.children})}var BS=class extends Q.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n){return{resetKey:n.getResetKey()}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidUpdate(n,l){l.error&&l.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(n,l){this.props.onCatch&&this.props.onCatch(n,l)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function $f({error:n}){const[l,i]=Q.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(r=>!r),children:l?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),l?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?f.jsx("code",{children:n.message}):null})}):null]})}function qS({children:n,fallback:l=null}){return Ug()?f.jsx(Oi.Fragment,{children:n}):f.jsx(Oi.Fragment,{children:l})}function Ug(){return Oi.useSyncExternalStore(HS,()=>!0,()=>!1)}function HS(){return()=>{}}var Bg=Q.createContext(null);function gt(n){return Q.useContext(Bg)}var zu=Q.createContext(void 0),QS=Q.createContext(void 0),Ke=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(Ke||{});function YS({update:n,notify:l,unwatched:i}){return{link:r,unlink:o,propagate:d,checkDirty:h,shallowPropagate:g};function r(m,x,v){const S=x.depsTail;if(S!==void 0&&S.dep===m)return;const j=S!==void 0?S.nextDep:x.deps;if(j!==void 0&&j.dep===m){j.version=v,x.depsTail=j;return}const N=m.subsTail;if(N!==void 0&&N.version===v&&N.sub===x)return;const E=x.depsTail=m.subsTail={version:v,dep:m,sub:x,prevDep:S,nextDep:j,prevSub:N,nextSub:void 0};j!==void 0&&(j.prevDep=E),S!==void 0?S.nextDep=E:x.deps=E,N!==void 0?N.nextSub=E:m.subs=E}function o(m,x=m.sub){const v=m.dep,S=m.prevDep,j=m.nextDep,N=m.nextSub,E=m.prevSub;return j!==void 0?j.prevDep=S:x.depsTail=S,S!==void 0?S.nextDep=j:x.deps=j,N!==void 0?N.prevSub=E:v.subsTail=E,E!==void 0?E.nextSub=N:(v.subs=N)===void 0&&i(v),j}function d(m){let x=m.nextSub,v;e:do{const S=m.sub;let j=S.flags;if(j&60?j&12?j&4?!(j&48)&&p(m,S)?(S.flags=j|40,j&=1):j=0:S.flags=j&-9|32:j=0:S.flags=j|32,j&2&&l(S),j&1){const N=S.subs;if(N!==void 0){const E=(m=N).nextSub;E!==void 0&&(v={value:x,prev:v},x=E);continue}}if((m=x)!==void 0){x=m.nextSub;continue}for(;v!==void 0;)if(m=v.value,v=v.prev,m!==void 0){x=m.nextSub;continue e}break}while(!0)}function h(m,x){let v,S=0,j=!1;e:do{const N=m.dep,E=N.flags;if(x.flags&16)j=!0;else if((E&17)===17){if(n(N)){const C=N.subs;C.nextSub!==void 0&&g(C),j=!0}}else if((E&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(v={value:m,prev:v}),m=N.deps,x=N,++S;continue}if(!j){const C=m.nextDep;if(C!==void 0){m=C;continue}}for(;S--;){const C=x.subs,w=C.nextSub!==void 0;if(w?(m=v.value,v=v.prev):m=C,j){if(n(x)){w&&g(C),x=m.sub;continue}j=!1}else x.flags&=-33;x=m.sub;const $=m.nextDep;if($!==void 0){m=$;continue e}}return j}while(!0)}function g(m){do{const x=m.sub,v=x.flags;(v&48)===32&&(x.flags=v|16,(v&6)===2&&l(x))}while((m=m.nextSub)!==void 0)}function p(m,x){let v=x.depsTail;for(;v!==void 0;){if(v===m)return!0;v=v.prevDep}return!1}}function Pf(n,l,i){var d,h,g;const r=typeof n=="object",o=r?n:void 0;return{next:(d=r?n.next:n)==null?void 0:d.bind(o),error:(h=r?n.error:l)==null?void 0:h.bind(o),complete:(g=r?n.complete:i)==null?void 0:g.bind(o)}}const zf=[];let Su=0;const{link:qy,unlink:GS,propagate:KS,checkDirty:qg,shallowPropagate:Hy}=YS({update(n){return n._update()},notify(n){zf[Df++]=n,n.flags&=~Ke.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=Ke.Mutable|Ke.Dirty,Mu(n))}});let yu=0,Df=0,ha,Lf=0;function Hg(n){try{++Lf,n()}finally{--Lf||Qg()}}function Mu(n){const l=n.depsTail;let i=l!==void 0?l.nextDep:n.deps;for(;i!==void 0;)i=GS(i,n)}function Qg(){if(!(Lf>0)){for(;yu<Df;){const n=zf[yu];zf[yu++]=void 0,n.notify()}yu=0,Df=0}}function Yg(n,l){const i=typeof n=="function",r=n,o={_snapshot:i?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?Ke.None:Ke.Mutable,get(){return ha!==void 0&&qy(o,ha,Su),o._snapshot},subscribe(d){const h=Pf(d),g={current:!1},p=VS(()=>{var m;o.get(),g.current?(m=h.next)==null||m.call(h,o._snapshot):g.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(d){const h=ha,g=Object.is;if(i)ha=o,++Su,o.depsTail=void 0;else if(d===void 0)return!1;i&&(o.flags=Ke.Mutable|Ke.RecursedCheck);try{const p=o._snapshot,m=typeof d=="function"?d(p):d===void 0&&i?r(p):d;return p===void 0||!g(p,m)?(o._snapshot=m,!0):!1}finally{ha=h,i&&(o.flags&=~Ke.RecursedCheck),Mu(o)}}};return i?(o.flags=Ke.Mutable|Ke.Dirty,o.get=function(){const d=o.flags;if(d&Ke.Dirty||d&Ke.Pending&&qg(o.deps,o)){if(o._update()){const h=o.subs;h!==void 0&&Hy(h)}}else d&Ke.Pending&&(o.flags=d&~Ke.Pending);return ha!==void 0&&qy(o,ha,Su),o._snapshot}):o.set=function(d){if(o._update(d)){const h=o.subs;h!==void 0&&(KS(h),Hy(h),Qg())}},o}function VS(n){const l=()=>{const r=ha;ha=i,++Su,i.depsTail=void 0,i.flags=Ke.Watching|Ke.RecursedCheck;try{return n()}finally{ha=r,i.flags&=~Ke.RecursedCheck,Mu(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ke.Watching|Ke.RecursedCheck,notify(){const r=this.flags;r&Ke.Dirty||r&Ke.Pending&&qg(this.deps,this)?l():this.flags=Ke.Watching},stop(){this.flags=Ke.None,this.depsTail=void 0,Mu(this)}};return l(),i}class XS{constructor(l){this.atom=Yg(l)}setState(l){this.atom.set(l)}get state(){return this.atom.get()}get(){return this.state}subscribe(l){return this.atom.subscribe(Pf(l))}}class ZS{constructor(l){this.atom=Yg(l)}get state(){return this.atom.get()}get(){return this.state}subscribe(l){return this.atom.subscribe(Pf(l))}}function Qy(n){return typeof n=="function"?new ZS(n):new XS(n)}var ff={exports:{}},df={},hf={exports:{}},mf={};/**
|
|
50
|
+
* @license React
|
|
51
|
+
* use-sync-external-store-shim.production.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/var Yy;function kS(){if(Yy)return mf;Yy=1;var n=Xi();function l(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var i=typeof Object.is=="function"?Object.is:l,r=n.useState,o=n.useEffect,d=n.useLayoutEffect,h=n.useDebugValue;function g(v,S){var j=S(),N=r({inst:{value:j,getSnapshot:S}}),E=N[0].inst,C=N[1];return d(function(){E.value=j,E.getSnapshot=S,p(E)&&C({inst:E})},[v,j,S]),o(function(){return p(E)&&C({inst:E}),v(function(){p(E)&&C({inst:E})})},[v]),h(j),j}function p(v){var S=v.getSnapshot;v=v.value;try{var j=S();return!i(v,j)}catch{return!0}}function m(v,S){return S()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:g;return mf.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:x,mf}var Gy;function $S(){return Gy||(Gy=1,hf.exports=kS()),hf.exports}/**
|
|
58
|
+
* @license React
|
|
59
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/var Ky;function PS(){if(Ky)return df;Ky=1;var n=Xi(),l=$S();function i(m,x){return m===x&&(m!==0||1/m===1/x)||m!==m&&x!==x}var r=typeof Object.is=="function"?Object.is:i,o=l.useSyncExternalStore,d=n.useRef,h=n.useEffect,g=n.useMemo,p=n.useDebugValue;return df.useSyncExternalStoreWithSelector=function(m,x,v,S,j){var N=d(null);if(N.current===null){var E={hasValue:!1,value:null};N.current=E}else E=N.current;N=g(function(){function w(ee){if(!$){if($=!0,X=ee,ee=S(ee),j!==void 0&&E.hasValue){var P=E.value;if(j(P,ee))return L=P}return L=ee}if(P=L,r(X,ee))return P;var F=S(ee);return j!==void 0&&j(P,F)?(X=ee,P):(X=ee,L=F)}var $=!1,X,L,Z=v===void 0?null:v;return[function(){return w(x())},Z===null?void 0:function(){return w(Z())}]},[x,v,S,j]);var C=o(m,N[0],N[1]);return h(function(){E.hasValue=!0,E.value=C},[C]),p(C),C},df}var Vy;function FS(){return Vy||(Vy=1,ff.exports=PS()),ff.exports}var JS=FS();function IS(n,l){return n===l}function dt(n,l,i=IS){const r=Q.useCallback(h=>{if(!n)return()=>{};const{unsubscribe:g}=n.subscribe(h);return g},[n]),o=Q.useCallback(()=>n==null?void 0:n.get(),[n]);return JS.useSyncExternalStoreWithSelector(r,o,o,l,i)}var WS={state:void 0,get:()=>{},subscribe:()=>()=>{}};function vs(n){const l=gt(),i=Q.useContext(n.from?QS:zu),r=n.from??i,o=r?n.from?l.stores.getMatchStoreByRouteId(r):l.stores.activeMatchStoresById.get(r):void 0,d=Q.useRef(void 0);return dt(o??WS,h=>{if((n.shouldThrow??!0)&&!h&&Va(),h===void 0)return;const g=n.select?n.select(h):h;if(n.structuralSharing??l.options.defaultStructuralSharing){const p=Ka(d.current,g);return d.current=p,p}return g})}function Gg(n){return vs({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:l=>n.select?n.select(l.loaderData):l.loaderData})}function Kg(n){const{select:l,...i}=n;return vs({...i,select:r=>l?l(r.loaderDeps):r.loaderDeps})}function Vg(n){return vs({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:l=>{const i=n.strict===!1?l.params:l._strictParams;return n.select?n.select(i):i}})}function Xg(n){return vs({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:l=>n.select?n.select(l.search):l.search})}function Du(n){const l=gt();return Q.useCallback(i=>l.navigate({...i,from:i.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,l])}function Zg(n){return vs({...n,select:l=>n.select?n.select(l.context):l.context})}var e1=dg();function t1(n,l){const i=gt(),r=Lb(l),{activeProps:o,inactiveProps:d,activeOptions:h,to:g,preload:p,preloadDelay:m,hashScrollIntoView:x,replace:v,startTransition:S,resetScroll:j,viewTransition:N,children:E,target:C,disabled:w,style:$,className:X,onClick:L,onBlur:Z,onFocus:ee,onMouseEnter:P,onMouseLeave:F,onTouchStart:J,ignoreBlocker:K,params:I,search:se,hash:le,state:ue,mask:te,reloadDocument:D,unsafeRelative:V,from:ae,_fromLocation:he,...fe}=n,T=Ug(),Y=Q.useMemo(()=>n,[i,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),q=dt(i.stores.location,Se=>Se,(Se,ht)=>Se.href===ht.href),W=Q.useMemo(()=>{const Se={_fromLocation:q,...Y};return i.buildLocation(Se)},[i,q,Y]),me=W.maskedLocation?W.maskedLocation.publicHref:W.publicHref,xe=W.maskedLocation?W.maskedLocation.external:W.external,be=Q.useMemo(()=>r1(me,xe,i.history,w),[w,xe,me,i.history]),Pe=Q.useMemo(()=>{if(be!=null&&be.external)return Ru(be.href,i.protocolAllowlist)?void 0:be.href;if(!u1(g)&&!(typeof g!="string"||g.indexOf(":")===-1))try{return new URL(g),Ru(g,i.protocolAllowlist)?void 0:g}catch{}},[g,be,i.protocolAllowlist]),He=Q.useMemo(()=>{if(Pe)return!1;if(h!=null&&h.exact){if(!Wb(q.pathname,W.pathname,i.basepath))return!1}else{const Se=_u(q.pathname,i.basepath),ht=_u(W.pathname,i.basepath);if(!(Se.startsWith(ht)&&(Se.length===ht.length||Se[ht.length]==="/")))return!1}return((h==null?void 0:h.includeSearch)??!0)&&!ms(q.search,W.search,{partial:!(h!=null&&h.exact),ignoreUndefined:!(h!=null&&h.explicitUndefined)})?!1:h!=null&&h.includeHash?T&&q.hash===W.hash:!0},[h==null?void 0:h.exact,h==null?void 0:h.explicitUndefined,h==null?void 0:h.includeHash,h==null?void 0:h.includeSearch,q,Pe,T,W.hash,W.pathname,W.search,i.basepath]),ra=He?wn(o,{})??a1:yf,va=He?yf:wn(d,{})??yf,Ss=[X,ra.className,va.className].filter(Boolean).join(" "),Ml=($||ra.style||va.style)&&{...$,...ra.style,...va.style},[xa,js]=Q.useState(!1),Ns=Q.useRef(!1),ka=n.reloadDocument||Pe?!1:p??i.options.defaultPreload,Rs=m??i.options.defaultPreloadDelay??0,ta=Q.useCallback(()=>{i.preloadRoute({...Y,_builtLocation:W}).catch(Se=>{console.warn(Se),console.warn(DS)})},[i,Y,W]);Db(r,Q.useCallback(Se=>{Se!=null&&Se.isIntersecting&&ta()},[ta]),i1,{disabled:!!w||ka!=="viewport"}),Q.useEffect(()=>{Ns.current||!w&&ka==="render"&&(ta(),Ns.current=!0)},[w,ta,ka]);const Cl=Se=>{const ht=Se.currentTarget.getAttribute("target"),ua=C!==void 0?C:ht;if(!w&&!c1(Se)&&!Se.defaultPrevented&&(!ua||ua==="_self")&&Se.button===0){Se.preventDefault(),e1.flushSync(()=>{js(!0)});const $i=i.subscribe("onResolved",()=>{$i(),js(!1)});i.navigate({...Y,replace:v,resetScroll:j,hashScrollIntoView:x,startTransition:S,viewTransition:N,ignoreBlocker:K})}};if(Pe)return{...fe,ref:r,href:Pe,...E&&{children:E},...C&&{target:C},...w&&{disabled:w},...$&&{style:$},...X&&{className:X},...L&&{onClick:L},...Z&&{onBlur:Z},...ee&&{onFocus:ee},...P&&{onMouseEnter:P},...F&&{onMouseLeave:F},...J&&{onTouchStart:J}};const _s=Se=>{if(w||ka!=="intent")return;if(!Rs){ta();return}const ht=Se.currentTarget;if(Mi.has(ht))return;const ua=setTimeout(()=>{Mi.delete(ht),ta()},Rs);Mi.set(ht,ua)},Lu=Se=>{w||ka!=="intent"||ta()},ki=Se=>{if(w||!ka||!Rs)return;const ht=Se.currentTarget,ua=Mi.get(ht);ua&&(clearTimeout(ua),Mi.delete(ht))};return{...fe,...ra,...va,href:be==null?void 0:be.href,ref:r,onClick:ol([L,Cl]),onBlur:ol([Z,ki]),onFocus:ol([ee,_s]),onMouseEnter:ol([P,_s]),onMouseLeave:ol([F,ki]),onTouchStart:ol([J,Lu]),disabled:!!w,target:C,...Ml&&{style:Ml},...Ss&&{className:Ss},...w&&n1,...He&&s1,...T&&xa&&l1}}var yf={},a1={className:"active"},n1={role:"link","aria-disabled":!0},s1={"data-status":"active","aria-current":"page"},l1={"data-transitioning":"transitioning"},Mi=new WeakMap,i1={rootMargin:"100px"},ol=n=>l=>{for(const i of n)if(i){if(l.defaultPrevented)return;i(l)}};function r1(n,l,i,r){if(!r)return l?{href:n,external:!0}:{href:i.createHref(n)||"/",external:!1}}function u1(n){if(typeof n!="string")return!1;const l=n.charCodeAt(0);return l===47?n.charCodeAt(1)!==47:l===46}var Me=Q.forwardRef((n,l)=>{const{_asChild:i,...r}=n,{type:o,...d}=t1(r,l),h=typeof r.children=="function"?r.children({isActive:d["data-status"]==="active"}):r.children;if(!i){const{disabled:g,...p}=d;return Q.createElement("a",p,h)}return Q.createElement(i,d,h)});function c1(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var o1=class extends Lg{constructor(l){super(l),this.useMatch=i=>vs({select:i==null?void 0:i.select,from:this.id,structuralSharing:i==null?void 0:i.structuralSharing}),this.useRouteContext=i=>Zg({...i,from:this.id}),this.useSearch=i=>Xg({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useParams=i=>Vg({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useLoaderDeps=i=>Kg({...i,from:this.id}),this.useLoaderData=i=>Gg({...i,from:this.id}),this.useNavigate=()=>Du({from:this.fullPath}),this.Link=Oi.forwardRef((i,r)=>f.jsx(Me,{ref:r,from:this.fullPath,...i}))}};function f1(n){return new o1(n)}var d1=class extends LS{constructor(n){super(n),this.useMatch=l=>vs({select:l==null?void 0:l.select,from:this.id,structuralSharing:l==null?void 0:l.structuralSharing}),this.useRouteContext=l=>Zg({...l,from:this.id}),this.useSearch=l=>Xg({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useParams=l=>Vg({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useLoaderDeps=l=>Kg({...l,from:this.id}),this.useLoaderData=l=>Gg({...l,from:this.id}),this.useNavigate=()=>Du({from:this.fullPath}),this.Link=Oi.forwardRef((l,i)=>f.jsx(Me,{ref:i,from:this.fullPath,...l}))}};function h1(n){return new d1(n)}function pa(n){return typeof n=="object"?new Xy(n,{silent:!0}).createRoute(n):new Xy(n,{silent:!0}).createRoute}var Xy=class{constructor(n,l){this.path=n,this.createRoute=i=>{const r=f1(i);return r.isRoot=!1,r},this.silent=l==null?void 0:l.silent}};function m1(n){const l=gt(),i=`not-found-${dt(l.stores.location,r=>r.pathname)}-${dt(l.stores.status,r=>r)}`;return f.jsx(kf,{getResetKey:()=>i,onCatch:(r,o)=>{var d;if(St(r))(d=n.onCatch)==null||d.call(n,r,o);else throw r},errorComponent:({error:r})=>{var o;if(St(r))return(o=n.fallback)==null?void 0:o.call(n,r);throw r},children:n.children})}function y1(){return f.jsx("p",{children:"Not Found"})}function fl(n){return f.jsx(f.Fragment,{children:n.children})}function kg(n,l,i){return l.options.notFoundComponent?f.jsx(l.options.notFoundComponent,{...i}):n.options.defaultNotFoundComponent?f.jsx(n.options.defaultNotFoundComponent,{...i}):f.jsx(y1,{})}function g1(n){return null}function p1(){return g1(gt()),null}var $g=Q.memo(function({matchId:l}){const i=gt(),r=i.stores.activeMatchStoresById.get(l);r||Va();const o=dt(i.stores.loadedAt,h=>h),d=dt(r,h=>h);return f.jsx(v1,{router:i,matchId:l,resetKey:o,matchState:Q.useMemo(()=>{var p;const h=d.routeId,g=(p=i.routesById[h].parentRoute)==null?void 0:p.id;return{routeId:h,ssr:d.ssr,_displayPending:d._displayPending,parentRouteId:g}},[d._displayPending,d.routeId,d.ssr,i.routesById])})});function v1({router:n,matchId:l,resetKey:i,matchState:r}){var N,E;const o=n.routesById[r.routeId],d=o.options.pendingComponent??n.options.defaultPendingComponent,h=d?f.jsx(d,{}):null,g=o.options.errorComponent??n.options.defaultErrorComponent,p=o.options.onCatch??n.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??((N=n.options.notFoundRoute)==null?void 0:N.options.component):o.options.notFoundComponent,x=r.ssr===!1||r.ssr==="data-only",v=(!o.isRoot||o.options.wrapInSuspense||x)&&(o.options.wrapInSuspense??d??(((E=o.options.errorComponent)==null?void 0:E.preload)||x))?Q.Suspense:fl,S=g?kf:fl,j=m?m1:fl;return f.jsxs(o.isRoot?o.options.shellComponent??fl:fl,{children:[f.jsx(zu.Provider,{value:l,children:f.jsx(v,{fallback:h,children:f.jsx(S,{getResetKey:()=>i,errorComponent:g||$f,onCatch:(C,w)=>{if(St(C))throw C;p==null||p(C,w)},children:f.jsx(j,{fallback:C=>{if(!m||C.routeId&&C.routeId!==r.routeId||!C.routeId&&!o.isRoot)throw C;return Q.createElement(m,C)},children:x||r._displayPending?f.jsx(qS,{fallback:h,children:f.jsx(Zy,{matchId:l})}):f.jsx(Zy,{matchId:l})})})})}),r.parentRouteId===ys?f.jsxs(f.Fragment,{children:[f.jsx(x1,{resetKey:i}),n.options.scrollRestoration&&_g?f.jsx(p1,{}):null]}):null]})}function x1({resetKey:n}){const l=gt(),i=Q.useRef(void 0);return wi(()=>{const r=l.latestLocation.href;(i.current===void 0||i.current!==r)&&(l.emit({type:"onRendered",...dl(l.stores.location.state,l.stores.resolvedLocation.state)}),i.current=r)},[l.latestLocation.state.__TSR_key,n,l]),null}var Zy=Q.memo(function({matchId:l}){var m,x,v,S;const i=gt(),r=i.stores.activeMatchStoresById.get(l);r||Va();const o=dt(r,j=>j),d=o.routeId,h=i.routesById[d],g=Q.useMemo(()=>{var N;const j=(N=i.routesById[d].options.remountDeps??i.options.defaultRemountDeps)==null?void 0:N({routeId:d,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return j?JSON.stringify(j):void 0},[d,o.loaderDeps,o._strictParams,o._strictSearch,i.options.defaultRemountDeps,i.routesById]),p=Q.useMemo(()=>{const j=h.options.component??i.options.defaultComponent;return j?f.jsx(j,{},g):f.jsx(Pg,{})},[g,h.options.component,i.options.defaultComponent]);if(o._displayPending)throw(m=i.getMatch(o.id))==null?void 0:m._nonReactive.displayPendingPromise;if(o._forcePending)throw(x=i.getMatch(o.id))==null?void 0:x._nonReactive.minPendingPromise;if(o.status==="pending"){const j=h.options.pendingMinMs??i.options.defaultPendingMinMs;if(j){const N=i.getMatch(o.id);if(N&&!N._nonReactive.minPendingPromise){const E=El();N._nonReactive.minPendingPromise=E,setTimeout(()=>{E.resolve(),N._nonReactive.minPendingPromise=void 0},j)}}throw(v=i.getMatch(o.id))==null?void 0:v._nonReactive.loadPromise}if(o.status==="notFound")return St(o.error)||Va(),kg(i,h,o.error);if(o.status==="redirected")throw wt(o.error)||Va(),(S=i.getMatch(o.id))==null?void 0:S._nonReactive.loadPromise;if(o.status==="error")throw o.error;return p}),Pg=Q.memo(function(){const l=gt(),i=Q.useContext(zu);let r,o=!1,d;{const m=i?l.stores.activeMatchStoresById.get(i):void 0;[r,o]=dt(m,x=>[x==null?void 0:x.routeId,(x==null?void 0:x.globalNotFound)??!1]),d=dt(l.stores.matchesId,x=>x[x.findIndex(v=>v===i)+1])}const h=r?l.routesById[r]:void 0,g=l.options.defaultPendingComponent?f.jsx(l.options.defaultPendingComponent,{}):null;if(o)return h||Va(),kg(l,h,void 0);if(!d)return null;const p=f.jsx($g,{matchId:d});return r===ys?f.jsx(Q.Suspense,{fallback:g,children:p}):p});function b1(){const n=gt(),l=Q.useRef({router:n,mounted:!1}),[i,r]=Q.useState(!1),o=dt(n.stores.isLoading,v=>v),d=dt(n.stores.hasPendingMatches,v=>v),h=af(o),g=o||i||d,p=af(g),m=o||d,x=af(m);return n.startTransition=v=>{r(!0),Q.startTransition(()=>{v(),r(!1)})},Q.useEffect(()=>{const v=n.history.subscribe(n.load),S=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Dn(n.latestLocation.publicHref)!==Dn(S.publicHref)&&n.commitLocation({...S,replace:!0}),()=>{v()}},[n,n.history]),wi(()=>{if(typeof window<"u"&&n.ssr||l.current.router===n&&l.current.mounted)return;l.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(S){console.error(S)}})()},[n]),wi(()=>{h&&!o&&n.emit({type:"onLoad",...dl(n.stores.location.state,n.stores.resolvedLocation.state)})},[h,n,o]),wi(()=>{x&&!m&&n.emit({type:"onBeforeRouteMount",...dl(n.stores.location.state,n.stores.resolvedLocation.state)})},[m,x,n]),wi(()=>{if(p&&!g){const v=dl(n.stores.location.state,n.stores.resolvedLocation.state);n.emit({type:"onResolved",...v}),Hg(()=>{n.stores.status.setState(()=>"idle"),n.stores.resolvedLocation.setState(()=>n.stores.location.state)}),v.hrefChanged&&US(n)}},[g,p,n]),null}function S1(){const n=gt(),l=n.routesById[ys].options.pendingComponent??n.options.defaultPendingComponent,i=l?f.jsx(l,{}):null,r=f.jsxs(typeof document<"u"&&n.ssr?fl:Q.Suspense,{fallback:i,children:[f.jsx(b1,{}),f.jsx(j1,{})]});return n.options.InnerWrap?f.jsx(n.options.InnerWrap,{children:r}):r}function j1(){const n=gt(),l=dt(n.stores.firstMatchId,o=>o),i=dt(n.stores.loadedAt,o=>o),r=l?f.jsx($g,{matchId:l}):null;return f.jsx(zu.Provider,{value:l,children:n.options.disableGlobalCatchBoundary?r:f.jsx(kf,{getResetKey:()=>i,errorComponent:$f,onCatch:void 0,children:r})})}function Fg(){const n=gt();return dt(n.stores.matchRouteReactivity,l=>l),Q.useCallback(l=>{const{pending:i,caseSensitive:r,fuzzy:o,includeSearch:d,...h}=l;return n.matchRoute(h,{pending:i,caseSensitive:r,fuzzy:o,includeSearch:d})},[n])}function N1(n){const l=gt(),i=Q.useRef(void 0);return dt(l.stores.activeMatchesSnapshot,r=>{const o=r;if(l.options.defaultStructuralSharing){const d=Ka(i.current,o);return i.current=d,d}return o})}var R1=n=>({createMutableStore:Qy,createReadonlyStore:Qy,batch:Hg}),_1=n=>new E1(n),E1=class extends TS{constructor(n){super(n,R1)}};function T1({router:n,children:l,...i}){Object.keys(i).length>0&&n.update({...n.options,...i,context:{...n.options.context,...i.context}});const r=f.jsx(Bg.Provider,{value:n,children:l});return n.options.Wrap?f.jsx(n.options.Wrap,{children:r}):r}function M1({router:n,...l}){return f.jsx(T1,{router:n,...l,children:f.jsx(S1,{})})}function Jg(n){const i=gt();return Q.useRef(void 0),dt(i.stores.__store,r=>r)}function C1(n){const l=gt(),i=Q.useRef(void 0);return dt(l.stores.location,r=>{const o=r;if(l.options.defaultStructuralSharing){const d=Ka(i.current,o);return i.current=d,d}return o})}const Ig=Q.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function A1({children:n}){const[l,i]=Q.useState(!1);return f.jsx(Ig.Provider,{value:{isOpen:l,toggle:()=>i(r=>!r),close:()=>i(!1)},children:n})}function Wg(){return Q.useContext(Ig)}function gf(n){if(!n)return"Run";const[,l]=n.split("::");return l||n}function w1(n){const l=[];for(let i=1;i<n.length;i++){const r=n[i],o=r.routeId??r.id,d=r.params;o==="/"||o==="/_layout"||(o.includes("/runs/$runId/category/$category")?(l.some(h=>h.label===d.runId)||l.push({label:gf(d.runId),to:`/runs/${encodeURIComponent(d.runId)}`}),l.push({label:d.category??"Category",to:r.pathname})):o.includes("/runs/$runId/suite/$suite")?l.push({label:d.suite??"Suite",to:r.pathname}):o.includes("/runs/$runId")?l.push({label:gf(d.runId),to:r.pathname}):o.includes("/evals/$runId/$evalId")?(l.some(h=>h.label===d.runId)||l.push({label:gf(d.runId),to:`/runs/${encodeURIComponent(d.runId)}`}),l.push({label:d.evalId??"Eval",to:r.pathname})):o.includes("/experiments/$experimentName")?l.push({label:d.experimentName??"Experiment",to:r.pathname}):(o==="/index"||o==="/")&&l.push({label:"Home",to:"/"}))}return l}function O1(){const n=N1(),l=w1(n);return l.length===0?null:f.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 bg-gray-950 px-6 py-2 text-sm",children:[f.jsx(Me,{to:"/",className:"text-cyan-400 hover:text-cyan-300 hover:underline",children:"Home"}),l.map((i,r)=>{const o=r===l.length-1;return f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-gray-600",children:">"}),o?f.jsx("span",{className:"text-gray-400",children:i.label}):f.jsx(Me,{to:i.to??"/",className:"text-cyan-400 hover:text-cyan-300 hover:underline",children:i.label})]},`${i.label}-${r}`)})]})}async function Xe(n){const l=await fetch(n);if(!l.ok)throw new Error(`API error: ${l.status} ${l.statusText}`);return l.json()}const z1={queryKey:["runs"],queryFn:()=>Xe("/api/runs"),refetchInterval:5e3};function D1(n){return{queryKey:["runs",n],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}`),enabled:!!n}}const L1={queryKey:["feedback"],queryFn:()=>Xe("/api/feedback")},U1={queryKey:["experiments"],queryFn:()=>Xe("/api/experiments")},B1={queryKey:["compare"],queryFn:()=>Xe("/api/compare")},q1={queryKey:["targets"],queryFn:()=>Xe("/api/targets")};function H1(n,l){return{queryKey:["runs",n,"evals",l,"files"],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}/evals/${encodeURIComponent(l)}/files`),enabled:!!n&&!!l}}function Q1(n,l,i){return{queryKey:["runs",n,"evals",l,"files",i],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}/evals/${encodeURIComponent(l)}/files/${i}`),enabled:!!n&&!!l&&!!i}}function Y1(n,l){return{queryKey:["runs",n,"categories",l,"suites"],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}/categories/${encodeURIComponent(l)}/suites`),enabled:!!n&&!!l}}const G1={queryKey:["config"],queryFn:()=>Xe("/api/config"),staleTime:5e3};function K1(n){const l=n?`${Gt(n)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",n??""],queryFn:()=>Xe(l),staleTime:5e3}}function Ff(){return Ve(z1)}function Zi(n){return Ve(D1(n))}function V1(){return Ve(L1)}function Jf(){return Ve(U1)}function X1(){return Ve(B1)}function Z1(){return Ve(q1)}function k1(n,l){return Ve(H1(n,l))}function $1(n,l,i){return Ve(Q1(n,l,i))}function ep(n,l){return Ve(Y1(n,l))}function pt(){return Ve(G1)}function tp(n){return Ve(K1(n))}const Uf=.8;function Za(n,l=Uf){return n>=l}const P1={queryKey:["benchmarks"],queryFn:()=>Xe("/api/benchmarks"),refetchInterval:1e4};function If(){return Ve(P1)}const F1={queryKey:["benchmarks","all-runs"],queryFn:()=>Xe("/api/benchmarks/all-runs"),refetchInterval:5e3};function J1(){return Ve(F1)}async function I1(n){const l=await fetch("/api/benchmarks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!l.ok){const i=await l.json();throw new Error(i.error||`Failed to add project: ${l.status}`)}return l.json()}async function W1(n){const l=await fetch("/api/benchmarks/discover",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!l.ok){const r=await l.json();throw new Error(r.error||`Failed to discover: ${l.status}`)}return(await l.json()).discovered}function Gt(n){return`/api/benchmarks/${encodeURIComponent(n)}`}function ej(n){return{queryKey:["benchmarks",n,"runs"],queryFn:()=>Xe(`${Gt(n)}/runs`),enabled:!!n,refetchInterval:5e3}}function ap(n){return Ve(ej(n))}function tj(n,l){return{queryKey:["benchmarks",n,"runs",l],queryFn:()=>Xe(`${Gt(n)}/runs/${encodeURIComponent(l)}`),enabled:!!n&&!!l}}function Wf(n,l){return Ve(tj(n,l))}function aj(n,l,i){return{queryKey:["benchmarks",n,"runs",l,"evals",i,"files"],queryFn:()=>Xe(`${Gt(n)}/runs/${encodeURIComponent(l)}/evals/${encodeURIComponent(i)}/files`),enabled:!!n&&!!l&&!!i}}function nj(n,l,i,r){return{queryKey:["benchmarks",n,"runs",l,"evals",i,"files",r],queryFn:()=>Xe(`${Gt(n)}/runs/${encodeURIComponent(l)}/evals/${encodeURIComponent(i)}/files/${r}`),enabled:!!n&&!!l&&!!i&&!!r}}function sj(n){return{queryKey:["benchmarks",n,"experiments"],queryFn:()=>Xe(`${Gt(n)}/experiments`),enabled:!!n}}function lj(n){return{queryKey:["benchmarks",n,"compare"],queryFn:()=>Xe(`${Gt(n)}/compare`),enabled:!!n}}function ij(n){return{queryKey:["benchmarks",n,"targets"],queryFn:()=>Xe(`${Gt(n)}/targets`),enabled:!!n}}async function np(n){const l=n?`${Gt(n)}/remote/sync`:"/api/remote/sync",i=await fetch(l,{method:"POST"});if(!i.ok)throw new Error(`Failed to sync remote results: ${i.status}`);return i.json()}async function rj(n){const l=await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(`Failed to save config: ${l.status}`);return l.json()}function uj(n){const l=n?`${Gt(n)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",n??""],queryFn:()=>Xe(l),staleTime:3e4}}function cj(n){return Ve(uj(n))}function oj(n){const l=n?`${Gt(n)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",n??""],queryFn:()=>Xe(l),staleTime:3e4}}function fj(n){return Ve(oj(n))}async function dj(n,l){const i=l?`${Gt(l)}/eval/run`:"/api/eval/run",r=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const o=await r.json().catch(()=>({error:r.statusText}));throw new Error(o.error??`Failed: ${r.status}`)}return r.json()}function hj(n){return{queryKey:["eval-status",n],queryFn:()=>Xe(`/api/eval/status/${n}`),enabled:!!n,refetchInterval:l=>{var r;const i=(r=l.state.data)==null?void 0:r.status;return i==="finished"||i==="failed"?!1:2e3}}}function mj(n){return Ve(hj(n))}async function yj(n,l){const i=l?`${Gt(l)}/eval/preview`:"/api/eval/preview",r=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new Error(`Preview failed: ${r.status}`);return r.json()}function xs({children:n}){const{isOpen:l,close:i}=Wg(),r=C1();return Q.useEffect(()=>{i()},[i,r.pathname]),f.jsxs(f.Fragment,{children:[l&&f.jsx("div",{className:"fixed inset-0 z-30 bg-black/50 md:hidden",onClick:i,onKeyDown:o=>o.key==="Escape"&&i(),role:"button",tabIndex:-1,"aria-label":"Close navigation"}),f.jsx("aside",{className:`fixed inset-y-0 left-0 z-40 flex w-64 flex-col border-r border-gray-800 bg-gray-900/50 transition-transform duration-200 ease-in-out md:static md:z-auto md:translate-x-0 ${l?"translate-x-0":"-translate-x-full"}`,children:n})]})}function gj(){const n=Fg(),l=n({to:"/projects/$benchmarkId/evals/$runId/$evalId",fuzzy:!0}),i=n({to:"/projects/$benchmarkId/runs/$runId",fuzzy:!0}),r=n({to:"/projects/$benchmarkId",fuzzy:!0});if(l&&typeof l=="object"&&"benchmarkId"in l){const{benchmarkId:p,runId:m,evalId:x}=l;return f.jsx(Sj,{benchmarkId:p,runId:m,currentEvalId:x})}if(i&&typeof i=="object"&&"benchmarkId"in i){const{benchmarkId:p,runId:m}=i;return f.jsx(ky,{benchmarkId:p,currentRunId:m})}if(r&&typeof r=="object"&&"benchmarkId"in r){const{benchmarkId:p}=r;return f.jsx(ky,{benchmarkId:p})}const o=n({to:"/evals/$runId/$evalId",fuzzy:!0}),d=n({to:"/runs/$runId/category/$category",fuzzy:!0}),h=n({to:"/runs/$runId/suite/$suite",fuzzy:!0}),g=n({to:"/experiments/$experimentName",fuzzy:!0});if(d&&typeof d=="object"&&"runId"in d){const{runId:p,category:m}=d;return f.jsx(bj,{runId:p,category:m})}if(h&&typeof h=="object"&&"runId"in h){const{runId:p,suite:m}=h;return f.jsx(xj,{runId:p,suite:m})}if(o&&typeof o=="object"&&"runId"in o){const{runId:p,evalId:m}=o;return f.jsx(vj,{runId:p,currentEvalId:m})}if(g&&typeof g=="object"&&"experimentName"in g){const{experimentName:p}=g;return f.jsx(jj,{currentExperiment:p})}return f.jsx(pj,{})}function pj(){const n=Fg(),{data:l}=If(),i=((l==null?void 0:l.projects.length)??0)>0,r=n({to:"/"}),o=n({to:"/runs/$runId",fuzzy:!0}),d=i&&r!==!1,{data:h}=Ff(),{data:g}=J1(),p=d?g:h;return f.jsxs(xs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Me,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),p==null?void 0:p.runs.map(m=>{const x=r===!1&&o&&typeof o=="object"&&"runId"in o&&o.runId===m.filename;return m.project_id?f.jsx(Me,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:m.project_id,runId:m.filename},className:"mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",title:m.project_name,children:m.display_name??m.filename},`${m.project_id}/${m.filename}`):f.jsx(Me,{to:"/runs/$runId",params:{runId:m.filename},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${x?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:m.display_name??m.filename},m.filename)})]}),f.jsx("div",{className:"border-t border-gray-800 px-4 py-3",children:f.jsx(Me,{to:"/settings",className:"flex items-center gap-2 text-sm text-gray-400 hover:text-cyan-400",children:"Settings"})})]})}function vj({runId:n,currentEvalId:l}){const{data:i}=Zi(n),{data:r}=pt(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8;return f.jsxs(xs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Me,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Me,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),i==null?void 0:i.results.map(d=>{const h=d.testId===l,g=Za(d.score,o);return f.jsxs(Me,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:d.testId},className:`mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${h?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:[f.jsx("span",{className:`text-xs ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"}),f.jsx("span",{className:"truncate",children:d.testId})]},d.testId)})]})]})}function xj({runId:n,suite:l}){const{data:i}=Zi(n),{data:r}=pt(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,d=((i==null?void 0:i.results)??[]).filter(h=>(h.suite??"Uncategorized")===l);return f.jsxs(xs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Me,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Me,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n}),f.jsx("p",{className:"truncate text-xs text-gray-500",children:l})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),d.map(h=>{const g=Za(h.score,o);return f.jsxs(Me,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:h.testId},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[f.jsx("span",{className:`text-xs ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"}),f.jsx("span",{className:"truncate",children:h.testId})]},h.testId)})]})]})}function bj({runId:n,category:l}){const{data:i}=ep(n,l),r=(i==null?void 0:i.suites)??[];return f.jsxs(xs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Me,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Me,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n}),f.jsx("p",{className:"truncate text-xs text-gray-500",children:l})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),r.map(o=>f.jsxs(Me,{to:"/runs/$runId/suite/$suite",params:{runId:n,suite:o.name},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[f.jsx("span",{className:`text-xs ${o.passed===o.total?"text-emerald-400":"text-red-400"}`,children:o.passed===o.total?"✓":"✗"}),f.jsx("span",{className:"truncate",children:o.name})]},o.name))]})]})}function ky({benchmarkId:n,currentRunId:l}){const{data:i}=ap(n);return f.jsxs(xs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Me,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Me,{to:"/",className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All Benchmarks"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),i==null?void 0:i.runs.map(r=>{const o=l===r.filename;return f.jsx(Me,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:n,runId:r.filename},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:r.display_name??r.filename},r.filename)})]})]})}function Sj({benchmarkId:n,runId:l,currentEvalId:i}){const{data:r}=Wf(n,l),{data:o}=pt(),d=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8;return f.jsxs(xs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Me,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Me,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:n,runId:l},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:l})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),r==null?void 0:r.results.map(h=>{const g=h.testId===i,p=Za(h.score,d);return f.jsxs(Me,{to:"/projects/$benchmarkId/evals/$runId/$evalId",params:{benchmarkId:n,runId:l,evalId:h.testId},className:`mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${g?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:[f.jsx("span",{className:`text-xs ${p?"text-emerald-400":"text-red-400"}`,children:p?"✓":"✗"}),f.jsx("span",{className:"truncate",children:h.testId})]},h.testId)})]})]})}function jj({currentExperiment:n}){const{data:l}=Jf(),i=(l==null?void 0:l.experiments)??[];return f.jsxs(xs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Me,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:f.jsx(Me,{to:"/",search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"})}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Experiments"}),i.map(r=>{const o=r.name===n;return f.jsx(Me,{to:"/experiments/$experimentName",params:{experimentName:r.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:r.name},r.name)})]})]})}function Nj(){return f.jsx(A1,{children:f.jsx(Rj,{})})}function Rj(){const{toggle:n}=Wg();return f.jsxs("div",{className:"flex h-screen overflow-hidden",children:[f.jsx(gj,{}),f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[f.jsxs("header",{className:"flex items-center gap-3 border-b border-gray-800 bg-gray-900/50 px-4 py-3 md:hidden",children:[f.jsx("button",{type:"button",onClick:n,className:"text-gray-400 hover:text-gray-200","aria-label":"Toggle navigation",children:f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":"Toggle navigation",children:[f.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),f.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),f.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),f.jsx("span",{className:"text-sm font-semibold text-white",children:"AgentV Studio"})]}),f.jsx(O1,{}),f.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:f.jsx(Pg,{})})]})]})}const ia=h1({component:Nj}),_j=pa("/settings")({component:Ej});function Ej(){const{data:n,isLoading:l}=pt(),i=Un(),[r,o]=Q.useState(""),[d,h]=Q.useState(!1),[g,p]=Q.useState(null),m=(n==null?void 0:n.threshold)??Uf,x=r||String(m),v=(n==null?void 0:n.read_only)===!0,S=async()=>{const j=Number.parseFloat(r||String(m));if(Number.isNaN(j)||j<0||j>1){p({type:"error",text:"Threshold must be a number between 0 and 1"});return}h(!0),p(null);try{await rj({threshold:j}),await i.invalidateQueries({queryKey:["config"]}),o(""),p({type:"success",text:"Settings saved"}),setTimeout(()=>p(null),3e3)}catch{p({type:"error",text:"Failed to save settings"})}finally{h(!1)}};return l?f.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[f.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"h-40 animate-pulse rounded-lg bg-gray-900"})]}):f.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Settings"}),f.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure your AgentV Studio dashboard"})]}),f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6",children:[f.jsx("h2",{className:"text-lg font-medium text-white",children:"Evaluation"}),f.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure how evaluation results are classified"}),f.jsx("div",{className:"mt-6 space-y-4",children:f.jsxs("div",{children:[f.jsx("label",{htmlFor:"pass-threshold",className:"block text-sm font-medium text-gray-300",children:"Pass Threshold"}),f.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Score at or above this value is considered passing. Default: ",Uf]}),f.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[f.jsx("input",{id:"pass-threshold",type:"number",min:"0",max:"1",step:"0.05",value:x,onChange:j=>o(j.target.value),disabled:v,className:"w-32 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500"}),f.jsxs("span",{className:"text-sm text-gray-400",children:["(",Math.round((Number.parseFloat(x)||0)*100),"%)"]})]})]})}),f.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[!v&&f.jsx("button",{type:"button",onClick:S,disabled:d,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-cyan-500 disabled:opacity-50",children:d?"Saving...":"Save Settings"}),v&&f.jsx("span",{className:"text-sm text-gray-400",children:"Read-only mode is enabled."}),g&&f.jsx("span",{className:`text-sm ${g.type==="success"?"text-emerald-400":"text-red-400"}`,children:g.text})]})]}),f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:f.jsxs("p",{className:"text-xs text-gray-500",children:["Settings are stored in ",f.jsx("code",{className:"text-gray-400",children:".agentv/config.yaml"})]})})]})}function sp({data:n,isLoading:l,isError:i,error:r}){if(l)return f.jsx(Oj,{});if(i&&r)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load comparison data: ",r.message]});if(!n||n.cells.length===0)return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No comparison data available"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Run evaluations with different experiment and target combinations to see a comparison matrix."})]});const{experiments:o,targets:d,cells:h}=n;if(o.length<=1&&d.length<=1)return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"Not enough variation to compare"}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["The comparison matrix requires at least 2 experiments or 2 targets. Currently there"," ",o.length===1?"is 1 experiment":`are ${o.length} experiments`," ","and ",d.length===1?"1 target":`${d.length} targets`,"."]})]});const g=new Map;for(const p of h)g.set(JSON.stringify([p.experiment,p.target]),p);return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-400",children:[f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm bg-gray-800/60 ring-1 ring-emerald-500/60"}),f.jsx("span",{className:"text-emerald-400",children:"80%+"})]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm bg-gray-800/60 ring-1 ring-amber-500/60"}),f.jsx("span",{className:"text-amber-400",children:"50–80%"})]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm bg-gray-800/60 ring-1 ring-red-500/60"}),f.jsx("span",{className:"text-red-400",children:"<50%"})]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm border border-dashed border-gray-700"}),"No data"]})]}),f.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),o.map(p=>f.jsx("th",{className:"px-4 py-3 text-center font-medium text-gray-400",children:p},p))]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:d.map(p=>f.jsx(Tj,{target:p,experiments:o,cellMap:g},p))})]})})]})}function Tj({target:n,experiments:l,cellMap:i}){return f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:n}),l.map(r=>{const o=i.get(JSON.stringify([r,n]));return f.jsx("td",{className:"px-2 py-2",children:o?f.jsx(Aj,{cell:o}):f.jsx("div",{className:"flex items-center justify-center rounded-lg border border-dashed border-gray-700 px-3 py-4 text-gray-600",children:"--"})},r)})]})}function Mj(n){return n>=.8?"ring-emerald-500/60":n>=.5?"ring-amber-500/60":"ring-red-500/60"}function Cj(n){return n>=.8?"text-emerald-400":n>=.5?"text-amber-400":"text-red-400"}function Aj({cell:n}){const[l,i]=Q.useState(!1),r=Math.round(n.pass_rate*100),o=Math.round(n.avg_score*100);return f.jsxs("div",{className:"space-y-1",children:[f.jsxs("button",{type:"button",onClick:()=>i(!l),"aria-expanded":l,className:`w-full rounded-lg bg-gray-800/60 px-3 py-3 text-center ring-1 transition-colors hover:bg-gray-700/60 ${Mj(n.pass_rate)}`,children:[f.jsx("div",{className:"flex items-center justify-center",children:f.jsxs("span",{className:`text-lg font-semibold tabular-nums ${Cj(n.pass_rate)}`,children:[r,"%"]})}),f.jsxs("div",{className:"mt-0.5 text-xs text-gray-400",children:[n.passed_count,"/",n.eval_count," pass | avg ",o,"%"]})]}),l&&f.jsx(wj,{tests:n.tests})]})}function wj({tests:n}){return f.jsxs("div",{className:"mt-1 max-h-48 overflow-y-auto rounded-md border border-gray-800 bg-gray-950/80 p-2",children:[f.jsx("div",{className:"mb-1 text-xs font-medium text-gray-500",children:"Test Cases"}),f.jsx("div",{className:"space-y-0.5",children:n.map(l=>f.jsxs("div",{className:"flex items-center gap-2 rounded px-1.5 py-0.5 text-xs",children:[f.jsx("span",{className:l.passed?"text-emerald-400":"text-red-400",children:l.passed?"✓":"✗"}),f.jsx("span",{className:"flex-1 truncate text-gray-300",title:l.test_id,children:l.test_id}),f.jsxs("span",{className:"tabular-nums text-gray-500",children:[Math.round(l.score*100),"%"]})]},l.test_id))})]})}function Oj(){return f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("div",{className:"animate-pulse",children:[f.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3"].map(n=>f.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-6",children:[f.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"}),f.jsx("div",{className:"h-16 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-16 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-16 w-32 rounded bg-gray-800"})]},n))]})})}function Hi({rate:n}){const l=Math.round(n*100);return f.jsxs("div",{className:"relative h-5 w-20 overflow-hidden rounded-full bg-gray-800",children:[f.jsx("div",{className:"absolute inset-y-0 left-0 bg-gradient-to-r from-blue-400 to-blue-600",style:{width:`${l}%`}}),f.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold tabular-nums text-white",children:[l,"%"]})]})}function zj(){const{data:n,isLoading:l}=Jf();if(l)return f.jsx(Dj,{});const i=(n==null?void 0:n.experiments)??[];return i.length===0?f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No experiments found"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Experiments will appear here once evaluations are run with experiment labels."})]}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Targets"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Last Run"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:i.map(r=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3",children:f.jsx(Me,{to:"/experiments/$experimentName",params:{experimentName:r.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:r.name})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.run_count}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.target_count}),f.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[f.jsx("span",{className:"text-emerald-400",children:r.passed_count}),f.jsx("span",{className:"text-gray-600",children:" / "}),r.eval_count]}),f.jsx("td",{className:"px-4 py-3",children:f.jsx(Hi,{rate:r.pass_rate})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",title:$y(r.last_run).full,children:$y(r.last_run).date})]},r.name))})]})})}function $y(n){if(!n)return{date:"N/A",full:"N/A"};try{const l=new Date(n);if(Number.isNaN(l.getTime()))return{date:"N/A",full:"N/A"};const i=l.toLocaleString(),r=Date.now()-l.getTime(),o=Math.floor(r/6e4),d=Math.floor(r/36e5);let h;return o<1?h="just now":o<60?h=`${o} min ago`:d<24?h=`${d} hour${d===1?"":"s"} ago`:h=l.toLocaleDateString(),{date:h,full:i}}catch{return{date:"N/A",full:"N/A"}}}function Dj(){return f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("div",{className:"animate-pulse",children:[f.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(n=>f.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[f.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},n))]})})}function Lj(n){if(!n)return"No runs";const l=new Date(n);if(Number.isNaN(l.getTime()))return"N/A";const i=Date.now()-l.getTime(),r=Math.floor(i/6e4);if(r<1)return"Just now";if(r<60)return`${r}m ago`;const o=Math.floor(r/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function Uj({project:n}){const l=Math.round(n.pass_rate*100);return f.jsxs(Me,{to:"/projects/$benchmarkId",params:{benchmarkId:n.id},className:"group block rounded-lg border border-gray-800 bg-gray-900/50 p-5 transition-colors hover:border-cyan-800 hover:bg-gray-900",children:[f.jsx("div",{className:"flex items-start justify-between",children:f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h3",{className:"truncate text-lg font-semibold text-white group-hover:text-cyan-400",children:n.name}),f.jsx("p",{className:"mt-1 truncate text-xs text-gray-500",children:n.path})]})}),f.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-3",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-gray-500",children:"Runs"}),f.jsx("p",{className:"text-lg font-semibold text-white",children:n.run_count})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-gray-500",children:"Pass Rate"}),f.jsx("p",{className:`text-lg font-semibold ${n.run_count===0?"text-gray-500":l>=80?"text-emerald-400":l>=50?"text-yellow-400":"text-red-400"}`,children:n.run_count>0?`${l}%`:"--"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-gray-500",children:"Last Run"}),f.jsx("p",{className:"text-sm text-gray-300",children:Lj(n.last_run)})]})]})]})}function bs({open:n,onClose:l,benchmarkId:i,prefill:r}){const o=Un(),[d,h]=Q.useState((r==null?void 0:r.suiteFilter)??""),[g,p]=Q.useState(""),[m,x]=Q.useState((r==null?void 0:r.testIds)??[]),[v,S]=Q.useState((r==null?void 0:r.target)??""),[j,N]=Q.useState(""),[E,C]=Q.useState(""),[w,$]=Q.useState(!1),[X,L]=Q.useState(!1),[Z,ee]=Q.useState(null),[P,F]=Q.useState(null),[J,K]=Q.useState(!1),[I,se]=Q.useState(null),{data:le}=cj(i),{data:ue}=fj(i),{data:te}=mj(Z),D=Q.useMemo(()=>(le==null?void 0:le.eval_files)??[],[le]),V=Q.useMemo(()=>(ue==null?void 0:ue.targets)??[],[ue]);Q.useEffect(()=>{n&&(h((r==null?void 0:r.suiteFilter)??""),x((r==null?void 0:r.testIds)??[]),S((r==null?void 0:r.target)??""),p(""),N(""),C(""),$(!1),L(!1),ee(null),F(null),K(!1),se(null))},[n,r]),Q.useEffect(()=>{((te==null?void 0:te.status)==="finished"||(te==null?void 0:te.status)==="failed")&&(o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["projects"]}))},[te==null?void 0:te.status,o]);const ae=Q.useCallback(()=>{const q={};return d.trim()&&(q.suite_filter=d.trim()),m.length>0&&(q.test_ids=m),v&&(q.target=v),j&&(q.threshold=Number.parseFloat(j)),E&&(q.workers=Number.parseInt(E,10)),w&&(q.dry_run=!0),q},[d,m,v,j,E,w]);Q.useEffect(()=>{const q=ae();if(!q.suite_filter&&(!q.test_ids||q.test_ids.length===0)){se(null);return}yj(q,i).then(W=>se(W.command)).catch(()=>se(null))},[ae,i]);function he(){const q=g.trim();q&&!m.includes(q)&&x([...m,q]),p("")}function fe(q){x(m.filter(W=>W!==q))}async function T(){F(null),K(!0);try{const q=ae(),W=await dj(q,i);ee(W.id)}catch(q){F(q.message)}finally{K(!1)}}if(!n)return null;if(Z&&te)return f.jsx(Py,{onClose:l,title:"Eval Run",children:f.jsx(Bj,{status:te,onClose:l})});const Y=!!(d.trim()||m.length>0);return f.jsx(Py,{onClose:l,title:"Run Eval",children:f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"suite-filter",className:"mb-1 block text-sm font-medium text-gray-300",children:"Suite Filter"}),f.jsx("input",{id:"suite-filter",type:"text",value:d,onChange:q=>h(q.target.value),placeholder:"evals/**/*.eval.yaml",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),D.length>0&&!d&&f.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-1",children:[D.slice(0,5).map(q=>f.jsx("button",{type:"button",onClick:()=>h(W=>W?`${W}, ${q.relative_path}`:q.relative_path),className:"rounded bg-gray-800 px-2 py-0.5 text-xs text-gray-400 hover:bg-gray-700 hover:text-gray-200",children:q.relative_path},q.relative_path)),D.length>5&&f.jsxs("span",{className:"px-1 text-xs text-gray-500",children:["+",D.length-5," more"]})]})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"test-id-input",className:"mb-1 block text-sm font-medium text-gray-300",children:"Test ID Filter"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{id:"test-id-input",type:"text",value:g,onChange:q=>p(q.target.value),onKeyDown:q=>{q.key==="Enter"&&(q.preventDefault(),he())},placeholder:"auth-*, retrieval-basic",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),f.jsx("button",{type:"button",onClick:he,disabled:!g.trim(),className:"rounded-md bg-gray-700 px-3 py-2 text-sm text-white hover:bg-gray-600 disabled:opacity-50",children:"Add"})]}),m.length>0&&f.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:m.map(q=>f.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-cyan-900/40 px-2.5 py-0.5 text-xs text-cyan-300",children:[q,f.jsx("button",{type:"button",onClick:()=>fe(q),className:"text-cyan-400 hover:text-white",children:"×"})]},q))})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"target-override",className:"mb-1 block text-sm font-medium text-gray-300",children:"Target Override"}),f.jsxs("select",{id:"target-override",value:v,onChange:q=>S(q.target.value),className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white focus:border-cyan-600 focus:outline-none",children:[f.jsx("option",{value:"",children:"Use eval's configured target"}),V.map(q=>f.jsx("option",{value:q,children:q},q))]})]}),f.jsxs("div",{children:[f.jsxs("button",{type:"button",onClick:()=>L(!X),className:"text-sm text-gray-400 hover:text-gray-200",children:[X?"▾":"▸"," Advanced Options"]}),X&&f.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"threshold-input",className:"mb-1 block text-xs text-gray-400",children:"Threshold (0–1)"}),f.jsx("input",{id:"threshold-input",type:"number",value:j,onChange:q=>N(q.target.value),min:"0",max:"1",step:"0.1",placeholder:"0.8",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"workers-input",className:"mb-1 block text-xs text-gray-400",children:"Workers"}),f.jsx("input",{id:"workers-input",type:"number",value:E,onChange:q=>C(q.target.value),min:"1",max:"50",placeholder:"3",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),f.jsx("div",{className:"col-span-2",children:f.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-400",children:[f.jsx("input",{type:"checkbox",checked:w,onChange:q=>$(q.target.checked),className:"rounded border-gray-600 bg-gray-800"}),"Dry run (mock provider responses)"]})})]})]}),I&&f.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:[f.jsx("div",{className:"mb-1 text-xs text-gray-500",children:"CLI Preview"}),f.jsx("code",{className:"block break-all text-xs text-cyan-300",children:I})]}),P&&f.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:P}),f.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[f.jsx("button",{type:"button",onClick:l,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Cancel"}),f.jsx("button",{type:"button",onClick:T,disabled:!Y||J,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:J?"Launching…":"Run Now"})]})]})})}function Py({children:n,onClose:l,title:i}){return f.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 pt-[10vh]",children:f.jsxs("div",{className:"w-full max-w-lg rounded-lg border border-gray-700 bg-gray-900 shadow-xl",children:[f.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-5 py-3",children:[f.jsx("h2",{className:"text-lg font-semibold text-white",children:i}),f.jsx("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-white",children:"✕"})]}),f.jsx("div",{className:"px-5 py-4",children:n})]})})}function Bj({status:n,onClose:l}){const i=n.status==="finished"||n.status==="failed",r={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"};return f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("span",{className:`text-sm font-medium ${r[n.status]??"text-gray-400"}`,children:[n.status==="running"&&"●"," ",n.status.charAt(0).toUpperCase()+n.status.slice(1)]}),!i&&f.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]}),f.jsx("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:f.jsx("code",{className:"block break-all text-xs text-cyan-300",children:n.command})}),n.stdout&&f.jsx("div",{className:"max-h-48 overflow-y-auto rounded-md bg-gray-950 p-3",children:f.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-300",children:n.stdout.slice(-3e3)})}),n.stderr&&f.jsx("div",{className:"max-h-24 overflow-y-auto rounded-md bg-red-950/20 p-3",children:f.jsx("pre",{className:"whitespace-pre-wrap text-xs text-red-300",children:n.stderr.slice(-2e3)})}),i&&f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("span",{className:"text-xs text-gray-500",children:["Exit code: ",n.exit_code,n.finished_at&&` · ${new Date(n.finished_at).toLocaleTimeString()}`]}),f.jsx("button",{type:"button",onClick:l,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Close"})]})]})}function qj(n){if(!n)return{date:"N/A",full:"N/A"};try{const l=new Date(n);if(Number.isNaN(l.getTime()))return{date:"N/A",full:"N/A"};const i=l.toLocaleString(),r=Date.now()-l.getTime(),o=Math.floor(r/6e4),d=Math.floor(r/36e5);let h;return o<1?h="just now":o<60?h=`${o} min ago`:d<24?h=`${d} hour${d===1?"":"s"} ago`:h=l.toLocaleDateString(),{date:h,full:i}}catch{return{date:"N/A",full:"N/A"}}}function Hj(n){const l=[n.target,n.experiment].filter(i=>i&&i!=="default"&&i!=="-");return l.length>0?l.join(" · "):n.target?n.target:n.display_name??n.filename}function ed({runs:n,benchmarkId:l,emptyMessage:i}){return n.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:i??f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found."}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Run an evaluation first:"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"agentv eval <eval-file>"})]})]})}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"w-8 px-4 py-3"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Run"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Passed"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Failed"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Total"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"When"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(r=>{const o=qj(r.timestamp),d=r.pass_rate>=.8,h=Hj(r),g=Math.round(r.pass_rate*r.test_count),p=r.test_count-g;return f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 text-center",children:f.jsx("span",{className:`text-base font-bold ${d?"text-emerald-400":"text-red-400"}`,children:d?"✓":"✗"})}),f.jsx("td",{className:"px-4 py-3",children:l?f.jsx(Me,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:l,runId:r.filename},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:h}):f.jsx(Me,{to:"/runs/$runId",params:{runId:r.filename},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:h})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-emerald-300",children:g}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:p>0?p:f.jsx("span",{className:"text-gray-600",children:"0"})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.test_count}),f.jsx("td",{className:"px-4 py-3",children:f.jsx(Hi,{rate:r.pass_rate})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",title:o.full,children:o.date})]},r.filename)})})]})})}function Qj(n){if(!n)return"Never synced";const l=new Date(n);return Number.isNaN(l.getTime())?"Never synced":`Last synced ${l.toLocaleString()}`}function lp({filter:n,onFilterChange:l,remoteStatus:i,syncInFlight:r,onSync:o}){const d=(i==null?void 0:i.configured)===!0,h=d&&(i==null?void 0:i.available)!==!0;return f.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("div",{className:"flex flex-wrap items-center gap-2",children:["all","local","remote"].map(g=>{const p=g==="remote"&&!d;return f.jsx("button",{type:"button",onClick:()=>l(g),title:p?"Remote results are not configured":void 0,className:`rounded-full px-3 py-1 text-sm font-medium transition-colors ${n===g?"bg-cyan-500/20 text-cyan-300":p?"bg-gray-800 text-gray-600":"bg-gray-800 text-gray-400 hover:text-gray-200"}`,children:g==="all"?"All Sources":g==="local"?"Local Only":"Remote Only"},g)})}),d&&o?f.jsx("button",{type:"button",onClick:o,disabled:r,className:"rounded-md border border-cyan-800 bg-cyan-950/40 px-3 py-1.5 text-sm font-medium text-cyan-300 transition-colors hover:bg-cyan-900/50 disabled:cursor-not-allowed disabled:opacity-60",children:r?"Syncing…":"Sync Remote Results"}):null]}),d?f.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-gray-400",children:[f.jsx("span",{children:Qj(i==null?void 0:i.last_synced_at)}),i!=null&&i.repo?f.jsxs("span",{children:["Repo: ",i.repo]}):null,h?f.jsx("span",{className:"text-yellow-400",children:"Remote cache unavailable"}):null]}):n==="all"?f.jsxs("p",{className:"text-sm text-gray-500",children:["Remote results are not configured. Add"," ",f.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:"results.export"})," to"," ",f.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:".agentv/config.yaml"})," to enable."]}):null,i!=null&&i.last_error?f.jsx("div",{className:"rounded-md border border-yellow-900/50 bg-yellow-950/20 px-3 py-2 text-sm text-yellow-300",children:i.last_error}):null]})}function Cu({score:n,className:l=""}){const i=Math.round(Math.max(0,Math.min(1,n))*100);return f.jsxs("div",{className:`flex items-center gap-3 ${l}`,children:[f.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-gray-800",children:f.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-cyan-400 to-blue-500 transition-all duration-300",style:{width:`${i}%`}})}),f.jsxs("span",{className:"w-12 text-right text-sm font-medium tabular-nums text-gray-300",children:[i,"%"]})]})}function Yj(){const{data:n,isLoading:l}=Z1();if(l)return f.jsx(Gj,{});const i=(n==null?void 0:n.targets)??[];return i.length===0?f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Targets will appear here once evaluations are run with target labels."})]}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Experiments"}),f.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:i.map(r=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:r.name}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.run_count}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.experiment_count}),f.jsx("td",{className:"px-4 py-3",children:f.jsx(Cu,{score:r.pass_rate})}),f.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[f.jsx("span",{className:"text-emerald-400",children:r.passed_count}),f.jsx("span",{className:"text-gray-600",children:"/"}),f.jsx("span",{children:r.eval_count})]})]},r.name))})]})})}function Gj(){return f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("div",{className:"animate-pulse",children:[f.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(n=>f.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[f.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-20 rounded bg-gray-800"})]},n))]})})}const Fy=[{id:"runs",label:"🏃 Recent Runs"},{id:"experiments",label:"🧪 Experiments"},{id:"compare",label:"📊 Compare"},{id:"targets",label:"🤖 Targets"}],Kj=pa("/")({component:Vj});function Vj(){const{data:n,isLoading:l}=If(),{data:i,isLoading:r}=pt(),o=((n==null?void 0:n.projects.length)??0)>0,d=i==null?void 0:i.multi_project_dashboard;return l||r?f.jsx(ip,{}):d===!0||d===void 0&&o?f.jsx(Xj,{}):f.jsx(Zj,{})}function Xj(){const{data:n}=If(),{data:l}=pt(),i=Un(),[r,o]=Q.useState(""),[d,h]=Q.useState(""),[g,p]=Q.useState(null),[m,x]=Q.useState(!1),[v,S]=Q.useState(!1),j=(n==null?void 0:n.projects)??[],N=(l==null?void 0:l.read_only)===!0;async function E(w){if(w.preventDefault(),!!r.trim()){p(null);try{await I1(r.trim()),o(""),x(!1),i.invalidateQueries({queryKey:["benchmarks"]})}catch($){p($.message)}}}async function C(w){if(w.preventDefault(),!!d.trim()){p(null);try{const $=await W1(d.trim());h(""),$.length===0&&p("No projects with .agentv/ found in that directory."),i.invalidateQueries({queryKey:["benchmarks"]})}catch($){p($.message)}}}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Benchmarks"}),f.jsx("div",{className:"flex gap-2",children:!N&&f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",onClick:()=>S(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"}),f.jsx("button",{type:"button",onClick:()=>x(!m),className:"rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500",children:m?"Cancel":"Add Benchmark"})]})})]}),g&&f.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-3 text-sm text-red-400",children:g}),!N&&m&&f.jsxs("div",{className:"space-y-3 rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[f.jsxs("form",{onSubmit:E,className:"flex gap-2",children:[f.jsx("input",{type:"text",value:r,onChange:w=>o(w.target.value),placeholder:"Benchmark path (e.g., /home/user/projects/my-evals)",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),f.jsx("button",{type:"submit",className:"rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500",children:"Add"})]}),f.jsxs("form",{onSubmit:C,className:"flex gap-2",children:[f.jsx("input",{type:"text",value:d,onChange:w=>h(w.target.value),placeholder:"Discover benchmarks in directory...",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),f.jsx("button",{type:"submit",className:"rounded-md bg-gray-700 px-3 py-1.5 text-sm font-medium text-white hover:bg-gray-600",children:"Discover"})]})]}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:j.map(w=>f.jsx(Uj,{project:w},w.id))}),!N&&f.jsx(bs,{open:v,onClose:()=>S(!1)})]})}function Zj(){const i=Jg().location.search.tab,r=Du(),o=Un(),{data:d,isLoading:h,error:g}=Ff(),{data:p}=tp(),{data:m}=pt(),[x,v]=Q.useState(!1),[S,j]=Q.useState("all"),[N,E]=Q.useState(!1),C=(m==null?void 0:m.read_only)===!0,w=Fy.some(L=>L.id===i)?i:"experiments",$=S==="all"?(d==null?void 0:d.runs)??[]:((d==null?void 0:d.runs)??[]).filter(L=>L.source===S);async function X(){E(!0);try{await np(),await Promise.all([o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["experiments"]}),o.invalidateQueries({queryKey:["compare"]}),o.invalidateQueries({queryKey:["targets"]}),o.invalidateQueries({queryKey:["remote-status",""]})])}finally{E(!1)}}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Evaluation Runs"}),(m==null?void 0:m.project_name)&&f.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:m.project_name})]}),!C&&f.jsx("button",{type:"button",onClick:()=>v(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),f.jsx("div",{className:"border-b border-gray-800",children:f.jsx("div",{className:"flex gap-1",children:Fy.map(L=>f.jsx("button",{type:"button",onClick:()=>r({to:"/",search:{tab:L.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${w===L.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:L.label},L.id))})}),w==="runs"&&f.jsx($j,{runs:$,isLoading:h,error:g,sourceFilter:S,onSourceFilterChange:j,remoteStatus:p,syncInFlight:N,onSyncRemote:X}),w==="experiments"&&f.jsx(zj,{}),w==="compare"&&f.jsx(kj,{}),w==="targets"&&f.jsx(Yj,{}),!C&&f.jsx(bs,{open:x,onClose:()=>v(!1)})]})}function kj(){const{data:n,isLoading:l,isError:i,error:r}=X1();return f.jsx(sp,{data:n,isLoading:l,isError:i,error:r})}function $j({runs:n,isLoading:l,error:i,sourceFilter:r,onSourceFilterChange:o,remoteStatus:d,syncInFlight:h,onSyncRemote:g}){return l?f.jsx(ip,{}):i?f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",i.message]}):f.jsxs("div",{className:"space-y-4",children:[f.jsx(lp,{filter:r,onFilterChange:o,remoteStatus:d,syncInFlight:h,onSync:g}),f.jsx(ed,{runs:n,emptyMessage:r==="remote"?d!=null&&d.configured?f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No remote runs found."}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Sync remote results or run an eval with"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"auto_push: true"})," ","in your config."]})]}):f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"text-lg text-gray-400",children:"Remote results are not configured."}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Add"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"results.export"})," ","to"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:".agentv/config.yaml"})," ","to enable remote result syncing."]})]}):void 0})]})}function ip(){return f.jsx("div",{className:"space-y-2",children:["s1","s2","s3","s4","s5"].map(n=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},n))})}function Au({total:n,passed:l,failed:i,passRate:r,totalCost:o}){const d=Math.round(r*100),h=d>=80?"text-cyan-400":d>=60?"text-amber-400":"text-red-400";return f.jsxs("div",{className:"flex flex-wrap items-center gap-6 rounded-lg border border-gray-800 bg-gray-900/60 px-5 py-3",children:[f.jsx(Ci,{label:"Pass Rate",value:`${d}%`,accent:h,large:!0}),f.jsx("div",{className:"h-6 w-px bg-gray-700"}),f.jsx(Ci,{label:"Passed",value:String(l),accent:"text-emerald-400"}),f.jsx(Ci,{label:"Failed",value:String(i),accent:"text-red-400"}),f.jsx(Ci,{label:"Total",value:String(n)}),o!==void 0&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"h-6 w-px bg-gray-700"}),f.jsx(Ci,{label:"Cost",value:`$${o.toFixed(4)}`,accent:"text-amber-400"})]})]})}function Ci({label:n,value:l,accent:i,large:r}){return f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{className:"text-xs text-gray-500",children:n}),f.jsx("span",{className:`tabular-nums font-semibold ${r?"text-2xl":"text-lg"} ${i??"text-white"}`,children:l})]})}function Pj(n,l){const i=new Map;for(const r of n){const o=r.category??"Uncategorized",d=r.suite??"Uncategorized";i.has(o)||i.set(o,new Map);const h=i.get(o),g=h.get(d)??{passed:0,failed:0,total:0,scoreSum:0};g.total+=1,g.scoreSum+=r.score,Za(r.score,l)?g.passed+=1:g.failed+=1,h.set(d,g)}return Array.from(i.entries()).map(([r,o])=>{const d=Array.from(o.entries()).map(([x,v])=>({name:x,...v,avgScore:v.total>0?v.scoreSum/v.total:0})).sort((x,v)=>x.name.localeCompare(v.name)),h=d.reduce((x,v)=>x+v.total,0),g=d.reduce((x,v)=>x+v.passed,0),p=d.reduce((x,v)=>x+v.failed,0),m=d.reduce((x,v)=>x+v.avgScore*v.total,0);return{name:r,suites:d,total:h,passed:g,failed:p,avgScore:h>0?m/h:0}}).sort((r,o)=>r.name.localeCompare(o.name))}function rp({results:n,runId:l,benchmarkId:i}){const{data:r}=pt(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,d=n.length,h=n.filter(v=>Za(v.score,o)).length,g=d-h,p=d>0?h/d:0,m=n.reduce((v,S)=>v+(S.costUsd??0),0),x=Pj(n,o);return d===0?f.jsxs("div",{className:"space-y-6",children:[f.jsx(Au,{total:0,passed:0,failed:0,passRate:0}),f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This run has no results yet."})]})]}):f.jsxs("div",{className:"space-y-6",children:[f.jsx(Au,{total:d,passed:h,failed:g,passRate:p,totalCost:m>0?m:void 0}),f.jsxs("div",{children:[f.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Category Breakdown"}),f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Category"}),f.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Passed"}),f.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Failed"}),f.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Total"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:x.map(v=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-2.5 font-medium text-gray-200",children:v.name}),f.jsx("td",{className:"px-4 py-2.5",children:f.jsx(Hi,{rate:v.total>0?v.passed/v.total:0})}),f.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:v.passed}),f.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:v.failed>0?v.failed:f.jsx("span",{className:"text-gray-600",children:"0"})}),f.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-gray-400",children:v.total})]},v.name))})]})})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"All Evals"}),f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"w-8 px-4 py-3"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),f.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map((v,S)=>{const j=v.executionStatus==="execution_error",N=Za(v.score,o);return f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 text-center",children:j?f.jsx("span",{className:"text-base font-bold text-red-400",children:"!"}):f.jsx("span",{className:`text-base font-bold ${N?"text-emerald-400":"text-red-400"}`,children:N?"✓":"✗"})}),f.jsx("td",{className:"px-4 py-3",children:i?f.jsx(Me,{to:"/projects/$benchmarkId/evals/$runId/$evalId",params:{benchmarkId:i,runId:l,evalId:v.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:v.testId}):f.jsx(Me,{to:"/evals/$runId/$evalId",params:{runId:l,evalId:v.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:v.testId})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",children:v.target??"-"}),f.jsx("td",{className:"px-4 py-3",children:j?f.jsx("span",{className:"inline-flex rounded-full bg-red-900/50 px-2 py-0.5 text-xs font-medium text-red-400",children:"ERR"}):f.jsx(Hi,{rate:v.score})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:v.durationMs!=null?`${(v.durationMs/1e3).toFixed(1)}s`:"-"}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:v.costUsd!=null?`$${v.costUsd.toFixed(4)}`:"-"})]},`${v.testId}-${S}`)})})]})})]})]})}const up=pa("/runs/$runId")({component:Fj});function Fj(){var E;const{runId:n}=up.useParams(),{data:l,isLoading:i,error:r}=Zi(n),{data:o}=pt(),[d,h]=Q.useState(!1),g=(o==null?void 0:o.read_only)===!0;if(i)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(C=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},C))})]});if(r)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",r.message]});const p=(E=l==null?void 0:l.results)==null?void 0:E[0],m=p==null?void 0:p.target,x=p==null?void 0:p.experiment,v=p==null?void 0:p.timestamp,S=m?{target:m}:void 0,j=(()=>{const C=[x,m].filter(w=>w&&w!=="default");return C.length>0?C.join(" · "):n})(),N=[m,x&&x!=="default"?x:null,v?new Date(v).toLocaleString():null,l==null?void 0:l.source].filter(Boolean).join(" · ");return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:j}),f.jsx("p",{className:"mt-1 text-sm text-gray-500",children:N})]}),!g&&f.jsx("button",{type:"button",onClick:()=>h(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Re-run with Filters"})]}),f.jsx(rp,{results:(l==null?void 0:l.results)??[],runId:n}),!g&&f.jsx(bs,{open:d,onClose:()=>h(!1),prefill:S})]})}const Jy=[{id:"runs",label:"Recent Runs"},{id:"experiments",label:"Experiments"},{id:"compare",label:"Compare"},{id:"targets",label:"Targets"}],cp=pa("/projects/$benchmarkId")({component:Jj});function Jj(){const{benchmarkId:n}=cp.useParams(),r=Jg().location.search.tab,o=Du(),[d,h]=Q.useState(!1),{data:g}=pt(),p=(g==null?void 0:g.read_only)===!0,m=Jy.some(x=>x.id===r)?r:"experiments";return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:n}),!p&&f.jsx("button",{type:"button",onClick:()=>h(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),f.jsx("div",{className:"border-b border-gray-800",children:f.jsx("div",{className:"flex gap-1",children:Jy.map(x=>f.jsx("button",{type:"button",onClick:()=>o({to:"/projects/$benchmarkId",params:{benchmarkId:n},search:{tab:x.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${m===x.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:x.label},x.id))})}),m==="runs"&&f.jsx(Ij,{benchmarkId:n}),m==="experiments"&&f.jsx(Wj,{benchmarkId:n}),m==="compare"&&f.jsx(eN,{benchmarkId:n}),m==="targets"&&f.jsx(tN,{benchmarkId:n}),!p&&f.jsx(bs,{open:d,onClose:()=>h(!1),benchmarkId:n})]})}function Ij({benchmarkId:n}){const l=Un(),{data:i,isLoading:r,error:o}=ap(n),{data:d}=tp(n),[h,g]=Q.useState("all"),[p,m]=Q.useState(!1),x=h==="all"?(i==null?void 0:i.runs)??[]:((i==null?void 0:i.runs)??[]).filter(S=>S.source===h);async function v(){m(!0);try{await np(n),await Promise.all([l.invalidateQueries({queryKey:["benchmarks",n,"runs"]}),l.invalidateQueries({queryKey:["benchmarks",n,"experiments"]}),l.invalidateQueries({queryKey:["benchmarks",n,"compare"]}),l.invalidateQueries({queryKey:["benchmarks",n,"targets"]}),l.invalidateQueries({queryKey:["remote-status",n]})])}finally{m(!1)}}return r?f.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(S=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},S))}):o?f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",o.message]}):f.jsxs("div",{className:"space-y-4",children:[f.jsx(lp,{filter:h,onFilterChange:g,remoteStatus:d,syncInFlight:p,onSync:v}),f.jsx(ed,{runs:x,benchmarkId:n})]})}function Wj({benchmarkId:n}){const{data:l,isLoading:i}=Ve(sj(n)),r=(l==null?void 0:l.experiments)??[];return i?f.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(o=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},o))}):r.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No experiments found"})}):f.jsx("div",{className:"space-y-2",children:r.map(o=>f.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-white",children:o.name}),f.jsxs("p",{className:"text-sm text-gray-400",children:[o.run_count," run",o.run_count!==1?"s":""]})]}),f.jsxs("span",{className:"text-lg font-semibold tabular-nums text-cyan-400",children:[Math.round(o.pass_rate*100),"%"]})]},o.name))})}function eN({benchmarkId:n}){const{data:l,isLoading:i,isError:r,error:o}=Ve(lj(n));return f.jsx(sp,{data:l,isLoading:i,isError:r,error:o})}function tN({benchmarkId:n}){const{data:l,isLoading:i}=Ve(ij(n)),r=(l==null?void 0:l.targets)??[];return i?f.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(o=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},o))}):r.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"})}):f.jsx("div",{className:"space-y-2",children:r.map(o=>f.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-white",children:o.name}),f.jsxs("p",{className:"text-sm text-gray-400",children:[o.run_count," run",o.run_count!==1?"s":""," · ",o.experiment_count," ","experiment",o.experiment_count!==1?"s":""]})]}),f.jsxs("span",{className:"text-lg font-semibold tabular-nums text-cyan-400",children:[Math.round(o.pass_rate*100),"%"]})]},o.name))})}const op=pa("/experiments/$experimentName")({component:aN});function aN(){var v;const{experimentName:n}=op.useParams(),{data:l,isLoading:i}=Jf(),{data:r,isLoading:o}=Ff();if(i||o)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-4 gap-4",children:["s1","s2","s3","s4"].map(S=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},S))})]});const h=(v=l==null?void 0:l.experiments)==null?void 0:v.find(S=>S.name===n),g=(r==null?void 0:r.runs)??[],p=(h==null?void 0:h.pass_rate)??0,m=(h==null?void 0:h.run_count)??0,x=(h==null?void 0:h.target_count)??0;return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:n}),f.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[m," run",m!==1?"s":""," · ",x," target",x!==1?"s":"",(h==null?void 0:h.last_run)&&f.jsxs("span",{className:"ml-2",children:["· Last run: ",Iy(h.last_run)]})]})]}),h&&f.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[f.jsx(gu,{label:"Runs",value:String(m)}),f.jsx(gu,{label:"Targets",value:String(x)}),f.jsx(gu,{label:"Pass Rate",value:`${Math.round(p*100)}%`,accent:"text-cyan-400"}),f.jsx(gu,{label:"Last Run",value:Iy(h.last_run)})]}),f.jsxs("div",{children:[f.jsx("h2",{className:"mb-4 text-lg font-medium text-gray-200",children:"All Runs"}),f.jsx(ed,{runs:g})]})]})}function gu({label:n,value:l,accent:i}){return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[f.jsx("p",{className:"text-sm text-gray-400",children:n}),f.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${i??"text-white"}`,children:l})]})}function Iy(n){if(!n)return"N/A";try{const l=new Date(n);return Number.isNaN(l.getTime())?"N/A":l.toLocaleString()}catch{return"N/A"}}async function nN(n,l){const i=await fetch("/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reviews:[{test_id:n,comment:l}]})});if(!i.ok)throw new Error(`Failed to save feedback: ${i.status}`);return i.json()}function sN({testId:n}){var x;const{data:l}=V1(),i=Un(),r=(x=l==null?void 0:l.reviews)==null?void 0:x.find(v=>v.test_id===n),[o,d]=Q.useState((r==null?void 0:r.comment)??""),[h,g]=Q.useState(!1);Q.useEffect(()=>{d((r==null?void 0:r.comment)??""),g(!1)},[r==null?void 0:r.comment]);const p=zb({mutationFn:()=>nN(n,o),onSuccess:()=>{i.invalidateQueries({queryKey:["feedback"]}),g(!0),setTimeout(()=>g(!1),2e3)}}),m=Q.useCallback(()=>{p.mutate()},[p]);return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[f.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-400",children:"Feedback"}),f.jsx("textarea",{value:o,onChange:v=>{d(v.target.value),g(!1)},placeholder:"Add feedback for this test...",className:"w-full rounded-md border border-gray-700 bg-gray-800 p-3 text-sm text-gray-200 placeholder-gray-500 focus:border-cyan-400 focus:outline-none",rows:3}),f.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[f.jsx("button",{type:"button",onClick:m,disabled:p.isPending,className:"rounded-md bg-cyan-600 px-4 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:p.isPending?"Saving...":"Save Feedback"}),h&&f.jsx("span",{className:"text-sm text-emerald-400",children:"Saved"}),p.isError&&f.jsx("span",{className:"text-sm text-red-400",children:"Error saving feedback"})]})]})}function lN(n){var i;switch((i=n.split(".").pop())==null?void 0:i.toLowerCase()){case"ts":case"tsx":return"📘";case"json":return"📋";case"log":case"txt":return"📜";case"md":return"📝";default:return"📄"}}function fp(n){const l=[];for(const i of n)i.type==="dir"&&(l.push(i.path),i.children&&l.push(...fp(i.children)));return l}function dp({node:n,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:o,depth:d=0}){const h=n.type==="dir",g=r.has(n.path),p=l===n.path;return f.jsxs("div",{children:[f.jsxs("button",{type:"button",onClick:()=>{h?o(n.path):i(n.path)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors ${p?"bg-cyan-400/20 text-cyan-400":"text-gray-300 hover:bg-gray-800/50 hover:text-gray-200"}`,style:{paddingLeft:`${d*16+8}px`},children:[f.jsx("span",{className:"flex-shrink-0 text-xs",children:h?g?"📂":"📁":lN(n.name)}),f.jsx("span",{className:"truncate",children:n.name})]}),h&&g&&n.children&&f.jsx("div",{children:n.children.map(m=>f.jsx(dp,{node:m,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:o,depth:d+1},m.path))})]})}function iN({files:n,selectedPath:l,onSelect:i}){const[r,o]=Q.useState(()=>new Set(fp(n))),d=h=>{o(g=>{const p=new Set(g);return p.has(h)?p.delete(h):p.add(h),p})};return f.jsxs("div",{className:"w-64 overflow-y-auto rounded-lg border border-gray-800 bg-gray-900 py-2",children:[n.length===0&&f.jsx("p",{className:"px-4 py-2 text-sm text-gray-500",children:"No files."}),n.map(h=>f.jsx(dp,{node:h,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:d},h.path))]})}const rN="modulepreload",uN=function(n){return"/"+n},Wy={},cN=function(l,i,r){let o=Promise.resolve();if(i&&i.length>0){let h=function(m){return Promise.all(m.map(x=>Promise.resolve(x).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const g=document.querySelector("meta[property=csp-nonce]"),p=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));o=h(i.map(m=>{if(m=uN(m),m in Wy)return;Wy[m]=!0;const x=m.endsWith(".css"),v=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${v}`))return;const S=document.createElement("link");if(S.rel=x?"stylesheet":rN,x||(S.as="script"),S.crossOrigin="",S.href=m,p&&S.setAttribute("nonce",p),document.head.appendChild(S),x)return new Promise((j,N)=>{S.addEventListener("load",j),S.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${m}`)))})}))}function d(h){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=h,window.dispatchEvent(g),!g.defaultPrevented)throw h}return o.then(h=>{for(const g of h||[])g.status==="rejected"&&d(g.reason);return l().catch(d)})},oN=Q.lazy(()=>cN(()=>import("./index-CkXzhDmw.js"),[]));function fN({value:n,language:l="json",height:i="400px"}){return f.jsx(Q.Suspense,{fallback:f.jsx("div",{className:"flex items-center justify-center rounded-lg bg-gray-900 p-8 text-gray-500",children:"Loading editor..."}),children:f.jsx(oN,{height:i,language:l,value:n,theme:"vs-dark",options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbers:"on",wordWrap:"on",padding:{top:12}}})})}function hp(n){for(const l of n){if(l.type==="file")return l.path;if(l.children){const i=hp(l.children);if(i)return i}}return null}function mp({eval:n,runId:l,benchmarkId:i}){const[r,o]=Q.useState("checks"),{data:d}=pt(),h=(d==null?void 0:d.read_only)===!0,g=[{id:"checks",label:"Checks"},{id:"files",label:"Files"},...h?[]:[{id:"feedback",label:"Feedback"}]];return f.jsxs("div",{className:"flex min-h-full flex-col",children:[f.jsx("div",{className:"flex items-start justify-between border-b border-gray-800 px-4 py-3",children:f.jsxs("div",{children:[f.jsx("h3",{className:"text-lg font-medium",children:n.testId}),f.jsxs("p",{className:"mt-0.5 text-sm text-gray-400",children:[n.target&&f.jsxs("span",{children:["Target: ",n.target]}),n.durationMs!=null&&f.jsxs("span",{className:"ml-4",children:[(n.durationMs/1e3).toFixed(1),"s"]}),n.costUsd!=null&&f.jsxs("span",{className:"ml-4",children:["$",n.costUsd.toFixed(4)]})]})]})}),f.jsx("div",{className:"border-b border-gray-800",children:f.jsx("div",{className:"flex gap-1 px-4",children:g.map(p=>f.jsx("button",{type:"button",onClick:()=>o(p.id),className:`px-4 py-2 text-sm font-medium transition-colors ${r===p.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:p.label},p.id))})}),f.jsxs("div",{className:"min-h-0 flex-1",children:[r==="checks"&&f.jsx("div",{className:"overflow-auto p-4",children:f.jsx(hN,{result:n})}),r==="files"&&f.jsx("div",{className:"h-full p-4",children:f.jsx(mN,{result:n,runId:l,benchmarkId:i})}),!h&&r==="feedback"&&f.jsx("div",{className:"p-4",children:f.jsx(sN,{testId:n.testId})})]})]})}function dN({label:n}){return f.jsx("span",{className:"inline-flex items-center rounded-full border border-gray-700 bg-gray-800 px-2 py-0.5 text-xs font-medium text-gray-400",children:n})}function eg({assertion:n,graderLabel:l}){return f.jsxs("div",{className:`flex items-start gap-3 rounded-lg border p-3 ${n.passed?"border-emerald-900/50 bg-emerald-950/20":"border-red-900/50 bg-red-950/20"}`,children:[f.jsx("span",{className:`mt-0.5 text-lg ${n.passed?"text-emerald-400":"text-red-400"}`,children:n.passed?"✓":"✗"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsxs("p",{className:"text-sm text-gray-200",children:[n.text,n.durationMs!=null&&f.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",(n.durationMs/1e3).toFixed(1),"s)"]})]}),l&&f.jsx(dN,{label:l})]}),n.evidence&&f.jsx("p",{className:"mt-1 text-xs text-gray-400",children:n.evidence})]})]})}function hN({result:n}){const{data:l}=pt(),i=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8,r=!Za(n.score,i)||n.executionStatus==="error"||n.executionStatus==="failed",o=(n.scores??[]).filter(m=>Array.isArray(m.assertions)&&m.assertions.length>0),d=o.length>0,h=n.assertions??[],g=[];n.error&&g.push(n.error),(n.executionStatus==="error"||n.executionStatus==="failed")&&g.push(`Execution status: ${n.executionStatus}`);const p=d?o.flatMap(m=>m.assertions):h;for(const m of p.filter(x=>!x.passed)){const x=m.evidence?`${m.text}: ${m.evidence}`:m.text;g.push(x)}if(n.scores){for(const m of n.scores)if(!Za(m.score,i)&&m.details){const x=typeof m.details=="string"?m.details:JSON.stringify(m.details,null,2);g.push(`[${m.name??m.type??"evaluator"}] ${x}`)}}return f.jsxs("div",{className:"space-y-6",children:[f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("span",{className:"text-sm font-medium text-gray-400",children:"Overall score"}),f.jsx("div",{className:"flex-1",children:f.jsx(Cu,{score:n.score})})]})}),n.scores&&n.scores.length>0&&f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[f.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-400",children:"Evaluator Scores"}),f.jsx("div",{className:"space-y-3",children:n.scores.map((m,x)=>f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:m.name??m.type??`Score ${x+1}`}),f.jsx("div",{className:"flex-1",children:f.jsx(Cu,{score:m.score})})]},`${m.name??m.type??x}`))})]}),d?f.jsx("div",{className:"space-y-6",children:o.map((m,x)=>{const v=m.name??m.type??`Evaluator ${x+1}`;return f.jsxs("div",{className:"space-y-2",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-500",children:v}),m.assertions.map((S,j)=>f.jsx(eg,{assertion:S,graderLabel:m.type??void 0},`${S.text}-${j}`))]},`${m.name??m.type??x}`)})}):h.length>0?f.jsx("div",{className:"space-y-2",children:h.map((m,x)=>f.jsx(eg,{assertion:m},`${m.text}-${x}`))}):f.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded."}),r&&g.length>0&&f.jsxs("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-4",children:[f.jsx("h4",{className:"mb-2 text-sm font-medium text-red-400",children:"Failure Reason"}),f.jsx("div",{className:"space-y-2",children:g.map(m=>f.jsx("p",{className:"text-sm text-gray-300",children:m},m))})]})]})}function mN({result:n,runId:l,benchmarkId:i}){const r=n.testId,{data:o}=i?Ve(aj(i,l,r)):k1(l,r),d=(o==null?void 0:o.files)??[],[h,g]=Q.useState(null),p=h??(d.length>0?hp(d):null),{data:m,isLoading:x}=i?Ve(nj(i,l,r,p??"")):$1(l,r,p??"");if(d.length===0)return f.jsx("p",{className:"text-sm text-gray-500",children:"No artifact files available."});const v=p?x?"Loading...":(m==null?void 0:m.content)??"":"",S=p?(m==null?void 0:m.language)??"plaintext":"plaintext";return f.jsxs("div",{className:"flex h-full min-h-[400px] gap-4",children:[f.jsx(iN,{files:d,selectedPath:p,onSelect:g}),f.jsx("div",{className:"flex-1",children:f.jsx(fN,{value:v,language:S,height:"100%"})})]})}const yp=pa("/evals/$runId/$evalId")({component:yN});function yN(){const{runId:n,evalId:l}=yp.useParams(),{data:i,isLoading:r,error:o}=Zi(n),{data:d}=pt(),[h,g]=Q.useState(!1),p=(d==null?void 0:d.read_only)===!0;if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",o.message]});const m=i==null?void 0:i.results.find(x=>x.testId===l);return m?f.jsxs("div",{className:"flex h-full flex-col gap-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",n," / Eval: ",l]}),f.jsx("h1",{className:"text-2xl font-semibold text-white",children:l})]}),!p&&f.jsx("button",{type:"button",onClick:()=>g(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),f.jsx(mp,{eval:m,runId:n}),!p&&f.jsx(bs,{open:h,onClose:()=>g(!1),prefill:{testIds:[l],target:m.target}})]}):f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:f.jsxs("p",{className:"text-gray-400",children:["Eval ",f.jsx("code",{className:"text-cyan-400",children:l})," not found in run"," ",f.jsx("code",{className:"text-cyan-400",children:n}),"."]})})}const gp=pa("/runs/$runId_/suite/$suite")({component:gN});function gN(){const{runId:n,suite:l}=gp.useParams(),{data:i,isLoading:r,error:o}=Zi(n),{data:d}=pt(),h=(d==null?void 0:d.threshold)??(d==null?void 0:d.pass_threshold)??.8;if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(j=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},j))})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",o.message]});const g=((i==null?void 0:i.results)??[]).filter(j=>(j.suite??"Uncategorized")===l),p=g.length,m=g.filter(j=>Za(j.score,h)).length,x=p-m,v=p>0?m/p:0,S=g.reduce((j,N)=>j+(N.costUsd??0),0);return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:l}),f.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",n]})]}),f.jsx(Au,{total:p,passed:m,failed:x,passRate:v,totalCost:S>0?S:void 0}),p===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),f.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:g.map((j,N)=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3",children:f.jsx(Me,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:j.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:j.testId})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",children:j.target??"-"}),f.jsx("td",{className:"px-4 py-3",children:j.executionStatus==="execution_error"?f.jsx("span",{className:"inline-flex rounded-full px-2 py-0.5 text-xs font-medium bg-red-900/50 text-red-400",children:"ERR"}):f.jsx(Hi,{rate:j.score})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:j.durationMs!=null?`${(j.durationMs/1e3).toFixed(1)}s`:"-"}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:j.costUsd!=null?`$${j.costUsd.toFixed(4)}`:"-"})]},`${j.testId}-${N}`))})]})})]})}const pp=pa("/runs/$runId_/category/$category")({component:pN});function pN(){const{runId:n,category:l}=pp.useParams(),{data:i,isLoading:r,error:o}=ep(n,l);if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(x=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},x))})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",o.message]});const d=(i==null?void 0:i.suites)??[],h=d.reduce((x,v)=>x+v.total,0),g=d.reduce((x,v)=>x+v.passed,0),p=h-g,m=h>0?g/h:0;return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:l}),f.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",n]})]}),f.jsx(Au,{total:h,passed:g,failed:p,passRate:m}),d.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):f.jsxs("div",{className:"space-y-3",children:[f.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),f.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:d.map(x=>f.jsxs(Me,{to:"/runs/$runId/suite/$suite",params:{runId:n,suite:x.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:x.name}),f.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[x.passed,"/",x.total]})]}),f.jsx("div",{className:"mt-2",children:f.jsx(Cu,{score:x.avg_score})}),f.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[f.jsxs("span",{className:"text-emerald-400",children:[x.passed," passed"]}),x.failed>0&&f.jsxs("span",{className:"text-red-400",children:[x.failed," failed"]})]})]},x.name))})]})]})}const vp=pa("/projects/$benchmarkId_/runs/$runId")({component:vN});function vN(){var C;const{benchmarkId:n,runId:l}=vp.useParams(),{data:i,isLoading:r,error:o}=Wf(n,l),{data:d}=pt(),[h,g]=Q.useState(!1),p=(d==null?void 0:d.read_only)===!0;if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(w=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},w))})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",o.message]});const m=(C=i==null?void 0:i.results)==null?void 0:C[0],x=m==null?void 0:m.target,v=m==null?void 0:m.experiment,S=m==null?void 0:m.timestamp,j=x?{target:x}:void 0,N=(()=>{const w=[v,x].filter($=>$&&$!=="default");return w.length>0?w.join(" · "):l})(),E=[x,v&&v!=="default"?v:null,S?new Date(S).toLocaleString():null,i==null?void 0:i.source].filter(Boolean).join(" · ");return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:N}),f.jsx("p",{className:"mt-1 text-sm text-gray-500",children:E})]}),!p&&f.jsx("button",{type:"button",onClick:()=>g(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Re-run with Filters"})]}),f.jsx(rp,{results:(i==null?void 0:i.results)??[],runId:l,benchmarkId:n}),!p&&f.jsx(bs,{open:h,onClose:()=>g(!1),benchmarkId:n,prefill:j})]})}const xp=pa("/projects/$benchmarkId_/evals/$runId/$evalId")({component:xN});function xN(){const{benchmarkId:n,runId:l,evalId:i}=xp.useParams(),{data:r,isLoading:o,error:d}=Wf(n,l),{data:h}=pt(),[g,p]=Q.useState(!1),m=(h==null?void 0:h.read_only)===!0;if(o)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(d)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",d.message]});const x=r==null?void 0:r.results.find(v=>v.testId===i);return x?f.jsxs("div",{className:"flex h-full flex-col gap-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",l," / Eval: ",i]}),f.jsx("h1",{className:"text-2xl font-semibold text-white",children:i})]}),!m&&f.jsx("button",{type:"button",onClick:()=>p(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),f.jsx(mp,{eval:x,runId:l,benchmarkId:n}),!m&&f.jsx(bs,{open:g,onClose:()=>p(!1),benchmarkId:n,prefill:{testIds:[i],target:x.target}})]}):f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:f.jsxs("p",{className:"text-gray-400",children:["Eval ",f.jsx("code",{className:"text-cyan-400",children:i})," not found in run"," ",f.jsx("code",{className:"text-cyan-400",children:l}),"."]})})}const bN=_j.update({id:"/settings",path:"/settings",getParentRoute:()=>ia}),SN=Kj.update({id:"/",path:"/",getParentRoute:()=>ia}),jN=up.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>ia}),NN=cp.update({id:"/projects/$benchmarkId",path:"/projects/$benchmarkId",getParentRoute:()=>ia}),RN=op.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>ia}),_N=yp.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>ia}),EN=gp.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>ia}),TN=pp.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>ia}),MN=vp.update({id:"/projects/$benchmarkId_/runs/$runId",path:"/projects/$benchmarkId/runs/$runId",getParentRoute:()=>ia}),CN=xp.update({id:"/projects/$benchmarkId_/evals/$runId/$evalId",path:"/projects/$benchmarkId/evals/$runId/$evalId",getParentRoute:()=>ia}),AN={IndexRoute:SN,SettingsRoute:bN,ExperimentsExperimentNameRoute:RN,ProjectsBenchmarkIdRoute:NN,RunsRunIdRoute:jN,EvalsRunIdEvalIdRoute:_N,ProjectsBenchmarkIdRunsRunIdRoute:MN,RunsRunIdCategoryCategoryRoute:TN,RunsRunIdSuiteSuiteRoute:EN,ProjectsBenchmarkIdEvalsRunIdEvalIdRoute:CN},wN=ia._addFileChildren(AN)._addFileTypes(),ON=new bb({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),zN=_1({routeTree:wN}),bp=document.getElementById("root");if(!bp)throw new Error("Root element not found");Px.createRoot(bp).render(f.jsx(Q.StrictMode,{children:f.jsx(Sb,{client:ON,children:f.jsx(M1,{router:zN})})}));export{Oi as W,Q as r};
|