@nick3/copilot-api 1.5.9 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -30
- package/README.zh-CN.md +953 -0
- package/dist/{account-CbYMFuS4.js → account-B2tSWtVS.js} +2 -2
- package/dist/{account-CbYMFuS4.js.map → account-B2tSWtVS.js.map} +1 -1
- package/dist/{accounts-manager-BKG9aZEL.js → accounts-manager-CAyZJSn8.js} +144 -111
- package/dist/accounts-manager-CAyZJSn8.js.map +1 -0
- package/dist/admin/assets/index-BESw8Vvd.css +1 -0
- package/dist/admin/assets/index-Ddo9RHg-.js +101 -0
- package/dist/admin/index.html +2 -2
- package/dist/{auth-Ckj1wD43.js → auth-BXCeDjRG.js} +3 -3
- package/dist/{auth-Ckj1wD43.js.map → auth-BXCeDjRG.js.map} +1 -1
- package/dist/{check-usage-bIbj_1Q_.js → check-usage-CQxXYfUx.js} +3 -3
- package/dist/{check-usage-bIbj_1Q_.js.map → check-usage-CQxXYfUx.js.map} +1 -1
- package/dist/{get-copilot-token-MAZsr5Vu.js → get-copilot-token-p17sJyPU.js} +2 -2
- package/dist/{get-copilot-token-MAZsr5Vu.js.map → get-copilot-token-p17sJyPU.js.map} +1 -1
- package/dist/main.js +3 -3
- package/dist/{poll-access-token-DiwBJNtK.js → poll-access-token-Bc6VwWab.js} +49 -9
- package/dist/poll-access-token-Bc6VwWab.js.map +1 -0
- package/dist/{server-DAxpfPde.js → server-CFijvv3C.js} +106 -54
- package/dist/server-CFijvv3C.js.map +1 -0
- package/dist/{start-8dkfsQqd.js → start-DQlnH71A.js} +6 -6
- package/dist/{start-8dkfsQqd.js.map → start-DQlnH71A.js.map} +1 -1
- package/package.json +1 -1
- package/dist/accounts-manager-BKG9aZEL.js.map +0 -1
- package/dist/admin/assets/index-BFN8rXmt.css +0 -1
- package/dist/admin/assets/index-HnEqzcKv.js +0 -101
- package/dist/poll-access-token-DiwBJNtK.js.map +0 -1
- package/dist/server-DAxpfPde.js.map +0 -1
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
function zF(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[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"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function va(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o0={exports:{}},mf={};var hP;function BF(){if(hP)return mf;hP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return mf.Fragment=t,mf.jsx=n,mf.jsxs=n,mf}var mP;function $F(){return mP||(mP=1,o0.exports=BF()),o0.exports}var g=$F(),s0={exports:{}},Ie={};var pP;function UF(){if(pP)return Ie;pP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),y=Symbol.iterator;function b(k){return k===null||typeof k!="object"?null:(k=y&&k[y]||k["@@iterator"],typeof k=="function"?k:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,E={};function C(k,I,q){this.props=k,this.context=I,this.refs=E,this.updater=q||w}C.prototype.isReactComponent={},C.prototype.setState=function(k,I){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,I,"setState")},C.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function j(){}j.prototype=C.prototype;function T(k,I,q){this.props=k,this.context=I,this.refs=E,this.updater=q||w}var O=T.prototype=new j;O.constructor=T,A(O,C.prototype),O.isPureReactComponent=!0;var N=Array.isArray;function _(){}var M={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function B(k,I,q){var ne=q.ref;return{$$typeof:e,type:k,key:I,ref:ne!==void 0?ne:null,props:q}}function V(k,I){return B(k.type,I,k.props)}function H(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function z(k){var I={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(q){return I[q]})}var W=/\/+/g;function Q(k,I){return typeof k=="object"&&k!==null&&k.key!=null?z(""+k.key):I.toString(36)}function se(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(_,_):(k.status="pending",k.then(function(I){k.status==="pending"&&(k.status="fulfilled",k.value=I)},function(I){k.status==="pending"&&(k.status="rejected",k.reason=I)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function L(k,I,q,ne,de){var pe=typeof k;(pe==="undefined"||pe==="boolean")&&(k=null);var X=!1;if(k===null)X=!0;else switch(pe){case"bigint":case"string":case"number":X=!0;break;case"object":switch(k.$$typeof){case e:case t:X=!0;break;case m:return X=k._init,L(X(k._payload),I,q,ne,de)}}if(X)return de=de(k),X=ne===""?"."+Q(k,0):ne,N(de)?(q="",X!=null&&(q=X.replace(W,"$&/")+"/"),L(de,I,q,"",function(le){return le})):de!=null&&(H(de)&&(de=V(de,q+(de.key==null||k&&k.key===de.key?"":(""+de.key).replace(W,"$&/")+"/")+X)),I.push(de)),1;X=0;var he=ne===""?".":ne+":";if(N(k))for(var oe=0;oe<k.length;oe++)ne=k[oe],pe=he+Q(ne,oe),X+=L(ne,I,q,pe,de);else if(oe=b(k),typeof oe=="function")for(k=oe.call(k),oe=0;!(ne=k.next()).done;)ne=ne.value,pe=he+Q(ne,oe++),X+=L(ne,I,q,pe,de);else if(pe==="object"){if(typeof k.then=="function")return L(se(k),I,q,ne,de);throw I=String(k),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return X}function F(k,I,q){if(k==null)return k;var ne=[],de=0;return L(k,ne,"","",function(pe){return I.call(q,pe,de++)}),ne}function $(k){if(k._status===-1){var I=k._result;I=I(),I.then(function(q){(k._status===0||k._status===-1)&&(k._status=1,k._result=q)},function(q){(k._status===0||k._status===-1)&&(k._status=2,k._result=q)}),k._status===-1&&(k._status=0,k._result=I)}if(k._status===1)return k._result.default;throw k._result}var ae=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},G={map:F,forEach:function(k,I,q){F(k,function(){I.apply(this,arguments)},q)},count:function(k){var I=0;return F(k,function(){I++}),I},toArray:function(k){return F(k,function(I){return I})||[]},only:function(k){if(!H(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Ie.Activity=h,Ie.Children=G,Ie.Component=C,Ie.Fragment=n,Ie.Profiler=i,Ie.PureComponent=T,Ie.StrictMode=r,Ie.Suspense=c,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(k){return M.H.useMemoCache(k)}},Ie.cache=function(k){return function(){return k.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(k,I,q){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var ne=A({},k.props),de=k.key;if(I!=null)for(pe in I.key!==void 0&&(de=""+I.key),I)!R.call(I,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&I.ref===void 0||(ne[pe]=I[pe]);var pe=arguments.length-2;if(pe===1)ne.children=q;else if(1<pe){for(var X=Array(pe),he=0;he<pe;he++)X[he]=arguments[he+2];ne.children=X}return B(k.type,de,ne)},Ie.createContext=function(k){return k={$$typeof:l,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:o,_context:k},k},Ie.createElement=function(k,I,q){var ne,de={},pe=null;if(I!=null)for(ne in I.key!==void 0&&(pe=""+I.key),I)R.call(I,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(de[ne]=I[ne]);var X=arguments.length-2;if(X===1)de.children=q;else if(1<X){for(var he=Array(X),oe=0;oe<X;oe++)he[oe]=arguments[oe+2];de.children=he}if(k&&k.defaultProps)for(ne in X=k.defaultProps,X)de[ne]===void 0&&(de[ne]=X[ne]);return B(k,pe,de)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(k){return{$$typeof:u,render:k}},Ie.isValidElement=H,Ie.lazy=function(k){return{$$typeof:m,_payload:{_status:-1,_result:k},_init:$}},Ie.memo=function(k,I){return{$$typeof:d,type:k,compare:I===void 0?null:I}},Ie.startTransition=function(k){var I=M.T,q={};M.T=q;try{var ne=k(),de=M.S;de!==null&&de(q,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(_,ae)}catch(pe){ae(pe)}finally{I!==null&&q.types!==null&&(I.types=q.types),M.T=I}},Ie.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Ie.use=function(k){return M.H.use(k)},Ie.useActionState=function(k,I,q){return M.H.useActionState(k,I,q)},Ie.useCallback=function(k,I){return M.H.useCallback(k,I)},Ie.useContext=function(k){return M.H.useContext(k)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(k,I){return M.H.useDeferredValue(k,I)},Ie.useEffect=function(k,I){return M.H.useEffect(k,I)},Ie.useEffectEvent=function(k){return M.H.useEffectEvent(k)},Ie.useId=function(){return M.H.useId()},Ie.useImperativeHandle=function(k,I,q){return M.H.useImperativeHandle(k,I,q)},Ie.useInsertionEffect=function(k,I){return M.H.useInsertionEffect(k,I)},Ie.useLayoutEffect=function(k,I){return M.H.useLayoutEffect(k,I)},Ie.useMemo=function(k,I){return M.H.useMemo(k,I)},Ie.useOptimistic=function(k,I){return M.H.useOptimistic(k,I)},Ie.useReducer=function(k,I,q){return M.H.useReducer(k,I,q)},Ie.useRef=function(k){return M.H.useRef(k)},Ie.useState=function(k){return M.H.useState(k)},Ie.useSyncExternalStore=function(k,I,q){return M.H.useSyncExternalStore(k,I,q)},Ie.useTransition=function(){return M.H.useTransition()},Ie.version="19.2.3",Ie}var gP;function tc(){return gP||(gP=1,s0.exports=UF()),s0.exports}var v=tc();const ge=va(v),Mg=zF({__proto__:null,default:ge},[v]);var l0={exports:{}},pf={},u0={exports:{}},c0={};var vP;function VF(){return vP||(vP=1,(function(e){function t(L,F){var $=L.length;L.push(F);e:for(;0<$;){var ae=$-1>>>1,G=L[ae];if(0<i(G,F))L[ae]=F,L[$]=G,$=ae;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var F=L[0],$=L.pop();if($!==F){L[0]=$;e:for(var ae=0,G=L.length,k=G>>>1;ae<k;){var I=2*(ae+1)-1,q=L[I],ne=I+1,de=L[ne];if(0>i(q,$))ne<G&&0>i(de,q)?(L[ae]=de,L[ne]=$,ae=ne):(L[ae]=q,L[I]=$,ae=I);else if(ne<G&&0>i(de,$))L[ae]=de,L[ne]=$,ae=ne;else break e}}return F}function i(L,F){var $=L.sortIndex-F.sortIndex;return $!==0?$:L.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var c=[],d=[],m=1,h=null,y=3,b=!1,w=!1,A=!1,E=!1,C=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function O(L){for(var F=n(d);F!==null;){if(F.callback===null)r(d);else if(F.startTime<=L)r(d),F.sortIndex=F.expirationTime,t(c,F);else break;F=n(d)}}function N(L){if(A=!1,O(L),!w)if(n(c)!==null)w=!0,_||(_=!0,z());else{var F=n(d);F!==null&&se(N,F.startTime-L)}}var _=!1,M=-1,R=5,B=-1;function V(){return E?!0:!(e.unstable_now()-B<R)}function H(){if(E=!1,_){var L=e.unstable_now();B=L;var F=!0;try{e:{w=!1,A&&(A=!1,j(M),M=-1),b=!0;var $=y;try{t:{for(O(L),h=n(c);h!==null&&!(h.expirationTime>L&&V());){var ae=h.callback;if(typeof ae=="function"){h.callback=null,y=h.priorityLevel;var G=ae(h.expirationTime<=L);if(L=e.unstable_now(),typeof G=="function"){h.callback=G,O(L),F=!0;break t}h===n(c)&&r(c),O(L)}else r(c);h=n(c)}if(h!==null)F=!0;else{var k=n(d);k!==null&&se(N,k.startTime-L),F=!1}}break e}finally{h=null,y=$,b=!1}F=void 0}}finally{F?z():_=!1}}}var z;if(typeof T=="function")z=function(){T(H)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Q=W.port2;W.port1.onmessage=H,z=function(){Q.postMessage(null)}}else z=function(){C(H,0)};function se(L,F){M=C(function(){L(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(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(L){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var $=y;y=F;try{return L()}finally{y=$}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(L,F){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var $=y;y=L;try{return F()}finally{y=$}},e.unstable_scheduleCallback=function(L,F,$){var ae=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?ae+$:ae):$=ae,L){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=$+G,L={id:m++,callback:F,priorityLevel:L,startTime:$,expirationTime:G,sortIndex:-1},$>ae?(L.sortIndex=$,t(d,L),n(c)===null&&L===n(d)&&(A?(j(M),M=-1):A=!0,se(N,$-ae))):(L.sortIndex=G,t(c,L),w||b||(w=!0,_||(_=!0,z()))),L},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(L){var F=y;return function(){var $=y;y=F;try{return L.apply(this,arguments)}finally{y=$}}}})(c0)),c0}var yP;function FF(){return yP||(yP=1,u0.exports=VF()),u0.exports}var f0={exports:{}},Hn={};var bP;function HF(){if(bP)return Hn;bP=1;var e=tc();function t(c){var d="https://react.dev/errors/"+c;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+c+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(c,d,m){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:h==null?null:""+h,children:c,containerInfo:d,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,d){if(c==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Hn.createPortal=function(c,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return o(c,d,null,m)},Hn.flushSync=function(c){var d=l.T,m=r.p;try{if(l.T=null,r.p=2,c)return c()}finally{l.T=d,r.p=m,r.d.f()}},Hn.preconnect=function(c,d){typeof c=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(c,d))},Hn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},Hn.preinit=function(c,d){if(typeof c=="string"&&d&&typeof d.as=="string"){var m=d.as,h=u(m,d.crossOrigin),y=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?r.d.S(c,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:y,fetchPriority:b}):m==="script"&&r.d.X(c,{crossOrigin:h,integrity:y,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Hn.preinitModule=function(c,d){if(typeof c=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=u(d.as,d.crossOrigin);r.d.M(c,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(c)},Hn.preload=function(c,d){if(typeof c=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,h=u(m,d.crossOrigin);r.d.L(c,m,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Hn.preloadModule=function(c,d){if(typeof c=="string")if(d){var m=u(d.as,d.crossOrigin);r.d.m(c,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(c)},Hn.requestFormReset=function(c){r.d.r(c)},Hn.unstable_batchedUpdates=function(c,d){return c(d)},Hn.useFormState=function(c,d,m){return l.H.useFormState(c,d,m)},Hn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Hn.version="19.2.3",Hn}var xP;function dL(){if(xP)return f0.exports;xP=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(),f0.exports=HF(),f0.exports}var wP;function qF(){if(wP)return pf;wP=1;var e=FF(),t=tc(),n=dL();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)s+="&args[]="+encodeURIComponent(arguments[f])}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 o(a){var s=a,f=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(f=s.return),a=s.return;while(a)}return s.tag===3?f:null}function l(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 u(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 c(a){if(o(a)!==a)throw Error(r(188))}function d(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(r(188));return s!==a?null:a}for(var f=a,p=s;;){var x=f.return;if(x===null)break;var S=x.alternate;if(S===null){if(p=x.return,p!==null){f=p;continue}break}if(x.child===S.child){for(S=x.child;S;){if(S===f)return c(x),a;if(S===p)return c(x),s;S=S.sibling}throw Error(r(188))}if(f.return!==p.return)f=x,p=S;else{for(var P=!1,D=x.child;D;){if(D===f){P=!0,f=x,p=S;break}if(D===p){P=!0,p=x,f=S;break}D=D.sibling}if(!P){for(D=S.child;D;){if(D===f){P=!0,f=S,p=x;break}if(D===p){P=!0,p=S,f=x;break}D=D.sibling}if(!P)throw Error(r(189))}}if(f.alternate!==p)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?a:s}function m(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=m(a),s!==null)return s;a=a.sibling}return null}var h=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),V=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function z(a){return a===null||typeof a!="object"?null:(a=H&&a[H]||a["@@iterator"],typeof a=="function"?a:null)}var W=Symbol.for("react.client.reference");function Q(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===W?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case A:return"Fragment";case C:return"Profiler";case E:return"StrictMode";case N:return"Suspense";case _:return"SuspenseList";case B:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case w:return"Portal";case T:return a.displayName||"Context";case j:return(a._context.displayName||"Context")+".Consumer";case O:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case M:return s=a.displayName||null,s!==null?s:Q(a.type)||"Memo";case R:s=a._payload,a=a._init;try{return Q(a(s))}catch{}}return null}var se=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},ae=[],G=-1;function k(a){return{current:a}}function I(a){0>G||(a.current=ae[G],ae[G]=null,G--)}function q(a,s){G++,ae[G]=a.current,a.current=s}var ne=k(null),de=k(null),pe=k(null),X=k(null);function he(a,s){switch(q(pe,s),q(de,a),q(ne,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?LO(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=LO(s),a=IO(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}I(ne),q(ne,a)}function oe(){I(ne),I(de),I(pe)}function le(a){a.memoizedState!==null&&q(X,a);var s=ne.current,f=IO(s,a.type);s!==f&&(q(de,a),q(ne,f))}function ve(a){de.current===a&&(I(ne),I(de)),X.current===a&&(I(X),cf._currentValue=$)}var re,Be;function Pe(a){if(re===void 0)try{throw Error()}catch(f){var s=f.stack.trim().match(/\n( *(at )?)/);re=s&&s[1]||"",Be=-1<f.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+re+a+Be}var Fe=!1;function De(a,s){if(!a||Fe)return"";Fe=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(s){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(ie){var te=ie}Reflect.construct(a,[],fe)}else{try{fe.call()}catch(ie){te=ie}a.call(fe.prototype)}}else{try{throw Error()}catch(ie){te=ie}(fe=a())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(ie){if(ie&&te&&typeof ie.stack=="string")return[ie.stack,te.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=p.DetermineComponentFrameRoot(),P=S[0],D=S[1];if(P&&D){var U=P.split(`
|
|
4
|
-
`),J=D.split(`
|
|
5
|
-
`);for(x=p=0;p<U.length&&!U[p].includes("DetermineComponentFrameRoot");)p++;for(;x<J.length&&!J[x].includes("DetermineComponentFrameRoot");)x++;if(p===U.length||x===J.length)for(p=U.length-1,x=J.length-1;1<=p&&0<=x&&U[p]!==J[x];)x--;for(;1<=p&&0<=x;p--,x--)if(U[p]!==J[x]){if(p!==1||x!==1)do if(p--,x--,0>x||U[p]!==J[x]){var ue=`
|
|
6
|
-
`+U[p].replace(" at new "," at ");return a.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",a.displayName)),ue}while(1<=p&&0<=x);break}}}finally{Fe=!1,Error.prepareStackTrace=f}return(f=a?a.displayName||a.name:"")?Pe(f):""}function Rt(a,s){switch(a.tag){case 26:case 27:case 5:return Pe(a.type);case 16:return Pe("Lazy");case 13:return a.child!==s&&s!==null?Pe("Suspense Fallback"):Pe("Suspense");case 19:return Pe("SuspenseList");case 0:case 15:return De(a.type,!1);case 11:return De(a.type.render,!1);case 1:return De(a.type,!0);case 31:return Pe("Activity");default:return""}}function qr(a){try{var s="",f=null;do s+=Rt(a,f),f=a,a=a.return;while(a);return s}catch(p){return`
|
|
7
|
-
Error generating stack: `+p.message+`
|
|
8
|
-
`+p.stack}}var En=Object.prototype.hasOwnProperty,Bi=e.unstable_scheduleCallback,xa=e.unstable_cancelCallback,Gt=e.unstable_shouldYield,Kr=e.unstable_requestPaint,Yt=e.unstable_now,gs=e.unstable_getCurrentPriorityLevel,gi=e.unstable_ImmediatePriority,bo=e.unstable_UserBlockingPriority,vi=e.unstable_NormalPriority,wa=e.unstable_LowPriority,Er=e.unstable_IdlePriority,Sa=e.log,Xn=e.unstable_setDisableYieldValue,lr=null,Wt=null;function Zn(a){if(typeof Sa=="function"&&Xn(a),Wt&&typeof Wt.setStrictMode=="function")try{Wt.setStrictMode(lr,a)}catch{}}var Xt=Math.clz32?Math.clz32:ur,vs=Math.log,Aa=Math.LN2;function ur(a){return a>>>=0,a===0?32:31-(vs(a)/Aa|0)|0}var $i=256,Ui=262144,yi=4194304;function cr(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 we(a,s,f){var p=a.pendingLanes;if(p===0)return 0;var x=0,S=a.suspendedLanes,P=a.pingedLanes;a=a.warmLanes;var D=p&134217727;return D!==0?(p=D&~S,p!==0?x=cr(p):(P&=D,P!==0?x=cr(P):f||(f=D&~a,f!==0&&(x=cr(f))))):(D=p&~S,D!==0?x=cr(D):P!==0?x=cr(P):f||(f=p&~a,f!==0&&(x=cr(f)))),x===0?0:s!==0&&s!==x&&(s&S)===0&&(S=x&-x,f=s&-s,S>=f||S===32&&(f&4194048)!==0)?s:x}function st(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function lt(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 bt(){var a=yi;return yi<<=1,(yi&62914560)===0&&(yi=4194304),a}function Cr(a){for(var s=[],f=0;31>f;f++)s.push(a);return s}function ze(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Ft(a,s,f,p,x,S){var P=a.pendingLanes;a.pendingLanes=f,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=f,a.entangledLanes&=f,a.errorRecoveryDisabledLanes&=f,a.shellSuspendCounter=0;var D=a.entanglements,U=a.expirationTimes,J=a.hiddenUpdates;for(f=P&~f;0<f;){var ue=31-Xt(f),fe=1<<ue;D[ue]=0,U[ue]=-1;var te=J[ue];if(te!==null)for(J[ue]=null,ue=0;ue<te.length;ue++){var ie=te[ue];ie!==null&&(ie.lane&=-536870913)}f&=~fe}p!==0&&Ea(a,p,0),S!==0&&x===0&&a.tag!==0&&(a.suspendedLanes|=S&~(P&~s))}function Ea(a,s,f){a.pendingLanes|=s,a.suspendedLanes&=~s;var p=31-Xt(s);a.entangledLanes|=s,a.entanglements[p]=a.entanglements[p]|1073741824|f&261930}function Cn(a,s){var f=a.entangledLanes|=s;for(a=a.entanglements;f;){var p=31-Xt(f),x=1<<p;x&s|a[p]&s&&(a[p]|=s),f&=~x}}function Vn(a,s){var f=s&-s;return f=(f&42)!==0?1:xo(f),(f&(a.suspendedLanes|s))!==0?0:f}function xo(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 jr(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Sc(){var a=F.p;return a!==0?a:(a=window.event,a===void 0?32:oP(a.type))}function th(a,s){var f=F.p;try{return F.p=a,s()}finally{F.p=f}}var Vi=Math.random().toString(36).slice(2),ln="__reactFiber$"+Vi,Fn="__reactProps$"+Vi,wo="__reactContainer$"+Vi,Ac="__reactEvents$"+Vi,Zv="__reactListeners$"+Vi,Qv="__reactHandles$"+Vi,nh="__reactResources$"+Vi,ys="__reactMarker$"+Vi;function Ec(a){delete a[ln],delete a[Fn],delete a[Ac],delete a[Zv],delete a[Qv]}function So(a){var s=a[ln];if(s)return s;for(var f=a.parentNode;f;){if(s=f[wo]||f[ln]){if(f=s.alternate,s.child!==null||f!==null&&f.child!==null)for(a=HO(a);a!==null;){if(f=a[ln])return f;a=HO(a)}return s}a=f,f=a.parentNode}return null}function Ao(a){if(a=a[ln]||a[wo]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function Ce(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function _e(a){var s=a[nh];return s||(s=a[nh]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Je(a){a[ys]=!0}var rh=new Set,Cc={};function Ca(a,s){ja(a,s),ja(a+"Capture",s)}function ja(a,s){for(Cc[a]=s,a=0;a<s.length;a++)rh.add(s[a])}var PV=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),jC={},TC={};function NV(a){return En.call(TC,a)?!0:En.call(jC,a)?!1:PV.test(a)?TC[a]=!0:(jC[a]=!0,!1)}function ih(a,s,f){if(NV(s))if(f===null)a.removeAttribute(s);else{switch(typeof f){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+f)}}function ah(a,s,f){if(f===null)a.removeAttribute(s);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+f)}}function Ta(a,s,f,p){if(p===null)a.removeAttribute(f);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(f);return}a.setAttributeNS(s,f,""+p)}}function Gr(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function OC(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function _V(a,s,f){var p=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var x=p.get,S=p.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return x.call(this)},set:function(P){f=""+P,S.call(this,P)}}),Object.defineProperty(a,s,{enumerable:p.enumerable}),{getValue:function(){return f},setValue:function(P){f=""+P},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Jv(a){if(!a._valueTracker){var s=OC(a)?"checked":"value";a._valueTracker=_V(a,s,""+a[s])}}function PC(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var f=s.getValue(),p="";return a&&(p=OC(a)?a.checked?"true":"false":a.value),a=p,a!==f?(s.setValue(a),!0):!1}function oh(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 MV=/[\n"\\]/g;function Yr(a){return a.replace(MV,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function ey(a,s,f,p,x,S,P,D){a.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.type=P:a.removeAttribute("type"),s!=null?P==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+Gr(s)):a.value!==""+Gr(s)&&(a.value=""+Gr(s)):P!=="submit"&&P!=="reset"||a.removeAttribute("value"),s!=null?ty(a,P,Gr(s)):f!=null?ty(a,P,Gr(f)):p!=null&&a.removeAttribute("value"),x==null&&S!=null&&(a.defaultChecked=!!S),x!=null&&(a.checked=x&&typeof x!="function"&&typeof x!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?a.name=""+Gr(D):a.removeAttribute("name")}function NC(a,s,f,p,x,S,P,D){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(a.type=S),s!=null||f!=null){if(!(S!=="submit"&&S!=="reset"||s!=null)){Jv(a);return}f=f!=null?""+Gr(f):"",s=s!=null?""+Gr(s):f,D||s===a.value||(a.value=s),a.defaultValue=s}p=p??x,p=typeof p!="function"&&typeof p!="symbol"&&!!p,a.checked=D?a.checked:!!p,a.defaultChecked=!!p,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(a.name=P),Jv(a)}function ty(a,s,f){s==="number"&&oh(a.ownerDocument)===a||a.defaultValue===""+f||(a.defaultValue=""+f)}function _l(a,s,f,p){if(a=a.options,s){s={};for(var x=0;x<f.length;x++)s["$"+f[x]]=!0;for(f=0;f<a.length;f++)x=s.hasOwnProperty("$"+a[f].value),a[f].selected!==x&&(a[f].selected=x),x&&p&&(a[f].defaultSelected=!0)}else{for(f=""+Gr(f),s=null,x=0;x<a.length;x++){if(a[x].value===f){a[x].selected=!0,p&&(a[x].defaultSelected=!0);return}s!==null||a[x].disabled||(s=a[x])}s!==null&&(s.selected=!0)}}function _C(a,s,f){if(s!=null&&(s=""+Gr(s),s!==a.value&&(a.value=s),f==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=f!=null?""+Gr(f):""}function MC(a,s,f,p){if(s==null){if(p!=null){if(f!=null)throw Error(r(92));if(se(p)){if(1<p.length)throw Error(r(93));p=p[0]}f=p}f==null&&(f=""),s=f}f=Gr(s),a.defaultValue=f,p=a.textContent,p===f&&p!==""&&p!==null&&(a.value=p),Jv(a)}function Ml(a,s){if(s){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=s;return}}a.textContent=s}var RV=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 RC(a,s,f){var p=s.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?p?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":p?a.setProperty(s,f):typeof f!="number"||f===0||RV.has(s)?s==="float"?a.cssFloat=f:a[s]=(""+f).trim():a[s]=f+"px"}function DC(a,s,f){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,f!=null){for(var p in f)!f.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?a.setProperty(p,""):p==="float"?a.cssFloat="":a[p]="");for(var x in s)p=s[x],s.hasOwnProperty(x)&&f[x]!==p&&RC(a,x,p)}else for(var S in s)s.hasOwnProperty(S)&&RC(a,S,s[S])}function ny(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 DV=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"]]),kV=/^[\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 sh(a){return kV.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Oa(){}var ry=null;function iy(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Rl=null,Dl=null;function kC(a){var s=Ao(a);if(s&&(a=s.stateNode)){var f=a[Fn]||null;e:switch(a=s.stateNode,s.type){case"input":if(ey(a,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),s=f.name,f.type==="radio"&&s!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+Yr(""+s)+'"][type="radio"]'),s=0;s<f.length;s++){var p=f[s];if(p!==a&&p.form===a.form){var x=p[Fn]||null;if(!x)throw Error(r(90));ey(p,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(s=0;s<f.length;s++)p=f[s],p.form===a.form&&PC(p)}break e;case"textarea":_C(a,f.value,f.defaultValue);break e;case"select":s=f.value,s!=null&&_l(a,!!f.multiple,s,!1)}}}var ay=!1;function LC(a,s,f){if(ay)return a(s,f);ay=!0;try{var p=a(s);return p}finally{if(ay=!1,(Rl!==null||Dl!==null)&&(Yh(),Rl&&(s=Rl,a=Dl,Dl=Rl=null,kC(s),a)))for(s=0;s<a.length;s++)kC(a[s])}}function jc(a,s){var f=a.stateNode;if(f===null)return null;var p=f[Fn]||null;if(p===null)return null;f=p[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":(p=!p.disabled)||(a=a.type,p=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!p;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(r(231,s,typeof f));return f}var Pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oy=!1;if(Pa)try{var Tc={};Object.defineProperty(Tc,"passive",{get:function(){oy=!0}}),window.addEventListener("test",Tc,Tc),window.removeEventListener("test",Tc,Tc)}catch{oy=!1}var Eo=null,sy=null,lh=null;function IC(){if(lh)return lh;var a,s=sy,f=s.length,p,x="value"in Eo?Eo.value:Eo.textContent,S=x.length;for(a=0;a<f&&s[a]===x[a];a++);var P=f-a;for(p=1;p<=P&&s[f-p]===x[S-p];p++);return lh=x.slice(a,1<p?1-p:void 0)}function uh(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 ch(){return!0}function zC(){return!1}function fr(a){function s(f,p,x,S,P){this._reactName=f,this._targetInst=x,this.type=p,this.nativeEvent=S,this.target=P,this.currentTarget=null;for(var D in a)a.hasOwnProperty(D)&&(f=a[D],this[D]=f?f(S):S[D]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?ch:zC,this.isPropagationStopped=zC,this}return h(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=ch)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=ch)},persist:function(){},isPersistent:ch}),s}var bs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fh=fr(bs),Oc=h({},bs,{view:0,detail:0}),LV=fr(Oc),ly,uy,Pc,dh=h({},Oc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fy,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!==Pc&&(Pc&&a.type==="mousemove"?(ly=a.screenX-Pc.screenX,uy=a.screenY-Pc.screenY):uy=ly=0,Pc=a),ly)},movementY:function(a){return"movementY"in a?a.movementY:uy}}),BC=fr(dh),IV=h({},dh,{dataTransfer:0}),zV=fr(IV),BV=h({},Oc,{relatedTarget:0}),cy=fr(BV),$V=h({},bs,{animationName:0,elapsedTime:0,pseudoElement:0}),UV=fr($V),VV=h({},bs,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),FV=fr(VV),HV=h({},bs,{data:0}),$C=fr(HV),qV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},KV={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"},GV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function YV(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=GV[a])?!!s[a]:!1}function fy(){return YV}var WV=h({},Oc,{key:function(a){if(a.key){var s=qV[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=uh(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?KV[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fy,charCode:function(a){return a.type==="keypress"?uh(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?uh(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),XV=fr(WV),ZV=h({},dh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),UC=fr(ZV),QV=h({},Oc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fy}),JV=fr(QV),e8=h({},bs,{propertyName:0,elapsedTime:0,pseudoElement:0}),t8=fr(e8),n8=h({},dh,{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}),r8=fr(n8),i8=h({},bs,{newState:0,oldState:0}),a8=fr(i8),o8=[9,13,27,32],dy=Pa&&"CompositionEvent"in window,Nc=null;Pa&&"documentMode"in document&&(Nc=document.documentMode);var s8=Pa&&"TextEvent"in window&&!Nc,VC=Pa&&(!dy||Nc&&8<Nc&&11>=Nc),FC=" ",HC=!1;function qC(a,s){switch(a){case"keyup":return o8.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KC(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var kl=!1;function l8(a,s){switch(a){case"compositionend":return KC(s);case"keypress":return s.which!==32?null:(HC=!0,FC);case"textInput":return a=s.data,a===FC&&HC?null:a;default:return null}}function u8(a,s){if(kl)return a==="compositionend"||!dy&&qC(a,s)?(a=IC(),lh=sy=Eo=null,kl=!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 VC&&s.locale!=="ko"?null:s.data;default:return null}}var c8={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 GC(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!c8[a.type]:s==="textarea"}function YC(a,s,f,p){Rl?Dl?Dl.push(p):Dl=[p]:Rl=p,s=tm(s,"onChange"),0<s.length&&(f=new fh("onChange","change",null,f,p),a.push({event:f,listeners:s}))}var _c=null,Mc=null;function f8(a){NO(a,0)}function hh(a){var s=Ce(a);if(PC(s))return a}function WC(a,s){if(a==="change")return s}var XC=!1;if(Pa){var hy;if(Pa){var my="oninput"in document;if(!my){var ZC=document.createElement("div");ZC.setAttribute("oninput","return;"),my=typeof ZC.oninput=="function"}hy=my}else hy=!1;XC=hy&&(!document.documentMode||9<document.documentMode)}function QC(){_c&&(_c.detachEvent("onpropertychange",JC),Mc=_c=null)}function JC(a){if(a.propertyName==="value"&&hh(Mc)){var s=[];YC(s,Mc,a,iy(a)),LC(f8,s)}}function d8(a,s,f){a==="focusin"?(QC(),_c=s,Mc=f,_c.attachEvent("onpropertychange",JC)):a==="focusout"&&QC()}function h8(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return hh(Mc)}function m8(a,s){if(a==="click")return hh(s)}function p8(a,s){if(a==="input"||a==="change")return hh(s)}function g8(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Tr=typeof Object.is=="function"?Object.is:g8;function Rc(a,s){if(Tr(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var f=Object.keys(a),p=Object.keys(s);if(f.length!==p.length)return!1;for(p=0;p<f.length;p++){var x=f[p];if(!En.call(s,x)||!Tr(a[x],s[x]))return!1}return!0}function ej(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function tj(a,s){var f=ej(a);a=0;for(var p;f;){if(f.nodeType===3){if(p=a+f.textContent.length,a<=s&&p>=s)return{node:f,offset:s-a};a=p}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=ej(f)}}function nj(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?nj(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function rj(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=oh(a.document);s instanceof a.HTMLIFrameElement;){try{var f=typeof s.contentWindow.location.href=="string"}catch{f=!1}if(f)a=s.contentWindow;else break;s=oh(a.document)}return s}function py(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 v8=Pa&&"documentMode"in document&&11>=document.documentMode,Ll=null,gy=null,Dc=null,vy=!1;function ij(a,s,f){var p=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;vy||Ll==null||Ll!==oh(p)||(p=Ll,"selectionStart"in p&&py(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Dc&&Rc(Dc,p)||(Dc=p,p=tm(gy,"onSelect"),0<p.length&&(s=new fh("onSelect","select",null,s,f),a.push({event:s,listeners:p}),s.target=Ll)))}function xs(a,s){var f={};return f[a.toLowerCase()]=s.toLowerCase(),f["Webkit"+a]="webkit"+s,f["Moz"+a]="moz"+s,f}var Il={animationend:xs("Animation","AnimationEnd"),animationiteration:xs("Animation","AnimationIteration"),animationstart:xs("Animation","AnimationStart"),transitionrun:xs("Transition","TransitionRun"),transitionstart:xs("Transition","TransitionStart"),transitioncancel:xs("Transition","TransitionCancel"),transitionend:xs("Transition","TransitionEnd")},yy={},aj={};Pa&&(aj=document.createElement("div").style,"AnimationEvent"in window||(delete Il.animationend.animation,delete Il.animationiteration.animation,delete Il.animationstart.animation),"TransitionEvent"in window||delete Il.transitionend.transition);function ws(a){if(yy[a])return yy[a];if(!Il[a])return a;var s=Il[a],f;for(f in s)if(s.hasOwnProperty(f)&&f in aj)return yy[a]=s[f];return a}var oj=ws("animationend"),sj=ws("animationiteration"),lj=ws("animationstart"),y8=ws("transitionrun"),b8=ws("transitionstart"),x8=ws("transitioncancel"),uj=ws("transitionend"),cj=new Map,by="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(" ");by.push("scrollEnd");function bi(a,s){cj.set(a,s),Ca(s,[a])}var mh=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)},Wr=[],zl=0,xy=0;function ph(){for(var a=zl,s=xy=zl=0;s<a;){var f=Wr[s];Wr[s++]=null;var p=Wr[s];Wr[s++]=null;var x=Wr[s];Wr[s++]=null;var S=Wr[s];if(Wr[s++]=null,p!==null&&x!==null){var P=p.pending;P===null?x.next=x:(x.next=P.next,P.next=x),p.pending=x}S!==0&&fj(f,x,S)}}function gh(a,s,f,p){Wr[zl++]=a,Wr[zl++]=s,Wr[zl++]=f,Wr[zl++]=p,xy|=p,a.lanes|=p,a=a.alternate,a!==null&&(a.lanes|=p)}function wy(a,s,f,p){return gh(a,s,f,p),vh(a)}function Ss(a,s){return gh(a,null,null,s),vh(a)}function fj(a,s,f){a.lanes|=f;var p=a.alternate;p!==null&&(p.lanes|=f);for(var x=!1,S=a.return;S!==null;)S.childLanes|=f,p=S.alternate,p!==null&&(p.childLanes|=f),S.tag===22&&(a=S.stateNode,a===null||a._visibility&1||(x=!0)),a=S,S=S.return;return a.tag===3?(S=a.stateNode,x&&s!==null&&(x=31-Xt(f),a=S.hiddenUpdates,p=a[x],p===null?a[x]=[s]:p.push(s),s.lane=f|536870912),S):null}function vh(a){if(50<nf)throw nf=0,Nb=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var Bl={};function w8(a,s,f,p){this.tag=a,this.key=f,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=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Or(a,s,f,p){return new w8(a,s,f,p)}function Sy(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Na(a,s){var f=a.alternate;return f===null?(f=Or(a.tag,s,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=s,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&65011712,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,s=a.dependencies,f.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f.refCleanup=a.refCleanup,f}function dj(a,s){a.flags&=65011714;var f=a.alternate;return f===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=f.childLanes,a.lanes=f.lanes,a.child=f.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=f.memoizedProps,a.memoizedState=f.memoizedState,a.updateQueue=f.updateQueue,a.type=f.type,s=f.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function yh(a,s,f,p,x,S){var P=0;if(p=a,typeof a=="function")Sy(a)&&(P=1);else if(typeof a=="string")P=jF(a,f,ne.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case B:return a=Or(31,f,s,x),a.elementType=B,a.lanes=S,a;case A:return As(f.children,x,S,s);case E:P=8,x|=24;break;case C:return a=Or(12,f,s,x|2),a.elementType=C,a.lanes=S,a;case N:return a=Or(13,f,s,x),a.elementType=N,a.lanes=S,a;case _:return a=Or(19,f,s,x),a.elementType=_,a.lanes=S,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case T:P=10;break e;case j:P=9;break e;case O:P=11;break e;case M:P=14;break e;case R:P=16,p=null;break e}P=29,f=Error(r(130,a===null?"null":typeof a,"")),p=null}return s=Or(P,f,s,x),s.elementType=a,s.type=p,s.lanes=S,s}function As(a,s,f,p){return a=Or(7,a,p,s),a.lanes=f,a}function Ay(a,s,f){return a=Or(6,a,null,s),a.lanes=f,a}function hj(a){var s=Or(18,null,null,0);return s.stateNode=a,s}function Ey(a,s,f){return s=Or(4,a.children!==null?a.children:[],a.key,s),s.lanes=f,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var mj=new WeakMap;function Xr(a,s){if(typeof a=="object"&&a!==null){var f=mj.get(a);return f!==void 0?f:(s={value:a,source:s,stack:qr(s)},mj.set(a,s),s)}return{value:a,source:s,stack:qr(s)}}var $l=[],Ul=0,bh=null,kc=0,Zr=[],Qr=0,Co=null,Fi=1,Hi="";function _a(a,s){$l[Ul++]=kc,$l[Ul++]=bh,bh=a,kc=s}function pj(a,s,f){Zr[Qr++]=Fi,Zr[Qr++]=Hi,Zr[Qr++]=Co,Co=a;var p=Fi;a=Hi;var x=32-Xt(p)-1;p&=~(1<<x),f+=1;var S=32-Xt(s)+x;if(30<S){var P=x-x%5;S=(p&(1<<P)-1).toString(32),p>>=P,x-=P,Fi=1<<32-Xt(s)+x|f<<x|p,Hi=S+a}else Fi=1<<S|f<<x|p,Hi=a}function Cy(a){a.return!==null&&(_a(a,1),pj(a,1,0))}function jy(a){for(;a===bh;)bh=$l[--Ul],$l[Ul]=null,kc=$l[--Ul],$l[Ul]=null;for(;a===Co;)Co=Zr[--Qr],Zr[Qr]=null,Hi=Zr[--Qr],Zr[Qr]=null,Fi=Zr[--Qr],Zr[Qr]=null}function gj(a,s){Zr[Qr++]=Fi,Zr[Qr++]=Hi,Zr[Qr++]=Co,Fi=s.id,Hi=s.overflow,Co=a}var jn=null,xt=null,Xe=!1,jo=null,Jr=!1,Ty=Error(r(519));function To(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Lc(Xr(s,a)),Ty}function vj(a){var s=a.stateNode,f=a.type,p=a.memoizedProps;switch(s[ln]=a,s[Fn]=p,f){case"dialog":Ke("cancel",s),Ke("close",s);break;case"iframe":case"object":case"embed":Ke("load",s);break;case"video":case"audio":for(f=0;f<af.length;f++)Ke(af[f],s);break;case"source":Ke("error",s);break;case"img":case"image":case"link":Ke("error",s),Ke("load",s);break;case"details":Ke("toggle",s);break;case"input":Ke("invalid",s),NC(s,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Ke("invalid",s);break;case"textarea":Ke("invalid",s),MC(s,p.value,p.defaultValue,p.children)}f=p.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||s.textContent===""+f||p.suppressHydrationWarning===!0||DO(s.textContent,f)?(p.popover!=null&&(Ke("beforetoggle",s),Ke("toggle",s)),p.onScroll!=null&&Ke("scroll",s),p.onScrollEnd!=null&&Ke("scrollend",s),p.onClick!=null&&(s.onclick=Oa),s=!0):s=!1,s||To(a,!0)}function yj(a){for(jn=a.return;jn;)switch(jn.tag){case 5:case 31:case 13:Jr=!1;return;case 27:case 3:Jr=!0;return;default:jn=jn.return}}function Vl(a){if(a!==jn)return!1;if(!Xe)return yj(a),Xe=!0,!1;var s=a.tag,f;if((f=s!==3&&s!==27)&&((f=s===5)&&(f=a.type,f=!(f!=="form"&&f!=="button")||qb(a.type,a.memoizedProps)),f=!f),f&&xt&&To(a),yj(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));xt=FO(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));xt=FO(a)}else s===27?(s=xt,Uo(a.type)?(a=Xb,Xb=null,xt=a):xt=s):xt=jn?ti(a.stateNode.nextSibling):null;return!0}function Es(){xt=jn=null,Xe=!1}function Oy(){var a=jo;return a!==null&&(pr===null?pr=a:pr.push.apply(pr,a),jo=null),a}function Lc(a){jo===null?jo=[a]:jo.push(a)}var Py=k(null),Cs=null,Ma=null;function Oo(a,s,f){q(Py,s._currentValue),s._currentValue=f}function Ra(a){a._currentValue=Py.current,I(Py)}function Ny(a,s,f){for(;a!==null;){var p=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),a===f)break;a=a.return}}function _y(a,s,f,p){var x=a.child;for(x!==null&&(x.return=a);x!==null;){var S=x.dependencies;if(S!==null){var P=x.child;S=S.firstContext;e:for(;S!==null;){var D=S;S=x;for(var U=0;U<s.length;U++)if(D.context===s[U]){S.lanes|=f,D=S.alternate,D!==null&&(D.lanes|=f),Ny(S.return,f,a),p||(P=null);break e}S=D.next}}else if(x.tag===18){if(P=x.return,P===null)throw Error(r(341));P.lanes|=f,S=P.alternate,S!==null&&(S.lanes|=f),Ny(P,f,a),P=null}else P=x.child;if(P!==null)P.return=x;else for(P=x;P!==null;){if(P===a){P=null;break}if(x=P.sibling,x!==null){x.return=P.return,P=x;break}P=P.return}x=P}}function Fl(a,s,f,p){a=null;for(var x=s,S=!1;x!==null;){if(!S){if((x.flags&524288)!==0)S=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var P=x.alternate;if(P===null)throw Error(r(387));if(P=P.memoizedProps,P!==null){var D=x.type;Tr(x.pendingProps.value,P.value)||(a!==null?a.push(D):a=[D])}}else if(x===X.current){if(P=x.alternate,P===null)throw Error(r(387));P.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(a!==null?a.push(cf):a=[cf])}x=x.return}a!==null&&_y(s,a,f,p),s.flags|=262144}function xh(a){for(a=a.firstContext;a!==null;){if(!Tr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function js(a){Cs=a,Ma=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Tn(a){return bj(Cs,a)}function wh(a,s){return Cs===null&&js(a),bj(a,s)}function bj(a,s){var f=s._currentValue;if(s={context:s,memoizedValue:f,next:null},Ma===null){if(a===null)throw Error(r(308));Ma=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else Ma=Ma.next=s;return f}var S8=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(f,p){a.push(p)}};this.abort=function(){s.aborted=!0,a.forEach(function(f){return f()})}},A8=e.unstable_scheduleCallback,E8=e.unstable_NormalPriority,Zt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function My(){return{controller:new S8,data:new Map,refCount:0}}function Ic(a){a.refCount--,a.refCount===0&&A8(E8,function(){a.controller.abort()})}var zc=null,Ry=0,Hl=0,ql=null;function C8(a,s){if(zc===null){var f=zc=[];Ry=0,Hl=Lb(),ql={status:"pending",value:void 0,then:function(p){f.push(p)}}}return Ry++,s.then(xj,xj),s}function xj(){if(--Ry===0&&zc!==null){ql!==null&&(ql.status="fulfilled");var a=zc;zc=null,Hl=0,ql=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function j8(a,s){var f=[],p={status:"pending",value:null,reason:null,then:function(x){f.push(x)}};return a.then(function(){p.status="fulfilled",p.value=s;for(var x=0;x<f.length;x++)(0,f[x])(s)},function(x){for(p.status="rejected",p.reason=x,x=0;x<f.length;x++)(0,f[x])(void 0)}),p}var wj=L.S;L.S=function(a,s){iO=Yt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&C8(a,s),wj!==null&&wj(a,s)};var Ts=k(null);function Dy(){var a=Ts.current;return a!==null?a:mt.pooledCache}function Sh(a,s){s===null?q(Ts,Ts.current):q(Ts,s.pool)}function Sj(){var a=Dy();return a===null?null:{parent:Zt._currentValue,pool:a}}var Kl=Error(r(460)),ky=Error(r(474)),Ah=Error(r(542)),Eh={then:function(){}};function Aj(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Ej(a,s,f){switch(f=a[f],f===void 0?a.push(s):f!==s&&(s.then(Oa,Oa),s=f),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,jj(a),a;default:if(typeof s.status=="string")s.then(Oa,Oa);else{if(a=mt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(p){if(s.status==="pending"){var x=s;x.status="fulfilled",x.value=p}},function(p){if(s.status==="pending"){var x=s;x.status="rejected",x.reason=p}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,jj(a),a}throw Ps=s,Kl}}function Os(a){try{var s=a._init;return s(a._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(Ps=f,Kl):f}}var Ps=null;function Cj(){if(Ps===null)throw Error(r(459));var a=Ps;return Ps=null,a}function jj(a){if(a===Kl||a===Ah)throw Error(r(483))}var Gl=null,Bc=0;function Ch(a){var s=Bc;return Bc+=1,Gl===null&&(Gl=[]),Ej(Gl,a,s)}function $c(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function jh(a,s){throw s.$$typeof===y?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function Tj(a){function s(Y,K){if(a){var Z=Y.deletions;Z===null?(Y.deletions=[K],Y.flags|=16):Z.push(K)}}function f(Y,K){if(!a)return null;for(;K!==null;)s(Y,K),K=K.sibling;return null}function p(Y){for(var K=new Map;Y!==null;)Y.key!==null?K.set(Y.key,Y):K.set(Y.index,Y),Y=Y.sibling;return K}function x(Y,K){return Y=Na(Y,K),Y.index=0,Y.sibling=null,Y}function S(Y,K,Z){return Y.index=Z,a?(Z=Y.alternate,Z!==null?(Z=Z.index,Z<K?(Y.flags|=67108866,K):Z):(Y.flags|=67108866,K)):(Y.flags|=1048576,K)}function P(Y){return a&&Y.alternate===null&&(Y.flags|=67108866),Y}function D(Y,K,Z,ce){return K===null||K.tag!==6?(K=Ay(Z,Y.mode,ce),K.return=Y,K):(K=x(K,Z),K.return=Y,K)}function U(Y,K,Z,ce){var Ne=Z.type;return Ne===A?ue(Y,K,Z.props.children,ce,Z.key):K!==null&&(K.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===R&&Os(Ne)===K.type)?(K=x(K,Z.props),$c(K,Z),K.return=Y,K):(K=yh(Z.type,Z.key,Z.props,null,Y.mode,ce),$c(K,Z),K.return=Y,K)}function J(Y,K,Z,ce){return K===null||K.tag!==4||K.stateNode.containerInfo!==Z.containerInfo||K.stateNode.implementation!==Z.implementation?(K=Ey(Z,Y.mode,ce),K.return=Y,K):(K=x(K,Z.children||[]),K.return=Y,K)}function ue(Y,K,Z,ce,Ne){return K===null||K.tag!==7?(K=As(Z,Y.mode,ce,Ne),K.return=Y,K):(K=x(K,Z),K.return=Y,K)}function fe(Y,K,Z){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=Ay(""+K,Y.mode,Z),K.return=Y,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return Z=yh(K.type,K.key,K.props,null,Y.mode,Z),$c(Z,K),Z.return=Y,Z;case w:return K=Ey(K,Y.mode,Z),K.return=Y,K;case R:return K=Os(K),fe(Y,K,Z)}if(se(K)||z(K))return K=As(K,Y.mode,Z,null),K.return=Y,K;if(typeof K.then=="function")return fe(Y,Ch(K),Z);if(K.$$typeof===T)return fe(Y,wh(Y,K),Z);jh(Y,K)}return null}function te(Y,K,Z,ce){var Ne=K!==null?K.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Ne!==null?null:D(Y,K,""+Z,ce);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:return Z.key===Ne?U(Y,K,Z,ce):null;case w:return Z.key===Ne?J(Y,K,Z,ce):null;case R:return Z=Os(Z),te(Y,K,Z,ce)}if(se(Z)||z(Z))return Ne!==null?null:ue(Y,K,Z,ce,null);if(typeof Z.then=="function")return te(Y,K,Ch(Z),ce);if(Z.$$typeof===T)return te(Y,K,wh(Y,Z),ce);jh(Y,Z)}return null}function ie(Y,K,Z,ce,Ne){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Y=Y.get(Z)||null,D(K,Y,""+ce,Ne);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case b:return Y=Y.get(ce.key===null?Z:ce.key)||null,U(K,Y,ce,Ne);case w:return Y=Y.get(ce.key===null?Z:ce.key)||null,J(K,Y,ce,Ne);case R:return ce=Os(ce),ie(Y,K,Z,ce,Ne)}if(se(ce)||z(ce))return Y=Y.get(Z)||null,ue(K,Y,ce,Ne,null);if(typeof ce.then=="function")return ie(Y,K,Z,Ch(ce),Ne);if(ce.$$typeof===T)return ie(Y,K,Z,wh(K,ce),Ne);jh(K,ce)}return null}function Se(Y,K,Z,ce){for(var Ne=null,et=null,je=K,Ue=K=0,Ye=null;je!==null&&Ue<Z.length;Ue++){je.index>Ue?(Ye=je,je=null):Ye=je.sibling;var tt=te(Y,je,Z[Ue],ce);if(tt===null){je===null&&(je=Ye);break}a&&je&&tt.alternate===null&&s(Y,je),K=S(tt,K,Ue),et===null?Ne=tt:et.sibling=tt,et=tt,je=Ye}if(Ue===Z.length)return f(Y,je),Xe&&_a(Y,Ue),Ne;if(je===null){for(;Ue<Z.length;Ue++)je=fe(Y,Z[Ue],ce),je!==null&&(K=S(je,K,Ue),et===null?Ne=je:et.sibling=je,et=je);return Xe&&_a(Y,Ue),Ne}for(je=p(je);Ue<Z.length;Ue++)Ye=ie(je,Y,Ue,Z[Ue],ce),Ye!==null&&(a&&Ye.alternate!==null&&je.delete(Ye.key===null?Ue:Ye.key),K=S(Ye,K,Ue),et===null?Ne=Ye:et.sibling=Ye,et=Ye);return a&&je.forEach(function(Ko){return s(Y,Ko)}),Xe&&_a(Y,Ue),Ne}function Re(Y,K,Z,ce){if(Z==null)throw Error(r(151));for(var Ne=null,et=null,je=K,Ue=K=0,Ye=null,tt=Z.next();je!==null&&!tt.done;Ue++,tt=Z.next()){je.index>Ue?(Ye=je,je=null):Ye=je.sibling;var Ko=te(Y,je,tt.value,ce);if(Ko===null){je===null&&(je=Ye);break}a&&je&&Ko.alternate===null&&s(Y,je),K=S(Ko,K,Ue),et===null?Ne=Ko:et.sibling=Ko,et=Ko,je=Ye}if(tt.done)return f(Y,je),Xe&&_a(Y,Ue),Ne;if(je===null){for(;!tt.done;Ue++,tt=Z.next())tt=fe(Y,tt.value,ce),tt!==null&&(K=S(tt,K,Ue),et===null?Ne=tt:et.sibling=tt,et=tt);return Xe&&_a(Y,Ue),Ne}for(je=p(je);!tt.done;Ue++,tt=Z.next())tt=ie(je,Y,Ue,tt.value,ce),tt!==null&&(a&&tt.alternate!==null&&je.delete(tt.key===null?Ue:tt.key),K=S(tt,K,Ue),et===null?Ne=tt:et.sibling=tt,et=tt);return a&&je.forEach(function(IF){return s(Y,IF)}),Xe&&_a(Y,Ue),Ne}function ht(Y,K,Z,ce){if(typeof Z=="object"&&Z!==null&&Z.type===A&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:e:{for(var Ne=Z.key;K!==null;){if(K.key===Ne){if(Ne=Z.type,Ne===A){if(K.tag===7){f(Y,K.sibling),ce=x(K,Z.props.children),ce.return=Y,Y=ce;break e}}else if(K.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===R&&Os(Ne)===K.type){f(Y,K.sibling),ce=x(K,Z.props),$c(ce,Z),ce.return=Y,Y=ce;break e}f(Y,K);break}else s(Y,K);K=K.sibling}Z.type===A?(ce=As(Z.props.children,Y.mode,ce,Z.key),ce.return=Y,Y=ce):(ce=yh(Z.type,Z.key,Z.props,null,Y.mode,ce),$c(ce,Z),ce.return=Y,Y=ce)}return P(Y);case w:e:{for(Ne=Z.key;K!==null;){if(K.key===Ne)if(K.tag===4&&K.stateNode.containerInfo===Z.containerInfo&&K.stateNode.implementation===Z.implementation){f(Y,K.sibling),ce=x(K,Z.children||[]),ce.return=Y,Y=ce;break e}else{f(Y,K);break}else s(Y,K);K=K.sibling}ce=Ey(Z,Y.mode,ce),ce.return=Y,Y=ce}return P(Y);case R:return Z=Os(Z),ht(Y,K,Z,ce)}if(se(Z))return Se(Y,K,Z,ce);if(z(Z)){if(Ne=z(Z),typeof Ne!="function")throw Error(r(150));return Z=Ne.call(Z),Re(Y,K,Z,ce)}if(typeof Z.then=="function")return ht(Y,K,Ch(Z),ce);if(Z.$$typeof===T)return ht(Y,K,wh(Y,Z),ce);jh(Y,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,K!==null&&K.tag===6?(f(Y,K.sibling),ce=x(K,Z),ce.return=Y,Y=ce):(f(Y,K),ce=Ay(Z,Y.mode,ce),ce.return=Y,Y=ce),P(Y)):f(Y,K)}return function(Y,K,Z,ce){try{Bc=0;var Ne=ht(Y,K,Z,ce);return Gl=null,Ne}catch(je){if(je===Kl||je===Ah)throw je;var et=Or(29,je,null,Y.mode);return et.lanes=ce,et.return=Y,et}}}var Ns=Tj(!0),Oj=Tj(!1),Po=!1;function Ly(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Iy(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 No(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function _o(a,s,f){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(at&2)!==0){var x=p.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),p.pending=s,s=vh(a),fj(a,null,f),s}return gh(a,p,s,f),vh(a)}function Uc(a,s,f){if(s=s.updateQueue,s!==null&&(s=s.shared,(f&4194048)!==0)){var p=s.lanes;p&=a.pendingLanes,f|=p,s.lanes=f,Cn(a,f)}}function zy(a,s){var f=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,f===p)){var x=null,S=null;if(f=f.firstBaseUpdate,f!==null){do{var P={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};S===null?x=S=P:S=S.next=P,f=f.next}while(f!==null);S===null?x=S=s:S=S.next=s}else x=S=s;f={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:S,shared:p.shared,callbacks:p.callbacks},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=s:a.next=s,f.lastBaseUpdate=s}var By=!1;function Vc(){if(By){var a=ql;if(a!==null)throw a}}function Fc(a,s,f,p){By=!1;var x=a.updateQueue;Po=!1;var S=x.firstBaseUpdate,P=x.lastBaseUpdate,D=x.shared.pending;if(D!==null){x.shared.pending=null;var U=D,J=U.next;U.next=null,P===null?S=J:P.next=J,P=U;var ue=a.alternate;ue!==null&&(ue=ue.updateQueue,D=ue.lastBaseUpdate,D!==P&&(D===null?ue.firstBaseUpdate=J:D.next=J,ue.lastBaseUpdate=U))}if(S!==null){var fe=x.baseState;P=0,ue=J=U=null,D=S;do{var te=D.lane&-536870913,ie=te!==D.lane;if(ie?(Ge&te)===te:(p&te)===te){te!==0&&te===Hl&&(By=!0),ue!==null&&(ue=ue.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var Se=a,Re=D;te=s;var ht=f;switch(Re.tag){case 1:if(Se=Re.payload,typeof Se=="function"){fe=Se.call(ht,fe,te);break e}fe=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Re.payload,te=typeof Se=="function"?Se.call(ht,fe,te):Se,te==null)break e;fe=h({},fe,te);break e;case 2:Po=!0}}te=D.callback,te!==null&&(a.flags|=64,ie&&(a.flags|=8192),ie=x.callbacks,ie===null?x.callbacks=[te]:ie.push(te))}else ie={lane:te,tag:D.tag,payload:D.payload,callback:D.callback,next:null},ue===null?(J=ue=ie,U=fe):ue=ue.next=ie,P|=te;if(D=D.next,D===null){if(D=x.shared.pending,D===null)break;ie=D,D=ie.next,ie.next=null,x.lastBaseUpdate=ie,x.shared.pending=null}}while(!0);ue===null&&(U=fe),x.baseState=U,x.firstBaseUpdate=J,x.lastBaseUpdate=ue,S===null&&(x.shared.lanes=0),Lo|=P,a.lanes=P,a.memoizedState=fe}}function Pj(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function Nj(a,s){var f=a.callbacks;if(f!==null)for(a.callbacks=null,a=0;a<f.length;a++)Pj(f[a],s)}var Yl=k(null),Th=k(0);function _j(a,s){a=Va,q(Th,a),q(Yl,s),Va=a|s.baseLanes}function $y(){q(Th,Va),q(Yl,Yl.current)}function Uy(){Va=Th.current,I(Yl),I(Th)}var Pr=k(null),ei=null;function Mo(a){var s=a.alternate;q(Ht,Ht.current&1),q(Pr,a),ei===null&&(s===null||Yl.current!==null||s.memoizedState!==null)&&(ei=a)}function Vy(a){q(Ht,Ht.current),q(Pr,a),ei===null&&(ei=a)}function Mj(a){a.tag===22?(q(Ht,Ht.current),q(Pr,a),ei===null&&(ei=a)):Ro()}function Ro(){q(Ht,Ht.current),q(Pr,Pr.current)}function Nr(a){I(Pr),ei===a&&(ei=null),I(Ht)}var Ht=k(0);function Oh(a){for(var s=a;s!==null;){if(s.tag===13){var f=s.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||Yb(f)||Wb(f)))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 Da=0,$e=null,ft=null,Qt=null,Ph=!1,Wl=!1,_s=!1,Nh=0,Hc=0,Xl=null,T8=0;function Lt(){throw Error(r(321))}function Fy(a,s){if(s===null)return!1;for(var f=0;f<s.length&&f<a.length;f++)if(!Tr(a[f],s[f]))return!1;return!0}function Hy(a,s,f,p,x,S){return Da=S,$e=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,L.H=a===null||a.memoizedState===null?pT:ab,_s=!1,S=f(p,x),_s=!1,Wl&&(S=Dj(s,f,p,x)),Rj(a),S}function Rj(a){L.H=Gc;var s=ft!==null&&ft.next!==null;if(Da=0,Qt=ft=$e=null,Ph=!1,Hc=0,Xl=null,s)throw Error(r(300));a===null||Jt||(a=a.dependencies,a!==null&&xh(a)&&(Jt=!0))}function Dj(a,s,f,p){$e=a;var x=0;do{if(Wl&&(Xl=null),Hc=0,Wl=!1,25<=x)throw Error(r(301));if(x+=1,Qt=ft=null,a.updateQueue!=null){var S=a.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}L.H=gT,S=s(f,p)}while(Wl);return S}function O8(){var a=L.H,s=a.useState()[0];return s=typeof s.then=="function"?qc(s):s,a=a.useState()[0],(ft!==null?ft.memoizedState:null)!==a&&($e.flags|=1024),s}function qy(){var a=Nh!==0;return Nh=0,a}function Ky(a,s,f){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~f}function Gy(a){if(Ph){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}Ph=!1}Da=0,Qt=ft=$e=null,Wl=!1,Hc=Nh=0,Xl=null}function Qn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?$e.memoizedState=Qt=a:Qt=Qt.next=a,Qt}function qt(){if(ft===null){var a=$e.alternate;a=a!==null?a.memoizedState:null}else a=ft.next;var s=Qt===null?$e.memoizedState:Qt.next;if(s!==null)Qt=s,ft=a;else{if(a===null)throw $e.alternate===null?Error(r(467)):Error(r(310));ft=a,a={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},Qt===null?$e.memoizedState=Qt=a:Qt=Qt.next=a}return Qt}function _h(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qc(a){var s=Hc;return Hc+=1,Xl===null&&(Xl=[]),a=Ej(Xl,a,s),s=$e,(Qt===null?s.memoizedState:Qt.next)===null&&(s=s.alternate,L.H=s===null||s.memoizedState===null?pT:ab),a}function Mh(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return qc(a);if(a.$$typeof===T)return Tn(a)}throw Error(r(438,String(a)))}function Yy(a){var s=null,f=$e.updateQueue;if(f!==null&&(s=f.memoCache),s==null){var p=$e.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(s={data:p.data.map(function(x){return x.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),f===null&&(f=_h(),$e.updateQueue=f),f.memoCache=s,f=s.data[s.index],f===void 0)for(f=s.data[s.index]=Array(a),p=0;p<a;p++)f[p]=V;return s.index++,f}function ka(a,s){return typeof s=="function"?s(a):s}function Rh(a){var s=qt();return Wy(s,ft,a)}function Wy(a,s,f){var p=a.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=f;var x=a.baseQueue,S=p.pending;if(S!==null){if(x!==null){var P=x.next;x.next=S.next,S.next=P}s.baseQueue=x=S,p.pending=null}if(S=a.baseState,x===null)a.memoizedState=S;else{s=x.next;var D=P=null,U=null,J=s,ue=!1;do{var fe=J.lane&-536870913;if(fe!==J.lane?(Ge&fe)===fe:(Da&fe)===fe){var te=J.revertLane;if(te===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),fe===Hl&&(ue=!0);else if((Da&te)===te){J=J.next,te===Hl&&(ue=!0);continue}else fe={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(D=U=fe,P=S):U=U.next=fe,$e.lanes|=te,Lo|=te;fe=J.action,_s&&f(S,fe),S=J.hasEagerState?J.eagerState:f(S,fe)}else te={lane:fe,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(D=U=te,P=S):U=U.next=te,$e.lanes|=fe,Lo|=fe;J=J.next}while(J!==null&&J!==s);if(U===null?P=S:U.next=D,!Tr(S,a.memoizedState)&&(Jt=!0,ue&&(f=ql,f!==null)))throw f;a.memoizedState=S,a.baseState=P,a.baseQueue=U,p.lastRenderedState=S}return x===null&&(p.lanes=0),[a.memoizedState,p.dispatch]}function Xy(a){var s=qt(),f=s.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=a;var p=f.dispatch,x=f.pending,S=s.memoizedState;if(x!==null){f.pending=null;var P=x=x.next;do S=a(S,P.action),P=P.next;while(P!==x);Tr(S,s.memoizedState)||(Jt=!0),s.memoizedState=S,s.baseQueue===null&&(s.baseState=S),f.lastRenderedState=S}return[S,p]}function kj(a,s,f){var p=$e,x=qt(),S=Xe;if(S){if(f===void 0)throw Error(r(407));f=f()}else f=s();var P=!Tr((ft||x).memoizedState,f);if(P&&(x.memoizedState=f,Jt=!0),x=x.queue,Jy(zj.bind(null,p,x,a),[a]),x.getSnapshot!==s||P||Qt!==null&&Qt.memoizedState.tag&1){if(p.flags|=2048,Zl(9,{destroy:void 0},Ij.bind(null,p,x,f,s),null),mt===null)throw Error(r(349));S||(Da&127)!==0||Lj(p,s,f)}return f}function Lj(a,s,f){a.flags|=16384,a={getSnapshot:s,value:f},s=$e.updateQueue,s===null?(s=_h(),$e.updateQueue=s,s.stores=[a]):(f=s.stores,f===null?s.stores=[a]:f.push(a))}function Ij(a,s,f,p){s.value=f,s.getSnapshot=p,Bj(s)&&$j(a)}function zj(a,s,f){return f(function(){Bj(s)&&$j(a)})}function Bj(a){var s=a.getSnapshot;a=a.value;try{var f=s();return!Tr(a,f)}catch{return!0}}function $j(a){var s=Ss(a,2);s!==null&&gr(s,a,2)}function Zy(a){var s=Qn();if(typeof a=="function"){var f=a;if(a=f(),_s){Zn(!0);try{f()}finally{Zn(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:a},s}function Uj(a,s,f,p){return a.baseState=f,Wy(a,ft,typeof p=="function"?p:ka)}function P8(a,s,f,p,x){if(Lh(a))throw Error(r(485));if(a=s.action,a!==null){var S={payload:x,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){S.listeners.push(P)}};L.T!==null?f(!0):S.isTransition=!1,p(S),f=s.pending,f===null?(S.next=s.pending=S,Vj(s,S)):(S.next=f.next,s.pending=f.next=S)}}function Vj(a,s){var f=s.action,p=s.payload,x=a.state;if(s.isTransition){var S=L.T,P={};L.T=P;try{var D=f(x,p),U=L.S;U!==null&&U(P,D),Fj(a,s,D)}catch(J){Qy(a,s,J)}finally{S!==null&&P.types!==null&&(S.types=P.types),L.T=S}}else try{S=f(x,p),Fj(a,s,S)}catch(J){Qy(a,s,J)}}function Fj(a,s,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(p){Hj(a,s,p)},function(p){return Qy(a,s,p)}):Hj(a,s,f)}function Hj(a,s,f){s.status="fulfilled",s.value=f,qj(s),a.state=f,s=a.pending,s!==null&&(f=s.next,f===s?a.pending=null:(f=f.next,s.next=f,Vj(a,f)))}function Qy(a,s,f){var p=a.pending;if(a.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=f,qj(s),s=s.next;while(s!==p)}a.action=null}function qj(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function Kj(a,s){return s}function Gj(a,s){if(Xe){var f=mt.formState;if(f!==null){e:{var p=$e;if(Xe){if(xt){t:{for(var x=xt,S=Jr;x.nodeType!==8;){if(!S){x=null;break t}if(x=ti(x.nextSibling),x===null){x=null;break t}}S=x.data,x=S==="F!"||S==="F"?x:null}if(x){xt=ti(x.nextSibling),p=x.data==="F!";break e}}To(p)}p=!1}p&&(s=f[0])}}return f=Qn(),f.memoizedState=f.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kj,lastRenderedState:s},f.queue=p,f=dT.bind(null,$e,p),p.dispatch=f,p=Zy(!1),S=ib.bind(null,$e,!1,p.queue),p=Qn(),x={state:s,dispatch:null,action:a,pending:null},p.queue=x,f=P8.bind(null,$e,x,S,f),x.dispatch=f,p.memoizedState=a,[s,f,!1]}function Yj(a){var s=qt();return Wj(s,ft,a)}function Wj(a,s,f){if(s=Wy(a,s,Kj)[0],a=Rh(ka)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=qc(s)}catch(P){throw P===Kl?Ah:P}else p=s;s=qt();var x=s.queue,S=x.dispatch;return f!==s.memoizedState&&($e.flags|=2048,Zl(9,{destroy:void 0},N8.bind(null,x,f),null)),[p,S,a]}function N8(a,s){a.action=s}function Xj(a){var s=qt(),f=ft;if(f!==null)return Wj(s,f,a);qt(),s=s.memoizedState,f=qt();var p=f.queue.dispatch;return f.memoizedState=a,[s,p,!1]}function Zl(a,s,f,p){return a={tag:a,create:f,deps:p,inst:s,next:null},s=$e.updateQueue,s===null&&(s=_h(),$e.updateQueue=s),f=s.lastEffect,f===null?s.lastEffect=a.next=a:(p=f.next,f.next=a,a.next=p,s.lastEffect=a),a}function Zj(){return qt().memoizedState}function Dh(a,s,f,p){var x=Qn();$e.flags|=a,x.memoizedState=Zl(1|s,{destroy:void 0},f,p===void 0?null:p)}function kh(a,s,f,p){var x=qt();p=p===void 0?null:p;var S=x.memoizedState.inst;ft!==null&&p!==null&&Fy(p,ft.memoizedState.deps)?x.memoizedState=Zl(s,S,f,p):($e.flags|=a,x.memoizedState=Zl(1|s,S,f,p))}function Qj(a,s){Dh(8390656,8,a,s)}function Jy(a,s){kh(2048,8,a,s)}function _8(a){$e.flags|=4;var s=$e.updateQueue;if(s===null)s=_h(),$e.updateQueue=s,s.events=[a];else{var f=s.events;f===null?s.events=[a]:f.push(a)}}function Jj(a){var s=qt().memoizedState;return _8({ref:s,nextImpl:a}),function(){if((at&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function eT(a,s){return kh(4,2,a,s)}function tT(a,s){return kh(4,4,a,s)}function nT(a,s){if(typeof s=="function"){a=a();var f=s(a);return function(){typeof f=="function"?f():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function rT(a,s,f){f=f!=null?f.concat([a]):null,kh(4,4,nT.bind(null,s,a),f)}function eb(){}function iT(a,s){var f=qt();s=s===void 0?null:s;var p=f.memoizedState;return s!==null&&Fy(s,p[1])?p[0]:(f.memoizedState=[a,s],a)}function aT(a,s){var f=qt();s=s===void 0?null:s;var p=f.memoizedState;if(s!==null&&Fy(s,p[1]))return p[0];if(p=a(),_s){Zn(!0);try{a()}finally{Zn(!1)}}return f.memoizedState=[p,s],p}function tb(a,s,f){return f===void 0||(Da&1073741824)!==0&&(Ge&261930)===0?a.memoizedState=s:(a.memoizedState=f,a=oO(),$e.lanes|=a,Lo|=a,f)}function oT(a,s,f,p){return Tr(f,s)?f:Yl.current!==null?(a=tb(a,f,p),Tr(a,s)||(Jt=!0),a):(Da&42)===0||(Da&1073741824)!==0&&(Ge&261930)===0?(Jt=!0,a.memoizedState=f):(a=oO(),$e.lanes|=a,Lo|=a,s)}function sT(a,s,f,p,x){var S=F.p;F.p=S!==0&&8>S?S:8;var P=L.T,D={};L.T=D,ib(a,!1,s,f);try{var U=x(),J=L.S;if(J!==null&&J(D,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ue=j8(U,p);Kc(a,s,ue,Rr(a))}else Kc(a,s,p,Rr(a))}catch(fe){Kc(a,s,{then:function(){},status:"rejected",reason:fe},Rr())}finally{F.p=S,P!==null&&D.types!==null&&(P.types=D.types),L.T=P}}function M8(){}function nb(a,s,f,p){if(a.tag!==5)throw Error(r(476));var x=lT(a).queue;sT(a,x,s,$,f===null?M8:function(){return uT(a),f(p)})}function lT(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:$},next:null};var f={};return s.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:f},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function uT(a){var s=lT(a);s.next===null&&(s=a.alternate.memoizedState),Kc(a,s.next.queue,{},Rr())}function rb(){return Tn(cf)}function cT(){return qt().memoizedState}function fT(){return qt().memoizedState}function R8(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var f=Rr();a=No(f);var p=_o(s,a,f);p!==null&&(gr(p,s,f),Uc(p,s,f)),s={cache:My()},a.payload=s;return}s=s.return}}function D8(a,s,f){var p=Rr();f={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Lh(a)?hT(s,f):(f=wy(a,s,f,p),f!==null&&(gr(f,a,p),mT(f,s,p)))}function dT(a,s,f){var p=Rr();Kc(a,s,f,p)}function Kc(a,s,f,p){var x={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(Lh(a))hT(s,x);else{var S=a.alternate;if(a.lanes===0&&(S===null||S.lanes===0)&&(S=s.lastRenderedReducer,S!==null))try{var P=s.lastRenderedState,D=S(P,f);if(x.hasEagerState=!0,x.eagerState=D,Tr(D,P))return gh(a,s,x,0),mt===null&&ph(),!1}catch{}if(f=wy(a,s,x,p),f!==null)return gr(f,a,p),mT(f,s,p),!0}return!1}function ib(a,s,f,p){if(p={lane:2,revertLane:Lb(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Lh(a)){if(s)throw Error(r(479))}else s=wy(a,f,p,2),s!==null&&gr(s,a,2)}function Lh(a){var s=a.alternate;return a===$e||s!==null&&s===$e}function hT(a,s){Wl=Ph=!0;var f=a.pending;f===null?s.next=s:(s.next=f.next,f.next=s),a.pending=s}function mT(a,s,f){if((f&4194048)!==0){var p=s.lanes;p&=a.pendingLanes,f|=p,s.lanes=f,Cn(a,f)}}var Gc={readContext:Tn,use:Mh,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useLayoutEffect:Lt,useInsertionEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useSyncExternalStore:Lt,useId:Lt,useHostTransitionStatus:Lt,useFormState:Lt,useActionState:Lt,useOptimistic:Lt,useMemoCache:Lt,useCacheRefresh:Lt};Gc.useEffectEvent=Lt;var pT={readContext:Tn,use:Mh,useCallback:function(a,s){return Qn().memoizedState=[a,s===void 0?null:s],a},useContext:Tn,useEffect:Qj,useImperativeHandle:function(a,s,f){f=f!=null?f.concat([a]):null,Dh(4194308,4,nT.bind(null,s,a),f)},useLayoutEffect:function(a,s){return Dh(4194308,4,a,s)},useInsertionEffect:function(a,s){Dh(4,2,a,s)},useMemo:function(a,s){var f=Qn();s=s===void 0?null:s;var p=a();if(_s){Zn(!0);try{a()}finally{Zn(!1)}}return f.memoizedState=[p,s],p},useReducer:function(a,s,f){var p=Qn();if(f!==void 0){var x=f(s);if(_s){Zn(!0);try{f(s)}finally{Zn(!1)}}}else x=s;return p.memoizedState=p.baseState=x,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:x},p.queue=a,a=a.dispatch=D8.bind(null,$e,a),[p.memoizedState,a]},useRef:function(a){var s=Qn();return a={current:a},s.memoizedState=a},useState:function(a){a=Zy(a);var s=a.queue,f=dT.bind(null,$e,s);return s.dispatch=f,[a.memoizedState,f]},useDebugValue:eb,useDeferredValue:function(a,s){var f=Qn();return tb(f,a,s)},useTransition:function(){var a=Zy(!1);return a=sT.bind(null,$e,a.queue,!0,!1),Qn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,f){var p=$e,x=Qn();if(Xe){if(f===void 0)throw Error(r(407));f=f()}else{if(f=s(),mt===null)throw Error(r(349));(Ge&127)!==0||Lj(p,s,f)}x.memoizedState=f;var S={value:f,getSnapshot:s};return x.queue=S,Qj(zj.bind(null,p,S,a),[a]),p.flags|=2048,Zl(9,{destroy:void 0},Ij.bind(null,p,S,f,s),null),f},useId:function(){var a=Qn(),s=mt.identifierPrefix;if(Xe){var f=Hi,p=Fi;f=(p&~(1<<32-Xt(p)-1)).toString(32)+f,s="_"+s+"R_"+f,f=Nh++,0<f&&(s+="H"+f.toString(32)),s+="_"}else f=T8++,s="_"+s+"r_"+f.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:rb,useFormState:Gj,useActionState:Gj,useOptimistic:function(a){var s=Qn();s.memoizedState=s.baseState=a;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=f,s=ib.bind(null,$e,!0,f),f.dispatch=s,[a,s]},useMemoCache:Yy,useCacheRefresh:function(){return Qn().memoizedState=R8.bind(null,$e)},useEffectEvent:function(a){var s=Qn(),f={impl:a};return s.memoizedState=f,function(){if((at&2)!==0)throw Error(r(440));return f.impl.apply(void 0,arguments)}}},ab={readContext:Tn,use:Mh,useCallback:iT,useContext:Tn,useEffect:Jy,useImperativeHandle:rT,useInsertionEffect:eT,useLayoutEffect:tT,useMemo:aT,useReducer:Rh,useRef:Zj,useState:function(){return Rh(ka)},useDebugValue:eb,useDeferredValue:function(a,s){var f=qt();return oT(f,ft.memoizedState,a,s)},useTransition:function(){var a=Rh(ka)[0],s=qt().memoizedState;return[typeof a=="boolean"?a:qc(a),s]},useSyncExternalStore:kj,useId:cT,useHostTransitionStatus:rb,useFormState:Yj,useActionState:Yj,useOptimistic:function(a,s){var f=qt();return Uj(f,ft,a,s)},useMemoCache:Yy,useCacheRefresh:fT};ab.useEffectEvent=Jj;var gT={readContext:Tn,use:Mh,useCallback:iT,useContext:Tn,useEffect:Jy,useImperativeHandle:rT,useInsertionEffect:eT,useLayoutEffect:tT,useMemo:aT,useReducer:Xy,useRef:Zj,useState:function(){return Xy(ka)},useDebugValue:eb,useDeferredValue:function(a,s){var f=qt();return ft===null?tb(f,a,s):oT(f,ft.memoizedState,a,s)},useTransition:function(){var a=Xy(ka)[0],s=qt().memoizedState;return[typeof a=="boolean"?a:qc(a),s]},useSyncExternalStore:kj,useId:cT,useHostTransitionStatus:rb,useFormState:Xj,useActionState:Xj,useOptimistic:function(a,s){var f=qt();return ft!==null?Uj(f,ft,a,s):(f.baseState=a,[a,f.queue.dispatch])},useMemoCache:Yy,useCacheRefresh:fT};gT.useEffectEvent=Jj;function ob(a,s,f,p){s=a.memoizedState,f=f(p,s),f=f==null?s:h({},s,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var sb={enqueueSetState:function(a,s,f){a=a._reactInternals;var p=Rr(),x=No(p);x.payload=s,f!=null&&(x.callback=f),s=_o(a,x,p),s!==null&&(gr(s,a,p),Uc(s,a,p))},enqueueReplaceState:function(a,s,f){a=a._reactInternals;var p=Rr(),x=No(p);x.tag=1,x.payload=s,f!=null&&(x.callback=f),s=_o(a,x,p),s!==null&&(gr(s,a,p),Uc(s,a,p))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var f=Rr(),p=No(f);p.tag=2,s!=null&&(p.callback=s),s=_o(a,p,f),s!==null&&(gr(s,a,f),Uc(s,a,f))}};function vT(a,s,f,p,x,S,P){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(p,S,P):s.prototype&&s.prototype.isPureReactComponent?!Rc(f,p)||!Rc(x,S):!0}function yT(a,s,f,p){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(f,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(f,p),s.state!==a&&sb.enqueueReplaceState(s,s.state,null)}function Ms(a,s){var f=s;if("ref"in s){f={};for(var p in s)p!=="ref"&&(f[p]=s[p])}if(a=a.defaultProps){f===s&&(f=h({},f));for(var x in a)f[x]===void 0&&(f[x]=a[x])}return f}function bT(a){mh(a)}function xT(a){console.error(a)}function wT(a){mh(a)}function Ih(a,s){try{var f=a.onUncaughtError;f(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function ST(a,s,f){try{var p=a.onCaughtError;p(f.value,{componentStack:f.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function lb(a,s,f){return f=No(f),f.tag=3,f.payload={element:null},f.callback=function(){Ih(a,s)},f}function AT(a){return a=No(a),a.tag=3,a}function ET(a,s,f,p){var x=f.type.getDerivedStateFromError;if(typeof x=="function"){var S=p.value;a.payload=function(){return x(S)},a.callback=function(){ST(s,f,p)}}var P=f.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(a.callback=function(){ST(s,f,p),typeof x!="function"&&(Io===null?Io=new Set([this]):Io.add(this));var D=p.stack;this.componentDidCatch(p.value,{componentStack:D!==null?D:""})})}function k8(a,s,f,p,x){if(f.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=f.alternate,s!==null&&Fl(s,f,x,!0),f=Pr.current,f!==null){switch(f.tag){case 31:case 13:return ei===null?Wh():f.alternate===null&&It===0&&(It=3),f.flags&=-257,f.flags|=65536,f.lanes=x,p===Eh?f.flags|=16384:(s=f.updateQueue,s===null?f.updateQueue=new Set([p]):s.add(p),Rb(a,p,x)),!1;case 22:return f.flags|=65536,p===Eh?f.flags|=16384:(s=f.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([p])},f.updateQueue=s):(f=s.retryQueue,f===null?s.retryQueue=new Set([p]):f.add(p)),Rb(a,p,x)),!1}throw Error(r(435,f.tag))}return Rb(a,p,x),Wh(),!1}if(Xe)return s=Pr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=x,p!==Ty&&(a=Error(r(422),{cause:p}),Lc(Xr(a,f)))):(p!==Ty&&(s=Error(r(423),{cause:p}),Lc(Xr(s,f))),a=a.current.alternate,a.flags|=65536,x&=-x,a.lanes|=x,p=Xr(p,f),x=lb(a.stateNode,p,x),zy(a,x),It!==4&&(It=2)),!1;var S=Error(r(520),{cause:p});if(S=Xr(S,f),tf===null?tf=[S]:tf.push(S),It!==4&&(It=2),s===null)return!0;p=Xr(p,f),f=s;do{switch(f.tag){case 3:return f.flags|=65536,a=x&-x,f.lanes|=a,a=lb(f.stateNode,p,a),zy(f,a),!1;case 1:if(s=f.type,S=f.stateNode,(f.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Io===null||!Io.has(S))))return f.flags|=65536,x&=-x,f.lanes|=x,x=AT(x),ET(x,a,f,p),zy(f,x),!1}f=f.return}while(f!==null);return!1}var ub=Error(r(461)),Jt=!1;function On(a,s,f,p){s.child=a===null?Oj(s,null,f,p):Ns(s,a.child,f,p)}function CT(a,s,f,p,x){f=f.render;var S=s.ref;if("ref"in p){var P={};for(var D in p)D!=="ref"&&(P[D]=p[D])}else P=p;return js(s),p=Hy(a,s,f,P,S,x),D=qy(),a!==null&&!Jt?(Ky(a,s,x),La(a,s,x)):(Xe&&D&&Cy(s),s.flags|=1,On(a,s,p,x),s.child)}function jT(a,s,f,p,x){if(a===null){var S=f.type;return typeof S=="function"&&!Sy(S)&&S.defaultProps===void 0&&f.compare===null?(s.tag=15,s.type=S,TT(a,s,S,p,x)):(a=yh(f.type,null,p,s,s.mode,x),a.ref=s.ref,a.return=s,s.child=a)}if(S=a.child,!vb(a,x)){var P=S.memoizedProps;if(f=f.compare,f=f!==null?f:Rc,f(P,p)&&a.ref===s.ref)return La(a,s,x)}return s.flags|=1,a=Na(S,p),a.ref=s.ref,a.return=s,s.child=a}function TT(a,s,f,p,x){if(a!==null){var S=a.memoizedProps;if(Rc(S,p)&&a.ref===s.ref)if(Jt=!1,s.pendingProps=p=S,vb(a,x))(a.flags&131072)!==0&&(Jt=!0);else return s.lanes=a.lanes,La(a,s,x)}return cb(a,s,f,p,x)}function OT(a,s,f,p){var x=p.children,S=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((s.flags&128)!==0){if(S=S!==null?S.baseLanes|f:f,a!==null){for(p=s.child=a.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;p=x&~S}else p=0,s.child=null;return PT(a,s,S,f,p)}if((f&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&Sh(s,S!==null?S.cachePool:null),S!==null?_j(s,S):$y(),Mj(s);else return p=s.lanes=536870912,PT(a,s,S!==null?S.baseLanes|f:f,f,p)}else S!==null?(Sh(s,S.cachePool),_j(s,S),Ro(),s.memoizedState=null):(a!==null&&Sh(s,null),$y(),Ro());return On(a,s,x,f),s.child}function Yc(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function PT(a,s,f,p,x){var S=Dy();return S=S===null?null:{parent:Zt._currentValue,pool:S},s.memoizedState={baseLanes:f,cachePool:S},a!==null&&Sh(s,null),$y(),Mj(s),a!==null&&Fl(a,s,p,!0),s.childLanes=x,null}function zh(a,s){return s=$h({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function NT(a,s,f){return Ns(s,a.child,null,f),a=zh(s,s.pendingProps),a.flags|=2,Nr(s),s.memoizedState=null,a}function L8(a,s,f){var p=s.pendingProps,x=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Xe){if(p.mode==="hidden")return a=zh(s,p),s.lanes=536870912,Yc(null,a);if(Vy(s),(a=xt)?(a=VO(a,Jr),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Co!==null?{id:Fi,overflow:Hi}:null,retryLane:536870912,hydrationErrors:null},f=hj(a),f.return=s,s.child=f,jn=s,xt=null)):a=null,a===null)throw To(s);return s.lanes=536870912,null}return zh(s,p)}var S=a.memoizedState;if(S!==null){var P=S.dehydrated;if(Vy(s),x)if(s.flags&256)s.flags&=-257,s=NT(a,s,f);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(Jt||Fl(a,s,f,!1),x=(f&a.childLanes)!==0,Jt||x){if(p=mt,p!==null&&(P=Vn(p,f),P!==0&&P!==S.retryLane))throw S.retryLane=P,Ss(a,P),gr(p,a,P),ub;Wh(),s=NT(a,s,f)}else a=S.treeContext,xt=ti(P.nextSibling),jn=s,Xe=!0,jo=null,Jr=!1,a!==null&&gj(s,a),s=zh(s,p),s.flags|=4096;return s}return a=Na(a.child,{mode:p.mode,children:p.children}),a.ref=s.ref,s.child=a,a.return=s,a}function Bh(a,s){var f=s.ref;if(f===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(r(284));(a===null||a.ref!==f)&&(s.flags|=4194816)}}function cb(a,s,f,p,x){return js(s),f=Hy(a,s,f,p,void 0,x),p=qy(),a!==null&&!Jt?(Ky(a,s,x),La(a,s,x)):(Xe&&p&&Cy(s),s.flags|=1,On(a,s,f,x),s.child)}function _T(a,s,f,p,x,S){return js(s),s.updateQueue=null,f=Dj(s,p,f,x),Rj(a),p=qy(),a!==null&&!Jt?(Ky(a,s,S),La(a,s,S)):(Xe&&p&&Cy(s),s.flags|=1,On(a,s,f,S),s.child)}function MT(a,s,f,p,x){if(js(s),s.stateNode===null){var S=Bl,P=f.contextType;typeof P=="object"&&P!==null&&(S=Tn(P)),S=new f(p,S),s.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=sb,s.stateNode=S,S._reactInternals=s,S=s.stateNode,S.props=p,S.state=s.memoizedState,S.refs={},Ly(s),P=f.contextType,S.context=typeof P=="object"&&P!==null?Tn(P):Bl,S.state=s.memoizedState,P=f.getDerivedStateFromProps,typeof P=="function"&&(ob(s,f,P,p),S.state=s.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(P=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),P!==S.state&&sb.enqueueReplaceState(S,S.state,null),Fc(s,p,S,x),Vc(),S.state=s.memoizedState),typeof S.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(a===null){S=s.stateNode;var D=s.memoizedProps,U=Ms(f,D);S.props=U;var J=S.context,ue=f.contextType;P=Bl,typeof ue=="object"&&ue!==null&&(P=Tn(ue));var fe=f.getDerivedStateFromProps;ue=typeof fe=="function"||typeof S.getSnapshotBeforeUpdate=="function",D=s.pendingProps!==D,ue||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(D||J!==P)&&yT(s,S,p,P),Po=!1;var te=s.memoizedState;S.state=te,Fc(s,p,S,x),Vc(),J=s.memoizedState,D||te!==J||Po?(typeof fe=="function"&&(ob(s,f,fe,p),J=s.memoizedState),(U=Po||vT(s,f,U,p,te,J,P))?(ue||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(s.flags|=4194308)):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=J),S.props=p,S.state=J,S.context=P,p=U):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{S=s.stateNode,Iy(a,s),P=s.memoizedProps,ue=Ms(f,P),S.props=ue,fe=s.pendingProps,te=S.context,J=f.contextType,U=Bl,typeof J=="object"&&J!==null&&(U=Tn(J)),D=f.getDerivedStateFromProps,(J=typeof D=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(P!==fe||te!==U)&&yT(s,S,p,U),Po=!1,te=s.memoizedState,S.state=te,Fc(s,p,S,x),Vc();var ie=s.memoizedState;P!==fe||te!==ie||Po||a!==null&&a.dependencies!==null&&xh(a.dependencies)?(typeof D=="function"&&(ob(s,f,D,p),ie=s.memoizedState),(ue=Po||vT(s,f,ue,p,te,ie,U)||a!==null&&a.dependencies!==null&&xh(a.dependencies))?(J||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(p,ie,U),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(p,ie,U)),typeof S.componentDidUpdate=="function"&&(s.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof S.componentDidUpdate!="function"||P===a.memoizedProps&&te===a.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||P===a.memoizedProps&&te===a.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=ie),S.props=p,S.state=ie,S.context=U,p=ue):(typeof S.componentDidUpdate!="function"||P===a.memoizedProps&&te===a.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||P===a.memoizedProps&&te===a.memoizedState||(s.flags|=1024),p=!1)}return S=p,Bh(a,s),p=(s.flags&128)!==0,S||p?(S=s.stateNode,f=p&&typeof f.getDerivedStateFromError!="function"?null:S.render(),s.flags|=1,a!==null&&p?(s.child=Ns(s,a.child,null,x),s.child=Ns(s,null,f,x)):On(a,s,f,x),s.memoizedState=S.state,a=s.child):a=La(a,s,x),a}function RT(a,s,f,p){return Es(),s.flags|=256,On(a,s,f,p),s.child}var fb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function db(a){return{baseLanes:a,cachePool:Sj()}}function hb(a,s,f){return a=a!==null?a.childLanes&~f:0,s&&(a|=Mr),a}function DT(a,s,f){var p=s.pendingProps,x=!1,S=(s.flags&128)!==0,P;if((P=S)||(P=a!==null&&a.memoizedState===null?!1:(Ht.current&2)!==0),P&&(x=!0,s.flags&=-129),P=(s.flags&32)!==0,s.flags&=-33,a===null){if(Xe){if(x?Mo(s):Ro(),(a=xt)?(a=VO(a,Jr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Co!==null?{id:Fi,overflow:Hi}:null,retryLane:536870912,hydrationErrors:null},f=hj(a),f.return=s,s.child=f,jn=s,xt=null)):a=null,a===null)throw To(s);return Wb(a)?s.lanes=32:s.lanes=536870912,null}var D=p.children;return p=p.fallback,x?(Ro(),x=s.mode,D=$h({mode:"hidden",children:D},x),p=As(p,x,f,null),D.return=s,p.return=s,D.sibling=p,s.child=D,p=s.child,p.memoizedState=db(f),p.childLanes=hb(a,P,f),s.memoizedState=fb,Yc(null,p)):(Mo(s),mb(s,D))}var U=a.memoizedState;if(U!==null&&(D=U.dehydrated,D!==null)){if(S)s.flags&256?(Mo(s),s.flags&=-257,s=pb(a,s,f)):s.memoizedState!==null?(Ro(),s.child=a.child,s.flags|=128,s=null):(Ro(),D=p.fallback,x=s.mode,p=$h({mode:"visible",children:p.children},x),D=As(D,x,f,null),D.flags|=2,p.return=s,D.return=s,p.sibling=D,s.child=p,Ns(s,a.child,null,f),p=s.child,p.memoizedState=db(f),p.childLanes=hb(a,P,f),s.memoizedState=fb,s=Yc(null,p));else if(Mo(s),Wb(D)){if(P=D.nextSibling&&D.nextSibling.dataset,P)var J=P.dgst;P=J,p=Error(r(419)),p.stack="",p.digest=P,Lc({value:p,source:null,stack:null}),s=pb(a,s,f)}else if(Jt||Fl(a,s,f,!1),P=(f&a.childLanes)!==0,Jt||P){if(P=mt,P!==null&&(p=Vn(P,f),p!==0&&p!==U.retryLane))throw U.retryLane=p,Ss(a,p),gr(P,a,p),ub;Yb(D)||Wh(),s=pb(a,s,f)}else Yb(D)?(s.flags|=192,s.child=a.child,s=null):(a=U.treeContext,xt=ti(D.nextSibling),jn=s,Xe=!0,jo=null,Jr=!1,a!==null&&gj(s,a),s=mb(s,p.children),s.flags|=4096);return s}return x?(Ro(),D=p.fallback,x=s.mode,U=a.child,J=U.sibling,p=Na(U,{mode:"hidden",children:p.children}),p.subtreeFlags=U.subtreeFlags&65011712,J!==null?D=Na(J,D):(D=As(D,x,f,null),D.flags|=2),D.return=s,p.return=s,p.sibling=D,s.child=p,Yc(null,p),p=s.child,D=a.child.memoizedState,D===null?D=db(f):(x=D.cachePool,x!==null?(U=Zt._currentValue,x=x.parent!==U?{parent:U,pool:U}:x):x=Sj(),D={baseLanes:D.baseLanes|f,cachePool:x}),p.memoizedState=D,p.childLanes=hb(a,P,f),s.memoizedState=fb,Yc(a.child,p)):(Mo(s),f=a.child,a=f.sibling,f=Na(f,{mode:"visible",children:p.children}),f.return=s,f.sibling=null,a!==null&&(P=s.deletions,P===null?(s.deletions=[a],s.flags|=16):P.push(a)),s.child=f,s.memoizedState=null,f)}function mb(a,s){return s=$h({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function $h(a,s){return a=Or(22,a,null,s),a.lanes=0,a}function pb(a,s,f){return Ns(s,a.child,null,f),a=mb(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function kT(a,s,f){a.lanes|=s;var p=a.alternate;p!==null&&(p.lanes|=s),Ny(a.return,s,f)}function gb(a,s,f,p,x,S){var P=a.memoizedState;P===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:f,tailMode:x,treeForkCount:S}:(P.isBackwards=s,P.rendering=null,P.renderingStartTime=0,P.last=p,P.tail=f,P.tailMode=x,P.treeForkCount=S)}function LT(a,s,f){var p=s.pendingProps,x=p.revealOrder,S=p.tail;p=p.children;var P=Ht.current,D=(P&2)!==0;if(D?(P=P&1|2,s.flags|=128):P&=1,q(Ht,P),On(a,s,p,f),p=Xe?kc:0,!D&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&kT(a,f,s);else if(a.tag===19)kT(a,f,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(x){case"forwards":for(f=s.child,x=null;f!==null;)a=f.alternate,a!==null&&Oh(a)===null&&(x=f),f=f.sibling;f=x,f===null?(x=s.child,s.child=null):(x=f.sibling,f.sibling=null),gb(s,!1,x,f,S,p);break;case"backwards":case"unstable_legacy-backwards":for(f=null,x=s.child,s.child=null;x!==null;){if(a=x.alternate,a!==null&&Oh(a)===null){s.child=x;break}a=x.sibling,x.sibling=f,f=x,x=a}gb(s,!0,f,null,S,p);break;case"together":gb(s,!1,null,null,void 0,p);break;default:s.memoizedState=null}return s.child}function La(a,s,f){if(a!==null&&(s.dependencies=a.dependencies),Lo|=s.lanes,(f&s.childLanes)===0)if(a!==null){if(Fl(a,s,f,!1),(f&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,f=Na(a,a.pendingProps),s.child=f,f.return=s;a.sibling!==null;)a=a.sibling,f=f.sibling=Na(a,a.pendingProps),f.return=s;f.sibling=null}return s.child}function vb(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&xh(a)))}function I8(a,s,f){switch(s.tag){case 3:he(s,s.stateNode.containerInfo),Oo(s,Zt,a.memoizedState.cache),Es();break;case 27:case 5:le(s);break;case 4:he(s,s.stateNode.containerInfo);break;case 10:Oo(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Vy(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(Mo(s),s.flags|=128,null):(f&s.child.childLanes)!==0?DT(a,s,f):(Mo(s),a=La(a,s,f),a!==null?a.sibling:null);Mo(s);break;case 19:var x=(a.flags&128)!==0;if(p=(f&s.childLanes)!==0,p||(Fl(a,s,f,!1),p=(f&s.childLanes)!==0),x){if(p)return LT(a,s,f);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),q(Ht,Ht.current),p)break;return null;case 22:return s.lanes=0,OT(a,s,f,s.pendingProps);case 24:Oo(s,Zt,a.memoizedState.cache)}return La(a,s,f)}function IT(a,s,f){if(a!==null)if(a.memoizedProps!==s.pendingProps)Jt=!0;else{if(!vb(a,f)&&(s.flags&128)===0)return Jt=!1,I8(a,s,f);Jt=(a.flags&131072)!==0}else Jt=!1,Xe&&(s.flags&1048576)!==0&&pj(s,kc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(a=Os(s.elementType),s.type=a,typeof a=="function")Sy(a)?(p=Ms(a,p),s.tag=1,s=MT(null,s,a,p,f)):(s.tag=0,s=cb(null,s,a,p,f));else{if(a!=null){var x=a.$$typeof;if(x===O){s.tag=11,s=CT(null,s,a,p,f);break e}else if(x===M){s.tag=14,s=jT(null,s,a,p,f);break e}}throw s=Q(a)||a,Error(r(306,s,""))}}return s;case 0:return cb(a,s,s.type,s.pendingProps,f);case 1:return p=s.type,x=Ms(p,s.pendingProps),MT(a,s,p,x,f);case 3:e:{if(he(s,s.stateNode.containerInfo),a===null)throw Error(r(387));p=s.pendingProps;var S=s.memoizedState;x=S.element,Iy(a,s),Fc(s,p,null,f);var P=s.memoizedState;if(p=P.cache,Oo(s,Zt,p),p!==S.cache&&_y(s,[Zt],f,!0),Vc(),p=P.element,S.isDehydrated)if(S={element:p,isDehydrated:!1,cache:P.cache},s.updateQueue.baseState=S,s.memoizedState=S,s.flags&256){s=RT(a,s,p,f);break e}else if(p!==x){x=Xr(Error(r(424)),s),Lc(x),s=RT(a,s,p,f);break e}else for(a=s.stateNode.containerInfo,a.nodeType===9?a=a.body:a=a.nodeName==="HTML"?a.ownerDocument.body:a,xt=ti(a.firstChild),jn=s,Xe=!0,jo=null,Jr=!0,f=Oj(s,null,p,f),s.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Es(),p===x){s=La(a,s,f);break e}On(a,s,p,f)}s=s.child}return s;case 26:return Bh(a,s),a===null?(f=YO(s.type,null,s.pendingProps,null))?s.memoizedState=f:Xe||(f=s.type,a=s.pendingProps,p=nm(pe.current).createElement(f),p[ln]=s,p[Fn]=a,Pn(p,f,a),Je(p),s.stateNode=p):s.memoizedState=YO(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return le(s),a===null&&Xe&&(p=s.stateNode=qO(s.type,s.pendingProps,pe.current),jn=s,Jr=!0,x=xt,Uo(s.type)?(Xb=x,xt=ti(p.firstChild)):xt=x),On(a,s,s.pendingProps.children,f),Bh(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Xe&&((x=p=xt)&&(p=hF(p,s.type,s.pendingProps,Jr),p!==null?(s.stateNode=p,jn=s,xt=ti(p.firstChild),Jr=!1,x=!0):x=!1),x||To(s)),le(s),x=s.type,S=s.pendingProps,P=a!==null?a.memoizedProps:null,p=S.children,qb(x,S)?p=null:P!==null&&qb(x,P)&&(s.flags|=32),s.memoizedState!==null&&(x=Hy(a,s,O8,null,null,f),cf._currentValue=x),Bh(a,s),On(a,s,p,f),s.child;case 6:return a===null&&Xe&&((a=f=xt)&&(f=mF(f,s.pendingProps,Jr),f!==null?(s.stateNode=f,jn=s,xt=null,a=!0):a=!1),a||To(s)),null;case 13:return DT(a,s,f);case 4:return he(s,s.stateNode.containerInfo),p=s.pendingProps,a===null?s.child=Ns(s,null,p,f):On(a,s,p,f),s.child;case 11:return CT(a,s,s.type,s.pendingProps,f);case 7:return On(a,s,s.pendingProps,f),s.child;case 8:return On(a,s,s.pendingProps.children,f),s.child;case 12:return On(a,s,s.pendingProps.children,f),s.child;case 10:return p=s.pendingProps,Oo(s,s.type,p.value),On(a,s,p.children,f),s.child;case 9:return x=s.type._context,p=s.pendingProps.children,js(s),x=Tn(x),p=p(x),s.flags|=1,On(a,s,p,f),s.child;case 14:return jT(a,s,s.type,s.pendingProps,f);case 15:return TT(a,s,s.type,s.pendingProps,f);case 19:return LT(a,s,f);case 31:return L8(a,s,f);case 22:return OT(a,s,f,s.pendingProps);case 24:return js(s),p=Tn(Zt),a===null?(x=Dy(),x===null&&(x=mt,S=My(),x.pooledCache=S,S.refCount++,S!==null&&(x.pooledCacheLanes|=f),x=S),s.memoizedState={parent:p,cache:x},Ly(s),Oo(s,Zt,x)):((a.lanes&f)!==0&&(Iy(a,s),Fc(s,null,null,f),Vc()),x=a.memoizedState,S=s.memoizedState,x.parent!==p?(x={parent:p,cache:p},s.memoizedState=x,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=x),Oo(s,Zt,p)):(p=S.cache,Oo(s,Zt,p),p!==x.cache&&_y(s,[Zt],f,!0))),On(a,s,s.pendingProps.children,f),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Ia(a){a.flags|=4}function yb(a,s,f,p,x){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(x&335544128)===x)if(a.stateNode.complete)a.flags|=8192;else if(cO())a.flags|=8192;else throw Ps=Eh,ky}else a.flags&=-16777217}function zT(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!JO(s))if(cO())a.flags|=8192;else throw Ps=Eh,ky}function Uh(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?bt():536870912,a.lanes|=s,tu|=s)}function Wc(a,s){if(!Xe)switch(a.tailMode){case"hidden":s=a.tail;for(var f=null;s!==null;)s.alternate!==null&&(f=s),s=s.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var p=null;f!==null;)f.alternate!==null&&(p=f),f=f.sibling;p===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:p.sibling=null}}function wt(a){var s=a.alternate!==null&&a.alternate.child===a.child,f=0,p=0;if(s)for(var x=a.child;x!==null;)f|=x.lanes|x.childLanes,p|=x.subtreeFlags&65011712,p|=x.flags&65011712,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)f|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=p,a.childLanes=f,s}function z8(a,s,f){var p=s.pendingProps;switch(jy(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(s),null;case 1:return wt(s),null;case 3:return f=s.stateNode,p=null,a!==null&&(p=a.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),Ra(Zt),oe(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(a===null||a.child===null)&&(Vl(s)?Ia(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Oy())),wt(s),null;case 26:var x=s.type,S=s.memoizedState;return a===null?(Ia(s),S!==null?(wt(s),zT(s,S)):(wt(s),yb(s,x,null,p,f))):S?S!==a.memoizedState?(Ia(s),wt(s),zT(s,S)):(wt(s),s.flags&=-16777217):(a=a.memoizedProps,a!==p&&Ia(s),wt(s),yb(s,x,a,p,f)),null;case 27:if(ve(s),f=pe.current,x=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==p&&Ia(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return wt(s),null}a=ne.current,Vl(s)?vj(s):(a=qO(x,p,f),s.stateNode=a,Ia(s))}return wt(s),null;case 5:if(ve(s),x=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==p&&Ia(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return wt(s),null}if(S=ne.current,Vl(s))vj(s);else{var P=nm(pe.current);switch(S){case 1:S=P.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:S=P.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":S=P.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":S=P.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":S=P.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof p.is=="string"?P.createElement("select",{is:p.is}):P.createElement("select"),p.multiple?S.multiple=!0:p.size&&(S.size=p.size);break;default:S=typeof p.is=="string"?P.createElement(x,{is:p.is}):P.createElement(x)}}S[ln]=s,S[Fn]=p;e:for(P=s.child;P!==null;){if(P.tag===5||P.tag===6)S.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===s)break e;for(;P.sibling===null;){if(P.return===null||P.return===s)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}s.stateNode=S;e:switch(Pn(S,x,p),x){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&Ia(s)}}return wt(s),yb(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,f),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==p&&Ia(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(a=pe.current,Vl(s)){if(a=s.stateNode,f=s.memoizedProps,p=null,x=jn,x!==null)switch(x.tag){case 27:case 5:p=x.memoizedProps}a[ln]=s,a=!!(a.nodeValue===f||p!==null&&p.suppressHydrationWarning===!0||DO(a.nodeValue,f)),a||To(s,!0)}else a=nm(a).createTextNode(p),a[ln]=s,s.stateNode=a}return wt(s),null;case 31:if(f=s.memoizedState,a===null||a.memoizedState!==null){if(p=Vl(s),f!==null){if(a===null){if(!p)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[ln]=s}else Es(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;wt(s),a=!1}else f=Oy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=f),a=!0;if(!a)return s.flags&256?(Nr(s),s):(Nr(s),null);if((s.flags&128)!==0)throw Error(r(558))}return wt(s),null;case 13:if(p=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(x=Vl(s),p!==null&&p.dehydrated!==null){if(a===null){if(!x)throw Error(r(318));if(x=s.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[ln]=s}else Es(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;wt(s),x=!1}else x=Oy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=x),x=!0;if(!x)return s.flags&256?(Nr(s),s):(Nr(s),null)}return Nr(s),(s.flags&128)!==0?(s.lanes=f,s):(f=p!==null,a=a!==null&&a.memoizedState!==null,f&&(p=s.child,x=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(x=p.alternate.memoizedState.cachePool.pool),S=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(S=p.memoizedState.cachePool.pool),S!==x&&(p.flags|=2048)),f!==a&&f&&(s.child.flags|=8192),Uh(s,s.updateQueue),wt(s),null);case 4:return oe(),a===null&&$b(s.stateNode.containerInfo),wt(s),null;case 10:return Ra(s.type),wt(s),null;case 19:if(I(Ht),p=s.memoizedState,p===null)return wt(s),null;if(x=(s.flags&128)!==0,S=p.rendering,S===null)if(x)Wc(p,!1);else{if(It!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(S=Oh(a),S!==null){for(s.flags|=128,Wc(p,!1),a=S.updateQueue,s.updateQueue=a,Uh(s,a),s.subtreeFlags=0,a=f,f=s.child;f!==null;)dj(f,a),f=f.sibling;return q(Ht,Ht.current&1|2),Xe&&_a(s,p.treeForkCount),s.child}a=a.sibling}p.tail!==null&&Yt()>Kh&&(s.flags|=128,x=!0,Wc(p,!1),s.lanes=4194304)}else{if(!x)if(a=Oh(S),a!==null){if(s.flags|=128,x=!0,a=a.updateQueue,s.updateQueue=a,Uh(s,a),Wc(p,!0),p.tail===null&&p.tailMode==="hidden"&&!S.alternate&&!Xe)return wt(s),null}else 2*Yt()-p.renderingStartTime>Kh&&f!==536870912&&(s.flags|=128,x=!0,Wc(p,!1),s.lanes=4194304);p.isBackwards?(S.sibling=s.child,s.child=S):(a=p.last,a!==null?a.sibling=S:s.child=S,p.last=S)}return p.tail!==null?(a=p.tail,p.rendering=a,p.tail=a.sibling,p.renderingStartTime=Yt(),a.sibling=null,f=Ht.current,q(Ht,x?f&1|2:f&1),Xe&&_a(s,p.treeForkCount),a):(wt(s),null);case 22:case 23:return Nr(s),Uy(),p=s.memoizedState!==null,a!==null?a.memoizedState!==null!==p&&(s.flags|=8192):p&&(s.flags|=8192),p?(f&536870912)!==0&&(s.flags&128)===0&&(wt(s),s.subtreeFlags&6&&(s.flags|=8192)):wt(s),f=s.updateQueue,f!==null&&Uh(s,f.retryQueue),f=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==f&&(s.flags|=2048),a!==null&&I(Ts),null;case 24:return f=null,a!==null&&(f=a.memoizedState.cache),s.memoizedState.cache!==f&&(s.flags|=2048),Ra(Zt),wt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function B8(a,s){switch(jy(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Ra(Zt),oe(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return ve(s),null;case 31:if(s.memoizedState!==null){if(Nr(s),s.alternate===null)throw Error(r(340));Es()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Nr(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Es()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return I(Ht),null;case 4:return oe(),null;case 10:return Ra(s.type),null;case 22:case 23:return Nr(s),Uy(),a!==null&&I(Ts),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return Ra(Zt),null;case 25:return null;default:return null}}function BT(a,s){switch(jy(s),s.tag){case 3:Ra(Zt),oe();break;case 26:case 27:case 5:ve(s);break;case 4:oe();break;case 31:s.memoizedState!==null&&Nr(s);break;case 13:Nr(s);break;case 19:I(Ht);break;case 10:Ra(s.type);break;case 22:case 23:Nr(s),Uy(),a!==null&&I(Ts);break;case 24:Ra(Zt)}}function Xc(a,s){try{var f=s.updateQueue,p=f!==null?f.lastEffect:null;if(p!==null){var x=p.next;f=x;do{if((f.tag&a)===a){p=void 0;var S=f.create,P=f.inst;p=S(),P.destroy=p}f=f.next}while(f!==x)}}catch(D){ct(s,s.return,D)}}function Do(a,s,f){try{var p=s.updateQueue,x=p!==null?p.lastEffect:null;if(x!==null){var S=x.next;p=S;do{if((p.tag&a)===a){var P=p.inst,D=P.destroy;if(D!==void 0){P.destroy=void 0,x=s;var U=f,J=D;try{J()}catch(ue){ct(x,U,ue)}}}p=p.next}while(p!==S)}}catch(ue){ct(s,s.return,ue)}}function $T(a){var s=a.updateQueue;if(s!==null){var f=a.stateNode;try{Nj(s,f)}catch(p){ct(a,a.return,p)}}}function UT(a,s,f){f.props=Ms(a.type,a.memoizedProps),f.state=a.memoizedState;try{f.componentWillUnmount()}catch(p){ct(a,s,p)}}function Zc(a,s){try{var f=a.ref;if(f!==null){switch(a.tag){case 26:case 27:case 5:var p=a.stateNode;break;case 30:p=a.stateNode;break;default:p=a.stateNode}typeof f=="function"?a.refCleanup=f(p):f.current=p}}catch(x){ct(a,s,x)}}function qi(a,s){var f=a.ref,p=a.refCleanup;if(f!==null)if(typeof p=="function")try{p()}catch(x){ct(a,s,x)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(x){ct(a,s,x)}else f.current=null}function VT(a){var s=a.type,f=a.memoizedProps,p=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":f.autoFocus&&p.focus();break e;case"img":f.src?p.src=f.src:f.srcSet&&(p.srcset=f.srcSet)}}catch(x){ct(a,a.return,x)}}function bb(a,s,f){try{var p=a.stateNode;sF(p,a.type,f,s),p[Fn]=s}catch(x){ct(a,a.return,x)}}function FT(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Uo(a.type)||a.tag===4}function xb(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||FT(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&&Uo(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 wb(a,s,f){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(a,s):(s=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,s.appendChild(a),f=f._reactRootContainer,f!=null||s.onclick!==null||(s.onclick=Oa));else if(p!==4&&(p===27&&Uo(a.type)&&(f=a.stateNode,s=null),a=a.child,a!==null))for(wb(a,s,f),a=a.sibling;a!==null;)wb(a,s,f),a=a.sibling}function Vh(a,s,f){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?f.insertBefore(a,s):f.appendChild(a);else if(p!==4&&(p===27&&Uo(a.type)&&(f=a.stateNode),a=a.child,a!==null))for(Vh(a,s,f),a=a.sibling;a!==null;)Vh(a,s,f),a=a.sibling}function HT(a){var s=a.stateNode,f=a.memoizedProps;try{for(var p=a.type,x=s.attributes;x.length;)s.removeAttributeNode(x[0]);Pn(s,p,f),s[ln]=a,s[Fn]=f}catch(S){ct(a,a.return,S)}}var za=!1,en=!1,Sb=!1,qT=typeof WeakSet=="function"?WeakSet:Set,bn=null;function $8(a,s){if(a=a.containerInfo,Fb=um,a=rj(a),py(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var p=f.getSelection&&f.getSelection();if(p&&p.rangeCount!==0){f=p.anchorNode;var x=p.anchorOffset,S=p.focusNode;p=p.focusOffset;try{f.nodeType,S.nodeType}catch{f=null;break e}var P=0,D=-1,U=-1,J=0,ue=0,fe=a,te=null;t:for(;;){for(var ie;fe!==f||x!==0&&fe.nodeType!==3||(D=P+x),fe!==S||p!==0&&fe.nodeType!==3||(U=P+p),fe.nodeType===3&&(P+=fe.nodeValue.length),(ie=fe.firstChild)!==null;)te=fe,fe=ie;for(;;){if(fe===a)break t;if(te===f&&++J===x&&(D=P),te===S&&++ue===p&&(U=P),(ie=fe.nextSibling)!==null)break;fe=te,te=fe.parentNode}fe=ie}f=D===-1||U===-1?null:{start:D,end:U}}else f=null}f=f||{start:0,end:0}}else f=null;for(Hb={focusedElem:a,selectionRange:f},um=!1,bn=s;bn!==null;)if(s=bn,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,bn=a;else for(;bn!==null;){switch(s=bn,S=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(f=0;f<a.length;f++)x=a[f],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&S!==null){a=void 0,f=s,x=S.memoizedProps,S=S.memoizedState,p=f.stateNode;try{var Se=Ms(f.type,x);a=p.getSnapshotBeforeUpdate(Se,S),p.__reactInternalSnapshotBeforeUpdate=a}catch(Re){ct(f,f.return,Re)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,f=a.nodeType,f===9)Gb(a);else if(f===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Gb(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(r(163))}if(a=s.sibling,a!==null){a.return=s.return,bn=a;break}bn=s.return}}function KT(a,s,f){var p=f.flags;switch(f.tag){case 0:case 11:case 15:$a(a,f),p&4&&Xc(5,f);break;case 1:if($a(a,f),p&4)if(a=f.stateNode,s===null)try{a.componentDidMount()}catch(P){ct(f,f.return,P)}else{var x=Ms(f.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(x,s,a.__reactInternalSnapshotBeforeUpdate)}catch(P){ct(f,f.return,P)}}p&64&&$T(f),p&512&&Zc(f,f.return);break;case 3:if($a(a,f),p&64&&(a=f.updateQueue,a!==null)){if(s=null,f.child!==null)switch(f.child.tag){case 27:case 5:s=f.child.stateNode;break;case 1:s=f.child.stateNode}try{Nj(a,s)}catch(P){ct(f,f.return,P)}}break;case 27:s===null&&p&4&&HT(f);case 26:case 5:$a(a,f),s===null&&p&4&&VT(f),p&512&&Zc(f,f.return);break;case 12:$a(a,f);break;case 31:$a(a,f),p&4&&WT(a,f);break;case 13:$a(a,f),p&4&&XT(a,f),p&64&&(a=f.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(f=W8.bind(null,f),pF(a,f))));break;case 22:if(p=f.memoizedState!==null||za,!p){s=s!==null&&s.memoizedState!==null||en,x=za;var S=en;za=p,(en=s)&&!S?Ua(a,f,(f.subtreeFlags&8772)!==0):$a(a,f),za=x,en=S}break;case 30:break;default:$a(a,f)}}function GT(a){var s=a.alternate;s!==null&&(a.alternate=null,GT(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Ec(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 Tt=null,dr=!1;function Ba(a,s,f){for(f=f.child;f!==null;)YT(a,s,f),f=f.sibling}function YT(a,s,f){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(lr,f)}catch{}switch(f.tag){case 26:en||qi(f,s),Ba(a,s,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:en||qi(f,s);var p=Tt,x=dr;Uo(f.type)&&(Tt=f.stateNode,dr=!1),Ba(a,s,f),sf(f.stateNode),Tt=p,dr=x;break;case 5:en||qi(f,s);case 6:if(p=Tt,x=dr,Tt=null,Ba(a,s,f),Tt=p,dr=x,Tt!==null)if(dr)try{(Tt.nodeType===9?Tt.body:Tt.nodeName==="HTML"?Tt.ownerDocument.body:Tt).removeChild(f.stateNode)}catch(S){ct(f,s,S)}else try{Tt.removeChild(f.stateNode)}catch(S){ct(f,s,S)}break;case 18:Tt!==null&&(dr?(a=Tt,$O(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,f.stateNode),uu(a)):$O(Tt,f.stateNode));break;case 4:p=Tt,x=dr,Tt=f.stateNode.containerInfo,dr=!0,Ba(a,s,f),Tt=p,dr=x;break;case 0:case 11:case 14:case 15:Do(2,f,s),en||Do(4,f,s),Ba(a,s,f);break;case 1:en||(qi(f,s),p=f.stateNode,typeof p.componentWillUnmount=="function"&&UT(f,s,p)),Ba(a,s,f);break;case 21:Ba(a,s,f);break;case 22:en=(p=en)||f.memoizedState!==null,Ba(a,s,f),en=p;break;default:Ba(a,s,f)}}function WT(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{uu(a)}catch(f){ct(s,s.return,f)}}}function XT(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{uu(a)}catch(f){ct(s,s.return,f)}}function U8(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new qT),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new qT),s;default:throw Error(r(435,a.tag))}}function Fh(a,s){var f=U8(a);s.forEach(function(p){if(!f.has(p)){f.add(p);var x=X8.bind(null,a,p);p.then(x,x)}})}function hr(a,s){var f=s.deletions;if(f!==null)for(var p=0;p<f.length;p++){var x=f[p],S=a,P=s,D=P;e:for(;D!==null;){switch(D.tag){case 27:if(Uo(D.type)){Tt=D.stateNode,dr=!1;break e}break;case 5:Tt=D.stateNode,dr=!1;break e;case 3:case 4:Tt=D.stateNode.containerInfo,dr=!0;break e}D=D.return}if(Tt===null)throw Error(r(160));YT(S,P,x),Tt=null,dr=!1,S=x.alternate,S!==null&&(S.return=null),x.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)ZT(s,a),s=s.sibling}var xi=null;function ZT(a,s){var f=a.alternate,p=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:hr(s,a),mr(a),p&4&&(Do(3,a,a.return),Xc(3,a),Do(5,a,a.return));break;case 1:hr(s,a),mr(a),p&512&&(en||f===null||qi(f,f.return)),p&64&&za&&(a=a.updateQueue,a!==null&&(p=a.callbacks,p!==null&&(f=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=f===null?p:f.concat(p))));break;case 26:var x=xi;if(hr(s,a),mr(a),p&512&&(en||f===null||qi(f,f.return)),p&4){var S=f!==null?f.memoizedState:null;if(p=a.memoizedState,f===null)if(p===null)if(a.stateNode===null){e:{p=a.type,f=a.memoizedProps,x=x.ownerDocument||x;t:switch(p){case"title":S=x.getElementsByTagName("title")[0],(!S||S[ys]||S[ln]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=x.createElement(p),x.head.insertBefore(S,x.querySelector("head > title"))),Pn(S,p,f),S[ln]=a,Je(S),p=S;break e;case"link":var P=ZO("link","href",x).get(p+(f.href||""));if(P){for(var D=0;D<P.length;D++)if(S=P[D],S.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&S.getAttribute("rel")===(f.rel==null?null:f.rel)&&S.getAttribute("title")===(f.title==null?null:f.title)&&S.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){P.splice(D,1);break t}}S=x.createElement(p),Pn(S,p,f),x.head.appendChild(S);break;case"meta":if(P=ZO("meta","content",x).get(p+(f.content||""))){for(D=0;D<P.length;D++)if(S=P[D],S.getAttribute("content")===(f.content==null?null:""+f.content)&&S.getAttribute("name")===(f.name==null?null:f.name)&&S.getAttribute("property")===(f.property==null?null:f.property)&&S.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&S.getAttribute("charset")===(f.charSet==null?null:f.charSet)){P.splice(D,1);break t}}S=x.createElement(p),Pn(S,p,f),x.head.appendChild(S);break;default:throw Error(r(468,p))}S[ln]=a,Je(S),p=S}a.stateNode=p}else QO(x,a.type,a.stateNode);else a.stateNode=XO(x,p,a.memoizedProps);else S!==p?(S===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):S.count--,p===null?QO(x,a.type,a.stateNode):XO(x,p,a.memoizedProps)):p===null&&a.stateNode!==null&&bb(a,a.memoizedProps,f.memoizedProps)}break;case 27:hr(s,a),mr(a),p&512&&(en||f===null||qi(f,f.return)),f!==null&&p&4&&bb(a,a.memoizedProps,f.memoizedProps);break;case 5:if(hr(s,a),mr(a),p&512&&(en||f===null||qi(f,f.return)),a.flags&32){x=a.stateNode;try{Ml(x,"")}catch(Se){ct(a,a.return,Se)}}p&4&&a.stateNode!=null&&(x=a.memoizedProps,bb(a,x,f!==null?f.memoizedProps:x)),p&1024&&(Sb=!0);break;case 6:if(hr(s,a),mr(a),p&4){if(a.stateNode===null)throw Error(r(162));p=a.memoizedProps,f=a.stateNode;try{f.nodeValue=p}catch(Se){ct(a,a.return,Se)}}break;case 3:if(am=null,x=xi,xi=rm(s.containerInfo),hr(s,a),xi=x,mr(a),p&4&&f!==null&&f.memoizedState.isDehydrated)try{uu(s.containerInfo)}catch(Se){ct(a,a.return,Se)}Sb&&(Sb=!1,QT(a));break;case 4:p=xi,xi=rm(a.stateNode.containerInfo),hr(s,a),mr(a),xi=p;break;case 12:hr(s,a),mr(a);break;case 31:hr(s,a),mr(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,Fh(a,p)));break;case 13:hr(s,a),mr(a),a.child.flags&8192&&a.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(qh=Yt()),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,Fh(a,p)));break;case 22:x=a.memoizedState!==null;var U=f!==null&&f.memoizedState!==null,J=za,ue=en;if(za=J||x,en=ue||U,hr(s,a),en=ue,za=J,mr(a),p&8192)e:for(s=a.stateNode,s._visibility=x?s._visibility&-2:s._visibility|1,x&&(f===null||U||za||en||Rs(a)),f=null,s=a;;){if(s.tag===5||s.tag===26){if(f===null){U=f=s;try{if(S=U.stateNode,x)P=S.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{D=U.stateNode;var fe=U.memoizedProps.style,te=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;D.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(Se){ct(U,U.return,Se)}}}else if(s.tag===6){if(f===null){U=s;try{U.stateNode.nodeValue=x?"":U.memoizedProps}catch(Se){ct(U,U.return,Se)}}}else if(s.tag===18){if(f===null){U=s;try{var ie=U.stateNode;x?UO(ie,!0):UO(U.stateNode,!1)}catch(Se){ct(U,U.return,Se)}}}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;f===s&&(f=null),s=s.return}f===s&&(f=null),s.sibling.return=s.return,s=s.sibling}p&4&&(p=a.updateQueue,p!==null&&(f=p.retryQueue,f!==null&&(p.retryQueue=null,Fh(a,f))));break;case 19:hr(s,a),mr(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,Fh(a,p)));break;case 30:break;case 21:break;default:hr(s,a),mr(a)}}function mr(a){var s=a.flags;if(s&2){try{for(var f,p=a.return;p!==null;){if(FT(p)){f=p;break}p=p.return}if(f==null)throw Error(r(160));switch(f.tag){case 27:var x=f.stateNode,S=xb(a);Vh(a,S,x);break;case 5:var P=f.stateNode;f.flags&32&&(Ml(P,""),f.flags&=-33);var D=xb(a);Vh(a,D,P);break;case 3:case 4:var U=f.stateNode.containerInfo,J=xb(a);wb(a,J,U);break;default:throw Error(r(161))}}catch(ue){ct(a,a.return,ue)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function QT(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;QT(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function $a(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)KT(a,s.alternate,s),s=s.sibling}function Rs(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:Do(4,s,s.return),Rs(s);break;case 1:qi(s,s.return);var f=s.stateNode;typeof f.componentWillUnmount=="function"&&UT(s,s.return,f),Rs(s);break;case 27:sf(s.stateNode);case 26:case 5:qi(s,s.return),Rs(s);break;case 22:s.memoizedState===null&&Rs(s);break;case 30:Rs(s);break;default:Rs(s)}a=a.sibling}}function Ua(a,s,f){for(f=f&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,x=a,S=s,P=S.flags;switch(S.tag){case 0:case 11:case 15:Ua(x,S,f),Xc(4,S);break;case 1:if(Ua(x,S,f),p=S,x=p.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(J){ct(p,p.return,J)}if(p=S,x=p.updateQueue,x!==null){var D=p.stateNode;try{var U=x.shared.hiddenCallbacks;if(U!==null)for(x.shared.hiddenCallbacks=null,x=0;x<U.length;x++)Pj(U[x],D)}catch(J){ct(p,p.return,J)}}f&&P&64&&$T(S),Zc(S,S.return);break;case 27:HT(S);case 26:case 5:Ua(x,S,f),f&&p===null&&P&4&&VT(S),Zc(S,S.return);break;case 12:Ua(x,S,f);break;case 31:Ua(x,S,f),f&&P&4&&WT(x,S);break;case 13:Ua(x,S,f),f&&P&4&&XT(x,S);break;case 22:S.memoizedState===null&&Ua(x,S,f),Zc(S,S.return);break;case 30:break;default:Ua(x,S,f)}s=s.sibling}}function Ab(a,s){var f=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==f&&(a!=null&&a.refCount++,f!=null&&Ic(f))}function Eb(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Ic(a))}function wi(a,s,f,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)JT(a,s,f,p),s=s.sibling}function JT(a,s,f,p){var x=s.flags;switch(s.tag){case 0:case 11:case 15:wi(a,s,f,p),x&2048&&Xc(9,s);break;case 1:wi(a,s,f,p);break;case 3:wi(a,s,f,p),x&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Ic(a)));break;case 12:if(x&2048){wi(a,s,f,p),a=s.stateNode;try{var S=s.memoizedProps,P=S.id,D=S.onPostCommit;typeof D=="function"&&D(P,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(U){ct(s,s.return,U)}}else wi(a,s,f,p);break;case 31:wi(a,s,f,p);break;case 13:wi(a,s,f,p);break;case 23:break;case 22:S=s.stateNode,P=s.alternate,s.memoizedState!==null?S._visibility&2?wi(a,s,f,p):Qc(a,s):S._visibility&2?wi(a,s,f,p):(S._visibility|=2,Ql(a,s,f,p,(s.subtreeFlags&10256)!==0||!1)),x&2048&&Ab(P,s);break;case 24:wi(a,s,f,p),x&2048&&Eb(s.alternate,s);break;default:wi(a,s,f,p)}}function Ql(a,s,f,p,x){for(x=x&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var S=a,P=s,D=f,U=p,J=P.flags;switch(P.tag){case 0:case 11:case 15:Ql(S,P,D,U,x),Xc(8,P);break;case 23:break;case 22:var ue=P.stateNode;P.memoizedState!==null?ue._visibility&2?Ql(S,P,D,U,x):Qc(S,P):(ue._visibility|=2,Ql(S,P,D,U,x)),x&&J&2048&&Ab(P.alternate,P);break;case 24:Ql(S,P,D,U,x),x&&J&2048&&Eb(P.alternate,P);break;default:Ql(S,P,D,U,x)}s=s.sibling}}function Qc(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var f=a,p=s,x=p.flags;switch(p.tag){case 22:Qc(f,p),x&2048&&Ab(p.alternate,p);break;case 24:Qc(f,p),x&2048&&Eb(p.alternate,p);break;default:Qc(f,p)}s=s.sibling}}var Jc=8192;function Jl(a,s,f){if(a.subtreeFlags&Jc)for(a=a.child;a!==null;)eO(a,s,f),a=a.sibling}function eO(a,s,f){switch(a.tag){case 26:Jl(a,s,f),a.flags&Jc&&a.memoizedState!==null&&TF(f,xi,a.memoizedState,a.memoizedProps);break;case 5:Jl(a,s,f);break;case 3:case 4:var p=xi;xi=rm(a.stateNode.containerInfo),Jl(a,s,f),xi=p;break;case 22:a.memoizedState===null&&(p=a.alternate,p!==null&&p.memoizedState!==null?(p=Jc,Jc=16777216,Jl(a,s,f),Jc=p):Jl(a,s,f));break;default:Jl(a,s,f)}}function tO(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 ef(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var f=0;f<s.length;f++){var p=s[f];bn=p,rO(p,a)}tO(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)nO(a),a=a.sibling}function nO(a){switch(a.tag){case 0:case 11:case 15:ef(a),a.flags&2048&&Do(9,a,a.return);break;case 3:ef(a);break;case 12:ef(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Hh(a)):ef(a);break;default:ef(a)}}function Hh(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var f=0;f<s.length;f++){var p=s[f];bn=p,rO(p,a)}tO(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:Do(8,s,s.return),Hh(s);break;case 22:f=s.stateNode,f._visibility&2&&(f._visibility&=-3,Hh(s));break;default:Hh(s)}a=a.sibling}}function rO(a,s){for(;bn!==null;){var f=bn;switch(f.tag){case 0:case 11:case 15:Do(8,f,s);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var p=f.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Ic(f.memoizedState.cache)}if(p=f.child,p!==null)p.return=f,bn=p;else e:for(f=a;bn!==null;){p=bn;var x=p.sibling,S=p.return;if(GT(p),p===f){bn=null;break e}if(x!==null){x.return=S,bn=x;break e}bn=S}}}var V8={getCacheForType:function(a){var s=Tn(Zt),f=s.data.get(a);return f===void 0&&(f=a(),s.data.set(a,f)),f},cacheSignal:function(){return Tn(Zt).controller.signal}},F8=typeof WeakMap=="function"?WeakMap:Map,at=0,mt=null,qe=null,Ge=0,ut=0,_r=null,ko=!1,eu=!1,Cb=!1,Va=0,It=0,Lo=0,Ds=0,jb=0,Mr=0,tu=0,tf=null,pr=null,Tb=!1,qh=0,iO=0,Kh=1/0,Gh=null,Io=null,un=0,zo=null,nu=null,Fa=0,Ob=0,Pb=null,aO=null,nf=0,Nb=null;function Rr(){return(at&2)!==0&&Ge!==0?Ge&-Ge:L.T!==null?Lb():Sc()}function oO(){if(Mr===0)if((Ge&536870912)===0||Xe){var a=Ui;Ui<<=1,(Ui&3932160)===0&&(Ui=262144),Mr=a}else Mr=536870912;return a=Pr.current,a!==null&&(a.flags|=32),Mr}function gr(a,s,f){(a===mt&&(ut===2||ut===9)||a.cancelPendingCommit!==null)&&(ru(a,0),Bo(a,Ge,Mr,!1)),ze(a,f),((at&2)===0||a!==mt)&&(a===mt&&((at&2)===0&&(Ds|=f),It===4&&Bo(a,Ge,Mr,!1)),Ki(a))}function sO(a,s,f){if((at&6)!==0)throw Error(r(327));var p=!f&&(s&127)===0&&(s&a.expiredLanes)===0||st(a,s),x=p?K8(a,s):Mb(a,s,!0),S=p;do{if(x===0){eu&&!p&&Bo(a,s,0,!1);break}else{if(f=a.current.alternate,S&&!H8(f)){x=Mb(a,s,!1),S=!1;continue}if(x===2){if(S=s,a.errorRecoveryDisabledLanes&S)var P=0;else P=a.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){s=P;e:{var D=a;x=tf;var U=D.current.memoizedState.isDehydrated;if(U&&(ru(D,P).flags|=256),P=Mb(D,P,!1),P!==2){if(Cb&&!U){D.errorRecoveryDisabledLanes|=S,Ds|=S,x=4;break e}S=pr,pr=x,S!==null&&(pr===null?pr=S:pr.push.apply(pr,S))}x=P}if(S=!1,x!==2)continue}}if(x===1){ru(a,0),Bo(a,s,0,!0);break}e:{switch(p=a,S=x,S){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Bo(p,s,Mr,!ko);break e;case 2:pr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(x=qh+300-Yt(),10<x)){if(Bo(p,s,Mr,!ko),we(p,0,!0)!==0)break e;Fa=s,p.timeoutHandle=zO(lO.bind(null,p,f,pr,Gh,Tb,s,Mr,Ds,tu,ko,S,"Throttled",-0,0),x);break e}lO(p,f,pr,Gh,Tb,s,Mr,Ds,tu,ko,S,null,-0,0)}}break}while(!0);Ki(a)}function lO(a,s,f,p,x,S,P,D,U,J,ue,fe,te,ie){if(a.timeoutHandle=-1,fe=s.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Oa},eO(s,S,fe);var Se=(S&62914560)===S?qh-Yt():(S&4194048)===S?iO-Yt():0;if(Se=OF(fe,Se),Se!==null){Fa=S,a.cancelPendingCommit=Se(gO.bind(null,a,s,S,f,p,x,P,D,U,ue,fe,null,te,ie)),Bo(a,S,P,!J);return}}gO(a,s,S,f,p,x,P,D,U)}function H8(a){for(var s=a;;){var f=s.tag;if((f===0||f===11||f===15)&&s.flags&16384&&(f=s.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var p=0;p<f.length;p++){var x=f[p],S=x.getSnapshot;x=x.value;try{if(!Tr(S(),x))return!1}catch{return!1}}if(f=s.child,s.subtreeFlags&16384&&f!==null)f.return=s,s=f;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 Bo(a,s,f,p){s&=~jb,s&=~Ds,a.suspendedLanes|=s,a.pingedLanes&=~s,p&&(a.warmLanes|=s),p=a.expirationTimes;for(var x=s;0<x;){var S=31-Xt(x),P=1<<S;p[S]=-1,x&=~P}f!==0&&Ea(a,f,s)}function Yh(){return(at&6)===0?(rf(0),!1):!0}function _b(){if(qe!==null){if(ut===0)var a=qe.return;else a=qe,Ma=Cs=null,Gy(a),Gl=null,Bc=0,a=qe;for(;a!==null;)BT(a.alternate,a),a=a.return;qe=null}}function ru(a,s){var f=a.timeoutHandle;f!==-1&&(a.timeoutHandle=-1,cF(f)),f=a.cancelPendingCommit,f!==null&&(a.cancelPendingCommit=null,f()),Fa=0,_b(),mt=a,qe=f=Na(a.current,null),Ge=s,ut=0,_r=null,ko=!1,eu=st(a,s),Cb=!1,tu=Mr=jb=Ds=Lo=It=0,pr=tf=null,Tb=!1,(s&8)!==0&&(s|=s&32);var p=a.entangledLanes;if(p!==0)for(a=a.entanglements,p&=s;0<p;){var x=31-Xt(p),S=1<<x;s|=a[x],p&=~S}return Va=s,ph(),f}function uO(a,s){$e=null,L.H=Gc,s===Kl||s===Ah?(s=Cj(),ut=3):s===ky?(s=Cj(),ut=4):ut=s===ub?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,_r=s,qe===null&&(It=1,Ih(a,Xr(s,a.current)))}function cO(){var a=Pr.current;return a===null?!0:(Ge&4194048)===Ge?ei===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?a===ei:!1}function fO(){var a=L.H;return L.H=Gc,a===null?Gc:a}function dO(){var a=L.A;return L.A=V8,a}function Wh(){It=4,ko||(Ge&4194048)!==Ge&&Pr.current!==null||(eu=!0),(Lo&134217727)===0&&(Ds&134217727)===0||mt===null||Bo(mt,Ge,Mr,!1)}function Mb(a,s,f){var p=at;at|=2;var x=fO(),S=dO();(mt!==a||Ge!==s)&&(Gh=null,ru(a,s)),s=!1;var P=It;e:do try{if(ut!==0&&qe!==null){var D=qe,U=_r;switch(ut){case 8:_b(),P=6;break e;case 3:case 2:case 9:case 6:Pr.current===null&&(s=!0);var J=ut;if(ut=0,_r=null,iu(a,D,U,J),f&&eu){P=0;break e}break;default:J=ut,ut=0,_r=null,iu(a,D,U,J)}}q8(),P=It;break}catch(ue){uO(a,ue)}while(!0);return s&&a.shellSuspendCounter++,Ma=Cs=null,at=p,L.H=x,L.A=S,qe===null&&(mt=null,Ge=0,ph()),P}function q8(){for(;qe!==null;)hO(qe)}function K8(a,s){var f=at;at|=2;var p=fO(),x=dO();mt!==a||Ge!==s?(Gh=null,Kh=Yt()+500,ru(a,s)):eu=st(a,s);e:do try{if(ut!==0&&qe!==null){s=qe;var S=_r;t:switch(ut){case 1:ut=0,_r=null,iu(a,s,S,1);break;case 2:case 9:if(Aj(S)){ut=0,_r=null,mO(s);break}s=function(){ut!==2&&ut!==9||mt!==a||(ut=7),Ki(a)},S.then(s,s);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:Aj(S)?(ut=0,_r=null,mO(s)):(ut=0,_r=null,iu(a,s,S,7));break;case 5:var P=null;switch(qe.tag){case 26:P=qe.memoizedState;case 5:case 27:var D=qe;if(P?JO(P):D.stateNode.complete){ut=0,_r=null;var U=D.sibling;if(U!==null)qe=U;else{var J=D.return;J!==null?(qe=J,Xh(J)):qe=null}break t}}ut=0,_r=null,iu(a,s,S,5);break;case 6:ut=0,_r=null,iu(a,s,S,6);break;case 8:_b(),It=6;break e;default:throw Error(r(462))}}G8();break}catch(ue){uO(a,ue)}while(!0);return Ma=Cs=null,L.H=p,L.A=x,at=f,qe!==null?0:(mt=null,Ge=0,ph(),It)}function G8(){for(;qe!==null&&!Gt();)hO(qe)}function hO(a){var s=IT(a.alternate,a,Va);a.memoizedProps=a.pendingProps,s===null?Xh(a):qe=s}function mO(a){var s=a,f=s.alternate;switch(s.tag){case 15:case 0:s=_T(f,s,s.pendingProps,s.type,void 0,Ge);break;case 11:s=_T(f,s,s.pendingProps,s.type.render,s.ref,Ge);break;case 5:Gy(s);default:BT(f,s),s=qe=dj(s,Va),s=IT(f,s,Va)}a.memoizedProps=a.pendingProps,s===null?Xh(a):qe=s}function iu(a,s,f,p){Ma=Cs=null,Gy(s),Gl=null,Bc=0;var x=s.return;try{if(k8(a,x,s,f,Ge)){It=1,Ih(a,Xr(f,a.current)),qe=null;return}}catch(S){if(x!==null)throw qe=x,S;It=1,Ih(a,Xr(f,a.current)),qe=null;return}s.flags&32768?(Xe||p===1?a=!0:eu||(Ge&536870912)!==0?a=!1:(ko=a=!0,(p===2||p===9||p===3||p===6)&&(p=Pr.current,p!==null&&p.tag===13&&(p.flags|=16384))),pO(s,a)):Xh(s)}function Xh(a){var s=a;do{if((s.flags&32768)!==0){pO(s,ko);return}a=s.return;var f=z8(s.alternate,s,Va);if(f!==null){qe=f;return}if(s=s.sibling,s!==null){qe=s;return}qe=s=a}while(s!==null);It===0&&(It=5)}function pO(a,s){do{var f=B8(a.alternate,a);if(f!==null){f.flags&=32767,qe=f;return}if(f=a.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!s&&(a=a.sibling,a!==null)){qe=a;return}qe=a=f}while(a!==null);It=6,qe=null}function gO(a,s,f,p,x,S,P,D,U){a.cancelPendingCommit=null;do Zh();while(un!==0);if((at&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(S=s.lanes|s.childLanes,S|=xy,Ft(a,f,S,P,D,U),a===mt&&(qe=mt=null,Ge=0),nu=s,zo=a,Fa=f,Ob=S,Pb=x,aO=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,Z8(vi,function(){return wO(),null})):(a.callbackNode=null,a.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=L.T,L.T=null,x=F.p,F.p=2,P=at,at|=4;try{$8(a,s,f)}finally{at=P,F.p=x,L.T=p}}un=1,vO(),yO(),bO()}}function vO(){if(un===1){un=0;var a=zo,s=nu,f=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||f){f=L.T,L.T=null;var p=F.p;F.p=2;var x=at;at|=4;try{ZT(s,a);var S=Hb,P=rj(a.containerInfo),D=S.focusedElem,U=S.selectionRange;if(P!==D&&D&&D.ownerDocument&&nj(D.ownerDocument.documentElement,D)){if(U!==null&&py(D)){var J=U.start,ue=U.end;if(ue===void 0&&(ue=J),"selectionStart"in D)D.selectionStart=J,D.selectionEnd=Math.min(ue,D.value.length);else{var fe=D.ownerDocument||document,te=fe&&fe.defaultView||window;if(te.getSelection){var ie=te.getSelection(),Se=D.textContent.length,Re=Math.min(U.start,Se),ht=U.end===void 0?Re:Math.min(U.end,Se);!ie.extend&&Re>ht&&(P=ht,ht=Re,Re=P);var Y=tj(D,Re),K=tj(D,ht);if(Y&&K&&(ie.rangeCount!==1||ie.anchorNode!==Y.node||ie.anchorOffset!==Y.offset||ie.focusNode!==K.node||ie.focusOffset!==K.offset)){var Z=fe.createRange();Z.setStart(Y.node,Y.offset),ie.removeAllRanges(),Re>ht?(ie.addRange(Z),ie.extend(K.node,K.offset)):(Z.setEnd(K.node,K.offset),ie.addRange(Z))}}}}for(fe=[],ie=D;ie=ie.parentNode;)ie.nodeType===1&&fe.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<fe.length;D++){var ce=fe[D];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}um=!!Fb,Hb=Fb=null}finally{at=x,F.p=p,L.T=f}}a.current=s,un=2}}function yO(){if(un===2){un=0;var a=zo,s=nu,f=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||f){f=L.T,L.T=null;var p=F.p;F.p=2;var x=at;at|=4;try{KT(a,s.alternate,s)}finally{at=x,F.p=p,L.T=f}}un=3}}function bO(){if(un===4||un===3){un=0,Kr();var a=zo,s=nu,f=Fa,p=aO;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?un=5:(un=0,nu=zo=null,xO(a,a.pendingLanes));var x=a.pendingLanes;if(x===0&&(Io=null),jr(f),s=s.stateNode,Wt&&typeof Wt.onCommitFiberRoot=="function")try{Wt.onCommitFiberRoot(lr,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=L.T,x=F.p,F.p=2,L.T=null;try{for(var S=a.onRecoverableError,P=0;P<p.length;P++){var D=p[P];S(D.value,{componentStack:D.stack})}}finally{L.T=s,F.p=x}}(Fa&3)!==0&&Zh(),Ki(a),x=a.pendingLanes,(f&261930)!==0&&(x&42)!==0?a===Nb?nf++:(nf=0,Nb=a):nf=0,rf(0)}}function xO(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Ic(s)))}function Zh(){return vO(),yO(),bO(),wO()}function wO(){if(un!==5)return!1;var a=zo,s=Ob;Ob=0;var f=jr(Fa),p=L.T,x=F.p;try{F.p=32>f?32:f,L.T=null,f=Pb,Pb=null;var S=zo,P=Fa;if(un=0,nu=zo=null,Fa=0,(at&6)!==0)throw Error(r(331));var D=at;if(at|=4,nO(S.current),JT(S,S.current,P,f),at=D,rf(0,!1),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(lr,S)}catch{}return!0}finally{F.p=x,L.T=p,xO(a,s)}}function SO(a,s,f){s=Xr(f,s),s=lb(a.stateNode,s,2),a=_o(a,s,2),a!==null&&(ze(a,2),Ki(a))}function ct(a,s,f){if(a.tag===3)SO(a,a,f);else for(;s!==null;){if(s.tag===3){SO(s,a,f);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Io===null||!Io.has(p))){a=Xr(f,a),f=AT(2),p=_o(s,f,2),p!==null&&(ET(f,p,s,a),ze(p,2),Ki(p));break}}s=s.return}}function Rb(a,s,f){var p=a.pingCache;if(p===null){p=a.pingCache=new F8;var x=new Set;p.set(s,x)}else x=p.get(s),x===void 0&&(x=new Set,p.set(s,x));x.has(f)||(Cb=!0,x.add(f),a=Y8.bind(null,a,s,f),s.then(a,a))}function Y8(a,s,f){var p=a.pingCache;p!==null&&p.delete(s),a.pingedLanes|=a.suspendedLanes&f,a.warmLanes&=~f,mt===a&&(Ge&f)===f&&(It===4||It===3&&(Ge&62914560)===Ge&&300>Yt()-qh?(at&2)===0&&ru(a,0):jb|=f,tu===Ge&&(tu=0)),Ki(a)}function AO(a,s){s===0&&(s=bt()),a=Ss(a,s),a!==null&&(ze(a,s),Ki(a))}function W8(a){var s=a.memoizedState,f=0;s!==null&&(f=s.retryLane),AO(a,f)}function X8(a,s){var f=0;switch(a.tag){case 31:case 13:var p=a.stateNode,x=a.memoizedState;x!==null&&(f=x.retryLane);break;case 19:p=a.stateNode;break;case 22:p=a.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(s),AO(a,f)}function Z8(a,s){return Bi(a,s)}var Qh=null,au=null,Db=!1,Jh=!1,kb=!1,$o=0;function Ki(a){a!==au&&a.next===null&&(au===null?Qh=au=a:au=au.next=a),Jh=!0,Db||(Db=!0,J8())}function rf(a,s){if(!kb&&Jh){kb=!0;do for(var f=!1,p=Qh;p!==null;){if(a!==0){var x=p.pendingLanes;if(x===0)var S=0;else{var P=p.suspendedLanes,D=p.pingedLanes;S=(1<<31-Xt(42|a)+1)-1,S&=x&~(P&~D),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(f=!0,TO(p,S))}else S=Ge,S=we(p,p===mt?S:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(S&3)===0||st(p,S)||(f=!0,TO(p,S));p=p.next}while(f);kb=!1}}function Q8(){EO()}function EO(){Jh=Db=!1;var a=0;$o!==0&&uF()&&(a=$o);for(var s=Yt(),f=null,p=Qh;p!==null;){var x=p.next,S=CO(p,s);S===0?(p.next=null,f===null?Qh=x:f.next=x,x===null&&(au=f)):(f=p,(a!==0||(S&3)!==0)&&(Jh=!0)),p=x}un!==0&&un!==5||rf(a),$o!==0&&($o=0)}function CO(a,s){for(var f=a.suspendedLanes,p=a.pingedLanes,x=a.expirationTimes,S=a.pendingLanes&-62914561;0<S;){var P=31-Xt(S),D=1<<P,U=x[P];U===-1?((D&f)===0||(D&p)!==0)&&(x[P]=lt(D,s)):U<=s&&(a.expiredLanes|=D),S&=~D}if(s=mt,f=Ge,f=we(a,a===s?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p=a.callbackNode,f===0||a===s&&(ut===2||ut===9)||a.cancelPendingCommit!==null)return p!==null&&p!==null&&xa(p),a.callbackNode=null,a.callbackPriority=0;if((f&3)===0||st(a,f)){if(s=f&-f,s===a.callbackPriority)return s;switch(p!==null&&xa(p),jr(f)){case 2:case 8:f=bo;break;case 32:f=vi;break;case 268435456:f=Er;break;default:f=vi}return p=jO.bind(null,a),f=Bi(f,p),a.callbackPriority=s,a.callbackNode=f,s}return p!==null&&p!==null&&xa(p),a.callbackPriority=2,a.callbackNode=null,2}function jO(a,s){if(un!==0&&un!==5)return a.callbackNode=null,a.callbackPriority=0,null;var f=a.callbackNode;if(Zh()&&a.callbackNode!==f)return null;var p=Ge;return p=we(a,a===mt?p:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p===0?null:(sO(a,p,s),CO(a,Yt()),a.callbackNode!=null&&a.callbackNode===f?jO.bind(null,a):null)}function TO(a,s){if(Zh())return null;sO(a,s,!0)}function J8(){fF(function(){(at&6)!==0?Bi(gi,Q8):EO()})}function Lb(){if($o===0){var a=Hl;a===0&&(a=$i,$i<<=1,($i&261888)===0&&($i=256)),$o=a}return $o}function OO(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:sh(""+a)}function PO(a,s){var f=s.ownerDocument.createElement("input");return f.name=s.name,f.value=s.value,a.id&&f.setAttribute("form",a.id),s.parentNode.insertBefore(f,s),a=new FormData(a),f.parentNode.removeChild(f),a}function eF(a,s,f,p,x){if(s==="submit"&&f&&f.stateNode===x){var S=OO((x[Fn]||null).action),P=p.submitter;P&&(s=(s=P[Fn]||null)?OO(s.formAction):P.getAttribute("formAction"),s!==null&&(S=s,P=null));var D=new fh("action","action",null,p,x);a.push({event:D,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if($o!==0){var U=P?PO(x,P):new FormData(x);nb(f,{pending:!0,data:U,method:x.method,action:S},null,U)}}else typeof S=="function"&&(D.preventDefault(),U=P?PO(x,P):new FormData(x),nb(f,{pending:!0,data:U,method:x.method,action:S},S,U))},currentTarget:x}]})}}for(var Ib=0;Ib<by.length;Ib++){var zb=by[Ib],tF=zb.toLowerCase(),nF=zb[0].toUpperCase()+zb.slice(1);bi(tF,"on"+nF)}bi(oj,"onAnimationEnd"),bi(sj,"onAnimationIteration"),bi(lj,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi(y8,"onTransitionRun"),bi(b8,"onTransitionStart"),bi(x8,"onTransitionCancel"),bi(uj,"onTransitionEnd"),ja("onMouseEnter",["mouseout","mouseover"]),ja("onMouseLeave",["mouseout","mouseover"]),ja("onPointerEnter",["pointerout","pointerover"]),ja("onPointerLeave",["pointerout","pointerover"]),Ca("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ca("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ca("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ca("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ca("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ca("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var af="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(" "),rF=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(af));function NO(a,s){s=(s&4)!==0;for(var f=0;f<a.length;f++){var p=a[f],x=p.event;p=p.listeners;e:{var S=void 0;if(s)for(var P=p.length-1;0<=P;P--){var D=p[P],U=D.instance,J=D.currentTarget;if(D=D.listener,U!==S&&x.isPropagationStopped())break e;S=D,x.currentTarget=J;try{S(x)}catch(ue){mh(ue)}x.currentTarget=null,S=U}else for(P=0;P<p.length;P++){if(D=p[P],U=D.instance,J=D.currentTarget,D=D.listener,U!==S&&x.isPropagationStopped())break e;S=D,x.currentTarget=J;try{S(x)}catch(ue){mh(ue)}x.currentTarget=null,S=U}}}}function Ke(a,s){var f=s[Ac];f===void 0&&(f=s[Ac]=new Set);var p=a+"__bubble";f.has(p)||(_O(s,a,2,!1),f.add(p))}function Bb(a,s,f){var p=0;s&&(p|=4),_O(f,a,p,s)}var em="_reactListening"+Math.random().toString(36).slice(2);function $b(a){if(!a[em]){a[em]=!0,rh.forEach(function(f){f!=="selectionchange"&&(rF.has(f)||Bb(f,!1,a),Bb(f,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[em]||(s[em]=!0,Bb("selectionchange",!1,s))}}function _O(a,s,f,p){switch(oP(s)){case 2:var x=_F;break;case 8:x=MF;break;default:x=t0}f=x.bind(null,s,f,a),x=void 0,!oy||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),p?x!==void 0?a.addEventListener(s,f,{capture:!0,passive:x}):a.addEventListener(s,f,!0):x!==void 0?a.addEventListener(s,f,{passive:x}):a.addEventListener(s,f,!1)}function Ub(a,s,f,p,x){var S=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var P=p.tag;if(P===3||P===4){var D=p.stateNode.containerInfo;if(D===x)break;if(P===4)for(P=p.return;P!==null;){var U=P.tag;if((U===3||U===4)&&P.stateNode.containerInfo===x)return;P=P.return}for(;D!==null;){if(P=So(D),P===null)return;if(U=P.tag,U===5||U===6||U===26||U===27){p=S=P;continue e}D=D.parentNode}}p=p.return}LC(function(){var J=S,ue=iy(f),fe=[];e:{var te=cj.get(a);if(te!==void 0){var ie=fh,Se=a;switch(a){case"keypress":if(uh(f)===0)break e;case"keydown":case"keyup":ie=XV;break;case"focusin":Se="focus",ie=cy;break;case"focusout":Se="blur",ie=cy;break;case"beforeblur":case"afterblur":ie=cy;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=BC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=zV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=JV;break;case oj:case sj:case lj:ie=UV;break;case uj:ie=t8;break;case"scroll":case"scrollend":ie=LV;break;case"wheel":ie=r8;break;case"copy":case"cut":case"paste":ie=FV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=UC;break;case"toggle":case"beforetoggle":ie=a8}var Re=(s&4)!==0,ht=!Re&&(a==="scroll"||a==="scrollend"),Y=Re?te!==null?te+"Capture":null:te;Re=[];for(var K=J,Z;K!==null;){var ce=K;if(Z=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||Z===null||Y===null||(ce=jc(K,Y),ce!=null&&Re.push(of(K,ce,Z))),ht)break;K=K.return}0<Re.length&&(te=new ie(te,Se,null,f,ue),fe.push({event:te,listeners:Re}))}}if((s&7)===0){e:{if(te=a==="mouseover"||a==="pointerover",ie=a==="mouseout"||a==="pointerout",te&&f!==ry&&(Se=f.relatedTarget||f.fromElement)&&(So(Se)||Se[wo]))break e;if((ie||te)&&(te=ue.window===ue?ue:(te=ue.ownerDocument)?te.defaultView||te.parentWindow:window,ie?(Se=f.relatedTarget||f.toElement,ie=J,Se=Se?So(Se):null,Se!==null&&(ht=o(Se),Re=Se.tag,Se!==ht||Re!==5&&Re!==27&&Re!==6)&&(Se=null)):(ie=null,Se=J),ie!==Se)){if(Re=BC,ce="onMouseLeave",Y="onMouseEnter",K="mouse",(a==="pointerout"||a==="pointerover")&&(Re=UC,ce="onPointerLeave",Y="onPointerEnter",K="pointer"),ht=ie==null?te:Ce(ie),Z=Se==null?te:Ce(Se),te=new Re(ce,K+"leave",ie,f,ue),te.target=ht,te.relatedTarget=Z,ce=null,So(ue)===J&&(Re=new Re(Y,K+"enter",Se,f,ue),Re.target=Z,Re.relatedTarget=ht,ce=Re),ht=ce,ie&&Se)t:{for(Re=iF,Y=ie,K=Se,Z=0,ce=Y;ce;ce=Re(ce))Z++;ce=0;for(var Ne=K;Ne;Ne=Re(Ne))ce++;for(;0<Z-ce;)Y=Re(Y),Z--;for(;0<ce-Z;)K=Re(K),ce--;for(;Z--;){if(Y===K||K!==null&&Y===K.alternate){Re=Y;break t}Y=Re(Y),K=Re(K)}Re=null}else Re=null;ie!==null&&MO(fe,te,ie,Re,!1),Se!==null&&ht!==null&&MO(fe,ht,Se,Re,!0)}}e:{if(te=J?Ce(J):window,ie=te.nodeName&&te.nodeName.toLowerCase(),ie==="select"||ie==="input"&&te.type==="file")var et=WC;else if(GC(te))if(XC)et=p8;else{et=h8;var je=d8}else ie=te.nodeName,!ie||ie.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?J&&ny(J.elementType)&&(et=WC):et=m8;if(et&&(et=et(a,J))){YC(fe,et,f,ue);break e}je&&je(a,te,J),a==="focusout"&&J&&te.type==="number"&&J.memoizedProps.value!=null&&ty(te,"number",te.value)}switch(je=J?Ce(J):window,a){case"focusin":(GC(je)||je.contentEditable==="true")&&(Ll=je,gy=J,Dc=null);break;case"focusout":Dc=gy=Ll=null;break;case"mousedown":vy=!0;break;case"contextmenu":case"mouseup":case"dragend":vy=!1,ij(fe,f,ue);break;case"selectionchange":if(v8)break;case"keydown":case"keyup":ij(fe,f,ue)}var Ue;if(dy)e:{switch(a){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else kl?qC(a,f)&&(Ye="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(Ye="onCompositionStart");Ye&&(VC&&f.locale!=="ko"&&(kl||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&kl&&(Ue=IC()):(Eo=ue,sy="value"in Eo?Eo.value:Eo.textContent,kl=!0)),je=tm(J,Ye),0<je.length&&(Ye=new $C(Ye,a,null,f,ue),fe.push({event:Ye,listeners:je}),Ue?Ye.data=Ue:(Ue=KC(f),Ue!==null&&(Ye.data=Ue)))),(Ue=s8?l8(a,f):u8(a,f))&&(Ye=tm(J,"onBeforeInput"),0<Ye.length&&(je=new $C("onBeforeInput","beforeinput",null,f,ue),fe.push({event:je,listeners:Ye}),je.data=Ue)),eF(fe,a,J,f,ue)}NO(fe,s)})}function of(a,s,f){return{instance:a,listener:s,currentTarget:f}}function tm(a,s){for(var f=s+"Capture",p=[];a!==null;){var x=a,S=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||S===null||(x=jc(a,f),x!=null&&p.unshift(of(a,x,S)),x=jc(a,s),x!=null&&p.push(of(a,x,S))),a.tag===3)return p;a=a.return}return[]}function iF(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function MO(a,s,f,p,x){for(var S=s._reactName,P=[];f!==null&&f!==p;){var D=f,U=D.alternate,J=D.stateNode;if(D=D.tag,U!==null&&U===p)break;D!==5&&D!==26&&D!==27||J===null||(U=J,x?(J=jc(f,S),J!=null&&P.unshift(of(f,J,U))):x||(J=jc(f,S),J!=null&&P.push(of(f,J,U)))),f=f.return}P.length!==0&&a.push({event:s,listeners:P})}var aF=/\r\n?/g,oF=/\u0000|\uFFFD/g;function RO(a){return(typeof a=="string"?a:""+a).replace(aF,`
|
|
9
|
-
`).replace(oF,"")}function DO(a,s){return s=RO(s),RO(a)===s}function dt(a,s,f,p,x,S){switch(f){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||Ml(a,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&Ml(a,""+p);break;case"className":ah(a,"class",p);break;case"tabIndex":ah(a,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":ah(a,f,p);break;case"style":DC(a,p,S);break;case"data":if(s!=="object"){ah(a,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||f!=="href")){a.removeAttribute(f);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(f);break}p=sh(""+p),a.setAttribute(f,p);break;case"action":case"formAction":if(typeof p=="function"){a.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(f==="formAction"?(s!=="input"&&dt(a,s,"name",x.name,x,null),dt(a,s,"formEncType",x.formEncType,x,null),dt(a,s,"formMethod",x.formMethod,x,null),dt(a,s,"formTarget",x.formTarget,x,null)):(dt(a,s,"encType",x.encType,x,null),dt(a,s,"method",x.method,x,null),dt(a,s,"target",x.target,x,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(f);break}p=sh(""+p),a.setAttribute(f,p);break;case"onClick":p!=null&&(a.onclick=Oa);break;case"onScroll":p!=null&&Ke("scroll",a);break;case"onScrollEnd":p!=null&&Ke("scrollend",a);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=f}}break;case"multiple":a.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":a.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){a.removeAttribute("xlink:href");break}f=sh(""+p),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,""+p):a.removeAttribute(f);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":p&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,""):a.removeAttribute(f);break;case"capture":case"download":p===!0?a.setAttribute(f,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,p):a.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?a.setAttribute(f,p):a.removeAttribute(f);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?a.removeAttribute(f):a.setAttribute(f,p);break;case"popover":Ke("beforetoggle",a),Ke("toggle",a),ih(a,"popover",p);break;case"xlinkActuate":Ta(a,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Ta(a,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Ta(a,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Ta(a,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Ta(a,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Ta(a,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Ta(a,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Ta(a,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Ta(a,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":ih(a,"is",p);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=DV.get(f)||f,ih(a,f,p))}}function Vb(a,s,f,p,x,S){switch(f){case"style":DC(a,p,S);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=f}}break;case"children":typeof p=="string"?Ml(a,p):(typeof p=="number"||typeof p=="bigint")&&Ml(a,""+p);break;case"onScroll":p!=null&&Ke("scroll",a);break;case"onScrollEnd":p!=null&&Ke("scrollend",a);break;case"onClick":p!=null&&(a.onclick=Oa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Cc.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(x=f.endsWith("Capture"),s=f.slice(2,x?f.length-7:void 0),S=a[Fn]||null,S=S!=null?S[f]:null,typeof S=="function"&&a.removeEventListener(s,S,x),typeof p=="function")){typeof S!="function"&&S!==null&&(f in a?a[f]=null:a.hasAttribute(f)&&a.removeAttribute(f)),a.addEventListener(s,p,x);break e}f in a?a[f]=p:p===!0?a.setAttribute(f,""):ih(a,f,p)}}}function Pn(a,s,f){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",a),Ke("load",a);var p=!1,x=!1,S;for(S in f)if(f.hasOwnProperty(S)){var P=f[S];if(P!=null)switch(S){case"src":p=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:dt(a,s,S,P,f,null)}}x&&dt(a,s,"srcSet",f.srcSet,f,null),p&&dt(a,s,"src",f.src,f,null);return;case"input":Ke("invalid",a);var D=S=P=x=null,U=null,J=null;for(p in f)if(f.hasOwnProperty(p)){var ue=f[p];if(ue!=null)switch(p){case"name":x=ue;break;case"type":P=ue;break;case"checked":U=ue;break;case"defaultChecked":J=ue;break;case"value":S=ue;break;case"defaultValue":D=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,s));break;default:dt(a,s,p,ue,f,null)}}NC(a,S,D,U,J,P,x,!1);return;case"select":Ke("invalid",a),p=P=S=null;for(x in f)if(f.hasOwnProperty(x)&&(D=f[x],D!=null))switch(x){case"value":S=D;break;case"defaultValue":P=D;break;case"multiple":p=D;default:dt(a,s,x,D,f,null)}s=S,f=P,a.multiple=!!p,s!=null?_l(a,!!p,s,!1):f!=null&&_l(a,!!p,f,!0);return;case"textarea":Ke("invalid",a),S=x=p=null;for(P in f)if(f.hasOwnProperty(P)&&(D=f[P],D!=null))switch(P){case"value":p=D;break;case"defaultValue":x=D;break;case"children":S=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(91));break;default:dt(a,s,P,D,f,null)}MC(a,p,x,S);return;case"option":for(U in f)f.hasOwnProperty(U)&&(p=f[U],p!=null)&&(U==="selected"?a.selected=p&&typeof p!="function"&&typeof p!="symbol":dt(a,s,U,p,f,null));return;case"dialog":Ke("beforetoggle",a),Ke("toggle",a),Ke("cancel",a),Ke("close",a);break;case"iframe":case"object":Ke("load",a);break;case"video":case"audio":for(p=0;p<af.length;p++)Ke(af[p],a);break;case"image":Ke("error",a),Ke("load",a);break;case"details":Ke("toggle",a);break;case"embed":case"source":case"link":Ke("error",a),Ke("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(J in f)if(f.hasOwnProperty(J)&&(p=f[J],p!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:dt(a,s,J,p,f,null)}return;default:if(ny(s)){for(ue in f)f.hasOwnProperty(ue)&&(p=f[ue],p!==void 0&&Vb(a,s,ue,p,f,void 0));return}}for(D in f)f.hasOwnProperty(D)&&(p=f[D],p!=null&&dt(a,s,D,p,f,null))}function sF(a,s,f,p){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,S=null,P=null,D=null,U=null,J=null,ue=null;for(ie in f){var fe=f[ie];if(f.hasOwnProperty(ie)&&fe!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":U=fe;default:p.hasOwnProperty(ie)||dt(a,s,ie,null,p,fe)}}for(var te in p){var ie=p[te];if(fe=f[te],p.hasOwnProperty(te)&&(ie!=null||fe!=null))switch(te){case"type":S=ie;break;case"name":x=ie;break;case"checked":J=ie;break;case"defaultChecked":ue=ie;break;case"value":P=ie;break;case"defaultValue":D=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,s));break;default:ie!==fe&&dt(a,s,te,ie,p,fe)}}ey(a,P,D,U,J,ue,S,x);return;case"select":ie=P=D=te=null;for(S in f)if(U=f[S],f.hasOwnProperty(S)&&U!=null)switch(S){case"value":break;case"multiple":ie=U;default:p.hasOwnProperty(S)||dt(a,s,S,null,p,U)}for(x in p)if(S=p[x],U=f[x],p.hasOwnProperty(x)&&(S!=null||U!=null))switch(x){case"value":te=S;break;case"defaultValue":D=S;break;case"multiple":P=S;default:S!==U&&dt(a,s,x,S,p,U)}s=D,f=P,p=ie,te!=null?_l(a,!!f,te,!1):!!p!=!!f&&(s!=null?_l(a,!!f,s,!0):_l(a,!!f,f?[]:"",!1));return;case"textarea":ie=te=null;for(D in f)if(x=f[D],f.hasOwnProperty(D)&&x!=null&&!p.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:dt(a,s,D,null,p,x)}for(P in p)if(x=p[P],S=f[P],p.hasOwnProperty(P)&&(x!=null||S!=null))switch(P){case"value":te=x;break;case"defaultValue":ie=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==S&&dt(a,s,P,x,p,S)}_C(a,te,ie);return;case"option":for(var Se in f)te=f[Se],f.hasOwnProperty(Se)&&te!=null&&!p.hasOwnProperty(Se)&&(Se==="selected"?a.selected=!1:dt(a,s,Se,null,p,te));for(U in p)te=p[U],ie=f[U],p.hasOwnProperty(U)&&te!==ie&&(te!=null||ie!=null)&&(U==="selected"?a.selected=te&&typeof te!="function"&&typeof te!="symbol":dt(a,s,U,te,p,ie));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in f)te=f[Re],f.hasOwnProperty(Re)&&te!=null&&!p.hasOwnProperty(Re)&&dt(a,s,Re,null,p,te);for(J in p)if(te=p[J],ie=f[J],p.hasOwnProperty(J)&&te!==ie&&(te!=null||ie!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,s));break;default:dt(a,s,J,te,p,ie)}return;default:if(ny(s)){for(var ht in f)te=f[ht],f.hasOwnProperty(ht)&&te!==void 0&&!p.hasOwnProperty(ht)&&Vb(a,s,ht,void 0,p,te);for(ue in p)te=p[ue],ie=f[ue],!p.hasOwnProperty(ue)||te===ie||te===void 0&&ie===void 0||Vb(a,s,ue,te,p,ie);return}}for(var Y in f)te=f[Y],f.hasOwnProperty(Y)&&te!=null&&!p.hasOwnProperty(Y)&&dt(a,s,Y,null,p,te);for(fe in p)te=p[fe],ie=f[fe],!p.hasOwnProperty(fe)||te===ie||te==null&&ie==null||dt(a,s,fe,te,p,ie)}function kO(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lF(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,f=performance.getEntriesByType("resource"),p=0;p<f.length;p++){var x=f[p],S=x.transferSize,P=x.initiatorType,D=x.duration;if(S&&D&&kO(P)){for(P=0,D=x.responseEnd,p+=1;p<f.length;p++){var U=f[p],J=U.startTime;if(J>D)break;var ue=U.transferSize,fe=U.initiatorType;ue&&kO(fe)&&(U=U.responseEnd,P+=ue*(U<D?1:(D-J)/(U-J)))}if(--p,s+=8*(S+P)/(x.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 Fb=null,Hb=null;function nm(a){return a.nodeType===9?a:a.ownerDocument}function LO(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 IO(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 qb(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 Kb=null;function uF(){var a=window.event;return a&&a.type==="popstate"?a===Kb?!1:(Kb=a,!0):(Kb=null,!1)}var zO=typeof setTimeout=="function"?setTimeout:void 0,cF=typeof clearTimeout=="function"?clearTimeout:void 0,BO=typeof Promise=="function"?Promise:void 0,fF=typeof queueMicrotask=="function"?queueMicrotask:typeof BO<"u"?function(a){return BO.resolve(null).then(a).catch(dF)}:zO;function dF(a){setTimeout(function(){throw a})}function Uo(a){return a==="head"}function $O(a,s){var f=s,p=0;do{var x=f.nextSibling;if(a.removeChild(f),x&&x.nodeType===8)if(f=x.data,f==="/$"||f==="/&"){if(p===0){a.removeChild(x),uu(s);return}p--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")p++;else if(f==="html")sf(a.ownerDocument.documentElement);else if(f==="head"){f=a.ownerDocument.head,sf(f);for(var S=f.firstChild;S;){var P=S.nextSibling,D=S.nodeName;S[ys]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&S.rel.toLowerCase()==="stylesheet"||f.removeChild(S),S=P}}else f==="body"&&sf(a.ownerDocument.body);f=x}while(f);uu(s)}function UO(a,s){var f=a;a=0;do{var p=f.nextSibling;if(f.nodeType===1?s?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(s?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),p&&p.nodeType===8)if(f=p.data,f==="/$"){if(a===0)break;a--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||a++;f=p}while(f)}function Gb(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var f=s;switch(s=s.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Gb(f),Ec(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}a.removeChild(f)}}function hF(a,s,f,p){for(;a.nodeType===1;){var x=f;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(p){if(!a[ys])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(S=a.getAttribute("rel"),S==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(S!==x.rel||a.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||a.getAttribute("title")!==(x.title==null?null:x.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(S=a.getAttribute("src"),(S!==(x.src==null?null:x.src)||a.getAttribute("type")!==(x.type==null?null:x.type)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&S&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var S=x.name==null?null:""+x.name;if(x.type==="hidden"&&a.getAttribute("name")===S)return a}else return a;if(a=ti(a.nextSibling),a===null)break}return null}function mF(a,s,f){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!f||(a=ti(a.nextSibling),a===null))return null;return a}function VO(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=ti(a.nextSibling),a===null))return null;return a}function Yb(a){return a.data==="$?"||a.data==="$~"}function Wb(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function pF(a,s){var f=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||f.readyState!=="loading")s();else{var p=function(){s(),f.removeEventListener("DOMContentLoaded",p)};f.addEventListener("DOMContentLoaded",p),a._reactRetry=p}}function ti(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 Xb=null;function FO(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"||f==="/&"){if(s===0)return ti(a.nextSibling);s--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||s++}a=a.nextSibling}return null}function HO(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(s===0)return a;s--}else f!=="/$"&&f!=="/&"||s++}a=a.previousSibling}return null}function qO(a,s,f){switch(s=nm(f),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function sf(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Ec(a)}var ni=new Map,KO=new Set;function rm(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ha=F.d;F.d={f:gF,r:vF,D:yF,C:bF,L:xF,m:wF,X:AF,S:SF,M:EF};function gF(){var a=Ha.f(),s=Yh();return a||s}function vF(a){var s=Ao(a);s!==null&&s.tag===5&&s.type==="form"?uT(s):Ha.r(a)}var ou=typeof document>"u"?null:document;function GO(a,s,f){var p=ou;if(p&&typeof s=="string"&&s){var x=Yr(s);x='link[rel="'+a+'"][href="'+x+'"]',typeof f=="string"&&(x+='[crossorigin="'+f+'"]'),KO.has(x)||(KO.add(x),a={rel:a,crossOrigin:f,href:s},p.querySelector(x)===null&&(s=p.createElement("link"),Pn(s,"link",a),Je(s),p.head.appendChild(s)))}}function yF(a){Ha.D(a),GO("dns-prefetch",a,null)}function bF(a,s){Ha.C(a,s),GO("preconnect",a,s)}function xF(a,s,f){Ha.L(a,s,f);var p=ou;if(p&&a&&s){var x='link[rel="preload"][as="'+Yr(s)+'"]';s==="image"&&f&&f.imageSrcSet?(x+='[imagesrcset="'+Yr(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(x+='[imagesizes="'+Yr(f.imageSizes)+'"]')):x+='[href="'+Yr(a)+'"]';var S=x;switch(s){case"style":S=su(a);break;case"script":S=lu(a)}ni.has(S)||(a=h({rel:"preload",href:s==="image"&&f&&f.imageSrcSet?void 0:a,as:s},f),ni.set(S,a),p.querySelector(x)!==null||s==="style"&&p.querySelector(lf(S))||s==="script"&&p.querySelector(uf(S))||(s=p.createElement("link"),Pn(s,"link",a),Je(s),p.head.appendChild(s)))}}function wF(a,s){Ha.m(a,s);var f=ou;if(f&&a){var p=s&&typeof s.as=="string"?s.as:"script",x='link[rel="modulepreload"][as="'+Yr(p)+'"][href="'+Yr(a)+'"]',S=x;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=lu(a)}if(!ni.has(S)&&(a=h({rel:"modulepreload",href:a},s),ni.set(S,a),f.querySelector(x)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(uf(S)))return}p=f.createElement("link"),Pn(p,"link",a),Je(p),f.head.appendChild(p)}}}function SF(a,s,f){Ha.S(a,s,f);var p=ou;if(p&&a){var x=_e(p).hoistableStyles,S=su(a);s=s||"default";var P=x.get(S);if(!P){var D={loading:0,preload:null};if(P=p.querySelector(lf(S)))D.loading=5;else{a=h({rel:"stylesheet",href:a,"data-precedence":s},f),(f=ni.get(S))&&Zb(a,f);var U=P=p.createElement("link");Je(U),Pn(U,"link",a),U._p=new Promise(function(J,ue){U.onload=J,U.onerror=ue}),U.addEventListener("load",function(){D.loading|=1}),U.addEventListener("error",function(){D.loading|=2}),D.loading|=4,im(P,s,p)}P={type:"stylesheet",instance:P,count:1,state:D},x.set(S,P)}}}function AF(a,s){Ha.X(a,s);var f=ou;if(f&&a){var p=_e(f).hoistableScripts,x=lu(a),S=p.get(x);S||(S=f.querySelector(uf(x)),S||(a=h({src:a,async:!0},s),(s=ni.get(x))&&Qb(a,s),S=f.createElement("script"),Je(S),Pn(S,"link",a),f.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(x,S))}}function EF(a,s){Ha.M(a,s);var f=ou;if(f&&a){var p=_e(f).hoistableScripts,x=lu(a),S=p.get(x);S||(S=f.querySelector(uf(x)),S||(a=h({src:a,async:!0,type:"module"},s),(s=ni.get(x))&&Qb(a,s),S=f.createElement("script"),Je(S),Pn(S,"link",a),f.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(x,S))}}function YO(a,s,f,p){var x=(x=pe.current)?rm(x):null;if(!x)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(s=su(f.href),f=_e(x).hoistableStyles,p=f.get(s),p||(p={type:"style",instance:null,count:0,state:null},f.set(s,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){a=su(f.href);var S=_e(x).hoistableStyles,P=S.get(a);if(P||(x=x.ownerDocument||x,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(a,P),(S=x.querySelector(lf(a)))&&!S._p&&(P.instance=S,P.state.loading=5),ni.has(a)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},ni.set(a,f),S||CF(x,a,f,P.state))),s&&p===null)throw Error(r(528,""));return P}if(s&&p!==null)throw Error(r(529,""));return null;case"script":return s=f.async,f=f.src,typeof f=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=lu(f),f=_e(x).hoistableScripts,p=f.get(s),p||(p={type:"script",instance:null,count:0,state:null},f.set(s,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function su(a){return'href="'+Yr(a)+'"'}function lf(a){return'link[rel="stylesheet"]['+a+"]"}function WO(a){return h({},a,{"data-precedence":a.precedence,precedence:null})}function CF(a,s,f,p){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=a.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),Pn(s,"link",f),Je(s),a.head.appendChild(s))}function lu(a){return'[src="'+Yr(a)+'"]'}function uf(a){return"script[async]"+a}function XO(a,s,f){if(s.count++,s.instance===null)switch(s.type){case"style":var p=a.querySelector('style[data-href~="'+Yr(f.href)+'"]');if(p)return s.instance=p,Je(p),p;var x=h({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return p=(a.ownerDocument||a).createElement("style"),Je(p),Pn(p,"style",x),im(p,f.precedence,a),s.instance=p;case"stylesheet":x=su(f.href);var S=a.querySelector(lf(x));if(S)return s.state.loading|=4,s.instance=S,Je(S),S;p=WO(f),(x=ni.get(x))&&Zb(p,x),S=(a.ownerDocument||a).createElement("link"),Je(S);var P=S;return P._p=new Promise(function(D,U){P.onload=D,P.onerror=U}),Pn(S,"link",p),s.state.loading|=4,im(S,f.precedence,a),s.instance=S;case"script":return S=lu(f.src),(x=a.querySelector(uf(S)))?(s.instance=x,Je(x),x):(p=f,(x=ni.get(S))&&(p=h({},f),Qb(p,x)),a=a.ownerDocument||a,x=a.createElement("script"),Je(x),Pn(x,"link",p),a.head.appendChild(x),s.instance=x);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(p=s.instance,s.state.loading|=4,im(p,f.precedence,a));return s.instance}function im(a,s,f){for(var p=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=p.length?p[p.length-1]:null,S=x,P=0;P<p.length;P++){var D=p[P];if(D.dataset.precedence===s)S=D;else if(S!==x)break}S?S.parentNode.insertBefore(a,S.nextSibling):(s=f.nodeType===9?f.head:f,s.insertBefore(a,s.firstChild))}function Zb(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function Qb(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var am=null;function ZO(a,s,f){if(am===null){var p=new Map,x=am=new Map;x.set(f,p)}else x=am,p=x.get(f),p||(p=new Map,x.set(f,p));if(p.has(a))return p;for(p.set(a,null),f=f.getElementsByTagName(a),x=0;x<f.length;x++){var S=f[x];if(!(S[ys]||S[ln]||a==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var P=S.getAttribute(s)||"";P=a+P;var D=p.get(P);D?D.push(S):p.set(P,[S])}}return p}function QO(a,s,f){a=a.ownerDocument||a,a.head.insertBefore(f,s==="title"?a.querySelector("head > title"):null)}function jF(a,s,f){if(f===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;return s.rel==="stylesheet"?(a=s.disabled,typeof s.precedence=="string"&&a==null):!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 JO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function TF(a,s,f,p){if(f.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var x=su(p.href),S=s.querySelector(lf(x));if(S){s=S._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=om.bind(a),s.then(a,a)),f.state.loading|=4,f.instance=S,Je(S);return}S=s.ownerDocument||s,p=WO(p),(x=ni.get(x))&&Zb(p,x),S=S.createElement("link"),Je(S);var P=S;P._p=new Promise(function(D,U){P.onload=D,P.onerror=U}),Pn(S,"link",p),f.instance=S}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(f,s),(s=f.state.preload)&&(f.state.loading&3)===0&&(a.count++,f=om.bind(a),s.addEventListener("load",f),s.addEventListener("error",f))}}var Jb=0;function OF(a,s){return a.stylesheets&&a.count===0&&lm(a,a.stylesheets),0<a.count||0<a.imgCount?function(f){var p=setTimeout(function(){if(a.stylesheets&&lm(a,a.stylesheets),a.unsuspend){var S=a.unsuspend;a.unsuspend=null,S()}},6e4+s);0<a.imgBytes&&Jb===0&&(Jb=62500*lF());var x=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&lm(a,a.stylesheets),a.unsuspend)){var S=a.unsuspend;a.unsuspend=null,S()}},(a.imgBytes>Jb?50:800)+s);return a.unsuspend=f,function(){a.unsuspend=null,clearTimeout(p),clearTimeout(x)}}:null}function om(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lm(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var sm=null;function lm(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,sm=new Map,s.forEach(PF,a),sm=null,om.call(a))}function PF(a,s){if(!(s.state.loading&4)){var f=sm.get(a);if(f)var p=f.get(null);else{f=new Map,sm.set(a,f);for(var x=a.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<x.length;S++){var P=x[S];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(f.set(P.dataset.precedence,P),p=P)}p&&f.set(null,p)}x=s.instance,P=x.getAttribute("data-precedence"),S=f.get(P)||p,S===p&&f.set(null,x),f.set(P,x),this.count++,p=om.bind(this),x.addEventListener("load",p),x.addEventListener("error",p),S?S.parentNode.insertBefore(x,S.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(x,a.firstChild)),s.state.loading|=4}}var cf={$$typeof:T,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function NF(a,s,f,p,x,S,P,D,U){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=Cr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cr(0),this.hiddenUpdates=Cr(null),this.identifierPrefix=p,this.onUncaughtError=x,this.onCaughtError=S,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function eP(a,s,f,p,x,S,P,D,U,J,ue,fe){return a=new NF(a,s,f,P,U,J,ue,fe,D),s=1,S===!0&&(s|=24),S=Or(3,null,null,s),a.current=S,S.stateNode=a,s=My(),s.refCount++,a.pooledCache=s,s.refCount++,S.memoizedState={element:p,isDehydrated:f,cache:s},Ly(S),a}function tP(a){return a?(a=Bl,a):Bl}function nP(a,s,f,p,x,S){x=tP(x),p.context===null?p.context=x:p.pendingContext=x,p=No(s),p.payload={element:f},S=S===void 0?null:S,S!==null&&(p.callback=S),f=_o(a,p,s),f!==null&&(gr(f,a,s),Uc(f,a,s))}function rP(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<s?f:s}}function e0(a,s){rP(a,s),(a=a.alternate)&&rP(a,s)}function iP(a){if(a.tag===13||a.tag===31){var s=Ss(a,67108864);s!==null&&gr(s,a,67108864),e0(a,67108864)}}function aP(a){if(a.tag===13||a.tag===31){var s=Rr();s=xo(s);var f=Ss(a,s);f!==null&&gr(f,a,s),e0(a,s)}}var um=!0;function _F(a,s,f,p){var x=L.T;L.T=null;var S=F.p;try{F.p=2,t0(a,s,f,p)}finally{F.p=S,L.T=x}}function MF(a,s,f,p){var x=L.T;L.T=null;var S=F.p;try{F.p=8,t0(a,s,f,p)}finally{F.p=S,L.T=x}}function t0(a,s,f,p){if(um){var x=n0(p);if(x===null)Ub(a,s,p,cm,f),sP(a,p);else if(DF(x,a,s,f,p))p.stopPropagation();else if(sP(a,p),s&4&&-1<RF.indexOf(a)){for(;x!==null;){var S=Ao(x);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var P=cr(S.pendingLanes);if(P!==0){var D=S;for(D.pendingLanes|=2,D.entangledLanes|=2;P;){var U=1<<31-Xt(P);D.entanglements[1]|=U,P&=~U}Ki(S),(at&6)===0&&(Kh=Yt()+500,rf(0))}}break;case 31:case 13:D=Ss(S,2),D!==null&&gr(D,S,2),Yh(),e0(S,2)}if(S=n0(p),S===null&&Ub(a,s,p,cm,f),S===x)break;x=S}x!==null&&p.stopPropagation()}else Ub(a,s,p,null,f)}}function n0(a){return a=iy(a),r0(a)}var cm=null;function r0(a){if(cm=null,a=So(a),a!==null){var s=o(a);if(s===null)a=null;else{var f=s.tag;if(f===13){if(a=l(s),a!==null)return a;a=null}else if(f===31){if(a=u(s),a!==null)return a;a=null}else if(f===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return cm=a,null}function oP(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(gs()){case gi:return 2;case bo:return 8;case vi:case wa:return 32;case Er:return 268435456;default:return 32}default:return 32}}var i0=!1,Vo=null,Fo=null,Ho=null,ff=new Map,df=new Map,qo=[],RF="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 sP(a,s){switch(a){case"focusin":case"focusout":Vo=null;break;case"dragenter":case"dragleave":Fo=null;break;case"mouseover":case"mouseout":Ho=null;break;case"pointerover":case"pointerout":ff.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":df.delete(s.pointerId)}}function hf(a,s,f,p,x,S){return a===null||a.nativeEvent!==S?(a={blockedOn:s,domEventName:f,eventSystemFlags:p,nativeEvent:S,targetContainers:[x]},s!==null&&(s=Ao(s),s!==null&&iP(s)),a):(a.eventSystemFlags|=p,s=a.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),a)}function DF(a,s,f,p,x){switch(s){case"focusin":return Vo=hf(Vo,a,s,f,p,x),!0;case"dragenter":return Fo=hf(Fo,a,s,f,p,x),!0;case"mouseover":return Ho=hf(Ho,a,s,f,p,x),!0;case"pointerover":var S=x.pointerId;return ff.set(S,hf(ff.get(S)||null,a,s,f,p,x)),!0;case"gotpointercapture":return S=x.pointerId,df.set(S,hf(df.get(S)||null,a,s,f,p,x)),!0}return!1}function lP(a){var s=So(a.target);if(s!==null){var f=o(s);if(f!==null){if(s=f.tag,s===13){if(s=l(f),s!==null){a.blockedOn=s,th(a.priority,function(){aP(f)});return}}else if(s===31){if(s=u(f),s!==null){a.blockedOn=s,th(a.priority,function(){aP(f)});return}}else if(s===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function fm(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var f=n0(a.nativeEvent);if(f===null){f=a.nativeEvent;var p=new f.constructor(f.type,f);ry=p,f.target.dispatchEvent(p),ry=null}else return s=Ao(f),s!==null&&iP(s),a.blockedOn=f,!1;s.shift()}return!0}function uP(a,s,f){fm(a)&&f.delete(s)}function kF(){i0=!1,Vo!==null&&fm(Vo)&&(Vo=null),Fo!==null&&fm(Fo)&&(Fo=null),Ho!==null&&fm(Ho)&&(Ho=null),ff.forEach(uP),df.forEach(uP)}function dm(a,s){a.blockedOn===s&&(a.blockedOn=null,i0||(i0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,kF)))}var hm=null;function cP(a){hm!==a&&(hm=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){hm===a&&(hm=null);for(var s=0;s<a.length;s+=3){var f=a[s],p=a[s+1],x=a[s+2];if(typeof p!="function"){if(r0(p||f)===null)continue;break}var S=Ao(f);S!==null&&(a.splice(s,3),s-=3,nb(S,{pending:!0,data:x,method:f.method,action:p},p,x))}}))}function uu(a){function s(U){return dm(U,a)}Vo!==null&&dm(Vo,a),Fo!==null&&dm(Fo,a),Ho!==null&&dm(Ho,a),ff.forEach(s),df.forEach(s);for(var f=0;f<qo.length;f++){var p=qo[f];p.blockedOn===a&&(p.blockedOn=null)}for(;0<qo.length&&(f=qo[0],f.blockedOn===null);)lP(f),f.blockedOn===null&&qo.shift();if(f=(a.ownerDocument||a).$$reactFormReplay,f!=null)for(p=0;p<f.length;p+=3){var x=f[p],S=f[p+1],P=x[Fn]||null;if(typeof S=="function")P||cP(f);else if(P){var D=null;if(S&&S.hasAttribute("formAction")){if(x=S,P=S[Fn]||null)D=P.formAction;else if(r0(x)!==null)continue}else D=P.action;typeof D=="function"?f[p+1]=D:(f.splice(p,3),p-=3),cP(f)}}}function fP(){function a(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(P){return x=P})},focusReset:"manual",scroll:"manual"})}function s(){x!==null&&(x(),x=null),p||setTimeout(f,20)}function f(){if(!p&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,x=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(f,100),function(){p=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),x!==null&&(x(),x=null)}}}function a0(a){this._internalRoot=a}mm.prototype.render=a0.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var f=s.current,p=Rr();nP(f,p,a,s,null,null)},mm.prototype.unmount=a0.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;nP(a.current,2,null,a,null,null),Yh(),s[wo]=null}};function mm(a){this._internalRoot=a}mm.prototype.unstable_scheduleHydration=function(a){if(a){var s=Sc();a={blockedOn:null,target:a,priority:s};for(var f=0;f<qo.length&&s!==0&&s<qo[f].priority;f++);qo.splice(f,0,a),f===0&&lP(a)}};var dP=t.version;if(dP!=="19.2.3")throw Error(r(527,dP,"19.2.3"));F.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=d(s),a=a!==null?m(a):null,a=a===null?null:a.stateNode,a};var LF={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pm.isDisabled&&pm.supportsFiber)try{lr=pm.inject(LF),Wt=pm}catch{}}return pf.createRoot=function(a,s){if(!i(a))throw Error(r(299));var f=!1,p="",x=bT,S=xT,P=wT;return s!=null&&(s.unstable_strictMode===!0&&(f=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(x=s.onUncaughtError),s.onCaughtError!==void 0&&(S=s.onCaughtError),s.onRecoverableError!==void 0&&(P=s.onRecoverableError)),s=eP(a,1,!1,null,null,f,p,null,x,S,P,fP),a[wo]=s.current,$b(a),new a0(s)},pf.hydrateRoot=function(a,s,f){if(!i(a))throw Error(r(299));var p=!1,x="",S=bT,P=xT,D=wT,U=null;return f!=null&&(f.unstable_strictMode===!0&&(p=!0),f.identifierPrefix!==void 0&&(x=f.identifierPrefix),f.onUncaughtError!==void 0&&(S=f.onUncaughtError),f.onCaughtError!==void 0&&(P=f.onCaughtError),f.onRecoverableError!==void 0&&(D=f.onRecoverableError),f.formState!==void 0&&(U=f.formState)),s=eP(a,1,!0,s,f??null,p,x,U,S,P,D,fP),s.context=tP(null),f=s.current,p=Rr(),p=xo(p),x=No(p),x.callback=null,_o(f,x,p),f=p,s.current.lanes=f,ze(s,f),Ki(s),a[wo]=s.current,$b(a),new mm(s)},pf.version="19.2.3",pf}var SP;function KF(){if(SP)return l0.exports;SP=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(),l0.exports=qF(),l0.exports}var GF=KF();var AP="popstate";function YF(e={}){function t(i,o){let{pathname:l="/",search:u="",hash:c=""}=Al(i.location.hash.substring(1));return!l.startsWith("/")&&!l.startsWith(".")&&(l="/"+l),_w("",{pathname:l,search:u,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(i,o){let l=i.document.querySelector("base"),u="";if(l&&l.getAttribute("href")){let c=i.location.href,d=c.indexOf("#");u=d===-1?c:c.slice(0,d)}return u+"#"+(typeof o=="string"?o:Wf(o))}function r(i,o){Ar(i.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return XF(t,n,r,e)}function Nt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ar(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function WF(){return Math.random().toString(36).substring(2,10)}function EP(e,t){return{usr:e.state,key:e.key,idx:t}}function _w(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Al(t):t,state:n,key:t&&t.key||r||WF()}}function Wf({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Al(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function XF(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,u="POP",c=null,d=m();d==null&&(d=0,l.replaceState({...l.state,idx:d},""));function m(){return(l.state||{idx:null}).idx}function h(){u="POP";let E=m(),C=E==null?null:E-d;d=E,c&&c({action:u,location:A.location,delta:C})}function y(E,C){u="PUSH";let j=_w(A.location,E,C);n&&n(j,E),d=m()+1;let T=EP(j,d),O=A.createHref(j);try{l.pushState(T,"",O)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(O)}o&&c&&c({action:u,location:A.location,delta:1})}function b(E,C){u="REPLACE";let j=_w(A.location,E,C);n&&n(j,E),d=m();let T=EP(j,d),O=A.createHref(j);l.replaceState(T,"",O),o&&c&&c({action:u,location:A.location,delta:0})}function w(E){return ZF(E)}let A={get action(){return u},get location(){return e(i,l)},listen(E){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(AP,h),c=E,()=>{i.removeEventListener(AP,h),c=null}},createHref(E){return t(i,E)},createURL:w,encodeLocation(E){let C=w(E);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:y,replace:b,go(E){return l.go(E)}};return A}function ZF(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Nt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Wf(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function hL(e,t,n="/"){return QF(e,t,n,!1)}function QF(e,t,n,r){let i=typeof t=="string"?Al(t):t,o=eo(i.pathname||"/",n);if(o==null)return null;let l=mL(e);JF(l);let u=null;for(let c=0;u==null&&c<l.length;++c){let d=cH(o);u=lH(l[c],d,r)}return u}function mL(e,t=[],n=[],r="",i=!1){let o=(l,u,c=i,d)=>{let m={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&c)return;Nt(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let h=Za([r,m.relativePath]),y=n.concat(m);l.children&&l.children.length>0&&(Nt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),mL(l.children,t,y,h,c)),!(l.path==null&&!l.index)&&t.push({path:h,score:oH(h,l.index),routesMeta:y})};return e.forEach((l,u)=>{if(l.path===""||!l.path?.includes("?"))o(l,u);else for(let c of pL(l.path))o(l,u,!0,c)}),t}function pL(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=pL(r.join("/")),u=[];return u.push(...l.map(c=>c===""?o:[o,c].join("/"))),i&&u.push(...l),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function JF(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sH(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var eH=/^:[\w-]+$/,tH=3,nH=2,rH=1,iH=10,aH=-2,CP=e=>e==="*";function oH(e,t){let n=e.split("/"),r=n.length;return n.some(CP)&&(r+=aH),t&&(r+=nH),n.filter(i=>!CP(i)).reduce((i,o)=>i+(eH.test(o)?tH:o===""?rH:iH),r)}function sH(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function lH(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",l=[];for(let u=0;u<r.length;++u){let c=r[u],d=u===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",h=gp({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},m),y=c.route;if(!h&&d&&n&&!r[r.length-1].route.index&&(h=gp({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},m)),!h)return null;Object.assign(i,h.params),l.push({params:i,pathname:Za([o,h.pathname]),pathnameBase:mH(Za([o,h.pathnameBase])),route:y}),h.pathnameBase!=="/"&&(o=Za([o,h.pathnameBase]))}return l}function gp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=uH(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],l=o.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:r.reduce((d,{paramName:m,isOptional:h},y)=>{if(m==="*"){let w=u[y]||"";l=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const b=u[y];return h&&!b?d[m]=void 0:d[m]=(b||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:l,pattern:e}}function uH(e,t=!1,n=!0){Ar(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,c)=>(r.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function cH(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ar(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function eo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var gL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fH=e=>gL.test(e);function dH(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Al(e):e,o;if(n)if(fH(n))o=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Ar(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?o=jP(n.substring(1),"/"):o=jP(n,t)}else o=t;return{pathname:o,search:pH(r),hash:gH(i)}}function jP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function d0(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function hH(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ES(e){let t=hH(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function CS(e,t,n,r=!1){let i;typeof e=="string"?i=Al(e):(i={...e},Nt(!i.pathname||!i.pathname.includes("?"),d0("?","pathname","search",i)),Nt(!i.pathname||!i.pathname.includes("#"),d0("#","pathname","hash",i)),Nt(!i.search||!i.search.includes("#"),d0("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,u;if(l==null)u=n;else{let h=t.length-1;if(!r&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),h-=1;i.pathname=y.join("/")}u=h>=0?t[h]:"/"}let c=dH(i,u),d=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||m)&&(c.pathname+="/"),c}var Za=e=>e.join("/").replace(/\/\/+/g,"/"),mH=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),pH=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gH=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,vH=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function yH(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bH(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var vL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function yL(e,t){let n=e;if(typeof n!="string"||!gL.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(vL)try{let o=new URL(window.location.href),l=n.startsWith("//")?new URL(o.protocol+n):new URL(n),u=eo(l.pathname,t);l.origin===o.origin&&u!=null?n=u+l.search+l.hash:i=!0}catch{Ar(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var bL=["POST","PUT","PATCH","DELETE"];new Set(bL);var xH=["GET",...bL];new Set(xH);var nc=v.createContext(null);nc.displayName="DataRouter";var Rg=v.createContext(null);Rg.displayName="DataRouterState";var wH=v.createContext(!1),xL=v.createContext({isTransitioning:!1});xL.displayName="ViewTransition";var SH=v.createContext(new Map);SH.displayName="Fetchers";var AH=v.createContext(null);AH.displayName="Await";var Hr=v.createContext(null);Hr.displayName="Navigation";var Td=v.createContext(null);Td.displayName="Location";var mi=v.createContext({outlet:null,matches:[],isDataRoute:!1});mi.displayName="Route";var jS=v.createContext(null);jS.displayName="RouteError";var wL="REACT_ROUTER_ERROR",EH="REDIRECT",CH="ROUTE_ERROR_RESPONSE";function jH(e){if(e.startsWith(`${wL}:${EH}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function TH(e){if(e.startsWith(`${wL}:${CH}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new vH(t.status,t.statusText,t.data)}catch{}}function OH(e,{relative:t}={}){Nt(rc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=v.useContext(Hr),{hash:i,pathname:o,search:l}=Od(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Za([n,o])),r.createHref({pathname:u,search:l,hash:i})}function rc(){return v.useContext(Td)!=null}function ya(){return Nt(rc(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Td).location}var SL="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function AL(e){v.useContext(Hr).static||v.useLayoutEffect(e)}function TS(){let{isDataRoute:e}=v.useContext(mi);return e?HH():PH()}function PH(){Nt(rc(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(nc),{basename:t,navigator:n}=v.useContext(Hr),{matches:r}=v.useContext(mi),{pathname:i}=ya(),o=JSON.stringify(ES(r)),l=v.useRef(!1);return AL(()=>{l.current=!0}),v.useCallback((c,d={})=>{if(Ar(l.current,SL),!l.current)return;if(typeof c=="number"){n.go(c);return}let m=CS(c,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Za([t,m.pathname])),(d.replace?n.replace:n.push)(m,d.state,d)},[t,n,o,i,e])}var NH=v.createContext(null);function _H(e){let t=v.useContext(mi).outlet;return v.useMemo(()=>t&&v.createElement(NH.Provider,{value:e},t),[t,e])}function MH(){let{matches:e}=v.useContext(mi),t=e[e.length-1];return t?t.params:{}}function Od(e,{relative:t}={}){let{matches:n}=v.useContext(mi),{pathname:r}=ya(),i=JSON.stringify(ES(n));return v.useMemo(()=>CS(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function RH(e,t){return EL(e,t)}function EL(e,t,n,r,i){Nt(rc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=v.useContext(Hr),{matches:l}=v.useContext(mi),u=l[l.length-1],c=u?u.params:{},d=u?u.pathname:"/",m=u?u.pathnameBase:"/",h=u&&u.route;{let j=h&&h.path||"";jL(d,!h||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
-
|
|
11
|
-
Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let y=ya(),b;if(t){let j=typeof t=="string"?Al(t):t;Nt(m==="/"||j.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${j.pathname}" was given in the \`location\` prop.`),b=j}else b=y;let w=b.pathname||"/",A=w;if(m!=="/"){let j=m.replace(/^\//,"").split("/");A="/"+w.replace(/^\//,"").split("/").slice(j.length).join("/")}let E=hL(e,{pathname:A});Ar(h||E!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Ar(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=zH(E&&E.map(j=>Object.assign({},j,{params:Object.assign({},c,j.params),pathname:Za([m,o.encodeLocation?o.encodeLocation(j.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?m:Za([m,o.encodeLocation?o.encodeLocation(j.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),l,n,r,i);return t&&C?v.createElement(Td.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},C):C}function DH(){let e=FH(),t=yH(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:o},"ErrorBoundary")," or"," ",v.createElement("code",{style:o},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,l)}var kH=v.createElement(DH,null),CL=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=TH(e.digest);n&&(e=n)}let t=e!==void 0?v.createElement(mi.Provider,{value:this.props.routeContext},v.createElement(jS.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(LH,{error:e},t):t}};CL.contextType=wH;var h0=new WeakMap;function LH({children:e,error:t}){let{basename:n}=v.useContext(Hr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=jH(t.digest);if(r){let i=h0.get(t);if(i)throw i;let o=yL(r.location,n);if(vL&&!h0.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw h0.set(t,l),l}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function IH({routeContext:e,match:t,children:n}){let r=v.useContext(nc);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(mi.Provider,{value:e},n)}function zH(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=n?.errors;if(l!=null){let m=o.findIndex(h=>h.route.id&&l?.[h.route.id]!==void 0);Nt(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let u=!1,c=-1;if(n)for(let m=0;m<o.length;m++){let h=o[m];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=m),h.route.id){let{loaderData:y,errors:b}=n,w=h.route.loader&&!y.hasOwnProperty(h.route.id)&&(!b||b[h.route.id]===void 0);if(h.route.lazy||w){u=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}let d=n&&r?(m,h)=>{r(m,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:bH(n.matches),errorInfo:h})}:void 0;return o.reduceRight((m,h,y)=>{let b,w=!1,A=null,E=null;n&&(b=l&&h.route.id?l[h.route.id]:void 0,A=h.route.errorElement||kH,u&&(c<0&&y===0?(jL("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,E=null):c===y&&(w=!0,E=h.route.hydrateFallbackElement||null)));let C=t.concat(o.slice(0,y+1)),j=()=>{let T;return b?T=A:w?T=E:h.route.Component?T=v.createElement(h.route.Component,null):h.route.element?T=h.route.element:T=m,v.createElement(IH,{match:h,routeContext:{outlet:m,matches:C,isDataRoute:n!=null},children:T})};return n&&(h.route.ErrorBoundary||h.route.errorElement||y===0)?v.createElement(CL,{location:n.location,revalidation:n.revalidation,component:A,error:b,children:j(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:d}):j()},null)}function OS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function BH(e){let t=v.useContext(nc);return Nt(t,OS(e)),t}function $H(e){let t=v.useContext(Rg);return Nt(t,OS(e)),t}function UH(e){let t=v.useContext(mi);return Nt(t,OS(e)),t}function PS(e){let t=UH(e),n=t.matches[t.matches.length-1];return Nt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function VH(){return PS("useRouteId")}function FH(){let e=v.useContext(jS),t=$H("useRouteError"),n=PS("useRouteError");return e!==void 0?e:t.errors?.[n]}function HH(){let{router:e}=BH("useNavigate"),t=PS("useNavigate"),n=v.useRef(!1);return AL(()=>{n.current=!0}),v.useCallback(async(i,o={})=>{Ar(n.current,SL),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var TP={};function jL(e,t,n){!t&&!TP[e]&&(TP[e]=!0,Ar(!1,n))}v.memo(qH);function qH({routes:e,future:t,state:n,onError:r}){return EL(e,void 0,n,r,t)}function KH({to:e,replace:t,state:n,relative:r}){Nt(rc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=v.useContext(Hr);Ar(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=v.useContext(mi),{pathname:l}=ya(),u=TS(),c=CS(e,ES(o),l,r==="path"),d=JSON.stringify(c);return v.useEffect(()=>{u(JSON.parse(d),{replace:t,state:n,relative:r})},[u,d,r,t,n]),null}function GH(e){return _H(e.context)}function Zi(e){Nt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function YH({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1,unstable_useTransitions:l}){Nt(!rc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:u,navigator:i,static:o,unstable_useTransitions:l,future:{}}),[u,i,o,l]);typeof n=="string"&&(n=Al(n));let{pathname:d="/",search:m="",hash:h="",state:y=null,key:b="default"}=n,w=v.useMemo(()=>{let A=eo(d,u);return A==null?null:{location:{pathname:A,search:m,hash:h,state:y,key:b},navigationType:r}},[u,d,m,h,y,b,r]);return Ar(w!=null,`<Router basename="${u}"> is not able to match the URL "${d}${m}${h}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:v.createElement(Hr.Provider,{value:c},v.createElement(Td.Provider,{children:t,value:w}))}function WH({children:e,location:t}){return RH(Mw(e),t)}function Mw(e,t=[]){let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let o=[...t,i];if(r.type===v.Fragment){n.push.apply(n,Mw(r.props.children,o));return}Nt(r.type===Zi,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Nt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=Mw(r.props.children,o)),n.push(l)}),n}var Qm="get",Jm="application/x-www-form-urlencoded";function Dg(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function XH(e){return Dg(e)&&e.tagName.toLowerCase()==="button"}function ZH(e){return Dg(e)&&e.tagName.toLowerCase()==="form"}function QH(e){return Dg(e)&&e.tagName.toLowerCase()==="input"}function JH(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function eq(e,t){return e.button===0&&(!t||t==="_self")&&!JH(e)}function Rw(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function tq(e,t){let n=Rw(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}var gm=null;function nq(){if(gm===null)try{new FormData(document.createElement("form"),0),gm=!1}catch{gm=!0}return gm}var rq=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function m0(e){return e!=null&&!rq.has(e)?(Ar(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jm}"`),null):e}function iq(e,t){let n,r,i,o,l;if(ZH(e)){let u=e.getAttribute("action");r=u?eo(u,t):null,n=e.getAttribute("method")||Qm,i=m0(e.getAttribute("enctype"))||Jm,o=new FormData(e)}else if(XH(e)||QH(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||u.getAttribute("action");if(r=c?eo(c,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Qm,i=m0(e.getAttribute("formenctype"))||m0(u.getAttribute("enctype"))||Jm,o=new FormData(u,e),!nq()){let{name:d,type:m,value:h}=e;if(m==="image"){let y=d?`${d}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else d&&o.append(d,h)}}else{if(Dg(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Qm,r=null,i=Jm,l=e}return o&&i==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function NS(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function aq(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&eo(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function oq(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function sq(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function lq(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let l=await oq(o,n);return l.links?l.links():[]}return[]}));return dq(r.flat(1).filter(sq).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function OP(e,t,n,r,i,o){let l=(c,d)=>n[d]?c.route.id!==n[d].route.id:!0,u=(c,d)=>n[d].pathname!==c.pathname||n[d].route.path?.endsWith("*")&&n[d].params["*"]!==c.params["*"];return o==="assets"?t.filter((c,d)=>l(c,d)||u(c,d)):o==="data"?t.filter((c,d)=>{let m=r.routes[c.route.id];if(!m||!m.hasLoader)return!1;if(l(c,d)||u(c,d))return!0;if(c.route.shouldRevalidate){let h=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function uq(e,t,{includeHydrateFallback:n}={}){return cq(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function cq(e){return[...new Set(e)]}function fq(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function dq(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(fq(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function TL(){let e=v.useContext(nc);return NS(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function hq(){let e=v.useContext(Rg);return NS(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var _S=v.createContext(void 0);_S.displayName="FrameworkContext";function OL(){let e=v.useContext(_S);return NS(e,"You must render this element inside a <HydratedRouter> element"),e}function mq(e,t){let n=v.useContext(_S),[r,i]=v.useState(!1),[o,l]=v.useState(!1),{onFocus:u,onBlur:c,onMouseEnter:d,onMouseLeave:m,onTouchStart:h}=t,y=v.useRef(null);v.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let A=C=>{C.forEach(j=>{l(j.isIntersecting)})},E=new IntersectionObserver(A,{threshold:.5});return y.current&&E.observe(y.current),()=>{E.disconnect()}}},[e]),v.useEffect(()=>{if(r){let A=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(A)}}},[r]);let b=()=>{i(!0)},w=()=>{i(!1),l(!1)};return n?e!=="intent"?[o,y,{}]:[o,y,{onFocus:gf(u,b),onBlur:gf(c,w),onMouseEnter:gf(d,b),onMouseLeave:gf(m,w),onTouchStart:gf(h,b)}]:[!1,y,{}]}function gf(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function pq({page:e,...t}){let{router:n}=TL(),r=v.useMemo(()=>hL(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?v.createElement(vq,{page:e,matches:r,...t}):null}function gq(e){let{manifest:t,routeModules:n}=OL(),[r,i]=v.useState([]);return v.useEffect(()=>{let o=!1;return lq(e,t,n).then(l=>{o||i(l)}),()=>{o=!0}},[e,t,n]),r}function vq({page:e,matches:t,...n}){let r=ya(),{manifest:i,routeModules:o}=OL(),{basename:l}=TL(),{loaderData:u,matches:c}=hq(),d=v.useMemo(()=>OP(e,t,c,i,r,"data"),[e,t,c,i,r]),m=v.useMemo(()=>OP(e,t,c,i,r,"assets"),[e,t,c,i,r]),h=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,A=!1;if(t.forEach(C=>{let j=i.routes[C.route.id];!j||!j.hasLoader||(!d.some(T=>T.route.id===C.route.id)&&C.route.id in u&&o[C.route.id]?.shouldRevalidate||j.hasClientLoader?A=!0:w.add(C.route.id))}),w.size===0)return[];let E=aq(e,l,"data");return A&&w.size>0&&E.searchParams.set("_routes",t.filter(C=>w.has(C.route.id)).map(C=>C.route.id).join(",")),[E.pathname+E.search]},[l,u,r,i,d,t,e,o]),y=v.useMemo(()=>uq(m,i),[m,i]),b=gq(m);return v.createElement(v.Fragment,null,h.map(w=>v.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),y.map(w=>v.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),b.map(({key:w,link:A})=>v.createElement("link",{key:w,nonce:n.nonce,...A})))}function yq(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var bq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{bq&&(window.__reactRouterVersion="7.11.0")}catch{}function xq({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=v.useRef();i.current==null&&(i.current=YF({window:r,v5Compat:!0}));let o=i.current,[l,u]=v.useState({action:o.action,location:o.location}),c=v.useCallback(d=>{n===!1?u(d):v.startTransition(()=>u(d))},[n]);return v.useLayoutEffect(()=>o.listen(c),[o,c]),v.createElement(YH,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,unstable_useTransitions:n})}var PL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,es=v.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:l,state:u,target:c,to:d,preventScrollReset:m,viewTransition:h,unstable_defaultShouldRevalidate:y,...b},w){let{basename:A,unstable_useTransitions:E}=v.useContext(Hr),C=typeof d=="string"&&PL.test(d),j=yL(d,A);d=j.to;let T=OH(d,{relative:i}),[O,N,_]=mq(r,b),M=Aq(d,{replace:l,state:u,target:c,preventScrollReset:m,relative:i,viewTransition:h,unstable_defaultShouldRevalidate:y,unstable_useTransitions:E});function R(V){t&&t(V),V.defaultPrevented||M(V)}let B=v.createElement("a",{...b,..._,href:j.absoluteURL||T,onClick:j.isExternal||o?t:R,ref:yq(w,N),target:c,"data-discover":!C&&n==="render"?"true":void 0});return O&&!C?v.createElement(v.Fragment,null,B,v.createElement(pq,{page:T})):B});es.displayName="Link";var NL=v.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:l,viewTransition:u,children:c,...d},m){let h=Od(l,{relative:d.relative}),y=ya(),b=v.useContext(Rg),{navigator:w,basename:A}=v.useContext(Hr),E=b!=null&&Pq(h)&&u===!0,C=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,j=y.pathname,T=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(j=j.toLowerCase(),T=T?T.toLowerCase():null,C=C.toLowerCase()),T&&A&&(T=eo(T,A)||T);const O=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let N=j===C||!i&&j.startsWith(C)&&j.charAt(O)==="/",_=T!=null&&(T===C||!i&&T.startsWith(C)&&T.charAt(C.length)==="/"),M={isActive:N,isPending:_,isTransitioning:E},R=N?t:void 0,B;typeof r=="function"?B=r(M):B=[r,N?"active":null,_?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let V=typeof o=="function"?o(M):o;return v.createElement(es,{...d,"aria-current":R,className:B,ref:m,style:V,to:l,viewTransition:u},typeof c=="function"?c(M):c)});NL.displayName="NavLink";var wq=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:l=Qm,action:u,onSubmit:c,relative:d,preventScrollReset:m,viewTransition:h,unstable_defaultShouldRevalidate:y,...b},w)=>{let{unstable_useTransitions:A}=v.useContext(Hr),E=Tq(),C=Oq(u,{relative:d}),j=l.toLowerCase()==="get"?"get":"post",T=typeof u=="string"&&PL.test(u),O=N=>{if(c&&c(N),N.defaultPrevented)return;N.preventDefault();let _=N.nativeEvent.submitter,M=_?.getAttribute("formmethod")||l,R=()=>E(_||N.currentTarget,{fetcherKey:t,method:M,navigate:n,replace:i,state:o,relative:d,preventScrollReset:m,viewTransition:h,unstable_defaultShouldRevalidate:y});A&&n!==!1?v.startTransition(()=>R()):R()};return v.createElement("form",{ref:w,method:j,action:C,onSubmit:r?c:O,...b,"data-discover":!T&&e==="render"?"true":void 0})});wq.displayName="Form";function Sq(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _L(e){let t=v.useContext(nc);return Nt(t,Sq(e)),t}function Aq(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:u,unstable_useTransitions:c}={}){let d=TS(),m=ya(),h=Od(e,{relative:o});return v.useCallback(y=>{if(eq(y,t)){y.preventDefault();let b=n!==void 0?n:Wf(m)===Wf(h),w=()=>d(e,{replace:b,state:r,preventScrollReset:i,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:u});c?v.startTransition(()=>w()):w()}},[m,d,h,n,r,t,e,i,o,l,u,c])}function Eq(e){Ar(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(Rw(e)),n=v.useRef(!1),r=ya(),i=v.useMemo(()=>tq(r.search,n.current?null:t.current),[r.search]),o=TS(),l=v.useCallback((u,c)=>{const d=Rw(typeof u=="function"?u(new URLSearchParams(i)):u);n.current=!0,o("?"+d,c)},[o,i]);return[i,l]}var Cq=0,jq=()=>`__${String(++Cq)}__`;function Tq(){let{router:e}=_L("useSubmit"),{basename:t}=v.useContext(Hr),n=VH(),r=e.fetch,i=e.navigate;return v.useCallback(async(o,l={})=>{let{action:u,method:c,encType:d,formData:m,body:h}=iq(o,t);if(l.navigate===!1){let y=l.fetcherKey||jq();await r(y,n,l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:h,formMethod:l.method||c,formEncType:l.encType||d,flushSync:l.flushSync})}else await i(l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:h,formMethod:l.method||c,formEncType:l.encType||d,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,i,t,n])}function Oq(e,{relative:t}={}){let{basename:n}=v.useContext(Hr),r=v.useContext(mi);Nt(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...Od(e||".",{relative:t})},l=ya();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),c=u.getAll("index");if(c.some(m=>m==="")){u.delete("index"),c.filter(h=>h).forEach(h=>u.append("index",h));let m=u.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Za([n,o.pathname])),Wf(o)}function Pq(e,{relative:t}={}){let n=v.useContext(xL);Nt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=_L("useViewTransitionState"),i=Od(e,{relative:t});if(!n.isTransitioning)return!1;let o=eo(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=eo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return gp(i.pathname,l)!=null||gp(i.pathname,o)!=null}var cs=dL();const ML=va(cs);var Nq=(e,t,n,r,i,o,l,u)=>{let c=document.documentElement,d=["light","dark"];function m(b){(Array.isArray(e)?e:[e]).forEach(w=>{let A=w==="class",E=A&&o?i.map(C=>o[C]||C):i;A?(c.classList.remove(...E),c.classList.add(o&&o[b]?o[b]:b)):c.setAttribute(w,b)}),h(b)}function h(b){u&&d.includes(b)&&(c.style.colorScheme=b)}function y(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let b=localStorage.getItem(t)||n,w=l&&b==="system"?y():b;m(w)}catch{}},PP=["light","dark"],RL="(prefers-color-scheme: dark)",_q=typeof window>"u",MS=v.createContext(void 0),Mq={setTheme:e=>{},themes:[]},DL=()=>{var e;return(e=v.useContext(MS))!=null?e:Mq},Rq=e=>v.useContext(MS)?v.createElement(v.Fragment,null,e.children):v.createElement(kq,{...e}),Dq=["light","dark"],kq=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i="theme",themes:o=Dq,defaultTheme:l=n?"system":"light",attribute:u="data-theme",value:c,children:d,nonce:m,scriptProps:h})=>{let[y,b]=v.useState(()=>Iq(i,l)),[w,A]=v.useState(()=>y==="system"?p0():y),E=c?Object.values(c):o,C=v.useCallback(N=>{let _=N;if(!_)return;N==="system"&&n&&(_=p0());let M=c?c[_]:_,R=t?zq(m):null,B=document.documentElement,V=H=>{H==="class"?(B.classList.remove(...E),M&&B.classList.add(M)):H.startsWith("data-")&&(M?B.setAttribute(H,M):B.removeAttribute(H))};if(Array.isArray(u)?u.forEach(V):V(u),r){let H=PP.includes(l)?l:null,z=PP.includes(_)?_:H;B.style.colorScheme=z}R?.()},[m]),j=v.useCallback(N=>{let _=typeof N=="function"?N(y):N;b(_);try{localStorage.setItem(i,_)}catch{}},[y]),T=v.useCallback(N=>{let _=p0(N);A(_),y==="system"&&n&&!e&&C("system")},[y,e]);v.useEffect(()=>{let N=window.matchMedia(RL);return N.addListener(T),T(N),()=>N.removeListener(T)},[T]),v.useEffect(()=>{let N=_=>{_.key===i&&(_.newValue?b(_.newValue):j(l))};return window.addEventListener("storage",N),()=>window.removeEventListener("storage",N)},[j]),v.useEffect(()=>{C(e??y)},[e,y]);let O=v.useMemo(()=>({theme:y,setTheme:j,forcedTheme:e,resolvedTheme:y==="system"?w:y,themes:n?[...o,"system"]:o,systemTheme:n?w:void 0}),[y,j,e,w,n,o]);return v.createElement(MS.Provider,{value:O},v.createElement(Lq,{forcedTheme:e,storageKey:i,attribute:u,enableSystem:n,enableColorScheme:r,defaultTheme:l,value:c,themes:o,nonce:m,scriptProps:h}),d)},Lq=v.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:l,themes:u,nonce:c,scriptProps:d})=>{let m=JSON.stringify([n,t,o,e,u,l,r,i]).slice(1,-1);return v.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Nq.toString()})(${m})`}})}),Iq=(e,t)=>{if(_q)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},zq=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},p0=e=>(e||(e=window.matchMedia(RL)),e.matches?"dark":"light");const ke=e=>typeof e=="string",vf=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},NP=e=>e==null?"":""+e,Bq=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},$q=/###/g,_P=e=>e&&e.indexOf("###")>-1?e.replace($q,"."):e,MP=e=>!e||ke(e),zf=(e,t,n)=>{const r=ke(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(MP(e))return{};const o=_P(r[i]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++i}return MP(e)?{}:{obj:e,k:_P(r[i])}},RP=(e,t,n)=>{const{obj:r,k:i}=zf(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],l=t.slice(0,t.length-1),u=zf(e,l,Object);for(;u.obj===void 0&&l.length;)o=`${l[l.length-1]}.${o}`,l=l.slice(0,l.length-1),u=zf(e,l,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},Uq=(e,t,n,r)=>{const{obj:i,k:o}=zf(e,t,Object);i[o]=i[o]||[],i[o].push(n)},vp=(e,t)=>{const{obj:n,k:r}=zf(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Vq=(e,t,n)=>{const r=vp(e,n);return r!==void 0?r:vp(t,n)},kL=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?ke(e[r])||e[r]instanceof String||ke(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):kL(e[r],t[r],n):e[r]=t[r]);return e},cu=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Fq={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Hq=e=>ke(e)?e.replace(/[&<>"'\/]/g,t=>Fq[t]):e;class qq{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Kq=[" ",",","?","!",";"],Gq=new qq(20),Yq=(e,t,n)=>{t=t||"",n=n||"";const r=Kq.filter(l=>t.indexOf(l)<0&&n.indexOf(l)<0);if(r.length===0)return!0;const i=Gq.getRegExp(`(${r.map(l=>l==="?"?"\\?":l).join("|")})`);let o=!i.test(e);if(!o){const l=e.indexOf(n);l>0&&!i.test(e.substring(0,l))&&(o=!0)}return o},Dw=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let l,u="";for(let c=o;c<r.length;++c)if(c!==o&&(u+=n),u+=r[c],l=i[u],l!==void 0){if(["string","number","boolean"].indexOf(typeof l)>-1&&c<r.length-1)continue;o+=c-o+1;break}i=l}return i},Xf=e=>e?.replace("_","-"),Wq={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class yp{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Wq,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(ke(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new yp(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new yp(this.logger,t)}}var ea=new yp;let kg=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,o])=>{for(let l=0;l<o;l++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,o])=>{for(let l=0;l<o;l++)i.apply(i,[t,...n])})}};class DP extends kg{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,i={}){const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;t.indexOf(".")>-1?u=t.split("."):(u=[t,n],r&&(Array.isArray(r)?u.push(...r):ke(r)&&o?u.push(...r.split(o)):u.push(r)));const c=vp(this.data,u);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=u[0],n=u[1],r=u.slice(2).join(".")),c||!l||!ke(r)?c:Dw(this.data?.[t]?.[n],r,o)}addResource(t,n,r,i,o={silent:!1}){const l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let u=[t,n];r&&(u=u.concat(l?r.split(l):r)),t.indexOf(".")>-1&&(u=t.split("."),i=n,n=u[1]),this.addNamespaces(n),RP(this.data,u,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r,i={silent:!1}){for(const o in r)(ke(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o,l={silent:!1,skipCopy:!1}){let u=[t,n];t.indexOf(".")>-1&&(u=t.split("."),i=r,r=n,n=u[1]),this.addNamespaces(n);let c=vp(this.data,u)||{};l.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?kL(c,r,o):c={...c,...r},RP(this.data,u,c),l.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var LL={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{t=this.processors[o]?.process(t,n,r,i)??t}),t}};const IL=Symbol("i18next/PATH_KEY");function Xq(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>(n?.revoke?.(),i===IL?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function bp(e,t){const{[IL]:n}=e(Xq());return n.join(t?.keySeparator??".")}const kP={},g0=e=>!ke(e)&&typeof e!="boolean"&&typeof e!="number";class xp extends kg{constructor(t,n={}){super(),Bq(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ea.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const i=this.resolve(t,r);if(i?.res===void 0)return!1;const o=g0(i.res);return!(r.returnObjects===!1&&o)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const l=r&&t.indexOf(r)>-1,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Yq(t,r,i);if(l&&!u){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:ke(o)?[o]:o};const d=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(d[0])>-1)&&(o=d.shift()),t=d.join(i)}return{key:t,namespaces:ke(o)?[o]:o}}translate(t,n,r){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=bp(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]);const o=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,l=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:u,namespaces:c}=this.extractFromKey(t[t.length-1],i),d=c[c.length-1];let m=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;m===void 0&&(m=":");const h=i.lng||this.language,y=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return y?o?{res:`${d}${m}${u}`,usedKey:u,exactUsedKey:u,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(i)}:`${d}${m}${u}`:o?{res:u,usedKey:u,exactUsedKey:u,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(i)}:u;const b=this.resolve(t,i);let w=b?.res;const A=b?.usedKey||u,E=b?.exactUsedKey||u,C=["[object Number]","[object Function]","[object RegExp]"],j=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,O=i.count!==void 0&&!ke(i.count),N=xp.hasDefaultValue(i),_=O?this.pluralResolver.getSuffix(h,i.count,i):"",M=i.ordinal&&O?this.pluralResolver.getSuffix(h,i.count,{ordinal:!1}):"",R=O&&!i.ordinal&&i.count===0,B=R&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${_}`]||i[`defaultValue${M}`]||i.defaultValue;let V=w;T&&!w&&N&&(V=B);const H=g0(V),z=Object.prototype.toString.apply(V);if(T&&V&&H&&C.indexOf(z)<0&&!(ke(j)&&Array.isArray(V))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const W=this.options.returnedObjectHandler?this.options.returnedObjectHandler(A,V,{...i,ns:c}):`key '${u} (${this.language})' returned an object instead of string.`;return o?(b.res=W,b.usedParams=this.getUsedParamsDetails(i),b):W}if(l){const W=Array.isArray(V),Q=W?[]:{},se=W?E:A;for(const L in V)if(Object.prototype.hasOwnProperty.call(V,L)){const F=`${se}${l}${L}`;N&&!w?Q[L]=this.translate(F,{...i,defaultValue:g0(B)?B[L]:void 0,joinArrays:!1,ns:c}):Q[L]=this.translate(F,{...i,joinArrays:!1,ns:c}),Q[L]===F&&(Q[L]=V[L])}w=Q}}else if(T&&ke(j)&&Array.isArray(w))w=w.join(j),w&&(w=this.extendTranslation(w,t,i,r));else{let W=!1,Q=!1;!this.isValidLookup(w)&&N&&(W=!0,w=B),this.isValidLookup(w)||(Q=!0,w=u);const L=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Q?void 0:w,F=N&&B!==w&&this.options.updateMissing;if(Q||W||F){if(this.logger.log(F?"updateKey":"missingKey",h,d,u,F?B:w),l){const k=this.resolve(u,{...i,keySeparator:!1});k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[];const ae=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ae&&ae[0])for(let k=0;k<ae.length;k++)$.push(ae[k]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(i.lng||this.language):$.push(i.lng||this.language);const G=(k,I,q)=>{const ne=N&&q!==w?q:L;this.options.missingKeyHandler?this.options.missingKeyHandler(k,d,I,ne,F,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(k,d,I,ne,F,i),this.emit("missingKey",k,d,I,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?$.forEach(k=>{const I=this.pluralResolver.getSuffixes(k,i);R&&i[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(q=>{G([k],u+q,i[`defaultValue${q}`]||B)})}):G($,u,B))}w=this.extendTranslation(w,t,i,b,r),Q&&w===u&&this.options.appendNamespaceToMissingKey&&(w=`${d}${m}${u}`),(Q||W)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}${m}${u}`:u,W?w:void 0,i))}return o?(b.res=w,b.usedParams=this.getUsedParamsDetails(i),b):w}extendTranslation(t,n,r,i,o){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=ke(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let m=r.replace&&!ke(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),t=this.interpolator.interpolate(t,m,r.lng||this.language||i.usedLng,r),c){const h=t.match(this.interpolator.nestingRegexp),y=h&&h.length;d<y&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...h)=>o?.[0]===h[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):this.translate(...h,n),r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,u=ke(l)?[l]:l;return t!=null&&u?.length&&r.applyPostProcessor!==!1&&(t=LL.handle(u,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,i,o,l,u;return ke(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const d=this.extractFromKey(c,n),m=d.key;i=m;let h=d.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const y=n.count!==void 0&&!ke(n.count),b=y&&!n.ordinal&&n.count===0,w=n.context!==void 0&&(ke(n.context)||typeof n.context=="number")&&n.context!=="",A=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);h.forEach(E=>{this.isValidLookup(r)||(u=E,!kP[`${A[0]}-${E}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(kP[`${A[0]}-${E}`]=!0,this.logger.warn(`key "${i}" for languages "${A.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),A.forEach(C=>{if(this.isValidLookup(r))return;l=C;const j=[m];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(j,m,C,E,n);else{let O;y&&(O=this.pluralResolver.getSuffix(C,n.count,n));const N=`${this.options.pluralSeparator}zero`,_=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(y&&(n.ordinal&&O.indexOf(_)===0&&j.push(m+O.replace(_,this.options.pluralSeparator)),j.push(m+O),b&&j.push(m+N)),w){const M=`${m}${this.options.contextSeparator||"_"}${n.context}`;j.push(M),y&&(n.ordinal&&O.indexOf(_)===0&&j.push(M+O.replace(_,this.options.pluralSeparator)),j.push(M+O),b&&j.push(M+N))}}let T;for(;T=j.pop();)this.isValidLookup(r)||(o=T,r=this.getResource(C,E,T,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:l,usedNS:u}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!ke(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class LP{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ea.create("languageUtils")}getScriptPartFromCode(t){if(t=Xf(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Xf(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(ke(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return n=i;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(l=>{if(l===o)return l;if(!(l.indexOf("-")<0&&o.indexOf("-")<0)&&(l.indexOf("-")>0&&o.indexOf("-")<0&&l.substring(0,l.indexOf("-"))===o||l.indexOf(o)===0&&o.length>1))return l})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),ke(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),i=[],o=l=>{l&&(this.isSupportedCode(l)?i.push(l):this.logger.warn(`rejecting language code not found in supportedLngs: ${l}`))};return ke(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):ke(t)&&o(this.formatLanguageCode(t)),r.forEach(l=>{i.indexOf(l)<0&&o(this.formatLanguageCode(l))}),i}}const IP={zero:0,one:1,two:2,few:3,many:4,other:5},zP={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Zq{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=ea.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Xf(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let l;try{l=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),zP;if(!t.match(/-|_/))return zP;const c=this.languageUtils.getLanguagePartFromCode(t);l=this.getRule(c,n)}return this.pluralRulesCache[o]=l,l}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>IP[i]-IP[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n,r={}){const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const BP=(e,t,n,r=".",i=!0)=>{let o=Vq(e,t,n);return!o&&i&&ke(n)&&(o=Dw(e,n,r),o===void 0&&(o=Dw(t,n,r))),o},v0=e=>e.replace(/\$/g,"$$$$");class $P{constructor(t={}){this.logger=ea.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:l,suffix:u,suffixEscaped:c,formatSeparator:d,unescapeSuffix:m,unescapePrefix:h,nestingPrefix:y,nestingPrefixEscaped:b,nestingSuffix:w,nestingSuffixEscaped:A,nestingOptionsSeparator:E,maxReplaces:C,alwaysFormat:j}=t.interpolation;this.escape=n!==void 0?n:Hq,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?cu(o):l||"{{",this.suffix=u?cu(u):c||"}}",this.formatSeparator=d||",",this.unescapePrefix=m?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=y?cu(y):b||cu("$t("),this.nestingSuffix=w?cu(w):A||cu(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=C||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,l,u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=b=>{if(b.indexOf(this.formatSeparator)<0){const C=BP(n,c,b,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,r,{...i,...n,interpolationkey:b}):C}const w=b.split(this.formatSeparator),A=w.shift().trim(),E=w.join(this.formatSeparator).trim();return this.format(BP(n,c,A,this.options.keySeparator,this.options.ignoreJSONStructure),E,r,{...i,...n,interpolationkey:A})};this.resetRegExp();const m=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:b=>v0(b)},{regex:this.regexp,safeValue:b=>this.escapeValue?v0(this.escape(b)):v0(b)}].forEach(b=>{for(u=0;o=b.regex.exec(t);){const w=o[1].trim();if(l=d(w),l===void 0)if(typeof m=="function"){const E=m(t,o,i);l=ke(E)?E:""}else if(i&&Object.prototype.hasOwnProperty.call(i,w))l="";else if(h){l=o[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${t}`),l="";else!ke(l)&&!this.useRawValueToEscape&&(l=NP(l));const A=b.safeValue(l);if(t=t.replace(o[0],A),h?(b.regex.lastIndex+=l.length,b.regex.lastIndex-=o[0].length):b.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),t}nest(t,n,r={}){let i,o,l;const u=(c,d)=>{const m=this.nestingOptionsSeparator;if(c.indexOf(m)<0)return c;const h=c.split(new RegExp(`${m}[ ]*{`));let y=`{${h[1]}`;c=h[0],y=this.interpolate(y,l);const b=y.match(/'/g),w=y.match(/"/g);((b?.length??0)%2===0&&!w||w.length%2!==0)&&(y=y.replace(/'/g,'"'));try{l=JSON.parse(y),d&&(l={...d,...l})}catch(A){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,A),`${c}${m}${y}`}return l.defaultValue&&l.defaultValue.indexOf(this.prefix)>-1&&delete l.defaultValue,c};for(;i=this.nestingRegexp.exec(t);){let c=[];l={...r},l=l.replace&&!ke(l.replace)?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;const d=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(d!==-1&&(c=i[1].slice(d).split(this.formatSeparator).map(m=>m.trim()).filter(Boolean),i[1]=i[1].slice(0,d)),o=n(u.call(this,i[1].trim(),l),l),o&&i[0]===t&&!ke(o))return o;ke(o)||(o=NP(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),c.length&&(o=c.reduce((m,h)=>this.format(m,h,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const Qq=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(l=>{if(l){const[u,...c]=l.split(":"),d=c.join(":").trim().replace(/^'+|'+$/g,""),m=u.trim();n[m]||(n[m]=d),d==="false"&&(n[m]=!1),d==="true"&&(n[m]=!0),isNaN(d)||(n[m]=parseInt(d,10))}})}return{formatName:t,formatOptions:n}},UP=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const l=r+JSON.stringify(o);let u=t[l];return u||(u=e(Xf(r),i),t[l]=u),u(n)}},Jq=e=>(t,n,r)=>e(Xf(n),r)(t);class eK{constructor(t={}){this.logger=ea.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?UP:Jq;this.formats={number:r((i,o)=>{const l=new Intl.NumberFormat(i,{...o});return u=>l.format(u)}),currency:r((i,o)=>{const l=new Intl.NumberFormat(i,{...o,style:"currency"});return u=>l.format(u)}),datetime:r((i,o)=>{const l=new Intl.DateTimeFormat(i,{...o});return u=>l.format(u)}),relativetime:r((i,o)=>{const l=new Intl.RelativeTimeFormat(i,{...o});return u=>l.format(u,o.range||"day")}),list:r((i,o)=>{const l=new Intl.ListFormat(i,{...o});return u=>l.format(u)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=UP(n)}format(t,n,r,i={}){const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(u=>u.indexOf(")")>-1)){const u=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,u)].join(this.formatSeparator)}return o.reduce((u,c)=>{const{formatName:d,formatOptions:m}=Qq(c);if(this.formats[d]){let h=u;try{const y=i?.formatParams?.[i.interpolationkey]||{},b=y.locale||y.lng||i.locale||i.lng||r;h=this.formats[d](u,b,{...m,...i,...y})}catch(y){this.logger.warn(y)}return h}else this.logger.warn(`there was no format function for ${d}`);return u},t)}}const tK=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class nK extends kg{constructor(t,n,r,i={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ea.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,i.backend,i)}queueLoad(t,n,r,i){const o={},l={},u={},c={};return t.forEach(d=>{let m=!0;n.forEach(h=>{const y=`${d}|${h}`;!r.reload&&this.store.hasResourceBundle(d,h)?this.state[y]=2:this.state[y]<0||(this.state[y]===1?l[y]===void 0&&(l[y]=!0):(this.state[y]=1,m=!1,l[y]===void 0&&(l[y]=!0),o[y]===void 0&&(o[y]=!0),c[h]===void 0&&(c[h]=!0)))}),m||(u[d]=!0)}),(Object.keys(o).length||Object.keys(l).length)&&this.queue.push({pending:l,pendingCount:Object.keys(l).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(l),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const i=t.split("|"),o=i[0],l=i[1];n&&this.emit("failedLoading",o,l,n),!n&&r&&this.store.addResourceBundle(o,l,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const u={};this.queue.forEach(c=>{Uq(c.loaded,[o],l),tK(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(d=>{u[d]||(u[d]={});const m=c.loaded[d];m.length&&m.forEach(h=>{u[d][h]===void 0&&(u[d][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r,i=0,o=this.retryTimeout,l){if(!t.length)return l(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:l});return}this.readingCalls++;const u=(d,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(d&&m&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,o*2,l)},o);return}l(d,m)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const d=c(t,n);d&&typeof d.then=="function"?d.then(m=>u(null,m)).catch(u):u(null,d)}catch(d){u(d)}return}return c(t,n,u)}prepareLoading(t,n,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();ke(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ke(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(l=>{this.loadOne(l)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(l,u)=>{l&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,l),!l&&u&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,u),this.loaded(t,l,u)})}saveMissing(t,n,r,i,o,l={},u=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const c={...l,isUpdate:o},d=this.backend.create.bind(this.backend);if(d.length<6)try{let m;d.length===5?m=d(t,n,r,i,c):m=d(t,n,r,i),m&&typeof m.then=="function"?m.then(h=>u(null,h)).catch(u):u(null,m)}catch(m){u(m)}else d(t,n,r,i,u,c)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const y0=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),ke(e[1])&&(t.defaultValue=e[1]),ke(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),VP=e=>(ke(e.ns)&&(e.ns=[e.ns]),ke(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ke(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),vm=()=>{},rK=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})},iK=e=>!!(e?.modules?.backend?.name?.indexOf("Locize")>0||e?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||e?.options?.backend?.backends&&e.options.backend.backends.some(t=>t?.name.indexOf("Locize")>0||t?.constructor?.name.indexOf("Locize")>0));class Bf extends kg{constructor(t={},n){if(super(),this.options=VP(t),this.services={},this.logger=ea,this.modules={external:[]},rK(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(ke(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=y0();this.options={...r,...this.options,...VP(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!iK(this)&&typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");const i=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?ea.init(i(this.modules.logger),this.options):ea.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=eK;const m=new LP(this.options);this.store=new DP(this.options.resources,this.options);const h=this.services;h.logger=ea,h.resourceStore=this.store,h.languageUtils=m,h.pluralResolver=new Zq(m,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),d&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(h.formatter=i(d),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new $P(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new nK(i(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(b,...w)=>{this.emit(b,...w)}),this.modules.languageDetector&&(h.languageDetector=i(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=i(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new xp(this.services,this.options),this.translator.on("*",(b,...w)=>{this.emit(b,...w)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,n||(n=vm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=(...m)=>this.store[d](...m)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=(...m)=>(this.store[d](...m),this)});const u=vf(),c=()=>{const d=(m,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),n(m,h)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),u}loadResources(t,n=vm){let r=n;const i=ke(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&o.indexOf(d)<0&&o.push(d)})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),this.options.preload?.forEach?.(u=>l(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=vf();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=vm),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&LL.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=vf();this.emit("languageChanging",t);const i=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,c)=>{c?this.isLanguageChangingTo===t&&(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,r.resolve((...d)=>this.t(...d)),n&&n(u,(...d)=>this.t(...d))},l=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const c=ke(u)?u:u&&u[0],d=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(ke(u)?[u]:u);d&&(this.language||i(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector?.cacheUserLanguage?.(d)),this.loadResources(d,m=>{o(m,d)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),r}getFixedT(t,n,r){const i=(o,l,...u)=>{let c;typeof l!="object"?c=this.options.overloadTranslationOptionHandler([o,l].concat(u)):c={...l},c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||i.keyPrefix);const d=this.options.keySeparator||".";let m;return c.keyPrefix&&Array.isArray(o)?m=o.map(h=>(typeof h=="function"&&(h=bp(h,{...this.options,...l})),`${c.keyPrefix}${d}${h}`)):(typeof o=="function"&&(o=bp(o,{...this.options,...l})),m=c.keyPrefix?`${c.keyPrefix}${d}${o}`:o),this.t(m,c)};return ke(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const l=(u,c)=>{const d=this.services.backendConnector.state[`${u}|${c}`];return d===-1||d===0||d===2};if(n.precheck){const u=n.precheck(this,l);if(u!==void 0)return u}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||l(r,t)&&(!i||l(o,t)))}loadNamespaces(t,n){const r=vf();return this.options.ns?(ke(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=vf();ke(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(l=>i.indexOf(l)<0&&this.services.languageUtils.isSupportedCode(l));return o.length?(this.options.preload=i.concat(o),this.loadResources(l=>{r.resolve(),n&&n(l)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const i=new Intl.Locale(t);if(i&&i.getTextInfo){const o=i.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new LP(y0());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Bf(t,n);return r.createInstance=Bf.createInstance,r}cloneInstance(t={},n=vm){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Bf(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(u=>{o[u]=this[u]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const u=Object.keys(this.store.data).reduce((c,d)=>(c[d]={...this.store.data[d]},c[d]=Object.keys(c[d]).reduce((m,h)=>(m[h]={...c[d][h]},m),c[d]),c),{});o.store=new DP(u,i),o.services.resourceStore=o.store}if(t.interpolation){const c={...y0().interpolation,...this.options.interpolation,...t.interpolation},d={...i,interpolation:c};o.services.interpolator=new $P(d)}return o.translator=new xp(o.services,i),o.translator.on("*",(u,...c)=>{o.emit(u,...c)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const jt=Bf.createInstance();jt.createInstance;jt.dir;jt.init;jt.loadResources;jt.reloadResources;jt.use;jt.changeLanguage;jt.getFixedT;jt.t;jt.exists;jt.setDefaultNamespace;jt.hasLoadedNamespace;jt.loadNamespaces;jt.loadLanguages;var b0,FP;function aK(){return FP||(FP=1,b0={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),b0}var oK=aK();const sK=va(oK);var lK=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function HP(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(sK[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var i=new RegExp(lK),o=null;(o=i.exec(e))!==null;)if(o[0].trim())if(o[1]){var l=o[1].trim(),u=[l,""];l.indexOf("=")>-1&&(u=l.split("=")),t.attrs[u[0]]=u[1],i.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var uK=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,cK=/^\s*$/,fK=Object.create(null);function zL(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?(function(n){var r=[];for(var i in n)r.push(i+'="'+n[i]+'"');return r.length?" "+r.join(" "):""})(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(zL,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var dK={parse:function(e,t){t||(t={}),t.components||(t.components=fK);var n,r=[],i=[],o=-1,l=!1;if(e.indexOf("<")!==0){var u=e.indexOf("<");r.push({type:"text",content:u===-1?e:e.substring(0,u)})}return e.replace(uK,function(c,d){if(l){if(c!=="</"+n.name+">")return;l=!1}var m,h=c.charAt(1)!=="/",y=c.startsWith("<!--"),b=d+c.length,w=e.charAt(b);if(y){var A=HP(c);return o<0?(r.push(A),r):((m=i[o]).children.push(A),r)}if(h&&(o++,(n=HP(c)).type==="tag"&&t.components[n.name]&&(n.type="component",l=!0),n.voidElement||l||!w||w==="<"||n.children.push({type:"text",content:e.slice(b,e.indexOf("<",b))}),o===0&&r.push(n),(m=i[o-1])&&m.children.push(n),i[o]=n),(!h||n.voidElement)&&(o>-1&&(n.voidElement||n.name===c.slice(2,-1))&&(o--,n=o===-1?r:i[o]),!l&&w!=="<"&&w)){m=o===-1?r:i[o].children;var E=e.indexOf("<",b),C=e.slice(b,E===-1?void 0:E);cK.test(C)&&(C=" "),(E>-1&&o+m.length>=0||C!==" ")&&m.push({type:"text",content:C})}}),r},stringify:function(e){return e.reduce(function(t,n){return t+zL("",n)},"")}};const ep=(e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);Sr(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},qP={},Lg=(e,t,n,r)=>{Sr(n)&&qP[n]||(Sr(n)&&(qP[n]=new Date),ep(e,t,n,r))},BL=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},kw=(e,t,n)=>{e.loadNamespaces(t,BL(e,n))},KP=(e,t,n,r)=>{if(Sr(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return kw(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,BL(e,r))},hK=(e,t,n={})=>!t.languages||!t.languages.length?(Lg(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Sr=e=>typeof e=="string",Ya=e=>typeof e=="object"&&e!==null,mK=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,pK={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},gK=e=>pK[e],$L=e=>e.replace(mK,gK);let Lw={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:$L,transDefaultProps:void 0};const vK=(e={})=>{Lw={...Lw,...e}},RS=()=>Lw;let UL;const yK=e=>{UL=e},DS=()=>UL,tp=(e,t)=>{if(!e)return!1;const n=e.props?.children??e.children;return t?n.length>0:!!n},np=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?Ws(t):t},bK=e=>Array.isArray(e)&&e.every(v.isValidElement),Ws=e=>Array.isArray(e)?e:[e],xK=(e,t)=>{const n={...t};return n.props={...t.props,...e.props},n},wK=e=>{const t={};if(!e)return t;const n=r=>{Ws(r).forEach(o=>{Sr(o)||(tp(o)?n(np(o)):Ya(o)&&!v.isValidElement(o)&&Object.assign(t,o))})};return n(e),t},VL=(e,t,n,r)=>{if(!e)return"";let i="";const o=Ws(e),l=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return o.forEach((u,c)=>{if(Sr(u)){i+=`${u}`;return}if(v.isValidElement(u)){const{props:d,type:m}=u,h=Object.keys(d).length,y=l.indexOf(m)>-1,b=d.children;if(!b&&y&&!h){i+=`<${m}/>`;return}if(!b&&(!y||h)||d.i18nIsDynamicList){i+=`<${c}></${c}>`;return}if(y&&h===1&&Sr(b)){i+=`<${m}>${b}</${m}>`;return}const w=VL(b,t,n,r);i+=`<${c}>${w}</${c}>`;return}if(u===null){ep(n,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:r});return}if(Ya(u)){const{format:d,...m}=u,h=Object.keys(m);if(h.length===1){const y=d?`${h[0]}, ${d}`:h[0];i+=`{{${y}}}`;return}ep(n,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:r,child:u});return}ep(n,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:r,child:u})}),i},SK=(e,t=[],n={})=>{if(!e)return e;const r=Object.keys(n),i=[...t,...r];let o="",l=0;for(;l<e.length;)if(e[l]==="<"){let u=!1;const c=e.slice(l).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(c){const d=c[1];(/^\d+$/.test(d)||i.includes(d))&&(u=!0,o+=c[0],l+=c[0].length)}if(!u){const d=e.slice(l).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(d){const m=d[1];(/^\d+$/.test(m)||i.includes(m))&&(u=!0,o+=d[0],l+=d[0].length)}}u||(o+="<",l+=1)}else o+=e[l],l+=1;return o},AK=(e,t,n,r,i,o,l)=>{if(n==="")return[];const u=i.transKeepBasicHtmlNodesFor||[],c=n&&new RegExp(u.map(j=>`<${j}`).join("|")).test(n);if(!e&&!t&&!c&&!l)return[n];const d=t??{},m=j=>{Ws(j).forEach(O=>{Sr(O)||(tp(O)?m(np(O)):Ya(O)&&!v.isValidElement(O)&&Object.assign(d,O))})};m(e);const h=SK(n,u,d),y=dK.parse(`<0>${h}</0>`),b={...d,...o},w=(j,T,O)=>{const N=np(j),_=E(N,T.children,O);return bK(N)&&_.length===0||j.props?.i18nIsDynamicList?N:_},A=(j,T,O,N,_)=>{j.dummy?(j.children=T,O.push(v.cloneElement(j,{key:N},_?void 0:T))):O.push(...v.Children.map([j],M=>{const R="data-i18n-is-dynamic-list",B={key:N,[R]:void 0};return M&&M.props&&Object.keys(M.props).forEach(V=>{V==="ref"||V==="children"||V==="i18nIsDynamicList"||V===R||(B[V]=M.props[V])}),v.cloneElement(M,B,_?null:T)}))},E=(j,T,O)=>{const N=Ws(j);return Ws(T).reduce((M,R,B)=>{const V=R.children?.[0]?.content&&r.services.interpolator.interpolate(R.children[0].content,b,r.language);if(R.type==="tag"){let H=N[parseInt(R.name,10)];!H&&t&&(H=t[R.name]),O.length===1&&!H&&(H=O[0][R.name]),H||(H={});const z={...R.attrs};l&&Object.keys(z).forEach($=>{const ae=z[$];Sr(ae)&&(z[$]=$L(ae))});const W=Object.keys(z).length!==0?xK({props:z},H):H,Q=v.isValidElement(W),se=Q&&tp(R,!0)&&!R.voidElement,L=c&&Ya(W)&&W.dummy&&!Q,F=Ya(t)&&Object.hasOwnProperty.call(t,R.name);if(Sr(W)){const $=r.services.interpolator.interpolate(W,b,r.language);M.push($)}else if(tp(W)||se){const $=w(W,R,O);A(W,$,M,B)}else if(L){const $=E(N,R.children,O);A(W,$,M,B)}else if(Number.isNaN(parseFloat(R.name)))if(F){const $=w(W,R,O);A(W,$,M,B,R.voidElement)}else if(i.transSupportBasicHtmlNodes&&u.indexOf(R.name)>-1)if(R.voidElement)M.push(v.createElement(R.name,{key:`${R.name}-${B}`}));else{const $=E(N,R.children,O);M.push(v.createElement(R.name,{key:`${R.name}-${B}`},$))}else if(R.voidElement)M.push(`<${R.name} />`);else{const $=E(N,R.children,O);M.push(`<${R.name}>${$}</${R.name}>`)}else if(Ya(W)&&!Q){const $=R.children[0]?V:null;$&&M.push($)}else A(W,V,M,B,R.children.length!==1||!V)}else if(R.type==="text"){const H=i.transWrapTextNodes,z=typeof i.unescape=="function"?i.unescape:RS().unescape,W=l?z(r.services.interpolator.interpolate(R.content,b,r.language)):r.services.interpolator.interpolate(R.content,b,r.language);H?M.push(v.createElement(H,{key:`${R.name}-${B}`},W)):M.push(W)}return M},[])},C=E([{dummy:!0,children:e||[]}],y,Ws(e||[]));return np(C[0])},FL=(e,t,n)=>{const r=e.key||t,i=v.cloneElement(e,{key:r});if(!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return i;function o(){return v.createElement(v.Fragment,null,i)}return v.createElement(o,{key:r})},EK=(e,t)=>e.map((n,r)=>FL(n,r,t)),CK=(e,t)=>{const n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:FL(e[r],r,t)})}),n},jK=(e,t,n,r)=>e?Array.isArray(e)?EK(e,t):Ya(e)?CK(e,t):(Lg(n,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:r}),null):null,TK=e=>!Ya(e)||Array.isArray(e)?!1:Object.keys(e).reduce((t,n)=>t&&Number.isNaN(Number.parseFloat(n)),!0);function OK({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:o={},values:l,defaults:u,components:c,ns:d,i18n:m,t:h,shouldUnescape:y,...b}){const w=m||DS();if(!w)return Lg(w,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:r}),e;const A=h||w.t.bind(w)||(G=>G),E={...RS(),...w.options?.react};let C=d||A.ns||w.options?.defaultNS;C=Sr(C)?[C]:C||["translation"];const{transDefaultProps:j}=E,T=j?.tOptions?{...j.tOptions,...o}:o,O=y??j?.shouldUnescape,N=j?.values?{...j.values,...l}:l,_=j?.components?{...j.components,...c}:c,M=VL(e,E,w,r),R=u||T?.defaultValue||M||E.transEmptyNodeValue||(typeof r=="function"?bp(r):r),{hashTransKey:B}=E,V=r||(B?B(M||R):M||R);w.options?.interpolation?.defaultVariables?l=N&&Object.keys(N).length>0?{...N,...w.options.interpolation.defaultVariables}:{...w.options.interpolation.defaultVariables}:l=N;const H=wK(e);H&&typeof H.count=="number"&&t===void 0&&(t=H.count);const z=l||t!==void 0&&!w.options?.interpolation?.alwaysFormat||!e?T.interpolation:{interpolation:{...T.interpolation,prefix:"#$?",suffix:"?$#"}},W={...T,context:i||T.context,count:t,...l,...z,defaultValue:R,ns:C};let Q=V?A(V,W):R;Q===V&&R&&(Q=R);const se=jK(_,Q,w,r);let L=se||e,F=null;TK(se)&&(F=se,L=e);const $=AK(L,F,Q,w,E,W,O),ae=n??E.defaultTransParent;return ae?v.createElement(ae,b,$):$}const PK={type:"3rdParty",init(e){vK(e.options.react),yK(e)}},HL=v.createContext();class NK{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function GP({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:o={},values:l,defaults:u,components:c,ns:d,i18n:m,t:h,shouldUnescape:y,...b}){const{i18n:w,defaultNS:A}=v.useContext(HL)||{},E=m||w||DS(),C=h||E?.t.bind(E);return OK({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:o,values:l,defaults:u,components:c,ns:d||C?.ns||A||E?.options?.defaultNS,i18n:E,t:h,shouldUnescape:y,...b})}var x0={exports:{}},w0={};var YP;function _K(){if(YP)return w0;YP=1;var e=tc();function t(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(h,y){var b=y(),w=r({inst:{value:b,getSnapshot:y}}),A=w[0].inst,E=w[1];return o(function(){A.value=b,A.getSnapshot=y,c(A)&&E({inst:A})},[h,b,y]),i(function(){return c(A)&&E({inst:A}),h(function(){c(A)&&E({inst:A})})},[h]),l(b),b}function c(h){var y=h.getSnapshot;h=h.value;try{var b=y();return!n(h,b)}catch{return!0}}function d(h,y){return y()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:u;return w0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,w0}var WP;function qL(){return WP||(WP=1,x0.exports=_K()),x0.exports}var MK=qL();const RK=(e,t)=>Sr(t)?t:Ya(t)&&Sr(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,DK={t:RK,ready:!1},kK=()=>()=>{},We=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=v.useContext(HL)||{},o=n||r||DS();o&&!o.reportNamespaces&&(o.reportNamespaces=new NK),o||Lg(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const l=v.useMemo(()=>({...RS(),...o?.options?.react,...t}),[o,t]),{useSuspense:u,keyPrefix:c}=l,d=i||o?.options?.defaultNS,m=Sr(d)?[d]:d||["translation"],h=v.useMemo(()=>m,m);o?.reportNamespaces?.addUsedNamespaces?.(h);const y=v.useRef(0),b=v.useCallback(B=>{if(!o)return kK;const{bindI18n:V,bindI18nStore:H}=l,z=()=>{y.current+=1,B()};return V&&o.on(V,z),H&&o.store.on(H,z),()=>{V&&V.split(" ").forEach(W=>o.off(W,z)),H&&H.split(" ").forEach(W=>o.store.off(W,z))}},[o,l]),w=v.useRef(),A=v.useCallback(()=>{if(!o)return DK;const B=!!(o.isInitialized||o.initializedStoreOnce)&&h.every(se=>hK(se,o,l)),V=t.lng||o.language,H=y.current,z=w.current;if(z&&z.ready===B&&z.lng===V&&z.keyPrefix===c&&z.revision===H)return z;const Q={t:o.getFixedT(V,l.nsMode==="fallback"?h:h[0],c),ready:B,lng:V,keyPrefix:c,revision:H};return w.current=Q,Q},[o,h,c,l,t.lng]),[E,C]=v.useState(0),{t:j,ready:T}=MK.useSyncExternalStore(b,A,A);v.useEffect(()=>{if(o&&!T&&!u){const B=()=>C(V=>V+1);t.lng?KP(o,t.lng,h,B):kw(o,h,B)}},[o,t.lng,h,T,u,E]);const O=o||{},N=v.useRef(null),_=v.useRef(),M=B=>{const V=Object.getOwnPropertyDescriptors(B);V.__original&&delete V.__original;const H=Object.create(Object.getPrototypeOf(B),V);if(!Object.prototype.hasOwnProperty.call(H,"__original"))try{Object.defineProperty(H,"__original",{value:B,writable:!1,enumerable:!1,configurable:!1})}catch{}return H},R=v.useMemo(()=>{const B=O,V=B?.language;let H=B;B&&(N.current&&N.current.__original===B?_.current!==V?(H=M(B),N.current=H,_.current=V):H=N.current:(H=M(B),N.current=H,_.current=V));const z=[j,H,T];return z.t=j,z.i18n=H,z.ready=T,z},[j,O,T,O.resolvedLanguage,O.language,O.languages]);if(o&&u&&!T)throw new Promise(B=>{const V=()=>B();t.lng?KP(o,t.lng,h,V):kw(o,h,V)});return R},LK={title:"Copilot API Admin",language:"Language"},IK={enUS:"English",zhCN:"简体中文"},zK={accounts:"Accounts",requests:"Requests",statistics:"Statistics",models:"Models",settings:"Settings",openNavigation:"Open navigation"},BK={label:"Theme",system:"System",light:"Light",dark:"Dark"},$K={label:"Motion",magic:"Magic",subtle:"Subtle",off:"Off",reducedMotionEnabled:"Reduced motion is enabled in system settings"},UK={set:"set",unset:"unset",test:"Test",testing:"Testing...",clear:"Clear",save:"Save",saving:"Saving...",refresh:"Refresh",refreshing:"Refreshing...",retry:"Retry",errors:"Errors",tokens:"Tokens",failed:"Failed",errorRate:"Error rate",tokensPerRequest:"Tokens / req",avgDurationMs:"Avg duration (s)",lastRequest:"Last req",account:"Account",status:"Status",avgMs:"Avg duration (s)",clearFilter:"Clear filter",statusFailed:"failed",statusOk:"ok",used:"Used",remaining:"Remaining",unlimited:"unlimited",apply:"Apply",any:"(any)",yes:"yes",no:"no",from:"From",to:"To",time:"Time",path:"Path",endpoint:"Endpoint",model:"Model",xInitiator:"Initiator",subagentRequest:"Subagent Request",cost:"Cost",quota:"Quota",durationAbbrev:"Duration (s)",loading:"Loading...",loadMore:"Load more",noMore:"All results loaded",clearFilters:"Clear filters",back:"Back",download:"Download",copyJson:"Copy JSON",actions:"Actions",enabled:"Enabled"},VK={trigger:"Token",title:"Admin token",description:"Used as <1>x-admin-token</1> when calling <3>/api/admin/*</3>. Stored in <5>localStorage</5>.",inputPlaceholder:"Enter token",remoteNote:"If the server is not running on localhost, you must set <1>ADMIN_TOKEN</1> on the server to enable remote access.",connected:"Connected: DB v{{version}} · {{path}}",validation:{empty:"Token cannot be empty."},toast:{adminApiOk:"Admin API access OK",adminApiFailed:"Admin API access failed",tokenSaved:"Token saved",tokenCleared:"Token cleared"}},FK={loadFailedTitle:"Failed to load accounts",statsWindowLabel:"Stats window",window:{last24h:"Last 24h",last7d:"Last 7d",thisMonth:"This month"},dbInfo:"DB v{{version}} · {{path}}",tableDescription:"Click an account to filter requests.",filterAccountPlaceholder:"Filter account",sortByLabel:"Sort by",autoRefreshLabel:"Auto",autoRefresh:{off:"Off","30s":"30s","60s":"60s","5m":"5m"},exportCsv:"Export CSV",exportCsvAria:"Export accounts as CSV",exportSuccess:"Accounts exported as CSV",premiumReq:"Premium req",empty:{noAccountsTitle:"No accounts yet",noAccountsDescription:"Add your first GitHub Copilot account to start proxying API requests.",noAccountsCta:"Add Your First Account",noMatchesTitle:"No matches",noMatchesDescription:"No accounts match the current filter."},premiumQuotaUsedAria:"Premium interactions quota used",kpiTooltip:{accounts:"Total number of registered GitHub Copilot accounts.",failed:"Accounts that failed authentication or token refresh.",requests:"Total API requests across all accounts in the selected time window.",errors:"Total failed requests (4xx/5xx responses) in the selected time window.",errorRate:"Percentage of requests that returned an error.",tokensPerRequest:"Average number of tokens (input + output) consumed per request.",tokens:"Total tokens consumed across all accounts in the selected time window.",avgDuration:"Weighted average response time across all accounts (in seconds).",premiumUsage:"Aggregated premium request quota across all accounts (excluding unlimited accounts)"},tableTooltip:{premiumReq:"Premium interactions quota: used vs remaining for the current billing cycle.",avgMs:"Average response time in seconds for this account."},type:"Type",accountType:{free:"Free",individual:"Individual",business:"Business",enterprise:"Enterprise"},kpi:{premiumUsage:"Premium Usage",premiumTotal:"Total",premiumUsageAria:"Premium request usage progress",premiumUnlimitedNote:"+{{count}} unlimited account(s) not included"},enabledToggleFailed:"Failed to update account enabled state"},HK={loadFailedTitle:"Failed to load requests",description:"Filter and inspect recent requests.",tabs:{quick:"Quick",advanced:"Advanced"},filters:{timeRange:"Time range",hasError:"Has error",upstreamModel:"Upstream model",clientModel:"Client model"},timeRange:{last15m:"Last 15m",last1h:"Last 1h",last6h:"Last 6h",last24h:"Last 24h",last7d:"Last 7d",custom:"Custom..."},validation:{title:"Invalid time range",fromMsMustBeNumber:"Start time must be a valid date.",toMsMustBeNumber:"End time must be a valid date.",fromMsMustBeLteToMs:"Start time must be before end time."},empty:{noRequestsTitle:"No requests",noResultsForFilters:"No results for the current filters.",noRequestsFound:"No requests found."},affinityHit:"Affinity cache hit",resultCount:"{{count}} loaded",resultCountWithMore:"{{count}}+ loaded",activeFilters:"{{count}} active",autoRefreshLabel:"Auto",autoRefresh:{off:"Off","30s":"30s","60s":"60s","5m":"5m"},columnTooltip:{initiator:"Value of the x-initiator header sent by the client (e.g. IDE extension name).",subagentRequest:"Whether this request was identified as a subagent request.",cost:"Copilot cost units consumed by this request.",quota:"Premium interactions quota remaining after this request.",duration:"Total response time in seconds.",tokens:"Total tokens consumed (input + output)."}},qK={title:"Models",description:"View available models and their metadata.",totalCount:"{{count}} models",filteredCount:"{{filtered}} of {{total}} models",searchPlaceholder:"Search by name or ID",searchAriaLabel:"Search models by name or ID",aliasesMore:"+{{count}} more",loadFailedTitle:"Failed to load models",toast:{loadFailed:"Failed to load models"},columns:{name:"Model",endpoints:"Endpoints",originalId:"Model ID",aliases:"Aliases",context:"Token Limits",features:"Features",multiplier:"Cost"},columnTooltip:{name:"Display name of the model as exposed by the proxy.",endpoints:"API endpoints that support this model (e.g. chat-completions, messages).",originalId:"Original upstream model identifier and any configured aliases.",context:"Maximum token limits for input (prompt) and output (completion).",features:"Capabilities supported by this model.",multiplier:"Copilot billing cost multiplier — higher values consume more premium quota per request."},contextTooltip:"Max input: {{input}} tokens · Max output: {{output}} tokens",badges:{preview:"preview",premium:"premium"},features:{tools:"tools",vision:"vision",structuredOutputs:"structured",streaming:"streaming",parallelTools:"parallel tools"},featureTooltip:{tools:"Supports function/tool calling.",vision:"Can process image inputs.",structuredOutputs:"Supports JSON schema-constrained output.",streaming:"Supports streaming responses.",parallelTools:"Can execute multiple tool calls in parallel."},contextInputLabel:"in",contextOutputLabel:"out",empty:{title:"No models",description:"No models found.",noMatchesDescription:"No models match the current search or filters."}},KK={loadFailedTitle:"Failed to load request",title:"Request Detail",notFoundTitle:"Request not found",notFoundDescription:"The specified request could not be found.",summaryTitle:"Summary",rawTitle:"Raw JSON",rawDescription:"Full request record in JSON format.",searchPlaceholder:"Search key or value…",toast:{copiedJson:"Copied JSON",copyFailed:"Copy failed",downloadedJson:"Downloaded JSON",downloadFailed:"Download failed"},sections:{request:"Request",routing:"Routing",client:"Client",usage:"Usage"},fields:{time:"Time",path:"Path",endpoint:"Endpoint",account:"Account",userId:"User ID",safetyIdentifier:"Safety ID",promptCacheKey:"Prompt Cache Key",initiator:"Initiator",upstreamRequestId:"Upstream Request ID",model:"Model",client:"Client",tokens:"Tokens",quota:"Quota",affinityHit:"Affinity Hit",affinityCacheKey:"Affinity Cache Key",affinityKeyUsed:"Affinity Key Used",affinityKeySource:"Affinity Key Source",selectionReason:"Selection Reason",upstreamErrorMessageRaw:"Upstream Error (Raw)",duration:"Duration (s)",ttfb:"TTFB (s)"},fieldTooltip:{endpoint:"The upstream API endpoint this request was forwarded to",userId:"GitHub user ID associated with this request",safetyIdentifier:"Safety identifier used for content moderation",promptCacheKey:"Cache key for prompt deduplication",initiator:"The component or client that initiated this request",upstreamRequestId:"Request ID returned by the upstream provider",affinityCacheKey:"Account affinity cache key persisted after a successful request",affinityKeyUsed:"The exact key value used when evaluating account affinity for this request",affinityKeySource:"Where the affinity key came from: prompt_cache_key, metadata.session_id, x-session-id, or request-id fallback",selectionReason:"High-level reason recorded by the account selector for why this account was chosen",upstreamErrorMessageRaw:"Sanitized raw upstream error message captured for debugging and ownership-mismatch analysis",duration:"Total request processing time in seconds",ttfb:"Time to first byte in seconds — latency before the first response chunk"},tokens:{in:"Input",out:"Output",total:"Total",cached:"Cached"},quota:{before:"Before",after:"After",diff:"Change"}},GK={expand:"Expand",collapse:"Collapse",root:"(root)",more:"… {{count}} more",arrayLabel:"Array({{count}})",objectLabel:"Object({{count}})",expandAll:"Expand all",collapseAll:"Collapse all",statusCollapsed:"collapsed",statusExpanded:"expanded",statusDepth:"depth<{{depth}}"},YK={subtitle:"Manage server configuration and feature flags.",configPath:"Config path: {{path}}",note:"Changes take effect after saving.",errorTitle:"Failed to load settings",sections:{general:"General",accountAffinity:"Account Affinity",reasoning:"Reasoning",aliases:"Aliases",prompts:"Prompts",advanced:"Advanced",providers:"Providers"},navigation:{ariaLabel:"Settings sections"},saveButton:{saving:"Saving...",saveChanges:"Save changes"},toast:{loadModelsFailed:"Failed to load models",loadConfigFailed:"Failed to load config",configSaved:"Config saved",saveConfigFailed:"Failed to save config"},common:{defaultOption:"(default)",customModel:"Custom: {{value}}",remove:"Remove",allow:"allow",block:"block",jsonMode:"JSON mode",invalidJsonTitle:"Invalid JSON",selectModelPlaceholder:"Select model",noModelsAvailable:"No models available"},general:{title:"General",description:"Basic configuration.",smallModel:"Small model",smallModelManual:"Small model (manual)",smallModelPlaceholder:"Select small model",smallModelInputPlaceholder:"gpt-5-mini",smallModelHint:"Controls which model receives lightweight/free requests when routing.",apiKeysLabel:"API keys",apiKeysPlaceholder:"one key per line",apiKeysHint:"One key per line (or comma-separated). Leave empty to disable request authentication.",legacyAuthNote:"Legacy fallback remains enabled for env {{env}} or config.apiKey when auth.apiKeys is empty.",anthropicApiKeyLabel:"Anthropic API key",anthropicApiKeyPlaceholder:"sk-ant-...",anthropicApiKeyHint:"Optional. Used for exact Claude /v1/messages/count_tokens calls; without it, the server falls back to local token estimation.",anthropicApiKeyEnvNote:"Runtime fallback remains available through env {{env}}. Leaving this field empty does not override a server-side environment variable.",showAnthropicApiKey:"Show",hideAnthropicApiKey:"Hide"},accountAffinity:{title:"Account Affinity",description:"Configure account affinity routing.",label:"Enable account affinity",hint:"Routes requests to the account that last successfully handled the same session. Applies to both free and premium models."},reasoning:{title:"Reasoning efforts",description:"Override model reasoning effort levels.",hint:"Define per-model reasoning effort (optional).",jsonPlaceholder:'{ "gpt-5-mini": "low" }',emptyState:"No reasoning overrides. Add a model below.",itemHint:"Overrides reasoning effort for this model.",addButton:"Add model override"},prompts:{title:"Extra prompts",description:"Inject extra system prompts per model.",hint:"Add or edit prompt snippets injected for specific models.",jsonPlaceholder:'{ "gpt-5-mini": "..." }',emptyState:"No extra prompts configured.",promptPlaceholder:"System prompt snippet...",itemHint:"Adds prompt content before model execution.",addButton:"Add prompt"},aliases:{title:"Model aliases",description:"Map friendly alias names to upstream model IDs.",defaultBehaviorHint:"Default behavior: {{behavior}} original model IDs. Each alias can override this setting.",jsonPlaceholder:'{ "fast": { "target": "gpt-5-mini", "allowOriginal": true } }',aliasPlaceholder:"Alias",selectTargetPlaceholder:"Select target model",selectOption:"(select)",originalModelPlaceholder:"Original model ID",useDefault:"Use default",allowOriginal:"Allow original model ID",blockOriginal:"Block original model ID",emptyState:"No model aliases configured.",addButton:"Add alias"},advanced:{title:"Advanced",description:"Feature flags and experimental toggles.",routingGroupTitle:"Routing",apiGroupTitle:"API endpoints",modelGroupTitle:"Model & tokens",modelRefreshIntervalLabel:"Model refresh interval (hours)",modelRefreshIntervalHint:"Set to 0 to disable automatic refresh.",modelRefreshIntervalError:"Must be a non-negative number.",sessionAffinityRetentionLabel:"Session affinity retention (days)",sessionAffinityRetentionHint:"Set to 0 to disable automatic cleanup of persisted L2 session affinity rows.",sessionAffinityRetentionError:"Must be a non-negative number.",allowOriginalModelNamesLabel:"Allow original model names",allowOriginalModelNamesHint:"Default behavior when aliases do not override original model IDs.",useFunctionApplyPatchLabel:"Responses API apply_patch",useFunctionApplyPatchHint:"Include the apply_patch function tool when forwarding requests through the Responses API.",forceAgentLabel:"Batch agent requests per session",forceAgentHint:"Affects Copilot Premium request consumption counting: when off, every agent conversation request counts as 1 (same as the VS Code extension); when on, multiple requests in the same session count only once per model.",compactUseSmallModelLabel:"Route compact requests to small model",compactUseSmallModelHint:"When enabled, compact requests use the configured smallModel; otherwise they use the requested model.",messageStartInputTokensFallbackLabel:"Estimate input tokens (fallback)",messageStartInputTokensFallbackHint:"When enabled, estimates message_start input tokens when upstream usage is unavailable.",useMessagesApiLabel:"Enable Messages API",useMessagesApiHint:"When enabled, Claude-family models may use Copilot's native /v1/messages endpoint.",useResponsesApiWebSearchLabel:"Enable Responses API WebSearch",useResponsesApiWebSearchHint:"When enabled, /v1/responses keeps web_search tools and forwards them upstream.",responsesApiContextManagementModelsLabel:"Context management models (Responses API)",responsesApiContextManagementModelsPlaceholder:"one model id per line",responsesApiContextManagementModelsHint:"List of model IDs that should receive Responses API context_management compaction instructions.",providersTitle:"Providers",providersDescription:"Configure upstream providers (currently anthropic only). Each provider key becomes a route prefix (/:provider/v1/messages).",providersIssueTitle:"Invalid providers",providersEmptyState:"No providers configured.",providersAddProvider:"Add provider",providersNamePlaceholder:"Provider key (route prefix)",providersEnabledLabel:"Enabled",providersBaseUrlLabel:"Base URL",providersBaseUrlPlaceholder:"https://api.anthropic.com",providersApiKeyLabel:"API key",providersApiKeyPlaceholder:"sk-...",providersAuthTypeLabel:"Auth type",providersAuthTypeHint:"Controls whether the API key is forwarded as x-api-key or Authorization: Bearer.",providersAuthTypeXApiKey:"x-api-key",providersAuthTypeAuthorization:"authorization",providersAdjustInputTokensLabel:"Adjust input tokens",providersAdjustInputTokensHint:"Subtract cache read/write tokens from upstream usage.input_tokens.",providersModelsLabel:"Model defaults",providersModelsEmptyState:"No per-model defaults.",providersAddModel:"Add model",providersModelIdPlaceholder:"Model ID"}},WK={addAccount:"Add Account",addAccountDescription:"Add a new GitHub Copilot account",selectAccountType:"Select your GitHub Copilot subscription type",typeIndividual:"Individual",typeIndividualDescription:"Personal GitHub Copilot subscription",typeBusiness:"Business",typeBusinessDescription:"Organization-managed Copilot Business plan",typeEnterprise:"Enterprise",typeEnterpriseDescription:"GitHub Copilot Enterprise subscription (GitHub Enterprise Cloud or custom GHE/GHES domain)",enterpriseDomain:"Enterprise Domain (optional)",enterpriseDomainPlaceholder:"github.example.com",enterpriseDomainHint:"Only fill this in when your enterprise uses a custom GHE.com/GHES hostname.",continue:"Continue",cancel:"Cancel",authorizeTitle:"Authorize with GitHub",reauthAuthorizeTitle:'Re-authorize "{{id}}"',reauthAuthorizeDescription:"Complete the authorization flow to refresh this account's credentials.",reauthConfirmDescription:"This will open GitHub in a new tab to re-authorize your account credentials.",reauthConfirmHint:"You will need to enter a device code on GitHub to complete the process. Your existing account data will be preserved.",enterCodePrompt:"Enter the code below at GitHub to authorize:",copy:"Copy",copied:"Copied!",copyFailed:"Copy failed",copyManualHint:"Your browser blocked automatic copy. Please copy the code manually.",autoOpenHint:"A new tab has been opened. If it didn't open automatically:",waitingForAuth:"Waiting for authorization...",expiresIn:"expires in {{time}}",expiresWarning:"Code expiring soon",errorRecoveryHint:"Check your network connection and try again. If the issue persists, make sure your GitHub account has an active Copilot subscription.",errorExpiredHint:"The authorization code has expired. Start over to get a new code.",successTitle:"Account Added!",successReauthTitle:'"{{id}}" Re-authenticated!',accountLabel:"Account",typeLabel:"Type",statusLabel:"Status",statusActive:"Active",done:"Done",expired:"Authorization expired",startOver:"Start Over",retry:"Retry",reauth:"Reauth",delete:"Delete",deleteTitle:"Delete Account",deleteConfirmation:'Are you sure you want to delete account "{{id}}"? This action cannot be undone.',deleteSuccess:'Account "{{id}}" deleted successfully.',authFailed:"Authentication failed",deleting:"Deleting...",reauthAriaLabel:"Re-authenticate account {{id}}",deleteAriaLabel:"Delete account {{id}}"},XK={title:"Not found",description:"The page you are looking for does not exist."},ZK={title:"Statistics",premiumUsage:"Premium Usage Trend",accountUsage:"Per-Account Premium Usage",costUnits:"Premium Usage",requestCount:"Request Count",tokensTotal:"Total Tokens",errorCount:"Errors",timeRange:{"24h":"24h","7d":"7 Days",month:"This Month",custom:"Custom"},autoRefresh:{off:"Auto-refresh: Off","30s":"Every 30s","60s":"Every 60s","5m":"Every 5m"},noData:"No premium request data for this period",loadFailed:"Failed to load statistics"},QK={app:LK,locale:IK,nav:zK,theme:BK,motion:$K,common:UK,tokenDialog:VK,accountsPage:FK,requestsPage:HK,modelsPage:qK,requestDetailPage:KK,jsonViewer:GK,settingsPage:YK,accountManagement:WK,notFound:XK,statistics:ZK},JK={title:"Copilot API 管理后台",language:"语言"},e9={enUS:"English",zhCN:"简体中文"},t9={accounts:"账号",requests:"请求",statistics:"统计",models:"模型",settings:"设置",openNavigation:"打开导航"},n9={label:"主题",system:"跟随系统",light:"浅色",dark:"深色"},r9={label:"动效",magic:"炫酷",subtle:"柔和",off:"关闭",reducedMotionEnabled:"系统设置已启用减少动态效果"},i9={set:"已设置",unset:"未设置",test:"测试",testing:"测试中…",clear:"清除",save:"保存",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",retry:"重试",errors:"错误",tokens:"Tokens",failed:"失败",errorRate:"错误率",tokensPerRequest:"Tokens/请求",avgDurationMs:"平均耗时(s)",lastRequest:"最近请求",account:"账号",status:"状态",avgMs:"平均耗时(s)",clearFilter:"清除筛选",statusFailed:"失败",statusOk:"正常",used:"已用",remaining:"剩余",unlimited:"无限",apply:"应用",any:"(任意)",yes:"是",no:"否",from:"从",to:"到",time:"时间",path:"路径",endpoint:"端点",model:"模型",xInitiator:"发起方",subagentRequest:"子代理请求",cost:"成本",quota:"额度",durationAbbrev:"耗时(s)",loading:"加载中…",loadMore:"加载更多",noMore:"已加载全部",clearFilters:"清除筛选",back:"返回",download:"下载",copyJson:"复制 JSON",actions:"操作",enabled:"启用"},a9={trigger:"Token",title:"管理 Token",description:"调用 <3>/api/admin/*</3> 时会使用 <1>x-admin-token</1> 请求头。存储在 <5>localStorage</5> 中。",inputPlaceholder:"输入 Token",remoteNote:"如果服务端不在 localhost 运行,你必须在服务端设置 <1>ADMIN_TOKEN</1> 才能启用远程访问。",connected:"已连接:DB v{{version}} · {{path}}",validation:{empty:"Token 不能为空。"},toast:{adminApiOk:"Admin API 访问正常",adminApiFailed:"Admin API 访问失败",tokenSaved:"Token 已保存",tokenCleared:"Token 已清除"}},o9={loadFailedTitle:"加载账号失败",statsWindowLabel:"统计窗口",window:{last24h:"最近 24 小时",last7d:"最近 7 天",thisMonth:"本月"},dbInfo:"DB v{{version}} · {{path}}",tableDescription:"点击账号可筛选请求。",filterAccountPlaceholder:"筛选账号",sortByLabel:"排序",autoRefreshLabel:"自动",autoRefresh:{off:"关闭","30s":"30秒","60s":"60秒","5m":"5分钟"},exportCsv:"导出 CSV",exportCsvAria:"将账号导出为 CSV",exportSuccess:"账号已导出为 CSV",premiumReq:"Premium 请求",empty:{noAccountsTitle:"还没有账号",noAccountsDescription:"添加你的第一个 GitHub Copilot 账号,即可开始代理 API 请求。",noAccountsCta:"添加第一个账号",noMatchesTitle:"无匹配结果",noMatchesDescription:"没有账号匹配当前筛选条件。"},premiumQuotaUsedAria:"Premium 交互额度使用量",kpiTooltip:{accounts:"已注册的 GitHub Copilot 账号总数。",failed:"认证或 Token 刷新失败的账号。",requests:"在选定时间窗口内所有账号的 API 请求总数。",errors:"在选定时间窗口内返回错误(4xx/5xx)的请求总数。",errorRate:"返回错误的请求所占百分比。",tokensPerRequest:"每次请求平均消耗的 Token 数(输入+输出)。",tokens:"在选定时间窗口内所有账号消耗的 Token 总数。",avgDuration:"所有账号的加权平均响应时间(秒)。",premiumUsage:"所有账号的 Premium 请求额度汇总(不含无限额度账号)"},tableTooltip:{premiumReq:"Premium 交互额度:当前计费周期内的已用量与剩余量。",avgMs:"该账号的平均响应时间(秒)。"},type:"类型",accountType:{free:"Free",individual:"Individual",business:"Business",enterprise:"Enterprise"},kpi:{premiumUsage:"Premium 用量",premiumTotal:"总量",premiumUsageAria:"Premium 请求使用进度",premiumUnlimitedNote:"另有 {{count}} 个无限额度账号未计入"},enabledToggleFailed:"更新账号启用状态失败"},s9={loadFailedTitle:"加载请求失败",description:"筛选并查看最近的请求。",tabs:{quick:"快速",advanced:"高级"},filters:{timeRange:"时间范围",hasError:"有错误",upstreamModel:"上游模型",clientModel:"客户端模型"},timeRange:{last15m:"最近 15 分钟",last1h:"最近 1 小时",last6h:"最近 6 小时",last24h:"最近 24 小时",last7d:"最近 7 天",custom:"自定义…"},validation:{title:"时间范围无效",fromMsMustBeNumber:"开始时间必须是有效的日期。",toMsMustBeNumber:"结束时间必须是有效的日期。",fromMsMustBeLteToMs:"开始时间必须早于结束时间。"},empty:{noRequestsTitle:"无请求",noResultsForFilters:"当前筛选条件下没有结果。",noRequestsFound:"未找到请求。"},affinityHit:"命中亲和性缓存",resultCount:"已加载 {{count}} 条",resultCountWithMore:"已加载 {{count}}+ 条",activeFilters:"{{count}} 个筛选",autoRefreshLabel:"自动",autoRefresh:{off:"关闭","30s":"30秒","60s":"60秒","5m":"5分钟"},columnTooltip:{initiator:"客户端发送的 x-initiator 请求头值(如 IDE 扩展名称)。",subagentRequest:"该请求是否被识别为子代理请求。",cost:"此请求消耗的 Copilot 成本单位。",quota:"此请求完成后剩余的 Premium 交互额度。",duration:"总响应时间(秒)。",tokens:"消耗的总 token 数(输入 + 输出)。"}},l9={title:"模型",description:"查看当前可用模型及其元数据。",totalCount:"共 {{count}} 个模型",filteredCount:"显示 {{filtered}} / {{total}} 个模型",searchPlaceholder:"按名称或 ID 搜索",searchAriaLabel:"按名称或 ID 搜索模型",aliasesMore:"+{{count}} 个",loadFailedTitle:"加载模型失败",toast:{loadFailed:"加载模型失败"},columns:{name:"模型",endpoints:"端点",originalId:"模型ID",aliases:"别名",context:"Token 限制",features:"功能",multiplier:"成本"},columnTooltip:{name:"代理对外暴露的模型显示名称。",endpoints:"支持此模型的 API 端点(如 chat-completions、messages)。",originalId:"上游模型的原始标识符及已配置的别名。",context:"输入(prompt)和输出(completion)的最大 token 限制。",features:"该模型支持的功能。",multiplier:"Copilot 计费成本倍数——值越高,每次请求消耗的 Premium 额度越多。"},contextTooltip:"最大输入:{{input}} tokens · 最大输出:{{output}} tokens",badges:{preview:"预览",premium:"高级"},features:{tools:"工具",vision:"视觉",structuredOutputs:"结构化",streaming:"流式",parallelTools:"并行工具"},featureTooltip:{tools:"支持函数/工具调用。",vision:"可以处理图像输入。",structuredOutputs:"支持 JSON Schema 约束输出。",streaming:"支持流式响应。",parallelTools:"可以同时执行多个工具调用。"},contextInputLabel:"输入",contextOutputLabel:"输出",empty:{title:"无模型",description:"未找到模型。",noMatchesDescription:"没有模型匹配当前的搜索或筛选条件。"}},u9={loadFailedTitle:"加载请求详情失败",title:"请求详情",notFoundTitle:"请求不存在",notFoundDescription:"未找到指定的请求记录。",summaryTitle:"摘要",rawTitle:"原始 JSON",rawDescription:"完整请求记录(JSON 格式)。",searchPlaceholder:"搜索键或值…",toast:{copiedJson:"已复制 JSON",copyFailed:"复制失败",downloadedJson:"已下载 JSON",downloadFailed:"下载失败"},sections:{request:"请求",routing:"路由",client:"客户端",usage:"用量"},fields:{time:"时间",path:"路径",endpoint:"上游端点",account:"账号",userId:"用户 ID",safetyIdentifier:"安全标识",promptCacheKey:"提示词缓存键",initiator:"发起者",upstreamRequestId:"上游请求 ID",model:"模型",client:"客户端",tokens:"Token",quota:"额度",affinityHit:"亲和性命中",affinityCacheKey:"亲和性缓存键",affinityKeyUsed:"实际使用的亲和性键",affinityKeySource:"亲和性键来源",selectionReason:"选中原因",upstreamErrorMessageRaw:"上游原始错误(脱敏后)",duration:"耗时(s)",ttfb:"首字节(s)"},fieldTooltip:{endpoint:"此请求被转发到的上游 API 端点",userId:"与此请求关联的 GitHub 用户 ID",safetyIdentifier:"用于内容审核的安全标识符",promptCacheKey:"用于提示词去重的缓存键",initiator:"发起此请求的组件或客户端",upstreamRequestId:"上游提供商返回的请求 ID",affinityCacheKey:"请求成功后持久化保存、用于账号亲和性命中的缓存键",affinityKeyUsed:"本次请求在评估账号亲和性时实际使用的键值",affinityKeySource:"亲和性键的来源:prompt_cache_key、metadata.session_id、x-session-id,或 request-id 回退值",selectionReason:"账号选择器记录的高层原因,用于解释这次为何选中当前账号",upstreamErrorMessageRaw:"为调试和所有权不匹配分析保存的、已脱敏的上游原始错误消息",duration:"请求总处理时间(秒)",ttfb:"首字节时间(秒)— 收到第一个响应块前的延迟"},tokens:{in:"输入",out:"输出",total:"总计",cached:"缓存"},quota:{before:"之前",after:"之后",diff:"变化"}},c9={expand:"展开",collapse:"折叠",root:"(根)",more:"… 还有 {{count}} 项",arrayLabel:"数组({{count}})",objectLabel:"对象({{count}})",expandAll:"全部展开",collapseAll:"全部折叠",statusCollapsed:"已折叠",statusExpanded:"已展开",statusDepth:"层级<{{depth}}"},f9={subtitle:"管理服务端配置和功能开关。",configPath:"配置路径:{{path}}",note:"更改在保存后生效。",errorTitle:"加载设置失败",sections:{general:"通用",accountAffinity:"账号亲和性",reasoning:"推理",aliases:"别名",prompts:"提示词",advanced:"高级",providers:"上游提供方"},navigation:{ariaLabel:"设置分区"},saveButton:{saving:"保存中…",saveChanges:"保存更改"},toast:{loadModelsFailed:"加载模型失败",loadConfigFailed:"加载配置失败",configSaved:"配置已保存",saveConfigFailed:"保存配置失败"},common:{defaultOption:"(默认)",customModel:"自定义:{{value}}",remove:"移除",allow:"允许",block:"阻止",jsonMode:"JSON 模式",invalidJsonTitle:"无效的 JSON",selectModelPlaceholder:"选择模型",noModelsAvailable:"没有可用模型"},general:{title:"通用",description:"基础配置。",smallModel:"小模型",smallModelManual:"小模型(手动)",smallModelPlaceholder:"选择小模型",smallModelInputPlaceholder:"gpt-5-mini",smallModelHint:"控制路由时接收轻量/免费请求的模型。",apiKeysLabel:"API 密钥列表",apiKeysPlaceholder:"每行一个密钥",apiKeysHint:"支持每行一个或逗号分隔;留空表示关闭请求鉴权。",legacyAuthNote:"当 auth.apiKeys 为空时,仍会回退使用环境变量 {{env}} 或 config.apiKey(兼容旧配置)。",anthropicApiKeyLabel:"Anthropic API Key",anthropicApiKeyPlaceholder:"sk-ant-...",anthropicApiKeyHint:"可选。用于 Claude `/v1/messages/count_tokens` 的精确计数;未配置时,服务端会回退到本地 token 估算。",anthropicApiKeyEnvNote:"运行时仍可通过环境变量 {{env}} 回退提供。将此输入框留空并不会覆盖服务端已设置的环境变量。",showAnthropicApiKey:"显示",hideAnthropicApiKey:"隐藏"},accountAffinity:{title:"账号亲和性",description:"配置账号亲和性路由。",label:"启用账号亲和性",hint:"将请求路由到上次成功处理同一会话的账号。同时适用于免费和付费模型。"},reasoning:{title:"推理强度",description:"覆盖模型的推理强度等级。",hint:"定义每个模型的推理强度(可选)。",jsonPlaceholder:'{ \\"gpt-5-mini\\": \\"low\\" }',emptyState:"没有推理覆盖。请在下方添加模型。",itemHint:"覆盖该模型的推理强度。",addButton:"添加模型覆盖"},prompts:{title:"额外提示词",description:"为每个模型注入额外的 system prompt。",hint:"为指定模型添加或编辑注入的 prompt 片段。",jsonPlaceholder:'{ \\"gpt-5-mini\\": \\"...\\" }',emptyState:"未配置额外提示词。",promptPlaceholder:"System prompt 片段…",itemHint:"在模型执行前追加 prompt 内容。",addButton:"添加提示词"},aliases:{title:"模型别名",description:"将友好别名映射到上游模型 ID。",defaultBehaviorHint:"默认行为:{{behavior}} 原始模型 ID。每个别名可覆盖此设置。",jsonPlaceholder:'{ \\"fast\\": { \\"target\\": \\"gpt-5-mini\\", \\"allowOriginal\\": true } }',aliasPlaceholder:"别名",selectTargetPlaceholder:"选择目标模型",selectOption:"(选择)",originalModelPlaceholder:"原始模型 ID",useDefault:"使用默认值",allowOriginal:"允许原始模型 ID",blockOriginal:"阻止原始模型 ID",emptyState:"未配置模型别名。",addButton:"添加别名"},advanced:{title:"高级",description:"功能开关与实验选项。",routingGroupTitle:"路由",apiGroupTitle:"API 端点",modelGroupTitle:"模型与 Token",modelRefreshIntervalLabel:"模型列表刷新间隔(小时)",modelRefreshIntervalHint:"设置为 0 表示关闭自动刷新。",modelRefreshIntervalError:"必须是非负数字。",sessionAffinityRetentionLabel:"Session affinity 保留期(天)",sessionAffinityRetentionHint:"设置为 0 表示关闭持久化 L2 session affinity 记录的自动清理。",sessionAffinityRetentionError:"必须是非负数字。",allowOriginalModelNamesLabel:"允许原始模型名",allowOriginalModelNamesHint:"当别名未覆盖时的默认行为。",useFunctionApplyPatchLabel:"Responses API apply_patch",useFunctionApplyPatchHint:"在 Responses API 转发请求时包含 apply_patch 函数工具。",forceAgentLabel:"按会话合并 Agent 请求计费",forceAgentHint:"影响 Copilot高级请求消耗的计次:关闭时,每次与 Agent 的对话请求都会计 1 次(与 VS Code 插件一致);开启时,同一会话内对同一模型的多次请求只计 1 次。",compactUseSmallModelLabel:"compact 请求路由到小模型",compactUseSmallModelHint:"启用后,compact 请求使用配置的小模型;否则使用请求的模型。",messageStartInputTokensFallbackLabel:"估算输入 tokens(回退)",messageStartInputTokensFallbackHint:"启用后,当上游 usage 不可用时,会估算 message_start 的 input tokens。",useMessagesApiLabel:"启用 Messages API",useMessagesApiHint:"启用后,支持 Copilot 原生 /v1/messages 的 Claude 系列模型将优先走 Messages API。",useResponsesApiWebSearchLabel:"启用 Responses API WebSearch",useResponsesApiWebSearchHint:"启用后,/v1/responses 会保留 web_search 工具并继续向上游转发。",responsesApiContextManagementModelsLabel:"上下文管理模型(Responses API)",responsesApiContextManagementModelsPlaceholder:"每行一个 model id",responsesApiContextManagementModelsHint:"这些模型将收到 Responses API 的 context_management 压缩指令。",providersTitle:"上游 Providers",providersDescription:"配置上游 provider(目前仅支持 anthropic)。每个 provider key 会作为路由前缀(/:provider/v1/messages)。",providersIssueTitle:"Providers 配置无效",providersEmptyState:"未配置 providers。",providersAddProvider:"添加 provider",providersNamePlaceholder:"Provider key(路由前缀)",providersEnabledLabel:"启用",providersBaseUrlLabel:"Base URL",providersBaseUrlPlaceholder:"https://api.anthropic.com",providersApiKeyLabel:"API Key",providersApiKeyPlaceholder:"sk-...",providersAuthTypeLabel:"认证类型",providersAuthTypeHint:"控制向上游发送 API Key 的方式:使用 x-api-key,或使用 Authorization: Bearer。",providersAuthTypeXApiKey:"x-api-key",providersAuthTypeAuthorization:"authorization",providersAdjustInputTokensLabel:"调整输入 Tokens",providersAdjustInputTokensHint:"从上游 usage.input_tokens 中扣除缓存读写 tokens。",providersModelsLabel:"模型默认参数",providersModelsEmptyState:"未配置按模型的默认参数。",providersAddModel:"添加模型",providersModelIdPlaceholder:"Model ID"}},d9={addAccount:"添加账号",addAccountDescription:"添加新的 GitHub Copilot 账号",selectAccountType:"选择你的 GitHub Copilot 订阅类型",typeIndividual:"Individual(个人版)",typeIndividualDescription:"个人 GitHub Copilot 订阅",typeBusiness:"Business(商业版)",typeBusinessDescription:"组织管理的 Copilot Business 计划",typeEnterprise:"Enterprise(企业版)",typeEnterpriseDescription:"GitHub Copilot Enterprise 订阅(支持 GitHub Enterprise Cloud 或自定义 GHE/GHES 域名)",enterpriseDomain:"Enterprise 域名(可选)",enterpriseDomainPlaceholder:"github.example.com",enterpriseDomainHint:"仅当你的企业使用自定义 GHE.com/GHES 主机名时才需要填写。",continue:"继续",cancel:"取消",authorizeTitle:"GitHub 授权",reauthAuthorizeTitle:'重新授权 "{{id}}"',reauthAuthorizeDescription:"完成授权流程以刷新此账号的凭据。",reauthConfirmDescription:"这将在新标签页中打开 GitHub 以重新授权你的账号凭据。",reauthConfirmHint:"你需要在 GitHub 上输入设备码来完成流程。现有账号数据将保留不变。",enterCodePrompt:"请在 GitHub 输入以下代码以完成授权:",copy:"复制",copied:"已复制!",copyFailed:"复制失败",copyManualHint:"浏览器阻止了自动复制,请手动复制上方授权码。",autoOpenHint:"已打开新标签页。如果未自动打开:",waitingForAuth:"等待授权中...",expiresIn:"{{time}} 后过期",expiresWarning:"授权码即将过期",errorRecoveryHint:"请检查网络连接后重试。如问题持续存在,请确认你的 GitHub 账号已订阅 Copilot。",errorExpiredHint:"授权码已过期,请重新开始以获取新的授权码。",successTitle:"账号添加成功!",successReauthTitle:'"{{id}}" 重新认证成功!',accountLabel:"账号",typeLabel:"类型",statusLabel:"状态",statusActive:"正常",done:"完成",expired:"授权已过期",startOver:"重新开始",retry:"重试",reauth:"重新认证",delete:"删除",deleteTitle:"删除账号",deleteConfirmation:'确定要删除账号 "{{id}}" 吗?此操作不可撤销。',deleteSuccess:'账号 "{{id}}" 已成功删除。',authFailed:"认证失败",deleting:"删除中...",reauthAriaLabel:"重新认证账号 {{id}}",deleteAriaLabel:"删除账号 {{id}}"},h9={title:"未找到页面",description:"你访问的页面不存在。"},m9={title:"统计",premiumUsage:"高级请求用量趋势",accountUsage:"各账号高级请求消耗",costUnits:"Premium 消耗",requestCount:"请求次数",tokensTotal:"总 Token 数",errorCount:"错误数",timeRange:{"24h":"24 小时","7d":"7 天",month:"本月",custom:"自定义"},autoRefresh:{off:"自动刷新:关","30s":"每 30 秒","60s":"每 60 秒","5m":"每 5 分钟"},noData:"该时间段无高级请求数据",loadFailed:"加载统计数据失败"},p9={app:JK,locale:e9,nav:t9,theme:n9,motion:r9,common:i9,tokenDialog:a9,accountsPage:o9,requestsPage:s9,modelsPage:l9,requestDetailPage:u9,jsonViewer:c9,settingsPage:f9,accountManagement:d9,notFound:h9,statistics:m9},Zf="en-US",g9=["en-US","zh-CN"],KL="locale";function Iw(e){if(!e)return Zf;const t=e.toLowerCase().trim().replace(/_/g,"-");return t.startsWith("zh")?"zh-CN":t.startsWith("en")?"en-US":Zf}function GL(){if(typeof window>"u")return Zf;try{const e=globalThis.localStorage.getItem(KL);if(e)return Iw(e);const t=Array.isArray(navigator.languages)&&navigator.languages[0]||navigator.language;return Iw(t)}catch{return Zf}}jt.use(PK).init({resources:{"en-US":{translation:QK},"zh-CN":{translation:p9}},lng:GL(),fallbackLng:Zf,supportedLngs:[...g9],interpolation:{escapeValue:!1},react:{useSuspense:!1},initImmediate:!1});const v9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y9=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),XP=e=>{const t=y9(e);return t.charAt(0).toUpperCase()+t.slice(1)},YL=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),b9=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var x9={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w9=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...u},c)=>v.createElement("svg",{ref:c,...x9,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:YL("lucide",i),...!o&&!b9(u)&&{"aria-hidden":"true"},...u},[...l.map(([d,m])=>v.createElement(d,m)),...Array.isArray(o)?o:[o]]));const Mt=(e,t)=>{const n=v.forwardRef(({className:r,...i},o)=>v.createElement(w9,{ref:o,iconNode:t,className:YL(`lucide-${v9(XP(e))}`,`lucide-${e}`,r),...i}));return n.displayName=XP(e),n};const S9=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ZP=Mt("arrow-left",S9);const A9=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],E9=Mt("check",A9);const C9=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],kS=Mt("chevron-down",C9);const j9=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],T9=Mt("chevron-right",j9);const O9=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],P9=Mt("chevron-up",O9);const N9=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],LS=Mt("circle-check",N9);const _9=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],WL=Mt("download",_9);const M9=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],R9=Mt("eye-off",M9);const D9=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],k9=Mt("eye",D9);const L9=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],I9=Mt("globe",L9);const z9=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],XL=Mt("info",z9);const B9=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],$9=Mt("key-round",B9);const U9=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],V9=Mt("laptop",U9);const F9=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$u=Mt("loader-circle",F9);const H9=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],q9=Mt("menu",H9);const K9=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],G9=Mt("moon",K9);const Y9=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],IS=Mt("octagon-x",Y9);const W9=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],QP=Mt("plus",W9);const X9=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],wp=Mt("refresh-cw",X9);const Z9=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Q9=Mt("search",Z9);const J9=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],e7=Mt("sun",J9);const t7=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ZL=Mt("triangle-alert",t7);const n7=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],r7=Mt("user-plus",n7);const i7=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],QL=Mt("x",i7);function JP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ic(...e){return t=>{let n=!1;const r=e.map(i=>{const o=JP(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():JP(e[i],null)}}}}function _t(...e){return v.useCallback(ic(...e),e)}var a7=Symbol.for("react.lazy"),Sp=Mg[" use ".trim().toString()];function o7(e){return typeof e=="object"&&e!==null&&"then"in e}function JL(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===a7&&"_payload"in e&&o7(e._payload)}function eI(e){const t=s7(e),n=v.forwardRef((r,i)=>{let{children:o,...l}=r;JL(o)&&typeof Sp=="function"&&(o=Sp(o._payload));const u=v.Children.toArray(o),c=u.find(u7);if(c){const d=c.props.children,m=u.map(h=>h===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:h);return g.jsx(t,{...l,ref:i,children:v.isValidElement(d)?v.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var zS=eI("Slot");function s7(e){const t=v.forwardRef((n,r)=>{let{children:i,...o}=n;if(JL(i)&&typeof Sp=="function"&&(i=Sp(i._payload)),v.isValidElement(i)){const l=f7(i),u=c7(o,i.props);return i.type!==v.Fragment&&(u.ref=r?ic(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var l7=Symbol("radix.slottable");function u7(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===l7}function c7(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function f7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function tI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=tI(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ot(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=tI(e))&&(r&&(r+=" "),r+=t);return r}const eN=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,tN=ot,BS=(e,t)=>n=>{var r;if(t?.variants==null)return tN(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(d=>{const m=n?.[d],h=o?.[d];if(m===null)return null;const y=eN(m)||eN(h);return i[d][y]}),u=n&&Object.entries(n).reduce((d,m)=>{let[h,y]=m;return y===void 0||(d[h]=y),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,m)=>{let{class:h,className:y,...b}=m;return Object.entries(b).every(w=>{let[A,E]=w;return Array.isArray(E)?E.includes({...o,...u}[A]):{...o,...u}[A]===E})?[...d,h,y]:d},[]);return tN(e,l,c,n?.class,n?.className)},d7=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},h7=(e,t)=>({classGroupId:e,validator:t}),nI=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ap="-",nN=[],m7="arbitrary..",p7=e=>{const t=v7(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return g7(l);const u=l.split(Ap),c=u[0]===""&&u.length>1?1:0;return rI(u,c,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const c=r[l],d=n[l];return c?d?d7(d,c):c:d||nN}return n[l]||nN}}},rI=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const d=rI(e,t+1,o);if(d)return d}const l=n.validators;if(l===null)return;const u=t===0?e.join(Ap):e.slice(t).join(Ap),c=l.length;for(let d=0;d<c;d++){const m=l[d];if(m.validator(u))return m.classGroupId}},g7=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?m7+r:void 0})(),v7=e=>{const{theme:t,classGroups:n}=e;return y7(n,t)},y7=(e,t)=>{const n=nI();for(const r in e){const i=e[r];$S(i,n,r,t)}return n},$S=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const l=e[o];b7(l,t,n,r)}},b7=(e,t,n,r)=>{if(typeof e=="string"){x7(e,t,n);return}if(typeof e=="function"){w7(e,t,n,r);return}S7(e,t,n,r)},x7=(e,t,n)=>{const r=e===""?t:iI(t,e);r.classGroupId=n},w7=(e,t,n,r)=>{if(A7(e)){$S(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(h7(n,e))},S7=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let l=0;l<o;l++){const[u,c]=i[l];$S(c,iI(t,u),n,r)}},iI=(e,t)=>{let n=e;const r=t.split(Ap),i=r.length;for(let o=0;o<i;o++){const l=r[o];let u=n.nextPart.get(l);u||(u=nI(),n.nextPart.set(l,u)),n=u}return n},A7=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,E7=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return i(o,l),l},set(o,l){o in n?n[o]=l:i(o,l)}}},zw="!",rN=":",C7=[],iN=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),j7=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let l=0,u=0,c=0,d;const m=i.length;for(let A=0;A<m;A++){const E=i[A];if(l===0&&u===0){if(E===rN){o.push(i.slice(c,A)),c=A+1;continue}if(E==="/"){d=A;continue}}E==="["?l++:E==="]"?l--:E==="("?u++:E===")"&&u--}const h=o.length===0?i:i.slice(c);let y=h,b=!1;h.endsWith(zw)?(y=h.slice(0,-1),b=!0):h.startsWith(zw)&&(y=h.slice(1),b=!0);const w=d&&d>c?d-c:void 0;return iN(o,b,y,w)};if(t){const i=t+rN,o=r;r=l=>l.startsWith(i)?o(l.slice(i.length)):iN(C7,!1,l,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},T7=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const l=n[o],u=l[0]==="[",c=t.has(l);u||c?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},O7=e=>({cache:E7(e.cacheSize),parseClassName:j7(e),sortModifiers:T7(e),...p7(e)}),P7=/\s+/,N7=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,l=[],u=e.trim().split(P7);let c="";for(let d=u.length-1;d>=0;d-=1){const m=u[d],{isExternal:h,modifiers:y,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:A}=n(m);if(h){c=m+(c.length>0?" "+c:c);continue}let E=!!A,C=r(E?w.substring(0,A):w);if(!C){if(!E){c=m+(c.length>0?" "+c:c);continue}if(C=r(w),!C){c=m+(c.length>0?" "+c:c);continue}E=!1}const j=y.length===0?"":y.length===1?y[0]:o(y).join(":"),T=b?j+zw:j,O=T+C;if(l.indexOf(O)>-1)continue;l.push(O);const N=i(C,E);for(let _=0;_<N.length;++_){const M=N[_];l.push(T+M)}c=m+(c.length>0?" "+c:c)}return c},_7=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=aI(n))&&(i&&(i+=" "),i+=r);return i},aI=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=aI(e[r]))&&(n&&(n+=" "),n+=t);return n},M7=(e,...t)=>{let n,r,i,o;const l=c=>{const d=t.reduce((m,h)=>h(m),e());return n=O7(d),r=n.cache.get,i=n.cache.set,o=u,u(c)},u=c=>{const d=r(c);if(d)return d;const m=N7(c,n);return i(c,m),m};return o=l,(...c)=>o(_7(...c))},R7=[],cn=e=>{const t=n=>n[e]||R7;return t.isThemeGetter=!0,t},oI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,D7=/^\d+\/\d+$/,k7=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,L7=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,I7=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,z7=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B7=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fu=e=>D7.test(e),He=e=>!!e&&!Number.isNaN(Number(e)),Go=e=>!!e&&Number.isInteger(Number(e)),S0=e=>e.endsWith("%")&&He(e.slice(0,-1)),qa=e=>k7.test(e),$7=()=>!0,U7=e=>L7.test(e)&&!I7.test(e),lI=()=>!1,V7=e=>z7.test(e),F7=e=>B7.test(e),H7=e=>!Ae(e)&&!Ee(e),q7=e=>ac(e,fI,lI),Ae=e=>oI.test(e),ks=e=>ac(e,dI,U7),A0=e=>ac(e,X7,He),aN=e=>ac(e,uI,lI),K7=e=>ac(e,cI,F7),ym=e=>ac(e,hI,V7),Ee=e=>sI.test(e),yf=e=>oc(e,dI),G7=e=>oc(e,Z7),oN=e=>oc(e,uI),Y7=e=>oc(e,fI),W7=e=>oc(e,cI),bm=e=>oc(e,hI,!0),ac=(e,t,n)=>{const r=oI.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},oc=(e,t,n=!1)=>{const r=sI.exec(e);return r?r[1]?t(r[1]):n:!1},uI=e=>e==="position"||e==="percentage",cI=e=>e==="image"||e==="url",fI=e=>e==="length"||e==="size"||e==="bg-size",dI=e=>e==="length",X7=e=>e==="number",Z7=e=>e==="family-name",hI=e=>e==="shadow",Q7=()=>{const e=cn("color"),t=cn("font"),n=cn("text"),r=cn("font-weight"),i=cn("tracking"),o=cn("leading"),l=cn("breakpoint"),u=cn("container"),c=cn("spacing"),d=cn("radius"),m=cn("shadow"),h=cn("inset-shadow"),y=cn("text-shadow"),b=cn("drop-shadow"),w=cn("blur"),A=cn("perspective"),E=cn("aspect"),C=cn("ease"),j=cn("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...O(),Ee,Ae],_=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],R=()=>[Ee,Ae,c],B=()=>[fu,"full","auto",...R()],V=()=>[Go,"none","subgrid",Ee,Ae],H=()=>["auto",{span:["full",Go,Ee,Ae]},Go,Ee,Ae],z=()=>[Go,"auto",Ee,Ae],W=()=>["auto","min","max","fr",Ee,Ae],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...R()],F=()=>[fu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],$=()=>[e,Ee,Ae],ae=()=>[...O(),oN,aN,{position:[Ee,Ae]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",Y7,q7,{size:[Ee,Ae]}],I=()=>[S0,yf,ks],q=()=>["","none","full",d,Ee,Ae],ne=()=>["",He,yf,ks],de=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[He,S0,oN,aN],he=()=>["","none",w,Ee,Ae],oe=()=>["none",He,Ee,Ae],le=()=>["none",He,Ee,Ae],ve=()=>[He,Ee,Ae],re=()=>[fu,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qa],breakpoint:[qa],color:[$7],container:[qa],"drop-shadow":[qa],ease:["in","out","in-out"],font:[H7],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qa],shadow:[qa],spacing:["px",He],text:[qa],"text-shadow":[qa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fu,Ae,Ee,E]}],container:["container"],columns:[{columns:[He,Ae,Ee,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Go,"auto",Ee,Ae]}],basis:[{basis:[fu,"full","auto",u,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,fu,"auto","initial","none",Ae]}],grow:[{grow:["",He,Ee,Ae]}],shrink:[{shrink:["",He,Ee,Ae]}],order:[{order:[Go,"first","last","none",Ee,Ae]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[u,"screen",...F()]}],"min-w":[{"min-w":[u,"screen","none",...F()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,yf,ks]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ee,A0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",S0,Ae]}],"font-family":[{font:[G7,Ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ee,Ae]}],"line-clamp":[{"line-clamp":[He,"none",Ee,A0]}],leading:[{leading:[o,...R()]}],"list-image":[{"list-image":["none",Ee,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ee,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",Ee,ks]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[He,"auto",Ee,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee,Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ee,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Go,Ee,Ae],radial:["",Ee,Ae],conic:[Go,Ee,Ae]},W7,K7]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,Ee,Ae]}],"outline-w":[{outline:["",He,yf,ks]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",m,bm,ym]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",h,bm,ym]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[He,ks]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",y,bm,ym]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[He,Ee,Ae]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[He]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[Ee,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[He]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:k()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ee,Ae]}],filter:[{filter:["","none",Ee,Ae]}],blur:[{blur:he()}],brightness:[{brightness:[He,Ee,Ae]}],contrast:[{contrast:[He,Ee,Ae]}],"drop-shadow":[{"drop-shadow":["","none",b,bm,ym]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",He,Ee,Ae]}],"hue-rotate":[{"hue-rotate":[He,Ee,Ae]}],invert:[{invert:["",He,Ee,Ae]}],saturate:[{saturate:[He,Ee,Ae]}],sepia:[{sepia:["",He,Ee,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ee,Ae]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[He,Ee,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[He,Ee,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,Ee,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,Ee,Ae]}],"backdrop-invert":[{"backdrop-invert":["",He,Ee,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[He,Ee,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[He,Ee,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",He,Ee,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ee,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",Ee,Ae]}],ease:[{ease:["linear","initial",C,Ee,Ae]}],delay:[{delay:[He,Ee,Ae]}],animate:[{animate:["none",j,Ee,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[A,Ee,Ae]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Ee,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ee,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ee,Ae]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[He,yf,ks,A0]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},J7=M7(Q7);function me(...e){return J7(ot(e))}const eG=BS("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Le({className:e,variant:t="default",size:n="default",asChild:r=!1,...i}){const o=r?zS:"button";return g.jsx(o,{"data-slot":"button","data-variant":t,"data-size":n,className:me(eG({variant:t,size:n,className:e})),...i})}const US=v.createContext({});function Pd(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const VS=typeof window<"u",FS=VS?v.useLayoutEffect:v.useEffect,Ig=v.createContext(null);function HS(e,t){e.indexOf(t)===-1&&e.push(t)}function qS(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const to=(e,t,n)=>n>t?t:n<e?e:n;let KS=()=>{};const no={},mI=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function pI(e){return typeof e=="object"&&e!==null}const gI=e=>/^0[^.\s]+$/u.test(e);function GS(e){let t;return()=>(t===void 0&&(t=e()),t)}const fi=e=>e,tG=(e,t)=>n=>t(e(n)),Nd=(...e)=>e.reduce(tG),Qf=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class YS{constructor(){this.subscriptions=[]}add(t){return HS(this.subscriptions,t),()=>qS(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const aa=e=>e*1e3,li=e=>e/1e3;function vI(e,t){return t?e*(1e3/t):0}const yI=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,nG=1e-7,rG=12;function iG(e,t,n,r,i){let o,l,u=0;do l=t+(n-t)/2,o=yI(l,r,i)-e,o>0?n=l:t=l;while(Math.abs(o)>nG&&++u<rG);return l}function _d(e,t,n,r){if(e===t&&n===r)return fi;const i=o=>iG(o,0,1,e,n);return o=>o===0||o===1?o:yI(i(o),t,r)}const bI=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xI=e=>t=>1-e(1-t),wI=_d(.33,1.53,.69,.99),WS=xI(wI),SI=bI(WS),AI=e=>(e*=2)<1?.5*WS(e):.5*(2-Math.pow(2,-10*(e-1))),XS=e=>1-Math.sin(Math.acos(e)),EI=xI(XS),CI=bI(XS),aG=_d(.42,0,1,1),oG=_d(0,0,.58,1),jI=_d(.42,0,.58,1),sG=e=>Array.isArray(e)&&typeof e[0]!="number",TI=e=>Array.isArray(e)&&typeof e[0]=="number",lG={linear:fi,easeIn:aG,easeInOut:jI,easeOut:oG,circIn:XS,circInOut:CI,circOut:EI,backIn:WS,backInOut:SI,backOut:wI,anticipate:AI},uG=e=>typeof e=="string",sN=e=>{if(TI(e)){KS(e.length===4);const[t,n,r,i]=e;return _d(t,n,r,i)}else if(uG(e))return lG[e];return e},xm=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function cG(e,t){let n=new Set,r=new Set,i=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function c(m){l.has(m)&&(d.schedule(m),e()),m(u)}const d={schedule:(m,h=!1,y=!1)=>{const w=y&&i?n:r;return h&&l.add(m),w.has(m)||w.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(u=m,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,d.process(m))}};return d}const fG=40;function OI(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=xm.reduce((T,O)=>(T[O]=cG(o),T),{}),{setup:u,read:c,resolveKeyframes:d,preUpdate:m,update:h,preRender:y,render:b,postRender:w}=l,A=()=>{const T=no.useManualTiming?i.timestamp:performance.now();n=!1,no.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(T-i.timestamp,fG),1)),i.timestamp=T,i.isProcessing=!0,u.process(i),c.process(i),d.process(i),m.process(i),h.process(i),y.process(i),b.process(i),w.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(A))},E=()=>{n=!0,r=!0,i.isProcessing||e(A)};return{schedule:xm.reduce((T,O)=>{const N=l[O];return T[O]=(_,M=!1,R=!1)=>(n||E(),N.schedule(_,M,R)),T},{}),cancel:T=>{for(let O=0;O<xm.length;O++)l[xm[O]].cancel(T)},state:i,steps:l}}const{schedule:vt,cancel:ro,state:_n,steps:E0}=OI(typeof requestAnimationFrame<"u"?requestAnimationFrame:fi,!0);let rp;function dG(){rp=void 0}const yr={now:()=>(rp===void 0&&yr.set(_n.isProcessing||no.useManualTiming?_n.timestamp:performance.now()),rp),set:e=>{rp=e,queueMicrotask(dG)}},PI=e=>t=>typeof t=="string"&&t.startsWith(e),NI=PI("--"),hG=PI("var(--"),ZS=e=>hG(e)?mG.test(e.split("/*")[0].trim()):!1,mG=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,sc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Jf={...sc,transform:e=>to(0,1,e)},wm={...sc,default:1},$f=e=>Math.round(e*1e5)/1e5,QS=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pG(e){return e==null}const gG=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,JS=(e,t)=>n=>!!(typeof n=="string"&&gG.test(n)&&n.startsWith(e)||t&&!pG(n)&&Object.prototype.hasOwnProperty.call(n,t)),_I=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,l,u]=r.match(QS);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},vG=e=>to(0,255,e),C0={...sc,transform:e=>Math.round(vG(e))},Xs={test:JS("rgb","red"),parse:_I("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+C0.transform(e)+", "+C0.transform(t)+", "+C0.transform(n)+", "+$f(Jf.transform(r))+")"};function yG(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Bw={test:JS("#"),parse:yG,transform:Xs.transform},Md=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wo=Md("deg"),oa=Md("%"),be=Md("px"),bG=Md("vh"),xG=Md("vw"),lN={...oa,parse:e=>oa.parse(e)/100,transform:e=>oa.transform(e*100)},Cu={test:JS("hsl","hue"),parse:_I("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+oa.transform($f(t))+", "+oa.transform($f(n))+", "+$f(Jf.transform(r))+")"},tn={test:e=>Xs.test(e)||Bw.test(e)||Cu.test(e),parse:e=>Xs.test(e)?Xs.parse(e):Cu.test(e)?Cu.parse(e):Bw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Xs.transform(e):Cu.transform(e),getAnimatableNone:e=>{const t=tn.parse(e);return t.alpha=0,tn.transform(t)}},wG=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function SG(e){return isNaN(e)&&typeof e=="string"&&(e.match(QS)?.length||0)+(e.match(wG)?.length||0)>0}const MI="number",RI="color",AG="var",EG="var(",uN="${}",CG=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ed(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const u=t.replace(CG,c=>(tn.test(c)?(r.color.push(o),i.push(RI),n.push(tn.parse(c))):c.startsWith(EG)?(r.var.push(o),i.push(AG),n.push(c)):(r.number.push(o),i.push(MI),n.push(parseFloat(c))),++o,uN)).split(uN);return{values:n,split:u,indexes:r,types:i}}function DI(e){return ed(e).values}function kI(e){const{split:t,types:n}=ed(e),r=t.length;return i=>{let o="";for(let l=0;l<r;l++)if(o+=t[l],i[l]!==void 0){const u=n[l];u===MI?o+=$f(i[l]):u===RI?o+=tn.transform(i[l]):o+=i[l]}return o}}const jG=e=>typeof e=="number"?0:tn.test(e)?tn.getAnimatableNone(e):e;function TG(e){const t=DI(e);return kI(e)(t.map(jG))}const is={test:SG,parse:DI,createTransformer:kI,getAnimatableNone:TG};function j0(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function OG({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,l=0;if(!t)i=o=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,c=2*n-u;i=j0(c,u,e+1/3),o=j0(c,u,e),l=j0(c,u,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function Ep(e,t){return n=>n>0?t:e}const kt=(e,t,n)=>e+(t-e)*n,T0=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},PG=[Bw,Xs,Cu],NG=e=>PG.find(t=>t.test(e));function cN(e){const t=NG(e);if(!t)return!1;let n=t.parse(e);return t===Cu&&(n=OG(n)),n}const fN=(e,t)=>{const n=cN(e),r=cN(t);if(!n||!r)return Ep(e,t);const i={...n};return o=>(i.red=T0(n.red,r.red,o),i.green=T0(n.green,r.green,o),i.blue=T0(n.blue,r.blue,o),i.alpha=kt(n.alpha,r.alpha,o),Xs.transform(i))},$w=new Set(["none","hidden"]);function _G(e,t){return $w.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function MG(e,t){return n=>kt(e,t,n)}function eA(e){return typeof e=="number"?MG:typeof e=="string"?ZS(e)?Ep:tn.test(e)?fN:kG:Array.isArray(e)?LI:typeof e=="object"?tn.test(e)?fN:RG:Ep}function LI(e,t){const n=[...e],r=n.length,i=e.map((o,l)=>eA(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=i[l](o);return n}}function RG(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=eA(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function DG(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],l=e.indexes[o][r[o]],u=e.values[l]??0;n[i]=u,r[o]++}return n}const kG=(e,t)=>{const n=is.createTransformer(t),r=ed(e),i=ed(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?$w.has(e)&&!i.values.length||$w.has(t)&&!r.values.length?_G(e,t):Nd(LI(DG(r,i),i.values),n):Ep(e,t)};function II(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?kt(e,t,n):eA(e)(e,t)}const LG=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>vt.update(t,n),stop:()=>ro(t),now:()=>_n.isProcessing?_n.timestamp:yr.now()}},zI=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Cp=2e4;function tA(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Cp;)t+=n,r=e.next(t);return t>=Cp?1/0:t}function IG(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(tA(r),Cp);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:li(i)}}const zG=5;function BI(e,t,n){const r=Math.max(t-zG,0);return vI(n-e(r),t-r)}const Bt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},O0=.001;function BG({duration:e=Bt.duration,bounce:t=Bt.bounce,velocity:n=Bt.velocity,mass:r=Bt.mass}){let i,o,l=1-t;l=to(Bt.minDamping,Bt.maxDamping,l),e=to(Bt.minDuration,Bt.maxDuration,li(e)),l<1?(i=d=>{const m=d*l,h=m*e,y=m-n,b=Uw(d,l),w=Math.exp(-h);return O0-y/b*w},o=d=>{const h=d*l*e,y=h*n+n,b=Math.pow(l,2)*Math.pow(d,2)*e,w=Math.exp(-h),A=Uw(Math.pow(d,2),l);return(-i(d)+O0>0?-1:1)*((y-b)*w)/A}):(i=d=>{const m=Math.exp(-d*e),h=(d-n)*e+1;return-O0+m*h},o=d=>{const m=Math.exp(-d*e),h=(n-d)*(e*e);return m*h});const u=5/e,c=UG(i,o,u);if(e=aa(e),isNaN(c))return{stiffness:Bt.stiffness,damping:Bt.damping,duration:e};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:l*2*Math.sqrt(r*d),duration:e}}}const $G=12;function UG(e,t,n){let r=n;for(let i=1;i<$G;i++)r=r-e(r)/t(r);return r}function Uw(e,t){return e*Math.sqrt(1-t*t)}const VG=["duration","bounce"],FG=["stiffness","damping","mass"];function dN(e,t){return t.some(n=>e[n]!==void 0)}function HG(e){let t={velocity:Bt.velocity,stiffness:Bt.stiffness,damping:Bt.damping,mass:Bt.mass,isResolvedFromDuration:!1,...e};if(!dN(e,FG)&&dN(e,VG))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*to(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Bt.mass,stiffness:i,damping:o}}else{const n=BG(e);t={...t,...n,mass:Bt.mass},t.isResolvedFromDuration=!0}return t}function jp(e=Bt.visualDuration,t=Bt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:c,damping:d,mass:m,duration:h,velocity:y,isResolvedFromDuration:b}=HG({...n,velocity:-li(n.velocity||0)}),w=y||0,A=d/(2*Math.sqrt(c*m)),E=l-o,C=li(Math.sqrt(c/m)),j=Math.abs(E)<5;r||(r=j?Bt.restSpeed.granular:Bt.restSpeed.default),i||(i=j?Bt.restDelta.granular:Bt.restDelta.default);let T;if(A<1){const N=Uw(C,A);T=_=>{const M=Math.exp(-A*C*_);return l-M*((w+A*C*E)/N*Math.sin(N*_)+E*Math.cos(N*_))}}else if(A===1)T=N=>l-Math.exp(-C*N)*(E+(w+C*E)*N);else{const N=C*Math.sqrt(A*A-1);T=_=>{const M=Math.exp(-A*C*_),R=Math.min(N*_,300);return l-M*((w+A*C*E)*Math.sinh(R)+N*E*Math.cosh(R))/N}}const O={calculatedDuration:b&&h||null,next:N=>{const _=T(N);if(b)u.done=N>=h;else{let M=N===0?w:0;A<1&&(M=N===0?aa(w):BI(T,N,_));const R=Math.abs(M)<=r,B=Math.abs(l-_)<=i;u.done=R&&B}return u.value=u.done?l:_,u},toString:()=>{const N=Math.min(tA(O),Cp),_=zI(M=>O.next(N*M).value,N,30);return N+"ms "+_},toTransition:()=>{}};return O}jp.applyToOptions=e=>{const t=IG(e,100,jp);return e.ease=t.ease,e.duration=aa(t.duration),e.type="keyframes",e};function Vw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:l,min:u,max:c,restDelta:d=.5,restSpeed:m}){const h=e[0],y={done:!1,value:h},b=R=>u!==void 0&&R<u||c!==void 0&&R>c,w=R=>u===void 0?c:c===void 0||Math.abs(u-R)<Math.abs(c-R)?u:c;let A=n*t;const E=h+A,C=l===void 0?E:l(E);C!==E&&(A=C-h);const j=R=>-A*Math.exp(-R/r),T=R=>C+j(R),O=R=>{const B=j(R),V=T(R);y.done=Math.abs(B)<=d,y.value=y.done?C:V};let N,_;const M=R=>{b(y.value)&&(N=R,_=jp({keyframes:[y.value,w(y.value)],velocity:BI(T,R,y.value),damping:i,stiffness:o,restDelta:d,restSpeed:m}))};return M(0),{calculatedDuration:null,next:R=>{let B=!1;return!_&&N===void 0&&(B=!0,O(R),M(R)),N!==void 0&&R>=N?_.next(R-N):(!B&&O(R),y)}}}function qG(e,t,n){const r=[],i=n||no.mix||II,o=e.length-1;for(let l=0;l<o;l++){let u=i(e[l],e[l+1]);if(t){const c=Array.isArray(t)?t[l]||fi:t;u=Nd(c,u)}r.push(u)}return r}function $I(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(KS(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=qG(t,r,i),c=u.length,d=m=>{if(l&&m<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(m<e[h+1]);h++);const y=Qf(e[h],e[h+1],m);return u[h](y)};return n?m=>d(to(e[0],e[o-1],m)):d}function KG(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Qf(0,t,r);e.push(kt(n,1,i))}}function GG(e){const t=[0];return KG(t,e.length-1),t}function YG(e,t){return e.map(n=>n*t)}function WG(e,t){return e.map(()=>t||jI).splice(0,e.length-1)}function Uf({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=sG(r)?r.map(sN):sN(r),o={done:!1,value:t[0]},l=YG(n&&n.length===t.length?n:GG(t),e),u=$I(l,t,{ease:Array.isArray(i)?i:WG(t,i)});return{calculatedDuration:e,next:c=>(o.value=u(c),o.done=c>=e,o)}}const XG=e=>e!==null;function nA(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(XG),u=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const ZG={decay:Vw,inertia:Vw,tween:Uf,keyframes:Uf,spring:jp};function UI(e){typeof e.type=="string"&&(e.type=ZG[e.type])}class rA{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const QG=e=>e/100;class zg extends rA{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==yr.now()&&this.tick(yr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;UI(t);const{type:n=Uf,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:l=0}=t;let{keyframes:u}=t;const c=n||Uf;c!==Uf&&typeof u[0]!="number"&&(this.mixKeyframes=Nd(QG,II(u[0],u[1])),u=[0,100]);const d=c({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...u].reverse(),velocity:-l})),d.calculatedDuration===null&&(d.calculatedDuration=tA(d));const{calculatedDuration:m}=d;this.calculatedDuration=m,this.resolvedDuration=m+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:m,repeat:h,repeatType:y,repeatDelay:b,type:w,onUpdate:A,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const C=this.currentTime-d*(this.playbackSpeed>=0?1:-1),j=this.playbackSpeed>=0?C<0:C>i;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,O=r;if(h){const R=Math.min(this.currentTime,i)/u;let B=Math.floor(R),V=R%1;!V&&R>=1&&(V=1),V===1&&B--,B=Math.min(B,h+1),B%2&&(y==="reverse"?(V=1-V,b&&(V-=b/u)):y==="mirror"&&(O=l)),T=to(0,1,V)*u}const N=j?{done:!1,value:m[0]}:O.next(T);o&&(N.value=o(N.value));let{done:_}=N;!j&&c!==null&&(_=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return M&&w!==Vw&&(N.value=nA(m,this.options,E,this.speed)),A&&A(N.value),M&&this.finish(),N}then(t,n){return this.finished.then(t,n)}get duration(){return li(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+li(t)}get time(){return li(this.currentTime)}set time(t){t=aa(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(yr.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=li(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=LG,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(yr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function JG(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Zs=e=>e*180/Math.PI,Fw=e=>{const t=Zs(Math.atan2(e[1],e[0]));return Hw(t)},eY={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Fw,rotateZ:Fw,skewX:e=>Zs(Math.atan(e[1])),skewY:e=>Zs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Hw=e=>(e=e%360,e<0&&(e+=360),e),hN=Fw,mN=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),pN=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),tY={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:mN,scaleY:pN,scale:e=>(mN(e)+pN(e))/2,rotateX:e=>Hw(Zs(Math.atan2(e[6],e[5]))),rotateY:e=>Hw(Zs(Math.atan2(-e[2],e[0]))),rotateZ:hN,rotate:hN,skewX:e=>Zs(Math.atan(e[4])),skewY:e=>Zs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function qw(e){return e.includes("scale")?1:0}function Kw(e,t){if(!e||e==="none")return qw(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=tY,i=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=eY,i=u}if(!i)return qw(t);const o=r[t],l=i[1].split(",").map(rY);return typeof o=="function"?o(l):l[o]}const nY=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Kw(n,t)};function rY(e){return parseFloat(e.trim())}const lc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],uc=new Set(lc),gN=e=>e===sc||e===be,iY=new Set(["x","y","z"]),aY=lc.filter(e=>!iY.has(e));function oY(e){const t=[];return aY.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const rl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Kw(t,"x"),y:(e,{transform:t})=>Kw(t,"y")};rl.translateX=rl.x;rl.translateY=rl.y;const il=new Set;let Gw=!1,Yw=!1,Ww=!1;function VI(){if(Yw){const e=Array.from(il).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=oY(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,l])=>{r.getValue(o)?.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Yw=!1,Gw=!1,il.forEach(e=>e.complete(Ww)),il.clear()}function FI(){il.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yw=!0)})}function sY(){Ww=!0,FI(),VI(),Ww=!1}class iA{constructor(t,n,r,i,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(il.add(this),Gw||(Gw=!0,vt.read(FI),vt.resolveKeyframes(VI))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i?.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,l);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=l),i&&o===void 0&&i.set(t[0])}JG(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),il.delete(this)}cancel(){this.state==="scheduled"&&(il.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const lY=e=>e.startsWith("--");function uY(e,t,n){lY(t)?e.style.setProperty(t,n):e.style[t]=n}const cY=GS(()=>window.ScrollTimeline!==void 0),fY={};function dY(e,t){const n=GS(e);return()=>fY[t]??n()}const HI=dY(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Rf=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,vN={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rf([0,.65,.55,1]),circOut:Rf([.55,0,1,.45]),backIn:Rf([.31,.01,.66,-.59]),backOut:Rf([.33,1.53,.69,.99])};function qI(e,t){if(e)return typeof e=="function"?HI()?zI(e,t):"ease-out":TI(e)?Rf(e):Array.isArray(e)?e.map(n=>qI(n,t)||vN.easeOut):vN[e]}function hY(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:l="loop",ease:u="easeOut",times:c}={},d=void 0){const m={[t]:n};c&&(m.offset=c);const h=qI(u,i);Array.isArray(h)&&(m.easing=h);const y={delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return d&&(y.pseudoElement=d),e.animate(m,y)}function KI(e){return typeof e=="function"&&"applyToOptions"in e}function mY({type:e,...t}){return KI(e)&&HI()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class pY extends rA{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:u,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,KS(typeof t.type!="string");const d=mY(t);this.animation=hY(n,r,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const m=nA(i,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(m):uY(n,r,m),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return li(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+li(t)}get time(){return li(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=aa(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&cY()?(this.animation.timeline=t,fi):n(this)}}const GI={anticipate:AI,backInOut:SI,circInOut:CI};function gY(e){return e in GI}function vY(e){typeof e.ease=="string"&&gY(e.ease)&&(e.ease=GI[e.ease])}const yN=10;class yY extends pY{constructor(t){vY(t),UI(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new zg({...l,autoplay:!1}),c=aa(this.finishedTime??this.time);n.setWithVelocity(u.sample(c-yN).value,u.sample(c).value,yN),u.stop()}}const bN=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(is.test(e)||e==="0")&&!e.startsWith("url("));function bY(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function xY(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=bN(i,t),u=bN(o,t);return!l||!u?!1:bY(e)||(n==="spring"||KI(n))&&r}function Xw(e){e.duration=0,e.type="keyframes"}const wY=new Set(["opacity","clipPath","filter","transform"]),SY=GS(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function AY(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return SY()&&n&&wY.has(n)&&(n!=="transform"||!d)&&!c&&!r&&i!=="mirror"&&o!==0&&l!=="inertia"}const EY=40;class CY extends rA{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:l="loop",keyframes:u,name:c,motionValue:d,element:m,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=yr.now();const y={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:l,name:c,motionValue:d,element:m,...h},b=m?.KeyframeResolver||iA;this.keyframeResolver=new b(u,(w,A,E)=>this.onKeyframesResolved(w,A,y,!E),c,d,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:l,velocity:u,delay:c,isHandoff:d,onUpdate:m}=r;this.resolvedAt=yr.now(),xY(t,o,l,u)||((no.instantAnimations||!c)&&m?.(nA(t,r,n)),t[0]=t[t.length-1],Xw(r),r.repeat=0);const y={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>EY?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=!d&&AY(y)?new yY({...y,element:y.motionValue.owner.current}):new zg(y);b.finished.then(()=>this.notifyFinished()).catch(fi),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),sY()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const jY=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function TY(e){const t=jY.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function YI(e,t,n=1){const[r,i]=TY(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return mI(l)?parseFloat(l):l}return ZS(i)?YI(i,t,n+1):i}function aA(e,t){return e?.[t]??e?.default??e}const WI=new Set(["width","height","top","left","right","bottom",...lc]),OY={test:e=>e==="auto",parse:e=>e},XI=e=>t=>t.test(e),ZI=[sc,be,oa,Wo,xG,bG,OY],xN=e=>ZI.find(XI(e));function PY(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||gI(e):!0}const NY=new Set(["brightness","contrast","saturate","opacity"]);function _Y(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(QS)||[];if(!r)return e;const i=n.replace(r,"");let o=NY.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const MY=/\b([a-z-]*)\(.*?\)/gu,Zw={...is,getAnimatableNone:e=>{const t=e.match(MY);return t?t.map(_Y).join(" "):e}},wN={...sc,transform:Math.round},RY={rotate:Wo,rotateX:Wo,rotateY:Wo,rotateZ:Wo,scale:wm,scaleX:wm,scaleY:wm,scaleZ:wm,skew:Wo,skewX:Wo,skewY:Wo,distance:be,translateX:be,translateY:be,translateZ:be,x:be,y:be,z:be,perspective:be,transformPerspective:be,opacity:Jf,originX:lN,originY:lN,originZ:be},oA={borderWidth:be,borderTopWidth:be,borderRightWidth:be,borderBottomWidth:be,borderLeftWidth:be,borderRadius:be,radius:be,borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomRightRadius:be,borderBottomLeftRadius:be,width:be,maxWidth:be,height:be,maxHeight:be,top:be,right:be,bottom:be,left:be,inset:be,insetBlock:be,insetBlockStart:be,insetBlockEnd:be,insetInline:be,insetInlineStart:be,insetInlineEnd:be,padding:be,paddingTop:be,paddingRight:be,paddingBottom:be,paddingLeft:be,paddingBlock:be,paddingBlockStart:be,paddingBlockEnd:be,paddingInline:be,paddingInlineStart:be,paddingInlineEnd:be,margin:be,marginTop:be,marginRight:be,marginBottom:be,marginLeft:be,marginBlock:be,marginBlockStart:be,marginBlockEnd:be,marginInline:be,marginInlineStart:be,marginInlineEnd:be,backgroundPositionX:be,backgroundPositionY:be,...RY,zIndex:wN,fillOpacity:Jf,strokeOpacity:Jf,numOctaves:wN},DY={...oA,color:tn,backgroundColor:tn,outlineColor:tn,fill:tn,stroke:tn,borderColor:tn,borderTopColor:tn,borderRightColor:tn,borderBottomColor:tn,borderLeftColor:tn,filter:Zw,WebkitFilter:Zw},QI=e=>DY[e];function JI(e,t){let n=QI(e);return n!==Zw&&(n=is),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const kY=new Set(["auto","none","0"]);function LY(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!kY.has(o)&&ed(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=JI(n,i)}class IY extends iA{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),ZS(d))){const m=YI(d,n.current);m!==void 0&&(t[c]=m),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!WI.has(r)||t.length!==2)return;const[i,o]=t,l=xN(i),u=xN(o);if(l!==u)if(gN(l)&&gN(u))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else rl[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||PY(t[i]))&&r.push(i);r.length&&LY(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rl[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,l=r[o];r[o]=rl[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([u,c])=>{t.getValue(u).set(c)}),this.resolveNoneKeyframes()}}function ez(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const tz=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function nz(e){return pI(e)&&"offsetHeight"in e}const SN=30,zY=e=>!isNaN(parseFloat(e)),Vf={current:void 0};class BY{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=yr.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=yr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=zY(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new YS);const r=this.events[t].add(n);return t==="change"?()=>{r(),vt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Vf.current&&Vf.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=yr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>SN)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,SN);return vI(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function cl(e,t){return new BY(e,t)}const{schedule:sA}=OI(queueMicrotask,!1),Ai={x:!1,y:!1};function rz(){return Ai.x||Ai.y}function $Y(e){return e==="x"||e==="y"?Ai[e]?null:(Ai[e]=!0,()=>{Ai[e]=!1}):Ai.x||Ai.y?null:(Ai.x=Ai.y=!0,()=>{Ai.x=Ai.y=!1})}function iz(e,t){const n=ez(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function AN(e){return!(e.pointerType==="touch"||rz())}function UY(e,t,n={}){const[r,i,o]=iz(e,n),l=u=>{if(!AN(u))return;const{target:c}=u,d=t(c,u);if(typeof d!="function"||!c)return;const m=h=>{AN(h)&&(d(h),c.removeEventListener("pointerleave",m))};c.addEventListener("pointerleave",m,i)};return r.forEach(u=>{u.addEventListener("pointerenter",l,i)}),o}const az=(e,t)=>t?e===t?!0:az(e,t.parentElement):!1,lA=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,VY=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function FY(e){return VY.has(e.tagName)||e.tabIndex!==-1}const ip=new WeakSet;function EN(e){return t=>{t.key==="Enter"&&e(t)}}function P0(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const HY=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=EN(()=>{if(ip.has(n))return;P0(n,"down");const i=EN(()=>{P0(n,"up")}),o=()=>P0(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function CN(e){return lA(e)&&!rz()}function qY(e,t,n={}){const[r,i,o]=iz(e,n),l=u=>{const c=u.currentTarget;if(!CN(u))return;ip.add(c);const d=t(c,u),m=(b,w)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",y),ip.has(c)&&ip.delete(c),CN(b)&&typeof d=="function"&&d(b,{success:w})},h=b=>{m(b,c===window||c===document||n.useGlobalTarget||az(c,b.target))},y=b=>{m(b,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",y,i)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,i),nz(u)&&(u.addEventListener("focus",d=>HY(d,i)),!FY(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}function oz(e){return pI(e)&&"ownerSVGElement"in e}function KY(e){return oz(e)&&e.tagName==="svg"}function GY(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],o=e[2+n],l=e[3+n],u=$I(i,o,l);return t?u(r):u}const an=e=>!!(e&&e.getVelocity);function YY(e,t,n){const r=e.get();let i=null,o=r,l;const u=typeof r=="string"?r.replace(/[\d.-]/g,""):void 0,c=()=>{i&&(i.stop(),i=null)},d=()=>{c(),i=new zg({keyframes:[TN(e.get()),TN(o)],velocity:e.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:l})};if(e.attach((m,h)=>{o=m,l=y=>h(jN(y,u)),vt.postRender(d)},c),an(t)){const m=t.on("change",y=>e.set(jN(y,u))),h=e.on("destroy",m);return()=>{m(),h()}}return c}function jN(e,t){return t?e+t:e}function TN(e){return typeof e=="number"?e:parseFloat(e)}const WY=[...ZI,tn,is],XY=e=>WY.find(XI(e)),Rd=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ON(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ZY(...e){return t=>{let n=!1;const r=e.map(i=>{const o=ON(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():ON(e[i],null)}}}}function QY(...e){return v.useCallback(ZY(...e),e)}class JY extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=nz(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function eW({children:e,isPresent:t,anchorX:n,root:r}){const i=v.useId(),o=v.useRef(null),l=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=v.useContext(Rd),c=QY(o,e?.ref);return v.useInsertionEffect(()=>{const{width:d,height:m,top:h,left:y,right:b}=l.current;if(t||!o.current||!d||!m)return;const w=n==="left"?`left: ${y}`:`right: ${b}`;o.current.dataset.motionPopId=i;const A=document.createElement("style");u&&(A.nonce=u);const E=r??document.head;return E.appendChild(A),A.sheet&&A.sheet.insertRule(`
|
|
12
|
-
[data-motion-pop-id="${i}"] {
|
|
13
|
-
position: absolute !important;
|
|
14
|
-
width: ${d}px !important;
|
|
15
|
-
height: ${m}px !important;
|
|
16
|
-
${w}px !important;
|
|
17
|
-
top: ${h}px !important;
|
|
18
|
-
}
|
|
19
|
-
`),()=>{E.contains(A)&&E.removeChild(A)}},[t]),g.jsx(JY,{isPresent:t,childRef:o,sizeRef:l,children:v.cloneElement(e,{ref:c})})}const tW=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:l,anchorX:u,root:c})=>{const d=Pd(nW),m=v.useId();let h=!0,y=v.useMemo(()=>(h=!1,{id:m,initial:t,isPresent:n,custom:i,onExitComplete:b=>{d.set(b,!0);for(const w of d.values())if(!w)return;r&&r()},register:b=>(d.set(b,!1),()=>d.delete(b))}),[n,d,r]);return o&&h&&(y={...y}),v.useMemo(()=>{d.forEach((b,w)=>d.set(w,!1))},[n]),v.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),l==="popLayout"&&(e=g.jsx(eW,{isPresent:n,anchorX:u,root:c,children:e})),g.jsx(Ig.Provider,{value:y,children:e})};function nW(){return new Map}function sz(e=!0){const t=v.useContext(Ig);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=v.useId();v.useEffect(()=>{if(e)return i(o)},[e]);const l=v.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const Sm=e=>e.key||"";function PN(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const uA=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",root:c})=>{const[d,m]=sz(l),h=v.useMemo(()=>PN(e),[e]),y=l&&!d?[]:h.map(Sm),b=v.useRef(!0),w=v.useRef(h),A=Pd(()=>new Map),[E,C]=v.useState(h),[j,T]=v.useState(h);FS(()=>{b.current=!1,w.current=h;for(let _=0;_<j.length;_++){const M=Sm(j[_]);y.includes(M)?A.delete(M):A.get(M)!==!0&&A.set(M,!1)}},[j,y.length,y.join("-")]);const O=[];if(h!==E){let _=[...h];for(let M=0;M<j.length;M++){const R=j[M],B=Sm(R);y.includes(B)||(_.splice(M,0,R),O.push(R))}return o==="wait"&&O.length&&(_=O),T(PN(_)),C(h),null}const{forceRender:N}=v.useContext(US);return g.jsx(g.Fragment,{children:j.map(_=>{const M=Sm(_),R=l&&!d?!1:h===j||y.includes(M),B=()=>{if(A.has(M))A.set(M,!0);else return;let V=!0;A.forEach(H=>{H||(V=!1)}),V&&(N?.(),T(w.current),l&&m?.(),r&&r())};return g.jsx(tW,{isPresent:R,initial:!b.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:c,onExitComplete:R?void 0:B,anchorX:u,children:_},M)})})},lz=v.createContext({strict:!1}),NN={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Uu={};for(const e in NN)Uu[e]={isEnabled:t=>NN[e].some(n=>!!t[n])};function rW(e){for(const t in e)Uu[t]={...Uu[t],...e[t]}}const iW=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Tp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||iW.has(e)}let uz=e=>!Tp(e);function aW(e){typeof e=="function"&&(uz=t=>t.startsWith("on")?!Tp(t):e(t))}try{aW(require("@emotion/is-prop-valid").default)}catch{}function oW(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(uz(i)||n===!0&&Tp(i)||!t&&!Tp(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Bg=v.createContext({});function $g(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function td(e){return typeof e=="string"||Array.isArray(e)}const cA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fA=["initial",...cA];function Ug(e){return $g(e.animate)||fA.some(t=>td(e[t]))}function cz(e){return!!(Ug(e)||e.variants)}function sW(e,t){if(Ug(e)){const{initial:n,animate:r}=e;return{initial:n===!1||td(n)?n:void 0,animate:td(r)?r:void 0}}return e.inherit!==!1?t:{}}function lW(e){const{initial:t,animate:n}=sW(e,v.useContext(Bg));return v.useMemo(()=>({initial:t,animate:n}),[_N(t),_N(n)])}function _N(e){return Array.isArray(e)?e.join(" "):e}function MN(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const bf={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(be.test(e))e=parseFloat(e);else return e;const n=MN(e,t.target.x),r=MN(e,t.target.y);return`${n}% ${r}%`}},uW={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=is.parse(e);if(i.length>5)return r;const o=is.createTransformer(e),l=typeof i[0]!="number"?1:0,u=n.x.scale*t.x,c=n.y.scale*t.y;i[0+l]/=u,i[1+l]/=c;const d=kt(u,c,.5);return typeof i[2+l]=="number"&&(i[2+l]/=d),typeof i[3+l]=="number"&&(i[3+l]/=d),o(i)}},Qw={borderRadius:{...bf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bf,borderTopRightRadius:bf,borderBottomLeftRadius:bf,borderBottomRightRadius:bf,boxShadow:uW};function fz(e,{layout:t,layoutId:n}){return uc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qw[e]||e==="opacity")}const cW={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fW=lc.length;function dW(e,t,n){let r="",i=!0;for(let o=0;o<fW;o++){const l=lc[o],u=e[l];if(u===void 0)continue;let c=!0;if(typeof u=="number"?c=u===(l.startsWith("scale")?1:0):c=parseFloat(u)===0,!c||n){const d=tz(u,oA[l]);if(!c){i=!1;const m=cW[l]||l;r+=`${m}(${d}) `}n&&(t[l]=d)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function dA(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let l=!1,u=!1;for(const c in t){const d=t[c];if(uc.has(c)){l=!0;continue}else if(NI(c)){i[c]=d;continue}else{const m=tz(d,oA[c]);c.startsWith("origin")?(u=!0,o[c]=m):r[c]=m}}if(t.transform||(l||n?r.transform=dW(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:c="50%",originY:d="50%",originZ:m=0}=o;r.transformOrigin=`${c} ${d} ${m}`}}const hA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dz(e,t,n){for(const r in t)!an(t[r])&&!fz(r,n)&&(e[r]=t[r])}function hW({transformTemplate:e},t){return v.useMemo(()=>{const n=hA();return dA(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mW(e,t){const n=e.style||{},r={};return dz(r,n,e),Object.assign(r,hW(e,t)),r}function pW(e,t){const n={},r=mW(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const gW={offset:"stroke-dashoffset",array:"stroke-dasharray"},vW={offset:"strokeDashoffset",array:"strokeDasharray"};function yW(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?gW:vW;e[o.offset]=be.transform(-r);const l=be.transform(t),u=be.transform(n);e[o.array]=`${l} ${u}`}function hz(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:l=0,...u},c,d,m){if(dA(e,u,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:y}=e;h.transform&&(y.transform=h.transform,delete h.transform),(y.transform||h.transformOrigin)&&(y.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),y.transform&&(y.transformBox=m?.transformBox??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&yW(h,i,o,l,!1)}const mz=()=>({...hA(),attrs:{}}),pz=e=>typeof e=="string"&&e.toLowerCase()==="svg";function bW(e,t,n,r){const i=v.useMemo(()=>{const o=mz();return hz(o,t,pz(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};dz(o,e.style,e),i.style={...o,...i.style}}return i}const xW=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function mA(e){return typeof e!="string"||e.includes("-")?!1:!!(xW.indexOf(e)>-1||/[A-Z]/u.test(e))}function wW(e,t,n,{latestValues:r},i,o=!1,l){const c=(l??mA(e)?bW:pW)(t,r,i,e),d=oW(t,typeof e=="string",o),m=e!==v.Fragment?{...d,...c,ref:n}:{},{children:h}=t,y=v.useMemo(()=>an(h)?h.get():h,[h]);return v.createElement(e,{...m,children:y})}function RN(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function pA(e,t,n,r){if(typeof t=="function"){const[i,o]=RN(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=RN(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function ap(e){return an(e)?e.get():e}function SW({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:AW(n,r,i,e),renderState:t()}}function AW(e,t,n,r){const i={},o=r(e,{});for(const y in o)i[y]=ap(o[y]);let{initial:l,animate:u}=e;const c=Ug(e),d=cz(e);t&&d&&!c&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const h=m?u:l;if(h&&typeof h!="boolean"&&!$g(h)){const y=Array.isArray(h)?h:[h];for(let b=0;b<y.length;b++){const w=pA(e,y[b]);if(w){const{transitionEnd:A,transition:E,...C}=w;for(const j in C){let T=C[j];if(Array.isArray(T)){const O=m?T.length-1:0;T=T[O]}T!==null&&(i[j]=T)}for(const j in A)i[j]=A[j]}}}return i}const gz=e=>(t,n)=>{const r=v.useContext(Bg),i=v.useContext(Ig),o=()=>SW(e,t,r,i);return n?o():Pd(o)};function gA(e,t,n){const{style:r}=e,i={};for(const o in r)(an(r[o])||t.style&&an(t.style[o])||fz(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}const EW=gz({scrapeMotionValuesFromProps:gA,createRenderState:hA});function vz(e,t,n){const r=gA(e,t,n);for(const i in e)if(an(e[i])||an(t[i])){const o=lc.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const CW=gz({scrapeMotionValuesFromProps:vz,createRenderState:mz}),jW=Symbol.for("motionComponentSymbol");function ju(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function TW(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ju(n)&&(n.current=r))},[t])}const vA=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),OW="framerAppearId",yz="data-"+vA(OW),bz=v.createContext({});function PW(e,t,n,r,i,o){const{visualElement:l}=v.useContext(Bg),u=v.useContext(lz),c=v.useContext(Ig),d=v.useContext(Rd).reducedMotion,m=v.useRef(null);r=r||u.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:l,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,isSVG:o}));const h=m.current,y=v.useContext(bz);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&NW(m.current,n,i,y);const b=v.useRef(!1);v.useInsertionEffect(()=>{h&&b.current&&h.update(n,c)});const w=n[yz],A=v.useRef(!!w&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return FS(()=>{h&&(b.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),A.current&&h.animationState&&h.animationState.animateChanges())}),v.useEffect(()=>{h&&(!A.current&&h.animationState&&h.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),A.current=!1),h.enteringChildren=void 0)}),h}function NW(e,t,n,r){const{layoutId:i,layout:o,drag:l,dragConstraints:u,layoutScroll:c,layoutRoot:d,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:xz(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!l||u&&ju(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:c,layoutRoot:d})}function xz(e){if(e)return e.options.allowProjection!==!1?e.projection:xz(e.parent)}function N0(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&rW(r);const o=n?n==="svg":mA(e),l=o?CW:EW;function u(d,m){let h;const y={...v.useContext(Rd),...d,layoutId:_W(d)},{isStatic:b}=y,w=lW(d),A=l(d,b);if(!b&&VS){MW();const E=RW(y);h=E.MeasureLayout,w.visualElement=PW(e,A,y,i,E.ProjectionNode,o)}return g.jsxs(Bg.Provider,{value:w,children:[h&&w.visualElement?g.jsx(h,{visualElement:w.visualElement,...y}):null,wW(e,d,TW(A,w.visualElement,m),A,b,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=v.forwardRef(u);return c[jW]=e,c}function _W({layoutId:e}){const t=v.useContext(US).id;return t&&e!==void 0?t+"-"+e:e}function MW(e,t){v.useContext(lz).strict}function RW(e){const{drag:t,layout:n}=Uu;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function DW(e,t){if(typeof Proxy>"u")return N0;const n=new Map,r=(o,l)=>N0(o,l,e,t),i=(o,l)=>r(o,l);return new Proxy(i,{get:(o,l)=>l==="create"?r:(n.has(l)||n.set(l,N0(l,void 0,e,t)),n.get(l))})}function wz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function kW({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function LW(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function _0(e){return e===void 0||e===1}function Jw({scale:e,scaleX:t,scaleY:n}){return!_0(e)||!_0(t)||!_0(n)}function Us(e){return Jw(e)||Sz(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Sz(e){return DN(e.x)||DN(e.y)}function DN(e){return e&&e!=="0%"}function Op(e,t,n){const r=e-n,i=t*r;return n+i}function kN(e,t,n,r,i){return i!==void 0&&(e=Op(e,i,r)),Op(e,n,r)+t}function e1(e,t=0,n=1,r,i){e.min=kN(e.min,t,n,r,i),e.max=kN(e.max,t,n,r,i)}function Az(e,{x:t,y:n}){e1(e.x,t.translate,t.scale,t.originPoint),e1(e.y,n.translate,n.scale,n.originPoint)}const LN=.999999999999,IN=1.0000000000001;function IW(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,l;for(let u=0;u<i;u++){o=n[u],l=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ou(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,Az(e,l)),r&&Us(o.latestValues)&&Ou(e,o.latestValues))}t.x<IN&&t.x>LN&&(t.x=1),t.y<IN&&t.y>LN&&(t.y=1)}function Tu(e,t){e.min=e.min+t,e.max=e.max+t}function zN(e,t,n,r,i=.5){const o=kt(e.min,e.max,i);e1(e,t,n,o,r)}function Ou(e,t){zN(e.x,t.x,t.scaleX,t.scale,t.originX),zN(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ez(e,t){return wz(LW(e.getBoundingClientRect(),t))}function zW(e,t,n){const r=Ez(e,n),{scroll:i}=t;return i&&(Tu(r.x,i.offset.x),Tu(r.y,i.offset.y)),r}const BN=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pu=()=>({x:BN(),y:BN()}),$N=()=>({min:0,max:0}),hn=()=>({x:$N(),y:$N()}),t1={current:null},Cz={current:!1};function BW(){if(Cz.current=!0,!!VS)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>t1.current=e.matches;e.addEventListener("change",t),t()}else t1.current=!1}const $W=new WeakMap;function UW(e,t,n){for(const r in t){const i=t[r],o=n[r];if(an(i))e.addValue(r,i);else if(an(o))e.addValue(r,cl(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(i):l.hasAnimated||l.set(i)}else{const l=e.getStaticValue(r);e.addValue(r,cl(l!==void 0?l:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const UN=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class VW{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=iA,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=yr.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,vt.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=l;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Ug(n),this.isVariantNode=cz(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in h){const b=h[y];c[y]!==void 0&&an(b)&&b.set(c[y])}}mount(t){this.current=t,$W.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Cz.current||BW(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:t1.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ro(this.notifyUpdate),ro(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=uc.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&vt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Uu){const n=Uu[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):hn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<UN.length;r++){const i=UN[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,l=t[o];l&&(this.propEventSubscriptions[i]=this.on(i,l))}this.prevMotionValues=UW(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=cl(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(mI(r)||gI(r))?r=parseFloat(r):!XY(r)&&is.test(n)&&(r=JI(t,n)),this.setBaseTarget(t,an(r)?r.get():r)),an(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=pA(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!an(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new YS),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){sA.render(this.render)}}class jz extends VW{constructor(){super(...arguments),this.KeyframeResolver=IY}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;an(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Tz(e,{style:t,vars:n},r,i){const o=e.style;let l;for(l in t)o[l]=t[l];i?.applyProjectionStyles(o,r);for(l in n)o.setProperty(l,n[l])}function FW(e){return window.getComputedStyle(e)}class HW extends jz{constructor(){super(...arguments),this.type="html",this.renderInstance=Tz}readValueFromInstance(t,n){if(uc.has(n))return this.projection?.isProjecting?qw(n):nY(t,n);{const r=FW(t),i=(NI(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ez(t,n)}build(t,n,r){dA(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return gA(t,n,r)}}const Oz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function qW(e,t,n,r){Tz(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Oz.has(i)?i:vA(i),t.attrs[i])}class KW extends jz{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=hn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(uc.has(n)){const r=QI(n);return r&&r.default||0}return n=Oz.has(n)?n:vA(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return vz(t,n,r)}build(t,n,r){hz(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){qW(t,n,r,i)}mount(t){this.isSVGTag=pz(t.tagName),super.mount(t)}}const GW=(e,t)=>t.isSVG??mA(e)?new KW(t):new HW(t,{allowProjection:e!==v.Fragment});function Du(e,t,n){const r=e.getProps();return pA(r,t,n!==void 0?n:r.custom,e)}const n1=e=>Array.isArray(e);function YW(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,cl(n))}function WW(e){return n1(e)?e[e.length-1]||0:e}function XW(e,t){const n=Du(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const l in o){const u=WW(o[l]);YW(e,l,u)}}function ZW(e){return!!(an(e)&&e.add)}function r1(e,t){const n=e.getValue("willChange");if(ZW(n))return n.add(t);if(!n&&no.WillChange){const r=new no.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Pz(e){return e.props[yz]}const QW=e=>e!==null;function JW(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(QW),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const eX={type:"spring",stiffness:500,damping:25,restSpeed:10},tX=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nX={type:"keyframes",duration:.8},rX={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},iX=(e,{keyframes:t})=>t.length>2?nX:uc.has(e)?e.startsWith("scale")?tX(t[1]):eX:rX;function aX({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:l,repeatDelay:u,from:c,elapsed:d,...m}){return!!Object.keys(m).length}const yA=(e,t,n,r={},i,o)=>l=>{const u=aA(r,e)||{},c=u.delay||r.delay||0;let{elapsed:d=0}=r;d=d-aa(c);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-d,onUpdate:y=>{t.set(y),u.onUpdate&&u.onUpdate(y)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:i};aX(u)||Object.assign(m,iX(e,m)),m.duration&&(m.duration=aa(m.duration)),m.repeatDelay&&(m.repeatDelay=aa(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let h=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(Xw(m),m.delay===0&&(h=!0)),(no.instantAnimations||no.skipAnimations)&&(h=!0,Xw(m),m.delay=0),m.allowFlatten=!u.type&&!u.ease,h&&!o&&t.get()!==void 0){const y=JW(m.keyframes,u);if(y!==void 0){vt.update(()=>{m.onUpdate(y),m.onComplete()});return}}return u.isSync?new zg(m):new CY(m)};function oX({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Nz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:l,...u}=t;r&&(o=r);const c=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const m in u){const h=e.getValue(m,e.latestValues[m]??null),y=u[m];if(y===void 0||d&&oX(d,m))continue;const b={delay:n,...aA(o||{},m)},w=h.get();if(w!==void 0&&!h.isAnimating&&!Array.isArray(y)&&y===w&&!b.velocity)continue;let A=!1;if(window.MotionHandoffAnimation){const C=Pz(e);if(C){const j=window.MotionHandoffAnimation(C,m,vt);j!==null&&(b.startTime=j,A=!0)}}r1(e,m),h.start(yA(m,h,y,e.shouldReduceMotion&&WI.has(m)?{type:!1}:b,e,A));const E=h.animation;E&&c.push(E)}return l&&Promise.all(c).then(()=>{vt.update(()=>{l&&XW(e,l)})}),c}function _z(e,t,n,r=0,i=1){const o=Array.from(e).sort((d,m)=>d.sortNodePosition(m)).indexOf(t),l=e.size,u=(l-1)*r;return typeof n=="function"?n(o,l):i===1?o*r:u-o*r}function i1(e,t,n={}){const r=Du(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Nz(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:m,staggerDirection:h}=i;return sX(e,t,c,d,m,h,n)}:()=>Promise.resolve(),{when:u}=i;if(u){const[c,d]=u==="beforeChildren"?[o,l]:[l,o];return c().then(()=>d())}else return Promise.all([o(),l(n.delay)])}function sX(e,t,n=0,r=0,i=0,o=1,l){const u=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),u.push(i1(c,t,{...l,delay:n+(typeof r=="function"?0:r)+_z(e.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(u)}function lX(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>i1(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=i1(e,t,n);else{const i=typeof t=="function"?Du(e,t,n.custom):t;r=Promise.all(Nz(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Mz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const uX=fA.length;function Rz(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Rz(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uX;n++){const r=fA[n],i=e.props[r];(td(i)||i===!1)&&(t[r]=i)}return t}const cX=[...cA].reverse(),fX=cA.length;function dX(e){return t=>Promise.all(t.map(({animation:n,options:r})=>lX(e,n,r)))}function hX(e){let t=dX(e),n=VN(),r=!0;const i=c=>(d,m)=>{const h=Du(e,m,c==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:y,transitionEnd:b,...w}=h;d={...d,...w,...b}}return d};function o(c){t=c(e)}function l(c){const{props:d}=e,m=Rz(e.parent)||{},h=[],y=new Set;let b={},w=1/0;for(let E=0;E<fX;E++){const C=cX[E],j=n[C],T=d[C]!==void 0?d[C]:m[C],O=td(T),N=C===c?j.isActive:null;N===!1&&(w=E);let _=T===m[C]&&T!==d[C]&&O;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),j.protectedKeys={...b},!j.isActive&&N===null||!T&&!j.prevProp||$g(T)||typeof T=="boolean")continue;const M=mX(j.prevProp,T);let R=M||C===c&&j.isActive&&!_&&O||E>w&&O,B=!1;const V=Array.isArray(T)?T:[T];let H=V.reduce(i(C),{});N===!1&&(H={});const{prevResolvedValues:z={}}=j,W={...z,...H},Q=F=>{R=!0,y.has(F)&&(B=!0,y.delete(F)),j.needsAnimating[F]=!0;const $=e.getValue(F);$&&($.liveStyle=!1)};for(const F in W){const $=H[F],ae=z[F];if(b.hasOwnProperty(F))continue;let G=!1;n1($)&&n1(ae)?G=!Mz($,ae):G=$!==ae,G?$!=null?Q(F):y.add(F):$!==void 0&&y.has(F)?Q(F):j.protectedKeys[F]=!0}j.prevProp=T,j.prevResolvedValues=H,j.isActive&&(b={...b,...H}),r&&e.blockInitialAnimation&&(R=!1);const se=_&&M;R&&(!se||B)&&h.push(...V.map(F=>{const $={type:C};if(typeof F=="string"&&r&&!se&&e.manuallyAnimateOnMount&&e.parent){const{parent:ae}=e,G=Du(ae,F);if(ae.enteringChildren&&G){const{delayChildren:k}=G.transition||{};$.delay=_z(ae.enteringChildren,e,k)}}return{animation:F,options:$}}))}if(y.size){const E={};if(typeof d.initial!="boolean"){const C=Du(e,Array.isArray(d.initial)?d.initial[0]:d.initial);C&&C.transition&&(E.transition=C.transition)}y.forEach(C=>{const j=e.getBaseTarget(C),T=e.getValue(C);T&&(T.liveStyle=!0),E[C]=j??null}),h.push({animation:E})}let A=!!h.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(A=!1),r=!1,A?t(h):Promise.resolve()}function u(c,d){if(n[c].isActive===d)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(c,d)),n[c].isActive=d;const m=l(c);for(const h in n)n[h].protectedKeys={};return m}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=VN()}}}function mX(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Mz(t,e):!1}function Ls(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function VN(){return{animate:Ls(!0),whileInView:Ls(),whileHover:Ls(),whileTap:Ls(),whileDrag:Ls(),whileFocus:Ls(),exit:Ls()}}class fs{constructor(t){this.isMounted=!1,this.node=t}update(){}}class pX extends fs{constructor(t){super(t),t.animationState||(t.animationState=hX(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();$g(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let gX=0;class vX extends fs{constructor(){super(...arguments),this.id=gX++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const yX={animation:{Feature:pX},exit:{Feature:vX}};function nd(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Dd(e){return{point:{x:e.pageX,y:e.pageY}}}const bX=e=>t=>lA(t)&&e(t,Dd(t));function Ff(e,t,n,r){return nd(e,t,bX(n),r)}const Dz=1e-4,xX=1-Dz,wX=1+Dz,kz=.01,SX=0-kz,AX=0+kz;function tr(e){return e.max-e.min}function EX(e,t,n){return Math.abs(e-t)<=n}function FN(e,t,n,r=.5){e.origin=r,e.originPoint=kt(t.min,t.max,e.origin),e.scale=tr(n)/tr(t),e.translate=kt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xX&&e.scale<=wX||isNaN(e.scale))&&(e.scale=1),(e.translate>=SX&&e.translate<=AX||isNaN(e.translate))&&(e.translate=0)}function Hf(e,t,n,r){FN(e.x,t.x,n.x,r?r.originX:void 0),FN(e.y,t.y,n.y,r?r.originY:void 0)}function HN(e,t,n){e.min=n.min+t.min,e.max=e.min+tr(t)}function CX(e,t,n){HN(e.x,t.x,n.x),HN(e.y,t.y,n.y)}function qN(e,t,n){e.min=t.min-n.min,e.max=e.min+tr(t)}function Pp(e,t,n){qN(e.x,t.x,n.x),qN(e.y,t.y,n.y)}function oi(e){return[e("x"),e("y")]}const Lz=({current:e})=>e?e.ownerDocument.defaultView:null,KN=(e,t)=>Math.abs(e-t);function jX(e,t){const n=KN(e.x,t.x),r=KN(e.y,t.y);return Math.sqrt(n**2+r**2)}class Iz{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:l=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=R0(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,w=jX(y.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!w)return;const{point:A}=y,{timestamp:E}=_n;this.history.push({...A,timestamp:E});const{onStart:C,onMove:j}=this.handlers;b||(C&&C(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,y)},this.handlePointerMove=(y,b)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=M0(b,this.transformPagePoint),vt.update(this.updatePoint,!0)},this.handlePointerUp=(y,b)=>{this.end();const{onEnd:w,onSessionEnd:A,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=R0(y.type==="pointercancel"?this.lastMoveEventInfo:M0(b,this.transformPagePoint),this.history);this.startEvent&&w&&w(y,C),A&&A(y,C)},!lA(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=i||window;const u=Dd(t),c=M0(u,this.transformPagePoint),{point:d}=c,{timestamp:m}=_n;this.history=[{...d,timestamp:m}];const{onSessionStart:h}=n;h&&h(t,R0(c,this.history)),this.removeListeners=Nd(Ff(this.contextWindow,"pointermove",this.handlePointerMove),Ff(this.contextWindow,"pointerup",this.handlePointerUp),Ff(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ro(this.updatePoint)}}function M0(e,t){return t?{point:t(e.point)}:e}function GN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function R0({point:e},t){return{point:e,delta:GN(e,zz(t)),offset:GN(e,TX(t)),velocity:OX(t,.1)}}function TX(e){return e[0]}function zz(e){return e[e.length-1]}function OX(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=zz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>aa(t)));)n--;if(!r)return{x:0,y:0};const o=li(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function PX(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?kt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?kt(n,e,r.max):Math.min(e,n)),e}function YN(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function NX(e,{top:t,left:n,bottom:r,right:i}){return{x:YN(e.x,n,i),y:YN(e.y,t,r)}}function WN(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function _X(e,t){return{x:WN(e.x,t.x),y:WN(e.y,t.y)}}function MX(e,t){let n=.5;const r=tr(e),i=tr(t);return i>r?n=Qf(t.min,t.max-r,e.min):r>i&&(n=Qf(e.min,e.max-i,t.min)),to(0,1,n)}function RX(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const a1=.35;function DX(e=a1){return e===!1?e=0:e===!0&&(e=a1),{x:XN(e,"left","right"),y:XN(e,"top","bottom")}}function XN(e,t,n){return{min:ZN(e,t),max:ZN(e,n)}}function ZN(e,t){return typeof e=="number"?e:e[t]||0}const kX=new WeakMap;class LX{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=hn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Dd(h).point)},l=(h,y)=>{const{drag:b,dragPropagation:w,onDragStart:A}=this.getProps();if(b&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=$Y(b),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=y,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),oi(C=>{let j=this.getAxisMotionValue(C).get()||0;if(oa.test(j)){const{projection:T}=this.visualElement;if(T&&T.layout){const O=T.layout.layoutBox[C];O&&(j=tr(O)*(parseFloat(j)/100))}}this.originPoint[C]=j}),A&&vt.postRender(()=>A(h,y)),r1(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},u=(h,y)=>{this.latestPointerEvent=h,this.latestPanInfo=y;const{dragPropagation:b,dragDirectionLock:w,onDirectionLock:A,onDrag:E}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:C}=y;if(w&&this.currentDirection===null){this.currentDirection=IX(C),this.currentDirection!==null&&A&&A(this.currentDirection);return}this.updateAxis("x",y.point,C),this.updateAxis("y",y.point,C),this.visualElement.render(),E&&E(h,y)},c=(h,y)=>{this.latestPointerEvent=h,this.latestPanInfo=y,this.stop(h,y),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>oi(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new Iz(t,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:Lz(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:l}=i;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&vt.postRender(()=>u(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Am(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=PX(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&ju(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=NX(r.layoutBox,t):this.constraints=!1,this.elastic=DX(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&oi(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=RX(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ju(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=zW(r,i.root,this.visualElement.getTransformPagePoint());let l=_X(i.layout.layoutBox,o);if(n){const u=n(kW(l));this.hasMutatedConstraints=!!u,u&&(l=wz(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),c=this.constraints||{},d=oi(m=>{if(!Am(m,n,this.currentDirection))return;let h=c&&c[m]||{};l&&(h={min:0,max:0});const y=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[m]:0,bounceStiffness:y,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(m,w)});return Promise.all(d).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r1(this.visualElement,t),r.start(yA(t,r,0,n,this.visualElement,!1))}stopAnimation(){oi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){oi(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){oi(n=>{const{drag:r}=this.getProps();if(!Am(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:u}=i.layout.layoutBox[n];o.set(t[n]-kt(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ju(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};oi(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const c=u.get();i[l]=MX({min:c,max:c},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),oi(l=>{if(!Am(l,t,null))return;const u=this.getAxisMotionValue(l),{min:c,max:d}=this.constraints[l];u.set(kt(c,d,i[l]))})}addListeners(){if(!this.visualElement.current)return;kX.set(this.visualElement,this);const t=this.visualElement.current,n=Ff(t,"pointerdown",c=>{const{drag:d,dragListener:m=!0}=this.getProps();d&&m&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();ju(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),vt.read(r);const l=nd(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(oi(m=>{const h=this.getAxisMotionValue(m);h&&(this.originPoint[m]+=c[m].translate,h.set(h.get()+c[m].translate))}),this.visualElement.render())}));return()=>{l(),n(),o(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:l=a1,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function Am(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function IX(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class zX extends fs{constructor(t){super(t),this.removeGroupControls=fi,this.removeListeners=fi,this.controls=new LX(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fi}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const QN=e=>(t,n)=>{e&&vt.postRender(()=>e(t,n))};class BX extends fs{constructor(){super(...arguments),this.removePointerDownListener=fi}onPointerDown(t){this.session=new Iz(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Lz(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:QN(t),onStart:QN(n),onMove:r,onEnd:(o,l)=>{delete this.session,i&&vt.postRender(()=>i(o,l))}}}mount(){this.removePointerDownListener=Ff(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const op={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let D0=!1;class $X extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),D0&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),op.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:l}=r;return l&&(l.isPresent=o,D0=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||vt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),sA.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;D0=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Bz(e){const[t,n]=sz(),r=v.useContext(US);return g.jsx($X,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(bz),isPresent:t,safeToRemove:n})}function UX(e,t,n){const r=an(e)?e:cl(e);return r.start(yA("",r,t,n)),r.animation}const VX=(e,t)=>e.depth-t.depth;class FX{constructor(){this.children=[],this.isDirty=!1}add(t){HS(this.children,t),this.isDirty=!0}remove(t){qS(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(VX),this.isDirty=!1,this.children.forEach(t)}}function HX(e,t){const n=yr.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ro(r),e(o-t))};return vt.setup(r,!0),()=>ro(r)}const $z=["TopLeft","TopRight","BottomLeft","BottomRight"],qX=$z.length,JN=e=>typeof e=="string"?parseFloat(e):e,e_=e=>typeof e=="number"||be.test(e);function KX(e,t,n,r,i,o){i?(e.opacity=kt(0,n.opacity??1,GX(r)),e.opacityExit=kt(t.opacity??1,0,YX(r))):o&&(e.opacity=kt(t.opacity??1,n.opacity??1,r));for(let l=0;l<qX;l++){const u=`border${$z[l]}Radius`;let c=t_(t,u),d=t_(n,u);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||e_(c)===e_(d)?(e[u]=Math.max(kt(JN(c),JN(d),r),0),(oa.test(d)||oa.test(c))&&(e[u]+="%")):e[u]=d}(t.rotate||n.rotate)&&(e.rotate=kt(t.rotate||0,n.rotate||0,r))}function t_(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const GX=Uz(0,.5,EI),YX=Uz(.5,.95,fi);function Uz(e,t,n){return r=>r<e?0:r>t?1:n(Qf(e,t,r))}function n_(e,t){e.min=t.min,e.max=t.max}function Si(e,t){n_(e.x,t.x),n_(e.y,t.y)}function r_(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function i_(e,t,n,r,i){return e-=t,e=Op(e,1/n,r),i!==void 0&&(e=Op(e,1/i,r)),e}function WX(e,t=0,n=1,r=.5,i,o=e,l=e){if(oa.test(t)&&(t=parseFloat(t),t=kt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=kt(o.min,o.max,r);e===o&&(u-=t),e.min=i_(e.min,t,n,u,i),e.max=i_(e.max,t,n,u,i)}function a_(e,t,[n,r,i],o,l){WX(e,t[n],t[r],t[i],t.scale,o,l)}const XX=["x","scaleX","originX"],ZX=["y","scaleY","originY"];function o_(e,t,n,r){a_(e.x,t,XX,n?n.x:void 0,r?r.x:void 0),a_(e.y,t,ZX,n?n.y:void 0,r?r.y:void 0)}function s_(e){return e.translate===0&&e.scale===1}function Vz(e){return s_(e.x)&&s_(e.y)}function l_(e,t){return e.min===t.min&&e.max===t.max}function QX(e,t){return l_(e.x,t.x)&&l_(e.y,t.y)}function u_(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Fz(e,t){return u_(e.x,t.x)&&u_(e.y,t.y)}function c_(e){return tr(e.x)/tr(e.y)}function f_(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class JX{constructor(){this.members=[]}add(t){HS(this.members,t),t.scheduleRender()}remove(t){if(qS(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function eZ(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,l=n?.z||0;if((i||o||l)&&(r=`translate3d(${i}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:m,rotateX:h,rotateY:y,skewX:b,skewY:w}=n;d&&(r=`perspective(${d}px) ${r}`),m&&(r+=`rotate(${m}deg) `),h&&(r+=`rotateX(${h}deg) `),y&&(r+=`rotateY(${y}deg) `),b&&(r+=`skewX(${b}deg) `),w&&(r+=`skewY(${w}deg) `)}const u=e.x.scale*t.x,c=e.y.scale*t.y;return(u!==1||c!==1)&&(r+=`scale(${u}, ${c})`),r||"none"}const k0=["","X","Y","Z"],tZ=1e3;let nZ=0;function L0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Hz(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Pz(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",vt,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Hz(r)}function qz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(l={},u=t?.()){this.id=nZ++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(aZ),this.nodes.forEach(uZ),this.nodes.forEach(cZ),this.nodes.forEach(oZ)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new FX)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new YS),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const c=this.eventHandlers.get(l);c&&c.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=oz(l)&&!KY(l),this.instance=l;const{layoutId:u,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||u)&&(this.isLayoutDirty=!0),e){let m,h=0;const y=()=>this.root.updateBlockedByResize=!1;vt.read(()=>{h=window.innerWidth}),e(l,()=>{const b=window.innerWidth;b!==h&&(h=b,this.root.updateBlockedByResize=!0,m&&m(),m=HX(y,250),op.hasAnimatedSinceResize&&(op.hasAnimatedSinceResize=!1,this.nodes.forEach(m_)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&d&&(u||c)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:h,hasRelativeLayoutChanged:y,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||d.getDefaultTransition()||pZ,{onLayoutAnimationStart:A,onLayoutAnimationComplete:E}=d.getProps(),C=!this.targetLayout||!Fz(this.targetLayout,b),j=!h&&y;if(this.options.layoutRoot||this.resumeFrom||j||h&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...aA(w,"layout"),onPlay:A,onComplete:E};(d.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(m,j)}else h||m_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ro(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(fZ),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Hz(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const h=this.path[m];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:u,layout:c}=this.options;if(u===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(d_);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(h_);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(lZ),this.nodes.forEach(rZ),this.nodes.forEach(iZ)):this.nodes.forEach(h_),this.clearAllSnapshots();const u=yr.now();_n.delta=to(0,1e3/60,u-_n.timestamp),_n.timestamp=u,_n.isProcessing=!0,E0.update.process(_n),E0.preRender.process(_n),E0.render.process(_n),_n.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,sA.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(sZ),this.sharedNodes.forEach(dZ)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,vt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){vt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!tr(this.snapshot.measuredBox.x)&&!tr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=hn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!Vz(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,m=d!==this.prevTransformTemplateValue;l&&this.instance&&(u||Us(this.latestValues)||m)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let c=this.removeElementScroll(u);return l&&(c=this.removeTransform(c)),gZ(c),{animationId:this.root.animationId,measuredBox:u,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return hn();const u=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(vZ))){const{scroll:d}=this.root;d&&(Tu(u.x,d.offset.x),Tu(u.y,d.offset.y))}return u}removeElementScroll(l){const u=hn();if(Si(u,l),this.scroll?.wasRoot)return u;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:m,options:h}=d;d!==this.root&&m&&h.layoutScroll&&(m.wasRoot&&Si(u,l),Tu(u.x,m.offset.x),Tu(u.y,m.offset.y))}return u}applyTransform(l,u=!1){const c=hn();Si(c,l);for(let d=0;d<this.path.length;d++){const m=this.path[d];!u&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Ou(c,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),Us(m.latestValues)&&Ou(c,m.latestValues)}return Us(this.latestValues)&&Ou(c,this.latestValues),c}removeTransform(l){const u=hn();Si(u,l);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!Us(d.latestValues))continue;Jw(d.latestValues)&&d.updateSnapshot();const m=hn(),h=d.measurePageBox();Si(m,h),o_(u,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,m)}return Us(this.latestValues)&&o_(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==_n.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==u;if(!(l||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:h}=this.options;if(!this.layout||!(m||h))return;this.resolvedRelativeTargetAt=_n.timestamp;const y=this.getClosestProjectingParent();y&&this.linkedParentVersion!==y.layoutVersion&&!y.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(y&&y.layout?this.createRelativeTarget(y,this.layout.layoutBox,y.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=hn(),this.targetWithTransforms=hn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),CX(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Si(this.target,this.layout.layoutBox),Az(this.target,this.targetDelta)):Si(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?this.createRelativeTarget(y,this.target,y.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Jw(this.parent.latestValues)||Sz(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,u,c){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=hn(),this.relativeTargetOrigin=hn(),Pp(this.relativeTargetOrigin,u,c),Si(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const l=this.getLead(),u=!!this.resumingFrom||this!==l;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===_n.timestamp&&(c=!1),c)return;const{layout:d,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||m))return;Si(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,y=this.treeScale.y;IW(this.layoutCorrected,this.treeScale,this.path,u),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=hn());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(r_(this.prevProjectionDelta.x,this.projectionDelta.x),r_(this.prevProjectionDelta.y,this.projectionDelta.y)),Hf(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==y||!f_(this.projectionDelta.x,this.prevProjectionDelta.x)||!f_(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pu(),this.projectionDelta=Pu(),this.projectionDeltaWithTransform=Pu()}setAnimationOrigin(l,u=!1){const c=this.snapshot,d=c?c.latestValues:{},m={...this.latestValues},h=Pu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const y=hn(),b=c?c.source:void 0,w=this.layout?this.layout.source:void 0,A=b!==w,E=this.getStack(),C=!E||E.members.length<=1,j=!!(A&&!C&&this.options.crossfade===!0&&!this.path.some(mZ));this.animationProgress=0;let T;this.mixTargetDelta=O=>{const N=O/1e3;p_(h.x,l.x,N),p_(h.y,l.y,N),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pp(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox),hZ(this.relativeTarget,this.relativeTargetOrigin,y,N),T&&QX(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=hn()),Si(T,this.relativeTarget)),A&&(this.animationValues=m,KX(m,d,this.latestValues,N,j,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ro(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=vt.update(()=>{op.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=cl(0)),this.currentAnimation=UX(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),l.onUpdate&&l.onUpdate(u)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(tZ),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:c,layout:d,latestValues:m}=l;if(!(!u||!c||!d)){if(this!==l&&this.layout&&d&&Kz(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||hn();const h=tr(this.layout.layoutBox.x);c.x.min=l.target.x.min,c.x.max=c.x.min+h;const y=tr(this.layout.layoutBox.y);c.y.min=l.target.y.min,c.y.max=c.y.min+y}Si(u,c),Ou(u,m),Hf(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new JX),this.sharedNodes.get(l).add(u);const d=u.options.initialPromotionConfig;u.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){const{layoutId:l}=this.options;return l?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:l}=this.options;return l?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:c}=l;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(u=!0),!u)return;const d={};c.z&&L0("z",l,d,this.animationValues);for(let m=0;m<k0.length;m++)L0(`rotate${k0[m]}`,l,d,this.animationValues),L0(`skew${k0[m]}`,l,d,this.animationValues);l.render();for(const m in d)l.setStaticValue(m,d[m]),this.animationValues&&(this.animationValues[m]=d[m]);l.scheduleRender()}applyProjectionStyles(l,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=ap(u?.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=ap(u?.pointerEvents)||""),this.hasProjected&&!Us(this.latestValues)&&(l.transform=c?c({},""):"none",this.hasProjected=!1);return}l.visibility="";const m=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=eZ(this.projectionDeltaWithTransform,this.treeScale,m);c&&(h=c(m,h)),l.transform=h;const{x:y,y:b}=this.projectionDelta;l.transformOrigin=`${y.origin*100}% ${b.origin*100}% 0`,d.animationValues?l.opacity=d===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:l.opacity=d===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const w in Qw){if(m[w]===void 0)continue;const{correct:A,applyTo:E,isCSSVariable:C}=Qw[w],j=h==="none"?m[w]:A(m[w],d);if(E){const T=E.length;for(let O=0;O<T;O++)l[E[O]]=j}else C?this.options.visualElement.renderState.vars[w]=j:l[w]=j}this.options.layoutId&&(l.pointerEvents=d===this?ap(u?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(d_),this.root.sharedNodes.clear()}}}function rZ(e){e.updateLayout()}function iZ(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?oi(m=>{const h=o?t.measuredBox[m]:t.layoutBox[m],y=tr(h);h.min=n[m].min,h.max=h.min+y}):Kz(i,t.layoutBox,n)&&oi(m=>{const h=o?t.measuredBox[m]:t.layoutBox[m],y=tr(n[m]);h.max=h.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+y)});const l=Pu();Hf(l,n,t.layoutBox);const u=Pu();o?Hf(u,e.applyTransform(r,!0),t.measuredBox):Hf(u,n,t.layoutBox);const c=!Vz(l);let d=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:h,layout:y}=m;if(h&&y){const b=hn();Pp(b,t.layoutBox,h.layoutBox);const w=hn();Pp(w,n,y.layoutBox),Fz(b,w)||(d=!0),m.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=b,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function aZ(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function oZ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function sZ(e){e.clearSnapshot()}function d_(e){e.clearMeasurements()}function h_(e){e.isLayoutDirty=!1}function lZ(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function m_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function uZ(e){e.resolveTargetDelta()}function cZ(e){e.calcProjection()}function fZ(e){e.resetSkewAndRotation()}function dZ(e){e.removeLeadSnapshot()}function p_(e,t,n){e.translate=kt(t.translate,0,n),e.scale=kt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function g_(e,t,n,r){e.min=kt(t.min,n.min,r),e.max=kt(t.max,n.max,r)}function hZ(e,t,n,r){g_(e.x,t.x,n.x,r),g_(e.y,t.y,n.y,r)}function mZ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const pZ={duration:.45,ease:[.4,0,.1,1]},v_=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),y_=v_("applewebkit/")&&!v_("chrome/")?Math.round:fi;function b_(e){e.min=y_(e.min),e.max=y_(e.max)}function gZ(e){b_(e.x),b_(e.y)}function Kz(e,t,n){return e==="position"||e==="preserve-aspect"&&!EX(c_(t),c_(n),.2)}function vZ(e){return e!==e.root&&e.scroll?.wasRoot}const yZ=qz({attachResizeListener:(e,t)=>nd(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),I0={current:void 0},Gz=qz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!I0.current){const e=new yZ({});e.mount(window),e.setOptions({layoutScroll:!0}),I0.current=e}return I0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),bZ={pan:{Feature:BX},drag:{Feature:zX,ProjectionNode:Gz,MeasureLayout:Bz}};function x_(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&vt.postRender(()=>o(t,Dd(t)))}class xZ extends fs{mount(){const{current:t}=this.node;t&&(this.unmount=UY(t,(n,r)=>(x_(this.node,r,"Start"),i=>x_(this.node,i,"End"))))}unmount(){}}class wZ extends fs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Nd(nd(this.node.current,"focus",()=>this.onFocus()),nd(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function w_(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&vt.postRender(()=>o(t,Dd(t)))}class SZ extends fs{mount(){const{current:t}=this.node;t&&(this.unmount=qY(t,(n,r)=>(w_(this.node,r,"Start"),(i,{success:o})=>w_(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const o1=new WeakMap,z0=new WeakMap,AZ=e=>{const t=o1.get(e.target);t&&t(e)},EZ=e=>{e.forEach(AZ)};function CZ({root:e,...t}){const n=e||document;z0.has(n)||z0.set(n,{});const r=z0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(EZ,{root:e,...t})),r[i]}function jZ(e,t,n){const r=CZ(t);return o1.set(e,n),r.observe(e),()=>{o1.delete(e),r.unobserve(e)}}const TZ={some:0,all:1};class OZ extends fs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:TZ[i]},u=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:m,onViewportLeave:h}=this.node.getProps(),y=d?m:h;y&&y(c)};return jZ(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(PZ(t,n))&&this.startObserver()}unmount(){}}function PZ({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const NZ={inView:{Feature:OZ},tap:{Feature:SZ},focus:{Feature:wZ},hover:{Feature:xZ}},_Z={layout:{ProjectionNode:Gz,MeasureLayout:Bz}},MZ={...yX,...NZ,...bZ,..._Z},io=DW(MZ,GW);function rd(e){const t=Pd(()=>cl(e)),{isStatic:n}=v.useContext(Rd);if(n){const[,r]=v.useState(e);v.useEffect(()=>t.on("change",r),[])}return t}function bA(e,t){const n=rd(t()),r=()=>n.set(t());return r(),FS(()=>{const i=()=>vt.preRender(r,!1,!0),o=e.map(l=>l.on("change",i));return()=>{o.forEach(l=>l()),ro(r)}}),n}function S_(e,...t){const n=e.length;function r(){let i="";for(let o=0;o<n;o++){i+=e[o];const l=t[o];l&&(i+=an(l)?l.get():l)}return i}return bA(t.filter(an),r)}function RZ(e){Vf.current=[],e();const t=bA(Vf.current,e);return Vf.current=void 0,t}function Yz(e,t,n,r){if(typeof e=="function")return RZ(e);const i=typeof t=="function"?t:GY(t,n,r);return Array.isArray(e)?A_(e,i):A_([e],([o])=>i(o))}function A_(e,t){const n=Pd(()=>[]);return bA(e,()=>{n.length=0;const r=e.length;for(let i=0;i<r;i++)n[i]=e[i].get();return t(n)})}function Wz(e,t={}){const{isStatic:n}=v.useContext(Rd),r=()=>an(e)?e.get():e;if(n)return Yz(r);const i=rd(r());return v.useInsertionEffect(()=>YY(i,e,t),[i,JSON.stringify(t)]),i}const DZ={some:0,all:1};function kZ(e,t,{root:n,margin:r,amount:i="some"}={}){const o=ez(e),l=new WeakMap,u=d=>{d.forEach(m=>{const h=l.get(m.target);if(m.isIntersecting!==!!h)if(m.isIntersecting){const y=t(m.target,m);typeof y=="function"?l.set(m.target,y):c.unobserve(m.target)}else typeof h=="function"&&(h(m),l.delete(m.target))})},c=new IntersectionObserver(u,{root:n,rootMargin:r,threshold:typeof i=="number"?i:DZ[i]});return o.forEach(d=>c.observe(d)),()=>c.disconnect()}function LZ(e,{root:t,margin:n,amount:r,once:i=!1,initial:o=!1}={}){const[l,u]=v.useState(o);return v.useEffect(()=>{if(!e.current||i&&l)return;const c=()=>(u(!0),i?void 0:()=>u(!1)),d={root:t&&t.current||void 0,margin:n,amount:r};return kZ(e.current,c,d)},[t,e,n,i,r]),l}const IZ=({id:e,x:t,y:n,color:r,delay:i,scale:o})=>g.jsx(io.svg,{className:"pointer-events-none absolute z-20",initial:{opacity:0,left:t,top:n},animate:{opacity:[0,1,0],scale:[0,o,0],rotate:[75,120,150]},transition:{duration:.8,repeat:1/0,delay:i},width:"21",height:"21",viewBox:"0 0 21 21",children:g.jsx("path",{d:"M9.82531 0.843845C10.0553 0.215178 10.9446 0.215178 11.1746 0.843845L11.8618 2.72026C12.4006 4.19229 12.3916 6.39157 13.5 7.5C14.6084 8.60843 16.8077 8.59935 18.2797 9.13822L20.1561 9.82534C20.7858 10.0553 20.7858 10.9447 20.1561 11.1747L18.2797 11.8618C16.8077 12.4007 14.6084 12.3916 13.5 13.5C12.3916 14.6084 12.4006 16.8077 11.8618 18.2798L11.1746 20.1562C10.9446 20.7858 10.0553 20.7858 9.82531 20.1562L9.13819 18.2798C8.59932 16.8077 8.60843 14.6084 7.5 13.5C6.39157 12.3916 4.19225 12.4007 2.72023 11.8618L0.843814 11.1747C0.215148 10.9447 0.215148 10.0553 0.843814 9.82534L2.72023 9.13822C4.19225 8.59935 6.39157 8.60843 7.5 7.5C8.60843 6.39157 8.59932 4.19229 9.13819 2.72026L9.82531 0.843845Z",fill:r})},e),E_=({children:e,colors:t={first:"#9E7AFF",second:"#FE8BBB"},className:n,sparklesCount:r=10,...i})=>{const[o,l]=v.useState([]);return v.useEffect(()=>{const u=()=>{const h=`${Math.random()*100}%`,y=`${Math.random()*100}%`,b=Math.random()>.5?t.first:t.second,w=Math.random()*2,A=Math.random()*1+.3,E=Math.random()*10+5;return{id:`${h}-${y}-${Date.now()}`,x:h,y,color:b,delay:w,scale:A,lifespan:E}},c=()=>{const h=Array.from({length:r},u);l(h)},d=()=>{l(h=>h.map(y=>y.lifespan<=0?u():{...y,lifespan:y.lifespan-.1}))};c();const m=setInterval(d,100);return()=>clearInterval(m)},[t.first,t.second,r]),g.jsx("div",{className:me("font-bold",n),...i,style:{"--sparkles-first-color":`${t.first}`,"--sparkles-second-color":`${t.second}`},children:g.jsxs("span",{className:"relative inline-block",children:[o.map(u=>g.jsx(IZ,{...u},u.id)),g.jsx("strong",{children:e})]})})};function Ve(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function zZ(e,t){const n=v.createContext(t),r=o=>{const{children:l,...u}=o,c=v.useMemo(()=>u,Object.values(u));return g.jsx(n.Provider,{value:c,children:l})};r.displayName=e+"Provider";function i(o){const l=v.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function El(e,t=[]){let n=[];function r(o,l){const u=v.createContext(l),c=n.length;n=[...n,l];const d=h=>{const{scope:y,children:b,...w}=h,A=y?.[e]?.[c]||u,E=v.useMemo(()=>w,Object.values(w));return g.jsx(A.Provider,{value:E,children:b})};d.displayName=o+"Provider";function m(h,y){const b=y?.[e]?.[c]||u,w=v.useContext(b);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,m]}const i=()=>{const o=n.map(l=>v.createContext(l));return function(u){const c=u?.[e]||o;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return i.scopeName=e,[r,BZ(i,...t)]}function BZ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((u,{useScope:c,scopeName:d})=>{const h=c(o)[`__scope${d}`];return{...u,...h}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Kn=globalThis?.document?v.useLayoutEffect:()=>{},$Z=Mg[" useId ".trim().toString()]||(()=>{}),UZ=0;function Qa(e){const[t,n]=v.useState($Z());return Kn(()=>{n(r=>r??String(UZ++))},[e]),t?`radix-${t}`:""}var VZ=Mg[" useInsertionEffect ".trim().toString()]||Kn;function Vu({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=FZ({defaultProp:t,onChange:n}),u=e!==void 0,c=u?e:i;{const m=v.useRef(e!==void 0);v.useEffect(()=>{const h=m.current;h!==u&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,r])}const d=v.useCallback(m=>{if(u){const h=HZ(m)?m(e):m;h!==e&&l.current?.(h)}else o(m)},[u,e,o,l]);return[c,d]}function FZ({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),i=v.useRef(n),o=v.useRef(t);return VZ(()=>{o.current=t},[t]),v.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function HZ(e){return typeof e=="function"}function qZ(e){const t=KZ(e),n=v.forwardRef((r,i)=>{const{children:o,...l}=r,u=v.Children.toArray(o),c=u.find(YZ);if(c){const d=c.props.children,m=u.map(h=>h===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:h);return g.jsx(t,{...l,ref:i,children:v.isValidElement(d)?v.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function KZ(e){const t=v.forwardRef((n,r)=>{const{children:i,...o}=n;if(v.isValidElement(i)){const l=XZ(i),u=WZ(o,i.props);return i.type!==v.Fragment&&(u.ref=r?ic(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var GZ=Symbol("radix.slottable");function YZ(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===GZ}function WZ(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function XZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qe=ZZ.reduce((e,t)=>{const n=qZ(`Primitive.${t}`),r=v.forwardRef((i,o)=>{const{asChild:l,...u}=i,c=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function QZ(e,t){e&&cs.flushSync(()=>e.dispatchEvent(t))}function as(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>t.current?.(...n),[])}function JZ(e,t=globalThis?.document){const n=as(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var eQ="DismissableLayer",s1="dismissableLayer.update",tQ="dismissableLayer.pointerDownOutside",nQ="dismissableLayer.focusOutside",C_,Xz=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vg=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...c}=e,d=v.useContext(Xz),[m,h]=v.useState(null),y=m?.ownerDocument??globalThis?.document,[,b]=v.useState({}),w=_t(t,M=>h(M)),A=Array.from(d.layers),[E]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),C=A.indexOf(E),j=m?A.indexOf(m):-1,T=d.layersWithOutsidePointerEventsDisabled.size>0,O=j>=C,N=aQ(M=>{const R=M.target,B=[...d.branches].some(V=>V.contains(R));!O||B||(i?.(M),l?.(M),M.defaultPrevented||u?.())},y),_=oQ(M=>{const R=M.target;[...d.branches].some(V=>V.contains(R))||(o?.(M),l?.(M),M.defaultPrevented||u?.())},y);return JZ(M=>{j===d.layers.size-1&&(r?.(M),!M.defaultPrevented&&u&&(M.preventDefault(),u()))},y),v.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(C_=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),j_(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=C_)}},[m,y,n,d]),v.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),j_())},[m,d]),v.useEffect(()=>{const M=()=>b({});return document.addEventListener(s1,M),()=>document.removeEventListener(s1,M)},[]),g.jsx(Qe.div,{...c,ref:w,style:{pointerEvents:T?O?"auto":"none":void 0,...e.style},onFocusCapture:Ve(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ve(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ve(e.onPointerDownCapture,N.onPointerDownCapture)})});Vg.displayName=eQ;var rQ="DismissableLayerBranch",iQ=v.forwardRef((e,t)=>{const n=v.useContext(Xz),r=v.useRef(null),i=_t(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),g.jsx(Qe.div,{...e,ref:i})});iQ.displayName=rQ;function aQ(e,t=globalThis?.document){const n=as(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let c=function(){Zz(tQ,n,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function oQ(e,t=globalThis?.document){const n=as(e),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&Zz(nQ,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function j_(){const e=new CustomEvent(s1);document.dispatchEvent(e)}function Zz(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?QZ(i,o):i.dispatchEvent(o)}var B0="focusScope.autoFocusOnMount",$0="focusScope.autoFocusOnUnmount",T_={bubbles:!1,cancelable:!0},sQ="FocusScope",xA=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[u,c]=v.useState(null),d=as(i),m=as(o),h=v.useRef(null),y=_t(t,A=>c(A)),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let A=function(T){if(b.paused||!u)return;const O=T.target;u.contains(O)?h.current=O:Xo(h.current,{select:!0})},E=function(T){if(b.paused||!u)return;const O=T.relatedTarget;O!==null&&(u.contains(O)||Xo(h.current,{select:!0}))},C=function(T){if(document.activeElement===document.body)for(const N of T)N.removedNodes.length>0&&Xo(u)};document.addEventListener("focusin",A),document.addEventListener("focusout",E);const j=new MutationObserver(C);return u&&j.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",A),document.removeEventListener("focusout",E),j.disconnect()}}},[r,u,b.paused]),v.useEffect(()=>{if(u){P_.add(b);const A=document.activeElement;if(!u.contains(A)){const C=new CustomEvent(B0,T_);u.addEventListener(B0,d),u.dispatchEvent(C),C.defaultPrevented||(lQ(hQ(Qz(u)),{select:!0}),document.activeElement===A&&Xo(u))}return()=>{u.removeEventListener(B0,d),setTimeout(()=>{const C=new CustomEvent($0,T_);u.addEventListener($0,m),u.dispatchEvent(C),C.defaultPrevented||Xo(A??document.body,{select:!0}),u.removeEventListener($0,m),P_.remove(b)},0)}}},[u,d,m,b]);const w=v.useCallback(A=>{if(!n&&!r||b.paused)return;const E=A.key==="Tab"&&!A.altKey&&!A.ctrlKey&&!A.metaKey,C=document.activeElement;if(E&&C){const j=A.currentTarget,[T,O]=uQ(j);T&&O?!A.shiftKey&&C===O?(A.preventDefault(),n&&Xo(T,{select:!0})):A.shiftKey&&C===T&&(A.preventDefault(),n&&Xo(O,{select:!0})):C===j&&A.preventDefault()}},[n,r,b.paused]);return g.jsx(Qe.div,{tabIndex:-1,...l,ref:y,onKeyDown:w})});xA.displayName=sQ;function lQ(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Xo(r,{select:t}),document.activeElement!==n)return}function uQ(e){const t=Qz(e),n=O_(t,e),r=O_(t.reverse(),e);return[n,r]}function Qz(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function O_(e,t){for(const n of e)if(!cQ(n,{upTo:t}))return n}function cQ(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fQ(e){return e instanceof HTMLInputElement&&"select"in e}function Xo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fQ(e)&&t&&e.select()}}var P_=dQ();function dQ(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=N_(e,t),e.unshift(t)},remove(t){e=N_(e,t),e[0]?.resume()}}}function N_(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function hQ(e){return e.filter(t=>t.tagName!=="A")}var mQ="Portal",Fg=v.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=v.useState(!1);Kn(()=>o(!0),[]);const l=n||i&&globalThis?.document?.body;return l?ML.createPortal(g.jsx(Qe.div,{...r,ref:t}),l):null});Fg.displayName=mQ;function pQ(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Cl=e=>{const{present:t,children:n}=e,r=gQ(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=_t(r.ref,vQ(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};Cl.displayName="Presence";function gQ(e){const[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),o=v.useRef("none"),l=e?"mounted":"unmounted",[u,c]=pQ(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const d=Em(r.current);o.current=u==="mounted"?d:"none"},[u]),Kn(()=>{const d=r.current,m=i.current;if(m!==e){const y=o.current,b=Em(d);e?c("MOUNT"):b==="none"||d?.display==="none"?c("UNMOUNT"):c(m&&y!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Kn(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,h=b=>{const A=Em(r.current).includes(CSS.escape(b.animationName));if(b.target===t&&A&&(c("ANIMATION_END"),!i.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},y=b=>{b.target===t&&(o.current=Em(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:v.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Em(e){return e?.animationName||"none"}function vQ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var U0=0;function Jz(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??__()),document.body.insertAdjacentElement("beforeend",e[1]??__()),U0++,()=>{U0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),U0--}},[])}function __(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ji=function(){return Ji=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ji.apply(this,arguments)};function e3(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function yQ(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var sp="right-scroll-bar-position",lp="width-before-scroll-bar",bQ="with-scroll-bars-hidden",xQ="--removed-body-scroll-bar-size";function V0(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wQ(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var SQ=typeof window<"u"?v.useLayoutEffect:v.useEffect,M_=new WeakMap;function AQ(e,t){var n=wQ(null,function(r){return e.forEach(function(i){return V0(i,r)})});return SQ(function(){var r=M_.get(n);if(r){var i=new Set(r),o=new Set(e),l=n.current;i.forEach(function(u){o.has(u)||V0(u,null)}),o.forEach(function(u){i.has(u)||V0(u,l)})}M_.set(n,e)},[e]),n}function EQ(e){return e}function CQ(e,t){t===void 0&&(t=EQ);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var c=function(){var m=l;l=[],m.forEach(o)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(m){l.push(m),d()},filter:function(m){return l=l.filter(m),n}}}};return i}function jQ(e){e===void 0&&(e={});var t=CQ(null);return t.options=Ji({async:!0,ssr:!1},e),t}var t3=function(e){var t=e.sideCar,n=e3(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Ji({},n))};t3.isSideCarExport=!0;function TQ(e,t){return e.useMedium(t),t3}var n3=jQ(),F0=function(){},Hg=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:F0,onWheelCapture:F0,onTouchMoveCapture:F0}),i=r[0],o=r[1],l=e.forwardProps,u=e.children,c=e.className,d=e.removeScrollBar,m=e.enabled,h=e.shards,y=e.sideCar,b=e.noRelative,w=e.noIsolation,A=e.inert,E=e.allowPinchZoom,C=e.as,j=C===void 0?"div":C,T=e.gapMode,O=e3(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=y,_=AQ([n,t]),M=Ji(Ji({},O),i);return v.createElement(v.Fragment,null,m&&v.createElement(N,{sideCar:n3,removeScrollBar:d,shards:h,noRelative:b,noIsolation:w,inert:A,setCallbacks:o,allowPinchZoom:!!E,lockRef:n,gapMode:T}),l?v.cloneElement(v.Children.only(u),Ji(Ji({},M),{ref:_})):v.createElement(j,Ji({},M,{className:c,ref:_}),u))});Hg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Hg.classNames={fullWidth:lp,zeroRight:sp};var OQ=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function PQ(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=OQ();return t&&e.setAttribute("nonce",t),e}function NQ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _Q(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var MQ=function(){var e=0,t=null;return{add:function(n){e==0&&(t=PQ())&&(NQ(t,n),_Q(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},RQ=function(){var e=MQ();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},r3=function(){var e=RQ(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},DQ={left:0,top:0,right:0,gap:0},H0=function(e){return parseInt(e||"",10)||0},kQ=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[H0(n),H0(r),H0(i)]},LQ=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return DQ;var t=kQ(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},IQ=r3(),ku="data-scroll-locked",zQ=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
20
|
-
.`.concat(bQ,` {
|
|
21
|
-
overflow: hidden `).concat(r,`;
|
|
22
|
-
padding-right: `).concat(u,"px ").concat(r,`;
|
|
23
|
-
}
|
|
24
|
-
body[`).concat(ku,`] {
|
|
25
|
-
overflow: hidden `).concat(r,`;
|
|
26
|
-
overscroll-behavior: contain;
|
|
27
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
28
|
-
padding-left: `.concat(i,`px;
|
|
29
|
-
padding-top: `).concat(o,`px;
|
|
30
|
-
padding-right: `).concat(l,`px;
|
|
31
|
-
margin-left:0;
|
|
32
|
-
margin-top:0;
|
|
33
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
34
|
-
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.`).concat(sp,` {
|
|
38
|
-
right: `).concat(u,"px ").concat(r,`;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.`).concat(lp,` {
|
|
42
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.`).concat(sp," .").concat(sp,` {
|
|
46
|
-
right: 0 `).concat(r,`;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.`).concat(lp," .").concat(lp,` {
|
|
50
|
-
margin-right: 0 `).concat(r,`;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
body[`).concat(ku,`] {
|
|
54
|
-
`).concat(xQ,": ").concat(u,`px;
|
|
55
|
-
}
|
|
56
|
-
`)},R_=function(){var e=parseInt(document.body.getAttribute(ku)||"0",10);return isFinite(e)?e:0},BQ=function(){v.useEffect(function(){return document.body.setAttribute(ku,(R_()+1).toString()),function(){var e=R_()-1;e<=0?document.body.removeAttribute(ku):document.body.setAttribute(ku,e.toString())}},[])},$Q=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;BQ();var o=v.useMemo(function(){return LQ(i)},[i]);return v.createElement(IQ,{styles:zQ(o,!t,i,n?"":"!important")})},l1=!1;if(typeof window<"u")try{var Cm=Object.defineProperty({},"passive",{get:function(){return l1=!0,!0}});window.addEventListener("test",Cm,Cm),window.removeEventListener("test",Cm,Cm)}catch{l1=!1}var du=l1?{passive:!1}:!1,UQ=function(e){return e.tagName==="TEXTAREA"},i3=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!UQ(e)&&n[t]==="visible")},VQ=function(e){return i3(e,"overflowY")},FQ=function(e){return i3(e,"overflowX")},D_=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=a3(e,r);if(i){var o=o3(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},HQ=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},qQ=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},a3=function(e,t){return e==="v"?VQ(t):FQ(t)},o3=function(e,t){return e==="v"?HQ(t):qQ(t)},KQ=function(e,t){return e==="h"&&t==="rtl"?-1:1},GQ=function(e,t,n,r,i){var o=KQ(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,c=t.contains(u),d=!1,m=l>0,h=0,y=0;do{if(!u)break;var b=o3(e,u),w=b[0],A=b[1],E=b[2],C=A-E-o*w;(w||C)&&a3(e,u)&&(h+=C,y+=w);var j=u.parentNode;u=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return(m&&Math.abs(h)<1||!m&&Math.abs(y)<1)&&(d=!0),d},jm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},k_=function(e){return[e.deltaX,e.deltaY]},L_=function(e){return e&&"current"in e?e.current:e},YQ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},WQ=function(e){return`
|
|
57
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
58
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
59
|
-
`)},XQ=0,hu=[];function ZQ(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(XQ++)[0],o=v.useState(r3)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var A=yQ([e.lockRef.current],(e.shards||[]).map(L_),!0).filter(Boolean);return A.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),A.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=v.useCallback(function(A,E){if("touches"in A&&A.touches.length===2||A.type==="wheel"&&A.ctrlKey)return!l.current.allowPinchZoom;var C=jm(A),j=n.current,T="deltaX"in A?A.deltaX:j[0]-C[0],O="deltaY"in A?A.deltaY:j[1]-C[1],N,_=A.target,M=Math.abs(T)>Math.abs(O)?"h":"v";if("touches"in A&&M==="h"&&_.type==="range")return!1;var R=window.getSelection(),B=R&&R.anchorNode,V=B?B===_||B.contains(_):!1;if(V)return!1;var H=D_(M,_);if(!H)return!0;if(H?N=M:(N=M==="v"?"h":"v",H=D_(M,_)),!H)return!1;if(!r.current&&"changedTouches"in A&&(T||O)&&(r.current=N),!N)return!0;var z=r.current||N;return GQ(z,E,A,z==="h"?T:O)},[]),c=v.useCallback(function(A){var E=A;if(!(!hu.length||hu[hu.length-1]!==o)){var C="deltaY"in E?k_(E):jm(E),j=t.current.filter(function(N){return N.name===E.type&&(N.target===E.target||E.target===N.shadowParent)&&YQ(N.delta,C)})[0];if(j&&j.should){E.cancelable&&E.preventDefault();return}if(!j){var T=(l.current.shards||[]).map(L_).filter(Boolean).filter(function(N){return N.contains(E.target)}),O=T.length>0?u(E,T[0]):!l.current.noIsolation;O&&E.cancelable&&E.preventDefault()}}},[]),d=v.useCallback(function(A,E,C,j){var T={name:A,delta:E,target:C,should:j,shadowParent:QQ(C)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(O){return O!==T})},1)},[]),m=v.useCallback(function(A){n.current=jm(A),r.current=void 0},[]),h=v.useCallback(function(A){d(A.type,k_(A),A.target,u(A,e.lockRef.current))},[]),y=v.useCallback(function(A){d(A.type,jm(A),A.target,u(A,e.lockRef.current))},[]);v.useEffect(function(){return hu.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:y}),document.addEventListener("wheel",c,du),document.addEventListener("touchmove",c,du),document.addEventListener("touchstart",m,du),function(){hu=hu.filter(function(A){return A!==o}),document.removeEventListener("wheel",c,du),document.removeEventListener("touchmove",c,du),document.removeEventListener("touchstart",m,du)}},[]);var b=e.removeScrollBar,w=e.inert;return v.createElement(v.Fragment,null,w?v.createElement(o,{styles:WQ(i)}):null,b?v.createElement($Q,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function QQ(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const JQ=TQ(n3,ZQ);var wA=v.forwardRef(function(e,t){return v.createElement(Hg,Ji({},e,{ref:t,sideCar:JQ}))});wA.classNames=Hg.classNames;var eJ=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},mu=new WeakMap,Tm=new WeakMap,Om={},q0=0,s3=function(e){return e&&(e.host||s3(e.parentNode))},tJ=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=s3(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},nJ=function(e,t,n,r){var i=tJ(t,Array.isArray(e)?e:[e]);Om[n]||(Om[n]=new WeakMap);var o=Om[n],l=[],u=new Set,c=new Set(i),d=function(h){!h||u.has(h)||(u.add(h),d(h.parentNode))};i.forEach(d);var m=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(y){if(u.has(y))m(y);else try{var b=y.getAttribute(r),w=b!==null&&b!=="false",A=(mu.get(y)||0)+1,E=(o.get(y)||0)+1;mu.set(y,A),o.set(y,E),l.push(y),A===1&&w&&Tm.set(y,!0),E===1&&y.setAttribute(n,"true"),w||y.setAttribute(r,"true")}catch(C){console.error("aria-hidden: cannot operate on ",y,C)}})};return m(t),u.clear(),q0++,function(){l.forEach(function(h){var y=mu.get(h)-1,b=o.get(h)-1;mu.set(h,y),o.set(h,b),y||(Tm.has(h)||h.removeAttribute(r),Tm.delete(h)),b||h.removeAttribute(n)}),q0--,q0||(mu=new WeakMap,mu=new WeakMap,Tm=new WeakMap,Om={})}},l3=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=eJ(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),nJ(r,i,n,"aria-hidden")):function(){return null}};function rJ(e){const t=iJ(e),n=v.forwardRef((r,i)=>{const{children:o,...l}=r,u=v.Children.toArray(o),c=u.find(oJ);if(c){const d=c.props.children,m=u.map(h=>h===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:h);return g.jsx(t,{...l,ref:i,children:v.isValidElement(d)?v.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function iJ(e){const t=v.forwardRef((n,r)=>{const{children:i,...o}=n;if(v.isValidElement(i)){const l=lJ(i),u=sJ(o,i.props);return i.type!==v.Fragment&&(u.ref=r?ic(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var aJ=Symbol("radix.slottable");function oJ(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===aJ}function sJ(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function lJ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qg="Dialog",[u3]=El(qg),[uJ,ki]=u3(qg),c3=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,u=v.useRef(null),c=v.useRef(null),[d,m]=Vu({prop:r,defaultProp:i??!1,onChange:o,caller:qg});return g.jsx(uJ,{scope:t,triggerRef:u,contentRef:c,contentId:Qa(),titleId:Qa(),descriptionId:Qa(),open:d,onOpenChange:m,onOpenToggle:v.useCallback(()=>m(h=>!h),[m]),modal:l,children:n})};c3.displayName=qg;var f3="DialogTrigger",d3=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ki(f3,n),o=_t(t,i.triggerRef);return g.jsx(Qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":EA(i.open),...r,ref:o,onClick:Ve(e.onClick,i.onOpenToggle)})});d3.displayName=f3;var SA="DialogPortal",[cJ,h3]=u3(SA,{forceMount:void 0}),m3=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=ki(SA,t);return g.jsx(cJ,{scope:t,forceMount:n,children:v.Children.map(r,l=>g.jsx(Cl,{present:n||o.open,children:g.jsx(Fg,{asChild:!0,container:i,children:l})}))})};m3.displayName=SA;var Np="DialogOverlay",p3=v.forwardRef((e,t)=>{const n=h3(Np,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ki(Np,e.__scopeDialog);return o.modal?g.jsx(Cl,{present:r||o.open,children:g.jsx(dJ,{...i,ref:t})}):null});p3.displayName=Np;var fJ=rJ("DialogOverlay.RemoveScroll"),dJ=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ki(Np,n);return g.jsx(wA,{as:fJ,allowPinchZoom:!0,shards:[i.contentRef],children:g.jsx(Qe.div,{"data-state":EA(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),fl="DialogContent",g3=v.forwardRef((e,t)=>{const n=h3(fl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ki(fl,e.__scopeDialog);return g.jsx(Cl,{present:r||o.open,children:o.modal?g.jsx(hJ,{...i,ref:t}):g.jsx(mJ,{...i,ref:t})})});g3.displayName=fl;var hJ=v.forwardRef((e,t)=>{const n=ki(fl,e.__scopeDialog),r=v.useRef(null),i=_t(t,n.contentRef,r);return v.useEffect(()=>{const o=r.current;if(o)return l3(o)},[]),g.jsx(v3,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ve(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ve(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:Ve(e.onFocusOutside,o=>o.preventDefault())})}),mJ=v.forwardRef((e,t)=>{const n=ki(fl,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return g.jsx(v3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;n.triggerRef.current?.contains(l)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),v3=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...l}=e,u=ki(fl,n),c=v.useRef(null),d=_t(t,c);return Jz(),g.jsxs(g.Fragment,{children:[g.jsx(xA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:g.jsx(Vg,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":EA(u.open),...l,ref:d,onDismiss:()=>u.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(pJ,{titleId:u.titleId}),g.jsx(vJ,{contentRef:c,descriptionId:u.descriptionId})]})]})}),AA="DialogTitle",y3=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ki(AA,n);return g.jsx(Qe.h2,{id:i.titleId,...r,ref:t})});y3.displayName=AA;var b3="DialogDescription",x3=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ki(b3,n);return g.jsx(Qe.p,{id:i.descriptionId,...r,ref:t})});x3.displayName=b3;var w3="DialogClose",S3=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ki(w3,n);return g.jsx(Qe.button,{type:"button",...r,ref:t,onClick:Ve(e.onClick,()=>i.onOpenChange(!1))})});S3.displayName=w3;function EA(e){return e?"open":"closed"}var A3="DialogTitleWarning",[T1e,E3]=zZ(A3,{contentName:fl,titleName:AA,docsSlug:"dialog"}),pJ=({titleId:e})=>{const t=E3(A3),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
60
|
-
|
|
61
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
62
|
-
|
|
63
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},gJ="DialogDescriptionWarning",vJ=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${E3(gJ).contentName}}.`;return v.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},C3=c3,j3=d3,T3=m3,O3=p3,P3=g3,N3=y3,yJ=x3,_3=S3;function bJ({...e}){return g.jsx(C3,{"data-slot":"sheet",...e})}function xJ({...e}){return g.jsx(j3,{"data-slot":"sheet-trigger",...e})}function wJ({...e}){return g.jsx(T3,{"data-slot":"sheet-portal",...e})}function SJ({className:e,...t}){return g.jsx(O3,{"data-slot":"sheet-overlay",className:me("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function AJ({className:e,children:t,side:n="right",...r}){return g.jsxs(wJ,{children:[g.jsx(SJ,{}),g.jsxs(P3,{"data-slot":"sheet-content",className:me("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,g.jsxs(_3,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[g.jsx(QL,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function EJ({className:e,...t}){return g.jsx("div",{"data-slot":"sheet-header",className:me("flex flex-col gap-1.5 p-4",e),...t})}function CJ({className:e,...t}){return g.jsx(N3,{"data-slot":"sheet-title",className:me("text-foreground font-semibold",e),...t})}function jJ(e){try{globalThis.localStorage.setItem(KL,e)}catch{}}const M3=v.createContext(null);function TJ({children:e}){const[t,n]=v.useState(()=>GL()),r=v.useCallback(o=>{n(o)},[]);v.useEffect(()=>{jJ(t)},[t]),v.useEffect(()=>{document.documentElement.lang=t,jt.changeLanguage(t)},[t]);const i=v.useMemo(()=>({locale:t,setLocale:r}),[t,r]);return g.jsx(M3.Provider,{value:i,children:e})}function OJ(){const e=v.useContext(M3);if(!e)throw new Error("useLocalePreference must be used within LocalePreferenceProvider");return e}function I_(e,[t,n]){return Math.min(n,Math.max(t,e))}function z_(e){const t=PJ(e),n=v.forwardRef((r,i)=>{const{children:o,...l}=r,u=v.Children.toArray(o),c=u.find(_J);if(c){const d=c.props.children,m=u.map(h=>h===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:h);return g.jsx(t,{...l,ref:i,children:v.isValidElement(d)?v.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function PJ(e){const t=v.forwardRef((n,r)=>{const{children:i,...o}=n;if(v.isValidElement(i)){const l=RJ(i),u=MJ(o,i.props);return i.type!==v.Fragment&&(u.ref=r?ic(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var NJ=Symbol("radix.slottable");function _J(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===NJ}function MJ(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function RJ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function R3(e){const t=e+"CollectionProvider",[n,r]=El(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=A=>{const{scope:E,children:C}=A,j=ge.useRef(null),T=ge.useRef(new Map).current;return g.jsx(i,{scope:E,itemMap:T,collectionRef:j,children:C})};l.displayName=t;const u=e+"CollectionSlot",c=z_(u),d=ge.forwardRef((A,E)=>{const{scope:C,children:j}=A,T=o(u,C),O=_t(E,T.collectionRef);return g.jsx(c,{ref:O,children:j})});d.displayName=u;const m=e+"CollectionItemSlot",h="data-radix-collection-item",y=z_(m),b=ge.forwardRef((A,E)=>{const{scope:C,children:j,...T}=A,O=ge.useRef(null),N=_t(E,O),_=o(m,C);return ge.useEffect(()=>(_.itemMap.set(O,{ref:O,...T}),()=>{_.itemMap.delete(O)})),g.jsx(y,{[h]:"",ref:N,children:j})});b.displayName=m;function w(A){const E=o(e+"CollectionConsumer",A);return ge.useCallback(()=>{const j=E.collectionRef.current;if(!j)return[];const T=Array.from(j.querySelectorAll(`[${h}]`));return Array.from(E.itemMap.values()).sort((_,M)=>T.indexOf(_.ref.current)-T.indexOf(M.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:l,Slot:d,ItemSlot:b},w,r]}var DJ=v.createContext(void 0);function CA(e){const t=v.useContext(DJ);return e||t||"ltr"}const kJ=["top","right","bottom","left"],os=Math.min,Lr=Math.max,_p=Math.round,Pm=Math.floor,sa=e=>({x:e,y:e}),LJ={left:"right",right:"left",bottom:"top",top:"bottom"},IJ={start:"end",end:"start"};function u1(e,t,n){return Lr(e,os(t,n))}function ao(e,t){return typeof e=="function"?e(t):e}function oo(e){return e.split("-")[0]}function cc(e){return e.split("-")[1]}function jA(e){return e==="x"?"y":"x"}function TA(e){return e==="y"?"height":"width"}const zJ=new Set(["top","bottom"]);function ta(e){return zJ.has(oo(e))?"y":"x"}function OA(e){return jA(ta(e))}function BJ(e,t,n){n===void 0&&(n=!1);const r=cc(e),i=OA(e),o=TA(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Mp(l)),[l,Mp(l)]}function $J(e){const t=Mp(e);return[c1(e),t,c1(t)]}function c1(e){return e.replace(/start|end/g,t=>IJ[t])}const B_=["left","right"],$_=["right","left"],UJ=["top","bottom"],VJ=["bottom","top"];function FJ(e,t,n){switch(e){case"top":case"bottom":return n?t?$_:B_:t?B_:$_;case"left":case"right":return t?UJ:VJ;default:return[]}}function HJ(e,t,n,r){const i=cc(e);let o=FJ(oo(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(c1)))),o}function Mp(e){return e.replace(/left|right|bottom|top/g,t=>LJ[t])}function qJ(e){return{top:0,right:0,bottom:0,left:0,...e}}function D3(e){return typeof e!="number"?qJ(e):{top:e,right:e,bottom:e,left:e}}function Rp(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function U_(e,t,n){let{reference:r,floating:i}=e;const o=ta(t),l=OA(t),u=TA(l),c=oo(t),d=o==="y",m=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,y=r[u]/2-i[u]/2;let b;switch(c){case"top":b={x:m,y:r.y-i.height};break;case"bottom":b={x:m,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:h};break;case"left":b={x:r.x-i.width,y:h};break;default:b={x:r.x,y:r.y}}switch(cc(t)){case"start":b[l]-=y*(n&&d?-1:1);break;case"end":b[l]+=y*(n&&d?-1:1);break}return b}const KJ=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),c=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:h}=U_(d,r,c),y=r,b={},w=0;for(let A=0;A<u.length;A++){const{name:E,fn:C}=u[A],{x:j,y:T,data:O,reset:N}=await C({x:m,y:h,initialPlacement:r,placement:y,strategy:i,middlewareData:b,rects:d,platform:l,elements:{reference:e,floating:t}});m=j??m,h=T??h,b={...b,[E]:{...b[E],...O}},N&&w<=50&&(w++,typeof N=="object"&&(N.placement&&(y=N.placement),N.rects&&(d=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:m,y:h}=U_(d,y,c)),A=-1)}return{x:m,y:h,placement:y,strategy:i,middlewareData:b}};async function id(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:u,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:y=!1,padding:b=0}=ao(t,e),w=D3(b),E=u[y?h==="floating"?"reference":"floating":h],C=Rp(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(E)))==null||n?E:E.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:d,rootBoundary:m,strategy:c})),j=h==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),O=await(o.isElement==null?void 0:o.isElement(T))?await(o.getScale==null?void 0:o.getScale(T))||{x:1,y:1}:{x:1,y:1},N=Rp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:j,offsetParent:T,strategy:c}):j);return{top:(C.top-N.top+w.top)/O.y,bottom:(N.bottom-C.bottom+w.bottom)/O.y,left:(C.left-N.left+w.left)/O.x,right:(N.right-C.right+w.right)/O.x}}const GJ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:u,middlewareData:c}=t,{element:d,padding:m=0}=ao(e,t)||{};if(d==null)return{};const h=D3(m),y={x:n,y:r},b=OA(i),w=TA(b),A=await l.getDimensions(d),E=b==="y",C=E?"top":"left",j=E?"bottom":"right",T=E?"clientHeight":"clientWidth",O=o.reference[w]+o.reference[b]-y[b]-o.floating[w],N=y[b]-o.reference[b],_=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let M=_?_[T]:0;(!M||!await(l.isElement==null?void 0:l.isElement(_)))&&(M=u.floating[T]||o.floating[w]);const R=O/2-N/2,B=M/2-A[w]/2-1,V=os(h[C],B),H=os(h[j],B),z=V,W=M-A[w]-H,Q=M/2-A[w]/2+R,se=u1(z,Q,W),L=!c.arrow&&cc(i)!=null&&Q!==se&&o.reference[w]/2-(Q<z?V:H)-A[w]/2<0,F=L?Q<z?Q-z:Q-W:0;return{[b]:y[b]+F,data:{[b]:se,centerOffset:Q-se-F,...L&&{alignmentOffset:F}},reset:L}}}),YJ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:A=!0,...E}=ao(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const C=oo(i),j=ta(u),T=oo(u)===u,O=await(c.isRTL==null?void 0:c.isRTL(d.floating)),N=y||(T||!A?[Mp(u)]:$J(u)),_=w!=="none";!y&&_&&N.push(...HJ(u,A,w,O));const M=[u,...N],R=await id(t,E),B=[];let V=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&B.push(R[C]),h){const Q=BJ(i,l,O);B.push(R[Q[0]],R[Q[1]])}if(V=[...V,{placement:i,overflows:B}],!B.every(Q=>Q<=0)){var H,z;const Q=(((H=o.flip)==null?void 0:H.index)||0)+1,se=M[Q];if(se&&(!(h==="alignment"?j!==ta(se):!1)||V.every($=>ta($.placement)===j?$.overflows[0]>0:!0)))return{data:{index:Q,overflows:V},reset:{placement:se}};let L=(z=V.filter(F=>F.overflows[0]<=0).sort((F,$)=>F.overflows[1]-$.overflows[1])[0])==null?void 0:z.placement;if(!L)switch(b){case"bestFit":{var W;const F=(W=V.filter($=>{if(_){const ae=ta($.placement);return ae===j||ae==="y"}return!0}).map($=>[$.placement,$.overflows.filter(ae=>ae>0).reduce((ae,G)=>ae+G,0)]).sort(($,ae)=>$[1]-ae[1])[0])==null?void 0:W[0];F&&(L=F);break}case"initialPlacement":L=u;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function V_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function F_(e){return kJ.some(t=>e[t]>=0)}const WJ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ao(e,t);switch(r){case"referenceHidden":{const o=await id(t,{...i,elementContext:"reference"}),l=V_(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:F_(l)}}}case"escaped":{const o=await id(t,{...i,altBoundary:!0}),l=V_(o,n.floating);return{data:{escapedOffsets:l,escaped:F_(l)}}}default:return{}}}}},k3=new Set(["left","top"]);async function XJ(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=oo(n),u=cc(n),c=ta(n)==="y",d=k3.has(l)?-1:1,m=o&&c?-1:1,h=ao(t,e);let{mainAxis:y,crossAxis:b,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof w=="number"&&(b=u==="end"?w*-1:w),c?{x:b*m,y:y*d}:{x:y*d,y:b*m}}const ZJ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:u}=t,c=await XJ(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:l}}}}},QJ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:E=>{let{x:C,y:j}=E;return{x:C,y:j}}},...c}=ao(e,t),d={x:n,y:r},m=await id(t,c),h=ta(oo(i)),y=jA(h);let b=d[y],w=d[h];if(o){const E=y==="y"?"top":"left",C=y==="y"?"bottom":"right",j=b+m[E],T=b-m[C];b=u1(j,b,T)}if(l){const E=h==="y"?"top":"left",C=h==="y"?"bottom":"right",j=w+m[E],T=w-m[C];w=u1(j,w,T)}const A=u.fn({...t,[y]:b,[h]:w});return{...A,data:{x:A.x-n,y:A.y-r,enabled:{[y]:o,[h]:l}}}}}},JJ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=ao(e,t),m={x:n,y:r},h=ta(i),y=jA(h);let b=m[y],w=m[h];const A=ao(u,t),E=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:0,crossAxis:0,...A};if(c){const T=y==="y"?"height":"width",O=o.reference[y]-o.floating[T]+E.mainAxis,N=o.reference[y]+o.reference[T]-E.mainAxis;b<O?b=O:b>N&&(b=N)}if(d){var C,j;const T=y==="y"?"width":"height",O=k3.has(oo(i)),N=o.reference[h]-o.floating[T]+(O&&((C=l.offset)==null?void 0:C[h])||0)+(O?0:E.crossAxis),_=o.reference[h]+o.reference[T]+(O?0:((j=l.offset)==null?void 0:j[h])||0)-(O?E.crossAxis:0);w<N?w=N:w>_&&(w=_)}return{[y]:b,[h]:w}}}},eee=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:u}=t,{apply:c=()=>{},...d}=ao(e,t),m=await id(t,d),h=oo(i),y=cc(i),b=ta(i)==="y",{width:w,height:A}=o.floating;let E,C;h==="top"||h==="bottom"?(E=h,C=y===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(C=h,E=y==="end"?"top":"bottom");const j=A-m.top-m.bottom,T=w-m.left-m.right,O=os(A-m[E],j),N=os(w-m[C],T),_=!t.middlewareData.shift;let M=O,R=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=j),_&&!y){const V=Lr(m.left,0),H=Lr(m.right,0),z=Lr(m.top,0),W=Lr(m.bottom,0);b?R=w-2*(V!==0||H!==0?V+H:Lr(m.left,m.right)):M=A-2*(z!==0||W!==0?z+W:Lr(m.top,m.bottom))}await c({...t,availableWidth:R,availableHeight:M});const B=await l.getDimensions(u.floating);return w!==B.width||A!==B.height?{reset:{rects:!0}}:{}}}};function Kg(){return typeof window<"u"}function fc(e){return L3(e)?(e.nodeName||"").toLowerCase():"#document"}function Br(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ba(e){var t;return(t=(L3(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function L3(e){return Kg()?e instanceof Node||e instanceof Br(e).Node:!1}function Ni(e){return Kg()?e instanceof Element||e instanceof Br(e).Element:!1}function da(e){return Kg()?e instanceof HTMLElement||e instanceof Br(e).HTMLElement:!1}function H_(e){return!Kg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Br(e).ShadowRoot}const tee=new Set(["inline","contents"]);function kd(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=_i(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!tee.has(i)}const nee=new Set(["table","td","th"]);function ree(e){return nee.has(fc(e))}const iee=[":popover-open",":modal"];function Gg(e){return iee.some(t=>{try{return e.matches(t)}catch{return!1}})}const aee=["transform","translate","scale","rotate","perspective"],oee=["transform","translate","scale","rotate","perspective","filter"],see=["paint","layout","strict","content"];function PA(e){const t=NA(),n=Ni(e)?_i(e):e;return aee.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||oee.some(r=>(n.willChange||"").includes(r))||see.some(r=>(n.contain||"").includes(r))}function lee(e){let t=ss(e);for(;da(t)&&!Fu(t);){if(PA(t))return t;if(Gg(t))return null;t=ss(t)}return null}function NA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const uee=new Set(["html","body","#document"]);function Fu(e){return uee.has(fc(e))}function _i(e){return Br(e).getComputedStyle(e)}function Yg(e){return Ni(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ss(e){if(fc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||H_(e)&&e.host||ba(e);return H_(t)?t.host:t}function I3(e){const t=ss(e);return Fu(t)?e.ownerDocument?e.ownerDocument.body:e.body:da(t)&&kd(t)?t:I3(t)}function ad(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=I3(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Br(i);if(o){const u=f1(l);return t.concat(l,l.visualViewport||[],kd(i)?i:[],u&&n?ad(u):[])}return t.concat(i,ad(i,[],n))}function f1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function z3(e){const t=_i(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=da(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,u=_p(n)!==o||_p(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function _A(e){return Ni(e)?e:e.contextElement}function Lu(e){const t=_A(e);if(!da(t))return sa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=z3(t);let l=(o?_p(n.width):n.width)/r,u=(o?_p(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const cee=sa(0);function B3(e){const t=Br(e);return!NA()||!t.visualViewport?cee:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fee(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Br(e)?!1:t}function dl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=_A(e);let l=sa(1);t&&(r?Ni(r)&&(l=Lu(r)):l=Lu(e));const u=fee(o,n,r)?B3(o):sa(0);let c=(i.left+u.x)/l.x,d=(i.top+u.y)/l.y,m=i.width/l.x,h=i.height/l.y;if(o){const y=Br(o),b=r&&Ni(r)?Br(r):r;let w=y,A=f1(w);for(;A&&r&&b!==w;){const E=Lu(A),C=A.getBoundingClientRect(),j=_i(A),T=C.left+(A.clientLeft+parseFloat(j.paddingLeft))*E.x,O=C.top+(A.clientTop+parseFloat(j.paddingTop))*E.y;c*=E.x,d*=E.y,m*=E.x,h*=E.y,c+=T,d+=O,w=Br(A),A=f1(w)}}return Rp({width:m,height:h,x:c,y:d})}function Wg(e,t){const n=Yg(e).scrollLeft;return t?t.left+n:dl(ba(e)).left+n}function $3(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Wg(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function dee(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=ba(r),u=t?Gg(t.floating):!1;if(r===l||u&&o)return n;let c={scrollLeft:0,scrollTop:0},d=sa(1);const m=sa(0),h=da(r);if((h||!h&&!o)&&((fc(r)!=="body"||kd(l))&&(c=Yg(r)),da(r))){const b=dl(r);d=Lu(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const y=l&&!h&&!o?$3(l,c):sa(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+m.x+y.x,y:n.y*d.y-c.scrollTop*d.y+m.y+y.y}}function hee(e){return Array.from(e.getClientRects())}function mee(e){const t=ba(e),n=Yg(e),r=e.ownerDocument.body,i=Lr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Lr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Wg(e);const u=-n.scrollTop;return _i(r).direction==="rtl"&&(l+=Lr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:u}}const q_=25;function pee(e,t){const n=Br(e),r=ba(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,c=0;if(i){o=i.width,l=i.height;const m=NA();(!m||m&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const d=Wg(r);if(d<=0){const m=r.ownerDocument,h=m.body,y=getComputedStyle(h),b=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,w=Math.abs(r.clientWidth-h.clientWidth-b);w<=q_&&(o-=w)}else d<=q_&&(o+=d);return{width:o,height:l,x:u,y:c}}const gee=new Set(["absolute","fixed"]);function vee(e,t){const n=dl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=da(e)?Lu(e):sa(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,d=r*o.y;return{width:l,height:u,x:c,y:d}}function K_(e,t,n){let r;if(t==="viewport")r=pee(e,n);else if(t==="document")r=mee(ba(e));else if(Ni(t))r=vee(t,n);else{const i=B3(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Rp(r)}function U3(e,t){const n=ss(e);return n===t||!Ni(n)||Fu(n)?!1:_i(n).position==="fixed"||U3(n,t)}function yee(e,t){const n=t.get(e);if(n)return n;let r=ad(e,[],!1).filter(u=>Ni(u)&&fc(u)!=="body"),i=null;const o=_i(e).position==="fixed";let l=o?ss(e):e;for(;Ni(l)&&!Fu(l);){const u=_i(l),c=PA(l);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&gee.has(i.position)||kd(l)&&!c&&U3(e,l))?r=r.filter(m=>m!==l):i=u,l=ss(l)}return t.set(e,r),r}function bee(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Gg(t)?[]:yee(t,this._c):[].concat(n),r],u=l[0],c=l.reduce((d,m)=>{const h=K_(t,m,i);return d.top=Lr(h.top,d.top),d.right=os(h.right,d.right),d.bottom=os(h.bottom,d.bottom),d.left=Lr(h.left,d.left),d},K_(t,u,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function xee(e){const{width:t,height:n}=z3(e);return{width:t,height:n}}function wee(e,t,n){const r=da(t),i=ba(t),o=n==="fixed",l=dl(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=sa(0);function d(){c.x=Wg(i)}if(r||!r&&!o)if((fc(t)!=="body"||kd(i))&&(u=Yg(t)),r){const b=dl(t,!0,o,t);c.x=b.x+t.clientLeft,c.y=b.y+t.clientTop}else i&&d();o&&!r&&i&&d();const m=i&&!r&&!o?$3(i,u):sa(0),h=l.left+u.scrollLeft-c.x-m.x,y=l.top+u.scrollTop-c.y-m.y;return{x:h,y,width:l.width,height:l.height}}function K0(e){return _i(e).position==="static"}function G_(e,t){if(!da(e)||_i(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ba(e)===n&&(n=n.ownerDocument.body),n}function V3(e,t){const n=Br(e);if(Gg(e))return n;if(!da(e)){let i=ss(e);for(;i&&!Fu(i);){if(Ni(i)&&!K0(i))return i;i=ss(i)}return n}let r=G_(e,t);for(;r&&ree(r)&&K0(r);)r=G_(r,t);return r&&Fu(r)&&K0(r)&&!PA(r)?n:r||lee(e)||n}const See=async function(e){const t=this.getOffsetParent||V3,n=this.getDimensions,r=await n(e.floating);return{reference:wee(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Aee(e){return _i(e).direction==="rtl"}const Eee={convertOffsetParentRelativeRectToViewportRelativeRect:dee,getDocumentElement:ba,getClippingRect:bee,getOffsetParent:V3,getElementRects:See,getClientRects:hee,getDimensions:xee,getScale:Lu,isElement:Ni,isRTL:Aee};function F3(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Cee(e,t){let n=null,r;const i=ba(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();const d=e.getBoundingClientRect(),{left:m,top:h,width:y,height:b}=d;if(u||t(),!y||!b)return;const w=Pm(h),A=Pm(i.clientWidth-(m+y)),E=Pm(i.clientHeight-(h+b)),C=Pm(m),T={rootMargin:-w+"px "+-A+"px "+-E+"px "+-C+"px",threshold:Lr(0,os(1,c))||1};let O=!0;function N(_){const M=_[0].intersectionRatio;if(M!==c){if(!O)return l();M?l(!1,M):r=setTimeout(()=>{l(!1,1e-7)},1e3)}M===1&&!F3(d,e.getBoundingClientRect())&&l(),O=!1}try{n=new IntersectionObserver(N,{...T,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,T)}n.observe(e)}return l(!0),o}function jee(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=_A(e),m=i||o?[...d?ad(d):[],...ad(t)]:[];m.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),o&&C.addEventListener("resize",n)});const h=d&&u?Cee(d,n):null;let y=-1,b=null;l&&(b=new ResizeObserver(C=>{let[j]=C;j&&j.target===d&&b&&(b.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var T;(T=b)==null||T.observe(t)})),n()}),d&&!c&&b.observe(d),b.observe(t));let w,A=c?dl(e):null;c&&E();function E(){const C=dl(e);A&&!F3(A,C)&&n(),A=C,w=requestAnimationFrame(E)}return n(),()=>{var C;m.forEach(j=>{i&&j.removeEventListener("scroll",n),o&&j.removeEventListener("resize",n)}),h?.(),(C=b)==null||C.disconnect(),b=null,c&&cancelAnimationFrame(w)}}const Tee=ZJ,Oee=QJ,Pee=YJ,Nee=eee,_ee=WJ,Y_=GJ,Mee=JJ,Ree=(e,t,n)=>{const r=new Map,i={platform:Eee,...n},o={...i.platform,_c:r};return KJ(e,t,{...i,platform:o})};var Dee=typeof document<"u",kee=function(){},up=Dee?v.useLayoutEffect:kee;function Dp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Dp(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Dp(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function H3(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function W_(e,t){const n=H3(e);return Math.round(t*n)/n}function G0(e){const t=v.useRef(e);return up(()=>{t.current=e}),t}function Lee(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:c,open:d}=e,[m,h]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,b]=v.useState(r);Dp(y,r)||b(r);const[w,A]=v.useState(null),[E,C]=v.useState(null),j=v.useCallback($=>{$!==_.current&&(_.current=$,A($))},[]),T=v.useCallback($=>{$!==M.current&&(M.current=$,C($))},[]),O=o||w,N=l||E,_=v.useRef(null),M=v.useRef(null),R=v.useRef(m),B=c!=null,V=G0(c),H=G0(i),z=G0(d),W=v.useCallback(()=>{if(!_.current||!M.current)return;const $={placement:t,strategy:n,middleware:y};H.current&&($.platform=H.current),Ree(_.current,M.current,$).then(ae=>{const G={...ae,isPositioned:z.current!==!1};Q.current&&!Dp(R.current,G)&&(R.current=G,cs.flushSync(()=>{h(G)}))})},[y,t,n,H,z]);up(()=>{d===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h($=>({...$,isPositioned:!1})))},[d]);const Q=v.useRef(!1);up(()=>(Q.current=!0,()=>{Q.current=!1}),[]),up(()=>{if(O&&(_.current=O),N&&(M.current=N),O&&N){if(V.current)return V.current(O,N,W);W()}},[O,N,W,V,B]);const se=v.useMemo(()=>({reference:_,floating:M,setReference:j,setFloating:T}),[j,T]),L=v.useMemo(()=>({reference:O,floating:N}),[O,N]),F=v.useMemo(()=>{const $={position:n,left:0,top:0};if(!L.floating)return $;const ae=W_(L.floating,m.x),G=W_(L.floating,m.y);return u?{...$,transform:"translate("+ae+"px, "+G+"px)",...H3(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ae,top:G}},[n,u,L.floating,m.x,m.y]);return v.useMemo(()=>({...m,update:W,refs:se,elements:L,floatingStyles:F}),[m,W,se,L,F])}const Iee=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Y_({element:r.current,padding:i}).fn(n):{}:r?Y_({element:r,padding:i}).fn(n):{}}}},zee=(e,t)=>({...Tee(e),options:[e,t]}),Bee=(e,t)=>({...Oee(e),options:[e,t]}),$ee=(e,t)=>({...Mee(e),options:[e,t]}),Uee=(e,t)=>({...Pee(e),options:[e,t]}),Vee=(e,t)=>({...Nee(e),options:[e,t]}),Fee=(e,t)=>({..._ee(e),options:[e,t]}),Hee=(e,t)=>({...Iee(e),options:[e,t]});var qee="Arrow",q3=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return g.jsx(Qe.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});q3.displayName=qee;var Kee=q3;function Gee(e){const[t,n]=v.useState(void 0);return Kn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,u;if("borderBoxSize"in o){const c=o.borderBoxSize,d=Array.isArray(c)?c[0]:c;l=d.inlineSize,u=d.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var MA="Popper",[K3,Xg]=El(MA),[Yee,G3]=K3(MA),Y3=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return g.jsx(Yee,{scope:t,anchor:r,onAnchorChange:i,children:n})};Y3.displayName=MA;var W3="PopperAnchor",X3=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=G3(W3,n),l=v.useRef(null),u=_t(t,l),c=v.useRef(null);return v.useEffect(()=>{const d=c.current;c.current=r?.current||l.current,d!==c.current&&o.onAnchorChange(c.current)}),r?null:g.jsx(Qe.div,{...i,ref:u})});X3.displayName=W3;var RA="PopperContent",[Wee,Xee]=K3(RA),Z3=v.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:y=!1,updatePositionStrategy:b="optimized",onPlaced:w,...A}=e,E=G3(RA,n),[C,j]=v.useState(null),T=_t(t,X=>j(X)),[O,N]=v.useState(null),_=Gee(O),M=_?.width??0,R=_?.height??0,B=r+(o!=="center"?"-"+o:""),V=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},H=Array.isArray(d)?d:[d],z=H.length>0,W={padding:V,boundary:H.filter(Qee),altBoundary:z},{refs:Q,floatingStyles:se,placement:L,isPositioned:F,middlewareData:$}=Lee({strategy:"fixed",placement:B,whileElementsMounted:(...X)=>jee(...X,{animationFrame:b==="always"}),elements:{reference:E.anchor},middleware:[zee({mainAxis:i+R,alignmentAxis:l}),c&&Bee({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?$ee():void 0,...W}),c&&Uee({...W}),Vee({...W,apply:({elements:X,rects:he,availableWidth:oe,availableHeight:le})=>{const{width:ve,height:re}=he.reference,Be=X.floating.style;Be.setProperty("--radix-popper-available-width",`${oe}px`),Be.setProperty("--radix-popper-available-height",`${le}px`),Be.setProperty("--radix-popper-anchor-width",`${ve}px`),Be.setProperty("--radix-popper-anchor-height",`${re}px`)}}),O&&Hee({element:O,padding:u}),Jee({arrowWidth:M,arrowHeight:R}),y&&Fee({strategy:"referenceHidden",...W})]}),[ae,G]=e5(L),k=as(w);Kn(()=>{F&&k?.()},[F,k]);const I=$.arrow?.x,q=$.arrow?.y,ne=$.arrow?.centerOffset!==0,[de,pe]=v.useState();return Kn(()=>{C&&pe(window.getComputedStyle(C).zIndex)},[C]),g.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...se,transform:F?se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(Wee,{scope:n,placedSide:ae,onArrowChange:N,arrowX:I,arrowY:q,shouldHideArrow:ne,children:g.jsx(Qe.div,{"data-side":ae,"data-align":G,...A,ref:T,style:{...A.style,animation:F?void 0:"none"}})})})});Z3.displayName=RA;var Q3="PopperArrow",Zee={top:"bottom",right:"left",bottom:"top",left:"right"},J3=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Xee(Q3,r),l=Zee[o.placedSide];return g.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:g.jsx(Kee,{...i,ref:n,style:{...i.style,display:"block"}})})});J3.displayName=Q3;function Qee(e){return e!==null}var Jee=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,l=i.arrow?.centerOffset!==0,u=l?0:e.arrowWidth,c=l?0:e.arrowHeight,[d,m]=e5(n),h={start:"0%",center:"50%",end:"100%"}[m],y=(i.arrow?.x??0)+u/2,b=(i.arrow?.y??0)+c/2;let w="",A="";return d==="bottom"?(w=l?h:`${y}px`,A=`${-c}px`):d==="top"?(w=l?h:`${y}px`,A=`${r.floating.height+c}px`):d==="right"?(w=`${-c}px`,A=l?h:`${b}px`):d==="left"&&(w=`${r.floating.width+c}px`,A=l?h:`${b}px`),{data:{x:w,y:A}}}});function e5(e){const[t,n="center"]=e.split("-");return[t,n]}var t5=Y3,n5=X3,r5=Z3,i5=J3;function ete(e){const t=tte(e),n=v.forwardRef((r,i)=>{const{children:o,...l}=r,u=v.Children.toArray(o),c=u.find(rte);if(c){const d=c.props.children,m=u.map(h=>h===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:h);return g.jsx(t,{...l,ref:i,children:v.isValidElement(d)?v.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function tte(e){const t=v.forwardRef((n,r)=>{const{children:i,...o}=n;if(v.isValidElement(i)){const l=ate(i),u=ite(o,i.props);return i.type!==v.Fragment&&(u.ref=r?ic(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nte=Symbol("radix.slottable");function rte(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nte}function ite(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function ate(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ote(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var a5=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ste="VisuallyHidden",o5=v.forwardRef((e,t)=>g.jsx(Qe.span,{...e,ref:t,style:{...a5,...e.style}}));o5.displayName=ste;var lte=o5,ute=[" ","Enter","ArrowUp","ArrowDown"],cte=[" ","Enter"],hl="Select",[Zg,Qg,fte]=R3(hl),[dc]=El(hl,[fte,Xg]),Jg=Xg(),[dte,ds]=dc(hl),[hte,mte]=dc(hl),s5=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:u,onValueChange:c,dir:d,name:m,autoComplete:h,disabled:y,required:b,form:w}=e,A=Jg(t),[E,C]=v.useState(null),[j,T]=v.useState(null),[O,N]=v.useState(!1),_=CA(d),[M,R]=Vu({prop:r,defaultProp:i??!1,onChange:o,caller:hl}),[B,V]=Vu({prop:l,defaultProp:u,onChange:c,caller:hl}),H=v.useRef(null),z=E?w||!!E.closest("form"):!0,[W,Q]=v.useState(new Set),se=Array.from(W).map(L=>L.props.value).join(";");return g.jsx(t5,{...A,children:g.jsxs(dte,{required:b,scope:t,trigger:E,onTriggerChange:C,valueNode:j,onValueNodeChange:T,valueNodeHasChildren:O,onValueNodeHasChildrenChange:N,contentId:Qa(),value:B,onValueChange:V,open:M,onOpenChange:R,dir:_,triggerPointerDownPosRef:H,disabled:y,children:[g.jsx(Zg.Provider,{scope:t,children:g.jsx(hte,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(L=>{Q(F=>new Set(F).add(L))},[]),onNativeOptionRemove:v.useCallback(L=>{Q(F=>{const $=new Set(F);return $.delete(L),$})},[]),children:n})}),z?g.jsxs(P5,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:h,value:B,onChange:L=>V(L.target.value),disabled:y,form:w,children:[B===void 0?g.jsx("option",{value:""}):null,Array.from(W)]},se):null]})})};s5.displayName=hl;var l5="SelectTrigger",u5=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Jg(n),l=ds(l5,n),u=l.disabled||r,c=_t(t,l.onTriggerChange),d=Qg(n),m=v.useRef("touch"),[h,y,b]=_5(A=>{const E=d().filter(T=>!T.disabled),C=E.find(T=>T.value===l.value),j=M5(E,A,C);j!==void 0&&l.onValueChange(j.value)}),w=A=>{u||(l.onOpenChange(!0),b()),A&&(l.triggerPointerDownPosRef.current={x:Math.round(A.pageX),y:Math.round(A.pageY)})};return g.jsx(n5,{asChild:!0,...o,children:g.jsx(Qe.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":N5(l.value)?"":void 0,...i,ref:c,onClick:Ve(i.onClick,A=>{A.currentTarget.focus(),m.current!=="mouse"&&w(A)}),onPointerDown:Ve(i.onPointerDown,A=>{m.current=A.pointerType;const E=A.target;E.hasPointerCapture(A.pointerId)&&E.releasePointerCapture(A.pointerId),A.button===0&&A.ctrlKey===!1&&A.pointerType==="mouse"&&(w(A),A.preventDefault())}),onKeyDown:Ve(i.onKeyDown,A=>{const E=h.current!=="";!(A.ctrlKey||A.altKey||A.metaKey)&&A.key.length===1&&y(A.key),!(E&&A.key===" ")&&ute.includes(A.key)&&(w(),A.preventDefault())})})})});u5.displayName=l5;var c5="SelectValue",f5=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...u}=e,c=ds(c5,n),{onValueNodeHasChildrenChange:d}=c,m=o!==void 0,h=_t(t,c.onValueNodeChange);return Kn(()=>{d(m)},[d,m]),g.jsx(Qe.span,{...u,ref:h,style:{pointerEvents:"none"},children:N5(c.value)?g.jsx(g.Fragment,{children:l}):o})});f5.displayName=c5;var pte="SelectIcon",d5=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return g.jsx(Qe.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});d5.displayName=pte;var gte="SelectPortal",h5=e=>g.jsx(Fg,{asChild:!0,...e});h5.displayName=gte;var ml="SelectContent",m5=v.forwardRef((e,t)=>{const n=ds(ml,e.__scopeSelect),[r,i]=v.useState();if(Kn(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?cs.createPortal(g.jsx(p5,{scope:e.__scopeSelect,children:g.jsx(Zg.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),o):null}return g.jsx(g5,{...e,ref:t})});m5.displayName=ml;var Ei=10,[p5,hs]=dc(ml),vte="SelectContentImpl",yte=ete("SelectContent.RemoveScroll"),g5=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:c,align:d,alignOffset:m,arrowPadding:h,collisionBoundary:y,collisionPadding:b,sticky:w,hideWhenDetached:A,avoidCollisions:E,...C}=e,j=ds(ml,n),[T,O]=v.useState(null),[N,_]=v.useState(null),M=_t(t,X=>O(X)),[R,B]=v.useState(null),[V,H]=v.useState(null),z=Qg(n),[W,Q]=v.useState(!1),se=v.useRef(!1);v.useEffect(()=>{if(T)return l3(T)},[T]),Jz();const L=v.useCallback(X=>{const[he,...oe]=z().map(re=>re.ref.current),[le]=oe.slice(-1),ve=document.activeElement;for(const re of X)if(re===ve||(re?.scrollIntoView({block:"nearest"}),re===he&&N&&(N.scrollTop=0),re===le&&N&&(N.scrollTop=N.scrollHeight),re?.focus(),document.activeElement!==ve))return},[z,N]),F=v.useCallback(()=>L([R,T]),[L,R,T]);v.useEffect(()=>{W&&F()},[W,F]);const{onOpenChange:$,triggerPointerDownPosRef:ae}=j;v.useEffect(()=>{if(T){let X={x:0,y:0};const he=le=>{X={x:Math.abs(Math.round(le.pageX)-(ae.current?.x??0)),y:Math.abs(Math.round(le.pageY)-(ae.current?.y??0))}},oe=le=>{X.x<=10&&X.y<=10?le.preventDefault():T.contains(le.target)||$(!1),document.removeEventListener("pointermove",he),ae.current=null};return ae.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",oe,{capture:!0})}}},[T,$,ae]),v.useEffect(()=>{const X=()=>$(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[$]);const[G,k]=_5(X=>{const he=z().filter(ve=>!ve.disabled),oe=he.find(ve=>ve.ref.current===document.activeElement),le=M5(he,X,oe);le&&setTimeout(()=>le.ref.current.focus())}),I=v.useCallback((X,he,oe)=>{const le=!se.current&&!oe;(j.value!==void 0&&j.value===he||le)&&(B(X),le&&(se.current=!0))},[j.value]),q=v.useCallback(()=>T?.focus(),[T]),ne=v.useCallback((X,he,oe)=>{const le=!se.current&&!oe;(j.value!==void 0&&j.value===he||le)&&H(X)},[j.value]),de=r==="popper"?d1:v5,pe=de===d1?{side:u,sideOffset:c,align:d,alignOffset:m,arrowPadding:h,collisionBoundary:y,collisionPadding:b,sticky:w,hideWhenDetached:A,avoidCollisions:E}:{};return g.jsx(p5,{scope:n,content:T,viewport:N,onViewportChange:_,itemRefCallback:I,selectedItem:R,onItemLeave:q,itemTextRefCallback:ne,focusSelectedItem:F,selectedItemText:V,position:r,isPositioned:W,searchRef:G,children:g.jsx(wA,{as:yte,allowPinchZoom:!0,children:g.jsx(xA,{asChild:!0,trapped:j.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:Ve(i,X=>{j.trigger?.focus({preventScroll:!0}),X.preventDefault()}),children:g.jsx(Vg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:g.jsx(de,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:X=>X.preventDefault(),...C,...pe,onPlaced:()=>Q(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:Ve(C.onKeyDown,X=>{const he=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!he&&X.key.length===1&&k(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let le=z().filter(ve=>!ve.disabled).map(ve=>ve.ref.current);if(["ArrowUp","End"].includes(X.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const ve=X.target,re=le.indexOf(ve);le=le.slice(re+1)}setTimeout(()=>L(le)),X.preventDefault()}})})})})})})});g5.displayName=vte;var bte="SelectItemAlignedPosition",v5=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=ds(ml,n),l=hs(ml,n),[u,c]=v.useState(null),[d,m]=v.useState(null),h=_t(t,M=>m(M)),y=Qg(n),b=v.useRef(!1),w=v.useRef(!0),{viewport:A,selectedItem:E,selectedItemText:C,focusSelectedItem:j}=l,T=v.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&d&&A&&E&&C){const M=o.trigger.getBoundingClientRect(),R=d.getBoundingClientRect(),B=o.valueNode.getBoundingClientRect(),V=C.getBoundingClientRect();if(o.dir!=="rtl"){const ve=V.left-R.left,re=B.left-ve,Be=M.left-re,Pe=M.width+Be,Fe=Math.max(Pe,R.width),De=window.innerWidth-Ei,Rt=I_(re,[Ei,Math.max(Ei,De-Fe)]);u.style.minWidth=Pe+"px",u.style.left=Rt+"px"}else{const ve=R.right-V.right,re=window.innerWidth-B.right-ve,Be=window.innerWidth-M.right-re,Pe=M.width+Be,Fe=Math.max(Pe,R.width),De=window.innerWidth-Ei,Rt=I_(re,[Ei,Math.max(Ei,De-Fe)]);u.style.minWidth=Pe+"px",u.style.right=Rt+"px"}const H=y(),z=window.innerHeight-Ei*2,W=A.scrollHeight,Q=window.getComputedStyle(d),se=parseInt(Q.borderTopWidth,10),L=parseInt(Q.paddingTop,10),F=parseInt(Q.borderBottomWidth,10),$=parseInt(Q.paddingBottom,10),ae=se+L+W+$+F,G=Math.min(E.offsetHeight*5,ae),k=window.getComputedStyle(A),I=parseInt(k.paddingTop,10),q=parseInt(k.paddingBottom,10),ne=M.top+M.height/2-Ei,de=z-ne,pe=E.offsetHeight/2,X=E.offsetTop+pe,he=se+L+X,oe=ae-he;if(he<=ne){const ve=H.length>0&&E===H[H.length-1].ref.current;u.style.bottom="0px";const re=d.clientHeight-A.offsetTop-A.offsetHeight,Be=Math.max(de,pe+(ve?q:0)+re+F),Pe=he+Be;u.style.height=Pe+"px"}else{const ve=H.length>0&&E===H[0].ref.current;u.style.top="0px";const Be=Math.max(ne,se+A.offsetTop+(ve?I:0)+pe)+oe;u.style.height=Be+"px",A.scrollTop=he-ne+A.offsetTop}u.style.margin=`${Ei}px 0`,u.style.minHeight=G+"px",u.style.maxHeight=z+"px",r?.(),requestAnimationFrame(()=>b.current=!0)}},[y,o.trigger,o.valueNode,u,d,A,E,C,o.dir,r]);Kn(()=>T(),[T]);const[O,N]=v.useState();Kn(()=>{d&&N(window.getComputedStyle(d).zIndex)},[d]);const _=v.useCallback(M=>{M&&w.current===!0&&(T(),j?.(),w.current=!1)},[T,j]);return g.jsx(wte,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:b,onScrollButtonChange:_,children:g.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:g.jsx(Qe.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});v5.displayName=bte;var xte="SelectPopperPosition",d1=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ei,...o}=e,l=Jg(n);return g.jsx(r5,{...l,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});d1.displayName=xte;var[wte,DA]=dc(ml,{}),h1="SelectViewport",y5=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=hs(h1,n),l=DA(h1,n),u=_t(t,o.onViewportChange),c=v.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),g.jsx(Zg.Slot,{scope:n,children:g.jsx(Qe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ve(i.onScroll,d=>{const m=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:y}=l;if(y?.current&&h){const b=Math.abs(c.current-m.scrollTop);if(b>0){const w=window.innerHeight-Ei*2,A=parseFloat(h.style.minHeight),E=parseFloat(h.style.height),C=Math.max(A,E);if(C<w){const j=C+b,T=Math.min(w,j),O=j-T;h.style.height=T+"px",h.style.bottom==="0px"&&(m.scrollTop=O>0?O:0,h.style.justifyContent="flex-end")}}}c.current=m.scrollTop})})})]})});y5.displayName=h1;var b5="SelectGroup",[Ste,Ate]=dc(b5),Ete=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Qa();return g.jsx(Ste,{scope:n,id:i,children:g.jsx(Qe.div,{role:"group","aria-labelledby":i,...r,ref:t})})});Ete.displayName=b5;var x5="SelectLabel",Cte=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ate(x5,n);return g.jsx(Qe.div,{id:i.id,...r,ref:t})});Cte.displayName=x5;var kp="SelectItem",[jte,w5]=dc(kp),S5=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=e,u=ds(kp,n),c=hs(kp,n),d=u.value===r,[m,h]=v.useState(o??""),[y,b]=v.useState(!1),w=_t(t,j=>c.itemRefCallback?.(j,r,i)),A=Qa(),E=v.useRef("touch"),C=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(jte,{scope:n,value:r,disabled:i,textId:A,isSelected:d,onItemTextChange:v.useCallback(j=>{h(T=>T||(j?.textContent??"").trim())},[]),children:g.jsx(Zg.ItemSlot,{scope:n,value:r,disabled:i,textValue:m,children:g.jsx(Qe.div,{role:"option","aria-labelledby":A,"data-highlighted":y?"":void 0,"aria-selected":d&&y,"data-state":d?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:w,onFocus:Ve(l.onFocus,()=>b(!0)),onBlur:Ve(l.onBlur,()=>b(!1)),onClick:Ve(l.onClick,()=>{E.current!=="mouse"&&C()}),onPointerUp:Ve(l.onPointerUp,()=>{E.current==="mouse"&&C()}),onPointerDown:Ve(l.onPointerDown,j=>{E.current=j.pointerType}),onPointerMove:Ve(l.onPointerMove,j=>{E.current=j.pointerType,i?c.onItemLeave?.():E.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ve(l.onPointerLeave,j=>{j.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Ve(l.onKeyDown,j=>{c.searchRef?.current!==""&&j.key===" "||(cte.includes(j.key)&&C(),j.key===" "&&j.preventDefault())})})})})});S5.displayName=kp;var Df="SelectItemText",A5=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,l=ds(Df,n),u=hs(Df,n),c=w5(Df,n),d=mte(Df,n),[m,h]=v.useState(null),y=_t(t,C=>h(C),c.onItemTextChange,C=>u.itemTextRefCallback?.(C,c.value,c.disabled)),b=m?.textContent,w=v.useMemo(()=>g.jsx("option",{value:c.value,disabled:c.disabled,children:b},c.value),[c.disabled,c.value,b]),{onNativeOptionAdd:A,onNativeOptionRemove:E}=d;return Kn(()=>(A(w),()=>E(w)),[A,E,w]),g.jsxs(g.Fragment,{children:[g.jsx(Qe.span,{id:c.textId,...o,ref:y}),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?cs.createPortal(o.children,l.valueNode):null]})});A5.displayName=Df;var E5="SelectItemIndicator",C5=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return w5(E5,n).isSelected?g.jsx(Qe.span,{"aria-hidden":!0,...r,ref:t}):null});C5.displayName=E5;var m1="SelectScrollUpButton",j5=v.forwardRef((e,t)=>{const n=hs(m1,e.__scopeSelect),r=DA(m1,e.__scopeSelect),[i,o]=v.useState(!1),l=_t(t,r.onScrollButtonChange);return Kn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const d=c.scrollTop>0;o(d)};const c=n.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?g.jsx(O5,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:c}=n;u&&c&&(u.scrollTop=u.scrollTop-c.offsetHeight)}}):null});j5.displayName=m1;var p1="SelectScrollDownButton",T5=v.forwardRef((e,t)=>{const n=hs(p1,e.__scopeSelect),r=DA(p1,e.__scopeSelect),[i,o]=v.useState(!1),l=_t(t,r.onScrollButtonChange);return Kn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const d=c.scrollHeight-c.clientHeight,m=Math.ceil(c.scrollTop)<d;o(m)};const c=n.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?g.jsx(O5,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:c}=n;u&&c&&(u.scrollTop=u.scrollTop+c.offsetHeight)}}):null});T5.displayName=p1;var O5=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=hs("SelectScrollButton",n),l=v.useRef(null),u=Qg(n),c=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Kn(()=>{u().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),g.jsx(Qe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ve(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Ve(i.onPointerMove,()=>{o.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ve(i.onPointerLeave,()=>{c()})})}),Tte="SelectSeparator",Ote=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(Qe.div,{"aria-hidden":!0,...r,ref:t})});Ote.displayName=Tte;var g1="SelectArrow",Pte=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Jg(n),o=ds(g1,n),l=hs(g1,n);return o.open&&l.position==="popper"?g.jsx(i5,{...i,...r,ref:t}):null});Pte.displayName=g1;var Nte="SelectBubbleInput",P5=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=v.useRef(null),o=_t(r,i),l=ote(t);return v.useEffect(()=>{const u=i.current;if(!u)return;const c=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(c,"value").set;if(l!==t&&m){const h=new Event("change",{bubbles:!0});m.call(u,t),u.dispatchEvent(h)}},[l,t]),g.jsx(Qe.select,{...n,style:{...a5,...n.style},ref:o,defaultValue:t})});P5.displayName=Nte;function N5(e){return e===""||e===void 0}function _5(e){const t=as(e),n=v.useRef(""),r=v.useRef(0),i=v.useCallback(l=>{const u=n.current+l;t(u),(function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(u)},[t]),o=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function M5(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=_te(e,Math.max(o,0));i.length===1&&(l=l.filter(d=>d!==n));const c=l.find(d=>d.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function _te(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Mte=s5,Rte=u5,Dte=f5,kte=d5,Lte=h5,Ite=m5,zte=y5,Bte=S5,$te=A5,Ute=C5,Vte=j5,Fte=T5;function In({...e}){return g.jsx(Mte,{"data-slot":"select",...e})}function zn({...e}){return g.jsx(Dte,{"data-slot":"select-value",...e})}function Bn({className:e,size:t="default",children:n,...r}){return g.jsxs(Rte,{"data-slot":"select-trigger","data-size":t,className:me("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,g.jsx(kte,{asChild:!0,children:g.jsx(kS,{className:"size-4 opacity-50"})})]})}function $n({className:e,children:t,position:n="item-aligned",align:r="center",...i}){return g.jsx(Lte,{children:g.jsxs(Ite,{"data-slot":"select-content",className:me("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...i,children:[g.jsx(Hte,{}),g.jsx(zte,{className:me("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),g.jsx(qte,{})]})})}function Te({className:e,children:t,...n}){return g.jsxs(Bte,{"data-slot":"select-item",className:me("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_span:last-child]:flex [&_span:last-child]:items-center [&_span:last-child]:gap-2",e),...n,children:[g.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:g.jsx(Ute,{children:g.jsx(E9,{className:"size-4"})})}),g.jsx($te,{children:t})]})}function Hte({className:e,...t}){return g.jsx(Vte,{"data-slot":"select-scroll-up-button",className:me("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(P9,{className:"size-4"})})}function qte({className:e,...t}){return g.jsx(Fte,{"data-slot":"select-scroll-down-button",className:me("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(kS,{className:"size-4"})})}function Kte(){const{t:e}=We(),{locale:t,setLocale:n}=OJ();return g.jsxs(In,{value:t,onValueChange:r=>n(Iw(r)),children:[g.jsxs(Bn,{size:"sm",className:"w-[8.5rem]","aria-label":e("app.language"),children:[g.jsx(I9,{className:"size-4"}),g.jsx(zn,{})]}),g.jsxs($n,{align:"end",children:[g.jsx(Te,{value:"en-US",children:e("locale.enUS")}),g.jsx(Te,{value:"zh-CN",children:e("locale.zhCN")})]})]})}function Gte({theme:e}){return e==="light"?g.jsx(e7,{className:"size-4"}):e==="dark"?g.jsx(G9,{className:"size-4"}):g.jsx(V9,{className:"size-4"})}function Yte(){const{t:e}=We(),{theme:t,setTheme:n}=DL();return g.jsxs(In,{value:t??"system",onValueChange:n,children:[g.jsxs(Bn,{size:"sm",className:"w-[8.5rem]","aria-label":e("theme.label"),children:[g.jsx(Gte,{theme:t}),g.jsx(zn,{})]}),g.jsxs($n,{align:"end",children:[g.jsx(Te,{value:"system",children:e("theme.system")}),g.jsx(Te,{value:"light",children:e("theme.light")}),g.jsx(Te,{value:"dark",children:e("theme.dark")})]})]})}function Wte(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Xte=e=>{switch(e){case"success":return Jte;case"info":return tne;case"warning":return ene;case"error":return nne;default:return null}},Zte=Array(12).fill(0),Qte=({visible:e,className:t})=>ge.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ge.createElement("div",{className:"sonner-spinner"},Zte.map((n,r)=>ge.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Jte=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ene=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),tne=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),nne=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),rne=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ge.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ge.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ine=()=>{const[e,t]=ge.useState(document.hidden);return ge.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let v1=1;class ane{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,o=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:v1++,l=this.toasts.find(c=>c.id===o),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(c=>c.id===o?(this.publish({...c,...t,id:o,title:r}),{...c,...t,id:o,dismissible:u,title:r}):c):this.addToast({title:r,...i,dismissible:u,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,l;const u=i.then(async d=>{if(l=["resolve",d],ge.isValidElement(d))o=!1,this.create({id:r,type:"default",message:d});else if(sne(d)&&!d.ok){o=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,w=typeof h=="object"&&!ge.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:y,...w})}else if(d instanceof Error){o=!1;const h=typeof n.error=="function"?await n.error(d):n.error,y=typeof n.description=="function"?await n.description(d):n.description,w=typeof h=="object"&&!ge.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:y,...w})}else if(n.success!==void 0){o=!1;const h=typeof n.success=="function"?await n.success(d):n.success,y=typeof n.description=="function"?await n.description(d):n.description,w=typeof h=="object"&&!ge.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:y,...w})}}).catch(async d=>{if(l=["reject",d],n.error!==void 0){o=!1;const m=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,b=typeof m=="object"&&!ge.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:h,...b})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,m)=>u.then(()=>l[0]==="reject"?m(l[1]):d(l[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=n?.id||v1++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const vr=new ane,one=(e,t)=>{const n=t?.id||v1++;return vr.addToast({title:e,...t,id:n}),n},sne=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",lne=one,une=()=>vr.toasts,cne=()=>vr.getActiveToasts(),Ut=Object.assign(lne,{success:vr.success,info:vr.info,warning:vr.warning,error:vr.error,custom:vr.custom,message:vr.message,promise:vr.promise,dismiss:vr.dismiss,loading:vr.loading},{getHistory:une,getToasts:cne});Wte("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Nm(e){return e.label!==void 0}const fne=3,dne="24px",hne="16px",X_=4e3,mne=356,pne=14,gne=45,vne=200;function Gi(...e){return e.filter(Boolean).join(" ")}function yne(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const bne=e=>{var t,n,r,i,o,l,u,c,d;const{invert:m,toast:h,unstyled:y,interacting:b,setHeights:w,visibleToasts:A,heights:E,index:C,toasts:j,expanded:T,removeToast:O,defaultRichColors:N,closeButton:_,style:M,cancelButtonStyle:R,actionButtonStyle:B,className:V="",descriptionClassName:H="",duration:z,position:W,gap:Q,expandByDefault:se,classNames:L,icons:F,closeButtonAriaLabel:$="Close toast"}=e,[ae,G]=ge.useState(null),[k,I]=ge.useState(null),[q,ne]=ge.useState(!1),[de,pe]=ge.useState(!1),[X,he]=ge.useState(!1),[oe,le]=ge.useState(!1),[ve,re]=ge.useState(!1),[Be,Pe]=ge.useState(0),[Fe,De]=ge.useState(0),Rt=ge.useRef(h.duration||z||X_),qr=ge.useRef(null),En=ge.useRef(null),Bi=C===0,xa=C+1<=A,Gt=h.type,Kr=h.dismissible!==!1,Yt=h.className||"",gs=h.descriptionClassName||"",gi=ge.useMemo(()=>E.findIndex(we=>we.toastId===h.id)||0,[E,h.id]),bo=ge.useMemo(()=>{var we;return(we=h.closeButton)!=null?we:_},[h.closeButton,_]),vi=ge.useMemo(()=>h.duration||z||X_,[h.duration,z]),wa=ge.useRef(0),Er=ge.useRef(0),Sa=ge.useRef(0),Xn=ge.useRef(null),[lr,Wt]=W.split("-"),Zn=ge.useMemo(()=>E.reduce((we,st,lt)=>lt>=gi?we:we+st.height,0),[E,gi]),Xt=ine(),vs=h.invert||m,Aa=Gt==="loading";Er.current=ge.useMemo(()=>gi*Q+Zn,[gi,Zn]),ge.useEffect(()=>{Rt.current=vi},[vi]),ge.useEffect(()=>{ne(!0)},[]),ge.useEffect(()=>{const we=En.current;if(we){const st=we.getBoundingClientRect().height;return De(st),w(lt=>[{toastId:h.id,height:st,position:h.position},...lt]),()=>w(lt=>lt.filter(bt=>bt.toastId!==h.id))}},[w,h.id]),ge.useLayoutEffect(()=>{if(!q)return;const we=En.current,st=we.style.height;we.style.height="auto";const lt=we.getBoundingClientRect().height;we.style.height=st,De(lt),w(bt=>bt.find(ze=>ze.toastId===h.id)?bt.map(ze=>ze.toastId===h.id?{...ze,height:lt}:ze):[{toastId:h.id,height:lt,position:h.position},...bt])},[q,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ur=ge.useCallback(()=>{pe(!0),Pe(Er.current),w(we=>we.filter(st=>st.toastId!==h.id)),setTimeout(()=>{O(h)},vne)},[h,O,w,Er]);ge.useEffect(()=>{if(h.promise&&Gt==="loading"||h.duration===1/0||h.type==="loading")return;let we;return T||b||Xt?(()=>{if(Sa.current<wa.current){const bt=new Date().getTime()-wa.current;Rt.current=Rt.current-bt}Sa.current=new Date().getTime()})():Rt.current!==1/0&&(wa.current=new Date().getTime(),we=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ur()},Rt.current)),()=>clearTimeout(we)},[T,b,h,Gt,Xt,ur]),ge.useEffect(()=>{h.delete&&(ur(),h.onDismiss==null||h.onDismiss.call(h,h))},[ur,h.delete]);function $i(){var we;if(F?.loading){var st;return ge.createElement("div",{className:Gi(L?.loader,h==null||(st=h.classNames)==null?void 0:st.loader,"sonner-loader"),"data-visible":Gt==="loading"},F.loading)}return ge.createElement(Qte,{className:Gi(L?.loader,h==null||(we=h.classNames)==null?void 0:we.loader),visible:Gt==="loading"})}const Ui=h.icon||F?.[Gt]||Xte(Gt);var yi,cr;return ge.createElement("li",{tabIndex:0,ref:En,className:Gi(V,Yt,L?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,L?.default,L?.[Gt],h==null||(n=h.classNames)==null?void 0:n[Gt]),"data-sonner-toast":"","data-rich-colors":(yi=h.richColors)!=null?yi:N,"data-styled":!(h.jsx||h.unstyled||y),"data-mounted":q,"data-promise":!!h.promise,"data-swiped":ve,"data-removed":de,"data-visible":xa,"data-y-position":lr,"data-x-position":Wt,"data-index":C,"data-front":Bi,"data-swiping":X,"data-dismissible":Kr,"data-type":Gt,"data-invert":vs,"data-swipe-out":oe,"data-swipe-direction":k,"data-expanded":!!(T||se&&q),"data-testid":h.testId,style:{"--index":C,"--toasts-before":C,"--z-index":j.length-C,"--offset":`${de?Be:Er.current}px`,"--initial-height":se?"auto":`${Fe}px`,...M,...h.style},onDragEnd:()=>{he(!1),G(null),Xn.current=null},onPointerDown:we=>{we.button!==2&&(Aa||!Kr||(qr.current=new Date,Pe(Er.current),we.target.setPointerCapture(we.pointerId),we.target.tagName!=="BUTTON"&&(he(!0),Xn.current={x:we.clientX,y:we.clientY})))},onPointerUp:()=>{var we,st,lt;if(oe||!Kr)return;Xn.current=null;const bt=Number(((we=En.current)==null?void 0:we.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Cr=Number(((st=En.current)==null?void 0:st.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ze=new Date().getTime()-((lt=qr.current)==null?void 0:lt.getTime()),Ft=ae==="x"?bt:Cr,Ea=Math.abs(Ft)/ze;if(Math.abs(Ft)>=gne||Ea>.11){Pe(Er.current),h.onDismiss==null||h.onDismiss.call(h,h),I(ae==="x"?bt>0?"right":"left":Cr>0?"down":"up"),ur(),le(!0);return}else{var Cn,Vn;(Cn=En.current)==null||Cn.style.setProperty("--swipe-amount-x","0px"),(Vn=En.current)==null||Vn.style.setProperty("--swipe-amount-y","0px")}re(!1),he(!1),G(null)},onPointerMove:we=>{var st,lt,bt;if(!Xn.current||!Kr||((st=window.getSelection())==null?void 0:st.toString().length)>0)return;const ze=we.clientY-Xn.current.y,Ft=we.clientX-Xn.current.x;var Ea;const Cn=(Ea=e.swipeDirections)!=null?Ea:yne(W);!ae&&(Math.abs(Ft)>1||Math.abs(ze)>1)&&G(Math.abs(Ft)>Math.abs(ze)?"x":"y");let Vn={x:0,y:0};const xo=jr=>1/(1.5+Math.abs(jr)/20);if(ae==="y"){if(Cn.includes("top")||Cn.includes("bottom"))if(Cn.includes("top")&&ze<0||Cn.includes("bottom")&&ze>0)Vn.y=ze;else{const jr=ze*xo(ze);Vn.y=Math.abs(jr)<Math.abs(ze)?jr:ze}}else if(ae==="x"&&(Cn.includes("left")||Cn.includes("right")))if(Cn.includes("left")&&Ft<0||Cn.includes("right")&&Ft>0)Vn.x=Ft;else{const jr=Ft*xo(Ft);Vn.x=Math.abs(jr)<Math.abs(Ft)?jr:Ft}(Math.abs(Vn.x)>0||Math.abs(Vn.y)>0)&&re(!0),(lt=En.current)==null||lt.style.setProperty("--swipe-amount-x",`${Vn.x}px`),(bt=En.current)==null||bt.style.setProperty("--swipe-amount-y",`${Vn.y}px`)}},bo&&!h.jsx&&Gt!=="loading"?ge.createElement("button",{"aria-label":$,"data-disabled":Aa,"data-close-button":!0,onClick:Aa||!Kr?()=>{}:()=>{ur(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Gi(L?.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(cr=F?.close)!=null?cr:rne):null,(Gt||h.icon||h.promise)&&h.icon!==null&&(F?.[Gt]!==null||h.icon)?ge.createElement("div",{"data-icon":"",className:Gi(L?.icon,h==null||(i=h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||$i():null,h.type!=="loading"?Ui:null):null,ge.createElement("div",{"data-content":"",className:Gi(L?.content,h==null||(o=h.classNames)==null?void 0:o.content)},ge.createElement("div",{"data-title":"",className:Gi(L?.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?ge.createElement("div",{"data-description":"",className:Gi(H,gs,L?.description,h==null||(u=h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),ge.isValidElement(h.cancel)?h.cancel:h.cancel&&Nm(h.cancel)?ge.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||R,onClick:we=>{Nm(h.cancel)&&Kr&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,we),ur())},className:Gi(L?.cancelButton,h==null||(c=h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,ge.isValidElement(h.action)?h.action:h.action&&Nm(h.action)?ge.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||B,onClick:we=>{Nm(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,we),!we.defaultPrevented&&ur())},className:Gi(L?.actionButton,h==null||(d=h.classNames)==null?void 0:d.actionButton)},h.action.label):null)};function Z_(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function xne(e,t){const n={};return[e,t].forEach((r,i)=>{const o=i===1,l=o?"--mobile-offset":"--offset",u=o?hne:dne;function c(d){["top","right","bottom","left"].forEach(m=>{n[`${l}-${m}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${l}-${d}`]=u:n[`${l}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(u)}),n}const wne=ge.forwardRef(function(t,n){const{id:r,invert:i,position:o="bottom-right",hotkey:l=["altKey","KeyT"],expand:u,closeButton:c,className:d,offset:m,mobileOffset:h,theme:y="light",richColors:b,duration:w,style:A,visibleToasts:E=fne,toastOptions:C,dir:j=Z_(),gap:T=pne,icons:O,containerAriaLabel:N="Notifications"}=t,[_,M]=ge.useState([]),R=ge.useMemo(()=>r?_.filter(q=>q.toasterId===r):_.filter(q=>!q.toasterId),[_,r]),B=ge.useMemo(()=>Array.from(new Set([o].concat(R.filter(q=>q.position).map(q=>q.position)))),[R,o]),[V,H]=ge.useState([]),[z,W]=ge.useState(!1),[Q,se]=ge.useState(!1),[L,F]=ge.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=ge.useRef(null),ae=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),G=ge.useRef(null),k=ge.useRef(!1),I=ge.useCallback(q=>{M(ne=>{var de;return(de=ne.find(pe=>pe.id===q.id))!=null&&de.delete||vr.dismiss(q.id),ne.filter(({id:pe})=>pe!==q.id)})},[]);return ge.useEffect(()=>vr.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{M(ne=>ne.map(de=>de.id===q.id?{...de,delete:!0}:de))});return}setTimeout(()=>{ML.flushSync(()=>{M(ne=>{const de=ne.findIndex(pe=>pe.id===q.id);return de!==-1?[...ne.slice(0,de),{...ne[de],...q},...ne.slice(de+1)]:[q,...ne]})})})}),[_]),ge.useEffect(()=>{if(y!=="system"){F(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:ne})=>{F(ne?"dark":"light")})}catch{q.addListener(({matches:de})=>{try{F(de?"dark":"light")}catch(pe){console.error(pe)}})}},[y]),ge.useEffect(()=>{_.length<=1&&W(!1)},[_]),ge.useEffect(()=>{const q=ne=>{var de;if(l.every(he=>ne[he]||ne.code===he)){var X;W(!0),(X=$.current)==null||X.focus()}ne.code==="Escape"&&(document.activeElement===$.current||(de=$.current)!=null&&de.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[l]),ge.useEffect(()=>{if($.current)return()=>{G.current&&(G.current.focus({preventScroll:!0}),G.current=null,k.current=!1)}},[$.current]),ge.createElement("section",{ref:n,"aria-label":`${N} ${ae}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},B.map((q,ne)=>{var de;const[pe,X]=q.split("-");return R.length?ge.createElement("ol",{key:q,dir:j==="auto"?Z_():j,tabIndex:-1,ref:$,className:d,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":pe,"data-x-position":X,style:{"--front-toast-height":`${((de=V[0])==null?void 0:de.height)||0}px`,"--width":`${mne}px`,"--gap":`${T}px`,...A,...xne(m,h)},onBlur:he=>{k.current&&!he.currentTarget.contains(he.relatedTarget)&&(k.current=!1,G.current&&(G.current.focus({preventScroll:!0}),G.current=null))},onFocus:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||k.current||(k.current=!0,G.current=he.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{Q||W(!1)},onDragEnd:()=>W(!1),onPointerDown:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||se(!0)},onPointerUp:()=>se(!1)},R.filter(he=>!he.position&&ne===0||he.position===q).map((he,oe)=>{var le,ve;return ge.createElement(bne,{key:he.id,icons:O,index:oe,toast:he,defaultRichColors:b,duration:(le=C?.duration)!=null?le:w,className:C?.className,descriptionClassName:C?.descriptionClassName,invert:i,visibleToasts:E,closeButton:(ve=C?.closeButton)!=null?ve:c,interacting:Q,position:q,style:C?.style,unstyled:C?.unstyled,classNames:C?.classNames,cancelButtonStyle:C?.cancelButtonStyle,actionButtonStyle:C?.actionButtonStyle,closeButtonAriaLabel:C?.closeButtonAriaLabel,removeToast:I,toasts:R.filter(re=>re.position==he.position),heights:V.filter(re=>re.position==he.position),setHeights:H,expandByDefault:u,gap:T,expanded:z,swipeDirections:t.swipeDirections})})):null}))}),Qs="adminToken";function y1(){if(typeof window>"u")return"";try{const e=window.localStorage.getItem(Qs)||"";if(e)return e;const t=window.sessionStorage.getItem(Qs)||"";if(t)return window.localStorage.setItem(Qs,t),window.sessionStorage.removeItem(Qs),t}catch{}return""}function Q_(e){if(!(typeof window>"u"))try{const t=e.trim();t?window.localStorage.setItem(Qs,t):window.localStorage.removeItem(Qs),window.sessionStorage.removeItem(Qs)}catch{}}const R5=v.createContext(null);function Sne({children:e}){const[t,n]=v.useState(()=>y1()),r=v.useMemo(()=>({token:t,setToken:i=>{Q_(i),n(y1())},clearToken:()=>{Q_(""),n("")}}),[t]);return g.jsx(R5.Provider,{value:r,children:e})}function Ane(){const e=v.useContext(R5);if(!e)throw new Error("useAdminToken must be used within <AdminTokenProvider />");return e}const b1="admin-ui:admin-token-required";function D5(e){const{is_subagent:t,...n}=e;return{...n,is_subagent:t===1?!0:t===0?!1:null}}class di extends Error{status;responseText;constructor(t,n){super(`HTTP ${t}: ${n}`),this.name="AdminApiError",this.status=t,this.responseText=n}}function J_(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}async function ar(e,t,n){const r=n?.trim()??y1(),i=new Headers(t?.headers??void 0);r&&i.set("x-admin-token",r),t?.body&&!i.has("content-type")&&i.set("content-type","application/json");const o=await fetch(e,{...t,headers:i});if(!o.ok){const l=await o.text().catch(()=>"");let u=l;try{const c=JSON.parse(l);if(J_(c)&&"error"in c){const d=c.error;J_(d)&&typeof d.message=="string"&&(u=d.message)}}catch{}throw(o.status===401||o.status===403)&&typeof window<"u"&&window.dispatchEvent(new Event(b1)),new di(o.status,u)}return await o.json()}async function x1(e){return ar("/api/admin/meta",void 0,e)}async function Ene(e){const t=new URLSearchParams;return t.set("since_ms",String(e.sinceMs)),t.set("include_stats","1"),ar(`/api/admin/accounts?${t.toString()}`)}async function Cne(e){const t=new URLSearchParams;e.account_id&&t.set("account_id",e.account_id),e.upstream_model&&t.set("upstream_model",e.upstream_model),e.client_model&&t.set("client_model",e.client_model),e.upstream_endpoint&&t.set("upstream_endpoint",e.upstream_endpoint),e.path&&t.set("path",e.path),e.status&&t.set("status",e.status),e.has_error&&t.set("has_error",e.has_error),e.from_ms&&t.set("from_ms",e.from_ms),e.to_ms&&t.set("to_ms",e.to_ms),t.set("limit",String(e.limit??50)),e.cursor_id!=null&&t.set("cursor_id",String(e.cursor_id));const n=await ar(`/api/admin/requests?${t.toString()}`);return{...n,items:n.items.map(D5)}}async function Y0(e){const t=await ar(`/api/admin/requests/${encodeURIComponent(e)}`);return{item:t.item?D5(t.item):null}}async function jne(){return ar("/api/admin/config")}async function Tne(e){return ar("/api/admin/config",{method:"POST",body:JSON.stringify(e)})}async function One(){return ar("/api/admin/models")}async function Pne(){return ar("/api/admin/models/details")}async function Nne(e){const t=new URLSearchParams;return e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.accountId&&t.set("account_id",e.accountId),e.granularity&&t.set("granularity",e.granularity),ar(`/api/admin/stats/premium-daily?${t.toString()}`)}async function _ne(e){return ar("/api/admin/accounts/auth/start",{method:"POST",body:JSON.stringify(e)})}async function Mne(e){return ar(`/api/admin/accounts/auth/status/${encodeURIComponent(e)}`)}async function Rne(e){return ar(`/api/admin/accounts/auth/cancel/${encodeURIComponent(e)}`,{method:"POST"})}async function Dne(e){return ar(`/api/admin/accounts/${encodeURIComponent(e)}`,{method:"DELETE"})}async function kne(e){return ar(`/api/admin/accounts/${encodeURIComponent(e)}/reauth`,{method:"POST"})}async function Lne(e,t){return ar(`/api/admin/accounts/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t)})}const Ine=BS("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function rn({className:e,variant:t,asChild:n=!1,...r}){const i=n?zS:"span";return g.jsx(i,{"data-slot":"badge",className:me(Ine({variant:t}),e),...r})}function kA({...e}){return g.jsx(C3,{"data-slot":"dialog",...e})}function zne({...e}){return g.jsx(j3,{"data-slot":"dialog-trigger",...e})}function Bne({...e}){return g.jsx(T3,{"data-slot":"dialog-portal",...e})}function $ne({className:e,...t}){return g.jsx(O3,{"data-slot":"dialog-overlay",className:me("fixed inset-0 z-50",e),asChild:!0,...t,children:g.jsx(io.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"bg-black/50",style:{position:"fixed",inset:0}})})}function LA({className:e,children:t,showCloseButton:n=!0,...r}){const o=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?{duration:.01}:{type:"spring",damping:26,stiffness:300,mass:.8};return g.jsx(uA,{children:g.jsxs(Bne,{children:[g.jsx($ne,{}),g.jsx(P3,{"data-slot":"dialog-content",className:me("bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg outline-none sm:max-w-lg",e),asChild:!0,...r,children:g.jsxs(io.div,{initial:{opacity:0,scale:.95,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.97,y:4},transition:o,children:[t,n&&g.jsxs(_3,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[g.jsx(QL,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})})]})})}function Ks({className:e,...t}){return g.jsx("div",{"data-slot":"dialog-header",className:me("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Gs({className:e,...t}){return g.jsx("div",{"data-slot":"dialog-footer",className:me("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Ys({className:e,...t}){return g.jsx(N3,{"data-slot":"dialog-title",className:me("text-lg leading-none font-semibold",e),...t})}function qf({className:e,...t}){return g.jsx(yJ,{"data-slot":"dialog-description",className:me("text-muted-foreground text-sm",e),...t})}function Ct({className:e,type:t,...n}){return g.jsx("input",{type:t,"data-slot":"input",className:me("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}var Une=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Vne=Une.reduce((e,t)=>{const n=eI(`Primitive.${t}`),r=v.forwardRef((i,o)=>{const{asChild:l,...u}=i,c=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Fne="Label",k5=v.forwardRef((e,t)=>g.jsx(Vne.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));k5.displayName=Fne;var Hne=k5;function St({className:e,...t}){return g.jsx(Hne,{"data-slot":"label",className:me("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const qne=BS(me("relative cursor-pointer group transition-all animate-rainbow","inline-flex items-center justify-center gap-2 shrink-0","rounded-md outline-none focus-visible:ring-[3px] aria-invalid:border-destructive","text-sm font-medium whitespace-nowrap","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"),{variants:{variant:{default:"border-0 bg-[linear-gradient(#121213,#121213),linear-gradient(#121213_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%] text-primary-foreground [background-clip:padding-box,border-box,border-box] [background-origin:border-box] [border:calc(0.125rem)_solid_transparent] before:absolute before:bottom-[-20%] before:left-1/2 before:z-0 before:h-1/5 before:w-3/5 before:-translate-x-1/2 before:animate-rainbow before:bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] before:[filter:blur(0.75rem)] dark:bg-[linear-gradient(#fff,#fff),linear-gradient(#fff_50%,rgba(255,255,255,0.6)_80%,rgba(0,0,0,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))]",outline:"border border-input border-b-transparent bg-[linear-gradient(#ffffff,#ffffff),linear-gradient(#ffffff_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%] text-accent-foreground [background-clip:padding-box,border-box,border-box] [background-origin:border-box] before:absolute before:bottom-[-20%] before:left-1/2 before:z-0 before:h-1/5 before:w-3/5 before:-translate-x-1/2 before:animate-rainbow before:bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] before:[filter:blur(0.75rem)] dark:bg-[linear-gradient(#0a0a0a,#0a0a0a),linear-gradient(#0a0a0a_50%,rgba(255,255,255,0.6)_80%,rgba(0,0,0,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))]"},size:{default:"h-9 px-4 py-2",sm:"h-8 gap-1.5 px-3 text-xs",lg:"h-11 px-8",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),IA=ge.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const l=r?zS:"button";return g.jsx(l,{"data-slot":"button",className:me(qne({variant:t,size:n,className:e})),ref:o,...i})});IA.displayName="RainbowButton";function Kne(){const{t:e}=We(),{token:t,setToken:n,clearToken:r}=Ane(),[i,o]=v.useState(!1),[l,u]=v.useState(t),[c,d]=v.useState(!1),[m,h]=v.useState(!1),[y,b]=v.useState(null),[w,A]=v.useState(null),E=e(t?"common.set":"common.unset");v.useEffect(()=>{if(typeof window>"u")return;function O(){o(!0)}return window.addEventListener(b1,O),()=>{window.removeEventListener(b1,O)}},[]),v.useEffect(()=>{i&&u(t),i&&b(null)},[i,t]);async function C(){d(!0),A(null),b(null);try{const O=await x1(l);A(O),Ut.success(e("tokenDialog.toast.adminApiOk"))}catch(O){const N=O instanceof di?O.message:String(O);Ut.error(e("tokenDialog.toast.adminApiFailed"),{description:N})}finally{d(!1)}}async function j(){const O=l.trim();if(!O){b(e("tokenDialog.validation.empty"));return}h(!0),b(null),A(null);try{const N=await x1(O);A(N),n(O),o(!1),Ut.success(e("tokenDialog.toast.tokenSaved"))}catch(N){const _=N instanceof di?N.message:String(N);b(_)}finally{h(!1)}}function T(){r(),u(""),b(null),A(null),Ut.success(e("tokenDialog.toast.tokenCleared"))}return g.jsxs(kA,{open:i,onOpenChange:o,children:[g.jsx(zne,{asChild:!0,children:g.jsxs(Le,{variant:"outline",className:"gap-2",children:[g.jsx($9,{className:"size-4"}),e("tokenDialog.trigger"),g.jsx(rn,{variant:t?"secondary":"outline",className:"ml-1 hidden sm:inline-flex",children:E})]})}),g.jsxs(LA,{children:[g.jsxs(Ks,{children:[g.jsx(Ys,{children:e("tokenDialog.title")}),g.jsx(qf,{children:g.jsxs(GP,{i18nKey:"tokenDialog.description",children:["Used as ",g.jsx("code",{children:"x-admin-token"})," when calling ",g.jsx("code",{children:"/api/admin/*"}),". Stored in ",g.jsx("code",{children:"localStorage"}),"."]})})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(St,{htmlFor:"admin-token",children:"x-admin-token"}),g.jsx(Ct,{id:"admin-token",type:"password",placeholder:e("tokenDialog.inputPlaceholder"),value:l,onChange:O=>{u(O.target.value),y&&b(null)},autoComplete:"off"}),y?g.jsx("p",{className:"text-destructive text-xs",children:y}):null,g.jsx("p",{className:"text-muted-foreground text-xs",children:g.jsxs(GP,{i18nKey:"tokenDialog.remoteNote",children:["If the server is not running on localhost, you must set ",g.jsx("code",{children:"ADMIN_TOKEN"})," on the server to enable remote access."]})}),w?.dbPath&&g.jsx("p",{className:"text-muted-foreground text-xs",children:e("tokenDialog.connected",{version:w.userVersion??"?",path:w.dbPath})})]}),g.jsxs(Gs,{className:"gap-2 sm:gap-2",children:[g.jsx(Le,{variant:"secondary",onClick:C,disabled:c||m,children:e(c?"common.testing":"common.test")}),g.jsx(Le,{variant:"outline",onClick:T,disabled:!t&&!l.trim()||c||m,children:e("common.clear")}),g.jsx(IA,{onClick:j,className:"h-9 px-4",disabled:c||m,children:e(m?"common.saving":"common.save")})]})]})]})}function Gne({to:e,label:t}){return g.jsx(NL,{to:e,className:({isActive:n})=>me("text-sm font-medium transition-colors hover:text-foreground",n?"text-foreground":"text-muted-foreground"),children:t})}const Yne=[{to:"/accounts",labelKey:"nav.accounts"},{to:"/requests",labelKey:"nav.requests"},{to:"/statistics",labelKey:"nav.statistics"},{to:"/models",labelKey:"nav.models"},{to:"/settings",labelKey:"nav.settings"}];function eM(){const{t:e}=We();return g.jsx(g.Fragment,{children:Yne.map(t=>g.jsx(Gne,{to:t.to,label:e(t.labelKey)},t.to))})}function Wne(){const{t:e}=We(),t=v.useRef(null),n=v.useRef(null);return v.useEffect(()=>{const r=t.current,i=n.current;if(!r||!i)return;const o=()=>{r.style.setProperty("--app-shell-header-height",`${i.getBoundingClientRect().height}px`)};if(o(),window.addEventListener("resize",o),typeof ResizeObserver>"u")return()=>{window.removeEventListener("resize",o)};const l=new ResizeObserver(o);return l.observe(i),()=>{l.disconnect(),window.removeEventListener("resize",o)}},[]),g.jsxs("div",{ref:t,className:"min-h-svh bg-background text-foreground",children:[g.jsx("header",{ref:n,className:"bg-background/70 sticky top-0 z-50 border-b backdrop-blur",children:g.jsxs("div",{className:"flex w-full items-center gap-3 px-4 py-3 lg:px-6",children:[g.jsx("div",{className:"md:hidden",children:g.jsxs(bJ,{children:[g.jsx(xJ,{asChild:!0,children:g.jsx(Le,{variant:"outline",size:"icon","aria-label":e("nav.openNavigation"),children:g.jsx(q9,{className:"size-4"})})}),g.jsxs(AJ,{side:"left",className:"w-72",children:[g.jsx(EJ,{children:g.jsx(CJ,{children:g.jsx(E_,{className:"text-base font-semibold text-foreground",sparklesCount:3,children:e("app.title")})})}),g.jsx("nav",{className:"mt-4 flex flex-col gap-3",children:g.jsx(eM,{})})]})]})}),g.jsx("div",{className:"min-w-0",children:g.jsx(E_,{className:"text-base font-semibold text-foreground",sparklesCount:3,children:e("app.title")})}),g.jsx("nav",{className:"hidden items-center gap-5 md:flex",children:g.jsx(eM,{})}),g.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[g.jsx(Kte,{}),g.jsx(Yte,{}),g.jsx(Kne,{})]})]})}),g.jsx("main",{className:"w-full px-4 py-4 lg:px-6 lg:py-6",style:{viewTransitionName:"page-content"},children:g.jsx(GH,{})})]})}function xf(e){return String(e).padStart(2,"0")}function od(e){if(e==null)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=t.getFullYear(),r=xf(t.getMonth()+1),i=xf(t.getDate()),o=xf(t.getHours()),l=xf(t.getMinutes()),u=xf(t.getSeconds());return`${n}-${r}-${i} ${o}:${l}:${u}`}function Jn(e){return e==null||!Number.isFinite(e)?"":Intl.NumberFormat("en-US").format(e)}function sd(e){return e==null||!Number.isFinite(e)?"":(e/1e3).toFixed(1)}function Xne(e){return e==="success"?g.jsx(LS,{className:"size-4"}):e==="warning"?g.jsx(ZL,{className:"size-4"}):e==="error"?g.jsx(IS,{className:"size-4"}):g.jsx(XL,{className:"size-4"})}function Zne(e){switch(e){case"success":return"border-emerald-500/20 bg-emerald-500/10";case"warning":return"border-amber-500/20 bg-amber-500/10";case"error":return"border-destructive/20 bg-destructive/10";default:return"border-border/60 bg-muted/30"}}function br({variant:e="info",title:t,description:n,actionLabel:r,onAction:i,className:o}){const l=Xne(e);return g.jsxs("div",{role:e==="error"?"alert":"status",className:me("flex items-start gap-3 rounded-lg border p-3",Zne(e),o),children:[g.jsx("div",{className:"mt-0.5 shrink-0 text-foreground",children:l}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"text-sm font-medium leading-5",children:t}),n?g.jsx("div",{className:"text-muted-foreground mt-1 text-sm leading-5",children:n}):null]}),r&&i?g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:i,className:"shrink-0",children:r}):null]})}const L5=v.createContext(null),w1="magic",Qne={preference:w1,effective:w1,reducedMotion:!1,setPreference:()=>{}};function Jne({children:e}){return v.useEffect(()=>{document.documentElement.dataset.motion=w1},[]),g.jsx(L5.Provider,{value:Qne,children:e})}function I5(){const e=v.useContext(L5);if(!e)throw new Error("useMotionPreference must be used within MotionPreferenceProvider");return e}function Js({className:e,...t}){const{effective:n}=I5();return g.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:me("rounded-md",n==="off"?"bg-muted":"relative overflow-hidden bg-muted before:absolute before:inset-0 before:-translate-x-full before:bg-gradient-to-r before:from-transparent before:via-foreground/[0.07] before:to-transparent before:animate-[skeleton-shimmer_1.8s_ease-in-out_infinite] dark:before:via-foreground/[0.05]",e),...t})}var ere=Symbol("radix.slottable");function tre(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ere,t}var[ev]=El("Tooltip",[Xg]),tv=Xg(),z5="TooltipProvider",nre=700,S1="tooltip.open",[rre,zA]=ev(z5),B5=e=>{const{__scopeTooltip:t,delayDuration:n=nre,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,l=v.useRef(!0),u=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),g.jsx(rre,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(c.current),l.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback(d=>{u.current=d},[]),disableHoverableContent:i,children:o})};B5.displayName=z5;var ld="Tooltip",[ire,Ld]=ev(ld),$5=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:l,delayDuration:u}=e,c=zA(ld,e.__scopeTooltip),d=tv(t),[m,h]=v.useState(null),y=Qa(),b=v.useRef(0),w=l??c.disableHoverableContent,A=u??c.delayDuration,E=v.useRef(!1),[C,j]=Vu({prop:r,defaultProp:i??!1,onChange:M=>{M?(c.onOpen(),document.dispatchEvent(new CustomEvent(S1))):c.onClose(),o?.(M)},caller:ld}),T=v.useMemo(()=>C?E.current?"delayed-open":"instant-open":"closed",[C]),O=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,E.current=!1,j(!0)},[j]),N=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,j(!1)},[j]),_=v.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{E.current=!0,j(!0),b.current=0},A)},[A,j]);return v.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),g.jsx(t5,{...d,children:g.jsx(ire,{scope:t,contentId:y,open:C,stateAttribute:T,trigger:m,onTriggerChange:h,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayedRef.current?_():O()},[c.isOpenDelayedRef,_,O]),onTriggerLeave:v.useCallback(()=>{w?N():(window.clearTimeout(b.current),b.current=0)},[N,w]),onOpen:O,onClose:N,disableHoverableContent:w,children:n})})};$5.displayName=ld;var A1="TooltipTrigger",U5=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Ld(A1,n),o=zA(A1,n),l=tv(n),u=v.useRef(null),c=_t(t,u,i.onTriggerChange),d=v.useRef(!1),m=v.useRef(!1),h=v.useCallback(()=>d.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),g.jsx(n5,{asChild:!0,...l,children:g.jsx(Qe.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:Ve(e.onPointerMove,y=>{y.pointerType!=="touch"&&!m.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),m.current=!0)}),onPointerLeave:Ve(e.onPointerLeave,()=>{i.onTriggerLeave(),m.current=!1}),onPointerDown:Ve(e.onPointerDown,()=>{i.open&&i.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Ve(e.onFocus,()=>{d.current||i.onOpen()}),onBlur:Ve(e.onBlur,i.onClose),onClick:Ve(e.onClick,i.onClose)})})});U5.displayName=A1;var BA="TooltipPortal",[are,ore]=ev(BA,{forceMount:void 0}),V5=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Ld(BA,t);return g.jsx(are,{scope:t,forceMount:n,children:g.jsx(Cl,{present:n||o.open,children:g.jsx(Fg,{asChild:!0,container:i,children:r})})})};V5.displayName=BA;var Hu="TooltipContent",F5=v.forwardRef((e,t)=>{const n=ore(Hu,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,l=Ld(Hu,e.__scopeTooltip);return g.jsx(Cl,{present:r||l.open,children:l.disableHoverableContent?g.jsx(H5,{side:i,...o,ref:t}):g.jsx(sre,{side:i,...o,ref:t})})}),sre=v.forwardRef((e,t)=>{const n=Ld(Hu,e.__scopeTooltip),r=zA(Hu,e.__scopeTooltip),i=v.useRef(null),o=_t(t,i),[l,u]=v.useState(null),{trigger:c,onClose:d}=n,m=i.current,{onPointerInTransitChange:h}=r,y=v.useCallback(()=>{u(null),h(!1)},[h]),b=v.useCallback((w,A)=>{const E=w.currentTarget,C={x:w.clientX,y:w.clientY},j=dre(C,E.getBoundingClientRect()),T=hre(C,j),O=mre(A.getBoundingClientRect()),N=gre([...T,...O]);u(N),h(!0)},[h]);return v.useEffect(()=>()=>y(),[y]),v.useEffect(()=>{if(c&&m){const w=E=>b(E,m),A=E=>b(E,c);return c.addEventListener("pointerleave",w),m.addEventListener("pointerleave",A),()=>{c.removeEventListener("pointerleave",w),m.removeEventListener("pointerleave",A)}}},[c,m,b,y]),v.useEffect(()=>{if(l){const w=A=>{const E=A.target,C={x:A.clientX,y:A.clientY},j=c?.contains(E)||m?.contains(E),T=!pre(C,l);j?y():T&&(y(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,m,l,d,y]),g.jsx(H5,{...e,ref:o})}),[lre,ure]=ev(ld,{isInside:!1}),cre=tre("TooltipContent"),H5=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,c=Ld(Hu,n),d=tv(n),{onClose:m}=c;return v.useEffect(()=>(document.addEventListener(S1,m),()=>document.removeEventListener(S1,m)),[m]),v.useEffect(()=>{if(c.trigger){const h=y=>{y.target?.contains(c.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,m]),g.jsx(Vg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:g.jsxs(r5,{"data-state":c.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(cre,{children:r}),g.jsx(lre,{scope:n,isInside:!0,children:g.jsx(lte,{id:c.contentId,role:"tooltip",children:i||r})})]})})});F5.displayName=Hu;var q5="TooltipArrow",fre=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=tv(n);return ure(q5,n).isInside?null:g.jsx(i5,{...i,...r,ref:t})});fre.displayName=q5;function dre(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function hre(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function mre(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function pre(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],c=t[l],d=u.x,m=u.y,h=c.x,y=c.y;m>r!=y>r&&n<(h-d)*(r-m)/(y-m)+d&&(i=!i)}return i}function gre(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),vre(t)}function vre(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var yre=B5,bre=$5,xre=U5,wre=V5,K5=F5;const Sre=yre,la=bre,ua=xre,Pi=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(wre,{children:g.jsx(K5,{ref:r,sideOffset:t,className:me("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Pi.displayName=K5.displayName;function pn({className:e,...t}){return g.jsx("div",{"data-slot":"card",className:me("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Rn({className:e,...t}){return g.jsx("div",{"data-slot":"card-header",className:me("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Dn({className:e,...t}){return g.jsx("div",{"data-slot":"card-title",className:me("leading-none font-semibold",e),...t})}function xr({className:e,...t}){return g.jsx("div",{"data-slot":"card-description",className:me("text-muted-foreground text-sm",e),...t})}function Are({className:e,...t}){return g.jsx("div",{"data-slot":"card-action",className:me("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function kn({className:e,...t}){return g.jsx("div",{"data-slot":"card-content",className:me("px-6",e),...t})}const G5=v.createContext(!1),Ere=typeof window>"u"?v.useEffect:v.useLayoutEffect;function Cre({stickyHeader:e,tableWidth:t,containerWidth:n}){return!!e&&t<=n+1}function nv({className:e,glow:t,stickyHeader:n,...r}){const i=v.useRef(null),o=v.useRef(null),[l,u]=v.useState(!1),c=v.useCallback(d=>{if(!t)return;const m=d.target.closest("tr");if(!m)return;const h=m.getBoundingClientRect();m.style.setProperty("--glow-x",`${d.clientX-h.left}px`),m.style.setProperty("--glow-y",`${d.clientY-h.top}px`)},[t]);return Ere(()=>{if(!n){u(!1);return}const d=i.current,m=o.current;if(!d||!m)return;const h=()=>{u(Cre({stickyHeader:n,tableWidth:m.scrollWidth,containerWidth:d.clientWidth}))};if(h(),window.addEventListener("resize",h),typeof ResizeObserver>"u")return()=>{window.removeEventListener("resize",h)};const y=new ResizeObserver(h);return y.observe(d),y.observe(m),()=>{y.disconnect(),window.removeEventListener("resize",h)}},[n]),g.jsx("div",{ref:i,"data-slot":"table-container","data-sticky-header":l?"":void 0,className:me("relative w-full",l?"overflow-x-visible":"overflow-x-auto"),children:g.jsx(G5.Provider,{value:l,children:g.jsx("table",{ref:o,"data-slot":"table","data-glow-table":t?"":void 0,className:me("w-full caption-bottom text-sm",e),onMouseMove:t?c:void 0,...r})})})}function $A({className:e,...t}){const n=v.useContext(G5);return g.jsx("thead",{"data-slot":"table-header","data-sticky-header":n?"":void 0,className:me("[&_tr]:border-b",n&&"[&_th]:sticky [&_th]:top-[var(--app-shell-header-height,3.5rem)] [&_th]:z-20 [&_th]:border-b [&_th]:border-border [&_th]:bg-card",e),...t})}function rv({className:e,...t}){return g.jsx("tbody",{"data-slot":"table-body",className:me("[&_tr:last-child]:border-0",e),...t})}function nt({className:e,...t}){return g.jsx("tr",{"data-slot":"table-row",className:me("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function Ot({className:e,...t}){return g.jsx("th",{"data-slot":"table-head",className:me("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function ye({className:e,...t}){return g.jsx("td",{"data-slot":"table-cell",className:me("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function jre(e,t,n){return Math.min(n,Math.max(t,e))}function tM({value:e=0,className:t,indicatorClassName:n,style:r,...i}){const{effective:o}=I5(),l=Number.isFinite(e)?jre(e,0,100):0,u=o!=="off",c=o==="magic",d=o==="subtle"?"4s":"2.2s",m=Wz(l,{damping:30,stiffness:120,mass:.8}),h=Yz(m,y=>`${y}%`);return v.useEffect(()=>{m.set(l)},[l,m]),g.jsx("div",{"data-slot":"progress",role:"progressbar","aria-valuenow":Math.round(l),"aria-valuemin":0,"aria-valuemax":100,className:me("bg-muted/60 relative h-1.5 w-full overflow-hidden rounded-full ring-1 ring-border/40",t),style:{...r,"--speed":d},...i,children:g.jsx(io.div,{"data-slot":"progress-indicator",className:me("relative h-full rounded-full","[container-type:inline-size] overflow-hidden","bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%_100%]",u?"animate-rainbow":void 0,c?"before:absolute before:inset-y-0 before:left-0 before:w-3/5 before:rounded-full before:bg-[linear-gradient(90deg,transparent,rgba(255,255,255,0.55),transparent)] before:opacity-50 before:animate-shimmer-slide before:content-['']":void 0,"dark:shadow-[0_0_12px_rgba(255,255,255,0.12)] shadow-[0_0_8px_rgba(0,0,0,0.06)]",n),style:{width:u?h:`${l}%`}})})}function Tre({className:e,checked:t,defaultChecked:n,onCheckedChange:r,disabled:i,onClick:o,type:l="button",...u},c){const d=t!==void 0,[m,h]=v.useState(n??!1),y=d?t:m;function b(w){if(o?.(w),w.defaultPrevented||i)return;const A=!y;d||h(A),r?.(A)}return g.jsx("button",{ref:c,type:l,role:"switch","aria-checked":!!y,"data-state":y?"checked":"unchecked","data-disabled":i?"true":"false",className:me("inline-flex h-6 w-11 shrink-0 items-center rounded-full border border-input bg-input/30 shadow-xs transition-[color,box-shadow] outline-none","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",y?"bg-primary border-primary":"bg-input/30",e),onClick:b,disabled:i,...u,children:g.jsx("span",{"data-state":y?"checked":"unchecked",className:me("pointer-events-none inline-block size-4 rounded-full bg-background shadow-sm transition-transform",y?"translate-x-5":"translate-x-1")})})}const er=v.forwardRef(Tre);er.displayName="Switch";const Ore=({children:e,className:t,...n})=>g.jsx("div",{className:me("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",t),...n,children:e});function W0({children:e,className:t,style:n,gradientSize:r=200,gradientColor:i="#262626",gradientOpacity:o=.8,gradientFrom:l="#9E7AFF",gradientTo:u="#FE8BBB"}){const c=rd(-r),d=rd(-r),m=S_`radial-gradient(${r}px circle at ${c}px ${d}px, ${l}, ${u}, var(--border) 100%)`,h=S_`radial-gradient(${r}px circle at ${c}px ${d}px, ${i}, transparent 100%)`,y=v.useCallback(()=>{c.set(-r),d.set(-r)},[r,c,d]),b=v.useCallback(w=>{const A=w.currentTarget.getBoundingClientRect();c.set(w.clientX-A.left),d.set(w.clientY-A.top)},[c,d]);return v.useEffect(()=>{y()},[y]),v.useEffect(()=>{const w=E=>{E.relatedTarget||y()},A=()=>{document.visibilityState!=="visible"&&y()};return window.addEventListener("pointerout",w),window.addEventListener("blur",y),document.addEventListener("visibilitychange",A),()=>{window.removeEventListener("pointerout",w),window.removeEventListener("blur",y),document.removeEventListener("visibilitychange",A)}},[y]),g.jsxs("div",{className:me("group relative rounded-[inherit]",t),style:n,onPointerMove:b,onPointerLeave:y,onPointerEnter:y,children:[g.jsx(io.div,{className:"bg-border pointer-events-none absolute inset-0 rounded-[inherit] duration-300 group-hover:opacity-100",style:{background:m}}),g.jsx("div",{className:"bg-background absolute inset-px rounded-[inherit]"}),g.jsx(io.div,{className:"pointer-events-none absolute inset-px rounded-[inherit] opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:h,opacity:o}}),g.jsx("div",{className:"relative",children:e})]})}function Pre({value:e,startValue:t=0,direction:n="up",delay:r=0,className:i,decimalPlaces:o=0,...l}){const u=v.useRef(null),c=rd(n==="down"?e:t),d=Wz(c,{damping:60,stiffness:100}),m=LZ(u,{once:!0,margin:"0px"}),h=v.useRef(!1);return v.useEffect(()=>{if(m&&!h.current){h.current=!0;const y=setTimeout(()=>{c.set(n==="down"?t:e)},r*1e3);return()=>clearTimeout(y)}},[c,m,r,e,n,t]),v.useEffect(()=>{h.current&&c.set(n==="down"?t:e)},[c,e,n,t]),v.useEffect(()=>d.on("change",y=>{u.current&&(u.current.textContent=Intl.NumberFormat("en-US",{minimumFractionDigits:o,maximumFractionDigits:o}).format(Number(y.toFixed(o))))}),[d,o]),g.jsx("span",{ref:u,className:me("inline-block tracking-wider text-black tabular-nums dark:text-white",i),...l,children:t})}function Y5(e){return e.trim().replace(/^https?:\/\//i,"").replace(/\/+$/,"")}function Nre({accountType:e,enterpriseDomain:t}){const n=Y5(t);return{accountType:e,enterpriseDomain:e==="enterprise"&&n?n:void 0}}function nM(e){if(typeof document>"u"||typeof document.createElement!="function"||typeof document.execCommand!="function"||!document.body)return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",t.style.pointerEvents="none",t.style.left="-9999px",t.style.top="0",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,e.length),document.execCommand("copy")}finally{t.remove()}}function rM(e){return e instanceof Error?e:new Error(String(e))}async function _re(e){const t=globalThis.navigator?.clipboard;if(t?.writeText)try{await t.writeText(e);return}catch(n){const r=rM(n);try{if(nM(e))return}catch(i){const o=rM(i);throw new Error(`${r.message}; legacy copy fallback threw: ${o.message}`)}throw new Error(`${r.message}; legacy copy fallback was unavailable or returned false.`)}if(!nM(e))throw new Error("Clipboard unavailable")}const Mre=["individual","business","enterprise"],X0=120;function Rre(e){const t=Math.floor(e/60),n=e%60;return`${t}:${n.toString().padStart(2,"0")}`}function iM({open:e,onOpenChange:t,onSuccess:n,reauthAccountId:r}){const{t:i}=We(),[o,l]=v.useState(r?"confirm-reauth":"select-type"),[u,c]=v.useState("individual"),[d,m]=v.useState(""),[h,y]=v.useState(null),[b,w]=v.useState(null),[A,E]=v.useState(null),[C,j]=v.useState(!1),[T,O]=v.useState(null),[N,_]=v.useState(!1),M=v.useRef(null),R=v.useRef(null),B=v.useRef(0),V=v.useRef(null),H=v.useRef(0),z=v.useRef(!1),W=v.useCallback(()=>{H.current+=1,M.current&&(clearTimeout(M.current),M.current=null)},[]),Q=v.useCallback(()=>{R.current&&(clearInterval(R.current),R.current=null),O(null)},[]),se=v.useCallback(X=>{Q(),B.current=Date.now()+X*1e3,O(X),R.current=setInterval(()=>{const he=Math.max(0,Math.ceil((B.current-Date.now())/1e3));O(he),he<=0&&(Q(),W(),E(i("accountManagement.expired")),l("error"))},1e3)},[Q,W,i]),L=v.useCallback((X,he)=>{W();const oe=H.current,le=(he+1)*1e3,ve=async()=>{try{const re=await Mne(X);if(H.current!==oe)return;switch(w(re),re.status){case"completed":{if(H.current!==oe)return;W(),Q(),l("success");return}case"failed":{if(H.current!==oe)return;W(),Q(),E(re.error??i("accountManagement.authFailed")),l("error");return}case"expired":{if(H.current!==oe)return;W(),Q(),E(i("accountManagement.expired")),l("error");return}case"pending":{if(H.current!==oe)return;M.current=setTimeout(()=>{ve()},le);return}default:return}}catch(re){if(console.warn("Failed to poll auth session status.",re),H.current!==oe)return;M.current=setTimeout(()=>{ve()},le)}};M.current=setTimeout(()=>{ve()},le)},[i,Q,W]),F=v.useCallback(async()=>{!h||(b?.status??"pending")!=="pending"||V.current!==h.sessionId&&(V.current=h.sessionId,await Rne(h.sessionId).catch(()=>{}))},[h,b?.status]),$=v.useCallback(async()=>{if(!(!r||z.current)){z.current=!0,_(!0);try{E(null),w(null);const X=await kne(r);y(X),l("authorize"),window.open(X.verificationUri,"_blank"),se(X.expiresIn),L(X.sessionId,X.interval)}catch(X){E(X instanceof Error?X.message:String(X)),l("error")}finally{z.current=!1,_(!1)}}},[r,L,se]);v.useEffect(()=>{if(!e){F(),W(),R.current&&(clearInterval(R.current),R.current=null);const X=setTimeout(()=>{l(r?"confirm-reauth":"select-type"),c("individual"),m(""),y(null),w(null),E(null),j(!1),_(!1),O(null),z.current=!1},200);return()=>clearTimeout(X)}},[e,r,F,Q,W]);const ae=v.useCallback(async()=>{if(!z.current){z.current=!0,_(!0);try{E(null),w(null);const X=await _ne(Nre({accountType:u,enterpriseDomain:d}));y(X),l("authorize"),window.open(X.verificationUri,"_blank"),se(X.expiresIn),L(X.sessionId,X.interval)}catch(X){E(X instanceof Error?X.message:String(X)),l("error")}finally{z.current=!1,_(!1)}}},[u,d,L,se]),G=v.useCallback(async()=>{await F(),W(),Q(),t(!1)},[F,t,Q,W]),k=v.useCallback(async()=>{await G()},[G]),I=v.useCallback(()=>{W(),Q(),t(!1),n()},[Q,W,t,n]),q=v.useCallback(async()=>{if(h)try{await _re(h.userCode),j(!0),setTimeout(()=>j(!1),2e3)}catch(X){console.warn("Failed to copy GitHub authorization code.",X),Ut.error(i("accountManagement.copyFailed"),{description:i("accountManagement.copyManualHint")})}},[h,i]),ne=v.useCallback(()=>{E(null),y(null),w(null),Q(),l(r?"confirm-reauth":"select-type")},[r,Q]),de=v.useCallback(()=>{m(X=>Y5(X))},[]),pe=A===i("accountManagement.expired");return g.jsx(kA,{open:e,onOpenChange:X=>{if(!X){G();return}t(X)},children:g.jsxs(LA,{className:"sm:max-w-md",children:[o==="select-type"&&g.jsxs(g.Fragment,{children:[g.jsxs(Ks,{children:[g.jsx(Ys,{children:i("accountManagement.addAccount")}),g.jsx(qf,{children:i("accountManagement.selectAccountType")})]}),g.jsx("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-label":i("accountManagement.selectAccountType"),children:Mre.map(X=>g.jsxs("button",{type:"button",role:"radio","aria-checked":u===X,onClick:()=>c(X),className:`flex items-center gap-3 rounded-lg border p-3 text-left transition-colors ${u===X?"border-primary bg-primary/5":"border-border hover:bg-accent/50"}`,children:[g.jsx("div",{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-full border-2 ${u===X?"border-primary":"border-muted-foreground"}`,children:u===X&&g.jsx("div",{className:"bg-primary h-2.5 w-2.5 rounded-full"})}),g.jsxs("div",{children:[g.jsx("div",{className:"font-medium",children:i(`accountManagement.type${X.charAt(0).toUpperCase()+X.slice(1)}`)}),g.jsx("div",{className:"text-muted-foreground text-sm",children:i(`accountManagement.type${X.charAt(0).toUpperCase()+X.slice(1)}Description`)})]})]},X))}),u==="enterprise"&&g.jsxs("div",{className:"space-y-2",children:[g.jsx(St,{htmlFor:"enterprise-domain",children:i("accountManagement.enterpriseDomain")}),g.jsx(Ct,{id:"enterprise-domain",placeholder:i("accountManagement.enterpriseDomainPlaceholder"),value:d,onChange:X=>m(X.target.value),onBlur:de}),g.jsx("p",{className:"text-muted-foreground text-xs",children:i("accountManagement.enterpriseDomainHint")})]}),A&&g.jsx("p",{className:"text-destructive text-sm",role:"alert",children:A}),g.jsxs(Gs,{children:[g.jsx(Le,{variant:"outline",onClick:()=>{G()},children:i("accountManagement.cancel")}),g.jsx(Le,{onClick:ae,disabled:N,children:i("accountManagement.continue")})]})]}),o==="confirm-reauth"&&r&&g.jsxs(g.Fragment,{children:[g.jsxs(Ks,{children:[g.jsx(Ys,{children:i("accountManagement.reauthAuthorizeTitle",{id:r})}),g.jsx(qf,{children:i("accountManagement.reauthConfirmDescription")})]}),g.jsx("div",{className:"text-muted-foreground space-y-2 py-2 text-sm",children:g.jsx("p",{children:i("accountManagement.reauthConfirmHint")})}),g.jsxs(Gs,{children:[g.jsx(Le,{variant:"outline",onClick:()=>{G()},children:i("accountManagement.cancel")}),g.jsx(Le,{onClick:()=>{$()},disabled:N,children:i("accountManagement.continue")})]})]}),o==="authorize"&&h&&g.jsxs(g.Fragment,{children:[g.jsxs(Ks,{children:[g.jsx(Ys,{children:r?i("accountManagement.reauthAuthorizeTitle",{id:r}):i("accountManagement.authorizeTitle")}),r&&g.jsx(qf,{children:i("accountManagement.reauthAuthorizeDescription")})]}),g.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",children:[g.jsx("p",{className:"text-muted-foreground text-sm",children:i("accountManagement.enterCodePrompt")}),g.jsxs("div",{className:"border-primary/50 bg-muted relative w-full rounded-lg border-2 border-dashed p-4 text-center",children:[g.jsx("code",{className:"text-2xl font-bold tracking-[0.3em]",children:h.userCode}),g.jsx(Le,{variant:"ghost",size:"sm",className:"absolute right-2 top-1/2 h-7 -translate-y-1/2 px-2 text-xs",onClick:q,children:i(C?"accountManagement.copied":"accountManagement.copy")})]}),g.jsx("p",{className:"text-muted-foreground text-xs",children:i("accountManagement.autoOpenHint")}),g.jsx("a",{href:h.verificationUri,target:"_blank",rel:"noopener noreferrer",className:"text-primary text-sm underline",children:h.verificationUri}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:me("h-2 w-2 rounded-full motion-safe:animate-pulse",T!==null&&T<=X0?"bg-amber-500":"bg-primary")}),g.jsx("span",{className:me("text-sm",T!==null&&T<=X0?"text-amber-500 font-medium":"text-muted-foreground"),children:T!==null&&T>0?i("accountManagement.expiresIn",{time:Rre(T)}):i("accountManagement.waitingForAuth")})]}),T!==null&&T<=X0&&T>0&&g.jsx("p",{className:"text-amber-500 text-xs",children:i("accountManagement.expiresWarning")})]}),g.jsx(Gs,{children:g.jsx(Le,{variant:"outline",onClick:k,children:i("accountManagement.cancel")})})]}),o==="success"&&g.jsxs(g.Fragment,{children:[g.jsx(Ks,{children:g.jsx(Ys,{children:r?i("accountManagement.successReauthTitle",{id:r}):i("accountManagement.successTitle")})}),g.jsxs("div",{className:"flex flex-col items-center gap-4 py-4 motion-safe:animate-in motion-safe:fade-in-0 motion-safe:zoom-in-95 motion-safe:duration-300",children:[g.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-green-500/10",children:g.jsx(LS,{className:"size-6 text-green-500"})}),g.jsxs("div",{className:"bg-muted w-full rounded-lg p-4 text-sm",children:[g.jsxs("div",{className:"flex justify-between py-1",children:[g.jsx("span",{className:"text-muted-foreground",children:i("accountManagement.accountLabel")}),g.jsx("span",{className:"font-medium",children:b?.accountId??"—"})]}),!r&&g.jsxs("div",{className:"flex justify-between py-1",children:[g.jsx("span",{className:"text-muted-foreground",children:i("accountManagement.typeLabel")}),g.jsx("span",{children:i(`accountManagement.type${u.charAt(0).toUpperCase()+u.slice(1)}`)})]}),g.jsxs("div",{className:"flex justify-between py-1",children:[g.jsx("span",{className:"text-muted-foreground",children:i("accountManagement.statusLabel")}),g.jsx("span",{className:"text-green-500",children:i("accountManagement.statusActive")})]})]})]}),g.jsx(Gs,{children:g.jsx(Le,{onClick:I,children:i("accountManagement.done")})})]}),o==="error"&&g.jsxs(g.Fragment,{children:[g.jsx(Ks,{children:g.jsx(Ys,{children:i("accountManagement.authFailed")})}),g.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",role:"alert",children:[g.jsx("div",{className:"bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-full",children:g.jsx(IS,{className:"text-destructive size-6"})}),g.jsx("div",{className:"bg-destructive/5 border-destructive/20 w-full rounded-lg border p-4",children:g.jsx("p",{className:"text-destructive text-sm font-medium",children:A})}),g.jsx("p",{className:"text-muted-foreground text-center text-xs",children:i(pe?"accountManagement.errorExpiredHint":"accountManagement.errorRecoveryHint")})]}),g.jsxs(Gs,{children:[g.jsx(Le,{variant:"outline",onClick:()=>t(!1),children:i("accountManagement.cancel")}),g.jsx(Le,{onClick:ne,children:i("accountManagement.startOver")})]})]})]})})}function Dre({open:e,onOpenChange:t,accountId:n,onDeleted:r}){const{t:i}=We(),[o,l]=v.useState(!1),u=v.useCallback(async()=>{l(!0);try{await Dne(n),Ut.success(i("accountManagement.deleteSuccess",{id:n})),t(!1),r()}catch(c){Ut.error(c instanceof Error?c.message:String(c))}finally{l(!1)}},[n,r,t,i]);return g.jsx(kA,{open:e,onOpenChange:t,children:g.jsxs(LA,{className:"sm:max-w-md",children:[g.jsxs(Ks,{children:[g.jsx(Ys,{children:i("accountManagement.deleteTitle")}),g.jsx(qf,{children:i("accountManagement.deleteConfirmation",{id:n})})]}),g.jsxs(Gs,{children:[g.jsx(Le,{variant:"outline",onClick:()=>t(!1),disabled:o,children:i("accountManagement.cancel")}),g.jsx(Le,{variant:"destructive",onClick:u,disabled:o,children:o?g.jsxs(g.Fragment,{children:[g.jsx($u,{className:"size-4 animate-spin"}),i("accountManagement.deleting")]}):i("accountManagement.delete")})]})]})})}function wf(e){return e.reduce((t,n)=>t+(n??0),0)}function aM(e,t){if(e==="this_month"){const i=new Date(t),o=new Date(i.getFullYear(),i.getMonth(),1).getTime();return{sinceMs:o,fromMs:String(o),toMs:String(t)}}const n=Number(e),r=t-n;return{sinceMs:r,fromMs:String(r),toMs:String(t)}}function oM(e){return Math.min(100,Math.max(0,e))}function sM(e){return Jn(e)||"—"}function kre(e){let t=0,n=0;for(const r of e){const i=r.stats?.request_count??0,o=r.stats?.avg_duration_ms??0;i>0&&o>0&&(t+=i,n+=i*o)}return t>0?n/t/1e3:0}function Z0({value:e,decimalPlaces:t=0}){return g.jsx(Pre,{value:e,decimalPlaces:t})}function Q0({label:e,tooltip:t}){return t?g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("div",{className:"text-muted-foreground cursor-help text-xs underline decoration-dashed decoration-current/30 underline-offset-2",children:e})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:t})})]}):g.jsx("div",{className:"text-muted-foreground text-xs",children:e})}const kr=[null,null,"hidden md:table-cell","hidden lg:table-cell",null,null,"hidden xl:table-cell","hidden xl:table-cell","hidden lg:table-cell",null,null];function Lre({rows:e}){const t=kr.length;return g.jsx(g.Fragment,{children:Array.from({length:e}).map((n,r)=>g.jsx(nt,{children:Array.from({length:t}).map((i,o)=>g.jsx(ye,{className:me("py-3",kr[o]),children:g.jsx(Js,{className:o===0?"h-4 w-56":"h-4 w-24"})},o))},r))})}function Ire(){const{t:e}=We(),[t,n]=v.useState("this_month"),[r,i]=v.useState(!1),[o,l]=v.useState(null),[u,c]=v.useState(""),[d,m]=v.useState("requests"),[h,y]=v.useState([]),[b,w]=v.useState(null),[A,E]=v.useState(!1),[C,j]=v.useState(!1),[T,O]=v.useState(""),[N,_]=v.useState(!1),[M,R]=v.useState(""),B=v.useRef(null),V=v.useRef(!1),H=v.useRef(!1),z=v.useCallback(async()=>{if(V.current){H.current=!0;return}V.current=!0,i(!0),l(null);try{const I=Date.now(),{sinceMs:q}=aM(t,I),[ne,de]=await Promise.all([Ene({sinceMs:q,includeStats:!0}),x1()]);y(ne.items),w(de)}catch(I){const q=I instanceof di?I.message:String(I);l(q),Ut.error(jt.t("accountsPage.loadFailedTitle"),{description:q})}finally{V.current=!1,i(!1),H.current&&(H.current=!1,z())}},[t]);v.useEffect(()=>{z()},[z]);const[W,Q]=v.useState(0);v.useEffect(()=>{let I=!1;if(B.current&&(clearTimeout(B.current),B.current=null),W>0){const q=()=>{I||(B.current=setTimeout(async()=>{if(V.current){q();return}try{await z()}finally{q()}},W))};q()}return()=>{I=!0,B.current&&(clearTimeout(B.current),B.current=null)}},[W,z]),v.useEffect(()=>{function I(q){const ne=q.target?.tagName;ne==="INPUT"||ne==="TEXTAREA"||ne==="SELECT"||q.target?.closest("[role=dialog]")||q.metaKey||q.ctrlKey||q.altKey||(q.key==="r"||q.key==="R"?(q.preventDefault(),z()):(q.key==="n"||q.key==="N")&&(q.preventDefault(),E(!0)))}return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[z]);function se(I){return`"${(/^[=+\-@]/u.test(I)?`'${I}`:I).replaceAll('"','""')}"`}const L=v.useCallback(()=>{if(h.length===0)return;const I=["account_id","status","account_type","requests","errors","tokens","avg_duration_s","last_request"],q=h.map(he=>[he.account_id,he.runtime?.failed?"failed":"ok",he.account_type??"free",String(he.stats?.request_count??0),String(he.stats?.error_count??0),String(he.stats?.tokens_total??0),sd(he.stats?.avg_duration_ms),he.stats?.last_request_at_ms?new Date(he.stats.last_request_at_ms).toISOString():""]),ne=[I.join(","),...q.map(he=>he.map(oe=>se(oe)).join(","))].join(`
|
|
64
|
-
`),de=new Blob([ne],{type:"text/csv;charset=utf-8"}),pe=URL.createObjectURL(de),X=document.createElement("a");X.href=pe,X.download=`accounts-${new Date().toISOString().slice(0,10)}.csv`,X.click(),URL.revokeObjectURL(pe),Ut.success(e("accountsPage.exportSuccess"))},[h,e]),F=v.useMemo(()=>{const I=h.length,q=h.filter(De=>De.runtime?.failed).length,ne=wf(h.map(De=>De.stats?.request_count)),de=wf(h.map(De=>De.stats?.error_count)),pe=wf(h.map(De=>De.stats?.tokens_total)),X=kre(h),he=ne>0?de/ne*100:0,oe=ne>0?pe/ne:0,le=h.filter(De=>De.runtime&&!De.runtime.unlimited&&De.runtime.entitlement!=null),ve=wf(le.map(De=>De.runtime?.entitlement)),re=wf(le.map(De=>De.runtime?.remaining)),Be=ve-re,Pe=ve>0?oM(Be/ve*100):0,Fe=h.filter(De=>De.runtime?.unlimited).length;return{totalAccounts:I,failedAccounts:q,totalRequests:ne,totalErrors:de,totalTokens:pe,avgDurationSeconds:X,errorRatePct:he,tokensPerRequest:oe,totalPremiumEntitlement:ve,totalPremiumRemaining:re,totalPremiumUsed:Be,premiumUsedPercent:Pe,unlimitedAccountCount:Fe}},[h]),$=v.useMemo(()=>{const I=u.trim().toLowerCase(),ne=[...I?h.filter(de=>de.account_id.toLowerCase().includes(I)):h];return ne.sort((de,pe)=>d==="account"?de.account_id.localeCompare(pe.account_id):d==="last_req"?(pe.stats?.last_request_at_ms??0)-(de.stats?.last_request_at_ms??0):d==="errors"?(pe.stats?.error_count??0)-(de.stats?.error_count??0):d==="tokens"?(pe.stats?.tokens_total??0)-(de.stats?.tokens_total??0):(pe.stats?.request_count??0)-(de.stats?.request_count??0)),ne},[h,u,d]),ae=Date.now(),{fromMs:G,toMs:k}=aM(t,ae);return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-muted-foreground text-sm",children:e("accountsPage.statsWindowLabel")}),g.jsxs(In,{value:t,onValueChange:I=>n(I),children:[g.jsx(Bn,{size:"sm",className:"w-40",children:g.jsx(zn,{})}),g.jsxs($n,{children:[g.jsx(Te,{value:"86400000",children:e("accountsPage.window.last24h")}),g.jsx(Te,{value:"604800000",children:e("accountsPage.window.last7d")}),g.jsx(Te,{value:"this_month",children:e("accountsPage.window.thisMonth")})]})]})]}),g.jsxs(Le,{variant:"outline",size:"sm",onClick:z,disabled:r,children:[g.jsx(wp,{className:me("size-4",r&&"animate-spin")}),e(r?"common.refreshing":"common.refresh")]}),g.jsxs("div",{className:"flex items-center gap-2",children:[W>0&&g.jsxs("span",{className:"relative flex h-2 w-2",children:[g.jsx("span",{className:"bg-primary absolute inline-flex h-full w-full motion-safe:animate-ping rounded-full opacity-75"}),g.jsx("span",{className:"bg-primary relative inline-flex h-2 w-2 rounded-full"})]}),g.jsx("span",{className:"text-muted-foreground text-sm",children:e("accountsPage.autoRefreshLabel")}),g.jsxs(In,{value:String(W),onValueChange:I=>Q(Number(I)),children:[g.jsx(Bn,{size:"sm",className:"w-24",children:g.jsx(zn,{})}),g.jsxs($n,{children:[g.jsx(Te,{value:"0",children:e("accountsPage.autoRefresh.off")}),g.jsx(Te,{value:"30000",children:e("accountsPage.autoRefresh.30s")}),g.jsx(Te,{value:"60000",children:e("accountsPage.autoRefresh.60s")}),g.jsx(Te,{value:"300000",children:e("accountsPage.autoRefresh.5m")})]})]})]}),g.jsxs(IA,{size:"sm",onClick:()=>E(!0),children:[g.jsx(QP,{className:"size-4"}),e("accountManagement.addAccount")]}),g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx(Le,{variant:"ghost",size:"sm",onClick:L,disabled:h.length===0,"aria-label":e("accountsPage.exportCsvAria"),children:g.jsx(WL,{className:"size-4"})})}),g.jsx(Pi,{children:e("accountsPage.exportCsv")})]}),g.jsx("div",{className:"text-muted-foreground ml-auto text-xs opacity-60",children:b?.dbPath?e("accountsPage.dbInfo",{version:b.userVersion??"?",path:b.dbPath}):null})]}),o?g.jsx(br,{variant:"error",title:e("accountsPage.loadFailedTitle"),description:o,actionLabel:e("common.retry"),onAction:()=>{z()}}):null,g.jsxs(Ore,{className:"auto-rows-min grid-cols-1 gap-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 2xl:grid-cols-9",children:[[{label:e("nav.accounts"),tooltip:e("accountsPage.kpiTooltip.accounts"),value:F.totalAccounts},{label:e("common.failed"),tooltip:e("accountsPage.kpiTooltip.failed"),value:F.failedAccounts}].map((I,q)=>g.jsx(W0,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-2 rounded-xl fill-mode-backwards",style:{animationDelay:`${q*60}ms`,animationDuration:"400ms"},children:g.jsxs("div",{className:"p-4",children:[g.jsx(Q0,{label:I.label,tooltip:I.tooltip}),g.jsx("div",{className:"mt-1 flex items-baseline gap-1 text-2xl font-semibold",children:g.jsx(Z0,{value:I.value})})]})},I.label)),g.jsx(W0,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-2 rounded-xl fill-mode-backwards",style:{animationDelay:"120ms",animationDuration:"400ms"},children:g.jsxs("div",{className:"p-4",children:[g.jsx(Q0,{label:e("accountsPage.kpi.premiumUsage"),tooltip:e("accountsPage.kpiTooltip.premiumUsage")}),F.unlimitedAccountCount>0&&F.totalPremiumEntitlement===0?g.jsx("div",{className:"mt-1",children:g.jsx(rn,{variant:"secondary",children:e("common.unlimited")})}):g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"mt-1 flex items-baseline gap-1 text-2xl font-semibold",children:[g.jsx(Z0,{value:F.totalPremiumUsed}),g.jsxs("span",{className:"text-muted-foreground text-sm",children:["/ ",Jn(F.totalPremiumEntitlement)]})]}),g.jsx(tM,{value:F.premiumUsedPercent,className:"mt-1.5 h-1.5","aria-label":e("accountsPage.kpi.premiumUsageAria")})]})]})}),[{label:e("nav.requests"),tooltip:e("accountsPage.kpiTooltip.requests"),value:F.totalRequests},{label:e("common.errors"),tooltip:e("accountsPage.kpiTooltip.errors"),value:F.totalErrors},{label:e("common.errorRate"),tooltip:e("accountsPage.kpiTooltip.errorRate"),value:F.errorRatePct,decimal:1,suffix:"%"},{label:e("common.tokensPerRequest"),tooltip:e("accountsPage.kpiTooltip.tokensPerRequest"),value:F.tokensPerRequest,decimal:1},{label:e("common.tokens"),tooltip:e("accountsPage.kpiTooltip.tokens"),value:F.totalTokens},{label:e("common.avgDurationMs"),tooltip:e("accountsPage.kpiTooltip.avgDuration"),value:F.avgDurationSeconds,decimal:1}].map((I,q)=>g.jsx(W0,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-2 rounded-xl fill-mode-backwards",style:{animationDelay:`${(q+3)*60}ms`,animationDuration:"400ms"},children:g.jsxs("div",{className:"p-4",children:[g.jsx(Q0,{label:I.label,tooltip:I.tooltip}),g.jsxs("div",{className:"mt-1 flex items-baseline gap-1 text-2xl font-semibold",children:[g.jsx(Z0,{value:I.value,decimalPlaces:I.decimal??0}),I.suffix?g.jsx("span",{className:"text-muted-foreground text-sm",children:I.suffix}):null]})]})},I.label))]}),!r&&h.length===0?g.jsx(pn,{className:"py-12",children:g.jsxs(kn,{className:"flex flex-col items-center gap-4 text-center",children:[g.jsx("div",{className:"bg-muted flex h-14 w-14 items-center justify-center rounded-full",children:g.jsx(r7,{className:"text-muted-foreground size-7"})}),g.jsxs("div",{className:"space-y-1.5",children:[g.jsx("h3",{className:"text-lg font-semibold",children:e("accountsPage.empty.noAccountsTitle")}),g.jsx("p",{className:"text-muted-foreground mx-auto max-w-sm text-sm",children:e("accountsPage.empty.noAccountsDescription")})]}),g.jsxs(Le,{size:"lg",onClick:()=>E(!0),className:"mt-2",children:[g.jsx(QP,{className:"size-4"}),e("accountsPage.empty.noAccountsCta")]})]})}):g.jsxs(pn,{className:"gap-4 py-4",children:[g.jsxs(Rn,{className:"px-4",children:[g.jsx(Dn,{children:e("nav.accounts")}),g.jsx(xr,{className:"hidden sm:block",children:e("accountsPage.tableDescription")})]}),g.jsxs(kn,{className:"space-y-3 px-4",children:[g.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[g.jsx(Ct,{placeholder:e("accountsPage.filterAccountPlaceholder"),value:u,onChange:I=>c(I.target.value),className:"h-8 sm:max-w-xs"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-muted-foreground text-sm",children:e("accountsPage.sortByLabel")}),g.jsxs(In,{value:d,onValueChange:I=>m(I),children:[g.jsx(Bn,{size:"sm",className:"w-40",children:g.jsx(zn,{})}),g.jsxs($n,{align:"end",children:[g.jsx(Te,{value:"requests",children:e("nav.requests")}),g.jsx(Te,{value:"errors",children:e("common.errors")}),g.jsx(Te,{value:"tokens",children:e("common.tokens")}),g.jsx(Te,{value:"last_req",children:e("common.lastRequest")}),g.jsx(Te,{value:"account",children:e("common.account")})]})]}),g.jsxs("div",{className:"text-muted-foreground text-sm tabular-nums",children:[$.length,"/",h.length]})]})]}),g.jsxs(nv,{glow:!0,stickyHeader:!0,className:"[&_th]:h-9 [&_td]:py-1.5",children:[g.jsx($A,{children:g.jsxs(nt,{children:[g.jsx(Ot,{children:e("common.account")}),g.jsx(Ot,{children:e("common.status")}),g.jsx(Ot,{className:me(kr[2]),children:e("accountsPage.type")}),g.jsx(Ot,{className:me(kr[3]),children:g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e("accountsPage.premiumReq")})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:e("accountsPage.tableTooltip.premiumReq")})})]})}),g.jsx(Ot,{children:e("nav.requests")}),g.jsx(Ot,{children:e("common.errors")}),g.jsx(Ot,{className:me(kr[6]),children:e("common.tokens")}),g.jsx(Ot,{className:me(kr[7]),children:g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e("common.avgMs")})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:e("accountsPage.tableTooltip.avgMs")})})]})}),g.jsx(Ot,{className:me(kr[8]),children:e("common.lastRequest")}),g.jsx(Ot,{children:e("common.enabled")}),g.jsx(Ot,{className:"text-right",children:e("common.actions")})]})}),g.jsx(rv,{children:r&&h.length===0?g.jsx(Lre,{rows:6}):$.length===0?g.jsx(nt,{children:g.jsx(ye,{colSpan:kr.length,children:g.jsx(br,{variant:"info",title:e("accountsPage.empty.noMatchesTitle"),description:e("accountsPage.empty.noMatchesDescription"),actionLabel:u.trim()?e("common.clearFilter"):void 0,onAction:u.trim()?()=>c(""):void 0})})}):g.jsx(uA,{initial:!1,children:$.map(I=>{const q=I.runtime?.failed,ne=q?g.jsx(rn,{variant:"destructive",children:e("common.statusFailed")}):g.jsx(rn,{variant:"secondary",children:e("common.statusOk")}),de=I.runtime?.entitlement,pe=I.runtime?.remaining,X=de!=null&&pe!=null?de-pe:void 0,he=de!=null&&de>0&&X!=null?X/de*100:void 0,oe=he!=null&&Number.isFinite(he)?oM(he):void 0,le=I.runtime?.unlimited?g.jsx(rn,{variant:"secondary",children:e("common.unlimited")}):g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-xs whitespace-nowrap",children:[g.jsxs("div",{className:"flex items-baseline gap-1",children:[g.jsx("span",{className:"text-muted-foreground",children:e("common.used")}),g.jsx("span",{className:"tabular-nums font-medium",children:sM(X)})]}),g.jsxs("div",{className:"flex items-baseline gap-1",children:[g.jsx("span",{className:"text-muted-foreground",children:e("common.remaining")}),g.jsx("span",{className:"tabular-nums font-medium",children:sM(pe)})]})]}),oe!=null?g.jsx(tM,{value:oe,className:"h-1.5","aria-label":e("accountsPage.premiumQuotaUsedAria")}):null]}),ve=I.stats?.last_request_at_ms?od(I.stats.last_request_at_ms):"";return g.jsxs(io.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeOut"},"data-slot":"table-row",className:me("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",I.runtime?.enabled===!1&&"text-muted-foreground opacity-60"),children:[g.jsx(ye,{className:"font-mono",children:g.jsx(es,{to:`/requests?account_id=${encodeURIComponent(I.account_id)}&from_ms=${G}&to_ms=${k}`,className:"underline decoration-border hover:decoration-foreground",children:I.account_id})}),g.jsx(ye,{children:g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("div",{children:ne}),q&&I.runtime?.failureReason?g.jsx("div",{className:"text-muted-foreground text-xs",children:I.runtime.failureReason}):null]})}),g.jsx(ye,{className:me(kr[2]),children:g.jsx(rn,{variant:"outline",children:e(`accountsPage.accountType.${I.account_type??"free"}`,e("accountsPage.accountType.free"))})}),g.jsx(ye,{className:me(kr[3],"whitespace-normal"),children:le}),g.jsx(ye,{children:Jn(I.stats?.request_count)}),g.jsx(ye,{children:Jn(I.stats?.error_count)}),g.jsx(ye,{className:me(kr[6]),children:Jn(I.stats?.tokens_total)}),g.jsx(ye,{className:me(kr[7]),children:sd(I.stats?.avg_duration_ms)}),g.jsx(ye,{className:me(kr[8],"font-mono text-xs"),children:ve}),g.jsx(ye,{children:g.jsx(er,{checked:I.runtime?.enabled!==!1,onCheckedChange:async re=>{const Be=I.runtime?.enabled!==!1;y(Pe=>Pe.map(Fe=>Fe.account_id===I.account_id?{...Fe,runtime:{...Fe.runtime,enabled:re}}:Fe));try{await Lne(I.account_id,{enabled:re})}catch{y(Pe=>Pe.map(Fe=>Fe.account_id===I.account_id?{...Fe,runtime:{...Fe.runtime,enabled:Be}}:Fe)),Ut.error(e("accountsPage.enabledToggleFailed"))}}})}),g.jsx(ye,{className:"text-right",children:g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(Le,{variant:q?"default":"ghost",size:"sm",className:"h-8 px-2.5 text-xs","aria-label":e("accountManagement.reauthAriaLabel",{id:I.account_id}),onClick:()=>{R(I.account_id),_(!0)},children:e("accountManagement.reauth")}),g.jsx(Le,{variant:"ghost",size:"sm",className:"text-destructive h-8 px-2.5 text-xs","aria-label":e("accountManagement.deleteAriaLabel",{id:I.account_id}),onClick:()=>{O(I.account_id),j(!0)},children:e("accountManagement.delete")})]})})]},I.account_id)})})})]})]})]}),g.jsx(iM,{open:A,onOpenChange:E,onSuccess:z}),g.jsx(iM,{open:N,onOpenChange:_,onSuccess:z,reauthAccountId:M}),g.jsx(Dre,{open:C,onOpenChange:j,accountId:T,onDeleted:z})]})}const Nu=[null,"hidden lg:table-cell","hidden lg:table-cell",null,null,null],W5=Nu.length;function lM(e){return e==null||!Number.isFinite(e)||e<=0?"":e>=1e3?`${Math.floor(e/1e3)}K`:String(Math.floor(e))}function uM(e){return e==null||!Number.isFinite(e)||e<=0?"—":String(Math.floor(e))}function _m(e,t,n){const r=e?.trim(),i=t?.trim();if(!r&&!i)return 0;if(!r)return 1;if(!i)return-1;const o=r.toLowerCase().localeCompare(i.toLowerCase());return n==="asc"?o:-o}function J0(e,t,n){const r=typeof e=="number"&&Number.isFinite(e)?e:null,i=typeof t=="number"&&Number.isFinite(t)?t:null;if(r==null&&i==null)return 0;if(r==null)return 1;if(i==null)return-1;const o=r-i;return o===0?0:n==="asc"?o:-o}function cM(e){if(!e||e.length===0)return null;const t=e.map(n=>n.trim().toLowerCase()).filter(n=>n.length>0).sort();return t.length>0?t.join("|"):null}function fM(e){const t=[];return e.tool_calls&&t.push("tool_calls"),e.vision&&t.push("vision"),e.structured_outputs&&t.push("structured_outputs"),e.streaming&&t.push("streaming"),e.parallel_tool_calls&&t.push("parallel_tool_calls"),t.length>0?t.join("|"):null}function pu({columnKey:e,label:t,tooltip:n,sortKey:r,sortDir:i,onSort:o,className:l}){const u=r===e;let c="none";return u&&(c=i==="asc"?"ascending":"descending"),g.jsx(Ot,{"aria-sort":c,className:l,children:n?g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsxs("button",{type:"button",onClick:()=>o(e),className:me("flex w-full cursor-pointer select-none items-center gap-1 text-left","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[g.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:t}),u?g.jsx("span",{className:"text-muted-foreground",children:i==="asc"?"↑":"↓"}):null]})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:n})})]}):g.jsxs("button",{type:"button",onClick:()=>o(e),className:me("flex w-full cursor-pointer select-none items-center gap-1 text-left","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[g.jsx("span",{children:t}),u?g.jsx("span",{className:"text-muted-foreground",children:i==="asc"?"↑":"↓"}):null]})})}function zre({rows:e}){return g.jsx(g.Fragment,{children:Array.from({length:e}).map((t,n)=>g.jsx(nt,{children:Array.from({length:W5}).map((r,i)=>g.jsx(ye,{className:me("py-3",Nu[i]),children:g.jsx(Js,{className:i===0?"h-4 w-48":"h-4 w-28"})},i))},n))})}function Bre({supports:e}){const{t}=We(),n=[];return e.tool_calls&&n.push({key:"tool_calls",label:t("modelsPage.features.tools"),tooltip:t("modelsPage.featureTooltip.tools")}),e.vision&&n.push({key:"vision",label:t("modelsPage.features.vision"),tooltip:t("modelsPage.featureTooltip.vision")}),e.structured_outputs&&n.push({key:"structured_outputs",label:t("modelsPage.features.structuredOutputs"),tooltip:t("modelsPage.featureTooltip.structuredOutputs")}),e.streaming&&n.push({key:"streaming",label:t("modelsPage.features.streaming"),tooltip:t("modelsPage.featureTooltip.streaming")}),e.parallel_tool_calls&&n.push({key:"parallel_tool_calls",label:t("modelsPage.features.parallelTools"),tooltip:t("modelsPage.featureTooltip.parallelTools")}),n.length===0?g.jsx("span",{className:"text-muted-foreground",children:"—"}):g.jsx("div",{className:"flex flex-wrap gap-1 whitespace-normal",children:n.map(r=>g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("button",{type:"button",className:"focus-visible:outline-none",children:g.jsx(rn,{variant:"outline",className:"cursor-help text-xs",children:r.label})})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:r.tooltip})})]},r.key))})}function $re({endpoints:e}){return!e||e.length===0?g.jsx("span",{className:"text-muted-foreground",children:"—"}):g.jsx("div",{className:"flex flex-wrap gap-1 whitespace-normal",children:e.map(t=>g.jsx(rn,{variant:"secondary",className:"font-mono text-xs",children:t},t))})}function Ure({limits:e}){const{t}=We(),n=lM(e.max_prompt_tokens),r=lM(e.max_output_tokens),i=t("modelsPage.contextTooltip",{input:uM(e.max_prompt_tokens),output:uM(e.max_output_tokens)});return g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsxs("button",{type:"button",className:"flex cursor-help items-center gap-3 tabular-nums focus-visible:outline-none",children:[g.jsx("span",{className:"text-muted-foreground text-xs",children:t("modelsPage.contextInputLabel")}),g.jsx("span",{children:n||"—"}),g.jsx("span",{className:"text-muted-foreground text-xs",children:t("modelsPage.contextOutputLabel")}),g.jsx("span",{children:r||"—"})]})}),g.jsx(Pi,{side:"bottom",className:"max-w-72",children:g.jsx("p",{children:i})})]})}const dM=3;function Vre({id:e,aliases:t}){const{t:n}=We(),[r,i]=v.useState(!1),o=r?t:t.slice(0,dM),l=t.length-dM;return g.jsxs("div",{className:"flex flex-wrap items-center gap-1 whitespace-normal",children:[g.jsx("span",{className:"max-w-[14rem] truncate font-mono text-xs",title:e,children:e}),o.map(u=>g.jsx(rn,{variant:"outline",className:"max-w-[10rem] truncate font-mono text-xs",title:u,children:u},u)),!r&&l>0&&g.jsx("button",{type:"button",onClick:()=>i(!0),className:"text-muted-foreground hover:text-foreground cursor-pointer text-xs transition-colors",children:n("modelsPage.aliasesMore",{count:l})})]})}function Fre({billing:e}){const{t}=We(),n=e?.multiplier;return n==null?g.jsx("span",{className:"text-muted-foreground",children:"—"}):g.jsxs("div",{className:"flex items-center gap-2 tabular-nums",children:[g.jsxs("span",{children:[n,"x"]}),e?.is_premium?g.jsx(rn,{variant:"default",className:"text-xs",children:t("modelsPage.badges.premium")}):null]})}function Hre(){const{t:e}=We(),[t,n]=v.useState(!0),[r,i]=v.useState(null),[o,l]=v.useState([]),[u,c]=v.useState(""),[d,m]=v.useState(new Set),[h,y]=v.useState({key:null,dir:"asc"}),{key:b,dir:w}=h,A=v.useCallback(N=>{y(_=>_.key===N?{key:_.key,dir:_.dir==="asc"?"desc":"asc"}:{key:N,dir:"asc"})},[]),E=v.useCallback(N=>{m(_=>{const M=new Set(_);return M.has(N)?M.delete(N):M.add(N),M})},[]),C=v.useMemo(()=>{let N=0,_=0;for(const M of o)M.billing?.is_premium&&N++,M.preview&&_++;return{total:o.length,premium:N,preview:_}},[o]),j=v.useMemo(()=>{let N=o;const _=u.trim().toLowerCase();return _&&(N=N.filter(M=>M.name.toLowerCase().includes(_)||M.id.toLowerCase().includes(_)||M.aliases.some(R=>R.toLowerCase().includes(_)))),d.has("premium")&&(N=N.filter(M=>M.billing?.is_premium)),d.has("preview")&&(N=N.filter(M=>M.preview)),N},[o,u,d]),T=v.useMemo(()=>b?[...j].sort((N,_)=>{let M=0;switch(b){case"name":M=_m(N.name,_.name,w);break;case"endpoints":M=_m(cM(N.supported_endpoints),cM(_.supported_endpoints),w);break;case"originalId":M=_m(N.id,_.id,w);break;case"context":M=J0(N.capabilities.limits.max_prompt_tokens,_.capabilities.limits.max_prompt_tokens,w),M===0&&(M=J0(N.capabilities.limits.max_output_tokens,_.capabilities.limits.max_output_tokens,w));break;case"features":M=_m(fM(N.capabilities.supports),fM(_.capabilities.supports),w);break;case"multiplier":M=J0(N.billing?.multiplier,_.billing?.multiplier,w);break;default:M=0}return M!==0?M:N.id.localeCompare(_.id)}):j,[j,w,b]),O=v.useCallback(async()=>{n(!0),i(null);try{const N=await Pne();l(N.items)}catch(N){const _=N instanceof di?N.message:String(N);i(_),Ut.error(jt.t("modelsPage.toast.loadFailed"),{description:_})}finally{n(!1)}},[]);return v.useEffect(()=>{O()},[O]),g.jsxs("div",{className:"space-y-4",children:[r?g.jsx(br,{variant:"error",title:e("modelsPage.loadFailedTitle"),description:r,actionLabel:e("common.retry"),onAction:()=>{O()}}):null,g.jsxs(pn,{children:[g.jsx(Rn,{children:g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{children:[g.jsx(Dn,{children:e("modelsPage.title")}),g.jsx(xr,{children:e("modelsPage.description")})]}),g.jsxs(Le,{variant:"outline",size:"sm",onClick:()=>{O()},disabled:t,children:[t?g.jsx($u,{className:"size-4 motion-safe:animate-spin"}):g.jsx(wp,{className:"size-4"}),e("common.refresh")]})]})}),g.jsxs(kn,{className:"space-y-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsxs("div",{className:"relative max-w-64 flex-1",children:[g.jsx(Q9,{className:"text-muted-foreground pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2"}),g.jsx(Ct,{value:u,onChange:N=>c(N.target.value),placeholder:e("modelsPage.searchPlaceholder"),"aria-label":e("modelsPage.searchAriaLabel"),className:"pl-8"})]}),g.jsx(rn,{asChild:!0,variant:d.has("premium")?"default":"outline",children:g.jsxs("button",{type:"button","aria-pressed":d.has("premium"),className:"cursor-pointer select-none transition-colors",onClick:()=>E("premium"),children:[e("modelsPage.badges.premium"),C.premium>0?` (${C.premium})`:""]})}),g.jsx(rn,{asChild:!0,variant:d.has("preview")?"default":"outline",children:g.jsxs("button",{type:"button","aria-pressed":d.has("preview"),className:"cursor-pointer select-none transition-colors",onClick:()=>E("preview"),children:[e("modelsPage.badges.preview"),C.preview>0?` (${C.preview})`:""]})}),g.jsx("span",{className:me("text-muted-foreground ml-auto text-sm tabular-nums",!t&&o.length>0&&"motion-safe:animate-in motion-safe:fade-in-0"),children:j.length===C.total?e("modelsPage.totalCount",{count:C.total}):e("modelsPage.filteredCount",{filtered:j.length,total:C.total})})]}),g.jsxs(nv,{glow:!0,stickyHeader:!0,children:[g.jsx($A,{children:g.jsxs(nt,{children:[g.jsx(pu,{columnKey:"name",label:e("modelsPage.columns.name"),tooltip:e("modelsPage.columnTooltip.name"),sortKey:b,sortDir:w,onSort:A}),g.jsx(pu,{columnKey:"endpoints",label:e("modelsPage.columns.endpoints"),tooltip:e("modelsPage.columnTooltip.endpoints"),sortKey:b,sortDir:w,onSort:A,className:Nu[1]}),g.jsx(pu,{columnKey:"originalId",label:e("modelsPage.columns.originalId"),tooltip:e("modelsPage.columnTooltip.originalId"),sortKey:b,sortDir:w,onSort:A,className:Nu[2]}),g.jsx(pu,{columnKey:"context",label:e("modelsPage.columns.context"),tooltip:e("modelsPage.columnTooltip.context"),sortKey:b,sortDir:w,onSort:A}),g.jsx(pu,{columnKey:"features",label:e("modelsPage.columns.features"),tooltip:e("modelsPage.columnTooltip.features"),sortKey:b,sortDir:w,onSort:A}),g.jsx(pu,{columnKey:"multiplier",label:e("modelsPage.columns.multiplier"),tooltip:e("modelsPage.columnTooltip.multiplier"),sortKey:b,sortDir:w,onSort:A})]})}),g.jsxs(rv,{children:[t&&o.length===0&&g.jsx(zre,{rows:10}),!t&&j.length===0&&g.jsx(nt,{children:g.jsx(ye,{colSpan:W5,children:g.jsx(br,{variant:"info",title:e("modelsPage.empty.title"),description:o.length>0?e("modelsPage.empty.noMatchesDescription"):e("modelsPage.empty.description")})})}),g.jsx(uA,{initial:!1,children:j.length>0&&T.map(N=>g.jsxs(io.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeOut"},"data-slot":"table-row",className:"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",children:[g.jsx(ye,{className:"max-w-[16rem]",children:g.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[g.jsx("span",{className:"truncate",title:N.name,children:N.name}),N.preview?g.jsx(rn,{variant:"outline",className:"shrink-0 text-xs",children:e("modelsPage.badges.preview")}):null]})}),g.jsx(ye,{className:me("max-w-[26rem]",Nu[1]),children:g.jsx($re,{endpoints:N.supported_endpoints})}),g.jsx(ye,{className:me("max-w-[26rem]",Nu[2]),children:g.jsx(Vre,{id:N.id,aliases:N.aliases})}),g.jsx(ye,{children:g.jsx(Ure,{limits:N.capabilities.limits})}),g.jsx(ye,{children:g.jsx(Bre,{supports:N.capabilities.supports})}),g.jsx(ye,{children:g.jsx(Fre,{billing:N.billing})})]},N.id))})]})]})]})]})]})}function qre(){const{t:e}=We();return g.jsx(io.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.25,ease:[.25,.1,.25,1]},children:g.jsx(pn,{children:g.jsxs(Rn,{children:[g.jsx(Dn,{children:e("notFound.title")}),g.jsx(xr,{children:e("notFound.description")})]})})})}const Mm=200;function Kre(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Lp(e,t){const n=t?.trim();if(!n)return e;const r=e.toLowerCase(),i=n.toLowerCase(),o=[];let l=0;for(;l<e.length;){const u=r.indexOf(i,l);if(u===-1){o.push(e.slice(l));break}u>l&&o.push(e.slice(l,u)),o.push(g.jsx("mark",{className:"bg-accent/50 text-foreground rounded px-0.5",children:e.slice(u,u+i.length)},`${u}-${i}`)),l=u+i.length}return g.jsx(g.Fragment,{children:o})}function Gre(e,t,n){if(e==null)return g.jsx("span",{className:"text-muted-foreground",children:"null"});if(typeof e=="string")return g.jsxs("span",{className:"text-foreground",children:['"',Lp(e,t),'"']});if(typeof e=="number"){const r=String(e);if(!n||!/_at_ms$/.test(n))return g.jsx("span",{className:"text-foreground",children:r});if(e<9466848e5||e>41024448e5)return g.jsx("span",{className:"text-foreground",children:r});const l=od(e);return l?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-foreground",title:l,children:r}),g.jsxs("span",{className:"text-muted-foreground ml-1",children:["(",Lp(l,t),")"]})]}):g.jsx("span",{className:"text-foreground",children:r})}return typeof e=="boolean"?g.jsx("span",{className:"text-foreground",children:e?"true":"false"}):g.jsx("span",{className:"text-foreground",children:String(e)})}function ex({depth:e,name:t,valuePreview:n,expanded:r,toggle:i,t:o}){return g.jsxs("div",{className:"flex items-start gap-2",style:{paddingLeft:e*12},children:[i?g.jsx("button",{type:"button",onClick:i,className:"text-muted-foreground hover:text-foreground mt-0.5","aria-label":o(r?"jsonViewer.collapse":"jsonViewer.expand"),children:r?g.jsx(kS,{className:"size-4"}):g.jsx(T9,{className:"size-4"})}):g.jsx("span",{className:"size-4"}),t?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-muted-foreground",children:t}),g.jsx("span",{className:"text-muted-foreground",children:":"})]}):g.jsx("span",{className:"text-muted-foreground",children:o("jsonViewer.root")}),g.jsx("span",{className:"min-w-0 break-words",children:n})]})}function E1({value:e,name:t,path:n,depth:r,search:i,baseExpandDepth:o,expandedPaths:l,collapsedPaths:u,onToggle:c,t:d}){const m=Kre(e),h=Array.isArray(e),y=m||h,b=y&&(u.has(n)?!1:l.has(n)?!0:r<o);if(!y)return g.jsx(ex,{depth:r,name:t?Lp(t,i):void 0,valuePreview:Gre(e,i,t),expanded:!1,t:d});const w=h?e.length:Object.keys(e).length,A=h?d("jsonViewer.arrayLabel",{count:w}):d("jsonViewer.objectLabel",{count:w});return g.jsxs("div",{className:"space-y-1",children:[g.jsx(ex,{depth:r,name:t?Lp(t,i):void 0,valuePreview:g.jsx("span",{className:"text-muted-foreground",children:A}),expanded:b,toggle:()=>c(n,!b),t:d}),b?g.jsxs("div",{className:"space-y-1",children:[h?e.slice(0,Mm).map((E,C)=>g.jsx(E1,{value:E,name:`[${C}]`,path:`${n}[${C}]`,depth:r+1,search:i,baseExpandDepth:o,expandedPaths:l,collapsedPaths:u,onToggle:c,t:d},`${n}[${C}]`)):Object.entries(e).slice(0,Mm).map(([E,C])=>g.jsx(E1,{value:C,name:E,path:`${n}.${E}`,depth:r+1,search:i,baseExpandDepth:o,expandedPaths:l,collapsedPaths:u,onToggle:c,t:d},`${n}.${E}`)),w>Mm?g.jsx(ex,{depth:r+1,valuePreview:g.jsx("span",{className:"text-muted-foreground",children:d("jsonViewer.more",{count:w-Mm})}),expanded:!1,t:d}):null]}):null]})}function Yre({value:e,search:t,defaultExpandedDepth:n=2,className:r}){const[i,o]=v.useState(n),[l,u]=v.useState(()=>new Set),[c,d]=v.useState(()=>new Set),{t:m}=We();function h(A,E){if(E){d(C=>{const j=new Set(C);return j.delete(A),j}),u(C=>{const j=new Set(C);return j.add(A),j});return}u(C=>{const j=new Set(C);return j.delete(A),j}),d(C=>{const j=new Set(C);return j.add(A),j})}function y(){o(99),d(new Set),u(new Set)}function b(){o(0),u(new Set),d(new Set)}function w(){return i===0?m("jsonViewer.statusCollapsed"):i>=99?m("jsonViewer.statusExpanded"):m("jsonViewer.statusDepth",{depth:i})}return g.jsxs("div",{className:me("space-y-3",r),children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:y,children:m("jsonViewer.expandAll")}),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:b,children:m("jsonViewer.collapseAll")}),g.jsx("span",{className:"text-muted-foreground ml-auto text-xs",children:w()})]}),g.jsx("div",{className:"bg-muted/20 overflow-auto rounded-md border p-3 font-mono text-xs",children:g.jsx(E1,{value:e,path:"$",depth:0,search:t,baseExpandDepth:i,expandedPaths:l,collapsedPaths:c,onToggle:h,t:m})})]})}const Dt="—";function Wre({status:e}){return e>=400?g.jsx(rn,{variant:"destructive",children:e}):g.jsx(rn,{variant:"secondary",children:e})}function Rm({label:e}){return g.jsx(nt,{className:"hover:bg-transparent",children:g.jsx(ye,{colSpan:2,className:"bg-muted/30 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:e})})}function Dr({label:e,tooltip:t}){return t?g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e})}),g.jsx(Pi,{side:"right",className:"max-w-60",children:g.jsx("p",{children:t})})]}):g.jsx(g.Fragment,{children:e})}function Xre(){const{t:e}=We(),{requestId:t=""}=MH(),r=ya().state?.fromSearch,i=r?`/requests?${r}`:"/requests",[o,l]=v.useState(!0),[u,c]=v.useState(!1),[d,m]=v.useState(null),[h,y]=v.useState(null),[b,w]=v.useState("");v.useEffect(()=>{let O=!1;async function N(){l(!0),y(null);try{const _=await Y0(t);if(O)return;m(_.item)}catch(_){if(O)return;const M=_ instanceof di?_.message:String(_);y(M),m(null)}finally{O||l(!1)}}return t&&N(),()=>{O=!0}},[t]);function A(){c(!0),Y0(t).then(O=>{m(O.item),y(null)}).catch(O=>{const N=O instanceof di?O.message:String(O);Ut.error(jt.t("requestDetailPage.loadFailedTitle"),{description:N})}).finally(()=>c(!1))}function E(){l(!0),y(null),Y0(t).then(O=>{m(O.item)}).catch(O=>{const N=O instanceof di?O.message:String(O);y(N),m(null)}).finally(()=>l(!1))}async function C(){if(d)try{const O=JSON.stringify(d,null,2);await navigator.clipboard.writeText(O),Ut.success(e("requestDetailPage.toast.copiedJson"))}catch(O){Ut.error(e("requestDetailPage.toast.copyFailed"),{description:String(O)})}}function j(){if(d)try{const O=JSON.stringify(d,null,2),N=new Blob([O],{type:"application/json"}),_=URL.createObjectURL(N),M=document.createElement("a");M.href=_,M.download=`${d.request_id}.json`,M.click(),URL.revokeObjectURL(_),Ut.success(e("requestDetailPage.toast.downloadedJson"))}catch(O){Ut.error(e("requestDetailPage.toast.downloadFailed"),{description:String(O)})}}if(o)return g.jsxs(pn,{children:[g.jsxs(Rn,{children:[g.jsx(Dn,{children:e("requestDetailPage.title")}),g.jsx(xr,{children:g.jsx(Js,{className:"h-4 w-40"})})]}),g.jsx(kn,{children:g.jsxs("div",{className:"space-y-2",children:[g.jsx(Js,{className:"h-4 w-64"}),g.jsx(Js,{className:"h-4 w-48"}),g.jsx(Js,{className:"h-24 w-full"})]})})]});if(h||!d)return g.jsxs("div",{className:"space-y-4",children:[g.jsx("div",{className:"flex items-center gap-2",children:g.jsx(Le,{variant:"ghost",size:"sm",asChild:!0,children:g.jsxs(es,{to:i,children:[g.jsx(ZP,{className:"size-4"}),e("common.back")]})})}),g.jsxs(pn,{children:[g.jsxs(Rn,{children:[g.jsx(Dn,{children:e("requestDetailPage.title")}),g.jsx(xr,{children:e("requestDetailPage.notFoundDescription")})]}),g.jsxs(kn,{className:"space-y-3",children:[g.jsx(br,{variant:"warning",title:e(h?"requestDetailPage.loadFailedTitle":"requestDetailPage.notFoundTitle"),description:h||`request_id: ${t}`}),g.jsxs(Le,{variant:"outline",size:"sm",onClick:E,children:[g.jsx(wp,{className:"size-4"}),e("common.retry")]})]})]})]});const T=d.premium_unlimited_after?"∞":d.premium_remaining_after!=null?Jn(d.premium_remaining_after):"";return g.jsxs("div",{className:"space-y-4 motion-safe:animate-in motion-safe:fade-in-0 motion-safe:duration-300",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Le,{variant:"ghost",size:"sm",asChild:!0,children:g.jsxs(es,{to:i,children:[g.jsx(ZP,{className:"size-4"}),e("common.back")]})}),g.jsxs(Le,{variant:"ghost",size:"sm",className:"ml-auto",disabled:u,onClick:A,children:[u?g.jsx($u,{className:"size-4 animate-spin"}):g.jsx(wp,{className:"size-4"}),e("common.refresh")]})]}),g.jsx(pn,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",style:{animationDelay:"50ms"},children:g.jsxs(Rn,{children:[g.jsxs(Dn,{className:"flex flex-wrap items-center gap-2",children:[g.jsx("span",{className:"font-mono text-sm",children:d.request_id}),g.jsx(Wre,{status:d.http_status})]}),g.jsx(xr,{className:"font-mono text-xs",children:od(d.started_at_ms)})]})}),g.jsxs("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2 xl:grid-cols-[1fr_2fr]",children:[g.jsxs(pn,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",style:{animationDelay:"100ms"},children:[g.jsx(Rn,{children:g.jsx(Dn,{children:e("requestDetailPage.summaryTitle")})}),g.jsx(kn,{children:g.jsx(nv,{children:g.jsxs(rv,{children:[g.jsx(Rm,{label:e("requestDetailPage.sections.request")}),g.jsxs(nt,{children:[g.jsx(ye,{className:"w-36 text-muted-foreground",children:e("requestDetailPage.fields.time")}),g.jsx(ye,{className:"font-mono text-xs",children:od(d.started_at_ms)||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.path")}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:g.jsx(es,{to:`/requests?path=${encodeURIComponent(d.path)}`,className:"underline decoration-border hover:decoration-foreground",children:d.path})})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.endpoint"),tooltip:e("requestDetailPage.fieldTooltip.endpoint")})}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.upstream_endpoint||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.model")}),g.jsx(ye,{className:"font-mono text-xs",children:d.upstream_model||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.duration"),tooltip:e("requestDetailPage.fieldTooltip.duration")})}),g.jsx(ye,{className:"font-mono text-xs",children:sd(d.duration_ms)||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.ttfb"),tooltip:e("requestDetailPage.fieldTooltip.ttfb")})}),g.jsx(ye,{className:"font-mono text-xs",children:sd(d.ttfb_ms)||Dt})]}),g.jsx(Rm,{label:e("requestDetailPage.sections.routing")}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.account")}),g.jsxs(ye,{className:"font-mono text-xs whitespace-normal break-words",children:[d.account_id?g.jsx(es,{to:`/requests?account_id=${encodeURIComponent(d.account_id)}`,className:"underline decoration-border hover:decoration-foreground",children:d.account_id}):Dt,d.affinity_hit?g.jsx(rn,{variant:"outline",className:"ml-2",children:e("requestDetailPage.fields.affinityHit")}):null]})]}),d.affinity_cache_key?g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.affinityCacheKey"),tooltip:e("requestDetailPage.fieldTooltip.affinityCacheKey")})}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.affinity_cache_key})]}):null,g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.affinityKeyUsed"),tooltip:e("requestDetailPage.fieldTooltip.affinityKeyUsed")})}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.affinity_key_used||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.affinityKeySource"),tooltip:e("requestDetailPage.fieldTooltip.affinityKeySource")})}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.affinity_key_source||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.selectionReason"),tooltip:e("requestDetailPage.fieldTooltip.selectionReason")})}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.selection_reason||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.initiator"),tooltip:e("requestDetailPage.fieldTooltip.initiator")})}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.initiator||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.upstreamRequestId"),tooltip:e("requestDetailPage.fieldTooltip.upstreamRequestId")})}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.upstream_request_id||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.upstreamErrorMessageRaw"),tooltip:e("requestDetailPage.fieldTooltip.upstreamErrorMessageRaw")})}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.upstream_error_message_raw||Dt})]}),g.jsx(Rm,{label:e("requestDetailPage.sections.client")}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.userId"),tooltip:e("requestDetailPage.fieldTooltip.userId")})}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.user_id||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.safetyIdentifier"),tooltip:e("requestDetailPage.fieldTooltip.safetyIdentifier")})}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.safety_identifier||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:g.jsx(Dr,{label:e("requestDetailPage.fields.promptCacheKey"),tooltip:e("requestDetailPage.fieldTooltip.promptCacheKey")})}),g.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.prompt_cache_key||Dt})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.client")}),g.jsxs(ye,{className:"font-mono text-xs whitespace-normal break-words",children:[d.client_ip||Dt,d.user_agent?` (${d.user_agent})`:""]})]}),g.jsx(Rm,{label:e("requestDetailPage.sections.usage")}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.tokens")}),g.jsx(ye,{className:"font-mono text-xs",children:g.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-0.5",children:[g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.in"),":"]})," ",d.tokens_input!=null?Jn(d.tokens_input):Dt]}),g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.out"),":"]})," ",d.tokens_output!=null?Jn(d.tokens_output):Dt]}),g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.total"),":"]})," ",d.tokens_total!=null?Jn(d.tokens_total):Dt]}),g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.cached"),":"]})," ",d.tokens_cached_input!=null?Jn(d.tokens_cached_input):Dt]})]})})]}),g.jsxs(nt,{children:[g.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.quota")}),g.jsx(ye,{className:"font-mono text-xs",children:g.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-0.5",children:[g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.quota.before"),":"]})," ",d.premium_remaining_before!=null?Jn(d.premium_remaining_before):Dt]}),g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.quota.after"),":"]})," ",d.premium_remaining_after!=null?Jn(d.premium_remaining_after):Dt]}),g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.quota.diff"),":"]})," ",d.premium_remaining_diff!=null?Jn(d.premium_remaining_diff):Dt,T?` (${T})`:""]})]})})]})]})})})]}),g.jsxs(pn,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",style:{animationDelay:"150ms"},children:[g.jsxs(Rn,{children:[g.jsx(Dn,{children:e("requestDetailPage.rawTitle")}),g.jsx(xr,{children:e("requestDetailPage.rawDescription")})]}),g.jsxs(kn,{className:"space-y-3",children:[g.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[g.jsx(Ct,{placeholder:e("requestDetailPage.searchPlaceholder"),value:b,onChange:O=>w(O.target.value),className:"h-8 sm:max-w-xs"}),g.jsxs("div",{className:"flex items-center gap-2 sm:ml-auto",children:[g.jsxs(Le,{type:"button",variant:"outline",size:"sm",onClick:j,children:[g.jsx(WL,{className:"size-4"}),e("common.download")]}),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:()=>{C()},children:e("common.copyJson")})]})]}),g.jsx(Yre,{value:d,search:b})]})]})]})]})}var tx="rovingFocusGroup.onEntryFocus",Zre={bubbles:!1,cancelable:!0},Id="RovingFocusGroup",[C1,X5,Qre]=R3(Id),[Jre,Z5]=El(Id,[Qre]),[eie,tie]=Jre(Id),Q5=v.forwardRef((e,t)=>g.jsx(C1.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(C1.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(nie,{...e,ref:t})})}));Q5.displayName=Id;var nie=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...h}=e,y=v.useRef(null),b=_t(t,y),w=CA(o),[A,E]=Vu({prop:l,defaultProp:u??null,onChange:c,caller:Id}),[C,j]=v.useState(!1),T=as(d),O=X5(n),N=v.useRef(!1),[_,M]=v.useState(0);return v.useEffect(()=>{const R=y.current;if(R)return R.addEventListener(tx,T),()=>R.removeEventListener(tx,T)},[T]),g.jsx(eie,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:A,onItemFocus:v.useCallback(R=>E(R),[E]),onItemShiftTab:v.useCallback(()=>j(!0),[]),onFocusableItemAdd:v.useCallback(()=>M(R=>R+1),[]),onFocusableItemRemove:v.useCallback(()=>M(R=>R-1),[]),children:g.jsx(Qe.div,{tabIndex:C||_===0?-1:0,"data-orientation":r,...h,ref:b,style:{outline:"none",...e.style},onMouseDown:Ve(e.onMouseDown,()=>{N.current=!0}),onFocus:Ve(e.onFocus,R=>{const B=!N.current;if(R.target===R.currentTarget&&B&&!C){const V=new CustomEvent(tx,Zre);if(R.currentTarget.dispatchEvent(V),!V.defaultPrevented){const H=O().filter(L=>L.focusable),z=H.find(L=>L.active),W=H.find(L=>L.id===A),se=[z,W,...H].filter(Boolean).map(L=>L.ref.current);t4(se,m)}}N.current=!1}),onBlur:Ve(e.onBlur,()=>j(!1))})})}),J5="RovingFocusGroupItem",e4=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:l,...u}=e,c=Qa(),d=o||c,m=tie(J5,n),h=m.currentTabStopId===d,y=X5(n),{onFocusableItemAdd:b,onFocusableItemRemove:w,currentTabStopId:A}=m;return v.useEffect(()=>{if(r)return b(),()=>w()},[r,b,w]),g.jsx(C1.ItemSlot,{scope:n,id:d,focusable:r,active:i,children:g.jsx(Qe.span,{tabIndex:h?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:Ve(e.onMouseDown,E=>{r?m.onItemFocus(d):E.preventDefault()}),onFocus:Ve(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:Ve(e.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){m.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const C=aie(E,m.orientation,m.dir);if(C!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let T=y().filter(O=>O.focusable).map(O=>O.ref.current);if(C==="last")T.reverse();else if(C==="prev"||C==="next"){C==="prev"&&T.reverse();const O=T.indexOf(E.currentTarget);T=m.loop?oie(T,O+1):T.slice(O+1)}setTimeout(()=>t4(T))}}),children:typeof l=="function"?l({isCurrentTabStop:h,hasTabStop:A!=null}):l})})});e4.displayName=J5;var rie={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iie(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function aie(e,t,n){const r=iie(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return rie[r]}function t4(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function oie(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var sie=Q5,lie=e4,iv="Tabs",[uie]=El(iv,[Z5]),n4=Z5(),[cie,UA]=uie(iv),r4=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:u,activationMode:c="automatic",...d}=e,m=CA(u),[h,y]=Vu({prop:r,onChange:i,defaultProp:o??"",caller:iv});return g.jsx(cie,{scope:n,baseId:Qa(),value:h,onValueChange:y,orientation:l,dir:m,activationMode:c,children:g.jsx(Qe.div,{dir:m,"data-orientation":l,...d,ref:t})})});r4.displayName=iv;var i4="TabsList",a4=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=UA(i4,n),l=n4(n);return g.jsx(sie,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:g.jsx(Qe.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});a4.displayName=i4;var o4="TabsTrigger",s4=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,l=UA(o4,n),u=n4(n),c=c4(l.baseId,r),d=f4(l.baseId,r),m=r===l.value;return g.jsx(lie,{asChild:!0,...u,focusable:!i,active:m,children:g.jsx(Qe.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":d,"data-state":m?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...o,ref:t,onMouseDown:Ve(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?l.onValueChange(r):h.preventDefault()}),onKeyDown:Ve(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&l.onValueChange(r)}),onFocus:Ve(e.onFocus,()=>{const h=l.activationMode!=="manual";!m&&!i&&h&&l.onValueChange(r)})})})});s4.displayName=o4;var l4="TabsContent",u4=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...l}=e,u=UA(l4,n),c=c4(u.baseId,r),d=f4(u.baseId,r),m=r===u.value,h=v.useRef(m);return v.useEffect(()=>{const y=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(y)},[]),g.jsx(Cl,{present:i||m,children:({present:y})=>g.jsx(Qe.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":c,hidden:!y,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:y&&o})})});u4.displayName=l4;function c4(e,t){return`${e}-trigger-${t}`}function f4(e,t){return`${e}-content-${t}`}var fie=r4,die=a4,hie=s4,mie=u4;function pie({className:e,...t}){return g.jsx(fie,{"data-slot":"tabs",className:me("flex flex-col gap-2",e),...t})}function gie({className:e,...t}){return g.jsx(die,{"data-slot":"tabs-list",className:me("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function hM({className:e,...t}){return g.jsx(hie,{"data-slot":"tabs-trigger",className:me("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function mM({className:e,...t}){return g.jsx(mie,{"data-slot":"tabs-content",className:me("flex-1 outline-none",e),...t})}function nx(e){return{account_id:e.get("account_id")||"",upstream_model:e.get("upstream_model")||"",client_model:e.get("client_model")||"",upstream_endpoint:e.get("upstream_endpoint")||"",path:e.get("path")||"",status:e.get("status")||"",has_error:e.get("has_error")||"",from_ms:e.get("from_ms")||"",to_ms:e.get("to_ms")||""}}function vie(e){const t=new URLSearchParams;return[["account_id",e.account_id],["upstream_model",e.upstream_model],["client_model",e.client_model],["upstream_endpoint",e.upstream_endpoint],["path",e.path],["status",e.status],["has_error",e.has_error],["from_ms",e.from_ms],["to_ms",e.to_ms]].forEach(([n,r])=>{const i=r.trim();i&&t.set(n,i)}),t}function pM(e){const t=e.trim();if(!t)return null;const n=Number(t);if(!Number.isFinite(n))return null;const r=Math.trunc(n);return r<0?null:r}function yie(e,t){const n=pM(e),r=pM(t);return e.trim()&&n===null?"requestsPage.validation.fromMsMustBeNumber":t.trim()&&r===null?"requestsPage.validation.toMsMustBeNumber":n!==null&&r!==null&&n>r?"requestsPage.validation.fromMsMustBeLteToMs":null}function gM(e){if(!e)return"";const t=Date.parse(e);return Number.isFinite(t)?String(t):""}function vM(e){const t=Number(e);if(!Number.isFinite(t))return"";const n=new Date(t),r=d=>String(d).padStart(2,"0"),i=n.getFullYear(),o=r(n.getMonth()+1),l=r(n.getDate()),u=r(n.getHours()),c=r(n.getMinutes());return`${i}-${o}-${l}T${u}:${c}`}function bie(e){const t=Date.now(),r={"15m":900*1e3,"1h":3600*1e3,"6h":360*60*1e3,"24h":1440*60*1e3,"7d":10080*60*1e3}[e];return{from_ms:String(t-r),to_ms:String(t)}}const Kt=[null,null,"hidden md:table-cell","hidden md:table-cell","hidden lg:table-cell","hidden xl:table-cell","hidden 2xl:table-cell","hidden 2xl:table-cell","hidden 2xl:table-cell","hidden 2xl:table-cell","hidden lg:table-cell",null];function gu({label:e,tooltip:t}){return t?g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:t})})]}):g.jsx(g.Fragment,{children:e})}function xie({rows:e}){const t=Kt.length;return g.jsx(g.Fragment,{children:Array.from({length:e}).map((n,r)=>g.jsx(nt,{children:Array.from({length:t}).map((i,o)=>g.jsx(ye,{className:me("py-3",Kt[o]),children:g.jsx(Js,{className:o===1?"h-4 w-56":"h-4 w-24"})},o))},r))})}function wie(){const{t:e}=We(),[t,n]=Eq(),[r,i]=v.useState(()=>nx(t)),[o,l]=v.useState([]),[u,c]=v.useState(null),[d,m]=v.useState(!1),[h,y]=v.useState(!1),[b,w]=v.useState(null),A=v.useMemo(()=>nx(t),[t]),[E,C]=v.useState(()=>{const G=nx(t);return G.from_ms||G.to_ms?"custom":"__any__"});v.useEffect(()=>{i(A);const G=!!(A.from_ms||A.to_ms);C(k=>G?k==="__any__"?"custom":k:"__any__")},[A]);const j=v.useMemo(()=>{const G=yie(r.from_ms,r.to_ms);return G?e(G):null},[r.from_ms,r.to_ms,e]),T=v.useCallback(async({reset:G,cursor:k})=>{L.current=!0,y(!0),w(null);try{const I=await Cne({...A,limit:50,cursor_id:G?null:k});l(q=>G?I.items:q.concat(I.items)),c(I.next_cursor_id??null),m(!!I.has_more)}catch(I){const q=I instanceof di?I.message:String(I);w(q),Ut.error(jt.t("requestsPage.loadFailedTitle"),{description:q}),G&&l([]),m(!1),c(null)}finally{L.current=!1,y(!1)}},[A]);v.useEffect(()=>{T({reset:!0,cursor:null})},[T]);function O(){j||n(vie(r))}function N(){n(new URLSearchParams)}function _(G){if(C(G),G==="__any__"){i(q=>({...q,from_ms:"",to_ms:""}));return}if(G==="custom")return;const{from_ms:k,to_ms:I}=bie(G);i(q=>({...q,from_ms:k,to_ms:I}))}const M=v.useMemo(()=>E==="custom"?vM(r.from_ms):"",[r.from_ms,E]),R=v.useMemo(()=>E==="custom"?vM(r.to_ms):"",[r.to_ms,E]),B=!h&&!j,V=Kt.length,H=t.toString().length>0,z=v.useMemo(()=>{let G=0;for(const[,k]of t)k.trim()&&G++;return G},[t]),[W,Q]=v.useState(0),se=v.useRef(null),L=v.useRef(!1);v.useEffect(()=>{let G=!1;if(se.current&&(clearTimeout(se.current),se.current=null),W>0){const k=()=>{G||(se.current=setTimeout(async()=>{if(L.current){k();return}try{await T({reset:!0,cursor:null})}finally{k()}},W))};k()}return()=>{G=!0,se.current&&(clearTimeout(se.current),se.current=null)}},[W,T]);const F=v.useRef(O);F.current=O;const $=v.useRef(null);v.useEffect(()=>{function G(k){if(k.key!=="Enter")return;const I=k.target;if(!I||!$.current?.contains(I))return;const q=I.tagName;q==="TEXTAREA"||q==="BUTTON"||q==="A"||q==="SELECT"||I.isContentEditable||I.closest("[role=dialog]")||I.closest("[role=listbox]")||I.closest("[role=button]")||(k.preventDefault(),F.current())}return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[]);let ae=e("common.noMore");return d&&(ae=e(h?"common.loading":"common.loadMore")),g.jsxs("div",{className:"space-y-4",children:[g.jsxs(pn,{className:"gap-4 py-4",children:[g.jsxs(Rn,{className:"px-4",children:[g.jsx(Dn,{children:e("nav.requests")}),g.jsx(xr,{className:"hidden sm:block",children:e("requestsPage.description")}),g.jsxs(Are,{className:"flex items-center gap-2",children:[z>0&&g.jsx(rn,{variant:"secondary",className:"text-xs",children:e("requestsPage.activeFilters",{count:z})}),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:N,disabled:!H||h,children:e("common.clear")}),g.jsxs(Le,{onClick:O,disabled:!B,size:"sm",children:[h&&g.jsx($u,{className:"size-4 motion-safe:animate-spin"}),e("common.apply")]})]})]}),g.jsxs(kn,{ref:$,className:"space-y-3 px-4",children:[g.jsxs(pie,{defaultValue:"quick",className:"gap-1.5",children:[g.jsxs(gie,{className:"h-8 p-[2px]",children:[g.jsx(hM,{value:"quick",children:e("requestsPage.tabs.quick")}),g.jsx(hM,{value:"advanced",children:e("requestsPage.tabs.advanced")})]}),g.jsx(mM,{value:"quick",children:g.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6",children:[g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(St,{htmlFor:"account_id",className:"text-muted-foreground lg:text-xs",children:e("common.account")}),g.jsx(Ct,{id:"account_id",className:"h-8",placeholder:"octocat",value:r.account_id,onChange:G=>i(k=>({...k,account_id:G.target.value}))})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(St,{className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.timeRange")}),g.jsxs(In,{value:E,onValueChange:G=>_(G),children:[g.jsx(Bn,{size:"sm",className:"w-full",children:g.jsx(zn,{})}),g.jsxs($n,{children:[g.jsx(Te,{value:"__any__",children:e("common.any")}),g.jsx(Te,{value:"15m",children:e("requestsPage.timeRange.last15m")}),g.jsx(Te,{value:"1h",children:e("requestsPage.timeRange.last1h")}),g.jsx(Te,{value:"6h",children:e("requestsPage.timeRange.last6h")}),g.jsx(Te,{value:"24h",children:e("requestsPage.timeRange.last24h")}),g.jsx(Te,{value:"7d",children:e("requestsPage.timeRange.last7d")}),g.jsx(Te,{value:"custom",children:e("requestsPage.timeRange.custom")})]})]})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(St,{htmlFor:"status",className:"text-muted-foreground lg:text-xs",children:e("common.status")}),g.jsx(Ct,{id:"status",className:"h-8",placeholder:"200",value:r.status,onChange:G=>i(k=>({...k,status:G.target.value}))})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(St,{className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.hasError")}),g.jsxs(In,{value:r.has_error||"__any__",onValueChange:G=>i(k=>({...k,has_error:G==="__any__"?"":G})),children:[g.jsx(Bn,{size:"sm",className:"w-full",children:g.jsx(zn,{})}),g.jsxs($n,{children:[g.jsx(Te,{value:"__any__",children:e("common.any")}),g.jsx(Te,{value:"1",children:e("common.yes")}),g.jsx(Te,{value:"0",children:e("common.no")})]})]})]}),E==="custom"?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(St,{htmlFor:"from_dt",className:"text-muted-foreground lg:text-xs",children:e("common.from")}),g.jsx(Ct,{id:"from_dt",className:"h-8",type:"datetime-local",value:M,onChange:G=>{C("custom"),i(k=>({...k,from_ms:gM(G.target.value)}))}})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(St,{htmlFor:"to_dt",className:"text-muted-foreground lg:text-xs",children:e("common.to")}),g.jsx(Ct,{id:"to_dt",className:"h-8",type:"datetime-local",value:R,onChange:G=>{C("custom"),i(k=>({...k,to_ms:gM(G.target.value)}))}})]})]}):null]})}),g.jsx(mM,{value:"advanced",children:g.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:[g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(St,{htmlFor:"upstream_model",className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.upstreamModel")}),g.jsx(Ct,{id:"upstream_model",className:"h-8",placeholder:"gpt-5",value:r.upstream_model,onChange:G=>i(k=>({...k,upstream_model:G.target.value}))})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(St,{htmlFor:"client_model",className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.clientModel")}),g.jsx(Ct,{id:"client_model",className:"h-8",placeholder:"claude-sonnet-4",value:r.client_model,onChange:G=>i(k=>({...k,client_model:G.target.value}))})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(St,{htmlFor:"upstream_endpoint",className:"text-muted-foreground lg:text-xs",children:e("common.endpoint")}),g.jsx(Ct,{id:"upstream_endpoint",className:"h-8",placeholder:"/responses",value:r.upstream_endpoint,onChange:G=>i(k=>({...k,upstream_endpoint:G.target.value}))})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(St,{htmlFor:"path",className:"text-muted-foreground lg:text-xs",children:e("common.path")}),g.jsx(Ct,{id:"path",className:"h-8",placeholder:"/v1/messages",value:r.path,onChange:G=>i(k=>({...k,path:G.target.value}))})]})]})})]}),j?g.jsx(br,{variant:"warning",title:e("requestsPage.validation.title"),description:j}):null]})]}),g.jsxs("div",{className:"flex items-center justify-between motion-safe:animate-in motion-safe:fade-in-0 motion-safe:duration-300",children:[g.jsx("span",{className:"text-muted-foreground text-sm",children:o.length>0?d?e("requestsPage.resultCountWithMore",{count:o.length}):e("requestsPage.resultCount",{count:o.length}):null}),g.jsxs("div",{className:"flex items-center gap-2",children:[W>0&&g.jsxs("span",{className:"relative flex h-2 w-2",children:[g.jsx("span",{className:"bg-primary absolute inline-flex h-full w-full motion-safe:animate-ping rounded-full opacity-75"}),g.jsx("span",{className:"bg-primary relative inline-flex h-2 w-2 rounded-full"})]}),g.jsx("span",{className:"text-muted-foreground text-sm",children:e("requestsPage.autoRefreshLabel")}),g.jsxs(In,{value:String(W),onValueChange:G=>Q(Number(G)),children:[g.jsx(Bn,{size:"sm",className:"w-20",children:g.jsx(zn,{})}),g.jsxs($n,{align:"end",children:[g.jsx(Te,{value:"0",children:e("requestsPage.autoRefresh.off")}),g.jsx(Te,{value:"30000",children:e("requestsPage.autoRefresh.30s")}),g.jsx(Te,{value:"60000",children:e("requestsPage.autoRefresh.60s")}),g.jsx(Te,{value:"300000",children:e("requestsPage.autoRefresh.5m")})]})]})]})]}),g.jsx(pn,{className:"gap-4 py-4",children:g.jsxs(kn,{className:"space-y-4 px-4",children:[b&&o.length>0?g.jsx(br,{variant:"error",title:e("requestsPage.loadFailedTitle"),description:b,actionLabel:e("common.retry"),onAction:()=>{T({reset:!0,cursor:null})}}):null,g.jsxs(nv,{glow:!0,stickyHeader:!0,className:"[&_th]:h-9 [&_td]:py-1.5",children:[g.jsx($A,{children:g.jsxs(nt,{children:[g.jsx(Ot,{children:e("common.time")}),g.jsx(Ot,{children:e("common.path")}),g.jsx(Ot,{className:me(Kt[2],"text-muted-foreground"),children:e("common.endpoint")}),g.jsx(Ot,{className:me(Kt[3]),children:e("common.account")}),g.jsx(Ot,{className:me(Kt[4]),children:e("common.model")}),g.jsx(Ot,{className:me(Kt[5],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.xInitiator"),tooltip:e("requestsPage.columnTooltip.initiator")})}),g.jsx(Ot,{className:me(Kt[6],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.subagentRequest"),tooltip:e("requestsPage.columnTooltip.subagentRequest")})}),g.jsx(Ot,{className:me(Kt[7],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.tokens"),tooltip:e("requestsPage.columnTooltip.tokens")})}),g.jsx(Ot,{className:me(Kt[8],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.cost"),tooltip:e("requestsPage.columnTooltip.cost")})}),g.jsx(Ot,{className:me(Kt[9],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.quota"),tooltip:e("requestsPage.columnTooltip.quota")})}),g.jsx(Ot,{className:me(Kt[10],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.durationAbbrev"),tooltip:e("requestsPage.columnTooltip.duration")})}),g.jsx(Ot,{children:e("common.status")})]})}),g.jsx(rv,{children:b&&!h&&o.length===0?g.jsx(nt,{children:g.jsx(ye,{colSpan:V,children:g.jsx(br,{variant:"error",title:e("requestsPage.loadFailedTitle"),description:b,actionLabel:e("common.retry"),onAction:()=>{T({reset:!0,cursor:null})}})})}):h&&o.length===0?g.jsx(xie,{rows:6}):o.length===0?g.jsx(nt,{children:g.jsx(ye,{colSpan:V,children:g.jsx(br,{variant:"info",title:e("requestsPage.empty.noRequestsTitle"),description:e(H?"requestsPage.empty.noResultsForFilters":"requestsPage.empty.noRequestsFound"),actionLabel:H?e("common.clearFilters"):void 0,onAction:H?N:void 0})})}):o.map(G=>{const k=G.premium_unlimited_after?"∞":G.premium_remaining_after!=null?Jn(G.premium_remaining_after):"",I=G.http_status>=400?g.jsxs(rn,{variant:"destructive","aria-label":`Error ${G.http_status}`,children:[g.jsx("span",{"aria-hidden":"true",className:"mr-0.5",children:"!"}),G.http_status]}):g.jsx(rn,{variant:"secondary",children:G.http_status});return g.jsxs(nt,{children:[g.jsx(ye,{className:"font-mono text-xs",children:od(G.started_at_ms)}),g.jsx(ye,{className:"font-mono text-sm whitespace-normal break-words",children:g.jsx(es,{to:`/request/${encodeURIComponent(G.request_id)}`,state:{fromSearch:t.toString()},className:"underline decoration-border hover:decoration-foreground",children:G.path})}),g.jsx(ye,{className:me(Kt[2],"font-mono text-xs text-muted-foreground whitespace-normal break-words"),children:G.upstream_endpoint||""}),g.jsxs(ye,{className:me(Kt[3],"font-mono text-xs whitespace-normal break-words"),children:[G.account_id||"",G.affinity_hit?g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx(rn,{variant:"outline",className:"ml-1 px-1 py-0 text-[10px] leading-tight align-middle","aria-label":e("requestsPage.affinityHit"),children:"affinity"})}),g.jsxs(Pi,{children:[g.jsx("p",{children:e("requestsPage.affinityHit")}),G.affinity_cache_key&&g.jsx("p",{className:"font-mono text-xs opacity-80",children:G.affinity_cache_key})]})]}):null]}),g.jsx(ye,{className:me(Kt[4],"font-mono text-xs"),children:G.upstream_model||""}),g.jsx(ye,{className:me(Kt[5],"font-mono text-xs text-muted-foreground"),children:G.initiator||""}),g.jsx(ye,{className:me(Kt[6],"text-xs text-center text-muted-foreground"),children:G.is_subagent?"√":""}),g.jsx(ye,{className:me(Kt[7],"font-mono text-xs text-muted-foreground"),children:G.tokens_total!=null?Jn(G.tokens_total):""}),g.jsx(ye,{className:me(Kt[8],"font-mono text-xs text-muted-foreground"),children:G.cost_units??""}),g.jsx(ye,{className:me(Kt[9],"font-mono text-xs text-muted-foreground"),children:k}),g.jsx(ye,{className:me(Kt[10],"font-mono text-xs text-muted-foreground"),children:sd(G.duration_ms)}),g.jsx(ye,{children:I})]},G.request_id)})})]}),g.jsx("div",{className:"flex items-center justify-end gap-2",children:g.jsxs(Le,{variant:"outline",onClick:()=>{T({reset:!1,cursor:u})},disabled:h||!d,size:"sm",children:[h&&g.jsx($u,{className:"size-4 motion-safe:animate-spin"}),ae]})})]})})]})}function Sie({saving:e,canSave:t,onSave:n,className:r}){const{t:i}=We();return g.jsx("div",{className:me("fixed bottom-6 right-6 z-50","motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-4 motion-safe:duration-300",r),children:g.jsx(Le,{type:"button",size:"lg",onClick:()=>{e||!t||n()},disabled:!t||e,className:"shadow-lg",children:i(e?"settingsPage.saveButton.saving":"settingsPage.saveButton.saveChanges")})})}function Aie({sections:e,activeSection:t,onSectionClick:n,className:r}){const{t:i}=We();return g.jsxs("nav",{className:me("sticky top-6 space-y-1 rounded-lg border bg-card p-2",r),"aria-label":i("settingsPage.navigation.ariaLabel"),children:[g.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground uppercase tracking-wider",children:i("nav.settings")}),e.map(o=>{const l=t===o.id;return g.jsx("button",{type:"button",onClick:()=>n(o.id),className:me("w-full text-left px-3 py-2 rounded-md text-sm transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",l?"bg-accent/50 font-medium text-foreground":"text-muted-foreground"),"aria-current":l?"page":void 0,"aria-controls":o.id,children:o.label},o.id)})]})}const Vs=v.forwardRef(({id:e,isActive:t,children:n,className:r,style:i},o)=>g.jsx("div",{ref:o,id:e,"data-section-id":e,className:me("scroll-mt-6 rounded-xl transition-shadow","motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",t&&"ring-1 ring-primary/30",r),style:i,children:n}));Vs.displayName="SettingsSectionCard";function Eie({sectionIds:e,rootMargin:t="-20% 0px -60% 0px",threshold:n=0}){const[r,i]=v.useState(e[0]??""),o=v.useRef(new Map),l=v.useRef(null),u=v.useCallback((d,m)=>{if(m)o.current.set(d,m),l.current?.observe(m);else{const h=o.current.get(d);h&&l.current?.unobserve(h),o.current.delete(d)}},[]),c=v.useCallback(d=>{const m=o.current.get(d);m&&m.scrollIntoView({behavior:"smooth",block:"start"})},[]);return v.useEffect(()=>{const d=new IntersectionObserver(m=>{const h=m.filter(y=>y.isIntersecting);if(h.length>0){h.sort((w,A)=>w.boundingClientRect.top-A.boundingClientRect.top);const b=h[0].target.dataset.sectionId;b&&i(b)}},{rootMargin:t,threshold:n});l.current=d;for(const m of o.current.values())d.observe(m);return()=>{d.disconnect(),l.current=null}},[t,n]),{activeSection:r,registerSection:u,scrollToSection:c}}function qu({className:e,...t}){return g.jsx("textarea",{"data-slot":"textarea",className:me("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input min-h-[96px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...t})}const Cie=["general","reasoning","aliases","prompts","advanced","providers"],j1=["none","minimal","low","medium","high","xhigh"];function VA({next:e,record:t,setJson:n,setError:r,setMode:i}){e&&n(JSON.stringify(t??{},null,2)),r(null),i(e?"json":"form")}function FA({value:e,parse:t,setJson:n,setError:r,onRecord:i}){n(e);const o=t(e);if("error"in o){r(o.error);return}r(null),i(o.record)}function ud(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function T1(e){if(e===void 0)return;if(e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string")return e;if(Array.isArray(e)){const n=e.map(r=>T1(r)).filter(r=>r!==void 0);return n.length===0?void 0:(n.every(r=>typeof r!="object"||r===null)&&n.sort((r,i)=>JSON.stringify(r).localeCompare(JSON.stringify(i))),n)}if(!ud(e))return;const t=Object.entries(e).map(([n,r])=>[n,T1(r)]).filter(([,n])=>n!==void 0).sort(([n],[r])=>n.localeCompare(r));if(t.length!==0)return Object.fromEntries(t)}function yM(e){return JSON.stringify(T1(e)??{})}function Mi(){return typeof globalThis.crypto?.randomUUID=="function"?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function jie(e){return Array.isArray(e)?[...new Set(e.filter(t=>typeof t=="string").map(t=>t.trim()).filter(t=>t.length>0))]:[]}function bM(e){const t=jie(e.auth?.apiKeys);if(t.length>0)return t;const n=e.apiKey?.trim();return n?[n]:[]}function Tie(e){return d4(e)}function d4(e){return[...new Set(e.split(/\r?\n|,/).map(t=>t.trim()).filter(t=>t.length>0))]}function xM(e){return e?Object.entries(e).map(([t,n])=>({id:Mi(),model:t,prompt:n})):[]}function wM(e){return e?Object.entries(e).map(([t,n])=>({id:Mi(),model:t,effort:n})):[]}function O1(e){return e?Object.entries(e).map(([t,n])=>typeof n=="string"?{id:Mi(),alias:t,target:n,allowOriginal:void 0}:{id:Mi(),alias:t,target:n.target,allowOriginal:n.allowOriginal}):[]}function SM(e){const t={};for(const n of e){const r=n.model.trim();r&&(t[r]=n.prompt)}return t}function AM(e){const t={};for(const n of e){const r=n.model.trim();r&&(t[r]=n.effort)}return t}const h4=new Set(["__proto__","constructor","prototype"]);function cp(e){const t=Object.create(null),n=new Set;for(const r of e){const i=r.alias.trim(),o=r.target.trim();if(!i||!o)continue;const l=i.toLowerCase();h4.has(l)||l!==o.toLowerCase()&&(n.has(l)||(n.add(l),t[i]=r.allowOriginal===void 0?{target:o}:{target:o,allowOriginal:r.allowOriginal}))}return t}const m4=new Set(["__proto__","constructor","prototype"]);function Oie(e){return e?Object.entries(e).map(([t,n])=>({id:Mi(),name:t,type:n.type??"anthropic",enabled:n.enabled??!0,baseUrl:n.baseUrl??"",apiKey:n.apiKey??"",authType:n.authType??"x-api-key",adjustInputTokens:n.adjustInputTokens??!1,models:Object.entries(n.models??{}).map(([r,i])=>({id:Mi(),model:r,temperature:i.temperature===void 0?"":String(i.temperature),topP:i.topP===void 0?"":String(i.topP),topK:i.topK===void 0?"":String(i.topK)}))})):[]}function Pie(e){return e.enabled===!1||e.baseUrl.trim()||e.apiKey.trim()||e.authType!=="x-api-key"||e.adjustInputTokens?!0:e.models.some(t=>!!t.model.trim()||!!t.temperature.trim()||!!t.topP.trim()||!!t.topK.trim())}function Nie(e,t,n){const r=e.model.trim(),i=e.temperature.trim(),o=e.topP.trim(),l=e.topK.trim(),u=!!(i||o||l);if(!r)return u?{error:`Provider '${t}': model id is required when setting overrides.`}:{record:null};const c=r.toLowerCase();if(m4.has(c))return{error:`Provider '${t}' model '${r}' is not allowed.`};if(n.has(c))return{error:`Provider '${t}' model '${r}' is duplicated.`};const d={};if(i){const m=Number(i);if(!Number.isFinite(m)||m<0)return{error:`Provider '${t}' model '${r}': temperature must be a non-negative number.`};d.temperature=m}if(o){const m=Number(o);if(!Number.isFinite(m)||m<0)return{error:`Provider '${t}' model '${r}': topP must be a non-negative number.`};d.topP=m}if(l){const m=Number(l);if(!Number.isFinite(m)||m<0)return{error:`Provider '${t}' model '${r}': topK must be a non-negative number.`};d.topK=m}return Object.keys(d).length===0?{record:null}:(n.add(c),{record:{modelId:r,config:d}})}function _ie(e,t){const n=Object.create(null),r=new Set;for(const i of e){const o=Nie(i,t,r);if("error"in o)return o;o.record&&(n[o.record.modelId]=o.record.config)}return{record:n}}function Mie(e){const t=Object.create(null),n=new Set;for(const r of e){const i=r.name.trim();if(!i){if(Pie(r))return{error:"Provider name is required."};continue}const o=i.toLowerCase();if(m4.has(o))return{error:`Provider '${i}' is not allowed.`};if(n.has(o))return{error:`Provider '${i}' is duplicated.`};n.add(o);const l=r.baseUrl.trim(),u=r.apiKey.trim(),c={type:r.type||"anthropic",enabled:r.enabled,baseUrl:l||void 0,apiKey:u||void 0,authType:r.authType,adjustInputTokens:r.adjustInputTokens},d=_ie(r.models,i);if("error"in d)return d;Object.keys(d.record).length>0&&(c.models=d.record),t[i]=c}return{record:t}}function Rie(e){const[t,n]=v.useState([]),[r,i]=v.useState(null),o=v.useCallback(b=>{n(Oie(b)),i(null)},[]),l=v.useCallback(b=>{n(b);const w=Mie(b);if("error"in w){i(w.error);return}i(null),e(w.record)},[e]),u=v.useCallback(()=>{l(t.concat({id:Mi(),name:"",type:"anthropic",enabled:!0,baseUrl:"",apiKey:"",authType:"x-api-key",adjustInputTokens:!1,models:[]}))},[t,l]),c=v.useCallback(b=>{l(t.filter(w=>w.id!==b))},[t,l]),d=v.useCallback((b,w)=>{const A=t.map(E=>E.id===b?{...E,...w}:E);l(A)},[t,l]),m=v.useCallback(b=>{const w=t.map(A=>A.id!==b?A:{...A,models:A.models.concat({id:Mi(),model:"",temperature:"",topP:"",topK:""})});l(w)},[t,l]),h=v.useCallback((b,w)=>{const A=t.map(E=>E.id!==b?E:{...E,models:E.models.filter(C=>C.id!==w)});l(A)},[t,l]),y=v.useCallback((b,w,A)=>{const E=t.map(C=>C.id!==b?C:{...C,models:C.models.map(j=>j.id===w?{...j,...A}:j)});l(E)},[t,l]);return{items:t,issue:r,onAddProvider:u,onRemoveProvider:c,onUpdateProvider:d,onAddModel:m,onRemoveModel:h,onUpdateModel:y,setFromRecord:o}}function Die(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!ud(t))return{error:"extraPrompts JSON must be an object of string values."};const n={};for(const[r,i]of Object.entries(t)){if(typeof i!="string")return{error:`extraPrompts.${r} must be a string.`};n[r]=i}return{record:n}}catch{return{error:"extraPrompts JSON is not valid."}}}function kie(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!ud(t))return{error:"modelReasoningEfforts JSON must be an object."};const n={};for(const[r,i]of Object.entries(t)){if(typeof i!="string")return{error:`modelReasoningEfforts.${r} must be a string.`};if(!j1.includes(i))return{error:`modelReasoningEfforts.${r} must be one of ${j1.join(", ")}.`};n[r]=i}return{record:n}}catch{return{error:"modelReasoningEfforts JSON is not valid."}}}function Lie(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!ud(t))return{error:"modelAliases JSON must be an object."};const n=Object.create(null),r=new Set;for(const[i,o]of Object.entries(t)){const l=i.trim();if(!l)return{error:"modelAliases keys must be non-empty strings."};const u=l.toLowerCase();if(h4.has(u))return{error:`modelAliases.${i} is not allowed.`};let c,d;if(typeof o=="string")c=o.trim();else if(ud(o)){const m=o.target;if(typeof m!="string")return{error:`modelAliases.${i}.target must be a string.`};if(c=m.trim(),"allowOriginal"in o){if(typeof o.allowOriginal!="boolean")return{error:`modelAliases.${i}.allowOriginal must be a boolean.`};d=o.allowOriginal}}else return{error:`modelAliases.${i} must be a string or object.`};if(!c)return{error:`modelAliases.${i} must be a non-empty string.`};if(u===c.toLowerCase())return{error:`modelAliases.${i} cannot map to itself.`};if(r.has(u))return{error:`modelAliases.${i} conflicts with another alias.`};r.add(u),n[l]=d===void 0?{target:c}:{target:c,allowOriginal:d}}return{record:n}}catch{return{error:"modelAliases JSON is not valid."}}}function Iie(e){const[t,n]=v.useState("form"),[r,i]=v.useState([]),[o,l]=v.useState(""),[u,c]=v.useState(null),d=v.useMemo(()=>u?`extraPrompts: ${u}`:null,[u]),m=v.useCallback(C=>{i(xM(C)),l(JSON.stringify(C??{},null,2)),c(null)},[]),h=v.useCallback(C=>{i(C),e(SM(C))},[e]),y=v.useCallback(C=>{FA({value:C,parse:Die,setJson:l,setError:c,onRecord:j=>h(xM(j))})},[h]),b=v.useCallback(C=>{VA({next:C,record:SM(r),setJson:l,setError:c,setMode:n})},[r]),w=v.useCallback(()=>{h(r.concat({id:Mi(),model:"",prompt:""}))},[r,h]),A=v.useCallback(C=>{h(r.filter(j=>j.id!==C))},[r,h]),E=v.useCallback((C,j)=>{const T=r.map(O=>O.id===C?{...O,...j}:O);h(T)},[r,h]);return{mode:t,items:r,json:o,jsonIssue:d,onToggleMode:b,onJsonChange:y,onAddItem:w,onRemoveItem:A,onUpdateItem:E,setFromRecord:m}}function zie(e){const[t,n]=v.useState("form"),[r,i]=v.useState([]),[o,l]=v.useState(""),[u,c]=v.useState(null),d=v.useMemo(()=>u?`modelReasoningEfforts: ${u}`:null,[u]),m=v.useCallback(C=>{i(wM(C)),l(JSON.stringify(C??{},null,2)),c(null)},[]),h=v.useCallback(C=>{i(C),e(AM(C))},[e]),y=v.useCallback(C=>{FA({value:C,parse:kie,setJson:l,setError:c,onRecord:j=>h(wM(j))})},[h]),b=v.useCallback(C=>{VA({next:C,record:AM(r),setJson:l,setError:c,setMode:n})},[r]),w=v.useCallback(()=>{h(r.concat({id:Mi(),model:"",effort:"high"}))},[r,h]),A=v.useCallback(C=>{h(r.filter(j=>j.id!==C))},[r,h]),E=v.useCallback((C,j)=>{const T=r.map(O=>O.id===C?{...O,...j}:O);h(T)},[r,h]);return{mode:t,items:r,json:o,jsonIssue:d,onToggleMode:b,onJsonChange:y,onAddItem:w,onRemoveItem:A,onUpdateItem:E,setFromRecord:m}}function Bie(e){const[t,n]=v.useState("form"),[r,i]=v.useState([]),[o,l]=v.useState(""),[u,c]=v.useState(null),d=v.useMemo(()=>u?`modelAliases: ${u}`:null,[u]),m=v.useCallback(C=>{const j=O1(C),T=cp(j);i(j),l(JSON.stringify(T,null,2)),c(null)},[]),h=v.useCallback(C=>{i(C),e(cp(C))},[e]),y=v.useCallback(C=>{FA({value:C,parse:Lie,setJson:l,setError:c,onRecord:j=>h(O1(j))})},[h]),b=v.useCallback(C=>{VA({next:C,record:cp(r),setJson:l,setError:c,setMode:n})},[r]),w=v.useCallback(()=>{h(r.concat({id:Mi(),alias:"",target:"",allowOriginal:void 0}))},[r,h]),A=v.useCallback(C=>{h(r.filter(j=>j.id!==C))},[r,h]),E=v.useCallback((C,j)=>{const T=r.map(O=>O.id===C?{...O,...j}:O);h(T)},[r,h]);return{mode:t,items:r,json:o,jsonIssue:d,onToggleMode:b,onJsonChange:y,onAddItem:w,onRemoveItem:A,onUpdateItem:E,setFromRecord:m}}function $ie({hasModels:e,smallModelLabel:t,smallModelValue:n,smallModelInputValue:r,models:i,authApiKeysValue:o,anthropicApiKeyValue:l,legacyAuthNote:u,anthropicApiKeyEnvNote:c,onSmallModelSelect:d,onSmallModelInput:m,onAuthApiKeysChange:h,onAnthropicApiKeyChange:y}){const{t:b}=We(),[w,A]=v.useState(!1),E=e&&n!=="__default__"&&!i.includes(n);return g.jsxs(pn,{className:"gap-4 py-4",children:[g.jsxs(Rn,{className:"px-4",children:[g.jsx(Dn,{children:b("settingsPage.general.title")}),g.jsx(xr,{className:"hidden sm:block",children:b("settingsPage.general.description")})]}),g.jsxs(kn,{className:"space-y-4 px-4",children:[g.jsxs("div",{className:"grid gap-2",children:[g.jsx(St,{className:"text-muted-foreground text-xs",children:t}),e?g.jsxs(In,{value:n,onValueChange:d,children:[g.jsx(Bn,{className:"w-full",children:g.jsx(zn,{placeholder:b("settingsPage.general.smallModelPlaceholder")})}),g.jsxs($n,{children:[g.jsx(Te,{value:"__default__",children:b("settingsPage.common.defaultOption")}),E?g.jsx(Te,{value:n,children:b("settingsPage.common.customModel",{value:n})}):null,i.map(C=>g.jsx(Te,{value:C,children:C},C))]})]}):g.jsx(Ct,{placeholder:b("settingsPage.general.smallModelInputPlaceholder"),value:r,onChange:C=>m(C.target.value)}),g.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.general.smallModelHint")})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(St,{className:"text-muted-foreground text-xs",children:b("settingsPage.general.apiKeysLabel")}),g.jsx(qu,{autoComplete:"off",placeholder:b("settingsPage.general.apiKeysPlaceholder"),value:o,onChange:C=>h(C.target.value),className:"min-h-[96px] font-mono text-xs"}),g.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.general.apiKeysHint")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:u})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(St,{className:"text-muted-foreground text-xs",children:b("settingsPage.general.anthropicApiKeyLabel")}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ct,{autoComplete:"off",type:w?"text":"password",placeholder:b("settingsPage.general.anthropicApiKeyPlaceholder"),value:l,onChange:C=>y(C.target.value),className:"font-mono text-xs"}),g.jsxs(Le,{type:"button",variant:"outline",className:"shrink-0",onClick:()=>A(C=>!C),"aria-label":b(w?"settingsPage.general.hideAnthropicApiKey":"settingsPage.general.showAnthropicApiKey"),children:[w?g.jsx(R9,{}):g.jsx(k9,{}),g.jsx("span",{className:"hidden sm:inline",children:b(w?"settingsPage.general.hideAnthropicApiKey":"settingsPage.general.showAnthropicApiKey")})]})]}),g.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.general.anthropicApiKeyHint")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:c})]})]})]})}function Uie({mode:e,json:t,jsonIssue:n,items:r,models:i,onToggleMode:o,onJsonChange:l,onAddItem:u,onRemoveItem:c,onUpdateItem:d}){const m="__default__",h=i.length>0,{t:y}=We();return g.jsxs(pn,{className:"gap-4 py-4",children:[g.jsxs(Rn,{className:"px-4",children:[g.jsx(Dn,{children:y("settingsPage.reasoning.title")}),g.jsx(xr,{className:"hidden sm:block",children:y("settingsPage.reasoning.description")})]}),g.jsxs(kn,{className:"space-y-3 px-4",children:[g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("div",{className:"text-muted-foreground text-xs",children:y("settingsPage.reasoning.hint")}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(er,{checked:e==="json",onCheckedChange:o}),g.jsx(St,{className:"text-muted-foreground text-xs",children:y("settingsPage.common.jsonMode")})]})]}),e==="json"?g.jsxs("div",{className:"space-y-2",children:[g.jsx(qu,{value:t,onChange:b=>l(b.target.value),className:"min-h-[160px] lg:min-h-[120px] max-h-[36vh] overflow-auto font-mono text-xs",placeholder:y("settingsPage.reasoning.jsonPlaceholder")}),n?g.jsx(br,{variant:"warning",title:y("settingsPage.common.invalidJsonTitle"),description:n}):null]}):g.jsxs("div",{className:"space-y-2",children:[r.length===0?g.jsx("div",{className:"text-muted-foreground text-sm",children:y("settingsPage.reasoning.emptyState")}):r.map(b=>{const w=b.model||m,A=w!==m&&!i.includes(w),E=!h&&!A;return g.jsxs("div",{className:"grid gap-2 rounded-lg border p-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsxs(In,{value:w,onValueChange:C=>d(b.id,{model:C===m?"":C}),disabled:E,children:[g.jsx(Bn,{className:"min-w-[220px]",children:g.jsx(zn,{placeholder:y(h?"settingsPage.common.selectModelPlaceholder":"settingsPage.common.noModelsAvailable")})}),g.jsxs($n,{children:[g.jsx(Te,{value:m,children:y("settingsPage.common.defaultOption")}),A?g.jsx(Te,{value:w,children:y("settingsPage.common.customModel",{value:w})}):null,i.map(C=>g.jsx(Te,{value:C,children:C},C))]})]}),g.jsxs(In,{value:b.effort,onValueChange:C=>d(b.id,{effort:C}),children:[g.jsx(Bn,{className:"w-40",children:g.jsx(zn,{})}),g.jsx($n,{children:j1.map(C=>g.jsx(Te,{value:C,children:C},C))})]}),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:()=>c(b.id),children:y("settingsPage.common.remove")})]}),g.jsx("div",{className:"text-muted-foreground text-xs",children:y("settingsPage.reasoning.itemHint")})]},b.id)}),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:u,children:y("settingsPage.reasoning.addButton")})]})]})]})}function Vie({mode:e,json:t,jsonIssue:n,items:r,models:i,onToggleMode:o,onJsonChange:l,onAddItem:u,onRemoveItem:c,onUpdateItem:d}){const m="__default__",h=i.length>0,{t:y}=We();return g.jsxs(pn,{className:"gap-4 py-4",children:[g.jsxs(Rn,{className:"px-4",children:[g.jsx(Dn,{children:y("settingsPage.prompts.title")}),g.jsx(xr,{className:"hidden sm:block",children:y("settingsPage.prompts.description")})]}),g.jsxs(kn,{className:"space-y-3 px-4",children:[g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("div",{className:"text-muted-foreground text-xs",children:y("settingsPage.prompts.hint")}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(er,{checked:e==="json",onCheckedChange:o}),g.jsx(St,{className:"text-muted-foreground text-xs",children:y("settingsPage.common.jsonMode")})]})]}),e==="json"?g.jsxs("div",{className:"space-y-2",children:[g.jsx(qu,{value:t,onChange:b=>l(b.target.value),className:"min-h-[200px] lg:min-h-[140px] max-h-[40vh] overflow-auto font-mono text-xs",placeholder:y("settingsPage.prompts.jsonPlaceholder")}),n?g.jsx(br,{variant:"warning",title:y("settingsPage.common.invalidJsonTitle"),description:n}):null]}):g.jsxs("div",{className:"space-y-2",children:[r.length===0?g.jsx("div",{className:"text-muted-foreground text-sm",children:y("settingsPage.prompts.emptyState")}):r.map(b=>{const w=b.model||m,A=w!==m&&!i.includes(w),E=!h&&!A;return g.jsxs("div",{className:"grid gap-2 rounded-lg border p-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsxs(In,{value:w,onValueChange:C=>d(b.id,{model:C===m?"":C}),disabled:E,children:[g.jsx(Bn,{className:"min-w-[220px]",children:g.jsx(zn,{placeholder:y(h?"settingsPage.common.selectModelPlaceholder":"settingsPage.common.noModelsAvailable")})}),g.jsxs($n,{children:[g.jsx(Te,{value:m,children:y("settingsPage.common.defaultOption")}),A?g.jsx(Te,{value:w,children:y("settingsPage.common.customModel",{value:w})}):null,i.map(C=>g.jsx(Te,{value:C,children:C},C))]})]}),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:()=>c(b.id),children:y("settingsPage.common.remove")})]}),g.jsx(qu,{value:b.prompt,onChange:C=>d(b.id,{prompt:C.target.value}),className:"min-h-[120px] lg:min-h-[96px] max-h-[30vh] overflow-auto font-mono text-xs",placeholder:y("settingsPage.prompts.promptPlaceholder")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:y("settingsPage.prompts.itemHint")})]},b.id)}),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:u,children:y("settingsPage.prompts.addButton")})]})]})]})}function Fie({allowOriginalModelNamesForAliases:e,mode:t,onToggleMode:n}){const{t:r}=We(),i=r(e?"settingsPage.common.allow":"settingsPage.common.block");return g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("div",{className:"text-muted-foreground text-xs",children:r("settingsPage.aliases.defaultBehaviorHint",{behavior:i})}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(er,{checked:t==="json",onCheckedChange:n}),g.jsx(St,{className:"text-muted-foreground text-xs",children:r("settingsPage.common.jsonMode")})]})]})}function Hie({json:e,jsonIssue:t,onJsonChange:n}){const{t:r}=We();return g.jsxs("div",{className:"space-y-2",children:[g.jsx(qu,{value:e,onChange:i=>n(i.target.value),className:"min-h-[160px] lg:min-h-[120px] max-h-[36vh] overflow-auto font-mono text-xs",placeholder:r("settingsPage.aliases.jsonPlaceholder")}),t?g.jsx(br,{variant:"warning",title:r("settingsPage.common.invalidJsonTitle"),description:t}):null]})}function qie({item:e,models:t,emptyTargetValue:n,allowOriginalDefaultValue:r,hasModels:i,onUpdateItem:o,onRemoveItem:l}){const{t:u}=We(),c=e.target||n,d=c!==n&&!t.includes(c),m=!i&&!d,h=e.allowOriginal===void 0?r:e.allowOriginal?"allow":"block";return g.jsx("div",{className:"grid gap-2 rounded-lg border p-3",children:g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(Ct,{className:"min-w-[180px]",placeholder:u("settingsPage.aliases.aliasPlaceholder"),value:e.alias,onChange:y=>o(e.id,{alias:y.target.value})}),g.jsxs(In,{value:c,onValueChange:y=>o(e.id,{target:y===n?"":y}),disabled:m,children:[g.jsx(Bn,{className:"min-w-[220px]",children:g.jsx(zn,{placeholder:u(i?"settingsPage.aliases.selectTargetPlaceholder":"settingsPage.common.noModelsAvailable")})}),g.jsxs($n,{children:[g.jsx(Te,{value:n,children:u("settingsPage.aliases.selectOption")}),d?g.jsx(Te,{value:c,children:u("settingsPage.common.customModel",{value:c})}):null,t.map(y=>g.jsx(Te,{value:y,children:y},y))]})]}),g.jsxs(In,{value:h,onValueChange:y=>o(e.id,{allowOriginal:y===r?void 0:y==="allow"}),children:[g.jsx(Bn,{className:"min-w-[200px]",children:g.jsx(zn,{placeholder:u("settingsPage.aliases.originalModelPlaceholder")})}),g.jsxs($n,{children:[g.jsx(Te,{value:r,children:u("settingsPage.aliases.useDefault")}),g.jsx(Te,{value:"allow",children:u("settingsPage.aliases.allowOriginal")}),g.jsx(Te,{value:"block",children:u("settingsPage.aliases.blockOriginal")})]})]}),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:()=>l(e.id),children:u("settingsPage.common.remove")})]})})}function Kie({items:e,models:t,emptyTargetValue:n,allowOriginalDefaultValue:r,hasModels:i,onAddItem:o,onRemoveItem:l,onUpdateItem:u}){const{t:c}=We();return g.jsxs("div",{className:"space-y-2",children:[e.length===0?g.jsx("div",{className:"text-muted-foreground text-sm",children:c("settingsPage.aliases.emptyState")}):e.map(d=>g.jsx(qie,{item:d,models:t,emptyTargetValue:n,allowOriginalDefaultValue:r,hasModels:i,onUpdateItem:u,onRemoveItem:l},d.id)),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:o,children:c("settingsPage.aliases.addButton")})]})}function Gie({allowOriginalModelNamesForAliases:e,mode:t,json:n,jsonIssue:r,items:i,models:o,onToggleMode:l,onJsonChange:u,onAddItem:c,onRemoveItem:d,onUpdateItem:m}){const h="__target__",y="__allow_original_default__",b=o.length>0,{t:w}=We();return g.jsxs(pn,{className:"gap-4 py-4",children:[g.jsxs(Rn,{className:"px-4",children:[g.jsx(Dn,{children:w("settingsPage.aliases.title")}),g.jsx(xr,{className:"hidden sm:block",children:w("settingsPage.aliases.description")})]}),g.jsxs(kn,{className:"space-y-3 px-4",children:[g.jsx(Fie,{allowOriginalModelNamesForAliases:e,mode:t,onToggleMode:l}),t==="json"?g.jsx(Hie,{json:n,jsonIssue:r,onJsonChange:u}):g.jsx(Kie,{items:i,models:o,emptyTargetValue:h,allowOriginalDefaultValue:y,hasModels:b,onAddItem:c,onRemoveItem:d,onUpdateItem:m})]})]})}function Yie({accountAffinityEnabled:e,modelRefreshIntervalInput:t,modelRefreshIntervalIssue:n,sessionAffinityRetentionInput:r,sessionAffinityRetentionIssue:i,allowOriginalModelNamesForAliases:o,useFunctionApplyPatch:l,forceAgent:u,compactUseSmallModel:c,messageStartInputTokensFallback:d,useMessagesApi:m,useResponsesApiWebSearch:h,responsesApiContextManagementModelsValue:y,onToggleAccountAffinity:b,onModelRefreshIntervalChange:w,onSessionAffinityRetentionChange:A,onToggleAllowOriginalModelNamesForAliases:E,onToggleUseFunctionApplyPatch:C,onToggleForceAgent:j,onToggleCompactUseSmallModel:T,onToggleMessageStartInputTokensFallback:O,onToggleUseMessagesApi:N,onToggleUseResponsesApiWebSearch:_,onResponsesApiContextManagementModelsChange:M}){const{t:R}=We();return g.jsxs(pn,{className:"gap-4 py-4",children:[g.jsxs(Rn,{className:"px-4",children:[g.jsx(Dn,{children:R("settingsPage.advanced.title")}),g.jsx(xr,{className:"hidden sm:block",children:R("settingsPage.advanced.description")})]}),g.jsxs(kn,{className:"space-y-3 px-4",children:[g.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:R("settingsPage.advanced.routingGroupTitle")}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.accountAffinity.label")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.accountAffinity.hint")})]}),g.jsx(er,{checked:e,onCheckedChange:b})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.allowOriginalModelNamesLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.allowOriginalModelNamesHint")})]}),g.jsx(er,{checked:o,onCheckedChange:E})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.forceAgentLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.forceAgentHint")})]}),g.jsx(er,{checked:u,onCheckedChange:j})]}),g.jsx("hr",{className:"border-t mt-1"}),g.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:R("settingsPage.advanced.apiGroupTitle")}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.useMessagesApiLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.useMessagesApiHint")})]}),g.jsx(er,{checked:m,onCheckedChange:N})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.useFunctionApplyPatchLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.useFunctionApplyPatchHint")})]}),g.jsx(er,{checked:l,onCheckedChange:C})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.useResponsesApiWebSearchLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.useResponsesApiWebSearchHint")})]}),g.jsx(er,{checked:h,onCheckedChange:_})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(St,{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.responsesApiContextManagementModelsLabel")}),g.jsx(qu,{autoComplete:"off",placeholder:R("settingsPage.advanced.responsesApiContextManagementModelsPlaceholder"),value:y,onChange:B=>M(B.target.value),className:"min-h-[96px] font-mono text-xs"}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.responsesApiContextManagementModelsHint")})]}),g.jsx("hr",{className:"border-t mt-1"}),g.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:R("settingsPage.advanced.modelGroupTitle")}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(St,{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.modelRefreshIntervalLabel")}),g.jsx(Ct,{type:"number",min:"0",step:"0.5",value:t,onChange:B=>w(B.target.value)}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.modelRefreshIntervalHint")}),n?g.jsx("div",{className:"text-destructive text-xs",children:n}):null]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(St,{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.sessionAffinityRetentionLabel")}),g.jsx(Ct,{type:"number",min:"0",step:"1",value:r,onChange:B=>A(B.target.value)}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.sessionAffinityRetentionHint")}),i?g.jsx("div",{className:"text-destructive text-xs",children:i}):null]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.compactUseSmallModelLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.compactUseSmallModelHint")})]}),g.jsx(er,{checked:c,onCheckedChange:T})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.messageStartInputTokensFallbackLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.messageStartInputTokensFallbackHint")})]}),g.jsx(er,{checked:d,onCheckedChange:O})]})]})]})}function Wie({providerId:e,item:t,onRemoveModel:n,onUpdateModel:r}){const{t:i}=We();return g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(Ct,{className:"min-w-[180px]",placeholder:i("settingsPage.advanced.providersModelIdPlaceholder"),value:t.model,onChange:o=>r(e,t.id,{model:o.target.value})}),g.jsx(Ct,{className:"w-28",type:"number",step:"0.1",min:"0",placeholder:"temperature",value:t.temperature,onChange:o=>r(e,t.id,{temperature:o.target.value})}),g.jsx(Ct,{className:"w-28",type:"number",step:"0.01",min:"0",placeholder:"topP",value:t.topP,onChange:o=>r(e,t.id,{topP:o.target.value})}),g.jsx(Ct,{className:"w-28",type:"number",step:"1",min:"0",placeholder:"topK",value:t.topK,onChange:o=>r(e,t.id,{topK:o.target.value})}),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:()=>n(e,t.id),children:i("settingsPage.common.remove")})]})}function Xie({item:e,onRemoveProvider:t,onUpdateProvider:n,onAddModel:r,onRemoveModel:i,onUpdateModel:o}){const{t:l}=We();return g.jsxs("div",{className:"grid gap-3 rounded-lg border p-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(Ct,{className:"min-w-[200px]",placeholder:l("settingsPage.advanced.providersNamePlaceholder"),value:e.name,onChange:u=>n(e.id,{name:u.target.value})}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(er,{checked:e.enabled,onCheckedChange:u=>n(e.id,{enabled:u})}),g.jsx(St,{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersEnabledLabel")})]}),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:()=>t(e.id),children:l("settingsPage.common.remove")})]}),g.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[g.jsxs("div",{className:"grid gap-2",children:[g.jsx(St,{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersBaseUrlLabel")}),g.jsx(Ct,{autoComplete:"off",placeholder:l("settingsPage.advanced.providersBaseUrlPlaceholder"),value:e.baseUrl,onChange:u=>n(e.id,{baseUrl:u.target.value})})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(St,{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersApiKeyLabel")}),g.jsx(Ct,{type:"password",autoComplete:"off",placeholder:l("settingsPage.advanced.providersApiKeyPlaceholder"),value:e.apiKey,onChange:u=>n(e.id,{apiKey:u.target.value})})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(St,{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersAuthTypeLabel")}),g.jsxs(In,{value:e.authType,onValueChange:u=>n(e.id,{authType:u}),children:[g.jsx(Bn,{children:g.jsx(zn,{})}),g.jsxs($n,{children:[g.jsx(Te,{value:"x-api-key",children:l("settingsPage.advanced.providersAuthTypeXApiKey")}),g.jsx(Te,{value:"authorization",children:l("settingsPage.advanced.providersAuthTypeAuthorization")})]})]}),g.jsx("div",{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersAuthTypeHint")})]})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:l("settingsPage.advanced.providersAdjustInputTokensLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersAdjustInputTokensHint")})]}),g.jsx(er,{checked:e.adjustInputTokens,onCheckedChange:u=>n(e.id,{adjustInputTokens:u})})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[g.jsx("div",{className:"text-sm font-medium",children:l("settingsPage.advanced.providersModelsLabel")}),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:()=>r(e.id),children:l("settingsPage.advanced.providersAddModel")})]}),e.models.length===0?g.jsx("div",{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersModelsEmptyState")}):e.models.map(u=>g.jsx(Wie,{providerId:e.id,item:u,onUpdateModel:o,onRemoveModel:i},u.id))]})]})}function Zie({items:e,issue:t,onAddProvider:n,onRemoveProvider:r,onUpdateProvider:i,onAddModel:o,onRemoveModel:l,onUpdateModel:u}){const{t:c}=We();return g.jsxs(pn,{className:"gap-4 py-4",children:[g.jsxs(Rn,{className:"px-4",children:[g.jsx(Dn,{children:c("settingsPage.advanced.providersTitle")}),g.jsx(xr,{className:"hidden sm:block",children:c("settingsPage.advanced.providersDescription")})]}),g.jsxs(kn,{className:"space-y-3 px-4",children:[t?g.jsx(br,{variant:"warning",title:c("settingsPage.advanced.providersIssueTitle"),description:t}):null,e.length===0?g.jsx("div",{className:"text-muted-foreground text-sm",children:c("settingsPage.advanced.providersEmptyState")}):e.map(d=>g.jsx(Xie,{item:d,onRemoveProvider:r,onUpdateProvider:i,onAddModel:o,onRemoveModel:l,onUpdateModel:u},d.id)),g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:n,children:c("settingsPage.advanced.providersAddProvider")})]})]})}function EM(e){return typeof e=="number"?String(e):""}function CM(e,t,n){switch(t){case"modelRefreshIntervalHours":return{...e,modelRefreshIntervalHours:n};case"sessionAffinityRetentionDays":return{...e,sessionAffinityRetentionDays:n}}}function jM(e){const{value:t,key:n,issueMessage:r,setInput:i,setIssue:o,setDraft:l}=e;i(t);const u=t.trim();if(!u){o(null),l(d=>CM(d,n,void 0));return}const c=Number(u);if(!Number.isFinite(c)||c<0){o(r);return}o(null),l(d=>CM(d,n,c))}function Qie(){const{t:e}=We(),[t,n]=v.useState(!1),[r,i]=v.useState(!1),[o,l]=v.useState(null),[u,c]=v.useState(null),[d,m]=v.useState([]),[h,y]=v.useState({}),[b,w]=v.useState("{}"),[A,E]=v.useState(""),[C,j]=v.useState(null),[T,O]=v.useState(""),[N,_]=v.useState(null),[M,R]=v.useState(""),B=Iie(Ce=>y(_e=>({..._e,extraPrompts:Ce}))),V=zie(Ce=>y(_e=>({..._e,modelReasoningEfforts:Ce}))),H=Bie(Ce=>y(_e=>({..._e,modelAliases:Ce}))),z=Rie(Ce=>y(_e=>({..._e,providers:Ce}))),{mode:W,items:Q,json:se,jsonIssue:L,onToggleMode:F,onJsonChange:$,onAddItem:ae,onRemoveItem:G,onUpdateItem:k,setFromRecord:I}=B,{mode:q,items:ne,json:de,jsonIssue:pe,onToggleMode:X,onJsonChange:he,onAddItem:oe,onRemoveItem:le,onUpdateItem:ve,setFromRecord:re}=V,{mode:Be,items:Pe,json:Fe,jsonIssue:De,onToggleMode:Rt,onJsonChange:qr,onAddItem:En,onRemoveItem:Bi,onUpdateItem:xa,setFromRecord:Gt}=H,{items:Kr,issue:Yt,onAddProvider:gs,onRemoveProvider:gi,onUpdateProvider:bo,onAddModel:vi,onRemoveModel:wa,onUpdateModel:Er,setFromRecord:Sa}=z,Xn=v.useCallback(Ce=>{const{_configPath:_e,...Je}=Ce,rh=O1(Je.modelAliases),Cc=cp(rh),Ca=bM(Je);c(_e??null);const ja={...Je,auth:{apiKeys:Ca},modelAliases:Cc};y(ja),w(yM(ja)),I(Je.extraPrompts),re(Je.modelReasoningEfforts),Gt(Cc),Sa(Je.providers),E(EM(Je.modelRefreshIntervalHours)),j(null),O(EM(Je.sessionAffinityRetentionDays)),_(null),R(Je.responsesApiContextManagementModels?.join(`
|
|
65
|
-
`)??"")},[I,re,Gt,Sa,E,j,O,_,R]),lr=v.useCallback(async()=>{n(!0),l(null);try{const[Ce,_e]=await Promise.allSettled([jne(),One()]);if(Ce.status==="fulfilled")Xn(Ce.value);else throw Ce.reason;_e.status==="fulfilled"?m(_e.value.items??[]):(m([]),Ut.error(jt.t("settingsPage.toast.loadModelsFailed"),{description:_e.reason instanceof Error?_e.reason.message:String(_e.reason)}))}catch(Ce){const _e=Ce instanceof di?Ce.message:String(Ce);l(_e),Ut.error(jt.t("settingsPage.toast.loadConfigFailed"),{description:_e})}finally{n(!1)}},[Xn]);v.useEffect(()=>{lr()},[lr]);const Wt=v.useCallback(async()=>{i(!0),l(null);try{const Ce=await Tne(h);Xn(Ce),Ut.success(jt.t("settingsPage.toast.configSaved"))}catch(Ce){const _e=Ce instanceof di?Ce.message:String(Ce);l(_e),Ut.error(jt.t("settingsPage.toast.saveConfigFailed"),{description:_e})}finally{i(!1)}},[Xn,h]),Zn=v.useCallback(()=>{lr()},[lr]),Xt=v.useCallback(()=>{Wt()},[Wt]),vs=v.useCallback(Ce=>{y(_e=>({..._e,smallModel:Ce==="__default__"?"":Ce}))},[y]),Aa=v.useCallback(Ce=>{y(_e=>({..._e,smallModel:Ce}))},[y]),ur=v.useCallback(Ce=>{const _e=Tie(Ce);y(Je=>({...Je,auth:{apiKeys:_e},apiKey:void 0}))},[y]),$i=v.useCallback(Ce=>{y(_e=>({..._e,anthropicApiKey:Ce}))},[y]),Ui=v.useCallback(Ce=>{y(_e=>({..._e,accountAffinity:Ce}))},[y]),yi=v.useCallback(Ce=>{jM({value:Ce,key:"modelRefreshIntervalHours",issueMessage:e("settingsPage.advanced.modelRefreshIntervalError"),setInput:E,setIssue:j,setDraft:y})},[y,E,j,e]),cr=v.useCallback(Ce=>{jM({value:Ce,key:"sessionAffinityRetentionDays",issueMessage:e("settingsPage.advanced.sessionAffinityRetentionError"),setInput:O,setIssue:_,setDraft:y})},[y,O,_,e]),we=v.useCallback(Ce=>{y(_e=>({..._e,allowOriginalModelNamesForAliases:Ce}))},[y]),st=v.useCallback(Ce=>{y(_e=>({..._e,useFunctionApplyPatch:Ce}))},[y]),lt=v.useCallback(Ce=>{y(_e=>({..._e,forceAgent:Ce}))},[y]),bt=v.useCallback(Ce=>{y(_e=>({..._e,compactUseSmallModel:Ce}))},[y]),Cr=v.useCallback(Ce=>{y(_e=>({..._e,messageStartInputTokensFallback:Ce}))},[y]),ze=v.useCallback(Ce=>{y(_e=>({..._e,useMessagesApi:Ce}))},[y]),Ft=v.useCallback(Ce=>{y(_e=>({..._e,useResponsesApiWebSearch:Ce}))},[y]),Ea=v.useCallback(Ce=>{R(Ce);const _e=d4(Ce);y(Je=>({...Je,responsesApiContextManagementModels:_e}))},[y,R]),Cn=d.length>0,Vn=h.smallModel?h.smallModel:"__default__",xo=!r&&!t&&!(W==="json"&&L)&&!(q==="json"&&pe)&&!(Be==="json"&&De)&&!C&&!N&&!Yt,jr=v.useMemo(()=>yM(h)!==b,[h,b]),Sc=e("settingsPage.general.legacyAuthNote",{env:"COPILOT_API_KEY"}),th=e(Cn?"settingsPage.general.smallModel":"settingsPage.general.smallModelManual"),Vi=h.smallModel??"",ln=bM(h).join(`
|
|
66
|
-
`),Fn=h.anthropicApiKey??"",wo=e("settingsPage.general.anthropicApiKeyEnvNote",{env:"ANTHROPIC_API_KEY"}),Ac=h.accountAffinity??!0,Zv=h.allowOriginalModelNamesForAliases??!1,Qv=h.useFunctionApplyPatch??!0,nh=h.forceAgent??!1,ys=h.compactUseSmallModel??!0,Ec=h.messageStartInputTokensFallback??!1,So=h.useMessagesApi??!0,Ao=h.useResponsesApiWebSearch??!0;return{loading:t,saving:r,error:o,configPath:u,canSave:xo,isDirty:jr,onReload:Zn,onSave:Xt,hasModels:Cn,smallModelLabel:th,smallModelValue:Vn,smallModelInputValue:Vi,models:d,authApiKeysValue:ln,anthropicApiKeyValue:Fn,legacyAuthNote:Sc,anthropicApiKeyEnvNote:wo,onSmallModelSelect:vs,onSmallModelInput:Aa,onAuthApiKeysChange:ur,onAnthropicApiKeyChange:$i,accountAffinityEnabled:Ac,onAccountAffinityToggle:Ui,modelRefreshIntervalInput:A,modelRefreshIntervalIssue:C,sessionAffinityRetentionInput:T,sessionAffinityRetentionIssue:N,onSessionAffinityRetentionChange:cr,onModelRefreshIntervalChange:yi,allowOriginalModelNamesForAliases:Zv,reasoningMode:q,reasoningJson:de,reasoningJsonIssue:pe,reasoningItems:ne,onReasoningToggleMode:X,onReasoningJsonChange:he,onReasoningAddItem:oe,onReasoningRemoveItem:le,onReasoningUpdateItem:ve,extraMode:W,extraJson:se,extraJsonIssue:L,extraItems:Q,onExtraToggleMode:F,onExtraJsonChange:$,onExtraAddItem:ae,onExtraRemoveItem:G,onExtraUpdateItem:k,aliasMode:Be,aliasJson:Fe,aliasJsonIssue:De,aliasItems:Pe,onAliasToggleMode:Rt,onAliasJsonChange:qr,onAliasAddItem:En,onAliasRemoveItem:Bi,onAliasUpdateItem:xa,useFunctionApplyPatch:Qv,forceAgent:nh,compactUseSmallModel:ys,messageStartInputTokensFallback:Ec,useMessagesApi:So,useResponsesApiWebSearch:Ao,responsesApiContextManagementModelsValue:M,onUseMessagesApiToggle:ze,onUseResponsesApiWebSearchToggle:Ft,onResponsesApiContextManagementModelsChange:Ea,providersItems:Kr,providersIssue:Yt,onProvidersAddProvider:gs,onProvidersRemoveProvider:gi,onProvidersUpdateProvider:bo,onProvidersAddModel:vi,onProvidersRemoveModel:wa,onProvidersUpdateModel:Er,onAllowOriginalModelNamesForAliasesToggle:we,onUseFunctionApplyPatchToggle:st,onForceAgentToggle:lt,onCompactUseSmallModelToggle:bt,onMessageStartInputTokensFallbackToggle:Cr}}function Jie({loading:e,saving:t,error:n,configPath:r,canSave:i,isDirty:o,onReload:l,onSave:u,hasModels:c,smallModelLabel:d,smallModelValue:m,smallModelInputValue:h,models:y,authApiKeysValue:b,anthropicApiKeyValue:w,legacyAuthNote:A,anthropicApiKeyEnvNote:E,onSmallModelSelect:C,onSmallModelInput:j,onAuthApiKeysChange:T,onAnthropicApiKeyChange:O,accountAffinityEnabled:N,onAccountAffinityToggle:_,modelRefreshIntervalInput:M,modelRefreshIntervalIssue:R,sessionAffinityRetentionInput:B,sessionAffinityRetentionIssue:V,onSessionAffinityRetentionChange:H,onModelRefreshIntervalChange:z,reasoningMode:W,reasoningJson:Q,reasoningJsonIssue:se,reasoningItems:L,onReasoningToggleMode:F,onReasoningJsonChange:$,onReasoningAddItem:ae,onReasoningRemoveItem:G,onReasoningUpdateItem:k,extraMode:I,extraJson:q,extraJsonIssue:ne,extraItems:de,onExtraToggleMode:pe,onExtraJsonChange:X,onExtraAddItem:he,onExtraRemoveItem:oe,onExtraUpdateItem:le,aliasMode:ve,aliasJson:re,aliasJsonIssue:Be,aliasItems:Pe,onAliasToggleMode:Fe,onAliasJsonChange:De,onAliasAddItem:Rt,onAliasRemoveItem:qr,onAliasUpdateItem:En,allowOriginalModelNamesForAliases:Bi,useFunctionApplyPatch:xa,forceAgent:Gt,compactUseSmallModel:Kr,messageStartInputTokensFallback:Yt,useMessagesApi:gs,useResponsesApiWebSearch:gi,responsesApiContextManagementModelsValue:bo,onUseMessagesApiToggle:vi,onUseResponsesApiWebSearchToggle:wa,onResponsesApiContextManagementModelsChange:Er,providersItems:Sa,providersIssue:Xn,onProvidersAddProvider:lr,onProvidersRemoveProvider:Wt,onProvidersUpdateProvider:Zn,onProvidersAddModel:Xt,onProvidersRemoveModel:vs,onProvidersUpdateModel:Aa,onAllowOriginalModelNamesForAliasesToggle:ur,onUseFunctionApplyPatchToggle:$i,onForceAgentToggle:Ui,onCompactUseSmallModelToggle:yi,onMessageStartInputTokensFallbackToggle:cr}){const{t:we}=We(),st=v.useMemo(()=>[{id:"general",label:we("settingsPage.sections.general")},{id:"reasoning",label:we("settingsPage.sections.reasoning")},{id:"aliases",label:we("settingsPage.sections.aliases")},{id:"prompts",label:we("settingsPage.sections.prompts")},{id:"advanced",label:we("settingsPage.sections.advanced")},{id:"providers",label:we("settingsPage.sections.providers")}],[we]),{activeSection:lt,registerSection:bt,scrollToSection:Cr}=Eie({sectionIds:[...Cie]});return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"text-lg font-semibold",children:we("nav.settings")}),g.jsx("div",{className:"text-muted-foreground text-sm",children:we("settingsPage.subtitle")})]}),g.jsxs("div",{className:"ml-auto flex flex-col items-end gap-1 text-right",children:[g.jsx("div",{className:"flex flex-wrap items-center gap-2",children:g.jsx(Le,{type:"button",variant:"outline",size:"sm",onClick:l,disabled:e||t,children:we(e?"common.refreshing":"common.refresh")})}),r?g.jsx("div",{className:"text-muted-foreground text-xs leading-tight hidden sm:block",children:we("settingsPage.configPath",{path:r})}):null,g.jsx("div",{className:"text-muted-foreground text-xs leading-tight hidden sm:block",children:we("settingsPage.note")})]})]}),n?g.jsx(br,{variant:"error",title:we("settingsPage.errorTitle"),description:n,actionLabel:we("common.retry"),onAction:l}):null,g.jsx("nav",{className:"flex gap-1 overflow-x-auto pb-2 lg:hidden","aria-label":we("settingsPage.navigation.ariaLabel"),children:st.map(ze=>{const Ft=lt===ze.id;return g.jsx("button",{type:"button","aria-current":Ft?"true":void 0,onClick:()=>Cr(ze.id),className:me("shrink-0 rounded-full px-3 py-1.5 text-xs font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",Ft?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:ze.label},ze.id)})}),g.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-12",children:[g.jsx("aside",{className:"hidden lg:block lg:col-span-2",children:g.jsx(Aie,{sections:st,activeSection:lt,onSectionClick:Cr})}),e&&!n?g.jsx("div",{className:"space-y-6 lg:col-span-10","aria-busy":"true",children:Array.from({length:4},(ze,Ft)=>g.jsxs("div",{className:"rounded-xl border bg-card p-4 space-y-3",children:[g.jsx("div",{className:"h-5 w-32 rounded bg-muted animate-pulse"}),g.jsx("div",{className:"h-3 w-48 rounded bg-muted animate-pulse"}),g.jsxs("div",{className:"space-y-2 pt-2",children:[g.jsx("div",{className:"h-9 rounded bg-muted animate-pulse"}),g.jsx("div",{className:"h-9 rounded bg-muted animate-pulse"})]})]},Ft))}):null,g.jsxs("main",{className:me("space-y-6 lg:col-span-10",e&&"hidden"),children:[g.jsx(Vs,{id:"general",isActive:lt==="general",ref:ze=>bt("general",ze),style:{animationDelay:"0ms"},children:g.jsx($ie,{hasModels:c,smallModelLabel:d,smallModelValue:m,smallModelInputValue:h,models:y,authApiKeysValue:b,anthropicApiKeyValue:w,legacyAuthNote:A,anthropicApiKeyEnvNote:E,onSmallModelSelect:C,onSmallModelInput:j,onAuthApiKeysChange:T,onAnthropicApiKeyChange:O})}),g.jsx(Vs,{id:"reasoning",isActive:lt==="reasoning",ref:ze=>bt("reasoning",ze),style:{animationDelay:"60ms"},children:g.jsx(Uie,{mode:W,json:Q,jsonIssue:se,items:L,models:y,onToggleMode:F,onJsonChange:$,onAddItem:ae,onRemoveItem:G,onUpdateItem:k})}),g.jsx(Vs,{id:"aliases",isActive:lt==="aliases",ref:ze=>bt("aliases",ze),style:{animationDelay:"120ms"},children:g.jsx(Gie,{allowOriginalModelNamesForAliases:Bi,mode:ve,json:re,jsonIssue:Be,items:Pe,models:y,onToggleMode:Fe,onJsonChange:De,onAddItem:Rt,onRemoveItem:qr,onUpdateItem:En})}),g.jsx(Vs,{id:"prompts",isActive:lt==="prompts",ref:ze=>bt("prompts",ze),style:{animationDelay:"180ms"},children:g.jsx(Vie,{mode:I,json:q,jsonIssue:ne,items:de,models:y,onToggleMode:pe,onJsonChange:X,onAddItem:he,onRemoveItem:oe,onUpdateItem:le})}),g.jsx(Vs,{id:"advanced",isActive:lt==="advanced",ref:ze=>bt("advanced",ze),style:{animationDelay:"240ms"},children:g.jsx(Yie,{accountAffinityEnabled:N,modelRefreshIntervalInput:M,modelRefreshIntervalIssue:R,sessionAffinityRetentionInput:B,sessionAffinityRetentionIssue:V,allowOriginalModelNamesForAliases:Bi,useFunctionApplyPatch:xa,forceAgent:Gt,compactUseSmallModel:Kr,messageStartInputTokensFallback:Yt,useMessagesApi:gs,useResponsesApiWebSearch:gi,responsesApiContextManagementModelsValue:bo,onToggleAccountAffinity:_,onModelRefreshIntervalChange:z,onSessionAffinityRetentionChange:H,onToggleAllowOriginalModelNamesForAliases:ur,onToggleUseFunctionApplyPatch:$i,onToggleForceAgent:Ui,onToggleCompactUseSmallModel:yi,onToggleMessageStartInputTokensFallback:cr,onToggleUseMessagesApi:vi,onToggleUseResponsesApiWebSearch:wa,onResponsesApiContextManagementModelsChange:Er})}),g.jsx(Vs,{id:"providers",isActive:lt==="providers",ref:ze=>bt("providers",ze),style:{animationDelay:"300ms"},children:g.jsx(Zie,{items:Sa,issue:Xn,onAddProvider:lr,onRemoveProvider:Wt,onUpdateProvider:Zn,onAddModel:Xt,onRemoveModel:vs,onUpdateModel:Aa})})]})]}),o||t?g.jsx(Sie,{saving:t,canSave:i,onSave:u}):null]})}function eae(){const e=Qie();return g.jsx(Jie,{...e})}var tae=["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 HA(e){if(typeof e!="string")return!1;var t=tae;return t.includes(e)}var nae=["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"],rae=new Set(nae);function p4(e){return typeof e!="string"?!1:rae.has(e)}function g4(e){return typeof e=="string"&&e.startsWith("data-")}function Ri(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(p4(n)||g4(n))&&(t[n]=e[n]);return t}function av(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Ri(t)}return typeof e=="object"&&!Array.isArray(e)?Ri(e):null}function Gn(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(p4(n)||g4(n)||HA(n))&&(t[n]=e[n]);return t}function iae(e){return e==null?null:v.isValidElement(e)?Gn(e.props):typeof e=="object"&&!Array.isArray(e)?Gn(e):null}var aae=["children","width","height","viewBox","className","style","title","desc"];function P1(){return P1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P1.apply(null,arguments)}function oae(e,t){if(e==null)return{};var n,r,i=sae(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var qA=v.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:o,className:l,style:u,title:c,desc:d}=e,m=oae(e,aae),h=o||{width:r,height:i,x:0,y:0},y=ot("recharts-surface",l);return v.createElement("svg",P1({},Gn(m),{className:y,width:r,height:i,style:u,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height),ref:t}),v.createElement("title",null,c),v.createElement("desc",null,d),n)}),lae=["children","className"];function N1(){return N1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N1.apply(null,arguments)}function uae(e,t){if(e==null)return{};var n,r,i=cae(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ur=v.forwardRef((e,t)=>{var{children:n,className:r}=e,i=uae(e,lae),o=ot("recharts-layer",r);return v.createElement("g",N1({className:o},Gn(i),{ref:t}),n)}),v4=v.createContext(null),fae=()=>v.useContext(v4);function gt(e){return function(){return e}}const y4=Math.cos,Ip=Math.sin,Li=Math.sqrt,zp=Math.PI,ov=2*zp,_1=Math.PI,M1=2*_1,Fs=1e-6,dae=M1-Fs;function b4(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function hae(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return b4;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class mae{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?b4:hae(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,l){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,u=this._y1,c=r-t,d=i-n,m=l-t,h=u-n,y=m*m+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(y>Fs)if(!(Math.abs(h*c-d*m)>Fs)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let b=r-l,w=i-u,A=c*c+d*d,E=b*b+w*w,C=Math.sqrt(A),j=Math.sqrt(y),T=o*Math.tan((_1-Math.acos((A+y-E)/(2*C*j)))/2),O=T/j,N=T/C;Math.abs(O-1)>Fs&&this._append`L${t+O*m},${n+O*h}`,this._append`A${o},${o},0,0,${+(h*b>m*w)},${this._x1=t+N*c},${this._y1=n+N*d}`}}arc(t,n,r,i,o,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),c=r*Math.sin(i),d=t+u,m=n+c,h=1^l,y=l?i-o:o-i;this._x1===null?this._append`M${d},${m}`:(Math.abs(this._x1-d)>Fs||Math.abs(this._y1-m)>Fs)&&this._append`L${d},${m}`,r&&(y<0&&(y=y%M1+M1),y>dae?this._append`A${r},${r},0,1,${h},${t-u},${n-c}A${r},${r},0,1,${h},${this._x1=d},${this._y1=m}`:y>Fs&&this._append`A${r},${r},0,${+(y>=_1)},${h},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function KA(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new mae(t)}function GA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function x4(e){this._context=e}x4.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 sv(e){return new x4(e)}function w4(e){return e[0]}function S4(e){return e[1]}function A4(e,t){var n=gt(!0),r=null,i=sv,o=null,l=KA(u);e=typeof e=="function"?e:e===void 0?w4:gt(e),t=typeof t=="function"?t:t===void 0?S4:gt(t);function u(c){var d,m=(c=GA(c)).length,h,y=!1,b;for(r==null&&(o=i(b=l())),d=0;d<=m;++d)!(d<m&&n(h=c[d],d,c))===y&&((y=!y)?o.lineStart():o.lineEnd()),y&&o.point(+e(h,d,c),+t(h,d,c));if(b)return o=null,b+""||null}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:gt(+c),u):e},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:gt(+c),u):t},u.defined=function(c){return arguments.length?(n=typeof c=="function"?c:gt(!!c),u):n},u.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),u):i},u.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),u):r},u}function Dm(e,t,n){var r=null,i=gt(!0),o=null,l=sv,u=null,c=KA(d);e=typeof e=="function"?e:e===void 0?w4:gt(+e),t=typeof t=="function"?t:gt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?S4:gt(+n);function d(h){var y,b,w,A=(h=GA(h)).length,E,C=!1,j,T=new Array(A),O=new Array(A);for(o==null&&(u=l(j=c())),y=0;y<=A;++y){if(!(y<A&&i(E=h[y],y,h))===C)if(C=!C)b=y,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),w=y-1;w>=b;--w)u.point(T[w],O[w]);u.lineEnd(),u.areaEnd()}C&&(T[y]=+e(E,y,h),O[y]=+t(E,y,h),u.point(r?+r(E,y,h):T[y],n?+n(E,y,h):O[y]))}if(j)return u=null,j+""||null}function m(){return A4().defined(i).curve(l).context(o)}return d.x=function(h){return arguments.length?(e=typeof h=="function"?h:gt(+h),r=null,d):e},d.x0=function(h){return arguments.length?(e=typeof h=="function"?h:gt(+h),d):e},d.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:gt(+h),d):r},d.y=function(h){return arguments.length?(t=typeof h=="function"?h:gt(+h),n=null,d):t},d.y0=function(h){return arguments.length?(t=typeof h=="function"?h:gt(+h),d):t},d.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:gt(+h),d):n},d.lineX0=d.lineY0=function(){return m().x(e).y(t)},d.lineY1=function(){return m().x(e).y(n)},d.lineX1=function(){return m().x(r).y(t)},d.defined=function(h){return arguments.length?(i=typeof h=="function"?h:gt(!!h),d):i},d.curve=function(h){return arguments.length?(l=h,o!=null&&(u=l(o)),d):l},d.context=function(h){return arguments.length?(h==null?o=u=null:u=l(o=h),d):o},d}class E4{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function pae(e){return new E4(e,!0)}function gae(e){return new E4(e,!1)}const YA={draw(e,t){const n=Li(t/zp);e.moveTo(n,0),e.arc(0,0,n,0,ov)}},vae={draw(e,t){const n=Li(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},C4=Li(1/3),yae=C4*2,bae={draw(e,t){const n=Li(t/yae),r=n*C4;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},xae={draw(e,t){const n=Li(t),r=-n/2;e.rect(r,r,n,n)}},wae=.8908130915292852,j4=Ip(zp/10)/Ip(7*zp/10),Sae=Ip(ov/10)*j4,Aae=-y4(ov/10)*j4,Eae={draw(e,t){const n=Li(t*wae),r=Sae*n,i=Aae*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const l=ov*o/5,u=y4(l),c=Ip(l);e.lineTo(c*n,-u*n),e.lineTo(u*r-c*i,c*r+u*i)}e.closePath()}},rx=Li(3),Cae={draw(e,t){const n=-Li(t/(rx*3));e.moveTo(0,n*2),e.lineTo(-rx*n,-n),e.lineTo(rx*n,-n),e.closePath()}},ri=-.5,ii=Li(3)/2,R1=1/Li(12),jae=(R1/2+1)*3,Tae={draw(e,t){const n=Li(t/jae),r=n/2,i=n*R1,o=r,l=n*R1+n,u=-o,c=l;e.moveTo(r,i),e.lineTo(o,l),e.lineTo(u,c),e.lineTo(ri*r-ii*i,ii*r+ri*i),e.lineTo(ri*o-ii*l,ii*o+ri*l),e.lineTo(ri*u-ii*c,ii*u+ri*c),e.lineTo(ri*r+ii*i,ri*i-ii*r),e.lineTo(ri*o+ii*l,ri*l-ii*o),e.lineTo(ri*u+ii*c,ri*c-ii*u),e.closePath()}};function Oae(e,t){let n=null,r=KA(i);e=typeof e=="function"?e:gt(e||YA),t=typeof t=="function"?t:gt(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:gt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:gt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Bp(){}function $p(e,t,n){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+n)/6)}function T4(e){this._context=e}T4.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:$p(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:$p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pae(e){return new T4(e)}function O4(e){this._context=e}O4.prototype={areaStart:Bp,areaEnd:Bp,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:$p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Nae(e){return new O4(e)}function P4(e){this._context=e}P4.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:$p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _ae(e){return new P4(e)}function N4(e){this._context=e}N4.prototype={areaStart:Bp,areaEnd:Bp,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 Mae(e){return new N4(e)}function TM(e){return e<0?-1:1}function OM(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),l=(n-e._y1)/(i||r<0&&-0),u=(o*i+l*r)/(r+i);return(TM(o)+TM(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(u))||0}function PM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ix(e,t,n){var r=e._x0,i=e._y0,o=e._x1,l=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,l-u*n,o,l)}function Up(e){this._context=e}Up.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:ix(this,this._t0,PM(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 n=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,ix(this,PM(this,n=OM(this,e,t)),n);break;default:ix(this,this._t0,n=OM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function _4(e){this._context=new M4(e)}(_4.prototype=Object.create(Up.prototype)).point=function(e,t){Up.prototype.point.call(this,t,e)};function M4(e){this._context=e}M4.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,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function Rae(e){return new Up(e)}function Dae(e){return new _4(e)}function R4(e){this._context=e}R4.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,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=NM(e),i=NM(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[l],t[l]);(this._line||this._line!==0&&n===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 NM(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),l=new Array(n);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(i[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function kae(e){return new R4(e)}function lv(e,t){this._context=e,this._t=t}lv.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 n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Lae(e){return new lv(e,.5)}function Iae(e){return new lv(e,0)}function zae(e){return new lv(e,1)}function pl(e,t){if((l=e.length)>1)for(var n=1,r,i,o=e[t[0]],l,u=o.length;n<l;++n)for(i=o,o=e[t[n]],r=0;r<u;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function D1(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Bae(e,t){return e[t]}function $ae(e){const t=[];return t.key=e,t}function Uae(){var e=gt([]),t=D1,n=pl,r=Bae;function i(o){var l=Array.from(e.apply(this,arguments),$ae),u,c=l.length,d=-1,m;for(const h of o)for(u=0,++d;u<c;++u)(l[u][d]=[0,+r(h,l[u].key,d,o)]).data=h;for(u=0,m=GA(t(l));u<c;++u)l[m[u]].index=u;return n(l,m),l}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:gt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:gt(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?D1:typeof o=="function"?o:gt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??pl,i):n},i}function Vae(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,l;i<o;++i){for(l=n=0;n<r;++n)l+=e[n][i][1]||0;if(l)for(n=0;n<r;++n)e[n][i][1]/=l}pl(e,t)}}function Fae(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var l=0,u=0;l<i;++l)u+=e[l][n][1]||0;r[n][1]+=r[n][0]=-u/2}pl(e,t)}}function Hae(e,t){if(!(!((l=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,l;r<o;++r){for(var u=0,c=0,d=0;u<l;++u){for(var m=e[t[u]],h=m[r][1]||0,y=m[r-1][1]||0,b=(h-y)/2,w=0;w<u;++w){var A=e[t[w]],E=A[r][1]||0,C=A[r-1][1]||0;b+=E-C}c+=h,d+=b*h}i[r-1][1]+=i[r-1][0]=n,c&&(n-=d/c)}i[r-1][1]+=i[r-1][0]=n,pl(e,t)}}var ax={},ox={},_M;function qae(){return _M||(_M=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(ox)),ox}var sx={},MM;function D4(){return MM||(MM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(sx)),sx}var lx={},RM;function WA(){return RM||(RM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t})(lx)),lx}var ux={},cx={},DM;function Kae(){return DM||(DM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(cx)),cx}var kM;function XA(){return kM||(kM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Kae(),n=WA();function r(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const o=[],l=i.length;if(l===0)return o;let u=0,c="",d="",m=!1;for(i.charCodeAt(0)===46&&(o.push(""),u++);u<l;){const h=i[u];d?h==="\\"&&u+1<l?(u++,c+=i[u]):h===d?d="":c+=h:m?h==='"'||h==="'"?d=h:h==="]"?(m=!1,o.push(c),c=""):c+=h:h==="["?(m=!0,c&&(o.push(c),c="")):h==="."?c&&(o.push(c),c=""):c+=h,u++}return c&&o.push(c),o}e.toPath=r})(ux)),ux}var LM;function ZA(){return LM||(LM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qae(),n=D4(),r=WA(),i=XA();function o(u,c,d){if(u==null)return d;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return d;const m=u[c];return m===void 0?n.isDeepKey(c)?o(u,i.toPath(c),d):d:m}case"number":case"symbol":{typeof c=="number"&&(c=r.toKey(c));const m=u[c];return m===void 0?d:m}default:{if(Array.isArray(c))return l(u,c,d);if(Object.is(c?.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return d;const m=u[c];return m===void 0?d:m}}}function l(u,c,d){if(c.length===0)return d;let m=u;for(let h=0;h<c.length;h++){if(m==null||t.isUnsafeProperty(c[h]))return d;m=m[c[h]]}return m===void 0?d:m}e.get=o})(ax)),ax}var fx,IM;function Gae(){return IM||(IM=1,fx=ZA().get),fx}var Yae=Gae();const uv=va(Yae);var Wae=4;function ts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Wae,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function $t(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((i,o,l)=>{var u=n[l-1];return typeof u=="string"?i+u+o:u!==void 0?i+ts(u)+o:i+o},"")}var Oi=e=>e===0?0:e>0?1:-1,ha=e=>typeof e=="number"&&e!=+e,gl=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Oe=e=>(typeof e=="number"||e instanceof Number)&&!ha(e),ma=e=>Oe(e)||typeof e=="string",Xae=0,cd=e=>{var t=++Xae;return"".concat(e||"").concat(t)},ls=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Oe(t)&&typeof t!="string")return r;var o;if(gl(t)){if(n==null)return r;var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return ha(o)&&(o=r),i&&n!=null&&o>n&&(o=n),o},k4=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function nn(e,t,n){return Oe(e)&&Oe(t)?ts(e+n*(t-e)):t}function L4(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):uv(r,t))===n)}var gn=e=>e===null||typeof e>"u",zd=e=>gn(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function na(e){return e!=null}function jl(){}var Zae=["type","size","sizeType"];function k1(){return k1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k1.apply(null,arguments)}function zM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function BM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zM(Object(n),!0).forEach(function(r){Qae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qae(e,t,n){return(t=Jae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jae(e){var t=eoe(e,"string");return typeof t=="symbol"?t:t+""}function eoe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function toe(e,t){if(e==null)return{};var n,r,i=noe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function noe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var I4={symbolCircle:YA,symbolCross:vae,symbolDiamond:bae,symbolSquare:xae,symbolStar:Eae,symbolTriangle:Cae,symbolWye:Tae},roe=Math.PI/180,ioe=e=>{var t="symbol".concat(zd(e));return I4[t]||YA},aoe=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*roe;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**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}},ooe=(e,t)=>{I4["symbol".concat(zd(e))]=t},QA=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=toe(e,Zae),o=BM(BM({},i),{},{type:t,size:n,sizeType:r}),l="circle";typeof t=="string"&&(l=t);var u=()=>{var y=ioe(l),b=Oae().type(y).size(aoe(n,r,l)),w=b();if(w!==null)return w},{className:c,cx:d,cy:m}=o,h=Gn(o);return Oe(d)&&Oe(m)&&Oe(n)?v.createElement("path",k1({},h,{className:ot("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(m,")"),d:u()})):null};QA.registerSymbol=ooe;var z4=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,JA=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(v.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{HA(i)&&typeof n[i]=="function"&&(r[i]=(o=>n[i](n,o)))}),r},soe=(e,t,n)=>r=>(e(t,n,r),null),B4=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];HA(i)&&typeof o=="function"&&(r||(r={}),r[i]=soe(o,t,n))}),r};function $M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function loe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$M(Object(n),!0).forEach(function(r){uoe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$M(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uoe(e,t,n){return(t=coe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function coe(e){var t=foe(e,"string");return typeof t=="symbol"?t:t+""}function foe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yn(e,t){var n=loe({},e),r=t,i=Object.keys(t),o=i.reduce((l,u)=>(l[u]===void 0&&r[u]!==void 0&&(l[u]=r[u]),l),n);return o}function Vp(){return Vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vp.apply(null,arguments)}function UM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UM(Object(n),!0).forEach(function(r){doe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function doe(e,t,n){return(t=hoe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hoe(e){var t=moe(e,"string");return typeof t=="symbol"?t:t+""}function moe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var si=32,poe={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function goe(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function voe(e){var{data:t,iconType:n,inactiveColor:r}=e,i=si/2,o=si/6,l=si/3,u=t.inactive?r:t.color,c=n??t.type;if(c==="none")return null;if(c==="plainline")return v.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:goe(t.payload),x1:0,y1:i,x2:si,y2:i,className:"recharts-legend-icon"});if(c==="line")return v.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(i,"h").concat(l,`
|
|
67
|
-
A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,`
|
|
68
|
-
H`).concat(si,"M").concat(2*l,",").concat(i,`
|
|
69
|
-
A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(c==="rect")return v.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(si/8,"h").concat(si,"v").concat(si*3/4,"h").concat(-si,"z"),className:"recharts-legend-icon"});if(v.isValidElement(t.legendIcon)){var d=$4({},t);return delete d.legendIcon,v.cloneElement(t.legendIcon,d)}return v.createElement(QA,{fill:u,cx:i,cy:i,size:si,sizeType:"diameter",type:c})}function yoe(e){var{payload:t,iconSize:n,layout:r,formatter:i,inactiveColor:o,iconType:l,labelStyle:u}=e,c={x:0,y:0,width:si,height:si},d={display:r==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((h,y)=>{var b=h.formatter||i,w=ot({"recharts-legend-item":!0,["legend-item-".concat(y)]:!0,inactive:h.inactive});if(h.type==="none")return null;var A=typeof u=="object"?$4({},u):{};A.color=h.inactive?o:A.color||h.color;var E=b?b(h.value,h,y):h.value;return v.createElement("li",Vp({className:w,style:d,key:"legend-item-".concat(y)},B4(e,h,y)),v.createElement(qA,{width:n,height:n,viewBox:c,style:m,"aria-label":"".concat(h.value," legend icon")},v.createElement(voe,{data:h,iconType:l,inactiveColor:o})),v.createElement("span",{className:"recharts-legend-item-text",style:A},E))})}var boe=e=>{var t=Yn(e,poe),{payload:n,layout:r,align:i}=t;if(!n||!n.length)return null;var o={padding:0,margin:0,textAlign:r==="horizontal"?i:"left"};return v.createElement("ul",{className:"recharts-default-legend",style:o},v.createElement(yoe,Vp({},t,{payload:n})))},dx={},hx={},VM;function xoe(){return VM||(VM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let o=0;o<n.length;o++){const l=n[o],u=r(l,o,n);i.has(u)||i.set(u,l)}return Array.from(i.values())}e.uniqBy=t})(hx)),hx}var mx={},FM;function woe(){return FM||(FM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...i){return n.apply(this,i.slice(0,r))}}e.ary=t})(mx)),mx}var px={},HM;function U4(){return HM||(HM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(px)),px}var gx={},vx={},yx={},qM;function Soe(){return qM||(qM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(yx)),yx}var KM;function V4(){return KM||(KM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Soe();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(vx)),vx}var bx={},GM;function Aoe(){return GM||(GM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(bx)),bx}var YM;function Eoe(){return YM||(YM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=V4(),n=Aoe();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(gx)),gx}var xx={},wx={},WM;function Coe(){return WM||(WM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZA();function n(r){return function(i){return t.get(i,r)}}e.property=n})(wx)),wx}var Sx={},Ax={},Ex={},Cx={},XM;function F4(){return XM||(XM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(Cx)),Cx}var jx={},ZM;function H4(){return ZM||(ZM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(jx)),jx}var Tx={},QM;function q4(){return QM||(QM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(Tx)),Tx}var JM;function joe(){return JM||(JM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=F4(),n=H4(),r=q4();function i(m,h,y){return typeof y!="function"?i(m,h,()=>{}):o(m,h,function b(w,A,E,C,j,T){const O=y(w,A,E,C,j,T);return O!==void 0?!!O:o(w,A,b,T)},new Map)}function o(m,h,y,b){if(h===m)return!0;switch(typeof h){case"object":return l(m,h,y,b);case"function":return Object.keys(h).length>0?o(m,{...h},y,b):r.isEqualsSameValueZero(m,h);default:return t.isObject(m)?typeof h=="string"?h==="":!0:r.isEqualsSameValueZero(m,h)}}function l(m,h,y,b){if(h==null)return!0;if(Array.isArray(h))return c(m,h,y,b);if(h instanceof Map)return u(m,h,y,b);if(h instanceof Set)return d(m,h,y,b);const w=Object.keys(h);if(m==null||n.isPrimitive(m))return w.length===0;if(w.length===0)return!0;if(b?.has(h))return b.get(h)===m;b?.set(h,m);try{for(let A=0;A<w.length;A++){const E=w[A];if(!n.isPrimitive(m)&&!(E in m)||h[E]===void 0&&m[E]!==void 0||h[E]===null&&m[E]!==null||!y(m[E],h[E],E,m,h,b))return!1}return!0}finally{b?.delete(h)}}function u(m,h,y,b){if(h.size===0)return!0;if(!(m instanceof Map))return!1;for(const[w,A]of h.entries()){const E=m.get(w);if(y(E,A,w,m,h,b)===!1)return!1}return!0}function c(m,h,y,b){if(h.length===0)return!0;if(!Array.isArray(m))return!1;const w=new Set;for(let A=0;A<h.length;A++){const E=h[A];let C=!1;for(let j=0;j<m.length;j++){if(w.has(j))continue;const T=m[j];let O=!1;if(y(T,E,A,m,h,b)&&(O=!0),O){w.add(j),C=!0;break}}if(!C)return!1}return!0}function d(m,h,y,b){return h.size===0?!0:m instanceof Set?c([...m],[...h],y,b):!1}e.isMatchWith=i,e.isSetMatch=d})(Ex)),Ex}var eR;function K4(){return eR||(eR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=joe();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(Ax)),Ax}var Ox={},Px={},Nx={},tR;function Toe(){return tR||(tR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(Nx)),Nx}var _x={},nR;function eE(){return nR||(nR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(_x)),_x}var Mx={},rR;function G4(){return rR||(rR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",o="[object Arguments]",l="[object Symbol]",u="[object Date]",c="[object Map]",d="[object Set]",m="[object Array]",h="[object Function]",y="[object ArrayBuffer]",b="[object Object]",w="[object Error]",A="[object DataView]",E="[object Uint8Array]",C="[object Uint8ClampedArray]",j="[object Uint16Array]",T="[object Uint32Array]",O="[object BigUint64Array]",N="[object Int8Array]",_="[object Int16Array]",M="[object Int32Array]",R="[object BigInt64Array]",B="[object Float32Array]",V="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=y,e.arrayTag=m,e.bigInt64ArrayTag=R,e.bigUint64ArrayTag=O,e.booleanTag=i,e.dataViewTag=A,e.dateTag=u,e.errorTag=w,e.float32ArrayTag=B,e.float64ArrayTag=V,e.functionTag=h,e.int16ArrayTag=_,e.int32ArrayTag=M,e.int8ArrayTag=N,e.mapTag=c,e.numberTag=r,e.objectTag=b,e.regexpTag=t,e.setTag=d,e.stringTag=n,e.symbolTag=l,e.uint16ArrayTag=j,e.uint32ArrayTag=T,e.uint8ArrayTag=E,e.uint8ClampedArrayTag=C})(Mx)),Mx}var Rx={},iR;function Ooe(){return iR||(iR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(Rx)),Rx}var aR;function Y4(){return aR||(aR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Toe(),n=eE(),r=G4(),i=H4(),o=Ooe();function l(m,h){return u(m,void 0,m,new Map,h)}function u(m,h,y,b=new Map,w=void 0){const A=w?.(m,h,y,b);if(A!==void 0)return A;if(i.isPrimitive(m))return m;if(b.has(m))return b.get(m);if(Array.isArray(m)){const E=new Array(m.length);b.set(m,E);for(let C=0;C<m.length;C++)E[C]=u(m[C],C,y,b,w);return Object.hasOwn(m,"index")&&(E.index=m.index),Object.hasOwn(m,"input")&&(E.input=m.input),E}if(m instanceof Date)return new Date(m.getTime());if(m instanceof RegExp){const E=new RegExp(m.source,m.flags);return E.lastIndex=m.lastIndex,E}if(m instanceof Map){const E=new Map;b.set(m,E);for(const[C,j]of m)E.set(C,u(j,C,y,b,w));return E}if(m instanceof Set){const E=new Set;b.set(m,E);for(const C of m)E.add(u(C,void 0,y,b,w));return E}if(typeof Buffer<"u"&&Buffer.isBuffer(m))return m.subarray();if(o.isTypedArray(m)){const E=new(Object.getPrototypeOf(m)).constructor(m.length);b.set(m,E);for(let C=0;C<m.length;C++)E[C]=u(m[C],C,y,b,w);return E}if(m instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&m instanceof SharedArrayBuffer)return m.slice(0);if(m instanceof DataView){const E=new DataView(m.buffer.slice(0),m.byteOffset,m.byteLength);return b.set(m,E),c(E,m,y,b,w),E}if(typeof File<"u"&&m instanceof File){const E=new File([m],m.name,{type:m.type});return b.set(m,E),c(E,m,y,b,w),E}if(typeof Blob<"u"&&m instanceof Blob){const E=new Blob([m],{type:m.type});return b.set(m,E),c(E,m,y,b,w),E}if(m instanceof Error){const E=structuredClone(m);return b.set(m,E),E.message=m.message,E.name=m.name,E.stack=m.stack,E.cause=m.cause,E.constructor=m.constructor,c(E,m,y,b,w),E}if(m instanceof Boolean){const E=new Boolean(m.valueOf());return b.set(m,E),c(E,m,y,b,w),E}if(m instanceof Number){const E=new Number(m.valueOf());return b.set(m,E),c(E,m,y,b,w),E}if(m instanceof String){const E=new String(m.valueOf());return b.set(m,E),c(E,m,y,b,w),E}if(typeof m=="object"&&d(m)){const E=Object.create(Object.getPrototypeOf(m));return b.set(m,E),c(E,m,y,b,w),E}return m}function c(m,h,y=m,b,w){const A=[...Object.keys(h),...t.getSymbols(h)];for(let E=0;E<A.length;E++){const C=A[E],j=Object.getOwnPropertyDescriptor(m,C);(j==null||j.writable)&&(m[C]=u(h[C],C,y,b,w))}}function d(m){switch(n.getTag(m)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=l,e.cloneDeepWithImpl=u,e.copyProperties=c})(Px)),Px}var oR;function Poe(){return oR||(oR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y4();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(Ox)),Ox}var sR;function Noe(){return sR||(sR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=K4(),n=Poe();function r(i){return i=n.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=r})(Sx)),Sx}var Dx={},kx={},Lx={},lR;function _oe(){return lR||(lR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y4(),n=eE(),r=G4();function i(o,l){return t.cloneDeepWith(o,(u,c,d,m)=>{const h=l?.(u,c,d,m);if(h!==void 0)return h;if(typeof o=="object"){if(n.getTag(o)===r.objectTag&&typeof o.constructor!="function"){const y={};return m.set(o,y),t.copyProperties(y,o,d,m),y}switch(Object.prototype.toString.call(o)){case r.numberTag:case r.stringTag:case r.booleanTag:{const y=new o.constructor(o?.valueOf());return t.copyProperties(y,o),y}case r.argumentsTag:{const y={};return t.copyProperties(y,o),y.length=o.length,y[Symbol.iterator]=o[Symbol.iterator],y}default:return}}})}e.cloneDeepWith=i})(Lx)),Lx}var uR;function Moe(){return uR||(uR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_oe();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(kx)),kx}var Ix={},zx={},cR;function W4(){return cR||(cR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(zx)),zx}var Bx={},fR;function Roe(){return fR||(fR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eE();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(Bx)),Bx}var dR;function Doe(){return dR||(dR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=D4(),n=W4(),r=Roe(),i=XA();function o(l,u){let c;if(Array.isArray(u)?c=u:typeof u=="string"&&t.isDeepKey(u)&&l?.[u]==null?c=i.toPath(u):c=[u],c.length===0)return!1;let d=l;for(let m=0;m<c.length;m++){const h=c[m];if((d==null||!Object.hasOwn(d,h))&&!((Array.isArray(d)||r.isArguments(d))&&n.isIndex(h)&&h<d.length))return!1;d=d[h]}return!0}e.has=o})(Ix)),Ix}var hR;function koe(){return hR||(hR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=K4(),n=WA(),r=Moe(),i=ZA(),o=Doe();function l(u,c){switch(typeof u){case"object":{Object.is(u?.valueOf(),-0)&&(u="-0");break}case"number":{u=n.toKey(u);break}}return c=r.cloneDeep(c),function(d){const m=i.get(d,u);return m===void 0?o.has(d,u):c===void 0?m===void 0:t.isMatch(m,c)}}e.matchesProperty=l})(Dx)),Dx}var mR;function Loe(){return mR||(mR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=U4(),n=Coe(),r=Noe(),i=koe();function o(l){if(l==null)return t.identity;switch(typeof l){case"function":return l;case"object":return Array.isArray(l)&&l.length===2?i.matchesProperty(l[0],l[1]):r.matches(l);case"string":case"symbol":case"number":return n.property(l)}}e.iteratee=o})(xx)),xx}var pR;function Ioe(){return pR||(pR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xoe(),n=woe(),r=U4(),i=Eoe(),o=Loe();function l(u,c=r.identity){return i.isArrayLikeObject(u)?t.uniqBy(Array.from(u),n.ary(o.iteratee(c),1)):[]}e.uniqBy=l})(dx)),dx}var $x,gR;function zoe(){return gR||(gR=1,$x=Ioe().uniqBy),$x}var Boe=zoe();const vR=va(Boe);function X4(e,t,n){return t===!0?vR(e,n):typeof t=="function"?vR(e,t):e}var Ux={exports:{}},Vx={};var yR;function $oe(){if(yR)return Vx;yR=1;var e=tc(),t=qL();function n(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,u=e.useMemo,c=e.useDebugValue;return Vx.useSyncExternalStoreWithSelector=function(d,m,h,y,b){var w=o(null);if(w.current===null){var A={hasValue:!1,value:null};w.current=A}else A=w.current;w=u(function(){function C(_){if(!j){if(j=!0,T=_,_=y(_),b!==void 0&&A.hasValue){var M=A.value;if(b(M,_))return O=M}return O=_}if(M=O,r(T,_))return M;var R=y(_);return b!==void 0&&b(M,R)?(T=_,M):(T=_,O=R)}var j=!1,T,O,N=h===void 0?null:h;return[function(){return C(m())},N===null?void 0:function(){return C(N())}]},[m,h,y,b]);var E=i(d,w[0],w[1]);return l(function(){A.hasValue=!0,A.value=E},[E]),c(E),E},Vx}var bR;function Uoe(){return bR||(bR=1,Ux.exports=$oe()),Ux.exports}var Voe=Uoe(),tE=v.createContext(null),Foe=e=>e,Vt=()=>{var e=v.useContext(tE);return e?e.store.dispatch:Foe},fp=()=>{},Hoe=()=>fp,qoe=(e,t)=>e===t;function Me(e){var t=v.useContext(tE),n=v.useMemo(()=>t?r=>{if(r!=null)return e(r)}:fp,[t,e]);return Voe.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Hoe,t?t.store.getState:fp,t?t.store.getState:fp,n,qoe)}function Koe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Goe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Yoe(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var xR=e=>Array.isArray(e)?e:[e];function Woe(e){const t=Array.isArray(e[0])?e[0]:e;return Yoe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Xoe(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Zoe=class{constructor(e){this.value=e}deref(){return this.value}},Qoe=typeof WeakRef<"u"?WeakRef:Zoe,Joe=0,wR=1;function km(){return{s:Joe,v:void 0,o:null,p:null}}function Z4(e,t={}){let n=km();const{resultEqualityCheck:r}=t;let i,o=0;function l(){let u=n;const{length:c}=arguments;for(let h=0,y=c;h<y;h++){const b=arguments[h];if(typeof b=="function"||typeof b=="object"&&b!==null){let w=u.o;w===null&&(u.o=w=new WeakMap);const A=w.get(b);A===void 0?(u=km(),w.set(b,u)):u=A}else{let w=u.p;w===null&&(u.p=w=new Map);const A=w.get(b);A===void 0?(u=km(),w.set(b,u)):u=A}}const d=u;let m;if(u.s===wR)m=u.v;else if(m=e.apply(null,arguments),o++,r){const h=i?.deref?.()??i;h!=null&&r(h,m)&&(m=h,o!==0&&o--),i=typeof m=="object"&&m!==null||typeof m=="function"?new Qoe(m):m}return d.s=wR,d.v=m,m}return l.clearCache=()=>{n=km(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function ese(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,l=0,u,c={},d=i.pop();typeof d=="object"&&(c=d,d=i.pop()),Koe(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const m={...n,...c},{memoize:h,memoizeOptions:y=[],argsMemoize:b=Z4,argsMemoizeOptions:w=[]}=m,A=xR(y),E=xR(w),C=Woe(i),j=h(function(){return o++,d.apply(null,arguments)},...A),T=b(function(){l++;const N=Xoe(C,arguments);return u=j.apply(null,N),u},...E);return Object.assign(T,{resultFunc:d,memoizedResultFunc:j,dependencies:C,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:h,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var ee=ese(Z4),tse=Object.assign((e,t=ee)=>{Goe(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((l,u,c)=>(l[n[c]]=u,l),{}))},{withTypes:()=>tse}),Fx={},Hx={},qx={},SR;function nse(){return SR||(SR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,o)=>{if(r!==i){const l=t(r),u=t(i);if(l===u&&l===0){if(r<i)return o==="desc"?1:-1;if(r>i)return o==="desc"?-1:1}return o==="desc"?u-l:l-u}return 0};e.compareValues=n})(qx)),qx}var Kx={},Gx={},AR;function Q4(){return AR||(AR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(Gx)),Gx}var ER;function rse(){return ER||(ER=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Q4(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,l){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||t.isSymbol(o)?!0:typeof o=="string"&&(r.test(o)||!n.test(o))||l!=null&&Object.hasOwn(l,o)}e.isKey=i})(Kx)),Kx}var CR;function ise(){return CR||(CR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nse(),n=rse(),r=XA();function i(o,l,u,c){if(o==null)return[];u=c?void 0:u,Array.isArray(o)||(o=Object.values(o)),Array.isArray(l)||(l=l==null?[null]:[l]),l.length===0&&(l=[null]),Array.isArray(u)||(u=u==null?[]:[u]),u=u.map(b=>String(b));const d=(b,w)=>{let A=b;for(let E=0;E<w.length&&A!=null;++E)A=A[w[E]];return A},m=(b,w)=>w==null||b==null?w:typeof b=="object"&&"key"in b?Object.hasOwn(w,b.key)?w[b.key]:d(w,b.path):typeof b=="function"?b(w):Array.isArray(b)?d(w,b):typeof w=="object"?w[b]:w,h=l.map(b=>(Array.isArray(b)&&b.length===1&&(b=b[0]),b==null||typeof b=="function"||Array.isArray(b)||n.isKey(b)?b:{key:b,path:r.toPath(b)}));return o.map(b=>({original:b,criteria:h.map(w=>m(w,b))})).slice().sort((b,w)=>{for(let A=0;A<h.length;A++){const E=t.compareValues(b.criteria[A],w.criteria[A],u[A]);if(E!==0)return E}return 0}).map(b=>b.original)}e.orderBy=i})(Hx)),Hx}var Yx={},jR;function ase(){return jR||(jR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],o=Math.floor(r),l=(u,c)=>{for(let d=0;d<u.length;d++){const m=u[d];Array.isArray(m)&&c<o?l(m,c+1):i.push(m)}};return l(n,0),i}e.flatten=t})(Yx)),Yx}var Wx={},TR;function J4(){return TR||(TR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=W4(),n=V4(),r=F4(),i=q4();function o(l,u,c){return r.isObject(c)&&(typeof u=="number"&&n.isArrayLike(c)&&t.isIndex(u)&&u<c.length||typeof u=="string"&&u in c)?i.isEqualsSameValueZero(c[u],l):!1}e.isIterateeCall=o})(Wx)),Wx}var OR;function ose(){return OR||(OR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ise(),n=ase(),r=J4();function i(o,...l){const u=l.length;return u>1&&r.isIterateeCall(o,l[0],l[1])?l=[]:u>2&&r.isIterateeCall(l[0],l[1],l[2])&&(l=[l[0]]),t.orderBy(o,n.flatten(l),["asc"])}e.sortBy=i})(Fx)),Fx}var Xx,PR;function sse(){return PR||(PR=1,Xx=ose().sortBy),Xx}var lse=sse();const cv=va(lse);var eB=e=>e.legend.settings,use=e=>e.legend.size,cse=e=>e.legend.payload,fse=ee([cse,eB],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?cv(r,n):r});function dse(){return Me(fse)}var Lm=1;function tB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=v.useState({height:0,left:0,top:0,width:0}),r=v.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),l={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(l.height-t.height)>Lm||Math.abs(l.left-t.left)>Lm||Math.abs(l.top-t.top)>Lm||Math.abs(l.width-t.width)>Lm)&&n({height:l.height,left:l.left,top:l.top,width:l.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function Nn(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 hse=typeof Symbol=="function"&&Symbol.observable||"@@observable",NR=hse,Zx=()=>Math.random().toString(36).substring(7).split("").join("."),mse={INIT:`@@redux/INIT${Zx()}`,REPLACE:`@@redux/REPLACE${Zx()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Zx()}`},Fp=mse;function nE(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 nB(e,t,n){if(typeof e!="function")throw new Error(Nn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Nn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Nn(1));return n(nB)(e,t)}let r=e,i=t,o=new Map,l=o,u=0,c=!1;function d(){l===o&&(l=new Map,o.forEach((E,C)=>{l.set(C,E)}))}function m(){if(c)throw new Error(Nn(3));return i}function h(E){if(typeof E!="function")throw new Error(Nn(4));if(c)throw new Error(Nn(5));let C=!0;d();const j=u++;return l.set(j,E),function(){if(C){if(c)throw new Error(Nn(6));C=!1,d(),l.delete(j),o=null}}}function y(E){if(!nE(E))throw new Error(Nn(7));if(typeof E.type>"u")throw new Error(Nn(8));if(typeof E.type!="string")throw new Error(Nn(17));if(c)throw new Error(Nn(9));try{c=!0,i=r(i,E)}finally{c=!1}return(o=l).forEach(j=>{j()}),E}function b(E){if(typeof E!="function")throw new Error(Nn(10));r=E,y({type:Fp.REPLACE})}function w(){const E=h;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(Nn(11));function j(){const O=C;O.next&&O.next(m())}return j(),{unsubscribe:E(j)}},[NR](){return this}}}return y({type:Fp.INIT}),{dispatch:y,subscribe:h,getState:m,replaceReducer:b,[NR]:w}}function pse(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Fp.INIT})>"u")throw new Error(Nn(12));if(typeof n(void 0,{type:Fp.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Nn(13))})}function rB(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const l=t[o];typeof e[l]=="function"&&(n[l]=e[l])}const r=Object.keys(n);let i;try{pse(n)}catch(o){i=o}return function(l={},u){if(i)throw i;let c=!1;const d={};for(let m=0;m<r.length;m++){const h=r[m],y=n[h],b=l[h],w=y(b,u);if(typeof w>"u")throw u&&u.type,new Error(Nn(14));d[h]=w,c=c||w!==b}return c=c||r.length!==Object.keys(l).length,c?d:l}}function Hp(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function gse(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(Nn(15))};const l={getState:i.getState,dispatch:(c,...d)=>o(c,...d)},u=e.map(c=>c(l));return o=Hp(...u)(i.dispatch),{...i,dispatch:o}}}function iB(e){return nE(e)&&"type"in e&&typeof e.type=="string"}var aB=Symbol.for("immer-nothing"),_R=Symbol.for("immer-draftable"),ir=Symbol.for("immer-state");function Ci(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var zr=Object,Ku=zr.getPrototypeOf,qp="constructor",fv="prototype",L1="configurable",Kp="enumerable",dp="writable",fd="value",so=e=>!!e&&!!e[ir];function Di(e){return e?oB(e)||hv(e)||!!e[_R]||!!e[qp]?.[_R]||mv(e)||pv(e):!1}var vse=zr[fv][qp].toString(),MR=new WeakMap;function oB(e){if(!e||!rE(e))return!1;const t=Ku(e);if(t===null||t===zr[fv])return!0;const n=zr.hasOwnProperty.call(t,qp)&&t[qp];if(n===Object)return!0;if(!Eu(n))return!1;let r=MR.get(n);return r===void 0&&(r=Function.toString.call(n),MR.set(n,r)),r===vse}function dv(e,t,n=!0){Bd(e)===0?(n?Reflect.ownKeys(e):zr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Bd(e){const t=e[ir];return t?t.type_:hv(e)?1:mv(e)?2:pv(e)?3:0}var RR=(e,t,n=Bd(e))=>n===2?e.has(t):zr[fv].hasOwnProperty.call(e,t),I1=(e,t,n=Bd(e))=>n===2?e.get(t):e[t],Gp=(e,t,n,r=Bd(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function yse(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var hv=Array.isArray,mv=e=>e instanceof Map,pv=e=>e instanceof Set,rE=e=>typeof e=="object",Eu=e=>typeof e=="function",Qx=e=>typeof e=="boolean";function bse(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Ka=e=>e.copy_||e.base_,iE=e=>e.modified_?e.copy_:e.base_;function z1(e,t){if(mv(e))return new Map(e);if(pv(e))return new Set(e);if(hv(e))return Array[fv].slice.call(e);const n=oB(e);if(t===!0||t==="class_only"&&!n){const r=zr.getOwnPropertyDescriptors(e);delete r[ir];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const l=i[o],u=r[l];u[dp]===!1&&(u[dp]=!0,u[L1]=!0),(u.get||u.set)&&(r[l]={[L1]:!0,[dp]:!0,[Kp]:u[Kp],[fd]:e[l]})}return zr.create(Ku(e),r)}else{const r=Ku(e);if(r!==null&&n)return{...e};const i=zr.create(r);return zr.assign(i,e)}}function aE(e,t=!1){return gv(e)||so(e)||!Di(e)||(Bd(e)>1&&zr.defineProperties(e,{set:Im,add:Im,clear:Im,delete:Im}),zr.freeze(e),t&&dv(e,(n,r)=>{aE(r,!0)},!1)),e}function xse(){Ci(2)}var Im={[fd]:xse};function gv(e){return e===null||!rE(e)?!0:zr.isFrozen(e)}var Yp="MapSet",B1="Patches",DR="ArrayMethods",sB={};function vl(e){const t=sB[e];return t||Ci(0,e),t}var kR=e=>!!sB[e],dd,lB=()=>dd,wse=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:kR(Yp)?vl(Yp):void 0,arrayMethodsPlugin_:kR(DR)?vl(DR):void 0});function LR(e,t){t&&(e.patchPlugin_=vl(B1),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $1(e){U1(e),e.drafts_.forEach(Sse),e.drafts_=null}function U1(e){e===dd&&(dd=e.parent_)}var IR=e=>dd=wse(dd,e);function Sse(e){const t=e[ir];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function zR(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[ir].modified_&&($1(t),Ci(4)),Di(e)&&(e=BR(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[ir].base_,e,t)}else e=BR(t,n);return Ase(t,e,!0),$1(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==aB?e:void 0}function BR(e,t){if(gv(t))return t;const n=t[ir];if(!n)return Wp(t,e.handledSet_,e);if(!vv(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);fB(n,e)}return n.copy_}function Ase(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&aE(t,n)}function uB(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var vv=(e,t)=>e.scope_===t,Ese=[];function cB(e,t,n,r){const i=Ka(e),o=e.type_;if(r!==void 0&&I1(i,r,o)===t){Gp(i,r,n,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;dv(i,(c,d)=>{if(so(d)){const m=u.get(d)||[];m.push(c),u.set(d,m)}})}const l=e.draftLocations_.get(t)??Ese;for(const u of l)Gp(i,u,n,o)}function Cse(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!vv(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const l=iE(o);cB(e,o.draft_??o,l,n),fB(o,i)})}function fB(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}uB(e)}}function jse(e,t,n){const{scope_:r}=e;if(so(n)){const i=n[ir];vv(i,r)&&i.callbacks_.push(function(){hp(e);const l=iE(i);cB(e,n,l,t)})}else Di(n)&&e.callbacks_.push(function(){const o=Ka(e);e.type_===3?o.has(n)&&Wp(n,r.handledSet_,r):I1(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Wp(I1(e.copy_,t,e.type_),r.handledSet_,r)})}function Wp(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||so(e)||t.has(e)||!Di(e)||gv(e)||(t.add(e),dv(e,(r,i)=>{if(so(i)){const o=i[ir];if(vv(o,n)){const l=iE(o);Gp(e,r,l,e.type_),uB(o)}}else Di(i)&&Wp(i,t,n)})),e}function Tse(e,t){const n=hv(e),r={type_:n?1:0,scope_:t?t.scope_:lB(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=Xp;n&&(i=[r],o=hd);const{revoke:l,proxy:u}=Proxy.revocable(i,o);return r.draft_=u,r.revoke_=l,[u,r]}var Xp={get(e,t){if(t===ir)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=Ka(e);if(!RR(i,t,e.type_))return Ose(e,i,t);const o=i[t];if(e.finalized_||!Di(o)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&bse(t))return o;if(o===Jx(e.base_,t)){hp(e);const l=e.type_===1?+t:t,u=F1(e.scope_,o,e,l);return e.copy_[l]=u}return o},has(e,t){return t in Ka(e)},ownKeys(e){return Reflect.ownKeys(Ka(e))},set(e,t,n){const r=dB(Ka(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Jx(Ka(e),t),o=i?.[ir];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(yse(n,i)&&(n!==void 0||RR(e.base_,t,e.type_)))return!0;hp(e),V1(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),jse(e,t,n)),!0},deleteProperty(e,t){return hp(e),Jx(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),V1(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ka(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[dp]:!0,[L1]:e.type_!==1||t!=="length",[Kp]:r[Kp],[fd]:n[t]}},defineProperty(){Ci(11)},getPrototypeOf(e){return Ku(e.base_)},setPrototypeOf(){Ci(12)}},hd={};for(let e in Xp){let t=Xp[e];hd[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}hd.deleteProperty=function(e,t){return hd.set.call(this,e,t,void 0)};hd.set=function(e,t,n){return Xp.set.call(this,e[0],t,n,e[0])};function Jx(e,t){const n=e[ir];return(n?Ka(n):e)[t]}function Ose(e,t,n){const r=dB(t,n);return r?fd in r?r[fd]:r.get?.call(e.draft_):void 0}function dB(e,t){if(!(t in e))return;let n=Ku(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ku(n)}}function V1(e){e.modified_||(e.modified_=!0,e.parent_&&V1(e.parent_))}function hp(e){e.copy_||(e.assigned_=new Map,e.copy_=z1(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Pse=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(Eu(n)&&!Eu(r)){const l=r;r=n;const u=this;return function(d=l,...m){return u.produce(d,h=>r.call(this,h,...m))}}Eu(r)||Ci(6),i!==void 0&&!Eu(i)&&Ci(7);let o;if(Di(n)){const l=IR(this),u=F1(l,n,void 0);let c=!0;try{o=r(u),c=!1}finally{c?$1(l):U1(l)}return LR(l,i),zR(o,l)}else if(!n||!rE(n)){if(o=r(n),o===void 0&&(o=n),o===aB&&(o=void 0),this.autoFreeze_&&aE(o,!0),i){const l=[],u=[];vl(B1).generateReplacementPatches_(n,o,{patches_:l,inversePatches_:u}),i(l,u)}return o}else Ci(1,n)},this.produceWithPatches=(n,r)=>{if(Eu(n))return(u,...c)=>this.produceWithPatches(u,d=>n(d,...c));let i,o;return[this.produce(n,r,(u,c)=>{i=u,o=c}),i,o]},Qx(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Qx(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Qx(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Di(t)||Ci(8),so(t)&&(t=ui(t));const n=IR(this),r=F1(n,t,void 0);return r[ir].isManual_=!0,U1(n),r}finishDraft(t,n){const r=t&&t[ir];(!r||!r.isManual_)&&Ci(9);const{scope_:i}=r;return LR(i,n),zR(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const o=n[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(n=n.slice(r+1));const i=vl(B1).applyPatches_;return so(t)?i(t,n):this.produce(t,o=>i(o,n))}};function F1(e,t,n,r){const[i,o]=mv(t)?vl(Yp).proxyMap_(t,n):pv(t)?vl(Yp).proxySet_(t,n):Tse(t,n);return(n?.scope_??lB()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?Cse(n,o,r):o.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:d}=c;o.modified_&&d&&d.generatePatches_(o,[],c)}),i}function ui(e){return so(e)||Ci(10,e),hB(e)}function hB(e){if(!Di(e)||gv(e))return e;const t=e[ir];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=z1(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=z1(e,!0);return dv(n,(i,o)=>{Gp(n,i,hB(o))},r),t&&(t.finalized_=!1),n}var Nse=new Pse,mB=Nse.produce;function pB(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var _se=pB(),Mse=pB,Rse=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Hp:Hp.apply(null,arguments)};function Vr(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error($r(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>iB(r)&&r.type===e,n}var gB=class kf extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,kf.prototype)}static get[Symbol.species](){return kf}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new kf(...t[0].concat(this)):new kf(...t.concat(this))}};function $R(e){return Di(e)?mB(e,()=>{}):e}function zm(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Dse(e){return typeof e=="boolean"}var kse=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new gB;return n&&(Dse(n)?l.push(_se):l.push(Mse(n.extraArgument))),l},vB="RTK_autoBatch",At=()=>e=>({payload:e,meta:{[vB]:!0}}),UR=e=>t=>{setTimeout(t,e)},yB=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,l=!1;const u=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:UR(10):e.type==="callback"?e.queueNotification:UR(e.timeout),d=()=>{l=!1,o&&(o=!1,u.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const h=()=>i&&m(),y=r.subscribe(h);return u.add(m),()=>{y(),u.delete(m)}},dispatch(m){try{return i=!m?.meta?.[vB],o=!i,o&&(l||(l=!0,c(d))),r.dispatch(m)}finally{i=!0}}})},Lse=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new gB(e);return r&&i.push(yB(typeof r=="object"?r:void 0)),i};function Ise(e){const t=kse(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:l=void 0}=e||{};let u;if(typeof n=="function")u=n;else if(nE(n))u=rB(n);else throw new Error($r(1));let c;typeof r=="function"?c=r(t):c=t();let d=Hp;i&&(d=Rse({trace:!1,...typeof i=="object"&&i}));const m=gse(...c),h=Lse(m);let y=typeof l=="function"?l(h):h();const b=d(...y);return nB(u,o,b)}function bB(e){const t={},n=[];let r;const i={addCase(o,l){const u=typeof o=="string"?o:o.type;if(!u)throw new Error($r(28));if(u in t)throw new Error($r(29));return t[u]=l,i},addAsyncThunk(o,l){return l.pending&&(t[o.pending.type]=l.pending),l.rejected&&(t[o.rejected.type]=l.rejected),l.fulfilled&&(t[o.fulfilled.type]=l.fulfilled),l.settled&&n.push({matcher:o.settled,reducer:l.settled}),i},addMatcher(o,l){return n.push({matcher:o,reducer:l}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function zse(e){return typeof e=="function"}function Bse(e,t){let[n,r,i]=bB(t),o;if(zse(e))o=()=>$R(e());else{const u=$R(e);o=()=>u}function l(u=o(),c){let d=[n[c.type],...r.filter(({matcher:m})=>m(c)).map(({reducer:m})=>m)];return d.filter(m=>!!m).length===0&&(d=[i]),d.reduce((m,h)=>{if(h)if(so(m)){const b=h(m,c);return b===void 0?m:b}else{if(Di(m))return mB(m,y=>h(y,c));{const y=h(m,c);if(y===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return m},u)}return l.getInitialState=o,l}var $se="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Use=(e=21)=>{let t="",n=e;for(;n--;)t+=$se[Math.random()*64|0];return t},Vse=Symbol.for("rtk-slice-createasyncthunk");function Fse(e,t){return`${e}/${t}`}function Hse({creators:e}={}){const t=e?.asyncThunk?.[Vse];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error($r(11));const l=(typeof r.reducers=="function"?r.reducers(Kse()):r.reducers)||{},u=Object.keys(l),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(T,O){const N=typeof T=="string"?T:T.type;if(!N)throw new Error($r(12));if(N in c.sliceCaseReducersByType)throw new Error($r(13));return c.sliceCaseReducersByType[N]=O,d},addMatcher(T,O){return c.sliceMatchers.push({matcher:T,reducer:O}),d},exposeAction(T,O){return c.actionCreators[T]=O,d},exposeCaseReducer(T,O){return c.sliceCaseReducersByName[T]=O,d}};u.forEach(T=>{const O=l[T],N={reducerName:T,type:Fse(i,T),createNotation:typeof r.reducers=="function"};Yse(O)?Xse(N,O,d,t):Gse(N,O,d)});function m(){const[T={},O=[],N=void 0]=typeof r.extraReducers=="function"?bB(r.extraReducers):[r.extraReducers],_={...T,...c.sliceCaseReducersByType};return Bse(r.initialState,M=>{for(let R in _)M.addCase(R,_[R]);for(let R of c.sliceMatchers)M.addMatcher(R.matcher,R.reducer);for(let R of O)M.addMatcher(R.matcher,R.reducer);N&&M.addDefaultCase(N)})}const h=T=>T,y=new Map,b=new WeakMap;let w;function A(T,O){return w||(w=m()),w(T,O)}function E(){return w||(w=m()),w.getInitialState()}function C(T,O=!1){function N(M){let R=M[T];return typeof R>"u"&&O&&(R=zm(b,N,E)),R}function _(M=h){const R=zm(y,O,()=>new WeakMap);return zm(R,M,()=>{const B={};for(const[V,H]of Object.entries(r.selectors??{}))B[V]=qse(H,M,()=>zm(b,M,E),O);return B})}return{reducerPath:T,getSelectors:_,get selectors(){return _(N)},selectSlice:N}}const j={name:i,reducer:A,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:E,...C(o),injectInto(T,{reducerPath:O,...N}={}){const _=O??o;return T.inject({reducerPath:_,reducer:A},N),{...j,...C(_,!0)}}};return j}}function qse(e,t,n,r){function i(o,...l){let u=t(o);return typeof u>"u"&&r&&(u=n()),e(u,...l)}return i.unwrapped=e,i}var Wn=Hse();function Kse(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Gse({type:e,reducerName:t,createNotation:n},r,i){let o,l;if("reducer"in r){if(n&&!Wse(r))throw new Error($r(17));o=r.reducer,l=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,l?Vr(e,l):Vr(e))}function Yse(e){return e._reducerDefinitionType==="asyncThunk"}function Wse(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Xse({type:e,reducerName:t},n,r,i){if(!i)throw new Error($r(18));const{payloadCreator:o,fulfilled:l,pending:u,rejected:c,settled:d,options:m}=n,h=i(e,o,m);r.exposeAction(t,h),l&&r.addCase(h.fulfilled,l),u&&r.addCase(h.pending,u),c&&r.addCase(h.rejected,c),d&&r.addMatcher(h.settled,d),r.exposeCaseReducer(t,{fulfilled:l||Bm,pending:u||Bm,rejected:c||Bm,settled:d||Bm})}function Bm(){}var Zse="task",xB="listener",wB="completed",oE="cancelled",Qse=`task-${oE}`,Jse=`task-${wB}`,H1=`${xB}-${oE}`,ele=`${xB}-${wB}`,yv=class{constructor(e){this.code=e,this.message=`${Zse} ${oE} (reason: ${e})`}name="TaskAbortError";message},sE=(e,t)=>{if(typeof e!="function")throw new TypeError($r(32))},Zp=()=>{},SB=(e,t=Zp)=>(e.catch(t),e),AB=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),al=e=>{if(e.aborted)throw new yv(e.reason)};function EB(e,t){let n=Zp;return new Promise((r,i)=>{const o=()=>i(new yv(e.reason));if(e.aborted){o();return}n=AB(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Zp})}var tle=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof yv?"cancelled":"rejected",error:n}}finally{t?.()}},Qp=e=>t=>SB(EB(e,t).then(n=>(al(e),n))),CB=e=>{const t=Qp(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Iu}=Object,VR={},bv="listenerMiddleware",nle=(e,t)=>{const n=r=>AB(e,()=>r.abort(e.reason));return(r,i)=>{sE(r);const o=new AbortController;n(o);const l=tle(async()=>{al(e),al(o.signal);const u=await r({pause:Qp(o.signal),delay:CB(o.signal),signal:o.signal});return al(o.signal),u},()=>o.abort(Jse));return i?.autoJoin&&t.push(l.catch(Zp)),{result:Qp(e)(l),cancel(){o.abort(Qse)}}}},rle=(e,t)=>{const n=async(r,i)=>{al(t);let o=()=>{};const u=[new Promise((c,d)=>{let m=e({predicate:r,effect:(h,y)=>{y.unsubscribe(),c([h,y.getState(),y.getOriginalState()])}});o=()=>{m(),d()}})];i!=null&&u.push(new Promise(c=>setTimeout(c,i,null)));try{const c=await EB(t,Promise.race(u));return al(t),c}finally{o()}};return(r,i)=>SB(n(r,i))},jB=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=Vr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error($r(21));return sE(o),{predicate:i,type:t,effect:o}},TB=Iu(e=>{const{type:t,predicate:n,effect:r}=jB(e);return{id:Use(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error($r(22))}}},{withTypes:()=>TB}),FR=(e,t)=>{const{type:n,effect:r,predicate:i}=jB(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},q1=e=>{e.pending.forEach(t=>{t.abort(H1)})},ile=(e,t)=>()=>{for(const n of t.keys())q1(n);e.clear()},HR=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},OB=Iu(Vr(`${bv}/add`),{withTypes:()=>OB}),ale=Vr(`${bv}/removeAll`),PB=Iu(Vr(`${bv}/remove`),{withTypes:()=>PB}),ole=(...e)=>{console.error(`${bv}/error`,...e)},$d=(e={})=>{const t=new Map,n=new Map,r=b=>{const w=n.get(b)??0;n.set(b,w+1)},i=b=>{const w=n.get(b)??1;w===1?n.delete(b):n.set(b,w-1)},{extra:o,onError:l=ole}=e;sE(l);const u=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),w=>{b.unsubscribe(),w?.cancelActive&&q1(b)}),c=b=>{const w=FR(t,b)??TB(b);return u(w)};Iu(c,{withTypes:()=>c});const d=b=>{const w=FR(t,b);return w&&(w.unsubscribe(),b.cancelActive&&q1(w)),!!w};Iu(d,{withTypes:()=>d});const m=async(b,w,A,E)=>{const C=new AbortController,j=rle(c,C.signal),T=[];try{b.pending.add(C),r(b),await Promise.resolve(b.effect(w,Iu({},A,{getOriginalState:E,condition:(O,N)=>j(O,N).then(Boolean),take:j,delay:CB(C.signal),pause:Qp(C.signal),extra:o,signal:C.signal,fork:nle(C.signal,T),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((O,N,_)=>{O!==C&&(O.abort(H1),_.delete(O))})},cancel:()=>{C.abort(H1),b.pending.delete(C)},throwIfCancelled:()=>{al(C.signal)}})))}catch(O){O instanceof yv||HR(l,O,{raisedBy:"effect"})}finally{await Promise.all(T),C.abort(ele),i(b),b.pending.delete(C)}},h=ile(t,n);return{middleware:b=>w=>A=>{if(!iB(A))return w(A);if(OB.match(A))return c(A.payload);if(ale.match(A)){h();return}if(PB.match(A))return d(A.payload);let E=b.getState();const C=()=>{if(E===VR)throw new Error($r(23));return E};let j;try{if(j=w(A),t.size>0){const T=b.getState(),O=Array.from(t.values());for(const N of O){let _=!1;try{_=N.predicate(A,T,E)}catch(M){_=!1,HR(l,M,{raisedBy:"predicate"})}_&&m(N,A,b,C)}}}finally{E=VR}return j},startListening:c,stopListening:d,clearListeners:h}};function $r(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 sle={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},NB=Wn({name:"chartLayout",initialState:sle,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 n,r,i,o;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:lle,setLayout:ule,setChartSize:cle,setScale:fle}=NB.actions,dle=NB.reducer;function _B(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function rt(e){return Number.isFinite(e)}function us(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function qR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qR(Object(n),!0).forEach(function(r){hle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hle(e,t,n){return(t=mle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mle(e){var t=ple(e,"string");return typeof t=="symbol"?t:t+""}function ple(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function on(e,t,n){return gn(e)||gn(t)?n:ma(t)?uv(e,t,n):typeof t=="function"?t(e):n}var gle=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:o,verticalAlign:l,layout:u}=t;if((u==="vertical"||u==="horizontal"&&l==="middle")&&o!=="center"&&Oe(e[o]))return _u(_u({},e),{},{[o]:e[o]+(r||0)});if((u==="horizontal"||u==="vertical"&&o==="center")&&l!=="middle"&&Oe(e[l]))return _u(_u({},e),{},{[l]:e[l]+(i||0)})}return e},Ii=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",vle=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var o=0,l=0,u=0;u<n;++u){var c=e[u],d=c?.[i];if(d!=null){var m=d[1],h=d[0],y=ha(m)?h:m;y>=0?(d[0]=o,o+=y,d[1]=o):(d[0]=l,l+=y,d[1]=l)}}}},yle=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var o=0,l=0;l<n;++l){var u=e[l],c=u?.[i];if(c!=null){var d=ha(c[1])?c[0]:c[1];d>=0?(c[0]=o,o+=d,c[1]=o):(c[0]=0,c[1]=0)}}}},ble={sign:vle,expand:Vae,none:pl,silhouette:Fae,wiggle:Hae,positive:yle},xle=(e,t,n)=>{var r,i=(r=ble[n])!==null&&r!==void 0?r:pl,o=Uae().keys(t).value((u,c)=>Number(on(u,c,0))).order(D1).offset(i),l=o(e);return l.forEach((u,c)=>{u.forEach((d,m)=>{var h=on(e[m],t[c],0);Array.isArray(h)&&h.length===2&&Oe(h[0])&&Oe(h[1])&&(d[0]=h[0],d[1]=h[1])})}),l};function wle(e){return e==null?void 0:String(e)}function Jp(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:o,dataKey:l}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!gn(i[t.dataKey])){var u=L4(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n!=null&&n[o]?n[o].coordinate+r/2:null}var c=on(i,gn(l)?t.dataKey:l),d=t.scale.map(c);return Oe(d)?d:null}var Sle=e=>{var t=e.flat(2).filter(Oe);return[Math.min(...t),Math.max(...t)]},Ale=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Ele=(e,t,n)=>{if(e!=null)return Ale(Object.keys(e).reduce((r,i)=>{var o=e[i];if(!o)return r;var{stackedData:l}=o,u=l.reduce((c,d)=>{var m=_B(d,t,n),h=Sle(m);return!rt(h[0])||!rt(h[1])?c:[Math.min(c[0],h[0]),Math.max(c[1],h[1])]},[1/0,-1/0]);return[Math.min(u[0],r[0]),Math.max(u[1],r[1])]},[1/0,-1/0]))},KR=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,GR=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Gu=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=cv(t,m=>m.coordinate),o=1/0,l=1,u=i.length;l<u;l++){var c=i[l],d=i[l-1];o=Math.min((c?.coordinate||0)-(d?.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0};function YR(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:o}=e;return _u(_u({},t),{},{dataKey:n,payload:r,value:i,name:o})}function xv(e,t){if(e)return String(e);if(typeof t=="string")return t}var Cle=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},jle=(e,t)=>t==="centric"?e.angle:e.radius,fo=e=>e.layout.width,ho=e=>e.layout.height,Tle=e=>e.layout.scale,MB=e=>e.layout.margin,wv=ee(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Sv=ee(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Ole="data-recharts-item-index",Ple="data-recharts-item-id",Ud=60;function WR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $m(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WR(Object(n),!0).forEach(function(r){Nle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nle(e,t,n){return(t=_le(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _le(e){var t=Mle(e,"string");return typeof t=="symbol"?t:t+""}function Mle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rle=e=>e.brush.height;function Dle(e){var t=Sv(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:Ud;return n+i}return n},0)}function kle(e){var t=Sv(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:Ud;return n+i}return n},0)}function Lle(e){var t=wv(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function Ile(e){var t=wv(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Un=ee([fo,ho,MB,Rle,Dle,kle,Lle,Ile,eB,use],(e,t,n,r,i,o,l,u,c,d)=>{var m={left:(n.left||0)+i,right:(n.right||0)+o},h={top:(n.top||0)+l,bottom:(n.bottom||0)+u},y=$m($m({},h),m),b=y.bottom;y.bottom+=r,y=gle(y,c,d);var w=e-y.left-y.right,A=t-y.top-y.bottom;return $m($m({brushBottom:b},y),{},{width:Math.max(w,0),height:Math.max(A,0)})}),zle=ee(Un,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),RB=ee(fo,ho,(e,t)=>({x:0,y:0,width:e,height:t})),Ble=v.createContext(null),or=()=>v.useContext(Ble)!=null,Av=e=>e.brush,Ev=ee([Av,Un,MB],(e,t,n)=>({height:e.height,x:Oe(e.x)?e.x:t.left,y:Oe(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:Oe(e.width)?e.width:t.width})),ew={},tw={},nw={},XR;function $le(){return XR||(XR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let l,u=null;const c=o!=null&&o.includes("leading"),d=o==null||o.includes("trailing"),m=()=>{u!==null&&(n.apply(l,u),l=void 0,u=null)},h=()=>{d&&m(),A()};let y=null;const b=()=>{y!=null&&clearTimeout(y),y=setTimeout(()=>{y=null,h()},r)},w=()=>{y!==null&&(clearTimeout(y),y=null)},A=()=>{w(),l=void 0,u=null},E=()=>{m()},C=function(...j){if(i?.aborted)return;l=this,u=j;const T=y==null;b(),c&&T&&m()};return C.schedule=b,C.cancel=A,C.flush=E,i?.addEventListener("abort",A,{once:!0}),C}e.debounce=t})(nw)),nw}var ZR;function Ule(){return ZR||(ZR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$le();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:l=!1,trailing:u=!0,maxWait:c}=o,d=Array(2);l&&(d[0]="leading"),u&&(d[1]="trailing");let m,h=null;const y=t.debounce(function(...A){m=r.apply(this,A),h=null},i,{edges:d}),b=function(...A){return c!=null&&(h===null&&(h=Date.now()),Date.now()-h>=c)?(m=r.apply(this,A),h=Date.now(),y.cancel(),y.schedule(),m):(y.apply(this,A),m)},w=()=>(y.flush(),m);return b.cancel=y.cancel,b.flush=w,b}e.debounce=n})(tw)),tw}var QR;function Vle(){return QR||(QR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ule();function n(r,i=0,o={}){const{leading:l=!0,trailing:u=!0}=o;return t.debounce(r,i,{leading:l,maxWait:i,trailing:u})}e.throttle=n})(ew)),ew}var rw,JR;function Fle(){return JR||(JR=1,rw=Vle().throttle),rw}var Hle=Fle();const qle=va(Hle);var eD=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(n.replace(/%s/g,()=>i[l++]))}},ra={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},DB=(e,t,n)=>{var{width:r=ra.width,height:i=ra.height,aspect:o,maxHeight:l}=n,u=gl(r)?e:Number(r),c=gl(i)?t:Number(i);return o&&o>0&&(u?c=u/o:c&&(u=c*o),l&&c!=null&&c>l&&(c=l)),{calculatedWidth:u,calculatedHeight:c}},Kle={width:0,height:0,overflow:"visible"},Gle={width:0,overflowX:"visible"},Yle={height:0,overflowY:"visible"},Wle={},Xle=e=>{var{width:t,height:n}=e,r=gl(t),i=gl(n);return r&&i?Kle:r?Gle:i?Yle:Wle};function Zle(e){var{width:t,height:n,aspect:r}=e,i=t,o=n;return i===void 0&&o===void 0?(i=ra.width,o=ra.height):i===void 0?i=r&&r>0?void 0:ra.width:o===void 0&&(o=r&&r>0?void 0:ra.height),{width:i,height:o}}function K1(){return K1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K1.apply(null,arguments)}function tD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tD(Object(n),!0).forEach(function(r){Qle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qle(e,t,n){return(t=Jle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jle(e){var t=eue(e,"string");return typeof t=="symbol"?t:t+""}function eue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kB=v.createContext(ra.initialDimension);function tue(e){return us(e.width)&&us(e.height)}function LB(e){var{children:t,width:n,height:r}=e,i=v.useMemo(()=>({width:n,height:r}),[n,r]);return tue(i)?v.createElement(kB.Provider,{value:i},t):null}var lE=()=>v.useContext(kB),nue=v.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=ra.initialDimension,width:i,height:o,minWidth:l=ra.minWidth,minHeight:u,maxHeight:c,children:d,debounce:m=ra.debounce,id:h,className:y,onResize:b,style:w={}}=e,A=v.useRef(null),E=v.useRef();E.current=b,v.useImperativeHandle(t,()=>A.current);var[C,j]=v.useState({containerWidth:r.width,containerHeight:r.height}),T=v.useCallback((R,B)=>{j(V=>{var H=Math.round(R),z=Math.round(B);return V.containerWidth===H&&V.containerHeight===z?V:{containerWidth:H,containerHeight:z}})},[]);v.useEffect(()=>{if(A.current==null||typeof ResizeObserver>"u")return jl;var R=z=>{var W,Q=z[0];if(Q!=null){var{width:se,height:L}=Q.contentRect;T(se,L),(W=E.current)===null||W===void 0||W.call(E,se,L)}};m>0&&(R=qle(R,m,{trailing:!0,leading:!1}));var B=new ResizeObserver(R),{width:V,height:H}=A.current.getBoundingClientRect();return T(V,H),B.observe(A.current),()=>{B.disconnect()}},[T,m]);var{containerWidth:O,containerHeight:N}=C;eD(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:_,calculatedHeight:M}=DB(O,N,{width:i,height:o,aspect:n,maxHeight:c});return eD(_!=null&&_>0||M!=null&&M>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,i,o,l,u,n),v.createElement("div",{id:h?"".concat(h):void 0,className:ot("recharts-responsive-container",y),style:nD(nD({},w),{},{width:i,height:o,minWidth:l,minHeight:u,maxHeight:c}),ref:A},v.createElement("div",{style:Xle({width:i,height:o})},v.createElement(LB,{width:_,height:M},d)))}),IB=v.forwardRef((e,t)=>{var n=lE();if(us(n.width)&&us(n.height))return e.children;var{width:r,height:i}=Zle({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:l}=DB(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Oe(o)&&Oe(l)?v.createElement(LB,{width:o,height:l},e.children):v.createElement(nue,K1({},e,{width:r,height:i,ref:t}))});function uE(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 Cv=()=>{var e,t=or(),n=Me(zle),r=Me(Ev),i=(e=Me(Av))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},rue={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},iue=()=>{var e;return(e=Me(Un))!==null&&e!==void 0?e:rue},zB=()=>Me(fo),BB=()=>Me(ho),aue=()=>Me(e=>e.layout.margin),yt=e=>e.layout.layoutType,Tl=()=>Me(yt),cE=()=>{var e=Tl();if(e==="horizontal"||e==="vertical")return e},$B=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},oue=()=>{var e=Tl();return e!==void 0},Vd=e=>{var t=Vt(),n=or(),{width:r,height:i}=e,o=lE(),l=r,u=i;return o&&(l=o.width>0?o.width:r,u=o.height>0?o.height:i),v.useEffect(()=>{!n&&us(l)&&us(u)&&t(cle({width:l,height:u}))},[t,n,l,u]),null},UB=Symbol.for("immer-nothing"),rD=Symbol.for("immer-draftable"),Fr=Symbol.for("immer-state");function ji(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var md=Object.getPrototypeOf;function Yu(e){return!!e&&!!e[Fr]}function yl(e){return e?VB(e)||Array.isArray(e)||!!e[rD]||!!e.constructor?.[rD]||Fd(e)||Tv(e):!1}var sue=Object.prototype.constructor.toString(),iD=new WeakMap;function VB(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=iD.get(n);return r===void 0&&(r=Function.toString.call(n),iD.set(n,r)),r===sue}function eg(e,t,n=!0){jv(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function jv(e){const t=e[Fr];return t?t.type_:Array.isArray(e)?1:Fd(e)?2:Tv(e)?3:0}function G1(e,t){return jv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function FB(e,t,n){const r=jv(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function lue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Fd(e){return e instanceof Map}function Tv(e){return e instanceof Set}function Hs(e){return e.copy_||e.base_}function Y1(e,t){if(Fd(e))return new Map(e);if(Tv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=VB(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Fr];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const l=i[o],u=r[l];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(r[l]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[l]})}return Object.create(md(e),r)}else{const r=md(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function fE(e,t=!1){return Ov(e)||Yu(e)||!yl(e)||(jv(e)>1&&Object.defineProperties(e,{set:Um,add:Um,clear:Um,delete:Um}),Object.freeze(e),t&&Object.values(e).forEach(n=>fE(n,!0))),e}function uue(){ji(2)}var Um={value:uue};function Ov(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var cue={};function bl(e){const t=cue[e];return t||ji(0,e),t}var pd;function HB(){return pd}function fue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function aD(e,t){t&&(bl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function W1(e){X1(e),e.drafts_.forEach(due),e.drafts_=null}function X1(e){e===pd&&(pd=e.parent_)}function oD(e){return pd=fue(pd,e)}function due(e){const t=e[Fr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function sD(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Fr].modified_&&(W1(t),ji(4)),yl(e)&&(e=tg(t,e),t.parent_||ng(t,e)),t.patches_&&bl("Patches").generateReplacementPatches_(n[Fr].base_,e,t.patches_,t.inversePatches_)):e=tg(t,n,[]),W1(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==UB?e:void 0}function tg(e,t,n){if(Ov(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[Fr];if(!i)return eg(t,(o,l)=>lD(e,i,t,o,l,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return ng(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let l=o,u=!1;i.type_===3&&(l=new Set(o),o.clear(),u=!0),eg(l,(c,d)=>lD(e,i,o,c,d,n,u),r),ng(e,o,!1),n&&e.patches_&&bl("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function lD(e,t,n,r,i,o,l){if(i==null||typeof i!="object"&&!l)return;const u=Ov(i);if(!(u&&!l)){if(Yu(i)){const c=o&&t&&t.type_!==3&&!G1(t.assigned_,r)?o.concat(r):void 0,d=tg(e,i,c);if(FB(n,r,d),Yu(d))e.canAutoFreeze_=!1;else return}else l&&n.add(i);if(yl(i)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&u)return;tg(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Fd(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&ng(e,i)}}}function ng(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&fE(t,n)}function hue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:HB(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=dE;n&&(i=[r],o=gd);const{revoke:l,proxy:u}=Proxy.revocable(i,o);return r.draft_=u,r.revoke_=l,u}var dE={get(e,t){if(t===Fr)return e;const n=Hs(e);if(!G1(n,t))return mue(e,n,t);const r=n[t];return e.finalized_||!yl(r)?r:r===iw(e.base_,t)?(aw(e),e.copy_[t]=Q1(r,e)):r},has(e,t){return t in Hs(e)},ownKeys(e){return Reflect.ownKeys(Hs(e))},set(e,t,n){const r=qB(Hs(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=iw(Hs(e),t),o=i?.[Fr];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(lue(n,i)&&(n!==void 0||G1(e.base_,t)))return!0;aw(e),Z1(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return iw(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,aw(e),Z1(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Hs(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ji(11)},getPrototypeOf(e){return md(e.base_)},setPrototypeOf(){ji(12)}},gd={};eg(dE,(e,t)=>{gd[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});gd.deleteProperty=function(e,t){return gd.set.call(this,e,t,void 0)};gd.set=function(e,t,n){return dE.set.call(this,e[0],t,n,e[0])};function iw(e,t){const n=e[Fr];return(n?Hs(n):e)[t]}function mue(e,t,n){const r=qB(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function qB(e,t){if(!(t in e))return;let n=md(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=md(n)}}function Z1(e){e.modified_||(e.modified_=!0,e.parent_&&Z1(e.parent_))}function aw(e){e.copy_||(e.copy_=Y1(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pue=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const l=this;return function(c=o,...d){return l.produce(c,m=>n.call(this,m,...d))}}typeof n!="function"&&ji(6),r!==void 0&&typeof r!="function"&&ji(7);let i;if(yl(t)){const o=oD(this),l=Q1(t,void 0);let u=!0;try{i=n(l),u=!1}finally{u?W1(o):X1(o)}return aD(o,r),sD(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===UB&&(i=void 0),this.autoFreeze_&&fE(i,!0),r){const o=[],l=[];bl("Patches").generateReplacementPatches_(t,i,o,l),r(o,l)}return i}else ji(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(l,...u)=>this.produceWithPatches(l,c=>t(c,...u));let r,i;return[this.produce(t,n,(l,u)=>{r=l,i=u}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){yl(e)||ji(8),Yu(e)&&(e=gue(e));const t=oD(this),n=Q1(e,void 0);return n[Fr].isManual_=!0,X1(t),n}finishDraft(e,t){const n=e&&e[Fr];(!n||!n.isManual_)&&ji(9);const{scope_:r}=n;return aD(r,t),sD(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=bl("Patches").applyPatches_;return Yu(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Q1(e,t){const n=Fd(e)?bl("MapSet").proxyMap_(e,t):Tv(e)?bl("MapSet").proxySet_(e,t):hue(e,t);return(t?t.scope_:HB()).drafts_.push(n),n}function gue(e){return Yu(e)||ji(10,e),KB(e)}function KB(e){if(!yl(e)||Ov(e))return e;const t=e[Fr];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Y1(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Y1(e,!0);return eg(n,(i,o)=>{FB(n,i,KB(o))},r),t&&(t.finalized_=!1),n}var vue=new pue;vue.produce;var yue={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},GB=Wn({name:"legend",initialState:yue,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:At()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ui(e).payload.indexOf(n);i>-1&&(e.payload[i]=r)},prepare:At()},removeLegendPayload:{reducer(e,t){var n=ui(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:At()}}}),{setLegendSize:uD,setLegendSettings:bue,addLegendPayload:xue,replaceLegendPayload:wue,removeLegendPayload:Sue}=GB.actions,Aue=GB.reducer,ow={exports:{}},sw={};var cD;function Eue(){if(cD)return sw;cD=1;var e=tc();function t(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,l=e.useMemo,u=e.useDebugValue;return sw.useSyncExternalStoreWithSelector=function(c,d,m,h,y){var b=i(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=l(function(){function E(N){if(!C){if(C=!0,j=N,N=h(N),y!==void 0&&w.hasValue){var _=w.value;if(y(_,N))return T=_}return T=N}if(_=T,n(j,N))return _;var M=h(N);return y!==void 0&&y(_,M)?(j=N,_):(j=N,T=M)}var C=!1,j,T,O=m===void 0?null:m;return[function(){return E(d())},O===null?void 0:function(){return E(O())}]},[d,m,h,y]);var A=r(c,b[0],b[1]);return o(function(){w.hasValue=!0,w.value=A},[A]),u(A),A},sw}var fD;function Cue(){return fD||(fD=1,ow.exports=Eue()),ow.exports}Cue();function jue(e){e()}function Tue(){let e=null,t=null;return{clear(){e=null,t=null},notify(){jue(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var dD={notify(){},get:()=>[]};function Oue(e,t){let n,r=dD,i=0,o=!1;function l(A){m();const E=r.subscribe(A);let C=!1;return()=>{C||(C=!0,E(),h())}}function u(){r.notify()}function c(){w.onStateChange&&w.onStateChange()}function d(){return o}function m(){i++,n||(n=e.subscribe(c),r=Tue())}function h(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=dD)}function y(){o||(o=!0,m())}function b(){o&&(o=!1,h())}const w={addNestedSub:l,notifyNestedSubs:u,handleChangeWrapper:c,isSubscribed:d,trySubscribe:y,tryUnsubscribe:b,getListeners:()=>r};return w}var Pue=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Nue=Pue(),_ue=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Mue=_ue(),Rue=()=>Nue||Mue?v.useLayoutEffect:v.useEffect,Due=Rue();function hD(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function kue(e,t){if(hD(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!hD(e[n[i]],t[n[i]]))return!1;return!0}var Lue=Symbol.for("react-redux-context"),Iue=typeof globalThis<"u"?globalThis:{};function zue(){if(!v.createContext)return{};const e=Iue[Lue]??=new Map;let t=e.get(v.createContext);return t||(t=v.createContext(null),e.set(v.createContext,t)),t}var Bue=zue();function $ue(e){const{children:t,context:n,serverState:r,store:i}=e,o=v.useMemo(()=>{const c=Oue(i);return{store:i,subscription:c,getServerState:r?()=>r:void 0}},[i,r]),l=v.useMemo(()=>i.getState(),[i]);Due(()=>{const{subscription:c}=o;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),l!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[o,l]);const u=n||Bue;return v.createElement(u.Provider,{value:o},t)}var Uue=$ue,Vue=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Fue(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function hc(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(Vue.has(r)){if(e[r]==null&&t[r]==null)continue;if(!kue(e[r],t[r]))return!1}else if(!Fue(e[r],t[r]))return!1;return!0}var Hue=["contextPayload"];function J1(){return J1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J1.apply(null,arguments)}function mD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mD(Object(n),!0).forEach(function(r){que(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function que(e,t,n){return(t=Kue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kue(e){var t=Gue(e,"string");return typeof t=="symbol"?t:t+""}function Gue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yue(e,t){if(e==null)return{};var n,r,i=Wue(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Wue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Xue(e){return e.value}function Zue(e){var{contextPayload:t}=e,n=Yue(e,Hue),r=X4(t,e.payloadUniqBy,Xue),i=Wu(Wu({},n),{},{payload:r});return v.isValidElement(e.content)?v.cloneElement(e.content,i):typeof e.content=="function"?v.createElement(e.content,i):v.createElement(boe,i)}function Que(e,t,n,r,i,o){var{layout:l,align:u,verticalAlign:c}=t,d,m;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(u==="center"&&l==="vertical"?d={left:((r||0)-o.width)/2}:d=u==="right"?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(c==="middle"?m={top:((i||0)-o.height)/2}:m=c==="bottom"?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),Wu(Wu({},d),m)}function Jue(e){var t=Vt();return v.useEffect(()=>{t(bue(e))},[t,e]),null}function ece(e){var t=Vt();return v.useEffect(()=>(t(uD(e)),()=>{t(uD({width:0,height:0}))}),[t,e]),null}function tce(e,t,n,r){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:n||r}:null}var nce={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function rce(e){var t=Yn(e,nce),n=dse(),r=fae(),i=aue(),{width:o,height:l,wrapperStyle:u,portal:c}=t,[d,m]=tB([n]),h=zB(),y=BB();if(h==null||y==null)return null;var b=h-(i?.left||0)-(i?.right||0),w=tce(t.layout,l,o,b),A=c?u:Wu(Wu({position:"absolute",width:w?.width||o||"auto",height:w?.height||l||"auto"},Que(u,t,i,h,y,d)),u),E=c??r;if(E==null||n==null)return null;var C=v.createElement("div",{className:"recharts-legend-wrapper",style:A,ref:m},v.createElement(Jue,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!c&&v.createElement(ece,{width:d.width,height:d.height}),v.createElement(Zue,J1({},t,w,{margin:i,chartWidth:h,chartHeight:y,contextPayload:n})));return cs.createPortal(C,E)}var YB=v.memo(rce,hc);YB.displayName="Legend";function eS(){return eS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eS.apply(null,arguments)}function pD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pD(Object(n),!0).forEach(function(r){ice(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ice(e,t,n){return(t=ace(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ace(e){var t=oce(e,"string");return typeof t=="symbol"?t:t+""}function oce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sce(e){return Array.isArray(e)&&ma(e[0])&&ma(e[1])?e.join(" ~ "):e}var vu={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 lce(e,t){return t==null?e:cv(e,t)}var uce=e=>{var{separator:t=vu.separator,contentStyle:n,itemStyle:r,labelStyle:i=vu.labelStyle,payload:o,formatter:l,itemSorter:u,wrapperClassName:c,labelClassName:d,label:m,labelFormatter:h,accessibilityLayer:y=vu.accessibilityLayer}=e,b=()=>{if(o&&o.length){var N={padding:0,margin:0},_=lce(o,u),M=_.map((R,B)=>{if(!R||R.type==="none")return null;var V=R.formatter||l||sce,{value:H,name:z}=R,W=H,Q=z;if(V){var se=V(H,z,R,B,o);if(Array.isArray(se))[W,Q]=se;else if(se!=null)W=se;else return null}var L=Sf(Sf({},vu.itemStyle),{},{color:R.color||vu.itemStyle.color},r);return v.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(B),style:L},ma(Q)?v.createElement("span",{className:"recharts-tooltip-item-name"},Q):null,ma(Q)?v.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,v.createElement("span",{className:"recharts-tooltip-item-value"},W),v.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return v.createElement("ul",{className:"recharts-tooltip-item-list",style:N},M)}return null},w=Sf(Sf({},vu.contentStyle),n),A=Sf({margin:0},i),E=!gn(m),C=E?m:"",j=ot("recharts-default-tooltip",c),T=ot("recharts-tooltip-label",d);E&&h&&o!==void 0&&o!==null&&(C=h(m,o));var O=y?{role:"status","aria-live":"assertive"}:{};return v.createElement("div",eS({className:j,style:w},O),v.createElement("p",{className:T,style:A},v.isValidElement(C)?C:"".concat(C)),b())},Af="recharts-tooltip-wrapper",cce={visibility:"hidden"};function fce(e){var{coordinate:t,translateX:n,translateY:r}=e;return ot(Af,{["".concat(Af,"-right")]:Oe(n)&&t&&Oe(t.x)&&n>=t.x,["".concat(Af,"-left")]:Oe(n)&&t&&Oe(t.x)&&n<t.x,["".concat(Af,"-bottom")]:Oe(r)&&t&&Oe(t.y)&&r>=t.y,["".concat(Af,"-top")]:Oe(r)&&t&&Oe(t.y)&&r<t.y})}function gD(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:o,reverseDirection:l,tooltipDimension:u,viewBox:c,viewBoxDimension:d}=e;if(o&&Oe(o[r]))return o[r];var m=n[r]-u-(i>0?i:0),h=n[r]+i;if(t[r])return l[r]?m:h;var y=c[r];if(y==null)return 0;if(l[r]){var b=m,w=y;return b<w?Math.max(h,y):Math.max(m,y)}if(d==null)return 0;var A=h+u,E=y+d;return A>E?Math.max(m,y):Math.max(h,y)}function dce(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function hce(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:i,position:o,reverseDirection:l,tooltipBox:u,useTranslate3d:c,viewBox:d}=e,m,h,y;return u.height>0&&u.width>0&&n?(h=gD({allowEscapeViewBox:t,coordinate:n,key:"x",offset:i,position:o,reverseDirection:l,tooltipDimension:u.width,viewBox:d,viewBoxDimension:d.width}),y=gD({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:o,reverseDirection:l,tooltipDimension:u.height,viewBox:d,viewBoxDimension:d.height}),m=dce({translateX:h,translateY:y,useTranslate3d:c})):m=cce,{cssProperties:m,cssClasses:fce({translateX:h,translateY:y,coordinate:n})}}var mce=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Hd={isSsr:mce()};function WB(){var[e,t]=v.useState(()=>Hd.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return v.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}},[]),e}function vD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vD(Object(n),!0).forEach(function(r){pce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pce(e,t,n){return(t=gce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gce(e){var t=vce(e,"string");return typeof t=="symbol"?t:t+""}function vce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yce(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function bce(e){var t,n,r,i,o,l,u=WB(),[c,d]=v.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));v.useEffect(()=>{var w=A=>{if(A.key==="Escape"){var E,C,j,T;d({dismissed:!0,dismissedAtCoordinate:{x:(E=(C=e.coordinate)===null||C===void 0?void 0:C.x)!==null&&E!==void 0?E:0,y:(j=(T=e.coordinate)===null||T===void 0?void 0:T.y)!==null&&j!==void 0?j:0}})}};return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),c.dismissed&&(((r=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)!==c.dismissedAtCoordinate.x||((o=(l=e.coordinate)===null||l===void 0?void 0:l.y)!==null&&o!==void 0?o:0)!==c.dismissedAtCoordinate.y)&&d(yu(yu({},c),{},{dismissed:!1}));var{cssClasses:m,cssProperties:h}=hce({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}),y=e.hasPortalFromProps?{}:yu(yu({transition:yce({prefersReducedMotion:u,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},h),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),b=yu(yu({},y),{},{visibility:!c.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return v.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:m,style:b,ref:e.innerRef},e.children)}var xce=v.memo(bce),XB=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function tS(){return tS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tS.apply(null,arguments)}function yD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yD(Object(n),!0).forEach(function(r){wce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wce(e,t,n){return(t=Sce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sce(e){var t=Ace(e,"string");return typeof t=="symbol"?t:t+""}function Ace(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xD={curveBasisClosed:Nae,curveBasisOpen:_ae,curveBasis:Pae,curveBumpX:pae,curveBumpY:gae,curveLinearClosed:Mae,curveLinear:sv,curveMonotoneX:Rae,curveMonotoneY:Dae,curveNatural:kae,curveStep:Lae,curveStepAfter:zae,curveStepBefore:Iae},rg=e=>rt(e.x)&&rt(e.y),wD=e=>e.base!=null&&rg(e.base)&&rg(e),Ef=e=>e.x,Cf=e=>e.y,Ece=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(zd(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=xD["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return xD[n]||sv},SD={connectNulls:!1,type:"linear"},Cce=e=>{var{type:t=SD.type,points:n=[],baseLine:r,layout:i,connectNulls:o=SD.connectNulls}=e,l=Ece(t,i),u=o?n.filter(rg):n;if(Array.isArray(r)){var c,d=n.map((w,A)=>bD(bD({},w),{},{base:r[A]}));i==="vertical"?c=Dm().y(Cf).x1(Ef).x0(w=>w.base.x):c=Dm().x(Ef).y1(Cf).y0(w=>w.base.y);var m=c.defined(wD).curve(l),h=o?d.filter(wD):d;return m(h)}var y;i==="vertical"&&Oe(r)?y=Dm().y(Cf).x1(Ef).x0(r):Oe(r)?y=Dm().x(Ef).y1(Cf).y0(r):y=A4().x(Ef).y(Cf);var b=y.defined(rg).curve(l);return b(u)},Kf=e=>{var{className:t,points:n,path:r,pathRef:i}=e,o=Tl();if((!n||!n.length)&&!r)return null;var l={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},u=n&&n.length?Cce(l):r;return v.createElement("path",tS({},Ri(e),JA(e),{className:ot("recharts-curve",t),d:u===null?void 0:u,ref:i}))},jce=["x","y","top","left","width","height","className"];function nS(){return nS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nS.apply(null,arguments)}function AD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AD(Object(n),!0).forEach(function(r){Oce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oce(e,t,n){return(t=Pce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pce(e){var t=Nce(e,"string");return typeof t=="symbol"?t:t+""}function Nce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _ce(e,t){if(e==null)return{};var n,r,i=Mce(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Mce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Rce=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),Dce=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:o=0,height:l=0,className:u}=e,c=_ce(e,jce),d=Tce({x:t,y:n,top:r,left:i,width:o,height:l},c);return!Oe(t)||!Oe(n)||!Oe(o)||!Oe(l)||!Oe(r)||!Oe(i)?null:v.createElement("path",nS({},Gn(d),{className:ot("recharts-cross",u),d:Rce(t,n,o,l,r,i)}))};function kce(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function ED(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ED(Object(n),!0).forEach(function(r){Lce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ED(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lce(e,t,n){return(t=Ice(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ice(e){var t=zce(e,"string");return typeof t=="symbol"?t:t+""}function zce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bce=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),ZB=(e,t,n)=>e.map(r=>"".concat(Bce(r)," ").concat(t,"ms ").concat(n)).join(","),$ce=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),vd=(e,t)=>Object.keys(t).reduce((n,r)=>CD(CD({},n),{},{[r]:e(r,t[r])}),{});function jD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jD(Object(n),!0).forEach(function(r){Uce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uce(e,t,n){return(t=Vce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vce(e){var t=Fce(e,"string");return typeof t=="symbol"?t:t+""}function Fce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ig=(e,t,n)=>e+(t-e)*n,rS=e=>{var{from:t,to:n}=e;return t!==n},QB=(e,t,n)=>{var r=vd((i,o)=>{if(rS(o)){var[l,u]=e(o.from,o.to,o.velocity);return mn(mn({},o),{},{from:l,velocity:u})}return o},t);return n<1?vd((i,o)=>rS(o)&&r[i]!=null?mn(mn({},o),{},{velocity:ig(o.velocity,r[i].velocity,n),from:ig(o.from,r[i].from,n)}):o,t):QB(e,r,n-1)};function Hce(e,t,n,r,i,o){var l,u=r.reduce((y,b)=>mn(mn({},y),{},{[b]:{from:e[b],velocity:0,to:t[b]}}),{}),c=()=>vd((y,b)=>b.from,u),d=()=>!Object.values(u).filter(rS).length,m=null,h=y=>{l||(l=y);var b=y-l,w=b/n.dt;u=QB(n,u,w),i(mn(mn(mn({},e),t),c())),l=y,d()||(m=o.setTimeout(h))};return()=>(m=o.setTimeout(h),()=>{var y;(y=m)===null||y===void 0||y()})}function qce(e,t,n,r,i,o,l){var u=null,c=i.reduce((h,y)=>{var b=e[y],w=t[y];return b==null||w==null?h:mn(mn({},h),{},{[y]:[b,w]})},{}),d,m=h=>{d||(d=h);var y=(h-d)/r,b=vd((A,E)=>ig(...E,n(y)),c);if(o(mn(mn(mn({},e),t),b)),y<1)u=l.setTimeout(m);else{var w=vd((A,E)=>ig(...E,n(1)),c);o(mn(mn(mn({},e),t),w))}};return()=>(u=l.setTimeout(m),()=>{var h;(h=u)===null||h===void 0||h()})}const Kce=(e,t,n,r,i,o)=>{var l=$ce(e,t);return n==null?()=>(i(mn(mn({},e),t)),()=>{}):n.isStepper===!0?Hce(e,t,n,l,i,o):qce(e,t,n,r,l,i,o)};var ag=1e-4,JB=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],e$=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),TD=(e,t)=>n=>{var r=JB(e,t);return e$(r,n)},Gce=(e,t)=>n=>{var r=JB(e,t),i=[...r.map((o,l)=>o*l).slice(1),0];return e$(i,n)},Yce=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var i=r.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},Wce=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[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=Yce(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},Xce=(e,t,n,r)=>{var i=TD(e,n),o=TD(t,r),l=Gce(e,n),u=d=>d>1?1:d<0?0:d,c=d=>{for(var m=d>1?1:d,h=m,y=0;y<8;++y){var b=i(h)-m,w=l(h);if(Math.abs(b-m)<ag||w<ag)return o(h);h=u(h-b/w)}return o(h)};return c.isStepper=!1,c},OD=function(){return Xce(...Wce(...arguments))},Zce=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,o=(l,u,c)=>{var d=-(l-u)*n,m=c*r,h=c+(d-m)*i/1e3,y=c*i/1e3+l;return Math.abs(y-u)<ag&&Math.abs(h)<ag?[u,0]:[y,h]};return o.isStepper=!0,o.dt=i,o},Qce=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return OD(e);case"spring":return Zce();default:if(e.split("(")[0]==="cubic-bezier")return OD(e)}return typeof e=="function"?e:null};function Jce(e){var t,n=()=>null,r=!1,i=null,o=l=>{if(!r){if(Array.isArray(l)){if(!l.length)return;var u=l,[c,...d]=u;if(typeof c=="number"){i=e.setTimeout(o.bind(null,d),c);return}o(c),i=e.setTimeout(o.bind(null,d));return}typeof l=="string"&&(t=l,n(t)),typeof l=="object"&&(t=l,n(t)),typeof l=="function"&&l()}};return{stop:()=>{r=!0},start:l=>{r=!1,i&&(i(),i=null),o(l)},subscribe:l=>(n=l,()=>{n=()=>null}),getTimeoutController:()=>e}}class efe{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,o=l=>{l-r>=n?t(l):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function tfe(){return Jce(new efe)}var nfe=v.createContext(tfe);function rfe(e,t){var n=v.useContext(nfe);return v.useMemo(()=>t??n(e),[e,t,n])}var ife={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},PD={t:0},lw={t:1};function Pv(e){var t=Yn(e,ife),{isActive:n,canBegin:r,duration:i,easing:o,begin:l,onAnimationEnd:u,onAnimationStart:c,children:d}=t,m=WB(),h=n==="auto"?!Hd.isSsr&&!m:n,y=rfe(t.animationId,t.animationManager),[b,w]=v.useState(h?PD:lw),A=v.useRef(null);return v.useEffect(()=>{h||w(lw)},[h]),v.useEffect(()=>{if(!h||!r)return jl;var E=Kce(PD,lw,Qce(o),i,w,y.getTimeoutController()),C=()=>{A.current=E()};return y.start([c,l,C,i,u]),()=>{y.stop(),A.current&&A.current(),u()}},[h,r,i,o,l,c,u,y]),d(b.t)}function Nv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=v.useRef(cd(t)),r=v.useRef(e);return r.current!==e&&(n.current=cd(t),r.current=e),n.current}var afe=["radius"],ofe=["radius"],ND,_D,MD,RD,DD,kD,LD,ID,zD,BD;function $D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function UD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$D(Object(n),!0).forEach(function(r){sfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$D(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sfe(e,t,n){return(t=lfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lfe(e){var t=ufe(e,"string");return typeof t=="symbol"?t:t+""}function ufe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function og(){return og=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},og.apply(null,arguments)}function VD(e,t){if(e==null)return{};var n,r,i=cfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cfe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var FD=(e,t,n,r,i)=>{var o=ts(n),l=ts(r),u=Math.min(Math.abs(o)/2,Math.abs(l)/2),c=l>=0?1:-1,d=o>=0?1:-1,m=l>=0&&o>=0||l<0&&o<0?1:0,h;if(u>0&&Array.isArray(i)){for(var y=[0,0,0,0],b=0,w=4;b<w;b++){var A,E=(A=i[b])!==null&&A!==void 0?A:0;y[b]=E>u?u:E}h=$t(ND||(ND=Yi(["M",",",""])),e,t+c*y[0]),y[0]>0&&(h+=$t(_D||(_D=Yi(["A ",",",",0,0,",",",",",""])),y[0],y[0],m,e+d*y[0],t)),h+=$t(MD||(MD=Yi(["L ",",",""])),e+n-d*y[1],t),y[1]>0&&(h+=$t(RD||(RD=Yi(["A ",",",",0,0,",`,
|
|
73
|
-
`,",",""])),y[1],y[1],m,e+n,t+c*y[1])),h+=$t(DD||(DD=Yi(["L ",",",""])),e+n,t+r-c*y[2]),y[2]>0&&(h+=$t(kD||(kD=Yi(["A ",",",",0,0,",`,
|
|
74
|
-
`,",",""])),y[2],y[2],m,e+n-d*y[2],t+r)),h+=$t(LD||(LD=Yi(["L ",",",""])),e+d*y[3],t+r),y[3]>0&&(h+=$t(ID||(ID=Yi(["A ",",",",0,0,",`,
|
|
75
|
-
`,",",""])),y[3],y[3],m,e,t+r-c*y[3])),h+="Z"}else if(u>0&&i===+i&&i>0){var C=Math.min(u,i);h=$t(zD||(zD=Yi(["M ",",",`
|
|
76
|
-
A `,",",",0,0,",",",",",`
|
|
77
|
-
L `,",",`
|
|
78
|
-
A `,",",",0,0,",",",",",`
|
|
79
|
-
L `,",",`
|
|
80
|
-
A `,",",",0,0,",",",",",`
|
|
81
|
-
L `,",",`
|
|
82
|
-
A `,",",",0,0,",",",","," Z"])),e,t+c*C,C,C,m,e+d*C,t,e+n-d*C,t,C,C,m,e+n,t+c*C,e+n,t+r-c*C,C,C,m,e+n-d*C,t+r,e+d*C,t+r,C,C,m,e,t+r-c*C)}else h=$t(BD||(BD=Yi(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return h},HD={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},t$=e=>{var t=Yn(e,HD),n=v.useRef(null),[r,i]=v.useState(-1);v.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var F=n.current.getTotalLength();F&&i(F)}catch{}},[]);var{x:o,y:l,width:u,height:c,radius:d,className:m}=t,{animationEasing:h,animationDuration:y,animationBegin:b,isAnimationActive:w,isUpdateAnimationActive:A}=t,E=v.useRef(u),C=v.useRef(c),j=v.useRef(o),T=v.useRef(l),O=v.useMemo(()=>({x:o,y:l,width:u,height:c,radius:d}),[o,l,u,c,d]),N=Nv(O,"rectangle-");if(o!==+o||l!==+l||u!==+u||c!==+c||u===0||c===0)return null;var _=ot("recharts-rectangle",m);if(!A){var M=Gn(t),{radius:R}=M,B=VD(M,afe);return v.createElement("path",og({},B,{x:ts(o),y:ts(l),width:ts(u),height:ts(c),radius:typeof d=="number"?d:void 0,className:_,d:FD(o,l,u,c,d)}))}var V=E.current,H=C.current,z=j.current,W=T.current,Q="0px ".concat(r===-1?1:r,"px"),se="".concat(r,"px ").concat(r,"px"),L=ZB(["strokeDasharray"],y,typeof h=="string"?h:HD.animationEasing);return v.createElement(Pv,{animationId:N,key:N,canBegin:r>0,duration:y,easing:h,isActive:A,begin:b},F=>{var $=nn(V,u,F),ae=nn(H,c,F),G=nn(z,o,F),k=nn(W,l,F);n.current&&(E.current=$,C.current=ae,j.current=G,T.current=k);var I;w?F>0?I={transition:L,strokeDasharray:se}:I={strokeDasharray:Q}:I={strokeDasharray:se};var q=Gn(t),{radius:ne}=q,de=VD(q,ofe);return v.createElement("path",og({},de,{radius:typeof d=="number"?d:void 0,className:_,d:FD(G,k,$,ae,d),ref:n,style:UD(UD({},I),t.style)}))})};function qD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function KD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qD(Object(n),!0).forEach(function(r){ffe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ffe(e,t,n){return(t=dfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dfe(e){var t=hfe(e,"string");return typeof t=="symbol"?t:t+""}function hfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sg=Math.PI/180,mfe=e=>e*180/Math.PI,Ln=(e,t,n,r)=>({x:e+Math.cos(-sg*r)*n,y:t+Math.sin(-sg*r)*n}),pfe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},gfe=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)},vfe=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,l=gfe({x:n,y:r},{x:i,y:o});if(l<=0)return{radius:l,angle:0};var u=(n-i)/l,c=Math.acos(u);return r>o&&(c=2*Math.PI-c),{radius:l,angle:mfe(c),angleInRadian:c}},yfe=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-o*360,endAngle:n-o*360}},bfe=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(i,o);return e+l*360},xfe=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:i,angle:o}=vfe({x:n,y:r},t),{innerRadius:l,outerRadius:u}=t;if(i<l||i>u||i===0)return null;var{startAngle:c,endAngle:d}=yfe(t),m=o,h;if(c<=d){for(;m>d;)m-=360;for(;m<c;)m+=360;h=m>=c&&m<=d}else{for(;m>c;)m-=360;for(;m<d;)m+=360;h=m>=d&&m<=c}return h?KD(KD({},t),{},{radius:i,angle:bfe(m,t)}):null};function n$(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:o}=e,l=Ln(t,n,r,i),u=Ln(t,n,r,o);return{points:[l,u],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}var GD,YD,WD,XD,ZD,QD,JD;function iS(){return iS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iS.apply(null,arguments)}function el(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var wfe=(e,t)=>{var n=Oi(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Vm=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:o,isExternal:l,cornerRadius:u,cornerIsExternal:c}=e,d=u*(l?1:-1)+r,m=Math.asin(u/d)/sg,h=c?i:i+o*m,y=Ln(t,n,d,h),b=Ln(t,n,r,h),w=c?i-o*m:i,A=Ln(t,n,d*Math.cos(m*sg),w);return{center:y,circleTangency:b,lineTangency:A,theta:m}},r$=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:l}=e,u=wfe(o,l),c=o+u,d=Ln(t,n,i,o),m=Ln(t,n,i,c),h=$t(GD||(GD=el(["M ",",",`
|
|
83
|
-
A `,",",`,0,
|
|
84
|
-
`,",",`,
|
|
85
|
-
`,",",`
|
|
86
|
-
`])),d.x,d.y,i,i,+(Math.abs(u)>180),+(o>c),m.x,m.y);if(r>0){var y=Ln(t,n,r,o),b=Ln(t,n,r,c);h+=$t(YD||(YD=el(["L ",",",`
|
|
87
|
-
A `,",",`,0,
|
|
88
|
-
`,",",`,
|
|
89
|
-
`,","," Z"])),b.x,b.y,r,r,+(Math.abs(u)>180),+(o<=c),y.x,y.y)}else h+=$t(WD||(WD=el(["L ",","," Z"])),t,n);return h},Sfe=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:d}=e,m=Oi(d-c),{circleTangency:h,lineTangency:y,theta:b}=Vm({cx:t,cy:n,radius:i,angle:c,sign:m,cornerRadius:o,cornerIsExternal:u}),{circleTangency:w,lineTangency:A,theta:E}=Vm({cx:t,cy:n,radius:i,angle:d,sign:-m,cornerRadius:o,cornerIsExternal:u}),C=u?Math.abs(c-d):Math.abs(c-d)-b-E;if(C<0)return l?$t(XD||(XD=el(["M ",",",`
|
|
90
|
-
a`,",",",0,0,1,",`,0
|
|
91
|
-
a`,",",",0,0,1,",`,0
|
|
92
|
-
`])),y.x,y.y,o,o,o*2,o,o,-o*2):r$({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:d});var j=$t(ZD||(ZD=el(["M ",",",`
|
|
93
|
-
A`,",",",0,0,",",",",",`
|
|
94
|
-
A`,",",",0,",",",",",",",`
|
|
95
|
-
A`,",",",0,0,",",",",",`
|
|
96
|
-
`])),y.x,y.y,o,o,+(m<0),h.x,h.y,i,i,+(C>180),+(m<0),w.x,w.y,o,o,+(m<0),A.x,A.y);if(r>0){var{circleTangency:T,lineTangency:O,theta:N}=Vm({cx:t,cy:n,radius:r,angle:c,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),{circleTangency:_,lineTangency:M,theta:R}=Vm({cx:t,cy:n,radius:r,angle:d,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),B=u?Math.abs(c-d):Math.abs(c-d)-N-R;if(B<0&&o===0)return"".concat(j,"L").concat(t,",").concat(n,"Z");j+=$t(QD||(QD=el(["L",",",`
|
|
97
|
-
A`,",",",0,0,",",",",",`
|
|
98
|
-
A`,",",",0,",",",",",",",`
|
|
99
|
-
A`,",",",0,0,",",",",","Z"])),M.x,M.y,o,o,+(m<0),_.x,_.y,r,r,+(B>180),+(m>0),T.x,T.y,o,o,+(m<0),O.x,O.y)}else j+=$t(JD||(JD=el(["L",",","Z"])),t,n);return j},Afe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},i$=e=>{var t=Yn(e,Afe),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:l,forceCornerRadius:u,cornerIsExternal:c,startAngle:d,endAngle:m,className:h}=t;if(o<i||d===m)return null;var y=ot("recharts-sector",h),b=o-i,w=ls(l,b,0,!0),A;return w>0&&Math.abs(d-m)<360?A=Sfe({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:u,cornerIsExternal:c,startAngle:d,endAngle:m}):A=r$({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:d,endAngle:m}),v.createElement("path",iS({},Gn(t),{className:y,d:A}))};function Efe(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(z4(t)){if(e==="centric"){var{cx:r,cy:i,innerRadius:o,outerRadius:l,angle:u}=t,c=Ln(r,i,o,u),d=Ln(r,i,l,u);return[{x:c.x,y:c.y},{x:d.x,y:d.y}]}return n$(t)}}var uw={},cw={},fw={},ek;function Cfe(){return ek||(ek=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Q4();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(fw)),fw}var tk;function jfe(){return tk||(tk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cfe();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(cw)),cw}var nk;function Tfe(){return nk||(nk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=J4(),n=jfe();function r(i,o,l){l&&typeof l!="number"&&t.isIterateeCall(i,o,l)&&(o=l=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),l=l===void 0?i<o?1:-1:n.toFinite(l);const u=Math.max(Math.ceil((o-i)/(l||1)),0),c=new Array(u);for(let d=0;d<u;d++)c[d]=i,i+=l;return c}e.range=r})(uw)),uw}var dw,rk;function Ofe(){return rk||(rk=1,dw=Tfe().range),dw}var Pfe=Ofe();const a$=va(Pfe);var zi=e=>e.chartData,hE=ee([zi],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),qd=(e,t,n,r)=>r?hE(e):zi(e),Nfe=(e,t,n)=>n?hE(e):zi(e),_fe=ee([qd],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]});ee([hE],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]});var Mfe=ee([zi],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]});function ca(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(rt(t)&&rt(n))return!0}return!1}function ik(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function o$(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(rt(n))i=n;else if(typeof n=="function")return;if(rt(r))o=r;else if(typeof r=="function")return;var l=[i,o];if(ca(l))return l}}function Rfe(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(ca(r))return ik(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,l,u;if(i==="auto")t!=null&&(l=Math.min(...t));else if(Oe(i))l=i;else if(typeof i=="function")try{t!=null&&(l=i(t?.[0]))}catch{}else if(typeof i=="string"&&KR.test(i)){var c=KR.exec(i);if(c==null||c[1]==null||t==null)l=void 0;else{var d=+c[1];l=t[0]-d}}else l=t?.[0];if(o==="auto")t!=null&&(u=Math.max(...t));else if(Oe(o))u=o;else if(typeof o=="function")try{t!=null&&(u=o(t?.[1]))}catch{}else if(typeof o=="string"&&GR.test(o)){var m=GR.exec(o);if(m==null||m[1]==null||t==null)u=void 0;else{var h=+m[1];u=t[1]+h}}else u=t?.[1];var y=[l,u];if(ca(y))return t==null?y:ik(y,t,n)}}}var mc=1e9,Dfe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},pE,Pt=!0,hi="[DecimalError] ",ol=hi+"Invalid argument: ",mE=hi+"Exponent out of range: ",pc=Math.floor,qs=Math.pow,kfe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ir,xn=1e7,Et=7,s$=9007199254740991,lg=pc(s$/Et),xe={};xe.absoluteValue=xe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};xe.comparedTo=xe.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};xe.decimalPlaces=xe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Et;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};xe.dividedBy=xe.div=function(e){return Ja(this,new this.constructor(e))};xe.dividedToIntegerBy=xe.idiv=function(e){var t=this,n=t.constructor;return pt(Ja(t,new n(e),0,1),n.precision)};xe.equals=xe.eq=function(e){return!this.cmp(e)};xe.exponent=function(){return sn(this)};xe.greaterThan=xe.gt=function(e){return this.cmp(e)>0};xe.greaterThanOrEqualTo=xe.gte=function(e){return this.cmp(e)>=0};xe.isInteger=xe.isint=function(){return this.e>this.d.length-2};xe.isNegative=xe.isneg=function(){return this.s<0};xe.isPositive=xe.ispos=function(){return this.s>0};xe.isZero=function(){return this.s===0};xe.lessThan=xe.lt=function(e){return this.cmp(e)<0};xe.lessThanOrEqualTo=xe.lte=function(e){return this.cmp(e)<1};xe.logarithm=xe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Ir))throw Error(hi+"NaN");if(n.s<1)throw Error(hi+(n.s?"NaN":"-Infinity"));return n.eq(Ir)?new r(0):(Pt=!1,t=Ja(yd(n,o),yd(e,o),o),Pt=!0,pt(t,i))};xe.minus=xe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?c$(t,e):l$(t,(e.s=-e.s,e))};xe.modulo=xe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(hi+"NaN");return n.s?(Pt=!1,t=Ja(n,e,0,1).times(e),Pt=!0,n.minus(t)):pt(new r(n),i)};xe.naturalExponential=xe.exp=function(){return u$(this)};xe.naturalLogarithm=xe.ln=function(){return yd(this)};xe.negated=xe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};xe.plus=xe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?l$(t,e):c$(t,(e.s=-e.s,e))};xe.precision=xe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ol+e);if(t=sn(i)+1,r=i.d.length-1,n=r*Et+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};xe.squareRoot=xe.sqrt=function(){var e,t,n,r,i,o,l,u=this,c=u.constructor;if(u.s<1){if(!u.s)return new c(0);throw Error(hi+"NaN")}for(e=sn(u),Pt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=ia(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=pc((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),r=new c(t)):r=new c(i.toString()),n=c.precision,i=l=n+3;;)if(o=r,r=o.plus(Ja(u,o,l+2)).times(.5),ia(o.d).slice(0,l)===(t=ia(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(pt(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if(t!="9999")break;l+=4}return Pt=!0,pt(r,n)};xe.times=xe.mul=function(e){var t,n,r,i,o,l,u,c,d,m=this,h=m.constructor,y=m.d,b=(e=new h(e)).d;if(!m.s||!e.s)return new h(0);for(e.s*=m.s,n=m.e+e.e,c=y.length,d=b.length,c<d&&(o=y,y=b,b=o,l=c,c=d,d=l),o=[],l=c+d,r=l;r--;)o.push(0);for(r=d;--r>=0;){for(t=0,i=c+r;i>r;)u=o[i]+b[r]*y[i-r-1]+t,o[i--]=u%xn|0,t=u/xn|0;o[i]=(o[i]+t)%xn|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Pt?pt(e,h.precision):e};xe.toDecimalPlaces=xe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(pa(e,0,mc),t===void 0?t=r.rounding:pa(t,0,8),pt(n,e+sn(n)+1,t))};xe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=xl(r,!0):(pa(e,0,mc),t===void 0?t=i.rounding:pa(t,0,8),r=pt(new i(r),e+1,t),n=xl(r,!0,e+1)),n};xe.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?xl(i):(pa(e,0,mc),t===void 0?t=o.rounding:pa(t,0,8),r=pt(new o(i),e+sn(i)+1,t),n=xl(r.abs(),!1,e+sn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};xe.toInteger=xe.toint=function(){var e=this,t=e.constructor;return pt(new t(e),sn(e)+1,t.rounding)};xe.toNumber=function(){return+this};xe.toPower=xe.pow=function(e){var t,n,r,i,o,l,u=this,c=u.constructor,d=12,m=+(e=new c(e));if(!e.s)return new c(Ir);if(u=new c(u),!u.s){if(e.s<1)throw Error(hi+"Infinity");return u}if(u.eq(Ir))return u;if(r=c.precision,e.eq(Ir))return pt(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=u.s,l){if((n=m<0?-m:m)<=s$){for(i=new c(Ir),t=Math.ceil(r/Et+4),Pt=!1;n%2&&(i=i.times(u),ok(i.d,t)),n=pc(n/2),n!==0;)u=u.times(u),ok(u.d,t);return Pt=!0,e.s<0?new c(Ir).div(i):pt(i,r)}}else if(o<0)throw Error(hi+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,Pt=!1,i=e.times(yd(u,r+d)),Pt=!0,i=u$(i),i.s=o,i};xe.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=sn(i),r=xl(i,n<=o.toExpNeg||n>=o.toExpPos)):(pa(e,1,mc),t===void 0?t=o.rounding:pa(t,0,8),i=pt(new o(i),e,t),n=sn(i),r=xl(i,e<=n||n<=o.toExpNeg,e)),r};xe.toSignificantDigits=xe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(pa(e,1,mc),t===void 0?t=r.rounding:pa(t,0,8)),pt(new r(n),e,t)};xe.toString=xe.valueOf=xe.val=xe.toJSON=xe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=sn(e),n=e.constructor;return xl(e,t<=n.toExpNeg||t>=n.toExpPos)};function l$(e,t){var n,r,i,o,l,u,c,d,m=e.constructor,h=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),Pt?pt(t,h):t;if(c=e.d,d=t.d,l=e.e,i=t.e,c=c.slice(),o=l-i,o){for(o<0?(r=c,o=-o,u=d.length):(r=d,i=l,u=c.length),l=Math.ceil(h/Et),u=l>u?l+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=c.length,o=d.length,u-o<0&&(o=u,r=d,d=c,c=r),n=0;o;)n=(c[--o]=c[o]+d[o]+n)/xn|0,c[o]%=xn;for(n&&(c.unshift(n),++i),u=c.length;c[--u]==0;)c.pop();return t.d=c,t.e=i,Pt?pt(t,h):t}function pa(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ol+e)}function ia(e){var t,n,r,i=e.length-1,o="",l=e[0];if(i>0){for(o+=l,t=1;t<i;t++)r=e[t]+"",n=Et-r.length,n&&(o+=Zo(n)),o+=r;l=e[t],r=l+"",n=Et-r.length,n&&(o+=Zo(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Ja=(function(){function e(r,i){var o,l=0,u=r.length;for(r=r.slice();u--;)o=r[u]*i+l,r[u]=o%xn|0,l=o/xn|0;return l&&r.unshift(l),r}function t(r,i,o,l){var u,c;if(o!=l)c=o>l?1:-1;else for(u=c=0;u<o;u++)if(r[u]!=i[u]){c=r[u]>i[u]?1:-1;break}return c}function n(r,i,o){for(var l=0;o--;)r[o]-=l,l=r[o]<i[o]?1:0,r[o]=l*xn+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,l){var u,c,d,m,h,y,b,w,A,E,C,j,T,O,N,_,M,R,B=r.constructor,V=r.s==i.s?1:-1,H=r.d,z=i.d;if(!r.s)return new B(r);if(!i.s)throw Error(hi+"Division by zero");for(c=r.e-i.e,M=z.length,N=H.length,b=new B(V),w=b.d=[],d=0;z[d]==(H[d]||0);)++d;if(z[d]>(H[d]||0)&&--c,o==null?j=o=B.precision:l?j=o+(sn(r)-sn(i))+1:j=o,j<0)return new B(0);if(j=j/Et+2|0,d=0,M==1)for(m=0,z=z[0],j++;(d<N||m)&&j--;d++)T=m*xn+(H[d]||0),w[d]=T/z|0,m=T%z|0;else{for(m=xn/(z[0]+1)|0,m>1&&(z=e(z,m),H=e(H,m),M=z.length,N=H.length),O=M,A=H.slice(0,M),E=A.length;E<M;)A[E++]=0;R=z.slice(),R.unshift(0),_=z[0],z[1]>=xn/2&&++_;do m=0,u=t(z,A,M,E),u<0?(C=A[0],M!=E&&(C=C*xn+(A[1]||0)),m=C/_|0,m>1?(m>=xn&&(m=xn-1),h=e(z,m),y=h.length,E=A.length,u=t(h,A,y,E),u==1&&(m--,n(h,M<y?R:z,y))):(m==0&&(u=m=1),h=z.slice()),y=h.length,y<E&&h.unshift(0),n(A,h,E),u==-1&&(E=A.length,u=t(z,A,M,E),u<1&&(m++,n(A,M<E?R:z,E))),E=A.length):u===0&&(m++,A=[0]),w[d++]=m,u&&A[0]?A[E++]=H[O]||0:(A=[H[O]],E=1);while((O++<N||A[0]!==void 0)&&j--)}return w[0]||w.shift(),b.e=c,pt(b,l?o+sn(b)+1:o)}})();function u$(e,t){var n,r,i,o,l,u,c=0,d=0,m=e.constructor,h=m.precision;if(sn(e)>16)throw Error(mE+sn(e));if(!e.s)return new m(Ir);for(Pt=!1,u=h,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),d+=5;for(r=Math.log(qs(2,d))/Math.LN10*2+5|0,u+=r,n=i=o=new m(Ir),m.precision=u;;){if(i=pt(i.times(e),u),n=n.times(++c),l=o.plus(Ja(i,n,u)),ia(l.d).slice(0,u)===ia(o.d).slice(0,u)){for(;d--;)o=pt(o.times(o),u);return m.precision=h,t==null?(Pt=!0,pt(o,h)):o}o=l}}function sn(e){for(var t=e.e*Et,n=e.d[0];n>=10;n/=10)t++;return t}function hw(e,t,n){if(t>e.LN10.sd())throw Pt=!0,n&&(e.precision=n),Error(hi+"LN10 precision limit exceeded");return pt(new e(e.LN10),t)}function Zo(e){for(var t="";e--;)t+="0";return t}function yd(e,t){var n,r,i,o,l,u,c,d,m,h=1,y=10,b=e,w=b.d,A=b.constructor,E=A.precision;if(b.s<1)throw Error(hi+(b.s?"NaN":"-Infinity"));if(b.eq(Ir))return new A(0);if(t==null?(Pt=!1,d=E):d=t,b.eq(10))return t==null&&(Pt=!0),hw(A,d);if(d+=y,A.precision=d,n=ia(w),r=n.charAt(0),o=sn(b),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)b=b.times(e),n=ia(b.d),r=n.charAt(0),h++;o=sn(b),r>1?(b=new A("0."+n),o++):b=new A(r+"."+n.slice(1))}else return c=hw(A,d+2,E).times(o+""),b=yd(new A(r+"."+n.slice(1)),d-y).plus(c),A.precision=E,t==null?(Pt=!0,pt(b,E)):b;for(u=l=b=Ja(b.minus(Ir),b.plus(Ir),d),m=pt(b.times(b),d),i=3;;){if(l=pt(l.times(m),d),c=u.plus(Ja(l,new A(i),d)),ia(c.d).slice(0,d)===ia(u.d).slice(0,d))return u=u.times(2),o!==0&&(u=u.plus(hw(A,d+2,E).times(o+""))),u=Ja(u,new A(h),d),A.precision=E,t==null?(Pt=!0,pt(u,E)):u;u=c,i+=2}}function ak(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=pc(n/Et),e.d=[],r=(n+1)%Et,n<0&&(r+=Et),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Et;r<i;)e.d.push(+t.slice(r,r+=Et));t=t.slice(r),r=Et-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Pt&&(e.e>lg||e.e<-lg))throw Error(mE+n)}else e.s=0,e.e=0,e.d=[0];return e}function pt(e,t,n){var r,i,o,l,u,c,d,m,h=e.d;for(l=1,o=h[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=Et,i=t,d=h[m=0];else{if(m=Math.ceil((r+1)/Et),o=h.length,m>=o)return e;for(d=o=h[m],l=1;o>=10;o/=10)l++;r%=Et,i=r-Et+l}if(n!==void 0&&(o=qs(10,l-i-1),u=d/o%10|0,c=t<0||h[m+1]!==void 0||d%o,c=n<4?(u||c)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||c||n==6&&(r>0?i>0?d/qs(10,l-i):0:h[m-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return c?(o=sn(e),h.length=1,t=t-o-1,h[0]=qs(10,(Et-t%Et)%Et),e.e=pc(-t/Et)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=m,o=1,m--):(h.length=m+1,o=qs(10,Et-r),h[m]=i>0?(d/qs(10,l-i)%qs(10,i)|0)*o:0),c)for(;;)if(m==0){(h[0]+=o)==xn&&(h[0]=1,++e.e);break}else{if(h[m]+=o,h[m]!=xn)break;h[m--]=0,o=1}for(r=h.length;h[--r]===0;)h.pop();if(Pt&&(e.e>lg||e.e<-lg))throw Error(mE+sn(e));return e}function c$(e,t){var n,r,i,o,l,u,c,d,m,h,y=e.constructor,b=y.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new y(e),Pt?pt(t,b):t;if(c=e.d,h=t.d,r=t.e,d=e.e,c=c.slice(),l=d-r,l){for(m=l<0,m?(n=c,l=-l,u=h.length):(n=h,r=d,u=c.length),i=Math.max(Math.ceil(b/Et),u)+2,l>i&&(l=i,n.length=1),n.reverse(),i=l;i--;)n.push(0);n.reverse()}else{for(i=c.length,u=h.length,m=i<u,m&&(u=i),i=0;i<u;i++)if(c[i]!=h[i]){m=c[i]<h[i];break}l=0}for(m&&(n=c,c=h,h=n,t.s=-t.s),u=c.length,i=h.length-u;i>0;--i)c[u++]=0;for(i=h.length;i>l;){if(c[--i]<h[i]){for(o=i;o&&c[--o]===0;)c[o]=xn-1;--c[o],c[i]+=xn}c[i]-=h[i]}for(;c[--u]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,Pt?pt(t,b):t):new y(0)}function xl(e,t,n){var r,i=sn(e),o=ia(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+Zo(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Zo(-i-1)+o,n&&(r=n-l)>0&&(o+=Zo(r))):i>=l?(o+=Zo(i+1-l),n&&(r=n-i-1)>0&&(o=o+"."+Zo(r))):((r=i+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(i+1===l&&(o+="."),o+=Zo(r))),e.s<0?"-"+o:o}function ok(e,t){if(e.length>t)return e.length=t,!0}function f$(e){var t,n,r;function i(o){var l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,o instanceof i){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(ol+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return ak(l,o.toString())}else if(typeof o!="string")throw Error(ol+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,kfe.test(o))ak(l,o);else throw Error(ol+o)}if(i.prototype=xe,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=f$,i.config=i.set=Lfe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function Lfe(e){if(!e||typeof e!="object")throw Error(hi+"Object expected");var t,n,r,i=["precision",1,mc,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(pc(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(ol+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(ol+n+": "+r);return this}var pE=f$(Dfe);Ir=new pE(1);const Ze=pE;function d$(e){var t;return e===0?t=1:t=Math.floor(new Ze(e).abs().log(10).toNumber())+1,t}function h$(e,t,n){for(var r=new Ze(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var m$=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},gE=(e,t,n)=>{if(e.lte(0))return new Ze(0);var r=d$(e.toNumber()),i=new Ze(10).pow(r),o=e.div(i),l=r!==1?.05:.1,u=new Ze(Math.ceil(o.div(l).toNumber())).add(n).mul(l),c=u.mul(i);return t?new Ze(c.toNumber()):new Ze(Math.ceil(c.toNumber()))},p$=(e,t,n)=>{var r;if(e.lte(0))return new Ze(0);var i=[1,2,2.5,5],o=e.toNumber(),l=Math.floor(new Ze(o).abs().log(10).toNumber()),u=new Ze(10).pow(l),c=e.div(u).toNumber(),d=i.findIndex(b=>b>=c-1e-10);if(d===-1&&(u=u.mul(10),d=0),d+=n,d>=i.length){var m=Math.floor(d/i.length);d%=i.length,u=u.mul(new Ze(10).pow(m))}var h=(r=i[d])!==null&&r!==void 0?r:1,y=new Ze(h).mul(u);return t?y:new Ze(Math.ceil(y.toNumber()))},Ife=(e,t,n)=>{var r=new Ze(1),i=new Ze(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Ze(10).pow(d$(e)-1),i=new Ze(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Ze(Math.floor(e)))}else e===0?i=new Ze(Math.floor((t-1)/2)):n||(i=new Ze(Math.floor(e)));for(var l=Math.floor((t-1)/2),u=[],c=0;c<t;c++)u.push(i.add(new Ze(c-l).mul(r)).toNumber());return u},g$=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:gE;if(!Number.isFinite((n-t)/(r-1)))return{step:new Ze(0),tickMin:new Ze(0),tickMax:new Ze(0)};var u=l(new Ze(n).sub(t).div(r-1),i,o),c;t<=0&&n>=0?c=new Ze(0):(c=new Ze(t).add(n).div(2),c=c.sub(new Ze(c).mod(u)));var d=Math.ceil(c.sub(t).div(u).toNumber()),m=Math.ceil(new Ze(n).sub(c).div(u).toNumber()),h=d+m+1;return h>r?g$(t,n,r,i,o+1,l):(h<r&&(m=n>0?m+(r-h):m,d=n>0?d:d+(r-h)),{step:u,tickMin:c.sub(new Ze(d).mul(u)),tickMax:c.add(new Ze(m).mul(u))})},sk=function(t){var[n,r]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",u=Math.max(i,2),[c,d]=m$([n,r]);if(c===-1/0||d===1/0){var m=d===1/0?[c,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),d];return n>r?m.reverse():m}if(c===d)return Ife(c,i,o);var h=l==="snap125"?p$:gE,{step:y,tickMin:b,tickMax:w}=g$(c,d,u,o,0,h),A=h$(b,w.add(new Ze(.1).mul(y)),y);return n>r?A.reverse():A},lk=function(t,n){var[r,i]=t,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[u,c]=m$([r,i]);if(u===-1/0||c===1/0)return[r,i];if(u===c)return[u];var d=l==="snap125"?p$:gE,m=Math.max(n,2),h=d(new Ze(c).sub(u).div(m-1),o,0),y=[...h$(new Ze(u),new Ze(c),h),c];return o===!1&&(y=y.map(b=>Math.round(b))),r>i?y.reverse():y},zfe=e=>e.rootProps.barCategoryGap,_v=e=>e.rootProps.stackOffset,v$=e=>e.rootProps.reverseStackOrder,vE=e=>e.options.chartName,yE=e=>e.rootProps.syncId,y$=e=>e.rootProps.syncMethod,bE=e=>e.options.eventEmitter,Bfe=e=>e.rootProps.baseValue,nr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Is={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Wi={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Mv=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Rv(e,t,n){if(n!=="auto")return n;if(e!=null)return Ii(e,t)?"category":"number"}function uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ug(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uk(Object(n),!0).forEach(function(r){$fe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $fe(e,t,n){return(t=Ufe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ufe(e){var t=Vfe(e,"string");return typeof t=="symbol"?t:t+""}function Vfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ck={allowDataOverflow:Is.allowDataOverflow,allowDecimals:Is.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Is.angleAxisId,includeHidden:!1,name:void 0,reversed:Is.reversed,scale:Is.scale,tick:Is.tick,tickCount:void 0,ticks:void 0,type:Is.type,unit:void 0,niceTicks:"auto"},fk={allowDataOverflow:Wi.allowDataOverflow,allowDecimals:Wi.allowDecimals,allowDuplicatedCategory:Wi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Wi.radiusAxisId,includeHidden:Wi.includeHidden,name:void 0,reversed:Wi.reversed,scale:Wi.scale,tick:Wi.tick,tickCount:Wi.tickCount,ticks:void 0,type:Wi.type,unit:void 0,niceTicks:"auto"},Ffe=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},xE=ee([Ffe,$B],(e,t)=>{var n;if(e!=null)return e;var r=(n=Rv(t,"angleAxis",ck.type))!==null&&n!==void 0?n:"category";return ug(ug({},ck),{},{type:r})}),Hfe=(e,t)=>e.polarAxis.radiusAxis[t],wE=ee([Hfe,$B],(e,t)=>{var n;if(e!=null)return e;var r=(n=Rv(t,"radiusAxis",fk.type))!==null&&n!==void 0?n:"category";return ug(ug({},fk),{},{type:r})}),Dv=e=>e.polarOptions,SE=ee([fo,ho,Un],pfe),b$=ee([Dv,SE],(e,t)=>{if(e!=null)return ls(e.innerRadius,t,0)}),x$=ee([Dv,SE],(e,t)=>{if(e!=null)return ls(e.outerRadius,t,t*.8)}),qfe=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},w$=ee([Dv],qfe);ee([xE,w$],Mv);var S$=ee([SE,b$,x$],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});ee([wE,S$],Mv);var A$=ee([yt,Dv,b$,x$,fo,ho],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:l,cy:u,startAngle:c,endAngle:d}=t;return{cx:ls(l,i,i/2),cy:ls(u,o,o/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:d,clockWise:!1}}}),wn=(e,t)=>t,kv=(e,t,n)=>n;function AE(e){return e?.id}function E$(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,l=new Map;return e.forEach(u=>{var c,d=(c=u.data)!==null&&c!==void 0?c:r;if(!(d==null||d.length===0)){var m=AE(u);d.forEach((h,y)=>{var b=o==null||i?y:String(on(h,o,null)),w=on(h,u.dataKey,0),A;l.has(b)?A=l.get(b):A={},Object.assign(A,{[m]:w}),l.set(b,A)})}}),Array.from(l.values())}function EE(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Lv=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Iv(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Kfe(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var Sn=e=>{var t=yt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},gc=e=>e.tooltip.settings.axisId;function CE(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(o){function l(){return o.apply(this,arguments)}return l.toString=function(){return o.toString()},l})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var l=i[0],u=i[1];return l<=u?o>=l&&o<=u:o>=u&&o<=l},bandwidth:n?()=>n.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,l)=>{var u=e(o);if(u!=null){if(e.bandwidth&&l!==null&&l!==void 0&&l.position){var c=e.bandwidth();switch(l.position){case"middle":u+=c/2;break;case"end":u+=c;break}}return u}}}}}var Gfe=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!ca(t)){for(var n,r,i=0;i<t.length;i++){var o=t[i];rt(o)&&((n===void 0||o<n)&&(n=o),(r===void 0||o>r)&&(r=o))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function ns(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Yfe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function jE(e){let t,n,r;e.length!==2?(t=ns,n=(u,c)=>ns(e(u),c),r=(u,c)=>e(u)-c):(t=e===ns||e===Yfe?e:Wfe,n=e,r=e);function i(u,c,d=0,m=u.length){if(d<m){if(t(c,c)!==0)return m;do{const h=d+m>>>1;n(u[h],c)<0?d=h+1:m=h}while(d<m)}return d}function o(u,c,d=0,m=u.length){if(d<m){if(t(c,c)!==0)return m;do{const h=d+m>>>1;n(u[h],c)<=0?d=h+1:m=h}while(d<m)}return d}function l(u,c,d=0,m=u.length){const h=i(u,c,d,m-1);return h>d&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:l,right:o}}function Wfe(){return 0}function C$(e){return e===null?NaN:+e}function*Xfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Zfe=jE(ns),Kd=Zfe.right;jE(C$).center;class dk extends Map{constructor(t,n=ede){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(hk(this,t))}has(t){return super.has(hk(this,t))}set(t,n){return super.set(Qfe(this,t),n)}delete(t){return super.delete(Jfe(this,t))}}function hk({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Qfe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Jfe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function ede(e){return e!==null&&typeof e=="object"?e.valueOf():e}function tde(e=ns){if(e===ns)return j$;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function j$(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const nde=Math.sqrt(50),rde=Math.sqrt(10),ide=Math.sqrt(2);function cg(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),l=o>=nde?10:o>=rde?5:o>=ide?2:1;let u,c,d;return i<0?(d=Math.pow(10,-i)/l,u=Math.round(e*d),c=Math.round(t*d),u/d<e&&++u,c/d>t&&--c,d=-d):(d=Math.pow(10,i)*l,u=Math.round(e/d),c=Math.round(t/d),u*d<e&&++u,c*d>t&&--c),c<u&&.5<=n&&n<2?cg(e,t,n*2):[u,c,d]}function aS(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,l]=r?cg(t,e,n):cg(e,t,n);if(!(o>=i))return[];const u=o-i+1,c=new Array(u);if(r)if(l<0)for(let d=0;d<u;++d)c[d]=(o-d)/-l;else for(let d=0;d<u;++d)c[d]=(o-d)*l;else if(l<0)for(let d=0;d<u;++d)c[d]=(i+d)/-l;else for(let d=0;d<u;++d)c[d]=(i+d)*l;return c}function oS(e,t,n){return t=+t,e=+e,n=+n,cg(e,t,n)[2]}function sS(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?oS(t,e,n):oS(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function mk(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function pk(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function T$(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?j$:tde(i);r>n;){if(r-n>600){const c=r-n+1,d=t-n+1,m=Math.log(c),h=.5*Math.exp(2*m/3),y=.5*Math.sqrt(m*h*(c-h)/c)*(d-c/2<0?-1:1),b=Math.max(n,Math.floor(t-d*h/c+y)),w=Math.min(r,Math.floor(t+(c-d)*h/c+y));T$(e,t,b,w,i)}const o=e[t];let l=n,u=r;for(jf(e,n,t),i(e[r],o)>0&&jf(e,n,r);l<u;){for(jf(e,l,u),++l,--u;i(e[l],o)<0;)++l;for(;i(e[u],o)>0;)--u}i(e[n],o)===0?jf(e,n,u):(++u,jf(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function jf(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ade(e,t,n){if(e=Float64Array.from(Xfe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return pk(e);if(t>=1)return mk(e);var r,i=(r-1)*t,o=Math.floor(i),l=mk(T$(e,o).subarray(0,o+1)),u=pk(e.subarray(o+1));return l+(u-l)*(i-o)}}function ode(e,t,n=C$){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),l=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return l+(u-l)*(i-o)}}function sde(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function pi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function mo(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 lS=Symbol("implicit");function TE(){var e=new dk,t=[],n=[],r=lS;function i(o){let l=e.get(o);if(l===void 0){if(r!==lS)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new dk;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return TE(t,n).unknown(r)},pi.apply(i,arguments),i}function OE(){var e=TE().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,l,u=!1,c=0,d=0,m=.5;delete e.unknown;function h(){var y=t().length,b=i<r,w=b?i:r,A=b?r:i;o=(A-w)/Math.max(1,y-c+d*2),u&&(o=Math.floor(o)),w+=(A-w-o*(y-c))*m,l=o*(1-c),u&&(w=Math.round(w),l=Math.round(l));var E=sde(y).map(function(C){return w+o*C});return n(b?E.reverse():E)}return e.domain=function(y){return arguments.length?(t(y),h()):t()},e.range=function(y){return arguments.length?([r,i]=y,r=+r,i=+i,h()):[r,i]},e.rangeRound=function(y){return[r,i]=y,r=+r,i=+i,u=!0,h()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(y){return arguments.length?(u=!!y,h()):u},e.padding=function(y){return arguments.length?(c=Math.min(1,d=+y),h()):c},e.paddingInner=function(y){return arguments.length?(c=Math.min(1,y),h()):c},e.paddingOuter=function(y){return arguments.length?(d=+y,h()):d},e.align=function(y){return arguments.length?(m=Math.max(0,Math.min(1,y)),h()):m},e.copy=function(){return OE(t(),[r,i]).round(u).paddingInner(c).paddingOuter(d).align(m)},pi.apply(h(),arguments)}function O$(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return O$(t())},e}function lde(){return O$(OE.apply(null,arguments).paddingInner(1))}function PE(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function P$(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Gd(){}var bd=.7,fg=1/bd,zu="\\s*([+-]?\\d+)\\s*",xd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",fa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ude=/^#([0-9a-f]{3,8})$/,cde=new RegExp(`^rgb\\(${zu},${zu},${zu}\\)$`),fde=new RegExp(`^rgb\\(${fa},${fa},${fa}\\)$`),dde=new RegExp(`^rgba\\(${zu},${zu},${zu},${xd}\\)$`),hde=new RegExp(`^rgba\\(${fa},${fa},${fa},${xd}\\)$`),mde=new RegExp(`^hsl\\(${xd},${fa},${fa}\\)$`),pde=new RegExp(`^hsla\\(${xd},${fa},${fa},${xd}\\)$`),gk={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};PE(Gd,wd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vk,formatHex:vk,formatHex8:gde,formatHsl:vde,formatRgb:yk,toString:yk});function vk(){return this.rgb().formatHex()}function gde(){return this.rgb().formatHex8()}function vde(){return N$(this).formatHsl()}function yk(){return this.rgb().formatRgb()}function wd(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ude.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?bk(t):n===3?new wr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Fm(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Fm(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=cde.exec(e))?new wr(t[1],t[2],t[3],1):(t=fde.exec(e))?new wr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=dde.exec(e))?Fm(t[1],t[2],t[3],t[4]):(t=hde.exec(e))?Fm(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mde.exec(e))?Sk(t[1],t[2]/100,t[3]/100,1):(t=pde.exec(e))?Sk(t[1],t[2]/100,t[3]/100,t[4]):gk.hasOwnProperty(e)?bk(gk[e]):e==="transparent"?new wr(NaN,NaN,NaN,0):null}function bk(e){return new wr(e>>16&255,e>>8&255,e&255,1)}function Fm(e,t,n,r){return r<=0&&(e=t=n=NaN),new wr(e,t,n,r)}function yde(e){return e instanceof Gd||(e=wd(e)),e?(e=e.rgb(),new wr(e.r,e.g,e.b,e.opacity)):new wr}function uS(e,t,n,r){return arguments.length===1?yde(e):new wr(e,t,n,r??1)}function wr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}PE(wr,uS,P$(Gd,{brighter(e){return e=e==null?fg:Math.pow(fg,e),new wr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bd:Math.pow(bd,e),new wr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wr(sl(this.r),sl(this.g),sl(this.b),dg(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:xk,formatHex:xk,formatHex8:bde,formatRgb:wk,toString:wk}));function xk(){return`#${tl(this.r)}${tl(this.g)}${tl(this.b)}`}function bde(){return`#${tl(this.r)}${tl(this.g)}${tl(this.b)}${tl((isNaN(this.opacity)?1:this.opacity)*255)}`}function wk(){const e=dg(this.opacity);return`${e===1?"rgb(":"rgba("}${sl(this.r)}, ${sl(this.g)}, ${sl(this.b)}${e===1?")":`, ${e})`}`}function dg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tl(e){return e=sl(e),(e<16?"0":"")+e.toString(16)}function Sk(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ti(e,t,n,r)}function N$(e){if(e instanceof Ti)return new Ti(e.h,e.s,e.l,e.opacity);if(e instanceof Gd||(e=wd(e)),!e)return new Ti;if(e instanceof Ti)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,u=o-i,c=(o+i)/2;return u?(t===o?l=(n-r)/u+(n<r)*6:n===o?l=(r-t)/u+2:l=(t-n)/u+4,u/=c<.5?o+i:2-o-i,l*=60):u=c>0&&c<1?0:l,new Ti(l,u,c,e.opacity)}function xde(e,t,n,r){return arguments.length===1?N$(e):new Ti(e,t,n,r??1)}function Ti(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}PE(Ti,xde,P$(Gd,{brighter(e){return e=e==null?fg:Math.pow(fg,e),new Ti(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bd:Math.pow(bd,e),new Ti(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new wr(mw(e>=240?e-240:e+120,i,r),mw(e,i,r),mw(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ti(Ak(this.h),Hm(this.s),Hm(this.l),dg(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=dg(this.opacity);return`${e===1?"hsl(":"hsla("}${Ak(this.h)}, ${Hm(this.s)*100}%, ${Hm(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ak(e){return e=(e||0)%360,e<0?e+360:e}function Hm(e){return Math.max(0,Math.min(1,e||0))}function mw(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const NE=e=>()=>e;function wde(e,t){return function(n){return e+n*t}}function Sde(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Ade(e){return(e=+e)==1?_$:function(t,n){return n-t?Sde(t,n,e):NE(isNaN(t)?n:t)}}function _$(e,t){var n=t-e;return n?wde(e,n):NE(isNaN(e)?t:e)}const Ek=(function e(t){var n=Ade(t);function r(i,o){var l=n((i=uS(i)).r,(o=uS(o)).r),u=n(i.g,o.g),c=n(i.b,o.b),d=_$(i.opacity,o.opacity);return function(m){return i.r=l(m),i.g=u(m),i.b=c(m),i.opacity=d(m),i+""}}return r.gamma=e,r})(1);function Ede(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function Cde(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function jde(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)i[l]=vc(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(u){for(l=0;l<r;++l)o[l]=i[l](u);return o}}function Tde(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function hg(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ode(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=vc(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var cS=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pw=new RegExp(cS.source,"g");function Pde(e){return function(){return e}}function Nde(e){return function(t){return e(t)+""}}function _de(e,t){var n=cS.lastIndex=pw.lastIndex=0,r,i,o,l=-1,u=[],c=[];for(e=e+"",t=t+"";(r=cS.exec(e))&&(i=pw.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),u[l]?u[l]+=o:u[++l]=o),(r=r[0])===(i=i[0])?u[l]?u[l]+=i:u[++l]=i:(u[++l]=null,c.push({i:l,x:hg(r,i)})),n=pw.lastIndex;return n<t.length&&(o=t.slice(n),u[l]?u[l]+=o:u[++l]=o),u.length<2?c[0]?Nde(c[0].x):Pde(t):(t=c.length,function(d){for(var m=0,h;m<t;++m)u[(h=c[m]).i]=h.x(d);return u.join("")})}function vc(e,t){var n=typeof t,r;return t==null||n==="boolean"?NE(t):(n==="number"?hg:n==="string"?(r=wd(t))?(t=r,Ek):_de:t instanceof wd?Ek:t instanceof Date?Tde:Cde(t)?Ede:Array.isArray(t)?jde:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Ode:hg)(e,t)}function _E(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Mde(e,t){t===void 0&&(t=e,e=vc);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(l){var u=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[u](l-u)}}function Rde(e){return function(){return e}}function mg(e){return+e}var Ck=[0,1];function rr(e){return e}function fS(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Rde(isNaN(t)?NaN:.5)}function Dde(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function kde(e,t,n){var r=e[0],i=e[1],o=t[0],l=t[1];return i<r?(r=fS(i,r),o=n(l,o)):(r=fS(r,i),o=n(o,l)),function(u){return o(r(u))}}function Lde(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)i[l]=fS(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(u){var c=Kd(e,u,1,r)-1;return o[c](i[c](u))}}function Yd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function zv(){var e=Ck,t=Ck,n=vc,r,i,o,l=rr,u,c,d;function m(){var y=Math.min(e.length,t.length);return l!==rr&&(l=Dde(e[0],e[y-1])),u=y>2?Lde:kde,c=d=null,h}function h(y){return y==null||isNaN(y=+y)?o:(c||(c=u(e.map(r),t,n)))(r(l(y)))}return h.invert=function(y){return l(i((d||(d=u(t,e.map(r),hg)))(y)))},h.domain=function(y){return arguments.length?(e=Array.from(y,mg),m()):e.slice()},h.range=function(y){return arguments.length?(t=Array.from(y),m()):t.slice()},h.rangeRound=function(y){return t=Array.from(y),n=_E,m()},h.clamp=function(y){return arguments.length?(l=y?!0:rr,m()):l!==rr},h.interpolate=function(y){return arguments.length?(n=y,m()):n},h.unknown=function(y){return arguments.length?(o=y,h):o},function(y,b){return r=y,i=b,m()}}function ME(){return zv()(rr,rr)}function Ide(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function pg(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Xu(e){return e=pg(Math.abs(e)),e?e[1]:NaN}function zde(e,t){return function(n,r){for(var i=n.length,o=[],l=0,u=e[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(n.substring(i-=u,i+u)),!((c+=u+1)>r));)u=e[l=(l+1)%e.length];return o.reverse().join(t)}}function Bde(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var $de=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sd(e){if(!(t=$de.exec(e)))throw new Error("invalid format: "+e);var t;return new RE({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]})}Sd.prototype=RE.prototype;function RE(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+""}RE.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 Ude(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var gg;function Vde(e,t){var n=pg(e,t);if(!n)return gg=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(gg=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+pg(e,Math.max(0,t+o-1))[0]}function jk(e,t){var n=pg(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Tk={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Ide,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)=>jk(e*100,t),r:jk,s:Vde,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ok(e){return e}var Pk=Array.prototype.map,Nk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Fde(e){var t=e.grouping===void 0||e.thousands===void 0?Ok:zde(Pk.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Ok:Bde(Pk.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function d(h,y){h=Sd(h);var b=h.fill,w=h.align,A=h.sign,E=h.symbol,C=h.zero,j=h.width,T=h.comma,O=h.precision,N=h.trim,_=h.type;_==="n"?(T=!0,_="g"):Tk[_]||(O===void 0&&(O=12),N=!0,_="g"),(C||b==="0"&&w==="=")&&(C=!0,b="0",w="=");var M=(y&&y.prefix!==void 0?y.prefix:"")+(E==="$"?n:E==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():""),R=(E==="$"?r:/[%p]/.test(_)?l:"")+(y&&y.suffix!==void 0?y.suffix:""),B=Tk[_],V=/[defgprs%]/.test(_);O=O===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function H(z){var W=M,Q=R,se,L,F;if(_==="c")Q=B(z)+Q,z="";else{z=+z;var $=z<0||1/z<0;if(z=isNaN(z)?c:B(Math.abs(z),O),N&&(z=Ude(z)),$&&+z==0&&A!=="+"&&($=!1),W=($?A==="("?A:u:A==="-"||A==="("?"":A)+W,Q=(_==="s"&&!isNaN(z)&&gg!==void 0?Nk[8+gg/3]:"")+Q+($&&A==="("?")":""),V){for(se=-1,L=z.length;++se<L;)if(F=z.charCodeAt(se),48>F||F>57){Q=(F===46?i+z.slice(se+1):z.slice(se))+Q,z=z.slice(0,se);break}}}T&&!C&&(z=t(z,1/0));var ae=W.length+z.length+Q.length,G=ae<j?new Array(j-ae+1).join(b):"";switch(T&&C&&(z=t(G+z,G.length?j-Q.length:1/0),G=""),w){case"<":z=W+z+Q+G;break;case"=":z=W+G+z+Q;break;case"^":z=G.slice(0,ae=G.length>>1)+W+z+Q+G.slice(ae);break;default:z=G+W+z+Q;break}return o(z)}return H.toString=function(){return h+""},H}function m(h,y){var b=Math.max(-8,Math.min(8,Math.floor(Xu(y)/3)))*3,w=Math.pow(10,-b),A=d((h=Sd(h),h.type="f",h),{suffix:Nk[8+b/3]});return function(E){return A(w*E)}}return{format:d,formatPrefix:m}}var qm,DE,M$;Hde({thousands:",",grouping:[3],currency:["$",""]});function Hde(e){return qm=Fde(e),DE=qm.format,M$=qm.formatPrefix,qm}function qde(e){return Math.max(0,-Xu(Math.abs(e)))}function Kde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Xu(t)/3)))*3-Xu(Math.abs(e)))}function Gde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Xu(t)-Xu(e))+1}function R$(e,t,n,r){var i=sS(e,t,n),o;switch(r=Sd(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Kde(i,l))&&(r.precision=o),M$(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Gde(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=qde(i))&&(r.precision=o-(r.type==="%")*2);break}}return DE(r)}function ms(e){var t=e.domain;return e.ticks=function(n){var r=t();return aS(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return R$(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,l=r[i],u=r[o],c,d,m=10;for(u<l&&(d=l,l=u,u=d,d=i,i=o,o=d);m-- >0;){if(d=oS(l,u,n),d===c)return r[i]=l,r[o]=u,t(r);if(d>0)l=Math.floor(l/d)*d,u=Math.ceil(u/d)*d;else if(d<0)l=Math.ceil(l*d)/d,u=Math.floor(u*d)/d;else break;c=d}return e},e}function D$(){var e=ME();return e.copy=function(){return Yd(e,D$())},pi.apply(e,arguments),ms(e)}function k$(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,mg),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return k$(e).unknown(t)},e=arguments.length?Array.from(e,mg):[0,1],ms(n)}function L$(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],l;return o<i&&(l=n,n=r,r=l,l=i,i=o,o=l),e[n]=t.floor(i),e[r]=t.ceil(o),e}function _k(e){return Math.log(e)}function Mk(e){return Math.exp(e)}function Yde(e){return-Math.log(-e)}function Wde(e){return-Math.exp(-e)}function Xde(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Zde(e){return e===10?Xde:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Qde(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 Rk(e){return(t,n)=>-e(-t,n)}function kE(e){const t=e(_k,Mk),n=t.domain;let r=10,i,o;function l(){return i=Qde(r),o=Zde(r),n()[0]<0?(i=Rk(i),o=Rk(o),e(Yde,Wde)):e(_k,Mk),t}return t.base=function(u){return arguments.length?(r=+u,l()):r},t.domain=function(u){return arguments.length?(n(u),l()):n()},t.ticks=u=>{const c=n();let d=c[0],m=c[c.length-1];const h=m<d;h&&([d,m]=[m,d]);let y=i(d),b=i(m),w,A;const E=u==null?10:+u;let C=[];if(!(r%1)&&b-y<E){if(y=Math.floor(y),b=Math.ceil(b),d>0){for(;y<=b;++y)for(w=1;w<r;++w)if(A=y<0?w/o(-y):w*o(y),!(A<d)){if(A>m)break;C.push(A)}}else for(;y<=b;++y)for(w=r-1;w>=1;--w)if(A=y>0?w/o(-y):w*o(y),!(A<d)){if(A>m)break;C.push(A)}C.length*2<E&&(C=aS(d,m,E))}else C=aS(y,b,Math.min(b-y,E)).map(o);return h?C.reverse():C},t.tickFormat=(u,c)=>{if(u==null&&(u=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Sd(c)).precision==null&&(c.trim=!0),c=DE(c)),u===1/0)return c;const d=Math.max(1,r*u/t.ticks().length);return m=>{let h=m/o(Math.round(i(m)));return h*r<r-.5&&(h*=r),h<=d?c(m):""}},t.nice=()=>n(L$(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function I$(){const e=kE(zv()).domain([1,10]);return e.copy=()=>Yd(e,I$()).base(e.base()),pi.apply(e,arguments),e}function Dk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function kk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function LE(e){var t=1,n=e(Dk(t),kk(t));return n.constant=function(r){return arguments.length?e(Dk(t=+r),kk(t)):t},ms(n)}function z$(){var e=LE(zv());return e.copy=function(){return Yd(e,z$()).constant(e.constant())},pi.apply(e,arguments)}function Lk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Jde(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ehe(e){return e<0?-e*e:e*e}function IE(e){var t=e(rr,rr),n=1;function r(){return n===1?e(rr,rr):n===.5?e(Jde,ehe):e(Lk(n),Lk(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ms(t)}function zE(){var e=IE(zv());return e.copy=function(){return Yd(e,zE()).exponent(e.exponent())},pi.apply(e,arguments),e}function the(){return zE.apply(null,arguments).exponent(.5)}function Ik(e){return Math.sign(e)*e*e}function nhe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function B$(){var e=ME(),t=[0,1],n=!1,r;function i(o){var l=nhe(e(o));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(o){return e.invert(Ik(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,mg)).map(Ik)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return B$(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},pi.apply(i,arguments),ms(i)}function $$(){var e=[],t=[],n=[],r;function i(){var l=0,u=Math.max(1,t.length);for(n=new Array(u-1);++l<u;)n[l-1]=ode(e,l/u);return o}function o(l){return l==null||isNaN(l=+l)?r:t[Kd(n,l)]}return o.invertExtent=function(l){var u=t.indexOf(l);return u<0?[NaN,NaN]:[u>0?n[u-1]:e[0],u<n.length?n[u]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let u of l)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(ns),i()},o.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return $$().domain(e).range(t).unknown(r)},pi.apply(o,arguments)}function U$(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function l(c){return c!=null&&c<=c?i[Kd(r,c,0,n)]:o}function u(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return l}return l.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,u()):[e,t]},l.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,u()):i.slice()},l.invertExtent=function(c){var d=i.indexOf(c);return d<0?[NaN,NaN]:d<1?[e,r[0]]:d>=n?[r[n-1],t]:[r[d-1],r[d]]},l.unknown=function(c){return arguments.length&&(o=c),l},l.thresholds=function(){return r.slice()},l.copy=function(){return U$().domain([e,t]).range(i).unknown(o)},pi.apply(ms(l),arguments)}function V$(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Kd(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return V$().domain(e).range(t).unknown(n)},pi.apply(i,arguments)}const gw=new Date,vw=new Date;function vn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const l=i(o),u=i.ceil(o);return o-l<u-o?l:u},i.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),i.range=(o,l,u)=>{const c=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<l)||!(u>0))return c;let d;do c.push(d=new Date(+o)),t(o,u),e(o);while(d<o&&o<l);return c},i.filter=o=>vn(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,u)=>{if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!o(l););else for(;--u>=0;)for(;t(l,1),!o(l););}),n&&(i.count=(o,l)=>(gw.setTime(+o),vw.setTime(+l),e(gw),e(vw),Math.floor(n(gw,vw))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?l=>r(l)%o===0:l=>i.count(0,l)%o===0):i)),i}const vg=vn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);vg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?vn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):vg);vg.range;const Wa=1e3,ci=Wa*60,Xa=ci*60,lo=Xa*24,BE=lo*7,zk=lo*30,yw=lo*365,nl=vn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Wa)},(e,t)=>(t-e)/Wa,e=>e.getUTCSeconds());nl.range;const $E=vn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wa)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getMinutes());$E.range;const UE=vn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getUTCMinutes());UE.range;const VE=vn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wa-e.getMinutes()*ci)},(e,t)=>{e.setTime(+e+t*Xa)},(e,t)=>(t-e)/Xa,e=>e.getHours());VE.range;const FE=vn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Xa)},(e,t)=>(t-e)/Xa,e=>e.getUTCHours());FE.range;const Wd=vn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ci)/lo,e=>e.getDate()-1);Wd.range;const Bv=vn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>e.getUTCDate()-1);Bv.range;const F$=vn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>Math.floor(e/lo));F$.range;function Ol(e){return vn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ci)/BE)}const $v=Ol(0),yg=Ol(1),rhe=Ol(2),ihe=Ol(3),Zu=Ol(4),ahe=Ol(5),ohe=Ol(6);$v.range;yg.range;rhe.range;ihe.range;Zu.range;ahe.range;ohe.range;function Pl(e){return vn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/BE)}const Uv=Pl(0),bg=Pl(1),she=Pl(2),lhe=Pl(3),Qu=Pl(4),uhe=Pl(5),che=Pl(6);Uv.range;bg.range;she.range;lhe.range;Qu.range;uhe.range;che.range;const HE=vn(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());HE.range;const qE=vn(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());qE.range;const uo=vn(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());uo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:vn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});uo.range;const co=vn(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());co.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:vn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});co.range;function H$(e,t,n,r,i,o){const l=[[nl,1,Wa],[nl,5,5*Wa],[nl,15,15*Wa],[nl,30,30*Wa],[o,1,ci],[o,5,5*ci],[o,15,15*ci],[o,30,30*ci],[i,1,Xa],[i,3,3*Xa],[i,6,6*Xa],[i,12,12*Xa],[r,1,lo],[r,2,2*lo],[n,1,BE],[t,1,zk],[t,3,3*zk],[e,1,yw]];function u(d,m,h){const y=m<d;y&&([d,m]=[m,d]);const b=h&&typeof h.range=="function"?h:c(d,m,h),w=b?b.range(d,+m+1):[];return y?w.reverse():w}function c(d,m,h){const y=Math.abs(m-d)/h,b=jE(([,,E])=>E).right(l,y);if(b===l.length)return e.every(sS(d/yw,m/yw,h));if(b===0)return vg.every(Math.max(sS(d,m,h),1));const[w,A]=l[y/l[b-1][2]<l[b][2]/y?b-1:b];return w.every(A)}return[u,c]}const[fhe,dhe]=H$(co,qE,Uv,F$,FE,UE),[hhe,mhe]=H$(uo,HE,$v,Wd,VE,$E);function bw(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 xw(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 Tf(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function phe(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,l=e.shortDays,u=e.months,c=e.shortMonths,d=Of(i),m=Pf(i),h=Of(o),y=Pf(o),b=Of(l),w=Pf(l),A=Of(u),E=Pf(u),C=Of(c),j=Pf(c),T={a:F,A:$,b:ae,B:G,c:null,d:Hk,e:Hk,f:zhe,g:Yhe,G:Xhe,H:khe,I:Lhe,j:Ihe,L:q$,m:Bhe,M:$he,p:k,q:I,Q:Gk,s:Yk,S:Uhe,u:Vhe,U:Fhe,V:Hhe,w:qhe,W:Khe,x:null,X:null,y:Ghe,Y:Whe,Z:Zhe,"%":Kk},O={a:q,A:ne,b:de,B:pe,c:null,d:qk,e:qk,f:tme,g:fme,G:hme,H:Qhe,I:Jhe,j:eme,L:G$,m:nme,M:rme,p:X,q:he,Q:Gk,s:Yk,S:ime,u:ame,U:ome,V:sme,w:lme,W:ume,x:null,X:null,y:cme,Y:dme,Z:mme,"%":Kk},N={a:V,A:H,b:z,B:W,c:Q,d:Vk,e:Vk,f:_he,g:Uk,G:$k,H:Fk,I:Fk,j:The,L:Nhe,m:jhe,M:Ohe,p:B,q:Che,Q:Rhe,s:Dhe,S:Phe,u:xhe,U:whe,V:She,w:bhe,W:Ahe,x:se,X:L,y:Uk,Y:$k,Z:Ehe,"%":Mhe};T.x=_(n,T),T.X=_(r,T),T.c=_(t,T),O.x=_(n,O),O.X=_(r,O),O.c=_(t,O);function _(oe,le){return function(ve){var re=[],Be=-1,Pe=0,Fe=oe.length,De,Rt,qr;for(ve instanceof Date||(ve=new Date(+ve));++Be<Fe;)oe.charCodeAt(Be)===37&&(re.push(oe.slice(Pe,Be)),(Rt=Bk[De=oe.charAt(++Be)])!=null?De=oe.charAt(++Be):Rt=De==="e"?" ":"0",(qr=le[De])&&(De=qr(ve,Rt)),re.push(De),Pe=Be+1);return re.push(oe.slice(Pe,Be)),re.join("")}}function M(oe,le){return function(ve){var re=Tf(1900,void 0,1),Be=R(re,oe,ve+="",0),Pe,Fe;if(Be!=ve.length)return null;if("Q"in re)return new Date(re.Q);if("s"in re)return new Date(re.s*1e3+("L"in re?re.L:0));if(le&&!("Z"in re)&&(re.Z=0),"p"in re&&(re.H=re.H%12+re.p*12),re.m===void 0&&(re.m="q"in re?re.q:0),"V"in re){if(re.V<1||re.V>53)return null;"w"in re||(re.w=1),"Z"in re?(Pe=xw(Tf(re.y,0,1)),Fe=Pe.getUTCDay(),Pe=Fe>4||Fe===0?bg.ceil(Pe):bg(Pe),Pe=Bv.offset(Pe,(re.V-1)*7),re.y=Pe.getUTCFullYear(),re.m=Pe.getUTCMonth(),re.d=Pe.getUTCDate()+(re.w+6)%7):(Pe=bw(Tf(re.y,0,1)),Fe=Pe.getDay(),Pe=Fe>4||Fe===0?yg.ceil(Pe):yg(Pe),Pe=Wd.offset(Pe,(re.V-1)*7),re.y=Pe.getFullYear(),re.m=Pe.getMonth(),re.d=Pe.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),Fe="Z"in re?xw(Tf(re.y,0,1)).getUTCDay():bw(Tf(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(Fe+5)%7:re.w+re.U*7-(Fe+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,xw(re)):bw(re)}}function R(oe,le,ve,re){for(var Be=0,Pe=le.length,Fe=ve.length,De,Rt;Be<Pe;){if(re>=Fe)return-1;if(De=le.charCodeAt(Be++),De===37){if(De=le.charAt(Be++),Rt=N[De in Bk?le.charAt(Be++):De],!Rt||(re=Rt(oe,ve,re))<0)return-1}else if(De!=ve.charCodeAt(re++))return-1}return re}function B(oe,le,ve){var re=d.exec(le.slice(ve));return re?(oe.p=m.get(re[0].toLowerCase()),ve+re[0].length):-1}function V(oe,le,ve){var re=b.exec(le.slice(ve));return re?(oe.w=w.get(re[0].toLowerCase()),ve+re[0].length):-1}function H(oe,le,ve){var re=h.exec(le.slice(ve));return re?(oe.w=y.get(re[0].toLowerCase()),ve+re[0].length):-1}function z(oe,le,ve){var re=C.exec(le.slice(ve));return re?(oe.m=j.get(re[0].toLowerCase()),ve+re[0].length):-1}function W(oe,le,ve){var re=A.exec(le.slice(ve));return re?(oe.m=E.get(re[0].toLowerCase()),ve+re[0].length):-1}function Q(oe,le,ve){return R(oe,t,le,ve)}function se(oe,le,ve){return R(oe,n,le,ve)}function L(oe,le,ve){return R(oe,r,le,ve)}function F(oe){return l[oe.getDay()]}function $(oe){return o[oe.getDay()]}function ae(oe){return c[oe.getMonth()]}function G(oe){return u[oe.getMonth()]}function k(oe){return i[+(oe.getHours()>=12)]}function I(oe){return 1+~~(oe.getMonth()/3)}function q(oe){return l[oe.getUTCDay()]}function ne(oe){return o[oe.getUTCDay()]}function de(oe){return c[oe.getUTCMonth()]}function pe(oe){return u[oe.getUTCMonth()]}function X(oe){return i[+(oe.getUTCHours()>=12)]}function he(oe){return 1+~~(oe.getUTCMonth()/3)}return{format:function(oe){var le=_(oe+="",T);return le.toString=function(){return oe},le},parse:function(oe){var le=M(oe+="",!1);return le.toString=function(){return oe},le},utcFormat:function(oe){var le=_(oe+="",O);return le.toString=function(){return oe},le},utcParse:function(oe){var le=M(oe+="",!0);return le.toString=function(){return oe},le}}}var Bk={"-":"",_:" ",0:"0"},An=/^\s*\d+/,ghe=/^%/,vhe=/[\\^$*+?|[\]().{}]/g;function it(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function yhe(e){return e.replace(vhe,"\\$&")}function Of(e){return new RegExp("^(?:"+e.map(yhe).join("|")+")","i")}function Pf(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function bhe(e,t,n){var r=An.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function xhe(e,t,n){var r=An.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function whe(e,t,n){var r=An.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function She(e,t,n){var r=An.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ahe(e,t,n){var r=An.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function $k(e,t,n){var r=An.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Uk(e,t,n){var r=An.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ehe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Che(e,t,n){var r=An.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function jhe(e,t,n){var r=An.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Vk(e,t,n){var r=An.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function The(e,t,n){var r=An.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Fk(e,t,n){var r=An.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Ohe(e,t,n){var r=An.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Phe(e,t,n){var r=An.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Nhe(e,t,n){var r=An.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function _he(e,t,n){var r=An.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Mhe(e,t,n){var r=ghe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Rhe(e,t,n){var r=An.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Dhe(e,t,n){var r=An.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Hk(e,t){return it(e.getDate(),t,2)}function khe(e,t){return it(e.getHours(),t,2)}function Lhe(e,t){return it(e.getHours()%12||12,t,2)}function Ihe(e,t){return it(1+Wd.count(uo(e),e),t,3)}function q$(e,t){return it(e.getMilliseconds(),t,3)}function zhe(e,t){return q$(e,t)+"000"}function Bhe(e,t){return it(e.getMonth()+1,t,2)}function $he(e,t){return it(e.getMinutes(),t,2)}function Uhe(e,t){return it(e.getSeconds(),t,2)}function Vhe(e){var t=e.getDay();return t===0?7:t}function Fhe(e,t){return it($v.count(uo(e)-1,e),t,2)}function K$(e){var t=e.getDay();return t>=4||t===0?Zu(e):Zu.ceil(e)}function Hhe(e,t){return e=K$(e),it(Zu.count(uo(e),e)+(uo(e).getDay()===4),t,2)}function qhe(e){return e.getDay()}function Khe(e,t){return it(yg.count(uo(e)-1,e),t,2)}function Ghe(e,t){return it(e.getFullYear()%100,t,2)}function Yhe(e,t){return e=K$(e),it(e.getFullYear()%100,t,2)}function Whe(e,t){return it(e.getFullYear()%1e4,t,4)}function Xhe(e,t){var n=e.getDay();return e=n>=4||n===0?Zu(e):Zu.ceil(e),it(e.getFullYear()%1e4,t,4)}function Zhe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+it(t/60|0,"0",2)+it(t%60,"0",2)}function qk(e,t){return it(e.getUTCDate(),t,2)}function Qhe(e,t){return it(e.getUTCHours(),t,2)}function Jhe(e,t){return it(e.getUTCHours()%12||12,t,2)}function eme(e,t){return it(1+Bv.count(co(e),e),t,3)}function G$(e,t){return it(e.getUTCMilliseconds(),t,3)}function tme(e,t){return G$(e,t)+"000"}function nme(e,t){return it(e.getUTCMonth()+1,t,2)}function rme(e,t){return it(e.getUTCMinutes(),t,2)}function ime(e,t){return it(e.getUTCSeconds(),t,2)}function ame(e){var t=e.getUTCDay();return t===0?7:t}function ome(e,t){return it(Uv.count(co(e)-1,e),t,2)}function Y$(e){var t=e.getUTCDay();return t>=4||t===0?Qu(e):Qu.ceil(e)}function sme(e,t){return e=Y$(e),it(Qu.count(co(e),e)+(co(e).getUTCDay()===4),t,2)}function lme(e){return e.getUTCDay()}function ume(e,t){return it(bg.count(co(e)-1,e),t,2)}function cme(e,t){return it(e.getUTCFullYear()%100,t,2)}function fme(e,t){return e=Y$(e),it(e.getUTCFullYear()%100,t,2)}function dme(e,t){return it(e.getUTCFullYear()%1e4,t,4)}function hme(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Qu(e):Qu.ceil(e),it(e.getUTCFullYear()%1e4,t,4)}function mme(){return"+0000"}function Kk(){return"%"}function Gk(e){return+e}function Yk(e){return Math.floor(+e/1e3)}var bu,W$,X$;pme({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 pme(e){return bu=phe(e),W$=bu.format,bu.parse,X$=bu.utcFormat,bu.utcParse,bu}function gme(e){return new Date(e)}function vme(e){return e instanceof Date?+e:+new Date(+e)}function KE(e,t,n,r,i,o,l,u,c,d){var m=ME(),h=m.invert,y=m.domain,b=d(".%L"),w=d(":%S"),A=d("%I:%M"),E=d("%I %p"),C=d("%a %d"),j=d("%b %d"),T=d("%B"),O=d("%Y");function N(_){return(c(_)<_?b:u(_)<_?w:l(_)<_?A:o(_)<_?E:r(_)<_?i(_)<_?C:j:n(_)<_?T:O)(_)}return m.invert=function(_){return new Date(h(_))},m.domain=function(_){return arguments.length?y(Array.from(_,vme)):y().map(gme)},m.ticks=function(_){var M=y();return e(M[0],M[M.length-1],_??10)},m.tickFormat=function(_,M){return M==null?N:d(M)},m.nice=function(_){var M=y();return(!_||typeof _.range!="function")&&(_=t(M[0],M[M.length-1],_??10)),_?y(L$(M,_)):m},m.copy=function(){return Yd(m,KE(e,t,n,r,i,o,l,u,c,d))},m}function yme(){return pi.apply(KE(hhe,mhe,uo,HE,$v,Wd,VE,$E,nl,W$).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function bme(){return pi.apply(KE(fhe,dhe,co,qE,Uv,Bv,FE,UE,nl,X$).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Vv(){var e=0,t=1,n,r,i,o,l=rr,u=!1,c;function d(h){return h==null||isNaN(h=+h)?c:l(i===0?.5:(h=(o(h)-n)*i,u?Math.max(0,Math.min(1,h)):h))}d.domain=function(h){return arguments.length?([e,t]=h,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),d):[e,t]},d.clamp=function(h){return arguments.length?(u=!!h,d):u},d.interpolator=function(h){return arguments.length?(l=h,d):l};function m(h){return function(y){var b,w;return arguments.length?([b,w]=y,l=h(b,w),d):[l(0),l(1)]}}return d.range=m(vc),d.rangeRound=m(_E),d.unknown=function(h){return arguments.length?(c=h,d):c},function(h){return o=h,n=h(e),r=h(t),i=n===r?0:1/(r-n),d}}function ps(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Z$(){var e=ms(Vv()(rr));return e.copy=function(){return ps(e,Z$())},mo.apply(e,arguments)}function Q$(){var e=kE(Vv()).domain([1,10]);return e.copy=function(){return ps(e,Q$()).base(e.base())},mo.apply(e,arguments)}function J$(){var e=LE(Vv());return e.copy=function(){return ps(e,J$()).constant(e.constant())},mo.apply(e,arguments)}function GE(){var e=IE(Vv());return e.copy=function(){return ps(e,GE()).exponent(e.exponent())},mo.apply(e,arguments)}function xme(){return GE.apply(null,arguments).exponent(.5)}function eU(){var e=[],t=rr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Kd(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ns),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>ade(e,o/r))},n.copy=function(){return eU(t).domain(e)},mo.apply(n,arguments)}function Fv(){var e=0,t=.5,n=1,r=1,i,o,l,u,c,d=rr,m,h=!1,y;function b(A){return isNaN(A=+A)?y:(A=.5+((A=+m(A))-o)*(r*A<r*o?u:c),d(h?Math.max(0,Math.min(1,A)):A))}b.domain=function(A){return arguments.length?([e,t,n]=A,i=m(e=+e),o=m(t=+t),l=m(n=+n),u=i===o?0:.5/(o-i),c=o===l?0:.5/(l-o),r=o<i?-1:1,b):[e,t,n]},b.clamp=function(A){return arguments.length?(h=!!A,b):h},b.interpolator=function(A){return arguments.length?(d=A,b):d};function w(A){return function(E){var C,j,T;return arguments.length?([C,j,T]=E,d=Mde(A,[C,j,T]),b):[d(0),d(.5),d(1)]}}return b.range=w(vc),b.rangeRound=w(_E),b.unknown=function(A){return arguments.length?(y=A,b):y},function(A){return m=A,i=A(e),o=A(t),l=A(n),u=i===o?0:.5/(o-i),c=o===l?0:.5/(l-o),r=o<i?-1:1,b}}function tU(){var e=ms(Fv()(rr));return e.copy=function(){return ps(e,tU())},mo.apply(e,arguments)}function nU(){var e=kE(Fv()).domain([.1,1,10]);return e.copy=function(){return ps(e,nU()).base(e.base())},mo.apply(e,arguments)}function rU(){var e=LE(Fv());return e.copy=function(){return ps(e,rU()).constant(e.constant())},mo.apply(e,arguments)}function YE(){var e=IE(Fv());return e.copy=function(){return ps(e,YE()).exponent(e.exponent())},mo.apply(e,arguments)}function wme(){return YE.apply(null,arguments).exponent(.5)}const iU=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:OE,scaleDiverging:tU,scaleDivergingLog:nU,scaleDivergingPow:YE,scaleDivergingSqrt:wme,scaleDivergingSymlog:rU,scaleIdentity:k$,scaleImplicit:lS,scaleLinear:D$,scaleLog:I$,scaleOrdinal:TE,scalePoint:lde,scalePow:zE,scaleQuantile:$$,scaleQuantize:U$,scaleRadial:B$,scaleSequential:Z$,scaleSequentialLog:Q$,scaleSequentialPow:GE,scaleSequentialQuantile:eU,scaleSequentialSqrt:xme,scaleSequentialSymlog:J$,scaleSqrt:the,scaleSymlog:z$,scaleThreshold:V$,scaleTime:yme,scaleUtc:bme,tickFormat:R$},Symbol.toStringTag,{value:"Module"}));function Sme(e){var t=iU;if(e in t&&typeof t[e]=="function")return t[e]();var n="scale".concat(zd(e));if(n in t&&typeof t[n]=="function")return t[n]()}function Wk(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=Sme(e);if(r!=null)return r.domain(t).range(n),r}}function WE(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?Wk(e.scale,n,r):Wk(t,n,r)}function Ame(e){return"scale".concat(zd(e))}function Eme(e){return Ame(e)in iU}var aU=(e,t,n)=>{if(e!=null){var{scale:r,type:i}=e;if(r==="auto")return i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof r=="string")return Eme(r)?r:"point"}};function Cme(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var o=Math.floor((n+r)/2);(i?e[o]<t:e[o]>t)?n=o+1:r=o}return n}function oU(e,t){if(e){var n=t??e.domain(),r=n.map(o=>{var l;return(l=e(o))!==null&&l!==void 0?l:0}),i=e.range();if(!(n.length===0||i.length<2))return o=>{var l,u,c=Cme(r,o);if(c<=0)return n[0];if(c>=n.length)return n[n.length-1];var d=(l=r[c-1])!==null&&l!==void 0?l:0,m=(u=r[c])!==null&&u!==void 0?u:0;return Math.abs(o-d)<=Math.abs(o-m)?n[c-1]:n[c]}}}function jme(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):oU(e,void 0)}function Xk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xk(Object(n),!0).forEach(function(r){Tme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tme(e,t,n){return(t=Ome(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ome(e){var t=Pme(e,"string");return typeof t=="symbol"?t:t+""}function Pme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dS=[0,"auto"],fn={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"},sU=(e,t)=>e.cartesianAxis.xAxis[t],po=(e,t)=>{var n=sU(e,t);return n??fn},dn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:dS,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:Ud},lU=(e,t)=>e.cartesianAxis.yAxis[t],go=(e,t)=>{var n=lU(e,t);return n??dn},Nme={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:""},XE=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??Nme},sr=(e,t,n)=>{switch(t){case"xAxis":return po(e,n);case"yAxis":return go(e,n);case"zAxis":return XE(e,n);case"angleAxis":return xE(e,n);case"radiusAxis":return wE(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},_me=(e,t,n)=>{switch(t){case"xAxis":return po(e,n);case"yAxis":return go(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Xd=(e,t,n)=>{switch(t){case"xAxis":return po(e,n);case"yAxis":return go(e,n);case"angleAxis":return xE(e,n);case"radiusAxis":return wE(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},uU=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function cU(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var ZE=e=>e.graphicalItems.cartesianItems,Mme=ee([wn,kv],cU),fU=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),yc=ee([ZE,sr,Mme],fU,{memoizeOptions:{resultEqualityCheck:Iv}}),dU=ee([yc],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(EE)),hU=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),Rme=ee([yc],hU),mU=e=>e.map(t=>t.data).filter(Boolean).flat(1),Dme=ee([yc],e=>e.some(t=>!t.data)),pU=ee([yc],mU,{memoizeOptions:{resultEqualityCheck:Iv}}),gU=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},QE=ee([pU,qd],gU),kme=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:on(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:on(i,r)}))):e.map(r=>({value:r})),vU=(e,t,n,r,i,o)=>{var{chartData:l=[],dataStartIndex:u,dataEndIndex:c}=r,d=kme(e,t,n);if(i&&t?.dataKey!=null&&o.length>0){var m=l.slice(u,c+1),h=m.map(y=>({value:on(y,t.dataKey)})).filter(y=>y.value!=null);return[...h,...d]}return d},Zd=ee([QE,sr,yc,qd,Dme,pU],vU);function Bu(e){if(ma(e)||e instanceof Date){var t=Number(e);if(rt(t))return t}}function Zk(e){if(Array.isArray(e)){var t=[Bu(e[0]),Bu(e[1])];return ca(t)?t:void 0}var n=Bu(e);if(n!=null)return[n,n]}function ga(e){return e.map(Bu).filter(na)}function Lme(e,t){var n=Bu(e),r=Bu(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var Ime=ee([Zd],e=>e?.map(t=>t.value).sort(Lme));function yU(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function zme(e,t,n){if(!n)return[];if(!n.length)return[];var r;if(typeof t=="number"&&!ha(t))r=t;else if(Array.isArray(t)){var i=ga(t);i.length>0&&(r=Math.max(...i))}return r==null?[]:ga(n.flatMap(o=>{var l=on(e,o.dataKey),u,c;if(Array.isArray(l)?[u,c]=l:u=c=l,!(!rt(u)||!rt(c)))return[r-u,r+c]}))}var yn=e=>{var t=Sn(e),n=gc(e);return Xd(e,t,n)},Ju=ee([yn],e=>e?.dataKey),Bme=ee([dU,qd,yn],E$),bU=(e,t,n,r)=>{var i={},o=t.reduce((l,u)=>{if(u.stackId==null)return l;var c=l[u.stackId];return c==null&&(c=[]),c.push(u),l[u.stackId]=c,l},i);return Object.fromEntries(Object.entries(o).map(l=>{var[u,c]=l,d=r?[...c].reverse():c,m=d.map(AE);return[u,{stackedData:xle(e,m,n),graphicalItems:d}]}))},xU=ee([Bme,dU,_v,v$],bU),wU=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(r==null&&n!=="zAxis"){var l=Ele(e,i,o);if(!(l!=null&&l[0]===0&&l[1]===0))return l}},$me=ee([sr],e=>e.allowDataOverflow),JE=e=>{var t;if(e==null||!("domain"in e))return dS;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=ga(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:dS},SU=ee([sr],JE),AU=ee([SU,$me],o$),Ume=ee([xU,zi,wn,AU],wU,{memoizeOptions:{resultEqualityCheck:Lv}}),eC=e=>e.errorBars,Vme=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>yU(n,r)),wg=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),l=Math.min(...o),u=Math.max(...o);return[l,u]}},EU=function(t,n,r,i,o){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],u,c;if(r.length>0&&r.forEach(d=>{var m,h=d.data!=null?[...d.data]:l,y=(m=i[d.id])===null||m===void 0?void 0:m.filter(b=>yU(o,b));h.forEach(b=>{var w,A=on(b,(w=n.dataKey)!==null&&w!==void 0?w:d.dataKey),E=zme(b,A,y);if(E.length>=2){var C=Math.min(...E),j=Math.max(...E);(u==null||C<u)&&(u=C),(c==null||j>c)&&(c=j)}var T=Zk(A);T!=null&&(u=u==null?T[0]:Math.min(u,T[0]),c=c==null?T[1]:Math.max(c,T[1]))})}),n?.dataKey!=null&&r.length===0&&t.forEach(d=>{var m=Zk(on(d,n.dataKey));m!=null&&(u=u==null?m[0]:Math.min(u,m[0]),c=c==null?m[1]:Math.max(c,m[1]))}),rt(u)&&rt(c))return[u,c]},Fme=ee([QE,sr,Rme,eC,wn,_fe],EU,{memoizeOptions:{resultEqualityCheck:Lv}});function Hme(e){var{value:t}=e;if(ma(t)||t instanceof Date)return t}var qme=(e,t,n)=>{var r=e.map(Hme).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&k4(r))?a$(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},CU=e=>e.referenceElements.dots,bc=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),Kme=ee([CU,wn,kv],bc),jU=e=>e.referenceElements.areas,Gme=ee([jU,wn,kv],bc),TU=e=>e.referenceElements.lines,Yme=ee([TU,wn,kv],bc),OU=(e,t)=>{if(e!=null){var n=ga(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Wme=ee(Kme,wn,OU),PU=(e,t)=>{if(e!=null){var n=ga(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Xme=ee([Gme,wn],PU);function Zme(e){var t;if(e.x!=null)return ga([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:ga(n)}function Qme(e){var t;if(e.y!=null)return ga([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:ga(n)}var NU=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?Zme(r):Qme(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Jme=ee([Yme,wn],NU),epe=ee(Wme,Jme,Xme,(e,t,n)=>wg(e,n,t)),_U=(e,t,n,r,i,o,l,u)=>{if(n!=null)return n;var c=l==="vertical"&&u==="xAxis"||l==="horizontal"&&u==="yAxis",d=c?wg(r,o,i):wg(o,i);return Rfe(t,d,e.allowDataOverflow)},tpe=ee([sr,SU,AU,Ume,Fme,epe,yt,wn],_U,{memoizeOptions:{resultEqualityCheck:Lv}}),npe=[0,1],MU=(e,t,n,r,i,o,l)=>{if(!((e==null||n==null||n.length===0)&&l===void 0)){var{dataKey:u,type:c}=e,d=Ii(t,o);if(d&&u==null){var m;return a$(0,(m=n?.length)!==null&&m!==void 0?m:0)}return c==="category"?qme(r,e,d):i==="expand"&&!d?npe:l}},tC=ee([sr,yt,QE,Zd,_v,wn,tpe],MU),xc=ee([sr,uU,vE],aU),RU=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var i=JE(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&ca(e)){if(o)return sk(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return lk(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(o&&ca(e))return sk(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&ca(e))return lk(e,t.tickCount,t.allowDecimals,"adaptive")}}},nC=ee([tC,Xd,xc],RU),DU=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&ca(t)&&Array.isArray(n)&&n.length>0){var i,o,l=t[0],u=(i=n[0])!==null&&i!==void 0?i:0,c=t[1],d=(o=n[n.length-1])!==null&&o!==void 0?o:0;return[Math.min(l,u),Math.max(c,d)]}return t},rpe=ee([sr,tC,nC,wn],DU),ipe=ee(Zd,sr,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(ga(e.map(h=>h.value))).sort((h,y)=>h-y),i=r[0],o=r[r.length-1];if(i==null||o==null)return 1/0;var l=o-i;if(l===0)return 1/0;for(var u=0;u<r.length-1;u++){var c=r[u],d=r[u+1];if(!(c==null||d==null)){var m=d-c;n=Math.min(n,m)}}return n/l}}),kU=ee(ipe,yt,zfe,Un,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!rt(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var l=ls(n,e*o),u=e*o/2;return u-l-(u-l)/o*l}return 0}),ape=(e,t,n)=>{var r=po(e,t);return r==null||typeof r.padding!="string"?0:kU(e,"xAxis",t,n,r.padding)},ope=(e,t,n)=>{var r=go(e,t);return r==null||typeof r.padding!="string"?0:kU(e,"yAxis",t,n,r.padding)},spe=ee(po,ape,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),lpe=ee(go,ope,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),upe=ee([Un,spe,Ev,Av,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),cpe=ee([Un,yt,lpe,Ev,Av,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:l}=i;return o?[r.height-l.bottom,l.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Qd=(e,t,n,r)=>{var i;switch(t){case"xAxis":return upe(e,n,r);case"yAxis":return cpe(e,n,r);case"zAxis":return(i=XE(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return w$(e);case"radiusAxis":return S$(e,n);default:return}},LU=ee([sr,Qd],Mv),fpe=ee([xc,rpe],Gfe),rC=ee([sr,xc,fpe,LU],WE),IU=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,l=Ii(e,r);if(l&&(i==="number"||o!=="auto"))return t.map(u=>u.value)}},iC=ee([yt,Zd,Xd,wn],IU),Hv=ee([rC],CE);ee([rC],jme);ee([rC,Ime],oU);ee([yc,eC,wn],Vme);function zU(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var qv=(e,t)=>t,Kv=(e,t,n)=>n,dpe=ee(wv,qv,Kv,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(zU)),hpe=ee(Sv,qv,Kv,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(zU)),BU=(e,t)=>({width:e.width,height:t.height}),mpe=(e,t)=>{var n=typeof t.width=="number"?t.width:Ud;return{width:n,height:e.height}},ppe=ee(Un,po,BU),gpe=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},vpe=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},ype=ee(ho,Un,dpe,qv,Kv,(e,t,n,r,i)=>{var o={},l;return n.forEach(u=>{var c=BU(t,u);l==null&&(l=gpe(t,r,e));var d=r==="top"&&!i||r==="bottom"&&i;o[u.id]=l-Number(d)*c.height,l+=(d?-1:1)*c.height}),o}),bpe=ee(fo,Un,hpe,qv,Kv,(e,t,n,r,i)=>{var o={},l;return n.forEach(u=>{var c=mpe(t,u);l==null&&(l=vpe(t,r,e));var d=r==="left"&&!i||r==="right"&&i;o[u.id]=l-Number(d)*c.width,l+=(d?-1:1)*c.width}),o}),xpe=(e,t)=>{var n=po(e,t);if(n!=null)return ype(e,n.orientation,n.mirror)},wpe=ee([Un,po,xpe,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),Spe=(e,t)=>{var n=go(e,t);if(n!=null)return bpe(e,n.orientation,n.mirror)},Ape=ee([Un,go,Spe,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),Epe=ee(Un,go,(e,t)=>{var n=typeof t.width=="number"?t.width:Ud;return{width:n,height:e.height}}),$U=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:l}=n,u=Ii(e,r),c=t.map(m=>m.value),d=c.filter(m=>m!=null);if(l&&u&&o==="category"&&i&&k4(d))return c}},aC=ee([yt,Zd,sr,wn],$U);ee([yt,_me,xc,Hv,aC,iC,Qd,nC,wn],(e,t,n,r,i,o,l,u,c)=>{if(t!=null){var d=Ii(e,c);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:c,categoricalDomain:o,duplicateDomain:i,isCategorical:d,niceTicks:u,range:l,realScaleType:n,scale:r}}});var Cpe=(e,t,n,r,i,o,l,u,c)=>{if(!(t==null||r==null)){var d=Ii(e,c),{type:m,ticks:h,tickCount:y}=t,b=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,w=m==="category"&&r.bandwidth?r.bandwidth()/b:0;w=c==="angleAxis"&&o!=null&&o.length>=2?Oi(o[0]-o[1])*2*w:w;var A=h||i;return A?A.map((E,C)=>{var j=l?l.indexOf(E):E,T=r.map(j);return rt(T)?{index:C,coordinate:T+w,value:E,offset:w}:null}).filter(na):d&&u?u.map((E,C)=>{var j=r.map(E);return rt(j)?{coordinate:j+w,value:E,index:C,offset:w}:null}).filter(na):r.ticks?r.ticks(y).map((E,C)=>{var j=r.map(E);return rt(j)?{coordinate:j+w,value:E,index:C,offset:w}:null}).filter(na):r.domain().map((E,C)=>{var j=r.map(E);return rt(j)?{coordinate:j+w,value:l?l[E]:E,index:C,offset:w}:null}).filter(na)}},UU=ee([yt,Xd,xc,Hv,nC,Qd,aC,iC,wn],Cpe),jpe=(e,t,n,r,i,o,l)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var u=Ii(e,l),{tickCount:c}=t,d=0;return d=l==="angleAxis"&&r?.length>=2?Oi(r[0]-r[1])*2*d:d,u&&o?o.map((m,h)=>{var y=n.map(m);return rt(y)?{coordinate:y+d,value:m,index:h,offset:d}:null}).filter(na):n.ticks?n.ticks(c).map((m,h)=>{var y=n.map(m);return rt(y)?{coordinate:y+d,value:m,index:h,offset:d}:null}).filter(na):n.domain().map((m,h)=>{var y=n.map(m);return rt(y)?{coordinate:y+d,value:i?i[m]:m,index:h,offset:d}:null}).filter(na)}},Gv=ee([yt,Xd,Hv,Qd,aC,iC,wn],jpe),Yv=ee(sr,Hv,(e,t)=>{if(!(e==null||t==null))return xg(xg({},e),{},{scale:t})}),Tpe=ee([sr,xc,tC,LU],WE),Ope=ee([Tpe],CE);ee((e,t,n)=>XE(e,n),Ope,(e,t)=>{if(!(e==null||t==null))return xg(xg({},e),{},{scale:t})});var Ppe=ee([yt,wv,Sv],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),Npe=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};ee([Npe],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,i=e[0];for(var o of e){var l=Math.abs(o.coordinate-t);l<r&&(r=l,i=o)}return(n=i)===null||n===void 0?void 0:n.value}});var VU=e=>e.options.defaultTooltipEventType,FU=e=>e.options.validateTooltipEventTypes;function HU(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function Jd(e,t){var n=VU(e),r=FU(e);return HU(t,n,r)}function _pe(e){return Me(t=>Jd(t,e))}var qU=(e,t)=>{var n,r=Number(t);if(!(ha(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},Mpe=e=>e.tooltip.settings,Jo={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Rpe={itemInteraction:{click:Jo,hover:Jo},axisInteraction:{click:Jo,hover:Jo},keyboardInteraction:Jo,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}},KU=Wn({name:"tooltip",initialState:Rpe,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:At()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ui(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=r)},prepare:At()},removeTooltipEntrySettings:{reducer(e,t){var n=ui(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:At()},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:Dpe,replaceTooltipEntrySettings:kpe,removeTooltipEntrySettings:Lpe,setTooltipSettingsState:Ipe,setActiveMouseOverItemIndex:zpe,mouseLeaveItem:P1e,mouseLeaveChart:GU,setActiveClickItemIndex:N1e,setMouseOverAxisIndex:YU,setMouseClickAxisIndex:Bpe,setSyncInteraction:Lf,setKeyboardInteraction:Sg}=KU.actions,$pe=KU.reducer;function Qk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Km(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qk(Object(n),!0).forEach(function(r){Upe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Upe(e,t,n){return(t=Vpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vpe(e){var t=Fpe(e,"string");return typeof t=="symbol"?t:t+""}function Fpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hpe(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function qpe(e){return e.index!=null}var WU=(e,t,n,r)=>{if(t==null)return Jo;var i=Hpe(e,t,n);if(i==null)return Jo;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(qpe(i)){if(o)return Km(Km({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return Km(Km({},Jo),{},{coordinate:i.coordinate})};function Kpe(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 n=Number(e);return Number.isFinite(n)?n:void 0}function Gpe(e,t){var n=Kpe(e),r=t[0],i=t[1];if(n===void 0)return!1;var o=Math.min(r,i),l=Math.max(r,i);return n>=o&&n<=l}function Ype(e,t,n){if(n==null||t==null)return!0;var r=on(e,t);return r==null||!ca(n)?!0:Gpe(r,n)}var Gf=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var o=Number(i);if(!rt(o))return i;var l=0,u=1/0;t.length>0&&(u=t.length-1);var c=Math.max(l,Math.min(o,u)),d=t[c];return d==null||Ype(d,n,r)?String(c):null},XU=(e,t,n,r,i,o,l)=>{if(o!=null){var u=l[0],c=u?.getPosition(o);if(c!=null)return c;var d=i?.[Number(o)];if(d)return n==="horizontal"?{x:d.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:d.coordinate}}},ZU=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(n==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(r!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(l=>{var u;return((u=l.settings)===null||u===void 0?void 0:u.graphicalItemId)===i})},QU=e=>e.options.tooltipPayloadSearcher,wc=e=>e.tooltip;function Jk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function e2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jk(Object(n),!0).forEach(function(r){Wpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wpe(e,t,n){return(t=Xpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xpe(e){var t=Zpe(e,"string");return typeof t=="symbol"?t:t+""}function Zpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qpe(e){if(typeof e=="string"||typeof e=="number")return e}function Jpe(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function ege(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function t2(e){if(typeof e=="string")return e}function tge(e){if(!(e==null||typeof e!="object")){var t="name"in e?Qpe(e.name):void 0,n="unit"in e?Jpe(e.unit):void 0,r="dataKey"in e?ege(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?t2(e.color):void 0,l="fill"in e?t2(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:i,color:o,fill:l}}}function nge(e,t){return e??t}var JU=(e,t,n,r,i,o,l)=>{if(!(t==null||o==null)){var{chartData:u,computedData:c,dataStartIndex:d,dataEndIndex:m}=n,h=[];return e.reduce((y,b)=>{var w,{dataDefinedOnItem:A,settings:E}=b,C=nge(A,u),j=Array.isArray(C)?_B(C,d,m):C,T=(w=E?.dataKey)!==null&&w!==void 0?w:r,O=E?.nameKey,N;if(r&&Array.isArray(j)&&!Array.isArray(j[0])&&l==="axis"?N=L4(j,r,i):N=o(j,t,c,O),Array.isArray(N))N.forEach(M=>{var R,B,V=tge(M),H=V?.name,z=V?.dataKey,W=V?.payload,Q=e2(e2({},E),{},{name:H,unit:V?.unit,color:(R=V?.color)!==null&&R!==void 0?R:E?.color,fill:(B=V?.fill)!==null&&B!==void 0?B:E?.fill});y.push(YR({tooltipEntrySettings:Q,dataKey:z,payload:W,value:on(W,z),name:H==null?void 0:String(H)}))});else{var _;y.push(YR({tooltipEntrySettings:E,dataKey:T,payload:N,value:on(N,T),name:(_=on(N,O))!==null&&_!==void 0?_:E?.name}))}return y},h)}},oC=ee([yn,uU,vE],aU),rge=ee([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),ige=ee([Sn,gc],cU),Nl=ee([rge,yn,ige],fU,{memoizeOptions:{resultEqualityCheck:Iv}}),age=ee([Nl],e=>e.filter(EE)),e6=ee([Nl],mU,{memoizeOptions:{resultEqualityCheck:Iv}}),oge=ee([Nl],e=>e.some(t=>!t.data)),wl=ee([e6,zi],gU),sge=ee([age,zi,yn],E$),sC=ee([wl,yn,Nl,zi,oge,e6],vU),t6=ee([yn],JE),lge=ee([yn],e=>e.allowDataOverflow),n6=ee([t6,lge],o$),uge=ee([Nl],e=>e.filter(EE)),cge=ee([sge,uge,_v,v$],bU),fge=ee([cge,zi,Sn,n6],wU),dge=ee([Nl],hU),hge=ee([wl,yn,dge,eC,Sn,Mfe],EU,{memoizeOptions:{resultEqualityCheck:Lv}}),mge=ee([CU,Sn,gc],bc),pge=ee([mge,Sn],OU),gge=ee([jU,Sn,gc],bc),vge=ee([gge,Sn],PU),yge=ee([TU,Sn,gc],bc),bge=ee([yge,Sn],NU),xge=ee([pge,bge,vge],wg),wge=ee([yn,t6,n6,fge,hge,xge,yt,Sn],_U),ec=ee([yn,yt,wl,sC,_v,Sn,wge],MU),Sge=ee([ec,yn,oC],RU),Age=ee([yn,ec,Sge,Sn],DU),r6=e=>{var t=Sn(e),n=gc(e),r=!1;return Qd(e,t,n,r)},i6=ee([yn,r6],Mv),Ege=ee([yn,oC,Age,i6],WE),a6=ee([Ege],CE),Cge=ee([yt,sC,yn,Sn],$U),jge=ee([yt,sC,yn,Sn],IU),Tge=(e,t,n,r,i,o,l,u)=>{if(t){var{type:c}=t,d=Ii(e,u);if(r){var m=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,h=c==="category"&&r.bandwidth?r.bandwidth()/m:0;return h=u==="angleAxis"&&i!=null&&i?.length>=2?Oi(i[0]-i[1])*2*h:h,d&&l?l.map((y,b)=>{var w=r.map(y);return rt(w)?{coordinate:w+h,value:y,index:b,offset:h}:null}).filter(na):r.domain().map((y,b)=>{var w=r.map(y);return rt(w)?{coordinate:w+h,value:o?o[y]:y,index:b,offset:h}:null}).filter(na)}}},vo=ee([yt,yn,oC,a6,r6,Cge,jge,Sn],Tge),lC=ee([VU,FU,Mpe],(e,t,n)=>HU(n.shared,e,t)),o6=e=>e.tooltip.settings.trigger,uC=e=>e.tooltip.settings.defaultIndex,eh=ee([wc,lC,o6,uC],WU),Ad=ee([eh,wl,Ju,ec],Gf),s6=ee([vo,Ad],qU),Oge=ee([eh],e=>{if(e)return e.dataKey}),Pge=ee([eh],e=>{if(e)return e.graphicalItemId}),l6=ee([wc,lC,o6,uC],ZU),Nge=ee([fo,ho,yt,Un,vo,uC,l6],XU),_ge=ee([eh,Nge],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Mge=ee([eh],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),Rge=ee([l6,Ad,zi,Ju,s6,QU,lC],JU),Dge=ee([Rge],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function n2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function r2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n2(Object(n),!0).forEach(function(r){kge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kge(e,t,n){return(t=Lge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lge(e){var t=Ige(e,"string");return typeof t=="symbol"?t:t+""}function Ige(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zge=()=>Me(yn),Bge=()=>{var e=zge(),t=Me(vo),n=Me(a6);return Gu(!e||!n?void 0:r2(r2({},e),{},{scale:n}),t)};function i2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i2(Object(n),!0).forEach(function(r){$ge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $ge(e,t,n){return(t=Uge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uge(e){var t=Vge(e,"string");return typeof t=="symbol"?t:t+""}function Vge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fge=(e,t,n,r)=>{var i=t.find(o=>o&&o.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:i.coordinate}}return{x:0,y:0}},Hge=(e,t,n,r)=>{var i=t.find(d=>d&&d.index===n);if(i){if(e==="centric"){var o=i.coordinate,{radius:l}=r;return xu(xu(xu({},r),Ln(r.cx,r.cy,l,o)),{},{angle:o,radius:l})}var u=i.coordinate,{angle:c}=r;return xu(xu(xu({},r),Ln(r.cx,r.cy,u,c)),{},{angle:c,radius:u})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function qge(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var u6=(e,t,n,r,i)=>{var o,l=(o=t?.length)!==null&&o!==void 0?o:0;if(l<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var u=0;u<l;u++){var c,d,m,h,y,b=u>0?(c=n[u-1])===null||c===void 0?void 0:c.coordinate:(d=n[l-1])===null||d===void 0?void 0:d.coordinate,w=(m=n[u])===null||m===void 0?void 0:m.coordinate,A=u>=l-1?(h=n[0])===null||h===void 0?void 0:h.coordinate:(y=n[u+1])===null||y===void 0?void 0:y.coordinate,E=void 0;if(!(b==null||w==null||A==null))if(Oi(w-b)!==Oi(A-w)){var C=[];if(Oi(A-w)===Oi(i[1]-i[0])){E=A;var j=w+i[1]-i[0];C[0]=Math.min(j,(j+b)/2),C[1]=Math.max(j,(j+b)/2)}else{E=b;var T=A+i[1]-i[0];C[0]=Math.min(w,(T+w)/2),C[1]=Math.max(w,(T+w)/2)}var O=[Math.min(w,(E+w)/2),Math.max(w,(E+w)/2)];if(e>O[0]&&e<=O[1]||e>=C[0]&&e<=C[1]){var N;return(N=n[u])===null||N===void 0?void 0:N.index}}else{var _=Math.min(b,A),M=Math.max(b,A);if(e>(_+w)/2&&e<=(M+w)/2){var R;return(R=n[u])===null||R===void 0?void 0:R.index}}}else if(t)for(var B=0;B<l;B++){var V=t[B];if(V!=null){var H=t[B+1],z=t[B-1];if(B===0&&H!=null&&e<=(V.coordinate+H.coordinate)/2||B===l-1&&z!=null&&e>(V.coordinate+z.coordinate)/2||B>0&&B<l-1&&z!=null&&H!=null&&e>(V.coordinate+z.coordinate)/2&&e<=(V.coordinate+H.coordinate)/2)return V.index}}return-1},c6=()=>Me(vE),cC=(e,t)=>t,f6=(e,t,n)=>n,fC=(e,t,n,r)=>r,Kge=ee(vo,e=>cv(e,t=>t.coordinate)),dC=ee([wc,cC,f6,fC],WU),hC=ee([dC,wl,Ju,ec],Gf),Gge=(e,t,n)=>{if(t!=null){var r=wc(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},d6=ee([wc,cC,f6,fC],ZU),Ag=ee([fo,ho,yt,Un,vo,fC,d6],XU),Yge=ee([dC,Ag],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),h6=ee([vo,hC],qU),Wge=ee([d6,hC,zi,Ju,h6,QU,cC],JU),Xge=ee([dC,hC],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),Zge=(e,t,n,r,i,o,l)=>{if(!(!e||!n||!r||!i)&&qge(e,l)){var u=Cle(e,t),c=u6(u,o,i,n,r),d=Fge(t,i,c,e);return{activeIndex:String(c),activeCoordinate:d}}},Qge=(e,t,n,r,i,o,l)=>{if(!(!e||!r||!i||!o||!n)){var u=xfe(e,n);if(u){var c=jle(u,t),d=u6(c,l,o,r,i),m=Hge(t,o,d,u);return{activeIndex:String(d),activeCoordinate:m}}}},Jge=(e,t,n,r,i,o,l,u)=>{if(!(!e||!t||!r||!i||!o))return t==="horizontal"||t==="vertical"?Zge(e,t,r,i,o,l,u):Qge(e,t,n,r,i,o,l)},eve=ee(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),tve=ee(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(nr)),n=Array.from(new Set(t));return n.sort((r,i)=>r-i)},{memoizeOptions:{resultEqualityCheck:Kfe}});function a2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function o2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a2(Object(n),!0).forEach(function(r){nve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nve(e,t,n){return(t=rve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rve(e){var t=ive(e,"string");return typeof t=="symbol"?t:t+""}function ive(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ave={},ove={zIndexMap:Object.values(nr).reduce((e,t)=>o2(o2({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),ave)},sve=new Set(Object.values(nr));function lve(e){return sve.has(e)}var m6=Wn({name:"zIndex",initialState:ove,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:At()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!lve(n)&&delete e.zIndexMap[n])},prepare:At()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:i?void 0:r,panoramaElement:i?r:void 0}},prepare:At()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:At()}}}),{registerZIndexPortal:uve,unregisterZIndexPortal:ww,registerZIndexPortalElement:cve,unregisterZIndexPortalElement:fve}=m6.actions,dve=m6.reducer;function yo(e){var{zIndex:t,children:n}=e,r=oue(),i=r&&t!==void 0&&t!==0,o=or(),l=v.useRef(void 0),u=v.useRef(new Set),c=Vt(),d=Me(h=>eve(h,t,o));if(v.useLayoutEffect(()=>{if(!i){var h=u.current;h.forEach(b=>{c(ww({zIndex:b}))}),h.clear(),l.current=void 0;return}if(u.current.has(t)||(c(uve({zIndex:t})),u.current.add(t)),d){l.current=d;var y=u.current;y.forEach(b=>{b!==t&&(c(ww({zIndex:b})),y.delete(b))})}},[c,t,i,d]),v.useLayoutEffect(()=>{var h=u.current;return()=>{h.forEach(y=>{c(ww({zIndex:y}))}),h.clear()}},[c]),!i)return n;var m=d??l.current;return m?cs.createPortal(n,m):null}function hS(){return hS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hS.apply(null,arguments)}function s2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s2(Object(n),!0).forEach(function(r){hve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hve(e,t,n){return(t=mve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mve(e){var t=pve(e,"string");return typeof t=="symbol"?t:t+""}function pve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gve(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return v.isValidElement(t)?v.cloneElement(t,r):v.createElement(n,r)}function vve(e){var t,{coordinate:n,payload:r,index:i,offset:o,tooltipAxisBandSize:l,layout:u,cursor:c,tooltipEventType:d,chartName:m}=e,h=n,y=r,b=i;if(!c||!h||m!=="ScatterChart"&&d!=="axis")return null;var w,A,E;if(m==="ScatterChart")w=h,A=Dce,E=nr.cursorLine;else if(m==="BarChart")w=kce(u,h,o,l),A=t$,E=nr.cursorRectangle;else if(u==="radial"&&z4(h)){var{cx:C,cy:j,radius:T,startAngle:O,endAngle:N}=n$(h);w={cx:C,cy:j,startAngle:O,endAngle:N,innerRadius:T,outerRadius:T},A=i$,E=nr.cursorLine}else w={points:Efe(u,h,o)},A=Kf,E=nr.cursorLine;var _=typeof c=="object"&&"className"in c?c.className:void 0,M=Gm(Gm(Gm(Gm({stroke:"#ccc",pointerEvents:"none"},o),w),av(c)),{},{payload:y,payloadIndex:b,className:ot("recharts-tooltip-cursor",_)});return v.createElement(yo,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:E},v.createElement(gve,{cursor:c,cursorComp:A,cursorProps:M}))}function yve(e){var t=Bge(),n=iue(),r=Tl(),i=c6();return t==null||n==null||r==null||i==null?null:v.createElement(vve,hS({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var p6=v.createContext(null),bve=()=>v.useContext(p6),Sw={exports:{}},l2;function xve(){return l2||(l2=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,d,m){this.fn=c,this.context=d,this.once=m||!1}function o(c,d,m,h,y){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new i(m,h||c,y),w=n?n+d:d;return c._events[w]?c._events[w].fn?c._events[w]=[c._events[w],b]:c._events[w].push(b):(c._events[w]=b,c._eventsCount++),c}function l(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var d=[],m,h;if(this._eventsCount===0)return d;for(h in m=this._events)t.call(m,h)&&d.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(m)):d},u.prototype.listeners=function(d){var m=n?n+d:d,h=this._events[m];if(!h)return[];if(h.fn)return[h.fn];for(var y=0,b=h.length,w=new Array(b);y<b;y++)w[y]=h[y].fn;return w},u.prototype.listenerCount=function(d){var m=n?n+d:d,h=this._events[m];return h?h.fn?1:h.length:0},u.prototype.emit=function(d,m,h,y,b,w){var A=n?n+d:d;if(!this._events[A])return!1;var E=this._events[A],C=arguments.length,j,T;if(E.fn){switch(E.once&&this.removeListener(d,E.fn,void 0,!0),C){case 1:return E.fn.call(E.context),!0;case 2:return E.fn.call(E.context,m),!0;case 3:return E.fn.call(E.context,m,h),!0;case 4:return E.fn.call(E.context,m,h,y),!0;case 5:return E.fn.call(E.context,m,h,y,b),!0;case 6:return E.fn.call(E.context,m,h,y,b,w),!0}for(T=1,j=new Array(C-1);T<C;T++)j[T-1]=arguments[T];E.fn.apply(E.context,j)}else{var O=E.length,N;for(T=0;T<O;T++)switch(E[T].once&&this.removeListener(d,E[T].fn,void 0,!0),C){case 1:E[T].fn.call(E[T].context);break;case 2:E[T].fn.call(E[T].context,m);break;case 3:E[T].fn.call(E[T].context,m,h);break;case 4:E[T].fn.call(E[T].context,m,h,y);break;default:if(!j)for(N=1,j=new Array(C-1);N<C;N++)j[N-1]=arguments[N];E[T].fn.apply(E[T].context,j)}}return!0},u.prototype.on=function(d,m,h){return o(this,d,m,h,!1)},u.prototype.once=function(d,m,h){return o(this,d,m,h,!0)},u.prototype.removeListener=function(d,m,h,y){var b=n?n+d:d;if(!this._events[b])return this;if(!m)return l(this,b),this;var w=this._events[b];if(w.fn)w.fn===m&&(!y||w.once)&&(!h||w.context===h)&&l(this,b);else{for(var A=0,E=[],C=w.length;A<C;A++)(w[A].fn!==m||y&&!w[A].once||h&&w[A].context!==h)&&E.push(w[A]);E.length?this._events[b]=E.length===1?E[0]:E:l(this,b)}return this},u.prototype.removeAllListeners=function(d){var m;return d?(m=n?n+d:d,this._events[m]&&l(this,m)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u})(Sw)),Sw.exports}var wve=xve();const Sve=va(wve);var Ed=new Sve,mS="recharts.syncEvent.tooltip",u2="recharts.syncEvent.brush",g6=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!ha(n))return e[n]}},Ave={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},v6=Wn({name:"options",initialState:Ave,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Eve=v6.reducer,{createEventEmitter:Cve}=v6.actions;function jve(e){return e.tooltip.syncInteraction}var Tve={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},y6=Wn({name:"chartData",initialState:Tve,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:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:c2,setDataStartEndIndexes:Ove,setComputedData:_1e}=y6.actions,Pve=y6.reducer,Nve=["x","y"];function f2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f2(Object(n),!0).forEach(function(r){_ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ve(e,t,n){return(t=Mve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mve(e){var t=Rve(e,"string");return typeof t=="symbol"?t:t+""}function Rve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dve(e,t){if(e==null)return{};var n,r,i=kve(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kve(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Lve(){var e=Me(yE),t=Me(bE),n=Vt(),r=Me(y$),i=Me(vo),o=Tl(),l=Cv(),u=Me(c=>c.rootProps.className);v.useEffect(()=>{if(e==null)return jl;var c=(d,m,h)=>{if(t!==h&&e===d){if(m.payload.active===!1){n(Lf({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(r==="index"){var y;if(l&&m!==null&&m!==void 0&&(y=m.payload)!==null&&y!==void 0&&y.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,{x:w,y:A}=b,E=Dve(b,Nve),{x:C,y:j,width:T,height:O}=m.payload.sourceViewBox,N=wu(wu({},E),{},{x:l.x+(T?(w-C)/T:0)*l.width,y:l.y+(O?(A-j)/O:0)*l.height});n(wu(wu({},m),{},{payload:wu(wu({},m.payload),{},{coordinate:N})}))}else n(m);return}if(i!=null){var _;if(typeof r=="function"){var M={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},R=r(i,M);_=i[R]}else r==="value"&&(_=i.find(L=>String(L.value)===m.payload.label));var{coordinate:B}=m.payload;if(B==null||l==null){n(Lf({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(_==null){n(Lf({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:V,y:H}=B,z=Math.min(V,l.x+l.width),W=Math.min(H,l.y+l.height),Q={x:o==="horizontal"?_.coordinate:z,y:o==="horizontal"?W:_.coordinate},se=Lf({active:m.payload.active,coordinate:Q,dataKey:m.payload.dataKey,index:String(_.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});n(se)}}};return Ed.on(mS,c),()=>{Ed.off(mS,c)}},[u,n,t,e,r,i,o,l])}function Ive(){var e=Me(yE),t=Me(bE),n=Vt();v.useEffect(()=>{if(e==null)return jl;var r=(i,o,l)=>{t!==l&&e===i&&n(Ove(o))};return Ed.on(u2,r),()=>{Ed.off(u2,r)}},[n,t,e])}function zve(){var e=Vt();v.useEffect(()=>{e(Cve())},[e]),Lve(),Ive()}function Bve(e,t,n,r,i,o){var l=Me(w=>Gge(w,e,t)),u=Me(Pge),c=Me(bE),d=Me(yE),m=Me(y$),h=Me(jve),y=h?.sourceViewBox!=null,b=Cv();v.useEffect(()=>{if(!y&&d!=null&&c!=null){var w=Lf({active:o,coordinate:n,dataKey:l,index:i,label:typeof r=="number"?String(r):r,sourceViewBox:b,graphicalItemId:u});Ed.emit(mS,d,w,c)}},[y,n,l,u,i,r,c,d,m,o,b])}function d2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function h2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d2(Object(n),!0).forEach(function(r){$ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $ve(e,t,n){return(t=Uve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uve(e){var t=Vve(e,"string");return typeof t=="symbol"?t:t+""}function Vve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fve(e){return e.dataKey}function Hve(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e=="function"?v.createElement(e,t):v.createElement(uce,t)}var m2=[],qve={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 b6(e){var t,n,r=Yn(e,qve),{active:i,allowEscapeViewBox:o,animationDuration:l,animationEasing:u,content:c,filterNull:d,isAnimationActive:m,offset:h,payloadUniqBy:y,position:b,reverseDirection:w,useTranslate3d:A,wrapperStyle:E,cursor:C,shared:j,trigger:T,defaultIndex:O,portal:N,axisId:_}=r,M=Vt(),R=typeof O=="number"?String(O):O;v.useEffect(()=>{M(Ipe({shared:j,trigger:T,axisId:_,active:i,defaultIndex:R}))},[M,j,T,_,i,R]);var B=Cv(),V=XB(),H=_pe(j),{activeIndex:z,isActive:W}=(t=Me(he=>Xge(he,H,T,R)))!==null&&t!==void 0?t:{},Q=Me(he=>Wge(he,H,T,R)),se=Me(he=>h6(he,H,T,R)),L=Me(he=>Yge(he,H,T,R)),F=Q,$=bve(),ae=(n=i??W)!==null&&n!==void 0?n:!1,[G,k]=tB([F,ae]),I=H==="axis"?se:void 0;Bve(H,T,L,I,z,ae);var q=N??$;if(q==null||B==null||H==null)return null;var ne=F??m2;ae||(ne=m2),d&&ne.length&&(ne=X4(ne.filter(he=>he.value!=null&&(he.hide!==!0||r.includeHidden)),y,Fve));var de=ne.length>0,pe=h2(h2({},r),{},{payload:ne,label:I,active:ae,activeIndex:z,coordinate:L,accessibilityLayer:V}),X=v.createElement(xce,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:m,active:ae,coordinate:L,hasPayload:de,offset:h,position:b,reverseDirection:w,useTranslate3d:A,viewBox:B,wrapperStyle:E,lastBoundingBox:G,innerRef:k,hasPortalFromProps:!!N},Hve(c,pe));return v.createElement(v.Fragment,null,cs.createPortal(X,q),ae&&v.createElement(yve,{cursor:C,tooltipEventType:H,coordinate:L,payload:ne,index:z}))}function Kve(e,t,n){return(t=Gve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gve(e){var t=Yve(e,"string");return typeof t=="symbol"?t:t+""}function Yve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Wve{constructor(t){Kve(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function p2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p2(Object(n),!0).forEach(function(r){Zve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zve(e,t,n){return(t=Qve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qve(e){var t=Jve(e,"string");return typeof t=="symbol"?t:t+""}function Jve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eye={cacheSize:2e3,enableCache:!0},x6=Xve({},eye),g2=new Wve(x6.cacheSize),tye={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},v2="recharts_measurement_span";function nye(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",l=t.letterSpacing||"",u=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(l,"|").concat(u)}var y2=(e,t)=>{try{var n=document.getElementById(v2);n||(n=document.createElement("span"),n.setAttribute("id",v2),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,tye,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Yf=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Hd.isSsr)return{width:0,height:0};if(!x6.enableCache)return y2(t,n);var r=nye(t,n),i=g2.get(r);if(i)return i;var o=y2(t,n);return g2.set(r,o),o},w6;function rye(e,t,n){return(t=iye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iye(e){var t=aye(e,"string");return typeof t=="symbol"?t:t+""}function aye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var b2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,x2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,oye=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,sye=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,lye={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},uye=["cm","mm","pt","pc","in","Q","px"];function cye(e){return uye.includes(e)}var Mu="NaN";function fye(e,t){return e*lye[t]}class Mn{static parse(t){var n,[,r,i]=(n=sye.exec(t))!==null&&n!==void 0?n:[];return r==null?Mn.NaN:new Mn(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,ha(t)&&(this.unit=""),n!==""&&!oye.test(n)&&(this.num=NaN,this.unit=""),cye(n)&&(this.num=fye(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Mn(NaN,""):new Mn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Mn(NaN,""):new Mn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Mn(NaN,""):new Mn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Mn(NaN,""):new Mn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return ha(this.num)}}w6=Mn;rye(Mn,"NaN",new w6(NaN,""));function S6(e){if(e==null||e.includes(Mu))return Mu;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=b2.exec(t))!==null&&n!==void 0?n:[],l=Mn.parse(r??""),u=Mn.parse(o??""),c=i==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return Mu;t=t.replace(b2,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,[,m,h,y]=(d=x2.exec(t))!==null&&d!==void 0?d:[],b=Mn.parse(m??""),w=Mn.parse(y??""),A=h==="+"?b.add(w):b.subtract(w);if(A.isNaN())return Mu;t=t.replace(x2,A.toString())}return t}var w2=/\(([^()]*)\)/;function dye(e){for(var t=e,n;(n=w2.exec(t))!=null;){var[,r]=n;t=t.replace(w2,S6(r))}return t}function hye(e){var t=e.replace(/\s+/g,"");return t=dye(t),t=S6(t),t}function mye(e){try{return hye(e)}catch{return Mu}}function Aw(e){var t=mye(e.slice(5,-1));return t===Mu?"":t}var pye=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],gye=["dx","dy","angle","className","breakAll"];function pS(){return pS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pS.apply(null,arguments)}function S2(e,t){if(e==null)return{};var n,r,i=vye(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function vye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var A6=/[ \f\n\r\t\v\u2028\u2029]+/,E6=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];gn(t)||(n?i=t.toString().split(""):i=t.toString().split(A6));var o=i.map(u=>({word:u,width:Yf(u,r).width})),l=n?0:Yf(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}};function C6(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function yye(e){return gn(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var j6=(e,t,n,r)=>e.reduce((i,o)=>{var{word:l,width:u}=o,c=i[i.length-1];if(c&&u!=null&&(t==null||r||c.width+u+n<Number(t)))c.words.push(l),c.width+=u+n;else{var d={words:[l],width:u};i.push(d)}return i},[]),T6=e=>e.reduce((t,n)=>t.width>n.width?t:n),bye="…",A2=(e,t,n,r,i,o,l,u)=>{var c=e.slice(0,t),d=E6({breakAll:n,style:r,children:c+bye});if(!d)return[!1,[]];var m=j6(d.wordsWithComputedWidth,o,l,u),h=m.length>i||T6(m).width>Number(o);return[h,m]},xye=(e,t,n,r,i)=>{var{maxLines:o,children:l,style:u,breakAll:c}=e,d=Oe(o),m=String(l),h=j6(t,r,n,i);if(!d||i)return h;var y=h.length>o||T6(h).width>Number(r);if(!y)return h;for(var b=0,w=m.length-1,A=0,E;b<=w&&A<=m.length-1;){var C=Math.floor((b+w)/2),j=C-1,[T,O]=A2(m,j,c,u,o,r,n,i),[N]=A2(m,C,c,u,o,r,n,i);if(!T&&!N&&(b=C+1),T&&N&&(w=C-1),!T&&N){E=O;break}A++}return E||h},E2=e=>{var t=gn(e)?[]:e.toString().split(A6);return[{words:t,width:void 0}]},wye=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:l}=e;if((t||n)&&!Hd.isSsr){var u,c,d=E6({breakAll:o,children:r,style:i});if(d){var{wordsWithComputedWidth:m,spaceWidth:h}=d;u=m,c=h}else return E2(r);return xye({breakAll:o,children:r,maxLines:l,style:i},u,c,t,!!n)}return E2(r)},O6="#808080",Sye={angle:0,breakAll:!1,capHeight:"0.71em",fill:O6,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},mC=v.forwardRef((e,t)=>{var n=Yn(e,Sye),{x:r,y:i,lineHeight:o,capHeight:l,fill:u,scaleToFit:c,textAnchor:d,verticalAnchor:m}=n,h=S2(n,pye),y=v.useMemo(()=>wye({breakAll:h.breakAll,children:h.children,maxLines:h.maxLines,scaleToFit:c,style:h.style,width:h.width}),[h.breakAll,h.children,h.maxLines,c,h.style,h.width]),{dx:b,dy:w,angle:A,className:E,breakAll:C}=h,j=S2(h,gye);if(!ma(r)||!ma(i)||y.length===0)return null;var T=Number(r)+(Oe(b)?b:0),O=Number(i)+(Oe(w)?w:0);if(!rt(T)||!rt(O))return null;var N;switch(m){case"start":N=Aw("calc(".concat(l,")"));break;case"middle":N=Aw("calc(".concat((y.length-1)/2," * -").concat(o," + (").concat(l," / 2))"));break;default:N=Aw("calc(".concat(y.length-1," * -").concat(o,")"));break}var _=[],M=y[0];if(c&&M!=null){var R=M.width,{width:B}=h;_.push("scale(".concat(Oe(B)&&Oe(R)?B/R:1,")"))}return A&&_.push("rotate(".concat(A,", ").concat(T,", ").concat(O,")")),_.length&&(j.transform=_.join(" ")),v.createElement("text",pS({},Gn(j),{ref:t,x:T,y:O,className:ot("recharts-text",E),textAnchor:d,fill:u.includes("url")?O6:u}),y.map((V,H)=>{var z=V.words.join(C?"":" ");return v.createElement("tspan",{x:T,dy:H===0?N:o,key:"".concat(z,"-").concat(H)},z)}))});mC.displayName="Text";function C2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C2(Object(n),!0).forEach(function(r){Aye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Aye(e,t,n){return(t=Eye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eye(e){var t=Cye(e,"string");return typeof t=="symbol"?t:t+""}function Cye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jye=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:i}=e,{x:o,y:l,height:u,upperWidth:c,lowerWidth:d}=uE(t),m=o,h=o+(c-d)/2,y=(m+h)/2,b=(c+d)/2,w=m+c/2,A=u>=0?1:-1,E=A*r,C=A>0?"end":"start",j=A>0?"start":"end",T=c>=0?1:-1,O=T*r,N=T>0?"end":"start",_=T>0?"start":"end",M=i;if(n==="top"){var R={x:m+c/2,y:l-E,horizontalAnchor:"middle",verticalAnchor:C};return M&&(R.height=Math.max(l-M.y,0),R.width=c),R}if(n==="bottom"){var B={x:h+d/2,y:l+u+E,horizontalAnchor:"middle",verticalAnchor:j};return M&&(B.height=Math.max(M.y+M.height-(l+u),0),B.width=d),B}if(n==="left"){var V={x:y-O,y:l+u/2,horizontalAnchor:N,verticalAnchor:"middle"};return M&&(V.width=Math.max(V.x-M.x,0),V.height=u),V}if(n==="right"){var H={x:y+b+O,y:l+u/2,horizontalAnchor:_,verticalAnchor:"middle"};return M&&(H.width=Math.max(M.x+M.width-H.x,0),H.height=u),H}var z=M?{width:b,height:u}:{};return n==="insideLeft"?Xi({x:y+O,y:l+u/2,horizontalAnchor:_,verticalAnchor:"middle"},z):n==="insideRight"?Xi({x:y+b-O,y:l+u/2,horizontalAnchor:N,verticalAnchor:"middle"},z):n==="insideTop"?Xi({x:m+c/2,y:l+E,horizontalAnchor:"middle",verticalAnchor:j},z):n==="insideBottom"?Xi({x:h+d/2,y:l+u-E,horizontalAnchor:"middle",verticalAnchor:C},z):n==="insideTopLeft"?Xi({x:m+O,y:l+E,horizontalAnchor:_,verticalAnchor:j},z):n==="insideTopRight"?Xi({x:m+c-O,y:l+E,horizontalAnchor:N,verticalAnchor:j},z):n==="insideBottomLeft"?Xi({x:h+O,y:l+u-E,horizontalAnchor:_,verticalAnchor:C},z):n==="insideBottomRight"?Xi({x:h+d-O,y:l+u-E,horizontalAnchor:N,verticalAnchor:C},z):n&&typeof n=="object"&&(Oe(n.x)||gl(n.x))&&(Oe(n.y)||gl(n.y))?Xi({x:o+ls(n.x,b),y:l+ls(n.y,u),horizontalAnchor:"end",verticalAnchor:"end"},z):Xi({x:w,y:l+u/2,horizontalAnchor:"middle",verticalAnchor:"middle"},z)},Tye=["labelRef"],Oye=["content"];function j2(e,t){if(e==null)return{};var n,r,i=Pye(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function T2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function If(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T2(Object(n),!0).forEach(function(r){Nye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nye(e,t,n){return(t=_ye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _ye(e){var t=Mye(e,"string");return typeof t=="symbol"?t:t+""}function Mye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ga(){return Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ga.apply(null,arguments)}var P6=v.createContext(null),Rye=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:i,width:o,height:l,children:u}=e,c=v.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:o,height:l}),[t,n,r,i,o,l]);return v.createElement(P6.Provider,{value:c},u)},N6=()=>{var e=v.useContext(P6),t=Cv();return e||(t?uE(t):void 0)},Dye=v.createContext(null),kye=()=>{var e=v.useContext(Dye),t=Me(A$);return e||t},Lye=e=>{var{value:t,formatter:n}=e,r=gn(e.children)?t:e.children;return typeof n=="function"?n(r):r},pC=e=>e!=null&&typeof e=="function",Iye=(e,t)=>{var n=Oi(t-e),r=Math.min(Math.abs(t-e),360);return n*r},zye=(e,t,n,r,i)=>{var{offset:o,className:l}=e,{cx:u,cy:c,innerRadius:d,outerRadius:m,startAngle:h,endAngle:y,clockWise:b}=i,w=(d+m)/2,A=Iye(h,y),E=A>=0?1:-1,C,j;switch(t){case"insideStart":C=h+E*o,j=b;break;case"insideEnd":C=y-E*o,j=!b;break;case"end":C=y+E*o,j=b;break;default:throw new Error("Unsupported position ".concat(t))}j=A<=0?j:!j;var T=Ln(u,c,w,C),O=Ln(u,c,w,C+(j?1:-1)*359),N="M".concat(T.x,",").concat(T.y,`
|
|
100
|
-
A`).concat(w,",").concat(w,",0,1,").concat(j?0:1,`,
|
|
101
|
-
`).concat(O.x,",").concat(O.y),_=gn(e.id)?cd("recharts-radial-line-"):e.id;return v.createElement("text",Ga({},r,{dominantBaseline:"central",className:ot("recharts-radial-bar-label",l)}),v.createElement("defs",null,v.createElement("path",{id:_,d:N})),v.createElement("textPath",{xlinkHref:"#".concat(_)},n))},Bye=(e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:l,startAngle:u,endAngle:c}=e,d=(u+c)/2;if(n==="outside"){var{x:m,y:h}=Ln(r,i,l+t,d);return{x:m,y:h,textAnchor:m>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var y=(o+l)/2,{x:b,y:w}=Ln(r,i,y,d);return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},mp=e=>e!=null&&"cx"in e&&Oe(e.cx),$ye={angle:0,offset:5,zIndex:nr.label,position:"middle",textBreakAll:!1};function Uye(e){if(!mp(e))return e;var{cx:t,cy:n,outerRadius:r}=e,i=r*2;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}function Qo(e){var t=Yn(e,$ye),{viewBox:n,parentViewBox:r,position:i,value:o,children:l,content:u,className:c="",textBreakAll:d,labelRef:m}=t,h=kye(),y=N6(),b=i==="center"?y:h??y,w,A,E;n==null?w=b:mp(n)?w=n:w=uE(n);var C=Uye(w);if(!w||gn(o)&&gn(l)&&!v.isValidElement(u)&&typeof u!="function")return null;var j=If(If({},t),{},{viewBox:w});if(v.isValidElement(u)){var{labelRef:T}=j,O=j2(j,Tye);return v.cloneElement(u,O)}if(typeof u=="function"){var{content:N}=j,_=j2(j,Oye);if(A=v.createElement(u,_),v.isValidElement(A))return A}else A=Lye(t);var M=Gn(t);if(mp(w)){if(i==="insideStart"||i==="insideEnd"||i==="end")return zye(t,i,A,M,w);E=Bye(w,t.offset,t.position)}else{if(!C)return null;var R=jye({viewBox:C,position:i,offset:t.offset,parentViewBox:mp(r)?void 0:r});E=If(If({x:R.x,y:R.y,textAnchor:R.horizontalAnchor,verticalAnchor:R.verticalAnchor},R.width!==void 0?{width:R.width}:{}),R.height!==void 0?{height:R.height}:{})}return v.createElement(yo,{zIndex:t.zIndex},v.createElement(mC,Ga({ref:m,className:ot("recharts-label",c)},M,E,{textAnchor:C6(M.textAnchor)?M.textAnchor:E.textAnchor,breakAll:d}),A))}Qo.displayName="Label";var Vye=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?v.createElement(Qo,Ga({key:"label-implicit"},r)):ma(e)?v.createElement(Qo,Ga({key:"label-implicit",value:e},r)):v.isValidElement(e)?e.type===Qo?v.cloneElement(e,If({key:"label-implicit"},r)):v.createElement(Qo,Ga({key:"label-implicit",content:e},r)):pC(e)?v.createElement(Qo,Ga({key:"label-implicit",content:e},r)):e&&typeof e=="object"?v.createElement(Qo,Ga({},e,{key:"label-implicit"},r)):null};function Fye(e){var{label:t,labelRef:n}=e,r=N6();return Vye(t,r,n)||null}var Hye=["valueAccessor"],qye=["dataKey","clockWise","id","textBreakAll","zIndex"];function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eg.apply(null,arguments)}function O2(e,t){if(e==null)return{};var n,r,i=Kye(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Kye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Gye=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(yye(t))return t},_6=v.createContext(void 0),M6=_6.Provider,R6=v.createContext(void 0);R6.Provider;function Yye(){return v.useContext(_6)}function Wye(){return v.useContext(R6)}function pp(e){var{valueAccessor:t=Gye}=e,n=O2(e,Hye),{dataKey:r,clockWise:i,id:o,textBreakAll:l,zIndex:u}=n,c=O2(n,qye),d=Yye(),m=Wye(),h=d||m;return!h||!h.length?null:v.createElement(yo,{zIndex:u??nr.label},v.createElement(Ur,{className:"recharts-label-list"},h.map((y,b)=>{var w,A=gn(r)?t(y,b):on(y.payload,r),E=gn(o)?{}:{id:"".concat(o,"-").concat(b)};return v.createElement(Qo,Eg({key:"label-".concat(b)},Gn(y),c,E,{fill:(w=n.fill)!==null&&w!==void 0?w:y.fill,parentViewBox:y.parentViewBox,value:A,textBreakAll:l,viewBox:y.viewBox,index:b,zIndex:0}))})))}pp.displayName="LabelList";function D6(e){var{label:t}=e;return t?t===!0?v.createElement(pp,{key:"labelList-implicit"}):v.isValidElement(t)||pC(t)?v.createElement(pp,{key:"labelList-implicit",content:t}):typeof t=="object"?v.createElement(pp,Eg({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function gS(){return gS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gS.apply(null,arguments)}var k6=e=>{var{cx:t,cy:n,r,className:i}=e,o=ot("recharts-dot",i);return Oe(t)&&Oe(n)&&Oe(r)?v.createElement("circle",gS({},Ri(e),JA(e),{className:o,cx:t,cy:n,r})):null},Xye={radiusAxis:{},angleAxis:{}},L6=Wn({name:"polarAxis",initialState:Xye,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:M1e,removeRadiusAxis:R1e,addAngleAxis:D1e,removeAngleAxis:k1e}=L6.actions,Zye=L6.reducer;function Qye(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var gC=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,Ew={},P2;function Jye(){return P2||(P2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(Ew)),Ew}var Cw,N2;function ebe(){return N2||(N2=1,Cw=Jye().isPlainObject),Cw}var tbe=ebe();const nbe=va(tbe);var _2,M2,R2,D2,k2;function L2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function I2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L2(Object(n),!0).forEach(function(r){rbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rbe(e,t,n){return(t=ibe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ibe(e){var t=abe(e,"string");return typeof t=="symbol"?t:t+""}function abe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cg(){return Cg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cg.apply(null,arguments)}function Nf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var z2=(e,t,n,r,i)=>{var o=n-r,l;return l=$t(_2||(_2=Nf(["M ",",",""])),e,t),l+=$t(M2||(M2=Nf(["L ",",",""])),e+n,t),l+=$t(R2||(R2=Nf(["L ",",",""])),e+n-o/2,t+i),l+=$t(D2||(D2=Nf(["L ",",",""])),e+n-o/2-r,t+i),l+=$t(k2||(k2=Nf(["L ",","," Z"])),e,t),l},obe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},sbe=e=>{var t=Yn(e,obe),{x:n,y:r,upperWidth:i,lowerWidth:o,height:l,className:u}=t,{animationEasing:c,animationDuration:d,animationBegin:m,isUpdateAnimationActive:h}=t,y=v.useRef(null),[b,w]=v.useState(-1),A=v.useRef(i),E=v.useRef(o),C=v.useRef(l),j=v.useRef(n),T=v.useRef(r),O=Nv(e,"trapezoid-");if(v.useEffect(()=>{if(y.current&&y.current.getTotalLength)try{var Q=y.current.getTotalLength();Q&&w(Q)}catch{}},[]),n!==+n||r!==+r||i!==+i||o!==+o||l!==+l||i===0&&o===0||l===0)return null;var N=ot("recharts-trapezoid",u);if(!h)return v.createElement("g",null,v.createElement("path",Cg({},Gn(t),{className:N,d:z2(n,r,i,o,l)})));var _=A.current,M=E.current,R=C.current,B=j.current,V=T.current,H="0px ".concat(b===-1?1:b,"px"),z="".concat(b,"px ").concat(b,"px"),W=ZB(["strokeDasharray"],d,c);return v.createElement(Pv,{animationId:O,key:O,canBegin:b>0,duration:d,easing:c,isActive:h,begin:m},Q=>{var se=nn(_,i,Q),L=nn(M,o,Q),F=nn(R,l,Q),$=nn(B,n,Q),ae=nn(V,r,Q);y.current&&(A.current=se,E.current=L,C.current=F,j.current=$,T.current=ae);var G=Q>0?{transition:W,strokeDasharray:z}:{strokeDasharray:H};return v.createElement("path",Cg({},Gn(t),{className:N,d:z2($,ae,se,L,F),ref:y,style:I2(I2({},G),t.style)}))})},lbe=["option","shapeType","activeClassName","inActiveClassName"];function ube(e,t){if(e==null)return{};var n,r,i=cbe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function B2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B2(Object(n),!0).forEach(function(r){fbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fbe(e,t,n){return(t=dbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dbe(e){var t=hbe(e,"string");return typeof t=="symbol"?t:t+""}function hbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mbe(e,t){return jg(jg({},t),e)}function pbe(e,t){return e==="symbols"}function $2(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return v.createElement(t$,n);case"trapezoid":return v.createElement(sbe,n);case"sector":return v.createElement(i$,n);case"symbols":if(pbe(t))return v.createElement(QA,n);break;case"curve":return v.createElement(Kf,n);default:return null}}function gbe(e){return v.isValidElement(e)?e.props:e}function vbe(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=ube(e,lbe),l;if(v.isValidElement(t))l=v.cloneElement(t,jg(jg({},o),gbe(t)));else if(typeof t=="function")l=t(o,o.index);else if(nbe(t)&&typeof t!="boolean"){var u=mbe(t,o);l=v.createElement($2,{shapeType:n,elementProps:u})}else{var c=o;l=v.createElement($2,{shapeType:n,elementProps:c})}return o.isActive?v.createElement(Ur,{className:r},l):v.createElement(Ur,{className:i},l)}function I6(e){var{tooltipEntrySettings:t}=e,n=Vt(),r=or(),i=v.useRef(null);return v.useLayoutEffect(()=>{r||(i.current===null?n(Dpe(t)):i.current!==t&&n(kpe({prev:i.current,next:t})),i.current=t)},[t,n,r]),v.useLayoutEffect(()=>()=>{i.current&&(n(Lpe(i.current)),i.current=null)},[n]),null}function z6(e){var{legendPayload:t}=e,n=Vt(),r=or(),i=v.useRef(null);return v.useLayoutEffect(()=>{r||(i.current===null?n(xue(t)):i.current!==t&&n(wue({prev:i.current,next:t})),i.current=t)},[n,r,t]),v.useLayoutEffect(()=>()=>{i.current&&(n(Sue(i.current)),i.current=null)},[n]),null}var jw,ybe=()=>{var[e]=v.useState(()=>cd("uid-"));return e},bbe=(jw=Mg.useId)!==null&&jw!==void 0?jw:ybe;function xbe(e,t){var n=bbe();return t||(e?"".concat(e,"-").concat(n):n)}var wbe=v.createContext(void 0),B6=e=>{var{id:t,type:n,children:r}=e,i=xbe("recharts-".concat(n),t);return v.createElement(wbe.Provider,{value:i},r(i))},Sbe={cartesianItems:[],polarItems:[]},$6=Wn({name:"graphicalItems",initialState:Sbe,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:At()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ui(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:At()},removeCartesianGraphicalItem:{reducer(e,t){var n=ui(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:At()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:At()},removePolarGraphicalItem:{reducer(e,t){var n=ui(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:At()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ui(e).polarItems.indexOf(n);i>-1&&(e.polarItems[i]=r)},prepare:At()}}}),{addCartesianGraphicalItem:Abe,replaceCartesianGraphicalItem:Ebe,removeCartesianGraphicalItem:Cbe,addPolarGraphicalItem:L1e,removePolarGraphicalItem:I1e,replacePolarGraphicalItem:z1e}=$6.actions,jbe=$6.reducer,Tbe=e=>{var t=Vt(),n=v.useRef(null);return v.useLayoutEffect(()=>{n.current===null?t(Abe(e)):n.current!==e&&t(Ebe({prev:n.current,next:e})),n.current=e},[t,e]),v.useLayoutEffect(()=>()=>{n.current&&(t(Cbe(n.current)),n.current=null)},[t]),null},U6=v.memo(Tbe),Obe=["points"];function U2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U2(Object(n),!0).forEach(function(r){Pbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pbe(e,t,n){return(t=Nbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nbe(e){var t=_be(e,"string");return typeof t=="symbol"?t:t+""}function _be(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tg(){return Tg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tg.apply(null,arguments)}function Mbe(e,t){if(e==null)return{};var n,r,i=Rbe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Rbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Dbe(e){var{option:t,dotProps:n,className:r}=e;if(v.isValidElement(t))return v.cloneElement(t,n);if(typeof t=="function")return t(n);var i=ot(r,typeof t!="boolean"?t.className:""),o=n??{},{points:l}=o,u=Mbe(o,Obe);return v.createElement(k6,Tg({},u,{className:i}))}function kbe(e,t){return e==null?!1:t?!0:e.length===1}function V6(e){var{points:t,dot:n,className:r,dotClassName:i,dataKey:o,baseProps:l,needClip:u,clipPathId:c,zIndex:d=nr.scatter}=e;if(!kbe(t,n))return null;var m=gC(n),h=iae(n),y=t.map((w,A)=>{var E,C,j=Tw(Tw(Tw({r:3},l),h),{},{index:A,cx:(E=w.x)!==null&&E!==void 0?E:void 0,cy:(C=w.y)!==null&&C!==void 0?C:void 0,dataKey:o,value:w.value,payload:w.payload,points:t});return v.createElement(Dbe,{key:"dot-".concat(A),option:n,dotProps:j,className:i})}),b={};return u&&c!=null&&(b.clipPath="url(#clipPath-".concat(m?"":"dots-").concat(c,")")),v.createElement(yo,{zIndex:d},v.createElement(Ur,Tg({className:r},b),y))}function V2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function F2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V2(Object(n),!0).forEach(function(r){Lbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lbe(e,t,n){return(t=Ibe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ibe(e){var t=zbe(e,"string");return typeof t=="symbol"?t:t+""}function zbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F6=0,Bbe={xAxis:{},yAxis:{},zAxis:{}},H6=Wn({name:"cartesianAxis",initialState:Bbe,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:At()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.xAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:At()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:At()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:At()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.yAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:At()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:At()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:At()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.zAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:At()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:At()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var o,l=i.widthHistory||[];if(l.length===3&&l[0]===l[2]&&r===l[1]&&r!==i.width&&Math.abs(r-((o=l[0])!==null&&o!==void 0?o:0))<=1)return;var u=[...l,r].slice(-3);e.yAxis[n]=F2(F2({},i),{},{width:r,widthHistory:u})}}}}),{addXAxis:$be,replaceXAxis:Ube,removeXAxis:Vbe,addYAxis:Fbe,replaceYAxis:Hbe,removeYAxis:qbe,addZAxis:B1e,replaceZAxis:$1e,removeZAxis:U1e,updateYAxisWidth:Kbe}=H6.actions,Gbe=H6.reducer,Ybe=ee([Un],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Wbe=ee([Ybe,fo,ho],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),Wv=()=>Me(Wbe),Xbe=()=>Me(Dge);function H2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ow(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H2(Object(n),!0).forEach(function(r){Zbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zbe(e,t,n){return(t=Qbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qbe(e){var t=Jbe(e,"string");return typeof t=="symbol"?t:t+""}function Jbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var e0e=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:o,clipPath:l}=e;if(i===!1||t.x==null||t.y==null)return null;var u={index:n,dataKey:o,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=Ow(Ow(Ow({},u),av(i)),JA(i)),d;return v.isValidElement(i)?d=v.cloneElement(i,c):typeof i=="function"?d=i(c):d=v.createElement(k6,c),v.createElement(Ur,{className:"recharts-active-dot",clipPath:l},d)};function vS(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i,clipPath:o,zIndex:l=nr.activeDot}=e,u=Me(Ad),c=Xbe();if(t==null||c==null)return null;var d=t.find(m=>c.includes(m.payload));return gn(d)?null:v.createElement(yo,{zIndex:l},v.createElement(e0e,{point:d,childIndex:Number(u),mainColor:n,dataKey:i,activeDot:r,clipPath:o}))}var t0e=e=>{var{chartData:t}=e,n=Vt(),r=or();return v.useEffect(()=>r?()=>{}:(n(c2(t)),()=>{n(c2(void 0))}),[t,n,r]),null},q2={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},q6=Wn({name:"brush",initialState:q2,reducers:{setBrushSettings(e,t){return t.payload==null?q2:t.payload}}}),{setBrushSettings:V1e}=q6.actions,n0e=q6.reducer;function r0e(e){return(e%180+180)%180}var i0e=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=r0e(i),l=o*Math.PI/180,u=Math.atan(r/n),c=l>u&&l<Math.PI-u?r/Math.sin(l):n/Math.cos(l);return Math.abs(c)},a0e={dots:[],areas:[],lines:[]},K6=Wn({name:"referenceElements",initialState:a0e,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=ui(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=ui(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=ui(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:F1e,removeDot:H1e,addArea:q1e,removeArea:K1e,addLine:G1e,removeLine:Y1e}=K6.actions,o0e=K6.reducer,s0e=v.createContext(void 0),l0e=e=>{var{children:t}=e,[n]=v.useState("".concat(cd("recharts"),"-clip")),r=Wv();if(r==null)return null;var{x:i,y:o,width:l,height:u}=r;return v.createElement(s0e.Provider,{value:n},v.createElement("defs",null,v.createElement("clipPath",{id:n},v.createElement("rect",{x:i,y:o,height:u,width:l}))),t)};function G6(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var i=e[r];i!==void 0&&n.push(i)}return n}function u0e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return i0e(r,n)}function c0e(e,t,n){var r=n==="width",{x:i,y:o,width:l,height:u}=e;return t===1?{start:r?i:o,end:r?i+l:o+u}:{start:r?i+l:o+u,end:r?i:o}}function Cd(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function f0e(e,t){return G6(e,t+1)}function d0e(e,t,n,r,i){for(var o=(r||[]).slice(),{start:l,end:u}=t,c=0,d=1,m=l,h=function(){var w=r?.[c];if(w===void 0)return{v:G6(r,d)};var A=c,E,C=()=>(E===void 0&&(E=n(w,A)),E),j=w.coordinate,T=c===0||Cd(e,j,C,m,u);T||(c=0,m=l,d+=1),T&&(m=j+e*(C()/2+i),c+=d)},y;d<=o.length;)if(y=h(),y)return y.v;return[]}function h0e(e,t,n,r,i){var o=(r||[]).slice(),l=o.length;if(l===0)return[];for(var{start:u,end:c}=t,d=1;d<=l;d++){for(var m=(l-1)%d,h=u,y=!0,b=function(){var O=r[A];if(O==null)return 0;var N=A,_,M=()=>(_===void 0&&(_=n(O,N)),_),R=O.coordinate,B=A===m||Cd(e,R,M,h,c);if(!B)return y=!1,1;B&&(h=R+e*(M()/2+i))},w,A=m;A<l&&(w=b(),!(w!==0&&w===1));A+=d);if(y){for(var E=[],C=m;C<l;C+=d){var j=r[C];j!=null&&E.push(j)}return E}}return[]}function K2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K2(Object(n),!0).forEach(function(r){m0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m0e(e,t,n){return(t=p0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p0e(e){var t=g0e(e,"string");return typeof t=="symbol"?t:t+""}function g0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function v0e(e,t,n,r,i){for(var o=(r||[]).slice(),l=o.length,{start:u}=t,{end:c}=t,d=function(y){var b=o[y];if(b==null)return 1;var w=b,A,E=()=>(A===void 0&&(A=n(b,y)),A);if(y===l-1){var C=e*(w.coordinate+e*E()/2-c);o[y]=w=qn(qn({},w),{},{tickCoord:C>0?w.coordinate-C*e:w.coordinate})}else o[y]=w=qn(qn({},w),{},{tickCoord:w.coordinate});if(w.tickCoord!=null){var j=Cd(e,w.tickCoord,E,u,c);j&&(c=w.tickCoord-e*(E()/2+i),o[y]=qn(qn({},w),{},{isShow:!0}))}},m=l-1;m>=0;m--)d(m);return o}function y0e(e,t,n,r,i,o){var l=(r||[]).slice(),u=l.length,{start:c,end:d}=t;if(o){var m=r[u-1];if(m!=null){var h=n(m,u-1),y=e*(m.coordinate+e*h/2-d);if(l[u-1]=m=qn(qn({},m),{},{tickCoord:y>0?m.coordinate-y*e:m.coordinate}),m.tickCoord!=null){var b=Cd(e,m.tickCoord,()=>h,c,d);b&&(d=m.tickCoord-e*(h/2+i),l[u-1]=qn(qn({},m),{},{isShow:!0}))}}}for(var w=o?u-1:u,A=function(j){var T=l[j];if(T==null)return 1;var O=T,N,_=()=>(N===void 0&&(N=n(T,j)),N);if(j===0){var M=e*(O.coordinate-e*_()/2-c);l[j]=O=qn(qn({},O),{},{tickCoord:M<0?O.coordinate-M*e:O.coordinate})}else l[j]=O=qn(qn({},O),{},{tickCoord:O.coordinate});if(O.tickCoord!=null){var R=Cd(e,O.tickCoord,_,c,d);R&&(c=O.tickCoord+e*(_()/2+i),l[j]=qn(qn({},O),{},{isShow:!0}))}},E=0;E<w;E++)A(E);return l}function b0e(e,t,n){var{tick:r,ticks:i,viewBox:o,minTickGap:l,orientation:u,interval:c,tickFormatter:d,unit:m,angle:h}=e;if(!i||!i.length||!r)return[];if(Oe(c)||Hd.isSsr){var y;return(y=f0e(i,Oe(c)?c:0))!==null&&y!==void 0?y:[]}var b=[],w=u==="top"||u==="bottom"?"width":"height",A=m&&w==="width"?Yf(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},E=(N,_)=>{var M=typeof d=="function"?d(N.value,_):N.value;return w==="width"?u0e(Yf(M,{fontSize:t,letterSpacing:n}),A,h):Yf(M,{fontSize:t,letterSpacing:n})[w]},C=i[0],j=i[1],T=i.length>=2&&C!=null&&j!=null?Oi(j.coordinate-C.coordinate):1,O=c0e(o,T,w);return c==="equidistantPreserveStart"?d0e(T,O,E,i,l):c==="equidistantPreserveEnd"?h0e(T,O,E,i,l):(c==="preserveStart"||c==="preserveStartEnd"?b=y0e(T,O,E,i,l,c==="preserveStartEnd"):b=v0e(T,O,E,i,l),b.filter(N=>N.isShow))}var x0e=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,l=0;if(t){Array.from(t).forEach(m=>{if(m){var h=m.getBoundingClientRect();h.width>l&&(l=h.width)}});var u=n?n.getBoundingClientRect().width:0,c=i+o,d=l+c+u+(n?r:0);return Math.round(d)}return 0},w0e={xAxis:{},yAxis:{}},Y6=Wn({name:"renderedTicks",initialState:w0e,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:i}=t.payload;e[n][r]=i},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:S0e,removeRenderedTicks:A0e}=Y6.actions,E0e=Y6.reducer,C0e=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function j0e(e,t){if(e==null)return{};var n,r,i=T0e(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function T0e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sl.apply(null,arguments)}function G2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G2(Object(n),!0).forEach(function(r){O0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O0e(e,t,n){return(t=P0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P0e(e){var t=N0e(e,"string");return typeof t=="symbol"?t:t+""}function N0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ll={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:nr.axis};function _0e(e){var{x:t,y:n,width:r,height:i,orientation:o,mirror:l,axisLine:u,otherSvgProps:c}=e;if(!u)return null;var d=zt(zt(zt({},c),Ri(u)),{},{fill:"none"});if(o==="top"||o==="bottom"){var m=+(o==="top"&&!l||o==="bottom"&&l);d=zt(zt({},d),{},{x1:t,y1:n+m*i,x2:t+r,y2:n+m*i})}else{var h=+(o==="left"&&!l||o==="right"&&l);d=zt(zt({},d),{},{x1:t+h*r,y1:n,x2:t+h*r,y2:n+i})}return v.createElement("line",Sl({},d,{className:ot("recharts-cartesian-axis-line",uv(u,"className"))}))}function M0e(e,t,n,r,i,o,l,u,c){var d,m,h,y,b,w,A=u?-1:1,E=e.tickSize||l,C=Oe(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":d=m=e.coordinate,y=n+ +!u*i,h=y-A*E,w=h-A*c,b=C;break;case"left":h=y=e.coordinate,m=t+ +!u*r,d=m-A*E,b=d-A*c,w=C;break;case"right":h=y=e.coordinate,m=t+ +u*r,d=m+A*E,b=d+A*c,w=C;break;default:d=m=e.coordinate,y=n+ +u*i,h=y+A*E,w=h+A*c,b=C;break}return{line:{x1:d,y1:h,x2:m,y2:y},tick:{x:b,y:w}}}function R0e(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function D0e(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function k0e(e){var{option:t,tickProps:n,value:r}=e,i,o=ot(n.className,"recharts-cartesian-axis-tick-value");if(v.isValidElement(t))i=v.cloneElement(t,zt(zt({},n),{},{className:o}));else if(typeof t=="function")i=t(zt(zt({},n),{},{className:o}));else{var l="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(l=ot(l,Qye(t))),i=v.createElement(mC,Sl({},n,{className:l}),r)}return i}function L0e(e){var{ticks:t,axisType:n,axisId:r}=e,i=Vt();return v.useEffect(()=>{if(r==null||n==null)return jl;var o=t.map(l=>({value:l.value,coordinate:l.coordinate,offset:l.offset,index:l.index}));return i(S0e({ticks:o,axisId:r,axisType:n})),()=>{i(A0e({axisId:r,axisType:n}))}},[i,t,r,n]),null}var I0e=v.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:i,stroke:o,tickFormatter:l,unit:u,padding:c,tickTextProps:d,orientation:m,mirror:h,x:y,y:b,width:w,height:A,tickSize:E,tickMargin:C,fontSize:j,letterSpacing:T,getTicksConfig:O,events:N,axisType:_,axisId:M}=e,R=b0e(zt(zt({},O),{},{ticks:n}),j,T),B=Ri(O),V=av(r),H=C6(B.textAnchor)?B.textAnchor:R0e(m,h),z=D0e(m,h),W={};typeof i=="object"&&(W=i);var Q=zt(zt({},B),{},{fill:"none"},W),se=R.map($=>zt({entry:$},M0e($,y,b,w,A,m,E,h,C))),L=se.map($=>{var{entry:ae,line:G}=$;return v.createElement(Ur,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(ae.value,"-").concat(ae.coordinate,"-").concat(ae.tickCoord)},i&&v.createElement("line",Sl({},Q,G,{className:ot("recharts-cartesian-axis-tick-line",uv(i,"className"))})))}),F=se.map(($,ae)=>{var G,k,{entry:I,tick:q}=$,ne=zt(zt(zt(zt({verticalAnchor:z},B),{},{textAnchor:H,stroke:"none",fill:o},q),{},{index:ae,payload:I,visibleTicksCount:R.length,tickFormatter:l,padding:c},d),{},{angle:(G=(k=d?.angle)!==null&&k!==void 0?k:B.angle)!==null&&G!==void 0?G:0}),de=zt(zt({},ne),V);return v.createElement(Ur,Sl({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(I.value,"-").concat(I.coordinate,"-").concat(I.tickCoord)},B4(N,I,ae)),r&&v.createElement(k0e,{option:r,tickProps:de,value:"".concat(typeof l=="function"?l(I.value,ae):I.value).concat(u||"")}))});return v.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(_,"-ticks")},v.createElement(L0e,{ticks:R,axisId:M,axisType:_}),F.length>0&&v.createElement(yo,{zIndex:nr.label},v.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(_,"-tick-labels"),ref:t},F)),L.length>0&&v.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(_,"-tick-lines")},L))}),z0e=v.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:l,ticks:u,axisType:c,axisId:d}=e,m=j0e(e,C0e),[h,y]=v.useState(""),[b,w]=v.useState(""),A=v.useRef(null);v.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var C;return x0e({ticks:A.current,label:(C=e.labelRef)===null||C===void 0?void 0:C.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var E=v.useCallback(C=>{if(C){var j=C.getElementsByClassName("recharts-cartesian-axis-tick-value");A.current=j;var T=j[0];if(T){var O=window.getComputedStyle(T),N=O.fontSize,_=O.letterSpacing;(N!==h||_!==b)&&(y(N),w(_))}}},[h,b]);return l||r!=null&&r<=0||i!=null&&i<=0?null:v.createElement(yo,{zIndex:e.zIndex},v.createElement(Ur,{className:ot("recharts-cartesian-axis",o)},v.createElement(_0e,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Ri(e)}),v.createElement(I0e,{ref:E,axisType:c,events:m,fontSize:h,getTicksConfig:e,height:e.height,letterSpacing:b,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:u,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:d}),v.createElement(Rye,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},v.createElement(Fye,{label:e.label,labelRef:e.labelRef}),e.children)))}),vC=v.forwardRef((e,t)=>{var n=Yn(e,ll);return v.createElement(z0e,Sl({},n,{ref:t}))});vC.displayName="CartesianAxis";var B0e={},W6=Wn({name:"errorBars",initialState:B0e,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:W1e,replaceErrorBar:X1e,removeErrorBar:Z1e}=W6.actions,$0e=W6.reducer,U0e=["children"];function V0e(e,t){if(e==null)return{};var n,r,i=F0e(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function F0e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var H0e={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},q0e=v.createContext(H0e);function K0e(e){var{children:t}=e,n=V0e(e,U0e);return v.createElement(q0e.Provider,{value:n},t)}function yC(e,t){var n,r,i=Me(d=>po(d,e)),o=Me(d=>go(d,t)),l=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:fn.allowDataOverflow,u=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:dn.allowDataOverflow,c=l||u;return{needClip:c,needClipX:l,needClipY:u}}function X6(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=Wv(),{needClipX:o,needClipY:l,needClip:u}=yC(t,n);if(!u||!i)return null;var{x:c,y:d,width:m,height:h}=i;return v.createElement("clipPath",{id:"clipPath-".concat(r)},v.createElement("rect",{x:o?c:c-m/2,y:l?d:d-h/2,width:o?m:m*2,height:l?h:h*2}))}var Z6=(e,t,n,r)=>Yv(e,"xAxis",t,r),Q6=(e,t,n,r)=>Gv(e,"xAxis",t,r),J6=(e,t,n,r)=>Yv(e,"yAxis",n,r),eV=(e,t,n,r)=>Gv(e,"yAxis",n,r),G0e=ee([yt,Z6,J6,Q6,eV],(e,t,n,r,i)=>Ii(e,"xAxis")?Gu(t,r,!1):Gu(n,i,!1)),Y0e=(e,t,n,r,i)=>i;function W0e(e){return e.type==="line"}var X0e=ee([ZE,Y0e],(e,t)=>e.filter(W0e).find(n=>n.id===t)),Z0e=ee([yt,Z6,J6,Q6,eV,X0e,G0e,qd],(e,t,n,r,i,o,l,u)=>{var{chartData:c,dataStartIndex:d,dataEndIndex:m}=u;if(!(o==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||l==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:h,data:y}=o,b;if(y!=null&&y.length>0?b=y:b=c?.slice(d,m+1),b!=null)return vxe({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:h,bandSize:l,displayedData:b})}});function tV(e){var t=av(e),n=3,r=2;if(t!=null){var{r:i,strokeWidth:o}=t,l=Number(i),u=Number(o);return(Number.isNaN(l)||l<0)&&(l=n),(Number.isNaN(u)||u<0)&&(u=r),{r:l,strokeWidth:u}}return{r:n,strokeWidth:r}}var Q0e=["id"],J0e=["type","layout","connectNulls","needClip","shape"],exe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function jd(){return jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jd.apply(null,arguments)}function Y2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y2(Object(n),!0).forEach(function(r){txe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function txe(e,t,n){return(t=nxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nxe(e){var t=rxe(e,"string");return typeof t=="symbol"?t:t+""}function rxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bC(e,t){if(e==null)return{};var n,r,i=ixe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ixe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var axe=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:xv(n,t),payload:e}]},oxe=v.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:l,hide:u,unit:c,tooltipType:d,id:m}=e,h={dataDefinedOnItem:n,getPosition:jl,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:xv(l,t),hide:u,type:d,color:r,unit:c,graphicalItemId:m}};return v.createElement(I6,{tooltipEntrySettings:h})}),nV=(e,t)=>"".concat(t,"px ").concat(e,"px");function sxe(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r.push(...n);return r}var lxe=(e,t,n)=>{var r=n.reduce((y,b)=>y+b,0);if(!r)return nV(t,e);for(var i=Math.floor(e/r),o=e%r,l=[],u=0,c=0;u<n.length;c+=(d=n[u])!==null&&d!==void 0?d:0,++u){var d,m=n[u];if(m!=null&&c+m>o){l=[...n.slice(0,u),o-c];break}}var h=l.length%2===0?[0,t]:[t];return[...sxe(n,i),...l,...h].map(y=>"".concat(y,"px")).join(", ")};function uxe(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:o,needClip:l}=r,{id:u}=r,c=bC(r,Q0e),d=Ri(c);return v.createElement(V6,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:d,needClip:l,clipPathId:t})}function cxe(e){var{showLabels:t,children:n,points:r}=e,i=v.useMemo(()=>r?.map(o=>{var l,u,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Qi(Qi({},c),{},{value:o.value,payload:o.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[r]);return v.createElement(M6,{value:t?i:void 0},n)}function W2(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:o}=e,{type:l,layout:u,connectNulls:c,needClip:d,shape:m}=o,h=bC(o,J0e),y=Qi(Qi({},Gn(h)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(t,")"):void 0,points:r,type:l,layout:u,connectNulls:c,strokeDasharray:i??o.strokeDasharray});return v.createElement(v.Fragment,null,r?.length>1&&v.createElement(vbe,jd({shapeType:"curve",option:m},y,{pathRef:n})),v.createElement(uxe,{points:r,clipPathId:t,props:o}))}function fxe(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function dxe(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:l,strokeDasharray:u,isAnimationActive:c,animationBegin:d,animationDuration:m,animationEasing:h,animateNewValues:y,width:b,height:w,onAnimationEnd:A,onAnimationStart:E}=n,C=i.current,j=Nv(l,"recharts-line-"),T=v.useRef(j),[O,N]=v.useState(!1),_=!O,M=v.useCallback(()=>{typeof A=="function"&&A(),N(!1)},[A]),R=v.useCallback(()=>{typeof E=="function"&&E(),N(!0)},[E]),B=fxe(r.current),V=v.useRef(0);T.current!==j&&(V.current=o.current,T.current=j);var H=V.current;return v.createElement(cxe,{points:l,showLabels:_},n.children,v.createElement(Pv,{animationId:j,begin:d,duration:m,isActive:c,easing:h,onAnimationEnd:M,onAnimationStart:R,key:j},z=>{var W=nn(H,B+H,z),Q=Math.min(W,B),se;if(c)if(u){var L="".concat(u).split(/[,\s]+/gim).map(ae=>parseFloat(ae));se=lxe(Q,B,L)}else se=nV(B,Q);else se=u==null?void 0:String(u);if(z>0&&B>0&&(i.current=l,o.current=Math.max(o.current,Q)),C){var F=C.length/l.length,$=z===1?l:l.map((ae,G)=>{var k=Math.floor(G*F);if(C[k]){var I=C[k];return Qi(Qi({},ae),{},{x:nn(I.x,ae.x,z),y:nn(I.y,ae.y,z)})}return y?Qi(Qi({},ae),{},{x:nn(b*2,ae.x,z),y:nn(w/2,ae.y,z)}):Qi(Qi({},ae),{},{x:ae.x,y:ae.y})});return i.current=$,v.createElement(W2,{props:n,points:$,clipPathId:t,pathRef:r,strokeDasharray:se})}return v.createElement(W2,{props:n,points:l,clipPathId:t,pathRef:r,strokeDasharray:se})}),v.createElement(D6,{label:n.label}))}function hxe(e){var{clipPathId:t,props:n}=e,r=v.useRef(null),i=v.useRef(0),o=v.useRef(null);return v.createElement(dxe,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:o})}var mxe=(e,t)=>{var n,r;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(r=e.y)!==null&&r!==void 0?r:void 0,value:e.value,errorVal:on(e.payload,t)}};class pxe extends v.Component{render(){var{hide:t,dot:n,points:r,className:i,xAxisId:o,yAxisId:l,top:u,left:c,width:d,height:m,id:h,needClip:y,zIndex:b}=this.props;if(t)return null;var w=ot("recharts-line",i),A=h,{r:E,strokeWidth:C}=tV(n),j=gC(n),T=E*2+C,O=y?"url(#clipPath-".concat(j?"":"dots-").concat(A,")"):void 0;return v.createElement(yo,{zIndex:b},v.createElement(Ur,{className:w},y&&v.createElement("defs",null,v.createElement(X6,{clipPathId:A,xAxisId:o,yAxisId:l}),!j&&v.createElement("clipPath",{id:"clipPath-dots-".concat(A)},v.createElement("rect",{x:c-T/2,y:u-T/2,width:d+T,height:m+T}))),v.createElement(K0e,{xAxisId:o,yAxisId:l,data:r,dataPointFormatter:mxe,errorBarOffset:0},v.createElement(hxe,{props:this.props,clipPathId:A}))),v.createElement(vS,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:O}))}}var rV={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:nr.line,type:"linear"};function gxe(e){var t=Yn(e,rV),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:l,connectNulls:u,dot:c,hide:d,isAnimationActive:m,label:h,legendType:y,xAxisId:b,yAxisId:w,id:A}=t,E=bC(t,exe),{needClip:C}=yC(b,w),j=Wv(),T=Tl(),O=or(),N=Me(V=>Z0e(V,b,w,O,A));if(T!=="horizontal"&&T!=="vertical"||N==null||j==null)return null;var{height:_,width:M,x:R,y:B}=j;return v.createElement(pxe,jd({},E,{id:A,connectNulls:u,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:l,isAnimationActive:m,hide:d,label:h,legendType:y,xAxisId:b,yAxisId:w,points:N,layout:T,height:_,width:M,left:R,top:B,needClip:C}))}function vxe(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:l,bandSize:u,displayedData:c}=e;return c.map((d,m)=>{var h=on(d,l);if(t==="horizontal"){var y=Jp({axis:n,ticks:i,bandSize:u,entry:d,index:m}),b=gn(h)?null:r.scale.map(h);return{x:y,y:b??null,value:h,payload:d}}var w=gn(h)?null:n.scale.map(h),A=Jp({axis:r,ticks:o,bandSize:u,entry:d,index:m});return w==null||A==null?null:{x:w,y:A,value:h,payload:d}}).filter(Boolean)}function yxe(e){var t=Yn(e,rV),n=or();return v.createElement(B6,{id:t.id,type:"line"},r=>v.createElement(v.Fragment,null,v.createElement(z6,{legendPayload:axe(t)}),v.createElement(oxe,{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:r}),v.createElement(U6,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),v.createElement(gxe,jd({},t,{id:r}))))}var iV=v.memo(yxe,hc);iV.displayName="Line";function xC(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:F6}function wC(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:F6}var aV=(e,t,n)=>Yv(e,"xAxis",xC(e,t),n),oV=(e,t,n)=>Gv(e,"xAxis",xC(e,t),n),sV=(e,t,n)=>Yv(e,"yAxis",wC(e,t),n),lV=(e,t,n)=>Gv(e,"yAxis",wC(e,t),n),bxe=ee([yt,aV,sV,oV,lV],(e,t,n,r,i)=>Ii(e,"xAxis")?Gu(t,r,!1):Gu(n,i,!1)),xxe=(e,t)=>t,uV=ee([ZE,xxe],(e,t)=>e.filter(n=>n.type==="area").find(n=>n.id===t)),cV=e=>{var t=yt(e),n=Ii(t,"xAxis");return n?"yAxis":"xAxis"},wxe=(e,t)=>{var n=cV(e);return n==="yAxis"?wC(e,t):xC(e,t)},Sxe=(e,t,n)=>xU(e,cV(e),wxe(e,t),n),Axe=ee([uV,Sxe],(e,t)=>{var n;if(!(e==null||t==null)){var{stackId:r}=e,i=AE(e);if(!(r==null||i==null)){var o=(n=t[r])===null||n===void 0?void 0:n.stackedData,l=o?.find(u=>u.key===i);if(l!=null)return l.map(u=>[u[0],u[1]])}}}),Exe=ee([yt,aV,sV,oV,lV,Axe,Nfe,bxe,uV,Bfe],(e,t,n,r,i,o,l,u,c,d)=>{var{chartData:m,dataStartIndex:h,dataEndIndex:y}=l;if(!(c==null||e!=="horizontal"&&e!=="vertical"||t==null||n==null||r==null||i==null||r.length===0||i.length===0||u==null)){var{data:b}=c,w;if(b&&b.length>0?w=b:w=m?.slice(h,y+1),w!=null)return Hxe({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:h,areaSettings:c,stackedData:o,displayedData:w,chartBaseValue:d,bandSize:u})}}),Cxe=["id"],jxe=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function ul(){return ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ul.apply(null,arguments)}function fV(e,t){if(e==null)return{};var n,r,i=Txe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Txe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function X2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ru(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X2(Object(n),!0).forEach(function(r){Oxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oxe(e,t,n){return(t=Pxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pxe(e){var t=Nxe(e,"string");return typeof t=="symbol"?t:t+""}function Nxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Og(e,t){return e&&e!=="none"?e:t}var _xe=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:o,hide:l}=e;return[{inactive:l,dataKey:t,type:o,color:Og(r,i),value:xv(n,t),payload:e}]},Mxe=v.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:l,hide:u,unit:c,tooltipType:d,id:m}=e,h={dataDefinedOnItem:n,getPosition:jl,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:xv(l,t),hide:u,type:d,color:Og(r,o),unit:c,graphicalItemId:m}};return v.createElement(I6,{tooltipEntrySettings:h})});function Rxe(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:o,dataKey:l}=r,u=Ri(r);return v.createElement(V6,{points:n,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:l,baseProps:u,needClip:i,clipPathId:t})}function Dxe(e){var{showLabels:t,children:n,points:r}=e,i=r.map(o=>{var l,u,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Ru(Ru({},c),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:c,fill:void 0})});return v.createElement(M6,{value:t?i:void 0},n)}function Z2(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:o}=e,{layout:l,type:u,stroke:c,connectNulls:d,isRange:m}=o,{id:h}=o,y=fV(o,Cxe),b=Ri(y),w=Gn(y);return v.createElement(v.Fragment,null,t?.length>1&&v.createElement(Ur,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},v.createElement(Kf,ul({},w,{id:h,points:t,connectNulls:d,type:u,baseLine:n,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&v.createElement(Kf,ul({},b,{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:t})),c!=="none"&&m&&Array.isArray(n)&&v.createElement(Kf,ul({},b,{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:n}))),v.createElement(Rxe,{points:t,props:y,clipPathId:i}))}function kxe(e){var t,n,{alpha:r,baseLine:i,points:o,strokeWidth:l}=e,u=(t=o[0])===null||t===void 0?void 0:t.y,c=(n=o[o.length-1])===null||n===void 0?void 0:n.y;if(!rt(u)||!rt(c))return null;var d=r*Math.abs(u-c),m=Math.max(...o.map(h=>h.x||0));return Oe(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(h=>h.x||0),m)),Oe(m)?v.createElement("rect",{x:0,y:u<c?u:u-d,width:m+(l?parseInt("".concat(l),10):1),height:Math.floor(d)}):null}function Lxe(e){var t,n,{alpha:r,baseLine:i,points:o,strokeWidth:l}=e,u=(t=o[0])===null||t===void 0?void 0:t.x,c=(n=o[o.length-1])===null||n===void 0?void 0:n.x;if(!rt(u)||!rt(c))return null;var d=r*Math.abs(u-c),m=Math.max(...o.map(h=>h.y||0));return Oe(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(h=>h.y||0),m)),Oe(m)?v.createElement("rect",{x:u<c?u:u-d,y:0,width:d,height:Math.floor(m+(l?parseInt("".concat(l),10):1))}):null}function Ixe(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:o}=e;return n==="vertical"?v.createElement(kxe,{alpha:t,points:r,baseLine:i,strokeWidth:o}):v.createElement(Lxe,{alpha:t,points:r,baseLine:i,strokeWidth:o})}function zxe(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o}=e,{points:l,baseLine:u,isAnimationActive:c,animationBegin:d,animationDuration:m,animationEasing:h,onAnimationStart:y,onAnimationEnd:b}=r,w=v.useMemo(()=>({points:l,baseLine:u}),[l,u]),A=Nv(w,"recharts-area-"),E=cE(),[C,j]=v.useState(!1),T=!C,O=v.useCallback(()=>{typeof b=="function"&&b(),j(!1)},[b]),N=v.useCallback(()=>{typeof y=="function"&&y(),j(!0)},[y]);if(E==null)return null;var _=i.current,M=o.current;return v.createElement(Dxe,{showLabels:T,points:l},r.children,v.createElement(Pv,{animationId:A,begin:d,duration:m,isActive:c,easing:h,onAnimationEnd:O,onAnimationStart:N,key:A},R=>{if(_){var B=_.length/l.length,V=R===1?l:l.map((z,W)=>{var Q=Math.floor(W*B);if(_[Q]){var se=_[Q];return Ru(Ru({},z),{},{x:nn(se.x,z.x,R),y:nn(se.y,z.y,R)})}return z}),H;return Oe(u)?H=nn(M,u,R):gn(u)||ha(u)?H=nn(M,0,R):H=u.map((z,W)=>{var Q=Math.floor(W*B);if(Array.isArray(M)&&M[Q]){var se=M[Q];return Ru(Ru({},z),{},{x:nn(se.x,z.x,R),y:nn(se.y,z.y,R)})}return z}),R>0&&(i.current=V,o.current=H),v.createElement(Z2,{points:V,baseLine:H,needClip:t,clipPathId:n,props:r})}return R>0&&(i.current=l,o.current=u),v.createElement(Ur,null,c&&v.createElement("defs",null,v.createElement("clipPath",{id:"animationClipPath-".concat(n)},v.createElement(Ixe,{alpha:R,points:l,baseLine:u,layout:E,strokeWidth:r.strokeWidth}))),v.createElement(Ur,{clipPath:"url(#animationClipPath-".concat(n,")")},v.createElement(Z2,{points:l,baseLine:u,needClip:t,clipPathId:n,props:r})))}),v.createElement(D6,{label:r.label}))}function Bxe(e){var{needClip:t,clipPathId:n,props:r}=e,i=v.useRef(null),o=v.useRef();return v.createElement(zxe,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o})}class $xe extends v.PureComponent{render(){var{hide:t,dot:n,points:r,className:i,top:o,left:l,needClip:u,xAxisId:c,yAxisId:d,width:m,height:h,id:y,baseLine:b,zIndex:w}=this.props;if(t)return null;var A=ot("recharts-area",i),E=y,{r:C,strokeWidth:j}=tV(n),T=gC(n),O=C*2+j,N=u?"url(#clipPath-".concat(T?"":"dots-").concat(E,")"):void 0;return v.createElement(yo,{zIndex:w},v.createElement(Ur,{className:A},u&&v.createElement("defs",null,v.createElement(X6,{clipPathId:E,xAxisId:c,yAxisId:d}),!T&&v.createElement("clipPath",{id:"clipPath-dots-".concat(E)},v.createElement("rect",{x:l-O/2,y:o-O/2,width:m+O,height:h+O}))),v.createElement(Bxe,{needClip:u,clipPathId:E,props:this.props})),v.createElement(vS,{points:r,mainColor:Og(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:N}),this.props.isRange&&Array.isArray(b)&&v.createElement(vS,{points:b,mainColor:Og(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:N}))}}var Uxe={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:nr.area};function Vxe(e){var t,{activeDot:n,animationBegin:r,animationDuration:i,animationEasing:o,connectNulls:l,dot:u,fill:c,fillOpacity:d,hide:m,isAnimationActive:h,legendType:y,stroke:b,xAxisId:w,yAxisId:A}=e,E=fV(e,jxe),C=Tl(),j=c6(),{needClip:T}=yC(w,A),O=or(),{points:N,isRange:_,baseLine:M}=(t=Me(W=>Exe(W,e.id,O)))!==null&&t!==void 0?t:{},R=Wv();if(C!=="horizontal"&&C!=="vertical"||R==null||j!=="AreaChart"&&j!=="ComposedChart")return null;var{height:B,width:V,x:H,y:z}=R;return!N||!N.length?null:v.createElement($xe,ul({},E,{activeDot:n,animationBegin:r,animationDuration:i,animationEasing:o,baseLine:M,connectNulls:l,dot:u,fill:c,fillOpacity:d,height:B,hide:m,layout:C,isAnimationActive:h,isRange:_,legendType:y,needClip:T,points:N,stroke:b,width:V,left:H,top:z,xAxisId:w,yAxisId:A}))}var Fxe=(e,t,n,r,i)=>{var o=n??t;if(Oe(o))return o;var l=e==="horizontal"?i:r,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return o==="dataMin"?d:o==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]};function Hxe(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:o,chartBaseValue:l,xAxis:u,yAxis:c,displayedData:d,dataStartIndex:m,xAxisTicks:h,yAxisTicks:y,bandSize:b}=e,w=i&&i.length,A=Fxe(o,l,n,u,c),E=o==="horizontal",C=!1,j=d.map((O,N)=>{var _,M,R,B;if(w)B=i[m+N];else{var V=on(O,r);Array.isArray(V)?(B=V,C=!0):B=[A,V]}var H=(_=(M=B)===null||M===void 0?void 0:M[1])!==null&&_!==void 0?_:null,z=H==null||w&&!t&&on(O,r)==null;if(E){var W;return{x:Jp({axis:u,ticks:h,bandSize:b,entry:O,index:N}),y:z?null:(W=c.scale.map(H))!==null&&W!==void 0?W:null,value:B,payload:O}}return{x:z?null:(R=u.scale.map(H))!==null&&R!==void 0?R:null,y:Jp({axis:c,ticks:y,bandSize:b,entry:O,index:N}),value:B,payload:O}}),T;return w||C?T=j.map(O=>{var N,_=Array.isArray(O.value)?O.value[0]:null;if(E){var M;return{x:O.x,y:_!=null&&O.y!=null&&(M=c.scale.map(_))!==null&&M!==void 0?M:null,payload:O.payload}}return{x:_!=null&&(N=u.scale.map(_))!==null&&N!==void 0?N:null,y:O.y,payload:O.payload}}):T=E?c.scale.map(A):u.scale.map(A),{points:j,baseLine:T??0,isRange:C}}function qxe(e){var t=Yn(e,Uxe),n=or();return v.createElement(B6,{id:t.id,type:"area"},r=>v.createElement(v.Fragment,null,v.createElement(z6,{legendPayload:_xe(t)}),v.createElement(Mxe,{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:r}),v.createElement(U6,{type:"area",id:r,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:wle(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),v.createElement(Vxe,ul({},t,{id:r}))))}var SC=v.memo(qxe,hc);SC.displayName="Area";var Kxe=["domain","range"],Gxe=["domain","range"];function Q2(e,t){if(e==null)return{};var n,r,i=Yxe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function J2(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 dV(e,t){if(e===t)return!0;var{domain:n,range:r}=e,i=Q2(e,Kxe),{domain:o,range:l}=t,u=Q2(t,Gxe);return!J2(n,o)||!J2(r,l)?!1:hc(i,u)}var Wxe=["type"],Xxe=["dangerouslySetInnerHTML","ticks","scale"],Zxe=["id","scale"];function yS(){return yS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yS.apply(null,arguments)}function eL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eL(Object(n),!0).forEach(function(r){Qxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qxe(e,t,n){return(t=Jxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jxe(e){var t=ewe(e,"string");return typeof t=="symbol"?t:t+""}function ewe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bS(e,t){if(e==null)return{};var n,r,i=twe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function twe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function nwe(e){var t=Vt(),n=v.useRef(null),r=cE(),{type:i}=e,o=bS(e,Wxe),l=Rv(r,"xAxis",i),u=v.useMemo(()=>{if(l!=null)return tL(tL({},o),{},{type:l})},[o,l]);return v.useLayoutEffect(()=>{u!=null&&(n.current===null?t($be(u)):n.current!==u&&t(Ube({prev:n.current,next:u})),n.current=u)},[u,t]),v.useLayoutEffect(()=>()=>{n.current&&(t(Vbe(n.current)),n.current=null)},[t]),null}var rwe=e=>{var{xAxisId:t,className:n}=e,r=Me(RB),i=or(),o="xAxis",l=Me(C=>UU(C,o,t,i)),u=Me(C=>ppe(C,t)),c=Me(C=>wpe(C,t)),d=Me(C=>sU(C,t));if(u==null||c==null||d==null)return null;var{dangerouslySetInnerHTML:m,ticks:h,scale:y}=e,b=bS(e,Xxe),{id:w,scale:A}=d,E=bS(d,Zxe);return v.createElement(vC,yS({},b,E,{x:c.x,y:c.y,width:u.width,height:u.height,className:ot("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:l,axisType:o,axisId:t}))},iwe={allowDataOverflow:fn.allowDataOverflow,allowDecimals:fn.allowDecimals,allowDuplicatedCategory:fn.allowDuplicatedCategory,angle:fn.angle,axisLine:ll.axisLine,height:fn.height,hide:!1,includeHidden:fn.includeHidden,interval:fn.interval,label:!1,minTickGap:fn.minTickGap,mirror:fn.mirror,orientation:fn.orientation,padding:fn.padding,reversed:fn.reversed,scale:fn.scale,tick:fn.tick,tickCount:fn.tickCount,tickLine:ll.tickLine,tickSize:ll.tickSize,type:fn.type,niceTicks:fn.niceTicks,xAxisId:0},awe=e=>{var t=Yn(e,iwe);return v.createElement(v.Fragment,null,v.createElement(nwe,{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}),v.createElement(rwe,t))},AC=v.memo(awe,dV);AC.displayName="XAxis";var owe=["type"],swe=["dangerouslySetInnerHTML","ticks","scale"],lwe=["id","scale"];function xS(){return xS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xS.apply(null,arguments)}function nL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nL(Object(n),!0).forEach(function(r){uwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uwe(e,t,n){return(t=cwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cwe(e){var t=fwe(e,"string");return typeof t=="symbol"?t:t+""}function fwe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wS(e,t){if(e==null)return{};var n,r,i=dwe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dwe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function hwe(e){var t=Vt(),n=v.useRef(null),r=cE(),{type:i}=e,o=wS(e,owe),l=Rv(r,"yAxis",i),u=v.useMemo(()=>{if(l!=null)return rL(rL({},o),{},{type:l})},[l,o]);return v.useLayoutEffect(()=>{u!=null&&(n.current===null?t(Fbe(u)):n.current!==u&&t(Hbe({prev:n.current,next:u})),n.current=u)},[u,t]),v.useLayoutEffect(()=>()=>{n.current&&(t(qbe(n.current)),n.current=null)},[t]),null}function mwe(e){var{yAxisId:t,className:n,width:r,label:i}=e,o=v.useRef(null),l=v.useRef(null),u=Me(RB),c=or(),d=Vt(),m="yAxis",h=Me(_=>Epe(_,t)),y=Me(_=>Ape(_,t)),b=Me(_=>UU(_,m,t,c)),w=Me(_=>lU(_,t));if(v.useLayoutEffect(()=>{if(!(r!=="auto"||!h||pC(i)||v.isValidElement(i)||w==null)){var _=o.current;if(_){var M=_.getCalculatedWidth();Math.round(h.width)!==Math.round(M)&&d(Kbe({id:t,width:M}))}}},[b,h,d,i,t,r,w]),h==null||y==null||w==null)return null;var{dangerouslySetInnerHTML:A,ticks:E,scale:C}=e,j=wS(e,swe),{id:T,scale:O}=w,N=wS(w,lwe);return v.createElement(vC,xS({},j,N,{ref:o,labelRef:l,x:y.x,y:y.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:h.width,height:h.height,className:ot("recharts-".concat(m," ").concat(m),n),viewBox:u,ticks:b,axisType:m,axisId:t}))}var pwe={allowDataOverflow:dn.allowDataOverflow,allowDecimals:dn.allowDecimals,allowDuplicatedCategory:dn.allowDuplicatedCategory,angle:dn.angle,axisLine:ll.axisLine,hide:!1,includeHidden:dn.includeHidden,interval:dn.interval,label:!1,minTickGap:dn.minTickGap,mirror:dn.mirror,orientation:dn.orientation,padding:dn.padding,reversed:dn.reversed,scale:dn.scale,tick:dn.tick,tickCount:dn.tickCount,tickLine:ll.tickLine,tickSize:ll.tickSize,type:dn.type,niceTicks:dn.niceTicks,width:dn.width,yAxisId:0},gwe=e=>{var t=Yn(e,pwe);return v.createElement(v.Fragment,null,v.createElement(hwe,{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}),v.createElement(mwe,t))},Pg=v.memo(gwe,dV);Pg.displayName="YAxis";var vwe=(e,t)=>t,EC=ee([vwe,yt,A$,Sn,i6,vo,Kge,Un],Jge);function ywe(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function CC(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(ywe(e)){var i=e.currentTarget.getBBox();n=i.width>0?t.width/i.width:1,r=i.height>0?t.height/i.height:1}else{var o=e.currentTarget;n=o.offsetWidth>0?t.width/o.offsetWidth:1,r=o.offsetHeight>0?t.height/o.offsetHeight:1}var l=(u,c)=>({relativeX:Math.round((u-t.left)/n),relativeY:Math.round((c-t.top)/r)});return"touches"in e?Array.from(e.touches).map(u=>l(u.clientX,u.clientY)):l(e.clientX,e.clientY)}var hV=Vr("mouseClick"),mV=$d();mV.startListening({actionCreator:hV,effect:(e,t)=>{var n=e.payload,r=EC(t.getState(),CC(n));r?.activeIndex!=null&&t.dispatch(Bpe({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var SS=Vr("mouseMove"),pV=$d(),Su=null,zs=null,Pw=null;pV.startListening({actionCreator:SS,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,l=o==="all"||o?.includes("mousemove");Su!==null&&(cancelAnimationFrame(Su),Su=null),zs!==null&&(typeof i!="number"||!l)&&(clearTimeout(zs),zs=null),Pw=CC(n);var u=()=>{var c=t.getState(),d=Jd(c,c.tooltip.settings.shared);if(!Pw){Su=null,zs=null;return}if(d==="axis"){var m=EC(c,Pw);m?.activeIndex!=null?t.dispatch(YU({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(GU())}Su=null,zs=null};if(!l){u();return}i==="raf"?Su=requestAnimationFrame(u):typeof i=="number"&&zs===null&&(zs=setTimeout(u,i))}});function bwe(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 iL={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},gV=Wn({name:"rootProps",initialState:iL,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:iL.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}}}),xwe=gV.reducer,{updateOptions:wwe}=gV.actions,Swe=null,Awe={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)},vV=Wn({name:"polarOptions",initialState:Swe,reducers:Awe}),{updatePolarOptions:Q1e}=vV.actions,Ewe=vV.reducer,yV=Vr("keyDown"),bV=Vr("focus"),xV=Vr("blur"),Xv=$d(),Au=null,Bs=null,Ym=null;Xv.startListening({actionCreator:yV,effect:(e,t)=>{Ym=e.payload,Au!==null&&(cancelAnimationFrame(Au),Au=null);var n=t.getState(),{throttleDelay:r,throttledEvents:i}=n.eventSettings,o=i==="all"||i.includes("keydown");Bs!==null&&(typeof r!="number"||!o)&&(clearTimeout(Bs),Bs=null);var l=()=>{try{var u=t.getState(),c=u.rootProps.accessibilityLayer!==!1;if(!c)return;var{keyboardInteraction:d}=u.tooltip,m=Ym;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var h=Gf(d,wl(u),Ju(u),ec(u)),y=h==null?-1:Number(h),b=!Number.isFinite(y)||y<0,w=vo(u),A=wl(u),E=Jd(u,u.tooltip.settings.shared);if(m==="Enter"){if(b)return;var C=Ag(u,E,"hover",String(d.index));t.dispatch(Sg({active:!d.active,activeIndex:d.index,activeCoordinate:C}));return}var j=Ppe(u),T=j==="left-to-right"?1:-1,O=m==="ArrowRight"?1:-1,N;if(b){var _=Ju(u),M=ec(u),R=O*T,B=Q=>({active:!1,index:String(Q),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(N=-1,R>0){for(var V=0;V<A.length;V++)if(Gf(B(V),A,_,M)!=null){N=V;break}}else for(var H=A.length-1;H>=0;H--)if(Gf(B(H),A,_,M)!=null){N=H;break}if(N<0)return}else{N=y+O*T;var z=w?.length||A.length;if(z===0||N>=z||N<0)return}var W=Ag(u,E,"hover",String(N));t.dispatch(Sg({active:!0,activeIndex:N.toString(),activeCoordinate:W}))}finally{Au=null,Bs=null}};if(!o){l();return}r==="raf"?Au=requestAnimationFrame(l):typeof r=="number"&&Bs===null&&(l(),Ym=null,Bs=setTimeout(()=>{Ym?l():(Bs=null,Au=null)},r))}});Xv.startListening({actionCreator:bV,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",l=Jd(n,n.tooltip.settings.shared),u=Ag(n,l,"hover",String(o));t.dispatch(Sg({active:!0,activeIndex:o,activeCoordinate:u}))}}}});Xv.startListening({actionCreator:xV,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;i.active&&t.dispatch(Sg({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function wV(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var i=Reflect.get(n,r);return typeof i=="function"?i.bind(n):i}})}var ai=Vr("externalEvent"),SV=$d(),Wm=new Map,_f=new Map,Nw=new Map;SV.startListening({actionCreator:ai,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var i=r.type,o=wV(r);Nw.set(i,{handler:n,reactEvent:o});var l=Wm.get(i);l!==void 0&&(cancelAnimationFrame(l),Wm.delete(i));var u=t.getState(),{throttleDelay:c,throttledEvents:d}=u.eventSettings,m=d,h=m==="all"||m?.includes(i),y=_f.get(i);y!==void 0&&(typeof c!="number"||!h)&&(clearTimeout(y),_f.delete(i));var b=()=>{var E=Nw.get(i);try{if(!E)return;var{handler:C,reactEvent:j}=E,T=t.getState(),O={activeCoordinate:_ge(T),activeDataKey:Oge(T),activeIndex:Ad(T),activeLabel:s6(T),activeTooltipIndex:Ad(T),isTooltipActive:Mge(T)};C&&C(O,j)}finally{Wm.delete(i),_f.delete(i),Nw.delete(i)}};if(!h){b();return}if(c==="raf"){var w=requestAnimationFrame(b);Wm.set(i,w)}else if(typeof c=="number"){if(!_f.has(i)){b();var A=setTimeout(b,c);_f.set(i,A)}}else b()}}});var Cwe=ee([wc],e=>e.tooltipItemPayloads),jwe=ee([Cwe,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(o=>o.settings.graphicalItemId===n);if(r!=null){var{getPosition:i}=r;if(i!=null)return i(t)}}}),AV=Vr("touchMove"),EV=$d(),$s=null,Yo=null,aL=null,Mf=null;EV.startListening({actionCreator:AV,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){Mf=wV(n);var r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,l=o==="all"||o.includes("touchmove");$s!==null&&(cancelAnimationFrame($s),$s=null),Yo!==null&&(typeof i!="number"||!l)&&(clearTimeout(Yo),Yo=null),aL=Array.from(n.touches).map(c=>CC({clientX:c.clientX,clientY:c.clientY,currentTarget:n.currentTarget}));var u=()=>{if(Mf!=null){var c=t.getState(),d=Jd(c,c.tooltip.settings.shared);if(d==="axis"){var m,h=(m=aL)===null||m===void 0?void 0:m[0];if(h==null){$s=null,Yo=null;return}var y=EC(c,h);y?.activeIndex!=null&&t.dispatch(YU({activeIndex:y.activeIndex,activeDataKey:void 0,activeCoordinate:y.activeCoordinate}))}else if(d==="item"){var b,w=Mf.touches[0];if(document.elementFromPoint==null||w==null)return;var A=document.elementFromPoint(w.clientX,w.clientY);if(!A||!A.getAttribute)return;var E=A.getAttribute(Ole),C=(b=A.getAttribute(Ple))!==null&&b!==void 0?b:void 0,j=Nl(c).find(N=>N.id===C);if(E==null||j==null||C==null)return;var{dataKey:T}=j,O=jwe(c,E,C);t.dispatch(zpe({activeDataKey:T,activeIndex:E,activeCoordinate:O,activeGraphicalItemId:C}))}$s=null,Yo=null}};if(!l){u();return}i==="raf"?$s=requestAnimationFrame(u):typeof i=="number"&&Yo===null&&(u(),Mf=null,Yo=setTimeout(()=>{Mf?u():(Yo=null,$s=null)},i))}}});var CV={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},jV=Wn({name:"eventSettings",initialState:CV,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:Twe}=jV.actions,Owe=jV.reducer,Pwe=rB({brush:n0e,cartesianAxis:Gbe,chartData:Pve,errorBars:$0e,eventSettings:Owe,graphicalItems:jbe,layout:dle,legend:Aue,options:Eve,polarAxis:Zye,polarOptions:Ewe,referenceElements:o0e,renderedTicks:E0e,rootProps:xwe,tooltip:$pe,zIndex:dve}),Nwe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Ise({reducer:Pwe,preloadedState:t,middleware:r=>{var i;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([mV.middleware,pV.middleware,Xv.middleware,SV.middleware,EV.middleware])},enhancers:r=>{var i=r;return typeof r=="function"&&(i=r()),i.concat(yB({type:"raf"}))},devTools:{serialize:{replacer:bwe},name:"recharts-".concat(n)}})};function _we(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=or(),o=v.useRef(null);if(i)return n;o.current==null&&(o.current=Nwe(t,r));var l=tE;return v.createElement(Uue,{context:l,store:o.current},n)}function Mwe(e){var{layout:t,margin:n}=e,r=Vt(),i=or();return v.useEffect(()=>{i||(r(ule(t)),r(lle(n)))},[r,i,t,n]),null}var Rwe=v.memo(Mwe,hc);function Dwe(e){var t=Vt();return v.useEffect(()=>{t(wwe(e))},[t,e]),null}var kwe=e=>{var t=Vt();return v.useEffect(()=>{t(Twe(e))},[t,e]),null},Lwe=v.memo(kwe,hc);function oL(e){var{zIndex:t,isPanorama:n}=e,r=v.useRef(null),i=Vt();return v.useLayoutEffect(()=>(r.current&&i(cve({zIndex:t,element:r.current,isPanorama:n})),()=>{i(fve({zIndex:t,isPanorama:n}))}),[i,t,n]),v.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function sL(e){var{children:t,isPanorama:n}=e,r=Me(tve);if(!r||r.length===0)return t;var i=r.filter(l=>l<0),o=r.filter(l=>l>0);return v.createElement(v.Fragment,null,i.map(l=>v.createElement(oL,{key:l,zIndex:l,isPanorama:n})),t,o.map(l=>v.createElement(oL,{key:l,zIndex:l,isPanorama:n})))}var Iwe=["children"];function zwe(e,t){if(e==null)return{};var n,r,i=Bwe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bwe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ng(){return Ng=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ng.apply(null,arguments)}var $we={width:"100%",height:"100%",display:"block"},Uwe=v.forwardRef((e,t)=>{var n=zB(),r=BB(),i=XB();if(!us(n)||!us(r))return null;var{children:o,otherAttributes:l,title:u,desc:c}=e,d,m;return l!=null&&(typeof l.tabIndex=="number"?d=l.tabIndex:d=i?0:void 0,typeof l.role=="string"?m=l.role:m=i?"application":void 0),v.createElement(qA,Ng({},l,{title:u,desc:c,role:m,tabIndex:d,width:n,height:r,style:$we,ref:t}),o)}),Vwe=e=>{var{children:t}=e,n=Me(Ev);if(!n)return null;var{width:r,height:i,y:o,x:l}=n;return v.createElement(qA,{width:r,height:i,x:l,y:o},t)},lL=v.forwardRef((e,t)=>{var{children:n}=e,r=zwe(e,Iwe),i=or();return i?v.createElement(Vwe,null,v.createElement(sL,{isPanorama:!0},n)):v.createElement(Uwe,Ng({ref:t},r),v.createElement(sL,{isPanorama:!1},n))});function Fwe(){var e=Vt(),[t,n]=v.useState(null),r=Me(Tle);return v.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;rt(o)&&o!==r&&e(fle(o))}},[t,e,r]),n}function uL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hwe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uL(Object(n),!0).forEach(function(r){qwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qwe(e,t,n){return(t=Kwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kwe(e){var t=Gwe(e,"string");return typeof t=="symbol"?t:t+""}function Gwe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rs.apply(null,arguments)}var Ywe=()=>(zve(),null);function _g(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Wwe=v.forwardRef((e,t)=>{var n,r,i=v.useRef(null),[o,l]=v.useState({containerWidth:_g((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:_g((r=e.style)===null||r===void 0?void 0:r.height)}),u=v.useCallback((d,m)=>{l(h=>{var y=Math.round(d),b=Math.round(m);return h.containerWidth===y&&h.containerHeight===b?h:{containerWidth:y,containerHeight:b}})},[]),c=v.useCallback(d=>{if(typeof t=="function"&&t(d),i.current!=null&&(i.current.disconnect(),i.current=null),d!=null&&typeof ResizeObserver<"u"){var{width:m,height:h}=d.getBoundingClientRect();u(m,h);var y=w=>{var A=w[0];if(A!=null){var{width:E,height:C}=A.contentRect;u(E,C)}},b=new ResizeObserver(y);b.observe(d),i.current=b}},[t,u]);return v.useEffect(()=>()=>{var d=i.current;d?.disconnect()},[u]),v.createElement(v.Fragment,null,v.createElement(Vd,{width:o.containerWidth,height:o.containerHeight}),v.createElement("div",rs({ref:c},e)))}),Xwe=v.forwardRef((e,t)=>{var{width:n,height:r}=e,[i,o]=v.useState({containerWidth:_g(n),containerHeight:_g(r)}),l=v.useCallback((c,d)=>{o(m=>{var h=Math.round(c),y=Math.round(d);return m.containerWidth===h&&m.containerHeight===y?m:{containerWidth:h,containerHeight:y}})},[]),u=v.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:d,height:m}=c.getBoundingClientRect();l(d,m)}},[t,l]);return v.createElement(v.Fragment,null,v.createElement(Vd,{width:i.containerWidth,height:i.containerHeight}),v.createElement("div",rs({ref:u},e)))}),Zwe=v.forwardRef((e,t)=>{var{width:n,height:r}=e;return v.createElement(v.Fragment,null,v.createElement(Vd,{width:n,height:r}),v.createElement("div",rs({ref:t},e)))}),Qwe=v.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?v.createElement(Xwe,rs({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?v.createElement(Zwe,rs({},e,{width:n,height:r,ref:t})):v.createElement(v.Fragment,null,v.createElement(Vd,{width:n,height:r}),v.createElement("div",rs({ref:t},e)))});function Jwe(e){return e?Wwe:Qwe}var e1e=v.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:l,onDoubleClick:u,onMouseDown:c,onMouseEnter:d,onMouseLeave:m,onMouseMove:h,onMouseUp:y,onTouchEnd:b,onTouchMove:w,onTouchStart:A,style:E,width:C,responsive:j,dispatchTouchEvents:T=!0}=e,O=v.useRef(null),N=Vt(),[_,M]=v.useState(null),[R,B]=v.useState(null),V=Fwe(),H=lE(),z=H?.width>0?H.width:C,W=H?.height>0?H.height:i,Q=v.useCallback(le=>{V(le),typeof t=="function"&&t(le),M(le),B(le),le!=null&&(O.current=le)},[V,t,M,B]),se=v.useCallback(le=>{N(hV(le)),N(ai({handler:o,reactEvent:le}))},[N,o]),L=v.useCallback(le=>{N(SS(le)),N(ai({handler:d,reactEvent:le}))},[N,d]),F=v.useCallback(le=>{N(GU()),N(ai({handler:m,reactEvent:le}))},[N,m]),$=v.useCallback(le=>{N(SS(le)),N(ai({handler:h,reactEvent:le}))},[N,h]),ae=v.useCallback(()=>{N(bV())},[N]),G=v.useCallback(()=>{N(xV())},[N]),k=v.useCallback(le=>{N(yV(le.key))},[N]),I=v.useCallback(le=>{N(ai({handler:l,reactEvent:le}))},[N,l]),q=v.useCallback(le=>{N(ai({handler:u,reactEvent:le}))},[N,u]),ne=v.useCallback(le=>{N(ai({handler:c,reactEvent:le}))},[N,c]),de=v.useCallback(le=>{N(ai({handler:y,reactEvent:le}))},[N,y]),pe=v.useCallback(le=>{N(ai({handler:A,reactEvent:le}))},[N,A]),X=v.useCallback(le=>{T&&N(AV(le)),N(ai({handler:w,reactEvent:le}))},[N,T,w]),he=v.useCallback(le=>{N(ai({handler:b,reactEvent:le}))},[N,b]),oe=Jwe(j);return v.createElement(p6.Provider,{value:_},v.createElement(v4.Provider,{value:R},v.createElement(oe,{width:z??E?.width,height:W??E?.height,className:ot("recharts-wrapper",r),style:Hwe({position:"relative",cursor:"default",width:z,height:W},E),onClick:se,onContextMenu:I,onDoubleClick:q,onFocus:ae,onBlur:G,onKeyDown:k,onMouseDown:ne,onMouseEnter:L,onMouseLeave:F,onMouseMove:$,onMouseUp:de,onTouchEnd:he,onTouchMove:X,onTouchStart:pe,ref:Q},v.createElement(Ywe,null),n)))}),t1e=["width","height","responsive","children","className","style","compact","title","desc"];function n1e(e,t){if(e==null)return{};var n,r,i=r1e(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function r1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var i1e=v.forwardRef((e,t)=>{var{width:n,height:r,responsive:i,children:o,className:l,style:u,compact:c,title:d,desc:m}=e,h=n1e(e,t1e),y=Ri(h);return c?v.createElement(v.Fragment,null,v.createElement(Vd,{width:n,height:r}),v.createElement(lL,{otherAttributes:y,title:d,desc:m},o)):v.createElement(e1e,{className:l,style:u,width:n,height:r,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},v.createElement(lL,{otherAttributes:y,title:d,desc:m,ref:t},v.createElement(l0e,null,o)))});function AS(){return AS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AS.apply(null,arguments)}function cL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function a1e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cL(Object(n),!0).forEach(function(r){o1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function o1e(e,t,n){return(t=s1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s1e(e){var t=l1e(e,"string");return typeof t=="symbol"?t:t+""}function l1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var u1e={top:5,right:5,bottom:5,left:5},c1e=a1e({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:u1e,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},CV),TV=v.forwardRef(function(t,n){var r,i=Yn(t.categoricalChartProps,c1e),{chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:u,tooltipPayloadSearcher:c,categoricalChartProps:d}=t,m={chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:u,tooltipPayloadSearcher:c,eventEmitter:void 0};return v.createElement(_we,{preloadedState:{options:m},reduxStoreName:(r=d.id)!==null&&r!==void 0?r:o},v.createElement(t0e,{chartData:d.data}),v.createElement(Rwe,{layout:i.layout,margin:i.margin}),v.createElement(Lwe,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),v.createElement(Dwe,{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}),v.createElement(i1e,AS({},i,{ref:n})))}),f1e=["axis"],d1e=v.forwardRef((e,t)=>v.createElement(TV,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:f1e,tooltipPayloadSearcher:g6,categoricalChartProps:e,ref:t})),h1e=["axis"],m1e=v.forwardRef((e,t)=>v.createElement(TV,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:h1e,tooltipPayloadSearcher:g6,categoricalChartProps:e,ref:t}));function p1e(e,t){if(t){const r=/(\d{2}):00/.exec(e)??/T(\d{2})/.exec(e);return r?`${r[1]}:00`:e}const n=/(\d{2})-(\d{2})$/.exec(e);return n?`${n[1]}-${n[2]}`:e}function g1e(e,t){const n=t.active,r=t.payload,i=t.label;if(!n||!r?.length)return null;const o=r[0]?.payload;return o?g.jsxs("div",{className:"bg-popover text-popover-foreground rounded-md border px-3 py-2 text-xs shadow-md",children:[g.jsx("div",{className:"mb-1 font-medium",children:String(i??"")}),g.jsxs("div",{className:"space-y-0.5",children:[g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-muted-foreground",children:e("statistics.costUnits")}),g.jsx("span",{className:"tabular-nums font-medium",children:o.premium_consumed})]}),g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-muted-foreground",children:e("statistics.requestCount")}),g.jsx("span",{className:"tabular-nums font-medium",children:o.request_count})]}),g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-muted-foreground",children:e("statistics.tokensTotal")}),g.jsx("span",{className:"tabular-nums font-medium",children:o.tokens_total})]}),g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-muted-foreground",children:e("statistics.errorCount")}),g.jsx("span",{className:"tabular-nums font-medium",children:o.error_count})]})]})]}):null}function v1e({data:e,isHourly:t=!1}){const{t:n}=We(),r=v.useMemo(()=>e.map(i=>({...i,label:p1e(i.date,t)})),[e,t]);return g.jsxs(pn,{children:[g.jsx(Rn,{children:g.jsx(Dn,{children:n("statistics.premiumUsage")})}),g.jsx(kn,{children:r.length===0?g.jsx("div",{className:"text-muted-foreground flex h-64 items-center justify-center text-sm",children:n("statistics.noData")}):g.jsx(IB,{width:"100%",height:320,children:g.jsxs(m1e,{data:r,margin:{top:5,right:10,left:0,bottom:5},children:[g.jsx(AC,{dataKey:"label",tick:{fontSize:12},tickLine:!1,axisLine:!1}),g.jsx(Pg,{yAxisId:"cost",tick:{fontSize:12},tickLine:!1,axisLine:!1,width:50}),g.jsx(Pg,{yAxisId:"count",orientation:"right",tick:{fontSize:12},tickLine:!1,axisLine:!1,width:50}),g.jsx(b6,{content:i=>g1e(n,i)}),g.jsx(SC,{yAxisId:"cost",type:"monotone",dataKey:"premium_consumed",name:n("statistics.costUnits"),fill:"var(--color-chart-1)",fillOpacity:.2,stroke:"var(--color-chart-1)",strokeWidth:2}),g.jsx(iV,{yAxisId:"count",type:"monotone",dataKey:"request_count",name:n("statistics.requestCount"),stroke:"var(--color-chart-2)",strokeWidth:2,strokeDasharray:"5 3",dot:!1})]})})})]})}const Xm=["var(--color-chart-1)","var(--color-chart-2)","var(--color-chart-3)","var(--color-chart-4)","var(--color-chart-5)"],fL=["#2563eb","#16a34a","#ea580c","#8b5cf6","#0891b2"];function y1e(e,t){const n=t.active,r=t.payload,i=t.label;if(!n||!r?.length)return null;const o=r[0]?.payload;return o?g.jsxs("div",{className:"bg-popover text-popover-foreground rounded-md border px-3 py-2 text-xs shadow-md",children:[g.jsx("div",{className:"mb-1 font-medium",children:String(i??"")}),g.jsx("div",{className:"space-y-0.5",children:e.map((l,u)=>g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("span",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"inline-block h-2 w-2 rounded-full",style:{backgroundColor:fL[u%fL.length]}}),g.jsx("span",{className:"text-muted-foreground",children:l})]}),g.jsx("span",{className:"tabular-nums font-medium",children:o[l]??0})]},l))})]}):null}function b1e(e,t){if(t){const r=/(\d{2}):00/.exec(e)??/T(\d{2})/.exec(e);return r?`${r[1]}:00`:e}const n=/(\d{2})-(\d{2})$/.exec(e);return n?`${n[1]}-${n[2]}`:e}function x1e({data:e,isHourly:t=!1}){const{t:n}=We(),{pivoted:r,accountIds:i}=v.useMemo(()=>{const o=new Map,l=new Set;for(const d of e){l.add(d.account_id);let m=o.get(d.date);m||(m={},o.set(d.date,m)),m[d.account_id]=d.premium_consumed}const u=[...l];return{pivoted:[...o.entries()].sort(([d],[m])=>d.localeCompare(m)).map(([d,m])=>{const h={label:b1e(d,t)};for(const y of u)h[y]=m[y]??0;return h}),accountIds:u}},[e,t]);return g.jsxs(pn,{children:[g.jsx(Rn,{children:g.jsx(Dn,{children:n("statistics.accountUsage")})}),g.jsx(kn,{children:r.length===0?g.jsx("div",{className:"text-muted-foreground flex h-64 items-center justify-center text-sm",children:n("statistics.noData")}):g.jsx(IB,{width:"100%",height:320,children:g.jsxs(d1e,{data:r,margin:{top:5,right:10,left:0,bottom:5},children:[g.jsx(AC,{dataKey:"label",tick:{fontSize:12},tickLine:!1,axisLine:!1}),g.jsx(Pg,{tick:{fontSize:12},tickLine:!1,axisLine:!1,width:50}),g.jsx(b6,{content:o=>y1e(i,o)}),g.jsx(YB,{wrapperStyle:{fontSize:"0.75rem"}}),i.map((o,l)=>g.jsx(SC,{type:"monotone",dataKey:o,name:o,stackId:"1",fill:Xm[l%Xm.length],fillOpacity:.3,stroke:Xm[l%Xm.length],strokeWidth:1.5},o))]})})})]})}function Zm(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}function w1e(e,t,n){const r=new Date,i=Zm(r);if(e==="24h"){const o=new Date(r.getTime()-864e5);return{from:Zm(o),to:i,granularity:"hour"}}if(e==="7d"){const o=new Date(r.getTime()-6048e5);return{from:Zm(o),to:i,granularity:"day"}}if(e==="month"){const o=new Date(r.getFullYear(),r.getMonth(),1);return{from:Zm(o),to:i,granularity:"day"}}return{from:t||i,to:n||i,granularity:"day"}}function S1e(){const{t:e}=We(),[t,n]=v.useState("7d"),[r,i]=v.useState(""),[o,l]=v.useState(""),[u,c]=v.useState(0),[d,m]=v.useState(!1),[h,y]=v.useState([]),[b,w]=v.useState([]),[A,E]=v.useState(!1),C=v.useRef(!1),j=v.useRef(null),T=v.useCallback(async()=>{if(!C.current){C.current=!0,m(!0);try{const O=w1e(t,r,o),N=await Nne({from:O.from,to:O.to,granularity:O.granularity});y(N.daily),w(N.by_account),E(O.granularity==="hour")}catch(O){const N=O instanceof di?O.message:String(O);Ut.error(jt.t("statistics.loadFailed"),{description:N})}finally{C.current=!1,m(!1)}}},[t,r,o]);return v.useEffect(()=>{T()},[T]),v.useEffect(()=>{let O=!1;if(j.current&&(clearTimeout(j.current),j.current=null),u>0){const N=()=>{O||(j.current=setTimeout(async()=>{if(C.current){N();return}try{await T()}finally{N()}},u))};N()}return()=>{O=!0,j.current&&(clearTimeout(j.current),j.current=null)}},[u,T]),g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[g.jsx("h1",{className:"text-xl font-semibold",children:e("statistics.title")}),g.jsx("div",{className:"flex items-center gap-2",children:g.jsxs(In,{value:t,onValueChange:O=>n(O),children:[g.jsx(Bn,{size:"sm",className:"w-32",children:g.jsx(zn,{})}),g.jsxs($n,{children:[g.jsx(Te,{value:"24h",children:e("statistics.timeRange.24h")}),g.jsx(Te,{value:"7d",children:e("statistics.timeRange.7d")}),g.jsx(Te,{value:"month",children:e("statistics.timeRange.month")}),g.jsx(Te,{value:"custom",children:e("statistics.timeRange.custom")})]})]})}),t==="custom"&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{type:"date",value:r,onChange:O=>i(O.target.value),className:"border-input bg-background text-foreground h-8 rounded-md border px-2 text-sm"}),g.jsx("span",{className:"text-muted-foreground text-sm",children:"-"}),g.jsx("input",{type:"date",value:o,onChange:O=>l(O.target.value),className:"border-input bg-background text-foreground h-8 rounded-md border px-2 text-sm"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[u>0&&g.jsxs("span",{className:"relative flex h-2 w-2",children:[g.jsx("span",{className:"bg-primary absolute inline-flex h-full w-full rounded-full opacity-75 motion-safe:animate-ping"}),g.jsx("span",{className:"bg-primary relative inline-flex h-2 w-2 rounded-full"})]}),g.jsxs(In,{value:String(u),onValueChange:O=>c(Number(O)),children:[g.jsx(Bn,{size:"sm",className:"w-40",children:g.jsx(zn,{})}),g.jsxs($n,{children:[g.jsx(Te,{value:"0",children:e("statistics.autoRefresh.off")}),g.jsx(Te,{value:"30000",children:e("statistics.autoRefresh.30s")}),g.jsx(Te,{value:"60000",children:e("statistics.autoRefresh.60s")}),g.jsx(Te,{value:"300000",children:e("statistics.autoRefresh.5m")})]})]})]})]}),d&&h.length===0?g.jsxs("div",{className:"space-y-6",children:[g.jsx("div",{className:"bg-muted h-[380px] animate-pulse rounded-xl"}),g.jsx("div",{className:"bg-muted h-[380px] animate-pulse rounded-xl"})]}):g.jsxs(g.Fragment,{children:[g.jsx(v1e,{data:h,isHourly:A}),g.jsx(x1e,{data:b,isHourly:A})]})]})}function A1e(){return g.jsx(WH,{children:g.jsxs(Zi,{element:g.jsx(Wne,{}),children:[g.jsx(Zi,{path:"/",element:g.jsx(KH,{to:"/accounts",replace:!0})}),g.jsx(Zi,{path:"/accounts",element:g.jsx(Ire,{})}),g.jsx(Zi,{path:"/requests",element:g.jsx(wie,{})}),g.jsx(Zi,{path:"/statistics",element:g.jsx(S1e,{})}),g.jsx(Zi,{path:"/models",element:g.jsx(Hre,{})}),g.jsx(Zi,{path:"/settings",element:g.jsx(eae,{})}),g.jsx(Zi,{path:"/request/:requestId",element:g.jsx(Xre,{})}),g.jsx(Zi,{path:"*",element:g.jsx(qre,{})})]})})}const E1e=({...e})=>{const{resolvedTheme:t}=DL(),n=t==="dark"?"dark":t==="light"?"light":"system";return g.jsx(wne,{theme:n,className:"toaster group",icons:{success:g.jsx(LS,{className:"size-4"}),info:g.jsx(XL,{className:"size-4"}),warning:g.jsx(ZL,{className:"size-4"}),error:g.jsx(IS,{className:"size-4"}),loading:g.jsx($u,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},OV=document.querySelector("#root");if(!OV)throw new Error("Root element not found");GF.createRoot(OV).render(g.jsx(v.StrictMode,{children:g.jsx(Rq,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:g.jsx(TJ,{children:g.jsx(Sne,{children:g.jsxs(Jne,{children:[g.jsx(Sre,{children:g.jsx(xq,{children:g.jsx(A1e,{})})}),g.jsx(E1e,{})]})})})})}));
|