agentv 4.42.4 → 4.43.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{artifact-writer-7PXSB6LM.js → artifact-writer-STR7E5UO.js} +4 -4
- package/dist/{chunk-RBOP5X36.js → chunk-5NDSGGMJ.js} +2605 -171
- package/dist/chunk-5NDSGGMJ.js.map +1 -0
- package/dist/{chunk-6SQDBXT7.js → chunk-E2NL57MZ.js} +2 -2
- package/dist/chunk-E2NL57MZ.js.map +1 -0
- package/dist/{chunk-ISPJY2AX.js → chunk-IFQXBQSY.js} +2454 -415
- package/dist/chunk-IFQXBQSY.js.map +1 -0
- package/dist/{chunk-ZPFM52HV.js → chunk-RFJM2UBD.js} +2321 -630
- package/dist/chunk-RFJM2UBD.js.map +1 -0
- package/dist/{chunk-N6U3GXMF.js → chunk-ROLNQBYU.js} +620 -342
- package/dist/chunk-ROLNQBYU.js.map +1 -0
- package/dist/cli.js +5 -5
- package/dist/dashboard/assets/index-1Hvy8sBy.js +119 -0
- package/dist/dashboard/assets/{index-uXJsSG83.js → index-DitffAxS.js} +1 -1
- package/dist/dashboard/assets/index-J5sPcQO3.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/{dist-VQWTETNY.js → dist-FTTL5IOY.js} +67 -3
- package/dist/index.js +9 -5
- package/dist/{interactive-TNRJEFA2.js → interactive-RE4DXH4A.js} +5 -5
- package/dist/skills/agentv-bench/SKILL.md +2 -2
- package/dist/skills/agentv-bench/agents/executor.md +1 -1
- package/dist/skills/agentv-bench/agents/grader.md +1 -1
- package/dist/skills/agentv-bench/references/autoresearch.md +4 -4
- package/dist/skills/agentv-bench/references/eval-yaml-spec.md +2 -1
- package/dist/skills/agentv-bench/references/schemas.md +1 -1
- package/dist/skills/agentv-bench/references/subagent-pipeline.md +4 -4
- package/dist/skills/agentv-eval-writer/SKILL.md +23 -16
- package/dist/skills/agentv-eval-writer/references/config-schema.json +114 -0
- package/dist/skills/agentv-eval-writer/references/eval-schema.json +192 -0
- package/dist/{ts-eval-loader-PYEU2PMP-YLXIQTEQ.js → ts-eval-loader-HQDMXQQV-LBW3N3W6.js} +2 -2
- package/package.json +6 -5
- package/dist/chunk-6SQDBXT7.js.map +0 -1
- package/dist/chunk-ISPJY2AX.js.map +0 -1
- package/dist/chunk-N6U3GXMF.js.map +0 -1
- package/dist/chunk-RBOP5X36.js.map +0 -1
- package/dist/chunk-ZPFM52HV.js.map +0 -1
- package/dist/dashboard/assets/index-BwBJwHp4.js +0 -118
- package/dist/dashboard/assets/index-C5v6_zhR.css +0 -1
- /package/dist/{artifact-writer-7PXSB6LM.js.map → artifact-writer-STR7E5UO.js.map} +0 -0
- /package/dist/{dist-VQWTETNY.js.map → dist-FTTL5IOY.js.map} +0 -0
- /package/dist/{interactive-TNRJEFA2.js.map → interactive-RE4DXH4A.js.map} +0 -0
- /package/dist/{ts-eval-loader-PYEU2PMP-YLXIQTEQ.js.map → ts-eval-loader-HQDMXQQV-LBW3N3W6.js.map} +0 -0
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
var a$=Object.defineProperty;var UO=e=>{throw TypeError(e)};var i$=(e,t,r)=>t in e?a$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var eg=(e,t,r)=>i$(e,typeof t!="symbol"?t+"":t,r),tg=(e,t,r)=>t.has(e)||UO("Cannot "+r);var B=(e,t,r)=>(tg(e,t,"read from private field"),r?r.call(e):t.get(e)),xe=(e,t,r)=>t.has(e)?UO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),fe=(e,t,r,n)=>(tg(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ce=(e,t,r)=>(tg(e,t,"access private method"),r);var Xf=(e,t,r,n)=>({set _(i){fe(e,t,i,r)},get _(){return B(e,t,n)}});function s$(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(n,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(i){if(i.ep)return;i.ep=!0;const l=r(i);fetch(i.href,l)}})();function as(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rg={exports:{}},sc={};/**
|
|
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 qO;function l$(){if(qO)return sc;qO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,i,l){var o=null;if(l!==void 0&&(o=""+l),i.key!==void 0&&(o=""+i.key),"key"in i){l={};for(var c in i)c!=="key"&&(l[c]=i[c])}else l=i;return i=l.ref,{$$typeof:e,type:n,key:o,ref:i!==void 0?i:null,props:l}}return sc.Fragment=t,sc.jsx=r,sc.jsxs=r,sc}var HO;function o$(){return HO||(HO=1,rg.exports=l$()),rg.exports}var d=o$(),ng={exports:{}},_e={};/**
|
|
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 FO;function u$(){if(FO)return _e;FO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=v&&L[v]||L["@@iterator"],typeof L=="function"?L:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function O(L,X,le){this.props=L,this.context=X,this.refs=N,this.updater=le||b}O.prototype.isReactComponent={},O.prototype.setState=function(L,X){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,X,"setState")},O.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function C(){}C.prototype=O.prototype;function E(L,X,le){this.props=L,this.context=X,this.refs=N,this.updater=le||b}var A=E.prototype=new C;A.constructor=E,w(A,O.prototype),A.isPureReactComponent=!0;var T=Array.isArray;function M(){}var R={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function I(L,X,le){var oe=le.ref;return{$$typeof:e,type:L,key:X,ref:oe!==void 0?oe:null,props:le}}function k(L,X){return I(L.type,X,L.props)}function H(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function q(L){var X={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(le){return X[le]})}var ie=/\/+/g;function re(L,X){return typeof L=="object"&&L!==null&&L.key!=null?q(""+L.key):X.toString(36)}function W(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(M,M):(L.status="pending",L.then(function(X){L.status==="pending"&&(L.status="fulfilled",L.value=X)},function(X){L.status==="pending"&&(L.status="rejected",L.reason=X)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function $(L,X,le,oe,he){var je=typeof L;(je==="undefined"||je==="boolean")&&(L=null);var Ne=!1;if(L===null)Ne=!0;else switch(je){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(L.$$typeof){case e:case t:Ne=!0;break;case p:return Ne=L._init,$(Ne(L._payload),X,le,oe,he)}}if(Ne)return he=he(L),Ne=oe===""?"."+re(L,0):oe,T(he)?(le="",Ne!=null&&(le=Ne.replace(ie,"$&/")+"/"),$(he,X,le,"",function(ee){return ee})):he!=null&&(H(he)&&(he=k(he,le+(he.key==null||L&&L.key===he.key?"":(""+he.key).replace(ie,"$&/")+"/")+Ne)),X.push(he)),1;Ne=0;var Pe=oe===""?".":oe+":";if(T(L))for(var de=0;de<L.length;de++)oe=L[de],je=Pe+re(oe,de),Ne+=$(oe,X,le,je,he);else if(de=x(L),typeof de=="function")for(L=de.call(L),de=0;!(oe=L.next()).done;)oe=oe.value,je=Pe+re(oe,de++),Ne+=$(oe,X,le,je,he);else if(je==="object"){if(typeof L.then=="function")return $(W(L),X,le,oe,he);throw X=String(L),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function F(L,X,le){if(L==null)return L;var oe=[],he=0;return $(L,oe,"","",function(je){return X.call(le,je,he++)}),oe}function J(L){if(L._status===-1){var X=L._result;X=X(),X.then(function(le){(L._status===0||L._status===-1)&&(L._status=1,L._result=le)},function(le){(L._status===0||L._status===-1)&&(L._status=2,L._result=le)}),L._status===-1&&(L._status=0,L._result=X)}if(L._status===1)return L._result.default;throw L._result}var ne=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},ce={map:F,forEach:function(L,X,le){F(L,function(){X.apply(this,arguments)},le)},count:function(L){var X=0;return F(L,function(){X++}),X},toArray:function(L){return F(L,function(X){return X})||[]},only:function(L){if(!H(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return _e.Activity=y,_e.Children=ce,_e.Component=O,_e.Fragment=r,_e.Profiler=i,_e.PureComponent=E,_e.StrictMode=n,_e.Suspense=f,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,_e.__COMPILER_RUNTIME={__proto__:null,c:function(L){return R.H.useMemoCache(L)}},_e.cache=function(L){return function(){return L.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(L,X,le){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var oe=w({},L.props),he=L.key;if(X!=null)for(je in X.key!==void 0&&(he=""+X.key),X)!D.call(X,je)||je==="key"||je==="__self"||je==="__source"||je==="ref"&&X.ref===void 0||(oe[je]=X[je]);var je=arguments.length-2;if(je===1)oe.children=le;else if(1<je){for(var Ne=Array(je),Pe=0;Pe<je;Pe++)Ne[Pe]=arguments[Pe+2];oe.children=Ne}return I(L.type,he,oe)},_e.createContext=function(L){return L={$$typeof:o,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:l,_context:L},L},_e.createElement=function(L,X,le){var oe,he={},je=null;if(X!=null)for(oe in X.key!==void 0&&(je=""+X.key),X)D.call(X,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(he[oe]=X[oe]);var Ne=arguments.length-2;if(Ne===1)he.children=le;else if(1<Ne){for(var Pe=Array(Ne),de=0;de<Ne;de++)Pe[de]=arguments[de+2];he.children=Pe}if(L&&L.defaultProps)for(oe in Ne=L.defaultProps,Ne)he[oe]===void 0&&(he[oe]=Ne[oe]);return I(L,je,he)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(L){return{$$typeof:c,render:L}},_e.isValidElement=H,_e.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:J}},_e.memo=function(L,X){return{$$typeof:h,type:L,compare:X===void 0?null:X}},_e.startTransition=function(L){var X=R.T,le={};R.T=le;try{var oe=L(),he=R.S;he!==null&&he(le,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(M,ne)}catch(je){ne(je)}finally{X!==null&&le.types!==null&&(X.types=le.types),R.T=X}},_e.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},_e.use=function(L){return R.H.use(L)},_e.useActionState=function(L,X,le){return R.H.useActionState(L,X,le)},_e.useCallback=function(L,X){return R.H.useCallback(L,X)},_e.useContext=function(L){return R.H.useContext(L)},_e.useDebugValue=function(){},_e.useDeferredValue=function(L,X){return R.H.useDeferredValue(L,X)},_e.useEffect=function(L,X){return R.H.useEffect(L,X)},_e.useEffectEvent=function(L){return R.H.useEffectEvent(L)},_e.useId=function(){return R.H.useId()},_e.useImperativeHandle=function(L,X,le){return R.H.useImperativeHandle(L,X,le)},_e.useInsertionEffect=function(L,X){return R.H.useInsertionEffect(L,X)},_e.useLayoutEffect=function(L,X){return R.H.useLayoutEffect(L,X)},_e.useMemo=function(L,X){return R.H.useMemo(L,X)},_e.useOptimistic=function(L,X){return R.H.useOptimistic(L,X)},_e.useReducer=function(L,X,le){return R.H.useReducer(L,X,le)},_e.useRef=function(L){return R.H.useRef(L)},_e.useState=function(L){return R.H.useState(L)},_e.useSyncExternalStore=function(L,X,le){return R.H.useSyncExternalStore(L,X,le)},_e.useTransition=function(){return R.H.useTransition()},_e.version="19.2.4",_e}var KO;function ru(){return KO||(KO=1,ng.exports=u$()),ng.exports}var S=ru();const Bo=as(S),c$=s$({__proto__:null,default:Bo},[S]);var ag={exports:{}},lc={},ig={exports:{}},sg={};/**
|
|
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 GO;function d$(){return GO||(GO=1,(function(e){function t($,F){var J=$.length;$.push(F);e:for(;0<J;){var ne=J-1>>>1,ce=$[ne];if(0<i(ce,F))$[ne]=F,$[J]=ce,J=ne;else break e}}function r($){return $.length===0?null:$[0]}function n($){if($.length===0)return null;var F=$[0],J=$.pop();if(J!==F){$[0]=J;e:for(var ne=0,ce=$.length,L=ce>>>1;ne<L;){var X=2*(ne+1)-1,le=$[X],oe=X+1,he=$[oe];if(0>i(le,J))oe<ce&&0>i(he,le)?($[ne]=he,$[oe]=J,ne=oe):($[ne]=le,$[X]=J,ne=X);else if(oe<ce&&0>i(he,J))$[ne]=he,$[oe]=J,ne=oe;else break e}}return F}function i($,F){var J=$.sortIndex-F.sortIndex;return J!==0?J:$.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,c=o.now();e.unstable_now=function(){return o.now()-c}}var f=[],h=[],p=1,y=null,v=3,x=!1,b=!1,w=!1,N=!1,O=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function A($){for(var F=r(h);F!==null;){if(F.callback===null)n(h);else if(F.startTime<=$)n(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=r(h)}}function T($){if(w=!1,A($),!b)if(r(f)!==null)b=!0,M||(M=!0,q());else{var F=r(h);F!==null&&W(T,F.startTime-$)}}var M=!1,R=-1,D=5,I=-1;function k(){return N?!0:!(e.unstable_now()-I<D)}function H(){if(N=!1,M){var $=e.unstable_now();I=$;var F=!0;try{e:{b=!1,w&&(w=!1,C(R),R=-1),x=!0;var J=v;try{t:{for(A($),y=r(f);y!==null&&!(y.expirationTime>$&&k());){var ne=y.callback;if(typeof ne=="function"){y.callback=null,v=y.priorityLevel;var ce=ne(y.expirationTime<=$);if($=e.unstable_now(),typeof ce=="function"){y.callback=ce,A($),F=!0;break t}y===r(f)&&n(f),A($)}else n(f);y=r(f)}if(y!==null)F=!0;else{var L=r(h);L!==null&&W(T,L.startTime-$),F=!1}}break e}finally{y=null,v=J,x=!1}F=void 0}}finally{F?q():M=!1}}}var q;if(typeof E=="function")q=function(){E(H)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,re=ie.port2;ie.port1.onmessage=H,q=function(){re.postMessage(null)}}else q=function(){O(H,0)};function W($,F){R=O(function(){$(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function($){switch(v){case 1:case 2:case 3:var F=3;break;default:F=v}var J=v;v=F;try{return $()}finally{v=J}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function($,F){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var J=v;v=$;try{return F()}finally{v=J}},e.unstable_scheduleCallback=function($,F,J){var ne=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?ne+J:ne):J=ne,$){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=J+ce,$={id:p++,callback:F,priorityLevel:$,startTime:J,expirationTime:ce,sortIndex:-1},J>ne?($.sortIndex=J,t(h,$),r(f)===null&&$===r(h)&&(w?(C(R),R=-1):w=!0,W(T,J-ne))):($.sortIndex=ce,t(f,$),b||x||(b=!0,M||(M=!0,q()))),$},e.unstable_shouldYield=k,e.unstable_wrapCallback=function($){var F=v;return function(){var J=v;v=F;try{return $.apply(this,arguments)}finally{v=J}}}})(sg)),sg}var YO;function f$(){return YO||(YO=1,ig.exports=d$()),ig.exports}var lg={exports:{}},dr={};/**
|
|
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 VO;function h$(){if(VO)return dr;VO=1;var e=ru();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function l(f,h,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:f,containerInfo:h,implementation:p}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return dr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,dr.createPortal=function(f,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,p)},dr.flushSync=function(f){var h=o.T,p=n.p;try{if(o.T=null,n.p=2,f)return f()}finally{o.T=h,n.p=p,n.d.f()}},dr.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,n.d.C(f,h))},dr.prefetchDNS=function(f){typeof f=="string"&&n.d.D(f)},dr.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,y=c(p,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?n.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:x}):p==="script"&&n.d.X(f,{crossOrigin:y,integrity:v,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},dr.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=c(h.as,h.crossOrigin);n.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&n.d.M(f)},dr.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,y=c(p,h.crossOrigin);n.d.L(f,p,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},dr.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=c(h.as,h.crossOrigin);n.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else n.d.m(f)},dr.requestFormReset=function(f){n.d.r(f)},dr.unstable_batchedUpdates=function(f,h){return f(h)},dr.useFormState=function(f,h,p){return o.H.useFormState(f,h,p)},dr.useFormStatus=function(){return o.H.useHostTransitionStatus()},dr.version="19.2.4",dr}var QO;function f2(){if(QO)return lg.exports;QO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),lg.exports=h$(),lg.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 XO;function m$(){if(XO)return lc;XO=1;var e=f$(),t=ru(),r=f2();function n(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function l(a){var s=a,u=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(u=s.return),a=s.return;while(a)}return s.tag===3?u:null}function o(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function f(a){if(l(a)!==a)throw Error(n(188))}function h(a){var s=a.alternate;if(!s){if(s=l(a),s===null)throw Error(n(188));return s!==a?null:a}for(var u=a,m=s;;){var g=u.return;if(g===null)break;var j=g.alternate;if(j===null){if(m=g.return,m!==null){u=m;continue}break}if(g.child===j.child){for(j=g.child;j;){if(j===u)return f(g),a;if(j===m)return f(g),s;j=j.sibling}throw Error(n(188))}if(u.return!==m.return)u=g,m=j;else{for(var _=!1,P=g.child;P;){if(P===u){_=!0,u=g,m=j;break}if(P===m){_=!0,m=g,u=j;break}P=P.sibling}if(!_){for(P=j.child;P;){if(P===u){_=!0,u=j,m=g;break}if(P===m){_=!0,m=j,u=g;break}P=P.sibling}if(!_)throw Error(n(189))}}if(u.alternate!==m)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?a:s}function p(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=p(a),s!==null)return s;a=a.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),E=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function q(a){return a===null||typeof a!="object"?null:(a=H&&a[H]||a["@@iterator"],typeof a=="function"?a:null)}var ie=Symbol.for("react.client.reference");function re(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ie?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case O:return"Profiler";case N:return"StrictMode";case T:return"Suspense";case M:return"SuspenseList";case I:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case b:return"Portal";case E:return a.displayName||"Context";case C:return(a._context.displayName||"Context")+".Consumer";case A:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case R:return s=a.displayName||null,s!==null?s:re(a.type)||"Memo";case D:s=a._payload,a=a._init;try{return re(a(s))}catch{}}return null}var W=Array.isArray,$=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},ne=[],ce=-1;function L(a){return{current:a}}function X(a){0>ce||(a.current=ne[ce],ne[ce]=null,ce--)}function le(a,s){ce++,ne[ce]=a.current,a.current=s}var oe=L(null),he=L(null),je=L(null),Ne=L(null);function Pe(a,s){switch(le(je,s),le(he,a),le(oe,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?cO(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=cO(s),a=dO(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}X(oe),le(oe,a)}function de(){X(oe),X(he),X(je)}function ee(a){a.memoizedState!==null&&le(Ne,a);var s=oe.current,u=dO(s,a.type);s!==u&&(le(he,a),le(oe,u))}function Se(a){he.current===a&&(X(oe),X(he)),Ne.current===a&&(X(Ne),rc._currentValue=J)}var ue,_t;function De(a){if(ue===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);ue=s&&s[1]||"",_t=-1<u.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ue+a+_t}var Et=!1;function At(a,s){if(!a||Et)return"";Et=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(s){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(Z){var Q=Z}Reflect.construct(a,[],se)}else{try{se.call()}catch(Z){Q=Z}a.call(se.prototype)}}else{try{throw Error()}catch(Z){Q=Z}(se=a())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(Z){if(Z&&Q&&typeof Z.stack=="string")return[Z.stack,Q.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=m.DetermineComponentFrameRoot(),_=j[0],P=j[1];if(_&&P){var z=_.split(`
|
|
44
|
-
`),Y=P.split(`
|
|
45
|
-
`);for(g=m=0;m<z.length&&!z[m].includes("DetermineComponentFrameRoot");)m++;for(;g<Y.length&&!Y[g].includes("DetermineComponentFrameRoot");)g++;if(m===z.length||g===Y.length)for(m=z.length-1,g=Y.length-1;1<=m&&0<=g&&z[m]!==Y[g];)g--;for(;1<=m&&0<=g;m--,g--)if(z[m]!==Y[g]){if(m!==1||g!==1)do if(m--,g--,0>g||z[m]!==Y[g]){var te=`
|
|
46
|
-
`+z[m].replace(" at new "," at ");return a.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",a.displayName)),te}while(1<=m&&0<=g);break}}}finally{Et=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?De(u):""}function ur(a,s){switch(a.tag){case 26:case 27:case 5:return De(a.type);case 16:return De("Lazy");case 13:return a.child!==s&&s!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return At(a.type,!1);case 11:return At(a.type.render,!1);case 1:return At(a.type,!0);case 31:return De("Activity");default:return""}}function ma(a){try{var s="",u=null;do s+=ur(a,u),u=a,a=a.return;while(a);return s}catch(m){return`
|
|
47
|
-
Error generating stack: `+m.message+`
|
|
48
|
-
`+m.stack}}var An=Object.prototype.hasOwnProperty,hu=e.unstable_scheduleCallback,Sl=e.unstable_cancelCallback,Up=e.unstable_shouldYield,Td=e.unstable_requestPaint,Te=e.unstable_now,cr=e.unstable_getCurrentPriorityLevel,Fn=e.unstable_ImmediatePriority,Pd=e.unstable_UserBlockingPriority,Md=e.unstable_NormalPriority,z5=e.unstable_LowPriority,Fw=e.unstable_IdlePriority,B5=e.log,U5=e.unstable_setDisableYieldValue,mu=null,Hr=null;function ii(a){if(typeof B5=="function"&&U5(a),Hr&&typeof Hr.setStrictMode=="function")try{Hr.setStrictMode(mu,a)}catch{}}var Fr=Math.clz32?Math.clz32:F5,q5=Math.log,H5=Math.LN2;function F5(a){return a>>>=0,a===0?32:31-(q5(a)/H5|0)|0}var Rd=256,Dd=262144,kd=4194304;function ls(a){var s=a&42;if(s!==0)return s;switch(a&-a){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 a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Id(a,s,u){var m=a.pendingLanes;if(m===0)return 0;var g=0,j=a.suspendedLanes,_=a.pingedLanes;a=a.warmLanes;var P=m&134217727;return P!==0?(m=P&~j,m!==0?g=ls(m):(_&=P,_!==0?g=ls(_):u||(u=P&~a,u!==0&&(g=ls(u))))):(P=m&~j,P!==0?g=ls(P):_!==0?g=ls(_):u||(u=m&~a,u!==0&&(g=ls(u)))),g===0?0:s!==0&&s!==g&&(s&j)===0&&(j=g&-g,u=s&-s,j>=u||j===32&&(u&4194048)!==0)?s:g}function pu(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function K5(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Kw(){var a=kd;return kd<<=1,(kd&62914560)===0&&(kd=4194304),a}function qp(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function yu(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function G5(a,s,u,m,g,j){var _=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var P=a.entanglements,z=a.expirationTimes,Y=a.hiddenUpdates;for(u=_&~u;0<u;){var te=31-Fr(u),se=1<<te;P[te]=0,z[te]=-1;var Q=Y[te];if(Q!==null)for(Y[te]=null,te=0;te<Q.length;te++){var Z=Q[te];Z!==null&&(Z.lane&=-536870913)}u&=~se}m!==0&&Gw(a,m,0),j!==0&&g===0&&a.tag!==0&&(a.suspendedLanes|=j&~(_&~s))}function Gw(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var m=31-Fr(s);a.entangledLanes|=s,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function Yw(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var m=31-Fr(u),g=1<<m;g&s|a[m]&s&&(a[m]|=s),u&=~g}}function Vw(a,s){var u=s&-s;return u=(u&42)!==0?1:Hp(u),(u&(a.suspendedLanes|s))!==0?0:u}function Hp(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Fp(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Qw(){var a=F.p;return a!==0?a:(a=window.event,a===void 0?32:DO(a.type))}function Xw(a,s){var u=F.p;try{return F.p=a,s()}finally{F.p=u}}var si=Math.random().toString(36).slice(2),Zt="__reactFiber$"+si,Cr="__reactProps$"+si,Nl="__reactContainer$"+si,Kp="__reactEvents$"+si,Y5="__reactListeners$"+si,V5="__reactHandles$"+si,Ww="__reactResources$"+si,vu="__reactMarker$"+si;function Gp(a){delete a[Zt],delete a[Cr],delete a[Kp],delete a[Y5],delete a[V5]}function Ol(a){var s=a[Zt];if(s)return s;for(var u=a.parentNode;u;){if(s=u[Nl]||u[Zt]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=gO(a);a!==null;){if(u=a[Zt])return u;a=gO(a)}return s}a=u,u=a.parentNode}return null}function _l(a){if(a=a[Zt]||a[Nl]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function gu(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(n(33))}function El(a){var s=a[Ww];return s||(s=a[Ww]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Ut(a){a[vu]=!0}var Zw=new Set,Jw={};function os(a,s){Al(a,s),Al(a+"Capture",s)}function Al(a,s){for(Jw[a]=s,a=0;a<s.length;a++)Zw.add(s[a])}var Q5=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]*$"),eS={},tS={};function X5(a){return An.call(tS,a)?!0:An.call(eS,a)?!1:Q5.test(a)?tS[a]=!0:(eS[a]=!0,!1)}function Ld(a,s,u){if(X5(s))if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var m=s.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+u)}}function $d(a,s,u){if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+u)}}function pa(a,s,u,m){if(m===null)a.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(s,u,""+m)}}function sn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function rS(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function W5(a,s,u){var m=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var g=m.get,j=m.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return g.call(this)},set:function(_){u=""+_,j.call(this,_)}}),Object.defineProperty(a,s,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(_){u=""+_},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Yp(a){if(!a._valueTracker){var s=rS(a)?"checked":"value";a._valueTracker=W5(a,s,""+a[s])}}function nS(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),m="";return a&&(m=rS(a)?a.checked?"true":"false":a.value),a=m,a!==u?(s.setValue(a),!0):!1}function zd(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var Z5=/[\n"\\]/g;function ln(a){return a.replace(Z5,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Vp(a,s,u,m,g,j,_,P){a.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?a.type=_:a.removeAttribute("type"),s!=null?_==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+sn(s)):a.value!==""+sn(s)&&(a.value=""+sn(s)):_!=="submit"&&_!=="reset"||a.removeAttribute("value"),s!=null?Qp(a,_,sn(s)):u!=null?Qp(a,_,sn(u)):m!=null&&a.removeAttribute("value"),g==null&&j!=null&&(a.defaultChecked=!!j),g!=null&&(a.checked=g&&typeof g!="function"&&typeof g!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.name=""+sn(P):a.removeAttribute("name")}function aS(a,s,u,m,g,j,_,P){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(a.type=j),s!=null||u!=null){if(!(j!=="submit"&&j!=="reset"||s!=null)){Yp(a);return}u=u!=null?""+sn(u):"",s=s!=null?""+sn(s):u,P||s===a.value||(a.value=s),a.defaultValue=s}m=m??g,m=typeof m!="function"&&typeof m!="symbol"&&!!m,a.checked=P?a.checked:!!m,a.defaultChecked=!!m,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(a.name=_),Yp(a)}function Qp(a,s,u){s==="number"&&zd(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Cl(a,s,u,m){if(a=a.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<a.length;u++)g=s.hasOwnProperty("$"+a[u].value),a[u].selected!==g&&(a[u].selected=g),g&&m&&(a[u].defaultSelected=!0)}else{for(u=""+sn(u),s=null,g=0;g<a.length;g++){if(a[g].value===u){a[g].selected=!0,m&&(a[g].defaultSelected=!0);return}s!==null||a[g].disabled||(s=a[g])}s!==null&&(s.selected=!0)}}function iS(a,s,u){if(s!=null&&(s=""+sn(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+sn(u):""}function sS(a,s,u,m){if(s==null){if(m!=null){if(u!=null)throw Error(n(92));if(W(m)){if(1<m.length)throw Error(n(93));m=m[0]}u=m}u==null&&(u=""),s=u}u=sn(s),a.defaultValue=u,m=a.textContent,m===u&&m!==""&&m!==null&&(a.value=m),Yp(a)}function Tl(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var J5=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 lS(a,s,u){var m=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":m?a.setProperty(s,u):typeof u!="number"||u===0||J5.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function oS(a,s,u){if(s!=null&&typeof s!="object")throw Error(n(62));if(a=a.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||s!=null&&s.hasOwnProperty(m)||(m.indexOf("--")===0?a.setProperty(m,""):m==="float"?a.cssFloat="":a[m]="");for(var g in s)m=s[g],s.hasOwnProperty(g)&&u[g]!==m&&lS(a,g,m)}else for(var j in s)s.hasOwnProperty(j)&&lS(a,j,s[j])}function Xp(a){if(a.indexOf("-")===-1)return!1;switch(a){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 eI=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"]]),tI=/^[\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 Bd(a){return tI.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ya(){}var Wp=null;function Zp(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Pl=null,Ml=null;function uS(a){var s=_l(a);if(s&&(a=s.stateNode)){var u=a[Cr]||null;e:switch(a=s.stateNode,s.type){case"input":if(Vp(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+ln(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var m=u[s];if(m!==a&&m.form===a.form){var g=m[Cr]||null;if(!g)throw Error(n(90));Vp(m,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(s=0;s<u.length;s++)m=u[s],m.form===a.form&&nS(m)}break e;case"textarea":iS(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Cl(a,!!u.multiple,s,!1)}}}var Jp=!1;function cS(a,s,u){if(Jp)return a(s,u);Jp=!0;try{var m=a(s);return m}finally{if(Jp=!1,(Pl!==null||Ml!==null)&&(Af(),Pl&&(s=Pl,a=Ml,Ml=Pl=null,uS(s),a)))for(s=0;s<a.length;s++)uS(a[s])}}function xu(a,s){var u=a.stateNode;if(u===null)return null;var m=u[Cr]||null;if(m===null)return null;u=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(a=a.type,m=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!m;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var va=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ey=!1;if(va)try{var bu={};Object.defineProperty(bu,"passive",{get:function(){ey=!0}}),window.addEventListener("test",bu,bu),window.removeEventListener("test",bu,bu)}catch{ey=!1}var li=null,ty=null,Ud=null;function dS(){if(Ud)return Ud;var a,s=ty,u=s.length,m,g="value"in li?li.value:li.textContent,j=g.length;for(a=0;a<u&&s[a]===g[a];a++);var _=u-a;for(m=1;m<=_&&s[u-m]===g[j-m];m++);return Ud=g.slice(a,1<m?1-m:void 0)}function qd(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function Hd(){return!0}function fS(){return!1}function Tr(a){function s(u,m,g,j,_){this._reactName=u,this._targetInst=g,this.type=m,this.nativeEvent=j,this.target=_,this.currentTarget=null;for(var P in a)a.hasOwnProperty(P)&&(u=a[P],this[P]=u?u(j):j[P]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?Hd:fS,this.isPropagationStopped=fS,this}return y(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Hd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Hd)},persist:function(){},isPersistent:Hd}),s}var us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fd=Tr(us),ju=y({},us,{view:0,detail:0}),rI=Tr(ju),ry,ny,wu,Kd=y({},ju,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iy,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==wu&&(wu&&a.type==="mousemove"?(ry=a.screenX-wu.screenX,ny=a.screenY-wu.screenY):ny=ry=0,wu=a),ry)},movementY:function(a){return"movementY"in a?a.movementY:ny}}),hS=Tr(Kd),nI=y({},Kd,{dataTransfer:0}),aI=Tr(nI),iI=y({},ju,{relatedTarget:0}),ay=Tr(iI),sI=y({},us,{animationName:0,elapsedTime:0,pseudoElement:0}),lI=Tr(sI),oI=y({},us,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),uI=Tr(oI),cI=y({},us,{data:0}),mS=Tr(cI),dI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fI={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"},hI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mI(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=hI[a])?!!s[a]:!1}function iy(){return mI}var pI=y({},ju,{key:function(a){if(a.key){var s=dI[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=qd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?fI[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iy,charCode:function(a){return a.type==="keypress"?qd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?qd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),yI=Tr(pI),vI=y({},Kd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pS=Tr(vI),gI=y({},ju,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iy}),xI=Tr(gI),bI=y({},us,{propertyName:0,elapsedTime:0,pseudoElement:0}),jI=Tr(bI),wI=y({},Kd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),SI=Tr(wI),NI=y({},us,{newState:0,oldState:0}),OI=Tr(NI),_I=[9,13,27,32],sy=va&&"CompositionEvent"in window,Su=null;va&&"documentMode"in document&&(Su=document.documentMode);var EI=va&&"TextEvent"in window&&!Su,yS=va&&(!sy||Su&&8<Su&&11>=Su),vS=" ",gS=!1;function xS(a,s){switch(a){case"keyup":return _I.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bS(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Rl=!1;function AI(a,s){switch(a){case"compositionend":return bS(s);case"keypress":return s.which!==32?null:(gS=!0,vS);case"textInput":return a=s.data,a===vS&&gS?null:a;default:return null}}function CI(a,s){if(Rl)return a==="compositionend"||!sy&&xS(a,s)?(a=dS(),Ud=ty=li=null,Rl=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return yS&&s.locale!=="ko"?null:s.data;default:return null}}var TI={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 jS(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!TI[a.type]:s==="textarea"}function wS(a,s,u,m){Pl?Ml?Ml.push(m):Ml=[m]:Pl=m,s=kf(s,"onChange"),0<s.length&&(u=new Fd("onChange","change",null,u,m),a.push({event:u,listeners:s}))}var Nu=null,Ou=null;function PI(a){aO(a,0)}function Gd(a){var s=gu(a);if(nS(s))return a}function SS(a,s){if(a==="change")return s}var NS=!1;if(va){var ly;if(va){var oy="oninput"in document;if(!oy){var OS=document.createElement("div");OS.setAttribute("oninput","return;"),oy=typeof OS.oninput=="function"}ly=oy}else ly=!1;NS=ly&&(!document.documentMode||9<document.documentMode)}function _S(){Nu&&(Nu.detachEvent("onpropertychange",ES),Ou=Nu=null)}function ES(a){if(a.propertyName==="value"&&Gd(Ou)){var s=[];wS(s,Ou,a,Zp(a)),cS(PI,s)}}function MI(a,s,u){a==="focusin"?(_S(),Nu=s,Ou=u,Nu.attachEvent("onpropertychange",ES)):a==="focusout"&&_S()}function RI(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Gd(Ou)}function DI(a,s){if(a==="click")return Gd(s)}function kI(a,s){if(a==="input"||a==="change")return Gd(s)}function II(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Kr=typeof Object.is=="function"?Object.is:II;function _u(a,s){if(Kr(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),m=Object.keys(s);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var g=u[m];if(!An.call(s,g)||!Kr(a[g],s[g]))return!1}return!0}function AS(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function CS(a,s){var u=AS(a);a=0;for(var m;u;){if(u.nodeType===3){if(m=a+u.textContent.length,a<=s&&m>=s)return{node:u,offset:s-a};a=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=AS(u)}}function TS(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?TS(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function PS(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=zd(a.document);s instanceof a.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)a=s.contentWindow;else break;s=zd(a.document)}return s}function uy(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var LI=va&&"documentMode"in document&&11>=document.documentMode,Dl=null,cy=null,Eu=null,dy=!1;function MS(a,s,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;dy||Dl==null||Dl!==zd(m)||(m=Dl,"selectionStart"in m&&uy(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Eu&&_u(Eu,m)||(Eu=m,m=kf(cy,"onSelect"),0<m.length&&(s=new Fd("onSelect","select",null,s,u),a.push({event:s,listeners:m}),s.target=Dl)))}function cs(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var kl={animationend:cs("Animation","AnimationEnd"),animationiteration:cs("Animation","AnimationIteration"),animationstart:cs("Animation","AnimationStart"),transitionrun:cs("Transition","TransitionRun"),transitionstart:cs("Transition","TransitionStart"),transitioncancel:cs("Transition","TransitionCancel"),transitionend:cs("Transition","TransitionEnd")},fy={},RS={};va&&(RS=document.createElement("div").style,"AnimationEvent"in window||(delete kl.animationend.animation,delete kl.animationiteration.animation,delete kl.animationstart.animation),"TransitionEvent"in window||delete kl.transitionend.transition);function ds(a){if(fy[a])return fy[a];if(!kl[a])return a;var s=kl[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in RS)return fy[a]=s[u];return a}var DS=ds("animationend"),kS=ds("animationiteration"),IS=ds("animationstart"),$I=ds("transitionrun"),zI=ds("transitionstart"),BI=ds("transitioncancel"),LS=ds("transitionend"),$S=new Map,hy="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(" ");hy.push("scrollEnd");function Cn(a,s){$S.set(a,s),os(s,[a])}var Yd=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},on=[],Il=0,my=0;function Vd(){for(var a=Il,s=my=Il=0;s<a;){var u=on[s];on[s++]=null;var m=on[s];on[s++]=null;var g=on[s];on[s++]=null;var j=on[s];if(on[s++]=null,m!==null&&g!==null){var _=m.pending;_===null?g.next=g:(g.next=_.next,_.next=g),m.pending=g}j!==0&&zS(u,g,j)}}function Qd(a,s,u,m){on[Il++]=a,on[Il++]=s,on[Il++]=u,on[Il++]=m,my|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function py(a,s,u,m){return Qd(a,s,u,m),Xd(a)}function fs(a,s){return Qd(a,null,null,s),Xd(a)}function zS(a,s,u){a.lanes|=u;var m=a.alternate;m!==null&&(m.lanes|=u);for(var g=!1,j=a.return;j!==null;)j.childLanes|=u,m=j.alternate,m!==null&&(m.childLanes|=u),j.tag===22&&(a=j.stateNode,a===null||a._visibility&1||(g=!0)),a=j,j=j.return;return a.tag===3?(j=a.stateNode,g&&s!==null&&(g=31-Fr(u),a=j.hiddenUpdates,m=a[g],m===null?a[g]=[s]:m.push(s),s.lane=u|536870912),j):null}function Xd(a){if(50<Qu)throw Qu=0,Nv=null,Error(n(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var Ll={};function UI(a,s,u,m){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gr(a,s,u,m){return new UI(a,s,u,m)}function yy(a){return a=a.prototype,!(!a||!a.isReactComponent)}function ga(a,s){var u=a.alternate;return u===null?(u=Gr(a.tag,s,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=s,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,s=a.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function BS(a,s){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,s=u.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function Wd(a,s,u,m,g,j){var _=0;if(m=a,typeof a=="function")yy(a)&&(_=1);else if(typeof a=="string")_=GL(a,u,oe.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case I:return a=Gr(31,u,s,g),a.elementType=I,a.lanes=j,a;case w:return hs(u.children,g,j,s);case N:_=8,g|=24;break;case O:return a=Gr(12,u,s,g|2),a.elementType=O,a.lanes=j,a;case T:return a=Gr(13,u,s,g),a.elementType=T,a.lanes=j,a;case M:return a=Gr(19,u,s,g),a.elementType=M,a.lanes=j,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case E:_=10;break e;case C:_=9;break e;case A:_=11;break e;case R:_=14;break e;case D:_=16,m=null;break e}_=29,u=Error(n(130,a===null?"null":typeof a,"")),m=null}return s=Gr(_,u,s,g),s.elementType=a,s.type=m,s.lanes=j,s}function hs(a,s,u,m){return a=Gr(7,a,m,s),a.lanes=u,a}function vy(a,s,u){return a=Gr(6,a,null,s),a.lanes=u,a}function US(a){var s=Gr(18,null,null,0);return s.stateNode=a,s}function gy(a,s,u){return s=Gr(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var qS=new WeakMap;function un(a,s){if(typeof a=="object"&&a!==null){var u=qS.get(a);return u!==void 0?u:(s={value:a,source:s,stack:ma(s)},qS.set(a,s),s)}return{value:a,source:s,stack:ma(s)}}var $l=[],zl=0,Zd=null,Au=0,cn=[],dn=0,oi=null,Kn=1,Gn="";function xa(a,s){$l[zl++]=Au,$l[zl++]=Zd,Zd=a,Au=s}function HS(a,s,u){cn[dn++]=Kn,cn[dn++]=Gn,cn[dn++]=oi,oi=a;var m=Kn;a=Gn;var g=32-Fr(m)-1;m&=~(1<<g),u+=1;var j=32-Fr(s)+g;if(30<j){var _=g-g%5;j=(m&(1<<_)-1).toString(32),m>>=_,g-=_,Kn=1<<32-Fr(s)+g|u<<g|m,Gn=j+a}else Kn=1<<j|u<<g|m,Gn=a}function xy(a){a.return!==null&&(xa(a,1),HS(a,1,0))}function by(a){for(;a===Zd;)Zd=$l[--zl],$l[zl]=null,Au=$l[--zl],$l[zl]=null;for(;a===oi;)oi=cn[--dn],cn[dn]=null,Gn=cn[--dn],cn[dn]=null,Kn=cn[--dn],cn[dn]=null}function FS(a,s){cn[dn++]=Kn,cn[dn++]=Gn,cn[dn++]=oi,Kn=s.id,Gn=s.overflow,oi=a}var Jt=null,it=null,Le=!1,ui=null,fn=!1,jy=Error(n(519));function ci(a){var s=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Cu(un(s,a)),jy}function KS(a){var s=a.stateNode,u=a.type,m=a.memoizedProps;switch(s[Zt]=a,s[Cr]=m,u){case"dialog":Re("cancel",s),Re("close",s);break;case"iframe":case"object":case"embed":Re("load",s);break;case"video":case"audio":for(u=0;u<Wu.length;u++)Re(Wu[u],s);break;case"source":Re("error",s);break;case"img":case"image":case"link":Re("error",s),Re("load",s);break;case"details":Re("toggle",s);break;case"input":Re("invalid",s),aS(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Re("invalid",s);break;case"textarea":Re("invalid",s),sS(s,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||m.suppressHydrationWarning===!0||oO(s.textContent,u)?(m.popover!=null&&(Re("beforetoggle",s),Re("toggle",s)),m.onScroll!=null&&Re("scroll",s),m.onScrollEnd!=null&&Re("scrollend",s),m.onClick!=null&&(s.onclick=ya),s=!0):s=!1,s||ci(a,!0)}function GS(a){for(Jt=a.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:Jt=Jt.return}}function Bl(a){if(a!==Jt)return!1;if(!Le)return GS(a),Le=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||zv(a.type,a.memoizedProps)),u=!u),u&&it&&ci(a),GS(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=vO(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=vO(a)}else s===27?(s=it,Ni(a.type)?(a=Fv,Fv=null,it=a):it=s):it=Jt?mn(a.stateNode.nextSibling):null;return!0}function ms(){it=Jt=null,Le=!1}function wy(){var a=ui;return a!==null&&(Dr===null?Dr=a:Dr.push.apply(Dr,a),ui=null),a}function Cu(a){ui===null?ui=[a]:ui.push(a)}var Sy=L(null),ps=null,ba=null;function di(a,s,u){le(Sy,s._currentValue),s._currentValue=u}function ja(a){a._currentValue=Sy.current,X(Sy)}function Ny(a,s,u){for(;a!==null;){var m=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),a===u)break;a=a.return}}function Oy(a,s,u,m){var g=a.child;for(g!==null&&(g.return=a);g!==null;){var j=g.dependencies;if(j!==null){var _=g.child;j=j.firstContext;e:for(;j!==null;){var P=j;j=g;for(var z=0;z<s.length;z++)if(P.context===s[z]){j.lanes|=u,P=j.alternate,P!==null&&(P.lanes|=u),Ny(j.return,u,a),m||(_=null);break e}j=P.next}}else if(g.tag===18){if(_=g.return,_===null)throw Error(n(341));_.lanes|=u,j=_.alternate,j!==null&&(j.lanes|=u),Ny(_,u,a),_=null}else _=g.child;if(_!==null)_.return=g;else for(_=g;_!==null;){if(_===a){_=null;break}if(g=_.sibling,g!==null){g.return=_.return,_=g;break}_=_.return}g=_}}function Ul(a,s,u,m){a=null;for(var g=s,j=!1;g!==null;){if(!j){if((g.flags&524288)!==0)j=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var _=g.alternate;if(_===null)throw Error(n(387));if(_=_.memoizedProps,_!==null){var P=g.type;Kr(g.pendingProps.value,_.value)||(a!==null?a.push(P):a=[P])}}else if(g===Ne.current){if(_=g.alternate,_===null)throw Error(n(387));_.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(a!==null?a.push(rc):a=[rc])}g=g.return}a!==null&&Oy(s,a,u,m),s.flags|=262144}function Jd(a){for(a=a.firstContext;a!==null;){if(!Kr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function ys(a){ps=a,ba=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function er(a){return YS(ps,a)}function ef(a,s){return ps===null&&ys(a),YS(a,s)}function YS(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},ba===null){if(a===null)throw Error(n(308));ba=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else ba=ba.next=s;return u}var qI=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(u,m){a.push(m)}};this.abort=function(){s.aborted=!0,a.forEach(function(u){return u()})}},HI=e.unstable_scheduleCallback,FI=e.unstable_NormalPriority,Ct={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _y(){return{controller:new qI,data:new Map,refCount:0}}function Tu(a){a.refCount--,a.refCount===0&&HI(FI,function(){a.controller.abort()})}var Pu=null,Ey=0,ql=0,Hl=null;function KI(a,s){if(Pu===null){var u=Pu=[];Ey=0,ql=Tv(),Hl={status:"pending",value:void 0,then:function(m){u.push(m)}}}return Ey++,s.then(VS,VS),s}function VS(){if(--Ey===0&&Pu!==null){Hl!==null&&(Hl.status="fulfilled");var a=Pu;Pu=null,ql=0,Hl=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function GI(a,s){var u=[],m={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return a.then(function(){m.status="fulfilled",m.value=s;for(var g=0;g<u.length;g++)(0,u[g])(s)},function(g){for(m.status="rejected",m.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),m}var QS=$.S;$.S=function(a,s){MN=Te(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&KI(a,s),QS!==null&&QS(a,s)};var vs=L(null);function Ay(){var a=vs.current;return a!==null?a:rt.pooledCache}function tf(a,s){s===null?le(vs,vs.current):le(vs,s.pool)}function XS(){var a=Ay();return a===null?null:{parent:Ct._currentValue,pool:a}}var Fl=Error(n(460)),Cy=Error(n(474)),rf=Error(n(542)),nf={then:function(){}};function WS(a){return a=a.status,a==="fulfilled"||a==="rejected"}function ZS(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then(ya,ya),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,e1(a),a;default:if(typeof s.status=="string")s.then(ya,ya);else{if(a=rt,a!==null&&100<a.shellSuspendCounter)throw Error(n(482));a=s,a.status="pending",a.then(function(m){if(s.status==="pending"){var g=s;g.status="fulfilled",g.value=m}},function(m){if(s.status==="pending"){var g=s;g.status="rejected",g.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,e1(a),a}throw xs=s,Fl}}function gs(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(xs=u,Fl):u}}var xs=null;function JS(){if(xs===null)throw Error(n(459));var a=xs;return xs=null,a}function e1(a){if(a===Fl||a===rf)throw Error(n(483))}var Kl=null,Mu=0;function af(a){var s=Mu;return Mu+=1,Kl===null&&(Kl=[]),ZS(Kl,a,s)}function Ru(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function sf(a,s){throw s.$$typeof===v?Error(n(525)):(a=Object.prototype.toString.call(s),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function t1(a){function s(K,U){if(a){var G=K.deletions;G===null?(K.deletions=[U],K.flags|=16):G.push(U)}}function u(K,U){if(!a)return null;for(;U!==null;)s(K,U),U=U.sibling;return null}function m(K){for(var U=new Map;K!==null;)K.key!==null?U.set(K.key,K):U.set(K.index,K),K=K.sibling;return U}function g(K,U){return K=ga(K,U),K.index=0,K.sibling=null,K}function j(K,U,G){return K.index=G,a?(G=K.alternate,G!==null?(G=G.index,G<U?(K.flags|=67108866,U):G):(K.flags|=67108866,U)):(K.flags|=1048576,U)}function _(K){return a&&K.alternate===null&&(K.flags|=67108866),K}function P(K,U,G,ae){return U===null||U.tag!==6?(U=vy(G,K.mode,ae),U.return=K,U):(U=g(U,G),U.return=K,U)}function z(K,U,G,ae){var be=G.type;return be===w?te(K,U,G.props.children,ae,G.key):U!==null&&(U.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===D&&gs(be)===U.type)?(U=g(U,G.props),Ru(U,G),U.return=K,U):(U=Wd(G.type,G.key,G.props,null,K.mode,ae),Ru(U,G),U.return=K,U)}function Y(K,U,G,ae){return U===null||U.tag!==4||U.stateNode.containerInfo!==G.containerInfo||U.stateNode.implementation!==G.implementation?(U=gy(G,K.mode,ae),U.return=K,U):(U=g(U,G.children||[]),U.return=K,U)}function te(K,U,G,ae,be){return U===null||U.tag!==7?(U=hs(G,K.mode,ae,be),U.return=K,U):(U=g(U,G),U.return=K,U)}function se(K,U,G){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=vy(""+U,K.mode,G),U.return=K,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return G=Wd(U.type,U.key,U.props,null,K.mode,G),Ru(G,U),G.return=K,G;case b:return U=gy(U,K.mode,G),U.return=K,U;case D:return U=gs(U),se(K,U,G)}if(W(U)||q(U))return U=hs(U,K.mode,G,null),U.return=K,U;if(typeof U.then=="function")return se(K,af(U),G);if(U.$$typeof===E)return se(K,ef(K,U),G);sf(K,U)}return null}function Q(K,U,G,ae){var be=U!==null?U.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return be!==null?null:P(K,U,""+G,ae);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case x:return G.key===be?z(K,U,G,ae):null;case b:return G.key===be?Y(K,U,G,ae):null;case D:return G=gs(G),Q(K,U,G,ae)}if(W(G)||q(G))return be!==null?null:te(K,U,G,ae,null);if(typeof G.then=="function")return Q(K,U,af(G),ae);if(G.$$typeof===E)return Q(K,U,ef(K,G),ae);sf(K,G)}return null}function Z(K,U,G,ae,be){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return K=K.get(G)||null,P(U,K,""+ae,be);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case x:return K=K.get(ae.key===null?G:ae.key)||null,z(U,K,ae,be);case b:return K=K.get(ae.key===null?G:ae.key)||null,Y(U,K,ae,be);case D:return ae=gs(ae),Z(K,U,G,ae,be)}if(W(ae)||q(ae))return K=K.get(G)||null,te(U,K,ae,be,null);if(typeof ae.then=="function")return Z(K,U,G,af(ae),be);if(ae.$$typeof===E)return Z(K,U,G,ef(U,ae),be);sf(U,ae)}return null}function pe(K,U,G,ae){for(var be=null,qe=null,ve=U,Ae=U=0,Ie=null;ve!==null&&Ae<G.length;Ae++){ve.index>Ae?(Ie=ve,ve=null):Ie=ve.sibling;var He=Q(K,ve,G[Ae],ae);if(He===null){ve===null&&(ve=Ie);break}a&&ve&&He.alternate===null&&s(K,ve),U=j(He,U,Ae),qe===null?be=He:qe.sibling=He,qe=He,ve=Ie}if(Ae===G.length)return u(K,ve),Le&&xa(K,Ae),be;if(ve===null){for(;Ae<G.length;Ae++)ve=se(K,G[Ae],ae),ve!==null&&(U=j(ve,U,Ae),qe===null?be=ve:qe.sibling=ve,qe=ve);return Le&&xa(K,Ae),be}for(ve=m(ve);Ae<G.length;Ae++)Ie=Z(ve,K,Ae,G[Ae],ae),Ie!==null&&(a&&Ie.alternate!==null&&ve.delete(Ie.key===null?Ae:Ie.key),U=j(Ie,U,Ae),qe===null?be=Ie:qe.sibling=Ie,qe=Ie);return a&&ve.forEach(function(Ci){return s(K,Ci)}),Le&&xa(K,Ae),be}function we(K,U,G,ae){if(G==null)throw Error(n(151));for(var be=null,qe=null,ve=U,Ae=U=0,Ie=null,He=G.next();ve!==null&&!He.done;Ae++,He=G.next()){ve.index>Ae?(Ie=ve,ve=null):Ie=ve.sibling;var Ci=Q(K,ve,He.value,ae);if(Ci===null){ve===null&&(ve=Ie);break}a&&ve&&Ci.alternate===null&&s(K,ve),U=j(Ci,U,Ae),qe===null?be=Ci:qe.sibling=Ci,qe=Ci,ve=Ie}if(He.done)return u(K,ve),Le&&xa(K,Ae),be;if(ve===null){for(;!He.done;Ae++,He=G.next())He=se(K,He.value,ae),He!==null&&(U=j(He,U,Ae),qe===null?be=He:qe.sibling=He,qe=He);return Le&&xa(K,Ae),be}for(ve=m(ve);!He.done;Ae++,He=G.next())He=Z(ve,K,Ae,He.value,ae),He!==null&&(a&&He.alternate!==null&&ve.delete(He.key===null?Ae:He.key),U=j(He,U,Ae),qe===null?be=He:qe.sibling=He,qe=He);return a&&ve.forEach(function(n$){return s(K,n$)}),Le&&xa(K,Ae),be}function et(K,U,G,ae){if(typeof G=="object"&&G!==null&&G.type===w&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case x:e:{for(var be=G.key;U!==null;){if(U.key===be){if(be=G.type,be===w){if(U.tag===7){u(K,U.sibling),ae=g(U,G.props.children),ae.return=K,K=ae;break e}}else if(U.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===D&&gs(be)===U.type){u(K,U.sibling),ae=g(U,G.props),Ru(ae,G),ae.return=K,K=ae;break e}u(K,U);break}else s(K,U);U=U.sibling}G.type===w?(ae=hs(G.props.children,K.mode,ae,G.key),ae.return=K,K=ae):(ae=Wd(G.type,G.key,G.props,null,K.mode,ae),Ru(ae,G),ae.return=K,K=ae)}return _(K);case b:e:{for(be=G.key;U!==null;){if(U.key===be)if(U.tag===4&&U.stateNode.containerInfo===G.containerInfo&&U.stateNode.implementation===G.implementation){u(K,U.sibling),ae=g(U,G.children||[]),ae.return=K,K=ae;break e}else{u(K,U);break}else s(K,U);U=U.sibling}ae=gy(G,K.mode,ae),ae.return=K,K=ae}return _(K);case D:return G=gs(G),et(K,U,G,ae)}if(W(G))return pe(K,U,G,ae);if(q(G)){if(be=q(G),typeof be!="function")throw Error(n(150));return G=be.call(G),we(K,U,G,ae)}if(typeof G.then=="function")return et(K,U,af(G),ae);if(G.$$typeof===E)return et(K,U,ef(K,G),ae);sf(K,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,U!==null&&U.tag===6?(u(K,U.sibling),ae=g(U,G),ae.return=K,K=ae):(u(K,U),ae=vy(G,K.mode,ae),ae.return=K,K=ae),_(K)):u(K,U)}return function(K,U,G,ae){try{Mu=0;var be=et(K,U,G,ae);return Kl=null,be}catch(ve){if(ve===Fl||ve===rf)throw ve;var qe=Gr(29,ve,null,K.mode);return qe.lanes=ae,qe.return=K,qe}finally{}}}var bs=t1(!0),r1=t1(!1),fi=!1;function Ty(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Py(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function hi(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function mi(a,s,u){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(Ke&2)!==0){var g=m.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),m.pending=s,s=Xd(a),zS(a,null,u),s}return Qd(a,m,s,u),Xd(a)}function Du(a,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,Yw(a,u)}}function My(a,s){var u=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var g=null,j=null;if(u=u.firstBaseUpdate,u!==null){do{var _={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};j===null?g=j=_:j=j.next=_,u=u.next}while(u!==null);j===null?g=j=s:j=j.next=s}else g=j=s;u={baseState:m.baseState,firstBaseUpdate:g,lastBaseUpdate:j,shared:m.shared,callbacks:m.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=s}var Ry=!1;function ku(){if(Ry){var a=Hl;if(a!==null)throw a}}function Iu(a,s,u,m){Ry=!1;var g=a.updateQueue;fi=!1;var j=g.firstBaseUpdate,_=g.lastBaseUpdate,P=g.shared.pending;if(P!==null){g.shared.pending=null;var z=P,Y=z.next;z.next=null,_===null?j=Y:_.next=Y,_=z;var te=a.alternate;te!==null&&(te=te.updateQueue,P=te.lastBaseUpdate,P!==_&&(P===null?te.firstBaseUpdate=Y:P.next=Y,te.lastBaseUpdate=z))}if(j!==null){var se=g.baseState;_=0,te=Y=z=null,P=j;do{var Q=P.lane&-536870913,Z=Q!==P.lane;if(Z?(ke&Q)===Q:(m&Q)===Q){Q!==0&&Q===ql&&(Ry=!0),te!==null&&(te=te.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var pe=a,we=P;Q=s;var et=u;switch(we.tag){case 1:if(pe=we.payload,typeof pe=="function"){se=pe.call(et,se,Q);break e}se=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=we.payload,Q=typeof pe=="function"?pe.call(et,se,Q):pe,Q==null)break e;se=y({},se,Q);break e;case 2:fi=!0}}Q=P.callback,Q!==null&&(a.flags|=64,Z&&(a.flags|=8192),Z=g.callbacks,Z===null?g.callbacks=[Q]:Z.push(Q))}else Z={lane:Q,tag:P.tag,payload:P.payload,callback:P.callback,next:null},te===null?(Y=te=Z,z=se):te=te.next=Z,_|=Q;if(P=P.next,P===null){if(P=g.shared.pending,P===null)break;Z=P,P=Z.next,Z.next=null,g.lastBaseUpdate=Z,g.shared.pending=null}}while(!0);te===null&&(z=se),g.baseState=z,g.firstBaseUpdate=Y,g.lastBaseUpdate=te,j===null&&(g.shared.lanes=0),xi|=_,a.lanes=_,a.memoizedState=se}}function n1(a,s){if(typeof a!="function")throw Error(n(191,a));a.call(s)}function a1(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)n1(u[a],s)}var Gl=L(null),lf=L(0);function i1(a,s){a=Ta,le(lf,a),le(Gl,s),Ta=a|s.baseLanes}function Dy(){le(lf,Ta),le(Gl,Gl.current)}function ky(){Ta=lf.current,X(Gl),X(lf)}var Yr=L(null),hn=null;function pi(a){var s=a.alternate;le(wt,wt.current&1),le(Yr,a),hn===null&&(s===null||Gl.current!==null||s.memoizedState!==null)&&(hn=a)}function Iy(a){le(wt,wt.current),le(Yr,a),hn===null&&(hn=a)}function s1(a){a.tag===22?(le(wt,wt.current),le(Yr,a),hn===null&&(hn=a)):yi()}function yi(){le(wt,wt.current),le(Yr,Yr.current)}function Vr(a){X(Yr),hn===a&&(hn=null),X(wt)}var wt=L(0);function of(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||qv(u)||Hv(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var wa=0,Ee=null,Ze=null,Tt=null,uf=!1,Yl=!1,js=!1,cf=0,Lu=0,Vl=null,YI=0;function yt(){throw Error(n(321))}function Ly(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!Kr(a[u],s[u]))return!1;return!0}function $y(a,s,u,m,g,j){return wa=j,Ee=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,$.H=a===null||a.memoizedState===null?H1:Jy,js=!1,j=u(m,g),js=!1,Yl&&(j=o1(s,u,m,g)),l1(a),j}function l1(a){$.H=Bu;var s=Ze!==null&&Ze.next!==null;if(wa=0,Tt=Ze=Ee=null,uf=!1,Lu=0,Vl=null,s)throw Error(n(300));a===null||Pt||(a=a.dependencies,a!==null&&Jd(a)&&(Pt=!0))}function o1(a,s,u,m){Ee=a;var g=0;do{if(Yl&&(Vl=null),Lu=0,Yl=!1,25<=g)throw Error(n(301));if(g+=1,Tt=Ze=null,a.updateQueue!=null){var j=a.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}$.H=F1,j=s(u,m)}while(Yl);return j}function VI(){var a=$.H,s=a.useState()[0];return s=typeof s.then=="function"?$u(s):s,a=a.useState()[0],(Ze!==null?Ze.memoizedState:null)!==a&&(Ee.flags|=1024),s}function zy(){var a=cf!==0;return cf=0,a}function By(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function Uy(a){if(uf){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}uf=!1}wa=0,Tt=Ze=Ee=null,Yl=!1,Lu=cf=0,Vl=null}function xr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Ee.memoizedState=Tt=a:Tt=Tt.next=a,Tt}function St(){if(Ze===null){var a=Ee.alternate;a=a!==null?a.memoizedState:null}else a=Ze.next;var s=Tt===null?Ee.memoizedState:Tt.next;if(s!==null)Tt=s,Ze=a;else{if(a===null)throw Ee.alternate===null?Error(n(467)):Error(n(310));Ze=a,a={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},Tt===null?Ee.memoizedState=Tt=a:Tt=Tt.next=a}return Tt}function df(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $u(a){var s=Lu;return Lu+=1,Vl===null&&(Vl=[]),a=ZS(Vl,a,s),s=Ee,(Tt===null?s.memoizedState:Tt.next)===null&&(s=s.alternate,$.H=s===null||s.memoizedState===null?H1:Jy),a}function ff(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return $u(a);if(a.$$typeof===E)return er(a)}throw Error(n(438,String(a)))}function qy(a){var s=null,u=Ee.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var m=Ee.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(s={data:m.data.map(function(g){return g.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=df(),Ee.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(a),m=0;m<a;m++)u[m]=k;return s.index++,u}function Sa(a,s){return typeof s=="function"?s(a):s}function hf(a){var s=St();return Hy(s,Ze,a)}function Hy(a,s,u){var m=a.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=u;var g=a.baseQueue,j=m.pending;if(j!==null){if(g!==null){var _=g.next;g.next=j.next,j.next=_}s.baseQueue=g=j,m.pending=null}if(j=a.baseState,g===null)a.memoizedState=j;else{s=g.next;var P=_=null,z=null,Y=s,te=!1;do{var se=Y.lane&-536870913;if(se!==Y.lane?(ke&se)===se:(wa&se)===se){var Q=Y.revertLane;if(Q===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),se===ql&&(te=!0);else if((wa&Q)===Q){Y=Y.next,Q===ql&&(te=!0);continue}else se={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},z===null?(P=z=se,_=j):z=z.next=se,Ee.lanes|=Q,xi|=Q;se=Y.action,js&&u(j,se),j=Y.hasEagerState?Y.eagerState:u(j,se)}else Q={lane:se,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},z===null?(P=z=Q,_=j):z=z.next=Q,Ee.lanes|=se,xi|=se;Y=Y.next}while(Y!==null&&Y!==s);if(z===null?_=j:z.next=P,!Kr(j,a.memoizedState)&&(Pt=!0,te&&(u=Hl,u!==null)))throw u;a.memoizedState=j,a.baseState=_,a.baseQueue=z,m.lastRenderedState=j}return g===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function Fy(a){var s=St(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=a;var m=u.dispatch,g=u.pending,j=s.memoizedState;if(g!==null){u.pending=null;var _=g=g.next;do j=a(j,_.action),_=_.next;while(_!==g);Kr(j,s.memoizedState)||(Pt=!0),s.memoizedState=j,s.baseQueue===null&&(s.baseState=j),u.lastRenderedState=j}return[j,m]}function u1(a,s,u){var m=Ee,g=St(),j=Le;if(j){if(u===void 0)throw Error(n(407));u=u()}else u=s();var _=!Kr((Ze||g).memoizedState,u);if(_&&(g.memoizedState=u,Pt=!0),g=g.queue,Yy(f1.bind(null,m,g,a),[a]),g.getSnapshot!==s||_||Tt!==null&&Tt.memoizedState.tag&1){if(m.flags|=2048,Ql(9,{destroy:void 0},d1.bind(null,m,g,u,s),null),rt===null)throw Error(n(349));j||(wa&127)!==0||c1(m,s,u)}return u}function c1(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Ee.updateQueue,s===null?(s=df(),Ee.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function d1(a,s,u,m){s.value=u,s.getSnapshot=m,h1(s)&&m1(a)}function f1(a,s,u){return u(function(){h1(s)&&m1(a)})}function h1(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!Kr(a,u)}catch{return!0}}function m1(a){var s=fs(a,2);s!==null&&kr(s,a,2)}function Ky(a){var s=xr();if(typeof a=="function"){var u=a;if(a=u(),js){ii(!0);try{u()}finally{ii(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:a},s}function p1(a,s,u,m){return a.baseState=u,Hy(a,Ze,typeof m=="function"?m:Sa)}function QI(a,s,u,m,g){if(yf(a))throw Error(n(485));if(a=s.action,a!==null){var j={payload:g,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){j.listeners.push(_)}};$.T!==null?u(!0):j.isTransition=!1,m(j),u=s.pending,u===null?(j.next=s.pending=j,y1(s,j)):(j.next=u.next,s.pending=u.next=j)}}function y1(a,s){var u=s.action,m=s.payload,g=a.state;if(s.isTransition){var j=$.T,_={};$.T=_;try{var P=u(g,m),z=$.S;z!==null&&z(_,P),v1(a,s,P)}catch(Y){Gy(a,s,Y)}finally{j!==null&&_.types!==null&&(j.types=_.types),$.T=j}}else try{j=u(g,m),v1(a,s,j)}catch(Y){Gy(a,s,Y)}}function v1(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){g1(a,s,m)},function(m){return Gy(a,s,m)}):g1(a,s,u)}function g1(a,s,u){s.status="fulfilled",s.value=u,x1(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,y1(a,u)))}function Gy(a,s,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=u,x1(s),s=s.next;while(s!==m)}a.action=null}function x1(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function b1(a,s){return s}function j1(a,s){if(Le){var u=rt.formState;if(u!==null){e:{var m=Ee;if(Le){if(it){t:{for(var g=it,j=fn;g.nodeType!==8;){if(!j){g=null;break t}if(g=mn(g.nextSibling),g===null){g=null;break t}}j=g.data,g=j==="F!"||j==="F"?g:null}if(g){it=mn(g.nextSibling),m=g.data==="F!";break e}}ci(m)}m=!1}m&&(s=u[0])}}return u=xr(),u.memoizedState=u.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:b1,lastRenderedState:s},u.queue=m,u=B1.bind(null,Ee,m),m.dispatch=u,m=Ky(!1),j=Zy.bind(null,Ee,!1,m.queue),m=xr(),g={state:s,dispatch:null,action:a,pending:null},m.queue=g,u=QI.bind(null,Ee,g,j,u),g.dispatch=u,m.memoizedState=a,[s,u,!1]}function w1(a){var s=St();return S1(s,Ze,a)}function S1(a,s,u){if(s=Hy(a,s,b1)[0],a=hf(Sa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=$u(s)}catch(_){throw _===Fl?rf:_}else m=s;s=St();var g=s.queue,j=g.dispatch;return u!==s.memoizedState&&(Ee.flags|=2048,Ql(9,{destroy:void 0},XI.bind(null,g,u),null)),[m,j,a]}function XI(a,s){a.action=s}function N1(a){var s=St(),u=Ze;if(u!==null)return S1(s,u,a);St(),s=s.memoizedState,u=St();var m=u.queue.dispatch;return u.memoizedState=a,[s,m,!1]}function Ql(a,s,u,m){return a={tag:a,create:u,deps:m,inst:s,next:null},s=Ee.updateQueue,s===null&&(s=df(),Ee.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=a.next=a:(m=u.next,u.next=a,a.next=m,s.lastEffect=a),a}function O1(){return St().memoizedState}function mf(a,s,u,m){var g=xr();Ee.flags|=a,g.memoizedState=Ql(1|s,{destroy:void 0},u,m===void 0?null:m)}function pf(a,s,u,m){var g=St();m=m===void 0?null:m;var j=g.memoizedState.inst;Ze!==null&&m!==null&&Ly(m,Ze.memoizedState.deps)?g.memoizedState=Ql(s,j,u,m):(Ee.flags|=a,g.memoizedState=Ql(1|s,j,u,m))}function _1(a,s){mf(8390656,8,a,s)}function Yy(a,s){pf(2048,8,a,s)}function WI(a){Ee.flags|=4;var s=Ee.updateQueue;if(s===null)s=df(),Ee.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function E1(a){var s=St().memoizedState;return WI({ref:s,nextImpl:a}),function(){if((Ke&2)!==0)throw Error(n(440));return s.impl.apply(void 0,arguments)}}function A1(a,s){return pf(4,2,a,s)}function C1(a,s){return pf(4,4,a,s)}function T1(a,s){if(typeof s=="function"){a=a();var u=s(a);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function P1(a,s,u){u=u!=null?u.concat([a]):null,pf(4,4,T1.bind(null,s,a),u)}function Vy(){}function M1(a,s){var u=St();s=s===void 0?null:s;var m=u.memoizedState;return s!==null&&Ly(s,m[1])?m[0]:(u.memoizedState=[a,s],a)}function R1(a,s){var u=St();s=s===void 0?null:s;var m=u.memoizedState;if(s!==null&&Ly(s,m[1]))return m[0];if(m=a(),js){ii(!0);try{a()}finally{ii(!1)}}return u.memoizedState=[m,s],m}function Qy(a,s,u){return u===void 0||(wa&1073741824)!==0&&(ke&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=DN(),Ee.lanes|=a,xi|=a,u)}function D1(a,s,u,m){return Kr(u,s)?u:Gl.current!==null?(a=Qy(a,u,m),Kr(a,s)||(Pt=!0),a):(wa&42)===0||(wa&1073741824)!==0&&(ke&261930)===0?(Pt=!0,a.memoizedState=u):(a=DN(),Ee.lanes|=a,xi|=a,s)}function k1(a,s,u,m,g){var j=F.p;F.p=j!==0&&8>j?j:8;var _=$.T,P={};$.T=P,Zy(a,!1,s,u);try{var z=g(),Y=$.S;if(Y!==null&&Y(P,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var te=GI(z,m);zu(a,s,te,Wr(a))}else zu(a,s,m,Wr(a))}catch(se){zu(a,s,{then:function(){},status:"rejected",reason:se},Wr())}finally{F.p=j,_!==null&&P.types!==null&&(_.types=P.types),$.T=_}}function ZI(){}function Xy(a,s,u,m){if(a.tag!==5)throw Error(n(476));var g=I1(a).queue;k1(a,g,s,J,u===null?ZI:function(){return L1(a),u(m)})}function I1(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:J},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function L1(a){var s=I1(a);s.next===null&&(s=a.alternate.memoizedState),zu(a,s.next.queue,{},Wr())}function Wy(){return er(rc)}function $1(){return St().memoizedState}function z1(){return St().memoizedState}function JI(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Wr();a=hi(u);var m=mi(s,a,u);m!==null&&(kr(m,s,u),Du(m,s,u)),s={cache:_y()},a.payload=s;return}s=s.return}}function eL(a,s,u){var m=Wr();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},yf(a)?U1(s,u):(u=py(a,s,u,m),u!==null&&(kr(u,a,m),q1(u,s,m)))}function B1(a,s,u){var m=Wr();zu(a,s,u,m)}function zu(a,s,u,m){var g={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(yf(a))U1(s,g);else{var j=a.alternate;if(a.lanes===0&&(j===null||j.lanes===0)&&(j=s.lastRenderedReducer,j!==null))try{var _=s.lastRenderedState,P=j(_,u);if(g.hasEagerState=!0,g.eagerState=P,Kr(P,_))return Qd(a,s,g,0),rt===null&&Vd(),!1}catch{}finally{}if(u=py(a,s,g,m),u!==null)return kr(u,a,m),q1(u,s,m),!0}return!1}function Zy(a,s,u,m){if(m={lane:2,revertLane:Tv(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},yf(a)){if(s)throw Error(n(479))}else s=py(a,u,m,2),s!==null&&kr(s,a,2)}function yf(a){var s=a.alternate;return a===Ee||s!==null&&s===Ee}function U1(a,s){Yl=uf=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function q1(a,s,u){if((u&4194048)!==0){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,Yw(a,u)}}var Bu={readContext:er,use:ff,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};Bu.useEffectEvent=yt;var H1={readContext:er,use:ff,useCallback:function(a,s){return xr().memoizedState=[a,s===void 0?null:s],a},useContext:er,useEffect:_1,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,mf(4194308,4,T1.bind(null,s,a),u)},useLayoutEffect:function(a,s){return mf(4194308,4,a,s)},useInsertionEffect:function(a,s){mf(4,2,a,s)},useMemo:function(a,s){var u=xr();s=s===void 0?null:s;var m=a();if(js){ii(!0);try{a()}finally{ii(!1)}}return u.memoizedState=[m,s],m},useReducer:function(a,s,u){var m=xr();if(u!==void 0){var g=u(s);if(js){ii(!0);try{u(s)}finally{ii(!1)}}}else g=s;return m.memoizedState=m.baseState=g,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:g},m.queue=a,a=a.dispatch=eL.bind(null,Ee,a),[m.memoizedState,a]},useRef:function(a){var s=xr();return a={current:a},s.memoizedState=a},useState:function(a){a=Ky(a);var s=a.queue,u=B1.bind(null,Ee,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:Vy,useDeferredValue:function(a,s){var u=xr();return Qy(u,a,s)},useTransition:function(){var a=Ky(!1);return a=k1.bind(null,Ee,a.queue,!0,!1),xr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var m=Ee,g=xr();if(Le){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),rt===null)throw Error(n(349));(ke&127)!==0||c1(m,s,u)}g.memoizedState=u;var j={value:u,getSnapshot:s};return g.queue=j,_1(f1.bind(null,m,j,a),[a]),m.flags|=2048,Ql(9,{destroy:void 0},d1.bind(null,m,j,u,s),null),u},useId:function(){var a=xr(),s=rt.identifierPrefix;if(Le){var u=Gn,m=Kn;u=(m&~(1<<32-Fr(m)-1)).toString(32)+u,s="_"+s+"R_"+u,u=cf++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=YI++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:Wy,useFormState:j1,useActionState:j1,useOptimistic:function(a){var s=xr();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=Zy.bind(null,Ee,!0,u),u.dispatch=s,[a,s]},useMemoCache:qy,useCacheRefresh:function(){return xr().memoizedState=JI.bind(null,Ee)},useEffectEvent:function(a){var s=xr(),u={impl:a};return s.memoizedState=u,function(){if((Ke&2)!==0)throw Error(n(440));return u.impl.apply(void 0,arguments)}}},Jy={readContext:er,use:ff,useCallback:M1,useContext:er,useEffect:Yy,useImperativeHandle:P1,useInsertionEffect:A1,useLayoutEffect:C1,useMemo:R1,useReducer:hf,useRef:O1,useState:function(){return hf(Sa)},useDebugValue:Vy,useDeferredValue:function(a,s){var u=St();return D1(u,Ze.memoizedState,a,s)},useTransition:function(){var a=hf(Sa)[0],s=St().memoizedState;return[typeof a=="boolean"?a:$u(a),s]},useSyncExternalStore:u1,useId:$1,useHostTransitionStatus:Wy,useFormState:w1,useActionState:w1,useOptimistic:function(a,s){var u=St();return p1(u,Ze,a,s)},useMemoCache:qy,useCacheRefresh:z1};Jy.useEffectEvent=E1;var F1={readContext:er,use:ff,useCallback:M1,useContext:er,useEffect:Yy,useImperativeHandle:P1,useInsertionEffect:A1,useLayoutEffect:C1,useMemo:R1,useReducer:Fy,useRef:O1,useState:function(){return Fy(Sa)},useDebugValue:Vy,useDeferredValue:function(a,s){var u=St();return Ze===null?Qy(u,a,s):D1(u,Ze.memoizedState,a,s)},useTransition:function(){var a=Fy(Sa)[0],s=St().memoizedState;return[typeof a=="boolean"?a:$u(a),s]},useSyncExternalStore:u1,useId:$1,useHostTransitionStatus:Wy,useFormState:N1,useActionState:N1,useOptimistic:function(a,s){var u=St();return Ze!==null?p1(u,Ze,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:qy,useCacheRefresh:z1};F1.useEffectEvent=E1;function ev(a,s,u,m){s=a.memoizedState,u=u(m,s),u=u==null?s:y({},s,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var tv={enqueueSetState:function(a,s,u){a=a._reactInternals;var m=Wr(),g=hi(m);g.payload=s,u!=null&&(g.callback=u),s=mi(a,g,m),s!==null&&(kr(s,a,m),Du(s,a,m))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var m=Wr(),g=hi(m);g.tag=1,g.payload=s,u!=null&&(g.callback=u),s=mi(a,g,m),s!==null&&(kr(s,a,m),Du(s,a,m))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Wr(),m=hi(u);m.tag=2,s!=null&&(m.callback=s),s=mi(a,m,u),s!==null&&(kr(s,a,u),Du(s,a,u))}};function K1(a,s,u,m,g,j,_){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,j,_):s.prototype&&s.prototype.isPureReactComponent?!_u(u,m)||!_u(g,j):!0}function G1(a,s,u,m){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,m),s.state!==a&&tv.enqueueReplaceState(s,s.state,null)}function ws(a,s){var u=s;if("ref"in s){u={};for(var m in s)m!=="ref"&&(u[m]=s[m])}if(a=a.defaultProps){u===s&&(u=y({},u));for(var g in a)u[g]===void 0&&(u[g]=a[g])}return u}function Y1(a){Yd(a)}function V1(a){console.error(a)}function Q1(a){Yd(a)}function vf(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function X1(a,s,u){try{var m=a.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function rv(a,s,u){return u=hi(u),u.tag=3,u.payload={element:null},u.callback=function(){vf(a,s)},u}function W1(a){return a=hi(a),a.tag=3,a}function Z1(a,s,u,m){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var j=m.value;a.payload=function(){return g(j)},a.callback=function(){X1(s,u,m)}}var _=u.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(a.callback=function(){X1(s,u,m),typeof g!="function"&&(bi===null?bi=new Set([this]):bi.add(this));var P=m.stack;this.componentDidCatch(m.value,{componentStack:P!==null?P:""})})}function tL(a,s,u,m,g){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=u.alternate,s!==null&&Ul(s,u,g,!0),u=Yr.current,u!==null){switch(u.tag){case 31:case 13:return hn===null?Cf():u.alternate===null&&vt===0&&(vt=3),u.flags&=-257,u.flags|=65536,u.lanes=g,m===nf?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([m]):s.add(m),Ev(a,m,g)),!1;case 22:return u.flags|=65536,m===nf?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([m]):u.add(m)),Ev(a,m,g)),!1}throw Error(n(435,u.tag))}return Ev(a,m,g),Cf(),!1}if(Le)return s=Yr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=g,m!==jy&&(a=Error(n(422),{cause:m}),Cu(un(a,u)))):(m!==jy&&(s=Error(n(423),{cause:m}),Cu(un(s,u))),a=a.current.alternate,a.flags|=65536,g&=-g,a.lanes|=g,m=un(m,u),g=rv(a.stateNode,m,g),My(a,g),vt!==4&&(vt=2)),!1;var j=Error(n(520),{cause:m});if(j=un(j,u),Vu===null?Vu=[j]:Vu.push(j),vt!==4&&(vt=2),s===null)return!0;m=un(m,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=g&-g,u.lanes|=a,a=rv(u.stateNode,m,a),My(u,a),!1;case 1:if(s=u.type,j=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(bi===null||!bi.has(j))))return u.flags|=65536,g&=-g,u.lanes|=g,g=W1(g),Z1(g,a,u,m),My(u,g),!1}u=u.return}while(u!==null);return!1}var nv=Error(n(461)),Pt=!1;function tr(a,s,u,m){s.child=a===null?r1(s,null,u,m):bs(s,a.child,u,m)}function J1(a,s,u,m,g){u=u.render;var j=s.ref;if("ref"in m){var _={};for(var P in m)P!=="ref"&&(_[P]=m[P])}else _=m;return ys(s),m=$y(a,s,u,_,j,g),P=zy(),a!==null&&!Pt?(By(a,s,g),Na(a,s,g)):(Le&&P&&xy(s),s.flags|=1,tr(a,s,m,g),s.child)}function eN(a,s,u,m,g){if(a===null){var j=u.type;return typeof j=="function"&&!yy(j)&&j.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=j,tN(a,s,j,m,g)):(a=Wd(u.type,null,m,s,s.mode,g),a.ref=s.ref,a.return=s,s.child=a)}if(j=a.child,!dv(a,g)){var _=j.memoizedProps;if(u=u.compare,u=u!==null?u:_u,u(_,m)&&a.ref===s.ref)return Na(a,s,g)}return s.flags|=1,a=ga(j,m),a.ref=s.ref,a.return=s,s.child=a}function tN(a,s,u,m,g){if(a!==null){var j=a.memoizedProps;if(_u(j,m)&&a.ref===s.ref)if(Pt=!1,s.pendingProps=m=j,dv(a,g))(a.flags&131072)!==0&&(Pt=!0);else return s.lanes=a.lanes,Na(a,s,g)}return av(a,s,u,m,g)}function rN(a,s,u,m){var g=m.children,j=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((s.flags&128)!==0){if(j=j!==null?j.baseLanes|u:u,a!==null){for(m=s.child=a.child,g=0;m!==null;)g=g|m.lanes|m.childLanes,m=m.sibling;m=g&~j}else m=0,s.child=null;return nN(a,s,j,u,m)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&tf(s,j!==null?j.cachePool:null),j!==null?i1(s,j):Dy(),s1(s);else return m=s.lanes=536870912,nN(a,s,j!==null?j.baseLanes|u:u,u,m)}else j!==null?(tf(s,j.cachePool),i1(s,j),yi(),s.memoizedState=null):(a!==null&&tf(s,null),Dy(),yi());return tr(a,s,g,u),s.child}function Uu(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function nN(a,s,u,m,g){var j=Ay();return j=j===null?null:{parent:Ct._currentValue,pool:j},s.memoizedState={baseLanes:u,cachePool:j},a!==null&&tf(s,null),Dy(),s1(s),a!==null&&Ul(a,s,m,!0),s.childLanes=g,null}function gf(a,s){return s=bf({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function aN(a,s,u){return bs(s,a.child,null,u),a=gf(s,s.pendingProps),a.flags|=2,Vr(s),s.memoizedState=null,a}function rL(a,s,u){var m=s.pendingProps,g=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Le){if(m.mode==="hidden")return a=gf(s,m),s.lanes=536870912,Uu(null,a);if(Iy(s),(a=it)?(a=yO(a,fn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:oi!==null?{id:Kn,overflow:Gn}:null,retryLane:536870912,hydrationErrors:null},u=US(a),u.return=s,s.child=u,Jt=s,it=null)):a=null,a===null)throw ci(s);return s.lanes=536870912,null}return gf(s,m)}var j=a.memoizedState;if(j!==null){var _=j.dehydrated;if(Iy(s),g)if(s.flags&256)s.flags&=-257,s=aN(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(n(558));else if(Pt||Ul(a,s,u,!1),g=(u&a.childLanes)!==0,Pt||g){if(m=rt,m!==null&&(_=Vw(m,u),_!==0&&_!==j.retryLane))throw j.retryLane=_,fs(a,_),kr(m,a,_),nv;Cf(),s=aN(a,s,u)}else a=j.treeContext,it=mn(_.nextSibling),Jt=s,Le=!0,ui=null,fn=!1,a!==null&&FS(s,a),s=gf(s,m),s.flags|=4096;return s}return a=ga(a.child,{mode:m.mode,children:m.children}),a.ref=s.ref,s.child=a,a.return=s,a}function xf(a,s){var u=s.ref;if(u===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(n(284));(a===null||a.ref!==u)&&(s.flags|=4194816)}}function av(a,s,u,m,g){return ys(s),u=$y(a,s,u,m,void 0,g),m=zy(),a!==null&&!Pt?(By(a,s,g),Na(a,s,g)):(Le&&m&&xy(s),s.flags|=1,tr(a,s,u,g),s.child)}function iN(a,s,u,m,g,j){return ys(s),s.updateQueue=null,u=o1(s,m,u,g),l1(a),m=zy(),a!==null&&!Pt?(By(a,s,j),Na(a,s,j)):(Le&&m&&xy(s),s.flags|=1,tr(a,s,u,j),s.child)}function sN(a,s,u,m,g){if(ys(s),s.stateNode===null){var j=Ll,_=u.contextType;typeof _=="object"&&_!==null&&(j=er(_)),j=new u(m,j),s.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=tv,s.stateNode=j,j._reactInternals=s,j=s.stateNode,j.props=m,j.state=s.memoizedState,j.refs={},Ty(s),_=u.contextType,j.context=typeof _=="object"&&_!==null?er(_):Ll,j.state=s.memoizedState,_=u.getDerivedStateFromProps,typeof _=="function"&&(ev(s,u,_,m),j.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(_=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),_!==j.state&&tv.enqueueReplaceState(j,j.state,null),Iu(s,m,j,g),ku(),j.state=s.memoizedState),typeof j.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(a===null){j=s.stateNode;var P=s.memoizedProps,z=ws(u,P);j.props=z;var Y=j.context,te=u.contextType;_=Ll,typeof te=="object"&&te!==null&&(_=er(te));var se=u.getDerivedStateFromProps;te=typeof se=="function"||typeof j.getSnapshotBeforeUpdate=="function",P=s.pendingProps!==P,te||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(P||Y!==_)&&G1(s,j,m,_),fi=!1;var Q=s.memoizedState;j.state=Q,Iu(s,m,j,g),ku(),Y=s.memoizedState,P||Q!==Y||fi?(typeof se=="function"&&(ev(s,u,se,m),Y=s.memoizedState),(z=fi||K1(s,u,z,m,Q,Y,_))?(te||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(s.flags|=4194308)):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=Y),j.props=m,j.state=Y,j.context=_,m=z):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{j=s.stateNode,Py(a,s),_=s.memoizedProps,te=ws(u,_),j.props=te,se=s.pendingProps,Q=j.context,Y=u.contextType,z=Ll,typeof Y=="object"&&Y!==null&&(z=er(Y)),P=u.getDerivedStateFromProps,(Y=typeof P=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(_!==se||Q!==z)&&G1(s,j,m,z),fi=!1,Q=s.memoizedState,j.state=Q,Iu(s,m,j,g),ku();var Z=s.memoizedState;_!==se||Q!==Z||fi||a!==null&&a.dependencies!==null&&Jd(a.dependencies)?(typeof P=="function"&&(ev(s,u,P,m),Z=s.memoizedState),(te=fi||K1(s,u,te,m,Q,Z,z)||a!==null&&a.dependencies!==null&&Jd(a.dependencies))?(Y||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(m,Z,z),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(m,Z,z)),typeof j.componentDidUpdate=="function"&&(s.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof j.componentDidUpdate!="function"||_===a.memoizedProps&&Q===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||_===a.memoizedProps&&Q===a.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=Z),j.props=m,j.state=Z,j.context=z,m=te):(typeof j.componentDidUpdate!="function"||_===a.memoizedProps&&Q===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||_===a.memoizedProps&&Q===a.memoizedState||(s.flags|=1024),m=!1)}return j=m,xf(a,s),m=(s.flags&128)!==0,j||m?(j=s.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:j.render(),s.flags|=1,a!==null&&m?(s.child=bs(s,a.child,null,g),s.child=bs(s,null,u,g)):tr(a,s,u,g),s.memoizedState=j.state,a=s.child):a=Na(a,s,g),a}function lN(a,s,u,m){return ms(),s.flags|=256,tr(a,s,u,m),s.child}var iv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sv(a){return{baseLanes:a,cachePool:XS()}}function lv(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=Xr),a}function oN(a,s,u){var m=s.pendingProps,g=!1,j=(s.flags&128)!==0,_;if((_=j)||(_=a!==null&&a.memoizedState===null?!1:(wt.current&2)!==0),_&&(g=!0,s.flags&=-129),_=(s.flags&32)!==0,s.flags&=-33,a===null){if(Le){if(g?pi(s):yi(),(a=it)?(a=yO(a,fn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:oi!==null?{id:Kn,overflow:Gn}:null,retryLane:536870912,hydrationErrors:null},u=US(a),u.return=s,s.child=u,Jt=s,it=null)):a=null,a===null)throw ci(s);return Hv(a)?s.lanes=32:s.lanes=536870912,null}var P=m.children;return m=m.fallback,g?(yi(),g=s.mode,P=bf({mode:"hidden",children:P},g),m=hs(m,g,u,null),P.return=s,m.return=s,P.sibling=m,s.child=P,m=s.child,m.memoizedState=sv(u),m.childLanes=lv(a,_,u),s.memoizedState=iv,Uu(null,m)):(pi(s),ov(s,P))}var z=a.memoizedState;if(z!==null&&(P=z.dehydrated,P!==null)){if(j)s.flags&256?(pi(s),s.flags&=-257,s=uv(a,s,u)):s.memoizedState!==null?(yi(),s.child=a.child,s.flags|=128,s=null):(yi(),P=m.fallback,g=s.mode,m=bf({mode:"visible",children:m.children},g),P=hs(P,g,u,null),P.flags|=2,m.return=s,P.return=s,m.sibling=P,s.child=m,bs(s,a.child,null,u),m=s.child,m.memoizedState=sv(u),m.childLanes=lv(a,_,u),s.memoizedState=iv,s=Uu(null,m));else if(pi(s),Hv(P)){if(_=P.nextSibling&&P.nextSibling.dataset,_)var Y=_.dgst;_=Y,m=Error(n(419)),m.stack="",m.digest=_,Cu({value:m,source:null,stack:null}),s=uv(a,s,u)}else if(Pt||Ul(a,s,u,!1),_=(u&a.childLanes)!==0,Pt||_){if(_=rt,_!==null&&(m=Vw(_,u),m!==0&&m!==z.retryLane))throw z.retryLane=m,fs(a,m),kr(_,a,m),nv;qv(P)||Cf(),s=uv(a,s,u)}else qv(P)?(s.flags|=192,s.child=a.child,s=null):(a=z.treeContext,it=mn(P.nextSibling),Jt=s,Le=!0,ui=null,fn=!1,a!==null&&FS(s,a),s=ov(s,m.children),s.flags|=4096);return s}return g?(yi(),P=m.fallback,g=s.mode,z=a.child,Y=z.sibling,m=ga(z,{mode:"hidden",children:m.children}),m.subtreeFlags=z.subtreeFlags&65011712,Y!==null?P=ga(Y,P):(P=hs(P,g,u,null),P.flags|=2),P.return=s,m.return=s,m.sibling=P,s.child=m,Uu(null,m),m=s.child,P=a.child.memoizedState,P===null?P=sv(u):(g=P.cachePool,g!==null?(z=Ct._currentValue,g=g.parent!==z?{parent:z,pool:z}:g):g=XS(),P={baseLanes:P.baseLanes|u,cachePool:g}),m.memoizedState=P,m.childLanes=lv(a,_,u),s.memoizedState=iv,Uu(a.child,m)):(pi(s),u=a.child,a=u.sibling,u=ga(u,{mode:"visible",children:m.children}),u.return=s,u.sibling=null,a!==null&&(_=s.deletions,_===null?(s.deletions=[a],s.flags|=16):_.push(a)),s.child=u,s.memoizedState=null,u)}function ov(a,s){return s=bf({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function bf(a,s){return a=Gr(22,a,null,s),a.lanes=0,a}function uv(a,s,u){return bs(s,a.child,null,u),a=ov(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function uN(a,s,u){a.lanes|=s;var m=a.alternate;m!==null&&(m.lanes|=s),Ny(a.return,s,u)}function cv(a,s,u,m,g,j){var _=a.memoizedState;_===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:g,treeForkCount:j}:(_.isBackwards=s,_.rendering=null,_.renderingStartTime=0,_.last=m,_.tail=u,_.tailMode=g,_.treeForkCount=j)}function cN(a,s,u){var m=s.pendingProps,g=m.revealOrder,j=m.tail;m=m.children;var _=wt.current,P=(_&2)!==0;if(P?(_=_&1|2,s.flags|=128):_&=1,le(wt,_),tr(a,s,m,u),m=Le?Au:0,!P&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&uN(a,u,s);else if(a.tag===19)uN(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(g){case"forwards":for(u=s.child,g=null;u!==null;)a=u.alternate,a!==null&&of(a)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),cv(s,!1,g,u,j,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(a=g.alternate,a!==null&&of(a)===null){s.child=g;break}a=g.sibling,g.sibling=u,u=g,g=a}cv(s,!0,u,null,j,m);break;case"together":cv(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function Na(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),xi|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(Ul(a,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(n(153));if(s.child!==null){for(a=s.child,u=ga(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=ga(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function dv(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&Jd(a)))}function nL(a,s,u){switch(s.tag){case 3:Pe(s,s.stateNode.containerInfo),di(s,Ct,a.memoizedState.cache),ms();break;case 27:case 5:ee(s);break;case 4:Pe(s,s.stateNode.containerInfo);break;case 10:di(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Iy(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(pi(s),s.flags|=128,null):(u&s.child.childLanes)!==0?oN(a,s,u):(pi(s),a=Na(a,s,u),a!==null?a.sibling:null);pi(s);break;case 19:var g=(a.flags&128)!==0;if(m=(u&s.childLanes)!==0,m||(Ul(a,s,u,!1),m=(u&s.childLanes)!==0),g){if(m)return cN(a,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),le(wt,wt.current),m)break;return null;case 22:return s.lanes=0,rN(a,s,u,s.pendingProps);case 24:di(s,Ct,a.memoizedState.cache)}return Na(a,s,u)}function dN(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Pt=!0;else{if(!dv(a,u)&&(s.flags&128)===0)return Pt=!1,nL(a,s,u);Pt=(a.flags&131072)!==0}else Pt=!1,Le&&(s.flags&1048576)!==0&&HS(s,Au,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(a=gs(s.elementType),s.type=a,typeof a=="function")yy(a)?(m=ws(a,m),s.tag=1,s=sN(null,s,a,m,u)):(s.tag=0,s=av(null,s,a,m,u));else{if(a!=null){var g=a.$$typeof;if(g===A){s.tag=11,s=J1(null,s,a,m,u);break e}else if(g===R){s.tag=14,s=eN(null,s,a,m,u);break e}}throw s=re(a)||a,Error(n(306,s,""))}}return s;case 0:return av(a,s,s.type,s.pendingProps,u);case 1:return m=s.type,g=ws(m,s.pendingProps),sN(a,s,m,g,u);case 3:e:{if(Pe(s,s.stateNode.containerInfo),a===null)throw Error(n(387));m=s.pendingProps;var j=s.memoizedState;g=j.element,Py(a,s),Iu(s,m,null,u);var _=s.memoizedState;if(m=_.cache,di(s,Ct,m),m!==j.cache&&Oy(s,[Ct],u,!0),ku(),m=_.element,j.isDehydrated)if(j={element:m,isDehydrated:!1,cache:_.cache},s.updateQueue.baseState=j,s.memoizedState=j,s.flags&256){s=lN(a,s,m,u);break e}else if(m!==g){g=un(Error(n(424)),s),Cu(g),s=lN(a,s,m,u);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(it=mn(a.firstChild),Jt=s,Le=!0,ui=null,fn=!0,u=r1(s,null,m,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(ms(),m===g){s=Na(a,s,u);break e}tr(a,s,m,u)}s=s.child}return s;case 26:return xf(a,s),a===null?(u=wO(s.type,null,s.pendingProps,null))?s.memoizedState=u:Le||(u=s.type,a=s.pendingProps,m=If(je.current).createElement(u),m[Zt]=s,m[Cr]=a,rr(m,u,a),Ut(m),s.stateNode=m):s.memoizedState=wO(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return ee(s),a===null&&Le&&(m=s.stateNode=xO(s.type,s.pendingProps,je.current),Jt=s,fn=!0,g=it,Ni(s.type)?(Fv=g,it=mn(m.firstChild)):it=g),tr(a,s,s.pendingProps.children,u),xf(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Le&&((g=m=it)&&(m=RL(m,s.type,s.pendingProps,fn),m!==null?(s.stateNode=m,Jt=s,it=mn(m.firstChild),fn=!1,g=!0):g=!1),g||ci(s)),ee(s),g=s.type,j=s.pendingProps,_=a!==null?a.memoizedProps:null,m=j.children,zv(g,j)?m=null:_!==null&&zv(g,_)&&(s.flags|=32),s.memoizedState!==null&&(g=$y(a,s,VI,null,null,u),rc._currentValue=g),xf(a,s),tr(a,s,m,u),s.child;case 6:return a===null&&Le&&((a=u=it)&&(u=DL(u,s.pendingProps,fn),u!==null?(s.stateNode=u,Jt=s,it=null,a=!0):a=!1),a||ci(s)),null;case 13:return oN(a,s,u);case 4:return Pe(s,s.stateNode.containerInfo),m=s.pendingProps,a===null?s.child=bs(s,null,m,u):tr(a,s,m,u),s.child;case 11:return J1(a,s,s.type,s.pendingProps,u);case 7:return tr(a,s,s.pendingProps,u),s.child;case 8:return tr(a,s,s.pendingProps.children,u),s.child;case 12:return tr(a,s,s.pendingProps.children,u),s.child;case 10:return m=s.pendingProps,di(s,s.type,m.value),tr(a,s,m.children,u),s.child;case 9:return g=s.type._context,m=s.pendingProps.children,ys(s),g=er(g),m=m(g),s.flags|=1,tr(a,s,m,u),s.child;case 14:return eN(a,s,s.type,s.pendingProps,u);case 15:return tN(a,s,s.type,s.pendingProps,u);case 19:return cN(a,s,u);case 31:return rL(a,s,u);case 22:return rN(a,s,u,s.pendingProps);case 24:return ys(s),m=er(Ct),a===null?(g=Ay(),g===null&&(g=rt,j=_y(),g.pooledCache=j,j.refCount++,j!==null&&(g.pooledCacheLanes|=u),g=j),s.memoizedState={parent:m,cache:g},Ty(s),di(s,Ct,g)):((a.lanes&u)!==0&&(Py(a,s),Iu(s,null,null,u),ku()),g=a.memoizedState,j=s.memoizedState,g.parent!==m?(g={parent:m,cache:m},s.memoizedState=g,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=g),di(s,Ct,m)):(m=j.cache,di(s,Ct,m),m!==g.cache&&Oy(s,[Ct],u,!0))),tr(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(n(156,s.tag))}function Oa(a){a.flags|=4}function fv(a,s,u,m,g){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(g&335544128)===g)if(a.stateNode.complete)a.flags|=8192;else if($N())a.flags|=8192;else throw xs=nf,Cy}else a.flags&=-16777217}function fN(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!EO(s))if($N())a.flags|=8192;else throw xs=nf,Cy}function jf(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?Kw():536870912,a.lanes|=s,Jl|=s)}function qu(a,s){if(!Le)switch(a.tailMode){case"hidden":s=a.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:m.sibling=null}}function st(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,m=0;if(s)for(var g=a.child;g!==null;)u|=g.lanes|g.childLanes,m|=g.subtreeFlags&65011712,m|=g.flags&65011712,g.return=a,g=g.sibling;else for(g=a.child;g!==null;)u|=g.lanes|g.childLanes,m|=g.subtreeFlags,m|=g.flags,g.return=a,g=g.sibling;return a.subtreeFlags|=m,a.childLanes=u,s}function aL(a,s,u){var m=s.pendingProps;switch(by(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(s),null;case 1:return st(s),null;case 3:return u=s.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),ja(Ct),de(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(Bl(s)?Oa(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,wy())),st(s),null;case 26:var g=s.type,j=s.memoizedState;return a===null?(Oa(s),j!==null?(st(s),fN(s,j)):(st(s),fv(s,g,null,m,u))):j?j!==a.memoizedState?(Oa(s),st(s),fN(s,j)):(st(s),s.flags&=-16777217):(a=a.memoizedProps,a!==m&&Oa(s),st(s),fv(s,g,a,m,u)),null;case 27:if(Se(s),u=je.current,g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&Oa(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return st(s),null}a=oe.current,Bl(s)?KS(s):(a=xO(g,m,u),s.stateNode=a,Oa(s))}return st(s),null;case 5:if(Se(s),g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&Oa(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return st(s),null}if(j=oe.current,Bl(s))KS(s);else{var _=If(je.current);switch(j){case 1:j=_.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:j=_.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":j=_.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":j=_.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":j=_.createElement("div"),j.innerHTML="<script><\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof m.is=="string"?_.createElement("select",{is:m.is}):_.createElement("select"),m.multiple?j.multiple=!0:m.size&&(j.size=m.size);break;default:j=typeof m.is=="string"?_.createElement(g,{is:m.is}):_.createElement(g)}}j[Zt]=s,j[Cr]=m;e:for(_=s.child;_!==null;){if(_.tag===5||_.tag===6)j.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===s)break e;for(;_.sibling===null;){if(_.return===null||_.return===s)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}s.stateNode=j;e:switch(rr(j,g,m),g){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Oa(s)}}return st(s),fv(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==m&&Oa(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(n(166));if(a=je.current,Bl(s)){if(a=s.stateNode,u=s.memoizedProps,m=null,g=Jt,g!==null)switch(g.tag){case 27:case 5:m=g.memoizedProps}a[Zt]=s,a=!!(a.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||oO(a.nodeValue,u)),a||ci(s,!0)}else a=If(a).createTextNode(m),a[Zt]=s,s.stateNode=a}return st(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(m=Bl(s),u!==null){if(a===null){if(!m)throw Error(n(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(557));a[Zt]=s}else ms(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;st(s),a=!1}else u=wy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(Vr(s),s):(Vr(s),null);if((s.flags&128)!==0)throw Error(n(558))}return st(s),null;case 13:if(m=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(g=Bl(s),m!==null&&m.dehydrated!==null){if(a===null){if(!g)throw Error(n(318));if(g=s.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(n(317));g[Zt]=s}else ms(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;st(s),g=!1}else g=wy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=g),g=!0;if(!g)return s.flags&256?(Vr(s),s):(Vr(s),null)}return Vr(s),(s.flags&128)!==0?(s.lanes=u,s):(u=m!==null,a=a!==null&&a.memoizedState!==null,u&&(m=s.child,g=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(g=m.alternate.memoizedState.cachePool.pool),j=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(j=m.memoizedState.cachePool.pool),j!==g&&(m.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),jf(s,s.updateQueue),st(s),null);case 4:return de(),a===null&&Dv(s.stateNode.containerInfo),st(s),null;case 10:return ja(s.type),st(s),null;case 19:if(X(wt),m=s.memoizedState,m===null)return st(s),null;if(g=(s.flags&128)!==0,j=m.rendering,j===null)if(g)qu(m,!1);else{if(vt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(j=of(a),j!==null){for(s.flags|=128,qu(m,!1),a=j.updateQueue,s.updateQueue=a,jf(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)BS(u,a),u=u.sibling;return le(wt,wt.current&1|2),Le&&xa(s,m.treeForkCount),s.child}a=a.sibling}m.tail!==null&&Te()>_f&&(s.flags|=128,g=!0,qu(m,!1),s.lanes=4194304)}else{if(!g)if(a=of(j),a!==null){if(s.flags|=128,g=!0,a=a.updateQueue,s.updateQueue=a,jf(s,a),qu(m,!0),m.tail===null&&m.tailMode==="hidden"&&!j.alternate&&!Le)return st(s),null}else 2*Te()-m.renderingStartTime>_f&&u!==536870912&&(s.flags|=128,g=!0,qu(m,!1),s.lanes=4194304);m.isBackwards?(j.sibling=s.child,s.child=j):(a=m.last,a!==null?a.sibling=j:s.child=j,m.last=j)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=Te(),a.sibling=null,u=wt.current,le(wt,g?u&1|2:u&1),Le&&xa(s,m.treeForkCount),a):(st(s),null);case 22:case 23:return Vr(s),ky(),m=s.memoizedState!==null,a!==null?a.memoizedState!==null!==m&&(s.flags|=8192):m&&(s.flags|=8192),m?(u&536870912)!==0&&(s.flags&128)===0&&(st(s),s.subtreeFlags&6&&(s.flags|=8192)):st(s),u=s.updateQueue,u!==null&&jf(s,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==u&&(s.flags|=2048),a!==null&&X(vs),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),ja(Ct),st(s),null;case 25:return null;case 30:return null}throw Error(n(156,s.tag))}function iL(a,s){switch(by(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return ja(Ct),de(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return Se(s),null;case 31:if(s.memoizedState!==null){if(Vr(s),s.alternate===null)throw Error(n(340));ms()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Vr(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ms()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return X(wt),null;case 4:return de(),null;case 10:return ja(s.type),null;case 22:case 23:return Vr(s),ky(),a!==null&&X(vs),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return ja(Ct),null;case 25:return null;default:return null}}function hN(a,s){switch(by(s),s.tag){case 3:ja(Ct),de();break;case 26:case 27:case 5:Se(s);break;case 4:de();break;case 31:s.memoizedState!==null&&Vr(s);break;case 13:Vr(s);break;case 19:X(wt);break;case 10:ja(s.type);break;case 22:case 23:Vr(s),ky(),a!==null&&X(vs);break;case 24:ja(Ct)}}function Hu(a,s){try{var u=s.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var g=m.next;u=g;do{if((u.tag&a)===a){m=void 0;var j=u.create,_=u.inst;m=j(),_.destroy=m}u=u.next}while(u!==g)}}catch(P){Ve(s,s.return,P)}}function vi(a,s,u){try{var m=s.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var j=g.next;m=j;do{if((m.tag&a)===a){var _=m.inst,P=_.destroy;if(P!==void 0){_.destroy=void 0,g=s;var z=u,Y=P;try{Y()}catch(te){Ve(g,z,te)}}}m=m.next}while(m!==j)}}catch(te){Ve(s,s.return,te)}}function mN(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{a1(s,u)}catch(m){Ve(a,a.return,m)}}}function pN(a,s,u){u.props=ws(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(m){Ve(a,s,m)}}function Fu(a,s){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var m=a.stateNode;break;case 30:m=a.stateNode;break;default:m=a.stateNode}typeof u=="function"?a.refCleanup=u(m):u.current=m}}catch(g){Ve(a,s,g)}}function Yn(a,s){var u=a.ref,m=a.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(g){Ve(a,s,g)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){Ve(a,s,g)}else u.current=null}function yN(a){var s=a.type,u=a.memoizedProps,m=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(g){Ve(a,a.return,g)}}function hv(a,s,u){try{var m=a.stateNode;EL(m,a.type,u,s),m[Cr]=s}catch(g){Ve(a,a.return,g)}}function vN(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Ni(a.type)||a.tag===4}function mv(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||vN(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Ni(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function pv(a,s,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(a),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=ya));else if(m!==4&&(m===27&&Ni(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(pv(a,s,u),a=a.sibling;a!==null;)pv(a,s,u),a=a.sibling}function wf(a,s,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,s?u.insertBefore(a,s):u.appendChild(a);else if(m!==4&&(m===27&&Ni(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(wf(a,s,u),a=a.sibling;a!==null;)wf(a,s,u),a=a.sibling}function gN(a){var s=a.stateNode,u=a.memoizedProps;try{for(var m=a.type,g=s.attributes;g.length;)s.removeAttributeNode(g[0]);rr(s,m,u),s[Zt]=a,s[Cr]=u}catch(j){Ve(a,a.return,j)}}var _a=!1,Mt=!1,yv=!1,xN=typeof WeakSet=="function"?WeakSet:Set,qt=null;function sL(a,s){if(a=a.containerInfo,Lv=Hf,a=PS(a),uy(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var g=m.anchorOffset,j=m.focusNode;m=m.focusOffset;try{u.nodeType,j.nodeType}catch{u=null;break e}var _=0,P=-1,z=-1,Y=0,te=0,se=a,Q=null;t:for(;;){for(var Z;se!==u||g!==0&&se.nodeType!==3||(P=_+g),se!==j||m!==0&&se.nodeType!==3||(z=_+m),se.nodeType===3&&(_+=se.nodeValue.length),(Z=se.firstChild)!==null;)Q=se,se=Z;for(;;){if(se===a)break t;if(Q===u&&++Y===g&&(P=_),Q===j&&++te===m&&(z=_),(Z=se.nextSibling)!==null)break;se=Q,Q=se.parentNode}se=Z}u=P===-1||z===-1?null:{start:P,end:z}}else u=null}u=u||{start:0,end:0}}else u=null;for($v={focusedElem:a,selectionRange:u},Hf=!1,qt=s;qt!==null;)if(s=qt,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,qt=a;else for(;qt!==null;){switch(s=qt,j=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)g=a[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&j!==null){a=void 0,u=s,g=j.memoizedProps,j=j.memoizedState,m=u.stateNode;try{var pe=ws(u.type,g);a=m.getSnapshotBeforeUpdate(pe,j),m.__reactInternalSnapshotBeforeUpdate=a}catch(we){Ve(u,u.return,we)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)Uv(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Uv(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(n(163))}if(a=s.sibling,a!==null){a.return=s.return,qt=a;break}qt=s.return}}function bN(a,s,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:Aa(a,u),m&4&&Hu(5,u);break;case 1:if(Aa(a,u),m&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(_){Ve(u,u.return,_)}else{var g=ws(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(g,s,a.__reactInternalSnapshotBeforeUpdate)}catch(_){Ve(u,u.return,_)}}m&64&&mN(u),m&512&&Fu(u,u.return);break;case 3:if(Aa(a,u),m&64&&(a=u.updateQueue,a!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{a1(a,s)}catch(_){Ve(u,u.return,_)}}break;case 27:s===null&&m&4&&gN(u);case 26:case 5:Aa(a,u),s===null&&m&4&&yN(u),m&512&&Fu(u,u.return);break;case 12:Aa(a,u);break;case 31:Aa(a,u),m&4&&SN(a,u);break;case 13:Aa(a,u),m&4&&NN(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=pL.bind(null,u),kL(a,u))));break;case 22:if(m=u.memoizedState!==null||_a,!m){s=s!==null&&s.memoizedState!==null||Mt,g=_a;var j=Mt;_a=m,(Mt=s)&&!j?Ca(a,u,(u.subtreeFlags&8772)!==0):Aa(a,u),_a=g,Mt=j}break;case 30:break;default:Aa(a,u)}}function jN(a){var s=a.alternate;s!==null&&(a.alternate=null,jN(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Gp(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var dt=null,Pr=!1;function Ea(a,s,u){for(u=u.child;u!==null;)wN(a,s,u),u=u.sibling}function wN(a,s,u){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(mu,u)}catch{}switch(u.tag){case 26:Mt||Yn(u,s),Ea(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Mt||Yn(u,s);var m=dt,g=Pr;Ni(u.type)&&(dt=u.stateNode,Pr=!1),Ea(a,s,u),Ju(u.stateNode),dt=m,Pr=g;break;case 5:Mt||Yn(u,s);case 6:if(m=dt,g=Pr,dt=null,Ea(a,s,u),dt=m,Pr=g,dt!==null)if(Pr)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(u.stateNode)}catch(j){Ve(u,s,j)}else try{dt.removeChild(u.stateNode)}catch(j){Ve(u,s,j)}break;case 18:dt!==null&&(Pr?(a=dt,mO(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),lo(a)):mO(dt,u.stateNode));break;case 4:m=dt,g=Pr,dt=u.stateNode.containerInfo,Pr=!0,Ea(a,s,u),dt=m,Pr=g;break;case 0:case 11:case 14:case 15:vi(2,u,s),Mt||vi(4,u,s),Ea(a,s,u);break;case 1:Mt||(Yn(u,s),m=u.stateNode,typeof m.componentWillUnmount=="function"&&pN(u,s,m)),Ea(a,s,u);break;case 21:Ea(a,s,u);break;case 22:Mt=(m=Mt)||u.memoizedState!==null,Ea(a,s,u),Mt=m;break;default:Ea(a,s,u)}}function SN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{lo(a)}catch(u){Ve(s,s.return,u)}}}function NN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{lo(a)}catch(u){Ve(s,s.return,u)}}function lL(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new xN),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new xN),s;default:throw Error(n(435,a.tag))}}function Sf(a,s){var u=lL(a);s.forEach(function(m){if(!u.has(m)){u.add(m);var g=yL.bind(null,a,m);m.then(g,g)}})}function Mr(a,s){var u=s.deletions;if(u!==null)for(var m=0;m<u.length;m++){var g=u[m],j=a,_=s,P=_;e:for(;P!==null;){switch(P.tag){case 27:if(Ni(P.type)){dt=P.stateNode,Pr=!1;break e}break;case 5:dt=P.stateNode,Pr=!1;break e;case 3:case 4:dt=P.stateNode.containerInfo,Pr=!0;break e}P=P.return}if(dt===null)throw Error(n(160));wN(j,_,g),dt=null,Pr=!1,j=g.alternate,j!==null&&(j.return=null),g.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)ON(s,a),s=s.sibling}var Tn=null;function ON(a,s){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Mr(s,a),Rr(a),m&4&&(vi(3,a,a.return),Hu(3,a),vi(5,a,a.return));break;case 1:Mr(s,a),Rr(a),m&512&&(Mt||u===null||Yn(u,u.return)),m&64&&_a&&(a=a.updateQueue,a!==null&&(m=a.callbacks,m!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var g=Tn;if(Mr(s,a),Rr(a),m&512&&(Mt||u===null||Yn(u,u.return)),m&4){var j=u!==null?u.memoizedState:null;if(m=a.memoizedState,u===null)if(m===null)if(a.stateNode===null){e:{m=a.type,u=a.memoizedProps,g=g.ownerDocument||g;t:switch(m){case"title":j=g.getElementsByTagName("title")[0],(!j||j[vu]||j[Zt]||j.namespaceURI==="http://www.w3.org/2000/svg"||j.hasAttribute("itemprop"))&&(j=g.createElement(m),g.head.insertBefore(j,g.querySelector("head > title"))),rr(j,m,u),j[Zt]=a,Ut(j),m=j;break e;case"link":var _=OO("link","href",g).get(m+(u.href||""));if(_){for(var P=0;P<_.length;P++)if(j=_[P],j.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&j.getAttribute("rel")===(u.rel==null?null:u.rel)&&j.getAttribute("title")===(u.title==null?null:u.title)&&j.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){_.splice(P,1);break t}}j=g.createElement(m),rr(j,m,u),g.head.appendChild(j);break;case"meta":if(_=OO("meta","content",g).get(m+(u.content||""))){for(P=0;P<_.length;P++)if(j=_[P],j.getAttribute("content")===(u.content==null?null:""+u.content)&&j.getAttribute("name")===(u.name==null?null:u.name)&&j.getAttribute("property")===(u.property==null?null:u.property)&&j.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&j.getAttribute("charset")===(u.charSet==null?null:u.charSet)){_.splice(P,1);break t}}j=g.createElement(m),rr(j,m,u),g.head.appendChild(j);break;default:throw Error(n(468,m))}j[Zt]=a,Ut(j),m=j}a.stateNode=m}else _O(g,a.type,a.stateNode);else a.stateNode=NO(g,m,a.memoizedProps);else j!==m?(j===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):j.count--,m===null?_O(g,a.type,a.stateNode):NO(g,m,a.memoizedProps)):m===null&&a.stateNode!==null&&hv(a,a.memoizedProps,u.memoizedProps)}break;case 27:Mr(s,a),Rr(a),m&512&&(Mt||u===null||Yn(u,u.return)),u!==null&&m&4&&hv(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Mr(s,a),Rr(a),m&512&&(Mt||u===null||Yn(u,u.return)),a.flags&32){g=a.stateNode;try{Tl(g,"")}catch(pe){Ve(a,a.return,pe)}}m&4&&a.stateNode!=null&&(g=a.memoizedProps,hv(a,g,u!==null?u.memoizedProps:g)),m&1024&&(yv=!0);break;case 6:if(Mr(s,a),Rr(a),m&4){if(a.stateNode===null)throw Error(n(162));m=a.memoizedProps,u=a.stateNode;try{u.nodeValue=m}catch(pe){Ve(a,a.return,pe)}}break;case 3:if(zf=null,g=Tn,Tn=Lf(s.containerInfo),Mr(s,a),Tn=g,Rr(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{lo(s.containerInfo)}catch(pe){Ve(a,a.return,pe)}yv&&(yv=!1,_N(a));break;case 4:m=Tn,Tn=Lf(a.stateNode.containerInfo),Mr(s,a),Rr(a),Tn=m;break;case 12:Mr(s,a),Rr(a);break;case 31:Mr(s,a),Rr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Sf(a,m)));break;case 13:Mr(s,a),Rr(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Of=Te()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Sf(a,m)));break;case 22:g=a.memoizedState!==null;var z=u!==null&&u.memoizedState!==null,Y=_a,te=Mt;if(_a=Y||g,Mt=te||z,Mr(s,a),Mt=te,_a=Y,Rr(a),m&8192)e:for(s=a.stateNode,s._visibility=g?s._visibility&-2:s._visibility|1,g&&(u===null||z||_a||Mt||Ss(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){z=u=s;try{if(j=z.stateNode,g)_=j.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{P=z.stateNode;var se=z.memoizedProps.style,Q=se!=null&&se.hasOwnProperty("display")?se.display:null;P.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(pe){Ve(z,z.return,pe)}}}else if(s.tag===6){if(u===null){z=s;try{z.stateNode.nodeValue=g?"":z.memoizedProps}catch(pe){Ve(z,z.return,pe)}}}else if(s.tag===18){if(u===null){z=s;try{var Z=z.stateNode;g?pO(Z,!0):pO(z.stateNode,!1)}catch(pe){Ve(z,z.return,pe)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}m&4&&(m=a.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,Sf(a,u))));break;case 19:Mr(s,a),Rr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Sf(a,m)));break;case 30:break;case 21:break;default:Mr(s,a),Rr(a)}}function Rr(a){var s=a.flags;if(s&2){try{for(var u,m=a.return;m!==null;){if(vN(m)){u=m;break}m=m.return}if(u==null)throw Error(n(160));switch(u.tag){case 27:var g=u.stateNode,j=mv(a);wf(a,j,g);break;case 5:var _=u.stateNode;u.flags&32&&(Tl(_,""),u.flags&=-33);var P=mv(a);wf(a,P,_);break;case 3:case 4:var z=u.stateNode.containerInfo,Y=mv(a);pv(a,Y,z);break;default:throw Error(n(161))}}catch(te){Ve(a,a.return,te)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function _N(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;_N(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function Aa(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)bN(a,s.alternate,s),s=s.sibling}function Ss(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:vi(4,s,s.return),Ss(s);break;case 1:Yn(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&pN(s,s.return,u),Ss(s);break;case 27:Ju(s.stateNode);case 26:case 5:Yn(s,s.return),Ss(s);break;case 22:s.memoizedState===null&&Ss(s);break;case 30:Ss(s);break;default:Ss(s)}a=a.sibling}}function Ca(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,g=a,j=s,_=j.flags;switch(j.tag){case 0:case 11:case 15:Ca(g,j,u),Hu(4,j);break;case 1:if(Ca(g,j,u),m=j,g=m.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(Y){Ve(m,m.return,Y)}if(m=j,g=m.updateQueue,g!==null){var P=m.stateNode;try{var z=g.shared.hiddenCallbacks;if(z!==null)for(g.shared.hiddenCallbacks=null,g=0;g<z.length;g++)n1(z[g],P)}catch(Y){Ve(m,m.return,Y)}}u&&_&64&&mN(j),Fu(j,j.return);break;case 27:gN(j);case 26:case 5:Ca(g,j,u),u&&m===null&&_&4&&yN(j),Fu(j,j.return);break;case 12:Ca(g,j,u);break;case 31:Ca(g,j,u),u&&_&4&&SN(g,j);break;case 13:Ca(g,j,u),u&&_&4&&NN(g,j);break;case 22:j.memoizedState===null&&Ca(g,j,u),Fu(j,j.return);break;case 30:break;default:Ca(g,j,u)}s=s.sibling}}function vv(a,s){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&Tu(u))}function gv(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Tu(a))}function Pn(a,s,u,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)EN(a,s,u,m),s=s.sibling}function EN(a,s,u,m){var g=s.flags;switch(s.tag){case 0:case 11:case 15:Pn(a,s,u,m),g&2048&&Hu(9,s);break;case 1:Pn(a,s,u,m);break;case 3:Pn(a,s,u,m),g&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Tu(a)));break;case 12:if(g&2048){Pn(a,s,u,m),a=s.stateNode;try{var j=s.memoizedProps,_=j.id,P=j.onPostCommit;typeof P=="function"&&P(_,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(z){Ve(s,s.return,z)}}else Pn(a,s,u,m);break;case 31:Pn(a,s,u,m);break;case 13:Pn(a,s,u,m);break;case 23:break;case 22:j=s.stateNode,_=s.alternate,s.memoizedState!==null?j._visibility&2?Pn(a,s,u,m):Ku(a,s):j._visibility&2?Pn(a,s,u,m):(j._visibility|=2,Xl(a,s,u,m,(s.subtreeFlags&10256)!==0||!1)),g&2048&&vv(_,s);break;case 24:Pn(a,s,u,m),g&2048&&gv(s.alternate,s);break;default:Pn(a,s,u,m)}}function Xl(a,s,u,m,g){for(g=g&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var j=a,_=s,P=u,z=m,Y=_.flags;switch(_.tag){case 0:case 11:case 15:Xl(j,_,P,z,g),Hu(8,_);break;case 23:break;case 22:var te=_.stateNode;_.memoizedState!==null?te._visibility&2?Xl(j,_,P,z,g):Ku(j,_):(te._visibility|=2,Xl(j,_,P,z,g)),g&&Y&2048&&vv(_.alternate,_);break;case 24:Xl(j,_,P,z,g),g&&Y&2048&&gv(_.alternate,_);break;default:Xl(j,_,P,z,g)}s=s.sibling}}function Ku(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,m=s,g=m.flags;switch(m.tag){case 22:Ku(u,m),g&2048&&vv(m.alternate,m);break;case 24:Ku(u,m),g&2048&&gv(m.alternate,m);break;default:Ku(u,m)}s=s.sibling}}var Gu=8192;function Wl(a,s,u){if(a.subtreeFlags&Gu)for(a=a.child;a!==null;)AN(a,s,u),a=a.sibling}function AN(a,s,u){switch(a.tag){case 26:Wl(a,s,u),a.flags&Gu&&a.memoizedState!==null&&YL(u,Tn,a.memoizedState,a.memoizedProps);break;case 5:Wl(a,s,u);break;case 3:case 4:var m=Tn;Tn=Lf(a.stateNode.containerInfo),Wl(a,s,u),Tn=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=Gu,Gu=16777216,Wl(a,s,u),Gu=m):Wl(a,s,u));break;default:Wl(a,s,u)}}function CN(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function Yu(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];qt=m,PN(m,a)}CN(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)TN(a),a=a.sibling}function TN(a){switch(a.tag){case 0:case 11:case 15:Yu(a),a.flags&2048&&vi(9,a,a.return);break;case 3:Yu(a);break;case 12:Yu(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Nf(a)):Yu(a);break;default:Yu(a)}}function Nf(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];qt=m,PN(m,a)}CN(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:vi(8,s,s.return),Nf(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,Nf(s));break;default:Nf(s)}a=a.sibling}}function PN(a,s){for(;qt!==null;){var u=qt;switch(u.tag){case 0:case 11:case 15:vi(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Tu(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,qt=m;else e:for(u=a;qt!==null;){m=qt;var g=m.sibling,j=m.return;if(jN(m),m===u){qt=null;break e}if(g!==null){g.return=j,qt=g;break e}qt=j}}}var oL={getCacheForType:function(a){var s=er(Ct),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return er(Ct).controller.signal}},uL=typeof WeakMap=="function"?WeakMap:Map,Ke=0,rt=null,Me=null,ke=0,Ye=0,Qr=null,gi=!1,Zl=!1,xv=!1,Ta=0,vt=0,xi=0,Ns=0,bv=0,Xr=0,Jl=0,Vu=null,Dr=null,jv=!1,Of=0,MN=0,_f=1/0,Ef=null,bi=null,Dt=0,ji=null,eo=null,Pa=0,wv=0,Sv=null,RN=null,Qu=0,Nv=null;function Wr(){return(Ke&2)!==0&&ke!==0?ke&-ke:$.T!==null?Tv():Qw()}function DN(){if(Xr===0)if((ke&536870912)===0||Le){var a=Dd;Dd<<=1,(Dd&3932160)===0&&(Dd=262144),Xr=a}else Xr=536870912;return a=Yr.current,a!==null&&(a.flags|=32),Xr}function kr(a,s,u){(a===rt&&(Ye===2||Ye===9)||a.cancelPendingCommit!==null)&&(to(a,0),wi(a,ke,Xr,!1)),yu(a,u),((Ke&2)===0||a!==rt)&&(a===rt&&((Ke&2)===0&&(Ns|=u),vt===4&&wi(a,ke,Xr,!1)),Vn(a))}function kN(a,s,u){if((Ke&6)!==0)throw Error(n(327));var m=!u&&(s&127)===0&&(s&a.expiredLanes)===0||pu(a,s),g=m?fL(a,s):_v(a,s,!0),j=m;do{if(g===0){Zl&&!m&&wi(a,s,0,!1);break}else{if(u=a.current.alternate,j&&!cL(u)){g=_v(a,s,!1),j=!1;continue}if(g===2){if(j=s,a.errorRecoveryDisabledLanes&j)var _=0;else _=a.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){s=_;e:{var P=a;g=Vu;var z=P.current.memoizedState.isDehydrated;if(z&&(to(P,_).flags|=256),_=_v(P,_,!1),_!==2){if(xv&&!z){P.errorRecoveryDisabledLanes|=j,Ns|=j,g=4;break e}j=Dr,Dr=g,j!==null&&(Dr===null?Dr=j:Dr.push.apply(Dr,j))}g=_}if(j=!1,g!==2)continue}}if(g===1){to(a,0),wi(a,s,0,!0);break}e:{switch(m=a,j=g,j){case 0:case 1:throw Error(n(345));case 4:if((s&4194048)!==s)break;case 6:wi(m,s,Xr,!gi);break e;case 2:Dr=null;break;case 3:case 5:break;default:throw Error(n(329))}if((s&62914560)===s&&(g=Of+300-Te(),10<g)){if(wi(m,s,Xr,!gi),Id(m,0,!0)!==0)break e;Pa=s,m.timeoutHandle=fO(IN.bind(null,m,u,Dr,Ef,jv,s,Xr,Ns,Jl,gi,j,"Throttled",-0,0),g);break e}IN(m,u,Dr,Ef,jv,s,Xr,Ns,Jl,gi,j,null,-0,0)}}break}while(!0);Vn(a)}function IN(a,s,u,m,g,j,_,P,z,Y,te,se,Q,Z){if(a.timeoutHandle=-1,se=s.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ya},AN(s,j,se);var pe=(j&62914560)===j?Of-Te():(j&4194048)===j?MN-Te():0;if(pe=VL(se,pe),pe!==null){Pa=j,a.cancelPendingCommit=pe(FN.bind(null,a,s,j,u,m,g,_,P,z,te,se,null,Q,Z)),wi(a,j,_,!Y);return}}FN(a,s,j,u,m,g,_,P,z)}function cL(a){for(var s=a;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var g=u[m],j=g.getSnapshot;g=g.value;try{if(!Kr(j(),g))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function wi(a,s,u,m){s&=~bv,s&=~Ns,a.suspendedLanes|=s,a.pingedLanes&=~s,m&&(a.warmLanes|=s),m=a.expirationTimes;for(var g=s;0<g;){var j=31-Fr(g),_=1<<j;m[j]=-1,g&=~_}u!==0&&Gw(a,u,s)}function Af(){return(Ke&6)===0?(Xu(0),!1):!0}function Ov(){if(Me!==null){if(Ye===0)var a=Me.return;else a=Me,ba=ps=null,Uy(a),Kl=null,Mu=0,a=Me;for(;a!==null;)hN(a.alternate,a),a=a.return;Me=null}}function to(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,TL(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Pa=0,Ov(),rt=a,Me=u=ga(a.current,null),ke=s,Ye=0,Qr=null,gi=!1,Zl=pu(a,s),xv=!1,Jl=Xr=bv=Ns=xi=vt=0,Dr=Vu=null,jv=!1,(s&8)!==0&&(s|=s&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=s;0<m;){var g=31-Fr(m),j=1<<g;s|=a[g],m&=~j}return Ta=s,Vd(),u}function LN(a,s){Ee=null,$.H=Bu,s===Fl||s===rf?(s=JS(),Ye=3):s===Cy?(s=JS(),Ye=4):Ye=s===nv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Qr=s,Me===null&&(vt=1,vf(a,un(s,a.current)))}function $N(){var a=Yr.current;return a===null?!0:(ke&4194048)===ke?hn===null:(ke&62914560)===ke||(ke&536870912)!==0?a===hn:!1}function zN(){var a=$.H;return $.H=Bu,a===null?Bu:a}function BN(){var a=$.A;return $.A=oL,a}function Cf(){vt=4,gi||(ke&4194048)!==ke&&Yr.current!==null||(Zl=!0),(xi&134217727)===0&&(Ns&134217727)===0||rt===null||wi(rt,ke,Xr,!1)}function _v(a,s,u){var m=Ke;Ke|=2;var g=zN(),j=BN();(rt!==a||ke!==s)&&(Ef=null,to(a,s)),s=!1;var _=vt;e:do try{if(Ye!==0&&Me!==null){var P=Me,z=Qr;switch(Ye){case 8:Ov(),_=6;break e;case 3:case 2:case 9:case 6:Yr.current===null&&(s=!0);var Y=Ye;if(Ye=0,Qr=null,ro(a,P,z,Y),u&&Zl){_=0;break e}break;default:Y=Ye,Ye=0,Qr=null,ro(a,P,z,Y)}}dL(),_=vt;break}catch(te){LN(a,te)}while(!0);return s&&a.shellSuspendCounter++,ba=ps=null,Ke=m,$.H=g,$.A=j,Me===null&&(rt=null,ke=0,Vd()),_}function dL(){for(;Me!==null;)UN(Me)}function fL(a,s){var u=Ke;Ke|=2;var m=zN(),g=BN();rt!==a||ke!==s?(Ef=null,_f=Te()+500,to(a,s)):Zl=pu(a,s);e:do try{if(Ye!==0&&Me!==null){s=Me;var j=Qr;t:switch(Ye){case 1:Ye=0,Qr=null,ro(a,s,j,1);break;case 2:case 9:if(WS(j)){Ye=0,Qr=null,qN(s);break}s=function(){Ye!==2&&Ye!==9||rt!==a||(Ye=7),Vn(a)},j.then(s,s);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:WS(j)?(Ye=0,Qr=null,qN(s)):(Ye=0,Qr=null,ro(a,s,j,7));break;case 5:var _=null;switch(Me.tag){case 26:_=Me.memoizedState;case 5:case 27:var P=Me;if(_?EO(_):P.stateNode.complete){Ye=0,Qr=null;var z=P.sibling;if(z!==null)Me=z;else{var Y=P.return;Y!==null?(Me=Y,Tf(Y)):Me=null}break t}}Ye=0,Qr=null,ro(a,s,j,5);break;case 6:Ye=0,Qr=null,ro(a,s,j,6);break;case 8:Ov(),vt=6;break e;default:throw Error(n(462))}}hL();break}catch(te){LN(a,te)}while(!0);return ba=ps=null,$.H=m,$.A=g,Ke=u,Me!==null?0:(rt=null,ke=0,Vd(),vt)}function hL(){for(;Me!==null&&!Up();)UN(Me)}function UN(a){var s=dN(a.alternate,a,Ta);a.memoizedProps=a.pendingProps,s===null?Tf(a):Me=s}function qN(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=iN(u,s,s.pendingProps,s.type,void 0,ke);break;case 11:s=iN(u,s,s.pendingProps,s.type.render,s.ref,ke);break;case 5:Uy(s);default:hN(u,s),s=Me=BS(s,Ta),s=dN(u,s,Ta)}a.memoizedProps=a.pendingProps,s===null?Tf(a):Me=s}function ro(a,s,u,m){ba=ps=null,Uy(s),Kl=null,Mu=0;var g=s.return;try{if(tL(a,g,s,u,ke)){vt=1,vf(a,un(u,a.current)),Me=null;return}}catch(j){if(g!==null)throw Me=g,j;vt=1,vf(a,un(u,a.current)),Me=null;return}s.flags&32768?(Le||m===1?a=!0:Zl||(ke&536870912)!==0?a=!1:(gi=a=!0,(m===2||m===9||m===3||m===6)&&(m=Yr.current,m!==null&&m.tag===13&&(m.flags|=16384))),HN(s,a)):Tf(s)}function Tf(a){var s=a;do{if((s.flags&32768)!==0){HN(s,gi);return}a=s.return;var u=aL(s.alternate,s,Ta);if(u!==null){Me=u;return}if(s=s.sibling,s!==null){Me=s;return}Me=s=a}while(s!==null);vt===0&&(vt=5)}function HN(a,s){do{var u=iL(a.alternate,a);if(u!==null){u.flags&=32767,Me=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){Me=a;return}Me=a=u}while(a!==null);vt=6,Me=null}function FN(a,s,u,m,g,j,_,P,z){a.cancelPendingCommit=null;do Pf();while(Dt!==0);if((Ke&6)!==0)throw Error(n(327));if(s!==null){if(s===a.current)throw Error(n(177));if(j=s.lanes|s.childLanes,j|=my,G5(a,u,j,_,P,z),a===rt&&(Me=rt=null,ke=0),eo=s,ji=a,Pa=u,wv=j,Sv=g,RN=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,vL(Md,function(){return QN(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=$.T,$.T=null,g=F.p,F.p=2,_=Ke,Ke|=4;try{sL(a,s,u)}finally{Ke=_,F.p=g,$.T=m}}Dt=1,KN(),GN(),YN()}}function KN(){if(Dt===1){Dt=0;var a=ji,s=eo,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=$.T,$.T=null;var m=F.p;F.p=2;var g=Ke;Ke|=4;try{ON(s,a);var j=$v,_=PS(a.containerInfo),P=j.focusedElem,z=j.selectionRange;if(_!==P&&P&&P.ownerDocument&&TS(P.ownerDocument.documentElement,P)){if(z!==null&&uy(P)){var Y=z.start,te=z.end;if(te===void 0&&(te=Y),"selectionStart"in P)P.selectionStart=Y,P.selectionEnd=Math.min(te,P.value.length);else{var se=P.ownerDocument||document,Q=se&&se.defaultView||window;if(Q.getSelection){var Z=Q.getSelection(),pe=P.textContent.length,we=Math.min(z.start,pe),et=z.end===void 0?we:Math.min(z.end,pe);!Z.extend&&we>et&&(_=et,et=we,we=_);var K=CS(P,we),U=CS(P,et);if(K&&U&&(Z.rangeCount!==1||Z.anchorNode!==K.node||Z.anchorOffset!==K.offset||Z.focusNode!==U.node||Z.focusOffset!==U.offset)){var G=se.createRange();G.setStart(K.node,K.offset),Z.removeAllRanges(),we>et?(Z.addRange(G),Z.extend(U.node,U.offset)):(G.setEnd(U.node,U.offset),Z.addRange(G))}}}}for(se=[],Z=P;Z=Z.parentNode;)Z.nodeType===1&&se.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<se.length;P++){var ae=se[P];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}Hf=!!Lv,$v=Lv=null}finally{Ke=g,F.p=m,$.T=u}}a.current=s,Dt=2}}function GN(){if(Dt===2){Dt=0;var a=ji,s=eo,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=$.T,$.T=null;var m=F.p;F.p=2;var g=Ke;Ke|=4;try{bN(a,s.alternate,s)}finally{Ke=g,F.p=m,$.T=u}}Dt=3}}function YN(){if(Dt===4||Dt===3){Dt=0,Td();var a=ji,s=eo,u=Pa,m=RN;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Dt=5:(Dt=0,eo=ji=null,VN(a,a.pendingLanes));var g=a.pendingLanes;if(g===0&&(bi=null),Fp(u),s=s.stateNode,Hr&&typeof Hr.onCommitFiberRoot=="function")try{Hr.onCommitFiberRoot(mu,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=$.T,g=F.p,F.p=2,$.T=null;try{for(var j=a.onRecoverableError,_=0;_<m.length;_++){var P=m[_];j(P.value,{componentStack:P.stack})}}finally{$.T=s,F.p=g}}(Pa&3)!==0&&Pf(),Vn(a),g=a.pendingLanes,(u&261930)!==0&&(g&42)!==0?a===Nv?Qu++:(Qu=0,Nv=a):Qu=0,Xu(0)}}function VN(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Tu(s)))}function Pf(){return KN(),GN(),YN(),QN()}function QN(){if(Dt!==5)return!1;var a=ji,s=wv;wv=0;var u=Fp(Pa),m=$.T,g=F.p;try{F.p=32>u?32:u,$.T=null,u=Sv,Sv=null;var j=ji,_=Pa;if(Dt=0,eo=ji=null,Pa=0,(Ke&6)!==0)throw Error(n(331));var P=Ke;if(Ke|=4,TN(j.current),EN(j,j.current,_,u),Ke=P,Xu(0,!1),Hr&&typeof Hr.onPostCommitFiberRoot=="function")try{Hr.onPostCommitFiberRoot(mu,j)}catch{}return!0}finally{F.p=g,$.T=m,VN(a,s)}}function XN(a,s,u){s=un(u,s),s=rv(a.stateNode,s,2),a=mi(a,s,2),a!==null&&(yu(a,2),Vn(a))}function Ve(a,s,u){if(a.tag===3)XN(a,a,u);else for(;s!==null;){if(s.tag===3){XN(s,a,u);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(bi===null||!bi.has(m))){a=un(u,a),u=W1(2),m=mi(s,u,2),m!==null&&(Z1(u,m,s,a),yu(m,2),Vn(m));break}}s=s.return}}function Ev(a,s,u){var m=a.pingCache;if(m===null){m=a.pingCache=new uL;var g=new Set;m.set(s,g)}else g=m.get(s),g===void 0&&(g=new Set,m.set(s,g));g.has(u)||(xv=!0,g.add(u),a=mL.bind(null,a,s,u),s.then(a,a))}function mL(a,s,u){var m=a.pingCache;m!==null&&m.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,rt===a&&(ke&u)===u&&(vt===4||vt===3&&(ke&62914560)===ke&&300>Te()-Of?(Ke&2)===0&&to(a,0):bv|=u,Jl===ke&&(Jl=0)),Vn(a)}function WN(a,s){s===0&&(s=Kw()),a=fs(a,s),a!==null&&(yu(a,s),Vn(a))}function pL(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),WN(a,u)}function yL(a,s){var u=0;switch(a.tag){case 31:case 13:var m=a.stateNode,g=a.memoizedState;g!==null&&(u=g.retryLane);break;case 19:m=a.stateNode;break;case 22:m=a.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(s),WN(a,u)}function vL(a,s){return hu(a,s)}var Mf=null,no=null,Av=!1,Rf=!1,Cv=!1,Si=0;function Vn(a){a!==no&&a.next===null&&(no===null?Mf=no=a:no=no.next=a),Rf=!0,Av||(Av=!0,xL())}function Xu(a,s){if(!Cv&&Rf){Cv=!0;do for(var u=!1,m=Mf;m!==null;){if(a!==0){var g=m.pendingLanes;if(g===0)var j=0;else{var _=m.suspendedLanes,P=m.pingedLanes;j=(1<<31-Fr(42|a)+1)-1,j&=g&~(_&~P),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(u=!0,tO(m,j))}else j=ke,j=Id(m,m===rt?j:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(j&3)===0||pu(m,j)||(u=!0,tO(m,j));m=m.next}while(u);Cv=!1}}function gL(){ZN()}function ZN(){Rf=Av=!1;var a=0;Si!==0&&CL()&&(a=Si);for(var s=Te(),u=null,m=Mf;m!==null;){var g=m.next,j=JN(m,s);j===0?(m.next=null,u===null?Mf=g:u.next=g,g===null&&(no=u)):(u=m,(a!==0||(j&3)!==0)&&(Rf=!0)),m=g}Dt!==0&&Dt!==5||Xu(a),Si!==0&&(Si=0)}function JN(a,s){for(var u=a.suspendedLanes,m=a.pingedLanes,g=a.expirationTimes,j=a.pendingLanes&-62914561;0<j;){var _=31-Fr(j),P=1<<_,z=g[_];z===-1?((P&u)===0||(P&m)!==0)&&(g[_]=K5(P,s)):z<=s&&(a.expiredLanes|=P),j&=~P}if(s=rt,u=ke,u=Id(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,u===0||a===s&&(Ye===2||Ye===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&Sl(m),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||pu(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(m!==null&&Sl(m),Fp(u)){case 2:case 8:u=Pd;break;case 32:u=Md;break;case 268435456:u=Fw;break;default:u=Md}return m=eO.bind(null,a),u=hu(u,m),a.callbackPriority=s,a.callbackNode=u,s}return m!==null&&m!==null&&Sl(m),a.callbackPriority=2,a.callbackNode=null,2}function eO(a,s){if(Dt!==0&&Dt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(Pf()&&a.callbackNode!==u)return null;var m=ke;return m=Id(a,a===rt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(kN(a,m,s),JN(a,Te()),a.callbackNode!=null&&a.callbackNode===u?eO.bind(null,a):null)}function tO(a,s){if(Pf())return null;kN(a,s,!0)}function xL(){PL(function(){(Ke&6)!==0?hu(Fn,gL):ZN()})}function Tv(){if(Si===0){var a=ql;a===0&&(a=Rd,Rd<<=1,(Rd&261888)===0&&(Rd=256)),Si=a}return Si}function rO(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Bd(""+a)}function nO(a,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,a.id&&u.setAttribute("form",a.id),s.parentNode.insertBefore(u,s),a=new FormData(a),u.parentNode.removeChild(u),a}function bL(a,s,u,m,g){if(s==="submit"&&u&&u.stateNode===g){var j=rO((g[Cr]||null).action),_=m.submitter;_&&(s=(s=_[Cr]||null)?rO(s.formAction):_.getAttribute("formAction"),s!==null&&(j=s,_=null));var P=new Fd("action","action",null,m,g);a.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Si!==0){var z=_?nO(g,_):new FormData(g);Xy(u,{pending:!0,data:z,method:g.method,action:j},null,z)}}else typeof j=="function"&&(P.preventDefault(),z=_?nO(g,_):new FormData(g),Xy(u,{pending:!0,data:z,method:g.method,action:j},j,z))},currentTarget:g}]})}}for(var Pv=0;Pv<hy.length;Pv++){var Mv=hy[Pv],jL=Mv.toLowerCase(),wL=Mv[0].toUpperCase()+Mv.slice(1);Cn(jL,"on"+wL)}Cn(DS,"onAnimationEnd"),Cn(kS,"onAnimationIteration"),Cn(IS,"onAnimationStart"),Cn("dblclick","onDoubleClick"),Cn("focusin","onFocus"),Cn("focusout","onBlur"),Cn($I,"onTransitionRun"),Cn(zI,"onTransitionStart"),Cn(BI,"onTransitionCancel"),Cn(LS,"onTransitionEnd"),Al("onMouseEnter",["mouseout","mouseover"]),Al("onMouseLeave",["mouseout","mouseover"]),Al("onPointerEnter",["pointerout","pointerover"]),Al("onPointerLeave",["pointerout","pointerover"]),os("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),os("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),os("onBeforeInput",["compositionend","keypress","textInput","paste"]),os("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wu="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(" "),SL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wu));function aO(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var m=a[u],g=m.event;m=m.listeners;e:{var j=void 0;if(s)for(var _=m.length-1;0<=_;_--){var P=m[_],z=P.instance,Y=P.currentTarget;if(P=P.listener,z!==j&&g.isPropagationStopped())break e;j=P,g.currentTarget=Y;try{j(g)}catch(te){Yd(te)}g.currentTarget=null,j=z}else for(_=0;_<m.length;_++){if(P=m[_],z=P.instance,Y=P.currentTarget,P=P.listener,z!==j&&g.isPropagationStopped())break e;j=P,g.currentTarget=Y;try{j(g)}catch(te){Yd(te)}g.currentTarget=null,j=z}}}}function Re(a,s){var u=s[Kp];u===void 0&&(u=s[Kp]=new Set);var m=a+"__bubble";u.has(m)||(iO(s,a,2,!1),u.add(m))}function Rv(a,s,u){var m=0;s&&(m|=4),iO(u,a,m,s)}var Df="_reactListening"+Math.random().toString(36).slice(2);function Dv(a){if(!a[Df]){a[Df]=!0,Zw.forEach(function(u){u!=="selectionchange"&&(SL.has(u)||Rv(u,!1,a),Rv(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[Df]||(s[Df]=!0,Rv("selectionchange",!1,s))}}function iO(a,s,u,m){switch(DO(s)){case 2:var g=WL;break;case 8:g=ZL;break;default:g=Qv}u=g.bind(null,s,u,a),g=void 0,!ey||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),m?g!==void 0?a.addEventListener(s,u,{capture:!0,passive:g}):a.addEventListener(s,u,!0):g!==void 0?a.addEventListener(s,u,{passive:g}):a.addEventListener(s,u,!1)}function kv(a,s,u,m,g){var j=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var _=m.tag;if(_===3||_===4){var P=m.stateNode.containerInfo;if(P===g)break;if(_===4)for(_=m.return;_!==null;){var z=_.tag;if((z===3||z===4)&&_.stateNode.containerInfo===g)return;_=_.return}for(;P!==null;){if(_=Ol(P),_===null)return;if(z=_.tag,z===5||z===6||z===26||z===27){m=j=_;continue e}P=P.parentNode}}m=m.return}cS(function(){var Y=j,te=Zp(u),se=[];e:{var Q=$S.get(a);if(Q!==void 0){var Z=Fd,pe=a;switch(a){case"keypress":if(qd(u)===0)break e;case"keydown":case"keyup":Z=yI;break;case"focusin":pe="focus",Z=ay;break;case"focusout":pe="blur",Z=ay;break;case"beforeblur":case"afterblur":Z=ay;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=hS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=aI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=xI;break;case DS:case kS:case IS:Z=lI;break;case LS:Z=jI;break;case"scroll":case"scrollend":Z=rI;break;case"wheel":Z=SI;break;case"copy":case"cut":case"paste":Z=uI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=pS;break;case"toggle":case"beforetoggle":Z=OI}var we=(s&4)!==0,et=!we&&(a==="scroll"||a==="scrollend"),K=we?Q!==null?Q+"Capture":null:Q;we=[];for(var U=Y,G;U!==null;){var ae=U;if(G=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||G===null||K===null||(ae=xu(U,K),ae!=null&&we.push(Zu(U,ae,G))),et)break;U=U.return}0<we.length&&(Q=new Z(Q,pe,null,u,te),se.push({event:Q,listeners:we}))}}if((s&7)===0){e:{if(Q=a==="mouseover"||a==="pointerover",Z=a==="mouseout"||a==="pointerout",Q&&u!==Wp&&(pe=u.relatedTarget||u.fromElement)&&(Ol(pe)||pe[Nl]))break e;if((Z||Q)&&(Q=te.window===te?te:(Q=te.ownerDocument)?Q.defaultView||Q.parentWindow:window,Z?(pe=u.relatedTarget||u.toElement,Z=Y,pe=pe?Ol(pe):null,pe!==null&&(et=l(pe),we=pe.tag,pe!==et||we!==5&&we!==27&&we!==6)&&(pe=null)):(Z=null,pe=Y),Z!==pe)){if(we=hS,ae="onMouseLeave",K="onMouseEnter",U="mouse",(a==="pointerout"||a==="pointerover")&&(we=pS,ae="onPointerLeave",K="onPointerEnter",U="pointer"),et=Z==null?Q:gu(Z),G=pe==null?Q:gu(pe),Q=new we(ae,U+"leave",Z,u,te),Q.target=et,Q.relatedTarget=G,ae=null,Ol(te)===Y&&(we=new we(K,U+"enter",pe,u,te),we.target=G,we.relatedTarget=et,ae=we),et=ae,Z&&pe)t:{for(we=NL,K=Z,U=pe,G=0,ae=K;ae;ae=we(ae))G++;ae=0;for(var be=U;be;be=we(be))ae++;for(;0<G-ae;)K=we(K),G--;for(;0<ae-G;)U=we(U),ae--;for(;G--;){if(K===U||U!==null&&K===U.alternate){we=K;break t}K=we(K),U=we(U)}we=null}else we=null;Z!==null&&sO(se,Q,Z,we,!1),pe!==null&&et!==null&&sO(se,et,pe,we,!0)}}e:{if(Q=Y?gu(Y):window,Z=Q.nodeName&&Q.nodeName.toLowerCase(),Z==="select"||Z==="input"&&Q.type==="file")var qe=SS;else if(jS(Q))if(NS)qe=kI;else{qe=RI;var ve=MI}else Z=Q.nodeName,!Z||Z.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?Y&&Xp(Y.elementType)&&(qe=SS):qe=DI;if(qe&&(qe=qe(a,Y))){wS(se,qe,u,te);break e}ve&&ve(a,Q,Y),a==="focusout"&&Y&&Q.type==="number"&&Y.memoizedProps.value!=null&&Qp(Q,"number",Q.value)}switch(ve=Y?gu(Y):window,a){case"focusin":(jS(ve)||ve.contentEditable==="true")&&(Dl=ve,cy=Y,Eu=null);break;case"focusout":Eu=cy=Dl=null;break;case"mousedown":dy=!0;break;case"contextmenu":case"mouseup":case"dragend":dy=!1,MS(se,u,te);break;case"selectionchange":if(LI)break;case"keydown":case"keyup":MS(se,u,te)}var Ae;if(sy)e:{switch(a){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Rl?xS(a,u)&&(Ie="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Ie="onCompositionStart");Ie&&(yS&&u.locale!=="ko"&&(Rl||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Rl&&(Ae=dS()):(li=te,ty="value"in li?li.value:li.textContent,Rl=!0)),ve=kf(Y,Ie),0<ve.length&&(Ie=new mS(Ie,a,null,u,te),se.push({event:Ie,listeners:ve}),Ae?Ie.data=Ae:(Ae=bS(u),Ae!==null&&(Ie.data=Ae)))),(Ae=EI?AI(a,u):CI(a,u))&&(Ie=kf(Y,"onBeforeInput"),0<Ie.length&&(ve=new mS("onBeforeInput","beforeinput",null,u,te),se.push({event:ve,listeners:Ie}),ve.data=Ae)),bL(se,a,Y,u,te)}aO(se,s)})}function Zu(a,s,u){return{instance:a,listener:s,currentTarget:u}}function kf(a,s){for(var u=s+"Capture",m=[];a!==null;){var g=a,j=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||j===null||(g=xu(a,u),g!=null&&m.unshift(Zu(a,g,j)),g=xu(a,s),g!=null&&m.push(Zu(a,g,j))),a.tag===3)return m;a=a.return}return[]}function NL(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function sO(a,s,u,m,g){for(var j=s._reactName,_=[];u!==null&&u!==m;){var P=u,z=P.alternate,Y=P.stateNode;if(P=P.tag,z!==null&&z===m)break;P!==5&&P!==26&&P!==27||Y===null||(z=Y,g?(Y=xu(u,j),Y!=null&&_.unshift(Zu(u,Y,z))):g||(Y=xu(u,j),Y!=null&&_.push(Zu(u,Y,z)))),u=u.return}_.length!==0&&a.push({event:s,listeners:_})}var OL=/\r\n?/g,_L=/\u0000|\uFFFD/g;function lO(a){return(typeof a=="string"?a:""+a).replace(OL,`
|
|
49
|
-
`).replace(_L,"")}function oO(a,s){return s=lO(s),lO(a)===s}function Je(a,s,u,m,g,j){switch(u){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||Tl(a,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&Tl(a,""+m);break;case"className":$d(a,"class",m);break;case"tabIndex":$d(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":$d(a,u,m);break;case"style":oS(a,m,j);break;case"data":if(s!=="object"){$d(a,"data",m);break}case"src":case"href":if(m===""&&(s!=="a"||u!=="href")){a.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=Bd(""+m),a.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){a.setAttribute(u,"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 j=="function"&&(u==="formAction"?(s!=="input"&&Je(a,s,"name",g.name,g,null),Je(a,s,"formEncType",g.formEncType,g,null),Je(a,s,"formMethod",g.formMethod,g,null),Je(a,s,"formTarget",g.formTarget,g,null)):(Je(a,s,"encType",g.encType,g,null),Je(a,s,"method",g.method,g,null),Je(a,s,"target",g.target,g,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=Bd(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=ya);break;case"onScroll":m!=null&&Re("scroll",a);break;case"onScrollEnd":m!=null&&Re("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(u=m.__html,u!=null){if(g.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"multiple":a.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":a.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){a.removeAttribute("xlink:href");break}u=Bd(""+m),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""+m):a.removeAttribute(u);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":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":m===!0?a.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,m):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(u,m):a.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(u):a.setAttribute(u,m);break;case"popover":Re("beforetoggle",a),Re("toggle",a),Ld(a,"popover",m);break;case"xlinkActuate":pa(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":pa(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":pa(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":pa(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":pa(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":pa(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":pa(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":pa(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":pa(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Ld(a,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=eI.get(u)||u,Ld(a,u,m))}}function Iv(a,s,u,m,g,j){switch(u){case"style":oS(a,m,j);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(u=m.__html,u!=null){if(g.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"children":typeof m=="string"?Tl(a,m):(typeof m=="number"||typeof m=="bigint")&&Tl(a,""+m);break;case"onScroll":m!=null&&Re("scroll",a);break;case"onScrollEnd":m!=null&&Re("scrollend",a);break;case"onClick":m!=null&&(a.onclick=ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Jw.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),s=u.slice(2,g?u.length-7:void 0),j=a[Cr]||null,j=j!=null?j[u]:null,typeof j=="function"&&a.removeEventListener(s,j,g),typeof m=="function")){typeof j!="function"&&j!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,m,g);break e}u in a?a[u]=m:m===!0?a.setAttribute(u,""):Ld(a,u,m)}}}function rr(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",a),Re("load",a);var m=!1,g=!1,j;for(j in u)if(u.hasOwnProperty(j)){var _=u[j];if(_!=null)switch(j){case"src":m=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:Je(a,s,j,_,u,null)}}g&&Je(a,s,"srcSet",u.srcSet,u,null),m&&Je(a,s,"src",u.src,u,null);return;case"input":Re("invalid",a);var P=j=_=g=null,z=null,Y=null;for(m in u)if(u.hasOwnProperty(m)){var te=u[m];if(te!=null)switch(m){case"name":g=te;break;case"type":_=te;break;case"checked":z=te;break;case"defaultChecked":Y=te;break;case"value":j=te;break;case"defaultValue":P=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(n(137,s));break;default:Je(a,s,m,te,u,null)}}aS(a,j,P,z,Y,_,g,!1);return;case"select":Re("invalid",a),m=_=j=null;for(g in u)if(u.hasOwnProperty(g)&&(P=u[g],P!=null))switch(g){case"value":j=P;break;case"defaultValue":_=P;break;case"multiple":m=P;default:Je(a,s,g,P,u,null)}s=j,u=_,a.multiple=!!m,s!=null?Cl(a,!!m,s,!1):u!=null&&Cl(a,!!m,u,!0);return;case"textarea":Re("invalid",a),j=g=m=null;for(_ in u)if(u.hasOwnProperty(_)&&(P=u[_],P!=null))switch(_){case"value":m=P;break;case"defaultValue":g=P;break;case"children":j=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(n(91));break;default:Je(a,s,_,P,u,null)}sS(a,m,g,j);return;case"option":for(z in u)if(u.hasOwnProperty(z)&&(m=u[z],m!=null))switch(z){case"selected":a.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:Je(a,s,z,m,u,null)}return;case"dialog":Re("beforetoggle",a),Re("toggle",a),Re("cancel",a),Re("close",a);break;case"iframe":case"object":Re("load",a);break;case"video":case"audio":for(m=0;m<Wu.length;m++)Re(Wu[m],a);break;case"image":Re("error",a),Re("load",a);break;case"details":Re("toggle",a);break;case"embed":case"source":case"link":Re("error",a),Re("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in u)if(u.hasOwnProperty(Y)&&(m=u[Y],m!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:Je(a,s,Y,m,u,null)}return;default:if(Xp(s)){for(te in u)u.hasOwnProperty(te)&&(m=u[te],m!==void 0&&Iv(a,s,te,m,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(m=u[P],m!=null&&Je(a,s,P,m,u,null))}function EL(a,s,u,m){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,j=null,_=null,P=null,z=null,Y=null,te=null;for(Z in u){var se=u[Z];if(u.hasOwnProperty(Z)&&se!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":z=se;default:m.hasOwnProperty(Z)||Je(a,s,Z,null,m,se)}}for(var Q in m){var Z=m[Q];if(se=u[Q],m.hasOwnProperty(Q)&&(Z!=null||se!=null))switch(Q){case"type":j=Z;break;case"name":g=Z;break;case"checked":Y=Z;break;case"defaultChecked":te=Z;break;case"value":_=Z;break;case"defaultValue":P=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(n(137,s));break;default:Z!==se&&Je(a,s,Q,Z,m,se)}}Vp(a,_,P,z,Y,te,j,g);return;case"select":Z=_=P=Q=null;for(j in u)if(z=u[j],u.hasOwnProperty(j)&&z!=null)switch(j){case"value":break;case"multiple":Z=z;default:m.hasOwnProperty(j)||Je(a,s,j,null,m,z)}for(g in m)if(j=m[g],z=u[g],m.hasOwnProperty(g)&&(j!=null||z!=null))switch(g){case"value":Q=j;break;case"defaultValue":P=j;break;case"multiple":_=j;default:j!==z&&Je(a,s,g,j,m,z)}s=P,u=_,m=Z,Q!=null?Cl(a,!!u,Q,!1):!!m!=!!u&&(s!=null?Cl(a,!!u,s,!0):Cl(a,!!u,u?[]:"",!1));return;case"textarea":Z=Q=null;for(P in u)if(g=u[P],u.hasOwnProperty(P)&&g!=null&&!m.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:Je(a,s,P,null,m,g)}for(_ in m)if(g=m[_],j=u[_],m.hasOwnProperty(_)&&(g!=null||j!=null))switch(_){case"value":Q=g;break;case"defaultValue":Z=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(n(91));break;default:g!==j&&Je(a,s,_,g,m,j)}iS(a,Q,Z);return;case"option":for(var pe in u)if(Q=u[pe],u.hasOwnProperty(pe)&&Q!=null&&!m.hasOwnProperty(pe))switch(pe){case"selected":a.selected=!1;break;default:Je(a,s,pe,null,m,Q)}for(z in m)if(Q=m[z],Z=u[z],m.hasOwnProperty(z)&&Q!==Z&&(Q!=null||Z!=null))switch(z){case"selected":a.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:Je(a,s,z,Q,m,Z)}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 we in u)Q=u[we],u.hasOwnProperty(we)&&Q!=null&&!m.hasOwnProperty(we)&&Je(a,s,we,null,m,Q);for(Y in m)if(Q=m[Y],Z=u[Y],m.hasOwnProperty(Y)&&Q!==Z&&(Q!=null||Z!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(n(137,s));break;default:Je(a,s,Y,Q,m,Z)}return;default:if(Xp(s)){for(var et in u)Q=u[et],u.hasOwnProperty(et)&&Q!==void 0&&!m.hasOwnProperty(et)&&Iv(a,s,et,void 0,m,Q);for(te in m)Q=m[te],Z=u[te],!m.hasOwnProperty(te)||Q===Z||Q===void 0&&Z===void 0||Iv(a,s,te,Q,m,Z);return}}for(var K in u)Q=u[K],u.hasOwnProperty(K)&&Q!=null&&!m.hasOwnProperty(K)&&Je(a,s,K,null,m,Q);for(se in m)Q=m[se],Z=u[se],!m.hasOwnProperty(se)||Q===Z||Q==null&&Z==null||Je(a,s,se,Q,m,Z)}function uO(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function AL(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var g=u[m],j=g.transferSize,_=g.initiatorType,P=g.duration;if(j&&P&&uO(_)){for(_=0,P=g.responseEnd,m+=1;m<u.length;m++){var z=u[m],Y=z.startTime;if(Y>P)break;var te=z.transferSize,se=z.initiatorType;te&&uO(se)&&(z=z.responseEnd,_+=te*(z<P?1:(P-Y)/(z-Y)))}if(--m,s+=8*(j+_)/(g.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Lv=null,$v=null;function If(a){return a.nodeType===9?a:a.ownerDocument}function cO(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dO(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function zv(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Bv=null;function CL(){var a=window.event;return a&&a.type==="popstate"?a===Bv?!1:(Bv=a,!0):(Bv=null,!1)}var fO=typeof setTimeout=="function"?setTimeout:void 0,TL=typeof clearTimeout=="function"?clearTimeout:void 0,hO=typeof Promise=="function"?Promise:void 0,PL=typeof queueMicrotask=="function"?queueMicrotask:typeof hO<"u"?function(a){return hO.resolve(null).then(a).catch(ML)}:fO;function ML(a){setTimeout(function(){throw a})}function Ni(a){return a==="head"}function mO(a,s){var u=s,m=0;do{var g=u.nextSibling;if(a.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(m===0){a.removeChild(g),lo(s);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Ju(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Ju(u);for(var j=u.firstChild;j;){var _=j.nextSibling,P=j.nodeName;j[vu]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&j.rel.toLowerCase()==="stylesheet"||u.removeChild(j),j=_}}else u==="body"&&Ju(a.ownerDocument.body);u=g}while(u);lo(s)}function pO(a,s){var u=a;a=0;do{var m=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=m}while(u)}function Uv(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Uv(u),Gp(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function RL(a,s,u,m){for(;a.nodeType===1;){var g=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[vu])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(j=a.getAttribute("rel"),j==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(j!==g.rel||a.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||a.getAttribute("title")!==(g.title==null?null:g.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(j=a.getAttribute("src"),(j!==(g.src==null?null:g.src)||a.getAttribute("type")!==(g.type==null?null:g.type)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&j&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var j=g.name==null?null:""+g.name;if(g.type==="hidden"&&a.getAttribute("name")===j)return a}else return a;if(a=mn(a.nextSibling),a===null)break}return null}function DL(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=mn(a.nextSibling),a===null))return null;return a}function yO(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=mn(a.nextSibling),a===null))return null;return a}function qv(a){return a.data==="$?"||a.data==="$~"}function Hv(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function kL(a,s){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||u.readyState!=="loading")s();else{var m=function(){s(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),a._reactRetry=m}}function mn(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var Fv=null;function vO(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return mn(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function gO(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return a;s--}else u!=="/$"&&u!=="/&"||s++}a=a.previousSibling}return null}function xO(a,s,u){switch(s=If(u),a){case"html":if(a=s.documentElement,!a)throw Error(n(452));return a;case"head":if(a=s.head,!a)throw Error(n(453));return a;case"body":if(a=s.body,!a)throw Error(n(454));return a;default:throw Error(n(451))}}function Ju(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Gp(a)}var pn=new Map,bO=new Set;function Lf(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ma=F.d;F.d={f:IL,r:LL,D:$L,C:zL,L:BL,m:UL,X:HL,S:qL,M:FL};function IL(){var a=Ma.f(),s=Af();return a||s}function LL(a){var s=_l(a);s!==null&&s.tag===5&&s.type==="form"?L1(s):Ma.r(a)}var ao=typeof document>"u"?null:document;function jO(a,s,u){var m=ao;if(m&&typeof s=="string"&&s){var g=ln(s);g='link[rel="'+a+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),bO.has(g)||(bO.add(g),a={rel:a,crossOrigin:u,href:s},m.querySelector(g)===null&&(s=m.createElement("link"),rr(s,"link",a),Ut(s),m.head.appendChild(s)))}}function $L(a){Ma.D(a),jO("dns-prefetch",a,null)}function zL(a,s){Ma.C(a,s),jO("preconnect",a,s)}function BL(a,s,u){Ma.L(a,s,u);var m=ao;if(m&&a&&s){var g='link[rel="preload"][as="'+ln(s)+'"]';s==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+ln(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+ln(u.imageSizes)+'"]')):g+='[href="'+ln(a)+'"]';var j=g;switch(s){case"style":j=io(a);break;case"script":j=so(a)}pn.has(j)||(a=y({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),pn.set(j,a),m.querySelector(g)!==null||s==="style"&&m.querySelector(ec(j))||s==="script"&&m.querySelector(tc(j))||(s=m.createElement("link"),rr(s,"link",a),Ut(s),m.head.appendChild(s)))}}function UL(a,s){Ma.m(a,s);var u=ao;if(u&&a){var m=s&&typeof s.as=="string"?s.as:"script",g='link[rel="modulepreload"][as="'+ln(m)+'"][href="'+ln(a)+'"]',j=g;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=so(a)}if(!pn.has(j)&&(a=y({rel:"modulepreload",href:a},s),pn.set(j,a),u.querySelector(g)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(tc(j)))return}m=u.createElement("link"),rr(m,"link",a),Ut(m),u.head.appendChild(m)}}}function qL(a,s,u){Ma.S(a,s,u);var m=ao;if(m&&a){var g=El(m).hoistableStyles,j=io(a);s=s||"default";var _=g.get(j);if(!_){var P={loading:0,preload:null};if(_=m.querySelector(ec(j)))P.loading=5;else{a=y({rel:"stylesheet",href:a,"data-precedence":s},u),(u=pn.get(j))&&Kv(a,u);var z=_=m.createElement("link");Ut(z),rr(z,"link",a),z._p=new Promise(function(Y,te){z.onload=Y,z.onerror=te}),z.addEventListener("load",function(){P.loading|=1}),z.addEventListener("error",function(){P.loading|=2}),P.loading|=4,$f(_,s,m)}_={type:"stylesheet",instance:_,count:1,state:P},g.set(j,_)}}}function HL(a,s){Ma.X(a,s);var u=ao;if(u&&a){var m=El(u).hoistableScripts,g=so(a),j=m.get(g);j||(j=u.querySelector(tc(g)),j||(a=y({src:a,async:!0},s),(s=pn.get(g))&&Gv(a,s),j=u.createElement("script"),Ut(j),rr(j,"link",a),u.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},m.set(g,j))}}function FL(a,s){Ma.M(a,s);var u=ao;if(u&&a){var m=El(u).hoistableScripts,g=so(a),j=m.get(g);j||(j=u.querySelector(tc(g)),j||(a=y({src:a,async:!0,type:"module"},s),(s=pn.get(g))&&Gv(a,s),j=u.createElement("script"),Ut(j),rr(j,"link",a),u.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},m.set(g,j))}}function wO(a,s,u,m){var g=(g=je.current)?Lf(g):null;if(!g)throw Error(n(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=io(u.href),u=El(g).hoistableStyles,m=u.get(s),m||(m={type:"style",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=io(u.href);var j=El(g).hoistableStyles,_=j.get(a);if(_||(g=g.ownerDocument||g,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(a,_),(j=g.querySelector(ec(a)))&&!j._p&&(_.instance=j,_.state.loading=5),pn.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},pn.set(a,u),j||KL(g,a,u,_.state))),s&&m===null)throw Error(n(528,""));return _}if(s&&m!==null)throw Error(n(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=so(u),u=El(g).hoistableScripts,m=u.get(s),m||(m={type:"script",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,a))}}function io(a){return'href="'+ln(a)+'"'}function ec(a){return'link[rel="stylesheet"]['+a+"]"}function SO(a){return y({},a,{"data-precedence":a.precedence,precedence:null})}function KL(a,s,u,m){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?m.loading=1:(s=a.createElement("link"),m.preload=s,s.addEventListener("load",function(){return m.loading|=1}),s.addEventListener("error",function(){return m.loading|=2}),rr(s,"link",u),Ut(s),a.head.appendChild(s))}function so(a){return'[src="'+ln(a)+'"]'}function tc(a){return"script[async]"+a}function NO(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var m=a.querySelector('style[data-href~="'+ln(u.href)+'"]');if(m)return s.instance=m,Ut(m),m;var g=y({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),Ut(m),rr(m,"style",g),$f(m,u.precedence,a),s.instance=m;case"stylesheet":g=io(u.href);var j=a.querySelector(ec(g));if(j)return s.state.loading|=4,s.instance=j,Ut(j),j;m=SO(u),(g=pn.get(g))&&Kv(m,g),j=(a.ownerDocument||a).createElement("link"),Ut(j);var _=j;return _._p=new Promise(function(P,z){_.onload=P,_.onerror=z}),rr(j,"link",m),s.state.loading|=4,$f(j,u.precedence,a),s.instance=j;case"script":return j=so(u.src),(g=a.querySelector(tc(j)))?(s.instance=g,Ut(g),g):(m=u,(g=pn.get(j))&&(m=y({},u),Gv(m,g)),a=a.ownerDocument||a,g=a.createElement("script"),Ut(g),rr(g,"link",m),a.head.appendChild(g),s.instance=g);case"void":return null;default:throw Error(n(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(m=s.instance,s.state.loading|=4,$f(m,u.precedence,a));return s.instance}function $f(a,s,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=m.length?m[m.length-1]:null,j=g,_=0;_<m.length;_++){var P=m[_];if(P.dataset.precedence===s)j=P;else if(j!==g)break}j?j.parentNode.insertBefore(a,j.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function Kv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function Gv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var zf=null;function OO(a,s,u){if(zf===null){var m=new Map,g=zf=new Map;g.set(u,m)}else g=zf,m=g.get(u),m||(m=new Map,g.set(u,m));if(m.has(a))return m;for(m.set(a,null),u=u.getElementsByTagName(a),g=0;g<u.length;g++){var j=u[g];if(!(j[vu]||j[Zt]||a==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var _=j.getAttribute(s)||"";_=a+_;var P=m.get(_);P?P.push(j):m.set(_,[j])}}return m}function _O(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function GL(a,s,u){if(u===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return a=s.disabled,typeof s.precedence=="string"&&a==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function EO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function YL(a,s,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=io(m.href),j=s.querySelector(ec(g));if(j){s=j._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Bf.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=j,Ut(j);return}j=s.ownerDocument||s,m=SO(m),(g=pn.get(g))&&Kv(m,g),j=j.createElement("link"),Ut(j);var _=j;_._p=new Promise(function(P,z){_.onload=P,_.onerror=z}),rr(j,"link",m),u.instance=j}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=Bf.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var Yv=0;function VL(a,s){return a.stylesheets&&a.count===0&&qf(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&qf(a,a.stylesheets),a.unsuspend){var j=a.unsuspend;a.unsuspend=null,j()}},6e4+s);0<a.imgBytes&&Yv===0&&(Yv=62500*AL());var g=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&qf(a,a.stylesheets),a.unsuspend)){var j=a.unsuspend;a.unsuspend=null,j()}},(a.imgBytes>Yv?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(g)}}:null}function Bf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Uf=null;function qf(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Uf=new Map,s.forEach(QL,a),Uf=null,Bf.call(a))}function QL(a,s){if(!(s.state.loading&4)){var u=Uf.get(a);if(u)var m=u.get(null);else{u=new Map,Uf.set(a,u);for(var g=a.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<g.length;j++){var _=g[j];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(u.set(_.dataset.precedence,_),m=_)}m&&u.set(null,m)}g=s.instance,_=g.getAttribute("data-precedence"),j=u.get(_)||m,j===m&&u.set(null,g),u.set(_,g),this.count++,m=Bf.bind(this),g.addEventListener("load",m),g.addEventListener("error",m),j?j.parentNode.insertBefore(g,j.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(g,a.firstChild)),s.state.loading|=4}}var rc={$$typeof:E,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function XL(a,s,u,m,g,j,_,P,z){this.tag=1,this.containerInfo=a,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=qp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qp(0),this.hiddenUpdates=qp(null),this.identifierPrefix=m,this.onUncaughtError=g,this.onCaughtError=j,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function AO(a,s,u,m,g,j,_,P,z,Y,te,se){return a=new XL(a,s,u,_,z,Y,te,se,P),s=1,j===!0&&(s|=24),j=Gr(3,null,null,s),a.current=j,j.stateNode=a,s=_y(),s.refCount++,a.pooledCache=s,s.refCount++,j.memoizedState={element:m,isDehydrated:u,cache:s},Ty(j),a}function CO(a){return a?(a=Ll,a):Ll}function TO(a,s,u,m,g,j){g=CO(g),m.context===null?m.context=g:m.pendingContext=g,m=hi(s),m.payload={element:u},j=j===void 0?null:j,j!==null&&(m.callback=j),u=mi(a,m,s),u!==null&&(kr(u,a,s),Du(u,a,s))}function PO(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function Vv(a,s){PO(a,s),(a=a.alternate)&&PO(a,s)}function MO(a){if(a.tag===13||a.tag===31){var s=fs(a,67108864);s!==null&&kr(s,a,67108864),Vv(a,67108864)}}function RO(a){if(a.tag===13||a.tag===31){var s=Wr();s=Hp(s);var u=fs(a,s);u!==null&&kr(u,a,s),Vv(a,s)}}var Hf=!0;function WL(a,s,u,m){var g=$.T;$.T=null;var j=F.p;try{F.p=2,Qv(a,s,u,m)}finally{F.p=j,$.T=g}}function ZL(a,s,u,m){var g=$.T;$.T=null;var j=F.p;try{F.p=8,Qv(a,s,u,m)}finally{F.p=j,$.T=g}}function Qv(a,s,u,m){if(Hf){var g=Xv(m);if(g===null)kv(a,s,m,Ff,u),kO(a,m);else if(e$(g,a,s,u,m))m.stopPropagation();else if(kO(a,m),s&4&&-1<JL.indexOf(a)){for(;g!==null;){var j=_l(g);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var _=ls(j.pendingLanes);if(_!==0){var P=j;for(P.pendingLanes|=2,P.entangledLanes|=2;_;){var z=1<<31-Fr(_);P.entanglements[1]|=z,_&=~z}Vn(j),(Ke&6)===0&&(_f=Te()+500,Xu(0))}}break;case 31:case 13:P=fs(j,2),P!==null&&kr(P,j,2),Af(),Vv(j,2)}if(j=Xv(m),j===null&&kv(a,s,m,Ff,u),j===g)break;g=j}g!==null&&m.stopPropagation()}else kv(a,s,m,null,u)}}function Xv(a){return a=Zp(a),Wv(a)}var Ff=null;function Wv(a){if(Ff=null,a=Ol(a),a!==null){var s=l(a);if(s===null)a=null;else{var u=s.tag;if(u===13){if(a=o(s),a!==null)return a;a=null}else if(u===31){if(a=c(s),a!==null)return a;a=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return Ff=a,null}function DO(a){switch(a){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(cr()){case Fn:return 2;case Pd:return 8;case Md:case z5:return 32;case Fw:return 268435456;default:return 32}default:return 32}}var Zv=!1,Oi=null,_i=null,Ei=null,nc=new Map,ac=new Map,Ai=[],JL="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 kO(a,s){switch(a){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":_i=null;break;case"mouseover":case"mouseout":Ei=null;break;case"pointerover":case"pointerout":nc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ac.delete(s.pointerId)}}function ic(a,s,u,m,g,j){return a===null||a.nativeEvent!==j?(a={blockedOn:s,domEventName:u,eventSystemFlags:m,nativeEvent:j,targetContainers:[g]},s!==null&&(s=_l(s),s!==null&&MO(s)),a):(a.eventSystemFlags|=m,s=a.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),a)}function e$(a,s,u,m,g){switch(s){case"focusin":return Oi=ic(Oi,a,s,u,m,g),!0;case"dragenter":return _i=ic(_i,a,s,u,m,g),!0;case"mouseover":return Ei=ic(Ei,a,s,u,m,g),!0;case"pointerover":var j=g.pointerId;return nc.set(j,ic(nc.get(j)||null,a,s,u,m,g)),!0;case"gotpointercapture":return j=g.pointerId,ac.set(j,ic(ac.get(j)||null,a,s,u,m,g)),!0}return!1}function IO(a){var s=Ol(a.target);if(s!==null){var u=l(s);if(u!==null){if(s=u.tag,s===13){if(s=o(u),s!==null){a.blockedOn=s,Xw(a.priority,function(){RO(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,Xw(a.priority,function(){RO(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Kf(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=Xv(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);Wp=m,u.target.dispatchEvent(m),Wp=null}else return s=_l(u),s!==null&&MO(s),a.blockedOn=u,!1;s.shift()}return!0}function LO(a,s,u){Kf(a)&&u.delete(s)}function t$(){Zv=!1,Oi!==null&&Kf(Oi)&&(Oi=null),_i!==null&&Kf(_i)&&(_i=null),Ei!==null&&Kf(Ei)&&(Ei=null),nc.forEach(LO),ac.forEach(LO)}function Gf(a,s){a.blockedOn===s&&(a.blockedOn=null,Zv||(Zv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,t$)))}var Yf=null;function $O(a){Yf!==a&&(Yf=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Yf===a&&(Yf=null);for(var s=0;s<a.length;s+=3){var u=a[s],m=a[s+1],g=a[s+2];if(typeof m!="function"){if(Wv(m||u)===null)continue;break}var j=_l(u);j!==null&&(a.splice(s,3),s-=3,Xy(j,{pending:!0,data:g,method:u.method,action:m},m,g))}}))}function lo(a){function s(z){return Gf(z,a)}Oi!==null&&Gf(Oi,a),_i!==null&&Gf(_i,a),Ei!==null&&Gf(Ei,a),nc.forEach(s),ac.forEach(s);for(var u=0;u<Ai.length;u++){var m=Ai[u];m.blockedOn===a&&(m.blockedOn=null)}for(;0<Ai.length&&(u=Ai[0],u.blockedOn===null);)IO(u),u.blockedOn===null&&Ai.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var g=u[m],j=u[m+1],_=g[Cr]||null;if(typeof j=="function")_||$O(u);else if(_){var P=null;if(j&&j.hasAttribute("formAction")){if(g=j,_=j[Cr]||null)P=_.formAction;else if(Wv(g)!==null)continue}else P=_.action;typeof P=="function"?u[m+1]=P:(u.splice(m,3),m-=3),$O(u)}}}function zO(){function a(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(_){return g=_})},focusReset:"manual",scroll:"manual"})}function s(){g!==null&&(g(),g=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,g=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),g!==null&&(g(),g=null)}}}function Jv(a){this._internalRoot=a}Vf.prototype.render=Jv.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(n(409));var u=s.current,m=Wr();TO(u,m,a,s,null,null)},Vf.prototype.unmount=Jv.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;TO(a.current,2,null,a,null,null),Af(),s[Nl]=null}};function Vf(a){this._internalRoot=a}Vf.prototype.unstable_scheduleHydration=function(a){if(a){var s=Qw();a={blockedOn:null,target:a,priority:s};for(var u=0;u<Ai.length&&s!==0&&s<Ai[u].priority;u++);Ai.splice(u,0,a),u===0&&IO(a)}};var BO=t.version;if(BO!=="19.2.4")throw Error(n(527,BO,"19.2.4"));F.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(n(188)):(a=Object.keys(a).join(","),Error(n(268,a)));return a=h(s),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var r$={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qf.isDisabled&&Qf.supportsFiber)try{mu=Qf.inject(r$),Hr=Qf}catch{}}return lc.createRoot=function(a,s){if(!i(a))throw Error(n(299));var u=!1,m="",g=Y1,j=V1,_=Q1;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(j=s.onCaughtError),s.onRecoverableError!==void 0&&(_=s.onRecoverableError)),s=AO(a,1,!1,null,null,u,m,null,g,j,_,zO),a[Nl]=s.current,Dv(a),new Jv(s)},lc.hydrateRoot=function(a,s,u){if(!i(a))throw Error(n(299));var m=!1,g="",j=Y1,_=V1,P=Q1,z=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(j=u.onUncaughtError),u.onCaughtError!==void 0&&(_=u.onCaughtError),u.onRecoverableError!==void 0&&(P=u.onRecoverableError),u.formState!==void 0&&(z=u.formState)),s=AO(a,1,!0,s,u??null,m,g,z,j,_,P,zO),s.context=CO(null),u=s.current,m=Wr(),m=Hp(m),g=hi(m),g.callback=null,mi(u,g,m),u=m,s.current.lanes=u,yu(s,u),Vn(s),a[Nl]=s.current,Dv(a),new Vf(s)},lc.version="19.2.4",lc}var WO;function p$(){if(WO)return ag.exports;WO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ag.exports=m$(),ag.exports}var y$=p$(),nu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Us,$i,Ao,t2,v$=(t2=class extends nu{constructor(){super();xe(this,Us);xe(this,$i);xe(this,Ao);fe(this,Ao,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){B(this,$i)||this.setEventListener(B(this,Ao))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,$i))==null||t.call(this),fe(this,$i,void 0))}setEventListener(t){var r;fe(this,Ao,t),(r=B(this,$i))==null||r.call(this),fe(this,$i,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){B(this,Us)!==t&&(fe(this,Us,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof B(this,Us)=="boolean"?B(this,Us):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Us=new WeakMap,$i=new WeakMap,Ao=new WeakMap,t2),Pb=new v$,g$={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},zi,Tb,r2,x$=(r2=class{constructor(){xe(this,zi,g$);xe(this,Tb,!1)}setTimeoutProvider(e){fe(this,zi,e)}setTimeout(e,t){return B(this,zi).setTimeout(e,t)}clearTimeout(e){B(this,zi).clearTimeout(e)}setInterval(e,t){return B(this,zi).setInterval(e,t)}clearInterval(e){B(this,zi).clearInterval(e)}},zi=new WeakMap,Tb=new WeakMap,r2),Rs=new x$;function b$(e){setTimeout(e,0)}var j$=typeof window>"u"||"Deno"in globalThis;function jr(){}function w$(e,t){return typeof e=="function"?e(t):e}function lx(e){return typeof e=="number"&&e>=0&&e!==1/0}function h2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xi(e,t){return typeof e=="function"?e(t):e}function wn(e,t){return typeof e=="function"?e(t):e}function ZO(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:l,queryKey:o,stale:c}=e;if(o){if(n){if(t.queryHash!==Mb(o,t.options))return!1}else if(!Mc(t.queryKey,o))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||l&&!l(t))}function JO(e,t){const{exact:r,status:n,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(r){if(rl(t.options.mutationKey)!==rl(l))return!1}else if(!Mc(t.options.mutationKey,l))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Mb(e,t){return((t==null?void 0:t.queryKeyHashFn)||rl)(e)}function rl(e){return JSON.stringify(e,(t,r)=>ox(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Mc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Mc(e[r],t[r])):!1}var S$=Object.prototype.hasOwnProperty;function m2(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=e_(e)&&e_(t);if(!n&&!(ox(e)&&ox(t)))return t;const l=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),c=o.length,f=n?new Array(c):{};let h=0;for(let p=0;p<c;p++){const y=n?p:o[p],v=e[y],x=t[y];if(v===x){f[y]=v,(n?p<l:S$.call(e,y))&&h++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){f[y]=x;continue}const b=m2(v,x,r+1);f[y]=b,b===v&&h++}return l===c&&h===l?e:f}function Ch(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function e_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ox(e){if(!t_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!t_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function t_(e){return Object.prototype.toString.call(e)==="[object Object]"}function N$(e){return new Promise(t=>{Rs.setTimeout(t,e)})}function ux(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?m2(e,t):t}function O$(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function _$(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Rb=Symbol();function p2(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Rb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Db(e,t){return typeof e=="function"?e(...t):!!e}function E$(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var Rc=(()=>{let e=()=>j$;return{isServer(){return e()},setIsServer(t){e=t}}})();function cx(){let e,t;const r=new Promise((i,l)=>{e=i,t=l});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var A$=b$;function C$(){let e=[],t=0,r=c=>{c()},n=c=>{c()},i=A$;const l=c=>{t?e.push(c):i(()=>{r(c)})},o=()=>{const c=e;e=[],c.length&&i(()=>{n(()=>{c.forEach(f=>{r(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||o()}return f},batchCalls:c=>(...f)=>{l(()=>{c(...f)})},schedule:l,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{i=c}}}var $t=C$(),Co,Bi,To,n2,T$=(n2=class extends nu{constructor(){super();xe(this,Co,!0);xe(this,Bi);xe(this,To);fe(this,To,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){B(this,Bi)||this.setEventListener(B(this,To))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,Bi))==null||t.call(this),fe(this,Bi,void 0))}setEventListener(t){var r;fe(this,To,t),(r=B(this,Bi))==null||r.call(this),fe(this,Bi,t(this.setOnline.bind(this)))}setOnline(t){B(this,Co)!==t&&(fe(this,Co,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return B(this,Co)}},Co=new WeakMap,Bi=new WeakMap,To=new WeakMap,n2),Th=new T$;function P$(e){return Math.min(1e3*2**e,3e4)}function y2(e){return(e??"online")==="online"?Th.isOnline():!0}var dx=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function v2(e){let t=!1,r=0,n;const i=cx(),l=()=>i.status!=="pending",o=w=>{var N;if(!l()){const O=new dx(w);v(O),(N=e.onCancel)==null||N.call(e,O)}},c=()=>{t=!0},f=()=>{t=!1},h=()=>Pb.isFocused()&&(e.networkMode==="always"||Th.isOnline())&&e.canRun(),p=()=>y2(e.networkMode)&&e.canRun(),y=w=>{l()||(n==null||n(),i.resolve(w))},v=w=>{l()||(n==null||n(),i.reject(w))},x=()=>new Promise(w=>{var N;n=O=>{(l()||h())&&w(O)},(N=e.onPause)==null||N.call(e)}).then(()=>{var w;n=void 0,l()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(l())return;let w;const N=r===0?e.initialPromise:void 0;try{w=N??e.fn()}catch(O){w=Promise.reject(O)}Promise.resolve(w).then(y).catch(O=>{var M;if(l())return;const C=e.retry??(Rc.isServer()?0:3),E=e.retryDelay??P$,A=typeof E=="function"?E(r,O):E,T=C===!0||typeof C=="number"&&r<C||typeof C=="function"&&C(r,O);if(t||!T){v(O);return}r++,(M=e.onFail)==null||M.call(e,r,O),N$(A).then(()=>h()?void 0:x()).then(()=>{t?v(O):b()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n==null||n(),i),cancelRetry:c,continueRetry:f,canStart:p,start:()=>(p()?b():x().then(b),i)}}var qs,a2,g2=(a2=class{constructor(){xe(this,qs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lx(this.gcTime)&&fe(this,qs,Rs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rc.isServer()?1/0:300*1e3))}clearGcTimeout(){B(this,qs)&&(Rs.clearTimeout(B(this,qs)),fe(this,qs,void 0))}},qs=new WeakMap,a2),Hs,Po,bn,Fs,Ht,rd,Ks,Zr,x2,Ra,i2,M$=(i2=class extends g2{constructor(t){super();xe(this,Zr);xe(this,Hs);xe(this,Po);xe(this,bn);xe(this,Fs);xe(this,Ht);xe(this,rd);xe(this,Ks);fe(this,Ks,!1),fe(this,rd,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,Fs,t.client),fe(this,bn,B(this,Fs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,Hs,n_(this.options)),this.state=t.state??B(this,Hs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=B(this,Ht))==null?void 0:t.promise}setOptions(t){if(this.options={...B(this,rd),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=n_(this.options);r.data!==void 0&&(this.setState(r_(r.data,r.dataUpdatedAt)),fe(this,Hs,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&B(this,bn).remove(this)}setData(t,r){const n=ux(this.state.data,t,this.options);return Ce(this,Zr,Ra).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Ce(this,Zr,Ra).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=B(this,Ht))==null?void 0:n.promise;return(i=B(this,Ht))==null||i.cancel(t),r?r.then(jr).catch(jr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return B(this,Hs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>wn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rb||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Xi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!h2(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=B(this,Ht))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=B(this,Ht))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),B(this,bn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(B(this,Ht)&&(B(this,Ks)||Ce(this,Zr,x2).call(this)?B(this,Ht).cancel({revert:!0}):B(this,Ht).cancelRetry()),this.scheduleGc()),B(this,bn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ce(this,Zr,Ra).call(this,{type:"invalidate"})}async fetch(t,r){var f,h,p,y,v,x,b,w,N,O,C,E;if(this.state.fetchStatus!=="idle"&&((f=B(this,Ht))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(B(this,Ht))return B(this,Ht).continueRetry(),B(this,Ht).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(T=>T.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(fe(this,Ks,!0),n.signal)})},l=()=>{const A=p2(this.options,r),M=(()=>{const R={client:B(this,Fs),queryKey:this.queryKey,meta:this.meta};return i(R),R})();return fe(this,Ks,!1),this.options.persister?this.options.persister(A,M,this):A(M)},c=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:B(this,Fs),state:this.state,fetchFn:l};return i(A),A})();(h=this.options.behavior)==null||h.onFetch(c,this),fe(this,Po,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=c.fetchOptions)==null?void 0:p.meta))&&Ce(this,Zr,Ra).call(this,{type:"fetch",meta:(y=c.fetchOptions)==null?void 0:y.meta}),fe(this,Ht,v2({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:A=>{A instanceof dx&&A.revert&&this.setState({...B(this,Po),fetchStatus:"idle"}),n.abort()},onFail:(A,T)=>{Ce(this,Zr,Ra).call(this,{type:"failed",failureCount:A,error:T})},onPause:()=>{Ce(this,Zr,Ra).call(this,{type:"pause"})},onContinue:()=>{Ce(this,Zr,Ra).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const A=await B(this,Ht).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(x=(v=B(this,bn).config).onSuccess)==null||x.call(v,A,this),(w=(b=B(this,bn).config).onSettled)==null||w.call(b,A,this.state.error,this),A}catch(A){if(A instanceof dx){if(A.silent)return B(this,Ht).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ce(this,Zr,Ra).call(this,{type:"error",error:A}),(O=(N=B(this,bn).config).onError)==null||O.call(N,A,this),(E=(C=B(this,bn).config).onSettled)==null||E.call(C,this.state.data,A,this),A}finally{this.scheduleGc()}}},Hs=new WeakMap,Po=new WeakMap,bn=new WeakMap,Fs=new WeakMap,Ht=new WeakMap,rd=new WeakMap,Ks=new WeakMap,Zr=new WeakSet,x2=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ra=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...b2(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...r_(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,Po,t.manual?i:void 0),i;case"error":const l=t.error;return{...n,error:l,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),$t.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),B(this,bn).notify({query:this,type:"updated",action:t})})},i2);function b2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:y2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function r_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function n_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Ir,$e,nd,br,Gs,Mo,ka,Ui,ad,Ro,Do,Ys,Vs,qi,ko,Ge,Nc,fx,hx,mx,px,yx,vx,gx,w2,s2,j2=(s2=class extends nu{constructor(t,r){super();xe(this,Ge);xe(this,Ir);xe(this,$e);xe(this,nd);xe(this,br);xe(this,Gs);xe(this,Mo);xe(this,ka);xe(this,Ui);xe(this,ad);xe(this,Ro);xe(this,Do);xe(this,Ys);xe(this,Vs);xe(this,qi);xe(this,ko,new Set);this.options=r,fe(this,Ir,t),fe(this,Ui,null),fe(this,ka,cx()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(B(this,$e).addObserver(this),a_(B(this,$e),this.options)?Ce(this,Ge,Nc).call(this):this.updateResult(),Ce(this,Ge,px).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xx(B(this,$e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xx(B(this,$e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ce(this,Ge,yx).call(this),Ce(this,Ge,vx).call(this),B(this,$e).removeObserver(this)}setOptions(t){const r=this.options,n=B(this,$e);if(this.options=B(this,Ir).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wn(this.options.enabled,B(this,$e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ce(this,Ge,gx).call(this),B(this,$e).setOptions(this.options),r._defaulted&&!Ch(this.options,r)&&B(this,Ir).getQueryCache().notify({type:"observerOptionsUpdated",query:B(this,$e),observer:this});const i=this.hasListeners();i&&i_(B(this,$e),n,this.options,r)&&Ce(this,Ge,Nc).call(this),this.updateResult(),i&&(B(this,$e)!==n||wn(this.options.enabled,B(this,$e))!==wn(r.enabled,B(this,$e))||Xi(this.options.staleTime,B(this,$e))!==Xi(r.staleTime,B(this,$e)))&&Ce(this,Ge,fx).call(this);const l=Ce(this,Ge,hx).call(this);i&&(B(this,$e)!==n||wn(this.options.enabled,B(this,$e))!==wn(r.enabled,B(this,$e))||l!==B(this,qi))&&Ce(this,Ge,mx).call(this,l)}getOptimisticResult(t){const r=B(this,Ir).getQueryCache().build(B(this,Ir),t),n=this.createResult(r,t);return D$(this,n)&&(fe(this,br,n),fe(this,Mo,this.options),fe(this,Gs,B(this,$e).state)),n}getCurrentResult(){return B(this,br)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&B(this,ka).status==="pending"&&B(this,ka).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){B(this,ko).add(t)}getCurrentQuery(){return B(this,$e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=B(this,Ir).defaultQueryOptions(t),n=B(this,Ir).getQueryCache().build(B(this,Ir),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ce(this,Ge,Nc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),B(this,br)))}createResult(t,r){var I;const n=B(this,$e),i=this.options,l=B(this,br),o=B(this,Gs),c=B(this,Mo),h=t!==n?t.state:B(this,nd),{state:p}=t;let y={...p},v=!1,x;if(r._optimisticResults){const k=this.hasListeners(),H=!k&&a_(t,r),q=k&&i_(t,n,r,i);(H||q)&&(y={...y,...b2(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:N}=y;x=y.data;let O=!1;if(r.placeholderData!==void 0&&x===void 0&&N==="pending"){let k;l!=null&&l.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(k=l.data,O=!0):k=typeof r.placeholderData=="function"?r.placeholderData((I=B(this,Do))==null?void 0:I.state.data,B(this,Do)):r.placeholderData,k!==void 0&&(N="success",x=ux(l==null?void 0:l.data,k,r),v=!0)}if(r.select&&x!==void 0&&!O)if(l&&x===(o==null?void 0:o.data)&&r.select===B(this,ad))x=B(this,Ro);else try{fe(this,ad,r.select),x=r.select(x),x=ux(l==null?void 0:l.data,x,r),fe(this,Ro,x),fe(this,Ui,null)}catch(k){fe(this,Ui,k)}B(this,Ui)&&(b=B(this,Ui),x=B(this,Ro),w=Date.now(),N="error");const C=y.fetchStatus==="fetching",E=N==="pending",A=N==="error",T=E&&C,M=x!==void 0,D={status:N,fetchStatus:y.fetchStatus,isPending:E,isSuccess:N==="success",isError:A,isInitialLoading:T,isLoading:T,data:x,dataUpdatedAt:y.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:y.dataUpdateCount>h.dataUpdateCount||y.errorUpdateCount>h.errorUpdateCount,isFetching:C,isRefetching:C&&!E,isLoadingError:A&&!M,isPaused:y.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:A&&M,isStale:kb(t,r),refetch:this.refetch,promise:B(this,ka),isEnabled:wn(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=D.data!==void 0,H=D.status==="error"&&!k,q=W=>{H?W.reject(D.error):k&&W.resolve(D.data)},ie=()=>{const W=fe(this,ka,D.promise=cx());q(W)},re=B(this,ka);switch(re.status){case"pending":t.queryHash===n.queryHash&&q(re);break;case"fulfilled":(H||D.data!==re.value)&&ie();break;case"rejected":(!H||D.error!==re.reason)&&ie();break}}return D}updateResult(){const t=B(this,br),r=this.createResult(B(this,$e),this.options);if(fe(this,Gs,B(this,$e).state),fe(this,Mo,this.options),B(this,Gs).data!==void 0&&fe(this,Do,B(this,$e)),Ch(r,t))return;fe(this,br,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,l=typeof i=="function"?i():i;if(l==="all"||!l&&!B(this,ko).size)return!0;const o=new Set(l??B(this,ko));return this.options.throwOnError&&o.add("error"),Object.keys(B(this,br)).some(c=>{const f=c;return B(this,br)[f]!==t[f]&&o.has(f)})};Ce(this,Ge,w2).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ce(this,Ge,px).call(this)}},Ir=new WeakMap,$e=new WeakMap,nd=new WeakMap,br=new WeakMap,Gs=new WeakMap,Mo=new WeakMap,ka=new WeakMap,Ui=new WeakMap,ad=new WeakMap,Ro=new WeakMap,Do=new WeakMap,Ys=new WeakMap,Vs=new WeakMap,qi=new WeakMap,ko=new WeakMap,Ge=new WeakSet,Nc=function(t){Ce(this,Ge,gx).call(this);let r=B(this,$e).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(jr)),r},fx=function(){Ce(this,Ge,yx).call(this);const t=Xi(this.options.staleTime,B(this,$e));if(Rc.isServer()||B(this,br).isStale||!lx(t))return;const n=h2(B(this,br).dataUpdatedAt,t)+1;fe(this,Ys,Rs.setTimeout(()=>{B(this,br).isStale||this.updateResult()},n))},hx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(B(this,$e)):this.options.refetchInterval)??!1},mx=function(t){Ce(this,Ge,vx).call(this),fe(this,qi,t),!(Rc.isServer()||wn(this.options.enabled,B(this,$e))===!1||!lx(B(this,qi))||B(this,qi)===0)&&fe(this,Vs,Rs.setInterval(()=>{(this.options.refetchIntervalInBackground||Pb.isFocused())&&Ce(this,Ge,Nc).call(this)},B(this,qi)))},px=function(){Ce(this,Ge,fx).call(this),Ce(this,Ge,mx).call(this,Ce(this,Ge,hx).call(this))},yx=function(){B(this,Ys)&&(Rs.clearTimeout(B(this,Ys)),fe(this,Ys,void 0))},vx=function(){B(this,Vs)&&(Rs.clearInterval(B(this,Vs)),fe(this,Vs,void 0))},gx=function(){const t=B(this,Ir).getQueryCache().build(B(this,Ir),this.options);if(t===B(this,$e))return;const r=B(this,$e);fe(this,$e,t),fe(this,nd,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},w2=function(t){$t.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(B(this,br))}),B(this,Ir).getQueryCache().notify({query:B(this,$e),type:"observerResultsUpdated"})})},s2);function R$(e,t){return wn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function a_(e,t){return R$(e,t)||e.state.data!==void 0&&xx(e,t,t.refetchOnMount)}function xx(e,t,r){if(wn(t.enabled,e)!==!1&&Xi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&kb(e,t)}return!1}function i_(e,t,r,n){return(e!==t||wn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&kb(e,r)}function kb(e,t){return wn(t.enabled,e)!==!1&&e.isStaleByTime(Xi(t.staleTime,e))}function D$(e,t){return!Ch(e.getCurrentResult(),t)}function Ph(e){return{onFetch:(t,r)=>{var p,y,v,x,b;const n=t.options,i=(v=(y=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:y.fetchMore)==null?void 0:v.direction,l=((x=t.state.data)==null?void 0:x.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const h=async()=>{let w=!1;const N=E=>{E$(E,()=>t.signal,()=>w=!0)},O=p2(t.options,t.fetchOptions),C=async(E,A,T)=>{if(w)return Promise.reject();if(A==null&&E.pages.length)return Promise.resolve(E);const R=(()=>{const H={client:t.client,queryKey:t.queryKey,pageParam:A,direction:T?"backward":"forward",meta:t.options.meta};return N(H),H})(),D=await O(R),{maxPages:I}=t.options,k=T?_$:O$;return{pages:k(E.pages,D,I),pageParams:k(E.pageParams,A,I)}};if(i&&l.length){const E=i==="backward",A=E?S2:bx,T={pages:l,pageParams:o},M=A(n,T);c=await C(T,M,E)}else{const E=e??l.length;do{const A=f===0?o[0]??n.initialPageParam:bx(n,c);if(f>0&&A==null)break;c=await C(c,A),f++}while(f<E)}return c};t.options.persister?t.fetchFn=()=>{var w,N;return(N=(w=t.options).persister)==null?void 0:N.call(w,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function bx(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function S2(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function k$(e,t){return t?bx(e,t)!=null:!1}function I$(e,t){return!t||!e.getPreviousPageParam?!1:S2(e,t)!=null}var L$=class extends j2{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Ph()})}getOptimisticResult(e){return e.behavior=Ph(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,w;const{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:l,isError:o,isRefetchError:c}=n,f=(w=(b=r.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:w.direction,h=o&&f==="forward",p=i&&f==="forward",y=o&&f==="backward",v=i&&f==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:k$(t,r.data),hasPreviousPage:I$(t,r.data),isFetchNextPageError:h,isFetchingNextPage:p,isFetchPreviousPageError:y,isFetchingPreviousPage:v,isRefetchError:c&&!h&&!y,isRefetching:l&&!p&&!v}}},id,Jn,fr,Qs,ea,Mi,l2,$$=(l2=class extends g2{constructor(t){super();xe(this,ea);xe(this,id);xe(this,Jn);xe(this,fr);xe(this,Qs);fe(this,id,t.client),this.mutationId=t.mutationId,fe(this,fr,t.mutationCache),fe(this,Jn,[]),this.state=t.state||N2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){B(this,Jn).includes(t)||(B(this,Jn).push(t),this.clearGcTimeout(),B(this,fr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,Jn,B(this,Jn).filter(r=>r!==t)),this.scheduleGc(),B(this,fr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){B(this,Jn).length||(this.state.status==="pending"?this.scheduleGc():B(this,fr).remove(this))}continue(){var t;return((t=B(this,Qs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,c,f,h,p,y,v,x,b,w,N,O,C,E,A,T,M,R;const r=()=>{Ce(this,ea,Mi).call(this,{type:"continue"})},n={client:B(this,id),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,Qs,v2({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(D,I)=>{Ce(this,ea,Mi).call(this,{type:"failed",failureCount:D,error:I})},onPause:()=>{Ce(this,ea,Mi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>B(this,fr).canRun(this)}));const i=this.state.status==="pending",l=!B(this,Qs).canStart();try{if(i)r();else{Ce(this,ea,Mi).call(this,{type:"pending",variables:t,isPaused:l}),B(this,fr).config.onMutate&&await B(this,fr).config.onMutate(t,this,n);const I=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t,n));I!==this.state.context&&Ce(this,ea,Mi).call(this,{type:"pending",context:I,variables:t,isPaused:l})}const D=await B(this,Qs).start();return await((h=(f=B(this,fr).config).onSuccess)==null?void 0:h.call(f,D,t,this.state.context,this,n)),await((y=(p=this.options).onSuccess)==null?void 0:y.call(p,D,t,this.state.context,n)),await((x=(v=B(this,fr).config).onSettled)==null?void 0:x.call(v,D,null,this.state.variables,this.state.context,this,n)),await((w=(b=this.options).onSettled)==null?void 0:w.call(b,D,null,t,this.state.context,n)),Ce(this,ea,Mi).call(this,{type:"success",data:D}),D}catch(D){try{await((O=(N=B(this,fr).config).onError)==null?void 0:O.call(N,D,t,this.state.context,this,n))}catch(I){Promise.reject(I)}try{await((E=(C=this.options).onError)==null?void 0:E.call(C,D,t,this.state.context,n))}catch(I){Promise.reject(I)}try{await((T=(A=B(this,fr).config).onSettled)==null?void 0:T.call(A,void 0,D,this.state.variables,this.state.context,this,n))}catch(I){Promise.reject(I)}try{await((R=(M=this.options).onSettled)==null?void 0:R.call(M,void 0,D,t,this.state.context,n))}catch(I){Promise.reject(I)}throw Ce(this,ea,Mi).call(this,{type:"error",error:D}),D}finally{B(this,fr).runNext(this)}}},id=new WeakMap,Jn=new WeakMap,fr=new WeakMap,Qs=new WeakMap,ea=new WeakSet,Mi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),$t.batch(()=>{B(this,Jn).forEach(n=>{n.onMutationUpdate(t)}),B(this,fr).notify({mutation:this,type:"updated",action:t})})},l2);function N2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ia,Mn,sd,o2,z$=(o2=class extends nu{constructor(t={}){super();xe(this,Ia);xe(this,Mn);xe(this,sd);this.config=t,fe(this,Ia,new Set),fe(this,Mn,new Map),fe(this,sd,0)}build(t,r,n){const i=new $$({client:t,mutationCache:this,mutationId:++Xf(this,sd)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){B(this,Ia).add(t);const r=Wf(t);if(typeof r=="string"){const n=B(this,Mn).get(r);n?n.push(t):B(this,Mn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(B(this,Ia).delete(t)){const r=Wf(t);if(typeof r=="string"){const n=B(this,Mn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&B(this,Mn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Wf(t);if(typeof r=="string"){const n=B(this,Mn).get(r),i=n==null?void 0:n.find(l=>l.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Wf(t);if(typeof r=="string"){const i=(n=B(this,Mn).get(r))==null?void 0:n.find(l=>l!==t&&l.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){$t.batch(()=>{B(this,Ia).forEach(t=>{this.notify({type:"removed",mutation:t})}),B(this,Ia).clear(),B(this,Mn).clear()})}getAll(){return Array.from(B(this,Ia))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>JO(r,n))}findAll(t={}){return this.getAll().filter(r=>JO(t,r))}notify(t){$t.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return $t.batch(()=>Promise.all(t.map(r=>r.continue().catch(jr))))}},Ia=new WeakMap,Mn=new WeakMap,sd=new WeakMap,o2);function Wf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var La,Hi,Lr,$a,Ya,xh,jx,u2,B$=(u2=class extends nu{constructor(r,n){super();xe(this,Ya);xe(this,La);xe(this,Hi);xe(this,Lr);xe(this,$a);fe(this,La,r),this.setOptions(n),this.bindMethods(),Ce(this,Ya,xh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=B(this,La).defaultMutationOptions(r),Ch(this.options,n)||B(this,La).getMutationCache().notify({type:"observerOptionsUpdated",mutation:B(this,Lr),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&rl(n.mutationKey)!==rl(this.options.mutationKey)?this.reset():((i=B(this,Lr))==null?void 0:i.state.status)==="pending"&&B(this,Lr).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=B(this,Lr))==null||r.removeObserver(this)}onMutationUpdate(r){Ce(this,Ya,xh).call(this),Ce(this,Ya,jx).call(this,r)}getCurrentResult(){return B(this,Hi)}reset(){var r;(r=B(this,Lr))==null||r.removeObserver(this),fe(this,Lr,void 0),Ce(this,Ya,xh).call(this),Ce(this,Ya,jx).call(this)}mutate(r,n){var i;return fe(this,$a,n),(i=B(this,Lr))==null||i.removeObserver(this),fe(this,Lr,B(this,La).getMutationCache().build(B(this,La),this.options)),B(this,Lr).addObserver(this),B(this,Lr).execute(r)}},La=new WeakMap,Hi=new WeakMap,Lr=new WeakMap,$a=new WeakMap,Ya=new WeakSet,xh=function(){var n;const r=((n=B(this,Lr))==null?void 0:n.state)??N2();fe(this,Hi,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},jx=function(r){$t.batch(()=>{var n,i,l,o,c,f,h,p;if(B(this,$a)&&this.hasListeners()){const y=B(this,Hi).variables,v=B(this,Hi).context,x={client:B(this,La),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(i=(n=B(this,$a)).onSuccess)==null||i.call(n,r.data,y,v,x)}catch(b){Promise.reject(b)}try{(o=(l=B(this,$a)).onSettled)==null||o.call(l,r.data,null,y,v,x)}catch(b){Promise.reject(b)}}else if((r==null?void 0:r.type)==="error"){try{(f=(c=B(this,$a)).onError)==null||f.call(c,r.error,y,v,x)}catch(b){Promise.reject(b)}try{(p=(h=B(this,$a)).onSettled)==null||p.call(h,void 0,r.error,y,v,x)}catch(b){Promise.reject(b)}}}this.listeners.forEach(y=>{y(B(this,Hi))})})},u2),ta,c2,U$=(c2=class extends nu{constructor(t={}){super();xe(this,ta);this.config=t,fe(this,ta,new Map)}build(t,r,n){const i=r.queryKey,l=r.queryHash??Mb(i,r);let o=this.get(l);return o||(o=new M$({client:t,queryKey:i,queryHash:l,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){B(this,ta).has(t.queryHash)||(B(this,ta).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=B(this,ta).get(t.queryHash);r&&(t.destroy(),r===t&&B(this,ta).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){$t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return B(this,ta).get(t)}getAll(){return[...B(this,ta).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ZO(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>ZO(t,n)):r}notify(t){$t.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){$t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){$t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ta=new WeakMap,c2),gt,Fi,Ki,Io,Lo,Gi,$o,zo,d2,q$=(d2=class{constructor(e={}){xe(this,gt);xe(this,Fi);xe(this,Ki);xe(this,Io);xe(this,Lo);xe(this,Gi);xe(this,$o);xe(this,zo);fe(this,gt,e.queryCache||new U$),fe(this,Fi,e.mutationCache||new z$),fe(this,Ki,e.defaultOptions||{}),fe(this,Io,new Map),fe(this,Lo,new Map),fe(this,Gi,0)}mount(){Xf(this,Gi)._++,B(this,Gi)===1&&(fe(this,$o,Pb.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,gt).onFocus())})),fe(this,zo,Th.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,gt).onOnline())})))}unmount(){var e,t;Xf(this,Gi)._--,B(this,Gi)===0&&((e=B(this,$o))==null||e.call(this),fe(this,$o,void 0),(t=B(this,zo))==null||t.call(this),fe(this,zo,void 0))}isFetching(e){return B(this,gt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return B(this,Fi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=B(this,gt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=B(this,gt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Xi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return B(this,gt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=B(this,gt).get(n.queryHash),l=i==null?void 0:i.state.data,o=w$(t,l);if(o!==void 0)return B(this,gt).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return $t.batch(()=>B(this,gt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=B(this,gt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=B(this,gt);$t.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=B(this,gt);return $t.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=$t.batch(()=>B(this,gt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(jr).catch(jr)}invalidateQueries(e,t={}){return $t.batch(()=>(B(this,gt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=$t.batch(()=>B(this,gt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let l=i.fetch(void 0,r);return r.throwOnError||(l=l.catch(jr)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(n).then(jr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=B(this,gt).build(this,t);return r.isStaleByTime(Xi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jr).catch(jr)}fetchInfiniteQuery(e){return e.behavior=Ph(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jr).catch(jr)}ensureInfiniteQueryData(e){return e.behavior=Ph(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Th.isOnline()?B(this,Fi).resumePausedMutations():Promise.resolve()}getQueryCache(){return B(this,gt)}getMutationCache(){return B(this,Fi)}getDefaultOptions(){return B(this,Ki)}setDefaultOptions(e){fe(this,Ki,e)}setQueryDefaults(e,t){B(this,Io).set(rl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...B(this,Io).values()],r={};return t.forEach(n=>{Mc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){B(this,Lo).set(rl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...B(this,Lo).values()],r={};return t.forEach(n=>{Mc(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...B(this,Ki).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Rb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...B(this,Ki).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){B(this,gt).clear(),B(this,Fi).clear()}},gt=new WeakMap,Fi=new WeakMap,Ki=new WeakMap,Io=new WeakMap,Lo=new WeakMap,Gi=new WeakMap,$o=new WeakMap,zo=new WeakMap,d2),O2=S.createContext(void 0),fa=e=>{const t=S.useContext(O2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},H$=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(O2.Provider,{value:e,children:t})),_2=S.createContext(!1),F$=()=>S.useContext(_2);_2.Provider;function K$(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var G$=S.createContext(K$()),Y$=()=>S.useContext(G$),V$=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Db(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Q$=e=>{S.useEffect(()=>{e.clearReset()},[e])},X$=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Db(r,[e.error,n])),W$=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Z$=(e,t)=>e.isLoading&&e.isFetching&&!t,J$=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,s_=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function E2(e,t,r){var v,x,b,w;const n=F$(),i=Y$(),l=fa(),o=l.defaultQueryOptions(e);(x=(v=l.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||x.call(v,o);const c=l.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",W$(o),V$(o,i,c),Q$(i);const f=!l.getQueryCache().get(o.queryHash),[h]=S.useState(()=>new t(l,o)),p=h.getOptimisticResult(o),y=!n&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(N=>{const O=y?h.subscribe($t.batchCalls(N)):jr;return h.updateResult(),O},[h,y]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),S.useEffect(()=>{h.setOptions(o)},[o,h]),J$(o,p))throw s_(o,h,i);if(X$({result:p,errorResetBoundary:i,throwOnError:o.throwOnError,query:c,suspense:o.suspense}))throw p.error;if((w=(b=l.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||w.call(b,o,p),o.experimental_prefetchInRender&&!Rc.isServer()&&Z$(p,n)){const N=f?s_(o,h,i):c==null?void 0:c.promise;N==null||N.catch(jr).finally(()=>{h.updateResult()})}return o.notifyOnChangeProps?p:h.trackResult(p)}function Ue(e,t){return E2(e,j2)}function wx(e,t){const r=fa(),[n]=S.useState(()=>new B$(r,e));S.useEffect(()=>{n.setOptions(e)},[n,e]);const i=S.useSyncExternalStore(S.useCallback(o=>n.subscribe($t.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),l=S.useCallback((o,c)=>{n.mutate(o,c).catch(jr)},[n]);if(i.error&&Db(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:l,mutateAsync:i.mutate}}function A2(e,t){return E2(e,L$)}var Oc=typeof window<"u"?S.useLayoutEffect:S.useEffect;function og(e){const t=S.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function ez(e,t,r={},n={}){S.useEffect(()=>{if(!e.current||n.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([l])=>{t(l)},r);return i.observe(e.current),()=>{i.disconnect()}},[t,r,n.disabled,e])}function tz(e){const t=S.useRef(null);return S.useImperativeHandle(e,()=>t.current,[]),t}var C2=!1;function Dc(e){return e[e.length-1]}function rz(e){return typeof e=="function"}function Yi(e,t){return rz(e)?e(t):e}var nz=Object.prototype.hasOwnProperty,l_=Object.prototype.propertyIsEnumerable,az=()=>Object.create(null),Os=(e,t)=>Ba(e,t,az);function Ba(e,t,r=()=>({}),n=0){if(e===t)return e;if(n>500)return t;const i=t,l=c_(e)&&c_(i);if(!l&&!(Uo(e)&&Uo(i)))return i;const o=l?e:o_(e);if(!o)return i;const c=l?i:o_(i);if(!c)return i;const f=o.length,h=c.length,p=l?new Array(h):r();let y=0;for(let v=0;v<h;v++){const x=l?v:c[v],b=e[x],w=i[x];if(b===w){p[x]=b,(l?v<f:nz.call(e,x))&&y++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[x]=w;continue}const N=Ba(b,w,r,n+1);p[x]=N,N===b&&y++}return f===h&&y===f?e:p}function o_(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!l_.call(e,i))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const n=t;for(const i of r){if(!l_.call(e,i))return!1;n.push(i)}return n}function Uo(e){if(!u_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!u_(r)||!r.hasOwnProperty("isPrototypeOf"))}function u_(e){return Object.prototype.toString.call(e)==="[object Object]"}function c_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Xs(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(!Xs(e[n],t[n],r))return!1;return!0}if(Uo(e)&&Uo(t)){const n=(r==null?void 0:r.ignoreUndefined)??!0;if(r!=null&&r.partial){for(const o in t)if((!n||t[o]!==void 0)&&!Xs(e[o],t[o],r))return!1;return!0}let i=0;if(!n)i=Object.keys(e).length;else for(const o in e)e[o]!==void 0&&i++;let l=0;for(const o in t)if((!n||t[o]!==void 0)&&(l++,l>i||!Xs(e[o],t[o],r)))return!1;return i===l}return!1}function qo(e){let t,r;const n=new Promise((i,l)=>{t=i,r=l});return n.status="pending",n.resolve=i=>{n.status="resolved",n.value=i,t(i),e==null||e(i)},n.reject=i=>{n.status="rejected",r(i)},n}function kc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function iz(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function d_(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return iz(t)}var sz=["http:","https:","mailto:","tel:"];function Mh(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}function oc(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let r=0,n="",i;for(;(i=t.exec(e))!==null;)n+=d_(e.slice(r,i.index))+i[0],r=t.lastIndex;n=n+d_(r?e.slice(r):e);let l=!1;return n.startsWith("//")&&(l=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:l}}function lz(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function oz(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Ha(){throw new Error("Invariant failed")}function Ic(e){const t=new Map;let r,n;const i=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,n&&(n.next=l,l.prev=n)):(l.next.prev=void 0,r=l.next,l.next=void 0,n&&(l.prev=n,n.next=l)),n=l)};return{get(l){const o=t.get(l);if(o)return i(o),o.value},set(l,o){if(t.size>=e&&r){const f=r;t.delete(f.key),f.next&&(r=f.next,f.next.prev=void 0),f===n&&(n=void 0)}const c=t.get(l);if(c)c.value=o,i(c);else{const f={key:l,value:o,prev:n};n&&(n.next=f),n=f,r||(r=f),t.set(l,f)}},clear(){t.clear(),r=void 0,n=void 0}}}var Ds=4,T2=5;function uz(e){const t=e.indexOf("{");if(t===-1)return null;const r=e.indexOf("}",t);return r===-1||t+1>=e.length?null:[t,r]}function Ib(e,t,r=new Uint16Array(6)){const n=e.indexOf("/",t),i=n===-1?e.length:n,l=e.substring(t,i);if(!l||!l.includes("$"))return r[0]=0,r[1]=t,r[2]=t,r[3]=i,r[4]=i,r[5]=i,r;if(l==="$"){const c=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=c,r[4]=c,r[5]=c,r}if(l.charCodeAt(0)===36)return r[0]=1,r[1]=t,r[2]=t+1,r[3]=i,r[4]=i,r[5]=i,r;const o=uz(l);if(o){const[c,f]=o,h=l.charCodeAt(c+1);if(h===45){if(c+2<l.length&&l.charCodeAt(c+2)===36){const p=c+3,y=f;if(p<y)return r[0]=3,r[1]=t+c,r[2]=t+p,r[3]=t+y,r[4]=t+f+1,r[5]=i,r}}else if(h===36){const p=c+1,y=c+2;return y===f?(r[0]=2,r[1]=t+c,r[2]=t+p,r[3]=t+y,r[4]=t+f+1,r[5]=e.length,r):(r[0]=1,r[1]=t+c,r[2]=t+y,r[3]=t+f,r[4]=t+f+1,r[5]=i,r)}}return r[0]=0,r[1]=t,r[2]=t,r[3]=i,r[4]=i,r[5]=i,r}function km(e,t,r,n,i,l,o){var f,h,p,y,v,x,b,w,N,O,C,E,A;o==null||o(r);let c=n;{const T=r.fullPath??r.from,M=T.length,R=((f=r.options)==null?void 0:f.caseSensitive)??e,D=!!((p=(h=r.options)==null?void 0:h.params)!=null&&p.parse&&((v=(y=r.options)==null?void 0:y.skipRouteOnParseError)!=null&&v.params));for(;c<M;){const k=Ib(T,c,t);let H;const q=c,ie=k[5];switch(c=ie+1,l++,k[0]){case 0:{const re=T.substring(k[2],k[3]);if(R){const W=(x=i.static)==null?void 0:x.get(re);if(W)H=W;else{i.static??(i.static=new Map);const $=ks(r.fullPath??r.from);$.parent=i,$.depth=l,H=$,i.static.set(re,$)}}else{const W=re.toLowerCase(),$=(b=i.staticInsensitive)==null?void 0:b.get(W);if($)H=$;else{i.staticInsensitive??(i.staticInsensitive=new Map);const F=ks(r.fullPath??r.from);F.parent=i,F.depth=l,H=F,i.staticInsensitive.set(W,F)}}break}case 1:{const re=T.substring(q,k[1]),W=T.substring(k[4],ie),$=R&&!!(re||W),F=re?$?re:re.toLowerCase():void 0,J=W?$?W:W.toLowerCase():void 0,ne=!D&&((w=i.dynamic)==null?void 0:w.find(ce=>!ce.skipOnParamError&&ce.caseSensitive===$&&ce.prefix===F&&ce.suffix===J));if(ne)H=ne;else{const ce=cg(1,r.fullPath??r.from,$,F,J);H=ce,ce.depth=l,ce.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(ce)}break}case 3:{const re=T.substring(q,k[1]),W=T.substring(k[4],ie),$=R&&!!(re||W),F=re?$?re:re.toLowerCase():void 0,J=W?$?W:W.toLowerCase():void 0,ne=!D&&((N=i.optional)==null?void 0:N.find(ce=>!ce.skipOnParamError&&ce.caseSensitive===$&&ce.prefix===F&&ce.suffix===J));if(ne)H=ne;else{const ce=cg(3,r.fullPath??r.from,$,F,J);H=ce,ce.parent=i,ce.depth=l,i.optional??(i.optional=[]),i.optional.push(ce)}break}case 2:{const re=T.substring(q,k[1]),W=T.substring(k[4],ie),$=R&&!!(re||W),F=re?$?re:re.toLowerCase():void 0,J=W?$?W:W.toLowerCase():void 0,ne=cg(2,r.fullPath??r.from,$,F,J);H=ne,ne.parent=i,ne.depth=l,i.wildcard??(i.wildcard=[]),i.wildcard.push(ne)}}i=H}if(D&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const k=ks(r.fullPath??r.from);k.kind=T2,k.parent=i,l++,k.depth=l,i.pathless??(i.pathless=[]),i.pathless.push(k),i=k}const I=(r.path||!r.children)&&!r.isRoot;if(I&&T.endsWith("/")){const k=ks(r.fullPath??r.from);k.kind=Ds,k.parent=i,l++,k.depth=l,i.index=k,i=k}i.parse=((C=(O=r.options)==null?void 0:O.params)==null?void 0:C.parse)??null,i.skipOnParamError=D,i.parsingPriority=((A=(E=r.options)==null?void 0:E.skipRouteOnParseError)==null?void 0:A.priority)??0,I&&!i.route&&(i.route=r,i.fullPath=r.fullPath??r.from)}if(r.children)for(const T of r.children)km(e,t,T,c,i,l,o)}function ug(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Ri(e){var t,r,n;if(e.pathless)for(const i of e.pathless)Ri(i);if(e.static)for(const i of e.static.values())Ri(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Ri(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(ug);for(const i of e.dynamic)Ri(i)}if((r=e.optional)!=null&&r.length){e.optional.sort(ug);for(const i of e.optional)Ri(i)}if((n=e.wildcard)!=null&&n.length){e.wildcard.sort(ug);for(const i of e.wildcard)Ri(i)}}function ks(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function cg(e,t,r,n,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:n,suffix:i}}function cz(e,t){const r=ks("/"),n=new Uint16Array(6);for(const i of e)km(!1,n,i,1,r,0);Ri(r),t.masksTree=r,t.flatCache=Ic(1e3)}function dz(e,t){e||(e="/");const r=t.flatCache.get(e);if(r)return r;const n=Lb(e,t.masksTree);return t.flatCache.set(e,n),n}function fz(e,t,r,n,i){e||(e="/"),n||(n="/");const l=t?`case\0${e}`:e;let o=i.singleCache.get(l);return o||(o=ks("/"),km(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(l,o)),Lb(n,o,r)}function hz(e,t,r=!1){const n=r?e:`nofuzz\0${e}`,i=t.matchCache.get(n);if(i!==void 0)return i;e||(e="/");let l;try{l=Lb(e,t.segmentTree,r)}catch(o){if(o instanceof URIError)l=null;else throw o}return l&&(l.branch=yz(l.route)),t.matchCache.set(n,l),l}function mz(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function pz(e,t=!1,r){const n=ks(e.fullPath),i=new Uint16Array(6),l={},o={};let c=0;return km(t,i,e,1,n,0,f=>{if(r==null||r(f,c),f.id in l&&Ha(),l[f.id]=f,c!==0&&f.path){const h=mz(f.fullPath);(!o[h]||f.fullPath.endsWith("/"))&&(o[h]=f)}c++}),Ri(n),{processedTree:{segmentTree:n,singleCache:Ic(1e3),matchCache:Ic(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:o}}function Lb(e,t,r=!1){const n=e.split("/"),i=gz(e,n,t,r);if(!i)return null;const[l]=P2(e,n,i);return{route:i.node.route,rawParams:l,parsedParams:i.parsedParams}}function P2(e,t,r){var p,y,v,x,b,w,N,O,C,E;const n=vz(r.node);let i=null;const l=Object.create(null);let o=((p=r.extract)==null?void 0:p.part)??0,c=((y=r.extract)==null?void 0:y.node)??0,f=((v=r.extract)==null?void 0:v.path)??0,h=((x=r.extract)==null?void 0:x.segment)??0;for(;c<n.length;o++,c++,f++,h++){const A=n[c];if(A.kind===Ds)break;if(A.kind===T2){h--,o--,f--;continue}const T=t[o],M=f;if(T&&(f+=T.length),A.kind===1){i??(i=r.node.fullPath.split("/"));const R=i[h],D=((b=A.prefix)==null?void 0:b.length)??0;if(R.charCodeAt(D)===123){const I=((w=A.suffix)==null?void 0:w.length)??0,k=R.substring(D+2,R.length-I-1),H=T.substring(D,T.length-I);l[k]=decodeURIComponent(H)}else{const I=R.substring(1);l[I]=decodeURIComponent(T)}}else if(A.kind===3){if(r.skipped&1<<c){o--,f=M-1;continue}i??(i=r.node.fullPath.split("/"));const R=i[h],D=((N=A.prefix)==null?void 0:N.length)??0,I=((O=A.suffix)==null?void 0:O.length)??0,k=R.substring(D+3,R.length-I-1),H=A.suffix||A.prefix?T.substring(D,T.length-I):T;H&&(l[k]=decodeURIComponent(H))}else if(A.kind===2){const R=A,D=e.substring(M+(((C=R.prefix)==null?void 0:C.length)??0),e.length-(((E=R.suffix)==null?void 0:E.length)??0)),I=decodeURIComponent(D);l["*"]=I,l._splat=I;break}}return r.rawParams&&Object.assign(l,r.rawParams),[l,{part:o,node:c,path:f,segment:h}]}function yz(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function vz(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function gz(e,t,r,n){if(e==="/"&&r.index)return{node:r.index,skipped:0};const i=!Dc(t),l=i&&e!=="/",o=t.length-(i?1:0),c=[{node:r,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let f=null,h=null,p=null;for(;c.length;){const y=c.pop(),{node:v,index:x,skipped:b,depth:w,statics:N,dynamics:O,optionals:C}=y;let{extract:E,rawParams:A,parsedParams:T}=y;if(v.skipOnParamError){if(!dg(e,t,y))continue;A=y.rawParams,E=y.extract,T=y.parsedParams}n&&v.route&&v.kind!==Ds&&uc(h,y)&&(h=y);const M=x===o;if(M&&(v.route&&!l&&uc(p,y)&&(p=y),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const R=M?void 0:t[x];let D;if(M&&v.index){const I={node:v.index,index:x,skipped:b,depth:w+1,statics:N,dynamics:O,optionals:C,extract:E,rawParams:A,parsedParams:T};let k=!0;if(v.index.skipOnParamError&&(dg(e,t,I)||(k=!1)),k){if(N===o&&!O&&!C&&!b)return I;uc(p,I)&&(p=I)}}if(v.wildcard&&uc(f,y))for(const I of v.wildcard){const{prefix:k,suffix:H}=I;if(k&&(M||!(I.caseSensitive?R:D??(D=R.toLowerCase())).startsWith(k)))continue;if(H){if(M)continue;const ie=t.slice(x).join("/").slice(-H.length);if((I.caseSensitive?ie:ie.toLowerCase())!==H)continue}const q={node:I,index:o,skipped:b,depth:w,statics:N,dynamics:O,optionals:C,extract:E,rawParams:A,parsedParams:T};if(!(I.skipOnParamError&&!dg(e,t,q))){f=q;break}}if(v.optional){const I=b|1<<w,k=w+1;for(let H=v.optional.length-1;H>=0;H--){const q=v.optional[H];c.push({node:q,index:x,skipped:I,depth:k,statics:N,dynamics:O,optionals:C,extract:E,rawParams:A,parsedParams:T})}if(!M)for(let H=v.optional.length-1;H>=0;H--){const q=v.optional[H],{prefix:ie,suffix:re}=q;if(ie||re){const W=q.caseSensitive?R:D??(D=R.toLowerCase());if(ie&&!W.startsWith(ie)||re&&!W.endsWith(re))continue}c.push({node:q,index:x+1,skipped:b,depth:k,statics:N,dynamics:O,optionals:C+1,extract:E,rawParams:A,parsedParams:T})}}if(!M&&v.dynamic&&R)for(let I=v.dynamic.length-1;I>=0;I--){const k=v.dynamic[I],{prefix:H,suffix:q}=k;if(H||q){const ie=k.caseSensitive?R:D??(D=R.toLowerCase());if(H&&!ie.startsWith(H)||q&&!ie.endsWith(q))continue}c.push({node:k,index:x+1,skipped:b,depth:w+1,statics:N,dynamics:O+1,optionals:C,extract:E,rawParams:A,parsedParams:T})}if(!M&&v.staticInsensitive){const I=v.staticInsensitive.get(D??(D=R.toLowerCase()));I&&c.push({node:I,index:x+1,skipped:b,depth:w+1,statics:N+1,dynamics:O,optionals:C,extract:E,rawParams:A,parsedParams:T})}if(!M&&v.static){const I=v.static.get(R);I&&c.push({node:I,index:x+1,skipped:b,depth:w+1,statics:N+1,dynamics:O,optionals:C,extract:E,rawParams:A,parsedParams:T})}if(v.pathless){const I=w+1;for(let k=v.pathless.length-1;k>=0;k--){const H=v.pathless[k];c.push({node:H,index:x,skipped:b,depth:I,statics:N,dynamics:O,optionals:C,extract:E,rawParams:A,parsedParams:T})}}}if(p&&f)return uc(f,p)?p:f;if(p)return p;if(f)return f;if(n&&h){let y=h.index;for(let x=0;x<h.index;x++)y+=t[x].length;const v=y===e.length?"/":e.slice(y);return h.rawParams??(h.rawParams=Object.create(null)),h.rawParams["**"]=decodeURIComponent(v),h}return null}function dg(e,t,r){try{const[n,i]=P2(e,t,r);r.rawParams=n,r.extract=i;const l=r.node.parse(n);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,l),!0}catch{return null}}function uc(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ds)>(e.node.kind===Ds)||t.node.kind===Ds==(e.node.kind===Ds)&&t.depth>e.depth))):!0}function bh(e){return $b(e.filter(t=>t!==void 0).join("/"))}function $b(e){return e.replace(/\/{2,}/g,"/")}function M2(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Wi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function R2(e){return Wi(M2(e))}function Rh(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function xz(e,t,r){return Rh(e,r)===Rh(t,r)}function bz({base:e,to:t,trailingSlash:r="never",cache:n}){const i=t.startsWith("/"),l=!i&&t===".";let o;if(n){o=i?t:l?e:e+"\0"+t;const y=n.get(o);if(y)return y}let c;if(l)c=e.split("/");else if(i)c=t.split("/");else{for(c=e.split("/");c.length>1&&Dc(c)==="";)c.pop();const y=t.split("/");for(let v=0,x=y.length;v<x;v++){const b=y[v];b===""?v?v===x-1&&c.push(b):c=[b]:b===".."?c.pop():b==="."||c.push(b)}}c.length>1&&(Dc(c)===""?r==="never"&&c.pop():r==="always"&&c.push(""));let f,h="";for(let y=0;y<c.length;y++){y>0&&(h+="/");const v=c[y];if(!v)continue;f=Ib(v,0,f);const x=f[0];if(x===0){h+=v;continue}const b=f[5],w=v.substring(0,f[1]),N=v.substring(f[4],b),O=v.substring(f[2],f[3]);x===1?h+=w||N?`${w}{$${O}}${N}`:`$${O}`:x===2?h+=w||N?`${w}{$}${N}`:"$":h+=`${w}{-$${O}}${N}`}h=$b(h);const p=h||"/";return o&&n&&n.set(o,p),p}function jz(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),r=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(r,"g");return i=>i.replace(n,l=>t.get(l)??l)}function fg(e,t,r){const n=t[e];return typeof n!="string"?n:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(i=>h_(i,r)).join("/"):h_(n,r)}function f_({path:e,params:t,decoder:r,...n}){let i=!1;const l=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:l,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:l,isMissingParams:i};const o=e.length;let c=0,f,h="";for(;c<o;){const p=c;f=Ib(e,p,f);const y=f[5];if(c=y+1,p===y)continue;const v=f[0];if(v===0){h+="/"+e.substring(p,y);continue}if(v===2){const x=t._splat;l._splat=x,l["*"]=x;const b=e.substring(p,f[1]),w=e.substring(f[4],y);if(!x){i=!0,(b||w)&&(h+="/"+b+w);continue}const N=fg("_splat",t,r);h+="/"+b+N+w;continue}if(v===1){const x=e.substring(f[2],f[3]);!i&&!(x in t)&&(i=!0),l[x]=t[x];const b=e.substring(p,f[1]),w=e.substring(f[4],y),N=fg(x,t,r)??"undefined";h+="/"+b+N+w;continue}if(v===3){const x=e.substring(f[2],f[3]),b=t[x];if(b==null)continue;l[x]=b;const w=e.substring(p,f[1]),N=e.substring(f[4],y),O=fg(x,t,r)??"";h+="/"+w+O+N;continue}}return e.endsWith("/")&&(h+="/"),{usedParams:l,interpolatedPath:h||"/",isMissingParams:i}}function h_(e,t){const r=encodeURIComponent(e);return(t==null?void 0:t(r))??r}function Nr(e){return!!(e!=null&&e.isNotFound)}function wz(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var Sz="tsr-scroll-restoration-v1_3";function Nz(){const e=wz();if(!e)return null;let t={};try{const n=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Uo(n)&&(t=n)}catch{}return{get state(){return t},set:n=>{t=Yi(n,t)||t},persist:()=>{try{e.setItem(Sz,JSON.stringify(t))}catch{}}}}var m_=Nz(),Oz=e=>e.state.__TSR_key||e.href;function _z(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}var Zf=!1,cc="window",p_="data-scroll-restoration-id";function Ez(e,t){if(!m_)return;const r=m_;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,Zf=!1;const n=e.options.getScrollRestorationKey||Oz,i=new Map;window.history.scrollRestoration="manual";const l=c=>{if(!(Zf||!e.isScrollRestoring))if(c.target===document||c.target===window)i.set(cc,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const f=c.target;i.set(f,{scrollX:f.scrollLeft||0,scrollY:f.scrollTop||0})}},o=c=>{var h;if(!e.isScrollRestoring||!c||i.size===0||!r)return;const f=(h=r.state)[c]||(h[c]={});for(const[p,y]of i){let v;if(p===cc)v=cc;else if(p.isConnected){const x=p.getAttribute(p_);v=x?`[${p_}="${x}"]`:_z(p)}v&&(f[v]=y)}};document.addEventListener("scroll",l,!0),e.subscribe("onBeforeLoad",c=>{o(c.fromLocation?n(c.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{o(n(e.stores.resolvedLocation.state??e.stores.location.state)),r.persist()}),e.subscribe("onRendered",c=>{var y;const f=n(c.toLocation),h=e.options.scrollRestorationBehavior,p=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Zf=!0;try{const v=e.isScrollRestoring?r.state[f]:void 0;let x=!1;if(v)for(const b in v){const w=v[b];if(!Uo(w))continue;const{scrollX:N,scrollY:O}=w;if(!(!Number.isFinite(N)||!Number.isFinite(O))){if(b===cc)window.scrollTo({top:O,left:N,behavior:h}),x=!0;else if(b){let C;try{C=document.querySelector(b)}catch{continue}C&&(C.scrollLeft=N,C.scrollTop=O,x=!0)}}}if(!x){const b=e.history.location.hash.slice(1);if(b){const w=((y=window.history.state)==null?void 0:y.__hashScrollIntoViewOptions)??!0;if(w){const N=document.getElementById(b);N&&N.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:h};if(window.scrollTo(w),p)for(const N of p){if(N===cc)continue;const O=typeof N=="function"?N():document.querySelector(N);O&&O.scrollTo(w)}}}}finally{Zf=!1}e.isScrollRestoring&&r.set(v=>(v[f]||(v[f]={}),v))}})}function Az(e,t=String){const r=new URLSearchParams;for(const n in e){const i=e[n];i!==void 0&&r.set(n,t(i))}return r.toString()}function hg(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Cz(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[n,i]of t.entries()){const l=r[n];l==null?r[n]=hg(i):Array.isArray(l)?l.push(hg(i)):r[n]=[l,hg(i)]}return r}var Tz=Mz(JSON.parse),Pz=Rz(JSON.stringify,JSON.parse);function Mz(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=Cz(t);for(const n in r){const i=r[n];if(typeof i=="string")try{r[n]=e(i)}catch{}}return r}}function Rz(e,t){const r=typeof t=="function";function n(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(r&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const l=Az(i,n);return l?`?${l}`:""}}var Ws="__root__";function Dz(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function zr(e){return e instanceof Response&&!!e.options}function kz(e){return{input:({url:t})=>{for(const r of e)t=Sx(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=D2(e[r],t);return t}}}function Iz(e){const t=R2(e.basepath),r=`/${t}`,n=`${r}/`,i=e.caseSensitive?r:r.toLowerCase(),l=e.caseSensitive?n:n.toLowerCase();return{input:({url:o})=>{const c=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return c===i?o.pathname="/":c.startsWith(l)&&(o.pathname=o.pathname.slice(r.length)),o},output:({url:o})=>(o.pathname=bh(["/",t,o.pathname]),o)}}function Sx(e,t){var n;const r=(n=e==null?void 0:e.input)==null?void 0:n.call(e,{url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function D2(e,t){var n;const r=(n=e==null?void 0:e.output)==null?void 0:n.call(e,{url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function Lz(e,t){const{createMutableStore:r,createReadonlyStore:n,batch:i,init:l}=t,o=new Map,c=new Map,f=new Map,h=r(e.status),p=r(e.loadedAt),y=r(e.isLoading),v=r(e.isTransitioning),x=r(e.location),b=r(e.resolvedLocation),w=r(e.statusCode),N=r(e.redirect),O=r([]),C=r([]),E=r([]),A=n(()=>mg(o,O.state)),T=n(()=>mg(c,C.state)),M=n(()=>mg(f,E.state)),R=n(()=>O.state[0]),D=n(()=>O.state.some(F=>{var J;return((J=o.get(F))==null?void 0:J.state.status)==="pending"})),I=n(()=>{var F;return{locationHref:x.state.href,resolvedLocationHref:(F=b.state)==null?void 0:F.href,status:h.state}}),k=n(()=>({status:h.state,loadedAt:p.state,isLoading:y.state,isTransitioning:v.state,matches:A.state,location:x.state,resolvedLocation:b.state,statusCode:w.state,redirect:N.state})),H=Ic(64);function q(F){let J=H.get(F);return J||(J=n(()=>{const ne=O.state;for(const ce of ne){const L=o.get(ce);if(L&&L.routeId===F)return L.state}}),H.set(F,J)),J}const ie={status:h,loadedAt:p,isLoading:y,isTransitioning:v,location:x,resolvedLocation:b,statusCode:w,redirect:N,matchesId:O,pendingMatchesId:C,cachedMatchesId:E,activeMatchesSnapshot:A,pendingMatchesSnapshot:T,cachedMatchesSnapshot:M,firstMatchId:R,hasPendingMatches:D,matchRouteReactivity:I,activeMatchStoresById:o,pendingMatchStoresById:c,cachedMatchStoresById:f,__store:k,getMatchStoreByRouteId:q,setActiveMatches:re,setPendingMatches:W,setCachedMatches:$};re(e.matches),l==null||l(ie);function re(F){pg(F,o,O,r,i)}function W(F){pg(F,c,C,r,i)}function $(F){pg(F,f,E,r,i)}return ie}function mg(e,t){const r=[];for(const n of t){const i=e.get(n);i&&r.push(i.state)}return r}function pg(e,t,r,n,i){const l=e.map(c=>c.id),o=new Set(l);i(()=>{for(const c of t.keys())o.has(c)||t.delete(c);for(const c of e){const f=t.get(c.id);if(!f){const h=n(c);h.routeId=c.routeId,t.set(c.id,h);continue}f.routeId=c.routeId,f.state!==c&&f.setState(()=>c)}oz(r.state,l)||r.setState(()=>l)})}var Nx=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},$z=e=>e.stores.matchesId.state.some(t=>{var r;return(r=e.stores.activeMatchStoresById.get(t))==null?void 0:r.state._forcePending}),Im=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),Zs=(e,t,r=!0)=>{const n={...e.router.options.context??{}},i=r?t:t-1;for(let l=0;l<=i;l++){const o=e.matches[l];if(!o)continue;const c=e.router.getMatch(o.id);c&&Object.assign(n,c.__routeContext,c.__beforeLoadContext)}return n},y_=(e,t)=>{if(!e.matches.length)return;const r=t.routeId,n=e.matches.findIndex(o=>o.routeId===e.router.routeTree.id),i=n>=0?n:0;let l=r?e.matches.findIndex(o=>o.routeId===r):e.firstBadMatchIndex??e.matches.length-1;l<0&&(l=i);for(let o=l;o>=0;o--){const c=e.matches[o];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return o}return r?l:i},Vi=(e,t,r)=>{var n,i,l;if(!(!zr(r)&&!Nr(r)))throw zr(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&((n=t._nonReactive.beforeLoadPromise)==null||n.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,o=>({...o,status:zr(r)?"redirected":o.status==="pending"?"success":o.status,context:Zs(e,t.index),isFetching:!1,error:r})),Nr(r)&&!r.routeId&&(r.routeId=t.routeId),(l=t._nonReactive.loadPromise)==null||l.resolve()),zr(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},k2=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},v_=(e,t,r)=>{const n=Zs(e,r);e.updateMatch(t,i=>({...i,context:n}))},dc=(e,t,r,n)=>{var c,f;const{id:i,routeId:l}=e.matches[t],o=e.router.looseRoutesById[l];if(r instanceof Promise)throw r;r.routerCode=n,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),Vi(e,e.router.getMatch(i),r);try{(f=(c=o.options).onError)==null||f.call(c,r)}catch(h){r=h,Vi(e,e.router.getMatch(i),r)}e.updateMatch(i,h=>{var p,y;return(p=h._nonReactive.beforeLoadPromise)==null||p.resolve(),h._nonReactive.beforeLoadPromise=void 0,(y=h._nonReactive.loadPromise)==null||y.resolve(),{...h,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!zr(r)&&!Nr(r)&&(e.serialError??(e.serialError=r))},I2=(e,t,r,n)=>{var l;if(n._nonReactive.pendingTimeout!==void 0)return;const i=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Im(e,t)&&(r.options.loader||r.options.beforeLoad||$2(r))&&typeof i=="number"&&i!==1/0&&(r.options.pendingComponent??((l=e.router.options)==null?void 0:l.defaultPendingComponent))){const o=setTimeout(()=>{Nx(e)},i);n._nonReactive.pendingTimeout=o}},zz=(e,t,r)=>{const n=e.router.getMatch(t);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;I2(e,t,r,n);const i=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Vi(e,l,l.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(i):i()},Bz=(e,t,r,n)=>{const i=e.router.getMatch(t);let l=i._nonReactive.loadPromise;i._nonReactive.loadPromise=qo(()=>{l==null||l.resolve(),l=void 0});const{paramsError:o,searchError:c}=i;o&&dc(e,r,o,"PARSE_PARAMS"),c&&dc(e,r,c,"VALIDATE_SEARCH"),I2(e,t,n,i);const f=new AbortController;let h=!1;const p=()=>{h||(h=!0,e.updateMatch(t,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:f})))},y=()=>{var A;(A=i._nonReactive.beforeLoadPromise)==null||A.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,T=>({...T,isFetching:!1}))};if(!n.options.beforeLoad){e.router.batch(()=>{p(),y()});return}i._nonReactive.beforeLoadPromise=qo();const v={...Zs(e,r,!1),...i.__routeContext},{search:x,params:b,cause:w}=i,N=Im(e,t),O={search:x,abortController:f,params:b,preload:N,context:v,location:e.location,navigate:A=>e.router.navigate({...A,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:N?"preload":w,matches:e.matches,routeId:n.id,...e.router.options.additionalContext},C=A=>{if(A===void 0){e.router.batch(()=>{p(),y()});return}(zr(A)||Nr(A))&&(p(),dc(e,r,A,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,T=>({...T,__beforeLoadContext:A})),y()})};let E;try{if(E=n.options.beforeLoad(O),kc(E))return p(),E.catch(A=>{dc(e,r,A,"BEFORE_LOAD")}).then(C)}catch(A){p(),dc(e,r,A,"BEFORE_LOAD")}C(E)},Uz=(e,t)=>{const{id:r,routeId:n}=e.matches[t],i=e.router.looseRoutesById[n],l=()=>c(),o=()=>Bz(e,r,t,i),c=()=>{if(k2(e,r))return;const f=zz(e,r,i);return kc(f)?f.then(o):o()};return l()},qz=(e,t,r)=>{var l,o,c,f,h,p;const n=e.router.getMatch(t);if(!n||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([(o=(l=r.options).head)==null?void 0:o.call(l,i),(f=(c=r.options).scripts)==null?void 0:f.call(c,i),(p=(h=r.options).headers)==null?void 0:p.call(h,i)]).then(([y,v,x])=>({meta:y==null?void 0:y.meta,links:y==null?void 0:y.links,headScripts:y==null?void 0:y.scripts,headers:x,scripts:v,styles:y==null?void 0:y.styles}))},L2=(e,t,r,n,i)=>{const l=t[n-1],{params:o,loaderDeps:c,abortController:f,cause:h}=e.router.getMatch(r),p=Zs(e,n),y=Im(e,r);return{params:o,deps:c,preload:!!y,parentMatchPromise:l,abortController:f,context:p,location:e.location,navigate:v=>e.router.navigate({...v,_fromLocation:e.location}),cause:y?"preload":h,route:i,...e.router.options.additionalContext}},g_=async(e,t,r,n,i)=>{var l,o,c,f,h;try{const p=e.router.getMatch(r);try{(!(C2??e.router.isServer)||p.ssr===!0)&&Lc(i);const y=i.options.loader,v=typeof y=="function"?y:y==null?void 0:y.handler,x=v==null?void 0:v(L2(e,t,r,n,i)),b=!!v&&kc(x);if((b||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||p._nonReactive.minPendingPromise)&&e.updateMatch(r,N=>({...N,isFetching:"loader"})),v){const N=b?await x:x;Vi(e,e.router.getMatch(r),N),N!==void 0&&e.updateMatch(r,O=>({...O,loaderData:N}))}i._lazyPromise&&await i._lazyPromise;const w=p._nonReactive.minPendingPromise;w&&await w,i._componentsPromise&&await i._componentsPromise,e.updateMatch(r,N=>({...N,error:void 0,context:Zs(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(y){let v=y;if((v==null?void 0:v.name)==="AbortError"){if(p.abortController.signal.aborted){(l=p._nonReactive.loaderPromise)==null||l.resolve(),p._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,b=>({...b,status:b.status==="pending"?"success":b.status,isFetching:!1,context:Zs(e,n)}));return}const x=p._nonReactive.minPendingPromise;x&&await x,Nr(y)&&await((c=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:c.call(o)),Vi(e,e.router.getMatch(r),y);try{(h=(f=i.options).onError)==null||h.call(f,y)}catch(b){v=b,Vi(e,e.router.getMatch(r),b)}!zr(v)&&!Nr(v)&&await Lc(i,["errorComponent"]),e.updateMatch(r,b=>({...b,error:v,context:Zs(e,n),status:"error",isFetching:!1}))}}catch(p){const y=e.router.getMatch(r);y&&(y._nonReactive.loaderPromise=void 0),Vi(e,y,p)}},Hz=async(e,t,r)=>{var x,b,w,N;async function n(O,C,E,A,T){const M=Date.now()-C.updatedAt,R=O?T.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:T.options.staleTime??e.router.options.defaultStaleTime??0,D=T.options.shouldReload,I=typeof D=="function"?D(L2(e,t,i,r,T)):D,{status:k,invalid:H}=A,q=M>=R&&(!!e.forceStaleReload||A.cause==="enter"||E!==void 0&&E!==A.id);o=k==="success"&&(H||(I??q)),O&&T.options.preload===!1||(o&&!e.sync&&p?(c=!0,(async()=>{var ie,re;try{await g_(e,t,i,r,T);const W=e.router.getMatch(i);(ie=W._nonReactive.loaderPromise)==null||ie.resolve(),(re=W._nonReactive.loadPromise)==null||re.resolve(),W._nonReactive.loaderPromise=void 0,W._nonReactive.loadPromise=void 0}catch(W){zr(W)&&await e.router.navigate(W.options)}})()):k!=="success"||o?await g_(e,t,i,r,T):v_(e,i,r))}const{id:i,routeId:l}=e.matches[r];let o=!1,c=!1;const f=e.router.looseRoutesById[l],h=f.options.loader,p=((typeof h=="function"||h==null?void 0:h.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(k2(e,i)){if(!e.router.getMatch(i))return e.matches[r];v_(e,i,r)}else{const O=e.router.getMatch(i),C=e.router.stores.matchesId.state[r],E=((x=C&&e.router.stores.activeMatchStoresById.get(C)||null)==null?void 0:x.routeId)===l?C:(b=e.router.stores.activeMatchesSnapshot.state.find(T=>T.routeId===l))==null?void 0:b.id,A=Im(e,i);if(O._nonReactive.loaderPromise){if(O.status==="success"&&!e.sync&&!O.preload&&p)return O;await O._nonReactive.loaderPromise;const T=e.router.getMatch(i),M=T._nonReactive.error||T.error;M&&Vi(e,T,M),T.status==="pending"&&await n(A,O,E,T,f)}else{const T=A&&!e.router.stores.activeMatchStoresById.has(i),M=e.router.getMatch(i);M._nonReactive.loaderPromise=qo(),T!==M.preload&&e.updateMatch(i,R=>({...R,preload:T})),await n(A,O,E,M,f)}}const y=e.router.getMatch(i);c||((w=y._nonReactive.loaderPromise)==null||w.resolve(),(N=y._nonReactive.loadPromise)==null||N.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pendingTimeout),y._nonReactive.pendingTimeout=void 0,c||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const v=c?y.isFetching:!1;return v!==y.isFetching||y.invalid!==!1?(e.updateMatch(i,O=>({...O,isFetching:v,invalid:!1})),e.router.getMatch(i)):y};async function x_(e){var v,x;const t=e,r=[];$z(t.router)&&Nx(t);let n;for(let b=0;b<t.matches.length;b++){try{const w=Uz(t,b);kc(w)&&await w}catch(w){if(zr(w))throw w;if(Nr(w))n=w;else if(!t.preload)throw w;break}if(t.serialError)break}const i=t.firstBadMatchIndex??t.matches.length,l=n&&!t.preload?y_(t,n):void 0,o=n&&t.preload?0:l!==void 0?Math.min(l+1,i):i;let c,f;for(let b=0;b<o;b++)r.push(Hz(t,r,b));try{await Promise.all(r)}catch{const b=await Promise.allSettled(r);for(const w of b){if(w.status!=="rejected")continue;const N=w.reason;if(zr(N))throw N;Nr(N)?c??(c=N):f??(f=N)}if(f!==void 0)throw f}const h=c??(n&&!t.preload?n:void 0);let p=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!h&&n&&t.preload)return t.matches;if(h){const b=y_(t,h);b===void 0&&Ha();const w=t.matches[b],N=t.router.looseRoutesById[w.routeId],O=(v=t.router.options)==null?void 0:v.defaultNotFoundComponent;!N.options.notFoundComponent&&O&&(N.options.notFoundComponent=O),h.routeId=w.routeId;const C=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,E=>({...E,...C?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:h},isFetching:!1})),p=b,await Lc(N,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||(x=t.router.getMatch(b.id))!=null&&x.globalNotFound&&t.updateMatch(b.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Lc(b,["errorComponent"])}for(let b=0;b<=p;b++){const{id:w,routeId:N}=t.matches[b],O=t.router.looseRoutesById[N];try{const C=qz(t,w,O);if(C){const E=await C;t.updateMatch(w,A=>({...A,...E}))}}catch(C){console.error(`Error executing head for route ${N}:`,C)}}const y=Nx(t);if(kc(y)&&await y,h)throw h;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function b_(e,t){const r=t.map(n=>{var i,l;return(l=(i=e.options[n])==null?void 0:i.preload)==null?void 0:l.call(i)}).filter(Boolean);if(r.length!==0)return Promise.all(r)}function Lc(e,t=jh){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(n=>{const{id:i,...l}=n.options;Object.assign(e.options,l),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:t===jh?(()=>{if(e._componentsPromise===void 0){const n=b_(e,jh);n?e._componentsPromise=n.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():b_(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function $2(e){var t;for(const r of jh)if((t=e.options[r])!=null&&t.preload)return!0;return!1}var jh=["component","errorComponent","pendingComponent","notFoundComponent"],Zi="__TSR_index",j_="popstate",w_="beforeunload";function Fz(e){let t=e.getLocation();const r=new Set,n=o=>{t=e.getLocation(),r.forEach(c=>c({location:t,action:o}))},i=o=>{e.notifyOnIndexChange??!0?n(o):t=e.getLocation()},l=async({task:o,navigateOpts:c,...f})=>{var y,v;if((c==null?void 0:c.ignoreBlocker)??!1){o();return}const h=((y=e.getBlockers)==null?void 0:y.call(e))??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&h.length&&p)for(const x of h){const b=Dh(f.path,f.state);if(await x.blockerFn({currentLocation:t,nextLocation:b,action:f.type})){(v=e.onBlocked)==null||v.call(e);return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:o=>(r.add(o),()=>{r.delete(o)}),push:(o,c,f)=>{const h=t.state[Zi];c=S_(h+1,c),l({task:()=>{e.pushState(o,c),n({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:o,state:c})},replace:(o,c,f)=>{const h=t.state[Zi];c=S_(h,c),l({task:()=>{e.replaceState(o,c),n({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:o,state:c})},go:(o,c)=>{l({task:()=>{e.go(o),i({type:"GO",index:o})},navigateOpts:c,type:"GO"})},back:o=>{l({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{l({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[Zi]!==0,createHref:o=>e.createHref(o),block:o=>{var f;if(!e.setBlockers)return()=>{};const c=((f=e.getBlockers)==null?void 0:f.call(e))??[];return e.setBlockers([...c,o]),()=>{var p,y;const h=((p=e.getBlockers)==null?void 0:p.call(e))??[];(y=e.setBlockers)==null||y.call(e,h.filter(v=>v!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:n}}function S_(e,t){t||(t={});const r=zb();return{...t,key:r,__TSR_key:r,[Zi]:e}}function Kz(e){var D,I;const t=typeof document<"u"?window:void 0,r=t.history.pushState,n=t.history.replaceState;let i=[];const l=()=>i,o=k=>i=k,c=(k=>k),f=(()=>Dh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((D=t.history.state)!=null&&D.__TSR_key)&&!((I=t.history.state)!=null&&I.key)){const k=zb();t.history.replaceState({[Zi]:0,key:k,__TSR_key:k},"")}let h=f(),p,y=!1,v=!1,x=!1,b=!1;const w=()=>h;let N,O;const C=()=>{N&&(R._ignoreSubscribers=!0,(N.isPush?t.history.pushState:t.history.replaceState)(N.state,"",N.href),R._ignoreSubscribers=!1,N=void 0,O=void 0,p=void 0)},E=(k,H,q)=>{const ie=c(H);O||(p=h),h=Dh(H,q),N={href:ie,state:q,isPush:(N==null?void 0:N.isPush)||k==="push"},O||(O=Promise.resolve().then(()=>C()))},A=k=>{h=f(),R.notify({type:k})},T=async()=>{if(v){v=!1;return}const k=f(),H=k.state[Zi]-h.state[Zi],q=H===1,ie=H===-1,re=!q&&!ie||y;y=!1;const W=re?"GO":ie?"BACK":"FORWARD",$=re?{type:"GO",index:H}:{type:ie?"BACK":"FORWARD"};if(x)x=!1;else{const F=l();if(typeof document<"u"&&F.length){for(const J of F)if(await J.blockerFn({currentLocation:h,nextLocation:k,action:W})){v=!0,t.history.go(1),R.notify($);return}}}h=f(),R.notify($)},M=k=>{if(b){b=!1;return}let H=!1;const q=l();if(typeof document<"u"&&q.length)for(const ie of q){const re=ie.enableBeforeUnload??!0;if(re===!0){H=!0;break}if(typeof re=="function"&&re()===!0){H=!0;break}}if(H)return k.preventDefault(),k.returnValue=""},R=Fz({getLocation:w,getLength:()=>t.history.length,pushState:(k,H)=>E("push",k,H),replaceState:(k,H)=>E("replace",k,H),back:k=>(k&&(x=!0),b=!0,t.history.back()),forward:k=>{k&&(x=!0),b=!0,t.history.forward()},go:k=>{y=!0,t.history.go(k)},createHref:k=>c(k),flush:C,destroy:()=>{t.history.pushState=r,t.history.replaceState=n,t.removeEventListener(w_,M,{capture:!0}),t.removeEventListener(j_,T)},onBlocked:()=>{p&&h!==p&&(h=p)},getBlockers:l,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(w_,M,{capture:!0}),t.addEventListener(j_,T),t.history.pushState=function(...k){const H=r.apply(t.history,k);return R._ignoreSubscribers||A("PUSH"),H},t.history.replaceState=function(...k){const H=n.apply(t.history,k);return R._ignoreSubscribers||A("REPLACE"),H},R}function Gz(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Dh(e,t){const r=Gz(e),n=r.indexOf("#"),i=r.indexOf("?"),l=zb();return{href:r,pathname:r.substring(0,n>0?i>0?Math.min(n,i):n:i>0?i:r.length),hash:n>-1?r.substring(n):"",search:i>-1?r.slice(i,n===-1?void 0:n):"",state:t||{[Zi]:0,key:l,__TSR_key:l}}}function zb(){return(Math.random()+1).toString(36).substring(7)}function No(e,t){const r=t,n=e;return{fromLocation:r,toLocation:n,pathChanged:(r==null?void 0:r.pathname)!==n.pathname,hrefChanged:(r==null?void 0:r.href)!==n.href,hashChanged:(r==null?void 0:r.hash)!==n.hash}}var Yz=class{constructor(e,t){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=r=>r(),this.update=r=>{var p;const n=this.options,i=this.basepath??(n==null?void 0:n.basepath)??"/",l=this.basepath===void 0,o=n==null?void 0:n.rewrite;if(this.options={...n,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=jz(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Kz()),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 y;this.resolvePathCache=Ic(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=Lz(Qz(this.latestLocation),y),Ez(this)}let c=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||i!==f||o!==h){this.basepath=f;const y=[],v=R2(f);v&&v!=="/"&&y.push(Iz({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:kz(y),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((p=window.CSS)==null?void 0:p.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 r=pz(this.routeTree,this.options.caseSensitive,(n,i)=>{n.init({originalIndex:i})});return this.options.routeMasks&&cz(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,n)=>{const i={eventType:r,fn:n};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=r=>{this.subscribers.forEach(n=>{n.eventType===r.type&&n.fn(r)})},this.parseLocation=(r,n)=>{const i=({pathname:f,search:h,hash:p,href:y,state:v})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(f)){const O=this.options.parseSearch(h),C=this.options.stringifySearch(O);return{href:f+C+p,publicHref:y,pathname:oc(f).path,external:!1,searchStr:C,search:Os(n==null?void 0:n.search,O),hash:oc(p.slice(1)).path,state:Ba(n==null?void 0:n.state,v)}}const x=new URL(y,this.origin),b=Sx(this.rewrite,x),w=this.options.parseSearch(b.search),N=this.options.stringifySearch(w);return b.search=N,{href:b.href.replace(b.origin,""),publicHref:y,pathname:oc(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:N,search:Os(n==null?void 0:n.search,w),hash:oc(b.hash.slice(1)).path,state:Ba(n==null?void 0:n.state,v)}},l=i(r),{__tempLocation:o,__tempKey:c}=l.state;if(o&&(!c||c===this.tempLocationKey)){const f=i(o);return f.state.key=l.state.key,f.state.__TSR_key=l.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:l}}return l},this.resolvePathWithBase=(r,n)=>bz({base:r,to:$b(n),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,n,i)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:n},i):this.matchRoutesInternal(r,n),this.getMatchedRoutes=r=>Xz({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const n=this.getMatch(r);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.state.forEach(r=>{var i;if(this.stores.pendingMatchStoresById.has(r))return;const n=(i=this.stores.activeMatchStoresById.get(r))==null?void 0:i.state;n&&(n.status==="pending"||n.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const n=(l={})=>{var k,H;const o=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(o);l.from;const f=l.unsafeRelative==="path"?o.pathname:l.from??c.fullPath,h=this.resolvePathWithBase(f,"."),p=c.search,y=Object.assign(Object.create(null),c.params),v=l.to?this.resolvePathWithBase(h,`${l.to}`):this.resolvePathWithBase(h,"."),x=l.params===!1||l.params===null?Object.create(null):(l.params??!0)===!0?y:Object.assign(y,Yi(l.params,y)),b=this.getMatchedRoutes(v);let w=b.matchedRoutes;if((!b.foundRoute||b.foundRoute.path!=="/"&&b.routeParams["**"])&&this.options.notFoundRoute&&(w=[...w,this.options.notFoundRoute]),Object.keys(x).length>0)for(const q of w){const ie=((k=q.options.params)==null?void 0:k.stringify)??q.options.stringifyParams;if(ie)try{Object.assign(x,ie(x))}catch{}}const N=r.leaveParams?v:oc(f_({path:v,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let O=p;if(r._includeValidateSearch&&((H=this.options.search)!=null&&H.strict)){const q={};w.forEach(ie=>{if(ie.options.validateSearch)try{Object.assign(q,wh(ie.options.validateSearch,{...q,...O}))}catch{}}),O=q}O=Wz({search:O,dest:l,destRoutes:w,_includeValidateSearch:r._includeValidateSearch}),O=Os(p,O);const C=this.options.stringifySearch(O),E=l.hash===!0?o.hash:l.hash?Yi(l.hash,o.hash):void 0,A=E?`#${E}`:"";let T=l.state===!0?o.state:l.state?Yi(l.state,o.state):{};T=Ba(o.state,T);const M=`${N}${C}${A}`;let R,D,I=!1;if(this.rewrite){const q=new URL(M,this.origin),ie=D2(this.rewrite,q);R=q.href.replace(q.origin,""),ie.origin!==this.origin?(D=ie.href,I=!0):D=ie.pathname+ie.search+ie.hash}else R=lz(M),D=R;return{publicHref:D,href:R,pathname:N,search:O,searchStr:C,state:T,hash:E??"",external:I,unmaskOnReload:l.unmaskOnReload}},i=(l={},o)=>{const c=n(l);let f=o?n(o):void 0;if(!f){const h=Object.create(null);if(this.options.routeMasks){const p=dz(c.pathname,this.processedTree);if(p){Object.assign(h,p.rawParams);const{from:y,params:v,...x}=p.route,b=v===!1||v===null?Object.create(null):(v??!0)===!0?h:Object.assign(h,Yi(v,h));o={from:r.from,...x,params:b},f=n(o)}}}return f&&(c.maskedLocation=f),c};return r.mask?i(r,{from:r.from,...r.mask}):i(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:n,...i})=>{const l=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(p=>{i.state[p]=this.latestLocation.state[p]});const h=Xs(i.state,this.latestLocation.state);return f.forEach(p=>{delete i.state[p]}),h},o=Wi(this.latestLocation.href)===Wi(i.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=qo(()=>{c==null||c.resolve(),c=void 0}),o&&l())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,...p}=i;f&&(p={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[i.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:n,hashScrollIntoView:i,viewTransition:l,ignoreBlocker:o,href:c,...f}={})=>{if(c){const y=this.history.location.state.__TSR_index,v=Dh(c,{__TSR_index:r?y:y+1}),x=new URL(v.pathname,this.origin);f.to=Sx(this.rewrite,x).pathname,f.search=this.options.parseSearch(v.search),f.hash=v.hash.slice(1)}const h=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const p=this.commitLocation({...h,viewTransition:l,replace:r,resetScroll:n,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:r,reloadDocument:n,href:i,publicHref:l,...o})=>{var f,h;let c=!1;if(i)try{new URL(`${i}`),c=!0}catch{}if(c&&!n&&(n=!0),n){if(r!==void 0||!i){const y=this.buildLocation({to:r,...o});i=i??y.publicHref,l=l??y.publicHref}const p=!c&&l?l:i;if(Mh(p,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const y=((h=(f=this.history).getBlockers)==null?void 0:h.call(f))??[];for(const v of y)if(v!=null&&v.blockerFn&&await v.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...o,href:i,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),n=this.stores.cachedMatchesSnapshot.state.filter(i=>!r.some(l=>l.id===i.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(r),this.stores.setCachedMatches(n)})},this.load=async r=>{let n,i,l;const o=this.stores.resolvedLocation.state??this.stores.location.state;for(l=new Promise(f=>{this.startTransition(async()=>{var h;try{this.beforeLoad();const p=this.latestLocation,y=this.stores.resolvedLocation.state,v=No(p,y);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...v}),this.emit({type:"onBeforeLoad",...v}),await x_({router:this,sync:r==null?void 0:r.sync,forceStaleReload:o.href===p.href,matches:this.stores.pendingMatchesSnapshot.state,location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var O,C;let x=null,b=null,w=null,N=null;this.batch(()=>{const E=this.stores.pendingMatchesSnapshot.state,A=E.length,T=this.stores.activeMatchesSnapshot.state;x=A?T.filter(D=>!this.stores.pendingMatchStoresById.has(D.id)):null;const M=new Set;for(const D of this.stores.pendingMatchStoresById.values())D.routeId&&M.add(D.routeId);const R=new Set;for(const D of this.stores.activeMatchStoresById.values())D.routeId&&R.add(D.routeId);b=A?T.filter(D=>!M.has(D.routeId)):null,w=A?E.filter(D=>!R.has(D.routeId)):null,N=A?E.filter(D=>R.has(D.routeId)):T,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),A&&(this.stores.setActiveMatches(E),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...x.filter(D=>D.status!=="error"&&D.status!=="notFound"&&D.status!=="redirected")]),this.clearExpiredCache())});for(const[E,A]of[[b,"onLeave"],[w,"onEnter"],[N,"onStay"]])if(E)for(const T of E)(C=(O=this.looseRoutesById[T.routeId].options)[A])==null||C.call(O,T)})})}})}catch(p){zr(p)?(n=p,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):Nr(p)&&(i=p);const y=n?n.status:i?404:this.stores.activeMatchesSnapshot.state.some(v=>v.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>y),this.stores.redirect.setState(()=>n)})}this.latestLoadPromise===l&&((h=this.commitLocationPromise)==null||h.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.activeMatchesSnapshot.state.some(f=>f.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.setState(()=>c)},this.startViewTransition=r=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,o=this.stores.resolvedLocation.state,c=typeof n.types=="function"?n.types(No(l,o)):n.types;if(c===!1){r();return}i={update:r,types:c}}else i=r;document.startViewTransition(i)}else r()},this.updateMatch=(r,n)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStoresById.get(r);if(i){i.setState(n);return}const l=this.stores.activeMatchStoresById.get(r);if(l){l.setState(n);return}const o=this.stores.cachedMatchStoresById.get(r);if(o){const c=n(o.state);c.status==="redirected"?this.stores.cachedMatchStoresById.delete(r)&&this.stores.cachedMatchesId.setState(f=>f.filter(h=>h!==r)):o.setState(()=>c)}})},this.getMatch=r=>{var n,i,l;return((n=this.stores.cachedMatchStoresById.get(r))==null?void 0:n.state)??((i=this.stores.pendingMatchStoresById.get(r))==null?void 0:i.state)??((l=this.stores.activeMatchStoresById.get(r))==null?void 0:l.state)},this.invalidate=r=>{const n=i=>{var l;return((l=r==null?void 0:r.filter)==null?void 0:l.call(r,i))??!0?{...i,invalid:!0,...r!=null&&r.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(n)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(n)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(n))}),this.shouldViewTransition=!1,this.load({sync:r==null?void 0:r.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const n=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const i=r.options._builtLocation??this.buildLocation(r.options),l=this.getParsedLocationHref(i);r.options.href=l,r.headers.set("Location",l)}else if(n)try{const i=new URL(n);if(this.origin&&i.origin===this.origin){const l=i.pathname+i.search+i.hash;r.options.href=l,r.headers.set("Location",l)}}catch{}if(r.options.href&&!r.options._builtLocation&&Mh(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const n=r==null?void 0:r.filter;n!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(i=>!n(i))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const r=Date.now(),n=i=>{const l=this.looseRoutesById[i.routeId];if(!l.options.loader)return!0;const o=(i.preload?l.options.preloadGcTime??this.options.defaultPreloadGcTime:l.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:r-i.updatedAt>=o};this.clearCache({filter:n})},this.loadRouteChunk=Lc,this.preloadRoute=async r=>{const n=r._builtLocation??this.buildLocation(r);let i=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:r});const l=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),o=new Set([...l,...this.stores.cachedMatchesId.state]),c=i.filter(f=>!o.has(f.id));if(c.length){const f=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...f,...c])}try{return i=await x_({router:this,matches:i,location:n,preload:!0,updateMatch:(f,h)=>{l.has(f)?i=i.map(p=>p.id===f?h(p):p):this.updateMatch(f,h)}}),i}catch(f){if(zr(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:n});Nr(f)||console.error(f);return}},this.matchRoute=(r,n)=>{const i={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},l=this.buildLocation(i);if(n!=null&&n.pending&&this.stores.status.state!=="pending")return!1;const o=((n==null?void 0:n.pending)===void 0?!this.stores.isLoading.state:n.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,c=fz(l.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,o.pathname,this.processedTree);return!c||r.params&&!Xs(c.rawParams,r.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?Xs(o.search,l.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Pz,parseSearch:e.parseSearch??Tz,protocolAllowlist:e.protocolAllowlist??sz}),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:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var y,v;const r=this.getMatchedRoutes(e.pathname),{foundRoute:n,routeParams:i,parsedParams:l}=r;let{matchedRoutes:o}=r,c=!1;(n?n.path!=="/"&&i["**"]:Wi(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:c=!0);const f=c?Jz(this.options.notFoundMode,o):void 0,h=new Array(o.length),p=new Map;for(const x of this.stores.activeMatchStoresById.values())x.routeId&&p.set(x.routeId,x.state);for(let x=0;x<o.length;x++){const b=o[x],w=h[x-1];let N,O,C;{const W=(w==null?void 0:w.search)??e.search,$=(w==null?void 0:w._strictSearch)??void 0;try{const F=wh(b.options.validateSearch,{...W})??void 0;N={...W,...F},O={...$,...F},C=void 0}catch(F){let J=F;if(F instanceof kh||(J=new kh(F.message,{cause:F})),t!=null&&t.throwOnError)throw J;N=W,O={},C=J}}const E=((v=(y=b.options).loaderDeps)==null?void 0:v.call(y,{search:N}))??"",A=E?JSON.stringify(E):"",{interpolatedPath:T,usedParams:M}=f_({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),R=b.id+T+A,D=this.getMatch(R),I=p.get(b.id),k=(D==null?void 0:D._strictParams)??M;let H;if(!D)try{N_(b,M,l,k)}catch(W){if(Nr(W)||zr(W)?H=W:H=new Vz(W.message,{cause:W}),t!=null&&t.throwOnError)throw H}Object.assign(i,k);const q=I?"stay":"enter";let ie;if(D)ie={...D,cause:q,params:(I==null?void 0:I.params)??i,_strictParams:k,search:Os(I?I.search:D.search,N),_strictSearch:O};else{const W=b.options.loader||b.options.beforeLoad||b.lazyFn||$2(b)?"pending":"success";ie={id:R,ssr:b.options.ssr,index:x,routeId:b.id,params:(I==null?void 0:I.params)??i,_strictParams:k,pathname:T,updatedAt:Date.now(),search:I?Os(I.search,N):N,_strictSearch:O,searchError:void 0,status:W,isFetching:!1,error:void 0,paramsError:H,__routeContext:void 0,_nonReactive:{loadPromise:qo()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:q,loaderDeps:I?Ba(I.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t!=null&&t.preload||(ie.globalNotFound=f===b.id),ie.searchError=C;const re=this.getParentContext(w);ie.context={...re,...ie.__routeContext,...ie.__beforeLoadContext},h[x]=ie}for(let x=0;x<h.length;x++){const b=h[x],w=this.looseRoutesById[b.routeId],N=this.getMatch(b.id),O=p.get(b.routeId);if(b.params=O?Os(O.params,i):i,!N){const C=h[x-1],E=this.getParentContext(C);if(w.options.context){const A={deps:b.loaderDeps,params:b.params,context:E??{},location:e,navigate:T=>this.navigate({...T,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:h,routeId:w.id};b.__routeContext=w.options.context(A)??void 0}b.context={...E,...b.__routeContext,...b.__beforeLoadContext}}}return h}matchRoutesLightweight(e){var p;const{matchedRoutes:t,routeParams:r,parsedParams:n}=this.getMatchedRoutes(e.pathname),i=Dc(t),l={...e.search};for(const y of t)try{Object.assign(l,wh(y.options.validateSearch,l))}catch{}const o=Dc(this.stores.matchesId.state),c=o&&((p=this.stores.activeMatchStoresById.get(o))==null?void 0:p.state),f=c&&c.routeId===i.id&&c.pathname===e.pathname;let h;if(f)h=c.params;else{const y=Object.assign(Object.create(null),r);for(const v of t)try{N_(v,r,n??{},y)}catch{}h=y}return{matchedRoutes:t,fullPath:i.fullPath,search:l,params:h}}},kh=class extends Error{},Vz=class extends Error{};function Qz(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function wh(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new kh("Async validation not supported");if(r.issues)throw new kh(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function Xz({pathname:e,routesById:t,processedTree:r}){const n=Object.create(null),i=Wi(e);let l,o;const c=hz(i,r,!0);return c&&(l=c.route,Object.assign(n,c.rawParams),o=Object.assign(Object.create(null),c.parsedParams)),{matchedRoutes:(c==null?void 0:c.branch)||[t.__root__],routeParams:n,foundRoute:l,parsedParams:o}}function Wz({search:e,dest:t,destRoutes:r,_includeValidateSearch:n}){return Zz(r)(e,t,n??!1)}function Zz(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of e){if("search"in l.options)(i=l.options.search)!=null&&i.middlewares&&t.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const o=({search:c,next:f})=>{let h=c;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(h=l.options.preSearchFilters.reduce((y,v)=>v(y),c));const p=f(h);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,v)=>v(y),p):p};t.middlewares.push(o)}if(l.options.validateSearch){const o=({search:c,next:f})=>{const h=f(c);if(!t._includeValidateSearch)return h;try{return{...h,...wh(l.options.validateSearch,h)??void 0}}catch{return h}};t.middlewares.push(o)}}const r=({search:l})=>{const o=t.dest;return o.search?o.search===!0?l:Yi(o.search,l):{}};t.middlewares.push(r);const n=(l,o,c)=>{if(l>=c.length)return o;const f=c[l];return f({search:o,next:p=>n(l+1,p,c)})};return function(o,c,f){return t.dest=c,t._includeValidateSearch=f,n(0,o,t.middlewares)}}function Jz(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const n=t[r];if(n.children)return n.id}return Ws}function N_(e,t,r,n){var l;const i=((l=e.options.params)==null?void 0:l.parse)??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const o in t)o in r&&(n[o]=r[o]);else{const o=i(n);Object.assign(n,o)}}var e8="Error preloading route! ☝️",z2=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var f,h;this.originalIndex=t.originalIndex;const r=this.options,n=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(h=(f=this.options).getParentRoute)==null?void 0:h.call(f),n?this._path=Ws:this.parentRoute||Ha();let i=n?Ws:r==null?void 0:r.path;i&&i!=="/"&&(i=M2(i));const l=(r==null?void 0:r.id)||i;let o=n?Ws:bh([this.parentRoute.id==="__root__"?"":this.parentRoute.id,l]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=bh(["/",o]));const c=o==="__root__"?"/":bh([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=c,this._to=Wi(c)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Dz({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},t8=class extends z2{constructor(e){super(e)}};function r8(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.state,r=t.state.__hashScrollIntoViewOptions??!0;if(r&&t.hash!==""){const n=document.getElementById(t.hash);n&&n.scrollIntoView(r)}}}function Bb(e){const t=e.errorComponent??Ub;return d.jsx(n8,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:n})=>r?S.createElement(t,{error:r,reset:n}):e.children})}var n8=class extends S.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function Ub({error:e}){const[t,r]=S.useState(!1);return d.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[d.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),d.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(n=>!n),children:t?"Hide Error":"Show Error"})]}),d.jsx("div",{style:{height:".25rem"}}),t?d.jsx("div",{children:d.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?d.jsx("code",{children:e.message}):null})}):null]})}function a8({children:e,fallback:t=null}){return B2()?d.jsx(Bo.Fragment,{children:e}):d.jsx(Bo.Fragment,{children:t})}function B2(){return Bo.useSyncExternalStore(i8,()=>!0,()=>!1)}function i8(){return()=>{}}var U2=S.createContext(null);function pr(e){return S.useContext(U2)}var Lm=S.createContext(void 0),s8=S.createContext(void 0),ft=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(ft||{});function l8({update:e,notify:t,unwatched:r}){return{link:n,unlink:i,propagate:l,checkDirty:o,shallowPropagate:c};function n(h,p,y){const v=p.depsTail;if(v!==void 0&&v.dep===h)return;const x=v!==void 0?v.nextDep:p.deps;if(x!==void 0&&x.dep===h){x.version=y,p.depsTail=x;return}const b=h.subsTail;if(b!==void 0&&b.version===y&&b.sub===p)return;const w=p.depsTail=h.subsTail={version:y,dep:h,sub:p,prevDep:v,nextDep:x,prevSub:b,nextSub:void 0};x!==void 0&&(x.prevDep=w),v!==void 0?v.nextDep=w:p.deps=w,b!==void 0?b.nextSub=w:h.subs=w}function i(h,p=h.sub){const y=h.dep,v=h.prevDep,x=h.nextDep,b=h.nextSub,w=h.prevSub;return x!==void 0?x.prevDep=v:p.depsTail=v,v!==void 0?v.nextDep=x:p.deps=x,b!==void 0?b.prevSub=w:y.subsTail=w,w!==void 0?w.nextSub=b:(y.subs=b)===void 0&&r(y),x}function l(h){let p=h.nextSub,y;e:do{const v=h.sub;let x=v.flags;if(x&60?x&12?x&4?!(x&48)&&f(h,v)?(v.flags=x|40,x&=1):x=0:v.flags=x&-9|32:x=0:v.flags=x|32,x&2&&t(v),x&1){const b=v.subs;if(b!==void 0){const w=(h=b).nextSub;w!==void 0&&(y={value:p,prev:y},p=w);continue}}if((h=p)!==void 0){p=h.nextSub;continue}for(;y!==void 0;)if(h=y.value,y=y.prev,h!==void 0){p=h.nextSub;continue e}break}while(!0)}function o(h,p){let y,v=0,x=!1;e:do{const b=h.dep,w=b.flags;if(p.flags&16)x=!0;else if((w&17)===17){if(e(b)){const N=b.subs;N.nextSub!==void 0&&c(N),x=!0}}else if((w&33)===33){(h.nextSub!==void 0||h.prevSub!==void 0)&&(y={value:h,prev:y}),h=b.deps,p=b,++v;continue}if(!x){const N=h.nextDep;if(N!==void 0){h=N;continue}}for(;v--;){const N=p.subs,O=N.nextSub!==void 0;if(O?(h=y.value,y=y.prev):h=N,x){if(e(p)){O&&c(N),p=h.sub;continue}x=!1}else p.flags&=-33;p=h.sub;const C=h.nextDep;if(C!==void 0){h=C;continue e}}return x}while(!0)}function c(h){do{const p=h.sub,y=p.flags;(y&48)===32&&(p.flags=y|16,(y&6)===2&&t(p))}while((h=h.nextSub)!==void 0)}function f(h,p){let y=p.depsTail;for(;y!==void 0;){if(y===h)return!0;y=y.prevDep}return!1}}function qb(e,t,r){var l,o,c;const n=typeof e=="object",i=n?e:void 0;return{next:(l=n?e.next:e)==null?void 0:l.bind(i),error:(o=n?e.error:t)==null?void 0:o.bind(i),complete:(c=n?e.complete:r)==null?void 0:c.bind(i)}}const Ox=[];let Sh=0;const{link:O_,unlink:o8,propagate:u8,checkDirty:q2,shallowPropagate:__}=l8({update(e){return e._update()},notify(e){Ox[_x++]=e,e.flags&=~ft.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=ft.Mutable|ft.Dirty,Ih(e))}});let Jf=0,_x=0,Zn,Ex=0;function H2(e){try{++Ex,e()}finally{--Ex||F2()}}function Ih(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=o8(r,e)}function F2(){if(!(Ex>0)){for(;Jf<_x;){const e=Ox[Jf];Ox[Jf++]=void 0,e.notify()}Jf=0,_x=0}}function K2(e,t){const r=typeof e=="function",n=e,i={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?ft.None:ft.Mutable,get(){return Zn!==void 0&&O_(i,Zn,Sh),i._snapshot},subscribe(l){const o=qb(l),c={current:!1},f=c8(()=>{var h;i.get(),c.current?(h=o.next)==null||h.call(o,i._snapshot):c.current=!0});return{unsubscribe:()=>{f.stop()}}},_update(l){const o=Zn,c=Object.is;if(r)Zn=i,++Sh,i.depsTail=void 0;else if(l===void 0)return!1;r&&(i.flags=ft.Mutable|ft.RecursedCheck);try{const f=i._snapshot,h=typeof l=="function"?l(f):l===void 0&&r?n(f):l;return f===void 0||!c(f,h)?(i._snapshot=h,!0):!1}finally{Zn=o,r&&(i.flags&=~ft.RecursedCheck),Ih(i)}}};return r?(i.flags=ft.Mutable|ft.Dirty,i.get=function(){const l=i.flags;if(l&ft.Dirty||l&ft.Pending&&q2(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&__(o)}}else l&ft.Pending&&(i.flags=l&~ft.Pending);return Zn!==void 0&&O_(i,Zn,Sh),i._snapshot}):i.set=function(l){if(i._update(l)){const o=i.subs;o!==void 0&&(u8(o),__(o),F2())}},i}function c8(e){const t=()=>{const n=Zn;Zn=r,++Sh,r.depsTail=void 0,r.flags=ft.Watching|ft.RecursedCheck;try{return e()}finally{Zn=n,r.flags&=~ft.RecursedCheck,Ih(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ft.Watching|ft.RecursedCheck,notify(){const n=this.flags;n&ft.Dirty||n&ft.Pending&&q2(this.deps,this)?t():this.flags=ft.Watching},stop(){this.flags=ft.None,this.depsTail=void 0,Ih(this)}};return t(),r}class d8{constructor(t){this.atom=K2(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(qb(t))}}class f8{constructor(t){this.atom=K2(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(qb(t))}}function E_(e){return typeof e=="function"?new f8(e):new d8(e)}var yg={exports:{}},vg={},gg={exports:{}},xg={};/**
|
|
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 A_;function h8(){if(A_)return xg;A_=1;var e=ru();function t(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,l=e.useLayoutEffect,o=e.useDebugValue;function c(y,v){var x=v(),b=n({inst:{value:x,getSnapshot:v}}),w=b[0].inst,N=b[1];return l(function(){w.value=x,w.getSnapshot=v,f(w)&&N({inst:w})},[y,x,v]),i(function(){return f(w)&&N({inst:w}),y(function(){f(w)&&N({inst:w})})},[y]),o(x),x}function f(y){var v=y.getSnapshot;y=y.value;try{var x=v();return!r(y,x)}catch{return!0}}function h(y,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return xg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,xg}var C_;function m8(){return C_||(C_=1,gg.exports=h8()),gg.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 T_;function p8(){if(T_)return vg;T_=1;var e=ru(),t=m8();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,l=e.useRef,o=e.useEffect,c=e.useMemo,f=e.useDebugValue;return vg.useSyncExternalStoreWithSelector=function(h,p,y,v,x){var b=l(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=c(function(){function O(M){if(!C){if(C=!0,E=M,M=v(M),x!==void 0&&w.hasValue){var R=w.value;if(x(R,M))return A=R}return A=M}if(R=A,n(E,M))return R;var D=v(M);return x!==void 0&&x(R,D)?(E=M,R):(E=M,A=D)}var C=!1,E,A,T=y===void 0?null:y;return[function(){return O(p())},T===null?void 0:function(){return O(T())}]},[p,y,v,x]);var N=i(h,b[0],b[1]);return o(function(){w.hasValue=!0,w.value=N},[N]),f(N),N},vg}var P_;function y8(){return P_||(P_=1,yg.exports=p8()),yg.exports}var G2=y8();function v8(e,t){return e===t}function lr(e,t,r=v8){const n=S.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(o);return c},[e]),i=S.useCallback(()=>e==null?void 0:e.get(),[e]);return G2.useSyncExternalStoreWithSelector(n,i,i,t,r)}var g8={state:void 0,get:()=>{},subscribe:()=>()=>{}};function hl(e){const t=pr(),r=S.useContext(e.from?s8:Lm),n=e.from??r,i=n?e.from?t.stores.getMatchStoreByRouteId(n):t.stores.activeMatchStoresById.get(n):void 0,l=S.useRef(void 0);return lr(i??g8,o=>{if((e.shouldThrow??!0)&&!o&&Ha(),o===void 0)return;const c=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const f=Ba(l.current,c);return l.current=f,f}return c})}function Y2(e){return hl({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function V2(e){const{select:t,...r}=e;return hl({...r,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function Q2(e){return hl({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function X2(e){return hl({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function ml(e){const t=pr();return S.useCallback(r=>t.navigate({...r,from:r.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function W2(e){return hl({...e,select:t=>e.select?e.select(t.context):t.context})}var $m=f2();function x8(e,t){const r=pr(),n=tz(t),{activeProps:i,inactiveProps:l,activeOptions:o,to:c,preload:f,preloadDelay:h,hashScrollIntoView:p,replace:y,startTransition:v,resetScroll:x,viewTransition:b,children:w,target:N,disabled:O,style:C,className:E,onClick:A,onBlur:T,onFocus:M,onMouseEnter:R,onMouseLeave:D,onTouchStart:I,ignoreBlocker:k,params:H,search:q,hash:ie,state:re,mask:W,reloadDocument:$,unsafeRelative:F,from:J,_fromLocation:ne,...ce}=e,L=B2(),X=S.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),le=lr(r.stores.location,Te=>Te,(Te,cr)=>Te.href===cr.href),oe=S.useMemo(()=>{const Te={_fromLocation:le,...X};return r.buildLocation(Te)},[r,le,X]),he=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,je=oe.maskedLocation?oe.maskedLocation.external:oe.external,Ne=S.useMemo(()=>O8(he,je,r.history,O),[O,je,he,r.history]),Pe=S.useMemo(()=>{if(Ne!=null&&Ne.external)return Mh(Ne.href,r.protocolAllowlist)?void 0:Ne.href;if(!_8(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),Mh(c,r.protocolAllowlist)?void 0:c}catch{}},[c,Ne,r.protocolAllowlist]),de=S.useMemo(()=>{if(Pe)return!1;if(o!=null&&o.exact){if(!xz(le.pathname,oe.pathname,r.basepath))return!1}else{const Te=Rh(le.pathname,r.basepath),cr=Rh(oe.pathname,r.basepath);if(!(Te.startsWith(cr)&&(Te.length===cr.length||Te[cr.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!Xs(le.search,oe.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?L&&le.hash===oe.hash:!0},[o==null?void 0:o.exact,o==null?void 0:o.explicitUndefined,o==null?void 0:o.includeHash,o==null?void 0:o.includeSearch,le,Pe,L,oe.hash,oe.pathname,oe.search,r.basepath]),ee=de?Yi(i,{})??b8:bg,Se=de?bg:Yi(l,{})??bg,ue=[E,ee.className,Se.className].filter(Boolean).join(" "),_t=(C||ee.style||Se.style)&&{...C,...ee.style,...Se.style},[De,Et]=S.useState(!1),At=S.useRef(!1),ur=e.reloadDocument||Pe?!1:f??r.options.defaultPreload,ma=h??r.options.defaultPreloadDelay??0,An=S.useCallback(()=>{r.preloadRoute({...X,_builtLocation:oe}).catch(Te=>{console.warn(Te),console.warn(e8)})},[r,X,oe]);ez(n,S.useCallback(Te=>{Te!=null&&Te.isIntersecting&&An()},[An]),N8,{disabled:!!O||ur!=="viewport"}),S.useEffect(()=>{At.current||!O&&ur==="render"&&(An(),At.current=!0)},[O,An,ur]);const hu=Te=>{const cr=Te.currentTarget.getAttribute("target"),Fn=N!==void 0?N:cr;if(!O&&!E8(Te)&&!Te.defaultPrevented&&(!Fn||Fn==="_self")&&Te.button===0){Te.preventDefault(),$m.flushSync(()=>{Et(!0)});const Pd=r.subscribe("onResolved",()=>{Pd(),Et(!1)});r.navigate({...X,replace:y,resetScroll:x,hashScrollIntoView:p,startTransition:v,viewTransition:b,ignoreBlocker:k})}};if(Pe)return{...ce,ref:n,href:Pe,...w&&{children:w},...N&&{target:N},...O&&{disabled:O},...C&&{style:C},...E&&{className:E},...A&&{onClick:A},...T&&{onBlur:T},...M&&{onFocus:M},...R&&{onMouseEnter:R},...D&&{onMouseLeave:D},...I&&{onTouchStart:I}};const Sl=Te=>{if(O||ur!=="intent")return;if(!ma){An();return}const cr=Te.currentTarget;if(fc.has(cr))return;const Fn=setTimeout(()=>{fc.delete(cr),An()},ma);fc.set(cr,Fn)},Up=Te=>{O||ur!=="intent"||An()},Td=Te=>{if(O||!ur||!ma)return;const cr=Te.currentTarget,Fn=fc.get(cr);Fn&&(clearTimeout(Fn),fc.delete(cr))};return{...ce,...ee,...Se,href:Ne==null?void 0:Ne.href,ref:n,onClick:oo([A,hu]),onBlur:oo([T,Td]),onFocus:oo([M,Sl]),onMouseEnter:oo([R,Sl]),onMouseLeave:oo([D,Td]),onTouchStart:oo([I,Up]),disabled:!!O,target:N,..._t&&{style:_t},...ue&&{className:ue},...O&&j8,...de&&w8,...L&&De&&S8}}var bg={},b8={className:"active"},j8={role:"link","aria-disabled":!0},w8={"data-status":"active","aria-current":"page"},S8={"data-transitioning":"transitioning"},fc=new WeakMap,N8={rootMargin:"100px"},oo=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function O8(e,t,r,n){if(!n)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function _8(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Oe=S.forwardRef((e,t)=>{const{_asChild:r,...n}=e,{type:i,...l}=x8(n,t),o=typeof n.children=="function"?n.children({isActive:l["data-status"]==="active"}):n.children;if(!r){const{disabled:c,...f}=l;return S.createElement("a",f,o)}return S.createElement(r,l,o)});function E8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var A8=class extends z2{constructor(t){super(t),this.useMatch=r=>hl({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>W2({...r,from:this.id}),this.useSearch=r=>X2({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Q2({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>V2({...r,from:this.id}),this.useLoaderData=r=>Y2({...r,from:this.id}),this.useNavigate=()=>ml({from:this.fullPath}),this.Link=Bo.forwardRef((r,n)=>d.jsx(Oe,{ref:n,from:this.fullPath,...r}))}};function C8(e){return new A8(e)}var T8=class extends t8{constructor(e){super(e),this.useMatch=t=>hl({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>W2({...t,from:this.id}),this.useSearch=t=>X2({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Q2({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>V2({...t,from:this.id}),this.useLoaderData=t=>Y2({...t,from:this.id}),this.useNavigate=()=>ml({from:this.fullPath}),this.Link=Bo.forwardRef((t,r)=>d.jsx(Oe,{ref:r,from:this.fullPath,...t}))}};function P8(e){return new T8(e)}function Er(e){return typeof e=="object"?new M_(e,{silent:!0}).createRoute(e):new M_(e,{silent:!0}).createRoute}var M_=class{constructor(e,t){this.path=e,this.createRoute=r=>{const n=C8(r);return n.isRoot=!1,n},this.silent=t==null?void 0:t.silent}};function M8(e){const t=pr(),r=`not-found-${lr(t.stores.location,n=>n.pathname)}-${lr(t.stores.status,n=>n)}`;return d.jsx(Bb,{getResetKey:()=>r,onCatch:(n,i)=>{var l;if(Nr(n))(l=e.onCatch)==null||l.call(e,n,i);else throw n},errorComponent:({error:n})=>{var i;if(Nr(n))return(i=e.fallback)==null?void 0:i.call(e,n);throw n},children:e.children})}function R8(){return d.jsx("p",{children:"Not Found"})}function xo(e){return d.jsx(d.Fragment,{children:e.children})}function Z2(e,t,r){return t.options.notFoundComponent?d.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?d.jsx(e.options.defaultNotFoundComponent,{...r}):d.jsx(R8,{})}function D8(e){return null}function k8(){return D8(pr()),null}var J2=S.memo(function({matchId:t}){const r=pr(),n=r.stores.activeMatchStoresById.get(t);n||Ha();const i=lr(r.stores.loadedAt,o=>o),l=lr(n,o=>o);return d.jsx(I8,{router:r,matchId:t,resetKey:i,matchState:S.useMemo(()=>{var f;const o=l.routeId,c=(f=r.routesById[o].parentRoute)==null?void 0:f.id;return{routeId:o,ssr:l.ssr,_displayPending:l._displayPending,parentRouteId:c}},[l._displayPending,l.routeId,l.ssr,r.routesById])})});function I8({router:e,matchId:t,resetKey:r,matchState:n}){var b,w;const i=e.routesById[n.routeId],l=i.options.pendingComponent??e.options.defaultPendingComponent,o=l?d.jsx(l,{}):null,c=i.options.errorComponent??e.options.defaultErrorComponent,f=i.options.onCatch??e.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??((b=e.options.notFoundRoute)==null?void 0:b.options.component):i.options.notFoundComponent,p=n.ssr===!1||n.ssr==="data-only",y=(!i.isRoot||i.options.wrapInSuspense||p)&&(i.options.wrapInSuspense??l??(((w=i.options.errorComponent)==null?void 0:w.preload)||p))?S.Suspense:xo,v=c?Bb:xo,x=h?M8:xo;return d.jsxs(i.isRoot?i.options.shellComponent??xo:xo,{children:[d.jsx(Lm.Provider,{value:t,children:d.jsx(y,{fallback:o,children:d.jsx(v,{getResetKey:()=>r,errorComponent:c||Ub,onCatch:(N,O)=>{if(Nr(N))throw N;f==null||f(N,O)},children:d.jsx(x,{fallback:N=>{if(!h||N.routeId&&N.routeId!==n.routeId||!N.routeId&&!i.isRoot)throw N;return S.createElement(h,N)},children:p||n._displayPending?d.jsx(a8,{fallback:o,children:d.jsx(R_,{matchId:t})}):d.jsx(R_,{matchId:t})})})})}),n.parentRouteId===Ws?d.jsxs(d.Fragment,{children:[d.jsx(L8,{resetKey:r}),e.options.scrollRestoration&&C2?d.jsx(k8,{}):null]}):null]})}function L8({resetKey:e}){const t=pr(),r=S.useRef(void 0);return Oc(()=>{const n=t.latestLocation.href;(r.current===void 0||r.current!==n)&&(t.emit({type:"onRendered",...No(t.stores.location.state,t.stores.resolvedLocation.state)}),r.current=n)},[t.latestLocation.state.__TSR_key,e,t]),null}var R_=S.memo(function({matchId:t}){var h,p,y,v;const r=pr(),n=r.stores.activeMatchStoresById.get(t);n||Ha();const i=lr(n,x=>x),l=i.routeId,o=r.routesById[l],c=S.useMemo(()=>{var b;const x=(b=r.routesById[l].options.remountDeps??r.options.defaultRemountDeps)==null?void 0:b({routeId:l,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return x?JSON.stringify(x):void 0},[l,i.loaderDeps,i._strictParams,i._strictSearch,r.options.defaultRemountDeps,r.routesById]),f=S.useMemo(()=>{const x=o.options.component??r.options.defaultComponent;return x?d.jsx(x,{},c):d.jsx(eM,{})},[c,o.options.component,r.options.defaultComponent]);if(i._displayPending)throw(h=r.getMatch(i.id))==null?void 0:h._nonReactive.displayPendingPromise;if(i._forcePending)throw(p=r.getMatch(i.id))==null?void 0:p._nonReactive.minPendingPromise;if(i.status==="pending"){const x=o.options.pendingMinMs??r.options.defaultPendingMinMs;if(x){const b=r.getMatch(i.id);if(b&&!b._nonReactive.minPendingPromise){const w=qo();b._nonReactive.minPendingPromise=w,setTimeout(()=>{w.resolve(),b._nonReactive.minPendingPromise=void 0},x)}}throw(y=r.getMatch(i.id))==null?void 0:y._nonReactive.loadPromise}if(i.status==="notFound")return Nr(i.error)||Ha(),Z2(r,o,i.error);if(i.status==="redirected")throw zr(i.error)||Ha(),(v=r.getMatch(i.id))==null?void 0:v._nonReactive.loadPromise;if(i.status==="error")throw i.error;return f}),eM=S.memo(function(){const t=pr(),r=S.useContext(Lm);let n,i=!1,l;{const h=r?t.stores.activeMatchStoresById.get(r):void 0;[n,i]=lr(h,p=>[p==null?void 0:p.routeId,(p==null?void 0:p.globalNotFound)??!1]),l=lr(t.stores.matchesId,p=>p[p.findIndex(y=>y===r)+1])}const o=n?t.routesById[n]:void 0,c=t.options.defaultPendingComponent?d.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||Ha(),Z2(t,o,void 0);if(!l)return null;const f=d.jsx(J2,{matchId:l});return n===Ws?d.jsx(S.Suspense,{fallback:c,children:f}):f});function $8(){const e=pr(),t=S.useRef({router:e,mounted:!1}),[r,n]=S.useState(!1),i=lr(e.stores.isLoading,y=>y),l=lr(e.stores.hasPendingMatches,y=>y),o=og(i),c=i||r||l,f=og(c),h=i||l,p=og(h);return e.startTransition=y=>{n(!0),S.startTransition(()=>{y(),n(!1)})},S.useEffect(()=>{const y=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Wi(e.latestLocation.publicHref)!==Wi(v.publicHref)&&e.commitLocation({...v,replace:!0}),()=>{y()}},[e,e.history]),Oc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(v){console.error(v)}})()},[e]),Oc(()=>{o&&!i&&e.emit({type:"onLoad",...No(e.stores.location.state,e.stores.resolvedLocation.state)})},[o,e,i]),Oc(()=>{p&&!h&&e.emit({type:"onBeforeRouteMount",...No(e.stores.location.state,e.stores.resolvedLocation.state)})},[h,p,e]),Oc(()=>{if(f&&!c){const y=No(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:"onResolved",...y}),H2(()=>{e.stores.status.setState(()=>"idle"),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),y.hrefChanged&&r8(e)}},[c,f,e]),null}function z8(){const e=pr(),t=e.routesById[Ws].options.pendingComponent??e.options.defaultPendingComponent,r=t?d.jsx(t,{}):null,n=d.jsxs(typeof document<"u"&&e.ssr?xo:S.Suspense,{fallback:r,children:[d.jsx($8,{}),d.jsx(B8,{})]});return e.options.InnerWrap?d.jsx(e.options.InnerWrap,{children:n}):n}function B8(){const e=pr(),t=lr(e.stores.firstMatchId,i=>i),r=lr(e.stores.loadedAt,i=>i),n=t?d.jsx(J2,{matchId:t}):null;return d.jsx(Lm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?n:d.jsx(Bb,{getResetKey:()=>r,errorComponent:Ub,onCatch:void 0,children:n})})}function U8(){const e=pr();return lr(e.stores.matchRouteReactivity,t=>t),S.useCallback(t=>{const{pending:r,caseSensitive:n,fuzzy:i,includeSearch:l,...o}=t;return e.matchRoute(o,{pending:r,caseSensitive:n,fuzzy:i,includeSearch:l})},[e])}function q8(e){const t=pr(),r=S.useRef(void 0);return lr(t.stores.activeMatchesSnapshot,n=>{const i=n;if(t.options.defaultStructuralSharing){const l=Ba(r.current,i);return r.current=l,l}return i})}var H8=e=>({createMutableStore:E_,createReadonlyStore:E_,batch:H2}),F8=e=>new K8(e),K8=class extends Yz{constructor(e){super(e,H8)}};function G8({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const n=d.jsx(U2.Provider,{value:e,children:t});return e.options.Wrap?d.jsx(e.options.Wrap,{children:n}):n}function Y8({router:e,...t}){return d.jsx(G8,{router:e,...t,children:d.jsx(z8,{})})}function Hb(e){const r=pr();return S.useRef(void 0),lr(r.stores.__store,n=>n)}function tM(e){const t=pr(),r=S.useRef(void 0);return lr(t.stores.location,n=>{const i=n;if(t.options.defaultStructuralSharing){const l=Ba(r.current,i);return r.current=l,l}return i})}const rM=S.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function V8({children:e}){const[t,r]=S.useState(!1),n=S.useCallback(()=>r(o=>!o),[]),i=S.useCallback(()=>r(!1),[]),l=S.useMemo(()=>({isOpen:t,toggle:n,close:i}),[i,t,n]);return d.jsx(rM.Provider,{value:l,children:e})}function nM(){return S.useContext(rM)}function aM(e){if(!e)return;const t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toLocaleString()}function Q8(e){const t=aM(e);return t?`Last synced ${t}`:"Never synced"}function Fb(e){return typeof e!="number"||!Number.isFinite(e)?"Remote runs unknown":`${e} remote run${e===1?"":"s"}`}function iM(e,t,r){const n=r?` (${r})`:"";return`${e} of ${t} run${t===1?"":"s"} on remote${n}`}function X8(e,t,r){return(e==null?void 0:e.configured)!==!0?[]:[t?`Project: ${t}`:void 0,r??Fb(e.run_count),Q8(e.last_synced_at),e.repo?`Repo: ${e.repo}`:void 0].filter(n=>n!==void 0)}function W8(e){return(e==null?void 0:e.sync_status)==="syncing"}function Z8(e,t=!1){if(t||(e==null?void 0:e.sync_status)==="syncing")return{state:"syncing",label:"Syncing",actionLabel:"Syncing...",tone:"info",summary:"Sync is in progress.",canSync:!1};if((e==null?void 0:e.configured)!==!0)return{state:"unconfigured",label:"Not configured",actionLabel:"Sync Project",tone:"neutral",summary:"Remote results are not configured for this project.",canSync:!1};if(e.available!==!0||e.sync_status==="unavailable")return{state:"unavailable",label:"Unavailable",actionLabel:"Sync Project",tone:"warn",summary:"The remote results cache is not available locally.",nextAction:"Sync Project can clone or refresh the configured results repo.",canSync:!0};const r=e.sync_status??"clean";return r==="conflicted"||r==="diverged"?{state:"conflicted",label:"Conflicted",actionLabel:"Sync Project",tone:"danger",summary:e.block_reason??(r==="diverged"?"Local and remote results histories have diverged.":"The results repo has unresolved conflicts."),nextAction:"Resolve the results repo conflicts manually, then sync the project again.",canSync:!1}:r==="dirty"?{state:"dirty",label:"Dirty",actionLabel:"Sync Metadata",tone:"warn",summary:e.block_reason??"Local result metadata has pending edits.",nextAction:e.auto_push===!0?"Sync Project will commit safe result metadata changes before syncing.":"Review or commit the pending result metadata; no reset will be performed.",canSync:!0}:r==="behind"?{state:"behind",label:"Behind",actionLabel:"Sync Project",tone:"info",summary:`Remote has ${e.behind??0} commit${e.behind===1?"":"s"} to pull.`,nextAction:"Sync Project will fast-forward when possible.",canSync:!0}:r==="ahead"?{state:"ahead",label:"Ahead",actionLabel:"Push Results",tone:"info",summary:`Local results are ${e.ahead??0} commit${e.ahead===1?"":"s"} ahead.`,nextAction:e.auto_push===!0?"Sync Project will push safe result changes.":"Enable auto_push or push the results repo manually.",canSync:!0}:{state:"clean",label:"Clean",actionLabel:"Sync Project",tone:"good",summary:"Local and remote result metadata are in sync.",canSync:!0}}function J8(e){return typeof e!="number"||!Number.isFinite(e)?"remote results":Fb(e)}function D_(e){const t=[`Synced ${J8(e.run_count)}`];e.repo&&t.push(`from ${e.repo}`);const r=aM(e.last_synced_at);return r&&t.push(`at ${r}`),`${t.join(" ")}.`}function eB(e){if((e==null?void 0:e.available)!==!0)return;const t=e.run_count;return typeof t=="number"&&Number.isFinite(t)&&t>0?`Cached ${Fb(t)} ${t===1?"remains":"remain"} available.`:"The remote results cache remains available."}function Kb(e){return[eB(e),"Resolve the results repo issue, then sync remote results again."].filter(t=>t!==void 0).join(" ")}function sM(e){if(e.blocked||e.sync_status==="conflicted"||e.sync_status==="diverged"){const r=e.repo?` for ${e.repo}`:"",n=e.block_reason??"Sync stopped before changing the results repo.";return{kind:"warning",message:`Sync stopped${r}: ${n}. ${Kb(e)}`}}const t=[e.commit_created?"committed pending metadata":void 0,e.pull_performed?"pulled remote results":void 0,e.push_performed?"pushed local results":void 0].filter(r=>r!==void 0);return{kind:"success",message:t.length>0?`${D_(e)} Sync completed: ${t.join(", ")}.`:`${D_(e)} Project results were already up to date.`}}function lM(e,t){return{kind:"error",message:`Sync failed: ${e instanceof Error?e.message:String(e)}. ${Kb(t)}`}}async function Qe(e){const t=await fetch(e);if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.json()}async function tB(e){const t=await fetch(e);if(t.status===404)return null;if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.text()}const rB=50;function oM(e,t){const r=new URLSearchParams({limit:String(rB)});return t&&r.set("cursor",t),`${e}?${r.toString()}`}function uM(e){var t;return!e||e.length===0?{runs:[]}:{runs:e.flatMap(r=>r.runs),next_cursor:(t=e.at(-1))==null?void 0:t.next_cursor}}function k_(e){return e.split("/").filter(t=>t.length>0).map(t=>encodeURIComponent(t)).join("/")}function jo(e){const t=e.projectId?`${ut(e.projectId)}/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${k_(e.filePath)}`:`/api/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${k_(e.filePath)}`,r=new URLSearchParams;e.raw&&r.set("raw","1"),e.download&&r.set("download","1");const n=r.toString();return n?`${t}?${n}`:t}const Gb={queryKey:["runs"],queryFn:()=>Qe("/api/runs"),refetchInterval:5e3},nB={queryKey:["runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:e})=>Qe(oM("/api/runs",e)),getNextPageParam:e=>e.next_cursor,refetchInterval:5e3};function aB(e){return{queryKey:["runs",e],queryFn:()=>Qe(`/api/runs/${encodeURIComponent(e)}`),enabled:!!e}}function iB(e,t){const r=t?`${ut(t)}/runs/${encodeURIComponent(e)}/log`:`/api/runs/${encodeURIComponent(e)}/log`;return{queryKey:["runs",e,"log",t??""],queryFn:()=>tB(r),enabled:!!e,refetchInterval:3e3}}function sB(e,t){return Ue(iB(e,t))}function lB(e){const t=e?`${ut(e)}/feedback`:"/api/feedback";return{queryKey:["feedback",e??""],queryFn:()=>Qe(t)}}const cM={queryKey:["experiments"],queryFn:()=>Qe("/api/experiments")};function oB(e){return{queryKey:["compare","baseline",e??""],queryFn:()=>Qe(`/api/compare?baseline=${encodeURIComponent(e??"")}`),enabled:!!e}}const uB={queryKey:["compare"],queryFn:()=>Qe("/api/compare")},cB={queryKey:["targets"],queryFn:()=>Qe("/api/targets")};function dB(e,t){return{queryKey:["runs",e,"evals",t,"files"],queryFn:()=>Qe(`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/files`),enabled:!!e&&!!t}}function fB(e,t,r){return{queryKey:["runs",e,"evals",t,"files",r],queryFn:()=>Qe(jo({runId:e,evalId:t,filePath:r})),enabled:!!e&&!!t&&!!r}}function hB(e,t){return{queryKey:["runs",e,"categories",t,"suites"],queryFn:()=>Qe(`/api/runs/${encodeURIComponent(e)}/categories/${encodeURIComponent(t)}/suites`),enabled:!!e&&!!t}}const mB={queryKey:["config"],queryFn:()=>Qe("/api/config"),staleTime:5e3};function Yb(e){const t=e?`${ut(e)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",e??""],queryFn:()=>Qe(t),staleTime:5e3,refetchInterval:r=>W8(r.state.data)?1e3:!1}}function pB(){return Ue(Gb)}function yB(){var t;const e=A2(nB);return{...e,data:uM((t=e.data)==null?void 0:t.pages)}}function ld(e){return Ue(aB(e))}function dM(e){return Ue(lB(e))}function fM(){return Ue(cM)}function vB(){return Ue(uB)}function hM(e,t){return Ue(dB(e,t))}function Ax(e,t,r){return Ue(fB(e,t,r))}function mM(e,t){return Ue(hB(e,t))}function pt(e){return Ue(e?EB(e):mB)}function zm(e){return Ue(Yb(e))}const $c=.8,Bm="agentv";function nl(e,t=$c){return e>=t}const gB={queryKey:["projects"],queryFn:()=>Qe("/api/projects"),refetchInterval:1e4};function od(){return Ue(gB)}async function xB(e){const t=new URLSearchParams;e!=null&&e.trim()&&t.set("path",e.trim());const r=t.toString(),n=await fetch(`/api/filesystem/browse${r?`?${r}`:""}`);if(!n.ok){const l=await n.json().catch(()=>({error:n.statusText}));throw new Error(l.error??`Failed to browse folders: ${n.status}`)}const i=await n.json();return{path:i.path,parentPath:i.parent_path,current:{name:i.current.name,path:i.current.path,hasAgentv:i.current.has_agentv},entries:i.entries.map(l=>({name:l.name,path:l.path,hasAgentv:l.has_agentv}))}}async function bB(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})});if(!t.ok){const n=await t.json();throw new Error(n.error||`Failed to add project: ${t.status}`)}const r=await t.json();return{id:r.id,name:r.name,path:r.path,addedAt:r.added_at,lastOpenedAt:r.last_opened_at}}async function jB(e){const t=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok){const r=await t.json().catch(()=>({error:t.statusText}));throw new Error(r.error??`Failed to remove project: ${t.status}`)}}function ut(e){return`/api/projects/${encodeURIComponent(e)}`}function Vb(e){return{queryKey:["projects",e,"runs"],queryFn:()=>Qe(`${ut(e)}/runs`),enabled:!!e,refetchInterval:5e3}}function wB(e){return{queryKey:["projects",e,"runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:t})=>Qe(oM(`${ut(e)}/runs`,t)),getNextPageParam:t=>t.next_cursor,enabled:!!e,refetchInterval:5e3}}function SB(e){return Ue(Vb(e))}function NB(e){var r;const t=A2(wB(e));return{...t,data:uM((r=t.data)==null?void 0:r.pages)}}function OB(e,t){return{queryKey:["projects",e,"runs",t],queryFn:()=>Qe(`${ut(e)}/runs/${encodeURIComponent(t)}`),enabled:!!e&&!!t}}function ud(e,t){return Ue(OB(e,t))}function pM(e,t,r){return{queryKey:["projects",e,"runs",t,"categories",r,"suites"],queryFn:()=>Qe(`${ut(e)}/runs/${encodeURIComponent(t)}/categories/${encodeURIComponent(r)}/suites`),enabled:!!e&&!!t&&!!r}}function yM(e,t,r){return{queryKey:["projects",e,"runs",t,"evals",r,"files"],queryFn:()=>Qe(`${ut(e)}/runs/${encodeURIComponent(t)}/evals/${encodeURIComponent(r)}/files`),enabled:!!e&&!!t&&!!r}}function Cx(e,t,r,n){return{queryKey:["projects",e,"runs",t,"evals",r,"files",n],queryFn:()=>Qe(jo({projectId:e,runId:t,evalId:r,filePath:n})),enabled:!!e&&!!t&&!!r&&!!n}}function Qb(e){return{queryKey:["projects",e,"experiments"],queryFn:()=>Qe(`${ut(e)}/experiments`),enabled:!!e}}function vM(e,t){const r=`${ut(e)}/compare`;return t?{queryKey:["projects",e,"compare","baseline",t],queryFn:()=>Qe(`${r}?baseline=${encodeURIComponent(t)}`),enabled:!!e}:{queryKey:["projects",e,"compare"],queryFn:()=>Qe(r),enabled:!!e}}function _B(e){return{queryKey:["projects",e,"targets"],queryFn:()=>Qe(`${ut(e)}/targets`),enabled:!!e}}function EB(e){return{queryKey:["projects",e,"config"],queryFn:()=>Qe(`${ut(e)}/config`),enabled:!!e,staleTime:5e3}}async function gM(e){const t=e?`${ut(e)}/remote/sync`:"/api/remote/sync",r=await fetch(t,{method:"POST"});if(!r.ok){const n=await r.json().catch(()=>({error:r.statusText}));throw new Error(n.error??`Failed to sync remote results: ${r.status}`)}return r.json()}class xM extends Error{constructor(t,r,n=[]){super(t),this.status=r,this.duplicates=n,this.name="CombineRunsApiError"}}async function I_(e,t,r,n){const i=r?`${ut(r)}/runs/combine`:"/api/runs/combine",l=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({run_ids:e,duplicate_policy:t})});if(!l.ok){const o=await l.json().catch(()=>({error:l.statusText}));throw new xM(o.error??`Failed to combine runs: ${l.status}`,l.status,o.duplicates??[])}return l.json()}async function AB(e,t){const r=t?`${ut(t)}/runs/${encodeURIComponent(e)}`:`/api/runs/${encodeURIComponent(e)}`,n=await fetch(r,{method:"DELETE"});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed to delete run: ${n.status}`)}}async function CB(e,t,r){const n=r?`${ut(r)}/runs/${encodeURIComponent(e)}/tags`:`/api/runs/${encodeURIComponent(e)}/tags`,i=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tags:t})});if(!i.ok){const l=await i.json().catch(()=>({error:i.statusText}));throw new Error(l.error??`Failed to save tags: ${i.status}`)}return i.json()}async function TB(e,t){const r=t?`${ut(t)}/runs/${encodeURIComponent(e)}/tags`:`/api/runs/${encodeURIComponent(e)}/tags`,n=await fetch(r,{method:"DELETE"});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed to delete tags: ${n.status}`)}}async function PB(e){const t=await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Failed to save config: ${t.status}`);return t.json()}function MB(e){const t=e?`${ut(e)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",e??""],queryFn:()=>Qe(t),staleTime:3e4}}function RB(e){return Ue(MB(e))}function DB(e){const t=e?`${ut(e)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",e??""],queryFn:()=>Qe(t),staleTime:3e4}}function kB(e){return Ue(DB(e))}async function bM(e,t){const r=t?`${ut(t)}/eval/run`:"/api/eval/run",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed: ${n.status}`)}return n.json()}async function IB(e,t){const r=t?`${ut(t)}/eval/run/${e}/stop`:`/api/eval/run/${e}/stop`,n=await fetch(r,{method:"POST"});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed: ${n.status}`)}return n.json()}function LB(e,t){const r=t?`${ut(t)}/eval/status/${e}`:`/api/eval/status/${e}`;return{queryKey:["eval-status",t??"",e],queryFn:()=>Qe(r),enabled:!!e,refetchInterval:n=>{var l;const i=(l=n.state.data)==null?void 0:l.status;return i==="finished"||i==="failed"?!1:2e3}}}function Xb(e,t){return Ue(LB(e,t))}function $B(e){const t=e?`${ut(e)}/eval/runs`:"/api/eval/runs";return{queryKey:["eval-runs",e??""],queryFn:()=>Qe(t),refetchInterval:3e3}}function Wb(e){return Ue($B(e))}async function zB(e,t){const r=t?`${ut(t)}/eval/preview`:"/api/eval/preview",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw new Error(`Preview failed: ${n.status}`);return n.json()}function BB(e){return`agentv.studio.initial-project-redirect:${e}`}function Zb(e,t){const r=`/projects/${encodeURIComponent(e)}`;return t?`${r}?tab=${encodeURIComponent(t)}`:r}function Ti(e,t){return t?`/projects/${encodeURIComponent(t)}/runs/${encodeURIComponent(e)}`:`/runs/${encodeURIComponent(e)}`}function L_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`:`/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`}function $_(e,t){return t?`/projects/${encodeURIComponent(t)}/experiments/${encodeURIComponent(e)}`:`/experiments/${encodeURIComponent(e)}`}function z_(e,t){return t?`/projects/${encodeURIComponent(t)}/jobs/${encodeURIComponent(e)}`:`/jobs/${encodeURIComponent(e)}`}function B_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`}function U_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`}function UB(e){return e?Zb(e,"runs"):"/?tab=runs"}function qB(e,t,r=!1){if(!r)return t&&e.includes(t)?t:void 0}function HB(e,t,r,n){return t===!1?{kind:"single-project-home"}:r&&e.includes(r)?{kind:"redirect",redirectPath:Zb(r,n)}:{kind:"dashboard"}}function jM(e,t){var n,i;return((i=(n=t==null?void 0:t.find(l=>l.id===e))==null?void 0:n.name)==null?void 0:i.trim())||e}function nr(e){if(!e)return"Run";const t=e.split("::").at(-1)||e,r=t.match(/^\d{4}-\d{2}-\d{2}T\d{2}[-:]\d{2}[-:]\d{2}(?:[-.]\d+)?Z/);return(r==null?void 0:r[0])??t}function FB(e,t=[]){const r=[];for(let n=1;n<e.length;n++){const i=e[n],l=i.routeId??i.id,o=i.params;if(!(l==="/"||l==="/_layout")){if(l.includes("/projects/$projectId")&&o.projectId){const c=jM(o.projectId,t),f=Zb(o.projectId);if(r.some(h=>h.to===f)||r.push({label:c,to:f}),l==="/projects/$projectId")continue}l.includes("/projects/$projectId_/jobs/$runId")?r.some(c=>c.label===nr(o.runId))||r.push({label:nr(o.runId),to:z_(o.runId,o.projectId)}):l.includes("/projects/$projectId_/runs/$runId/category/$category")?(r.some(c=>c.label===nr(o.runId))||r.push({label:nr(o.runId),to:Ti(o.runId,o.projectId)}),r.push({label:o.category??"Category",to:B_(o.runId,o.category??"Category",o.projectId)})):l.includes("/projects/$projectId_/runs/$runId/suite/$suite")?(r.some(c=>c.label===nr(o.runId))||r.push({label:nr(o.runId),to:Ti(o.runId,o.projectId)}),r.push({label:o.suite??"Suite",to:U_(o.runId,o.suite??"Suite",o.projectId)})):l.includes("/projects/$projectId_/runs/$runId")?r.push({label:nr(o.runId),to:Ti(o.runId,o.projectId)}):l.includes("/projects/$projectId_/evals/$runId/$evalId")?(r.some(c=>c.label===nr(o.runId))||r.push({label:nr(o.runId),to:Ti(o.runId,o.projectId)}),r.push({label:o.evalId??"Eval",to:L_(o.runId,o.evalId??"Eval",o.projectId)})):l.includes("/projects/$projectId_/experiments/$experimentName")?r.push({label:o.experimentName??"Experiment",to:$_(o.experimentName??"Experiment",o.projectId)}):l.includes("/runs/$runId/category/$category")?(r.some(c=>c.label===nr(o.runId))||r.push({label:nr(o.runId),to:Ti(o.runId)}),r.push({label:o.category??"Category",to:B_(o.runId,o.category??"Category")})):l.includes("/runs/$runId/suite/$suite")?(r.some(c=>c.label===nr(o.runId))||r.push({label:nr(o.runId),to:Ti(o.runId)}),r.push({label:o.suite??"Suite",to:U_(o.runId,o.suite??"Suite")})):l.includes("/jobs/$runId")?r.push({label:nr(o.runId),to:z_(o.runId)}):l.includes("/runs/$runId")?r.push({label:nr(o.runId),to:Ti(o.runId)}):l.includes("/evals/$runId/$evalId")?(r.some(c=>c.label===nr(o.runId))||r.push({label:nr(o.runId),to:Ti(o.runId)}),r.push({label:o.evalId??"Eval",to:L_(o.runId,o.evalId??"Eval")})):l.includes("/experiments/$experimentName")?r.push({label:o.experimentName??"Experiment",to:$_(o.experimentName??"Experiment")}):l==="/settings"&&r.push({label:"Settings",to:"/settings"})}}return r}function KB(){const e=q8(),{toggle:t}=nM(),{data:r}=od(),n=FB(e,r==null?void 0:r.projects),i=n.length>0;return d.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-h-12 min-w-0 items-center gap-2 border-b border-gray-800 bg-gray-950 px-4 py-2 text-sm md:px-6",children:[d.jsx("button",{type:"button",onClick:t,className:"shrink-0 text-gray-400 hover:text-gray-200 md:hidden","aria-label":"Toggle navigation",children:d.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:[d.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),d.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),d.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[i?d.jsx(Oe,{to:"/",className:"shrink-0 text-cyan-400 hover:text-cyan-300 hover:underline",children:"Projects"}):d.jsx("span",{className:"shrink-0 text-gray-400",children:"Projects"}),n.map((l,o)=>{const c=o===n.length-1;return d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"shrink-0 text-gray-600",children:">"}),c?d.jsx("span",{className:"min-w-0 truncate text-gray-400",children:l.label}):d.jsx(Oe,{to:l.to??"/",className:"min-w-0 truncate text-cyan-400 hover:text-cyan-300 hover:underline",children:l.label})]},`${l.label}-${o}`)})]})]})}function wM(e){return e&&e!=="default"?e:void 0}function GB(e,t){const r=[wM(t==null?void 0:t.experiment),t==null?void 0:t.target].filter(n=>!!n);return r.length>0?r.join(" · "):e}function zc(e){const t=e==null?void 0:e.trim();return t||void 0}function SM(e){const t=e.results[0],r=zc(e.sourceLabel),n=e.source==="remote",i=n&&r?r:GB(e.runId,t),l=t!=null&&t.timestamp&&e.formatTimestamp?e.formatTimestamp(t.timestamp):t==null?void 0:t.timestamp,o=[t==null?void 0:t.target,wM(t==null?void 0:t.experiment),l,n?void 0:e.source].filter(h=>!!h),c=zc(e.remoteRepo),f=[];return n&&(r&&r!==i&&f.push({label:"Source",value:r}),c&&f.push({label:"Repo",value:c})),{heading:i,meta:o.join(" · "),...n&&{sourceBadge:"Remote"},...r&&{sourceLabel:r},sourceContext:f}}function YB(e){const t=e.replace(/\\/g,"/");return t==="."||t===".."||t.startsWith("./")||t.startsWith("../")||t.startsWith("/")||/^[A-Za-z]:\//.test(t)||t.includes("/../")||t.includes("/./")}function VB(e){var r;return((r=e.split(/[\\/]+/).filter(n=>n&&n!=="."&&n!=="..").at(-1))==null?void 0:r.trim())||void 0}function QB(e){const t=zc(e)??"Uncategorized";return YB(t)?{label:VB(t)??"Uncategorized",mutedLabel:t}:{label:t}}function XB(e){return e.replace(/\.eval\.(ya?ml|json|jsonl)$/i,"").replace(/\.(ya?ml|json|jsonl)$/i,"")}function WB(e){const t=zc(e);if(!t||t==="Uncategorized")return;const r=t.replace(/\\/g,"/"),n=r.split("/").filter(l=>l.length>0).at(-1)??t;return{label:(r.includes("/")?XB(n):t)||t,title:t}}function NM(e){const t=e.map(n=>zc(n.suite)??"");return t.filter(n=>n&&n!=="Uncategorized").length>0&&new Set(t).size>1}const Lh="remote::";function OM(e){try{const t=new Date(e);if(Number.isNaN(t.getTime()))return e.slice(0,10);const r=String(t.getDate()).padStart(2,"0"),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),l=String(t.getMinutes()).padStart(2,"0");return`${r}/${n} ${i}:${l}`}catch{return e.slice(0,10)}}function Fa(e){const t=e==null?void 0:e.trim();return t||void 0}function ZB(e){const t=Fa(e);return t&&t!=="default"&&t!=="-"?t:void 0}function _M(e){let t=e.trim();return t.startsWith(Lh)&&(t=t.slice(Lh.length)),t.replace(/\.(jsonl|json)$/i,"")}function JB(e){const r=_M(e).match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2})[:-](\d{2})[:-](\d{2})(?:[.-](\d{3}))?Z?$/);if(!r)return;const[,n,i,l,o,c,f,h="000"]=r,p=new Date(`${n}-${i}-${l}T${o}:${c}:${f}.${h}Z`);return Number.isNaN(p.getTime())?void 0:p}function Jb(e,t){const r=Fa(e);return r?JB(r)?!0:_M(r)===OM(t):!1}function e6(e,t){const r=Fa(e);if(!r)return;const n=r.startsWith(Lh)?r.slice(Lh.length):r,i=n.lastIndexOf("::");if(i!==-1){const l=n.slice(i+2);if(Jb(l,t))return Fa(n.slice(0,i))}return n}function t6(e){return[Fa(e.display_name),Fa(e.title),e6(e.filename,e.timestamp)].find(r=>!!r&&!Jb(r,e.timestamp))}function r6(e){return`${Math.round(e*100)}%`}function n6(e,t){const r=[t],n=Fa(e.filename),i=Fa(e.display_name),l=Fa(e.title);return n&&n!==t&&r.push(`Run ID: ${n}`),i&&i!==n&&i!==t&&r.push(`Display name: ${i}`),l&&l!==i&&l!==n&&l!==t&&r.push(`Title: ${l}`),r.push(`Timestamp: ${e.timestamp}`),r.join(`
|
|
66
|
-
`)}function ej(e,t={}){const r=OM(e.timestamp),n=ZB(e.experiment),i=t6(e),l=n&&!Jb(n,e.timestamp)?n:void 0,o=i??l??r,c=t.includePassRate??!0,f=[];o!==r&&f.push(r),e.target&&e.target!==o&&f.push(e.target),n&&n!==o&&f.push(n),c&&f.push(r6(e.pass_rate));const h=f.join(" · "),p=h?`${o} · ${h}`:o;return{primary:o,secondary:h,label:p,title:n6(e,p)}}function tj({appName:e}){return e!==Bm?d.jsx("span",{className:"av-brand-name",children:e}):d.jsxs("span",{className:"av-brand-name","aria-label":"AgentV",children:[d.jsx("span",{className:"text-cyan-400","aria-hidden":"true",children:"A"}),d.jsx("span",{"aria-hidden":"true",children:"GENT"}),d.jsx("span",{className:"text-cyan-400","aria-hidden":"true",children:"V"})]})}function a6({suite:e,className:t=""}){const r=WB(e);return r?d.jsx("span",{className:`inline-flex max-w-full shrink-0 items-center rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300 ${t}`,title:r.title,children:d.jsx("span",{className:"truncate",children:r.label})}):null}function Un({children:e}){const{isOpen:t,close:r}=nM(),i=tM().href;return S.useEffect(()=>{i&&r()},[r,i]),d.jsxs(d.Fragment,{children:[t&&d.jsx("div",{className:"fixed inset-0 z-30 bg-black/50 md:hidden",onClick:r,onKeyDown:l=>l.key==="Escape"&&r(),role:"button",tabIndex:-1,"aria-label":"Close navigation"}),d.jsx("aside",{className:`fixed inset-y-0 left-0 z-40 flex w-64 flex-col border-r border-gray-800 bg-gray-950 transition-transform duration-200 ease-in-out md:static md:z-auto md:translate-x-0 md:bg-gray-900/50 ${t?"translate-x-0":"-translate-x-full"}`,children:e})]})}function ha({projectId:e}){const{data:t}=pt(e),r=(t==null?void 0:t.app_name)??Bm;return d.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:d.jsx(Oe,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(tj,{appName:r})})})}function EM({display:e}){return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"block truncate",children:e.primary}),e.secondary?d.jsx("span",{className:"block truncate text-xs text-gray-600",children:e.secondary}):null]})}function AM({result:e,passThreshold:t,showSuiteLabel:r}){const n=nl(e.score,t);return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:`mt-0.5 shrink-0 text-xs ${n?"text-emerald-400":"text-red-400"}`,children:n?"✓":"✗"}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate",children:e.testId}),r?d.jsx(a6,{suite:e.suite,className:"mt-1 max-w-full text-[11px] leading-4"}):null]})]})}const q_=[{id:"runs",label:"Recent Runs",description:"Run review"},{id:"experiments",label:"Experiments",description:"Grouped runs"},{id:"analytics",label:"Analytics",description:"Compare scores"},{id:"targets",label:"Targets",description:"Target results"}];function jg(e){return`mb-0.5 flex min-h-9 items-center justify-between gap-3 rounded-md px-2 py-1.5 text-sm transition-colors ${e?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`}function H_({projectId:e}){const t=tM(),{data:r}=od(),n=(r==null?void 0:r.projects)??[],i=t.search,l=q_.some(c=>c.id===i.tab)?i.tab:"runs",o=!e&&n.length===0;return d.jsxs(Un,{children:[d.jsx(ha,{projectId:e}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsxs("div",{className:"mb-4",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Navigate"}),d.jsxs(Oe,{to:"/",className:jg(t.pathname==="/"),children:[d.jsx("span",{className:"truncate",children:"Projects"}),n.length>0?d.jsx("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:n.length}):null]}),d.jsx(Oe,{to:"/settings",className:jg(t.pathname==="/settings"),children:d.jsx("span",{className:"truncate",children:"Settings"})})]}),o?d.jsxs("div",{className:"mb-4",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Workspace"}),q_.map(c=>d.jsxs(Oe,{to:"/",search:{tab:c.id},className:jg(l===c.id),title:c.description,children:[d.jsx("span",{className:"truncate",children:c.label}),d.jsx("span",{className:"shrink-0 text-xs text-gray-500",children:c.description})]},c.id))]}):null]})]})}function i6(){const e=U8(),t=e({to:"/projects/$projectId/evals/$runId/$evalId",fuzzy:!0}),r=e({to:"/projects/$projectId/runs/$runId",fuzzy:!0}),n=e({to:"/projects/$projectId/experiments/$experimentName",fuzzy:!0}),i=e({to:"/projects/$projectId/runs/$runId/category/$category",fuzzy:!0}),l=e({to:"/projects/$projectId/runs/$runId/suite/$suite",fuzzy:!0}),o=e({to:"/projects/$projectId/jobs/$runId",fuzzy:!0}),c=e({to:"/projects/$projectId",fuzzy:!0});if(t&&typeof t=="object"&&"projectId"in t){const{projectId:x,runId:b,evalId:w}=t;return d.jsx(c6,{projectId:x,runId:b,currentEvalId:w})}if(i&&typeof i=="object"&&"projectId"in i){const{projectId:x,runId:b,category:w}=i;return d.jsx(f6,{projectId:x,runId:b,category:w})}if(l&&typeof l=="object"&&"projectId"in l){const{projectId:x,runId:b,suite:w}=l;return d.jsx(d6,{projectId:x,runId:b,suite:w})}if(r&&typeof r=="object"&&"projectId"in r){const{projectId:x,runId:b}=r;return d.jsx(F_,{projectId:x,currentRunId:b})}if(o&&typeof o=="object"&&"projectId"in o){const{projectId:x}=o;return d.jsx(F_,{projectId:x})}if(n&&typeof n=="object"&&"projectId"in n){const{projectId:x,experimentName:b}=n;return d.jsx(h6,{projectId:x,currentExperiment:b})}if(c&&typeof c=="object"&&"projectId"in c){const{projectId:x}=c;return d.jsx(H_,{projectId:x})}const f=e({to:"/runs/$runId",fuzzy:!0}),h=e({to:"/evals/$runId/$evalId",fuzzy:!0}),p=e({to:"/runs/$runId/category/$category",fuzzy:!0}),y=e({to:"/runs/$runId/suite/$suite",fuzzy:!0}),v=e({to:"/experiments/$experimentName",fuzzy:!0});if(p&&typeof p=="object"&&"runId"in p){const{runId:x,category:b}=p;return d.jsx(u6,{runId:x,category:b})}if(y&&typeof y=="object"&&"runId"in y){const{runId:x,suite:b}=y;return d.jsx(o6,{runId:x,suite:b})}if(h&&typeof h=="object"&&"runId"in h){const{runId:x,evalId:b}=h;return d.jsx(l6,{runId:x,currentEvalId:b})}if(v&&typeof v=="object"&&"experimentName"in v){const{experimentName:x}=v;return d.jsx(m6,{currentExperiment:x})}if(f&&typeof f=="object"&&"runId"in f){const{runId:x}=f;return d.jsx(s6,{currentRunId:x})}return d.jsx(H_,{})}function s6({currentRunId:e}){const{data:t}=pB(),{data:r}=pt(),{data:n}=Wb(),i=((n==null?void 0:n.runs)??[]).filter(l=>l.status==="starting"||l.status==="running").length;return d.jsxs(Un,{children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:[d.jsx(Oe,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(tj,{appName:(r==null?void 0:r.app_name)??Bm})}),i>0&&d.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-cyan-900/40 px-2 py-0.5 text-xs text-cyan-400",children:[d.jsx("span",{className:"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-cyan-400"}),i]})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Run history"}),t==null?void 0:t.runs.map(l=>{const o=ej(l),c=e===l.filename;return d.jsx(Oe,{to:"/runs/$runId",params:{runId:l.filename},className:`mb-0.5 block rounded-md px-2 py-1.5 text-sm transition-colors ${c?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,title:o.title,children:d.jsx(EM,{display:o})},l.filename)})]}),d.jsx("div",{className:"border-t border-gray-800 px-4 py-3",children:d.jsx(Oe,{to:"/settings",className:"flex items-center gap-2 text-sm text-gray-400 hover:text-cyan-400",children:"Settings"})})]})}function l6({runId:e,currentEvalId:t}){const{data:r}=ld(e),{data:n}=pt(),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,l=NM((r==null?void 0:r.results)??[]);return d.jsxs(Un,{children:[d.jsx(ha,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.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(o=>{const c=o.testId===t;return d.jsx(Oe,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:o.testId},className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${c?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(AM,{result:o,passThreshold:i,showSuiteLabel:l})},o.testId)})]})]})}function o6({runId:e,suite:t}){const{data:r}=ld(e),{data:n}=pt(),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,l=((r==null?void 0:r.results)??[]).filter(o=>(o.suite??"Uncategorized")===t);return d.jsxs(Un,{children:[d.jsx(ha,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:t})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),l.map(o=>{const c=nl(o.score,i);return d.jsxs(Oe,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:o.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:[d.jsx("span",{className:`text-xs ${c?"text-emerald-400":"text-red-400"}`,children:c?"✓":"✗"}),d.jsx("span",{className:"truncate",children:o.testId})]},o.testId)})]})]})}function u6({runId:e,category:t}){const{data:r}=mM(e,t),n=(r==null?void 0:r.suites)??[];return d.jsxs(Un,{children:[d.jsx(ha,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:t})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),n.map(i=>d.jsxs(Oe,{to:"/runs/$runId/suite/$suite",params:{runId:e,suite:i.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:[d.jsx("span",{className:`text-xs ${i.passed===i.total?"text-emerald-400":"text-red-400"}`,children:i.passed===i.total?"✓":"✗"}),d.jsx("span",{className:"truncate",children:i.name})]},i.name))]})]})}function F_({projectId:e,currentRunId:t}){const{data:r}=SB(e);return d.jsxs(Un,{children:[d.jsx(ha,{projectId:e}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),r==null?void 0:r.runs.map(n=>{const i=ej(n),l=t===n.filename;return d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:n.filename},className:`mb-0.5 block rounded-md px-2 py-1.5 text-sm transition-colors ${l?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,title:i.title,children:d.jsx(EM,{display:i})},n.filename)})]})]})}function c6({projectId:e,runId:t,currentEvalId:r}){const{data:n}=ud(e,t),{data:i}=pt(e),l=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,o=NM((n==null?void 0:n.results)??[]);return d.jsxs(Un,{children:[d.jsx(ha,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),n==null?void 0:n.results.map(c=>{const f=c.testId===r;return d.jsx(Oe,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:c.testId},className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${f?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(AM,{result:c,passThreshold:l,showSuiteLabel:o})},c.testId)})]})]})}function d6({projectId:e,runId:t,suite:r}){const{data:n}=ud(e,t),{data:i}=pt(e),l=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,o=((n==null?void 0:n.results)??[]).filter(c=>(c.suite??"Uncategorized")===r);return d.jsxs(Un,{children:[d.jsx(ha,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:r})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),o.map(c=>{const f=nl(c.score,l);return d.jsxs(Oe,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:c.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:[d.jsx("span",{className:`text-xs ${f?"text-emerald-400":"text-red-400"}`,children:f?"✓":"✗"}),d.jsx("span",{className:"truncate",children:c.testId})]},c.testId)})]})]})}function f6({projectId:e,runId:t,category:r}){const{data:n}=Ue(pM(e,t,r)),i=(n==null?void 0:n.suites)??[];return d.jsxs(Un,{children:[d.jsx(ha,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:r})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),i.map(l=>d.jsxs(Oe,{to:"/projects/$projectId/runs/$runId/suite/$suite",params:{projectId:e,runId:t,suite:l.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:[d.jsx("span",{className:`text-xs ${l.passed===l.total?"text-emerald-400":"text-red-400"}`,children:l.passed===l.total?"✓":"✗"}),d.jsx("span",{className:"truncate",children:l.name})]},l.name))]})]})}function h6({projectId:e,currentExperiment:t}){const{data:r}=Ue(Qb(e)),n=(r==null?void 0:r.experiments)??[];return d.jsxs(Un,{children:[d.jsx(ha,{projectId:e}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsx(Oe,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"})}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Experiments"}),n.map(i=>{const l=i.name===t;return d.jsx(Oe,{to:"/projects/$projectId/experiments/$experimentName",params:{projectId:e,experimentName:i.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${l?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:i.name},i.name)})]})]})}function m6({currentExperiment:e}){const{data:t}=fM(),r=(t==null?void 0:t.experiments)??[];return d.jsxs(Un,{children:[d.jsx(ha,{}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsx(Oe,{to:"/",search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"})}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Experiments"}),r.map(n=>{const i=n.name===e;return d.jsx(Oe,{to:"/experiments/$experimentName",params:{experimentName:n.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${i?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:n.name},n.name)})]})]})}function p6(){return d.jsx(V8,{children:d.jsx(y6,{})})}function y6(){return d.jsxs("div",{className:"flex h-screen overflow-hidden",children:[d.jsx(i6,{}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[d.jsx(KB,{}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:d.jsx(eM,{})})]})]})}const yr=P8({component:p6}),v6=Er("/settings")({component:g6});function g6(){const{data:e,isLoading:t}=pt(),r=fa(),[n,i]=S.useState(""),[l,o]=S.useState(!1),[c,f]=S.useState(null),h=(e==null?void 0:e.threshold)??$c,p=n||String(h),y=(e==null?void 0:e.read_only)===!0,v=(e==null?void 0:e.app_name)??Bm,x=async()=>{const b=Number.parseFloat(n||String(h));if(Number.isNaN(b)||b<0||b>1){f({type:"error",text:"Threshold must be a number between 0 and 1"});return}o(!0),f(null);try{await PB({threshold:b}),await r.invalidateQueries({queryKey:["config"]}),i(""),f({type:"success",text:"Settings saved"}),setTimeout(()=>f(null),3e3)}catch{f({type:"error",text:"Failed to save settings"})}finally{o(!1)}};return t?d.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[d.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-40 animate-pulse rounded-lg bg-gray-900"})]}):d.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Settings"}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Configure ",d.jsx(tj,{appName:v})]})]}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6",children:[d.jsx("h2",{className:"text-lg font-medium text-white",children:"Evaluation"}),d.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure how evaluation results are classified"}),d.jsx("div",{className:"mt-6 space-y-4",children:d.jsxs("div",{children:[d.jsx("label",{htmlFor:"pass-threshold",className:"block text-sm font-medium text-gray-300",children:"Pass Threshold"}),d.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Score at or above this value is considered passing. Default: ",$c]}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[d.jsx("input",{id:"pass-threshold",type:"number",min:"0",max:"1",step:"0.05",value:p,onChange:b=>i(b.target.value),disabled:y,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"}),d.jsxs("span",{className:"text-sm text-gray-400",children:["(",Math.round((Number.parseFloat(p)||0)*100),"%)"]})]})]})}),d.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[!y&&d.jsx("button",{type:"button",onClick:x,disabled:l,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:l?"Saving...":"Save Settings"}),y&&d.jsx("span",{className:"text-sm text-gray-400",children:"Read-only mode is enabled."}),c&&d.jsx("span",{className:`text-sm ${c.type==="success"?"text-emerald-400":"text-red-400"}`,children:c.text})]})]}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:d.jsxs("p",{className:"text-xs text-gray-500",children:["Settings are stored in ",d.jsx("code",{className:"text-gray-400",children:".agentv/config.yaml"})]})})]})}function K_({entry:e,selected:t,current:r=!1,onSelect:n,onOpen:i}){return d.jsxs("div",{className:`grid grid-cols-[minmax(0,1fr)_auto] border-b border-gray-800/50 last:border-b-0 ${t?"bg-cyan-950/20":"transition-colors hover:bg-gray-900/30"}`,children:[d.jsxs("button",{type:"button",onClick:n,onDoubleClick:i,"aria-selected":t,className:"min-w-0 px-4 py-3 text-left focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:[d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"truncate text-sm font-medium text-gray-200",children:e.name}),r?d.jsx("span",{className:"shrink-0 rounded-md border border-gray-700 px-2 py-0.5 text-xs font-medium text-gray-400",children:"this folder"}):null,e.hasAgentv?d.jsx("span",{className:"shrink-0 rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:".agentv"}):null]}),d.jsx("span",{className:"mt-1 block truncate text-xs text-gray-500",children:e.path})]}),d.jsx("button",{type:"button",onClick:i,className:"border-l border-gray-800 px-3 text-sm text-gray-400 transition-colors hover:bg-gray-900/40 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:"Open"})]})}function x6({open:e,onClose:t,onAdded:r}){const n=S.useRef(null),[i,l]=S.useState(null),[o,c]=S.useState(""),[f,h]=S.useState(""),[p,y]=S.useState(null),[v,x]=S.useState(null),[b,w]=S.useState(!1),[N,O]=S.useState(!1),C=S.useCallback(async(D,I={})=>{w(!0),y(null),x(null);try{const k=await xB(D);l(k),c(k.path),h(I.selectCurrent&&k.current.hasAgentv?k.current.path:"")}catch(k){y(k.message)}finally{w(!1)}},[]);S.useEffect(()=>{var D;e&&(l(null),c(""),h(""),y(null),x(null),O(!1),(D=n.current)==null||D.focus(),C(void 0,{selectCurrent:!0}))},[C,e]),S.useEffect(()=>{if(!e)return;function D(I){I.key==="Escape"&&(I.preventDefault(),t())}return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[t,e]);const E=S.useMemo(()=>!i||!f?null:f===i.current.path?i.current:i.entries.find(D=>D.path===f)??null,[i,f]),A=!!(E!=null&&E.hasAgentv)&&!N;function T(D){D.preventDefault(),C(o,{selectCurrent:!0})}async function M(){if(!(!f||!A)){O(!0),x(null);try{const D=await bB(f);r(D),t()}catch(D){x(D.message)}finally{O(!1)}}}if(!e)return null;const R=f?E!=null&&E.hasAgentv?`Ready to add ${E.name}.`:"Selected folder does not contain an .agentv/ directory.":"Select a folder containing an .agentv/ directory.";return d.jsx("dialog",{ref:n,open:!0,"aria-modal":"true","aria-label":"Add project",tabIndex:-1,className:"fixed inset-0 z-50 flex h-full max-h-none w-full max-w-none items-center justify-center bg-black/70 p-4 text-left text-gray-100 backdrop:bg-black/70",children:d.jsxs("div",{className:"flex max-h-[90vh] w-full max-w-4xl flex-col overflow-hidden rounded-lg border border-gray-800 bg-gray-950 shadow-xl",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-4 py-3",children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:"Add project"}),d.jsx("button",{type:"button",onClick:t,className:"rounded-md px-2 py-1 text-sm text-gray-400 transition-colors hover:bg-gray-800 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"Close"})]}),d.jsxs("div",{className:"space-y-4 overflow-y-auto p-4",children:[d.jsxs("form",{onSubmit:T,className:"flex flex-col gap-2 sm:flex-row",children:[d.jsx("label",{className:"sr-only",htmlFor:"add-project-path",children:"Folder path"}),d.jsx("input",{id:"add-project-path",value:o,onChange:D=>c(D.target.value),placeholder:"Folder path",className:"min-w-0 flex-1 rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 placeholder:text-gray-600 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500 disabled:opacity-50",disabled:b||N}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:()=>(i==null?void 0:i.parentPath)&&void C(i.parentPath),disabled:!(i!=null&&i.parentPath)||b||N,className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:bg-gray-800 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50",children:"Up"}),d.jsx("button",{type:"button",onClick:()=>void C(o),disabled:b||N,className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:bg-gray-800 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50",children:"Refresh"}),d.jsx("button",{type:"submit",disabled:b||N,className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:"Go"})]})]}),p?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:p}):null,d.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[d.jsxs("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Current folder"}),d.jsx("p",{className:"mt-1 truncate text-sm text-gray-300",children:(i==null?void 0:i.path)??(b?"Loading folders...":"No folder loaded")})]}),d.jsx("div",{className:"max-h-80 overflow-y-auto",children:i?d.jsxs(d.Fragment,{children:[d.jsx(K_,{entry:i.current,current:!0,selected:f===i.current.path,onSelect:()=>h(i.current.path),onOpen:()=>void C(i.current.path,{selectCurrent:!0})}),i.entries.map(D=>d.jsx(K_,{entry:D,selected:f===D.path,onSelect:()=>h(D.path),onOpen:()=>void C(D.path,{selectCurrent:!0})},D.path)),i.entries.length===0?d.jsx("p",{className:"px-4 py-6 text-center text-sm text-gray-500",children:"No subfolders in this location."}):null]}):d.jsx("p",{className:"px-4 py-6 text-center text-sm text-gray-500",children:b?"Loading folders...":"Enter a folder path to browse."})})]}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-3",children:d.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Selected"}),d.jsx("p",{className:"mt-1 truncate text-sm text-gray-200",children:f||"None"})]}),d.jsx("p",{className:`text-sm ${E!=null&&E.hasAgentv?"text-cyan-300":"text-gray-500"}`,children:R})]})}),v?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:v}):null]}),d.jsxs("div",{className:"flex items-center justify-between border-t border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("p",{className:"text-xs tabular-nums text-gray-500",children:i?`${i.entries.length} folders`:"0 folders"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:t,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Cancel"}),d.jsx("button",{type:"button",onClick:()=>void M(),disabled:!A,className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:N?"Adding...":"Add project"})]})]})]})})}function CM(e){return e.executionStatus==="execution_error"}function Um(e,t){let r=0,n=0,i=0,l=0;for(const c of e){if(CM(c)){i++;continue}r++,l+=c.score,c.score>=t&&n++}const o=r-n;return{total:e.length,qualityTotal:r,passed:n,failed:o,executionErrors:i,passRate:r>0?n/r:0,avgScore:r>0?l/r:0}}function Yt(e){return e.execution_error_count??0}function TM(e){return Math.max(0,e.total-Yt(e))}function Ho(e){return e.quality_count??Math.max(0,e.eval_count-Yt(e))}function PM(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=PM(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Xe(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=PM(e))&&(n&&(n+=" "),n+=t);return n}var b6=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function rj(e){if(typeof e!="string")return!1;var t=b6;return t.includes(e)}var j6=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],w6=new Set(j6);function MM(e){return typeof e!="string"?!1:w6.has(e)}function RM(e){return typeof e=="string"&&e.startsWith("data-")}function $n(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(MM(r)||RM(r))&&(t[r]=e[r]);return t}function cd(e){if(e==null)return null;if(S.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return $n(t)}return typeof e=="object"&&!Array.isArray(e)?$n(e):null}function Or(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(MM(r)||RM(r)||rj(r))&&(t[r]=e[r]);return t}function S6(e){return e==null?null:S.isValidElement(e)?Or(e.props):typeof e=="object"&&!Array.isArray(e)?Or(e):null}var N6=["children","width","height","viewBox","className","style","title","desc"];function Tx(){return Tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tx.apply(null,arguments)}function O6(e,t){if(e==null)return{};var r,n,i=_6(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function _6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var nj=S.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:l,className:o,style:c,title:f,desc:h}=e,p=O6(e,N6),y=l||{width:n,height:i,x:0,y:0},v=Xe("recharts-surface",o);return S.createElement("svg",Tx({},Or(p),{className:v,width:n,height:i,style:c,viewBox:"".concat(y.x," ").concat(y.y," ").concat(y.width," ").concat(y.height),ref:t}),S.createElement("title",null,f),S.createElement("desc",null,h),r)}),E6=["children","className"];function Px(){return Px=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Px.apply(null,arguments)}function A6(e,t){if(e==null)return{};var r,n,i=C6(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function C6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var rn=S.forwardRef((e,t)=>{var{children:r,className:n}=e,i=A6(e,E6),l=Xe("recharts-layer",n);return S.createElement("g",Px({className:l},Or(i),{ref:t}),r)}),DM=S.createContext(null),T6=()=>S.useContext(DM);function at(e){return function(){return e}}const kM=Math.cos,$h=Math.sin,qn=Math.sqrt,zh=Math.PI,qm=2*zh,Mx=Math.PI,Rx=2*Mx,Ts=1e-6,P6=Rx-Ts;function IM(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function M6(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return IM;const r=10**t;return function(n){this._+=n[0];for(let i=1,l=n.length;i<l;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class R6{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?IM:M6(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,l,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+l},${this._y1=+o}`}arcTo(t,r,n,i,l){if(t=+t,r=+r,n=+n,i=+i,l=+l,l<0)throw new Error(`negative radius: ${l}`);let o=this._x1,c=this._y1,f=n-t,h=i-r,p=o-t,y=c-r,v=p*p+y*y;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(v>Ts)if(!(Math.abs(y*f-h*p)>Ts)||!l)this._append`L${this._x1=t},${this._y1=r}`;else{let x=n-o,b=i-c,w=f*f+h*h,N=x*x+b*b,O=Math.sqrt(w),C=Math.sqrt(v),E=l*Math.tan((Mx-Math.acos((w+v-N)/(2*O*C)))/2),A=E/C,T=E/O;Math.abs(A-1)>Ts&&this._append`L${t+A*p},${r+A*y}`,this._append`A${l},${l},0,0,${+(y*x>p*b)},${this._x1=t+T*f},${this._y1=r+T*h}`}}arc(t,r,n,i,l,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(i),f=n*Math.sin(i),h=t+c,p=r+f,y=1^o,v=o?i-l:l-i;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Ts||Math.abs(this._y1-p)>Ts)&&this._append`L${h},${p}`,n&&(v<0&&(v=v%Rx+Rx),v>P6?this._append`A${n},${n},0,1,${y},${t-c},${r-f}A${n},${n},0,1,${y},${this._x1=h},${this._y1=p}`:v>Ts&&this._append`A${n},${n},0,${+(v>=Mx)},${y},${this._x1=t+n*Math.cos(l)},${this._y1=r+n*Math.sin(l)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function aj(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new R6(t)}function ij(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function LM(e){this._context=e}LM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Hm(e){return new LM(e)}function $M(e){return e[0]}function zM(e){return e[1]}function BM(e,t){var r=at(!0),n=null,i=Hm,l=null,o=aj(c);e=typeof e=="function"?e:e===void 0?$M:at(e),t=typeof t=="function"?t:t===void 0?zM:at(t);function c(f){var h,p=(f=ij(f)).length,y,v=!1,x;for(n==null&&(l=i(x=o())),h=0;h<=p;++h)!(h<p&&r(y=f[h],h,f))===v&&((v=!v)?l.lineStart():l.lineEnd()),v&&l.point(+e(y,h,f),+t(y,h,f));if(x)return l=null,x+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:at(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:at(+f),c):t},c.defined=function(f){return arguments.length?(r=typeof f=="function"?f:at(!!f),c):r},c.curve=function(f){return arguments.length?(i=f,n!=null&&(l=i(n)),c):i},c.context=function(f){return arguments.length?(f==null?n=l=null:l=i(n=f),c):n},c}function eh(e,t,r){var n=null,i=at(!0),l=null,o=Hm,c=null,f=aj(h);e=typeof e=="function"?e:e===void 0?$M:at(+e),t=typeof t=="function"?t:at(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?zM:at(+r);function h(y){var v,x,b,w=(y=ij(y)).length,N,O=!1,C,E=new Array(w),A=new Array(w);for(l==null&&(c=o(C=f())),v=0;v<=w;++v){if(!(v<w&&i(N=y[v],v,y))===O)if(O=!O)x=v,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),b=v-1;b>=x;--b)c.point(E[b],A[b]);c.lineEnd(),c.areaEnd()}O&&(E[v]=+e(N,v,y),A[v]=+t(N,v,y),c.point(n?+n(N,v,y):E[v],r?+r(N,v,y):A[v]))}if(C)return c=null,C+""||null}function p(){return BM().defined(i).curve(o).context(l)}return h.x=function(y){return arguments.length?(e=typeof y=="function"?y:at(+y),n=null,h):e},h.x0=function(y){return arguments.length?(e=typeof y=="function"?y:at(+y),h):e},h.x1=function(y){return arguments.length?(n=y==null?null:typeof y=="function"?y:at(+y),h):n},h.y=function(y){return arguments.length?(t=typeof y=="function"?y:at(+y),r=null,h):t},h.y0=function(y){return arguments.length?(t=typeof y=="function"?y:at(+y),h):t},h.y1=function(y){return arguments.length?(r=y==null?null:typeof y=="function"?y:at(+y),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(t)},h.defined=function(y){return arguments.length?(i=typeof y=="function"?y:at(!!y),h):i},h.curve=function(y){return arguments.length?(o=y,l!=null&&(c=o(l)),h):o},h.context=function(y){return arguments.length?(y==null?l=c=null:c=o(l=y),h):l},h}class UM{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function D6(e){return new UM(e,!0)}function k6(e){return new UM(e,!1)}const sj={draw(e,t){const r=qn(t/zh);e.moveTo(r,0),e.arc(0,0,r,0,qm)}},I6={draw(e,t){const r=qn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},qM=qn(1/3),L6=qM*2,$6={draw(e,t){const r=qn(t/L6),n=r*qM;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},z6={draw(e,t){const r=qn(t),n=-r/2;e.rect(n,n,r,r)}},B6=.8908130915292852,HM=$h(zh/10)/$h(7*zh/10),U6=$h(qm/10)*HM,q6=-kM(qm/10)*HM,H6={draw(e,t){const r=qn(t*B6),n=U6*r,i=q6*r;e.moveTo(0,-r),e.lineTo(n,i);for(let l=1;l<5;++l){const o=qm*l/5,c=kM(o),f=$h(o);e.lineTo(f*r,-c*r),e.lineTo(c*n-f*i,f*n+c*i)}e.closePath()}},wg=qn(3),F6={draw(e,t){const r=-qn(t/(wg*3));e.moveTo(0,r*2),e.lineTo(-wg*r,-r),e.lineTo(wg*r,-r),e.closePath()}},yn=-.5,vn=qn(3)/2,Dx=1/qn(12),K6=(Dx/2+1)*3,G6={draw(e,t){const r=qn(t/K6),n=r/2,i=r*Dx,l=n,o=r*Dx+r,c=-l,f=o;e.moveTo(n,i),e.lineTo(l,o),e.lineTo(c,f),e.lineTo(yn*n-vn*i,vn*n+yn*i),e.lineTo(yn*l-vn*o,vn*l+yn*o),e.lineTo(yn*c-vn*f,vn*c+yn*f),e.lineTo(yn*n+vn*i,yn*i-vn*n),e.lineTo(yn*l+vn*o,yn*o-vn*l),e.lineTo(yn*c+vn*f,yn*f-vn*c),e.closePath()}};function Y6(e,t){let r=null,n=aj(i);e=typeof e=="function"?e:at(e||sj),t=typeof t=="function"?t:at(t===void 0?64:+t);function i(){let l;if(r||(r=l=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),l)return r=null,l+""||null}return i.type=function(l){return arguments.length?(e=typeof l=="function"?l:at(l),i):e},i.size=function(l){return arguments.length?(t=typeof l=="function"?l:at(+l),i):t},i.context=function(l){return arguments.length?(r=l??null,i):r},i}function Bh(){}function Uh(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function FM(e){this._context=e}FM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Uh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Uh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function V6(e){return new FM(e)}function KM(e){this._context=e}KM.prototype={areaStart:Bh,areaEnd:Bh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Uh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Q6(e){return new KM(e)}function GM(e){this._context=e}GM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Uh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function X6(e){return new GM(e)}function YM(e){this._context=e}YM.prototype={areaStart:Bh,areaEnd:Bh,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function W6(e){return new YM(e)}function G_(e){return e<0?-1:1}function Y_(e,t,r){var n=e._x1-e._x0,i=t-e._x1,l=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),c=(l*i+o*n)/(n+i);return(G_(l)+G_(o))*Math.min(Math.abs(l),Math.abs(o),.5*Math.abs(c))||0}function V_(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Sg(e,t,r){var n=e._x0,i=e._y0,l=e._x1,o=e._y1,c=(l-n)/3;e._context.bezierCurveTo(n+c,i+c*t,l-c,o-c*r,l,o)}function qh(e){this._context=e}qh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Sg(this,this._t0,V_(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Sg(this,V_(this,r=Y_(this,e,t)),r);break;default:Sg(this,this._t0,r=Y_(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function VM(e){this._context=new QM(e)}(VM.prototype=Object.create(qh.prototype)).point=function(e,t){qh.prototype.point.call(this,t,e)};function QM(e){this._context=e}QM.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,l){this._context.bezierCurveTo(t,e,n,r,l,i)}};function Z6(e){return new qh(e)}function J6(e){return new VM(e)}function XM(e){this._context=e}XM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Q_(e),i=Q_(t),l=0,o=1;o<r;++l,++o)this._context.bezierCurveTo(n[0][l],i[0][l],n[1][l],i[1][l],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Q_(e){var t,r=e.length-1,n,i=new Array(r),l=new Array(r),o=new Array(r);for(i[0]=0,l[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,l[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,l[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/l[t-1],l[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/l[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/l[t];for(l[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)l[t]=2*e[t+1]-i[t+1];return[i,l]}function eU(e){return new XM(e)}function Fm(e,t){this._context=e,this._t=t}Fm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function tU(e){return new Fm(e,.5)}function rU(e){return new Fm(e,0)}function nU(e){return new Fm(e,1)}function al(e,t){if((o=e.length)>1)for(var r=1,n,i,l=e[t[0]],o,c=l.length;r<o;++r)for(i=l,l=e[t[r]],n=0;n<c;++n)l[n][1]+=l[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function kx(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function aU(e,t){return e[t]}function iU(e){const t=[];return t.key=e,t}function sU(){var e=at([]),t=kx,r=al,n=aU;function i(l){var o=Array.from(e.apply(this,arguments),iU),c,f=o.length,h=-1,p;for(const y of l)for(c=0,++h;c<f;++c)(o[c][h]=[0,+n(y,o[c].key,h,l)]).data=y;for(c=0,p=ij(t(o));c<f;++c)o[p[c]].index=c;return r(o,p),o}return i.keys=function(l){return arguments.length?(e=typeof l=="function"?l:at(Array.from(l)),i):e},i.value=function(l){return arguments.length?(n=typeof l=="function"?l:at(+l),i):n},i.order=function(l){return arguments.length?(t=l==null?kx:typeof l=="function"?l:at(Array.from(l)),i):t},i.offset=function(l){return arguments.length?(r=l??al,i):r},i}function lU(e,t){if((n=e.length)>0){for(var r,n,i=0,l=e[0].length,o;i<l;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}al(e,t)}}function oU(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,l=n.length;r<l;++r){for(var o=0,c=0;o<i;++o)c+=e[o][r][1]||0;n[r][1]+=n[r][0]=-c/2}al(e,t)}}function uU(e,t){if(!(!((o=e.length)>0)||!((l=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,l,o;n<l;++n){for(var c=0,f=0,h=0;c<o;++c){for(var p=e[t[c]],y=p[n][1]||0,v=p[n-1][1]||0,x=(y-v)/2,b=0;b<c;++b){var w=e[t[b]],N=w[n][1]||0,O=w[n-1][1]||0;x+=N-O}f+=y,h+=x*y}i[n-1][1]+=i[n-1][0]=r,f&&(r-=h/f)}i[n-1][1]+=i[n-1][0]=r,al(e,t)}}var Ng={},Og={},X_;function cU(){return X_||(X_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Og)),Og}var _g={},W_;function WM(){return W_||(W_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(_g)),_g}var Eg={},Z_;function lj(){return Z_||(Z_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(Eg)),Eg}var Ag={},Cg={},J_;function dU(){return J_||(J_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Cg)),Cg}var eE;function oj(){return eE||(eE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dU(),r=lj();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const l=[],o=i.length;if(o===0)return l;let c=0,f="",h="",p=!1;for(i.charCodeAt(0)===46&&(l.push(""),c++);c<o;){const y=i[c];h?y==="\\"&&c+1<o?(c++,f+=i[c]):y===h?h="":f+=y:p?y==='"'||y==="'"?h=y:y==="]"?(p=!1,l.push(f),f=""):f+=y:y==="["?(p=!0,f&&(l.push(f),f="")):y==="."?f&&(l.push(f),f=""):f+=y,c++}return f&&l.push(f),l}e.toPath=n})(Ag)),Ag}var tE;function uj(){return tE||(tE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cU(),r=WM(),n=lj(),i=oj();function l(c,f,h){if(c==null)return h;switch(typeof f){case"string":{if(t.isUnsafeProperty(f))return h;const p=c[f];return p===void 0?r.isDeepKey(f)?l(c,i.toPath(f),h):h:p}case"number":case"symbol":{typeof f=="number"&&(f=n.toKey(f));const p=c[f];return p===void 0?h:p}default:{if(Array.isArray(f))return o(c,f,h);if(Object.is(f==null?void 0:f.valueOf(),-0)?f="-0":f=String(f),t.isUnsafeProperty(f))return h;const p=c[f];return p===void 0?h:p}}}function o(c,f,h){if(f.length===0)return h;let p=c;for(let y=0;y<f.length;y++){if(p==null||t.isUnsafeProperty(f[y]))return h;p=p[f[y]]}return p===void 0?h:p}e.get=l})(Ng)),Ng}var Tg,rE;function fU(){return rE||(rE=1,Tg=uj().get),Tg}var hU=fU();const Fo=as(hU);var mU=4;function Qi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mU,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function bt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,l,o)=>{var c=r[o-1];return typeof c=="string"?i+c+l:c!==void 0?i+Qi(c)+l:i+l},"")}var Br=e=>e===0?0:e>0?1:-1,la=e=>typeof e=="number"&&e!=+e,il=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ye=e=>(typeof e=="number"||e instanceof Number)&&!la(e),oa=e=>ye(e)||typeof e=="string",pU=0,Bc=e=>{var t=++pU;return"".concat(e||"").concat(t)},zn=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ye(t)&&typeof t!="string")return n;var l;if(il(t)){if(r==null)return n;var o=t.indexOf("%");l=r*parseFloat(t.slice(0,o))/100}else l=+t;return la(l)&&(l=n),i&&r!=null&&l>r&&(l=r),l},ZM=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function jt(e,t,r){return ye(e)&&ye(t)?Qi(e+r*(t-e)):t}function JM(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Fo(n,t))===r)}var mt=e=>e===null||typeof e>"u",dd=e=>mt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Ur(e){return e!=null}function pl(){}var yU=["type","size","sizeType"];function Ix(){return Ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ix.apply(null,arguments)}function nE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function aE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nE(Object(r),!0).forEach(function(n){vU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vU(e,t,r){return(t=gU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gU(e){var t=xU(e,"string");return typeof t=="symbol"?t:t+""}function xU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bU(e,t){if(e==null)return{};var r,n,i=jU(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jU(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var eR={symbolCircle:sj,symbolCross:I6,symbolDiamond:$6,symbolSquare:z6,symbolStar:H6,symbolTriangle:F6,symbolWye:G6},wU=Math.PI/180,SU=e=>{var t="symbol".concat(dd(e));return eR[t]||sj},NU=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*wU;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},OU=(e,t)=>{eR["symbol".concat(dd(e))]=t},cj=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=bU(e,yU),l=aE(aE({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var c=()=>{var v=SU(o),x=Y6().type(v).size(NU(r,n,o)),b=x();if(b!==null)return b},{className:f,cx:h,cy:p}=l,y=Or(l);return ye(h)&&ye(p)&&ye(r)?S.createElement("path",Ix({},y,{className:Xe("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};cj.registerSymbol=OU;var tR=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,dj=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(S.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{rj(i)&&typeof r[i]=="function"&&(n[i]=(l=>r[i](r,l)))}),n},_U=(e,t,r)=>n=>(e(t,r,n),null),Km=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var l=e[i];rj(i)&&typeof l=="function"&&(n||(n={}),n[i]=_U(l,t,r))}),n};function iE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iE(Object(r),!0).forEach(function(n){AU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AU(e,t,r){return(t=CU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CU(e){var t=TU(e,"string");return typeof t=="symbol"?t:t+""}function TU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function or(e,t){var r=EU({},e),n=t,i=Object.keys(t),l=i.reduce((o,c)=>(o[c]===void 0&&n[c]!==void 0&&(o[c]=n[c]),o),r);return l}function Hh(){return Hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hh.apply(null,arguments)}function sE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sE(Object(r),!0).forEach(function(n){PU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PU(e,t,r){return(t=MU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MU(e){var t=RU(e,"string");return typeof t=="symbol"?t:t+""}function RU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xn=32,DU={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function kU(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function IU(e){var{data:t,iconType:r,inactiveColor:n}=e,i=xn/2,l=xn/6,o=xn/3,c=t.inactive?n:t.color,f=r??t.type;if(f==="none")return null;if(f==="plainline")return S.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:kU(t.payload),x1:0,y1:i,x2:xn,y2:i,className:"recharts-legend-icon"});if(f==="line")return S.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(o,`
|
|
67
|
-
A`).concat(l,",").concat(l,",0,1,1,").concat(2*o,",").concat(i,`
|
|
68
|
-
H`).concat(xn,"M").concat(2*o,",").concat(i,`
|
|
69
|
-
A`).concat(l,",").concat(l,",0,1,1,").concat(o,",").concat(i),className:"recharts-legend-icon"});if(f==="rect")return S.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(xn/8,"h").concat(xn,"v").concat(xn*3/4,"h").concat(-xn,"z"),className:"recharts-legend-icon"});if(S.isValidElement(t.legendIcon)){var h=rR({},t);return delete h.legendIcon,S.cloneElement(t.legendIcon,h)}return S.createElement(cj,{fill:c,cx:i,cy:i,size:xn,sizeType:"diameter",type:f})}function LU(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:l,iconType:o,labelStyle:c}=e,f={x:0,y:0,width:xn,height:xn},h={display:n==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((y,v)=>{var x=y.formatter||i,b=Xe({"recharts-legend-item":!0,["legend-item-".concat(v)]:!0,inactive:y.inactive});if(y.type==="none")return null;var w=typeof c=="object"?rR({},c):{};w.color=y.inactive?l:w.color||y.color;var N=x?x(y.value,y,v):y.value;return S.createElement("li",Hh({className:b,style:h,key:"legend-item-".concat(v)},Km(e,y,v)),S.createElement(nj,{width:r,height:r,viewBox:f,style:p,"aria-label":"".concat(y.value," legend icon")},S.createElement(IU,{data:y,iconType:o,inactiveColor:l})),S.createElement("span",{className:"recharts-legend-item-text",style:w},N))})}var $U=e=>{var t=or(e,DU),{payload:r,layout:n,align:i}=t;if(!r||!r.length)return null;var l={padding:0,margin:0,textAlign:n==="horizontal"?i:"left"};return S.createElement("ul",{className:"recharts-default-legend",style:l},S.createElement(LU,Hh({},t,{payload:r})))},Pg={},Mg={},lE;function zU(){return lE||(lE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let l=0;l<r.length;l++){const o=r[l],c=n(o,l,r);i.has(c)||i.set(c,o)}return Array.from(i.values())}e.uniqBy=t})(Mg)),Mg}var Rg={},oE;function BU(){return oE||(oE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...i){return r.apply(this,i.slice(0,n))}}e.ary=t})(Rg)),Rg}var Dg={},uE;function nR(){return uE||(uE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Dg)),Dg}var kg={},Ig={},Lg={},cE;function UU(){return cE||(cE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Lg)),Lg}var dE;function aR(){return dE||(dE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=UU();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Ig)),Ig}var $g={},fE;function qU(){return fE||(fE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})($g)),$g}var hE;function HU(){return hE||(hE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aR(),r=qU();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(kg)),kg}var zg={},Bg={},mE;function FU(){return mE||(mE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uj();function r(n){return function(i){return t.get(i,n)}}e.property=r})(Bg)),Bg}var Ug={},qg={},Hg={},Fg={},pE;function iR(){return pE||(pE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(Fg)),Fg}var Kg={},yE;function sR(){return yE||(yE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(Kg)),Kg}var Gg={},vE;function lR(){return vE||(vE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(Gg)),Gg}var gE;function KU(){return gE||(gE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iR(),r=sR(),n=lR();function i(p,y,v){return typeof v!="function"?i(p,y,()=>{}):l(p,y,function x(b,w,N,O,C,E){const A=v(b,w,N,O,C,E);return A!==void 0?!!A:l(b,w,x,E)},new Map)}function l(p,y,v,x){if(y===p)return!0;switch(typeof y){case"object":return o(p,y,v,x);case"function":return Object.keys(y).length>0?l(p,{...y},v,x):n.isEqualsSameValueZero(p,y);default:return t.isObject(p)?typeof y=="string"?y==="":!0:n.isEqualsSameValueZero(p,y)}}function o(p,y,v,x){if(y==null)return!0;if(Array.isArray(y))return f(p,y,v,x);if(y instanceof Map)return c(p,y,v,x);if(y instanceof Set)return h(p,y,v,x);const b=Object.keys(y);if(p==null||r.isPrimitive(p))return b.length===0;if(b.length===0)return!0;if(x!=null&&x.has(y))return x.get(y)===p;x==null||x.set(y,p);try{for(let w=0;w<b.length;w++){const N=b[w];if(!r.isPrimitive(p)&&!(N in p)||y[N]===void 0&&p[N]!==void 0||y[N]===null&&p[N]!==null||!v(p[N],y[N],N,p,y,x))return!1}return!0}finally{x==null||x.delete(y)}}function c(p,y,v,x){if(y.size===0)return!0;if(!(p instanceof Map))return!1;for(const[b,w]of y.entries()){const N=p.get(b);if(v(N,w,b,p,y,x)===!1)return!1}return!0}function f(p,y,v,x){if(y.length===0)return!0;if(!Array.isArray(p))return!1;const b=new Set;for(let w=0;w<y.length;w++){const N=y[w];let O=!1;for(let C=0;C<p.length;C++){if(b.has(C))continue;const E=p[C];let A=!1;if(v(E,N,w,p,y,x)&&(A=!0),A){b.add(C),O=!0;break}}if(!O)return!1}return!0}function h(p,y,v,x){return y.size===0?!0:p instanceof Set?f([...p],[...y],v,x):!1}e.isMatchWith=i,e.isSetMatch=h})(Hg)),Hg}var xE;function oR(){return xE||(xE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=KU();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(qg)),qg}var Yg={},Vg={},Qg={},bE;function GU(){return bE||(bE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(Qg)),Qg}var Xg={},jE;function fj(){return jE||(jE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(Xg)),Xg}var Wg={},wE;function uR(){return wE||(wE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",l="[object Arguments]",o="[object Symbol]",c="[object Date]",f="[object Map]",h="[object Set]",p="[object Array]",y="[object Function]",v="[object ArrayBuffer]",x="[object Object]",b="[object Error]",w="[object DataView]",N="[object Uint8Array]",O="[object Uint8ClampedArray]",C="[object Uint16Array]",E="[object Uint32Array]",A="[object BigUint64Array]",T="[object Int8Array]",M="[object Int16Array]",R="[object Int32Array]",D="[object BigInt64Array]",I="[object Float32Array]",k="[object Float64Array]";e.argumentsTag=l,e.arrayBufferTag=v,e.arrayTag=p,e.bigInt64ArrayTag=D,e.bigUint64ArrayTag=A,e.booleanTag=i,e.dataViewTag=w,e.dateTag=c,e.errorTag=b,e.float32ArrayTag=I,e.float64ArrayTag=k,e.functionTag=y,e.int16ArrayTag=M,e.int32ArrayTag=R,e.int8ArrayTag=T,e.mapTag=f,e.numberTag=n,e.objectTag=x,e.regexpTag=t,e.setTag=h,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=C,e.uint32ArrayTag=E,e.uint8ArrayTag=N,e.uint8ClampedArrayTag=O})(Wg)),Wg}var Zg={},SE;function YU(){return SE||(SE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(Zg)),Zg}var NE;function cR(){return NE||(NE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=GU(),r=fj(),n=uR(),i=sR(),l=YU();function o(p,y){return c(p,void 0,p,new Map,y)}function c(p,y,v,x=new Map,b=void 0){const w=b==null?void 0:b(p,y,v,x);if(w!==void 0)return w;if(i.isPrimitive(p))return p;if(x.has(p))return x.get(p);if(Array.isArray(p)){const N=new Array(p.length);x.set(p,N);for(let O=0;O<p.length;O++)N[O]=c(p[O],O,v,x,b);return Object.hasOwn(p,"index")&&(N.index=p.index),Object.hasOwn(p,"input")&&(N.input=p.input),N}if(p instanceof Date)return new Date(p.getTime());if(p instanceof RegExp){const N=new RegExp(p.source,p.flags);return N.lastIndex=p.lastIndex,N}if(p instanceof Map){const N=new Map;x.set(p,N);for(const[O,C]of p)N.set(O,c(C,O,v,x,b));return N}if(p instanceof Set){const N=new Set;x.set(p,N);for(const O of p)N.add(c(O,void 0,v,x,b));return N}if(typeof Buffer<"u"&&Buffer.isBuffer(p))return p.subarray();if(l.isTypedArray(p)){const N=new(Object.getPrototypeOf(p)).constructor(p.length);x.set(p,N);for(let O=0;O<p.length;O++)N[O]=c(p[O],O,v,x,b);return N}if(p instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&p instanceof SharedArrayBuffer)return p.slice(0);if(p instanceof DataView){const N=new DataView(p.buffer.slice(0),p.byteOffset,p.byteLength);return x.set(p,N),f(N,p,v,x,b),N}if(typeof File<"u"&&p instanceof File){const N=new File([p],p.name,{type:p.type});return x.set(p,N),f(N,p,v,x,b),N}if(typeof Blob<"u"&&p instanceof Blob){const N=new Blob([p],{type:p.type});return x.set(p,N),f(N,p,v,x,b),N}if(p instanceof Error){const N=structuredClone(p);return x.set(p,N),N.message=p.message,N.name=p.name,N.stack=p.stack,N.cause=p.cause,N.constructor=p.constructor,f(N,p,v,x,b),N}if(p instanceof Boolean){const N=new Boolean(p.valueOf());return x.set(p,N),f(N,p,v,x,b),N}if(p instanceof Number){const N=new Number(p.valueOf());return x.set(p,N),f(N,p,v,x,b),N}if(p instanceof String){const N=new String(p.valueOf());return x.set(p,N),f(N,p,v,x,b),N}if(typeof p=="object"&&h(p)){const N=Object.create(Object.getPrototypeOf(p));return x.set(p,N),f(N,p,v,x,b),N}return p}function f(p,y,v=p,x,b){const w=[...Object.keys(y),...t.getSymbols(y)];for(let N=0;N<w.length;N++){const O=w[N],C=Object.getOwnPropertyDescriptor(p,O);(C==null||C.writable)&&(p[O]=c(y[O],O,v,x,b))}}function h(p){switch(r.getTag(p)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=c,e.copyProperties=f})(Vg)),Vg}var OE;function VU(){return OE||(OE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cR();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Yg)),Yg}var _E;function QU(){return _E||(_E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oR(),r=VU();function n(i){return i=r.cloneDeep(i),l=>t.isMatch(l,i)}e.matches=n})(Ug)),Ug}var Jg={},e0={},t0={},EE;function XU(){return EE||(EE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cR(),r=fj(),n=uR();function i(l,o){return t.cloneDeepWith(l,(c,f,h,p)=>{const y=o==null?void 0:o(c,f,h,p);if(y!==void 0)return y;if(typeof l=="object"){if(r.getTag(l)===n.objectTag&&typeof l.constructor!="function"){const v={};return p.set(l,v),t.copyProperties(v,l,h,p),v}switch(Object.prototype.toString.call(l)){case n.numberTag:case n.stringTag:case n.booleanTag:{const v=new l.constructor(l==null?void 0:l.valueOf());return t.copyProperties(v,l),v}case n.argumentsTag:{const v={};return t.copyProperties(v,l),v.length=l.length,v[Symbol.iterator]=l[Symbol.iterator],v}default:return}}})}e.cloneDeepWith=i})(t0)),t0}var AE;function WU(){return AE||(AE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XU();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(e0)),e0}var r0={},n0={},CE;function dR(){return CE||(CE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(n0)),n0}var a0={},TE;function ZU(){return TE||(TE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fj();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(a0)),a0}var PE;function JU(){return PE||(PE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=WM(),r=dR(),n=ZU(),i=oj();function l(o,c){let f;if(Array.isArray(c)?f=c:typeof c=="string"&&t.isDeepKey(c)&&(o==null?void 0:o[c])==null?f=i.toPath(c):f=[c],f.length===0)return!1;let h=o;for(let p=0;p<f.length;p++){const y=f[p];if((h==null||!Object.hasOwn(h,y))&&!((Array.isArray(h)||n.isArguments(h))&&r.isIndex(y)&&y<h.length))return!1;h=h[y]}return!0}e.has=l})(r0)),r0}var ME;function e9(){return ME||(ME=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oR(),r=lj(),n=WU(),i=uj(),l=JU();function o(c,f){switch(typeof c){case"object":{Object.is(c==null?void 0:c.valueOf(),-0)&&(c="-0");break}case"number":{c=r.toKey(c);break}}return f=n.cloneDeep(f),function(h){const p=i.get(h,c);return p===void 0?l.has(h,c):f===void 0?p===void 0:t.isMatch(p,f)}}e.matchesProperty=o})(Jg)),Jg}var RE;function t9(){return RE||(RE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nR(),r=FU(),n=QU(),i=e9();function l(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}e.iteratee=l})(zg)),zg}var DE;function r9(){return DE||(DE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zU(),r=BU(),n=nR(),i=HU(),l=t9();function o(c,f=n.identity){return i.isArrayLikeObject(c)?t.uniqBy(Array.from(c),r.ary(l.iteratee(f),1)):[]}e.uniqBy=o})(Pg)),Pg}var i0,kE;function n9(){return kE||(kE=1,i0=r9().uniqBy),i0}var a9=n9();const IE=as(a9);function fR(e,t,r){return t===!0?IE(e,r):typeof t=="function"?IE(e,t):e}var hj=S.createContext(null),i9=e=>e,ct=()=>{var e=S.useContext(hj);return e?e.store.dispatch:i9},Nh=()=>{},s9=()=>Nh,l9=(e,t)=>e===t;function ge(e){var t=S.useContext(hj),r=S.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Nh,[t,e]);return G2.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:s9,t?t.store.getState:Nh,t?t.store.getState:Nh,r,l9)}function o9(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function u9(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function c9(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var LE=e=>Array.isArray(e)?e:[e];function d9(e){const t=Array.isArray(e[0])?e[0]:e;return c9(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function f9(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var h9=class{constructor(e){this.value=e}deref(){return this.value}},m9=typeof WeakRef<"u"?WeakRef:h9,p9=0,$E=1;function th(){return{s:p9,v:void 0,o:null,p:null}}function hR(e,t={}){let r=th();const{resultEqualityCheck:n}=t;let i,l=0;function o(){var y;let c=r;const{length:f}=arguments;for(let v=0,x=f;v<x;v++){const b=arguments[v];if(typeof b=="function"||typeof b=="object"&&b!==null){let w=c.o;w===null&&(c.o=w=new WeakMap);const N=w.get(b);N===void 0?(c=th(),w.set(b,c)):c=N}else{let w=c.p;w===null&&(c.p=w=new Map);const N=w.get(b);N===void 0?(c=th(),w.set(b,c)):c=N}}const h=c;let p;if(c.s===$E)p=c.v;else if(p=e.apply(null,arguments),l++,n){const v=((y=i==null?void 0:i.deref)==null?void 0:y.call(i))??i;v!=null&&n(v,p)&&(p=v,l!==0&&l--),i=typeof p=="object"&&p!==null||typeof p=="function"?new m9(p):p}return h.s=$E,h.v=p,p}return o.clearCache=()=>{r=th(),o.resetResultsCount()},o.resultsCount=()=>l,o.resetResultsCount=()=>{l=0},o}function y9(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let l=0,o=0,c,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),o9(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...f},{memoize:y,memoizeOptions:v=[],argsMemoize:x=hR,argsMemoizeOptions:b=[]}=p,w=LE(v),N=LE(b),O=d9(i),C=y(function(){return l++,h.apply(null,arguments)},...w),E=x(function(){o++;const T=f9(O,arguments);return c=C.apply(null,T),c},...N);return Object.assign(E,{resultFunc:h,memoizedResultFunc:C,dependencies:O,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>c,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:y,argsMemoize:x})};return Object.assign(n,{withTypes:()=>n}),n}var V=y9(hR),v9=Object.assign((e,t=V)=>{u9(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(l=>e[l]);return t(n,(...l)=>l.reduce((o,c,f)=>(o[r[f]]=c,o),{}))},{withTypes:()=>v9}),s0={},l0={},o0={},zE;function g9(){return zE||(zE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,l)=>{if(n!==i){const o=t(n),c=t(i);if(o===c&&o===0){if(n<i)return l==="desc"?1:-1;if(n>i)return l==="desc"?-1:1}return l==="desc"?c-o:o-c}return 0};e.compareValues=r})(o0)),o0}var u0={},c0={},BE;function mR(){return BE||(BE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(c0)),c0}var UE;function x9(){return UE||(UE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mR(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(l,o){return Array.isArray(l)?!1:typeof l=="number"||typeof l=="boolean"||l==null||t.isSymbol(l)?!0:typeof l=="string"&&(n.test(l)||!r.test(l))||o!=null&&Object.hasOwn(o,l)}e.isKey=i})(u0)),u0}var qE;function b9(){return qE||(qE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=g9(),r=x9(),n=oj();function i(l,o,c,f){if(l==null)return[];c=f?void 0:c,Array.isArray(l)||(l=Object.values(l)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(c)||(c=c==null?[]:[c]),c=c.map(x=>String(x));const h=(x,b)=>{let w=x;for(let N=0;N<b.length&&w!=null;++N)w=w[b[N]];return w},p=(x,b)=>b==null||x==null?b:typeof x=="object"&&"key"in x?Object.hasOwn(b,x.key)?b[x.key]:h(b,x.path):typeof x=="function"?x(b):Array.isArray(x)?h(b,x):typeof b=="object"?b[x]:b,y=o.map(x=>(Array.isArray(x)&&x.length===1&&(x=x[0]),x==null||typeof x=="function"||Array.isArray(x)||r.isKey(x)?x:{key:x,path:n.toPath(x)}));return l.map(x=>({original:x,criteria:y.map(b=>p(b,x))})).slice().sort((x,b)=>{for(let w=0;w<y.length;w++){const N=t.compareValues(x.criteria[w],b.criteria[w],c[w]);if(N!==0)return N}return 0}).map(x=>x.original)}e.orderBy=i})(l0)),l0}var d0={},HE;function j9(){return HE||(HE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],l=Math.floor(n),o=(c,f)=>{for(let h=0;h<c.length;h++){const p=c[h];Array.isArray(p)&&f<l?o(p,f+1):i.push(p)}};return o(r,0),i}e.flatten=t})(d0)),d0}var f0={},FE;function pR(){return FE||(FE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dR(),r=aR(),n=iR(),i=lR();function l(o,c,f){return n.isObject(f)&&(typeof c=="number"&&r.isArrayLike(f)&&t.isIndex(c)&&c<f.length||typeof c=="string"&&c in f)?i.isEqualsSameValueZero(f[c],o):!1}e.isIterateeCall=l})(f0)),f0}var KE;function w9(){return KE||(KE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=b9(),r=j9(),n=pR();function i(l,...o){const c=o.length;return c>1&&n.isIterateeCall(l,o[0],o[1])?o=[]:c>2&&n.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(l,r.flatten(o),["asc"])}e.sortBy=i})(s0)),s0}var h0,GE;function S9(){return GE||(GE=1,h0=w9().sortBy),h0}var N9=S9();const Gm=as(N9);var yR=e=>e.legend.settings,O9=e=>e.legend.size,_9=e=>e.legend.payload,E9=V([_9,yR],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Gm(n,r):n});function A9(){return ge(E9)}var rh=1;function vR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=S.useState({height:0,left:0,top:0,width:0}),n=S.useCallback(i=>{if(i!=null){var l=i.getBoundingClientRect(),o={height:l.height,left:l.left,top:l.top,width:l.width};(Math.abs(o.height-t.height)>rh||Math.abs(o.left-t.left)>rh||Math.abs(o.top-t.top)>rh||Math.abs(o.width-t.width)>rh)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function ar(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var C9=typeof Symbol=="function"&&Symbol.observable||"@@observable",YE=C9,m0=()=>Math.random().toString(36).substring(7).split("").join("."),T9={INIT:`@@redux/INIT${m0()}`,REPLACE:`@@redux/REPLACE${m0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${m0()}`},Fh=T9;function mj(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function gR(e,t,r){if(typeof e!="function")throw new Error(ar(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ar(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ar(1));return r(gR)(e,t)}let n=e,i=t,l=new Map,o=l,c=0,f=!1;function h(){o===l&&(o=new Map,l.forEach((N,O)=>{o.set(O,N)}))}function p(){if(f)throw new Error(ar(3));return i}function y(N){if(typeof N!="function")throw new Error(ar(4));if(f)throw new Error(ar(5));let O=!0;h();const C=c++;return o.set(C,N),function(){if(O){if(f)throw new Error(ar(6));O=!1,h(),o.delete(C),l=null}}}function v(N){if(!mj(N))throw new Error(ar(7));if(typeof N.type>"u")throw new Error(ar(8));if(typeof N.type!="string")throw new Error(ar(17));if(f)throw new Error(ar(9));try{f=!0,i=n(i,N)}finally{f=!1}return(l=o).forEach(C=>{C()}),N}function x(N){if(typeof N!="function")throw new Error(ar(10));n=N,v({type:Fh.REPLACE})}function b(){const N=y;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(ar(11));function C(){const A=O;A.next&&A.next(p())}return C(),{unsubscribe:N(C)}},[YE](){return this}}}return v({type:Fh.INIT}),{dispatch:v,subscribe:y,getState:p,replaceReducer:x,[YE]:b}}function P9(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Fh.INIT})>"u")throw new Error(ar(12));if(typeof r(void 0,{type:Fh.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ar(13))})}function xR(e){const t=Object.keys(e),r={};for(let l=0;l<t.length;l++){const o=t[l];typeof e[o]=="function"&&(r[o]=e[o])}const n=Object.keys(r);let i;try{P9(r)}catch(l){i=l}return function(o={},c){if(i)throw i;let f=!1;const h={};for(let p=0;p<n.length;p++){const y=n[p],v=r[y],x=o[y],b=v(x,c);if(typeof b>"u")throw c&&c.type,new Error(ar(14));h[y]=b,f=f||b!==x}return f=f||n.length!==Object.keys(o).length,f?h:o}}function Kh(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function M9(...e){return t=>(r,n)=>{const i=t(r,n);let l=()=>{throw new Error(ar(15))};const o={getState:i.getState,dispatch:(f,...h)=>l(f,...h)},c=e.map(f=>f(o));return l=Kh(...c)(i.dispatch),{...i,dispatch:l}}}function bR(e){return mj(e)&&"type"in e&&typeof e.type=="string"}var jR=Symbol.for("immer-nothing"),VE=Symbol.for("immer-draftable"),_r=Symbol.for("immer-state");function Rn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var en=Object,Ko=en.getPrototypeOf,Gh="constructor",Ym="prototype",Lx="configurable",Yh="enumerable",Oh="writable",Uc="value",Va=e=>!!e&&!!e[_r];function Bn(e){var t;return e?wR(e)||Qm(e)||!!e[VE]||!!((t=e[Gh])!=null&&t[VE])||Xm(e)||Wm(e):!1}var R9=en[Ym][Gh].toString(),QE=new WeakMap;function wR(e){if(!e||!pj(e))return!1;const t=Ko(e);if(t===null||t===en[Ym])return!0;const r=en.hasOwnProperty.call(t,Gh)&&t[Gh];if(r===Object)return!0;if(!bo(r))return!1;let n=QE.get(r);return n===void 0&&(n=Function.toString.call(r),QE.set(r,n)),n===R9}function Vm(e,t,r=!0){fd(e)===0?(r?Reflect.ownKeys(e):en.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function fd(e){const t=e[_r];return t?t.type_:Qm(e)?1:Xm(e)?2:Wm(e)?3:0}var XE=(e,t,r=fd(e))=>r===2?e.has(t):en[Ym].hasOwnProperty.call(e,t),$x=(e,t,r=fd(e))=>r===2?e.get(t):e[t],Vh=(e,t,r,n=fd(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function D9(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Qm=Array.isArray,Xm=e=>e instanceof Map,Wm=e=>e instanceof Set,pj=e=>typeof e=="object",bo=e=>typeof e=="function",p0=e=>typeof e=="boolean";function k9(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Da=e=>e.copy_||e.base_,yj=e=>e.modified_?e.copy_:e.base_;function zx(e,t){if(Xm(e))return new Map(e);if(Wm(e))return new Set(e);if(Qm(e))return Array[Ym].slice.call(e);const r=wR(e);if(t===!0||t==="class_only"&&!r){const n=en.getOwnPropertyDescriptors(e);delete n[_r];let i=Reflect.ownKeys(n);for(let l=0;l<i.length;l++){const o=i[l],c=n[o];c[Oh]===!1&&(c[Oh]=!0,c[Lx]=!0),(c.get||c.set)&&(n[o]={[Lx]:!0,[Oh]:!0,[Yh]:c[Yh],[Uc]:e[o]})}return en.create(Ko(e),n)}else{const n=Ko(e);if(n!==null&&r)return{...e};const i=en.create(n);return en.assign(i,e)}}function vj(e,t=!1){return Zm(e)||Va(e)||!Bn(e)||(fd(e)>1&&en.defineProperties(e,{set:nh,add:nh,clear:nh,delete:nh}),en.freeze(e),t&&Vm(e,(r,n)=>{vj(n,!0)},!1)),e}function I9(){Rn(2)}var nh={[Uc]:I9};function Zm(e){return e===null||!pj(e)?!0:en.isFrozen(e)}var Qh="MapSet",Bx="Patches",WE="ArrayMethods",SR={};function sl(e){const t=SR[e];return t||Rn(0,e),t}var ZE=e=>!!SR[e],qc,NR=()=>qc,L9=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ZE(Qh)?sl(Qh):void 0,arrayMethodsPlugin_:ZE(WE)?sl(WE):void 0});function JE(e,t){t&&(e.patchPlugin_=sl(Bx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ux(e){qx(e),e.drafts_.forEach($9),e.drafts_=null}function qx(e){e===qc&&(qc=e.parent_)}var eA=e=>qc=L9(qc,e);function $9(e){const t=e[_r];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function tA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[_r].modified_&&(Ux(t),Rn(4)),Bn(e)&&(e=rA(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[_r].base_,e,t)}else e=rA(t,r);return z9(t,e,!0),Ux(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==jR?e:void 0}function rA(e,t){if(Zm(t))return t;const r=t[_r];if(!r)return Xh(t,e.handledSet_,e);if(!Jm(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);ER(r,e)}return r.copy_}function z9(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vj(t,r)}function OR(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Jm=(e,t)=>e.scope_===t,B9=[];function _R(e,t,r,n){const i=Da(e),l=e.type_;if(n!==void 0&&$x(i,n,l)===t){Vh(i,n,r,l);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Vm(i,(f,h)=>{if(Va(h)){const p=c.get(h)||[];p.push(f),c.set(h,p)}})}const o=e.draftLocations_.get(t)??B9;for(const c of o)Vh(i,c,r,l)}function U9(e,t,r){e.callbacks_.push(function(i){var c;const l=t;if(!l||!Jm(l,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(l);const o=yj(l);_R(e,l.draft_??l,o,r),ER(l,i)})}function ER(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const l=i.getPath(e);l&&i.generatePatches_(e,l,t)}OR(e)}}function q9(e,t,r){const{scope_:n}=e;if(Va(r)){const i=r[_r];Jm(i,n)&&i.callbacks_.push(function(){_h(e);const o=yj(i);_R(e,r,o,t)})}else Bn(r)&&e.callbacks_.push(function(){const l=Da(e);e.type_===3?l.has(r)&&Xh(r,n.handledSet_,n):$x(l,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Xh($x(e.copy_,t,e.type_),n.handledSet_,n)})}function Xh(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Va(e)||t.has(e)||!Bn(e)||Zm(e)||(t.add(e),Vm(e,(n,i)=>{if(Va(i)){const l=i[_r];if(Jm(l,r)){const o=yj(l);Vh(e,n,o,e.type_),OR(l)}}else Bn(i)&&Xh(i,t,r)})),e}function H9(e,t){const r=Qm(e),n={type_:r?1:0,scope_:t?t.scope_:NR(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,l=Wh;r&&(i=[n],l=Hc);const{revoke:o,proxy:c}=Proxy.revocable(i,l);return n.draft_=c,n.revoke_=o,[c,n]}var Wh={get(e,t){if(t===_r)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=Da(e);if(!XE(i,t,e.type_))return F9(e,i,t);const l=i[t];if(e.finalized_||!Bn(l)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&k9(t))return l;if(l===y0(e.base_,t)){_h(e);const o=e.type_===1?+t:t,c=Fx(e.scope_,l,e,o);return e.copy_[o]=c}return l},has(e,t){return t in Da(e)},ownKeys(e){return Reflect.ownKeys(Da(e))},set(e,t,r){const n=AR(Da(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=y0(Da(e),t),l=i==null?void 0:i[_r];if(l&&l.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(D9(r,i)&&(r!==void 0||XE(e.base_,t,e.type_)))return!0;_h(e),Hx(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),q9(e,t,r)),!0},deleteProperty(e,t){return _h(e),y0(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Hx(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Da(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Oh]:!0,[Lx]:e.type_!==1||t!=="length",[Yh]:n[Yh],[Uc]:r[t]}},defineProperty(){Rn(11)},getPrototypeOf(e){return Ko(e.base_)},setPrototypeOf(){Rn(12)}},Hc={};for(let e in Wh){let t=Wh[e];Hc[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Hc.deleteProperty=function(e,t){return Hc.set.call(this,e,t,void 0)};Hc.set=function(e,t,r){return Wh.set.call(this,e[0],t,r,e[0])};function y0(e,t){const r=e[_r];return(r?Da(r):e)[t]}function F9(e,t,r){var i;const n=AR(t,r);return n?Uc in n?n[Uc]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function AR(e,t){if(!(t in e))return;let r=Ko(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ko(r)}}function Hx(e){e.modified_||(e.modified_=!0,e.parent_&&Hx(e.parent_))}function _h(e){e.copy_||(e.assigned_=new Map,e.copy_=zx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var K9=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(bo(r)&&!bo(n)){const o=n;n=r;const c=this;return function(h=o,...p){return c.produce(h,y=>n.call(this,y,...p))}}bo(n)||Rn(6),i!==void 0&&!bo(i)&&Rn(7);let l;if(Bn(r)){const o=eA(this),c=Fx(o,r,void 0);let f=!0;try{l=n(c),f=!1}finally{f?Ux(o):qx(o)}return JE(o,i),tA(l,o)}else if(!r||!pj(r)){if(l=n(r),l===void 0&&(l=r),l===jR&&(l=void 0),this.autoFreeze_&&vj(l,!0),i){const o=[],c=[];sl(Bx).generateReplacementPatches_(r,l,{patches_:o,inversePatches_:c}),i(o,c)}return l}else Rn(1,r)},this.produceWithPatches=(r,n)=>{if(bo(r))return(c,...f)=>this.produceWithPatches(c,h=>r(h,...f));let i,l;return[this.produce(r,n,(c,f)=>{i=c,l=f}),i,l]},p0(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),p0(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),p0(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Bn(t)||Rn(8),Va(t)&&(t=Sn(t));const r=eA(this),n=Fx(r,t,void 0);return n[_r].isManual_=!0,qx(r),n}finishDraft(t,r){const n=t&&t[_r];(!n||!n.isManual_)&&Rn(9);const{scope_:i}=n;return JE(i,r),tA(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const l=r[n];if(l.path.length===0&&l.op==="replace"){t=l.value;break}}n>-1&&(r=r.slice(n+1));const i=sl(Bx).applyPatches_;return Va(t)?i(t,r):this.produce(t,l=>i(l,r))}};function Fx(e,t,r,n){const[i,l]=Xm(t)?sl(Qh).proxyMap_(t,r):Wm(t)?sl(Qh).proxySet_(t,r):H9(t,r);return((r==null?void 0:r.scope_)??NR()).drafts_.push(i),l.callbacks_=(r==null?void 0:r.callbacks_)??[],l.key_=n,r&&n!==void 0?U9(r,l,n):l.callbacks_.push(function(f){var p;(p=f.mapSetPlugin_)==null||p.fixSetContents(l);const{patchPlugin_:h}=f;l.modified_&&h&&h.generatePatches_(l,[],f)}),i}function Sn(e){return Va(e)||Rn(10,e),CR(e)}function CR(e){if(!Bn(e)||Zm(e))return e;const t=e[_r];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=zx(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=zx(e,!0);return Vm(r,(i,l)=>{Vh(r,i,CR(l))},n),t&&(t.finalized_=!1),r}var G9=new K9,TR=G9.produce;function PR(e){return({dispatch:r,getState:n})=>i=>l=>typeof l=="function"?l(r,n,e):i(l)}var Y9=PR(),V9=PR,Q9=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Kh:Kh.apply(null,arguments)};function nn(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(tn(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>bR(n)&&n.type===e,r}var MR=class _c extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,_c.prototype)}static get[Symbol.species](){return _c}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new _c(...t[0].concat(this)):new _c(...t.concat(this))}};function nA(e){return Bn(e)?TR(e,()=>{}):e}function ah(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function X9(e){return typeof e=="boolean"}var W9=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:l=!0}=t??{};let o=new MR;return r&&(X9(r)?o.push(Y9):o.push(V9(r.extraArgument))),o},RR="RTK_autoBatch",lt=()=>e=>({payload:e,meta:{[RR]:!0}}),aA=e=>t=>{setTimeout(t,e)},DR=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,l=!1,o=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:aA(10):e.type==="callback"?e.queueNotification:aA(e.timeout),h=()=>{o=!1,l&&(l=!1,c.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const y=()=>i&&p(),v=n.subscribe(y);return c.add(p),()=>{v(),c.delete(p)}},dispatch(p){var y;try{return i=!((y=p==null?void 0:p.meta)!=null&&y[RR]),l=!i,l&&(o||(o=!0,f(h))),n.dispatch(p)}finally{i=!0}}})},Z9=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new MR(e);return n&&i.push(DR(typeof n=="object"?n:void 0)),i};function J9(e){const t=W9(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:l=void 0,enhancers:o=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(mj(r))c=xR(r);else throw new Error(tn(1));let f;typeof n=="function"?f=n(t):f=t();let h=Kh;i&&(h=Q9({trace:!1,...typeof i=="object"&&i}));const p=M9(...f),y=Z9(p);let v=typeof o=="function"?o(y):y();const x=h(...v);return gR(c,l,x)}function kR(e){const t={},r=[];let n;const i={addCase(l,o){const c=typeof l=="string"?l:l.type;if(!c)throw new Error(tn(28));if(c in t)throw new Error(tn(29));return t[c]=o,i},addAsyncThunk(l,o){return o.pending&&(t[l.pending.type]=o.pending),o.rejected&&(t[l.rejected.type]=o.rejected),o.fulfilled&&(t[l.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:l.settled,reducer:o.settled}),i},addMatcher(l,o){return r.push({matcher:l,reducer:o}),i},addDefaultCase(l){return n=l,i}};return e(i),[t,r,n]}function eq(e){return typeof e=="function"}function tq(e,t){let[r,n,i]=kR(t),l;if(eq(e))l=()=>nA(e());else{const c=nA(e);l=()=>c}function o(c=l(),f){let h=[r[f.type],...n.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[i]),h.reduce((p,y)=>{if(y)if(Va(p)){const x=y(p,f);return x===void 0?p:x}else{if(Bn(p))return TR(p,v=>y(v,f));{const v=y(p,f);if(v===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return p},c)}return o.getInitialState=l,o}var rq="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",nq=(e=21)=>{let t="",r=e;for(;r--;)t+=rq[Math.random()*64|0];return t},aq=Symbol.for("rtk-slice-createasyncthunk");function iq(e,t){return`${e}/${t}`}function sq({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[aq];return function(i){const{name:l,reducerPath:o=l}=i;if(!l)throw new Error(tn(11));const c=(typeof i.reducers=="function"?i.reducers(oq()):i.reducers)||{},f=Object.keys(c),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(A,T){const M=typeof A=="string"?A:A.type;if(!M)throw new Error(tn(12));if(M in h.sliceCaseReducersByType)throw new Error(tn(13));return h.sliceCaseReducersByType[M]=T,p},addMatcher(A,T){return h.sliceMatchers.push({matcher:A,reducer:T}),p},exposeAction(A,T){return h.actionCreators[A]=T,p},exposeCaseReducer(A,T){return h.sliceCaseReducersByName[A]=T,p}};f.forEach(A=>{const T=c[A],M={reducerName:A,type:iq(l,A),createNotation:typeof i.reducers=="function"};cq(T)?fq(M,T,p,t):uq(M,T,p)});function y(){const[A={},T=[],M=void 0]=typeof i.extraReducers=="function"?kR(i.extraReducers):[i.extraReducers],R={...A,...h.sliceCaseReducersByType};return tq(i.initialState,D=>{for(let I in R)D.addCase(I,R[I]);for(let I of h.sliceMatchers)D.addMatcher(I.matcher,I.reducer);for(let I of T)D.addMatcher(I.matcher,I.reducer);M&&D.addDefaultCase(M)})}const v=A=>A,x=new Map,b=new WeakMap;let w;function N(A,T){return w||(w=y()),w(A,T)}function O(){return w||(w=y()),w.getInitialState()}function C(A,T=!1){function M(D){let I=D[A];return typeof I>"u"&&T&&(I=ah(b,M,O)),I}function R(D=v){const I=ah(x,T,()=>new WeakMap);return ah(I,D,()=>{const k={};for(const[H,q]of Object.entries(i.selectors??{}))k[H]=lq(q,D,()=>ah(b,D,O),T);return k})}return{reducerPath:A,getSelectors:R,get selectors(){return R(M)},selectSlice:M}}const E={name:l,reducer:N,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:O,...C(o),injectInto(A,{reducerPath:T,...M}={}){const R=T??o;return A.inject({reducerPath:R,reducer:N},M),{...E,...C(R,!0)}}};return E}}function lq(e,t,r,n){function i(l,...o){let c=t(l);return typeof c>"u"&&n&&(c=r()),e(c,...o)}return i.unwrapped=e,i}var vr=sq();function oq(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function uq({type:e,reducerName:t,createNotation:r},n,i){let l,o;if("reducer"in n){if(r&&!dq(n))throw new Error(tn(17));l=n.reducer,o=n.prepare}else l=n;i.addCase(e,l).exposeCaseReducer(t,l).exposeAction(t,o?nn(e,o):nn(e))}function cq(e){return e._reducerDefinitionType==="asyncThunk"}function dq(e){return e._reducerDefinitionType==="reducerWithPrepare"}function fq({type:e,reducerName:t},r,n,i){if(!i)throw new Error(tn(18));const{payloadCreator:l,fulfilled:o,pending:c,rejected:f,settled:h,options:p}=r,y=i(e,l,p);n.exposeAction(t,y),o&&n.addCase(y.fulfilled,o),c&&n.addCase(y.pending,c),f&&n.addCase(y.rejected,f),h&&n.addMatcher(y.settled,h),n.exposeCaseReducer(t,{fulfilled:o||ih,pending:c||ih,rejected:f||ih,settled:h||ih})}function ih(){}var hq="task",IR="listener",LR="completed",gj="cancelled",mq=`task-${gj}`,pq=`task-${LR}`,Kx=`${IR}-${gj}`,yq=`${IR}-${LR}`,ep=class{constructor(e){eg(this,"name","TaskAbortError");eg(this,"message");this.code=e,this.message=`${hq} ${gj} (reason: ${e})`}},xj=(e,t)=>{if(typeof e!="function")throw new TypeError(tn(32))},Zh=()=>{},$R=(e,t=Zh)=>(e.catch(t),e),zR=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Js=e=>{if(e.aborted)throw new ep(e.reason)};function BR(e,t){let r=Zh;return new Promise((n,i)=>{const l=()=>i(new ep(e.reason));if(e.aborted){l();return}r=zR(e,l),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Zh})}var vq=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof ep?"cancelled":"rejected",error:r}}finally{t==null||t()}},Jh=e=>t=>$R(BR(e,t).then(r=>(Js(e),r))),UR=e=>{const t=Jh(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Oo}=Object,iA={},tp="listenerMiddleware",gq=(e,t)=>{const r=n=>zR(e,()=>n.abort(e.reason));return(n,i)=>{xj(n);const l=new AbortController;r(l);const o=vq(async()=>{Js(e),Js(l.signal);const c=await n({pause:Jh(l.signal),delay:UR(l.signal),signal:l.signal});return Js(l.signal),c},()=>l.abort(pq));return i!=null&&i.autoJoin&&t.push(o.catch(Zh)),{result:Jh(e)(o),cancel(){l.abort(mq)}}}},xq=(e,t)=>{const r=async(n,i)=>{Js(t);let l=()=>{};const c=[new Promise((f,h)=>{let p=e({predicate:n,effect:(y,v)=>{v.unsubscribe(),f([y,v.getState(),v.getOriginalState()])}});l=()=>{p(),h()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await BR(t,Promise.race(c));return Js(t),f}finally{l()}};return(n,i)=>$R(r(n,i))},qR=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:l}=e;if(t)i=nn(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(tn(21));return xj(l),{predicate:i,type:t,effect:l}},HR=Oo(e=>{const{type:t,predicate:r,effect:n}=qR(e);return{id:nq(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(tn(22))}}},{withTypes:()=>HR}),sA=(e,t)=>{const{type:r,effect:n,predicate:i}=qR(t);return Array.from(e.values()).find(l=>(typeof r=="string"?l.type===r:l.predicate===i)&&l.effect===n)},Gx=e=>{e.pending.forEach(t=>{t.abort(Kx)})},bq=(e,t)=>()=>{for(const r of t.keys())Gx(r);e.clear()},lA=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},FR=Oo(nn(`${tp}/add`),{withTypes:()=>FR}),jq=nn(`${tp}/removeAll`),KR=Oo(nn(`${tp}/remove`),{withTypes:()=>KR}),wq=(...e)=>{console.error(`${tp}/error`,...e)},hd=(e={})=>{const t=new Map,r=new Map,n=x=>{const b=r.get(x)??0;r.set(x,b+1)},i=x=>{const b=r.get(x)??1;b===1?r.delete(x):r.set(x,b-1)},{extra:l,onError:o=wq}=e;xj(o);const c=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),b=>{x.unsubscribe(),b!=null&&b.cancelActive&&Gx(x)}),f=x=>{const b=sA(t,x)??HR(x);return c(b)};Oo(f,{withTypes:()=>f});const h=x=>{const b=sA(t,x);return b&&(b.unsubscribe(),x.cancelActive&&Gx(b)),!!b};Oo(h,{withTypes:()=>h});const p=async(x,b,w,N)=>{const O=new AbortController,C=xq(f,O.signal),E=[];try{x.pending.add(O),n(x),await Promise.resolve(x.effect(b,Oo({},w,{getOriginalState:N,condition:(A,T)=>C(A,T).then(Boolean),take:C,delay:UR(O.signal),pause:Jh(O.signal),extra:l,signal:O.signal,fork:gq(O.signal,E),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((A,T,M)=>{A!==O&&(A.abort(Kx),M.delete(A))})},cancel:()=>{O.abort(Kx),x.pending.delete(O)},throwIfCancelled:()=>{Js(O.signal)}})))}catch(A){A instanceof ep||lA(o,A,{raisedBy:"effect"})}finally{await Promise.all(E),O.abort(yq),i(x),x.pending.delete(O)}},y=bq(t,r);return{middleware:x=>b=>w=>{if(!bR(w))return b(w);if(FR.match(w))return f(w.payload);if(jq.match(w)){y();return}if(KR.match(w))return h(w.payload);let N=x.getState();const O=()=>{if(N===iA)throw new Error(tn(23));return N};let C;try{if(C=b(w),t.size>0){const E=x.getState(),A=Array.from(t.values());for(const T of A){let M=!1;try{M=T.predicate(w,E,N)}catch(R){M=!1,lA(o,R,{raisedBy:"predicate"})}M&&p(T,w,x,O)}}}finally{N=iA}return C},startListening:f,stopListening:h,clearListeners:y}};function tn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Sq={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},GR=vr({name:"chartLayout",initialState:Sq,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,l;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(l=t.payload.left)!==null&&l!==void 0?l:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:Nq,setLayout:Oq,setChartSize:_q,setScale:Eq}=GR.actions,Aq=GR.reducer;function YR(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Be(e){return Number.isFinite(e)}function ua(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function oA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oA(Object(r),!0).forEach(function(n){Cq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cq(e,t,r){return(t=Tq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tq(e){var t=Pq(e,"string");return typeof t=="symbol"?t:t+""}function Pq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ot(e,t,r){return mt(e)||mt(t)?r:oa(t)?Fo(e,t,r):typeof t=="function"?t(e):r}var Mq=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:l,verticalAlign:o,layout:c}=t;if((c==="vertical"||c==="horizontal"&&o==="middle")&&l!=="center"&&ye(e[l]))return wo(wo({},e),{},{[l]:e[l]+(n||0)});if((c==="horizontal"||c==="vertical"&&l==="center")&&o!=="middle"&&ye(e[o]))return wo(wo({},e),{},{[o]:e[o]+(i||0)})}return e},Za=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",VR=(e,t,r,n)=>{if(n)return e.map(c=>c.coordinate);var i,l,o=e.map(c=>(c.coordinate===t&&(i=!0),c.coordinate===r&&(l=!0),c.coordinate));return i||o.push(t),l||o.push(r),o},QR=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:l,scale:o,realScaleType:c,isCategorical:f,categoricalDomain:h,tickCount:p,ticks:y,niceTicks:v,axisType:x}=e;if(!o)return null;var b=c==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,w=i==="category"&&o.bandwidth?o.bandwidth()/b:0;if(w=x==="angleAxis"&&l&&l.length>=2?Br(l[0]-l[1])*2*w:w,y||v){var N=(y||v||[]).map((O,C)=>{var E=n?n.indexOf(O):O,A=o.map(E);return Be(A)?{coordinate:A+w,value:O,offset:w,index:C}:null}).filter(Ur);return N}return f&&h?h.map((O,C)=>{var E=o.map(O);return Be(E)?{coordinate:E+w,value:O,index:C,offset:w}:null}).filter(Ur):o.ticks&&p!=null?o.ticks(p).map((O,C)=>{var E=o.map(O);return Be(E)?{coordinate:E+w,value:O,index:C,offset:w}:null}).filter(Ur):o.domain().map((O,C)=>{var E=o.map(O);return Be(E)?{coordinate:E+w,value:n?n[O]:O,index:C,offset:w}:null}).filter(Ur)},Rq=(e,t)=>{if(!t||t.length!==2||!ye(t[0])||!ye(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!ye(e[0])||e[0]<r)&&(i[0]=r),(!ye(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},Dq=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var l=0,o=0,c=0;c<r;++c){var f=e[c],h=f==null?void 0:f[i];if(h!=null){var p=h[1],y=h[0],v=la(p)?y:p;v>=0?(h[0]=l,l+=v,h[1]=l):(h[0]=o,o+=v,h[1]=o)}}}},kq=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var l=0,o=0;o<r;++o){var c=e[o],f=c==null?void 0:c[i];if(f!=null){var h=la(f[1])?f[0]:f[1];h>=0?(f[0]=l,l+=h,f[1]=l):(f[0]=0,f[1]=0)}}}},Iq={sign:Dq,expand:lU,none:al,silhouette:oU,wiggle:uU,positive:kq},Lq=(e,t,r)=>{var n,i=(n=Iq[r])!==null&&n!==void 0?n:al,l=sU().keys(t).value((c,f)=>Number(Ot(c,f,0))).order(kx).offset(i),o=l(e);return o.forEach((c,f)=>{c.forEach((h,p)=>{var y=Ot(e[p],t[f],0);Array.isArray(y)&&y.length===2&&ye(y[0])&&ye(y[1])&&(h[0]=y[0],h[1]=y[1])})}),o};function $q(e){return e==null?void 0:String(e)}function uA(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:l,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!mt(i[t.dataKey])){var c=JM(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r!=null&&r[l]?r[l].coordinate+n/2:null}var f=Ot(i,mt(o)?t.dataKey:o),h=t.scale.map(f);return ye(h)?h:null}var cA=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:l,index:o}=e;if(t.type==="category")return r[o]?r[o].coordinate+n:null;var c=Ot(l,t.dataKey,t.scale.domain()[o]);if(mt(c))return null;var f=t.scale.map(c);return ye(f)?f-i/2+n:null},zq=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},Bq=e=>{var t=e.flat(2).filter(ye);return[Math.min(...t),Math.max(...t)]},Uq=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],qq=(e,t,r)=>{if(e!=null)return Uq(Object.keys(e).reduce((n,i)=>{var l=e[i];if(!l)return n;var{stackedData:o}=l,c=o.reduce((f,h)=>{var p=YR(h,t,r),y=Bq(p);return!Be(y[0])||!Be(y[1])?f:[Math.min(f[0],y[0]),Math.max(f[1],y[1])]},[1/0,-1/0]);return[Math.min(c[0],n[0]),Math.max(c[1],n[1])]},[1/0,-1/0]))},dA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,fA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Go=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=Gm(t,p=>p.coordinate),l=1/0,o=1,c=i.length;o<c;o++){var f=i[o],h=i[o-1];l=Math.min(((f==null?void 0:f.coordinate)||0)-((h==null?void 0:h.coordinate)||0),l)}return l===1/0?0:l}return r?void 0:0};function hA(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:l}=e;return wo(wo({},t),{},{dataKey:r,payload:n,value:i,name:l})}function rp(e,t){if(e)return String(e);if(typeof t=="string")return t}var Hq=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},Fq=(e,t)=>t==="centric"?e.angle:e.radius,Ja=e=>e.layout.width,ei=e=>e.layout.height,Kq=e=>e.layout.scale,XR=e=>e.layout.margin,np=V(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ap=V(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Gq="data-recharts-item-index",Yq="data-recharts-item-id",md=60;function mA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mA(Object(r),!0).forEach(function(n){Vq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vq(e,t,r){return(t=Qq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qq(e){var t=Xq(e,"string");return typeof t=="symbol"?t:t+""}function Xq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wq=e=>e.brush.height;function Zq(e){var t=ap(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:md;return r+i}return r},0)}function Jq(e){var t=ap(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:md;return r+i}return r},0)}function e7(e){var t=np(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function t7(e){var t=np(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Vt=V([Ja,ei,XR,Wq,Zq,Jq,e7,t7,yR,O9],(e,t,r,n,i,l,o,c,f,h)=>{var p={left:(r.left||0)+i,right:(r.right||0)+l},y={top:(r.top||0)+o,bottom:(r.bottom||0)+c},v=sh(sh({},y),p),x=v.bottom;v.bottom+=n,v=Mq(v,f,h);var b=e-v.left-v.right,w=t-v.top-v.bottom;return sh(sh({brushBottom:x},v),{},{width:Math.max(b,0),height:Math.max(w,0)})}),r7=V(Vt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),bj=V(Ja,ei,(e,t)=>({x:0,y:0,width:e,height:t})),n7=S.createContext(null),gr=()=>S.useContext(n7)!=null,ip=e=>e.brush,sp=V([ip,Vt,XR],(e,t,r)=>({height:e.height,x:ye(e.x)?e.x:t.left,y:ye(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:ye(e.width)?e.width:t.width})),v0={},g0={},x0={},pA;function a7(){return pA||(pA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:l}={}){let o,c=null;const f=l!=null&&l.includes("leading"),h=l==null||l.includes("trailing"),p=()=>{c!==null&&(r.apply(o,c),o=void 0,c=null)},y=()=>{h&&p(),w()};let v=null;const x=()=>{v!=null&&clearTimeout(v),v=setTimeout(()=>{v=null,y()},n)},b=()=>{v!==null&&(clearTimeout(v),v=null)},w=()=>{b(),o=void 0,c=null},N=()=>{p()},O=function(...C){if(i!=null&&i.aborted)return;o=this,c=C;const E=v==null;x(),f&&E&&p()};return O.schedule=x,O.cancel=w,O.flush=N,i==null||i.addEventListener("abort",w,{once:!0}),O}e.debounce=t})(x0)),x0}var yA;function i7(){return yA||(yA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=a7();function r(n,i=0,l={}){typeof l!="object"&&(l={});const{leading:o=!1,trailing:c=!0,maxWait:f}=l,h=Array(2);o&&(h[0]="leading"),c&&(h[1]="trailing");let p,y=null;const v=t.debounce(function(...w){p=n.apply(this,w),y=null},i,{edges:h}),x=function(...w){return f!=null&&(y===null&&(y=Date.now()),Date.now()-y>=f)?(p=n.apply(this,w),y=Date.now(),v.cancel(),v.schedule(),p):(v.apply(this,w),p)},b=()=>(v.flush(),p);return x.cancel=v.cancel,x.flush=b,x}e.debounce=r})(g0)),g0}var vA;function s7(){return vA||(vA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=i7();function r(n,i=0,l={}){const{leading:o=!0,trailing:c=!0}=l;return t.debounce(n,i,{leading:o,maxWait:i,trailing:c})}e.throttle=r})(v0)),v0}var b0,gA;function l7(){return gA||(gA=1,b0=s7().throttle),b0}var o7=l7();const u7=as(o7);var em=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),l=2;l<n;l++)i[l-2]=arguments[l];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,()=>i[o++]))}},na={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},WR=(e,t,r)=>{var{width:n=na.width,height:i=na.height,aspect:l,maxHeight:o}=r,c=il(n)?e:Number(n),f=il(i)?t:Number(i);return l&&l>0&&(c?f=c/l:f&&(c=f*l),o&&f!=null&&f>o&&(f=o)),{calculatedWidth:c,calculatedHeight:f}},c7={width:0,height:0,overflow:"visible"},d7={width:0,overflowX:"visible"},f7={height:0,overflowY:"visible"},h7={},m7=e=>{var{width:t,height:r}=e,n=il(t),i=il(r);return n&&i?c7:n?d7:i?f7:h7};function p7(e){var{width:t,height:r,aspect:n}=e,i=t,l=r;return i===void 0&&l===void 0?(i=na.width,l=na.height):i===void 0?i=n&&n>0?void 0:na.width:l===void 0&&(l=n&&n>0?void 0:na.height),{width:i,height:l}}function Yx(){return Yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yx.apply(null,arguments)}function xA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xA(Object(r),!0).forEach(function(n){y7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y7(e,t,r){return(t=v7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v7(e){var t=g7(e,"string");return typeof t=="symbol"?t:t+""}function g7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ZR=S.createContext(na.initialDimension);function x7(e){return ua(e.width)&&ua(e.height)}function JR(e){var{children:t,width:r,height:n}=e,i=S.useMemo(()=>({width:r,height:n}),[r,n]);return x7(i)?S.createElement(ZR.Provider,{value:i},t):null}var jj=()=>S.useContext(ZR),b7=S.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=na.initialDimension,width:i,height:l,minWidth:o=na.minWidth,minHeight:c,maxHeight:f,children:h,debounce:p=na.debounce,id:y,className:v,onResize:x,style:b={}}=e,w=S.useRef(null),N=S.useRef();N.current=x,S.useImperativeHandle(t,()=>w.current);var[O,C]=S.useState({containerWidth:n.width,containerHeight:n.height}),E=S.useCallback((D,I)=>{C(k=>{var H=Math.round(D),q=Math.round(I);return k.containerWidth===H&&k.containerHeight===q?k:{containerWidth:H,containerHeight:q}})},[]);S.useEffect(()=>{if(w.current==null||typeof ResizeObserver>"u")return pl;var D=q=>{var ie,re=q[0];if(re!=null){var{width:W,height:$}=re.contentRect;E(W,$),(ie=N.current)===null||ie===void 0||ie.call(N,W,$)}};p>0&&(D=u7(D,p,{trailing:!0,leading:!1}));var I=new ResizeObserver(D),{width:k,height:H}=w.current.getBoundingClientRect();return E(k,H),I.observe(w.current),()=>{I.disconnect()}},[E,p]);var{containerWidth:A,containerHeight:T}=O;em(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:M,calculatedHeight:R}=WR(A,T,{width:i,height:l,aspect:r,maxHeight:f});return em(M!=null&&M>0||R!=null&&R>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
70
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
71
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
72
|
-
height and width.`,M,R,i,l,o,c,r),S.createElement("div",{id:y?"".concat(y):void 0,className:Xe("recharts-responsive-container",v),style:bA(bA({},b),{},{width:i,height:l,minWidth:o,minHeight:c,maxHeight:f}),ref:w},S.createElement("div",{style:m7({width:i,height:l})},S.createElement(JR,{width:M,height:R},h)))}),wj=S.forwardRef((e,t)=>{var r=jj();if(ua(r.width)&&ua(r.height))return e.children;var{width:n,height:i}=p7({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:l,calculatedHeight:o}=WR(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return ye(l)&&ye(o)?S.createElement(JR,{width:l,height:o},e.children):S.createElement(b7,Yx({},e,{width:n,height:i,ref:t}))});function Sj(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var lp=()=>{var e,t=gr(),r=ge(r7),n=ge(sp),i=(e=ge(ip))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},j7={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},e3=()=>{var e;return(e=ge(Vt))!==null&&e!==void 0?e:j7},Nj=()=>ge(Ja),Oj=()=>ge(ei),w7=()=>ge(e=>e.layout.margin),We=e=>e.layout.layoutType,yl=()=>ge(We),t3=()=>{var e=yl();if(e==="horizontal"||e==="vertical")return e},r3=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},S7=()=>{var e=yl();return e!==void 0},pd=e=>{var t=ct(),r=gr(),{width:n,height:i}=e,l=jj(),o=n,c=i;return l&&(o=l.width>0?l.width:n,c=l.height>0?l.height:i),S.useEffect(()=>{!r&&ua(o)&&ua(c)&&t(_q({width:o,height:c}))},[t,r,o,c]),null},n3=Symbol.for("immer-nothing"),jA=Symbol.for("immer-draftable"),an=Symbol.for("immer-state");function Dn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fc=Object.getPrototypeOf;function Yo(e){return!!e&&!!e[an]}function ll(e){var t;return e?a3(e)||Array.isArray(e)||!!e[jA]||!!((t=e.constructor)!=null&&t[jA])||yd(e)||up(e):!1}var N7=Object.prototype.constructor.toString(),wA=new WeakMap;function a3(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=wA.get(r);return n===void 0&&(n=Function.toString.call(r),wA.set(r,n)),n===N7}function tm(e,t,r=!0){op(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function op(e){const t=e[an];return t?t.type_:Array.isArray(e)?1:yd(e)?2:up(e)?3:0}function Vx(e,t){return op(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function i3(e,t,r){const n=op(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function O7(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function yd(e){return e instanceof Map}function up(e){return e instanceof Set}function Ps(e){return e.copy_||e.base_}function Qx(e,t){if(yd(e))return new Map(e);if(up(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=a3(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[an];let i=Reflect.ownKeys(n);for(let l=0;l<i.length;l++){const o=i[l],c=n[o];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[o]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[o]})}return Object.create(Fc(e),n)}else{const n=Fc(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function _j(e,t=!1){return cp(e)||Yo(e)||!ll(e)||(op(e)>1&&Object.defineProperties(e,{set:lh,add:lh,clear:lh,delete:lh}),Object.freeze(e),t&&Object.values(e).forEach(r=>_j(r,!0))),e}function _7(){Dn(2)}var lh={value:_7};function cp(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var E7={};function ol(e){const t=E7[e];return t||Dn(0,e),t}var Kc;function s3(){return Kc}function A7(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function SA(e,t){t&&(ol("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Xx(e){Wx(e),e.drafts_.forEach(C7),e.drafts_=null}function Wx(e){e===Kc&&(Kc=e.parent_)}function NA(e){return Kc=A7(Kc,e)}function C7(e){const t=e[an];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function OA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[an].modified_&&(Xx(t),Dn(4)),ll(e)&&(e=rm(t,e),t.parent_||nm(t,e)),t.patches_&&ol("Patches").generateReplacementPatches_(r[an].base_,e,t.patches_,t.inversePatches_)):e=rm(t,r,[]),Xx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==n3?e:void 0}function rm(e,t,r){if(cp(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[an];if(!i)return tm(t,(l,o)=>_A(e,i,t,l,o,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return nm(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const l=i.copy_;let o=l,c=!1;i.type_===3&&(o=new Set(l),l.clear(),c=!0),tm(o,(f,h)=>_A(e,i,l,f,h,r,c),n),nm(e,l,!1),r&&e.patches_&&ol("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function _A(e,t,r,n,i,l,o){if(i==null||typeof i!="object"&&!o)return;const c=cp(i);if(!(c&&!o)){if(Yo(i)){const f=l&&t&&t.type_!==3&&!Vx(t.assigned_,n)?l.concat(n):void 0,h=rm(e,i,f);if(i3(r,n,h),Yo(h))e.canAutoFreeze_=!1;else return}else o&&r.add(i);if(ll(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&c)return;rm(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(yd(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&nm(e,i)}}}function nm(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&_j(t,r)}function T7(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:s3(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,l=Ej;r&&(i=[n],l=Gc);const{revoke:o,proxy:c}=Proxy.revocable(i,l);return n.draft_=c,n.revoke_=o,c}var Ej={get(e,t){if(t===an)return e;const r=Ps(e);if(!Vx(r,t))return P7(e,r,t);const n=r[t];return e.finalized_||!ll(n)?n:n===j0(e.base_,t)?(w0(e),e.copy_[t]=Jx(n,e)):n},has(e,t){return t in Ps(e)},ownKeys(e){return Reflect.ownKeys(Ps(e))},set(e,t,r){const n=l3(Ps(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=j0(Ps(e),t),l=i==null?void 0:i[an];if(l&&l.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(O7(r,i)&&(r!==void 0||Vx(e.base_,t)))return!0;w0(e),Zx(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return j0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,w0(e),Zx(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ps(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Dn(11)},getPrototypeOf(e){return Fc(e.base_)},setPrototypeOf(){Dn(12)}},Gc={};tm(Ej,(e,t)=>{Gc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Gc.deleteProperty=function(e,t){return Gc.set.call(this,e,t,void 0)};Gc.set=function(e,t,r){return Ej.set.call(this,e[0],t,r,e[0])};function j0(e,t){const r=e[an];return(r?Ps(r):e)[t]}function P7(e,t,r){var i;const n=l3(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function l3(e,t){if(!(t in e))return;let r=Fc(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Fc(r)}}function Zx(e){e.modified_||(e.modified_=!0,e.parent_&&Zx(e.parent_))}function w0(e){e.copy_||(e.copy_=Qx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var M7=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const l=r;r=t;const o=this;return function(f=l,...h){return o.produce(f,p=>r.call(this,p,...h))}}typeof r!="function"&&Dn(6),n!==void 0&&typeof n!="function"&&Dn(7);let i;if(ll(t)){const l=NA(this),o=Jx(t,void 0);let c=!0;try{i=r(o),c=!1}finally{c?Xx(l):Wx(l)}return SA(l,n),OA(i,l)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===n3&&(i=void 0),this.autoFreeze_&&_j(i,!0),n){const l=[],o=[];ol("Patches").generateReplacementPatches_(t,i,l,o),n(l,o)}return i}else Dn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(o,...c)=>this.produceWithPatches(o,f=>t(f,...c));let n,i;return[this.produce(t,r,(o,c)=>{n=o,i=c}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ll(e)||Dn(8),Yo(e)&&(e=R7(e));const t=NA(this),r=Jx(e,void 0);return r[an].isManual_=!0,Wx(t),r}finishDraft(e,t){const r=e&&e[an];(!r||!r.isManual_)&&Dn(9);const{scope_:n}=r;return SA(n,t),OA(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=ol("Patches").applyPatches_;return Yo(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Jx(e,t){const r=yd(e)?ol("MapSet").proxyMap_(e,t):up(e)?ol("MapSet").proxySet_(e,t):T7(e,t);return(t?t.scope_:s3()).drafts_.push(r),r}function R7(e){return Yo(e)||Dn(10,e),o3(e)}function o3(e){if(!ll(e)||cp(e))return e;const t=e[an];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Qx(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Qx(e,!0);return tm(r,(i,l)=>{i3(r,i,o3(l))},n),t&&(t.finalized_=!1),r}var D7=new M7;D7.produce;var k7={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},u3=vr({name:"legend",initialState:k7,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:lt()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sn(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:lt()},removeLegendPayload:{reducer(e,t){var r=Sn(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:lt()}}}),{setLegendSize:EA,setLegendSettings:I7,addLegendPayload:L7,replaceLegendPayload:$7,removeLegendPayload:z7}=u3.actions,B7=u3.reducer,S0={exports:{}},N0={};/**
|
|
73
|
-
* @license React
|
|
74
|
-
* use-sync-external-store-with-selector.production.js
|
|
75
|
-
*
|
|
76
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the MIT license found in the
|
|
79
|
-
* LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/var AA;function U7(){if(AA)return N0;AA=1;var e=ru();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,l=e.useEffect,o=e.useMemo,c=e.useDebugValue;return N0.useSyncExternalStoreWithSelector=function(f,h,p,y,v){var x=i(null);if(x.current===null){var b={hasValue:!1,value:null};x.current=b}else b=x.current;x=o(function(){function N(T){if(!O){if(O=!0,C=T,T=y(T),v!==void 0&&b.hasValue){var M=b.value;if(v(M,T))return E=M}return E=T}if(M=E,r(C,T))return M;var R=y(T);return v!==void 0&&v(M,R)?(C=T,M):(C=T,E=R)}var O=!1,C,E,A=p===void 0?null:p;return[function(){return N(h())},A===null?void 0:function(){return N(A())}]},[h,p,y,v]);var w=n(f,x[0],x[1]);return l(function(){b.hasValue=!0,b.value=w},[w]),c(w),w},N0}var CA;function q7(){return CA||(CA=1,S0.exports=U7()),S0.exports}q7();function H7(e){e()}function F7(){let e=null,t=null;return{clear(){e=null,t=null},notify(){H7(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var TA={notify(){},get:()=>[]};function K7(e,t){let r,n=TA,i=0,l=!1;function o(w){p();const N=n.subscribe(w);let O=!1;return()=>{O||(O=!0,N(),y())}}function c(){n.notify()}function f(){b.onStateChange&&b.onStateChange()}function h(){return l}function p(){i++,r||(r=e.subscribe(f),n=F7())}function y(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=TA)}function v(){l||(l=!0,p())}function x(){l&&(l=!1,y())}const b={addNestedSub:o,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:x,getListeners:()=>n};return b}var G7=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Y7=G7(),V7=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Q7=V7(),X7=()=>Y7||Q7?S.useLayoutEffect:S.useEffect,W7=X7();function PA(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Z7(e,t){if(PA(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!PA(e[r[i]],t[r[i]]))return!1;return!0}var O0=Symbol.for("react-redux-context"),_0=typeof globalThis<"u"?globalThis:{};function J7(){if(!S.createContext)return{};const e=_0[O0]??(_0[O0]=new Map);let t=e.get(S.createContext);return t||(t=S.createContext(null),e.set(S.createContext,t)),t}var eH=J7();function tH(e){const{children:t,context:r,serverState:n,store:i}=e,l=S.useMemo(()=>{const f=K7(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),o=S.useMemo(()=>i.getState(),[i]);W7(()=>{const{subscription:f}=l;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),o!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[l,o]);const c=r||eH;return S.createElement(c.Provider,{value:l},t)}var rH=tH,nH=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function aH(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function au(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(nH.has(n)){if(e[n]==null&&t[n]==null)continue;if(!Z7(e[n],t[n]))return!1}else if(!aH(e[n],t[n]))return!1;return!0}var iH=["contextPayload"];function eb(){return eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},eb.apply(null,arguments)}function MA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MA(Object(r),!0).forEach(function(n){sH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sH(e,t,r){return(t=lH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lH(e){var t=oH(e,"string");return typeof t=="symbol"?t:t+""}function oH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uH(e,t){if(e==null)return{};var r,n,i=cH(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function cH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function dH(e){return e.value}function fH(e){var{contextPayload:t}=e,r=uH(e,iH),n=fR(t,e.payloadUniqBy,dH),i=Vo(Vo({},r),{},{payload:n});return S.isValidElement(e.content)?S.cloneElement(e.content,i):typeof e.content=="function"?S.createElement(e.content,i):S.createElement($U,i)}function hH(e,t,r,n,i,l){var{layout:o,align:c,verticalAlign:f}=t,h,p;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(c==="center"&&o==="vertical"?h={left:((n||0)-l.width)/2}:h=c==="right"?{right:r&&r.right||0}:{left:r&&r.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(f==="middle"?p={top:((i||0)-l.height)/2}:p=f==="bottom"?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),Vo(Vo({},h),p)}function mH(e){var t=ct();return S.useEffect(()=>{t(I7(e))},[t,e]),null}function pH(e){var t=ct();return S.useEffect(()=>(t(EA(e)),()=>{t(EA({width:0,height:0}))}),[t,e]),null}function yH(e,t,r,n){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:r||n}:null}var vH={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function gH(e){var t=or(e,vH),r=A9(),n=T6(),i=w7(),{width:l,height:o,wrapperStyle:c,portal:f}=t,[h,p]=vR([r]),y=Nj(),v=Oj();if(y==null||v==null)return null;var x=y-((i==null?void 0:i.left)||0)-((i==null?void 0:i.right)||0),b=yH(t.layout,o,l,x),w=f?c:Vo(Vo({position:"absolute",width:(b==null?void 0:b.width)||l||"auto",height:(b==null?void 0:b.height)||o||"auto"},hH(c,t,i,y,v,h)),c),N=f??n;if(N==null||r==null)return null;var O=S.createElement("div",{className:"recharts-legend-wrapper",style:w,ref:p},S.createElement(mH,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!f&&S.createElement(pH,{width:h.width,height:h.height}),S.createElement(fH,eb({},t,b,{margin:i,chartWidth:y,chartHeight:v,contextPayload:r})));return $m.createPortal(O,N)}var c3=S.memo(gH,au);c3.displayName="Legend";function tb(){return tb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tb.apply(null,arguments)}function RA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RA(Object(r),!0).forEach(function(n){xH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xH(e,t,r){return(t=bH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bH(e){var t=jH(e,"string");return typeof t=="symbol"?t:t+""}function jH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wH(e){return Array.isArray(e)&&oa(e[0])&&oa(e[1])?e.join(" ~ "):e}var uo={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function SH(e,t){return t==null?e:Gm(e,t)}var NH=e=>{var{separator:t=uo.separator,contentStyle:r,itemStyle:n,labelStyle:i=uo.labelStyle,payload:l,formatter:o,itemSorter:c,wrapperClassName:f,labelClassName:h,label:p,labelFormatter:y,accessibilityLayer:v=uo.accessibilityLayer}=e,x=()=>{if(l&&l.length){var T={padding:0,margin:0},M=SH(l,c),R=M.map((D,I)=>{if(!D||D.type==="none")return null;var k=D.formatter||o||wH,{value:H,name:q}=D,ie=H,re=q;if(k){var W=k(H,q,D,I,l);if(Array.isArray(W))[ie,re]=W;else if(W!=null)ie=W;else return null}var $=hc(hc({},uo.itemStyle),{},{color:D.color||uo.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(I),style:$},oa(re)?S.createElement("span",{className:"recharts-tooltip-item-name"},re):null,oa(re)?S.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,S.createElement("span",{className:"recharts-tooltip-item-value"},ie),S.createElement("span",{className:"recharts-tooltip-item-unit"},D.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:T},R)}return null},b=hc(hc({},uo.contentStyle),r),w=hc({margin:0},i),N=!mt(p),O=N?p:"",C=Xe("recharts-default-tooltip",f),E=Xe("recharts-tooltip-label",h);N&&y&&l!==void 0&&l!==null&&(O=y(p,l));var A=v?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",tb({className:C,style:b},A),S.createElement("p",{className:E,style:w},S.isValidElement(O)?O:"".concat(O)),x())},mc="recharts-tooltip-wrapper",OH={visibility:"hidden"};function _H(e){var{coordinate:t,translateX:r,translateY:n}=e;return Xe(mc,{["".concat(mc,"-right")]:ye(r)&&t&&ye(t.x)&&r>=t.x,["".concat(mc,"-left")]:ye(r)&&t&&ye(t.x)&&r<t.x,["".concat(mc,"-bottom")]:ye(n)&&t&&ye(t.y)&&n>=t.y,["".concat(mc,"-top")]:ye(n)&&t&&ye(t.y)&&n<t.y})}function DA(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:l,reverseDirection:o,tooltipDimension:c,viewBox:f,viewBoxDimension:h}=e;if(l&&ye(l[n]))return l[n];var p=r[n]-c-(i>0?i:0),y=r[n]+i;if(t[n])return o[n]?p:y;var v=f[n];if(v==null)return 0;if(o[n]){var x=p,b=v;return x<b?Math.max(y,v):Math.max(p,v)}if(h==null)return 0;var w=y+c,N=v+h;return w>N?Math.max(p,v):Math.max(y,v)}function EH(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function AH(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:i,position:l,reverseDirection:o,tooltipBox:c,useTranslate3d:f,viewBox:h}=e,p,y,v;return c.height>0&&c.width>0&&r?(y=DA({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:l,reverseDirection:o,tooltipDimension:c.width,viewBox:h,viewBoxDimension:h.width}),v=DA({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:l,reverseDirection:o,tooltipDimension:c.height,viewBox:h,viewBoxDimension:h.height}),p=EH({translateX:y,translateY:v,useTranslate3d:f})):p=OH,{cssProperties:p,cssClasses:_H({translateX:y,translateY:v,coordinate:r})}}var CH=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),vd={isSsr:CH()};function d3(){var[e,t]=S.useState(()=>vd.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return S.useEffect(()=>{if(window.matchMedia){var r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(r.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}}},[]),e}function kA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kA(Object(r),!0).forEach(function(n){TH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TH(e,t,r){return(t=PH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PH(e){var t=MH(e,"string");return typeof t=="symbol"?t:t+""}function MH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RH(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function DH(e){var t,r,n,i,l,o,c=d3(),[f,h]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var b=w=>{if(w.key==="Escape"){var N,O,C,E;h({dismissed:!0,dismissedAtCoordinate:{x:(N=(O=e.coordinate)===null||O===void 0?void 0:O.x)!==null&&N!==void 0?N:0,y:(C=(E=e.coordinate)===null||E===void 0?void 0:E.y)!==null&&C!==void 0?C:0}})}};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),f.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==f.dismissedAtCoordinate.x||((l=(o=e.coordinate)===null||o===void 0?void 0:o.y)!==null&&l!==void 0?l:0)!==f.dismissedAtCoordinate.y)&&h(co(co({},f),{},{dismissed:!1}));var{cssClasses:p,cssProperties:y}=AH({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),v=e.hasPortalFromProps?{}:co(co({transition:RH({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},y),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),x=co(co({},v),{},{visibility:!f.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return S.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:p,style:x,ref:e.innerRef},e.children)}var kH=S.memo(DH),f3=()=>{var e;return(e=ge(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function rb(){return rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rb.apply(null,arguments)}function IA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function LA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IA(Object(r),!0).forEach(function(n){IH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IH(e,t,r){return(t=LH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LH(e){var t=$H(e,"string");return typeof t=="symbol"?t:t+""}function $H(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $A={curveBasisClosed:Q6,curveBasisOpen:X6,curveBasis:V6,curveBumpX:D6,curveBumpY:k6,curveLinearClosed:W6,curveLinear:Hm,curveMonotoneX:Z6,curveMonotoneY:J6,curveNatural:eU,curveStep:tU,curveStepAfter:nU,curveStepBefore:rU},am=e=>Be(e.x)&&Be(e.y),zA=e=>e.base!=null&&am(e.base)&&am(e),pc=e=>e.x,yc=e=>e.y,zH=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(dd(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=$A["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return $A[r]||Hm},BA={connectNulls:!1,type:"linear"},BH=e=>{var{type:t=BA.type,points:r=[],baseLine:n,layout:i,connectNulls:l=BA.connectNulls}=e,o=zH(t,i),c=l?r.filter(am):r;if(Array.isArray(n)){var f,h=r.map((b,w)=>LA(LA({},b),{},{base:n[w]}));i==="vertical"?f=eh().y(yc).x1(pc).x0(b=>b.base.x):f=eh().x(pc).y1(yc).y0(b=>b.base.y);var p=f.defined(zA).curve(o),y=l?h.filter(zA):h;return p(y)}var v;i==="vertical"&&ye(n)?v=eh().y(yc).x1(pc).x0(n):ye(n)?v=eh().x(pc).y1(yc).y0(n):v=BM().x(pc).y(yc);var x=v.defined(am).curve(o);return x(c)},h3=e=>{var{className:t,points:r,path:n,pathRef:i}=e,l=yl();if((!r||!r.length)&&!n)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||l,connectNulls:e.connectNulls},c=r&&r.length?BH(o):n;return S.createElement("path",rb({},$n(e),dj(e),{className:Xe("recharts-curve",t),d:c===null?void 0:c,ref:i}))},UH=["x","y","top","left","width","height","className"];function nb(){return nb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nb.apply(null,arguments)}function UA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qH(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UA(Object(r),!0).forEach(function(n){HH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HH(e,t,r){return(t=FH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FH(e){var t=KH(e,"string");return typeof t=="symbol"?t:t+""}function KH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GH(e,t){if(e==null)return{};var r,n,i=YH(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function YH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var VH=(e,t,r,n,i,l)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(l,",").concat(t,"h").concat(r),QH=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:l=0,height:o=0,className:c}=e,f=GH(e,UH),h=qH({x:t,y:r,top:n,left:i,width:l,height:o},f);return!ye(t)||!ye(r)||!ye(l)||!ye(o)||!ye(n)||!ye(i)?null:S.createElement("path",nb({},Or(h),{className:Xe("recharts-cross",c),d:VH(t,r,l,o,n,i)}))};function XH(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function qA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function HA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qA(Object(r),!0).forEach(function(n){WH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WH(e,t,r){return(t=ZH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZH(e){var t=JH(e,"string");return typeof t=="symbol"?t:t+""}function JH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eF=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),m3=(e,t,r)=>e.map(n=>"".concat(eF(n)," ").concat(t,"ms ").concat(r)).join(","),tF=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),Yc=(e,t)=>Object.keys(t).reduce((r,n)=>HA(HA({},r),{},{[n]:e(n,t[n])}),{});function FA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FA(Object(r),!0).forEach(function(n){rF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rF(e,t,r){return(t=nF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nF(e){var t=aF(e,"string");return typeof t=="symbol"?t:t+""}function aF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var im=(e,t,r)=>e+(t-e)*r,ab=e=>{var{from:t,to:r}=e;return t!==r},p3=(e,t,r)=>{var n=Yc((i,l)=>{if(ab(l)){var[o,c]=e(l.from,l.to,l.velocity);return Lt(Lt({},l),{},{from:o,velocity:c})}return l},t);return r<1?Yc((i,l)=>ab(l)&&n[i]!=null?Lt(Lt({},l),{},{velocity:im(l.velocity,n[i].velocity,r),from:im(l.from,n[i].from,r)}):l,t):p3(e,n,r-1)};function iF(e,t,r,n,i,l){var o,c=n.reduce((v,x)=>Lt(Lt({},v),{},{[x]:{from:e[x],velocity:0,to:t[x]}}),{}),f=()=>Yc((v,x)=>x.from,c),h=()=>!Object.values(c).filter(ab).length,p=null,y=v=>{o||(o=v);var x=v-o,b=x/r.dt;c=p3(r,c,b),i(Lt(Lt(Lt({},e),t),f())),o=v,h()||(p=l.setTimeout(y))};return()=>(p=l.setTimeout(y),()=>{var v;(v=p)===null||v===void 0||v()})}function sF(e,t,r,n,i,l,o){var c=null,f=i.reduce((y,v)=>{var x=e[v],b=t[v];return x==null||b==null?y:Lt(Lt({},y),{},{[v]:[x,b]})},{}),h,p=y=>{h||(h=y);var v=(y-h)/n,x=Yc((w,N)=>im(...N,r(v)),f);if(l(Lt(Lt(Lt({},e),t),x)),v<1)c=o.setTimeout(p);else{var b=Yc((w,N)=>im(...N,r(1)),f);l(Lt(Lt(Lt({},e),t),b))}};return()=>(c=o.setTimeout(p),()=>{var y;(y=c)===null||y===void 0||y()})}const lF=(e,t,r,n,i,l)=>{var o=tF(e,t);return r==null?()=>(i(Lt(Lt({},e),t)),()=>{}):r.isStepper===!0?iF(e,t,r,o,i,l):sF(e,t,r,n,o,i,l)};var sm=1e-4,y3=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],v3=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),KA=(e,t)=>r=>{var n=y3(e,t);return v3(n,r)},oF=(e,t)=>r=>{var n=y3(e,t),i=[...n.map((l,o)=>l*o).slice(1),0];return v3(i,r)},uF=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var i=n.map(l=>parseFloat(l));return[i[0],i[1],i[2],i[3]]},cF=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=uF(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},dF=(e,t,r,n)=>{var i=KA(e,r),l=KA(t,n),o=oF(e,r),c=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,y=p,v=0;v<8;++v){var x=i(y)-p,b=o(y);if(Math.abs(x-p)<sm||b<sm)return l(y);y=c(y-x/b)}return l(y)};return f.isStepper=!1,f},GA=function(){return dF(...cF(...arguments))},fF=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,l=(o,c,f)=>{var h=-(o-c)*r,p=f*n,y=f+(h-p)*i/1e3,v=f*i/1e3+o;return Math.abs(v-c)<sm&&Math.abs(y)<sm?[c,0]:[v,y]};return l.isStepper=!0,l.dt=i,l},hF=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return GA(e);case"spring":return fF();default:if(e.split("(")[0]==="cubic-bezier")return GA(e)}return typeof e=="function"?e:null};function mF(e){var t,r=()=>null,n=!1,i=null,l=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var c=o,[f,...h]=c;if(typeof f=="number"){i=e.setTimeout(l.bind(null,h),f);return}l(f),i=e.setTimeout(l.bind(null,h));return}typeof o=="string"&&(t=o,r(t)),typeof o=="object"&&(t=o,r(t)),typeof o=="function"&&o()}};return{stop:()=>{n=!0},start:o=>{n=!1,i&&(i(),i=null),l(o)},subscribe:o=>(r=o,()=>{r=()=>null}),getTimeoutController:()=>e}}class pF{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,l=o=>{o-n>=r?t(o):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(l))};return i=requestAnimationFrame(l),()=>{i!=null&&cancelAnimationFrame(i)}}}function yF(){return mF(new pF)}var vF=S.createContext(yF);function gF(e,t){var r=S.useContext(vF);return S.useMemo(()=>t??r(e),[e,t,r])}var xF={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},YA={t:0},E0={t:1};function dp(e){var t=or(e,xF),{isActive:r,canBegin:n,duration:i,easing:l,begin:o,onAnimationEnd:c,onAnimationStart:f,children:h}=t,p=d3(),y=r==="auto"?!vd.isSsr&&!p:r,v=gF(t.animationId,t.animationManager),[x,b]=S.useState(y?YA:E0),w=S.useRef(null);return S.useEffect(()=>{y||b(E0)},[y]),S.useEffect(()=>{if(!y||!n)return pl;var N=lF(YA,E0,hF(l),i,b,v.getTimeoutController()),O=()=>{w.current=N()};return v.start([f,o,O,i,c]),()=>{v.stop(),w.current&&w.current(),c()}},[y,n,i,l,o,f,c,v]),h(x.t)}function fp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=S.useRef(Bc(t)),n=S.useRef(e);return n.current!==e&&(r.current=Bc(t),n.current=e),r.current}var bF=["radius"],jF=["radius"],VA,QA,XA,WA,ZA,JA,eC,tC,rC,nC;function aC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function iC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aC(Object(r),!0).forEach(function(n){wF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wF(e,t,r){return(t=SF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SF(e){var t=NF(e,"string");return typeof t=="symbol"?t:t+""}function NF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lm(){return lm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lm.apply(null,arguments)}function sC(e,t){if(e==null)return{};var r,n,i=OF(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function OF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Qn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var lC=(e,t,r,n,i)=>{var l=Qi(r),o=Qi(n),c=Math.min(Math.abs(l)/2,Math.abs(o)/2),f=o>=0?1:-1,h=l>=0?1:-1,p=o>=0&&l>=0||o<0&&l<0?1:0,y;if(c>0&&Array.isArray(i)){for(var v=[0,0,0,0],x=0,b=4;x<b;x++){var w,N=(w=i[x])!==null&&w!==void 0?w:0;v[x]=N>c?c:N}y=bt(VA||(VA=Qn(["M",",",""])),e,t+f*v[0]),v[0]>0&&(y+=bt(QA||(QA=Qn(["A ",",",",0,0,",",",",",""])),v[0],v[0],p,e+h*v[0],t)),y+=bt(XA||(XA=Qn(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(y+=bt(WA||(WA=Qn(["A ",",",",0,0,",`,
|
|
81
|
-
`,",",""])),v[1],v[1],p,e+r,t+f*v[1])),y+=bt(ZA||(ZA=Qn(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(y+=bt(JA||(JA=Qn(["A ",",",",0,0,",`,
|
|
82
|
-
`,",",""])),v[2],v[2],p,e+r-h*v[2],t+n)),y+=bt(eC||(eC=Qn(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(y+=bt(tC||(tC=Qn(["A ",",",",0,0,",`,
|
|
83
|
-
`,",",""])),v[3],v[3],p,e,t+n-f*v[3])),y+="Z"}else if(c>0&&i===+i&&i>0){var O=Math.min(c,i);y=bt(rC||(rC=Qn(["M ",",",`
|
|
84
|
-
A `,",",",0,0,",",",",",`
|
|
85
|
-
L `,",",`
|
|
86
|
-
A `,",",",0,0,",",",",",`
|
|
87
|
-
L `,",",`
|
|
88
|
-
A `,",",",0,0,",",",",",`
|
|
89
|
-
L `,",",`
|
|
90
|
-
A `,",",",0,0,",",",","," Z"])),e,t+f*O,O,O,p,e+h*O,t,e+r-h*O,t,O,O,p,e+r,t+f*O,e+r,t+n-f*O,O,O,p,e+r-h*O,t+n,e+h*O,t+n,O,O,p,e,t+n-f*O)}else y=bt(nC||(nC=Qn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return y},oC={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},g3=e=>{var t=or(e,oC),r=S.useRef(null),[n,i]=S.useState(-1);S.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var F=r.current.getTotalLength();F&&i(F)}catch{}},[]);var{x:l,y:o,width:c,height:f,radius:h,className:p}=t,{animationEasing:y,animationDuration:v,animationBegin:x,isAnimationActive:b,isUpdateAnimationActive:w}=t,N=S.useRef(c),O=S.useRef(f),C=S.useRef(l),E=S.useRef(o),A=S.useMemo(()=>({x:l,y:o,width:c,height:f,radius:h}),[l,o,c,f,h]),T=fp(A,"rectangle-");if(l!==+l||o!==+o||c!==+c||f!==+f||c===0||f===0)return null;var M=Xe("recharts-rectangle",p);if(!w){var R=Or(t),{radius:D}=R,I=sC(R,bF);return S.createElement("path",lm({},I,{x:Qi(l),y:Qi(o),width:Qi(c),height:Qi(f),radius:typeof h=="number"?h:void 0,className:M,d:lC(l,o,c,f,h)}))}var k=N.current,H=O.current,q=C.current,ie=E.current,re="0px ".concat(n===-1?1:n,"px"),W="".concat(n,"px ").concat(n,"px"),$=m3(["strokeDasharray"],v,typeof y=="string"?y:oC.animationEasing);return S.createElement(dp,{animationId:T,key:T,canBegin:n>0,duration:v,easing:y,isActive:w,begin:x},F=>{var J=jt(k,c,F),ne=jt(H,f,F),ce=jt(q,l,F),L=jt(ie,o,F);r.current&&(N.current=J,O.current=ne,C.current=ce,E.current=L);var X;b?F>0?X={transition:$,strokeDasharray:W}:X={strokeDasharray:re}:X={strokeDasharray:W};var le=Or(t),{radius:oe}=le,he=sC(le,jF);return S.createElement("path",lm({},he,{radius:typeof h=="number"?h:void 0,className:M,d:lC(ce,L,J,ne,h),ref:r,style:iC(iC({},X),t.style)}))})};function uC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uC(Object(r),!0).forEach(function(n){_F(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _F(e,t,r){return(t=EF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EF(e){var t=AF(e,"string");return typeof t=="symbol"?t:t+""}function AF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var om=Math.PI/180,CF=e=>e*180/Math.PI,sr=(e,t,r,n)=>({x:e+Math.cos(-om*n)*r,y:t+Math.sin(-om*n)*r}),TF=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},PF=(e,t)=>{var{x:r,y:n}=e,{x:i,y:l}=t;return Math.sqrt((r-i)**2+(n-l)**2)},MF=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:l}=t,o=PF({x:r,y:n},{x:i,y:l});if(o<=0)return{radius:o,angle:0};var c=(r-i)/o,f=Math.acos(c);return n>l&&(f=2*Math.PI-f),{radius:o,angle:CF(f),angleInRadian:f}},RF=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),l=Math.min(n,i);return{startAngle:t-l*360,endAngle:r-l*360}},DF=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),l=Math.floor(n/360),o=Math.min(i,l);return e+o*360},kF=(e,t)=>{var{relativeX:r,relativeY:n}=e,{radius:i,angle:l}=MF({x:r,y:n},t),{innerRadius:o,outerRadius:c}=t;if(i<o||i>c||i===0)return null;var{startAngle:f,endAngle:h}=RF(t),p=l,y;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;y=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;y=p>=h&&p<=f}return y?cC(cC({},t),{},{radius:i,angle:DF(p,t)}):null};function x3(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:l}=e,o=sr(t,r,n,i),c=sr(t,r,n,l);return{points:[o,c],cx:t,cy:r,radius:n,startAngle:i,endAngle:l}}var dC,fC,hC,mC,pC,yC,vC;function ib(){return ib=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ib.apply(null,arguments)}function Is(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var IF=(e,t)=>{var r=Br(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},oh=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:l,isExternal:o,cornerRadius:c,cornerIsExternal:f}=e,h=c*(o?1:-1)+n,p=Math.asin(c/h)/om,y=f?i:i+l*p,v=sr(t,r,h,y),x=sr(t,r,n,y),b=f?i-l*p:i,w=sr(t,r,h*Math.cos(p*om),b);return{center:v,circleTangency:x,lineTangency:w,theta:p}},b3=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:l,endAngle:o}=e,c=IF(l,o),f=l+c,h=sr(t,r,i,l),p=sr(t,r,i,f),y=bt(dC||(dC=Is(["M ",",",`
|
|
91
|
-
A `,",",`,0,
|
|
92
|
-
`,",",`,
|
|
93
|
-
`,",",`
|
|
94
|
-
`])),h.x,h.y,i,i,+(Math.abs(c)>180),+(l>f),p.x,p.y);if(n>0){var v=sr(t,r,n,l),x=sr(t,r,n,f);y+=bt(fC||(fC=Is(["L ",",",`
|
|
95
|
-
A `,",",`,0,
|
|
96
|
-
`,",",`,
|
|
97
|
-
`,","," Z"])),x.x,x.y,n,n,+(Math.abs(c)>180),+(l<=f),v.x,v.y)}else y+=bt(hC||(hC=Is(["L ",","," Z"])),t,r);return y},LF=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:l,forceCornerRadius:o,cornerIsExternal:c,startAngle:f,endAngle:h}=e,p=Br(h-f),{circleTangency:y,lineTangency:v,theta:x}=oh({cx:t,cy:r,radius:i,angle:f,sign:p,cornerRadius:l,cornerIsExternal:c}),{circleTangency:b,lineTangency:w,theta:N}=oh({cx:t,cy:r,radius:i,angle:h,sign:-p,cornerRadius:l,cornerIsExternal:c}),O=c?Math.abs(f-h):Math.abs(f-h)-x-N;if(O<0)return o?bt(mC||(mC=Is(["M ",",",`
|
|
98
|
-
a`,",",",0,0,1,",`,0
|
|
99
|
-
a`,",",",0,0,1,",`,0
|
|
100
|
-
`])),v.x,v.y,l,l,l*2,l,l,-l*2):b3({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var C=bt(pC||(pC=Is(["M ",",",`
|
|
101
|
-
A`,",",",0,0,",",",",",`
|
|
102
|
-
A`,",",",0,",",",",",",",`
|
|
103
|
-
A`,",",",0,0,",",",",",`
|
|
104
|
-
`])),v.x,v.y,l,l,+(p<0),y.x,y.y,i,i,+(O>180),+(p<0),b.x,b.y,l,l,+(p<0),w.x,w.y);if(n>0){var{circleTangency:E,lineTangency:A,theta:T}=oh({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),{circleTangency:M,lineTangency:R,theta:D}=oh({cx:t,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),I=c?Math.abs(f-h):Math.abs(f-h)-T-D;if(I<0&&l===0)return"".concat(C,"L").concat(t,",").concat(r,"Z");C+=bt(yC||(yC=Is(["L",",",`
|
|
105
|
-
A`,",",",0,0,",",",",",`
|
|
106
|
-
A`,",",",0,",",",",",",",`
|
|
107
|
-
A`,",",",0,0,",",",",","Z"])),R.x,R.y,l,l,+(p<0),M.x,M.y,n,n,+(I>180),+(p>0),E.x,E.y,l,l,+(p<0),A.x,A.y)}else C+=bt(vC||(vC=Is(["L",",","Z"])),t,r);return C},$F={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},j3=e=>{var t=or(e,$F),{cx:r,cy:n,innerRadius:i,outerRadius:l,cornerRadius:o,forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:p,className:y}=t;if(l<i||h===p)return null;var v=Xe("recharts-sector",y),x=l-i,b=zn(o,x,0,!0),w;return b>0&&Math.abs(h-p)<360?w=LF({cx:r,cy:n,innerRadius:i,outerRadius:l,cornerRadius:Math.min(b,x/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:p}):w=b3({cx:r,cy:n,innerRadius:i,outerRadius:l,startAngle:h,endAngle:p}),S.createElement("path",ib({},Or(t),{className:v,d:w}))};function zF(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(tR(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:l,outerRadius:o,angle:c}=t,f=sr(n,i,l,c),h=sr(n,i,o,c);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return x3(t)}}var A0={},C0={},T0={},gC;function BF(){return gC||(gC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mR();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(T0)),T0}var xC;function UF(){return xC||(xC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BF();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(C0)),C0}var bC;function qF(){return bC||(bC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pR(),r=UF();function n(i,l,o){o&&typeof o!="number"&&t.isIterateeCall(i,l,o)&&(l=o=void 0),i=r.toFinite(i),l===void 0?(l=i,i=0):l=r.toFinite(l),o=o===void 0?i<l?1:-1:r.toFinite(o);const c=Math.max(Math.ceil((l-i)/(o||1)),0),f=new Array(c);for(let h=0;h<c;h++)f[h]=i,i+=o;return f}e.range=n})(A0)),A0}var P0,jC;function HF(){return jC||(jC=1,P0=qF().range),P0}var FF=HF();const w3=as(FF);var Hn=e=>e.chartData,Aj=V([Hn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),gd=(e,t,r,n)=>n?Aj(e):Hn(e),KF=(e,t,r)=>r?Aj(e):Hn(e),GF=V([gd],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});V([Aj],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});var YF=V([Hn],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});function ia(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Be(t)&&Be(r))return!0}return!1}function wC(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function S3(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,l;if(Be(r))i=r;else if(typeof r=="function")return;if(Be(n))l=n;else if(typeof n=="function")return;var o=[i,l];if(ia(o))return o}}function VF(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(ia(n))return wC(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,l]=e,o,c;if(i==="auto")t!=null&&(o=Math.min(...t));else if(ye(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t==null?void 0:t[0]))}catch{}else if(typeof i=="string"&&dA.test(i)){var f=dA.exec(i);if(f==null||f[1]==null||t==null)o=void 0;else{var h=+f[1];o=t[0]-h}}else o=t==null?void 0:t[0];if(l==="auto")t!=null&&(c=Math.max(...t));else if(ye(l))c=l;else if(typeof l=="function")try{t!=null&&(c=l(t==null?void 0:t[1]))}catch{}else if(typeof l=="string"&&fA.test(l)){var p=fA.exec(l);if(p==null||p[1]==null||t==null)c=void 0;else{var y=+p[1];c=t[1]+y}}else c=t==null?void 0:t[1];var v=[o,c];if(ia(v))return t==null?v:wC(v,t,r)}}}var iu=1e9,QF={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Tj,ht=!0,On="[DecimalError] ",el=On+"Invalid argument: ",Cj=On+"Exponent out of range: ",su=Math.floor,Ms=Math.pow,XF=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Jr,Kt=1e7,ot=7,N3=9007199254740991,um=su(N3/ot),me={};me.absoluteValue=me.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};me.comparedTo=me.cmp=function(e){var t,r,n,i,l=this;if(e=new l.constructor(e),l.s!==e.s)return l.s||-e.s;if(l.e!==e.e)return l.e>e.e^l.s<0?1:-1;for(n=l.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(l.d[t]!==e.d[t])return l.d[t]>e.d[t]^l.s<0?1:-1;return n===i?0:n>i^l.s<0?1:-1};me.decimalPlaces=me.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ot;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};me.dividedBy=me.div=function(e){return Ka(this,new this.constructor(e))};me.dividedToIntegerBy=me.idiv=function(e){var t=this,r=t.constructor;return nt(Ka(t,new r(e),0,1),r.precision)};me.equals=me.eq=function(e){return!this.cmp(e)};me.exponent=function(){return Rt(this)};me.greaterThan=me.gt=function(e){return this.cmp(e)>0};me.greaterThanOrEqualTo=me.gte=function(e){return this.cmp(e)>=0};me.isInteger=me.isint=function(){return this.e>this.d.length-2};me.isNegative=me.isneg=function(){return this.s<0};me.isPositive=me.ispos=function(){return this.s>0};me.isZero=function(){return this.s===0};me.lessThan=me.lt=function(e){return this.cmp(e)<0};me.lessThanOrEqualTo=me.lte=function(e){return this.cmp(e)<1};me.logarithm=me.log=function(e){var t,r=this,n=r.constructor,i=n.precision,l=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Jr))throw Error(On+"NaN");if(r.s<1)throw Error(On+(r.s?"NaN":"-Infinity"));return r.eq(Jr)?new n(0):(ht=!1,t=Ka(Vc(r,l),Vc(e,l),l),ht=!0,nt(t,i))};me.minus=me.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?E3(t,e):O3(t,(e.s=-e.s,e))};me.modulo=me.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(On+"NaN");return r.s?(ht=!1,t=Ka(r,e,0,1).times(e),ht=!0,r.minus(t)):nt(new n(r),i)};me.naturalExponential=me.exp=function(){return _3(this)};me.naturalLogarithm=me.ln=function(){return Vc(this)};me.negated=me.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};me.plus=me.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O3(t,e):E3(t,(e.s=-e.s,e))};me.precision=me.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(el+e);if(t=Rt(i)+1,n=i.d.length-1,r=n*ot+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};me.squareRoot=me.sqrt=function(){var e,t,r,n,i,l,o,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(On+"NaN")}for(e=Rt(c),ht=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=aa(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=su((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=o=r+3;;)if(l=n,n=l.plus(Ka(c,l,o+2)).times(.5),aa(l.d).slice(0,o)===(t=aa(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(nt(l,r+1,0),l.times(l).eq(c)){n=l;break}}else if(t!="9999")break;o+=4}return ht=!0,nt(n,r)};me.times=me.mul=function(e){var t,r,n,i,l,o,c,f,h,p=this,y=p.constructor,v=p.d,x=(e=new y(e)).d;if(!p.s||!e.s)return new y(0);for(e.s*=p.s,r=p.e+e.e,f=v.length,h=x.length,f<h&&(l=v,v=x,x=l,o=f,f=h,h=o),l=[],o=f+h,n=o;n--;)l.push(0);for(n=h;--n>=0;){for(t=0,i=f+n;i>n;)c=l[i]+x[n]*v[i-n-1]+t,l[i--]=c%Kt|0,t=c/Kt|0;l[i]=(l[i]+t)%Kt|0}for(;!l[--o];)l.pop();return t?++r:l.shift(),e.d=l,e.e=r,ht?nt(e,y.precision):e};me.toDecimalPlaces=me.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ca(e,0,iu),t===void 0?t=n.rounding:ca(t,0,8),nt(r,e+Rt(r)+1,t))};me.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ul(n,!0):(ca(e,0,iu),t===void 0?t=i.rounding:ca(t,0,8),n=nt(new i(n),e+1,t),r=ul(n,!0,e+1)),r};me.toFixed=function(e,t){var r,n,i=this,l=i.constructor;return e===void 0?ul(i):(ca(e,0,iu),t===void 0?t=l.rounding:ca(t,0,8),n=nt(new l(i),e+Rt(i)+1,t),r=ul(n.abs(),!1,e+Rt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};me.toInteger=me.toint=function(){var e=this,t=e.constructor;return nt(new t(e),Rt(e)+1,t.rounding)};me.toNumber=function(){return+this};me.toPower=me.pow=function(e){var t,r,n,i,l,o,c=this,f=c.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(Jr);if(c=new f(c),!c.s){if(e.s<1)throw Error(On+"Infinity");return c}if(c.eq(Jr))return c;if(n=f.precision,e.eq(Jr))return nt(c,n);if(t=e.e,r=e.d.length-1,o=t>=r,l=c.s,o){if((r=p<0?-p:p)<=N3){for(i=new f(Jr),t=Math.ceil(n/ot+4),ht=!1;r%2&&(i=i.times(c),NC(i.d,t)),r=su(r/2),r!==0;)c=c.times(c),NC(c.d,t);return ht=!0,e.s<0?new f(Jr).div(i):nt(i,n)}}else if(l<0)throw Error(On+"NaN");return l=l<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,ht=!1,i=e.times(Vc(c,n+h)),ht=!0,i=_3(i),i.s=l,i};me.toPrecision=function(e,t){var r,n,i=this,l=i.constructor;return e===void 0?(r=Rt(i),n=ul(i,r<=l.toExpNeg||r>=l.toExpPos)):(ca(e,1,iu),t===void 0?t=l.rounding:ca(t,0,8),i=nt(new l(i),e,t),r=Rt(i),n=ul(i,e<=r||r<=l.toExpNeg,e)),n};me.toSignificantDigits=me.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ca(e,1,iu),t===void 0?t=n.rounding:ca(t,0,8)),nt(new n(r),e,t)};me.toString=me.valueOf=me.val=me.toJSON=me[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Rt(e),r=e.constructor;return ul(e,t<=r.toExpNeg||t>=r.toExpPos)};function O3(e,t){var r,n,i,l,o,c,f,h,p=e.constructor,y=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),ht?nt(t,y):t;if(f=e.d,h=t.d,o=e.e,i=t.e,f=f.slice(),l=o-i,l){for(l<0?(n=f,l=-l,c=h.length):(n=h,i=o,c=f.length),o=Math.ceil(y/ot),c=o>c?o+1:c+1,l>c&&(l=c,n.length=1),n.reverse();l--;)n.push(0);n.reverse()}for(c=f.length,l=h.length,c-l<0&&(l=c,n=h,h=f,f=n),r=0;l;)r=(f[--l]=f[l]+h[l]+r)/Kt|0,f[l]%=Kt;for(r&&(f.unshift(r),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,ht?nt(t,y):t}function ca(e,t,r){if(e!==~~e||e<t||e>r)throw Error(el+e)}function aa(e){var t,r,n,i=e.length-1,l="",o=e[0];if(i>0){for(l+=o,t=1;t<i;t++)n=e[t]+"",r=ot-n.length,r&&(l+=Di(r)),l+=n;o=e[t],n=o+"",r=ot-n.length,r&&(l+=Di(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return l+o}var Ka=(function(){function e(n,i){var l,o=0,c=n.length;for(n=n.slice();c--;)l=n[c]*i+o,n[c]=l%Kt|0,o=l/Kt|0;return o&&n.unshift(o),n}function t(n,i,l,o){var c,f;if(l!=o)f=l>o?1:-1;else for(c=f=0;c<l;c++)if(n[c]!=i[c]){f=n[c]>i[c]?1:-1;break}return f}function r(n,i,l){for(var o=0;l--;)n[l]-=o,o=n[l]<i[l]?1:0,n[l]=o*Kt+n[l]-i[l];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,l,o){var c,f,h,p,y,v,x,b,w,N,O,C,E,A,T,M,R,D,I=n.constructor,k=n.s==i.s?1:-1,H=n.d,q=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(On+"Division by zero");for(f=n.e-i.e,R=q.length,T=H.length,x=new I(k),b=x.d=[],h=0;q[h]==(H[h]||0);)++h;if(q[h]>(H[h]||0)&&--f,l==null?C=l=I.precision:o?C=l+(Rt(n)-Rt(i))+1:C=l,C<0)return new I(0);if(C=C/ot+2|0,h=0,R==1)for(p=0,q=q[0],C++;(h<T||p)&&C--;h++)E=p*Kt+(H[h]||0),b[h]=E/q|0,p=E%q|0;else{for(p=Kt/(q[0]+1)|0,p>1&&(q=e(q,p),H=e(H,p),R=q.length,T=H.length),A=R,w=H.slice(0,R),N=w.length;N<R;)w[N++]=0;D=q.slice(),D.unshift(0),M=q[0],q[1]>=Kt/2&&++M;do p=0,c=t(q,w,R,N),c<0?(O=w[0],R!=N&&(O=O*Kt+(w[1]||0)),p=O/M|0,p>1?(p>=Kt&&(p=Kt-1),y=e(q,p),v=y.length,N=w.length,c=t(y,w,v,N),c==1&&(p--,r(y,R<v?D:q,v))):(p==0&&(c=p=1),y=q.slice()),v=y.length,v<N&&y.unshift(0),r(w,y,N),c==-1&&(N=w.length,c=t(q,w,R,N),c<1&&(p++,r(w,R<N?D:q,N))),N=w.length):c===0&&(p++,w=[0]),b[h++]=p,c&&w[0]?w[N++]=H[A]||0:(w=[H[A]],N=1);while((A++<T||w[0]!==void 0)&&C--)}return b[0]||b.shift(),x.e=f,nt(x,o?l+Rt(x)+1:l)}})();function _3(e,t){var r,n,i,l,o,c,f=0,h=0,p=e.constructor,y=p.precision;if(Rt(e)>16)throw Error(Cj+Rt(e));if(!e.s)return new p(Jr);for(ht=!1,c=y,o=new p(.03125);e.abs().gte(.1);)e=e.times(o),h+=5;for(n=Math.log(Ms(2,h))/Math.LN10*2+5|0,c+=n,r=i=l=new p(Jr),p.precision=c;;){if(i=nt(i.times(e),c),r=r.times(++f),o=l.plus(Ka(i,r,c)),aa(o.d).slice(0,c)===aa(l.d).slice(0,c)){for(;h--;)l=nt(l.times(l),c);return p.precision=y,t==null?(ht=!0,nt(l,y)):l}l=o}}function Rt(e){for(var t=e.e*ot,r=e.d[0];r>=10;r/=10)t++;return t}function M0(e,t,r){if(t>e.LN10.sd())throw ht=!0,r&&(e.precision=r),Error(On+"LN10 precision limit exceeded");return nt(new e(e.LN10),t)}function Di(e){for(var t="";e--;)t+="0";return t}function Vc(e,t){var r,n,i,l,o,c,f,h,p,y=1,v=10,x=e,b=x.d,w=x.constructor,N=w.precision;if(x.s<1)throw Error(On+(x.s?"NaN":"-Infinity"));if(x.eq(Jr))return new w(0);if(t==null?(ht=!1,h=N):h=t,x.eq(10))return t==null&&(ht=!0),M0(w,h);if(h+=v,w.precision=h,r=aa(b),n=r.charAt(0),l=Rt(x),Math.abs(l)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)x=x.times(e),r=aa(x.d),n=r.charAt(0),y++;l=Rt(x),n>1?(x=new w("0."+r),l++):x=new w(n+"."+r.slice(1))}else return f=M0(w,h+2,N).times(l+""),x=Vc(new w(n+"."+r.slice(1)),h-v).plus(f),w.precision=N,t==null?(ht=!0,nt(x,N)):x;for(c=o=x=Ka(x.minus(Jr),x.plus(Jr),h),p=nt(x.times(x),h),i=3;;){if(o=nt(o.times(p),h),f=c.plus(Ka(o,new w(i),h)),aa(f.d).slice(0,h)===aa(c.d).slice(0,h))return c=c.times(2),l!==0&&(c=c.plus(M0(w,h+2,N).times(l+""))),c=Ka(c,new w(y),h),w.precision=N,t==null?(ht=!0,nt(c,N)):c;c=f,i+=2}}function SC(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=su(r/ot),e.d=[],n=(r+1)%ot,r<0&&(n+=ot),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=ot;n<i;)e.d.push(+t.slice(n,n+=ot));t=t.slice(n),n=ot-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),ht&&(e.e>um||e.e<-um))throw Error(Cj+r)}else e.s=0,e.e=0,e.d=[0];return e}function nt(e,t,r){var n,i,l,o,c,f,h,p,y=e.d;for(o=1,l=y[0];l>=10;l/=10)o++;if(n=t-o,n<0)n+=ot,i=t,h=y[p=0];else{if(p=Math.ceil((n+1)/ot),l=y.length,p>=l)return e;for(h=l=y[p],o=1;l>=10;l/=10)o++;n%=ot,i=n-ot+o}if(r!==void 0&&(l=Ms(10,o-i-1),c=h/l%10|0,f=t<0||y[p+1]!==void 0||h%l,f=r<4?(c||f)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||f||r==6&&(n>0?i>0?h/Ms(10,o-i):0:y[p-1])%10&1||r==(e.s<0?8:7))),t<1||!y[0])return f?(l=Rt(e),y.length=1,t=t-l-1,y[0]=Ms(10,(ot-t%ot)%ot),e.e=su(-t/ot)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(n==0?(y.length=p,l=1,p--):(y.length=p+1,l=Ms(10,ot-n),y[p]=i>0?(h/Ms(10,o-i)%Ms(10,i)|0)*l:0),f)for(;;)if(p==0){(y[0]+=l)==Kt&&(y[0]=1,++e.e);break}else{if(y[p]+=l,y[p]!=Kt)break;y[p--]=0,l=1}for(n=y.length;y[--n]===0;)y.pop();if(ht&&(e.e>um||e.e<-um))throw Error(Cj+Rt(e));return e}function E3(e,t){var r,n,i,l,o,c,f,h,p,y,v=e.constructor,x=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),ht?nt(t,x):t;if(f=e.d,y=t.d,n=t.e,h=e.e,f=f.slice(),o=h-n,o){for(p=o<0,p?(r=f,o=-o,c=y.length):(r=y,n=h,c=f.length),i=Math.max(Math.ceil(x/ot),c)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=f.length,c=y.length,p=i<c,p&&(c=i),i=0;i<c;i++)if(f[i]!=y[i]){p=f[i]<y[i];break}o=0}for(p&&(r=f,f=y,y=r,t.s=-t.s),c=f.length,i=y.length-c;i>0;--i)f[c++]=0;for(i=y.length;i>o;){if(f[--i]<y[i]){for(l=i;l&&f[--l]===0;)f[l]=Kt-1;--f[l],f[i]+=Kt}f[i]-=y[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,ht?nt(t,x):t):new v(0)}function ul(e,t,r){var n,i=Rt(e),l=aa(e.d),o=l.length;return t?(r&&(n=r-o)>0?l=l.charAt(0)+"."+l.slice(1)+Di(n):o>1&&(l=l.charAt(0)+"."+l.slice(1)),l=l+(i<0?"e":"e+")+i):i<0?(l="0."+Di(-i-1)+l,r&&(n=r-o)>0&&(l+=Di(n))):i>=o?(l+=Di(i+1-o),r&&(n=r-i-1)>0&&(l=l+"."+Di(n))):((n=i+1)<o&&(l=l.slice(0,n)+"."+l.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(l+="."),l+=Di(n))),e.s<0?"-"+l:l}function NC(e,t){if(e.length>t)return e.length=t,!0}function A3(e){var t,r,n;function i(l){var o=this;if(!(o instanceof i))return new i(l);if(o.constructor=i,l instanceof i){o.s=l.s,o.e=l.e,o.d=(l=l.d)?l.slice():l;return}if(typeof l=="number"){if(l*0!==0)throw Error(el+l);if(l>0)o.s=1;else if(l<0)l=-l,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(l===~~l&&l<1e7){o.e=0,o.d=[l];return}return SC(o,l.toString())}else if(typeof l!="string")throw Error(el+l);if(l.charCodeAt(0)===45?(l=l.slice(1),o.s=-1):o.s=1,XF.test(l))SC(o,l);else throw Error(el+l)}if(i.prototype=me,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=A3,i.config=i.set=WF,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function WF(e){if(!e||typeof e!="object")throw Error(On+"Object expected");var t,r,n,i=["precision",1,iu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(su(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(el+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(el+r+": "+n);return this}var Tj=A3(QF);Jr=new Tj(1);const ze=Tj;function C3(e){var t;return e===0?t=1:t=Math.floor(new ze(e).abs().log(10).toNumber())+1,t}function T3(e,t,r){for(var n=new ze(e),i=0,l=[];n.lt(t)&&i<1e5;)l.push(n.toNumber()),n=n.add(r),i++;return l}var P3=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},Pj=(e,t,r)=>{if(e.lte(0))return new ze(0);var n=C3(e.toNumber()),i=new ze(10).pow(n),l=e.div(i),o=n!==1?.05:.1,c=new ze(Math.ceil(l.div(o).toNumber())).add(r).mul(o),f=c.mul(i);return t?new ze(f.toNumber()):new ze(Math.ceil(f.toNumber()))},M3=(e,t,r)=>{var n;if(e.lte(0))return new ze(0);var i=[1,2,2.5,5],l=e.toNumber(),o=Math.floor(new ze(l).abs().log(10).toNumber()),c=new ze(10).pow(o),f=e.div(c).toNumber(),h=i.findIndex(x=>x>=f-1e-10);if(h===-1&&(c=c.mul(10),h=0),h+=r,h>=i.length){var p=Math.floor(h/i.length);h%=i.length,c=c.mul(new ze(10).pow(p))}var y=(n=i[h])!==null&&n!==void 0?n:1,v=new ze(y).mul(c);return t?v:new ze(Math.ceil(v.toNumber()))},ZF=(e,t,r)=>{var n=new ze(1),i=new ze(e);if(!i.isint()&&r){var l=Math.abs(e);l<1?(n=new ze(10).pow(C3(e)-1),i=new ze(Math.floor(i.div(n).toNumber())).mul(n)):l>1&&(i=new ze(Math.floor(e)))}else e===0?i=new ze(Math.floor((t-1)/2)):r||(i=new ze(Math.floor(e)));for(var o=Math.floor((t-1)/2),c=[],f=0;f<t;f++)c.push(i.add(new ze(f-o).mul(n)).toNumber());return c},R3=function(t,r,n,i){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Pj;if(!Number.isFinite((r-t)/(n-1)))return{step:new ze(0),tickMin:new ze(0),tickMax:new ze(0)};var c=o(new ze(r).sub(t).div(n-1),i,l),f;t<=0&&r>=0?f=new ze(0):(f=new ze(t).add(r).div(2),f=f.sub(new ze(f).mod(c)));var h=Math.ceil(f.sub(t).div(c).toNumber()),p=Math.ceil(new ze(r).sub(f).div(c).toNumber()),y=h+p+1;return y>n?R3(t,r,n,i,l+1,o):(y<n&&(p=r>0?p+(n-y):p,h=r>0?h:h+(n-y)),{step:c,tickMin:f.sub(new ze(h).mul(c)),tickMax:f.add(new ze(p).mul(c))})},OC=function(t){var[r,n]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",c=Math.max(i,2),[f,h]=P3([r,n]);if(f===-1/0||h===1/0){var p=h===1/0?[f,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),h];return r>n?p.reverse():p}if(f===h)return ZF(f,i,l);var y=o==="snap125"?M3:Pj,{step:v,tickMin:x,tickMax:b}=R3(f,h,c,l,0,y),w=T3(x,b.add(new ze(.1).mul(v)),v);return r>n?w.reverse():w},_C=function(t,r){var[n,i]=t,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[c,f]=P3([n,i]);if(c===-1/0||f===1/0)return[n,i];if(c===f)return[c];var h=o==="snap125"?M3:Pj,p=Math.max(r,2),y=h(new ze(f).sub(c).div(p-1),l,0),v=[...T3(new ze(c),new ze(f),y),f];return l===!1&&(v=v.map(x=>Math.round(x))),n>i?v.reverse():v},D3=e=>e.rootProps.maxBarSize,JF=e=>e.rootProps.barGap,k3=e=>e.rootProps.barCategoryGap,eK=e=>e.rootProps.barSize,hp=e=>e.rootProps.stackOffset,I3=e=>e.rootProps.reverseStackOrder,Mj=e=>e.options.chartName,Rj=e=>e.rootProps.syncId,L3=e=>e.rootProps.syncMethod,Dj=e=>e.options.eventEmitter,Gt={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},_s={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Xn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},mp=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function pp(e,t,r){if(r!=="auto")return r;if(e!=null)return Za(e,t)?"category":"number"}function EC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EC(Object(r),!0).forEach(function(n){tK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tK(e,t,r){return(t=rK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rK(e){var t=nK(e,"string");return typeof t=="symbol"?t:t+""}function nK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AC={allowDataOverflow:_s.allowDataOverflow,allowDecimals:_s.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:_s.angleAxisId,includeHidden:!1,name:void 0,reversed:_s.reversed,scale:_s.scale,tick:_s.tick,tickCount:void 0,ticks:void 0,type:_s.type,unit:void 0,niceTicks:"auto"},CC={allowDataOverflow:Xn.allowDataOverflow,allowDecimals:Xn.allowDecimals,allowDuplicatedCategory:Xn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Xn.radiusAxisId,includeHidden:Xn.includeHidden,name:void 0,reversed:Xn.reversed,scale:Xn.scale,tick:Xn.tick,tickCount:Xn.tickCount,ticks:void 0,type:Xn.type,unit:void 0,niceTicks:"auto"},aK=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},kj=V([aK,r3],(e,t)=>{var r;if(e!=null)return e;var n=(r=pp(t,"angleAxis",AC.type))!==null&&r!==void 0?r:"category";return cm(cm({},AC),{},{type:n})}),iK=(e,t)=>e.polarAxis.radiusAxis[t],Ij=V([iK,r3],(e,t)=>{var r;if(e!=null)return e;var n=(r=pp(t,"radiusAxis",CC.type))!==null&&r!==void 0?r:"category";return cm(cm({},CC),{},{type:n})}),yp=e=>e.polarOptions,Lj=V([Ja,ei,Vt],TF),$3=V([yp,Lj],(e,t)=>{if(e!=null)return zn(e.innerRadius,t,0)}),z3=V([yp,Lj],(e,t)=>{if(e!=null)return zn(e.outerRadius,t,t*.8)}),sK=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},B3=V([yp],sK);V([kj,B3],mp);var U3=V([Lj,$3,z3],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});V([Ij,U3],mp);var q3=V([We,yp,$3,z3,Ja,ei],(e,t,r,n,i,l)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:o,cy:c,startAngle:f,endAngle:h}=t;return{cx:zn(o,i,i/2),cy:zn(c,l,l/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Qt=(e,t)=>t,vp=(e,t,r)=>r;function $j(e){return e==null?void 0:e.id}function H3(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:l}=r,o=new Map;return e.forEach(c=>{var f,h=(f=c.data)!==null&&f!==void 0?f:n;if(!(h==null||h.length===0)){var p=$j(c);h.forEach((y,v)=>{var x=l==null||i?v:String(Ot(y,l,null)),b=Ot(y,c.dataKey,0),w;o.has(x)?w=o.get(x):w={},Object.assign(w,{[p]:b}),o.set(x,w)})}}),Array.from(o.values())}function gp(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var xp=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function bp(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function lK(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var Xt=e=>{var t=We(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},lu=e=>e.tooltip.settings.axisId;function zj(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(l){function o(){return l.apply(this,arguments)}return o.toString=function(){return l.toString()},o})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(l){var o=i[0],c=i[1];return o<=c?l>=o&&l<=c:l>=c&&l<=o},bandwidth:r?()=>r.call(e):void 0,ticks:t?l=>t.call(e,l):void 0,map:(l,o)=>{var c=e(l);if(c!=null){if(e.bandwidth&&o!==null&&o!==void 0&&o.position){var f=e.bandwidth();switch(o.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var oK=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!ia(t)){for(var r,n,i=0;i<t.length;i++){var l=t[i];Be(l)&&((r===void 0||l<r)&&(r=l),(n===void 0||l>n)&&(n=l))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function Ji(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function uK(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Bj(e){let t,r,n;e.length!==2?(t=Ji,r=(c,f)=>Ji(e(c),f),n=(c,f)=>e(c)-f):(t=e===Ji||e===uK?e:cK,r=e,n=e);function i(c,f,h=0,p=c.length){if(h<p){if(t(f,f)!==0)return p;do{const y=h+p>>>1;r(c[y],f)<0?h=y+1:p=y}while(h<p)}return h}function l(c,f,h=0,p=c.length){if(h<p){if(t(f,f)!==0)return p;do{const y=h+p>>>1;r(c[y],f)<=0?h=y+1:p=y}while(h<p)}return h}function o(c,f,h=0,p=c.length){const y=i(c,f,h,p-1);return y>h&&n(c[y-1],f)>-n(c[y],f)?y-1:y}return{left:i,center:o,right:l}}function cK(){return 0}function F3(e){return e===null?NaN:+e}function*dK(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const fK=Bj(Ji),xd=fK.right;Bj(F3).center;class TC extends Map{constructor(t,r=pK){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(PC(this,t))}has(t){return super.has(PC(this,t))}set(t,r){return super.set(hK(this,t),r)}delete(t){return super.delete(mK(this,t))}}function PC({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function hK({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function mK({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function pK(e){return e!==null&&typeof e=="object"?e.valueOf():e}function yK(e=Ji){if(e===Ji)return K3;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function K3(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const vK=Math.sqrt(50),gK=Math.sqrt(10),xK=Math.sqrt(2);function dm(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),l=n/Math.pow(10,i),o=l>=vK?10:l>=gK?5:l>=xK?2:1;let c,f,h;return i<0?(h=Math.pow(10,-i)/o,c=Math.round(e*h),f=Math.round(t*h),c/h<e&&++c,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*o,c=Math.round(e/h),f=Math.round(t/h),c*h<e&&++c,f*h>t&&--f),f<c&&.5<=r&&r<2?dm(e,t,r*2):[c,f,h]}function sb(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,l,o]=n?dm(t,e,r):dm(e,t,r);if(!(l>=i))return[];const c=l-i+1,f=new Array(c);if(n)if(o<0)for(let h=0;h<c;++h)f[h]=(l-h)/-o;else for(let h=0;h<c;++h)f[h]=(l-h)*o;else if(o<0)for(let h=0;h<c;++h)f[h]=(i+h)/-o;else for(let h=0;h<c;++h)f[h]=(i+h)*o;return f}function lb(e,t,r){return t=+t,e=+e,r=+r,dm(e,t,r)[2]}function ob(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?lb(t,e,r):lb(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function MC(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function RC(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function G3(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?K3:yK(i);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,p=Math.log(f),y=.5*Math.exp(2*p/3),v=.5*Math.sqrt(p*y*(f-y)/f)*(h-f/2<0?-1:1),x=Math.max(r,Math.floor(t-h*y/f+v)),b=Math.min(n,Math.floor(t+(f-h)*y/f+v));G3(e,t,x,b,i)}const l=e[t];let o=r,c=n;for(vc(e,r,t),i(e[n],l)>0&&vc(e,r,n);o<c;){for(vc(e,o,c),++o,--c;i(e[o],l)<0;)++o;for(;i(e[c],l)>0;)--c}i(e[r],l)===0?vc(e,r,c):(++c,vc(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function vc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function bK(e,t,r){if(e=Float64Array.from(dK(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return RC(e);if(t>=1)return MC(e);var n,i=(n-1)*t,l=Math.floor(i),o=MC(G3(e,l).subarray(0,l+1)),c=RC(e.subarray(l+1));return o+(c-o)*(i-l)}}function jK(e,t,r=F3){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,l=Math.floor(i),o=+r(e[l],l,e),c=+r(e[l+1],l+1,e);return o+(c-o)*(i-l)}}function wK(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,l=new Array(i);++n<i;)l[n]=e+n*r;return l}function _n(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ti(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const ub=Symbol("implicit");function Uj(){var e=new TC,t=[],r=[],n=ub;function i(l){let o=e.get(l);if(o===void 0){if(n!==ub)return n;e.set(l,o=t.push(l)-1)}return r[o%r.length]}return i.domain=function(l){if(!arguments.length)return t.slice();t=[],e=new TC;for(const o of l)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(l){return arguments.length?(r=Array.from(l),i):r.slice()},i.unknown=function(l){return arguments.length?(n=l,i):n},i.copy=function(){return Uj(t,r).unknown(n)},_n.apply(i,arguments),i}function qj(){var e=Uj().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,l,o,c=!1,f=0,h=0,p=.5;delete e.unknown;function y(){var v=t().length,x=i<n,b=x?i:n,w=x?n:i;l=(w-b)/Math.max(1,v-f+h*2),c&&(l=Math.floor(l)),b+=(w-b-l*(v-f))*p,o=l*(1-f),c&&(b=Math.round(b),o=Math.round(o));var N=wK(v).map(function(O){return b+l*O});return r(x?N.reverse():N)}return e.domain=function(v){return arguments.length?(t(v),y()):t()},e.range=function(v){return arguments.length?([n,i]=v,n=+n,i=+i,y()):[n,i]},e.rangeRound=function(v){return[n,i]=v,n=+n,i=+i,c=!0,y()},e.bandwidth=function(){return o},e.step=function(){return l},e.round=function(v){return arguments.length?(c=!!v,y()):c},e.padding=function(v){return arguments.length?(f=Math.min(1,h=+v),y()):f},e.paddingInner=function(v){return arguments.length?(f=Math.min(1,v),y()):f},e.paddingOuter=function(v){return arguments.length?(h=+v,y()):h},e.align=function(v){return arguments.length?(p=Math.max(0,Math.min(1,v)),y()):p},e.copy=function(){return qj(t(),[n,i]).round(c).paddingInner(f).paddingOuter(h).align(p)},_n.apply(y(),arguments)}function Y3(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Y3(t())},e}function SK(){return Y3(qj.apply(null,arguments).paddingInner(1))}function Hj(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function V3(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function bd(){}var Qc=.7,fm=1/Qc,_o="\\s*([+-]?\\d+)\\s*",Xc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",sa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NK=/^#([0-9a-f]{3,8})$/,OK=new RegExp(`^rgb\\(${_o},${_o},${_o}\\)$`),_K=new RegExp(`^rgb\\(${sa},${sa},${sa}\\)$`),EK=new RegExp(`^rgba\\(${_o},${_o},${_o},${Xc}\\)$`),AK=new RegExp(`^rgba\\(${sa},${sa},${sa},${Xc}\\)$`),CK=new RegExp(`^hsl\\(${Xc},${sa},${sa}\\)$`),TK=new RegExp(`^hsla\\(${Xc},${sa},${sa},${Xc}\\)$`),DC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Hj(bd,Wc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:kC,formatHex:kC,formatHex8:PK,formatHsl:MK,formatRgb:IC,toString:IC});function kC(){return this.rgb().formatHex()}function PK(){return this.rgb().formatHex8()}function MK(){return Q3(this).formatHsl()}function IC(){return this.rgb().formatRgb()}function Wc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=NK.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?LC(t):r===3?new qr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?uh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?uh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=OK.exec(e))?new qr(t[1],t[2],t[3],1):(t=_K.exec(e))?new qr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=EK.exec(e))?uh(t[1],t[2],t[3],t[4]):(t=AK.exec(e))?uh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=CK.exec(e))?BC(t[1],t[2]/100,t[3]/100,1):(t=TK.exec(e))?BC(t[1],t[2]/100,t[3]/100,t[4]):DC.hasOwnProperty(e)?LC(DC[e]):e==="transparent"?new qr(NaN,NaN,NaN,0):null}function LC(e){return new qr(e>>16&255,e>>8&255,e&255,1)}function uh(e,t,r,n){return n<=0&&(e=t=r=NaN),new qr(e,t,r,n)}function RK(e){return e instanceof bd||(e=Wc(e)),e?(e=e.rgb(),new qr(e.r,e.g,e.b,e.opacity)):new qr}function cb(e,t,r,n){return arguments.length===1?RK(e):new qr(e,t,r,n??1)}function qr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Hj(qr,cb,V3(bd,{brighter(e){return e=e==null?fm:Math.pow(fm,e),new qr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Qc:Math.pow(Qc,e),new qr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qr(tl(this.r),tl(this.g),tl(this.b),hm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$C,formatHex:$C,formatHex8:DK,formatRgb:zC,toString:zC}));function $C(){return`#${Ls(this.r)}${Ls(this.g)}${Ls(this.b)}`}function DK(){return`#${Ls(this.r)}${Ls(this.g)}${Ls(this.b)}${Ls((isNaN(this.opacity)?1:this.opacity)*255)}`}function zC(){const e=hm(this.opacity);return`${e===1?"rgb(":"rgba("}${tl(this.r)}, ${tl(this.g)}, ${tl(this.b)}${e===1?")":`, ${e})`}`}function hm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ls(e){return e=tl(e),(e<16?"0":"")+e.toString(16)}function BC(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kn(e,t,r,n)}function Q3(e){if(e instanceof kn)return new kn(e.h,e.s,e.l,e.opacity);if(e instanceof bd||(e=Wc(e)),!e)return new kn;if(e instanceof kn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),l=Math.max(t,r,n),o=NaN,c=l-i,f=(l+i)/2;return c?(t===l?o=(r-n)/c+(r<n)*6:r===l?o=(n-t)/c+2:o=(t-r)/c+4,c/=f<.5?l+i:2-l-i,o*=60):c=f>0&&f<1?0:o,new kn(o,c,f,e.opacity)}function kK(e,t,r,n){return arguments.length===1?Q3(e):new kn(e,t,r,n??1)}function kn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Hj(kn,kK,V3(bd,{brighter(e){return e=e==null?fm:Math.pow(fm,e),new kn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Qc:Math.pow(Qc,e),new kn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new qr(R0(e>=240?e-240:e+120,i,n),R0(e,i,n),R0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new kn(UC(this.h),ch(this.s),ch(this.l),hm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=hm(this.opacity);return`${e===1?"hsl(":"hsla("}${UC(this.h)}, ${ch(this.s)*100}%, ${ch(this.l)*100}%${e===1?")":`, ${e})`}`}}));function UC(e){return e=(e||0)%360,e<0?e+360:e}function ch(e){return Math.max(0,Math.min(1,e||0))}function R0(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Fj=e=>()=>e;function IK(e,t){return function(r){return e+r*t}}function LK(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function $K(e){return(e=+e)==1?X3:function(t,r){return r-t?LK(t,r,e):Fj(isNaN(t)?r:t)}}function X3(e,t){var r=t-e;return r?IK(e,r):Fj(isNaN(e)?t:e)}const qC=(function e(t){var r=$K(t);function n(i,l){var o=r((i=cb(i)).r,(l=cb(l)).r),c=r(i.g,l.g),f=r(i.b,l.b),h=X3(i.opacity,l.opacity);return function(p){return i.r=o(p),i.g=c(p),i.b=f(p),i.opacity=h(p),i+""}}return n.gamma=e,n})(1);function zK(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(l){for(i=0;i<r;++i)n[i]=e[i]*(1-l)+t[i]*l;return n}}function BK(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function UK(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),l=new Array(r),o;for(o=0;o<n;++o)i[o]=ou(e[o],t[o]);for(;o<r;++o)l[o]=t[o];return function(c){for(o=0;o<n;++o)l[o]=i[o](c);return l}}function qK(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function mm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function HK(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=ou(e[i],t[i]):n[i]=t[i];return function(l){for(i in r)n[i]=r[i](l);return n}}var db=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,D0=new RegExp(db.source,"g");function FK(e){return function(){return e}}function KK(e){return function(t){return e(t)+""}}function GK(e,t){var r=db.lastIndex=D0.lastIndex=0,n,i,l,o=-1,c=[],f=[];for(e=e+"",t=t+"";(n=db.exec(e))&&(i=D0.exec(t));)(l=i.index)>r&&(l=t.slice(r,l),c[o]?c[o]+=l:c[++o]=l),(n=n[0])===(i=i[0])?c[o]?c[o]+=i:c[++o]=i:(c[++o]=null,f.push({i:o,x:mm(n,i)})),r=D0.lastIndex;return r<t.length&&(l=t.slice(r),c[o]?c[o]+=l:c[++o]=l),c.length<2?f[0]?KK(f[0].x):FK(t):(t=f.length,function(h){for(var p=0,y;p<t;++p)c[(y=f[p]).i]=y.x(h);return c.join("")})}function ou(e,t){var r=typeof t,n;return t==null||r==="boolean"?Fj(t):(r==="number"?mm:r==="string"?(n=Wc(t))?(t=n,qC):GK:t instanceof Wc?qC:t instanceof Date?qK:BK(t)?zK:Array.isArray(t)?UK:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?HK:mm)(e,t)}function Kj(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function YK(e,t){t===void 0&&(t=e,e=ou);for(var r=0,n=t.length-1,i=t[0],l=new Array(n<0?0:n);r<n;)l[r]=e(i,i=t[++r]);return function(o){var c=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return l[c](o-c)}}function VK(e){return function(){return e}}function pm(e){return+e}var HC=[0,1];function Sr(e){return e}function fb(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:VK(isNaN(t)?NaN:.5)}function QK(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function XK(e,t,r){var n=e[0],i=e[1],l=t[0],o=t[1];return i<n?(n=fb(i,n),l=r(o,l)):(n=fb(n,i),l=r(l,o)),function(c){return l(n(c))}}function WK(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),l=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=fb(e[o],e[o+1]),l[o]=r(t[o],t[o+1]);return function(c){var f=xd(e,c,1,n)-1;return l[f](i[f](c))}}function jd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function jp(){var e=HC,t=HC,r=ou,n,i,l,o=Sr,c,f,h;function p(){var v=Math.min(e.length,t.length);return o!==Sr&&(o=QK(e[0],e[v-1])),c=v>2?WK:XK,f=h=null,y}function y(v){return v==null||isNaN(v=+v)?l:(f||(f=c(e.map(n),t,r)))(n(o(v)))}return y.invert=function(v){return o(i((h||(h=c(t,e.map(n),mm)))(v)))},y.domain=function(v){return arguments.length?(e=Array.from(v,pm),p()):e.slice()},y.range=function(v){return arguments.length?(t=Array.from(v),p()):t.slice()},y.rangeRound=function(v){return t=Array.from(v),r=Kj,p()},y.clamp=function(v){return arguments.length?(o=v?!0:Sr,p()):o!==Sr},y.interpolate=function(v){return arguments.length?(r=v,p()):r},y.unknown=function(v){return arguments.length?(l=v,y):l},function(v,x){return n=v,i=x,p()}}function Gj(){return jp()(Sr,Sr)}function ZK(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ym(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Qo(e){return e=ym(Math.abs(e)),e?e[1]:NaN}function JK(e,t){return function(r,n){for(var i=r.length,l=[],o=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>n&&(c=Math.max(1,n-f)),l.push(r.substring(i-=c,i+c)),!((f+=c+1)>n));)c=e[o=(o+1)%e.length];return l.reverse().join(t)}}function eG(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var tG=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Zc(e){if(!(t=tG.exec(e)))throw new Error("invalid format: "+e);var t;return new Yj({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Zc.prototype=Yj.prototype;function Yj(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Yj.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function rG(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var vm;function nG(e,t){var r=ym(e,t);if(!r)return vm=void 0,e.toPrecision(t);var n=r[0],i=r[1],l=i-(vm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return l===o?n:l>o?n+new Array(l-o+1).join("0"):l>0?n.slice(0,l)+"."+n.slice(l):"0."+new Array(1-l).join("0")+ym(e,Math.max(0,t+l-1))[0]}function FC(e,t){var r=ym(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const KC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ZK,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>FC(e*100,t),r:FC,s:nG,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function GC(e){return e}var YC=Array.prototype.map,VC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function aG(e){var t=e.grouping===void 0||e.thousands===void 0?GC:JK(YC.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",l=e.numerals===void 0?GC:eG(YC.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(y,v){y=Zc(y);var x=y.fill,b=y.align,w=y.sign,N=y.symbol,O=y.zero,C=y.width,E=y.comma,A=y.precision,T=y.trim,M=y.type;M==="n"?(E=!0,M="g"):KC[M]||(A===void 0&&(A=12),T=!0,M="g"),(O||x==="0"&&b==="=")&&(O=!0,x="0",b="=");var R=(v&&v.prefix!==void 0?v.prefix:"")+(N==="$"?r:N==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():""),D=(N==="$"?n:/[%p]/.test(M)?o:"")+(v&&v.suffix!==void 0?v.suffix:""),I=KC[M],k=/[defgprs%]/.test(M);A=A===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function H(q){var ie=R,re=D,W,$,F;if(M==="c")re=I(q)+re,q="";else{q=+q;var J=q<0||1/q<0;if(q=isNaN(q)?f:I(Math.abs(q),A),T&&(q=rG(q)),J&&+q==0&&w!=="+"&&(J=!1),ie=(J?w==="("?w:c:w==="-"||w==="("?"":w)+ie,re=(M==="s"&&!isNaN(q)&&vm!==void 0?VC[8+vm/3]:"")+re+(J&&w==="("?")":""),k){for(W=-1,$=q.length;++W<$;)if(F=q.charCodeAt(W),48>F||F>57){re=(F===46?i+q.slice(W+1):q.slice(W))+re,q=q.slice(0,W);break}}}E&&!O&&(q=t(q,1/0));var ne=ie.length+q.length+re.length,ce=ne<C?new Array(C-ne+1).join(x):"";switch(E&&O&&(q=t(ce+q,ce.length?C-re.length:1/0),ce=""),b){case"<":q=ie+q+re+ce;break;case"=":q=ie+ce+q+re;break;case"^":q=ce.slice(0,ne=ce.length>>1)+ie+q+re+ce.slice(ne);break;default:q=ce+ie+q+re;break}return l(q)}return H.toString=function(){return y+""},H}function p(y,v){var x=Math.max(-8,Math.min(8,Math.floor(Qo(v)/3)))*3,b=Math.pow(10,-x),w=h((y=Zc(y),y.type="f",y),{suffix:VC[8+x/3]});return function(N){return w(b*N)}}return{format:h,formatPrefix:p}}var dh,Vj,W3;iG({thousands:",",grouping:[3],currency:["$",""]});function iG(e){return dh=aG(e),Vj=dh.format,W3=dh.formatPrefix,dh}function sG(e){return Math.max(0,-Qo(Math.abs(e)))}function lG(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Qo(t)/3)))*3-Qo(Math.abs(e)))}function oG(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qo(t)-Qo(e))+1}function Z3(e,t,r,n){var i=ob(e,t,r),l;switch(n=Zc(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(l=lG(i,o))&&(n.precision=l),W3(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(l=oG(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=l-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(l=sG(i))&&(n.precision=l-(n.type==="%")*2);break}}return Vj(n)}function is(e){var t=e.domain;return e.ticks=function(r){var n=t();return sb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return Z3(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,l=n.length-1,o=n[i],c=n[l],f,h,p=10;for(c<o&&(h=o,o=c,c=h,h=i,i=l,l=h);p-- >0;){if(h=lb(o,c,r),h===f)return n[i]=o,n[l]=c,t(n);if(h>0)o=Math.floor(o/h)*h,c=Math.ceil(c/h)*h;else if(h<0)o=Math.ceil(o*h)/h,c=Math.floor(c*h)/h;else break;f=h}return e},e}function J3(){var e=Gj();return e.copy=function(){return jd(e,J3())},_n.apply(e,arguments),is(e)}function e4(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,pm),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return e4(e).unknown(t)},e=arguments.length?Array.from(e,pm):[0,1],is(r)}function t4(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],l=e[n],o;return l<i&&(o=r,r=n,n=o,o=i,i=l,l=o),e[r]=t.floor(i),e[n]=t.ceil(l),e}function QC(e){return Math.log(e)}function XC(e){return Math.exp(e)}function uG(e){return-Math.log(-e)}function cG(e){return-Math.exp(-e)}function dG(e){return isFinite(e)?+("1e"+e):e<0?0:e}function fG(e){return e===10?dG:e===Math.E?Math.exp:t=>Math.pow(e,t)}function hG(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function WC(e){return(t,r)=>-e(-t,r)}function Qj(e){const t=e(QC,XC),r=t.domain;let n=10,i,l;function o(){return i=hG(n),l=fG(n),r()[0]<0?(i=WC(i),l=WC(l),e(uG,cG)):e(QC,XC),t}return t.base=function(c){return arguments.length?(n=+c,o()):n},t.domain=function(c){return arguments.length?(r(c),o()):r()},t.ticks=c=>{const f=r();let h=f[0],p=f[f.length-1];const y=p<h;y&&([h,p]=[p,h]);let v=i(h),x=i(p),b,w;const N=c==null?10:+c;let O=[];if(!(n%1)&&x-v<N){if(v=Math.floor(v),x=Math.ceil(x),h>0){for(;v<=x;++v)for(b=1;b<n;++b)if(w=v<0?b/l(-v):b*l(v),!(w<h)){if(w>p)break;O.push(w)}}else for(;v<=x;++v)for(b=n-1;b>=1;--b)if(w=v>0?b/l(-v):b*l(v),!(w<h)){if(w>p)break;O.push(w)}O.length*2<N&&(O=sb(h,p,N))}else O=sb(v,x,Math.min(x-v,N)).map(l);return y?O.reverse():O},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Zc(f)).precision==null&&(f.trim=!0),f=Vj(f)),c===1/0)return f;const h=Math.max(1,n*c/t.ticks().length);return p=>{let y=p/l(Math.round(i(p)));return y*n<n-.5&&(y*=n),y<=h?f(p):""}},t.nice=()=>r(t4(r(),{floor:c=>l(Math.floor(i(c))),ceil:c=>l(Math.ceil(i(c)))})),t}function r4(){const e=Qj(jp()).domain([1,10]);return e.copy=()=>jd(e,r4()).base(e.base()),_n.apply(e,arguments),e}function ZC(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function JC(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xj(e){var t=1,r=e(ZC(t),JC(t));return r.constant=function(n){return arguments.length?e(ZC(t=+n),JC(t)):t},is(r)}function n4(){var e=Xj(jp());return e.copy=function(){return jd(e,n4()).constant(e.constant())},_n.apply(e,arguments)}function eT(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function mG(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function pG(e){return e<0?-e*e:e*e}function Wj(e){var t=e(Sr,Sr),r=1;function n(){return r===1?e(Sr,Sr):r===.5?e(mG,pG):e(eT(r),eT(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},is(t)}function Zj(){var e=Wj(jp());return e.copy=function(){return jd(e,Zj()).exponent(e.exponent())},_n.apply(e,arguments),e}function yG(){return Zj.apply(null,arguments).exponent(.5)}function tT(e){return Math.sign(e)*e*e}function vG(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function a4(){var e=Gj(),t=[0,1],r=!1,n;function i(l){var o=vG(e(l));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(l){return e.invert(tT(l))},i.domain=function(l){return arguments.length?(e.domain(l),i):e.domain()},i.range=function(l){return arguments.length?(e.range((t=Array.from(l,pm)).map(tT)),i):t.slice()},i.rangeRound=function(l){return i.range(l).round(!0)},i.round=function(l){return arguments.length?(r=!!l,i):r},i.clamp=function(l){return arguments.length?(e.clamp(l),i):e.clamp()},i.unknown=function(l){return arguments.length?(n=l,i):n},i.copy=function(){return a4(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},_n.apply(i,arguments),is(i)}function i4(){var e=[],t=[],r=[],n;function i(){var o=0,c=Math.max(1,t.length);for(r=new Array(c-1);++o<c;)r[o-1]=jK(e,o/c);return l}function l(o){return o==null||isNaN(o=+o)?n:t[xd(r,o)]}return l.invertExtent=function(o){var c=t.indexOf(o);return c<0?[NaN,NaN]:[c>0?r[c-1]:e[0],c<r.length?r[c]:e[e.length-1]]},l.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let c of o)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(Ji),i()},l.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},l.unknown=function(o){return arguments.length?(n=o,l):n},l.quantiles=function(){return r.slice()},l.copy=function(){return i4().domain(e).range(t).unknown(n)},_n.apply(l,arguments)}function s4(){var e=0,t=1,r=1,n=[.5],i=[0,1],l;function o(f){return f!=null&&f<=f?i[xd(n,f,0,r)]:l}function c(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return o}return o.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},o.range=function(f){return arguments.length?(r=(i=Array.from(f)).length-1,c()):i.slice()},o.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],t]:[n[h-1],n[h]]},o.unknown=function(f){return arguments.length&&(l=f),o},o.thresholds=function(){return n.slice()},o.copy=function(){return s4().domain([e,t]).range(i).unknown(l)},_n.apply(is(o),arguments)}function l4(){var e=[.5],t=[0,1],r,n=1;function i(l){return l!=null&&l<=l?t[xd(e,l,0,n)]:r}return i.domain=function(l){return arguments.length?(e=Array.from(l),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(l){return arguments.length?(t=Array.from(l),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(l){var o=t.indexOf(l);return[e[o-1],e[o]]},i.unknown=function(l){return arguments.length?(r=l,i):r},i.copy=function(){return l4().domain(e).range(t).unknown(r)},_n.apply(i,arguments)}const k0=new Date,I0=new Date;function zt(e,t,r,n){function i(l){return e(l=arguments.length===0?new Date:new Date(+l)),l}return i.floor=l=>(e(l=new Date(+l)),l),i.ceil=l=>(e(l=new Date(l-1)),t(l,1),e(l),l),i.round=l=>{const o=i(l),c=i.ceil(l);return l-o<c-l?o:c},i.offset=(l,o)=>(t(l=new Date(+l),o==null?1:Math.floor(o)),l),i.range=(l,o,c)=>{const f=[];if(l=i.ceil(l),c=c==null?1:Math.floor(c),!(l<o)||!(c>0))return f;let h;do f.push(h=new Date(+l)),t(l,c),e(l);while(h<l&&l<o);return f},i.filter=l=>zt(o=>{if(o>=o)for(;e(o),!l(o);)o.setTime(o-1)},(o,c)=>{if(o>=o)if(c<0)for(;++c<=0;)for(;t(o,-1),!l(o););else for(;--c>=0;)for(;t(o,1),!l(o););}),r&&(i.count=(l,o)=>(k0.setTime(+l),I0.setTime(+o),e(k0),e(I0),Math.floor(r(k0,I0))),i.every=l=>(l=Math.floor(l),!isFinite(l)||!(l>0)?null:l>1?i.filter(n?o=>n(o)%l===0:o=>i.count(0,o)%l===0):i)),i}const gm=zt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);gm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?zt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):gm);gm.range;const Ua=1e3,Nn=Ua*60,qa=Nn*60,Qa=qa*24,Jj=Qa*7,rT=Qa*30,L0=Qa*365,$s=zt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ua)},(e,t)=>(t-e)/Ua,e=>e.getUTCSeconds());$s.range;const ew=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ua)},(e,t)=>{e.setTime(+e+t*Nn)},(e,t)=>(t-e)/Nn,e=>e.getMinutes());ew.range;const tw=zt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Nn)},(e,t)=>(t-e)/Nn,e=>e.getUTCMinutes());tw.range;const rw=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ua-e.getMinutes()*Nn)},(e,t)=>{e.setTime(+e+t*qa)},(e,t)=>(t-e)/qa,e=>e.getHours());rw.range;const nw=zt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*qa)},(e,t)=>(t-e)/qa,e=>e.getUTCHours());nw.range;const wd=zt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Nn)/Qa,e=>e.getDate()-1);wd.range;const wp=zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>e.getUTCDate()-1);wp.range;const o4=zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>Math.floor(e/Qa));o4.range;function vl(e){return zt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Nn)/Jj)}const Sp=vl(0),xm=vl(1),gG=vl(2),xG=vl(3),Xo=vl(4),bG=vl(5),jG=vl(6);Sp.range;xm.range;gG.range;xG.range;Xo.range;bG.range;jG.range;function gl(e){return zt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Jj)}const Np=gl(0),bm=gl(1),wG=gl(2),SG=gl(3),Wo=gl(4),NG=gl(5),OG=gl(6);Np.range;bm.range;wG.range;SG.range;Wo.range;NG.range;OG.range;const aw=zt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());aw.range;const iw=zt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());iw.range;const Xa=zt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Xa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Xa.range;const Wa=zt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Wa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Wa.range;function u4(e,t,r,n,i,l){const o=[[$s,1,Ua],[$s,5,5*Ua],[$s,15,15*Ua],[$s,30,30*Ua],[l,1,Nn],[l,5,5*Nn],[l,15,15*Nn],[l,30,30*Nn],[i,1,qa],[i,3,3*qa],[i,6,6*qa],[i,12,12*qa],[n,1,Qa],[n,2,2*Qa],[r,1,Jj],[t,1,rT],[t,3,3*rT],[e,1,L0]];function c(h,p,y){const v=p<h;v&&([h,p]=[p,h]);const x=y&&typeof y.range=="function"?y:f(h,p,y),b=x?x.range(h,+p+1):[];return v?b.reverse():b}function f(h,p,y){const v=Math.abs(p-h)/y,x=Bj(([,,N])=>N).right(o,v);if(x===o.length)return e.every(ob(h/L0,p/L0,y));if(x===0)return gm.every(Math.max(ob(h,p,y),1));const[b,w]=o[v/o[x-1][2]<o[x][2]/v?x-1:x];return b.every(w)}return[c,f]}const[_G,EG]=u4(Wa,iw,Np,o4,nw,tw),[AG,CG]=u4(Xa,aw,Sp,wd,rw,ew);function $0(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function z0(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function gc(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function TG(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,l=e.days,o=e.shortDays,c=e.months,f=e.shortMonths,h=xc(i),p=bc(i),y=xc(l),v=bc(l),x=xc(o),b=bc(o),w=xc(c),N=bc(c),O=xc(f),C=bc(f),E={a:F,A:J,b:ne,B:ce,c:null,d:oT,e:oT,f:JG,g:uY,G:dY,H:XG,I:WG,j:ZG,L:c4,m:eY,M:tY,p:L,q:X,Q:dT,s:fT,S:rY,u:nY,U:aY,V:iY,w:sY,W:lY,x:null,X:null,y:oY,Y:cY,Z:fY,"%":cT},A={a:le,A:oe,b:he,B:je,c:null,d:uT,e:uT,f:yY,g:_Y,G:AY,H:hY,I:mY,j:pY,L:f4,m:vY,M:gY,p:Ne,q:Pe,Q:dT,s:fT,S:xY,u:bY,U:jY,V:wY,w:SY,W:NY,x:null,X:null,y:OY,Y:EY,Z:CY,"%":cT},T={a:k,A:H,b:q,B:ie,c:re,d:sT,e:sT,f:GG,g:iT,G:aT,H:lT,I:lT,j:qG,L:KG,m:UG,M:HG,p:I,q:BG,Q:VG,s:QG,S:FG,u:kG,U:IG,V:LG,w:DG,W:$G,x:W,X:$,y:iT,Y:aT,Z:zG,"%":YG};E.x=M(r,E),E.X=M(n,E),E.c=M(t,E),A.x=M(r,A),A.X=M(n,A),A.c=M(t,A);function M(de,ee){return function(Se){var ue=[],_t=-1,De=0,Et=de.length,At,ur,ma;for(Se instanceof Date||(Se=new Date(+Se));++_t<Et;)de.charCodeAt(_t)===37&&(ue.push(de.slice(De,_t)),(ur=nT[At=de.charAt(++_t)])!=null?At=de.charAt(++_t):ur=At==="e"?" ":"0",(ma=ee[At])&&(At=ma(Se,ur)),ue.push(At),De=_t+1);return ue.push(de.slice(De,_t)),ue.join("")}}function R(de,ee){return function(Se){var ue=gc(1900,void 0,1),_t=D(ue,de,Se+="",0),De,Et;if(_t!=Se.length)return null;if("Q"in ue)return new Date(ue.Q);if("s"in ue)return new Date(ue.s*1e3+("L"in ue?ue.L:0));if(ee&&!("Z"in ue)&&(ue.Z=0),"p"in ue&&(ue.H=ue.H%12+ue.p*12),ue.m===void 0&&(ue.m="q"in ue?ue.q:0),"V"in ue){if(ue.V<1||ue.V>53)return null;"w"in ue||(ue.w=1),"Z"in ue?(De=z0(gc(ue.y,0,1)),Et=De.getUTCDay(),De=Et>4||Et===0?bm.ceil(De):bm(De),De=wp.offset(De,(ue.V-1)*7),ue.y=De.getUTCFullYear(),ue.m=De.getUTCMonth(),ue.d=De.getUTCDate()+(ue.w+6)%7):(De=$0(gc(ue.y,0,1)),Et=De.getDay(),De=Et>4||Et===0?xm.ceil(De):xm(De),De=wd.offset(De,(ue.V-1)*7),ue.y=De.getFullYear(),ue.m=De.getMonth(),ue.d=De.getDate()+(ue.w+6)%7)}else("W"in ue||"U"in ue)&&("w"in ue||(ue.w="u"in ue?ue.u%7:"W"in ue?1:0),Et="Z"in ue?z0(gc(ue.y,0,1)).getUTCDay():$0(gc(ue.y,0,1)).getDay(),ue.m=0,ue.d="W"in ue?(ue.w+6)%7+ue.W*7-(Et+5)%7:ue.w+ue.U*7-(Et+6)%7);return"Z"in ue?(ue.H+=ue.Z/100|0,ue.M+=ue.Z%100,z0(ue)):$0(ue)}}function D(de,ee,Se,ue){for(var _t=0,De=ee.length,Et=Se.length,At,ur;_t<De;){if(ue>=Et)return-1;if(At=ee.charCodeAt(_t++),At===37){if(At=ee.charAt(_t++),ur=T[At in nT?ee.charAt(_t++):At],!ur||(ue=ur(de,Se,ue))<0)return-1}else if(At!=Se.charCodeAt(ue++))return-1}return ue}function I(de,ee,Se){var ue=h.exec(ee.slice(Se));return ue?(de.p=p.get(ue[0].toLowerCase()),Se+ue[0].length):-1}function k(de,ee,Se){var ue=x.exec(ee.slice(Se));return ue?(de.w=b.get(ue[0].toLowerCase()),Se+ue[0].length):-1}function H(de,ee,Se){var ue=y.exec(ee.slice(Se));return ue?(de.w=v.get(ue[0].toLowerCase()),Se+ue[0].length):-1}function q(de,ee,Se){var ue=O.exec(ee.slice(Se));return ue?(de.m=C.get(ue[0].toLowerCase()),Se+ue[0].length):-1}function ie(de,ee,Se){var ue=w.exec(ee.slice(Se));return ue?(de.m=N.get(ue[0].toLowerCase()),Se+ue[0].length):-1}function re(de,ee,Se){return D(de,t,ee,Se)}function W(de,ee,Se){return D(de,r,ee,Se)}function $(de,ee,Se){return D(de,n,ee,Se)}function F(de){return o[de.getDay()]}function J(de){return l[de.getDay()]}function ne(de){return f[de.getMonth()]}function ce(de){return c[de.getMonth()]}function L(de){return i[+(de.getHours()>=12)]}function X(de){return 1+~~(de.getMonth()/3)}function le(de){return o[de.getUTCDay()]}function oe(de){return l[de.getUTCDay()]}function he(de){return f[de.getUTCMonth()]}function je(de){return c[de.getUTCMonth()]}function Ne(de){return i[+(de.getUTCHours()>=12)]}function Pe(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var ee=M(de+="",E);return ee.toString=function(){return de},ee},parse:function(de){var ee=R(de+="",!1);return ee.toString=function(){return de},ee},utcFormat:function(de){var ee=M(de+="",A);return ee.toString=function(){return de},ee},utcParse:function(de){var ee=R(de+="",!0);return ee.toString=function(){return de},ee}}}var nT={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,PG=/^%/,MG=/[\\^$*+?|[\]().{}]/g;function Fe(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",l=i.length;return n+(l<r?new Array(r-l+1).join(t)+i:i)}function RG(e){return e.replace(MG,"\\$&")}function xc(e){return new RegExp("^(?:"+e.map(RG).join("|")+")","i")}function bc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function DG(e,t,r){var n=Wt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function kG(e,t,r){var n=Wt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function IG(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function LG(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function $G(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function aT(e,t,r){var n=Wt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function iT(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function zG(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function BG(e,t,r){var n=Wt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function UG(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function sT(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function qG(e,t,r){var n=Wt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function lT(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function HG(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function FG(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function KG(e,t,r){var n=Wt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function GG(e,t,r){var n=Wt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function YG(e,t,r){var n=PG.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function VG(e,t,r){var n=Wt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function QG(e,t,r){var n=Wt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function oT(e,t){return Fe(e.getDate(),t,2)}function XG(e,t){return Fe(e.getHours(),t,2)}function WG(e,t){return Fe(e.getHours()%12||12,t,2)}function ZG(e,t){return Fe(1+wd.count(Xa(e),e),t,3)}function c4(e,t){return Fe(e.getMilliseconds(),t,3)}function JG(e,t){return c4(e,t)+"000"}function eY(e,t){return Fe(e.getMonth()+1,t,2)}function tY(e,t){return Fe(e.getMinutes(),t,2)}function rY(e,t){return Fe(e.getSeconds(),t,2)}function nY(e){var t=e.getDay();return t===0?7:t}function aY(e,t){return Fe(Sp.count(Xa(e)-1,e),t,2)}function d4(e){var t=e.getDay();return t>=4||t===0?Xo(e):Xo.ceil(e)}function iY(e,t){return e=d4(e),Fe(Xo.count(Xa(e),e)+(Xa(e).getDay()===4),t,2)}function sY(e){return e.getDay()}function lY(e,t){return Fe(xm.count(Xa(e)-1,e),t,2)}function oY(e,t){return Fe(e.getFullYear()%100,t,2)}function uY(e,t){return e=d4(e),Fe(e.getFullYear()%100,t,2)}function cY(e,t){return Fe(e.getFullYear()%1e4,t,4)}function dY(e,t){var r=e.getDay();return e=r>=4||r===0?Xo(e):Xo.ceil(e),Fe(e.getFullYear()%1e4,t,4)}function fY(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fe(t/60|0,"0",2)+Fe(t%60,"0",2)}function uT(e,t){return Fe(e.getUTCDate(),t,2)}function hY(e,t){return Fe(e.getUTCHours(),t,2)}function mY(e,t){return Fe(e.getUTCHours()%12||12,t,2)}function pY(e,t){return Fe(1+wp.count(Wa(e),e),t,3)}function f4(e,t){return Fe(e.getUTCMilliseconds(),t,3)}function yY(e,t){return f4(e,t)+"000"}function vY(e,t){return Fe(e.getUTCMonth()+1,t,2)}function gY(e,t){return Fe(e.getUTCMinutes(),t,2)}function xY(e,t){return Fe(e.getUTCSeconds(),t,2)}function bY(e){var t=e.getUTCDay();return t===0?7:t}function jY(e,t){return Fe(Np.count(Wa(e)-1,e),t,2)}function h4(e){var t=e.getUTCDay();return t>=4||t===0?Wo(e):Wo.ceil(e)}function wY(e,t){return e=h4(e),Fe(Wo.count(Wa(e),e)+(Wa(e).getUTCDay()===4),t,2)}function SY(e){return e.getUTCDay()}function NY(e,t){return Fe(bm.count(Wa(e)-1,e),t,2)}function OY(e,t){return Fe(e.getUTCFullYear()%100,t,2)}function _Y(e,t){return e=h4(e),Fe(e.getUTCFullYear()%100,t,2)}function EY(e,t){return Fe(e.getUTCFullYear()%1e4,t,4)}function AY(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Wo(e):Wo.ceil(e),Fe(e.getUTCFullYear()%1e4,t,4)}function CY(){return"+0000"}function cT(){return"%"}function dT(e){return+e}function fT(e){return Math.floor(+e/1e3)}var fo,m4,p4;TY({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function TY(e){return fo=TG(e),m4=fo.format,fo.parse,p4=fo.utcFormat,fo.utcParse,fo}function PY(e){return new Date(e)}function MY(e){return e instanceof Date?+e:+new Date(+e)}function sw(e,t,r,n,i,l,o,c,f,h){var p=Gj(),y=p.invert,v=p.domain,x=h(".%L"),b=h(":%S"),w=h("%I:%M"),N=h("%I %p"),O=h("%a %d"),C=h("%b %d"),E=h("%B"),A=h("%Y");function T(M){return(f(M)<M?x:c(M)<M?b:o(M)<M?w:l(M)<M?N:n(M)<M?i(M)<M?O:C:r(M)<M?E:A)(M)}return p.invert=function(M){return new Date(y(M))},p.domain=function(M){return arguments.length?v(Array.from(M,MY)):v().map(PY)},p.ticks=function(M){var R=v();return e(R[0],R[R.length-1],M??10)},p.tickFormat=function(M,R){return R==null?T:h(R)},p.nice=function(M){var R=v();return(!M||typeof M.range!="function")&&(M=t(R[0],R[R.length-1],M??10)),M?v(t4(R,M)):p},p.copy=function(){return jd(p,sw(e,t,r,n,i,l,o,c,f,h))},p}function RY(){return _n.apply(sw(AG,CG,Xa,aw,Sp,wd,rw,ew,$s,m4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function DY(){return _n.apply(sw(_G,EG,Wa,iw,Np,wp,nw,tw,$s,p4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Op(){var e=0,t=1,r,n,i,l,o=Sr,c=!1,f;function h(y){return y==null||isNaN(y=+y)?f:o(i===0?.5:(y=(l(y)-r)*i,c?Math.max(0,Math.min(1,y)):y))}h.domain=function(y){return arguments.length?([e,t]=y,r=l(e=+e),n=l(t=+t),i=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(y){return arguments.length?(c=!!y,h):c},h.interpolator=function(y){return arguments.length?(o=y,h):o};function p(y){return function(v){var x,b;return arguments.length?([x,b]=v,o=y(x,b),h):[o(0),o(1)]}}return h.range=p(ou),h.rangeRound=p(Kj),h.unknown=function(y){return arguments.length?(f=y,h):f},function(y){return l=y,r=y(e),n=y(t),i=r===n?0:1/(n-r),h}}function ss(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function y4(){var e=is(Op()(Sr));return e.copy=function(){return ss(e,y4())},ti.apply(e,arguments)}function v4(){var e=Qj(Op()).domain([1,10]);return e.copy=function(){return ss(e,v4()).base(e.base())},ti.apply(e,arguments)}function g4(){var e=Xj(Op());return e.copy=function(){return ss(e,g4()).constant(e.constant())},ti.apply(e,arguments)}function lw(){var e=Wj(Op());return e.copy=function(){return ss(e,lw()).exponent(e.exponent())},ti.apply(e,arguments)}function kY(){return lw.apply(null,arguments).exponent(.5)}function x4(){var e=[],t=Sr;function r(n){if(n!=null&&!isNaN(n=+n))return t((xd(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Ji),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,l)=>bK(e,l/n))},r.copy=function(){return x4(t).domain(e)},ti.apply(r,arguments)}function _p(){var e=0,t=.5,r=1,n=1,i,l,o,c,f,h=Sr,p,y=!1,v;function x(w){return isNaN(w=+w)?v:(w=.5+((w=+p(w))-l)*(n*w<n*l?c:f),h(y?Math.max(0,Math.min(1,w)):w))}x.domain=function(w){return arguments.length?([e,t,r]=w,i=p(e=+e),l=p(t=+t),o=p(r=+r),c=i===l?0:.5/(l-i),f=l===o?0:.5/(o-l),n=l<i?-1:1,x):[e,t,r]},x.clamp=function(w){return arguments.length?(y=!!w,x):y},x.interpolator=function(w){return arguments.length?(h=w,x):h};function b(w){return function(N){var O,C,E;return arguments.length?([O,C,E]=N,h=YK(w,[O,C,E]),x):[h(0),h(.5),h(1)]}}return x.range=b(ou),x.rangeRound=b(Kj),x.unknown=function(w){return arguments.length?(v=w,x):v},function(w){return p=w,i=w(e),l=w(t),o=w(r),c=i===l?0:.5/(l-i),f=l===o?0:.5/(o-l),n=l<i?-1:1,x}}function b4(){var e=is(_p()(Sr));return e.copy=function(){return ss(e,b4())},ti.apply(e,arguments)}function j4(){var e=Qj(_p()).domain([.1,1,10]);return e.copy=function(){return ss(e,j4()).base(e.base())},ti.apply(e,arguments)}function w4(){var e=Xj(_p());return e.copy=function(){return ss(e,w4()).constant(e.constant())},ti.apply(e,arguments)}function ow(){var e=Wj(_p());return e.copy=function(){return ss(e,ow()).exponent(e.exponent())},ti.apply(e,arguments)}function IY(){return ow.apply(null,arguments).exponent(.5)}const S4=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:qj,scaleDiverging:b4,scaleDivergingLog:j4,scaleDivergingPow:ow,scaleDivergingSqrt:IY,scaleDivergingSymlog:w4,scaleIdentity:e4,scaleImplicit:ub,scaleLinear:J3,scaleLog:r4,scaleOrdinal:Uj,scalePoint:SK,scalePow:Zj,scaleQuantile:i4,scaleQuantize:s4,scaleRadial:a4,scaleSequential:y4,scaleSequentialLog:v4,scaleSequentialPow:lw,scaleSequentialQuantile:x4,scaleSequentialSqrt:kY,scaleSequentialSymlog:g4,scaleSqrt:yG,scaleSymlog:n4,scaleThreshold:l4,scaleTime:RY,scaleUtc:DY,tickFormat:Z3},Symbol.toStringTag,{value:"Module"}));function LY(e){var t=S4;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(dd(e));if(r in t&&typeof t[r]=="function")return t[r]()}function hT(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=LY(e);if(n!=null)return n.domain(t).range(r),n}}function uw(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?hT(e.scale,r,n):hT(t,r,n)}function $Y(e){return"scale".concat(dd(e))}function zY(e){return $Y(e)in S4}var N4=(e,t,r)=>{if(e!=null){var{scale:n,type:i}=e;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return zY(n)?n:"point"}};function BY(e,t){for(var r=0,n=e.length,i=e[0]<e[e.length-1];r<n;){var l=Math.floor((r+n)/2);(i?e[l]<t:e[l]>t)?r=l+1:n=l}return r}function O4(e,t){if(e){var r=t??e.domain(),n=r.map(l=>{var o;return(o=e(l))!==null&&o!==void 0?o:0}),i=e.range();if(!(r.length===0||i.length<2))return l=>{var o,c,f=BY(n,l);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(o=n[f-1])!==null&&o!==void 0?o:0,p=(c=n[f])!==null&&c!==void 0?c:0;return Math.abs(l-h)<=Math.abs(l-p)?r[f-1]:r[f]}}}function UY(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):O4(e,void 0)}function mT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mT(Object(r),!0).forEach(function(n){qY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qY(e,t,r){return(t=HY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HY(e){var t=FY(e,"string");return typeof t=="symbol"?t:t+""}function FY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hb=[0,"auto"],kt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},_4=(e,t)=>e.cartesianAxis.xAxis[t],ri=(e,t)=>{var r=_4(e,t);return r??kt},It={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:hb,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:md},E4=(e,t)=>e.cartesianAxis.yAxis[t],ni=(e,t)=>{var r=E4(e,t);return r??It},KY={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},cw=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??KY},Ar=(e,t,r)=>{switch(t){case"xAxis":return ri(e,r);case"yAxis":return ni(e,r);case"zAxis":return cw(e,r);case"angleAxis":return kj(e,r);case"radiusAxis":return Ij(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},GY=(e,t,r)=>{switch(t){case"xAxis":return ri(e,r);case"yAxis":return ni(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Sd=(e,t,r)=>{switch(t){case"xAxis":return ri(e,r);case"yAxis":return ni(e,r);case"angleAxis":return kj(e,r);case"radiusAxis":return Ij(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},A4=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function C4(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var Ep=e=>e.graphicalItems.cartesianItems,YY=V([Qt,vp],C4),T4=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),uu=V([Ep,Ar,YY],T4,{memoizeOptions:{resultEqualityCheck:bp}}),P4=V([uu],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(gp)),M4=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),VY=V([uu],M4),R4=e=>e.map(t=>t.data).filter(Boolean).flat(1),QY=V([uu],e=>e.some(t=>!t.data)),D4=V([uu],R4,{memoizeOptions:{resultEqualityCheck:bp}}),k4=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},dw=V([D4,gd],k4),XY=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Ot(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Ot(i,n)}))):e.map(n=>({value:n})),I4=(e,t,r,n,i,l)=>{var{chartData:o=[],dataStartIndex:c,dataEndIndex:f}=n,h=XY(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&l.length>0){var p=o.slice(c,f+1),y=p.map(v=>({value:Ot(v,t.dataKey)})).filter(v=>v.value!=null);return[...y,...h]}return h},Nd=V([dw,Ar,uu,gd,QY,D4],I4);function Eo(e){if(oa(e)||e instanceof Date){var t=Number(e);if(Be(t))return t}}function pT(e){if(Array.isArray(e)){var t=[Eo(e[0]),Eo(e[1])];return ia(t)?t:void 0}var r=Eo(e);if(r!=null)return[r,r]}function da(e){return e.map(Eo).filter(Ur)}function WY(e,t){var r=Eo(e),n=Eo(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var ZY=V([Nd],e=>e==null?void 0:e.map(t=>t.value).sort(WY));function L4(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function JY(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!la(t))n=t;else if(Array.isArray(t)){var i=da(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:da(r.flatMap(l=>{var o=Ot(e,l.dataKey),c,f;if(Array.isArray(o)?[c,f]=o:c=f=o,!(!Be(c)||!Be(f)))return[n-c,n+f]}))}var Bt=e=>{var t=Xt(e),r=lu(e);return Sd(e,t,r)},Zo=V([Bt],e=>e==null?void 0:e.dataKey),eV=V([P4,gd,Bt],H3),$4=(e,t,r,n)=>{var i={},l=t.reduce((o,c)=>{if(c.stackId==null)return o;var f=o[c.stackId];return f==null&&(f=[]),f.push(c),o[c.stackId]=f,o},i);return Object.fromEntries(Object.entries(l).map(o=>{var[c,f]=o,h=n?[...f].reverse():f,p=h.map($j);return[c,{stackedData:Lq(e,p,r),graphicalItems:h}]}))},mb=V([eV,P4,hp,I3],$4),z4=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:l}=t;if(n==null&&r!=="zAxis"){var o=qq(e,i,l);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},tV=V([Ar],e=>e.allowDataOverflow),fw=e=>{var t;if(e==null||!("domain"in e))return hb;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=da(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:hb},B4=V([Ar],fw),U4=V([B4,tV],S3),rV=V([mb,Hn,Qt,U4],z4,{memoizeOptions:{resultEqualityCheck:xp}}),hw=e=>e.errorBars,nV=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>L4(r,n)),wm=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var l=i.flat(),o=Math.min(...l),c=Math.max(...l);return[o,c]}},q4=function(t,r,n,i,l){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],c,f;if(n.length>0&&n.forEach(h=>{var p,y=h.data!=null?[...h.data]:o,v=(p=i[h.id])===null||p===void 0?void 0:p.filter(x=>L4(l,x));y.forEach(x=>{var b,w=Ot(x,(b=r.dataKey)!==null&&b!==void 0?b:h.dataKey),N=JY(x,w,v);if(N.length>=2){var O=Math.min(...N),C=Math.max(...N);(c==null||O<c)&&(c=O),(f==null||C>f)&&(f=C)}var E=pT(w);E!=null&&(c=c==null?E[0]:Math.min(c,E[0]),f=f==null?E[1]:Math.max(f,E[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var p=pT(Ot(h,r.dataKey));p!=null&&(c=c==null?p[0]:Math.min(c,p[0]),f=f==null?p[1]:Math.max(f,p[1]))}),Be(c)&&Be(f))return[c,f]},aV=V([dw,Ar,VY,hw,Qt,GF],q4,{memoizeOptions:{resultEqualityCheck:xp}});function iV(e){var{value:t}=e;if(oa(t)||t instanceof Date)return t}var sV=(e,t,r)=>{var n=e.map(iV).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&ZM(n))?w3(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},H4=e=>e.referenceElements.dots,cu=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),lV=V([H4,Qt,vp],cu),F4=e=>e.referenceElements.areas,oV=V([F4,Qt,vp],cu),K4=e=>e.referenceElements.lines,uV=V([K4,Qt,vp],cu),G4=(e,t)=>{if(e!=null){var r=da(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},cV=V(lV,Qt,G4),Y4=(e,t)=>{if(e!=null){var r=da(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},dV=V([oV,Qt],Y4);function fV(e){var t;if(e.x!=null)return da([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:da(r)}function hV(e){var t;if(e.y!=null)return da([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:da(r)}var V4=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?fV(n):hV(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},mV=V([uV,Qt],V4),pV=V(cV,mV,dV,(e,t,r)=>wm(e,r,t)),Q4=(e,t,r,n,i,l,o,c)=>{if(r!=null)return r;var f=o==="vertical"&&c==="xAxis"||o==="horizontal"&&c==="yAxis",h=f?wm(n,l,i):wm(l,i);return VF(t,h,e.allowDataOverflow)},yV=V([Ar,B4,U4,rV,aV,pV,We,Qt],Q4,{memoizeOptions:{resultEqualityCheck:xp}}),vV=[0,1],X4=(e,t,r,n,i,l,o)=>{if(!((e==null||r==null||r.length===0)&&o===void 0)){var{dataKey:c,type:f}=e,h=Za(t,l);if(h&&c==null){var p;return w3(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?sV(n,e,h):i==="expand"&&!h?vV:o}},mw=V([Ar,We,dw,Nd,hp,Qt,yV],X4),du=V([Ar,A4,Mj],N4),W4=(e,t,r)=>{var{niceTicks:n}=t;if(n!=="none"){var i=fw(t),l=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&ia(e)){if(l)return OC(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return _C(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(l&&ia(e))return OC(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&ia(e))return _C(e,t.tickCount,t.allowDecimals,"adaptive")}}},pw=V([mw,Sd,du],W4),Z4=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&ia(t)&&Array.isArray(r)&&r.length>0){var i,l,o=t[0],c=(i=r[0])!==null&&i!==void 0?i:0,f=t[1],h=(l=r[r.length-1])!==null&&l!==void 0?l:0;return[Math.min(o,c),Math.max(f,h)]}return t},gV=V([Ar,mw,pw,Qt],Z4),xV=V(Nd,Ar,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(da(e.map(y=>y.value))).sort((y,v)=>y-v),i=n[0],l=n[n.length-1];if(i==null||l==null)return 1/0;var o=l-i;if(o===0)return 1/0;for(var c=0;c<n.length-1;c++){var f=n[c],h=n[c+1];if(!(f==null||h==null)){var p=h-f;r=Math.min(r,p)}}return r/o}}),J4=V(xV,We,k3,Vt,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!Be(e))return 0;var l=t==="vertical"?n.height:n.width;if(i==="gap")return e*l/2;if(i==="no-gap"){var o=zn(r,e*l),c=e*l/2;return c-o-(c-o)/l*o}return 0}),bV=(e,t,r)=>{var n=ri(e,t);return n==null||typeof n.padding!="string"?0:J4(e,"xAxis",t,r,n.padding)},jV=(e,t,r)=>{var n=ni(e,t);return n==null||typeof n.padding!="string"?0:J4(e,"yAxis",t,r,n.padding)},wV=V(ri,bV,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),SV=V(ni,jV,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),NV=V([Vt,wV,sp,ip,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:l}=n;return i?[l.left,r.width-l.right]:[e.left+t.left,e.left+e.width-t.right]}),OV=V([Vt,We,SV,sp,ip,(e,t,r)=>r],(e,t,r,n,i,l)=>{var{padding:o}=i;return l?[n.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Od=(e,t,r,n)=>{var i;switch(t){case"xAxis":return NV(e,r,n);case"yAxis":return OV(e,r,n);case"zAxis":return(i=cw(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return B3(e);case"radiusAxis":return U3(e,r);default:return}},eD=V([Ar,Od],mp),_V=V([du,gV],oK),yw=V([Ar,du,_V,eD],uw),tD=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:l}=r,o=Za(e,n);if(o&&(i==="number"||l!=="auto"))return t.map(c=>c.value)}},vw=V([We,Nd,Sd,Qt],tD),Ap=V([yw],zj);V([yw],UY);V([yw,ZY],O4);V([uu,hw,Qt],nV);function rD(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Cp=(e,t)=>t,Tp=(e,t,r)=>r,EV=V(np,Cp,Tp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(rD)),AV=V(ap,Cp,Tp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(rD)),nD=(e,t)=>({width:e.width,height:t.height}),CV=(e,t)=>{var r=typeof t.width=="number"?t.width:md;return{width:r,height:e.height}},aD=V(Vt,ri,nD),TV=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},PV=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},MV=V(ei,Vt,EV,Cp,Tp,(e,t,r,n,i)=>{var l={},o;return r.forEach(c=>{var f=nD(t,c);o==null&&(o=TV(t,n,e));var h=n==="top"&&!i||n==="bottom"&&i;l[c.id]=o-Number(h)*f.height,o+=(h?-1:1)*f.height}),l}),RV=V(Ja,Vt,AV,Cp,Tp,(e,t,r,n,i)=>{var l={},o;return r.forEach(c=>{var f=CV(t,c);o==null&&(o=PV(t,n,e));var h=n==="left"&&!i||n==="right"&&i;l[c.id]=o-Number(h)*f.width,o+=(h?-1:1)*f.width}),l}),DV=(e,t)=>{var r=ri(e,t);if(r!=null)return MV(e,r.orientation,r.mirror)},kV=V([Vt,ri,DV,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),IV=(e,t)=>{var r=ni(e,t);if(r!=null)return RV(e,r.orientation,r.mirror)},LV=V([Vt,ni,IV,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),iD=V(Vt,ni,(e,t)=>{var r=typeof t.width=="number"?t.width:md;return{width:r,height:e.height}}),yT=(e,t,r)=>{switch(t){case"xAxis":return aD(e,r).width;case"yAxis":return iD(e,r).height;default:return}},sD=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:l,dataKey:o}=r,c=Za(e,n),f=t.map(p=>p.value),h=f.filter(p=>p!=null);if(o&&c&&l==="category"&&i&&ZM(h))return f}},gw=V([We,Nd,Ar,Qt],sD),vT=V([We,GY,du,Ap,gw,vw,Od,pw,Qt],(e,t,r,n,i,l,o,c,f)=>{if(t!=null){var h=Za(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:l,duplicateDomain:i,isCategorical:h,niceTicks:c,range:o,realScaleType:r,scale:n}}}),$V=(e,t,r,n,i,l,o,c,f)=>{if(!(t==null||n==null)){var h=Za(e,f),{type:p,ticks:y,tickCount:v}=t,x=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,b=p==="category"&&n.bandwidth?n.bandwidth()/x:0;b=f==="angleAxis"&&l!=null&&l.length>=2?Br(l[0]-l[1])*2*b:b;var w=y||i;return w?w.map((N,O)=>{var C=o?o.indexOf(N):N,E=n.map(C);return Be(E)?{index:O,coordinate:E+b,value:N,offset:b}:null}).filter(Ur):h&&c?c.map((N,O)=>{var C=n.map(N);return Be(C)?{coordinate:C+b,value:N,index:O,offset:b}:null}).filter(Ur):n.ticks?n.ticks(v).map((N,O)=>{var C=n.map(N);return Be(C)?{coordinate:C+b,value:N,index:O,offset:b}:null}).filter(Ur):n.domain().map((N,O)=>{var C=n.map(N);return Be(C)?{coordinate:C+b,value:o?o[N]:N,index:O,offset:b}:null}).filter(Ur)}},lD=V([We,Sd,du,Ap,pw,Od,gw,vw,Qt],$V),zV=(e,t,r,n,i,l,o)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var c=Za(e,o),{tickCount:f}=t,h=0;return h=o==="angleAxis"&&(n==null?void 0:n.length)>=2?Br(n[0]-n[1])*2*h:h,c&&l?l.map((p,y)=>{var v=r.map(p);return Be(v)?{coordinate:v+h,value:p,index:y,offset:h}:null}).filter(Ur):r.ticks?r.ticks(f).map((p,y)=>{var v=r.map(p);return Be(v)?{coordinate:v+h,value:p,index:y,offset:h}:null}).filter(Ur):r.domain().map((p,y)=>{var v=r.map(p);return Be(v)?{coordinate:v+h,value:i?i[p]:p,index:y,offset:h}:null}).filter(Ur)}},ts=V([We,Sd,Ap,Od,gw,vw,Qt],zV),rs=V(Ar,Ap,(e,t)=>{if(!(e==null||t==null))return jm(jm({},e),{},{scale:t})}),BV=V([Ar,du,mw,eD],uw),UV=V([BV],zj);V((e,t,r)=>cw(e,r),UV,(e,t)=>{if(!(e==null||t==null))return jm(jm({},e),{},{scale:t})});var qV=V([We,np,ap],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),HV=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};V([HV],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var l of e){var o=Math.abs(l.coordinate-t);o<n&&(n=o,i=l)}return(r=i)===null||r===void 0?void 0:r.value}});var oD=e=>e.options.defaultTooltipEventType,uD=e=>e.options.validateTooltipEventTypes;function cD(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function _d(e,t){var r=oD(e),n=uD(e);return cD(t,r,n)}function FV(e){return ge(t=>_d(t,e))}var dD=(e,t)=>{var r,n=Number(t);if(!(la(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},KV=e=>e.tooltip.settings,Li={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},GV={itemInteraction:{click:Li,hover:Li},axisInteraction:{click:Li,hover:Li},keyboardInteraction:Li,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},fD=vr({name:"tooltip",initialState:GV,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:lt()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sn(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:lt()},removeTooltipEntrySettings:{reducer(e,t){var r=Sn(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:lt()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:YV,replaceTooltipEntrySettings:VV,removeTooltipEntrySettings:QV,setTooltipSettingsState:XV,setActiveMouseOverItemIndex:hD,mouseLeaveItem:WV,mouseLeaveChart:mD,setActiveClickItemIndex:ZV,setMouseOverAxisIndex:pD,setMouseClickAxisIndex:JV,setSyncInteraction:Ec,setKeyboardInteraction:Sm}=fD.actions,eQ=fD.reducer;function gT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gT(Object(r),!0).forEach(function(n){tQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tQ(e,t,r){return(t=rQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rQ(e){var t=nQ(e,"string");return typeof t=="symbol"?t:t+""}function nQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aQ(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function iQ(e){return e.index!=null}var yD=(e,t,r,n)=>{if(t==null)return Li;var i=aQ(e,t,r);if(i==null)return Li;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var l=e.settings.active===!0;if(iQ(i)){if(l)return fh(fh({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return fh(fh({},Li),{},{coordinate:i.coordinate})};function sQ(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function lQ(e,t){var r=sQ(e),n=t[0],i=t[1];if(r===void 0)return!1;var l=Math.min(n,i),o=Math.max(n,i);return r>=l&&r<=o}function oQ(e,t,r){if(r==null||t==null)return!0;var n=Ot(e,t);return n==null||!ia(r)?!0:lQ(n,r)}var Cc=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var l=Number(i);if(!Be(l))return i;var o=0,c=1/0;t.length>0&&(c=t.length-1);var f=Math.max(o,Math.min(l,c)),h=t[f];return h==null||oQ(h,r,n)?String(f):null},vD=(e,t,r,n,i,l,o)=>{if(l!=null){var c=o[0],f=c==null?void 0:c.getPosition(l);if(f!=null)return f;var h=i==null?void 0:i[Number(l)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},gD=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var l=e.tooltipItemPayloads[0];return l!=null?[l]:[]}return e.tooltipItemPayloads.filter(o=>{var c;return((c=o.settings)===null||c===void 0?void 0:c.graphicalItemId)===i})},xD=e=>e.options.tooltipPayloadSearcher,fu=e=>e.tooltip;function xT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xT(Object(r),!0).forEach(function(n){uQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uQ(e,t,r){return(t=cQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cQ(e){var t=dQ(e,"string");return typeof t=="symbol"?t:t+""}function dQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fQ(e){if(typeof e=="string"||typeof e=="number")return e}function hQ(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function mQ(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function jT(e){if(typeof e=="string")return e}function pQ(e){if(!(e==null||typeof e!="object")){var t="name"in e?fQ(e.name):void 0,r="unit"in e?hQ(e.unit):void 0,n="dataKey"in e?mQ(e.dataKey):void 0,i="payload"in e?e.payload:void 0,l="color"in e?jT(e.color):void 0,o="fill"in e?jT(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:l,fill:o}}}function yQ(e,t){return e??t}var bD=(e,t,r,n,i,l,o)=>{if(!(t==null||l==null)){var{chartData:c,computedData:f,dataStartIndex:h,dataEndIndex:p}=r,y=[];return e.reduce((v,x)=>{var b,{dataDefinedOnItem:w,settings:N}=x,O=yQ(w,c),C=Array.isArray(O)?YR(O,h,p):O,E=(b=N==null?void 0:N.dataKey)!==null&&b!==void 0?b:n,A=N==null?void 0:N.nameKey,T;if(n&&Array.isArray(C)&&!Array.isArray(C[0])&&o==="axis"?T=JM(C,n,i):T=l(C,t,f,A),Array.isArray(T))T.forEach(R=>{var D,I,k=pQ(R),H=k==null?void 0:k.name,q=k==null?void 0:k.dataKey,ie=k==null?void 0:k.payload,re=bT(bT({},N),{},{name:H,unit:k==null?void 0:k.unit,color:(D=k==null?void 0:k.color)!==null&&D!==void 0?D:N==null?void 0:N.color,fill:(I=k==null?void 0:k.fill)!==null&&I!==void 0?I:N==null?void 0:N.fill});v.push(hA({tooltipEntrySettings:re,dataKey:q,payload:ie,value:Ot(ie,q),name:H==null?void 0:String(H)}))});else{var M;v.push(hA({tooltipEntrySettings:N,dataKey:E,payload:T,value:Ot(T,E),name:(M=Ot(T,A))!==null&&M!==void 0?M:N==null?void 0:N.name}))}return v},y)}},xw=V([Bt,A4,Mj],N4),vQ=V([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),gQ=V([Xt,lu],C4),xl=V([vQ,Bt,gQ],T4,{memoizeOptions:{resultEqualityCheck:bp}}),xQ=V([xl],e=>e.filter(gp)),jD=V([xl],R4,{memoizeOptions:{resultEqualityCheck:bp}}),bQ=V([xl],e=>e.some(t=>!t.data)),cl=V([jD,Hn],k4),jQ=V([xQ,Hn,Bt],H3),bw=V([cl,Bt,xl,Hn,bQ,jD],I4),wD=V([Bt],fw),wQ=V([Bt],e=>e.allowDataOverflow),SD=V([wD,wQ],S3),SQ=V([xl],e=>e.filter(gp)),NQ=V([jQ,SQ,hp,I3],$4),OQ=V([NQ,Hn,Xt,SD],z4),_Q=V([xl],M4),EQ=V([cl,Bt,_Q,hw,Xt,YF],q4,{memoizeOptions:{resultEqualityCheck:xp}}),AQ=V([H4,Xt,lu],cu),CQ=V([AQ,Xt],G4),TQ=V([F4,Xt,lu],cu),PQ=V([TQ,Xt],Y4),MQ=V([K4,Xt,lu],cu),RQ=V([MQ,Xt],V4),DQ=V([CQ,RQ,PQ],wm),kQ=V([Bt,wD,SD,OQ,EQ,DQ,We,Xt],Q4),Jo=V([Bt,We,cl,bw,hp,Xt,kQ],X4),IQ=V([Jo,Bt,xw],W4),LQ=V([Bt,Jo,IQ,Xt],Z4),ND=e=>{var t=Xt(e),r=lu(e),n=!1;return Od(e,t,r,n)},OD=V([Bt,ND],mp),$Q=V([Bt,xw,LQ,OD],uw),_D=V([$Q],zj),zQ=V([We,bw,Bt,Xt],sD),BQ=V([We,bw,Bt,Xt],tD),UQ=(e,t,r,n,i,l,o,c)=>{if(t){var{type:f}=t,h=Za(e,c);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,y=f==="category"&&n.bandwidth?n.bandwidth()/p:0;return y=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?Br(i[0]-i[1])*2*y:y,h&&o?o.map((v,x)=>{var b=n.map(v);return Be(b)?{coordinate:b+y,value:v,index:x,offset:y}:null}).filter(Ur):n.domain().map((v,x)=>{var b=n.map(v);return Be(b)?{coordinate:b+y,value:l?l[v]:v,index:x,offset:y}:null}).filter(Ur)}}},ai=V([We,Bt,xw,_D,ND,zQ,BQ,Xt],UQ),jw=V([oD,uD,KV],(e,t,r)=>cD(r.shared,e,t)),ED=e=>e.tooltip.settings.trigger,ww=e=>e.tooltip.settings.defaultIndex,Ed=V([fu,jw,ED,ww],yD),dl=V([Ed,cl,Zo,Jo],Cc),AD=V([ai,dl],dD),CD=V([Ed],e=>{if(e)return e.dataKey}),qQ=V([Ed],e=>{if(e)return e.graphicalItemId}),TD=V([fu,jw,ED,ww],gD),HQ=V([Ja,ei,We,Vt,ai,ww,TD],vD),FQ=V([Ed,HQ],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),KQ=V([Ed],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),GQ=V([TD,dl,Hn,Zo,AD,xD,jw],bD),YQ=V([GQ],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function wT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ST(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wT(Object(r),!0).forEach(function(n){VQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VQ(e,t,r){return(t=QQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QQ(e){var t=XQ(e,"string");return typeof t=="symbol"?t:t+""}function XQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var WQ=()=>ge(Bt),ZQ=()=>{var e=WQ(),t=ge(ai),r=ge(_D);return Go(!e||!r?void 0:ST(ST({},e),{},{scale:r}),t)};function NT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ho(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NT(Object(r),!0).forEach(function(n){JQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JQ(e,t,r){return(t=eX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eX(e){var t=tX(e,"string");return typeof t=="symbol"?t:t+""}function tX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rX=(e,t,r,n)=>{var i=t.find(l=>l&&l.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},nX=(e,t,r,n)=>{var i=t.find(h=>h&&h.index===r);if(i){if(e==="centric"){var l=i.coordinate,{radius:o}=n;return ho(ho(ho({},n),sr(n.cx,n.cy,o,l)),{},{angle:l,radius:o})}var c=i.coordinate,{angle:f}=n;return ho(ho(ho({},n),sr(n.cx,n.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function aX(e,t){var{relativeX:r,relativeY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var PD=(e,t,r,n,i)=>{var l,o=(l=t==null?void 0:t.length)!==null&&l!==void 0?l:0;if(o<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<o;c++){var f,h,p,y,v,x=c>0?(f=r[c-1])===null||f===void 0?void 0:f.coordinate:(h=r[o-1])===null||h===void 0?void 0:h.coordinate,b=(p=r[c])===null||p===void 0?void 0:p.coordinate,w=c>=o-1?(y=r[0])===null||y===void 0?void 0:y.coordinate:(v=r[c+1])===null||v===void 0?void 0:v.coordinate,N=void 0;if(!(x==null||b==null||w==null))if(Br(b-x)!==Br(w-b)){var O=[];if(Br(w-b)===Br(i[1]-i[0])){N=w;var C=b+i[1]-i[0];O[0]=Math.min(C,(C+x)/2),O[1]=Math.max(C,(C+x)/2)}else{N=x;var E=w+i[1]-i[0];O[0]=Math.min(b,(E+b)/2),O[1]=Math.max(b,(E+b)/2)}var A=[Math.min(b,(N+b)/2),Math.max(b,(N+b)/2)];if(e>A[0]&&e<=A[1]||e>=O[0]&&e<=O[1]){var T;return(T=r[c])===null||T===void 0?void 0:T.index}}else{var M=Math.min(x,w),R=Math.max(x,w);if(e>(M+b)/2&&e<=(R+b)/2){var D;return(D=r[c])===null||D===void 0?void 0:D.index}}}else if(t)for(var I=0;I<o;I++){var k=t[I];if(k!=null){var H=t[I+1],q=t[I-1];if(I===0&&H!=null&&e<=(k.coordinate+H.coordinate)/2||I===o-1&&q!=null&&e>(k.coordinate+q.coordinate)/2||I>0&&I<o-1&&q!=null&&H!=null&&e>(k.coordinate+q.coordinate)/2&&e<=(k.coordinate+H.coordinate)/2)return k.index}}return-1},iX=()=>ge(Mj),Sw=(e,t)=>t,MD=(e,t,r)=>r,Nw=(e,t,r,n)=>n,sX=V(ai,e=>Gm(e,t=>t.coordinate)),Ow=V([fu,Sw,MD,Nw],yD),_w=V([Ow,cl,Zo,Jo],Cc),lX=(e,t,r)=>{if(t!=null){var n=fu(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},RD=V([fu,Sw,MD,Nw],gD),Nm=V([Ja,ei,We,Vt,ai,Nw,RD],vD),oX=V([Ow,Nm],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),DD=V([ai,_w],dD),uX=V([RD,_w,Hn,Zo,DD,xD,Sw],bD),cX=V([Ow,_w],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),dX=(e,t,r,n,i,l,o)=>{if(!(!e||!r||!n||!i)&&aX(e,o)){var c=Hq(e,t),f=PD(c,l,i,r,n),h=rX(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},fX=(e,t,r,n,i,l,o)=>{if(!(!e||!n||!i||!l||!r)){var c=kF(e,r);if(c){var f=Fq(c,t),h=PD(f,o,l,n,i),p=nX(t,l,h,c);return{activeIndex:String(h),activeCoordinate:p}}}},hX=(e,t,r,n,i,l,o,c)=>{if(!(!e||!t||!n||!i||!l))return t==="horizontal"||t==="vertical"?dX(e,t,n,i,l,o,c):fX(e,t,r,n,i,l,o)},mX=V(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),pX=V(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Gt)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:lK}});function OT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _T(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OT(Object(r),!0).forEach(function(n){yX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yX(e,t,r){return(t=vX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vX(e){var t=gX(e,"string");return typeof t=="symbol"?t:t+""}function gX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xX={},bX={zIndexMap:Object.values(Gt).reduce((e,t)=>_T(_T({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),xX)},jX=new Set(Object.values(Gt));function wX(e){return jX.has(e)}var kD=vr({name:"zIndex",initialState:bX,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:lt()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!wX(r)&&delete e.zIndexMap[r])},prepare:lt()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:i}=t.payload;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:i?void 0:n,panoramaElement:i?n:void 0}},prepare:lt()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:lt()}}}),{registerZIndexPortal:SX,unregisterZIndexPortal:B0,registerZIndexPortalElement:NX,unregisterZIndexPortalElement:OX}=kD.actions,_X=kD.reducer;function En(e){var{zIndex:t,children:r}=e,n=S7(),i=n&&t!==void 0&&t!==0,l=gr(),o=S.useRef(void 0),c=S.useRef(new Set),f=ct(),h=ge(y=>mX(y,t,l));if(S.useLayoutEffect(()=>{if(!i){var y=c.current;y.forEach(x=>{f(B0({zIndex:x}))}),y.clear(),o.current=void 0;return}if(c.current.has(t)||(f(SX({zIndex:t})),c.current.add(t)),h){o.current=h;var v=c.current;v.forEach(x=>{x!==t&&(f(B0({zIndex:x})),v.delete(x))})}},[f,t,i,h]),S.useLayoutEffect(()=>{var y=c.current;return()=>{y.forEach(v=>{f(B0({zIndex:v}))}),y.clear()}},[f]),!i)return r;var p=h??o.current;return p?$m.createPortal(r,p):null}function pb(){return pb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pb.apply(null,arguments)}function ET(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ET(Object(r),!0).forEach(function(n){EX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ET(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EX(e,t,r){return(t=AX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AX(e){var t=CX(e,"string");return typeof t=="symbol"?t:t+""}function CX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function TX(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return S.isValidElement(t)?S.cloneElement(t,n):S.createElement(r,n)}function PX(e){var t,{coordinate:r,payload:n,index:i,offset:l,tooltipAxisBandSize:o,layout:c,cursor:f,tooltipEventType:h,chartName:p}=e,y=r,v=n,x=i;if(!f||!y||p!=="ScatterChart"&&h!=="axis")return null;var b,w,N;if(p==="ScatterChart")b=y,w=QH,N=Gt.cursorLine;else if(p==="BarChart")b=XH(c,y,l,o),w=g3,N=Gt.cursorRectangle;else if(c==="radial"&&tR(y)){var{cx:O,cy:C,radius:E,startAngle:A,endAngle:T}=x3(y);b={cx:O,cy:C,startAngle:A,endAngle:T,innerRadius:E,outerRadius:E},w=j3,N=Gt.cursorLine}else b={points:zF(c,y,l)},w=h3,N=Gt.cursorLine;var M=typeof f=="object"&&"className"in f?f.className:void 0,R=hh(hh(hh(hh({stroke:"#ccc",pointerEvents:"none"},l),b),cd(f)),{},{payload:v,payloadIndex:x,className:Xe("recharts-tooltip-cursor",M)});return S.createElement(En,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:N},S.createElement(TX,{cursor:f,cursorComp:w,cursorProps:R}))}function MX(e){var t=ZQ(),r=e3(),n=yl(),i=iX();return t==null||r==null||n==null||i==null?null:S.createElement(PX,pb({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var ID=S.createContext(null),RX=()=>S.useContext(ID),U0={exports:{}},AT;function DX(){return AT||(AT=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function l(f,h,p,y,v){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new i(p,y||f,v),b=r?r+h:h;return f._events[b]?f._events[b].fn?f._events[b]=[f._events[b],x]:f._events[b].push(x):(f._events[b]=x,f._eventsCount++),f}function o(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],p,y;if(this._eventsCount===0)return h;for(y in p=this._events)t.call(p,y)&&h.push(r?y.slice(1):y);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},c.prototype.listeners=function(h){var p=r?r+h:h,y=this._events[p];if(!y)return[];if(y.fn)return[y.fn];for(var v=0,x=y.length,b=new Array(x);v<x;v++)b[v]=y[v].fn;return b},c.prototype.listenerCount=function(h){var p=r?r+h:h,y=this._events[p];return y?y.fn?1:y.length:0},c.prototype.emit=function(h,p,y,v,x,b){var w=r?r+h:h;if(!this._events[w])return!1;var N=this._events[w],O=arguments.length,C,E;if(N.fn){switch(N.once&&this.removeListener(h,N.fn,void 0,!0),O){case 1:return N.fn.call(N.context),!0;case 2:return N.fn.call(N.context,p),!0;case 3:return N.fn.call(N.context,p,y),!0;case 4:return N.fn.call(N.context,p,y,v),!0;case 5:return N.fn.call(N.context,p,y,v,x),!0;case 6:return N.fn.call(N.context,p,y,v,x,b),!0}for(E=1,C=new Array(O-1);E<O;E++)C[E-1]=arguments[E];N.fn.apply(N.context,C)}else{var A=N.length,T;for(E=0;E<A;E++)switch(N[E].once&&this.removeListener(h,N[E].fn,void 0,!0),O){case 1:N[E].fn.call(N[E].context);break;case 2:N[E].fn.call(N[E].context,p);break;case 3:N[E].fn.call(N[E].context,p,y);break;case 4:N[E].fn.call(N[E].context,p,y,v);break;default:if(!C)for(T=1,C=new Array(O-1);T<O;T++)C[T-1]=arguments[T];N[E].fn.apply(N[E].context,C)}}return!0},c.prototype.on=function(h,p,y){return l(this,h,p,y,!1)},c.prototype.once=function(h,p,y){return l(this,h,p,y,!0)},c.prototype.removeListener=function(h,p,y,v){var x=r?r+h:h;if(!this._events[x])return this;if(!p)return o(this,x),this;var b=this._events[x];if(b.fn)b.fn===p&&(!v||b.once)&&(!y||b.context===y)&&o(this,x);else{for(var w=0,N=[],O=b.length;w<O;w++)(b[w].fn!==p||v&&!b[w].once||y&&b[w].context!==y)&&N.push(b[w]);N.length?this._events[x]=N.length===1?N[0]:N:o(this,x)}return this},c.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&o(this,p)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,e.exports=c})(U0)),U0.exports}var kX=DX();const IX=as(kX);var Jc=new IX,yb="recharts.syncEvent.tooltip",CT="recharts.syncEvent.brush",LD=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!la(r))return e[r]}},LX={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},$D=vr({name:"options",initialState:LX,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),$X=$D.reducer,{createEventEmitter:zX}=$D.actions;function BX(e){return e.tooltip.syncInteraction}var UX={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},zD=vr({name:"chartData",initialState:UX,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:TT,setDataStartEndIndexes:qX,setComputedData:Tse}=zD.actions,HX=zD.reducer,FX=["x","y"];function PT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(r),!0).forEach(function(n){KX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KX(e,t,r){return(t=GX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GX(e){var t=YX(e,"string");return typeof t=="symbol"?t:t+""}function YX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VX(e,t){if(e==null)return{};var r,n,i=QX(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function QX(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function XX(){var e=ge(Rj),t=ge(Dj),r=ct(),n=ge(L3),i=ge(ai),l=yl(),o=lp(),c=ge(f=>f.rootProps.className);S.useEffect(()=>{if(e==null)return pl;var f=(h,p,y)=>{if(t!==y&&e===h){if(p.payload.active===!1){r(Ec({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var v;if(o&&p!==null&&p!==void 0&&(v=p.payload)!==null&&v!==void 0&&v.coordinate&&p.payload.sourceViewBox){var x=p.payload.coordinate,{x:b,y:w}=x,N=VX(x,FX),{x:O,y:C,width:E,height:A}=p.payload.sourceViewBox,T=mo(mo({},N),{},{x:o.x+(E?(b-O)/E:0)*o.width,y:o.y+(A?(w-C)/A:0)*o.height});r(mo(mo({},p),{},{payload:mo(mo({},p.payload),{},{coordinate:T})}))}else r(p);return}if(i!=null){var M;if(typeof n=="function"){var R={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},D=n(i,R);M=i[D]}else n==="value"&&(M=i.find($=>String($.value)===p.payload.label));var{coordinate:I}=p.payload;if(I==null||o==null){r(Ec({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(M==null){r(Ec({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:k,y:H}=I,q=Math.min(k,o.x+o.width),ie=Math.min(H,o.y+o.height),re={x:l==="horizontal"?M.coordinate:q,y:l==="horizontal"?ie:M.coordinate},W=Ec({active:p.payload.active,coordinate:re,dataKey:p.payload.dataKey,index:String(M.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(W)}}};return Jc.on(yb,f),()=>{Jc.off(yb,f)}},[c,r,t,e,n,i,l,o])}function WX(){var e=ge(Rj),t=ge(Dj),r=ct();S.useEffect(()=>{if(e==null)return pl;var n=(i,l,o)=>{t!==o&&e===i&&r(qX(l))};return Jc.on(CT,n),()=>{Jc.off(CT,n)}},[r,t,e])}function ZX(){var e=ct();S.useEffect(()=>{e(zX())},[e]),XX(),WX()}function JX(e,t,r,n,i,l){var o=ge(b=>lX(b,e,t)),c=ge(qQ),f=ge(Dj),h=ge(Rj),p=ge(L3),y=ge(BX),v=(y==null?void 0:y.sourceViewBox)!=null,x=lp();S.useEffect(()=>{if(!v&&h!=null&&f!=null){var b=Ec({active:l,coordinate:r,dataKey:o,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:x,graphicalItemId:c});Jc.emit(yb,h,b,f)}},[v,r,o,c,i,n,f,h,p,l,x])}function MT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function RT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MT(Object(r),!0).forEach(function(n){eW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eW(e,t,r){return(t=tW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tW(e){var t=rW(e,"string");return typeof t=="symbol"?t:t+""}function rW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nW(e){return e.dataKey}function aW(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(NH,t)}var DT=[],iW={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Ew(e){var t,r,n=or(e,iW),{active:i,allowEscapeViewBox:l,animationDuration:o,animationEasing:c,content:f,filterNull:h,isAnimationActive:p,offset:y,payloadUniqBy:v,position:x,reverseDirection:b,useTranslate3d:w,wrapperStyle:N,cursor:O,shared:C,trigger:E,defaultIndex:A,portal:T,axisId:M}=n,R=ct(),D=typeof A=="number"?String(A):A;S.useEffect(()=>{R(XV({shared:C,trigger:E,axisId:M,active:i,defaultIndex:D}))},[R,C,E,M,i,D]);var I=lp(),k=f3(),H=FV(C),{activeIndex:q,isActive:ie}=(t=ge(Pe=>cX(Pe,H,E,D)))!==null&&t!==void 0?t:{},re=ge(Pe=>uX(Pe,H,E,D)),W=ge(Pe=>DD(Pe,H,E,D)),$=ge(Pe=>oX(Pe,H,E,D)),F=re,J=RX(),ne=(r=i??ie)!==null&&r!==void 0?r:!1,[ce,L]=vR([F,ne]),X=H==="axis"?W:void 0;JX(H,E,$,X,q,ne);var le=T??J;if(le==null||I==null||H==null)return null;var oe=F??DT;ne||(oe=DT),h&&oe.length&&(oe=fR(oe.filter(Pe=>Pe.value!=null&&(Pe.hide!==!0||n.includeHidden)),v,nW));var he=oe.length>0,je=RT(RT({},n),{},{payload:oe,label:X,active:ne,activeIndex:q,coordinate:$,accessibilityLayer:k}),Ne=S.createElement(kH,{allowEscapeViewBox:l,animationDuration:o,animationEasing:c,isAnimationActive:p,active:ne,coordinate:$,hasPayload:he,offset:y,position:x,reverseDirection:b,useTranslate3d:w,viewBox:I,wrapperStyle:N,lastBoundingBox:ce,innerRef:L,hasPortalFromProps:!!T},aW(f,je));return S.createElement(S.Fragment,null,$m.createPortal(Ne,le),ne&&S.createElement(MX,{cursor:O,tooltipEventType:H,coordinate:$,payload:oe,index:q}))}var Aw=e=>null;Aw.displayName="Cell";function sW(e,t,r){return(t=lW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lW(e){var t=oW(e,"string");return typeof t=="symbol"?t:t+""}function oW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class uW{constructor(t){sW(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function kT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cW(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kT(Object(r),!0).forEach(function(n){dW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dW(e,t,r){return(t=fW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fW(e){var t=hW(e,"string");return typeof t=="symbol"?t:t+""}function hW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mW={cacheSize:2e3,enableCache:!0},BD=cW({},mW),IT=new uW(BD.cacheSize),pW={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},LT="recharts_measurement_span";function yW(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",l=t.fontStyle||"",o=t.letterSpacing||"",c=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(l,"|").concat(o,"|").concat(c)}var $T=(e,t)=>{try{var r=document.getElementById(LT);r||(r=document.createElement("span"),r.setAttribute("id",LT),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,pW,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Tc=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||vd.isSsr)return{width:0,height:0};if(!BD.enableCache)return $T(t,r);var n=yW(t,r),i=IT.get(n);if(i)return i;var l=$T(t,r);return IT.set(n,l),l},UD;function vW(e,t,r){return(t=gW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gW(e){var t=xW(e,"string");return typeof t=="symbol"?t:t+""}function xW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,BT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,bW=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,jW=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,wW={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},SW=["cm","mm","pt","pc","in","Q","px"];function NW(e){return SW.includes(e)}var So="NaN";function OW(e,t){return e*wW[t]}class ir{static parse(t){var r,[,n,i]=(r=jW.exec(t))!==null&&r!==void 0?r:[];return n==null?ir.NaN:new ir(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,la(t)&&(this.unit=""),r!==""&&!bW.test(r)&&(this.num=NaN,this.unit=""),NW(r)&&(this.num=OW(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new ir(NaN,""):new ir(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new ir(NaN,""):new ir(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ir(NaN,""):new ir(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ir(NaN,""):new ir(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return la(this.num)}}UD=ir;vW(ir,"NaN",new UD(NaN,""));function qD(e){if(e==null||e.includes(So))return So;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,l]=(r=zT.exec(t))!==null&&r!==void 0?r:[],o=ir.parse(n??""),c=ir.parse(l??""),f=i==="*"?o.multiply(c):o.divide(c);if(f.isNaN())return So;t=t.replace(zT,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,[,p,y,v]=(h=BT.exec(t))!==null&&h!==void 0?h:[],x=ir.parse(p??""),b=ir.parse(v??""),w=y==="+"?x.add(b):x.subtract(b);if(w.isNaN())return So;t=t.replace(BT,w.toString())}return t}var UT=/\(([^()]*)\)/;function _W(e){for(var t=e,r;(r=UT.exec(t))!=null;){var[,n]=r;t=t.replace(UT,qD(n))}return t}function EW(e){var t=e.replace(/\s+/g,"");return t=_W(t),t=qD(t),t}function AW(e){try{return EW(e)}catch{return So}}function q0(e){var t=AW(e.slice(5,-1));return t===So?"":t}var CW=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],TW=["dx","dy","angle","className","breakAll"];function vb(){return vb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vb.apply(null,arguments)}function qT(e,t){if(e==null)return{};var r,n,i=PW(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function PW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var HD=/[ \f\n\r\t\v\u2028\u2029]+/,FD=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];mt(t)||(r?i=t.toString().split(""):i=t.toString().split(HD));var l=i.map(c=>({word:c,width:Tc(c,n).width})),o=r?0:Tc(" ",n).width;return{wordsWithComputedWidth:l,spaceWidth:o}}catch{return null}};function KD(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function MW(e){return mt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var GD=(e,t,r,n)=>e.reduce((i,l)=>{var{word:o,width:c}=l,f=i[i.length-1];if(f&&c!=null&&(t==null||n||f.width+c+r<Number(t)))f.words.push(o),f.width+=c+r;else{var h={words:[o],width:c};i.push(h)}return i},[]),YD=e=>e.reduce((t,r)=>t.width>r.width?t:r),RW="…",HT=(e,t,r,n,i,l,o,c)=>{var f=e.slice(0,t),h=FD({breakAll:r,style:n,children:f+RW});if(!h)return[!1,[]];var p=GD(h.wordsWithComputedWidth,l,o,c),y=p.length>i||YD(p).width>Number(l);return[y,p]},DW=(e,t,r,n,i)=>{var{maxLines:l,children:o,style:c,breakAll:f}=e,h=ye(l),p=String(o),y=GD(t,n,r,i);if(!h||i)return y;var v=y.length>l||YD(y).width>Number(n);if(!v)return y;for(var x=0,b=p.length-1,w=0,N;x<=b&&w<=p.length-1;){var O=Math.floor((x+b)/2),C=O-1,[E,A]=HT(p,C,f,c,l,n,r,i),[T]=HT(p,O,f,c,l,n,r,i);if(!E&&!T&&(x=O+1),E&&T&&(b=O-1),!E&&T){N=A;break}w++}return N||y},FT=e=>{var t=mt(e)?[]:e.toString().split(HD);return[{words:t,width:void 0}]},kW=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:l,maxLines:o}=e;if((t||r)&&!vd.isSsr){var c,f,h=FD({breakAll:l,children:n,style:i});if(h){var{wordsWithComputedWidth:p,spaceWidth:y}=h;c=p,f=y}else return FT(n);return DW({breakAll:l,children:n,maxLines:o,style:i},c,f,t,!!r)}return FT(n)},VD="#808080",IW={angle:0,breakAll:!1,capHeight:"0.71em",fill:VD,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Cw=S.forwardRef((e,t)=>{var r=or(e,IW),{x:n,y:i,lineHeight:l,capHeight:o,fill:c,scaleToFit:f,textAnchor:h,verticalAnchor:p}=r,y=qT(r,CW),v=S.useMemo(()=>kW({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:f,style:y.style,width:y.width}),[y.breakAll,y.children,y.maxLines,f,y.style,y.width]),{dx:x,dy:b,angle:w,className:N,breakAll:O}=y,C=qT(y,TW);if(!oa(n)||!oa(i)||v.length===0)return null;var E=Number(n)+(ye(x)?x:0),A=Number(i)+(ye(b)?b:0);if(!Be(E)||!Be(A))return null;var T;switch(p){case"start":T=q0("calc(".concat(o,")"));break;case"middle":T=q0("calc(".concat((v.length-1)/2," * -").concat(l," + (").concat(o," / 2))"));break;default:T=q0("calc(".concat(v.length-1," * -").concat(l,")"));break}var M=[],R=v[0];if(f&&R!=null){var D=R.width,{width:I}=y;M.push("scale(".concat(ye(I)&&ye(D)?I/D:1,")"))}return w&&M.push("rotate(".concat(w,", ").concat(E,", ").concat(A,")")),M.length&&(C.transform=M.join(" ")),S.createElement("text",vb({},Or(C),{ref:t,x:E,y:A,className:Xe("recharts-text",N),textAnchor:h,fill:c.includes("url")?VD:c}),v.map((k,H)=>{var q=k.words.join(O?"":" ");return S.createElement("tspan",{x:E,dy:H===0?T:l,key:"".concat(q,"-").concat(H)},q)}))});Cw.displayName="Text";function KT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KT(Object(r),!0).forEach(function(n){LW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LW(e,t,r){return(t=$W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $W(e){var t=zW(e,"string");return typeof t=="symbol"?t:t+""}function zW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var BW=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i}=e,{x:l,y:o,height:c,upperWidth:f,lowerWidth:h}=Sj(t),p=l,y=l+(f-h)/2,v=(p+y)/2,x=(f+h)/2,b=p+f/2,w=c>=0?1:-1,N=w*n,O=w>0?"end":"start",C=w>0?"start":"end",E=f>=0?1:-1,A=E*n,T=E>0?"end":"start",M=E>0?"start":"end",R=i;if(r==="top"){var D={x:p+f/2,y:o-N,horizontalAnchor:"middle",verticalAnchor:O};return R&&(D.height=Math.max(o-R.y,0),D.width=f),D}if(r==="bottom"){var I={x:y+h/2,y:o+c+N,horizontalAnchor:"middle",verticalAnchor:C};return R&&(I.height=Math.max(R.y+R.height-(o+c),0),I.width=h),I}if(r==="left"){var k={x:v-A,y:o+c/2,horizontalAnchor:T,verticalAnchor:"middle"};return R&&(k.width=Math.max(k.x-R.x,0),k.height=c),k}if(r==="right"){var H={x:v+x+A,y:o+c/2,horizontalAnchor:M,verticalAnchor:"middle"};return R&&(H.width=Math.max(R.x+R.width-H.x,0),H.height=c),H}var q=R?{width:x,height:c}:{};return r==="insideLeft"?Wn({x:v+A,y:o+c/2,horizontalAnchor:M,verticalAnchor:"middle"},q):r==="insideRight"?Wn({x:v+x-A,y:o+c/2,horizontalAnchor:T,verticalAnchor:"middle"},q):r==="insideTop"?Wn({x:p+f/2,y:o+N,horizontalAnchor:"middle",verticalAnchor:C},q):r==="insideBottom"?Wn({x:y+h/2,y:o+c-N,horizontalAnchor:"middle",verticalAnchor:O},q):r==="insideTopLeft"?Wn({x:p+A,y:o+N,horizontalAnchor:M,verticalAnchor:C},q):r==="insideTopRight"?Wn({x:p+f-A,y:o+N,horizontalAnchor:T,verticalAnchor:C},q):r==="insideBottomLeft"?Wn({x:y+A,y:o+c-N,horizontalAnchor:M,verticalAnchor:O},q):r==="insideBottomRight"?Wn({x:y+h-A,y:o+c-N,horizontalAnchor:T,verticalAnchor:O},q):r&&typeof r=="object"&&(ye(r.x)||il(r.x))&&(ye(r.y)||il(r.y))?Wn({x:l+zn(r.x,x),y:o+zn(r.y,c),horizontalAnchor:"end",verticalAnchor:"end"},q):Wn({x:b,y:o+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},q)},UW=["labelRef"],qW=["content"];function GT(e,t){if(e==null)return{};var r,n,i=HW(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function HW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function YT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ac(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YT(Object(r),!0).forEach(function(n){FW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FW(e,t,r){return(t=KW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KW(e){var t=GW(e,"string");return typeof t=="symbol"?t:t+""}function GW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function za(){return za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},za.apply(null,arguments)}var QD=S.createContext(null),YW=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:l,height:o,children:c}=e,f=S.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:l,height:o}),[t,r,n,i,l,o]);return S.createElement(QD.Provider,{value:f},c)},XD=()=>{var e=S.useContext(QD),t=lp();return e||(t?Sj(t):void 0)},VW=S.createContext(null),QW=()=>{var e=S.useContext(VW),t=ge(q3);return e||t},XW=e=>{var{value:t,formatter:r}=e,n=mt(e.children)?t:e.children;return typeof r=="function"?r(n):n},Tw=e=>e!=null&&typeof e=="function",WW=(e,t)=>{var r=Br(t-e),n=Math.min(Math.abs(t-e),360);return r*n},ZW=(e,t,r,n,i)=>{var{offset:l,className:o}=e,{cx:c,cy:f,innerRadius:h,outerRadius:p,startAngle:y,endAngle:v,clockWise:x}=i,b=(h+p)/2,w=WW(y,v),N=w>=0?1:-1,O,C;switch(t){case"insideStart":O=y+N*l,C=x;break;case"insideEnd":O=v-N*l,C=!x;break;case"end":O=v+N*l,C=x;break;default:throw new Error("Unsupported position ".concat(t))}C=w<=0?C:!C;var E=sr(c,f,b,O),A=sr(c,f,b,O+(C?1:-1)*359),T="M".concat(E.x,",").concat(E.y,`
|
|
108
|
-
A`).concat(b,",").concat(b,",0,1,").concat(C?0:1,`,
|
|
109
|
-
`).concat(A.x,",").concat(A.y),M=mt(e.id)?Bc("recharts-radial-line-"):e.id;return S.createElement("text",za({},n,{dominantBaseline:"central",className:Xe("recharts-radial-bar-label",o)}),S.createElement("defs",null,S.createElement("path",{id:M,d:T})),S.createElement("textPath",{xlinkHref:"#".concat(M)},r))},JW=(e,t,r)=>{var{cx:n,cy:i,innerRadius:l,outerRadius:o,startAngle:c,endAngle:f}=e,h=(c+f)/2;if(r==="outside"){var{x:p,y}=sr(n,i,o+t,h);return{x:p,y,textAnchor:p>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var v=(l+o)/2,{x,y:b}=sr(n,i,v,h);return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Eh=e=>e!=null&&"cx"in e&&ye(e.cx),eZ={angle:0,offset:5,zIndex:Gt.label,position:"middle",textBreakAll:!1};function tZ(e){if(!Eh(e))return e;var{cx:t,cy:r,outerRadius:n}=e,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function ki(e){var t=or(e,eZ),{viewBox:r,parentViewBox:n,position:i,value:l,children:o,content:c,className:f="",textBreakAll:h,labelRef:p}=t,y=QW(),v=XD(),x=i==="center"?v:y??v,b,w,N;r==null?b=x:Eh(r)?b=r:b=Sj(r);var O=tZ(b);if(!b||mt(l)&&mt(o)&&!S.isValidElement(c)&&typeof c!="function")return null;var C=Ac(Ac({},t),{},{viewBox:b});if(S.isValidElement(c)){var{labelRef:E}=C,A=GT(C,UW);return S.cloneElement(c,A)}if(typeof c=="function"){var{content:T}=C,M=GT(C,qW);if(w=S.createElement(c,M),S.isValidElement(w))return w}else w=XW(t);var R=Or(t);if(Eh(b)){if(i==="insideStart"||i==="insideEnd"||i==="end")return ZW(t,i,w,R,b);N=JW(b,t.offset,t.position)}else{if(!O)return null;var D=BW({viewBox:O,position:i,offset:t.offset,parentViewBox:Eh(n)?void 0:n});N=Ac(Ac({x:D.x,y:D.y,textAnchor:D.horizontalAnchor,verticalAnchor:D.verticalAnchor},D.width!==void 0?{width:D.width}:{}),D.height!==void 0?{height:D.height}:{})}return S.createElement(En,{zIndex:t.zIndex},S.createElement(Cw,za({ref:p,className:Xe("recharts-label",f)},R,N,{textAnchor:KD(R.textAnchor)?R.textAnchor:N.textAnchor,breakAll:h}),w))}ki.displayName="Label";var rZ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?S.createElement(ki,za({key:"label-implicit"},n)):oa(e)?S.createElement(ki,za({key:"label-implicit",value:e},n)):S.isValidElement(e)?e.type===ki?S.cloneElement(e,Ac({key:"label-implicit"},n)):S.createElement(ki,za({key:"label-implicit",content:e},n)):Tw(e)?S.createElement(ki,za({key:"label-implicit",content:e},n)):e&&typeof e=="object"?S.createElement(ki,za({},e,{key:"label-implicit"},n)):null};function nZ(e){var{label:t,labelRef:r}=e,n=XD();return rZ(t,n,r)||null}var aZ=["valueAccessor"],iZ=["dataKey","clockWise","id","textBreakAll","zIndex"];function Om(){return Om=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Om.apply(null,arguments)}function VT(e,t){if(e==null)return{};var r,n,i=sZ(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function sZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var lZ=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(MW(t))return t},WD=S.createContext(void 0),ZD=WD.Provider,JD=S.createContext(void 0);JD.Provider;function oZ(){return S.useContext(WD)}function uZ(){return S.useContext(JD)}function Ah(e){var{valueAccessor:t=lZ}=e,r=VT(e,aZ),{dataKey:n,clockWise:i,id:l,textBreakAll:o,zIndex:c}=r,f=VT(r,iZ),h=oZ(),p=uZ(),y=h||p;return!y||!y.length?null:S.createElement(En,{zIndex:c??Gt.label},S.createElement(rn,{className:"recharts-label-list"},y.map((v,x)=>{var b,w=mt(n)?t(v,x):Ot(v.payload,n),N=mt(l)?{}:{id:"".concat(l,"-").concat(x)};return S.createElement(ki,Om({key:"label-".concat(x)},Or(v),f,N,{fill:(b=r.fill)!==null&&b!==void 0?b:v.fill,parentViewBox:v.parentViewBox,value:w,textBreakAll:o,viewBox:v.viewBox,index:x,zIndex:0}))})))}Ah.displayName="LabelList";function ek(e){var{label:t}=e;return t?t===!0?S.createElement(Ah,{key:"labelList-implicit"}):S.isValidElement(t)||Tw(t)?S.createElement(Ah,{key:"labelList-implicit",content:t}):typeof t=="object"?S.createElement(Ah,Om({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function gb(){return gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gb.apply(null,arguments)}var tk=e=>{var{cx:t,cy:r,r:n,className:i}=e,l=Xe("recharts-dot",i);return ye(t)&&ye(r)&&ye(n)?S.createElement("circle",gb({},$n(e),dj(e),{className:l,cx:t,cy:r,r:n})):null},cZ={radiusAxis:{},angleAxis:{}},rk=vr({name:"polarAxis",initialState:cZ,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:Pse,removeRadiusAxis:Mse,addAngleAxis:Rse,removeAngleAxis:Dse}=rk.actions,dZ=rk.reducer;function fZ(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var H0={exports:{}},tt={};/**
|
|
110
|
-
* @license React
|
|
111
|
-
* react-is.production.js
|
|
112
|
-
*
|
|
113
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the MIT license found in the
|
|
116
|
-
* LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/var QT;function hZ(){if(QT)return tt;QT=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function b(w){if(typeof w=="object"&&w!==null){var N=w.$$typeof;switch(N){case e:switch(w=w.type,w){case r:case i:case n:case f:case h:case v:return w;default:switch(w=w&&w.$$typeof,w){case o:case c:case y:case p:return w;case l:return w;default:return N}}case t:return N}}}return tt.ContextConsumer=l,tt.ContextProvider=o,tt.Element=e,tt.ForwardRef=c,tt.Fragment=r,tt.Lazy=y,tt.Memo=p,tt.Portal=t,tt.Profiler=i,tt.StrictMode=n,tt.Suspense=f,tt.SuspenseList=h,tt.isContextConsumer=function(w){return b(w)===l},tt.isContextProvider=function(w){return b(w)===o},tt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},tt.isForwardRef=function(w){return b(w)===c},tt.isFragment=function(w){return b(w)===r},tt.isLazy=function(w){return b(w)===y},tt.isMemo=function(w){return b(w)===p},tt.isPortal=function(w){return b(w)===t},tt.isProfiler=function(w){return b(w)===i},tt.isStrictMode=function(w){return b(w)===n},tt.isSuspense=function(w){return b(w)===f},tt.isSuspenseList=function(w){return b(w)===h},tt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===i||w===n||w===f||w===h||typeof w=="object"&&w!==null&&(w.$$typeof===y||w.$$typeof===p||w.$$typeof===o||w.$$typeof===l||w.$$typeof===c||w.$$typeof===x||w.getModuleId!==void 0)},tt.typeOf=b,tt}var XT;function mZ(){return XT||(XT=1,H0.exports=hZ()),H0.exports}var pZ=mZ(),WT=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",ZT=null,F0=null,nk=e=>{if(e===ZT&&Array.isArray(F0))return F0;var t=[];return S.Children.forEach(e,r=>{mt(r)||(pZ.isFragment(r)?t=t.concat(nk(r.props.children)):t.push(r))}),F0=t,ZT=e,t};function yZ(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>WT(i)):n=[WT(t)],nk(e).forEach(i=>{var l=Fo(i,"type.displayName")||Fo(i,"type.name");l&&n.indexOf(l)!==-1&&r.push(i)}),r}var ak=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,K0={},JT;function vZ(){return JT||(JT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var i;if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const l=r[Symbol.toStringTag];return l==null||!((i=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag))!=null&&i.writable)?!1:r.toString()===`[object ${l}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(K0)),K0}var G0,eP;function gZ(){return eP||(eP=1,G0=vZ().isPlainObject),G0}var xZ=gZ();const bZ=as(xZ);var tP,rP,nP,aP,iP;function sP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sP(Object(r),!0).forEach(function(n){jZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jZ(e,t,r){return(t=wZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wZ(e){var t=SZ(e,"string");return typeof t=="symbol"?t:t+""}function SZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _m(){return _m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_m.apply(null,arguments)}function jc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var oP=(e,t,r,n,i)=>{var l=r-n,o;return o=bt(tP||(tP=jc(["M ",",",""])),e,t),o+=bt(rP||(rP=jc(["L ",",",""])),e+r,t),o+=bt(nP||(nP=jc(["L ",",",""])),e+r-l/2,t+i),o+=bt(aP||(aP=jc(["L ",",",""])),e+r-l/2-n,t+i),o+=bt(iP||(iP=jc(["L ",","," Z"])),e,t),o},NZ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},OZ=e=>{var t=or(e,NZ),{x:r,y:n,upperWidth:i,lowerWidth:l,height:o,className:c}=t,{animationEasing:f,animationDuration:h,animationBegin:p,isUpdateAnimationActive:y}=t,v=S.useRef(null),[x,b]=S.useState(-1),w=S.useRef(i),N=S.useRef(l),O=S.useRef(o),C=S.useRef(r),E=S.useRef(n),A=fp(e,"trapezoid-");if(S.useEffect(()=>{if(v.current&&v.current.getTotalLength)try{var re=v.current.getTotalLength();re&&b(re)}catch{}},[]),r!==+r||n!==+n||i!==+i||l!==+l||o!==+o||i===0&&l===0||o===0)return null;var T=Xe("recharts-trapezoid",c);if(!y)return S.createElement("g",null,S.createElement("path",_m({},Or(t),{className:T,d:oP(r,n,i,l,o)})));var M=w.current,R=N.current,D=O.current,I=C.current,k=E.current,H="0px ".concat(x===-1?1:x,"px"),q="".concat(x,"px ").concat(x,"px"),ie=m3(["strokeDasharray"],h,f);return S.createElement(dp,{animationId:A,key:A,canBegin:x>0,duration:h,easing:f,isActive:y,begin:p},re=>{var W=jt(M,i,re),$=jt(R,l,re),F=jt(D,o,re),J=jt(I,r,re),ne=jt(k,n,re);v.current&&(w.current=W,N.current=$,O.current=F,C.current=J,E.current=ne);var ce=re>0?{transition:ie,strokeDasharray:q}:{strokeDasharray:H};return S.createElement("path",_m({},Or(t),{className:T,d:oP(J,ne,W,$,F),ref:v,style:lP(lP({},ce),t.style)}))})},_Z=["option","shapeType","activeClassName","inActiveClassName"];function EZ(e,t){if(e==null)return{};var r,n,i=AZ(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function AZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function uP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Em(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uP(Object(r),!0).forEach(function(n){CZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CZ(e,t,r){return(t=TZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TZ(e){var t=PZ(e,"string");return typeof t=="symbol"?t:t+""}function PZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MZ(e,t){return Em(Em({},t),e)}function RZ(e,t){return e==="symbols"}function cP(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return S.createElement(g3,r);case"trapezoid":return S.createElement(OZ,r);case"sector":return S.createElement(j3,r);case"symbols":if(RZ(t))return S.createElement(cj,r);break;case"curve":return S.createElement(h3,r);default:return null}}function DZ(e){return S.isValidElement(e)?e.props:e}function ik(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,l=EZ(e,_Z),o;if(S.isValidElement(t))o=S.cloneElement(t,Em(Em({},l),DZ(t)));else if(typeof t=="function")o=t(l,l.index);else if(bZ(t)&&typeof t!="boolean"){var c=MZ(t,l);o=S.createElement(cP,{shapeType:r,elementProps:c})}else{var f=l;o=S.createElement(cP,{shapeType:r,elementProps:f})}return l.isActive?S.createElement(rn,{className:n},o):S.createElement(rn,{className:i},o)}var sk=(e,t,r)=>{var n=ct();return(i,l)=>o=>{e==null||e(i,l,o),n(hD({activeIndex:String(l),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},lk=e=>{var t=ct();return(r,n)=>i=>{e==null||e(r,n,i),t(WV())}},ok=(e,t,r)=>{var n=ct();return(i,l)=>o=>{e==null||e(i,l,o),n(ZV({activeIndex:String(l),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function uk(e){var{tooltipEntrySettings:t}=e,r=ct(),n=gr(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(YV(t)):i.current!==t&&r(VV({prev:i.current,next:t})),i.current=t)},[t,r,n]),S.useLayoutEffect(()=>()=>{i.current&&(r(QV(i.current)),i.current=null)},[r]),null}function ck(e){var{legendPayload:t}=e,r=ct(),n=gr(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(L7(t)):i.current!==t&&r($7({prev:i.current,next:t})),i.current=t)},[r,n,t]),S.useLayoutEffect(()=>()=>{i.current&&(r(z7(i.current)),i.current=null)},[r]),null}var Y0,kZ=()=>{var[e]=S.useState(()=>Bc("uid-"));return e},IZ=(Y0=c$.useId)!==null&&Y0!==void 0?Y0:kZ;function LZ(e,t){var r=IZ();return t||(e?"".concat(e,"-").concat(r):r)}var $Z=S.createContext(void 0),dk=e=>{var{id:t,type:r,children:n}=e,i=LZ("recharts-".concat(r),t);return S.createElement($Z.Provider,{value:i},n(i))},zZ={cartesianItems:[],polarItems:[]},fk=vr({name:"graphicalItems",initialState:zZ,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:lt()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sn(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:lt()},removeCartesianGraphicalItem:{reducer(e,t){var r=Sn(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:lt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:lt()},removePolarGraphicalItem:{reducer(e,t){var r=Sn(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:lt()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sn(e).polarItems.indexOf(r);i>-1&&(e.polarItems[i]=n)},prepare:lt()}}}),{addCartesianGraphicalItem:BZ,replaceCartesianGraphicalItem:UZ,removeCartesianGraphicalItem:qZ,addPolarGraphicalItem:kse,removePolarGraphicalItem:Ise,replacePolarGraphicalItem:Lse}=fk.actions,HZ=fk.reducer,FZ=e=>{var t=ct(),r=S.useRef(null);return S.useLayoutEffect(()=>{r.current===null?t(BZ(e)):r.current!==e&&t(UZ({prev:r.current,next:e})),r.current=e},[t,e]),S.useLayoutEffect(()=>()=>{r.current&&(t(qZ(r.current)),r.current=null)},[t]),null},hk=S.memo(FZ),KZ=["points"];function dP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function V0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dP(Object(r),!0).forEach(function(n){GZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GZ(e,t,r){return(t=YZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YZ(e){var t=VZ(e,"string");return typeof t=="symbol"?t:t+""}function VZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Am(){return Am=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Am.apply(null,arguments)}function QZ(e,t){if(e==null)return{};var r,n,i=XZ(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function XZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function WZ(e){var{option:t,dotProps:r,className:n}=e;if(S.isValidElement(t))return S.cloneElement(t,r);if(typeof t=="function")return t(r);var i=Xe(n,typeof t!="boolean"?t.className:""),l=r??{},{points:o}=l,c=QZ(l,KZ);return S.createElement(tk,Am({},c,{className:i}))}function ZZ(e,t){return e==null?!1:t?!0:e.length===1}function JZ(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:l,baseProps:o,needClip:c,clipPathId:f,zIndex:h=Gt.scatter}=e;if(!ZZ(t,r))return null;var p=ak(r),y=S6(r),v=t.map((b,w)=>{var N,O,C=V0(V0(V0({r:3},o),y),{},{index:w,cx:(N=b.x)!==null&&N!==void 0?N:void 0,cy:(O=b.y)!==null&&O!==void 0?O:void 0,dataKey:l,value:b.value,payload:b.payload,points:t});return S.createElement(WZ,{key:"dot-".concat(w),option:r,dotProps:C,className:i})}),x={};return c&&f!=null&&(x.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(f,")")),S.createElement(En,{zIndex:h},S.createElement(rn,Am({className:n},x),v))}function fP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fP(Object(r),!0).forEach(function(n){eJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eJ(e,t,r){return(t=tJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tJ(e){var t=rJ(e,"string");return typeof t=="symbol"?t:t+""}function rJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mk=0,nJ={xAxis:{},yAxis:{},zAxis:{}},pk=vr({name:"cartesianAxis",initialState:nJ,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:lt()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=n)},prepare:lt()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:lt()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:lt()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=n)},prepare:lt()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:lt()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:lt()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=n)},prepare:lt()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:lt()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var l,o=i.widthHistory||[];if(o.length===3&&o[0]===o[2]&&n===o[1]&&n!==i.width&&Math.abs(n-((l=o[0])!==null&&l!==void 0?l:0))<=1)return;var c=[...o,n].slice(-3);e.yAxis[r]=hP(hP({},i),{},{width:n,widthHistory:c})}}}}),{addXAxis:aJ,replaceXAxis:iJ,removeXAxis:sJ,addYAxis:lJ,replaceYAxis:oJ,removeYAxis:uJ,addZAxis:$se,replaceZAxis:zse,removeZAxis:Bse,updateYAxisWidth:cJ}=pk.actions,dJ=pk.reducer,fJ=V([Vt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),hJ=V([fJ,Ja,ei],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),Pw=()=>ge(hJ),mJ=()=>ge(YQ);function mP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Q0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mP(Object(r),!0).forEach(function(n){pJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pJ(e,t,r){return(t=yJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yJ(e){var t=vJ(e,"string");return typeof t=="symbol"?t:t+""}function vJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gJ=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:l,clipPath:o}=e;if(i===!1||t.x==null||t.y==null)return null;var c={index:r,dataKey:l,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=Q0(Q0(Q0({},c),cd(i)),dj(i)),h;return S.isValidElement(i)?h=S.cloneElement(i,f):typeof i=="function"?h=i(f):h=S.createElement(tk,f),S.createElement(rn,{className:"recharts-active-dot",clipPath:o},h)};function xJ(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:l,zIndex:o=Gt.activeDot}=e,c=ge(dl),f=mJ();if(t==null||f==null)return null;var h=t.find(p=>f.includes(p.payload));return mt(h)?null:S.createElement(En,{zIndex:o},S.createElement(gJ,{point:h,childIndex:Number(c),mainColor:r,dataKey:i,activeDot:n,clipPath:l}))}var pP=(e,t,r)=>{var n=r??e;if(!mt(n))return zn(n,t,0)},bJ=(e,t,r)=>{var n={},i=e.filter(gp),l=e.filter(h=>h.stackId==null),o=i.reduce((h,p)=>{var y=h[p.stackId];return y==null&&(y=[]),y.push(p),h[p.stackId]=y,h},n),c=Object.entries(o).map(h=>{var p,[y,v]=h,x=v.map(w=>w.dataKey),b=pP(t,r,(p=v[0])===null||p===void 0?void 0:p.barSize);return{stackId:y,dataKeys:x,barSize:b}}),f=l.map(h=>{var p=[h.dataKey].filter(v=>v!=null),y=pP(t,r,h.barSize);return{stackId:void 0,dataKeys:p,barSize:y}});return[...c,...f]};function yP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yP(Object(r),!0).forEach(function(n){jJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jJ(e,t,r){return(t=wJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wJ(e){var t=SJ(e,"string");return typeof t=="symbol"?t:t+""}function SJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NJ(e,t,r,n,i){var l,o=n.length;if(!(o<1)){var c=zn(e,r,0,!0),f,h=[];if(Be((l=n[0])===null||l===void 0?void 0:l.barSize)){var p=!1,y=r/o,v=n.reduce((C,E)=>C+(E.barSize||0),0);v+=(o-1)*c,v>=r&&(v-=(o-1)*c,c=0),v>=r&&y>0&&(p=!0,y*=.9,v=o*y);var x=(r-v)/2>>0,b={offset:x-c,size:0};f=n.reduce((C,E)=>{var A,T={stackId:E.stackId,dataKeys:E.dataKeys,position:{offset:b.offset+b.size+c,size:p?y:(A=E.barSize)!==null&&A!==void 0?A:0}},M=[...C,T];return b=T.position,M},h)}else{var w=zn(t,r,0,!0);r-2*w-(o-1)*c<=0&&(c=0);var N=(r-2*w-(o-1)*c)/o;N>1&&(N>>=0);var O=Be(i)?Math.min(N,i):N;f=n.reduce((C,E,A)=>[...C,{stackId:E.stackId,dataKeys:E.dataKeys,position:{offset:w+(N+c)*A+(N-O)/2,size:O}}],h)}return f}}var OJ=(e,t,r,n,i,l,o)=>{var c=mt(o)?t:o,f=NJ(r,n,i!==l?i:l,e,c);return i!==l&&f!=null&&(f=f.map(h=>mh(mh({},h),{},{position:mh(mh({},h.position),{},{offset:h.position.offset-i/2})}))),f},_J=(e,t)=>{var r=$j(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:l}=i;if(l)return l.find(o=>o.key===r)}}}},EJ=(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}};function AJ(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Be(e.zIndex)?e.zIndex:t}var CJ=e=>{var{chartData:t}=e,r=ct(),n=gr();return S.useEffect(()=>n?()=>{}:(r(TT(t)),()=>{r(TT(void 0))}),[t,r,n]),null},vP={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},yk=vr({name:"brush",initialState:vP,reducers:{setBrushSettings(e,t){return t.payload==null?vP:t.payload}}}),{setBrushSettings:Use}=yk.actions,TJ=yk.reducer;function PJ(e){return(e%180+180)%180}var MJ=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=PJ(i),o=l*Math.PI/180,c=Math.atan(n/r),f=o>c&&o<Math.PI-c?n/Math.sin(o):r/Math.cos(o);return Math.abs(f)},RJ={dots:[],areas:[],lines:[]},vk=vr({name:"referenceElements",initialState:RJ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Sn(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Sn(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Sn(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:qse,removeDot:Hse,addArea:Fse,removeArea:Kse,addLine:Gse,removeLine:Yse}=vk.actions,DJ=vk.reducer,kJ=S.createContext(void 0),IJ=e=>{var{children:t}=e,[r]=S.useState("".concat(Bc("recharts"),"-clip")),n=Pw();if(n==null)return null;var{x:i,y:l,width:o,height:c}=n;return S.createElement(kJ.Provider,{value:r},S.createElement("defs",null,S.createElement("clipPath",{id:r},S.createElement("rect",{x:i,y:l,height:c,width:o}))),t)};function gk(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var i=e[n];i!==void 0&&r.push(i)}return r}function LJ(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return MJ(n,r)}function $J(e,t,r){var n=r==="width",{x:i,y:l,width:o,height:c}=e;return t===1?{start:n?i:l,end:n?i+o:l+c}:{start:n?i+o:l+c,end:n?i:l}}function ed(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var l=r();return e*(t-e*l/2-n)>=0&&e*(t+e*l/2-i)<=0}function zJ(e,t){return gk(e,t+1)}function BJ(e,t,r,n,i){for(var l=(n||[]).slice(),{start:o,end:c}=t,f=0,h=1,p=o,y=function(){var b=n==null?void 0:n[f];if(b===void 0)return{v:gk(n,h)};var w=f,N,O=()=>(N===void 0&&(N=r(b,w)),N),C=b.coordinate,E=f===0||ed(e,C,O,p,c);E||(f=0,p=o,h+=1),E&&(p=C+e*(O()/2+i),f+=h)},v;h<=l.length;)if(v=y(),v)return v.v;return[]}function UJ(e,t,r,n,i){var l=(n||[]).slice(),o=l.length;if(o===0)return[];for(var{start:c,end:f}=t,h=1;h<=o;h++){for(var p=(o-1)%h,y=c,v=!0,x=function(){var A=n[w];if(A==null)return 0;var T=w,M,R=()=>(M===void 0&&(M=r(A,T)),M),D=A.coordinate,I=w===p||ed(e,D,R,y,f);if(!I)return v=!1,1;I&&(y=D+e*(R()/2+i))},b,w=p;w<o&&(b=x(),!(b!==0&&b===1));w+=h);if(v){for(var N=[],O=p;O<o;O+=h){var C=n[O];C!=null&&N.push(C)}return N}}return[]}function gP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gP(Object(r),!0).forEach(function(n){qJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qJ(e,t,r){return(t=HJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HJ(e){var t=FJ(e,"string");return typeof t=="symbol"?t:t+""}function FJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KJ(e,t,r,n,i){for(var l=(n||[]).slice(),o=l.length,{start:c}=t,{end:f}=t,h=function(v){var x=l[v];if(x==null)return 1;var b=x,w,N=()=>(w===void 0&&(w=r(x,v)),w);if(v===o-1){var O=e*(b.coordinate+e*N()/2-f);l[v]=b=hr(hr({},b),{},{tickCoord:O>0?b.coordinate-O*e:b.coordinate})}else l[v]=b=hr(hr({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var C=ed(e,b.tickCoord,N,c,f);C&&(f=b.tickCoord-e*(N()/2+i),l[v]=hr(hr({},b),{},{isShow:!0}))}},p=o-1;p>=0;p--)h(p);return l}function GJ(e,t,r,n,i,l){var o=(n||[]).slice(),c=o.length,{start:f,end:h}=t;if(l){var p=n[c-1];if(p!=null){var y=r(p,c-1),v=e*(p.coordinate+e*y/2-h);if(o[c-1]=p=hr(hr({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate}),p.tickCoord!=null){var x=ed(e,p.tickCoord,()=>y,f,h);x&&(h=p.tickCoord-e*(y/2+i),o[c-1]=hr(hr({},p),{},{isShow:!0}))}}}for(var b=l?c-1:c,w=function(C){var E=o[C];if(E==null)return 1;var A=E,T,M=()=>(T===void 0&&(T=r(E,C)),T);if(C===0){var R=e*(A.coordinate-e*M()/2-f);o[C]=A=hr(hr({},A),{},{tickCoord:R<0?A.coordinate-R*e:A.coordinate})}else o[C]=A=hr(hr({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var D=ed(e,A.tickCoord,M,f,h);D&&(f=A.tickCoord+e*(M()/2+i),o[C]=hr(hr({},A),{},{isShow:!0}))}},N=0;N<b;N++)w(N);return o}function Mw(e,t,r){var{tick:n,ticks:i,viewBox:l,minTickGap:o,orientation:c,interval:f,tickFormatter:h,unit:p,angle:y}=e;if(!i||!i.length||!n)return[];if(ye(f)||vd.isSsr){var v;return(v=zJ(i,ye(f)?f:0))!==null&&v!==void 0?v:[]}var x=[],b=c==="top"||c==="bottom"?"width":"height",w=p&&b==="width"?Tc(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},N=(T,M)=>{var R=typeof h=="function"?h(T.value,M):T.value;return b==="width"?LJ(Tc(R,{fontSize:t,letterSpacing:r}),w,y):Tc(R,{fontSize:t,letterSpacing:r})[b]},O=i[0],C=i[1],E=i.length>=2&&O!=null&&C!=null?Br(C.coordinate-O.coordinate):1,A=$J(l,E,b);return f==="equidistantPreserveStart"?BJ(E,A,N,i,o):f==="equidistantPreserveEnd"?UJ(E,A,N,i,o):(f==="preserveStart"||f==="preserveStartEnd"?x=GJ(E,A,N,i,o,f==="preserveStartEnd"):x=KJ(E,A,N,i,o),x.filter(T=>T.isShow))}var YJ=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:l=0}=e,o=0;if(t){Array.from(t).forEach(p=>{if(p){var y=p.getBoundingClientRect();y.width>o&&(o=y.width)}});var c=r?r.getBoundingClientRect().width:0,f=i+l,h=o+f+c+(r?n:0);return Math.round(h)}return 0},VJ={xAxis:{},yAxis:{}},xk=vr({name:"renderedTicks",initialState:VJ,reducers:{setRenderedTicks:(e,t)=>{var{axisType:r,axisId:n,ticks:i}=t.payload;e[r][n]=i},removeRenderedTicks:(e,t)=>{var{axisType:r,axisId:n}=t.payload;delete e[r][n]}}}),{setRenderedTicks:QJ,removeRenderedTicks:XJ}=xk.actions,WJ=xk.reducer,ZJ=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function JJ(e,t){if(e==null)return{};var r,n,i=eee(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function eee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fl.apply(null,arguments)}function xP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xP(Object(r),!0).forEach(function(n){tee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tee(e,t,r){return(t=ree(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ree(e){var t=nee(e,"string");return typeof t=="symbol"?t:t+""}function nee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ga={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Gt.axis};function aee(e){var{x:t,y:r,width:n,height:i,orientation:l,mirror:o,axisLine:c,otherSvgProps:f}=e;if(!c)return null;var h=xt(xt(xt({},f),$n(c)),{},{fill:"none"});if(l==="top"||l==="bottom"){var p=+(l==="top"&&!o||l==="bottom"&&o);h=xt(xt({},h),{},{x1:t,y1:r+p*i,x2:t+n,y2:r+p*i})}else{var y=+(l==="left"&&!o||l==="right"&&o);h=xt(xt({},h),{},{x1:t+y*n,y1:r,x2:t+y*n,y2:r+i})}return S.createElement("line",fl({},h,{className:Xe("recharts-cartesian-axis-line",Fo(c,"className"))}))}function iee(e,t,r,n,i,l,o,c,f){var h,p,y,v,x,b,w=c?-1:1,N=e.tickSize||o,O=ye(e.tickCoord)?e.tickCoord:e.coordinate;switch(l){case"top":h=p=e.coordinate,v=r+ +!c*i,y=v-w*N,b=y-w*f,x=O;break;case"left":y=v=e.coordinate,p=t+ +!c*n,h=p-w*N,x=h-w*f,b=O;break;case"right":y=v=e.coordinate,p=t+ +c*n,h=p+w*N,x=h+w*f,b=O;break;default:h=p=e.coordinate,v=r+ +c*i,y=v+w*N,b=y+w*f,x=O;break}return{line:{x1:h,y1:y,x2:p,y2:v},tick:{x,y:b}}}function see(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function lee(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function oee(e){var{option:t,tickProps:r,value:n}=e,i,l=Xe(r.className,"recharts-cartesian-axis-tick-value");if(S.isValidElement(t))i=S.cloneElement(t,xt(xt({},r),{},{className:l}));else if(typeof t=="function")i=t(xt(xt({},r),{},{className:l}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=Xe(o,fZ(t))),i=S.createElement(Cw,fl({},r,{className:o}),n)}return i}function uee(e){var{ticks:t,axisType:r,axisId:n}=e,i=ct();return S.useEffect(()=>{if(n==null||r==null)return pl;var l=t.map(o=>({value:o.value,coordinate:o.coordinate,offset:o.offset,index:o.index}));return i(QJ({ticks:l,axisId:n,axisType:r})),()=>{i(XJ({axisId:n,axisType:r}))}},[i,t,n,r]),null}var cee=S.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:l,tickFormatter:o,unit:c,padding:f,tickTextProps:h,orientation:p,mirror:y,x:v,y:x,width:b,height:w,tickSize:N,tickMargin:O,fontSize:C,letterSpacing:E,getTicksConfig:A,events:T,axisType:M,axisId:R}=e,D=Mw(xt(xt({},A),{},{ticks:r}),C,E),I=$n(A),k=cd(n),H=KD(I.textAnchor)?I.textAnchor:see(p,y),q=lee(p,y),ie={};typeof i=="object"&&(ie=i);var re=xt(xt({},I),{},{fill:"none"},ie),W=D.map(J=>xt({entry:J},iee(J,v,x,b,w,p,N,y,O))),$=W.map(J=>{var{entry:ne,line:ce}=J;return S.createElement(rn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(ne.value,"-").concat(ne.coordinate,"-").concat(ne.tickCoord)},i&&S.createElement("line",fl({},re,ce,{className:Xe("recharts-cartesian-axis-tick-line",Fo(i,"className"))})))}),F=W.map((J,ne)=>{var ce,L,{entry:X,tick:le}=J,oe=xt(xt(xt(xt({verticalAnchor:q},I),{},{textAnchor:H,stroke:"none",fill:l},le),{},{index:ne,payload:X,visibleTicksCount:D.length,tickFormatter:o,padding:f},h),{},{angle:(ce=(L=h==null?void 0:h.angle)!==null&&L!==void 0?L:I.angle)!==null&&ce!==void 0?ce:0}),he=xt(xt({},oe),k);return S.createElement(rn,fl({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(X.value,"-").concat(X.coordinate,"-").concat(X.tickCoord)},Km(T,X,ne)),n&&S.createElement(oee,{option:n,tickProps:he,value:"".concat(typeof o=="function"?o(X.value,ne):X.value).concat(c||"")}))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(M,"-ticks")},S.createElement(uee,{ticks:D,axisId:R,axisType:M}),F.length>0&&S.createElement(En,{zIndex:Gt.label},S.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(M,"-tick-labels"),ref:t},F)),$.length>0&&S.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(M,"-tick-lines")},$))}),dee=S.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:l,hide:o,ticks:c,axisType:f,axisId:h}=e,p=JJ(e,ZJ),[y,v]=S.useState(""),[x,b]=S.useState(""),w=S.useRef(null);S.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var O;return YJ({ticks:w.current,label:(O=e.labelRef)===null||O===void 0?void 0:O.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var N=S.useCallback(O=>{if(O){var C=O.getElementsByClassName("recharts-cartesian-axis-tick-value");w.current=C;var E=C[0];if(E){var A=window.getComputedStyle(E),T=A.fontSize,M=A.letterSpacing;(T!==y||M!==x)&&(v(T),b(M))}}},[y,x]);return o||n!=null&&n<=0||i!=null&&i<=0?null:S.createElement(En,{zIndex:e.zIndex},S.createElement(rn,{className:Xe("recharts-cartesian-axis",l)},S.createElement(aee,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:$n(e)}),S.createElement(cee,{ref:N,axisType:f,events:p,fontSize:y,getTicksConfig:e,height:e.height,letterSpacing:x,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),S.createElement(YW,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},S.createElement(nZ,{label:e.label,labelRef:e.labelRef}),e.children)))}),Rw=S.forwardRef((e,t)=>{var r=or(e,Ga);return S.createElement(dee,fl({},r,{ref:t}))});Rw.displayName="CartesianAxis";var fee=["x1","y1","x2","y2","key"],hee=["offset"],mee=["xAxisId","yAxisId"],pee=["xAxisId","yAxisId"];function bP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bP(Object(r),!0).forEach(function(n){yee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yee(e,t,r){return(t=vee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vee(e){var t=gee(e,"string");return typeof t=="symbol"?t:t+""}function gee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zs(){return zs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zs.apply(null,arguments)}function Cm(e,t){if(e==null)return{};var r,n,i=xee(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var bee=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:l,height:o,ry:c}=e;return S.createElement("rect",{x:n,y:i,ry:c,width:l,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function bk(e){var{option:t,lineItemProps:r}=e,n;if(S.isValidElement(t))n=S.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,{x1:l,y1:o,x2:c,y2:f,key:h}=r,p=Cm(r,fee),y=(i=$n(p))!==null&&i!==void 0?i:{},{offset:v}=y,x=Cm(y,hee);n=S.createElement("line",zs({},x,{x1:l,y1:o,x2:c,y2:f,fill:"none",key:h}))}return n}function jee(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:l,yAxisId:o}=e,c=Cm(e,mee),f=i.map((h,p)=>{var y=mr(mr({},c),{},{x1:t,y1:h,x2:t+r,y2:h,key:"line-".concat(p),index:p});return S.createElement(bk,{key:"line-".concat(p),option:n,lineItemProps:y})});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function wee(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:l,yAxisId:o}=e,c=Cm(e,pee),f=i.map((h,p)=>{var y=mr(mr({},c),{},{x1:h,y1:t,x2:h,y2:t+r,key:"line-".concat(p),index:p});return S.createElement(bk,{option:n,lineItemProps:y,key:"line-".concat(p)})});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function See(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:l,height:o,horizontalPoints:c,horizontal:f=!0}=e;if(!f||!t||!t.length||c==null)return null;var h=c.map(y=>Math.round(y+i-i)).sort((y,v)=>y-v);i!==h[0]&&h.unshift(0);var p=h.map((y,v)=>{var x=h[v+1],b=x==null,w=b?i+o-y:x-y;if(w<=0)return null;var N=v%t.length;return S.createElement("rect",{key:"react-".concat(v),y,x:n,height:w,width:l,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function Nee(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:l,width:o,height:c,verticalPoints:f}=e;if(!t||!r||!r.length)return null;var h=f.map(y=>Math.round(y+i-i)).sort((y,v)=>y-v);i!==h[0]&&h.unshift(0);var p=h.map((y,v)=>{var x=h[v+1],b=x==null,w=b?i+o-y:x-y;if(w<=0)return null;var N=v%r.length;return S.createElement("rect",{key:"react-".concat(v),x:y,y:l,width:w,height:c,stroke:"none",fill:r[N],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var Oee=(e,t)=>{var{xAxis:r,width:n,height:i,offset:l}=e;return VR(Mw(mr(mr(mr({},Ga),r),{},{ticks:QR(r),viewBox:{x:0,y:0,width:n,height:i}})),l.left,l.left+l.width,t)},_ee=(e,t)=>{var{yAxis:r,width:n,height:i,offset:l}=e;return VR(Mw(mr(mr(mr({},Ga),r),{},{ticks:QR(r),viewBox:{x:0,y:0,width:n,height:i}})),l.top,l.top+l.height,t)},Eee={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Gt.grid};function Pp(e){var t=Nj(),r=Oj(),n=e3(),i=mr(mr({},or(e,Eee)),{},{x:ye(e.x)?e.x:n.left,y:ye(e.y)?e.y:n.top,width:ye(e.width)?e.width:n.width,height:ye(e.height)?e.height:n.height}),{xAxisId:l,yAxisId:o,x:c,y:f,width:h,height:p,syncWithTicks:y,horizontalValues:v,verticalValues:x}=i,b=gr(),w=ge(I=>vT(I,"xAxis",l,b)),N=ge(I=>vT(I,"yAxis",o,b));if(!ua(h)||!ua(p)||!ye(c)||!ye(f))return null;var O=i.verticalCoordinatesGenerator||Oee,C=i.horizontalCoordinatesGenerator||_ee,{horizontalPoints:E,verticalPoints:A}=i;if((!E||!E.length)&&typeof C=="function"){var T=v&&v.length,M=C({yAxis:N?mr(mr({},N),{},{ticks:T?v:N.ticks}):void 0,width:t??h,height:r??p,offset:n},T?!0:y);em(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof M,"]")),Array.isArray(M)&&(E=M)}if((!A||!A.length)&&typeof O=="function"){var R=x&&x.length,D=O({xAxis:w?mr(mr({},w),{},{ticks:R?x:w.ticks}):void 0,width:t??h,height:r??p,offset:n},R?!0:y);em(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof D,"]")),Array.isArray(D)&&(A=D)}return S.createElement(En,{zIndex:i.zIndex},S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(bee,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),S.createElement(See,zs({},i,{horizontalPoints:E})),S.createElement(Nee,zs({},i,{verticalPoints:A})),S.createElement(jee,zs({},i,{offset:n,horizontalPoints:E,xAxis:w,yAxis:N})),S.createElement(wee,zs({},i,{offset:n,verticalPoints:A,xAxis:w,yAxis:N}))))}Pp.displayName="CartesianGrid";var Aee={},jk=vr({name:"errorBars",initialState:Aee,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(l=>l.dataKey===n.dataKey&&l.direction===n.direction?i:l))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:Vse,replaceErrorBar:Qse,removeErrorBar:Xse}=jk.actions,Cee=jk.reducer,Tee=["children"];function Pee(e,t){if(e==null)return{};var r,n,i=Mee(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Mee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Ree={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Dee=S.createContext(Ree);function wk(e){var{children:t}=e,r=Pee(e,Tee);return S.createElement(Dee.Provider,{value:r},t)}function Dw(e,t){var r,n,i=ge(h=>ri(h,e)),l=ge(h=>ni(h,t)),o=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:kt.allowDataOverflow,c=(n=l==null?void 0:l.allowDataOverflow)!==null&&n!==void 0?n:It.allowDataOverflow,f=o||c;return{needClip:f,needClipX:o,needClipY:c}}function Sk(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=Pw(),{needClipX:l,needClipY:o,needClip:c}=Dw(t,r);if(!c||!i)return null;var{x:f,y:h,width:p,height:y}=i;return S.createElement("clipPath",{id:"clipPath-".concat(n)},S.createElement("rect",{x:l?f:f-p/2,y:o?h:h-y/2,width:l?p:p*2,height:o?y:y*2}))}var Nk=(e,t,r,n)=>rs(e,"xAxis",t,n),Ok=(e,t,r,n)=>ts(e,"xAxis",t,n),_k=(e,t,r,n)=>rs(e,"yAxis",r,n),Ek=(e,t,r,n)=>ts(e,"yAxis",r,n),kee=V([We,Nk,_k,Ok,Ek],(e,t,r,n,i)=>Za(e,"xAxis")?Go(t,n,!1):Go(r,i,!1)),Iee=(e,t,r,n,i)=>i;function Lee(e){return e.type==="line"}var $ee=V([Ep,Iee],(e,t)=>e.filter(Lee).find(r=>r.id===t)),zee=V([We,Nk,_k,Ok,Ek,$ee,kee,gd],(e,t,r,n,i,l,o,c)=>{var{chartData:f,dataStartIndex:h,dataEndIndex:p}=c;if(!(l==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||o==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:y,data:v}=l,x;if(v!=null&&v.length>0?x=v:x=f==null?void 0:f.slice(h,p+1),x!=null)return ste({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:y,bandSize:o,displayedData:x})}});function Bee(e){var t=cd(e),r=3,n=2;if(t!=null){var{r:i,strokeWidth:l}=t,o=Number(i),c=Number(l);return(Number.isNaN(o)||o<0)&&(o=r),(Number.isNaN(c)||c<0)&&(c=n),{r:o,strokeWidth:c}}return{r,strokeWidth:n}}var Uee=["id"],qee=["type","layout","connectNulls","needClip","shape"],Hee=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function td(){return td=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},td.apply(null,arguments)}function jP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ra(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jP(Object(r),!0).forEach(function(n){Fee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fee(e,t,r){return(t=Kee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kee(e){var t=Gee(e,"string");return typeof t=="symbol"?t:t+""}function Gee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kw(e,t){if(e==null)return{};var r,n,i=Yee(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Yee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Vee=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:l}=e;return[{inactive:l,dataKey:t,type:i,color:n,value:rp(r,t),payload:e}]},Qee=S.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:l,name:o,hide:c,unit:f,tooltipType:h,id:p}=e,y={dataDefinedOnItem:r,getPosition:pl,settings:{stroke:n,strokeWidth:i,fill:l,dataKey:t,nameKey:void 0,name:rp(o,t),hide:c,type:h,color:n,unit:f,graphicalItemId:p}};return S.createElement(uk,{tooltipEntrySettings:y})}),Ak=(e,t)=>"".concat(t,"px ").concat(e,"px");function Xee(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n.push(...r);return n}var Wee=(e,t,r)=>{var n=r.reduce((v,x)=>v+x,0);if(!n)return Ak(t,e);for(var i=Math.floor(e/n),l=e%n,o=[],c=0,f=0;c<r.length;f+=(h=r[c])!==null&&h!==void 0?h:0,++c){var h,p=r[c];if(p!=null&&f+p>l){o=[...r.slice(0,c),l-f];break}}var y=o.length%2===0?[0,t]:[t];return[...Xee(r,i),...o,...y].map(v=>"".concat(v,"px")).join(", ")};function Zee(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:l,needClip:o}=n,{id:c}=n,f=kw(n,Uee),h=$n(f);return S.createElement(JZ,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:l,baseProps:h,needClip:o,clipPathId:t})}function Jee(e){var{showLabels:t,children:r,points:n}=e,i=S.useMemo(()=>n==null?void 0:n.map(l=>{var o,c,f={x:(o=l.x)!==null&&o!==void 0?o:0,y:(c=l.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ra(ra({},f),{},{value:l.value,payload:l.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[n]);return S.createElement(ZD,{value:t?i:void 0},r)}function wP(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:l}=e,{type:o,layout:c,connectNulls:f,needClip:h,shape:p}=l,y=kw(l,qee),v=ra(ra({},Or(y)),{},{fill:"none",className:"recharts-line-curve",clipPath:h?"url(#clipPath-".concat(t,")"):void 0,points:n,type:o,layout:c,connectNulls:f,strokeDasharray:i??l.strokeDasharray});return S.createElement(S.Fragment,null,(n==null?void 0:n.length)>1&&S.createElement(ik,td({shapeType:"curve",option:p},v,{pathRef:r})),S.createElement(Zee,{points:n,clipPathId:t,props:l}))}function ete(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function tte(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:l}=e,{points:o,strokeDasharray:c,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:y,animateNewValues:v,width:x,height:b,onAnimationEnd:w,onAnimationStart:N}=r,O=i.current,C=fp(o,"recharts-line-"),E=S.useRef(C),[A,T]=S.useState(!1),M=!A,R=S.useCallback(()=>{typeof w=="function"&&w(),T(!1)},[w]),D=S.useCallback(()=>{typeof N=="function"&&N(),T(!0)},[N]),I=ete(n.current),k=S.useRef(0);E.current!==C&&(k.current=l.current,E.current=C);var H=k.current;return S.createElement(Jee,{points:o,showLabels:M},r.children,S.createElement(dp,{animationId:C,begin:h,duration:p,isActive:f,easing:y,onAnimationEnd:R,onAnimationStart:D,key:C},q=>{var ie=jt(H,I+H,q),re=Math.min(ie,I),W;if(f)if(c){var $="".concat(c).split(/[,\s]+/gim).map(ne=>parseFloat(ne));W=Wee(re,I,$)}else W=Ak(I,re);else W=c==null?void 0:String(c);if(q>0&&I>0&&(i.current=o,l.current=Math.max(l.current,re)),O){var F=O.length/o.length,J=q===1?o:o.map((ne,ce)=>{var L=Math.floor(ce*F);if(O[L]){var X=O[L];return ra(ra({},ne),{},{x:jt(X.x,ne.x,q),y:jt(X.y,ne.y,q)})}return v?ra(ra({},ne),{},{x:jt(x*2,ne.x,q),y:jt(b/2,ne.y,q)}):ra(ra({},ne),{},{x:ne.x,y:ne.y})});return i.current=J,S.createElement(wP,{props:r,points:J,clipPathId:t,pathRef:n,strokeDasharray:W})}return S.createElement(wP,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:W})}),S.createElement(ek,{label:r.label}))}function rte(e){var{clipPathId:t,props:r}=e,n=S.useRef(null),i=S.useRef(0),l=S.useRef(null);return S.createElement(tte,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:l})}var nte=(e,t)=>{var r,n;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(n=e.y)!==null&&n!==void 0?n:void 0,value:e.value,errorVal:Ot(e.payload,t)}};class ate extends S.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:l,yAxisId:o,top:c,left:f,width:h,height:p,id:y,needClip:v,zIndex:x}=this.props;if(t)return null;var b=Xe("recharts-line",i),w=y,{r:N,strokeWidth:O}=Bee(r),C=ak(r),E=N*2+O,A=v?"url(#clipPath-".concat(C?"":"dots-").concat(w,")"):void 0;return S.createElement(En,{zIndex:x},S.createElement(rn,{className:b},v&&S.createElement("defs",null,S.createElement(Sk,{clipPathId:w,xAxisId:l,yAxisId:o}),!C&&S.createElement("clipPath",{id:"clipPath-dots-".concat(w)},S.createElement("rect",{x:f-E/2,y:c-E/2,width:h+E,height:p+E}))),S.createElement(wk,{xAxisId:l,yAxisId:o,data:n,dataPointFormatter:nte,errorBarOffset:0},S.createElement(rte,{props:this.props,clipPathId:w}))),S.createElement(xJ,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:A}))}}var Ck={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Gt.line,type:"linear"};function ite(e){var t=or(e,Ck),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:l,animationEasing:o,connectNulls:c,dot:f,hide:h,isAnimationActive:p,label:y,legendType:v,xAxisId:x,yAxisId:b,id:w}=t,N=kw(t,Hee),{needClip:O}=Dw(x,b),C=Pw(),E=yl(),A=gr(),T=ge(k=>zee(k,x,b,A,w));if(E!=="horizontal"&&E!=="vertical"||T==null||C==null)return null;var{height:M,width:R,x:D,y:I}=C;return S.createElement(ate,td({},N,{id:w,connectNulls:c,dot:f,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:l,animationEasing:o,isAnimationActive:p,hide:h,label:y,legendType:v,xAxisId:x,yAxisId:b,points:T,layout:E,height:M,width:R,left:D,top:I,needClip:O}))}function ste(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:l,dataKey:o,bandSize:c,displayedData:f}=e;return f.map((h,p)=>{var y=Ot(h,o);if(t==="horizontal"){var v=uA({axis:r,ticks:i,bandSize:c,entry:h,index:p}),x=mt(y)?null:n.scale.map(y);return{x:v,y:x??null,value:y,payload:h}}var b=mt(y)?null:r.scale.map(y),w=uA({axis:n,ticks:l,bandSize:c,entry:h,index:p});return b==null||w==null?null:{x:b,y:w,value:y,payload:h}}).filter(Boolean)}function lte(e){var t=or(e,Ck),r=gr();return S.createElement(dk,{id:t.id,type:"line"},n=>S.createElement(S.Fragment,null,S.createElement(ck,{legendPayload:Vee(t)}),S.createElement(Qee,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),S.createElement(hk,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),S.createElement(ite,td({},t,{id:n}))))}var Tk=S.memo(lte,au);Tk.displayName="Line";function bl(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:mk}function jl(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:mk}var ote="Invariant failed";function ute(e,t){throw new Error(ote)}function xb(){return xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xb.apply(null,arguments)}function Iw(e){return S.createElement(ik,xb({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var cte=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(ye(t))return t;var l=ye(n)||mt(n);return l?t(n,i):(l||ute(),r)}},dte=(e,t,r)=>r,fte=(e,t)=>t,Ad=V([Ep,fte],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),hte=V([Ad],e=>e==null?void 0:e.maxBarSize),mte=(e,t,r,n)=>n,pte=V([We,Ep,bl,jl,dte],(e,t,r,n,i)=>t.filter(l=>e==="horizontal"?l.xAxisId===r:l.yAxisId===n).filter(l=>l.isPanorama===i).filter(l=>l.hide===!1).filter(l=>l.type==="bar")),yte=(e,t,r)=>{var n=We(e),i=bl(e,t),l=jl(e,t);if(!(i==null||l==null))return n==="horizontal"?mb(e,"yAxis",l,r):mb(e,"xAxis",i,r)},vte=(e,t)=>{var r=We(e),n=bl(e,t),i=jl(e,t);if(!(n==null||i==null))return r==="horizontal"?yT(e,"xAxis",n):yT(e,"yAxis",i)},gte=V([pte,eK,vte],bJ),xte=(e,t,r)=>{var n,i,l=Ad(e,t);if(l==null)return 0;var o=bl(e,t),c=jl(e,t);if(o==null||c==null)return 0;var f=We(e),h=D3(e),{maxBarSize:p}=l,y=mt(p)?h:p,v,x;return f==="horizontal"?(v=rs(e,"xAxis",o,r),x=ts(e,"xAxis",o,r)):(v=rs(e,"yAxis",c,r),x=ts(e,"yAxis",c,r)),(n=(i=Go(v,x,!0))!==null&&i!==void 0?i:y)!==null&&n!==void 0?n:0},Pk=(e,t,r)=>{var n=We(e),i=bl(e,t),l=jl(e,t);if(!(i==null||l==null)){var o,c;return n==="horizontal"?(o=rs(e,"xAxis",i,r),c=ts(e,"xAxis",i,r)):(o=rs(e,"yAxis",l,r),c=ts(e,"yAxis",l,r)),Go(o,c)}},bte=V([gte,D3,JF,k3,xte,Pk,hte],OJ),jte=(e,t,r)=>{var n=bl(e,t);if(n!=null)return rs(e,"xAxis",n,r)},wte=(e,t,r)=>{var n=jl(e,t);if(n!=null)return rs(e,"yAxis",n,r)},Ste=(e,t,r)=>{var n=bl(e,t);if(n!=null)return ts(e,"xAxis",n,r)},Nte=(e,t,r)=>{var n=jl(e,t);if(n!=null)return ts(e,"yAxis",n,r)},Ote=V([bte,Ad],EJ),_te=V([yte,Ad],_J),Ete=V([Vt,bj,jte,wte,Ste,Nte,Ote,We,KF,Pk,_te,Ad,mte],(e,t,r,n,i,l,o,c,f,h,p,y,v)=>{var{chartData:x,dataStartIndex:b,dataEndIndex:w}=f;if(!(y==null||o==null||t==null||c!=="horizontal"&&c!=="vertical"||r==null||n==null||i==null||l==null||h==null)){var{data:N}=y,O;if(N!=null&&N.length>0?O=N:O=x==null?void 0:x.slice(b,w+1),O!=null)return tre({layout:c,barSettings:y,pos:o,parentViewBox:t,bandSize:h,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:l,stackedData:p,displayedData:O,offset:e,cells:v,dataStartIndex:b})}}),Ate=["index"];function bb(){return bb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bb.apply(null,arguments)}function Cte(e,t){if(e==null)return{};var r,n,i=Tte(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Tte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Mk=S.createContext(void 0),Pte=e=>{var t=S.useContext(Mk);if(t!=null)return t.stackId;if(e!=null)return $q(e)},Mte=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),Rte=e=>{var t=S.useContext(Mk);if(t!=null){var{stackId:r}=t;return"url(#".concat(Mte(r,e),")")}},Rk=e=>{var{index:t}=e,r=Cte(e,Ate),n=Rte(t);return S.createElement(rn,bb({className:"recharts-bar-stack-layer",clipPath:n},r))},Dte=["onMouseEnter","onMouseLeave","onClick"],kte=["value","background","tooltipPosition"],Ite=["id"],Lte=["onMouseEnter","onClick","onMouseLeave"];function ns(){return ns=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ns.apply(null,arguments)}function SP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SP(Object(r),!0).forEach(function(n){$te(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $te(e,t,r){return(t=zte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zte(e){var t=Bte(e,"string");return typeof t=="symbol"?t:t+""}function Bte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tm(e,t){if(e==null)return{};var r,n,i=Ute(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ute(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var qte=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:l}=e;return[{inactive:l,dataKey:t,type:i,color:n,value:rp(r,t),payload:e}]},Hte=S.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:l,hide:o,unit:c,tooltipType:f,id:h}=e,p={dataDefinedOnItem:void 0,getPosition:pl,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:rp(l,t),hide:o,type:f,color:i,unit:c,graphicalItemId:h}};return S.createElement(uk,{tooltipEntrySettings:p})});function Fte(e){var t=ge(dl),{data:r,dataKey:n,background:i,allOtherBarProps:l}=e,{onMouseEnter:o,onMouseLeave:c,onClick:f}=l,h=Tm(l,Dte),p=sk(o,n,l.id),y=lk(c),v=ok(f,n,l.id);if(!i||r==null)return null;var x=cd(i);return S.createElement(En,{zIndex:AJ(i,Gt.barBackground)},r.map((b,w)=>{var{value:N,background:O,tooltipPosition:C}=b,E=Tm(b,kte);if(!O)return null;var A=p(b,w),T=y(b,w),M=v(b,w),R=wr(wr(wr(wr(wr({option:i,isActive:String(w)===t},E),{},{fill:"#eee"},O),x),Km(h,b,w)),{},{onMouseEnter:A,onMouseLeave:T,onClick:M,dataKey:n,index:w,className:"recharts-bar-background-rectangle"});return S.createElement(Iw,ns({key:"background-bar-".concat(w)},R))}))}function Kte(e){var{showLabels:t,children:r,rects:n}=e,i=n==null?void 0:n.map(l=>{var o={x:l.x,y:l.y,width:l.width,lowerWidth:l.width,upperWidth:l.width,height:l.height};return wr(wr({},o),{},{value:l.value,payload:l.payload,parentViewBox:l.parentViewBox,viewBox:o,fill:l.fill})});return S.createElement(ZD,{value:t?i:void 0},r)}function Gte(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:l,dataKey:o}=e,c=ge(dl),f=ge(CD),h=r&&String(i.originalDataIndex)===c&&(f==null||o===f),[p,y]=S.useState(!1),[v,x]=S.useState(!1);S.useEffect(()=>{var E;return h?(y(!0),E=requestAnimationFrame(()=>{x(!0)})):x(!1),()=>{cancelAnimationFrame(E)}},[h]);var b=S.useCallback(()=>{h||y(!1)},[h]),w=h&&v,N=h||p,O;h?r===!0?O=t:O=r:O=t;var C=S.createElement(Iw,ns({},n,{name:String(n.name)},i,{isActive:w,option:O,index:l,dataKey:o,onTransitionEnd:b}));return N?S.createElement(En,{zIndex:Gt.activeBar},S.createElement(Rk,{index:i.originalDataIndex},C)):C}function Yte(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:l}=e;return S.createElement(Iw,ns({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:l}))}function Vte(e){var t,{data:r,props:n}=e,i=(t=$n(n))!==null&&t!==void 0?t:{},{id:l}=i,o=Tm(i,Ite),{shape:c,dataKey:f,activeBar:h}=n,{onMouseEnter:p,onClick:y,onMouseLeave:v}=n,x=Tm(n,Lte),b=sk(p,f,l),w=lk(v),N=ok(y,f,l);return r?S.createElement(S.Fragment,null,r.map((O,C)=>S.createElement(Rk,ns({index:O.originalDataIndex,key:"rectangle-".concat(O==null?void 0:O.x,"-").concat(O==null?void 0:O.y,"-").concat(O==null?void 0:O.value,"-").concat(C),className:"recharts-bar-rectangle"},Km(x,O,C),{onMouseEnter:b(O,C),onMouseLeave:w(O,C),onClick:N(O,C)}),h?S.createElement(Gte,{shape:c,activeBar:h,baseProps:o,entry:O,index:C,dataKey:f}):S.createElement(Yte,{shape:c,baseProps:o,entry:O,index:C,dataKey:f})))):null}function Qte(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:l,animationBegin:o,animationDuration:c,animationEasing:f,onAnimationEnd:h,onAnimationStart:p}=t,y=r.current,v=fp(t,"recharts-bar-"),[x,b]=S.useState(!1),w=!x,N=S.useCallback(()=>{typeof h=="function"&&h(),b(!1)},[h]),O=S.useCallback(()=>{typeof p=="function"&&p(),b(!0)},[p]);return S.createElement(Kte,{showLabels:w,rects:n},S.createElement(dp,{animationId:v,begin:o,duration:c,isActive:l,easing:f,onAnimationEnd:N,onAnimationStart:O,key:v},C=>{var E=C===1?n:n==null?void 0:n.map((A,T)=>{var M=y&&y[T];if(M)return wr(wr({},A),{},{x:jt(M.x,A.x,C),y:jt(M.y,A.y,C),width:jt(M.width,A.width,C),height:jt(M.height,A.height,C)});if(i==="horizontal"){var R=jt(0,A.height,C),D=jt(A.stackedBarStart,A.y,C);return wr(wr({},A),{},{y:D,height:R})}var I=jt(0,A.width,C),k=jt(A.stackedBarStart,A.x,C);return wr(wr({},A),{},{width:I,x:k})});return C>0&&(r.current=E??null),E==null?null:S.createElement(rn,null,S.createElement(Vte,{props:t,data:E}))}),S.createElement(ek,{label:t.label}),t.children)}function Xte(e){var t=S.useRef(null);return S.createElement(Qte,{previousRectanglesRef:t,props:e})}var Dk=0,Wte=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Ot(e,t)}};class Zte extends S.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:l,yAxisId:o,needClip:c,background:f,id:h}=this.props;if(t||r==null)return null;var p=Xe("recharts-bar",i),y=h;return S.createElement(rn,{className:p,id:h},c&&S.createElement("defs",null,S.createElement(Sk,{clipPathId:y,xAxisId:l,yAxisId:o})),S.createElement(rn,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(y,")"):void 0},S.createElement(Fte,{data:r,dataKey:n,background:f,allOtherBarProps:this.props}),S.createElement(Xte,this.props)))}}var Jte={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:Dk,xAxisId:0,yAxisId:0,zIndex:Gt.bar};function ere(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:l,activeBar:o,animationBegin:c,animationDuration:f,animationEasing:h,isAnimationActive:p}=e,{needClip:y}=Dw(t,r),v=yl(),x=gr(),b=yZ(e.children,Aw),w=ge(C=>Ete(C,e.id,x,b));if(v!=="vertical"&&v!=="horizontal")return null;var N,O=w==null?void 0:w[0];return O==null||O.height==null||O.width==null?N=0:N=v==="vertical"?O.height/2:O.width/2,S.createElement(wk,{xAxisId:t,yAxisId:r,data:w,dataPointFormatter:Wte,errorBarOffset:N},S.createElement(Zte,ns({},e,{layout:v,needClip:y,data:w,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:l,activeBar:o,animationBegin:c,animationDuration:f,animationEasing:h,isAnimationActive:p})))}function tre(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n,hasCustomShape:i},pos:l,bandSize:o,xAxis:c,yAxis:f,xAxisTicks:h,yAxisTicks:p,stackedData:y,displayedData:v,offset:x,cells:b,parentViewBox:w,dataStartIndex:N}=e,O=t==="horizontal"?f:c,C=y?O.scale.domain():null,E=zq({numericAxis:O}),A=O.scale.map(E);return v.map((T,M)=>{var R,D,I,k,H,q;if(y){var ie=y[M+N];if(ie==null)return null;R=Rq(ie,C)}else R=Ot(T,r),Array.isArray(R)||(R=[E,R]);var re=cte(n,Dk)(R[1],M);if(t==="horizontal"){var W,$=f.scale.map(R[0]),F=f.scale.map(R[1]);if($==null||F==null)return null;D=cA({axis:c,ticks:h,bandSize:o,offset:l.offset,entry:T,index:M}),I=(W=F??$)!==null&&W!==void 0?W:void 0,k=l.size;var J=$-F;if(H=la(J)?0:J,q={x:D,y:x.top,width:k,height:x.height},Math.abs(re)>0&&Math.abs(H)<Math.abs(re)){var ne=Br(H||re)*(Math.abs(re)-Math.abs(H));I-=ne,H+=ne}}else{var ce=c.scale.map(R[0]),L=c.scale.map(R[1]);if(ce==null||L==null)return null;if(D=ce,I=cA({axis:f,ticks:p,bandSize:o,offset:l.offset,entry:T,index:M}),k=L-ce,H=l.size,q={x:x.left,y:I,width:x.width,height:H},Math.abs(re)>0&&Math.abs(k)<Math.abs(re)){var X=Br(k||re)*(Math.abs(re)-Math.abs(k));k+=X}}if(D==null||I==null||k==null||H==null||!i&&(k===0||H===0))return null;var le=wr(wr({},T),{},{stackedBarStart:A,x:D,y:I,width:k,height:H,value:y?R:R[1],payload:T,background:q,tooltipPosition:{x:D+k/2,y:I+H/2},parentViewBox:w,originalDataIndex:M},b&&b[M]&&b[M].props);return le}).filter(Boolean)}function rre(e){var t=or(e,Jte),r=Pte(t.stackId),n=gr();return S.createElement(dk,{id:t.id,type:"bar"},i=>S.createElement(S.Fragment,null,S.createElement(ck,{legendPayload:qte(t)}),S.createElement(Hte,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:i}),S.createElement(hk,{type:"bar",id:i,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n,hasCustomShape:t.shape!=null}),S.createElement(En,{zIndex:t.zIndex},S.createElement(ere,ns({},t,{id:i})))))}var Lw=S.memo(rre,au);Lw.displayName="Bar";var nre=["domain","range"],are=["domain","range"];function NP(e,t){if(e==null)return{};var r,n,i=ire(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ire(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function OP(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function kk(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=NP(e,nre),{domain:l,range:o}=t,c=NP(t,are);return!OP(r,l)||!OP(n,o)?!1:au(i,c)}var sre=["type"],lre=["dangerouslySetInnerHTML","ticks","scale"],ore=["id","scale"];function jb(){return jb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jb.apply(null,arguments)}function _P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_P(Object(r),!0).forEach(function(n){ure(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_P(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ure(e,t,r){return(t=cre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cre(e){var t=dre(e,"string");return typeof t=="symbol"?t:t+""}function dre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wb(e,t){if(e==null)return{};var r,n,i=fre(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function hre(e){var t=ct(),r=S.useRef(null),n=t3(),{type:i}=e,l=wb(e,sre),o=pp(n,"xAxis",i),c=S.useMemo(()=>{if(o!=null)return EP(EP({},l),{},{type:o})},[l,o]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(aJ(c)):r.current!==c&&t(iJ({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(sJ(r.current)),r.current=null)},[t]),null}var mre=e=>{var{xAxisId:t,className:r}=e,n=ge(bj),i=gr(),l="xAxis",o=ge(O=>lD(O,l,t,i)),c=ge(O=>aD(O,t)),f=ge(O=>kV(O,t)),h=ge(O=>_4(O,t));if(c==null||f==null||h==null)return null;var{dangerouslySetInnerHTML:p,ticks:y,scale:v}=e,x=wb(e,lre),{id:b,scale:w}=h,N=wb(h,ore);return S.createElement(Rw,jb({},x,N,{x:f.x,y:f.y,width:c.width,height:c.height,className:Xe("recharts-".concat(l," ").concat(l),r),viewBox:n,ticks:o,axisType:l,axisId:t}))},pre={allowDataOverflow:kt.allowDataOverflow,allowDecimals:kt.allowDecimals,allowDuplicatedCategory:kt.allowDuplicatedCategory,angle:kt.angle,axisLine:Ga.axisLine,height:kt.height,hide:!1,includeHidden:kt.includeHidden,interval:kt.interval,label:!1,minTickGap:kt.minTickGap,mirror:kt.mirror,orientation:kt.orientation,padding:kt.padding,reversed:kt.reversed,scale:kt.scale,tick:kt.tick,tickCount:kt.tickCount,tickLine:Ga.tickLine,tickSize:Ga.tickSize,type:kt.type,niceTicks:kt.niceTicks,xAxisId:0},yre=e=>{var t=or(e,pre);return S.createElement(S.Fragment,null,S.createElement(hre,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),S.createElement(mre,t))},Mp=S.memo(yre,kk);Mp.displayName="XAxis";var vre=["type"],gre=["dangerouslySetInnerHTML","ticks","scale"],xre=["id","scale"];function Sb(){return Sb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sb.apply(null,arguments)}function AP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function CP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AP(Object(r),!0).forEach(function(n){bre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bre(e,t,r){return(t=jre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jre(e){var t=wre(e,"string");return typeof t=="symbol"?t:t+""}function wre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nb(e,t){if(e==null)return{};var r,n,i=Sre(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Sre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Nre(e){var t=ct(),r=S.useRef(null),n=t3(),{type:i}=e,l=Nb(e,vre),o=pp(n,"yAxis",i),c=S.useMemo(()=>{if(o!=null)return CP(CP({},l),{},{type:o})},[o,l]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(lJ(c)):r.current!==c&&t(oJ({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(uJ(r.current)),r.current=null)},[t]),null}function Ore(e){var{yAxisId:t,className:r,width:n,label:i}=e,l=S.useRef(null),o=S.useRef(null),c=ge(bj),f=gr(),h=ct(),p="yAxis",y=ge(M=>iD(M,t)),v=ge(M=>LV(M,t)),x=ge(M=>lD(M,p,t,f)),b=ge(M=>E4(M,t));if(S.useLayoutEffect(()=>{if(!(n!=="auto"||!y||Tw(i)||S.isValidElement(i)||b==null)){var M=l.current;if(M){var R=M.getCalculatedWidth();Math.round(y.width)!==Math.round(R)&&h(cJ({id:t,width:R}))}}},[x,y,h,i,t,n,b]),y==null||v==null||b==null)return null;var{dangerouslySetInnerHTML:w,ticks:N,scale:O}=e,C=Nb(e,gre),{id:E,scale:A}=b,T=Nb(b,xre);return S.createElement(Rw,Sb({},C,T,{ref:l,labelRef:o,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:y.width,height:y.height,className:Xe("recharts-".concat(p," ").concat(p),r),viewBox:c,ticks:x,axisType:p,axisId:t}))}var _re={allowDataOverflow:It.allowDataOverflow,allowDecimals:It.allowDecimals,allowDuplicatedCategory:It.allowDuplicatedCategory,angle:It.angle,axisLine:Ga.axisLine,hide:!1,includeHidden:It.includeHidden,interval:It.interval,label:!1,minTickGap:It.minTickGap,mirror:It.mirror,orientation:It.orientation,padding:It.padding,reversed:It.reversed,scale:It.scale,tick:It.tick,tickCount:It.tickCount,tickLine:Ga.tickLine,tickSize:Ga.tickSize,type:It.type,niceTicks:It.niceTicks,width:It.width,yAxisId:0},Ere=e=>{var t=or(e,_re);return S.createElement(S.Fragment,null,S.createElement(Nre,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),S.createElement(Ore,t))},Rp=S.memo(Ere,kk);Rp.displayName="YAxis";var Are=(e,t)=>t,$w=V([Are,We,q3,Xt,OD,ai,sX,Vt],hX);function Cre(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function zw(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(Cre(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.height:1}else{var l=e.currentTarget;r=l.offsetWidth>0?t.width/l.offsetWidth:1,n=l.offsetHeight>0?t.height/l.offsetHeight:1}var o=(c,f)=>({relativeX:Math.round((c-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(c=>o(c.clientX,c.clientY)):o(e.clientX,e.clientY)}var Ik=nn("mouseClick"),Lk=hd();Lk.startListening({actionCreator:Ik,effect:(e,t)=>{var r=e.payload,n=$w(t.getState(),zw(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(JV({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Ob=nn("mouseMove"),$k=hd(),po=null,Es=null,X0=null;$k.startListening({actionCreator:Ob,effect:(e,t)=>{var r=e.payload,n=t.getState(),{throttleDelay:i,throttledEvents:l}=n.eventSettings,o=l==="all"||(l==null?void 0:l.includes("mousemove"));po!==null&&(cancelAnimationFrame(po),po=null),Es!==null&&(typeof i!="number"||!o)&&(clearTimeout(Es),Es=null),X0=zw(r);var c=()=>{var f=t.getState(),h=_d(f,f.tooltip.settings.shared);if(!X0){po=null,Es=null;return}if(h==="axis"){var p=$w(f,X0);(p==null?void 0:p.activeIndex)!=null?t.dispatch(pD({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(mD())}po=null,Es=null};if(!o){c();return}i==="raf"?po=requestAnimationFrame(c):typeof i=="number"&&Es===null&&(Es=setTimeout(c,i))}});function Tre(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var TP={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},zk=vr({name:"rootProps",initialState:TP,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:TP.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),Pre=zk.reducer,{updateOptions:Mre}=zk.actions,Rre=null,Dre={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},Bk=vr({name:"polarOptions",initialState:Rre,reducers:Dre}),{updatePolarOptions:Wse}=Bk.actions,kre=Bk.reducer,Uk=nn("keyDown"),qk=nn("focus"),Hk=nn("blur"),Dp=hd(),yo=null,As=null,ph=null;Dp.startListening({actionCreator:Uk,effect:(e,t)=>{ph=e.payload,yo!==null&&(cancelAnimationFrame(yo),yo=null);var r=t.getState(),{throttleDelay:n,throttledEvents:i}=r.eventSettings,l=i==="all"||i.includes("keydown");As!==null&&(typeof n!="number"||!l)&&(clearTimeout(As),As=null);var o=()=>{try{var c=t.getState(),f=c.rootProps.accessibilityLayer!==!1;if(!f)return;var{keyboardInteraction:h}=c.tooltip,p=ph;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var y=Cc(h,cl(c),Zo(c),Jo(c)),v=y==null?-1:Number(y),x=!Number.isFinite(v)||v<0,b=ai(c),w=cl(c),N=_d(c,c.tooltip.settings.shared);if(p==="Enter"){if(x)return;var O=Nm(c,N,"hover",String(h.index));t.dispatch(Sm({active:!h.active,activeIndex:h.index,activeCoordinate:O}));return}var C=qV(c),E=C==="left-to-right"?1:-1,A=p==="ArrowRight"?1:-1,T;if(x){var M=Zo(c),R=Jo(c),D=A*E,I=re=>({active:!1,index:String(re),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(T=-1,D>0){for(var k=0;k<w.length;k++)if(Cc(I(k),w,M,R)!=null){T=k;break}}else for(var H=w.length-1;H>=0;H--)if(Cc(I(H),w,M,R)!=null){T=H;break}if(T<0)return}else{T=v+A*E;var q=(b==null?void 0:b.length)||w.length;if(q===0||T>=q||T<0)return}var ie=Nm(c,N,"hover",String(T));t.dispatch(Sm({active:!0,activeIndex:T.toString(),activeCoordinate:ie}))}finally{yo=null,As=null}};if(!l){o();return}n==="raf"?yo=requestAnimationFrame(o):typeof n=="number"&&As===null&&(o(),ph=null,As=setTimeout(()=>{ph?o():(As=null,yo=null)},n))}});Dp.startListening({actionCreator:qk,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var l="0",o=_d(r,r.tooltip.settings.shared),c=Nm(r,o,"hover",String(l));t.dispatch(Sm({active:!0,activeIndex:l,activeCoordinate:c}))}}}});Dp.startListening({actionCreator:Hk,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;i.active&&t.dispatch(Sm({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function Fk(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var gn=nn("externalEvent"),Kk=hd(),yh=new Map,wc=new Map,W0=new Map;Kk.startListening({actionCreator:gn,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){var i=n.type,l=Fk(n);W0.set(i,{handler:r,reactEvent:l});var o=yh.get(i);o!==void 0&&(cancelAnimationFrame(o),yh.delete(i));var c=t.getState(),{throttleDelay:f,throttledEvents:h}=c.eventSettings,p=h,y=p==="all"||(p==null?void 0:p.includes(i)),v=wc.get(i);v!==void 0&&(typeof f!="number"||!y)&&(clearTimeout(v),wc.delete(i));var x=()=>{var N=W0.get(i);try{if(!N)return;var{handler:O,reactEvent:C}=N,E=t.getState(),A={activeCoordinate:FQ(E),activeDataKey:CD(E),activeIndex:dl(E),activeLabel:AD(E),activeTooltipIndex:dl(E),isTooltipActive:KQ(E)};O&&O(A,C)}finally{yh.delete(i),wc.delete(i),W0.delete(i)}};if(!y){x();return}if(f==="raf"){var b=requestAnimationFrame(x);yh.set(i,b)}else if(typeof f=="number"){if(!wc.has(i)){x();var w=setTimeout(x,f);wc.set(i,w)}}else x()}}});var Ire=V([fu],e=>e.tooltipItemPayloads),Lre=V([Ire,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(l=>l.settings.graphicalItemId===r);if(n!=null){var{getPosition:i}=n;if(i!=null)return i(t)}}}),Gk=nn("touchMove"),Yk=hd(),Cs=null,Pi=null,PP=null,Sc=null;Yk.startListening({actionCreator:Gk,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){Sc=Fk(r);var n=t.getState(),{throttleDelay:i,throttledEvents:l}=n.eventSettings,o=l==="all"||l.includes("touchmove");Cs!==null&&(cancelAnimationFrame(Cs),Cs=null),Pi!==null&&(typeof i!="number"||!o)&&(clearTimeout(Pi),Pi=null),PP=Array.from(r.touches).map(f=>zw({clientX:f.clientX,clientY:f.clientY,currentTarget:r.currentTarget}));var c=()=>{if(Sc!=null){var f=t.getState(),h=_d(f,f.tooltip.settings.shared);if(h==="axis"){var p,y=(p=PP)===null||p===void 0?void 0:p[0];if(y==null){Cs=null,Pi=null;return}var v=$w(f,y);(v==null?void 0:v.activeIndex)!=null&&t.dispatch(pD({activeIndex:v.activeIndex,activeDataKey:void 0,activeCoordinate:v.activeCoordinate}))}else if(h==="item"){var x,b=Sc.touches[0];if(document.elementFromPoint==null||b==null)return;var w=document.elementFromPoint(b.clientX,b.clientY);if(!w||!w.getAttribute)return;var N=w.getAttribute(Gq),O=(x=w.getAttribute(Yq))!==null&&x!==void 0?x:void 0,C=xl(f).find(T=>T.id===O);if(N==null||C==null||O==null)return;var{dataKey:E}=C,A=Lre(f,N,O);t.dispatch(hD({activeDataKey:E,activeIndex:N,activeCoordinate:A,activeGraphicalItemId:O}))}Cs=null,Pi=null}};if(!o){c();return}i==="raf"?Cs=requestAnimationFrame(c):typeof i=="number"&&Pi===null&&(c(),Sc=null,Pi=setTimeout(()=>{Sc?c():(Pi=null,Cs=null)},i))}}});var Vk={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},Qk=vr({name:"eventSettings",initialState:Vk,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:$re}=Qk.actions,zre=Qk.reducer,Bre=xR({brush:TJ,cartesianAxis:dJ,chartData:HX,errorBars:Cee,eventSettings:zre,graphicalItems:HZ,layout:Aq,legend:B7,options:$X,polarAxis:dZ,polarOptions:kre,referenceElements:DJ,renderedTicks:WJ,rootProps:Pre,tooltip:eQ,zIndex:_X}),Ure=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return J9({reducer:Bre,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([Lk.middleware,$k.middleware,Dp.middleware,Kk.middleware,Yk.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(DR({type:"raf"}))},devTools:{serialize:{replacer:Tre},name:"recharts-".concat(r)}})};function qre(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=gr(),l=S.useRef(null);if(i)return r;l.current==null&&(l.current=Ure(t,n));var o=hj;return S.createElement(rH,{context:o,store:l.current},r)}function Hre(e){var{layout:t,margin:r}=e,n=ct(),i=gr();return S.useEffect(()=>{i||(n(Oq(t)),n(Nq(r)))},[n,i,t,r]),null}var Fre=S.memo(Hre,au);function Kre(e){var t=ct();return S.useEffect(()=>{t(Mre(e))},[t,e]),null}var Gre=e=>{var t=ct();return S.useEffect(()=>{t($re(e))},[t,e]),null},Yre=S.memo(Gre,au);function MP(e){var{zIndex:t,isPanorama:r}=e,n=S.useRef(null),i=ct();return S.useLayoutEffect(()=>(n.current&&i(NX({zIndex:t,element:n.current,isPanorama:r})),()=>{i(OX({zIndex:t,isPanorama:r}))}),[i,t,r]),S.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function RP(e){var{children:t,isPanorama:r}=e,n=ge(pX);if(!n||n.length===0)return t;var i=n.filter(o=>o<0),l=n.filter(o=>o>0);return S.createElement(S.Fragment,null,i.map(o=>S.createElement(MP,{key:o,zIndex:o,isPanorama:r})),t,l.map(o=>S.createElement(MP,{key:o,zIndex:o,isPanorama:r})))}var Vre=["children"];function Qre(e,t){if(e==null)return{};var r,n,i=Xre(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Xre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Pm(){return Pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pm.apply(null,arguments)}var Wre={width:"100%",height:"100%",display:"block"},Zre=S.forwardRef((e,t)=>{var r=Nj(),n=Oj(),i=f3();if(!ua(r)||!ua(n))return null;var{children:l,otherAttributes:o,title:c,desc:f}=e,h,p;return o!=null&&(typeof o.tabIndex=="number"?h=o.tabIndex:h=i?0:void 0,typeof o.role=="string"?p=o.role:p=i?"application":void 0),S.createElement(nj,Pm({},o,{title:c,desc:f,role:p,tabIndex:h,width:r,height:n,style:Wre,ref:t}),l)}),Jre=e=>{var{children:t}=e,r=ge(sp);if(!r)return null;var{width:n,height:i,y:l,x:o}=r;return S.createElement(nj,{width:n,height:i,x:o,y:l},t)},DP=S.forwardRef((e,t)=>{var{children:r}=e,n=Qre(e,Vre),i=gr();return i?S.createElement(Jre,null,S.createElement(RP,{isPanorama:!0},r)):S.createElement(Zre,Pm({ref:t},n),S.createElement(RP,{isPanorama:!1},r))});function ene(){var e=ct(),[t,r]=S.useState(null),n=ge(Kq);return S.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),l=i.width/t.offsetWidth;Be(l)&&l!==n&&e(Eq(l))}},[t,e,n]),r}function kP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kP(Object(r),!0).forEach(function(n){rne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rne(e,t,r){return(t=nne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nne(e){var t=ane(e,"string");return typeof t=="symbol"?t:t+""}function ane(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function es(){return es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},es.apply(null,arguments)}var ine=()=>(ZX(),null);function Mm(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var sne=S.forwardRef((e,t)=>{var r,n,i=S.useRef(null),[l,o]=S.useState({containerWidth:Mm((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Mm((n=e.style)===null||n===void 0?void 0:n.height)}),c=S.useCallback((h,p)=>{o(y=>{var v=Math.round(h),x=Math.round(p);return y.containerWidth===v&&y.containerHeight===x?y:{containerWidth:v,containerHeight:x}})},[]),f=S.useCallback(h=>{if(typeof t=="function"&&t(h),i.current!=null&&(i.current.disconnect(),i.current=null),h!=null&&typeof ResizeObserver<"u"){var{width:p,height:y}=h.getBoundingClientRect();c(p,y);var v=b=>{var w=b[0];if(w!=null){var{width:N,height:O}=w.contentRect;c(N,O)}},x=new ResizeObserver(v);x.observe(h),i.current=x}},[t,c]);return S.useEffect(()=>()=>{var h=i.current;h!=null&&h.disconnect()},[c]),S.createElement(S.Fragment,null,S.createElement(pd,{width:l.containerWidth,height:l.containerHeight}),S.createElement("div",es({ref:f},e)))}),lne=S.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,l]=S.useState({containerWidth:Mm(r),containerHeight:Mm(n)}),o=S.useCallback((f,h)=>{l(p=>{var y=Math.round(f),v=Math.round(h);return p.containerWidth===y&&p.containerHeight===v?p:{containerWidth:y,containerHeight:v}})},[]),c=S.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null){var{width:h,height:p}=f.getBoundingClientRect();o(h,p)}},[t,o]);return S.createElement(S.Fragment,null,S.createElement(pd,{width:i.containerWidth,height:i.containerHeight}),S.createElement("div",es({ref:c},e)))}),one=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return S.createElement(S.Fragment,null,S.createElement(pd,{width:r,height:n}),S.createElement("div",es({ref:t},e)))}),une=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?S.createElement(lne,es({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?S.createElement(one,es({},e,{width:r,height:n,ref:t})):S.createElement(S.Fragment,null,S.createElement(pd,{width:r,height:n}),S.createElement("div",es({ref:t},e)))});function cne(e){return e?sne:une}var dne=S.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:l,onContextMenu:o,onDoubleClick:c,onMouseDown:f,onMouseEnter:h,onMouseLeave:p,onMouseMove:y,onMouseUp:v,onTouchEnd:x,onTouchMove:b,onTouchStart:w,style:N,width:O,responsive:C,dispatchTouchEvents:E=!0}=e,A=S.useRef(null),T=ct(),[M,R]=S.useState(null),[D,I]=S.useState(null),k=ene(),H=jj(),q=(H==null?void 0:H.width)>0?H.width:O,ie=(H==null?void 0:H.height)>0?H.height:i,re=S.useCallback(ee=>{k(ee),typeof t=="function"&&t(ee),R(ee),I(ee),ee!=null&&(A.current=ee)},[k,t,R,I]),W=S.useCallback(ee=>{T(Ik(ee)),T(gn({handler:l,reactEvent:ee}))},[T,l]),$=S.useCallback(ee=>{T(Ob(ee)),T(gn({handler:h,reactEvent:ee}))},[T,h]),F=S.useCallback(ee=>{T(mD()),T(gn({handler:p,reactEvent:ee}))},[T,p]),J=S.useCallback(ee=>{T(Ob(ee)),T(gn({handler:y,reactEvent:ee}))},[T,y]),ne=S.useCallback(()=>{T(qk())},[T]),ce=S.useCallback(()=>{T(Hk())},[T]),L=S.useCallback(ee=>{T(Uk(ee.key))},[T]),X=S.useCallback(ee=>{T(gn({handler:o,reactEvent:ee}))},[T,o]),le=S.useCallback(ee=>{T(gn({handler:c,reactEvent:ee}))},[T,c]),oe=S.useCallback(ee=>{T(gn({handler:f,reactEvent:ee}))},[T,f]),he=S.useCallback(ee=>{T(gn({handler:v,reactEvent:ee}))},[T,v]),je=S.useCallback(ee=>{T(gn({handler:w,reactEvent:ee}))},[T,w]),Ne=S.useCallback(ee=>{E&&T(Gk(ee)),T(gn({handler:b,reactEvent:ee}))},[T,E,b]),Pe=S.useCallback(ee=>{T(gn({handler:x,reactEvent:ee}))},[T,x]),de=cne(C);return S.createElement(ID.Provider,{value:M},S.createElement(DM.Provider,{value:D},S.createElement(de,{width:q??(N==null?void 0:N.width),height:ie??(N==null?void 0:N.height),className:Xe("recharts-wrapper",n),style:tne({position:"relative",cursor:"default",width:q,height:ie},N),onClick:W,onContextMenu:X,onDoubleClick:le,onFocus:ne,onBlur:ce,onKeyDown:L,onMouseDown:oe,onMouseEnter:$,onMouseLeave:F,onMouseMove:J,onMouseUp:he,onTouchEnd:Pe,onTouchMove:Ne,onTouchStart:je,ref:re},S.createElement(ine,null),r)))}),fne=["width","height","responsive","children","className","style","compact","title","desc"];function hne(e,t){if(e==null)return{};var r,n,i=mne(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function mne(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var pne=S.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:l,className:o,style:c,compact:f,title:h,desc:p}=e,y=hne(e,fne),v=$n(y);return f?S.createElement(S.Fragment,null,S.createElement(pd,{width:r,height:n}),S.createElement(DP,{otherAttributes:v,title:h,desc:p},l)):S.createElement(dne,{className:o,style:c,width:r,height:n,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},S.createElement(DP,{otherAttributes:v,title:h,desc:p,ref:t},S.createElement(IJ,null,l)))});function _b(){return _b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_b.apply(null,arguments)}function IP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IP(Object(r),!0).forEach(function(n){vne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vne(e,t,r){return(t=gne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gne(e){var t=xne(e,"string");return typeof t=="symbol"?t:t+""}function xne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bne={top:5,right:5,bottom:5,left:5},jne=yne({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:bne,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},Vk),Xk=S.forwardRef(function(t,r){var n,i=or(t.categoricalChartProps,jne),{chartName:l,defaultTooltipEventType:o,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,categoricalChartProps:h}=t,p={chartName:l,defaultTooltipEventType:o,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return S.createElement(qre,{preloadedState:{options:p},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:l},S.createElement(CJ,{chartData:h.data}),S.createElement(Fre,{layout:i.layout,margin:i.margin}),S.createElement(Yre,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),S.createElement(Kre,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),S.createElement(pne,_b({},i,{ref:r})))}),wne=["axis"],Sne=S.forwardRef((e,t)=>S.createElement(Xk,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:wne,tooltipPayloadSearcher:LD,categoricalChartProps:e,ref:t})),Nne=["axis","item"],Wk=S.forwardRef((e,t)=>S.createElement(Xk,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Nne,tooltipPayloadSearcher:LD,categoricalChartProps:e,ref:t}));const Ii="",Eb=[{value:"all",label:"All time"},{value:"24h",label:"Last 24h",windowMs:1440*60*1e3},{value:"7d",label:"Last 7d",windowMs:10080*60*1e3},{value:"30d",label:"Last 30d",windowMs:720*60*60*1e3}],Z0=10;function One(e,t,r=new Date){const n=_ne(e),i=Ane(e,n),l=Cne(n.flatMap(y=>y.category??[])),o=l.length>0,c=n.some(y=>y.startedAtMs!==void 0),f=Eb.find(y=>y.value===t.timePeriod)??Eb[0],h=f.windowMs===void 0?void 0:r.getTime()-f.windowMs,p=n.filter(y=>t.experiment&&y.experiment!==t.experiment||t.category&&y.category!==t.category?!1:h!==void 0?y.startedAtMs!==void 0&&y.startedAtMs>=h:!0);return{buckets:Tne(p.map(y=>y.score)),experimentOptions:i,categoryOptions:l,totalScores:n.length,filteredScores:p.length,categoryAvailable:o,hasTimestampedScores:c}}function _ne(e){return e.runs&&e.runs.length>0?e.runs.flatMap(t=>Ene(t)):e.cells.flatMap(t=>t.tests.flatMap(r=>{const n=Zk(r,t.experiment);return n?[n]:[]}))}function Ene(e){const t=Mne(e.started_at);return e.tests.flatMap(r=>{const n=Zk(r,e.experiment);return n?[{...n,startedAtMs:t}]:[]})}function Zk(e,t){if(!Number.isFinite(e.score))return;const r=Pne(e.category);return{score:e.score,experiment:t,...r&&{category:r}}}function Ane(e,t){const r=new Map,n=new Set(e.experiments);for(const i of e.cells)n.add(i.experiment);for(const i of t)n.add(i.experiment),r.set(i.experiment,(r.get(i.experiment)??0)+1);return[...n].sort((i,l)=>i.localeCompare(l)).map(i=>({value:i,label:i,count:r.get(i)??0}))}function Cne(e){const t=new Map;for(const r of e)t.set(r,(t.get(r)??0)+1);return[...t.entries()].sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>({value:r,label:r,count:n}))}function Tne(e){if(e.length===0)return[];const t=Array.from({length:Z0},(r,n)=>({range:`${n*10}-${(n+1)*10}%`,count:0}));for(const r of e){const n=Math.max(0,Math.min(r,1)),i=Math.min(Math.floor(n*Z0),Z0-1);t[i].count++}return t}function Pne(e){const t=e==null?void 0:e.trim();return t||void 0}function Mne(e){const t=Date.parse(e);return Number.isFinite(t)?t:void 0}const Nt={green:"#34d399",red:"#f87171",gray:"#4b5563",cyan:"#22d3ee",gridLine:"#1f2937",labelText:"#9ca3af"},LP=["#22d3ee","#34d399","#facc15","#f87171","#a78bfa","#fb923c","#f472b6","#60a5fa"];function Rne(e){return LP[e%LP.length]}function Dne({data:e,projectId:t}){const[r,n]=S.useState(!0),[i,l]=S.useState(""),o=e.targets,c=Ue(t?vM(t,i||void 0):oB(i||void 0)),f=i?c.data:void 0,h=S.useMemo(()=>Une(e.runs??[]),[e.runs]);return d.jsxs("div",{className:"rounded-lg border border-gray-800",children:[d.jsxs("button",{type:"button",onClick:()=>n(p=>!p),className:"flex w-full items-center justify-between px-4 py-3 text-left transition-colors hover:bg-gray-900/30",children:[d.jsx("span",{className:"text-sm font-medium text-gray-300",children:"Analytics"}),d.jsx("span",{className:"text-xs text-gray-500",children:r?"▸ Show":"▾ Hide"})]}),!r&&d.jsxs("div",{className:"space-y-6 border-t border-gray-800 px-4 py-4",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{htmlFor:"baseline-select",className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Baseline target"}),d.jsxs("select",{id:"baseline-select",value:i,onChange:p=>l(p.target.value),className:"rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:[d.jsx("option",{value:"",children:"Select a baseline…"}),o.map(p=>d.jsx("option",{value:p,children:p},p))]}),i&&c.isLoading&&d.jsx("span",{className:"text-xs text-gray-500",children:"Loading…"})]}),i&&f&&d.jsx(kne,{data:f,baseline:i}),e.runs&&e.runs.length>0&&o.length>1&&d.jsx(Ine,{runs:e.runs,targets:o}),i&&f&&d.jsx(Lne,{data:f,baseline:i}),d.jsx($ne,{data:e}),h.length>1&&o.length>0&&d.jsx(qne,{data:h,targets:o}),!i&&d.jsx("p",{className:"text-xs text-gray-500",children:"Select a baseline target above to see gain and delta charts."})]})]})}function Bw({active:e,payload:t,label:r}){return!e||!(t!=null&&t.length)?null:d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-xs shadow-xl",children:[r&&d.jsx("div",{className:"mb-1 font-medium text-gray-300",children:r}),t.map((n,i)=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color}}),d.jsxs("span",{className:"text-gray-400",children:[n.name,":"]}),d.jsx("span",{className:"tabular-nums text-gray-200",children:typeof n.value=="number"?n.value.toFixed(3):n.value})]},`${n.name}-${i}`))]})}function eu({title:e,children:t}){return d.jsxs("div",{className:"space-y-3",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:e}),t]})}function kne({data:e,baseline:t}){const r=S.useMemo(()=>{const i=[];for(const l of e.cells)l.target!==t&&l.delta!==void 0&&i.push({experiment:l.experiment,target:l.target,g:l.normalized_gain??null,delta:l.delta});return i.sort((l,o)=>Math.abs(o.g??0)-Math.abs(l.g??0)),i},[e.cells,t]);if(r.length===0)return d.jsx(eu,{title:"Normalized Gain (g)",children:d.jsx("p",{className:"text-xs text-gray-500",children:"No gain data available. Ensure multiple targets exist."})});const n=r.map(i=>({name:`${i.target} · ${i.experiment}`,g:i.g??0,isNull:i.g===null}));return d.jsx(eu,{title:"Normalized Gain (g)",children:d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(wj,{width:"100%",height:Math.max(200,n.length*32),children:d.jsxs(Wk,{data:n,layout:"vertical",margin:{left:120,right:20,top:5,bottom:5},children:[d.jsx(Pp,{strokeDasharray:"3 3",stroke:Nt.gridLine,horizontal:!1}),d.jsx(Mp,{type:"number",tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Rp,{type:"category",dataKey:"name",tick:{fill:Nt.labelText,fontSize:11},width:120,axisLine:{stroke:Nt.gridLine}}),d.jsx(Ew,{content:d.jsx(Bw,{})}),d.jsx(Lw,{dataKey:"g",name:"Normalized Gain",children:n.map(i=>d.jsx(Aw,{fill:i.isNull?Nt.gray:i.g>0?Nt.green:i.g<0?Nt.red:Nt.gray},i.name))})]})})})})}function Ine({runs:e,targets:t}){const{tags:r,grid:n}=S.useMemo(()=>{const i=new Map;for(const c of e)for(const f of c.tags??[]){let h=i.get(f);h||(h=new Map,i.set(f,h));let p=h.get(c.target);p||(p={passed:0,total:0},h.set(c.target,p)),p.passed+=c.passed_count,p.total+=c.eval_count}const l=[...i.keys()].sort(),o=l.map(c=>{const f={tag:c},h=i.get(c);if(!h)return f;for(const p of t){const y=h.get(p);f[p]=y&&y.total>0?y.passed/y.total:-1}return f});return{tags:l,grid:o}},[e,t]);return r.length===0?null:d.jsx(eu,{title:"Pass Rate by Tag × Target",children:d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Tag"}),t.map(i=>d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:i},i))]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(i=>d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:i.tag}),t.map(l=>{const o=i[l];if(o<0)return d.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:"—"},l);const c=Math.round(o*100),f=o>=.8?"bg-emerald-400/20 text-emerald-400":o>=.5?"bg-yellow-400/20 text-yellow-400":"bg-red-400/20 text-red-400";return d.jsx("td",{className:"px-4 py-3",children:d.jsxs("span",{className:`inline-block rounded px-2 py-0.5 text-xs tabular-nums font-medium ${f}`,children:[c,"%"]})},l)})]},i.tag))})]})})})}function Lne({data:e,baseline:t}){const r=S.useMemo(()=>e.cells.filter(n=>n.target!==t&&n.delta!==void 0&&n.delta<0).sort((n,i)=>(n.delta??0)-(i.delta??0)),[e.cells,t]);return r.length===0?null:d.jsx(eu,{title:"Regressions vs. Baseline",children:d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg Score"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Delta"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"g"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:r.map(n=>{var i;return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:n.experiment}),d.jsx("td",{className:"px-4 py-3 text-gray-300",children:n.target}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[Math.round(n.avg_score*100),"%"]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:(i=n.delta)==null?void 0:i.toFixed(3)}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:n.normalized_gain!==void 0&&n.normalized_gain!==null?n.normalized_gain.toFixed(3):"—"})]},`${n.experiment}::${n.target}`)})})]})})})}const $P={experiment:Ii,category:Ii,timePeriod:"all"};function $ne({data:e}){const[t,r]=S.useState($P),n=S.useMemo(()=>One(e,t),[e,t]);S.useEffect(()=>{r(h=>{const p=!h.experiment||n.experimentOptions.some(x=>x.value===h.experiment),y=!h.category||n.categoryOptions.some(x=>x.value===h.category),v=h.timePeriod==="all"||n.hasTimestampedScores;return p&&y&&v?h:{experiment:p?h.experiment:Ii,category:y?h.category:Ii,timePeriod:v?h.timePeriod:"all"}})},[n.experimentOptions,n.categoryOptions,n.hasTimestampedScores]);const i=(h,p)=>{r(y=>({...y,[h]:p}))},l=()=>r($P),o=t.experiment!==Ii||t.category!==Ii||t.timePeriod!=="all",c=n.totalScores>0,f=Bne(n,t);return d.jsx(eu,{title:"Score Distribution",children:d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 px-3 py-3",children:[d.jsxs("div",{className:"grid gap-3 sm:grid-cols-3",children:[d.jsxs(J0,{id:"score-distribution-experiment",label:"Experiment",value:t.experiment,onChange:h=>i("experiment",h),disabled:n.experimentOptions.length===0,children:[d.jsx("option",{value:Ii,children:"All experiments"}),n.experimentOptions.map(h=>d.jsxs("option",{value:h.value,children:[h.label," (",h.count,")"]},h.value))]}),d.jsxs(J0,{id:"score-distribution-category",label:"Category",value:t.category,onChange:h=>i("category",h),disabled:!n.categoryAvailable,help:n.categoryAvailable||!c?void 0:"Category metadata is not present in these compare results.",children:[d.jsx("option",{value:Ii,children:"All categories"}),n.categoryOptions.map(h=>d.jsxs("option",{value:h.value,children:[h.label," (",h.count,")"]},h.value))]}),d.jsx(J0,{id:"score-distribution-time",label:"Time period",value:t.timePeriod,onChange:h=>i("timePeriod",h),disabled:!n.hasTimestampedScores,help:n.hasTimestampedScores||!c?void 0:"Recent windows need run timestamps from compare data.",children:Eb.map(h=>d.jsx("option",{value:h.value,children:h.label},h.value))})]}),d.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-2 border-t border-gray-800/70 pt-3 text-xs",children:[d.jsxs("span",{className:"tabular-nums text-gray-400",children:["Showing ",d.jsx("span",{className:"text-gray-200",children:n.filteredScores})," of"," ",d.jsx("span",{className:"text-gray-200",children:n.totalScores})," scores"]}),o&&d.jsx("button",{type:"button",onClick:l,className:"text-gray-500 underline-offset-2 transition-colors hover:text-gray-300 hover:underline",children:"Clear filters"})]})]}),n.buckets.length>0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(wj,{width:"100%",height:200,children:d.jsxs(Wk,{data:n.buckets,margin:{left:10,right:10,top:5,bottom:5},children:[d.jsx(Pp,{strokeDasharray:"3 3",stroke:Nt.gridLine,vertical:!1}),d.jsx(Mp,{dataKey:"range",tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Rp,{tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Ew,{content:d.jsx(Bw,{})}),d.jsx(Lw,{dataKey:"count",name:"Tests",fill:Nt.cyan,radius:[2,2,0,0]})]})})}):d.jsx(zne,{message:f})]})})}function J0({id:e,label:t,value:r,onChange:n,disabled:i,help:l,children:o}){return d.jsxs("div",{className:"min-w-0 space-y-1",children:[d.jsx("label",{htmlFor:e,className:"block text-xs font-medium uppercase tracking-wider text-gray-500",children:t}),d.jsx("select",{id:e,value:r,disabled:i,onChange:c=>n(c.target.value),className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 transition-colors focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500 disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-600",children:o}),l&&d.jsx("p",{className:"text-xs leading-5 text-gray-500",children:l})]})}function zne({message:e}){return d.jsx("div",{className:"rounded-lg border border-dashed border-gray-800 bg-gray-900/20 px-4 py-8 text-center",children:d.jsx("p",{className:"text-sm text-gray-400",children:e})})}function Bne(e,t){return e.totalScores===0?"No test scores are available in this comparison yet.":t.category&&!e.categoryAvailable?"Category metadata is not available in these compare results.":"No scores match the selected distribution filters."}function Une(e){if(e.length===0)return[];const t=new Map;for(const n of e){const i=n.started_at.slice(0,10);let l=t.get(i);l||(l=new Map,t.set(i,l));let o=l.get(n.target);o||(o={scoreSum:0,count:0},l.set(n.target,o)),o.scoreSum+=n.avg_score,o.count++}return[...t.keys()].sort().map(n=>{const i={date:n},l=t.get(n);if(!l)return i;for(const[o,c]of l)i[o]=Math.round(c.scoreSum/c.count*1e3)/1e3;return i})}function qne({data:e,targets:t}){return d.jsx(eu,{title:"Score Trend Over Time",children:d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(wj,{width:"100%",height:250,children:d.jsxs(Sne,{data:e,margin:{left:10,right:20,top:5,bottom:5},children:[d.jsx(Pp,{strokeDasharray:"3 3",stroke:Nt.gridLine}),d.jsx(Mp,{dataKey:"date",tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Rp,{domain:[0,1],tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Ew,{content:d.jsx(Bw,{})}),d.jsx(c3,{wrapperStyle:{fontSize:12,color:Nt.labelText}}),t.map((r,n)=>d.jsx(Tk,{type:"monotone",dataKey:r,stroke:Rne(n),strokeWidth:2,dot:{r:3},connectNulls:!0},r))]})})})})}function Ln({rate:e}){const t=Math.round(e*100);return d.jsxs("div",{className:"relative h-5 w-20 overflow-hidden rounded-full bg-gray-800",children:[d.jsx("div",{className:"absolute inset-y-0 left-0 bg-gradient-to-r from-blue-400 to-blue-600",style:{width:`${t}%`}}),d.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold tabular-nums text-white",children:[t,"%"]})]})}function Jk({data:e,isLoading:t,isError:r,error:n,projectId:i,readOnly:l}){var C,E;const[o,c]=S.useState("aggregated"),[f,h]=S.useState([]),{allTags:p,tagCounts:y}=S.useMemo(()=>{const A=new Map;for(const T of(e==null?void 0:e.runs)??[])for(const M of T.tags??[])A.set(M,(A.get(M)??0)+1);return{allTags:[...A.keys()].sort(),tagCounts:A}},[e==null?void 0:e.runs]),v=S.useMemo(()=>{if(!e||f.length===0)return e;const A=new Set(f),T=(e.runs??[]).filter(k=>(k.tags??[]).some(H=>A.has(H))),M=new Map,R=new Set,D=new Set;for(const k of T){R.add(k.experiment),D.add(k.target);const H=`${k.experiment}::${k.target}`,q=M.get(H)??{experiment:k.experiment,target:k.target,eval_count:0,quality_count:0,passed_count:0,execution_error_count:0,score_sum:0,tests:[]},ie=Ho(k);q.eval_count+=k.eval_count,q.quality_count+=ie,q.passed_count+=k.passed_count,q.execution_error_count+=Yt(k),q.score_sum+=k.avg_score*ie;for(const re of k.tests)q.tests.push(re);M.set(H,q)}const I=[...M.values()].map(k=>{const H=new Map;for(const q of k.tests)H.set(q.test_id,q);return{experiment:k.experiment,target:k.target,eval_count:k.eval_count,quality_count:k.quality_count,passed_count:k.passed_count,execution_error_count:k.execution_error_count,pass_rate:k.quality_count>0?k.passed_count/k.quality_count:0,avg_score:k.quality_count>0?k.score_sum/k.quality_count:0,tests:[...H.values()].slice(-100)}});return{...e,experiments:[...R].sort(),targets:[...D].sort(),cells:I,runs:T}},[e,f]),x=A=>{h(T=>T.includes(A)?T.filter(M=>M!==A):[...T,A])},b=()=>h([]),w=((C=v==null?void 0:v.runs)==null?void 0:C.length)??0,N=e&&e.cells.length>0,O=f.length>0&&v&&(((E=v.runs)==null?void 0:E.length)??0)===0;return d.jsxs("div",{className:"space-y-4",children:[d.jsx(Fne,{mode:o,onModeChange:c,runsCount:w}),t&&d.jsx(iae,{}),!t&&r&&n&&d.jsx(nae,{message:`Failed to load comparison data: ${n.message}`}),!t&&!r&&!N&&d.jsx(aae,{}),!t&&!r&&N&&d.jsxs(d.Fragment,{children:[p.length>0&&d.jsx(Hne,{allTags:p,tagCounts:y,selected:f,onToggle:x,onClear:b}),O?d.jsx(kp,{headline:`No runs match ${f.map(A=>`\`${A}\``).join(" + ")}`,body:"Clear the filter or pick a different tag combination.",action:{label:"Clear filter",onClick:b}}):v&&d.jsxs(d.Fragment,{children:[o==="aggregated"&&d.jsx(Gne,{data:v,projectId:i}),o==="per-run"&&d.jsx(Wne,{data:v,projectId:i,readOnly:l??!1})]})]})]})}function Hne({allTags:e,tagCounts:t,selected:r,onToggle:n,onClear:i}){const l=new Set(r),o=r.length>0;return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Filter by tag"}),e.map(c=>{const f=l.has(c),h=t.get(c)??0;return d.jsxs("button",{type:"button",onClick:()=>n(c),"aria-pressed":f,className:`inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors ${f?"border-cyan-900/60 bg-cyan-950/30 text-cyan-300 hover:border-cyan-800/80":"border-gray-700 text-gray-400 hover:border-gray-600 hover:text-gray-200"}`,children:[d.jsx("span",{children:c}),d.jsx("span",{className:`rounded px-1 text-[0.65rem] tabular-nums ${f?"bg-cyan-900/50 text-cyan-200":"bg-gray-800 text-gray-500"}`,children:h})]},c)}),o&&d.jsx("button",{type:"button",onClick:i,className:"ml-1 text-xs text-gray-500 underline-offset-2 transition-colors hover:text-gray-300 hover:underline",children:"Clear"})]}),d.jsxs("p",{className:"mt-2 text-xs text-gray-500",children:["Showing runs with ",d.jsx("span",{className:"text-gray-400",children:"any"})," selected tag."]})]})}function Fne({mode:e,onModeChange:t,runsCount:r}){return d.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:"Analyze runs"}),d.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Study one experiment against another, or pit individual runs head-to-head."})]}),d.jsx(Kne,{mode:e,onChange:t,runsCount:r})]})}function Kne({mode:e,onChange:t,runsCount:r}){const n=r===0;return d.jsxs("div",{role:"tablist","aria-label":"Comparison view mode",className:"inline-flex items-center rounded-lg border border-gray-800 bg-gray-900/50 p-1",children:[d.jsx(zP,{active:e==="aggregated",onClick:()=>t("aggregated"),children:"Aggregated"}),d.jsxs(zP,{active:e==="per-run",onClick:()=>t("per-run"),disabled:n,title:n?"No runs available":void 0,children:["Per run",r>0&&d.jsx("span",{className:"ml-1.5 rounded bg-gray-800 px-1.5 py-0.5 text-xs tabular-nums text-gray-400",children:r})]})]})}function zP({active:e,onClick:t,disabled:r,title:n,children:i}){return d.jsx("button",{type:"button",role:"tab","aria-selected":e,onClick:t,disabled:r,title:n,className:`rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${e?"bg-gray-800 text-cyan-400 shadow-sm":"text-gray-400 hover:text-gray-200 disabled:text-gray-600 disabled:hover:text-gray-600"}`,children:i})}function Gne({data:e,projectId:t}){const{experiments:r,targets:n,cells:i}=e,l=S.useMemo(()=>{const o=new Map;for(const c of i)o.set(`${c.experiment}::${c.target}`,c);return o},[i]);return r.length<=1&&n.length<=1?d.jsx(kp,{headline:"Not enough variation to compare",body:`The aggregated matrix requires at least 2 experiments or 2 targets. Currently ${r.length} experiment(s) and ${n.length} target(s).`}):d.jsxs("div",{className:"space-y-3",children:[d.jsx(rae,{}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:d.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Target ↓ / Experiment →"})}),r.map(o=>d.jsx("th",{className:"px-4 py-3 font-medium text-gray-300",children:o},o))]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(o=>d.jsx(Yne,{target:o,experiments:r,cellMap:l},o))})]})}),d.jsx(Dne,{data:e,projectId:t})]})}function Yne({target:e,experiments:t,cellMap:r}){return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:e}),t.map(n=>{const i=r.get(`${n}::${e}`);return d.jsx("td",{className:"px-4 py-3",children:i?d.jsx(Vne,{cell:i}):d.jsx(Qne,{})},n)})]})}function Vne({cell:e}){const[t,r]=S.useState(!1),n=Math.round(e.avg_score*100),i=Ho(e),l=Yt(e);return d.jsxs("div",{className:"space-y-2",children:[d.jsxs("button",{type:"button",className:"group flex w-full flex-col gap-1 rounded-md border border-gray-800 bg-gray-900/40 px-3 py-2 text-left transition-colors hover:border-gray-700 hover:bg-gray-900/70",onClick:()=>r(o=>!o),"aria-expanded":t,children:[d.jsx(Ln,{rate:e.pass_rate}),d.jsxs("div",{className:"flex items-center gap-2 text-xs tabular-nums text-gray-500",children:[d.jsxs("span",{children:[d.jsx("span",{className:"text-emerald-400",children:e.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),d.jsx("span",{children:i})]}),d.jsx("span",{className:"text-gray-700",children:"·"}),d.jsxs("span",{children:["avg ",n,"%"]}),l>0&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-gray-700",children:"·"}),d.jsxs("span",{className:"text-amber-400",children:[l," errors"]})]})]})]}),t&&d.jsx(Xne,{tests:e.tests})]})}function Qne(){return d.jsx("div",{className:"text-center text-gray-600",children:"—"})}function Xne({tests:e}){return d.jsxs("div",{className:"rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2",children:[d.jsx("div",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Test cases"}),d.jsx("ul",{className:"space-y-1",children:e.map(t=>{const r=t.execution_status==="execution_error";return d.jsxs("li",{className:"flex items-center gap-2 text-xs",children:[d.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${r?"bg-amber-400":t.passed?"bg-emerald-400":"bg-red-400"}`}),d.jsx("span",{className:"flex-1 truncate text-gray-300",title:t.test_id,children:t.test_id}),d.jsx("span",{className:`tabular-nums ${r?"text-amber-400":t.passed?"text-emerald-400":"text-red-400"}`,children:r?"error":`${Math.round(t.score*100)}%`})]},t.test_id)})})]})}function Wne({data:e,projectId:t,readOnly:r}){const n=e.runs??[],[i,l]=S.useState(new Set),[o,c]=S.useState(!1),[f,h]=S.useState(null),p=x=>{l(b=>{const w=new Set(b);return w.has(x)?w.delete(x):w.add(x),w})},y=()=>l(new Set),v=S.useMemo(()=>n.filter(x=>i.has(x.run_id)),[n,i]);return n.length===0?d.jsx(kp,{headline:"No runs yet",body:"Run an evaluation to populate the per-run view."}):o&&v.length>=2?d.jsx(eae,{runs:v,onBack:()=>c(!1)}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("div",{className:"flex items-center justify-between text-sm text-gray-400",children:d.jsxs("span",{children:[d.jsx("span",{className:"font-medium text-gray-300",children:n.length})," run",n.length===1?"":"s"," — select two or more to compare side-by-side"]})}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"w-10 px-3 py-3","aria-label":"Select"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Timestamp"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Tags"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Tests"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(x=>d.jsx(Zne,{run:x,checked:i.has(x.run_id),onToggle:()=>p(x.run_id),editing:f===x.run_id,onStartEdit:()=>h(x.run_id),onEndEdit:()=>h(null),projectId:t,readOnly:r},x.run_id))})]})}),i.size>0&&d.jsxs("div",{role:"toolbar","aria-label":"Selection actions",className:"sticky bottom-4 z-10 flex items-center justify-between gap-3 rounded-lg border border-cyan-900/50 bg-gray-900/95 px-4 py-3 shadow-xl backdrop-blur",children:[d.jsxs("div",{className:"text-sm text-gray-300",children:[d.jsx("span",{className:"font-semibold tabular-nums text-cyan-400",children:i.size})," ","selected"]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:y,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Clear"}),d.jsxs("button",{type:"button",disabled:i.size<2,onClick:()=>c(!0),className:"inline-flex items-center gap-1.5 rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:["Compare ",i.size,d.jsx("span",{"aria-hidden":!0,children:"→"})]})]})]})]})}function Zne({run:e,checked:t,onToggle:r,editing:n,onStartEdit:i,onEndEdit:l,projectId:o,readOnly:c}){const f=Math.round(e.avg_score*100),h=Ho(e),p=Yt(e),y=!c,v=S.useRef(null),x=e.tags??[],b=e.metadata_dirty===!0,w=x[0]??e.run_id,N=sae(e.run_id),O=x.length>0?"inline-flex flex-wrap items-center gap-1 rounded-md px-1 py-0.5 transition-colors hover:bg-gray-800/60":b?"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-xs text-yellow-300 transition-colors hover:border-yellow-700":"rounded-md border border-dashed border-gray-700 px-2 py-0.5 text-xs text-gray-500 transition-colors hover:border-cyan-800 hover:text-cyan-400",C=S.useRef(n);return S.useEffect(()=>{var E;C.current&&!n&&((E=v.current)==null||E.focus()),C.current=n},[n]),d.jsxs(d.Fragment,{children:[d.jsxs("tr",{className:`transition-colors ${t?"bg-cyan-950/20 hover:bg-cyan-950/30":"hover:bg-gray-900/30"}`,children:[d.jsx("td",{className:"px-3 py-3 align-middle",children:d.jsx("input",{type:"checkbox",className:"h-4 w-4 cursor-pointer rounded border-gray-700 bg-gray-900 text-cyan-500 accent-cyan-500 focus:ring-cyan-500",checked:t,onChange:r,"aria-label":`Select run ${w}`})}),d.jsxs("td",{className:"px-4 py-3 align-middle",title:e.run_id,children:[d.jsx("div",{className:"font-medium text-gray-200 tabular-nums",children:e5(e.started_at)}),N&&d.jsx("div",{className:"text-xs text-gray-500",children:N})]}),d.jsx("td",{className:"px-4 py-3 align-middle",children:y?d.jsx("button",{ref:v,type:"button",onClick:E=>{E.stopPropagation(),i()},className:O,"aria-label":x.length>0?"Edit tags":"Add tags",children:x.length>0?d.jsx(BP,{tags:x,dirty:b}):b?d.jsx(d.Fragment,{children:"Pending clear"}):d.jsx(d.Fragment,{children:"+ tags"})}):x.length>0?d.jsx(BP,{tags:x,dirty:b}):d.jsx("span",{className:b?"text-yellow-400":"text-gray-600",children:b?"Pending clear":"—"})}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.experiment}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.target}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[d.jsx("div",{children:h}),p>0&&d.jsxs("div",{className:"text-xs text-amber-400",children:[p," errors"]})]}),d.jsx("td",{className:"px-4 py-3 align-middle",children:d.jsx(Ln,{rate:e.pass_rate})}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[f,"%"]})]}),n&&d.jsx("tr",{className:"bg-gray-950/80",children:d.jsx("td",{colSpan:8,className:"px-4 py-3",children:d.jsx(Jne,{runId:e.run_id,currentTags:x,source:e.source,projectId:o,onClose:l})})})]})}function BP({tags:e,dirty:t}){return d.jsxs("span",{className:"inline-flex flex-wrap items-center gap-1",children:[e.map(r=>d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:r},r)),t?d.jsx("span",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-xs font-medium text-yellow-300",children:"Pending sync"}):null]})}function Jne({runId:e,currentTags:t,source:r,projectId:n,onClose:i}){const[l,o]=S.useState(t),[c,f]=S.useState(""),[h,p]=S.useState(null),y=fa(),v=S.useRef(null);S.useEffect(()=>{var E;(E=v.current)==null||E.focus()},[]);const x=wx({mutationFn:()=>CB(e,l,n),onSuccess:()=>{y.invalidateQueries({queryKey:["compare"]}),y.invalidateQueries({queryKey:["runs"]}),y.invalidateQueries({queryKey:["remote-status",n??""]}),n&&(y.invalidateQueries({queryKey:["projects",n,"compare"]}),y.invalidateQueries({queryKey:["projects",n,"runs"]})),i()},onError:E=>p(E.message)}),b=wx({mutationFn:()=>TB(e,n),onSuccess:()=>{y.invalidateQueries({queryKey:["compare"]}),y.invalidateQueries({queryKey:["runs"]}),y.invalidateQueries({queryKey:["remote-status",n??""]}),n&&(y.invalidateQueries({queryKey:["projects",n,"compare"]}),y.invalidateQueries({queryKey:["projects",n,"runs"]})),i()},onError:E=>p(E.message)}),w=x.isPending||b.isPending,N=l.length!==t.length||l.some((E,A)=>E!==t[A]),O=()=>{const E=c.trim();if(E!==""){if(l.includes(E)){f("");return}o([...l,E]),f(""),p(null)}},C=E=>{o(l.filter(A=>A!==E))};return d.jsxs("div",{className:"space-y-2 rounded-md border border-gray-800 bg-gray-900/60 p-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-400",children:"Tag run"}),d.jsx("span",{className:"text-xs text-gray-500",children:"Multi-valued. Enter or comma adds; Backspace removes the last chip."})]}),r==="remote"?d.jsx("div",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-3 py-2 text-xs text-yellow-300",children:"Remote tag edits are saved as local metadata. Use Sync Metadata to push them to the results repo."}):null,d.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md border border-gray-700 bg-gray-950 px-2 py-1.5 focus-within:border-cyan-500 focus-within:ring-1 focus-within:ring-cyan-500",children:[l.map(E=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:[E,d.jsx("button",{type:"button",onClick:()=>C(E),disabled:w,className:"text-cyan-500 transition-colors hover:text-cyan-200 disabled:opacity-50","aria-label":`Remove tag ${E}`,children:"×"})]},E)),d.jsx("input",{ref:v,type:"text",className:"flex-1 min-w-[140px] bg-transparent text-sm text-gray-100 placeholder:text-gray-600 focus:outline-none disabled:opacity-50",placeholder:l.length===0?"e.g. baseline, v2-prompt, slow":"Add tag…",value:c,onChange:E=>{p(null),f(E.target.value)},maxLength:60,disabled:w,onKeyDown:E=>{E.key==="Enter"||E.key===","?(E.preventDefault(),O()):E.key==="Backspace"&&c===""&&l.length>0?(E.preventDefault(),o(l.slice(0,-1))):E.key==="Escape"&&i()},onBlur:O})]}),d.jsxs("div",{className:"flex items-center justify-end gap-2",children:[d.jsx("button",{type:"button",onClick:i,disabled:w,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200 disabled:opacity-50",children:"Cancel"}),t.length>0&&d.jsx("button",{type:"button",onClick:()=>{w||b.mutate()},disabled:w,className:"rounded-md border border-red-900/60 px-3 py-1.5 text-sm text-red-400 transition-colors hover:border-red-800 hover:bg-red-950/30 hover:text-red-300 disabled:opacity-50",children:"Clear all"}),d.jsx("button",{type:"button",disabled:!N||w,onClick:()=>{w||!N||x.mutate()},className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:x.isPending?"Saving…":"Save"})]}),h&&d.jsx("div",{className:"rounded-md border border-red-900/60 bg-red-950/30 px-3 py-1.5 text-xs text-red-400",children:h})]})}function eae({runs:e,onBack:t}){const r=S.useMemo(()=>{const i=new Set,l=[];for(const o of e)for(const c of o.tests)i.has(c.test_id)||(i.add(c.test_id),l.push(c.test_id));return l},[e]),n=S.useMemo(()=>e.map(i=>{const l=new Map;for(const o of i.tests)l.set(o.test_id,o);return l}),[e]);return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("button",{type:"button",onClick:t,className:"inline-flex items-center gap-1 text-sm text-cyan-400 transition-colors hover:text-cyan-300",children:[d.jsx("span",{"aria-hidden":!0,children:"←"})," Back to runs"]}),d.jsxs("span",{className:"text-sm text-gray-500",children:[e.length," runs · ",r.length," tests"]})]}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsxs("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:[d.jsxs("tr",{children:[d.jsx("th",{className:"sticky left-0 z-10 bg-gray-900/80 px-4 py-3 font-medium text-gray-400 backdrop-blur",children:"Test case"}),e.map(i=>d.jsx("th",{className:"px-4 py-3 align-bottom",children:d.jsx(tae,{run:i})},i.run_id))]}),d.jsxs("tr",{className:"border-t border-gray-800/50 bg-gray-900/30",children:[d.jsx("th",{className:"sticky left-0 z-10 bg-gray-900/80 px-4 py-2 text-xs font-medium uppercase tracking-wider text-gray-500 backdrop-blur",children:"Pass rate"}),e.map(i=>d.jsx("th",{className:"px-4 py-2",children:d.jsx(Ln,{rate:i.pass_rate})},i.run_id))]})]}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:r.map(i=>d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"sticky left-0 z-10 bg-gray-950/70 px-4 py-3 font-medium text-gray-200 backdrop-blur",children:i}),n.map((l,o)=>{const c=l.get(i),f=e[o].run_id;return c?d.jsx("td",{className:"px-4 py-3",children:d.jsx("div",{className:"flex items-center gap-2",children:c.execution_status==="execution_error"?d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":!0,className:"h-1.5 w-1.5 rounded-full bg-amber-400"}),d.jsx("span",{className:"tabular-nums text-amber-400",children:"error"})]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${c.passed?"bg-emerald-400":"bg-red-400"}`}),d.jsxs("span",{className:`tabular-nums ${c.passed?"text-emerald-400":"text-red-400"}`,children:[Math.round(c.score*100),"%"]})]})})},f):d.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:"—"},f)})]},i))})]})})]})}function tae({run:e}){const t=e.tags??[];return d.jsxs("div",{className:"min-w-[140px] space-y-1",children:[d.jsx("div",{className:"text-sm font-medium text-gray-200 tabular-nums",title:e.run_id,children:e5(e.started_at)}),t.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(r=>d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-1.5 py-0.5 text-[0.7rem] font-medium text-cyan-300",children:r},r))}),d.jsxs("div",{className:"text-xs text-gray-500",children:[e.experiment," · ",e.target]})]})}function rae(){return d.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",role:"note",children:[d.jsx(vh,{className:"bg-emerald-400",label:"80%+"}),d.jsx(vh,{className:"bg-yellow-400",label:"50–80%"}),d.jsx(vh,{className:"bg-red-400",label:"< 50%"}),d.jsx(vh,{className:"bg-gray-700",label:"no data"})]})}function vh({className:e,label:t}){return d.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[d.jsx("span",{className:`h-2 w-2 rounded-full ${e}`,"aria-hidden":!0}),d.jsx("span",{children:t})]})}function nae({message:e}){return d.jsx("div",{className:"rounded-lg border border-red-900/60 bg-red-950/30 p-4 text-sm text-red-400",children:e})}function aae(){return d.jsx(kp,{headline:"No comparison data yet",body:"Run evaluations with different experiment and target combinations to populate this view."})}function kp({headline:e,body:t,action:r}){return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-300",children:e}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:t}),r&&d.jsx("button",{type:"button",onClick:r.onClick,className:"mt-4 inline-flex items-center rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400",children:r.label})]})}function iae(){return d.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:d.jsxs("div",{className:"animate-pulse",children:[d.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>d.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[d.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},e))]})})}function e5(e){try{const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const r=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0");return`${r}-${n}-${i} ${l}:${o}`}catch{return e}}function sae(e){const t=e.split("::");return t.length<2?null:t.slice(0,-1).join(" · ")}function t5({projectId:e}){const{data:t,isLoading:r}=e?Ue(Qb(e)):fM();if(r)return d.jsx(lae,{});const n=(t==null?void 0:t.experiments)??[];return n.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No experiments found"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Experiments will appear here once evaluations are run with experiment labels."})]}):d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[760px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Targets"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Execution Errors"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Last Run"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(i=>{const l=Ho(i),o=Yt(i);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:e?d.jsx(Oe,{to:"/projects/$projectId/experiments/$experimentName",params:{projectId:e,experimentName:i.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:i.name}):d.jsx(Oe,{to:"/experiments/$experimentName",params:{experimentName:i.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:i.name})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:i.run_count}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:i.target_count}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[d.jsx("span",{className:"text-emerald-400",children:i.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),l]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:o>0?o:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(Ln,{rate:i.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:UP(i.last_run).full,children:UP(i.last_run).date})]},i.name)})})]})})}function UP(e){if(!e)return{date:"N/A",full:"N/A"};try{const t=new Date(e);if(Number.isNaN(t.getTime()))return{date:"N/A",full:"N/A"};const r=t.toLocaleString(),n=Date.now()-t.getTime(),i=Math.floor(n/6e4),l=Math.floor(n/36e5);let o;return i<1?o="just now":i<60?o=`${i} min ago`:l<24?o=`${l} hour${l===1?"":"s"} ago`:o=t.toLocaleDateString(),{date:o,full:r}}catch{return{date:"N/A",full:"N/A"}}}function lae(){return d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("div",{className:"min-w-[760px] animate-pulse",children:[d.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>d.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[d.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},e))]})})}function oae(e){if(!e)return"No runs";const t=new Date(e);if(Number.isNaN(t.getTime()))return"N/A";const r=Date.now()-t.getTime(),n=Math.floor(r/6e4);if(n<1)return"Just now";if(n<60)return`${n}m ago`;const i=Math.floor(n/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function uae({project:e,canRemove:t=!1,onRemove:r}){const n=Math.round(e.pass_rate*100),i=Yt(e),[l,o]=S.useState(!1),[c,f]=S.useState(!1),[h,p]=S.useState(!1),[y,v]=S.useState(null),x=S.useId(),b=S.useId(),w=S.useRef(null),N=S.useRef(null),O=S.useRef(null);S.useEffect(()=>{if(!l)return;function T(R){var I,k;const D=R.target;(I=w.current)!=null&&I.contains(D)||(k=N.current)!=null&&k.contains(D)||o(!1)}function M(R){var D;R.key==="Escape"&&(o(!1),(D=w.current)==null||D.focus())}return document.addEventListener("pointerdown",T),document.addEventListener("keydown",M),()=>{document.removeEventListener("pointerdown",T),document.removeEventListener("keydown",M)}},[l]),S.useEffect(()=>{var T;c&&((T=O.current)==null||T.focus())},[c]);function C(){o(!1),v(null),f(!0)}async function E(){if(!(!r||h)){p(!0),v(null);try{await r(e)}catch(T){v(T.message),p(!1)}}}function A(){var T;h||(f(!1),v(null),(T=w.current)==null||T.focus())}return d.jsxs("article",{className:"group relative rounded-lg border border-gray-800 bg-gray-900/50 transition-colors hover:border-cyan-800 hover:bg-gray-900",children:[d.jsxs(Oe,{to:"/projects/$projectId",params:{projectId:e.id},className:"block p-5 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:[d.jsx("div",{className:"flex items-start justify-between",children:d.jsxs("div",{className:"min-w-0 flex-1 pr-10",children:[d.jsx("h3",{className:"truncate text-lg font-semibold text-white group-hover:text-cyan-400",children:e.name}),d.jsx("p",{className:"mt-1 truncate text-xs text-gray-500",children:e.path})]})}),d.jsxs("div",{className:"mt-4 grid grid-cols-4 gap-3",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Runs"}),d.jsx("p",{className:"text-lg font-semibold text-white",children:e.run_count})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Pass Rate"}),d.jsx("p",{className:`text-lg font-semibold ${e.run_count===0?"text-gray-500":n>=80?"text-emerald-400":n>=50?"text-yellow-400":"text-red-400"}`,children:e.run_count>0?`${n}%`:"--"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Errors"}),d.jsx("p",{className:`text-lg font-semibold ${i>0?"text-amber-300":"text-gray-500"}`,children:i})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Last Run"}),d.jsx("p",{className:"text-sm text-gray-300",children:oae(e.last_run)})]})]})]}),t&&r?d.jsxs("div",{className:"absolute right-3 top-3 z-10",children:[d.jsx("button",{ref:w,type:"button","aria-haspopup":"menu","aria-expanded":l,"aria-controls":l?x:void 0,"aria-label":`Open ${e.name} project menu`,onClick:()=>o(T=>!T),className:"flex h-8 w-8 items-center justify-center rounded-md text-lg leading-none text-gray-500 transition-colors hover:bg-gray-800 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:d.jsx("span",{"aria-hidden":"true",children:"..."})}),l?d.jsx("div",{ref:N,id:x,role:"menu","aria-label":`${e.name} actions`,className:"absolute right-0 top-10 w-44 overflow-hidden rounded-md border border-gray-800 bg-gray-950 py-1 shadow-xl",children:d.jsx("button",{type:"button",role:"menuitem",onClick:C,className:"block w-full px-3 py-2 text-left text-sm text-red-400 transition-colors hover:bg-red-950/30 hover:text-red-300 focus:bg-red-950/30 focus:outline-none",children:"Remove project"})}):null]}):null,c?d.jsx("dialog",{ref:O,open:!0,"aria-modal":"true","aria-labelledby":b,tabIndex:-1,onKeyDown:T=>{T.key==="Escape"&&(T.preventDefault(),A())},className:"fixed inset-0 z-50 flex h-full max-h-none w-full max-w-none items-center justify-center bg-black/70 p-4 text-left text-gray-100 backdrop:bg-black/70",children:d.jsxs("div",{className:"w-full max-w-md overflow-hidden rounded-lg border border-gray-800 bg-gray-950 shadow-xl",children:[d.jsx("div",{className:"border-b border-gray-800 px-4 py-3",children:d.jsx("h2",{id:b,className:"text-lg font-semibold text-white",children:"Remove project?"})}),d.jsxs("div",{className:"space-y-3 p-4",children:[d.jsxs("p",{className:"text-sm text-gray-300",children:["Remove ",d.jsx("span",{className:"font-medium text-white",children:e.name})," from this Dashboard registry."]}),d.jsxs("p",{className:"text-sm text-gray-500",children:["The project folder and files stay on disk at ",e.path,"."]}),y?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:y}):null]}),d.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("button",{type:"button",onClick:A,disabled:h,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200 disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),d.jsx("button",{type:"button",onClick:()=>void E(),disabled:h,className:"rounded-md border border-red-900/60 px-3 py-1.5 text-sm font-medium text-red-400 transition-colors hover:border-red-800 hover:bg-red-950/30 hover:text-red-300 disabled:cursor-not-allowed disabled:opacity-50",children:h?"Removing...":"Remove project"})]})]})}):null]})}function cae(e){return e.map(t=>({path:t.path,relativePath:t.relative_path,category:t.category}))}function dae(e){return(e.split(",").at(-1)??"").trim()}function fae(e,t){const r=dae(t).toLowerCase();return r?e.filter(n=>n.relativePath.toLowerCase().includes(r)||n.category.toLowerCase().includes(r)):e}function hae(e,t){const r=e.split(",");return[...(/,\s*$/.test(e)?r:r.slice(0,-1)).map(c=>c.trim()).filter(Boolean).filter(c=>c!==t),t].join(", ")}function mae(e,t,r){return t?e:Uw(e,r)}function Uw(e,t){return e||String(t??$c)}function pae({suiteFilter:e,testIds:t,target:r,thresholdInput:n,studioThreshold:i,workers:l,dryRun:o}){const c={};e.trim()&&(c.suite_filter=e.trim()),t.length>0&&(c.test_ids=t),r&&(c.target=r);const f=Uw(n,i);return f&&(c.threshold=Number.parseFloat(f)),l&&(c.workers=Number.parseInt(l,10)),o&&(c.dry_run=!0),c}function wl({open:e,onClose:t,projectId:r,prefill:n}){const i=fa(),l=ml(),[o,c]=S.useState((n==null?void 0:n.suiteFilter)??""),[f,h]=S.useState(""),[p,y]=S.useState((n==null?void 0:n.testIds)??[]),[v,x]=S.useState((n==null?void 0:n.target)??""),[b,w]=S.useState(""),[N,O]=S.useState(!1),[C,E]=S.useState(""),[A,T]=S.useState(!1),[M,R]=S.useState(!1),[D,I]=S.useState(null),[k,H]=S.useState(null),[q,ie]=S.useState(!1),[re,W]=S.useState(null),{data:$}=RB(r),{data:F}=kB(r),{data:J}=Xb(D,r),{data:ne}=pt(r),ce=S.useMemo(()=>cae(($==null?void 0:$.eval_files)??[]),[$]),L=S.useMemo(()=>fae(ce,o),[ce,o]),X=S.useMemo(()=>(F==null?void 0:F.targets)??[],[F]),le=S.useMemo(()=>Uw(b,ne==null?void 0:ne.threshold),[ne==null?void 0:ne.threshold,b]),oe=S.useMemo(()=>mae(b,N,ne==null?void 0:ne.threshold),[ne==null?void 0:ne.threshold,b,N]);S.useEffect(()=>{e&&(c((n==null?void 0:n.suiteFilter)??""),y((n==null?void 0:n.testIds)??[]),x((n==null?void 0:n.target)??""),h(""),w(""),O(!1),E(""),T(!1),R(!1),I(null),H(null),ie(!1),W(null))},[e,n]),S.useEffect(()=>{((J==null?void 0:J.status)==="finished"||(J==null?void 0:J.status)==="failed")&&(i.invalidateQueries({queryKey:["runs"]}),i.invalidateQueries({queryKey:["projects"]}))},[J==null?void 0:J.status,i]);const he=S.useCallback(()=>pae({suiteFilter:o,testIds:p,target:v,thresholdInput:b,studioThreshold:ne==null?void 0:ne.threshold,workers:C,dryRun:A}),[A,ne==null?void 0:ne.threshold,o,v,p,b,C]);S.useEffect(()=>{const ee=he();if(!ee.suite_filter&&(!ee.test_ids||ee.test_ids.length===0)){W(null);return}zB(ee,r).then(Se=>W(Se.command)).catch(()=>W(null))},[he,r]);function je(){const ee=f.trim();ee&&!p.includes(ee)&&y([...p,ee]),h("")}function Ne(ee){y(p.filter(Se=>Se!==ee))}async function Pe(){H(null),ie(!0);try{const ee=he(),Se=await bM(ee,r);I(Se.id)}catch(ee){H(ee.message)}finally{ie(!1)}}if(!e)return null;if(D&&J){let ee=function(){t(),l({to:UB(r)})};return d.jsx(qP,{onClose:t,title:"Eval Run",children:d.jsx(yae,{status:J,onClose:t,onRunInBackground:ee,runId:D})})}const de=!!(o.trim()||p.length>0);return d.jsx(qP,{onClose:t,title:"Run Eval",children:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"suite-filter",className:"mb-1 block text-sm font-medium text-gray-300",children:"Suite Filter"}),d.jsx("input",{id:"suite-filter",type:"text",value:o,onChange:ee=>c(ee.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"}),ce.length>0&&d.jsx("div",{className:"mt-1.5 max-h-44 overflow-y-auto rounded-md border border-gray-800 bg-gray-950/60 p-1",children:L.length>0?L.map(ee=>d.jsxs("button",{type:"button",onClick:()=>c(Se=>hae(Se,ee.relativePath)),className:"block w-full rounded px-2 py-1 text-left text-xs text-gray-400 hover:bg-gray-800 hover:text-gray-200",children:[d.jsx("span",{className:"block truncate",children:ee.relativePath}),ee.category&&d.jsx("span",{className:"block truncate text-[11px] text-gray-600",children:ee.category})]},ee.relativePath)):d.jsx("div",{className:"px-2 py-1 text-xs text-gray-500",children:"No matching eval files"})})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"test-id-input",className:"mb-1 block text-sm font-medium text-gray-300",children:"Test ID Filter"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:"test-id-input",type:"text",value:f,onChange:ee=>h(ee.target.value),onKeyDown:ee=>{ee.key==="Enter"&&(ee.preventDefault(),je())},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"}),d.jsx("button",{type:"button",onClick:je,disabled:!f.trim(),className:"rounded-md bg-gray-700 px-3 py-2 text-sm text-white hover:bg-gray-600 disabled:opacity-50",children:"Add"})]}),p.length>0&&d.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:p.map(ee=>d.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:[ee,d.jsx("button",{type:"button",onClick:()=>Ne(ee),className:"text-cyan-400 hover:text-white",children:"×"})]},ee))})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"target-override",className:"mb-1 block text-sm font-medium text-gray-300",children:"Target Override"}),d.jsxs("select",{id:"target-override",value:v,onChange:ee=>x(ee.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:[d.jsx("option",{value:"",children:"Use eval's configured target"}),X.map(ee=>d.jsx("option",{value:ee,children:ee},ee))]})]}),d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>R(!M),className:"text-sm text-gray-400 hover:text-gray-200",children:[M?"▾":"▸"," Advanced Options"]}),M&&d.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"threshold-input",className:"mb-1 block text-xs text-gray-400",children:"Threshold (0–1)"}),d.jsx("input",{id:"threshold-input",type:"number",value:oe,onChange:ee=>{O(!0),w(ee.target.value)},min:"0",max:"1",step:"0.1",placeholder:le,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"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"workers-input",className:"mb-1 block text-xs text-gray-400",children:"Workers"}),d.jsx("input",{id:"workers-input",type:"number",value:C,onChange:ee=>E(ee.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"})]}),d.jsx("div",{className:"col-span-2",children:d.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-400",children:[d.jsx("input",{type:"checkbox",checked:A,onChange:ee=>T(ee.target.checked),className:"rounded border-gray-600 bg-gray-800"}),"Dry run (mock provider responses)"]})})]})]}),re&&d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:[d.jsx("div",{className:"mb-1 text-xs text-gray-500",children:"CLI Preview"}),d.jsx("code",{className:"block break-all text-xs text-cyan-300",children:re})]}),k&&d.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:k}),d.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[d.jsx("button",{type:"button",onClick:t,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Cancel"}),d.jsx("button",{type:"button",onClick:Pe,disabled:!de||q,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:q?"Launching…":"Run Now"})]})]})})}function qP({children:e,onClose:t,title:r}){return d.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 pt-[10vh]",children:d.jsxs("div",{className:"w-full max-w-lg rounded-lg border border-gray-700 bg-gray-900 shadow-xl",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-5 py-3",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:r}),d.jsx("button",{type:"button",onClick:t,className:"text-gray-400 hover:text-white",children:"✕"})]}),d.jsx("div",{className:"px-5 py-4",children:e})]})})}function yae({status:e,onClose:t,onRunInBackground:r,runId:n}){const i=e.status==="finished"||e.status==="failed",l={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"};return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("span",{className:`text-sm font-medium ${l[e.status]??"text-gray-400"}`,children:[e.status==="running"&&"●"," ",e.status.charAt(0).toUpperCase()+e.status.slice(1)]}),!i&&d.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]}),d.jsx("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:d.jsx("code",{className:"block break-all text-xs text-cyan-300",children:e.command})}),e.stdout&&d.jsx("div",{className:"max-h-48 overflow-y-auto rounded-md bg-gray-950 p-3",children:d.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-300",children:e.stdout.slice(-3e3)})}),e.stderr&&d.jsx("div",{className:"max-h-24 overflow-y-auto rounded-md bg-red-950/20 p-3",children:d.jsx("pre",{className:"whitespace-pre-wrap text-xs text-red-300",children:e.stderr.slice(-2e3)})}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs text-gray-500",children:i?d.jsxs(d.Fragment,{children:["Exit code: ",e.exit_code,e.finished_at&&` · ${new Date(e.finished_at).toLocaleTimeString()}`]}):n&&d.jsx("button",{type:"button",onClick:r,className:"text-xs text-gray-400 hover:text-cyan-400",children:"Run in background"})}),i&&d.jsx("button",{type:"button",onClick:t,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Close"})]})]})}function ex(e){if(e.source==="remote")return"Remote runs cannot be combined or deleted from the local workspace.";if(e.status==="starting"||e.status==="running")return"Running runs cannot be combined or deleted yet."}function vae(e){return`${e} local run${e===1?"":"s"} selected`}function gae(e,t){return`Combined ${e} local run${e===1?"":"s"} into ${t}.`}function xae(e){return`Deleted ${e} local run${e===1?"":"s"}.`}function bae(e){if(!e)return{date:"N/A",full:"N/A"};try{const t=new Date(e);if(Number.isNaN(t.getTime()))return{date:"N/A",full:"N/A"};const r=t.toLocaleString(),n=Date.now()-t.getTime(),i=Math.floor(n/6e4),l=Math.floor(n/36e5);let o;return i<1?o="just now":i<60?o=`${i} min ago`:l<24?o=`${l} hour${l===1?"":"s"} ago`:o=t.toLocaleDateString(),{date:o,full:r}}catch{return{date:"N/A",full:"N/A"}}}function jae(e,t){const r=bae(e.timestamp),n=e.status==="starting"||e.status==="running",i=ej(e,{includePassRate:!1}),l=i.label,o=Yt(e),c=Math.max(0,e.test_count-o),f=c>0?e.pass_rate>=t:o===0,h=Math.round(e.pass_rate*c),p=c-h,y=e.metadata_dirty===!0;return{run:e,ts:r,isActive:n,label:l,display:i,errors:o,qualityCount:c,passing:f,passedCount:h,failedCount:p,metadataDirty:y}}function Ip({runs:e,projectId:t,emptyMessage:r,hasNextPage:n=!1,isFetchingNextPage:i=!1,onLoadMore:l,enableCombine:o=!1,remoteBranch:c}){const{data:f}=pt(t),h=fa(),p=(f==null?void 0:f.threshold)??$c,y=S.useRef(null),v=S.useRef(null),x=S.useRef(!1),[b,w]=S.useState([]),[N,O]=S.useState(null),[C,E]=S.useState(!1),[A,T]=S.useState(!1),M=S.useMemo(()=>e.map(W=>jae(W,p)),[p,e]),R=S.useMemo(()=>e.filter(W=>o&&!ex(W)).map(W=>W.filename),[o,e]),D=new Set(b);S.useEffect(()=>{i||(x.current=!1)},[i]),S.useEffect(()=>{if(!n||!l)return;const W=[];if(y.current&&W.push(y.current),v.current&&W.push(v.current),W.length===0)return;const $=new IntersectionObserver(F=>{F.some(J=>J.isIntersecting)&&!i&&!x.current&&(x.current=!0,l())},{rootMargin:"200px 0px"});for(const F of W)$.observe(F);return()=>$.disconnect()},[n,i,l]),S.useEffect(()=>{const W=new Set(R);w($=>$.filter(F=>W.has(F)))},[R]);async function I(){if(t){await Promise.all([h.invalidateQueries({queryKey:["projects",t,"runs"]}),h.invalidateQueries({queryKey:["projects",t,"experiments"]}),h.invalidateQueries({queryKey:["projects",t,"compare"]}),h.invalidateQueries({queryKey:["projects",t,"targets"]})]);return}await Promise.all([h.invalidateQueries({queryKey:["runs"]}),h.invalidateQueries({queryKey:["experiments"]}),h.invalidateQueries({queryKey:["compare"]}),h.invalidateQueries({queryKey:["targets"]})])}async function k(){if(b.length<2||C)return;const W=[...b];O(null),E(!0);try{let $;try{$=await I_(W,"error",t)}catch(F){if(!(F instanceof xM)||F.status!==409)throw F;const J=F.duplicates.length;if(!window.confirm(`${J} duplicate (test_id, target) pair${J===1?"":"s"} found. Replace duplicates with the latest timestamp?`))return;$=await I_(W,"latest",t)}w([]),O({kind:"success",message:gae(W.length,$.display_name),combinedRunId:$.run_id,sourceRunIds:W}),await I()}catch($){O({kind:"error",message:$.message})}finally{E(!1)}}async function H(){b.length===0||A||await ie(b,"selected")}async function q(){const W=(N==null?void 0:N.sourceRunIds)??[];W.length===0||A||await ie(W,"combined-sources")}async function ie(W,$){const F=W.length,J=F===1?"run":"runs",ne=$==="combined-sources"?`Delete the ${F} source local ${J} used for the combined run? The combined run will remain.`:`Delete ${F} local ${J}? This removes the run workspace and artifacts from disk.`;if(window.confirm(ne)){O(null),T(!0);try{for(const L of W)await AB(L,t);w([]),O({kind:"success",message:xae(F)}),await I()}catch(L){O({kind:"error",message:L.message})}finally{T(!1)}}}function re(W){w($=>$.includes(W)?$.filter(F=>F!==W):[...$,W])}return e.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:r??d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found."}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Run an evaluation first:"," ",d.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"agentv eval <eval-file>"})]})]})}):d.jsxs("div",{className:"space-y-3",children:[o&&d.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0 space-y-1",children:[d.jsx("p",{className:"text-sm font-medium text-gray-200",children:vae(b.length)}),d.jsx("p",{className:"text-xs text-gray-500",children:"Select completed local runs to combine or delete. Remote runs stay read-only here."}),N&&d.jsx("div",{className:`mt-2 rounded-md border px-3 py-2 text-sm ${N.kind==="success"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":"border-red-900/60 bg-red-950/20 text-red-300"}`,role:N.kind==="error"?"alert":"status",children:d.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[d.jsx("span",{children:N.message}),N.combinedRunId?t?d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:t,runId:N.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):d.jsx(Oe,{to:"/runs/$runId",params:{runId:N.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):null,N.sourceRunIds&&N.sourceRunIds.length>0?d.jsx("button",{type:"button",onClick:()=>void q(),disabled:A||C,className:"font-medium text-red-300 hover:text-red-200 hover:underline disabled:cursor-not-allowed disabled:text-gray-500",children:A?"Deleting sources...":"Delete source runs"}):null]})})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>void H(),disabled:b.length===0||A||C,className:"whitespace-nowrap rounded-md border border-red-900/70 px-3 py-1.5 text-sm font-medium text-red-300 hover:border-red-700 hover:bg-red-950/40 disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-500",children:A?"Deleting...":"Delete selected"}),d.jsx("button",{type:"button",onClick:()=>void k(),disabled:b.length<2||C||A,className:"whitespace-nowrap rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-400",children:C?"Combining...":"Combine selected"})]})]}),d.jsxs("div",{className:"space-y-2 sm:hidden",children:[M.map(W=>{const{run:$,ts:F,label:J,display:ne,errors:ce,qualityCount:L,passedCount:X,failedCount:le,metadataDirty:oe}=W,he=ex($),je=!he&&R.includes($.filename);return d.jsxs("article",{className:"rounded-lg border border-gray-800 bg-gray-900/40 px-3 py-3",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[o&&d.jsx("input",{type:"checkbox",checked:D.has($.filename),disabled:!je,onChange:()=>re($.filename),title:he,"aria-label":he?`${J}: ${he}`:`Select ${J}`,className:"mt-1 h-4 w-4 shrink-0 rounded border-gray-700 bg-gray-900 text-cyan-500 disabled:opacity-30"}),d.jsx(GP,{view:W,className:"mt-1 shrink-0"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx(HP,{projectId:t,runId:$.filename,label:ne.primary,title:ne.title,className:"block truncate text-sm font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),ne.secondary?d.jsx("p",{className:"mt-0.5 truncate text-xs text-gray-500",title:ne.title,children:ne.secondary}):null,d.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[d.jsx(FP,{onRemote:$.on_remote===!0,branch:c}),oe?d.jsx(KP,{}):null,d.jsx("span",{className:"text-xs text-gray-500",title:F.full,children:F.date})]})]})]}),d.jsxs("dl",{className:"mt-3 grid grid-cols-2 gap-x-3 gap-y-2 border-t border-gray-800/70 pt-3",children:[d.jsx(vo,{label:"Pass Rate",valueClassName:"text-gray-300",children:d.jsx(Ln,{rate:$.pass_rate})}),d.jsx(vo,{label:"Total",valueClassName:"text-gray-300",children:L}),d.jsx(vo,{label:"Passed",valueClassName:"text-emerald-300",children:X}),d.jsx(vo,{label:"Failures",valueClassName:"text-red-400",children:le>0?le:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(vo,{label:"Errors",valueClassName:"text-amber-300",children:ce>0?ce:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(vo,{label:"Remote",valueClassName:"text-gray-400",children:$.on_remote===!0?"On remote":"Local only"})]})]},$.filename)}),(n||i)&&d.jsx("div",{ref:v,className:"rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})]}),d.jsx("div",{className:"hidden max-w-full overflow-x-auto rounded-lg border border-gray-800 sm:block",children:d.jsxs("table",{className:"min-w-[780px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[o&&d.jsx("th",{className:"w-10 px-4 py-3"}),d.jsx("th",{className:"w-8 px-4 py-3"}),d.jsx("th",{className:"w-[22rem] px-4 py-3 font-medium text-gray-400",children:"Run"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Remote"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Passed"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Failures"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Errors"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Total"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"When"})]})}),d.jsxs("tbody",{className:"divide-y divide-gray-800/50",children:[M.map(W=>{const{run:$,ts:F,label:J,display:ne,errors:ce,qualityCount:L,passedCount:X,failedCount:le,metadataDirty:oe}=W,he=ex($),je=!he&&R.includes($.filename);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[o&&d.jsx("td",{className:"px-4 py-3",children:d.jsx("input",{type:"checkbox",checked:D.has($.filename),disabled:!je,onChange:()=>re($.filename),title:he,"aria-label":he?`${J}: ${he}`:`Select ${J}`,className:"h-4 w-4 rounded border-gray-700 bg-gray-900 text-cyan-500 disabled:opacity-30"})}),d.jsx("td",{className:"px-4 py-3 text-center",children:d.jsx(GP,{view:W})}),d.jsx("td",{className:"w-[22rem] max-w-[22rem] px-4 py-3",children:d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx(HP,{projectId:t,runId:$.filename,label:ne.primary,title:ne.title,className:"block min-w-0 truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),oe?d.jsx(KP,{}):null]}),ne.secondary?d.jsx("div",{className:"mt-0.5 truncate text-xs text-gray-500",title:ne.title,children:ne.secondary}):null]})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(FP,{onRemote:$.on_remote===!0,branch:c})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-emerald-300",children:X}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:le>0?le:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums",children:ce>0?d.jsx("span",{className:"text-amber-300",children:ce}):d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:L}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(Ln,{rate:$.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:F.full,children:F.date})]},$.filename)}),(n||i)&&d.jsx("tr",{ref:y,children:d.jsx("td",{colSpan:o?10:9,className:"px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})})]})]})})]})}function HP({projectId:e,runId:t,label:r,title:n,className:i}){return e?d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:i,title:n,children:r}):d.jsx(Oe,{to:"/runs/$runId",params:{runId:t},className:i,title:n,children:r})}function FP({onRemote:e,branch:t}){return e?d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",title:t?`On ${t}`:"On the remote results branch","aria-label":t?`On remote branch ${t}`:"On the remote results branch",children:[d.jsx(wae,{}),"Synced"]}):d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-gray-800 bg-gray-900/70 px-2 py-0.5 text-xs font-medium text-gray-500",title:"Local only — not pushed","aria-label":"Local only — not pushed",children:[d.jsx(Sae,{}),"Local only"]})}function wae(){return d.jsxs("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M7 18a4 4 0 0 1-.5-7.97A5 5 0 0 1 16 9a3.5 3.5 0 0 1 1 6.86"}),d.jsx("path",{d:"m9 14 2 2 4-4"})]})}function Sae(){return d.jsx("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:d.jsx("path",{d:"M7 18a4 4 0 0 1-.5-7.97A5 5 0 0 1 16 9a3.5 3.5 0 0 1 1 6.86"})})}function KP(){return d.jsx("span",{className:"shrink-0 rounded-md border border-yellow-900/60 bg-yellow-950/20 px-1.5 py-0.5 text-xs text-yellow-300",title:"Use Sync Metadata to push this metadata to the results repo.",children:"Pending sync"})}function GP({view:e,className:t=""}){return e.isActive?d.jsx("span",{className:`inline-block h-2 w-2 animate-pulse rounded-full bg-cyan-400 ${t}`,title:e.run.status==="starting"?"Starting...":"Running...","aria-label":e.run.status==="starting"?"Starting":"Running"}):e.qualityCount===0&&e.errors>0?d.jsx("span",{className:`text-base font-bold text-amber-300 ${t}`,title:"Execution errors",children:"!"}):d.jsx("span",{className:`text-base font-bold ${e.passing?"text-emerald-400":"text-red-400"} ${t}`,children:e.passing?"✓":"✗"})}function vo({label:e,valueClassName:t,children:r}){return d.jsxs("div",{className:"min-w-0",children:[d.jsx("dt",{className:"text-xs text-gray-500",children:e}),d.jsx("dd",{className:`mt-1 min-w-0 text-sm tabular-nums ${t}`,children:r})]})}function r5({remoteStatus:e,syncInFlight:t,onSync:r,projectName:n,syncFeedback:i,onRemoteSummary:l}){var b,w;const o=(e==null?void 0:e.configured)===!0,c=Z8(e,t),f=t===!0||!c.canSync,h={neutral:"border-gray-700 bg-gray-800/70 text-gray-300",good:"border-emerald-800/70 bg-emerald-950/30 text-emerald-300",info:"border-cyan-800/70 bg-cyan-950/30 text-cyan-300",warn:"border-yellow-800/70 bg-yellow-950/30 text-yellow-300",danger:"border-red-800/70 bg-red-950/30 text-red-300"}[c.tone],p=(i==null?void 0:i.kind)==="success"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":(i==null?void 0:i.kind)==="warning"?"border-yellow-900/60 bg-yellow-950/20 text-yellow-300":"border-red-900/60 bg-red-950/20 text-red-300",y=((b=e==null?void 0:e.dirty_paths)==null?void 0:b.length)??0,v=((w=e==null?void 0:e.conflicted_paths)==null?void 0:w.length)??0,x=X8(e,n,l);return d.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-gray-200",children:"Recent Runs"}),o&&l?d.jsx("p",{className:"mt-0.5 text-xs text-gray-500",children:l}):null]}),o?d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium ${h}`,children:c.label}),r?d.jsx("button",{type:"button",onClick:r,disabled:f,title:c.canSync?void 0:c.nextAction,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:t?"Syncing...":c.actionLabel}):null]}):null]}),o?d.jsxs("div",{className:"space-y-2 text-sm",children:[d.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-gray-400",children:x.map(N=>d.jsx("span",{children:N},N))}),d.jsx("p",{className:c.tone==="danger"?"text-red-300":"text-gray-400",children:c.summary}),c.nextAction?d.jsx("p",{className:"text-xs text-gray-500",children:c.nextAction}):null,y>0||v>0?d.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[y>0?d.jsxs("span",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-yellow-300",children:[y," dirty path",y===1?"":"s"]}):null,v>0?d.jsxs("span",{className:"rounded-md border border-red-900/60 bg-red-950/20 px-2 py-0.5 text-red-300",children:[v," conflicted path",v===1?"":"s"]}):null]}):null]}):d.jsxs("p",{className:"text-sm text-gray-500",children:["Remote results are not configured. Add"," ",d.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:"results"})," to"," ",d.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:".agentv/config.yaml"})," to enable."]}),i?d.jsx("div",{className:`rounded-md border px-3 py-2 text-sm ${p}`,role:i.kind==="error"?"alert":"status",children:i.message}):null,e!=null&&e.last_error?d.jsxs("div",{className:"rounded-md border border-red-900/60 bg-red-950/20 px-3 py-2 text-sm text-red-300",role:"alert",children:[d.jsx("p",{className:"font-medium",children:"Remote sync error"}),d.jsx("p",{children:e.last_error}),d.jsx("p",{className:"mt-1 text-xs text-red-200/80",children:Kb(e)})]}):null,e!=null&&e.git_diff_summary&&c.state!=="clean"?d.jsx("pre",{className:"max-h-32 overflow-auto whitespace-pre-wrap rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2 text-xs text-gray-500",children:e.git_diff_summary}):null]})}const YP="remote::";function Nae(e){return e.startsWith(YP)?e.slice(YP.length):e}function Lp(e){const t=new Map;for(const r of e){const n=Nae(r.filename),i=t.get(n);if(!i){t.set(n,r);continue}const l=i.source==="remote"&&r.source==="local"?r:i;t.set(n,{...l,on_remote:i.on_remote===!0||r.on_remote===!0})}return[...t.values()]}function n5({projectId:e}={}){var y,v;const[t,r]=S.useState(null),n=Ue(e?_B(e):cB),i=Ue(e?Vb(e):Gb),l=((y=n.data)==null?void 0:y.targets)??[],o=((v=i.data)==null?void 0:v.runs)??[],c=n.error??i.error,f=n.isLoading||i.isLoading,h=S.useMemo(()=>l.find(x=>x.name===t)??null,[t,l]);S.useEffect(()=>{t&&!l.some(x=>x.name===t)&&r(null)},[t,l]);const p=S.useMemo(()=>{if(!h)return[];const x=new Map;for(const b of o){if((b.target??"default")!==h.name)continue;const N=b.experiment??"default",O=x.get(N)??[];O.push(b),x.set(N,O)}return[...x.entries()].map(([b,w])=>Oae(b,Lp(w))).sort((b,w)=>b.latestTimestamp&&w.latestTimestamp&&b.latestTimestamp!==w.latestTimestamp?w.latestTimestamp.localeCompare(b.latestTimestamp):b.latestTimestamp?-1:w.latestTimestamp?1:b.name.localeCompare(w.name))},[o,h]);return f?d.jsx(Aae,{}):c?d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load targets: ",c.message]}):l.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Targets will appear here once evaluations are run with target labels."})]}):h?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"space-y-3",children:[d.jsx("button",{type:"button",onClick:()=>r(null),className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"← Back to targets"}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:d.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:h.name}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[h.run_count," run",h.run_count===1?"":"s"," ·"," ",h.experiment_count," experiment",h.experiment_count===1?"":"s"," ·"," ",d.jsx("span",{className:"text-emerald-400",children:h.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),Ho(h)," evals passed",Yt(h)>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",Yt(h)," execution errors"]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(Ln,{rate:h.pass_rate})})]})})]}),p.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No runs found for this target"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This target summary exists, but there are no matching runs to group by experiment."})]}):d.jsx("div",{className:"space-y-6",children:p.map(x=>d.jsxs("section",{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-medium text-gray-200",children:_ae(x.name)}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[x.runs.length," run",x.runs.length===1?"":"s"," ·"," ",d.jsx("span",{className:"text-emerald-400",children:x.passedCount}),d.jsx("span",{className:"text-gray-600",children:" / "}),x.qualityCount," evals passed",x.executionErrorCount>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",x.executionErrorCount," execution errors"]}),x.latestTimestamp&&d.jsxs("span",{className:"ml-2 text-gray-500",children:["· Last run ",Eae(x.latestTimestamp)]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(Ln,{rate:x.passRate})})]}),d.jsx(Ip,{runs:x.runs,projectId:e})]},x.name))})]}):d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[720px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Experiments"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Execution Errors"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:l.map(x=>{const b=Ho(x),w=Yt(x);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:d.jsx("button",{type:"button",onClick:()=>r(x.name),className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:x.name})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.run_count}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.experiment_count}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(Ln,{rate:x.pass_rate})}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[d.jsx("span",{className:"text-emerald-400",children:x.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),d.jsx("span",{children:b})]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:w>0?w:d.jsx("span",{className:"text-gray-600",children:"0"})})]},x.name)})})]})})}function Oae(e,t){let r=0,n=0,i=0,l=0,o=null;for(const c of t){const f=Yt(c),h=Math.max(0,c.test_count-f);r+=c.test_count,n+=h,l+=f,i+=Math.round(c.pass_rate*h),c.timestamp&&(!o||c.timestamp>o)&&(o=c.timestamp)}return{name:e,runs:t,latestTimestamp:o,evalCount:r,qualityCount:n,passedCount:i,executionErrorCount:l,passRate:n>0?i/n:0}}function _ae(e){return e==="default"?"Default experiment":e}function Eae(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const r=Date.now()-t.getTime(),n=Math.floor(r/6e4),i=Math.floor(r/36e5);return n<1?"just now":n<60?`${n} min ago`:i<24?`${i} hour${i===1?"":"s"} ago`:t.toLocaleDateString()}function Aae(){return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[d.jsx("div",{className:"h-6 w-40 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"mt-3 h-4 w-72 animate-pulse rounded bg-gray-800"})]}),d.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:d.jsxs("div",{className:"animate-pulse",children:[d.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>d.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[d.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-20 rounded bg-gray-800"})]},e))]})}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[d.jsx("div",{className:"h-5 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"mt-3 h-4 w-56 animate-pulse rounded bg-gray-800"})]})]})}const VP=[{id:"runs",label:"🏃 Recent Runs"},{id:"experiments",label:"🧪 Experiments"},{id:"analytics",label:"📊 Analytics"},{id:"targets",label:"🤖 Targets"}],Cae=Er("/")({component:Tae});function Tae(){const e=ml(),n=Hb().location.search.tab,{data:i,isLoading:l}=od(),{data:o,isLoading:c}=pt(),f=(i==null?void 0:i.projects)??[],[h,p]=S.useState(void 0);S.useEffect(()=>{if(l||c)return;const v=o==null?void 0:o.current_project_id;if(!v){p(null);return}const x=BB(v),b=typeof window<"u"&&window.sessionStorage.getItem(x)==="1",w=qB(f.map(N=>N.id),v,b);typeof window<"u"&&w&&window.sessionStorage.setItem(x,"1"),p(w??null)},[o==null?void 0:o.current_project_id,c,f,l]);const y=HB(f.map(v=>v.id),o==null?void 0:o.project_dashboard,h??void 0,n);return S.useEffect(()=>{y.kind==="redirect"&&y.redirectPath&&e({to:y.redirectPath,replace:!0})},[y,e]),l||c||h===void 0?d.jsx(Ab,{}):y.kind==="redirect"?d.jsx(Ab,{}):y.kind==="dashboard"?d.jsx(Pae,{}):d.jsx(Mae,{})}function Pae(){const{data:e}=od(),{data:t}=pt(),r=fa(),[n,i]=S.useState(!1),[l,o]=S.useState(!1),[c,f]=S.useState(null),h=(e==null?void 0:e.projects)??[],p=(t==null?void 0:t.read_only)===!0;async function y(v){await jB(v.id),r.setQueryData(["projects"],x=>x&&{projects:x.projects.filter(b=>b.id!==v.id)}),f(`Project removed from Dashboard: ${v.name}. Files were left on disk.`),r.invalidateQueries({queryKey:["projects"]})}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Projects"}),d.jsx("div",{className:"flex gap-2",children:!p&&d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>o(!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"}),d.jsx("button",{type:"button",onClick:()=>{f(null),i(!0)},className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400",children:"Add Project"})]})})]}),c&&d.jsx("div",{className:"rounded-lg border border-cyan-900/60 bg-cyan-950/30 p-3 text-sm text-cyan-300",children:c}),h.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-300",children:"No projects registered yet."}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Add a project path to start browsing runs, experiments, analytics, and targets."})]}):d.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:h.map(v=>d.jsx(uae,{project:v,canRemove:!p,onRemove:y},v.id))}),!p&&d.jsx(wl,{open:l,onClose:()=>o(!1)}),!p&&d.jsx(x6,{open:n,onClose:()=>i(!1),onAdded:v=>{f(`Project registered: ${v.name}`),r.invalidateQueries({queryKey:["projects"]})}})]})}function Mae(){const r=Hb().location.search.tab,n=ml(),i=fa(),{data:l,isLoading:o,error:c,hasNextPage:f,fetchNextPage:h,isFetchingNextPage:p}=yB(),{data:y}=zm(),{data:v}=pt(),[x,b]=S.useState(!1),[w,N]=S.useState(!1),[O,C]=S.useState(null),E=(v==null?void 0:v.read_only)===!0,A=VP.some(I=>I.id===r)?r:"runs",T=Lp((l==null?void 0:l.runs)??[]),M=T.filter(I=>I.on_remote===!0).length,R=(y==null?void 0:y.configured)===!0?iM(M,T.length,y.branch):void 0;async function D(){N(!0),C(null);try{const I=await gM();i.setQueryData(Yb().queryKey,I),C(sM(I)),Promise.all([i.invalidateQueries({queryKey:["runs"]}),i.invalidateQueries({queryKey:["experiments"]}),i.invalidateQueries({queryKey:["compare"]}),i.invalidateQueries({queryKey:["targets"]}),i.invalidateQueries({queryKey:["remote-status",""]})]).catch(()=>{})}catch(I){C(lM(I,y)),i.invalidateQueries({queryKey:["remote-status",""]}).catch(()=>{})}finally{N(!1)}}return S.useEffect(()=>{if((O==null?void 0:O.kind)!=="success")return;const I=window.setTimeout(()=>C(null),7e3);return()=>window.clearTimeout(I)},[O]),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Evaluation Runs"}),(v==null?void 0:v.project_name)&&d.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:v.project_name})]}),!E&&d.jsx("button",{type:"button",onClick:()=>b(!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"})]}),d.jsx("div",{className:"border-b border-gray-800",children:d.jsx("div",{className:"flex flex-wrap gap-1 sm:flex-nowrap",children:VP.map(I=>d.jsx("button",{type:"button",onClick:()=>n({to:"/",search:{tab:I.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${A===I.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:I.label},I.id))})}),A==="runs"&&d.jsx(Dae,{runs:T,isLoading:o,error:c,remoteStatus:y,syncInFlight:w,syncFeedback:O,onSyncRemote:D,projectName:v==null?void 0:v.project_name,onRemoteSummary:R,hasNextPage:f,isFetchingNextPage:p,onLoadMore:()=>void h(),readOnly:E}),A==="experiments"&&d.jsx(t5,{}),A==="analytics"&&d.jsx(Rae,{readOnly:E}),A==="targets"&&d.jsx(n5,{}),!E&&d.jsx(wl,{open:x,onClose:()=>b(!1)})]})}function Rae({readOnly:e}){const{data:t,isLoading:r,isError:n,error:i}=vB();return d.jsx(Jk,{data:t,isLoading:r,isError:n,error:i,readOnly:e})}function Dae({runs:e,isLoading:t,error:r,remoteStatus:n,syncInFlight:i,syncFeedback:l,onSyncRemote:o,projectName:c,onRemoteSummary:f,hasNextPage:h,isFetchingNextPage:p,onLoadMore:y,readOnly:v}){return t?d.jsx(Ab,{}):r?d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",r.message]}):d.jsxs("div",{className:"space-y-4",children:[d.jsx(kae,{}),d.jsx(r5,{remoteStatus:n,syncInFlight:i,onSync:o,projectName:c,syncFeedback:l,onRemoteSummary:f}),d.jsx(Ip,{runs:e,enableCombine:!v,remoteBranch:n==null?void 0:n.branch,hasNextPage:h,isFetchingNextPage:p,onLoadMore:y})]})}function kae(){const{data:e}=Wb(),t=((e==null?void 0:e.runs)??[]).filter(r=>r.status==="starting"||r.status==="running");return t.length===0?null:d.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[d.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),d.jsx("ul",{className:"divide-y divide-gray-800/50",children:t.map(r=>d.jsxs("li",{className:"flex items-center justify-between px-4 py-3",children:[d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[d.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),d.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:r.id}),d.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(r.started_at).toLocaleTimeString()})]}),d.jsx(Oe,{to:"/jobs/$runId",params:{runId:r.id},className:"ml-4 flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},r.id))})]})}function Ab(){return d.jsx("div",{className:"space-y-2",children:["s1","s2","s3","s4","s5"].map(e=>d.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},e))})}function a5(e){return e==="finished"||e==="failed"}function Iae(e,t){return t||!e?!1:!a5(e)}function Lae(e,t,r,n){return t||n&&!a5(n)?!1:!!(e.some(i=>i.executionStatus==="execution_error")||r!==void 0&&e.length<r)}function $ae(e){const t={suite_filter:e.suiteFilter,output:e.runDir};return e.target&&(t.target=e.target),e.mode==="resume"?t.resume=!0:t.rerun_failed=!0,t}function i5({results:e,runDir:t,suiteFilter:r,target:n,projectId:i,isReadOnly:l,plannedTestCount:o,runStatus:c}){const f=ml(),[h,p]=S.useState(null),[y,v]=S.useState(null);if(!Lae(e,l,o,c))return null;const x=!!t&&!!r,b=t?r?"":"Original eval file path missing from benchmark.json — cannot determine what to resume":"Run directory unavailable (remote run cannot be resumed in place)";async function w(N){if(!(!x||!t||!r)){p(N),v(null);try{const O=$ae({mode:N,runDir:t,suiteFilter:r,target:n}),C=await bM(O,i);f(i?{to:"/projects/$projectId/jobs/$runId",params:{projectId:i,runId:C.id}}:{to:"/jobs/$runId",params:{runId:C.id}})}catch(O){v(O instanceof Error?O.message:"Failed to launch resume"),p(null)}}}return d.jsxs("div",{className:"flex flex-col items-end gap-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>w("resume"),disabled:!x||h!==null,title:x?"Skip already-completed tests, run the rest":b,className:"rounded-md bg-amber-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-amber-500 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"resume-run-button",children:h==="resume"?"Resuming…":"↻ Resume run"}),d.jsx("button",{type:"button",onClick:()=>w("rerun"),disabled:!x||h!==null,title:x?"Re-run failed/errored tests, keep passing results":b,className:"rounded-md border border-amber-600/60 bg-transparent px-3 py-1.5 text-sm font-medium text-amber-300 hover:bg-amber-950/40 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"rerun-failed-button",children:h==="rerun"?"Re-running…":"Rerun failed cases"})]}),y&&d.jsx("p",{className:"text-xs text-red-400",children:y})]})}const s5=[{id:"all",label:"All"},{id:"passing",label:"Passing"},{id:"failing",label:"Failing"},{id:"errors",label:"Errors"},{id:"grader_errors",label:"Grader errors"},{id:"unreviewed",label:"Unreviewed"}],l5="all",o5="all";function In(e){if(typeof e!="string")return;const t=e.trim();return t||void 0}function QP(e){return[...new Set([...e].filter(t=>t.trim().length>0))].sort((t,r)=>t.localeCompare(r))}function u5(e,t){return In(e.name)??In(e.type)??`Grader ${t+1}`}function c5(e,t){var r,n;return e.verdict==="fail"||e.score<t||(r=e.assertions)!=null&&r.some(i=>!i.passed)?!0:((n=e.scores)==null?void 0:n.some(i=>c5(i,t)))??!1}function d5(e){if(!e||e.length===0)return[];const t=[];return e.forEach((r,n)=>{t.push(u5(r,n),r.type??"",r.verdict??"");for(const i of r.assertions??[])t.push(i.text,i.evidence??"");t.push(...d5(r.scores))}),t.filter(r=>r.length>0)}function zae(e){const t=new Map;return e==null||e.forEach((r,n)=>{const i=u5(r,n);t.has(i)||t.set(i,r)}),t}function Bae(e){const t=e.tokenUsage;if(!t)return;const r=[t.input,t.output,t.reasoning,t.cached].filter(n=>typeof n=="number"&&Number.isFinite(n));if(r.length!==0)return r.reduce((n,i)=>n+i,0)}function Uae(e){const t=In(e.model);if(t)return t;const r=e.metadata;if(r)return In(r.model)??In(r.model_name)??In(r.target_model)??In(r.provider_model)}function qae(e){const t=In(e.target)??"default",r=In(e.targetUsed);return r&&r!==t?`${t} -> ${r}`:t}function Hae(e,t,r,n){var N;const i=CM(e),l=!i&&e.score>=r,o=i?"error":l?"passing":"failing",c=zae(e.scores),f=[...c.keys()],h=((N=e.scores)==null?void 0:N.some(O=>c5(O,r)))??!1,p=Uae(e),y=qae(e),v=In(e.suite),x=In(e.category),b=Bae(e),w=[e.testId,y,p??"",v??"",x??"",e.executionStatus??"",e.error??"",...d5(e.scores),...(e.assertions??[]).flatMap(O=>[O.text,O.evidence??""])];return{key:`${e.testId}:${e.target??""}:${e.timestamp??""}:${t}`,result:e,index:t,testId:e.testId,status:o,statusLabel:i?"Error":l?"Passing":"Failing",passing:l,executionError:i,graderError:h,reviewed:n.has(e.testId),targetLabel:y,...p&&{modelLabel:p},...v&&{suiteLabel:v},...x&&{categoryLabel:x},...b!==void 0&&{tokenTotal:b},graderNames:f,graderScores:c,searchText:w.join(" ").toLowerCase()}}function Fae(e){return e.some(t=>t.targetLabel!=="default"||t.modelLabel)}function Kae(e,t){const r=e.some(f=>f.suiteLabel),n=e.some(f=>f.categoryLabel),i=e.some(f=>f.result.durationMs!=null),l=e.some(f=>f.result.costUsd!=null||f.tokenTotal!=null),o=e.some(f=>f.result.error);return[{id:"status",label:"Status",kind:"base",defaultVisible:!0},{id:"test",label:"Test ID",kind:"base",defaultVisible:!0},{id:"model_target",label:"Model / Target",kind:"base",defaultVisible:Fae(e)},{id:"score",label:"Score",kind:"base",defaultVisible:!0},...r?[{id:"suite",label:"Suite",kind:"base",defaultVisible:!0}]:[],...n?[{id:"category",label:"Category",kind:"base",defaultVisible:!1}]:[],...i?[{id:"duration",label:"Duration",kind:"base",defaultVisible:!0}]:[],...l?[{id:"cost_tokens",label:"Cost / Tokens",kind:"base",defaultVisible:!0}]:[],{id:"review",label:"Review",kind:"base",defaultVisible:!1},...o?[{id:"error",label:"Error",kind:"base",defaultVisible:!1}]:[],...t.map(f=>({id:`grader:${f}`,label:f,kind:"grader",defaultVisible:!0}))]}function Gae(e){return e==="scorer_errors"?"grader_errors":s5.some(t=>t.id===e)?e:"all"}function Yae(e){const t=e.filter(r=>r.defaultVisible).map(r=>r.id);return t.length>0?t:e.slice(0,4).map(r=>r.id)}function Vae(e,t,r,n){var p,y;const i=new Set(t.map(v=>v.id)),l=((p=e==null?void 0:e.visibleColumnIds)==null?void 0:p.map(v=>v.startsWith("scorer:")?`grader:${v.slice(7)}`:v).filter(v=>i.has(v)))??[],o=l.length>0?l:Yae(t),c=e!=null&&e.target&&r.includes(e.target)?e.target:l5,f=(e==null?void 0:e.grader)??(e==null?void 0:e.scorer),h=f&&n.includes(f)?f:o5;return{view:Gae(e==null?void 0:e.view),search:((y=e==null?void 0:e.search)==null?void 0:y.trim())??"",target:c,grader:h,visibleColumnIds:o}}function Qae(e,t){switch(t){case"passing":return e.status==="passing";case"failing":return e.status==="failing";case"errors":return e.status==="error";case"grader_errors":return e.graderError;case"unreviewed":return!e.reviewed;case"all":return!0}}function Xae(e){return{all:e.length,passing:e.filter(t=>t.status==="passing").length,failing:e.filter(t=>t.status==="failing").length,errors:e.filter(t=>t.status==="error").length,grader_errors:e.filter(t=>t.graderError).length,unreviewed:e.filter(t=>!t.reviewed).length}}function Wae(e){const t=new Set(e.reviewedTestIds??[]),r=e.results.map((p,y)=>Hae(p,y,e.passThreshold,t)),n=QP(r.map(p=>p.targetLabel)),i=QP(r.flatMap(p=>p.graderNames)),l=Kae(r,i),o=Vae(e.state,l,n,i),c=o.search.toLowerCase(),f=new Set(o.visibleColumnIds),h=r.filter(p=>!(!Qae(p,o.view)||o.target!==l5&&p.targetLabel!==o.target||o.grader!==o5&&!p.graderScores.has(o.grader)||c&&!p.searchText.includes(c)));return{rows:r,filteredRows:h,columns:l,visibleColumns:l.filter(p=>f.has(p.id)),state:o,targetOptions:n,graderOptions:i,viewCounts:Xae(r)}}const Ft={view:"results_view",search:"results_q",target:"results_target",grader:"results_grader",legacyScorer:"results_scorer",columns:"results_cols"};function tx(){var t;if(typeof window>"u")return{};const e=new URLSearchParams(window.location.search);return{view:e.get(Ft.view)??void 0,search:e.get(Ft.search)??void 0,target:e.get(Ft.target)??void 0,grader:e.get(Ft.grader)??e.get(Ft.legacyScorer)??void 0,visibleColumnIds:((t=e.get(Ft.columns))==null?void 0:t.split(",").map(r=>r.trim()).filter(Boolean))??void 0}}function Zae(e){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search);e.view==="all"?t.delete(Ft.view):t.set(Ft.view,e.view),e.search?t.set(Ft.search,e.search):t.delete(Ft.search),e.target==="all"?t.delete(Ft.target):t.set(Ft.target,e.target),t.delete(Ft.legacyScorer),e.grader==="all"?t.delete(Ft.grader):t.set(Ft.grader,e.grader),e.visibleColumnIds.length>0?t.set(Ft.columns,e.visibleColumnIds.join(",")):t.delete(Ft.columns);const r=t.toString(),n=`${window.location.pathname}${r?`?${r}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",n)}function Jae(e){return`${Math.round(e*100)}%`}function eie(e){if(e==null)return"-";if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;const t=Math.floor(e/6e4),r=Math.round(e%6e4/1e3);return`${t}m ${r}s`}function tie(e){if(e!=null)return e===0?"$0":e<.01?`$${e.toFixed(5)}`:`$${e.toFixed(4)}`}function rie(e){if(e!=null)return e>=1e6?`${(e/1e6).toFixed(1)}M tok`:e>=1e3?`${(e/1e3).toFixed(1)}k tok`:`${e} tok`}function nie(e){const t=e.tokenUsage;if(!t)return;const r=[t.input!=null?`${t.input} in`:void 0,t.output!=null?`${t.output} out`:void 0,t.reasoning!=null?`${t.reasoning} reason`:void 0,t.cached!=null?`${t.cached} cached`:void 0].filter(n=>!!n);return r.length>0?r.join(" / "):void 0}function aie(e){return e>=.8?"text-emerald-300":e>=.5?"text-yellow-300":"text-red-300"}function f5(e){var t,r;return e.verdict==="fail"||(t=e.assertions)!=null&&t.some(n=>!n.passed)?!0:((r=e.scores)==null?void 0:r.some(f5))??!1}function qw({results:e,runId:t,projectId:r,passThreshold:n,title:i="Results",emptyMessage:l}){const[o,c]=S.useState(()=>tx()),{data:f}=dM(r),h=S.useMemo(()=>(f==null?void 0:f.reviews.map(w=>w.test_id))??[],[f==null?void 0:f.reviews]),p=S.useMemo(()=>Wae({results:e,passThreshold:n,reviewedTestIds:h,state:o}),[n,e,h,o]),y=new Set(p.state.visibleColumnIds);S.useEffect(()=>{const w=()=>c(tx());return window.addEventListener("popstate",w),()=>window.removeEventListener("popstate",w)},[]);function v(w){const N={...p.state,...w};Zae(N),c(tx())}function x(){if(typeof window>"u")return;const w=new URLSearchParams(window.location.search);for(const C of Object.values(Ft))w.delete(C);const N=w.toString(),O=`${window.location.pathname}${N?`?${N}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",O),c({})}function b(w){const N=new Set(p.state.visibleColumnIds);N.has(w)?N.delete(w):N.add(w),v({visibleColumnIds:[...N]})}return e.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:l??d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"})}):d.jsxs("section",{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-baseline sm:justify-between",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:i}),d.jsxs("p",{className:"text-xs text-gray-500",children:[p.filteredRows.length," of ",p.rows.length," rows"]})]}),d.jsxs("div",{className:"space-y-3 rounded-lg border border-gray-800 bg-gray-900/40 p-3",children:[d.jsx("div",{className:"flex flex-wrap gap-2",children:s5.map(w=>d.jsxs("button",{type:"button",onClick:()=>v({view:w.id}),className:`inline-flex items-center gap-2 rounded-md border px-2.5 py-1.5 text-sm transition-colors ${p.state.view===w.id?"border-cyan-900/60 bg-cyan-950/30 text-cyan-300":"border-gray-800 bg-gray-950/70 text-gray-400 hover:border-gray-700 hover:text-gray-200"}`,children:[d.jsx("span",{children:w.label}),d.jsx("span",{className:"tabular-nums text-xs text-gray-500",children:p.viewCounts[w.id]})]},w.id))}),d.jsxs("div",{className:"grid gap-2 lg:grid-cols-[minmax(220px,1fr)_minmax(150px,220px)_minmax(150px,220px)_auto_auto]",children:[d.jsxs("label",{className:"min-w-0",children:[d.jsx("span",{className:"sr-only",children:"Search results"}),d.jsx("input",{type:"search",value:p.state.search,onChange:w=>v({search:w.target.value}),placeholder:"Search tests, targets, graders, assertions",className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 placeholder:text-gray-600 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500"})]}),d.jsxs("label",{children:[d.jsx("span",{className:"sr-only",children:"Filter by target"}),d.jsxs("select",{value:p.state.target,onChange:w=>v({target:w.target.value}),className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:[d.jsx("option",{value:"all",children:"All targets"}),p.targetOptions.map(w=>d.jsx("option",{value:w,children:w},w))]})]}),d.jsxs("label",{children:[d.jsx("span",{className:"sr-only",children:"Filter by grader"}),d.jsxs("select",{value:p.state.grader,onChange:w=>v({grader:w.target.value}),className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:[d.jsx("option",{value:"all",children:"All graders"}),p.graderOptions.map(w=>d.jsx("option",{value:w,children:w},w))]})]}),d.jsxs("details",{className:"group relative",children:[d.jsx("summary",{className:"list-none rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-gray-600 hover:text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"Display"}),d.jsxs("div",{className:"absolute right-0 z-10 mt-2 w-64 max-w-[calc(100vw-2rem)] rounded-lg border border-gray-800 bg-gray-950 p-3",children:[d.jsx("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Columns"}),d.jsx("div",{className:"max-h-72 space-y-2 overflow-auto pr-1",children:p.columns.map(w=>d.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-300",children:[d.jsx("input",{type:"checkbox",checked:y.has(w.id),onChange:()=>b(w.id),className:"h-4 w-4 rounded border-gray-700 bg-gray-900 text-cyan-500"}),d.jsx("span",{className:"min-w-0 truncate",title:w.label,children:w.label})]},w.id))})]})]}),d.jsx("button",{type:"button",onClick:x,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Clear"})]})]}),p.filteredRows.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No matching evaluations"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Adjust the result filters or display preset."})]}):d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full whitespace-nowrap text-left text-sm",style:{minWidth:`${Math.max(860,p.visibleColumns.length*136)}px`},children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsx("tr",{children:p.visibleColumns.map(w=>d.jsx("th",{className:`px-4 py-3 font-medium text-gray-400 ${XP(w.id)?"text-right":""}`,title:w.label,children:d.jsx("span",{className:"block max-w-48 truncate",children:w.label})},w.id))})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:p.filteredRows.map(w=>d.jsx("tr",{className:"transition-colors hover:bg-gray-900/30",children:p.visibleColumns.map(N=>d.jsx("td",{className:`px-4 py-3 align-middle ${XP(N.id)?"text-right tabular-nums":""}`,children:d.jsx(iie,{column:N,row:w,runId:t,projectId:r,passThreshold:n})},`${w.key}:${N.id}`))},w.key))})]})})]})}function XP(e){return["duration","cost_tokens"].includes(e)||e.startsWith("grader:")}function iie({column:e,row:t,runId:r,projectId:n,passThreshold:i}){if(e.id.startsWith("grader:")){const l=e.id.slice(7);return d.jsx(cie,{score:t.graderScores.get(l),passThreshold:i})}switch(e.id){case"status":return d.jsx(sie,{status:t.status,label:t.statusLabel});case"test":return d.jsx(lie,{row:t,runId:r,projectId:n});case"model_target":return d.jsx(oie,{row:t});case"score":return t.executionError?d.jsx("span",{className:"inline-flex rounded-md border border-amber-900/60 bg-amber-950/20 px-2 py-0.5 text-xs font-medium text-amber-300",children:"Execution error"}):d.jsx(Ln,{rate:t.result.score});case"suite":return d.jsx(rx,{value:t.suiteLabel});case"category":return d.jsx(rx,{value:t.categoryLabel});case"duration":return d.jsx("span",{className:"text-gray-400",children:eie(t.result.durationMs)});case"cost_tokens":return d.jsx(uie,{row:t});case"review":return d.jsx("span",{className:t.reviewed?"text-emerald-300":"text-gray-500",children:t.reviewed?"Reviewed":"Unreviewed"});case"error":return d.jsx(rx,{value:t.result.error,tone:"text-red-300"});default:return d.jsx("span",{className:"text-gray-600",children:"-"})}}function sie({status:e,label:t}){const r=e==="passing"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":e==="error"?"border-amber-900/60 bg-amber-950/20 text-amber-300":"border-red-900/60 bg-red-950/20 text-red-300",n=e==="passing"?"bg-emerald-400":e==="error"?"bg-amber-400":"bg-red-400";return d.jsxs("span",{className:`inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs ${r}`,children:[d.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${n}`}),t]})}function lie({row:e,runId:t,projectId:r}){const n="block min-w-0 truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline";return d.jsxs("div",{className:"max-w-[24rem] min-w-0",children:[r?d.jsx(Oe,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:r,runId:t,evalId:e.testId},className:n,title:e.testId,children:e.testId}):d.jsx(Oe,{to:"/evals/$runId/$evalId",params:{runId:t,evalId:e.testId},className:n,title:e.testId,children:e.testId}),e.result.error?d.jsx("div",{className:"mt-0.5 truncate text-xs text-red-300",title:e.result.error,children:e.result.error}):null]})}function oie({row:e}){return d.jsxs("div",{className:"max-w-[16rem] min-w-0",children:[d.jsx("div",{className:"truncate text-gray-300",title:e.targetLabel,children:e.targetLabel}),e.modelLabel?d.jsx("div",{className:"mt-0.5 truncate text-xs text-gray-500",title:e.modelLabel,children:e.modelLabel}):null]})}function uie({row:e}){const t=tie(e.result.costUsd),r=rie(e.tokenTotal),n=nie(e.result);return!t&&!r?d.jsx("span",{className:"text-gray-600",children:"-"}):d.jsxs("div",{className:"min-w-0 text-right",children:[t?d.jsx("div",{className:"tabular-nums text-gray-300",children:t}):null,r?d.jsx("div",{className:"text-xs tabular-nums text-gray-500",title:n,children:r}):null]})}function cie({score:e,passThreshold:t}){if(!e)return d.jsx("span",{className:"text-gray-600",children:"-"});const r=e.score<t||f5(e);return d.jsxs("div",{className:"min-w-0 text-right",children:[d.jsx("div",{className:`tabular-nums ${aie(e.score)}`,children:Jae(e.score)}),d.jsx("div",{className:r?"text-xs text-red-300":"text-xs text-gray-500",children:r?"Fail":e.verdict??"Pass"})]})}function rx({value:e,tone:t="text-gray-400"}){return e?d.jsx("span",{className:`block max-w-[14rem] truncate ${t}`,title:e,children:e}):d.jsx("span",{className:"text-gray-600",children:"-"})}function tu({total:e,passed:t,failed:r,passRate:n,executionErrors:i=0,totalCost:l}){const o=Math.round(n*100),c=o>=80?"text-cyan-400":o>=60?"text-amber-400":"text-red-400";return d.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:[d.jsx(go,{label:"Pass Rate",value:`${o}%`,accent:c,large:!0}),d.jsx("div",{className:"h-6 w-px bg-gray-700"}),d.jsx(go,{label:"Passed",value:String(t),accent:"text-emerald-400"}),d.jsx(go,{label:"Failures",value:String(r),accent:"text-red-400"}),i>0&&d.jsx(go,{label:"Execution Errors",value:String(i),accent:"text-amber-400"}),d.jsx(go,{label:"Total",value:String(e)}),l!==void 0&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"h-6 w-px bg-gray-700"}),d.jsx(go,{label:"Cost",value:`$${l.toFixed(4)}`,accent:"text-amber-400"})]})]})}function go({label:e,value:t,accent:r,large:n}){return d.jsxs("div",{className:"flex flex-col",children:[d.jsx("span",{className:"text-xs text-gray-500",children:e}),d.jsx("span",{className:`tabular-nums font-semibold ${n?"text-2xl":"text-lg"} ${r??"text-white"}`,children:t})]})}function die(e,t){const r=new Map;for(const n of e){const i=n.category??"Uncategorized",l=n.suite??"Uncategorized";r.has(i)||r.set(i,new Map);const o=r.get(i),c=o.get(l)??[];c.push(n),o.set(l,c)}return Array.from(r.entries()).map(([n,i])=>{const l=Array.from(i.entries()).map(([x,b])=>{const w=Um(b,t);return{name:x,passed:w.passed,failed:w.failed,executionErrors:w.executionErrors,total:w.total,avgScore:w.avgScore}}).sort((x,b)=>x.name.localeCompare(b.name)),o=l.reduce((x,b)=>x+b.total,0),c=l.reduce((x,b)=>x+b.passed,0),f=l.reduce((x,b)=>x+b.failed,0),h=l.reduce((x,b)=>x+b.executionErrors,0),p=o-h,y=l.reduce((x,b)=>x+b.avgScore*(b.total-b.executionErrors),0),v=QB(n);return{name:n,displayName:v.label,mutedDisplayName:v.mutedLabel,suites:l,total:o,passed:c,failed:f,executionErrors:h,avgScore:p>0?y/p:0}}).sort((n,i)=>n.name.localeCompare(i.name))}function h5({results:e,runId:t,projectId:r}){const{data:n}=pt(r),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,l=e.length,o=Um(e,i),c=e.reduce((h,p)=>h+(p.costUsd??0),0),f=die(e,i);return l===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(tu,{total:0,passed:0,failed:0,passRate:0}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This run has no results yet."})]})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsx(tu,{total:l,passed:o.passed,failed:o.failed,passRate:o.passRate,executionErrors:o.executionErrors,totalCost:c>0?c:void 0}),d.jsxs("div",{children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Category Breakdown"}),d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[620px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Category"}),d.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Passed"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Failures"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Execution Errors"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Total"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:f.map(h=>{const p=d.jsxs("span",{className:"flex min-w-0 items-baseline gap-2",children:[d.jsx("span",{className:"truncate",children:h.displayName}),h.mutedDisplayName?d.jsx("span",{className:"truncate text-xs font-normal text-gray-500",title:h.mutedDisplayName,children:h.mutedDisplayName}):null]});return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"w-[18rem] max-w-[18rem] px-4 py-2.5 font-medium text-gray-200",children:r?d.jsx(Oe,{to:"/projects/$projectId/runs/$runId/category/$category",params:{projectId:r,runId:t,category:h.name},className:"flex min-w-0 text-cyan-400 hover:text-cyan-300 hover:underline",title:h.mutedDisplayName??h.displayName,children:p}):d.jsx(Oe,{to:"/runs/$runId/category/$category",params:{runId:t,category:h.name},className:"flex min-w-0 text-cyan-400 hover:text-cyan-300 hover:underline",title:h.mutedDisplayName??h.displayName,children:p})}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(Ln,{rate:h.total-h.executionErrors>0?h.passed/(h.total-h.executionErrors):0})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:h.passed}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:h.failed>0?h.failed:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-amber-400",children:h.executionErrors>0?h.executionErrors:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-gray-400",children:h.total})]},h.name)})})]})})]}),d.jsx(qw,{results:e,runId:t,projectId:r,passThreshold:i,title:"All Evals"}),d.jsx(fie,{runId:t,projectId:r})]})}function fie({runId:e,projectId:t}){const[r,n]=S.useState(!1),{data:i,isLoading:l,error:o}=sB(e,t);return!l&&!o&&i==null?null:d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"flex w-full items-center justify-between rounded-lg border border-gray-800 bg-gray-900/50 px-4 py-2 text-left text-sm font-medium text-gray-300 transition-colors hover:bg-gray-900","aria-expanded":r,children:[d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx("span",{"aria-hidden":"true",children:r?"▾":"▸"}),"Run Log"]}),d.jsx("span",{className:"text-xs text-gray-500",children:l?"Loading…":o?"Failed to load":i?`${i.length} chars`:""})]}),r&&d.jsx("div",{className:"mt-2 overflow-hidden rounded-lg border border-gray-800 bg-black",children:o?d.jsxs("div",{className:"p-4 text-sm text-red-400",children:["Failed to load run log: ",o.message]}):d.jsx("pre",{className:"max-h-[480px] overflow-auto whitespace-pre-wrap break-words p-4 font-mono text-xs leading-relaxed text-gray-200",children:i??""})})]})}function $p({status:e}){const t=e==="finished"||e==="failed",n={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"}[e]??"text-gray-400";return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:`text-sm font-medium ${n}`,children:e.charAt(0).toUpperCase()+e.slice(1)}),!t&&d.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]})}function zp({runId:e,status:t,isReadOnly:r,projectId:n}){const[i,l]=S.useState(!1),[o,c]=S.useState(null);if(!Iae(t,r))return null;async function f(){l(!0),c(null);try{await IB(e,n)}catch(h){c(h instanceof Error?h.message:"Failed to stop run"),l(!1)}}return d.jsxs("div",{className:"flex flex-col items-end gap-1",children:[d.jsx("button",{type:"button",onClick:f,disabled:i,className:"inline-flex items-center gap-2 rounded-md border border-gray-700 bg-transparent px-3 py-1.5 text-sm font-medium text-gray-300 hover:bg-gray-800 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"stop-run-button",children:i?"Stopping…":d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":"true",className:"inline-block h-2.5 w-2.5 rounded-[1px] bg-current"}),"Stop"]})}),o&&d.jsx("p",{className:"text-xs text-red-400",children:o})]})}const m5=Er("/runs/$runId")({component:hie});function hie(){var w;const{runId:e}=m5.useParams(),{data:t,isLoading:r,error:n}=ld(e),{data:i}=pt(),{data:l}=zm(),[o,c]=S.useState(!1),f=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(N=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},N))})]});if(n)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",n.message]});const h=(w=t==null?void 0:t.results)==null?void 0:w[0],p=h==null?void 0:h.target,y=p?{target:p}:void 0,v=t==null?void 0:t.status,x=v==="starting"||v==="running",b=SM({runId:e,results:(t==null?void 0:t.results)??[],source:t==null?void 0:t.source,sourceLabel:t==null?void 0:t.source_label,remoteRepo:(t==null?void 0:t.source)==="remote"?l==null?void 0:l.repo:void 0,formatTimestamp:N=>new Date(N).toLocaleString()});return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("h1",{className:"min-w-0 truncate text-xl font-semibold text-white sm:text-2xl",title:b.heading,children:b.heading}),b.sourceBadge?d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",children:b.sourceBadge}):null]}),b.meta?d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:b.meta}):null,b.sourceContext.length>0?d.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:b.sourceContext.map(N=>d.jsxs("span",{children:[d.jsxs("span",{className:"text-gray-600",children:[N.label,":"]})," ",N.value]},`${N.label}:${N.value}`))}):null]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!f&&x?d.jsx(zp,{runId:e,status:v,isReadOnly:f}):d.jsx(i5,{results:(t==null?void 0:t.results)??[],runDir:t==null?void 0:t.run_dir,suiteFilter:t==null?void 0:t.suite_filter,target:p??void 0,isReadOnly:f,plannedTestCount:t==null?void 0:t.planned_test_count,runStatus:v}),v&&d.jsx($p,{status:v}),!f&&!x&&d.jsx("button",{type:"button",onClick:()=>c(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run evals"})]})]}),d.jsx(h5,{results:(t==null?void 0:t.results)??[],runId:e}),!f&&d.jsx(wl,{open:o,onClose:()=>c(!1),prefill:y})]})}const nx=[{id:"runs",label:"🏃 Recent Runs",title:"Recent Runs"},{id:"experiments",label:"🧪 Experiments",title:"Experiments"},{id:"analytics",label:"📊 Analytics",title:"Analytics"},{id:"targets",label:"🤖 Targets",title:"Targets"}],p5=Er("/projects/$projectId")({component:mie});function mie(){var x;const{projectId:e}=p5.useParams(),n=Hb().location.search.tab,i=ml(),[l,o]=S.useState(!1),{data:c}=pt(e),{data:f}=od(),h=(c==null?void 0:c.read_only)===!0,p=jM(e,f==null?void 0:f.projects),y=nx.some(b=>b.id===n)?n:"runs",v=((x=nx.find(b=>b.id===y))==null?void 0:x.title)??"Recent Runs";return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:v}),!h&&d.jsx("button",{type:"button",onClick:()=>o(!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"})]}),d.jsx("div",{className:"border-b border-gray-800 sm:overflow-x-auto",children:d.jsx("div",{className:"flex flex-wrap gap-1 sm:min-w-max sm:flex-nowrap",children:nx.map(b=>d.jsx("button",{type:"button",onClick:()=>i({to:"/projects/$projectId",params:{projectId:e},search:{tab:b.id}}),className:`shrink-0 px-4 py-2 text-sm font-medium transition-colors ${y===b.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:b.label},b.id))})}),y==="runs"&&d.jsx(pie,{projectId:e,projectName:p,readOnly:h}),y==="experiments"&&d.jsx(t5,{projectId:e}),y==="analytics"&&d.jsx(yie,{projectId:e,readOnly:h}),y==="targets"&&d.jsx(n5,{projectId:e}),!h&&d.jsx(wl,{open:l,onClose:()=>o(!1),projectId:e})]})}function pie({projectId:e,projectName:t,readOnly:r}){const n=fa(),{data:i,isLoading:l,error:o,hasNextPage:c,fetchNextPage:f,isFetchingNextPage:h}=NB(e),{data:p}=Wb(e),{data:y}=zm(e),[v,x]=S.useState(!1),[b,w]=S.useState(null),N=((p==null?void 0:p.runs)??[]).filter(T=>T.status==="starting"||T.status==="running"),O=Lp((i==null?void 0:i.runs)??[]),C=O.filter(T=>T.on_remote===!0).length,E=(y==null?void 0:y.configured)===!0?iM(C,O.length,y.branch):void 0;async function A(){x(!0),w(null);try{const T=await gM(e);n.setQueryData(Yb(e).queryKey,T);const M=sM(T);w(M),Promise.all([n.invalidateQueries({queryKey:["projects",e,"runs"]}),n.invalidateQueries({queryKey:["projects",e,"experiments"]}),n.invalidateQueries({queryKey:["projects",e,"compare"]}),n.invalidateQueries({queryKey:["projects",e,"targets"]}),n.invalidateQueries({queryKey:["remote-status",e]})]).catch(()=>{})}catch(T){w(lM(T,y)),n.invalidateQueries({queryKey:["remote-status",e]}).catch(()=>{})}finally{x(!1)}}return S.useEffect(()=>{if((b==null?void 0:b.kind)!=="success")return;const T=window.setTimeout(()=>w(null),7e3);return()=>window.clearTimeout(T)},[b]),l?d.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(T=>d.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},T))}):o?d.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]}):d.jsxs("div",{className:"space-y-4",children:[N.length>0&&d.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[d.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),d.jsx("ul",{className:"divide-y divide-gray-800/50",children:N.map(T=>d.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[d.jsxs("div",{className:"min-w-0 flex items-center gap-3",children:[d.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),d.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:T.id}),d.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(T.started_at).toLocaleTimeString()})]}),d.jsx(Oe,{to:"/projects/$projectId/jobs/$runId",params:{projectId:e,runId:T.id},className:"flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},T.id))})]}),d.jsx(r5,{remoteStatus:y,syncInFlight:v,onSync:A,projectName:t,syncFeedback:b,onRemoteSummary:E}),d.jsx(Ip,{runs:O,projectId:e,enableCombine:!r,remoteBranch:y==null?void 0:y.branch,hasNextPage:c,isFetchingNextPage:h,onLoadMore:()=>void f()})]})}function yie({projectId:e,readOnly:t}){const{data:r,isLoading:n,isError:i,error:l}=Ue(vM(e));return d.jsx(Jk,{data:r,isLoading:n,isError:i,error:l,projectId:e,readOnly:t})}const y5=Er("/jobs/$runId")({component:vie});function vie(){const{runId:e}=y5.useParams(),{data:t,isLoading:r,error:n}=Xb(e),{data:i}=pt(),l=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(ax,{}),d.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-gray-900"})]});if(n||!t)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(ax,{}),d.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-400",children:n?`Failed to load run: ${n.message}`:"Run not found."})]});const o=t.status==="finished"||t.status==="failed";return d.jsxs("div",{className:"space-y-4",children:[d.jsx(ax,{}),d.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("h1",{className:"truncate font-mono text-base font-semibold text-white",children:e}),d.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["Started ",new Date(t.started_at).toLocaleString(),t.finished_at&&d.jsxs(d.Fragment,{children:[" · ","Finished ",new Date(t.finished_at).toLocaleString()," · ",Math.round((new Date(t.finished_at).getTime()-new Date(t.started_at).getTime())/1e3),"s"]})]})]}),d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-3",children:[d.jsx(zp,{runId:e,status:t.status,isReadOnly:l}),d.jsx($p,{status:t.status})]})]}),d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 px-4 py-3",children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Command"}),d.jsx("code",{className:"break-all text-xs text-cyan-300",children:t.command})]}),t.stdout?d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Output"}),d.jsx("div",{className:"max-h-[60vh] overflow-y-auto rounded-lg border border-gray-700 bg-gray-950 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-gray-200",children:t.stdout})})]}):!o&&d.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[d.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-gray-500 border-t-transparent"}),"Waiting for output…"]}),t.stderr&&d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-red-500",children:"Stderr"}),d.jsx("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-red-900/40 bg-red-950/20 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-red-300",children:t.stderr})})]}),o&&d.jsxs("p",{className:"text-xs text-gray-500",children:["Exit code:"," ",d.jsx("span",{className:t.exit_code===0?"text-emerald-400":"text-red-400",children:t.exit_code})]})]})}function ax(){return d.jsx(Oe,{to:"/",search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}function v5({experimentName:e,projectId:t}){var v;const{data:r,isLoading:n}=Ue(t?Qb(t):cM),{data:i,isLoading:l}=Ue(t?Vb(t):Gb);if(n||l)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-4 gap-4",children:["s1","s2","s3","s4"].map(x=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},x))})]});const c=(v=r==null?void 0:r.experiments)==null?void 0:v.find(x=>x.name===e),f=Lp(((i==null?void 0:i.runs)??[]).filter(x=>(x.experiment??"default")===e)),h=(c==null?void 0:c.pass_rate)??0,p=f.length,y=(c==null?void 0:c.target_count)??0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:e}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[p," run",p!==1?"s":""," · ",y," target",y!==1?"s":"",(c==null?void 0:c.last_run)&&d.jsxs("span",{className:"ml-2",children:["· Last run: ",WP(c.last_run)]})]})]}),c&&d.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[d.jsx(gh,{label:"Runs",value:String(p)}),d.jsx(gh,{label:"Targets",value:String(y)}),d.jsx(gh,{label:"Pass Rate",value:`${Math.round(h*100)}%`,accent:"text-cyan-400"}),d.jsx(gh,{label:"Last Run",value:WP(c.last_run)})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-4 text-lg font-medium text-gray-200",children:"All Runs"}),d.jsx(Ip,{runs:f,projectId:t,emptyMessage:d.jsxs("div",{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found for this experiment."}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Runs will appear here once this experiment has execution results."})]})})]})]})}function gh({label:e,value:t,accent:r}){return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("p",{className:"text-sm text-gray-400",children:e}),d.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${r??"text-white"}`,children:t})]})}function WP(e){if(!e)return"N/A";try{const t=new Date(e);return Number.isNaN(t.getTime())?"N/A":t.toLocaleString()}catch{return"N/A"}}const g5=Er("/experiments/$experimentName")({component:gie});function gie(){const{experimentName:e}=g5.useParams();return d.jsx(v5,{experimentName:e})}function xie(e){return e?`/api/projects/${encodeURIComponent(e)}/feedback`:"/api/feedback"}async function bie(e,t,r){const n=await fetch(xie(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reviews:[{test_id:e,comment:t}]})});if(!n.ok)throw new Error(`Failed to save feedback: ${n.status}`);return n.json()}function jie({testId:e,projectId:t}){var y;const{data:r}=dM(t),n=fa(),i=(y=r==null?void 0:r.reviews)==null?void 0:y.find(v=>v.test_id===e),[l,o]=S.useState((i==null?void 0:i.comment)??""),[c,f]=S.useState(!1);S.useEffect(()=>{o((i==null?void 0:i.comment)??""),f(!1)},[i==null?void 0:i.comment]);const h=wx({mutationFn:()=>bie(e,l,t),onSuccess:()=>{n.invalidateQueries({queryKey:["feedback",t??""]}),f(!0),setTimeout(()=>f(!1),2e3)}}),p=S.useCallback(()=>{h.mutate()},[h]);return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-400",children:"Feedback"}),d.jsx("textarea",{value:l,onChange:v=>{o(v.target.value),f(!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}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[d.jsx("button",{type:"button",onClick:p,disabled:h.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:h.isPending?"Saving...":"Save Feedback"}),c&&d.jsx("span",{className:"text-sm text-emerald-400",children:"Saved"}),h.isError&&d.jsx("span",{className:"text-sm text-red-400",children:"Error saving feedback"})]})]})}function wie(e){var r;switch((r=e.split(".").pop())==null?void 0:r.toLowerCase()){case"ts":case"tsx":return"📘";case"json":return"📋";case"log":case"txt":return"📜";case"md":return"📝";default:return"📄"}}function x5(e){const t=[];for(const r of e)r.type==="dir"&&(t.push(r.path),r.children&&t.push(...x5(r.children)));return t}function b5({node:e,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:l=0}){const o=e.type==="dir",c=n.has(e.path),f=t===e.path;return d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>{o?i(e.path):r(e.path)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors ${f?"bg-cyan-400/20 text-cyan-400":"text-gray-300 hover:bg-gray-800/50 hover:text-gray-200"}`,style:{paddingLeft:`${l*16+8}px`},children:[d.jsx("span",{className:"flex-shrink-0 text-xs",children:o?c?"📂":"📁":wie(e.name)}),d.jsx("span",{className:"truncate",children:e.name})]}),o&&c&&e.children&&d.jsx("div",{children:e.children.map(h=>d.jsx(b5,{node:h,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:l+1},h.path))})]})}function Sie({files:e,selectedPath:t,onSelect:r}){const[n,i]=S.useState(()=>new Set(x5(e))),l=o=>{i(c=>{const f=new Set(c);return f.has(o)?f.delete(o):f.add(o),f})};return d.jsxs("div",{className:"w-full md:w-64 overflow-y-auto rounded-lg border border-gray-800 bg-gray-900 py-2",children:[e.length===0&&d.jsx("p",{className:"px-4 py-2 text-sm text-gray-500",children:"No files."}),e.map(o=>d.jsx(b5,{node:o,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:l},o.path))]})}const Nie="modulepreload",Oie=function(e){return"/"+e},ZP={},_ie=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let o=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=o(r.map(h=>{if(h=Oie(h),h in ZP)return;ZP[h]=!0;const p=h.endsWith(".css"),y=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const v=document.createElement("link");if(v.rel=p?"stylesheet":Nie,p||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),p)return new Promise((x,b)=>{v.addEventListener("load",x),v.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return i.then(o=>{for(const c of o||[])c.status==="rejected"&&l(c.reason);return t().catch(l)})},Eie=S.lazy(()=>_ie(()=>import("./index-uXJsSG83.js"),[]));function Aie({value:e,language:t="json",height:r="400px"}){return d.jsx(S.Suspense,{fallback:d.jsx("div",{className:"flex items-center justify-center rounded-lg bg-gray-900 p-8 text-gray-500",children:"Loading editor..."}),children:d.jsx(Eie,{height:r,language:t,value:e,theme:"vs-dark",options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbers:"on",wordWrap:"on",padding:{top:12}}})})}function Rm({score:e,className:t=""}){const r=Math.round(Math.max(0,Math.min(1,e))*100);return d.jsxs("div",{className:`flex items-center gap-3 ${t}`,children:[d.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-gray-800",children:d.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-cyan-400 to-blue-500 transition-all duration-300",style:{width:`${r}%`}})}),d.jsxs("span",{className:"w-12 text-right text-sm font-medium tabular-nums text-gray-300",children:[r,"%"]})]})}const Cie={system:{container:"border-gray-800 bg-gray-900/70",badge:"border-gray-700 bg-gray-800 text-gray-300",label:"System",accent:"text-gray-400"},user:{container:"border-cyan-900/60 bg-cyan-950/20",badge:"border-cyan-900/60 bg-cyan-950/30 text-cyan-300",label:"User",accent:"text-cyan-300"},assistant:{container:"border-gray-800 bg-gray-900",badge:"border-gray-700 bg-gray-800 text-gray-200",label:"Assistant",accent:"text-gray-300"},tool:{container:"border-amber-900/60 bg-amber-950/20",badge:"border-amber-900/60 bg-amber-950/30 text-amber-300",label:"Tool result",accent:"text-amber-300"},function:{container:"border-amber-900/60 bg-amber-950/20",badge:"border-amber-900/60 bg-amber-950/30 text-amber-300",label:"Function result",accent:"text-amber-300"}};function Cd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Tie(e){return!Cd(e)||e.tool_calls!==void 0&&!Array.isArray(e.tool_calls)?!1:typeof e.test_id=="string"&&typeof e.target=="string"&&typeof e.message_index=="number"&&Number.isFinite(e.message_index)&&typeof e.role=="string"}function Pie(e){const t=[],r=e.split(/\r?\n/);for(let n=0;n<r.length;n+=1){const i=r[n].trim();if(i)try{const l=JSON.parse(i);if(!Tie(l))return{entries:t,error:`Line ${n+1} is not a transcript JSONL row.`};t.push(l)}catch(l){return{entries:t,error:`Line ${n+1} is invalid JSON: ${l.message}`}}}return{entries:t}}function j5(e){const t=[];for(const r of e)r.type==="file"?t.push(r):r.children&&t.push(...j5(r.children));return t}function Mie(e){return e.replace(/\\/g,"/")}function w5(e,t){const r=j5(e);for(const n of t){const i=r.find(l=>{const o=Mie(l.path);return o===n||o.endsWith(`/${n}`)});if(i)return i.path}}function Rie(e){return w5(e,["outputs/transcript.jsonl"])}function Die(e){return w5(e,["outputs/answer.md"])}function Bp(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function kie(e){if(typeof e=="number")return`$${e.toFixed(4)}`}function Hw(e){if(!e)return;const t=[];return typeof e.input=="number"&&t.push(`${e.input} in`),typeof e.output=="number"&&t.push(`${e.output} out`),typeof e.reasoning=="number"&&t.push(`${e.reasoning} reasoning`),typeof e.cached=="number"&&t.push(`${e.cached} cached`),t.length>0?t.join(" / "):void 0}function S5(e){if(e===void 0)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Iie(e){if(Array.isArray(e)){const t=e.map(r=>{if(Cd(r)&&r.type==="text"&&typeof r.text=="string")return r.text}).filter(r=>r!==void 0);if(t.length===e.length&&t.length>0)return t.join(`
|
|
118
|
-
`)}return S5(e)}function Dm(e,t){for(const r of t){const n=e[r];if(typeof n=="string"&&n.trim())return n}}function Cb(e,t){for(const r of t)if(e[r]!==void 0)return e[r]}function N5(e,t){const r=e[t];return Cd(r)?r:void 0}function Lie(e,t){const r=N5(e,"function");return Dm(e,["tool","name","tool_name"])??(r?Dm(r,["name"]):void 0)??`Tool ${t+1}`}function $ie(e){const t=N5(e,"function");return Cb(e,["input","arguments","args","parameters"])??(t?Cb(t,["arguments"]):void 0)}function zie(e){return Cb(e,["output","result","content"])}function Bie(e){return e!=null&&!(typeof e=="string"&&e.length===0)}function Bs({label:e,value:t,tone:r="default"}){return Bie(t)?d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:r==="error"?"text-xs font-medium text-red-300":"text-xs font-medium text-gray-400",children:e}),d.jsx("pre",{className:"max-h-80 overflow-auto rounded-md border border-gray-800 bg-gray-950 p-3 text-xs text-gray-200",children:d.jsx("code",{children:S5(t)})})]}):null}function $r({children:e}){return d.jsx("span",{className:"rounded-md border border-gray-800 bg-gray-950 px-2 py-0.5 text-xs text-gray-400",children:e})}function ix({href:e,children:t,download:r=!1}){return e?d.jsx("a",{href:e,target:"_blank",rel:"noreferrer",download:r,className:"rounded-md px-3 py-1.5 text-sm text-cyan-400 transition-colors hover:text-cyan-300 hover:underline",children:t}):null}function JP({path:e,onOpenFile:t,children:r}){return!e||!t?null:d.jsx("button",{type:"button",onClick:()=>t(e),className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:r})}function Uie({call:e,index:t}){const r=Lie(e,t),n=Dm(e,["id","call_id","tool_call_id"]),i=Dm(e,["status"]),l=typeof e.duration_ms=="number"?Bp(e.duration_ms):void 0,o=Cd(e.metadata)?e.metadata:void 0;return d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-950/80 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-gray-200",children:[d.jsx("span",{children:"Tool call"}),d.jsx("span",{className:"ml-2 rounded-md border border-amber-900/60 bg-amber-950/30 px-2 py-0.5 text-xs text-amber-300",children:r}),i&&d.jsx("span",{className:"ml-2 text-xs text-gray-500",children:i}),l&&d.jsx("span",{className:"ml-2 tabular-nums text-xs text-gray-500",children:l})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&d.jsxs($r,{children:["id: ",n]}),l&&d.jsxs($r,{children:["duration: ",l]}),i&&d.jsxs($r,{children:["status: ",i]})]}),d.jsx(Bs,{label:"Arguments",value:$ie(e)}),d.jsx(Bs,{label:"Result",value:zie(e)}),d.jsx(Bs,{label:"Error",value:e.error,tone:"error"}),d.jsx(Bs,{label:"Metadata",value:o})]})]})}function qie({line:e}){const t=Bp(e.duration_ms),r=Hw(e.token_usage);return d.jsxs("details",{className:"rounded-md border border-amber-900/50 bg-gray-950/60 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-amber-300",children:[e.name?`Tool result · ${e.name}`:"Tool result",t&&d.jsx("span",{className:"ml-2 tabular-nums text-xs text-gray-500",children:t})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.name&&d.jsxs($r,{children:["name: ",e.name]}),t&&d.jsxs($r,{children:["duration: ",t]}),r&&d.jsxs($r,{children:["tokens: ",r]})]}),d.jsx(Bs,{label:"Result",value:e.content}),d.jsx(Bs,{label:"Metadata",value:e.metadata})]})]})}function Hie({line:e,ordinal:t}){const r=Cie[e.role]??{container:"border-gray-800 bg-gray-900",badge:"border-gray-700 bg-gray-800 text-gray-300",label:e.role,accent:"text-gray-300"},n=Iie(e.content),i=Bp(e.duration_ms),l=Hw(e.token_usage),o=Array.isArray(e.tool_calls)?e.tool_calls.filter(Cd):[];return d.jsxs("article",{className:`rounded-lg border p-4 ${r.container}`,children:[d.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:`rounded-md border px-2 py-0.5 text-xs font-medium ${r.badge}`,children:r.label}),e.name&&d.jsx("span",{className:`truncate text-sm font-medium ${r.accent}`,children:e.name})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-gray-500",children:[d.jsxs("span",{className:"tabular-nums",children:["#",t+1]}),e.start_time&&d.jsx("span",{children:e.start_time}),i&&d.jsx("span",{className:"tabular-nums",children:i}),l&&d.jsx("span",{children:l})]})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[e.role==="tool"||e.role==="function"?d.jsx(qie,{line:e}):n.trim().length>0?d.jsx("pre",{className:"whitespace-pre-wrap break-words text-sm leading-6 text-gray-200",children:n}):d.jsx("p",{className:"text-sm text-gray-500",children:"No message content recorded."}),o.length>0&&d.jsx("div",{className:"space-y-2",children:o.map((c,f)=>d.jsx(Uie,{call:c,index:f},`${e.message_index}-${f}`))}),e.metadata&&e.role!=="tool"&&e.role!=="function"&&d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-950/60 p-3",children:[d.jsx("summary",{className:"cursor-pointer text-xs font-medium text-gray-400",children:"Message metadata"}),d.jsx("div",{className:"mt-3",children:d.jsx(Bs,{label:"Metadata",value:e.metadata})})]})]})]})}function Fie({entries:e,transcriptPath:t}){var h,p,y;const r=e[0],n=(h=r==null?void 0:r.source)==null?void 0:h.provider,i=(p=r==null?void 0:r.source)==null?void 0:p.model,l=(y=r==null?void 0:r.source)==null?void 0:y.session_id,o=Bp(r==null?void 0:r.transcript_duration_ms),c=Hw(r==null?void 0:r.transcript_token_usage),f=kie(r==null?void 0:r.transcript_cost_usd);return d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsxs($r,{children:[e.length," messages"]}),n&&d.jsxs($r,{children:["provider: ",n]}),i&&d.jsxs($r,{children:["model: ",i]}),l&&d.jsxs($r,{children:["session: ",l]}),o&&d.jsxs($r,{children:["duration: ",o]}),c&&d.jsxs($r,{children:["tokens: ",c]}),f&&d.jsxs($r,{children:["cost: ",f]}),t&&d.jsx($r,{children:t})]})}function Kie({entries:e,finalAnswer:t,answerPath:r,transcriptPath:n,answerHref:i,transcriptHref:l,transcriptDownloadHref:o,onOpenFile:c}){const f=[...e].sort((p,y)=>p.message_index-y.message_index),h=!!r;return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("section",{className:"rounded-lg border border-emerald-900/50 bg-emerald-950/20 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-medium text-emerald-300",children:"Final answer"}),d.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Highlighted from canonical ",d.jsx("code",{children:"outputs/answer.md"}),"; transcript context stays below."]})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(JP,{path:r,onOpenFile:c,children:"Open answer.md in Files"}),d.jsx(ix,{href:i,children:"Open answer.md"})]})]}),h?d.jsx("pre",{className:"mt-3 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md border border-emerald-900/40 bg-gray-950/80 p-3 text-sm leading-6 text-gray-100",children:t&&t.trim().length>0?t:"answer.md is empty."}):d.jsxs("p",{className:"mt-3 rounded-md border border-gray-800 bg-gray-950/60 p-3 text-sm text-gray-400",children:["No canonical ",d.jsx("code",{children:"outputs/answer.md"})," artifact was found. The transcript viewer does not fall back to ",d.jsx("code",{children:"response.md"}),"."]})]}),d.jsx("section",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Transcript timeline"}),d.jsx(Fie,{entries:f,transcriptPath:n})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(JP,{path:n,onOpenFile:c,children:"Open raw JSONL in Files"}),d.jsx(ix,{href:l,children:"Open raw JSONL"}),d.jsx(ix,{href:o,download:!0,children:"Download JSONL"})]})]})}),d.jsx("div",{className:"space-y-3",children:f.map((p,y)=>d.jsx(Hie,{line:p,ordinal:y},`${p.message_index}-${p.role}-${y}`))})]})}function O5(e){for(const t of e){if(t.type==="file")return t.path;if(t.children){const r=O5(t.children);if(r)return r}}return null}function _5({eval:e,runId:t,projectId:r}){const[n,i]=S.useState("checks"),[l,o]=S.useState(null),{data:c}=pt(r),f=(c==null?void 0:c.read_only)===!0,h=[{id:"checks",label:"Checks"},{id:"transcript",label:"Transcript"},{id:"source",label:"Source"},{id:"files",label:"Files"},...f?[]:[{id:"feedback",label:"Feedback"}]],p=y=>{o(y),i("files")};return d.jsxs("div",{className:"flex min-h-full flex-col",children:[d.jsx("div",{className:"border-b border-gray-800",children:d.jsx("div",{className:"flex gap-1 px-4",children:h.map(y=>d.jsx("button",{type:"button",onClick:()=>i(y.id),className:`px-4 py-2 text-sm font-medium transition-colors ${n===y.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:y.label},y.id))})}),d.jsxs("div",{className:"min-h-0 flex-1",children:[n==="checks"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(Qie,{result:e,projectId:r})}),n==="files"&&d.jsx("div",{className:"h-full p-4",children:d.jsx(Wie,{result:e,runId:t,projectId:r,selectedPath:l,onSelectedPathChange:o})}),n==="transcript"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(Xie,{result:e,runId:t,projectId:r,onOpenFile:p})}),n==="source"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(Vie,{result:e})}),!f&&n==="feedback"&&d.jsx("div",{className:"p-4",children:d.jsx(jie,{testId:e.testId,projectId:r})})]})]})}function Gie(e){if(e!==void 0)return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function jn({label:e,value:t}){return t===void 0||t===""?null:d.jsxs("div",{className:"min-w-0",children:[d.jsx("dt",{className:"text-xs font-medium uppercase text-gray-500",children:e}),d.jsx("dd",{className:"mt-1 break-words font-mono text-sm text-gray-200",children:String(t)})]})}function E5({file:e}){var r,n;const t=Gie(e.size_bytes);return d.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(jn,{label:"Path",value:e.display_path}),d.jsx(jn,{label:"SHA-256",value:e.content_sha256}),d.jsx(jn,{label:"Size",value:t}),d.jsx(jn,{label:"Omitted",value:((r=e.omitted)==null?void 0:r.message)??((n=e.omitted)==null?void 0:n.reason)})]})}function Pc({value:e,language:t}){return d.jsx("pre",{className:"max-h-96 overflow-auto rounded-md border border-gray-800 bg-gray-950 p-3 text-xs text-gray-200",children:d.jsx("code",{"data-language":t,children:e})})}function Yie({file:e}){const t=`${e.kind}${e.grader_name?` · ${e.grader_name}`:""}`;return d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-900 p-3",open:!1,children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-gray-200",children:[d.jsx("span",{children:t}),d.jsx("span",{className:"ml-3 font-mono text-xs text-gray-500",children:e.display_path})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsx(E5,{file:e}),e.command&&e.command.length>0&&d.jsx(Pc,{value:JSON.stringify(e.command,null,2),language:"json"}),e.content&&d.jsx(Pc,{value:e.content})]})]})}function Vie({result:e}){var r,n,i;const t=e.source_traceability;return!t||t.status!=="captured"?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Source metadata"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:(t==null?void 0:t.message)??"Source metadata was not captured for this run."})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("section",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-300",children:"Traceability"}),d.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(jn,{label:"Eval file",value:(r=t.eval_file)==null?void 0:r.display_path}),d.jsx(jn,{label:"Test ID",value:t.test_id??e.testId}),d.jsx(jn,{label:"Suite",value:e.suite}),d.jsx(jn,{label:"Category",value:e.category}),d.jsx(jn,{label:"Target",value:e.target})]})]}),((n=t.source_test)==null?void 0:n.yaml)&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Source Test"}),d.jsx(Pc,{value:t.source_test.yaml,language:"yaml"})]}),((i=t.eval_file)==null?void 0:i.content)&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Eval File Snapshot"}),d.jsx(E5,{file:t.eval_file}),d.jsx(Pc,{value:t.eval_file.content,language:"yaml"})]}),t.graders&&t.graders.length>0&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Graders"}),d.jsx("div",{className:"space-y-3",children:t.graders.map(l=>d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-900 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-gray-200",children:[l.name,d.jsx("span",{className:"ml-3 font-mono text-xs text-gray-500",children:l.type})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("dl",{className:"grid gap-3 md:grid-cols-3",children:[d.jsx(jn,{label:"Weight",value:l.weight}),d.jsx(jn,{label:"Required",value:l.required}),d.jsx(jn,{label:"Min score",value:l.min_score})]}),d.jsx(Pc,{value:JSON.stringify(l.definition,null,2),language:"json"})]})]},`${l.name}-${l.type}`))})]}),t.referenced_files&&t.referenced_files.length>0&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Referenced Files"}),d.jsx("div",{className:"space-y-3",children:t.referenced_files.map((l,o)=>d.jsx(Yie,{file:l},`${l.kind}-${l.display_path}-${l.grader_name??""}-${o}`))})]})]})}function e2({assertion:e}){return d.jsxs("div",{className:`flex items-start gap-3 rounded-lg border p-3 ${e.passed?"border-emerald-900/50 bg-emerald-950/20":"border-red-900/50 bg-red-950/20"}`,children:[d.jsx("span",{className:`mt-0.5 text-lg ${e.passed?"text-emerald-400":"text-red-400"}`,children:e.passed?"✓":"✗"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("p",{className:"text-sm text-gray-200",children:[e.text,e.durationMs!=null&&d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",(e.durationMs/1e3).toFixed(1),"s)"]})]}),e.evidence&&d.jsx("p",{className:"mt-1 text-xs text-gray-400",children:e.evidence})]})]})}function Qie({result:e,projectId:t}){const{data:r}=pt(t),n=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,i=!nl(e.score,n)||e.executionStatus==="error"||e.executionStatus==="failed",l=(e.scores??[]).filter(p=>Array.isArray(p.assertions)&&p.assertions.length>0),o=l.length>0,c=e.assertions??[],f=[];e.error&&f.push(e.error),(e.executionStatus==="error"||e.executionStatus==="failed")&&f.push(`Execution status: ${e.executionStatus}`);const h=o?l.flatMap(p=>p.assertions):c;for(const p of h.filter(y=>!y.passed)){const y=p.evidence?`${p.text}: ${p.evidence}`:p.text;f.push(y)}if(e.scores){for(const p of e.scores)if(!nl(p.score,n)&&p.details){const y=typeof p.details=="string"?p.details:JSON.stringify(p.details,null,2);f.push(`[${p.name??p.type??"evaluator"}] ${y}`)}}return d.jsxs("div",{className:"space-y-6",children:[d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"text-sm font-medium text-gray-400",children:"Overall score"}),d.jsx("div",{className:"flex-1",children:d.jsx(Rm,{score:e.score})})]})}),e.scores&&e.scores.length>0&&d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-400",children:"Grader Scores"}),d.jsx("div",{className:"space-y-3",children:e.scores.map((p,y)=>d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:p.name??p.type??`Score ${y+1}`}),d.jsx("div",{className:"flex-1",children:d.jsx(Rm,{score:p.score})})]},`${p.name??p.type??y}`))})]}),o?d.jsx("div",{className:"space-y-6",children:l.map((p,y)=>{const v=p.name??p.type??`Grader ${y+1}`;return d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:v}),p.assertions.map((x,b)=>d.jsx(e2,{assertion:x},`${x.text}-${b}`))]},`${p.name??p.type??y}`)})}):c.length>0?d.jsx("div",{className:"space-y-2",children:c.map((p,y)=>d.jsx(e2,{assertion:p},`${p.text}-${y}`))}):d.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded."}),i&&f.length>0&&d.jsxs("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-4",children:[d.jsx("h4",{className:"mb-2 text-sm font-medium text-red-400",children:"Failure Reason"}),d.jsx("div",{className:"space-y-2",children:f.map(p=>d.jsx("p",{className:"text-sm text-gray-300",children:p},p))})]})]})}function A5(e,t){if(!t)return!1;for(const r of e)if(r.type==="file"&&r.path===t||r.children&&A5(r.children,t))return!0;return!1}function Xie({result:e,runId:t,projectId:r,onOpenFile:n}){const i=e.testId,{data:l,isLoading:o}=r?Ue(yM(r,t,i)):hM(t,i),c=(l==null?void 0:l.files)??[],f=Rie(c),h=Die(c),{data:p,isLoading:y}=r?Ue(Cx(r,t,i,f??"")):Ax(t,i,f??""),{data:v}=r?Ue(Cx(r,t,i,h??"")):Ax(t,i,h??""),x=S.useMemo(()=>Pie((p==null?void 0:p.content)??""),[p==null?void 0:p.content]);if(o)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4 text-sm text-gray-500",children:"Loading transcript artifacts..."});if(!f)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"No structured transcript"}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["This run does not include canonical ",d.jsx("code",{children:"outputs/transcript.jsonl"}),". Dashboard does not parse ",d.jsx("code",{children:"response.md"})," or markdown transcripts for this view."]})]});if(y)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4 text-sm text-gray-500",children:["Loading ",d.jsx("code",{children:f}),"..."]});if(x.error)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-red-300",children:"Transcript could not be parsed"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:x.error}),d.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:()=>n(f),className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:"Open raw JSONL in Files"}),d.jsx("a",{href:jo({projectId:r,runId:t,evalId:i,filePath:f,raw:!0}),target:"_blank",rel:"noreferrer",className:"rounded-md px-3 py-1.5 text-sm text-cyan-400 transition-colors hover:text-cyan-300 hover:underline",children:"Open raw JSONL"})]})]});if(x.entries.length===0)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Empty transcript"}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:[d.jsx("code",{children:f})," exists but contains no JSONL rows."]})]});const b=h?jo({projectId:r,runId:t,evalId:i,filePath:h,raw:!0}):void 0,w=jo({projectId:r,runId:t,evalId:i,filePath:f,raw:!0}),N=jo({projectId:r,runId:t,evalId:i,filePath:f,download:!0});return d.jsx(Kie,{entries:x.entries,finalAnswer:h?(v==null?void 0:v.content)??e.output:void 0,answerPath:h,transcriptPath:f,answerHref:b,transcriptHref:w,transcriptDownloadHref:N,onOpenFile:n})}function Wie({result:e,runId:t,projectId:r,selectedPath:n,onSelectedPathChange:i}){const l=e.testId,{data:o}=r?Ue(yM(r,t,l)):hM(t,l),c=(o==null?void 0:o.files)??[],[f,h]=S.useState(null),[p,y]=S.useState(!1),v=n??f,x=A5(c,v)?v:c.length>0?O5(c):null,{data:b,isLoading:w}=r?Ue(Cx(r,t,l,x??"")):Ax(t,l,x??"");if(c.length===0)return d.jsx("p",{className:"text-sm text-gray-500",children:"No artifact files available."});const N=x?w?"Loading...":(b==null?void 0:b.content)??"":"",O=x?(b==null?void 0:b.language)??"plaintext":"plaintext";return d.jsxs("div",{className:"relative flex h-full min-h-[400px] gap-4",children:[d.jsx("div",{className:`${p?"block":"hidden"} md:block w-full md:w-auto`,children:d.jsx(Sie,{files:c,selectedPath:x,onSelect:C=>{h(C),i(C),y(!1)}})}),d.jsx("div",{className:`${p?"hidden":"block"} md:block flex-1 h-full`,children:d.jsx(Aie,{value:N,language:O,height:"100%"})}),d.jsx("button",{type:"button",onClick:()=>y(!p),className:"md:hidden fixed bottom-4 right-4 z-50 flex items-center gap-2 rounded-full bg-gray-800 px-4 py-2.5 text-sm font-medium text-gray-200 shadow-lg border border-gray-700 hover:bg-gray-700 active:bg-gray-600 transition-colors","aria-label":p?"Switch to file content viewer":"Switch to file tree",children:p?d.jsxs(d.Fragment,{children:[d.jsx("span",{children:"📄"}),d.jsx("span",{children:"Content"})]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{children:"📁"}),d.jsx("span",{children:"Files"})]})})]})}const C5=Er("/evals/$runId/$evalId")({component:Zie});function Zie(){const{runId:e,evalId:t}=C5.useParams(),{data:r,isLoading:n,error:i}=ld(e),{data:l}=pt(),[o,c]=S.useState(!1),f=(l==null?void 0:l.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",i.message]});const h=r==null?void 0:r.results.find(v=>v.testId===t);if(!h)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:d.jsxs("p",{className:"text-gray-400",children:["Eval ",d.jsx("code",{className:"text-cyan-400",children:t})," not found in run"," ",d.jsx("code",{className:"text-cyan-400",children:e}),"."]})});const p=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8,y=nl(h.score,p)&&h.executionStatus!=="error"&&h.executionStatus!=="failed";return d.jsxs("div",{className:"flex h-full flex-col gap-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",e," / Eval: ",t]}),d.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold text-white",children:[d.jsx("span",{className:`text-2xl font-bold leading-none ${y?"text-emerald-400":"text-red-400"}`,children:y?"✓":"✗"}),t]})]}),!f&&d.jsx("button",{type:"button",onClick:()=>c(!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"})]}),d.jsx(_5,{eval:h,runId:e}),!f&&d.jsx(wl,{open:o,onClose:()=>c(!1),prefill:{testIds:[t],target:h.target}})]})}const T5=Er("/runs/$runId_/suite/$suite")({component:Jie});function Jie(){const{runId:e,suite:t}=T5.useParams(),{data:r,isLoading:n,error:i}=ld(e),{data:l}=pt(),o=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(y=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},y))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",i.message]});const c=((r==null?void 0:r.results)??[]).filter(y=>(y.suite??"Uncategorized")===t),f=c.length,h=Um(c,o),p=c.reduce((y,v)=>y+(v.costUsd??0),0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",e]})]}),d.jsx(tu,{total:f,passed:h.passed,failed:h.failed,passRate:h.passRate,executionErrors:h.executionErrors,totalCost:p>0?p:void 0}),f===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):d.jsx(qw,{results:c,runId:e,passThreshold:o,title:"Suite Evals"})]})}const P5=Er("/runs/$runId_/category/$category")({component:ese});function ese(){const{runId:e,category:t}=P5.useParams(),{data:r,isLoading:n,error:i}=mM(e,t);if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(v=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},v))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",i.message]});const l=(r==null?void 0:r.suites)??[],o=l.reduce((v,x)=>v+x.total,0),c=l.reduce((v,x)=>v+x.passed,0),f=l.reduce((v,x)=>v+x.failed,0),h=l.reduce((v,x)=>v+Yt(x),0),p=o-h,y=p>0?c/p:0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",e]})]}),d.jsx(tu,{total:o,passed:c,failed:f,passRate:y,executionErrors:h}),l.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),d.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:l.map(v=>d.jsxs(Oe,{to:"/runs/$runId/suite/$suite",params:{runId:e,suite:v.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:v.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[v.passed,"/",TM(v)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(Rm,{score:v.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[v.passed," passed"]}),v.failed>0&&d.jsxs("span",{className:"text-red-400",children:[v.failed," failed"]}),Yt(v)>0&&d.jsxs("span",{className:"text-amber-400",children:[Yt(v)," execution errors"]})]})]},v.name))})]})]})}const M5=Er("/projects/$projectId_/runs/$runId")({component:tse});function tse(){var N;const{projectId:e,runId:t}=M5.useParams(),{data:r,isLoading:n,error:i}=ud(e,t),{data:l}=pt(e),{data:o}=zm(e),[c,f]=S.useState(!1),h=(l==null?void 0:l.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(O=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},O))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",i.message]});const p=(N=r==null?void 0:r.results)==null?void 0:N[0],y=p==null?void 0:p.target,v=y?{target:y}:void 0,x=r==null?void 0:r.status,b=x==="starting"||x==="running",w=SM({runId:t,results:(r==null?void 0:r.results)??[],source:r==null?void 0:r.source,sourceLabel:r==null?void 0:r.source_label,remoteRepo:(r==null?void 0:r.source)==="remote"?o==null?void 0:o.repo:void 0,formatTimestamp:O=>new Date(O).toLocaleString()});return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("h1",{className:"min-w-0 truncate text-xl font-semibold text-white sm:text-2xl",title:w.heading,children:w.heading}),w.sourceBadge?d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",children:w.sourceBadge}):null]}),w.meta?d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:w.meta}):null,w.sourceContext.length>0?d.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:w.sourceContext.map(O=>d.jsxs("span",{children:[d.jsxs("span",{className:"text-gray-600",children:[O.label,":"]})," ",O.value]},`${O.label}:${O.value}`))}):null]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!h&&b?d.jsx(zp,{runId:t,status:x,isReadOnly:h,projectId:e}):d.jsx(i5,{results:(r==null?void 0:r.results)??[],runDir:r==null?void 0:r.run_dir,suiteFilter:r==null?void 0:r.suite_filter,target:y??void 0,projectId:e,isReadOnly:h,plannedTestCount:r==null?void 0:r.planned_test_count,runStatus:x}),x&&d.jsx($p,{status:x}),!h&&!b&&d.jsx("button",{type:"button",onClick:()=>f(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run evals"})]})]}),d.jsx(h5,{results:(r==null?void 0:r.results)??[],runId:t,projectId:e}),!h&&d.jsx(wl,{open:c,onClose:()=>f(!1),projectId:e,prefill:v})]})}const R5=Er("/projects/$projectId_/jobs/$runId")({component:rse});function rse(){const{projectId:e,runId:t}=R5.useParams(),{data:r,isLoading:n,error:i}=Xb(t,e),{data:l}=pt(e),o=(l==null?void 0:l.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(sx,{projectId:e}),d.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-gray-900"})]});if(i||!r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(sx,{projectId:e}),d.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-400",children:i?`Failed to load run: ${i.message}`:"Run not found."})]});const c=r.status==="finished"||r.status==="failed";return d.jsxs("div",{className:"space-y-4",children:[d.jsx(sx,{projectId:e}),d.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("h1",{className:"truncate font-mono text-base font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["Started ",new Date(r.started_at).toLocaleString(),r.finished_at&&d.jsxs(d.Fragment,{children:[" · ","Finished ",new Date(r.finished_at).toLocaleString()," · ",Math.round((new Date(r.finished_at).getTime()-new Date(r.started_at).getTime())/1e3),"s"]})]})]}),d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-3",children:[d.jsx(zp,{runId:t,status:r.status,isReadOnly:o,projectId:e}),d.jsx($p,{status:r.status})]})]}),d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 px-4 py-3",children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Command"}),d.jsx("code",{className:"break-all text-xs text-cyan-300",children:r.command})]}),r.stdout?d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Output"}),d.jsx("div",{className:"max-h-[60vh] overflow-y-auto rounded-lg border border-gray-700 bg-gray-950 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-gray-200",children:r.stdout})})]}):!c&&d.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[d.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-gray-500 border-t-transparent"}),"Waiting for output…"]}),r.stderr&&d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-red-500",children:"Stderr"}),d.jsx("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-red-900/40 bg-red-950/20 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-red-300",children:r.stderr})})]}),c&&d.jsxs("p",{className:"text-xs text-gray-500",children:["Exit code:"," ",d.jsx("span",{className:r.exit_code===0?"text-emerald-400":"text-red-400",children:r.exit_code})]})]})}function sx({projectId:e}){return d.jsx(Oe,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const D5=Er("/projects/$projectId_/experiments/$experimentName")({component:nse});function nse(){const{projectId:e,experimentName:t}=D5.useParams();return d.jsx(v5,{experimentName:t,projectId:e})}const k5=Er("/projects/$projectId_/evals/$runId/$evalId")({component:ase});function ase(){const{projectId:e,runId:t,evalId:r}=k5.useParams(),{data:n,isLoading:i,error:l}=ud(e,t),{data:o}=pt(e),[c,f]=S.useState(!1),h=(o==null?void 0:o.read_only)===!0;if(i)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(l)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",l.message]});const p=n==null?void 0:n.results.find(x=>x.testId===r);if(!p)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:d.jsxs("p",{className:"text-gray-400",children:["Eval ",d.jsx("code",{className:"text-cyan-400",children:r})," not found in run"," ",d.jsx("code",{className:"text-cyan-400",children:t}),"."]})});const y=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8,v=nl(p.score,y)&&p.executionStatus!=="error"&&p.executionStatus!=="failed";return d.jsxs("div",{className:"flex h-full flex-col gap-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",t," / Eval: ",r]}),d.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold text-white",children:[d.jsx("span",{className:`text-2xl font-bold leading-none ${v?"text-emerald-400":"text-red-400"}`,children:v?"✓":"✗"}),r]})]}),!h&&d.jsx("button",{type:"button",onClick:()=>f(!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"})]}),d.jsx(_5,{eval:p,runId:t,projectId:e}),!h&&d.jsx(wl,{open:c,onClose:()=>f(!1),projectId:e,prefill:{testIds:[r],target:p.target}})]})}const I5=Er("/projects/$projectId_/runs/$runId_/suite/$suite")({component:ise});function ise(){const{projectId:e,runId:t,suite:r}=I5.useParams(),{data:n,isLoading:i,error:l}=ud(e,t),{data:o}=pt(e),c=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8;if(i)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(v=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},v))})]});if(l)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",l.message]});const f=((n==null?void 0:n.results)??[]).filter(v=>(v.suite??"Uncategorized")===r),h=f.length,p=Um(f,c),y=f.reduce((v,x)=>v+(x.costUsd??0),0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",t]})]}),d.jsx(tu,{total:h,passed:p.passed,failed:p.failed,passRate:p.passRate,executionErrors:p.executionErrors,totalCost:y>0?y:void 0}),h===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):d.jsx(qw,{results:f,runId:t,projectId:e,passThreshold:c,title:"Suite Evals"})]})}const L5=Er("/projects/$projectId_/runs/$runId_/category/$category")({component:sse});function sse(){const{projectId:e,runId:t,category:r}=L5.useParams(),{data:n,isLoading:i,error:l}=Ue(pM(e,t,r));if(i)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(x=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},x))})]});if(l)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",l.message]});const o=(n==null?void 0:n.suites)??[],c=o.reduce((x,b)=>x+b.total,0),f=o.reduce((x,b)=>x+b.passed,0),h=o.reduce((x,b)=>x+b.failed,0),p=o.reduce((x,b)=>x+Yt(b),0),y=c-p,v=y>0?f/y:0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",t]})]}),d.jsx(tu,{total:c,passed:f,failed:h,passRate:v,executionErrors:p}),o.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),d.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:o.map(x=>d.jsxs(Oe,{to:"/projects/$projectId/runs/$runId/suite/$suite",params:{projectId:e,runId:t,suite:x.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"truncate text-sm font-medium text-gray-200",children:x.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[x.passed,"/",TM(x)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(Rm,{score:x.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[x.passed," passed"]}),x.failed>0&&d.jsxs("span",{className:"text-red-400",children:[x.failed," failed"]}),Yt(x)>0&&d.jsxs("span",{className:"text-amber-400",children:[Yt(x)," execution errors"]})]})]},x.name))})]})]})}const lse=v6.update({id:"/settings",path:"/settings",getParentRoute:()=>yr}),ose=Cae.update({id:"/",path:"/",getParentRoute:()=>yr}),use=m5.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>yr}),cse=p5.update({id:"/projects/$projectId",path:"/projects/$projectId",getParentRoute:()=>yr}),dse=y5.update({id:"/jobs/$runId",path:"/jobs/$runId",getParentRoute:()=>yr}),fse=g5.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>yr}),hse=C5.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>yr}),mse=T5.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>yr}),pse=P5.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>yr}),yse=M5.update({id:"/projects/$projectId_/runs/$runId",path:"/projects/$projectId/runs/$runId",getParentRoute:()=>yr}),vse=R5.update({id:"/projects/$projectId_/jobs/$runId",path:"/projects/$projectId/jobs/$runId",getParentRoute:()=>yr}),gse=D5.update({id:"/projects/$projectId_/experiments/$experimentName",path:"/projects/$projectId/experiments/$experimentName",getParentRoute:()=>yr}),xse=k5.update({id:"/projects/$projectId_/evals/$runId/$evalId",path:"/projects/$projectId/evals/$runId/$evalId",getParentRoute:()=>yr}),bse=I5.update({id:"/projects/$projectId_/runs/$runId_/suite/$suite",path:"/projects/$projectId/runs/$runId/suite/$suite",getParentRoute:()=>yr}),jse=L5.update({id:"/projects/$projectId_/runs/$runId_/category/$category",path:"/projects/$projectId/runs/$runId/category/$category",getParentRoute:()=>yr}),wse={IndexRoute:ose,SettingsRoute:lse,ExperimentsExperimentNameRoute:fse,JobsRunIdRoute:dse,ProjectsProjectIdRoute:cse,RunsRunIdRoute:use,EvalsRunIdEvalIdRoute:hse,ProjectsProjectIdExperimentsExperimentNameRoute:gse,ProjectsProjectIdJobsRunIdRoute:vse,ProjectsProjectIdRunsRunIdRoute:yse,RunsRunIdCategoryCategoryRoute:pse,RunsRunIdSuiteSuiteRoute:mse,ProjectsProjectIdEvalsRunIdEvalIdRoute:xse,ProjectsProjectIdRunsRunIdCategoryCategoryRoute:jse,ProjectsProjectIdRunsRunIdSuiteSuiteRoute:bse},Sse=yr._addFileChildren(wse)._addFileTypes(),Nse=new q$({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),Ose=F8({routeTree:Sse}),$5=document.getElementById("root");if(!$5)throw new Error("Root element not found");y$.createRoot($5).render(d.jsx(S.StrictMode,{children:d.jsx(H$,{client:Nse,children:d.jsx(Y8,{router:Ose})})}));export{Bo as W,S as r};
|