(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();var Zc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Am={exports:{}},hs={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Dw;function HD(){if(Dw)return hs;Dw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,l,o){var c=null;if(o!==void 0&&(c=""+o),l.key!==void 0&&(c=""+l.key),"key"in l){o={};for(var d in l)d!=="key"&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:e,type:r,key:c,ref:l!==void 0?l:null,props:o}}return hs.Fragment=t,hs.jsx=n,hs.jsxs=n,hs}var $w;function GD(){return $w||($w=1,Am.exports=HD()),Am.exports}var u=GD(),Nm={exports:{}},Re={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var qw;function YD(){if(qw)return Re;qw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function j(L){return L===null||typeof L!="object"?null:(L=g&&L[g]||L["@@iterator"],typeof L=="function"?L:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,x={};function O(L,F,q){this.props=L,this.context=F,this.refs=x,this.updater=q||S}O.prototype.isReactComponent={},O.prototype.setState=function(L,F){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,F,"setState")},O.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function w(){}w.prototype=O.prototype;function E(L,F,q){this.props=L,this.context=F,this.refs=x,this.updater=q||S}var M=E.prototype=new w;M.constructor=E,_(M,O.prototype),M.isPureReactComponent=!0;var A=Array.isArray;function C(){}var k={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function B(L,F,q){var de=q.ref;return{$$typeof:e,type:L,key:F,ref:de!==void 0?de:null,props:q}}function Z(L,F){return B(L.type,F,L.props)}function G(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function H(L){var F={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(q){return F[q]})}var W=/\/+/g;function Q(L,F){return typeof L=="object"&&L!==null&&L.key!=null?H(""+L.key):F.toString(36)}function D(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(C,C):(L.status="pending",L.then(function(F){L.status==="pending"&&(L.status="fulfilled",L.value=F)},function(F){L.status==="pending"&&(L.status="rejected",L.reason=F)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function P(L,F,q,de,ge){var we=typeof L;(we==="undefined"||we==="boolean")&&(L=null);var $e=!1;if(L===null)$e=!0;else switch(we){case"bigint":case"string":case"number":$e=!0;break;case"object":switch(L.$$typeof){case e:case t:$e=!0;break;case v:return $e=L._init,P($e(L._payload),F,q,de,ge)}}if($e)return ge=ge(L),$e=de===""?"."+Q(L,0):de,A(ge)?(q="",$e!=null&&(q=$e.replace(W,"$&/")+"/"),P(ge,F,q,"",function(Te){return Te})):ge!=null&&(G(ge)&&(ge=Z(ge,q+(ge.key==null||L&&L.key===ge.key?"":(""+ge.key).replace(W,"$&/")+"/")+$e)),F.push(ge)),1;$e=0;var Ge=de===""?".":de+":";if(A(L))for(var me=0;me<L.length;me++)de=L[me],we=Ge+Q(de,me),$e+=P(de,F,q,we,ge);else if(me=j(L),typeof me=="function")for(L=me.call(L),me=0;!(de=L.next()).done;)de=de.value,we=Ge+Q(de,me++),$e+=P(de,F,q,we,ge);else if(we==="object"){if(typeof L.then=="function")return P(D(L),F,q,de,ge);throw F=String(L),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return $e}function $(L,F,q){if(L==null)return L;var de=[],ge=0;return P(L,de,"","",function(we){return F.call(q,we,ge++)}),de}function U(L){if(L._status===-1){var F=L._result;F=F(),F.then(function(q){(L._status===0||L._status===-1)&&(L._status=1,L._result=q)},function(q){(L._status===0||L._status===-1)&&(L._status=2,L._result=q)}),L._status===-1&&(L._status=0,L._result=F)}if(L._status===1)return L._result.default;throw L._result}var ie=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},fe={map:$,forEach:function(L,F,q){$(L,function(){F.apply(this,arguments)},q)},count:function(L){var F=0;return $(L,function(){F++}),F},toArray:function(L){return $(L,function(F){return F})||[]},only:function(L){if(!G(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Re.Activity=m,Re.Children=fe,Re.Component=O,Re.Fragment=n,Re.Profiler=l,Re.PureComponent=E,Re.StrictMode=r,Re.Suspense=h,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,Re.__COMPILER_RUNTIME={__proto__:null,c:function(L){return k.H.useMemoCache(L)}},Re.cache=function(L){return function(){return L.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(L,F,q){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var de=_({},L.props),ge=L.key;if(F!=null)for(we in F.key!==void 0&&(ge=""+F.key),F)!z.call(F,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&F.ref===void 0||(de[we]=F[we]);var we=arguments.length-2;if(we===1)de.children=q;else if(1<we){for(var $e=Array(we),Ge=0;Ge<we;Ge++)$e[Ge]=arguments[Ge+2];de.children=$e}return B(L.type,ge,de)},Re.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},Re.createElement=function(L,F,q){var de,ge={},we=null;if(F!=null)for(de in F.key!==void 0&&(we=""+F.key),F)z.call(F,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(ge[de]=F[de]);var $e=arguments.length-2;if($e===1)ge.children=q;else if(1<$e){for(var Ge=Array($e),me=0;me<$e;me++)Ge[me]=arguments[me+2];ge.children=Ge}if(L&&L.defaultProps)for(de in $e=L.defaultProps,$e)ge[de]===void 0&&(ge[de]=$e[de]);return B(L,we,ge)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(L){return{$$typeof:d,render:L}},Re.isValidElement=G,Re.lazy=function(L){return{$$typeof:v,_payload:{_status:-1,_result:L},_init:U}},Re.memo=function(L,F){return{$$typeof:p,type:L,compare:F===void 0?null:F}},Re.startTransition=function(L){var F=k.T,q={};k.T=q;try{var de=L(),ge=k.S;ge!==null&&ge(q,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(C,ie)}catch(we){ie(we)}finally{F!==null&&q.types!==null&&(F.types=q.types),k.T=F}},Re.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},Re.use=function(L){return k.H.use(L)},Re.useActionState=function(L,F,q){return k.H.useActionState(L,F,q)},Re.useCallback=function(L,F){return k.H.useCallback(L,F)},Re.useContext=function(L){return k.H.useContext(L)},Re.useDebugValue=function(){},Re.useDeferredValue=function(L,F){return k.H.useDeferredValue(L,F)},Re.useEffect=function(L,F){return k.H.useEffect(L,F)},Re.useEffectEvent=function(L){return k.H.useEffectEvent(L)},Re.useId=function(){return k.H.useId()},Re.useImperativeHandle=function(L,F,q){return k.H.useImperativeHandle(L,F,q)},Re.useInsertionEffect=function(L,F){return k.H.useInsertionEffect(L,F)},Re.useLayoutEffect=function(L,F){return k.H.useLayoutEffect(L,F)},Re.useMemo=function(L,F){return k.H.useMemo(L,F)},Re.useOptimistic=function(L,F){return k.H.useOptimistic(L,F)},Re.useReducer=function(L,F,q){return k.H.useReducer(L,F,q)},Re.useRef=function(L){return k.H.useRef(L)},Re.useState=function(L){return k.H.useState(L)},Re.useSyncExternalStore=function(L,F,q){return k.H.useSyncExternalStore(L,F,q)},Re.useTransition=function(){return k.H.useTransition()},Re.version="19.2.8",Re}var zw;function m0(){return zw||(zw=1,Nm.exports=YD()),Nm.exports}var T=m0();const Y=rt(T);var Em={exports:{}},ps={},Tm={exports:{}},Cm={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Lw;function VD(){return Lw||(Lw=1,(function(e){function t(P,$){var U=P.length;P.push($);e:for(;0<U;){var ie=U-1>>>1,fe=P[ie];if(0<l(fe,$))P[ie]=$,P[U]=fe,U=ie;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var $=P[0],U=P.pop();if(U!==$){P[0]=U;e:for(var ie=0,fe=P.length,L=fe>>>1;ie<L;){var F=2*(ie+1)-1,q=P[F],de=F+1,ge=P[de];if(0>l(q,U))de<fe&&0>l(ge,q)?(P[ie]=ge,P[de]=U,ie=de):(P[ie]=q,P[F]=U,ie=F);else if(de<fe&&0>l(ge,U))P[ie]=ge,P[de]=U,ie=de;else break e}}return $}function l(P,$){var U=P.sortIndex-$.sortIndex;return U!==0?U:P.id-$.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 c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var h=[],p=[],v=1,m=null,g=3,j=!1,S=!1,_=!1,x=!1,O=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function M(P){for(var $=n(p);$!==null;){if($.callback===null)r(p);else if($.startTime<=P)r(p),$.sortIndex=$.expirationTime,t(h,$);else break;$=n(p)}}function A(P){if(_=!1,M(P),!S)if(n(h)!==null)S=!0,C||(C=!0,H());else{var $=n(p);$!==null&&D(A,$.startTime-P)}}var C=!1,k=-1,z=5,B=-1;function Z(){return x?!0:!(e.unstable_now()-B<z)}function G(){if(x=!1,C){var P=e.unstable_now();B=P;var $=!0;try{e:{S=!1,_&&(_=!1,w(k),k=-1),j=!0;var U=g;try{t:{for(M(P),m=n(h);m!==null&&!(m.expirationTime>P&&Z());){var ie=m.callback;if(typeof ie=="function"){m.callback=null,g=m.priorityLevel;var fe=ie(m.expirationTime<=P);if(P=e.unstable_now(),typeof fe=="function"){m.callback=fe,M(P),$=!0;break t}m===n(h)&&r(h),M(P)}else r(h);m=n(h)}if(m!==null)$=!0;else{var L=n(p);L!==null&&D(A,L.startTime-P),$=!1}}break e}finally{m=null,g=U,j=!1}$=void 0}}finally{$?H():C=!1}}}var H;if(typeof E=="function")H=function(){E(G)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Q=W.port2;W.port1.onmessage=G,H=function(){Q.postMessage(null)}}else H=function(){O(G,0)};function D(P,$){k=O(function(){P(e.unstable_now())},$)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(P){switch(g){case 1:case 2:case 3:var $=3;break;default:$=g}var U=g;g=$;try{return P()}finally{g=U}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(P,$){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var U=g;g=P;try{return $()}finally{g=U}},e.unstable_scheduleCallback=function(P,$,U){var ie=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?ie+U:ie):U=ie,P){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=U+fe,P={id:v++,callback:$,priorityLevel:P,startTime:U,expirationTime:fe,sortIndex:-1},U>ie?(P.sortIndex=U,t(p,P),n(h)===null&&P===n(p)&&(_?(w(k),k=-1):_=!0,D(A,U-ie))):(P.sortIndex=fe,t(h,P),S||j||(S=!0,C||(C=!0,H()))),P},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(P){var $=g;return function(){var U=g;g=$;try{return P.apply(this,arguments)}finally{g=U}}}})(Cm)),Cm}var Bw;function FD(){return Bw||(Bw=1,Tm.exports=VD()),Tm.exports}var Mm={exports:{}},an={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Uw;function KD(){if(Uw)return an;Uw=1;var e=m0();function t(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+h+"; visit "+p+" 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},l=Symbol.for("react.portal");function o(h,p,v){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:m==null?null:""+m,children:h,containerInfo:p,implementation:v}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return an.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,an.createPortal=function(h,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return o(h,p,null,v)},an.flushSync=function(h){var p=c.T,v=r.p;try{if(c.T=null,r.p=2,h)return h()}finally{c.T=p,r.p=v,r.d.f()}},an.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(h,p))},an.prefetchDNS=function(h){typeof h=="string"&&r.d.D(h)},an.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var v=p.as,m=d(v,p.crossOrigin),g=typeof p.integrity=="string"?p.integrity:void 0,j=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;v==="style"?r.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:j}):v==="script"&&r.d.X(h,{crossOrigin:m,integrity:g,fetchPriority:j,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},an.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var v=d(p.as,p.crossOrigin);r.d.M(h,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(h)},an.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var v=p.as,m=d(v,p.crossOrigin);r.d.L(h,v,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},an.preloadModule=function(h,p){if(typeof h=="string")if(p){var v=d(p.as,p.crossOrigin);r.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(h)},an.requestFormReset=function(h){r.d.r(h)},an.unstable_batchedUpdates=function(h,p){return h(p)},an.useFormState=function(h,p,v){return c.H.useFormState(h,p,v)},an.useFormStatus=function(){return c.H.useHostTransitionStatus()},an.version="19.2.8",an}var Iw;function XD(){if(Iw)return Mm.exports;Iw=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(),Mm.exports=KD(),Mm.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Hw;function ZD(){if(Hw)return ps;Hw=1;var e=FD(),t=m0(),n=XD();function r(a){var i="https://react.dev/errors/"+a;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+a+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var i=a,s=a;if(a.alternate)for(;i.return;)i=i.return;else{a=i;do i=a,(i.flags&4098)!==0&&(s=i.return),a=i.return;while(a)}return i.tag===3?s:null}function c(a){if(a.tag===13){var i=a.memoizedState;if(i===null&&(a=a.alternate,a!==null&&(i=a.memoizedState)),i!==null)return i.dehydrated}return null}function d(a){if(a.tag===31){var i=a.memoizedState;if(i===null&&(a=a.alternate,a!==null&&(i=a.memoizedState)),i!==null)return i.dehydrated}return null}function h(a){if(o(a)!==a)throw Error(r(188))}function p(a){var i=a.alternate;if(!i){if(i=o(a),i===null)throw Error(r(188));return i!==a?null:a}for(var s=a,f=i;;){var y=s.return;if(y===null)break;var b=y.alternate;if(b===null){if(f=y.return,f!==null){s=f;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===s)return h(y),a;if(b===f)return h(y),i;b=b.sibling}throw Error(r(188))}if(s.return!==f.return)s=y,f=b;else{for(var N=!1,R=y.child;R;){if(R===s){N=!0,s=y,f=b;break}if(R===f){N=!0,f=y,s=b;break}R=R.sibling}if(!N){for(R=b.child;R;){if(R===s){N=!0,s=b,f=y;break}if(R===f){N=!0,f=b,s=y;break}R=R.sibling}if(!N)throw Error(r(189))}}if(s.alternate!==f)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?a:i}function v(a){var i=a.tag;if(i===5||i===26||i===27||i===6)return a;for(a=a.child;a!==null;){if(i=v(a),i!==null)return i;a=a.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),E=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function H(a){return a===null||typeof a!="object"?null:(a=G&&a[G]||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 _:return"Fragment";case O:return"Profiler";case x:return"StrictMode";case A:return"Suspense";case C:return"SuspenseList";case B:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case S:return"Portal";case E:return a.displayName||"Context";case w:return(a._context.displayName||"Context")+".Consumer";case M:var i=a.render;return a=a.displayName,a||(a=i.displayName||i.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case k:return i=a.displayName||null,i!==null?i:Q(a.type)||"Memo";case z:i=a._payload,a=a._init;try{return Q(a(i))}catch{}}return null}var D=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},ie=[],fe=-1;function L(a){return{current:a}}function F(a){0>fe||(a.current=ie[fe],ie[fe]=null,fe--)}function q(a,i){fe++,ie[fe]=a.current,a.current=i}var de=L(null),ge=L(null),we=L(null),$e=L(null);function Ge(a,i){switch(q(we,i),q(ge,a),q(de,null),i.nodeType){case 9:case 11:a=(a=i.documentElement)&&(a=a.namespaceURI)?aw(a):0;break;default:if(a=i.tagName,i=i.namespaceURI)i=aw(i),a=iw(i,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}F(de),q(de,a)}function me(){F(de),F(ge),F(we)}function Te(a){a.memoizedState!==null&&q($e,a);var i=de.current,s=iw(i,a.type);i!==s&&(q(ge,a),q(de,s))}function Me(a){ge.current===a&&(F(de),F(ge)),$e.current===a&&(F($e),us._currentValue=U)}var he,st;function ae(a){if(he===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);he=i&&i[1]||"",st=-1<s.stack.indexOf(`
    at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
`+he+a+st}var Ke=!1;function St(a,i){if(!a||Ke)return"";Ke=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(i){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(re){var ne=re}Reflect.construct(a,[],ue)}else{try{ue.call()}catch(re){ne=re}a.call(ue.prototype)}}else{try{throw Error()}catch(re){ne=re}(ue=a())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(re){if(re&&ne&&typeof re.stack=="string")return[re.stack,ne.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=f.DetermineComponentFrameRoot(),N=b[0],R=b[1];if(N&&R){var I=N.split(`
`),ee=R.split(`
`);for(y=f=0;f<I.length&&!I[f].includes("DetermineComponentFrameRoot");)f++;for(;y<ee.length&&!ee[y].includes("DetermineComponentFrameRoot");)y++;if(f===I.length||y===ee.length)for(f=I.length-1,y=ee.length-1;1<=f&&0<=y&&I[f]!==ee[y];)y--;for(;1<=f&&0<=y;f--,y--)if(I[f]!==ee[y]){if(f!==1||y!==1)do if(f--,y--,0>y||I[f]!==ee[y]){var le=`
`+I[f].replace(" at new "," at ");return a.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",a.displayName)),le}while(1<=f&&0<=y);break}}}finally{Ke=!1,Error.prepareStackTrace=s}return(s=a?a.displayName||a.name:"")?ae(s):""}function nn(a,i){switch(a.tag){case 26:case 27:case 5:return ae(a.type);case 16:return ae("Lazy");case 13:return a.child!==i&&i!==null?ae("Suspense Fallback"):ae("Suspense");case 19:return ae("SuspenseList");case 0:case 15:return St(a.type,!1);case 11:return St(a.type.render,!1);case 1:return St(a.type,!0);case 31:return ae("Activity");default:return""}}function ar(a){try{var i="",s=null;do i+=nn(a,s),s=a,a=a.return;while(a);return i}catch(f){return`
Error generating stack: `+f.message+`
`+f.stack}}var yr=Object.prototype.hasOwnProperty,ca=e.unstable_scheduleCallback,ir=e.unstable_cancelCallback,Tr=e.unstable_shouldYield,xo=e.unstable_requestPaint,rn=e.unstable_now,ku=e.unstable_getCurrentPriorityLevel,$1=e.unstable_ImmediatePriority,q1=e.unstable_UserBlockingPriority,Ru=e.unstable_NormalPriority,wP=e.unstable_LowPriority,z1=e.unstable_IdlePriority,OP=e.log,AP=e.unstable_setDisableYieldValue,jo=null,On=null;function fa(a){if(typeof OP=="function"&&AP(a),On&&typeof On.setStrictMode=="function")try{On.setStrictMode(jo,a)}catch{}}var An=Math.clz32?Math.clz32:TP,NP=Math.log,EP=Math.LN2;function TP(a){return a>>>=0,a===0?32:31-(NP(a)/EP|0)|0}var Pu=256,Du=262144,$u=4194304;function Xa(a){var i=a&42;if(i!==0)return i;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 qu(a,i,s){var f=a.pendingLanes;if(f===0)return 0;var y=0,b=a.suspendedLanes,N=a.pingedLanes;a=a.warmLanes;var R=f&134217727;return R!==0?(f=R&~b,f!==0?y=Xa(f):(N&=R,N!==0?y=Xa(N):s||(s=R&~a,s!==0&&(y=Xa(s))))):(R=f&~b,R!==0?y=Xa(R):N!==0?y=Xa(N):s||(s=f&~a,s!==0&&(y=Xa(s)))),y===0?0:i!==0&&i!==y&&(i&b)===0&&(b=y&-y,s=i&-i,b>=s||b===32&&(s&4194048)!==0)?i:y}function _o(a,i){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&i)===0}function CP(a,i){switch(a){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 L1(){var a=$u;return $u<<=1,($u&62914560)===0&&($u=4194304),a}function ph(a){for(var i=[],s=0;31>s;s++)i.push(a);return i}function So(a,i){a.pendingLanes|=i,i!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function MP(a,i,s,f,y,b){var N=a.pendingLanes;a.pendingLanes=s,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=s,a.entangledLanes&=s,a.errorRecoveryDisabledLanes&=s,a.shellSuspendCounter=0;var R=a.entanglements,I=a.expirationTimes,ee=a.hiddenUpdates;for(s=N&~s;0<s;){var le=31-An(s),ue=1<<le;R[le]=0,I[le]=-1;var ne=ee[le];if(ne!==null)for(ee[le]=null,le=0;le<ne.length;le++){var re=ne[le];re!==null&&(re.lane&=-536870913)}s&=~ue}f!==0&&B1(a,f,0),b!==0&&y===0&&a.tag!==0&&(a.suspendedLanes|=b&~(N&~i))}function B1(a,i,s){a.pendingLanes|=i,a.suspendedLanes&=~i;var f=31-An(i);a.entangledLanes|=i,a.entanglements[f]=a.entanglements[f]|1073741824|s&261930}function U1(a,i){var s=a.entangledLanes|=i;for(a=a.entanglements;s;){var f=31-An(s),y=1<<f;y&i|a[f]&i&&(a[f]|=i),s&=~y}}function I1(a,i){var s=i&-i;return s=(s&42)!==0?1:mh(s),(s&(a.suspendedLanes|i))!==0?0:s}function mh(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 vh(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function H1(){var a=$.p;return a!==0?a:(a=window.event,a===void 0?32:Ew(a.type))}function G1(a,i){var s=$.p;try{return $.p=a,i()}finally{$.p=s}}var da=Math.random().toString(36).slice(2),Xt="__reactFiber$"+da,hn="__reactProps$"+da,Li="__reactContainer$"+da,yh="__reactEvents$"+da,kP="__reactListeners$"+da,RP="__reactHandles$"+da,Y1="__reactResources$"+da,wo="__reactMarker$"+da;function gh(a){delete a[Xt],delete a[hn],delete a[yh],delete a[kP],delete a[RP]}function Bi(a){var i=a[Xt];if(i)return i;for(var s=a.parentNode;s;){if(i=s[Li]||s[Xt]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(a=dw(a);a!==null;){if(s=a[Xt])return s;a=dw(a)}return i}a=s,s=a.parentNode}return null}function Ui(a){if(a=a[Xt]||a[Li]){var i=a.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return a}return null}function Oo(a){var i=a.tag;if(i===5||i===26||i===27||i===6)return a.stateNode;throw Error(r(33))}function Ii(a){var i=a[Y1];return i||(i=a[Y1]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Gt(a){a[wo]=!0}var V1=new Set,F1={};function Za(a,i){Hi(a,i),Hi(a+"Capture",i)}function Hi(a,i){for(F1[a]=i,a=0;a<i.length;a++)V1.add(i[a])}var PP=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]*$"),K1={},X1={};function DP(a){return yr.call(X1,a)?!0:yr.call(K1,a)?!1:PP.test(a)?X1[a]=!0:(K1[a]=!0,!1)}function zu(a,i,s){if(DP(i))if(s===null)a.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":a.removeAttribute(i);return;case"boolean":var f=i.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){a.removeAttribute(i);return}}a.setAttribute(i,""+s)}}function Lu(a,i,s){if(s===null)a.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(i);return}a.setAttribute(i,""+s)}}function Cr(a,i,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.setAttributeNS(i,s,""+f)}}function Ln(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Z1(a){var i=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function $P(a,i,s){var f=Object.getOwnPropertyDescriptor(a.constructor.prototype,i);if(!a.hasOwnProperty(i)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var y=f.get,b=f.set;return Object.defineProperty(a,i,{configurable:!0,get:function(){return y.call(this)},set:function(N){s=""+N,b.call(this,N)}}),Object.defineProperty(a,i,{enumerable:f.enumerable}),{getValue:function(){return s},setValue:function(N){s=""+N},stopTracking:function(){a._valueTracker=null,delete a[i]}}}}function bh(a){if(!a._valueTracker){var i=Z1(a)?"checked":"value";a._valueTracker=$P(a,i,""+a[i])}}function W1(a){if(!a)return!1;var i=a._valueTracker;if(!i)return!0;var s=i.getValue(),f="";return a&&(f=Z1(a)?a.checked?"true":"false":a.value),a=f,a!==s?(i.setValue(a),!0):!1}function Bu(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 qP=/[\n"\\]/g;function Bn(a){return a.replace(qP,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function xh(a,i,s,f,y,b,N,R){a.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?a.type=N:a.removeAttribute("type"),i!=null?N==="number"?(i===0&&a.value===""||a.value!=i)&&(a.value=""+Ln(i)):a.value!==""+Ln(i)&&(a.value=""+Ln(i)):N!=="submit"&&N!=="reset"||a.removeAttribute("value"),i!=null?jh(a,N,Ln(i)):s!=null?jh(a,N,Ln(s)):f!=null&&a.removeAttribute("value"),y==null&&b!=null&&(a.defaultChecked=!!b),y!=null&&(a.checked=y&&typeof y!="function"&&typeof y!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?a.name=""+Ln(R):a.removeAttribute("name")}function Q1(a,i,s,f,y,b,N,R){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),i!=null||s!=null){if(!(b!=="submit"&&b!=="reset"||i!=null)){bh(a);return}s=s!=null?""+Ln(s):"",i=i!=null?""+Ln(i):s,R||i===a.value||(a.value=i),a.defaultValue=i}f=f??y,f=typeof f!="function"&&typeof f!="symbol"&&!!f,a.checked=R?a.checked:!!f,a.defaultChecked=!!f,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(a.name=N),bh(a)}function jh(a,i,s){i==="number"&&Bu(a.ownerDocument)===a||a.defaultValue===""+s||(a.defaultValue=""+s)}function Gi(a,i,s,f){if(a=a.options,i){i={};for(var y=0;y<s.length;y++)i["$"+s[y]]=!0;for(s=0;s<a.length;s++)y=i.hasOwnProperty("$"+a[s].value),a[s].selected!==y&&(a[s].selected=y),y&&f&&(a[s].defaultSelected=!0)}else{for(s=""+Ln(s),i=null,y=0;y<a.length;y++){if(a[y].value===s){a[y].selected=!0,f&&(a[y].defaultSelected=!0);return}i!==null||a[y].disabled||(i=a[y])}i!==null&&(i.selected=!0)}}function J1(a,i,s){if(i!=null&&(i=""+Ln(i),i!==a.value&&(a.value=i),s==null)){a.defaultValue!==i&&(a.defaultValue=i);return}a.defaultValue=s!=null?""+Ln(s):""}function ej(a,i,s,f){if(i==null){if(f!=null){if(s!=null)throw Error(r(92));if(D(f)){if(1<f.length)throw Error(r(93));f=f[0]}s=f}s==null&&(s=""),i=s}s=Ln(i),a.defaultValue=s,f=a.textContent,f===s&&f!==""&&f!==null&&(a.value=f),bh(a)}function Yi(a,i){if(i){var s=a.firstChild;if(s&&s===a.lastChild&&s.nodeType===3){s.nodeValue=i;return}}a.textContent=i}var zP=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 tj(a,i,s){var f=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?f?a.setProperty(i,""):i==="float"?a.cssFloat="":a[i]="":f?a.setProperty(i,s):typeof s!="number"||s===0||zP.has(i)?i==="float"?a.cssFloat=s:a[i]=(""+s).trim():a[i]=s+"px"}function nj(a,i,s){if(i!=null&&typeof i!="object")throw Error(r(62));if(a=a.style,s!=null){for(var f in s)!s.hasOwnProperty(f)||i!=null&&i.hasOwnProperty(f)||(f.indexOf("--")===0?a.setProperty(f,""):f==="float"?a.cssFloat="":a[f]="");for(var y in i)f=i[y],i.hasOwnProperty(y)&&s[y]!==f&&tj(a,y,f)}else for(var b in i)i.hasOwnProperty(b)&&tj(a,b,i[b])}function _h(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 LP=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),BP=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Uu(a){return BP.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Mr(){}var Sh=null;function wh(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Vi=null,Fi=null;function rj(a){var i=Ui(a);if(i&&(a=i.stateNode)){var s=a[hn]||null;e:switch(a=i.stateNode,i.type){case"input":if(xh(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=a;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Bn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var f=s[i];if(f!==a&&f.form===a.form){var y=f[hn]||null;if(!y)throw Error(r(90));xh(f,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(i=0;i<s.length;i++)f=s[i],f.form===a.form&&W1(f)}break e;case"textarea":J1(a,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&Gi(a,!!s.multiple,i,!1)}}}var Oh=!1;function aj(a,i,s){if(Oh)return a(i,s);Oh=!0;try{var f=a(i);return f}finally{if(Oh=!1,(Vi!==null||Fi!==null)&&(Ec(),Vi&&(i=Vi,a=Fi,Fi=Vi=null,rj(i),a)))for(i=0;i<a.length;i++)rj(a[i])}}function Ao(a,i){var s=a.stateNode;if(s===null)return null;var f=s[hn]||null;if(f===null)return null;s=f[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(a=a.type,f=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!f;break e;default:a=!1}if(a)return null;if(s&&typeof s!="function")throw Error(r(231,i,typeof s));return s}var kr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ah=!1;if(kr)try{var No={};Object.defineProperty(No,"passive",{get:function(){Ah=!0}}),window.addEventListener("test",No,No),window.removeEventListener("test",No,No)}catch{Ah=!1}var ha=null,Nh=null,Iu=null;function ij(){if(Iu)return Iu;var a,i=Nh,s=i.length,f,y="value"in ha?ha.value:ha.textContent,b=y.length;for(a=0;a<s&&i[a]===y[a];a++);var N=s-a;for(f=1;f<=N&&i[s-f]===y[b-f];f++);return Iu=y.slice(a,1<f?1-f:void 0)}function Hu(a){var i=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&i===13&&(a=13)):a=i,a===10&&(a=13),32<=a||a===13?a:0}function Gu(){return!0}function lj(){return!1}function pn(a){function i(s,f,y,b,N){this._reactName=s,this._targetInst=y,this.type=f,this.nativeEvent=b,this.target=N,this.currentTarget=null;for(var R in a)a.hasOwnProperty(R)&&(s=a[R],this[R]=s?s(b):b[R]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Gu:lj,this.isPropagationStopped=lj,this}return m(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Gu)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Gu)},persist:function(){},isPersistent:Gu}),i}var Wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yu=pn(Wa),Eo=m({},Wa,{view:0,detail:0}),UP=pn(Eo),Eh,Th,To,Vu=m({},Eo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mh,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!==To&&(To&&a.type==="mousemove"?(Eh=a.screenX-To.screenX,Th=a.screenY-To.screenY):Th=Eh=0,To=a),Eh)},movementY:function(a){return"movementY"in a?a.movementY:Th}}),oj=pn(Vu),IP=m({},Vu,{dataTransfer:0}),HP=pn(IP),GP=m({},Eo,{relatedTarget:0}),Ch=pn(GP),YP=m({},Wa,{animationName:0,elapsedTime:0,pseudoElement:0}),VP=pn(YP),FP=m({},Wa,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),KP=pn(FP),XP=m({},Wa,{data:0}),sj=pn(XP),ZP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},WP={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"},QP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function JP(a){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(a):(a=QP[a])?!!i[a]:!1}function Mh(){return JP}var e5=m({},Eo,{key:function(a){if(a.key){var i=ZP[a.key]||a.key;if(i!=="Unidentified")return i}return a.type==="keypress"?(a=Hu(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?WP[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mh,charCode:function(a){return a.type==="keypress"?Hu(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Hu(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),t5=pn(e5),n5=m({},Vu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uj=pn(n5),r5=m({},Eo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mh}),a5=pn(r5),i5=m({},Wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),l5=pn(i5),o5=m({},Vu,{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}),s5=pn(o5),u5=m({},Wa,{newState:0,oldState:0}),c5=pn(u5),f5=[9,13,27,32],kh=kr&&"CompositionEvent"in window,Co=null;kr&&"documentMode"in document&&(Co=document.documentMode);var d5=kr&&"TextEvent"in window&&!Co,cj=kr&&(!kh||Co&&8<Co&&11>=Co),fj=" ",dj=!1;function hj(a,i){switch(a){case"keyup":return f5.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pj(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ki=!1;function h5(a,i){switch(a){case"compositionend":return pj(i);case"keypress":return i.which!==32?null:(dj=!0,fj);case"textInput":return a=i.data,a===fj&&dj?null:a;default:return null}}function p5(a,i){if(Ki)return a==="compositionend"||!kh&&hj(a,i)?(a=ij(),Iu=Nh=ha=null,Ki=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return cj&&i.locale!=="ko"?null:i.data;default:return null}}var m5={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 mj(a){var i=a&&a.nodeName&&a.nodeName.toLowerCase();return i==="input"?!!m5[a.type]:i==="textarea"}function vj(a,i,s,f){Vi?Fi?Fi.push(f):Fi=[f]:Vi=f,i=Dc(i,"onChange"),0<i.length&&(s=new Yu("onChange","change",null,s,f),a.push({event:s,listeners:i}))}var Mo=null,ko=null;function v5(a){QS(a,0)}function Fu(a){var i=Oo(a);if(W1(i))return a}function yj(a,i){if(a==="change")return i}var gj=!1;if(kr){var Rh;if(kr){var Ph="oninput"in document;if(!Ph){var bj=document.createElement("div");bj.setAttribute("oninput","return;"),Ph=typeof bj.oninput=="function"}Rh=Ph}else Rh=!1;gj=Rh&&(!document.documentMode||9<document.documentMode)}function xj(){Mo&&(Mo.detachEvent("onpropertychange",jj),ko=Mo=null)}function jj(a){if(a.propertyName==="value"&&Fu(ko)){var i=[];vj(i,ko,a,wh(a)),aj(v5,i)}}function y5(a,i,s){a==="focusin"?(xj(),Mo=i,ko=s,Mo.attachEvent("onpropertychange",jj)):a==="focusout"&&xj()}function g5(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Fu(ko)}function b5(a,i){if(a==="click")return Fu(i)}function x5(a,i){if(a==="input"||a==="change")return Fu(i)}function j5(a,i){return a===i&&(a!==0||1/a===1/i)||a!==a&&i!==i}var Nn=typeof Object.is=="function"?Object.is:j5;function Ro(a,i){if(Nn(a,i))return!0;if(typeof a!="object"||a===null||typeof i!="object"||i===null)return!1;var s=Object.keys(a),f=Object.keys(i);if(s.length!==f.length)return!1;for(f=0;f<s.length;f++){var y=s[f];if(!yr.call(i,y)||!Nn(a[y],i[y]))return!1}return!0}function _j(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Sj(a,i){var s=_j(a);a=0;for(var f;s;){if(s.nodeType===3){if(f=a+s.textContent.length,a<=i&&f>=i)return{node:s,offset:i-a};a=f}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=_j(s)}}function wj(a,i){return a&&i?a===i?!0:a&&a.nodeType===3?!1:i&&i.nodeType===3?wj(a,i.parentNode):"contains"in a?a.contains(i):a.compareDocumentPosition?!!(a.compareDocumentPosition(i)&16):!1:!1}function Oj(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var i=Bu(a.document);i instanceof a.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)a=i.contentWindow;else break;i=Bu(a.document)}return i}function Dh(a){var i=a&&a.nodeName&&a.nodeName.toLowerCase();return i&&(i==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||i==="textarea"||a.contentEditable==="true")}var _5=kr&&"documentMode"in document&&11>=document.documentMode,Xi=null,$h=null,Po=null,qh=!1;function Aj(a,i,s){var f=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;qh||Xi==null||Xi!==Bu(f)||(f=Xi,"selectionStart"in f&&Dh(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Po&&Ro(Po,f)||(Po=f,f=Dc($h,"onSelect"),0<f.length&&(i=new Yu("onSelect","select",null,i,s),a.push({event:i,listeners:f}),i.target=Xi)))}function Qa(a,i){var s={};return s[a.toLowerCase()]=i.toLowerCase(),s["Webkit"+a]="webkit"+i,s["Moz"+a]="moz"+i,s}var Zi={animationend:Qa("Animation","AnimationEnd"),animationiteration:Qa("Animation","AnimationIteration"),animationstart:Qa("Animation","AnimationStart"),transitionrun:Qa("Transition","TransitionRun"),transitionstart:Qa("Transition","TransitionStart"),transitioncancel:Qa("Transition","TransitionCancel"),transitionend:Qa("Transition","TransitionEnd")},zh={},Nj={};kr&&(Nj=document.createElement("div").style,"AnimationEvent"in window||(delete Zi.animationend.animation,delete Zi.animationiteration.animation,delete Zi.animationstart.animation),"TransitionEvent"in window||delete Zi.transitionend.transition);function Ja(a){if(zh[a])return zh[a];if(!Zi[a])return a;var i=Zi[a],s;for(s in i)if(i.hasOwnProperty(s)&&s in Nj)return zh[a]=i[s];return a}var Ej=Ja("animationend"),Tj=Ja("animationiteration"),Cj=Ja("animationstart"),S5=Ja("transitionrun"),w5=Ja("transitionstart"),O5=Ja("transitioncancel"),Mj=Ja("transitionend"),kj=new Map,Lh="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(" ");Lh.push("scrollEnd");function lr(a,i){kj.set(a,i),Za(i,[a])}var Ku=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=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(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Un=[],Wi=0,Bh=0;function Xu(){for(var a=Wi,i=Bh=Wi=0;i<a;){var s=Un[i];Un[i++]=null;var f=Un[i];Un[i++]=null;var y=Un[i];Un[i++]=null;var b=Un[i];if(Un[i++]=null,f!==null&&y!==null){var N=f.pending;N===null?y.next=y:(y.next=N.next,N.next=y),f.pending=y}b!==0&&Rj(s,y,b)}}function Zu(a,i,s,f){Un[Wi++]=a,Un[Wi++]=i,Un[Wi++]=s,Un[Wi++]=f,Bh|=f,a.lanes|=f,a=a.alternate,a!==null&&(a.lanes|=f)}function Uh(a,i,s,f){return Zu(a,i,s,f),Wu(a)}function ei(a,i){return Zu(a,null,null,i),Wu(a)}function Rj(a,i,s){a.lanes|=s;var f=a.alternate;f!==null&&(f.lanes|=s);for(var y=!1,b=a.return;b!==null;)b.childLanes|=s,f=b.alternate,f!==null&&(f.childLanes|=s),b.tag===22&&(a=b.stateNode,a===null||a._visibility&1||(y=!0)),a=b,b=b.return;return a.tag===3?(b=a.stateNode,y&&i!==null&&(y=31-An(s),a=b.hiddenUpdates,f=a[y],f===null?a[y]=[i]:f.push(i),i.lane=s|536870912),b):null}function Wu(a){if(50<ns)throw ns=0,Zp=null,Error(r(185));for(var i=a.return;i!==null;)a=i,i=a.return;return a.tag===3?a.stateNode:null}var Qi={};function A5(a,i,s,f){this.tag=a,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(a,i,s,f){return new A5(a,i,s,f)}function Ih(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Rr(a,i){var s=a.alternate;return s===null?(s=En(a.tag,i,a.key,a.mode),s.elementType=a.elementType,s.type=a.type,s.stateNode=a.stateNode,s.alternate=a,a.alternate=s):(s.pendingProps=i,s.type=a.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=a.flags&65011712,s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,i=a.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=a.sibling,s.index=a.index,s.ref=a.ref,s.refCleanup=a.refCleanup,s}function Pj(a,i){a.flags&=65011714;var s=a.alternate;return s===null?(a.childLanes=0,a.lanes=i,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,a.type=s.type,i=s.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),a}function Qu(a,i,s,f,y,b){var N=0;if(f=a,typeof a=="function")Ih(a)&&(N=1);else if(typeof a=="string")N=MD(a,s,de.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case B:return a=En(31,s,i,y),a.elementType=B,a.lanes=b,a;case _:return ti(s.children,y,b,i);case x:N=8,y|=24;break;case O:return a=En(12,s,i,y|2),a.elementType=O,a.lanes=b,a;case A:return a=En(13,s,i,y),a.elementType=A,a.lanes=b,a;case C:return a=En(19,s,i,y),a.elementType=C,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case E:N=10;break e;case w:N=9;break e;case M:N=11;break e;case k:N=14;break e;case z:N=16,f=null;break e}N=29,s=Error(r(130,a===null?"null":typeof a,"")),f=null}return i=En(N,s,i,y),i.elementType=a,i.type=f,i.lanes=b,i}function ti(a,i,s,f){return a=En(7,a,f,i),a.lanes=s,a}function Hh(a,i,s){return a=En(6,a,null,i),a.lanes=s,a}function Dj(a){var i=En(18,null,null,0);return i.stateNode=a,i}function Gh(a,i,s){return i=En(4,a.children!==null?a.children:[],a.key,i),i.lanes=s,i.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},i}var $j=new WeakMap;function In(a,i){if(typeof a=="object"&&a!==null){var s=$j.get(a);return s!==void 0?s:(i={value:a,source:i,stack:ar(i)},$j.set(a,i),i)}return{value:a,source:i,stack:ar(i)}}var Ji=[],el=0,Ju=null,Do=0,Hn=[],Gn=0,pa=null,gr=1,br="";function Pr(a,i){Ji[el++]=Do,Ji[el++]=Ju,Ju=a,Do=i}function qj(a,i,s){Hn[Gn++]=gr,Hn[Gn++]=br,Hn[Gn++]=pa,pa=a;var f=gr;a=br;var y=32-An(f)-1;f&=~(1<<y),s+=1;var b=32-An(i)+y;if(30<b){var N=y-y%5;b=(f&(1<<N)-1).toString(32),f>>=N,y-=N,gr=1<<32-An(i)+y|s<<y|f,br=b+a}else gr=1<<b|s<<y|f,br=a}function Yh(a){a.return!==null&&(Pr(a,1),qj(a,1,0))}function Vh(a){for(;a===Ju;)Ju=Ji[--el],Ji[el]=null,Do=Ji[--el],Ji[el]=null;for(;a===pa;)pa=Hn[--Gn],Hn[Gn]=null,br=Hn[--Gn],Hn[Gn]=null,gr=Hn[--Gn],Hn[Gn]=null}function zj(a,i){Hn[Gn++]=gr,Hn[Gn++]=br,Hn[Gn++]=pa,gr=i.id,br=i.overflow,pa=a}var Zt=null,vt=null,He=!1,ma=null,Yn=!1,Fh=Error(r(519));function va(a){var i=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $o(In(i,a)),Fh}function Lj(a){var i=a.stateNode,s=a.type,f=a.memoizedProps;switch(i[Xt]=a,i[hn]=f,s){case"dialog":Be("cancel",i),Be("close",i);break;case"iframe":case"object":case"embed":Be("load",i);break;case"video":case"audio":for(s=0;s<as.length;s++)Be(as[s],i);break;case"source":Be("error",i);break;case"img":case"image":case"link":Be("error",i),Be("load",i);break;case"details":Be("toggle",i);break;case"input":Be("invalid",i),Q1(i,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":Be("invalid",i);break;case"textarea":Be("invalid",i),ej(i,f.value,f.defaultValue,f.children)}s=f.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||f.suppressHydrationWarning===!0||nw(i.textContent,s)?(f.popover!=null&&(Be("beforetoggle",i),Be("toggle",i)),f.onScroll!=null&&Be("scroll",i),f.onScrollEnd!=null&&Be("scrollend",i),f.onClick!=null&&(i.onclick=Mr),i=!0):i=!1,i||va(a,!0)}function Bj(a){for(Zt=a.return;Zt;)switch(Zt.tag){case 5:case 31:case 13:Yn=!1;return;case 27:case 3:Yn=!0;return;default:Zt=Zt.return}}function tl(a){if(a!==Zt)return!1;if(!He)return Bj(a),He=!0,!1;var i=a.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=a.type,s=!(s!=="form"&&s!=="button")||fm(a.type,a.memoizedProps)),s=!s),s&&vt&&va(a),Bj(a),i===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=fw(a)}else if(i===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));vt=fw(a)}else i===27?(i=vt,Ca(a.type)?(a=vm,vm=null,vt=a):vt=i):vt=Zt?Fn(a.stateNode.nextSibling):null;return!0}function ni(){vt=Zt=null,He=!1}function Kh(){var a=ma;return a!==null&&(gn===null?gn=a:gn.push.apply(gn,a),ma=null),a}function $o(a){ma===null?ma=[a]:ma.push(a)}var Xh=L(null),ri=null,Dr=null;function ya(a,i,s){q(Xh,i._currentValue),i._currentValue=s}function $r(a){a._currentValue=Xh.current,F(Xh)}function Zh(a,i,s){for(;a!==null;){var f=a.alternate;if((a.childLanes&i)!==i?(a.childLanes|=i,f!==null&&(f.childLanes|=i)):f!==null&&(f.childLanes&i)!==i&&(f.childLanes|=i),a===s)break;a=a.return}}function Wh(a,i,s,f){var y=a.child;for(y!==null&&(y.return=a);y!==null;){var b=y.dependencies;if(b!==null){var N=y.child;b=b.firstContext;e:for(;b!==null;){var R=b;b=y;for(var I=0;I<i.length;I++)if(R.context===i[I]){b.lanes|=s,R=b.alternate,R!==null&&(R.lanes|=s),Zh(b.return,s,a),f||(N=null);break e}b=R.next}}else if(y.tag===18){if(N=y.return,N===null)throw Error(r(341));N.lanes|=s,b=N.alternate,b!==null&&(b.lanes|=s),Zh(N,s,a),N=null}else N=y.child;if(N!==null)N.return=y;else for(N=y;N!==null;){if(N===a){N=null;break}if(y=N.sibling,y!==null){y.return=N.return,N=y;break}N=N.return}y=N}}function nl(a,i,s,f){a=null;for(var y=i,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var N=y.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var R=y.type;Nn(y.pendingProps.value,N.value)||(a!==null?a.push(R):a=[R])}}else if(y===$e.current){if(N=y.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(a!==null?a.push(us):a=[us])}y=y.return}a!==null&&Wh(i,a,s,f),i.flags|=262144}function ec(a){for(a=a.firstContext;a!==null;){if(!Nn(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function ai(a){ri=a,Dr=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Wt(a){return Uj(ri,a)}function tc(a,i){return ri===null&&ai(a),Uj(a,i)}function Uj(a,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Dr===null){if(a===null)throw Error(r(308));Dr=i,a.dependencies={lanes:0,firstContext:i},a.flags|=524288}else Dr=Dr.next=i;return s}var N5=typeof AbortController<"u"?AbortController:function(){var a=[],i=this.signal={aborted:!1,addEventListener:function(s,f){a.push(f)}};this.abort=function(){i.aborted=!0,a.forEach(function(s){return s()})}},E5=e.unstable_scheduleCallback,T5=e.unstable_NormalPriority,Ct={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qh(){return{controller:new N5,data:new Map,refCount:0}}function qo(a){a.refCount--,a.refCount===0&&E5(T5,function(){a.controller.abort()})}var zo=null,Jh=0,rl=0,al=null;function C5(a,i){if(zo===null){var s=zo=[];Jh=0,rl=nm(),al={status:"pending",value:void 0,then:function(f){s.push(f)}}}return Jh++,i.then(Ij,Ij),i}function Ij(){if(--Jh===0&&zo!==null){al!==null&&(al.status="fulfilled");var a=zo;zo=null,rl=0,al=null;for(var i=0;i<a.length;i++)(0,a[i])()}}function M5(a,i){var s=[],f={status:"pending",value:null,reason:null,then:function(y){s.push(y)}};return a.then(function(){f.status="fulfilled",f.value=i;for(var y=0;y<s.length;y++)(0,s[y])(i)},function(y){for(f.status="rejected",f.reason=y,y=0;y<s.length;y++)(0,s[y])(void 0)}),f}var Hj=P.S;P.S=function(a,i){AS=rn(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&C5(a,i),Hj!==null&&Hj(a,i)};var ii=L(null);function ep(){var a=ii.current;return a!==null?a:ut.pooledCache}function nc(a,i){i===null?q(ii,ii.current):q(ii,i.pool)}function Gj(){var a=ep();return a===null?null:{parent:Ct._currentValue,pool:a}}var il=Error(r(460)),tp=Error(r(474)),rc=Error(r(542)),ac={then:function(){}};function Yj(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Vj(a,i,s){switch(s=a[s],s===void 0?a.push(i):s!==i&&(i.then(Mr,Mr),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw a=i.reason,Kj(a),a;default:if(typeof i.status=="string")i.then(Mr,Mr);else{if(a=ut,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=i,a.status="pending",a.then(function(f){if(i.status==="pending"){var y=i;y.status="fulfilled",y.value=f}},function(f){if(i.status==="pending"){var y=i;y.status="rejected",y.reason=f}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw a=i.reason,Kj(a),a}throw oi=i,il}}function li(a){try{var i=a._init;return i(a._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(oi=s,il):s}}var oi=null;function Fj(){if(oi===null)throw Error(r(459));var a=oi;return oi=null,a}function Kj(a){if(a===il||a===rc)throw Error(r(483))}var ll=null,Lo=0;function ic(a){var i=Lo;return Lo+=1,ll===null&&(ll=[]),Vj(ll,a,i)}function Bo(a,i){i=i.props.ref,a.ref=i!==void 0?i:null}function lc(a,i){throw i.$$typeof===g?Error(r(525)):(a=Object.prototype.toString.call(i),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":a)))}function Xj(a){function i(K,V){if(a){var J=K.deletions;J===null?(K.deletions=[V],K.flags|=16):J.push(V)}}function s(K,V){if(!a)return null;for(;V!==null;)i(K,V),V=V.sibling;return null}function f(K){for(var V=new Map;K!==null;)K.key!==null?V.set(K.key,K):V.set(K.index,K),K=K.sibling;return V}function y(K,V){return K=Rr(K,V),K.index=0,K.sibling=null,K}function b(K,V,J){return K.index=J,a?(J=K.alternate,J!==null?(J=J.index,J<V?(K.flags|=67108866,V):J):(K.flags|=67108866,V)):(K.flags|=1048576,V)}function N(K){return a&&K.alternate===null&&(K.flags|=67108866),K}function R(K,V,J,se){return V===null||V.tag!==6?(V=Hh(J,K.mode,se),V.return=K,V):(V=y(V,J),V.return=K,V)}function I(K,V,J,se){var Se=J.type;return Se===_?le(K,V,J.props.children,se,J.key):V!==null&&(V.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===z&&li(Se)===V.type)?(V=y(V,J.props),Bo(V,J),V.return=K,V):(V=Qu(J.type,J.key,J.props,null,K.mode,se),Bo(V,J),V.return=K,V)}function ee(K,V,J,se){return V===null||V.tag!==4||V.stateNode.containerInfo!==J.containerInfo||V.stateNode.implementation!==J.implementation?(V=Gh(J,K.mode,se),V.return=K,V):(V=y(V,J.children||[]),V.return=K,V)}function le(K,V,J,se,Se){return V===null||V.tag!==7?(V=ti(J,K.mode,se,Se),V.return=K,V):(V=y(V,J),V.return=K,V)}function ue(K,V,J){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=Hh(""+V,K.mode,J),V.return=K,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case j:return J=Qu(V.type,V.key,V.props,null,K.mode,J),Bo(J,V),J.return=K,J;case S:return V=Gh(V,K.mode,J),V.return=K,V;case z:return V=li(V),ue(K,V,J)}if(D(V)||H(V))return V=ti(V,K.mode,J,null),V.return=K,V;if(typeof V.then=="function")return ue(K,ic(V),J);if(V.$$typeof===E)return ue(K,tc(K,V),J);lc(K,V)}return null}function ne(K,V,J,se){var Se=V!==null?V.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Se!==null?null:R(K,V,""+J,se);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case j:return J.key===Se?I(K,V,J,se):null;case S:return J.key===Se?ee(K,V,J,se):null;case z:return J=li(J),ne(K,V,J,se)}if(D(J)||H(J))return Se!==null?null:le(K,V,J,se,null);if(typeof J.then=="function")return ne(K,V,ic(J),se);if(J.$$typeof===E)return ne(K,V,tc(K,J),se);lc(K,J)}return null}function re(K,V,J,se,Se){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return K=K.get(J)||null,R(V,K,""+se,Se);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case j:return K=K.get(se.key===null?J:se.key)||null,I(V,K,se,Se);case S:return K=K.get(se.key===null?J:se.key)||null,ee(V,K,se,Se);case z:return se=li(se),re(K,V,J,se,Se)}if(D(se)||H(se))return K=K.get(J)||null,le(V,K,se,Se,null);if(typeof se.then=="function")return re(K,V,J,ic(se),Se);if(se.$$typeof===E)return re(K,V,J,tc(V,se),Se);lc(V,se)}return null}function xe(K,V,J,se){for(var Se=null,Ye=null,je=V,De=V=0,Ie=null;je!==null&&De<J.length;De++){je.index>De?(Ie=je,je=null):Ie=je.sibling;var Ve=ne(K,je,J[De],se);if(Ve===null){je===null&&(je=Ie);break}a&&je&&Ve.alternate===null&&i(K,je),V=b(Ve,V,De),Ye===null?Se=Ve:Ye.sibling=Ve,Ye=Ve,je=Ie}if(De===J.length)return s(K,je),He&&Pr(K,De),Se;if(je===null){for(;De<J.length;De++)je=ue(K,J[De],se),je!==null&&(V=b(je,V,De),Ye===null?Se=je:Ye.sibling=je,Ye=je);return He&&Pr(K,De),Se}for(je=f(je);De<J.length;De++)Ie=re(je,K,De,J[De],se),Ie!==null&&(a&&Ie.alternate!==null&&je.delete(Ie.key===null?De:Ie.key),V=b(Ie,V,De),Ye===null?Se=Ie:Ye.sibling=Ie,Ye=Ie);return a&&je.forEach(function(Da){return i(K,Da)}),He&&Pr(K,De),Se}function Ne(K,V,J,se){if(J==null)throw Error(r(151));for(var Se=null,Ye=null,je=V,De=V=0,Ie=null,Ve=J.next();je!==null&&!Ve.done;De++,Ve=J.next()){je.index>De?(Ie=je,je=null):Ie=je.sibling;var Da=ne(K,je,Ve.value,se);if(Da===null){je===null&&(je=Ie);break}a&&je&&Da.alternate===null&&i(K,je),V=b(Da,V,De),Ye===null?Se=Da:Ye.sibling=Da,Ye=Da,je=Ie}if(Ve.done)return s(K,je),He&&Pr(K,De),Se;if(je===null){for(;!Ve.done;De++,Ve=J.next())Ve=ue(K,Ve.value,se),Ve!==null&&(V=b(Ve,V,De),Ye===null?Se=Ve:Ye.sibling=Ve,Ye=Ve);return He&&Pr(K,De),Se}for(je=f(je);!Ve.done;De++,Ve=J.next())Ve=re(je,K,De,Ve.value,se),Ve!==null&&(a&&Ve.alternate!==null&&je.delete(Ve.key===null?De:Ve.key),V=b(Ve,V,De),Ye===null?Se=Ve:Ye.sibling=Ve,Ye=Ve);return a&&je.forEach(function(ID){return i(K,ID)}),He&&Pr(K,De),Se}function lt(K,V,J,se){if(typeof J=="object"&&J!==null&&J.type===_&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case j:e:{for(var Se=J.key;V!==null;){if(V.key===Se){if(Se=J.type,Se===_){if(V.tag===7){s(K,V.sibling),se=y(V,J.props.children),se.return=K,K=se;break e}}else if(V.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===z&&li(Se)===V.type){s(K,V.sibling),se=y(V,J.props),Bo(se,J),se.return=K,K=se;break e}s(K,V);break}else i(K,V);V=V.sibling}J.type===_?(se=ti(J.props.children,K.mode,se,J.key),se.return=K,K=se):(se=Qu(J.type,J.key,J.props,null,K.mode,se),Bo(se,J),se.return=K,K=se)}return N(K);case S:e:{for(Se=J.key;V!==null;){if(V.key===Se)if(V.tag===4&&V.stateNode.containerInfo===J.containerInfo&&V.stateNode.implementation===J.implementation){s(K,V.sibling),se=y(V,J.children||[]),se.return=K,K=se;break e}else{s(K,V);break}else i(K,V);V=V.sibling}se=Gh(J,K.mode,se),se.return=K,K=se}return N(K);case z:return J=li(J),lt(K,V,J,se)}if(D(J))return xe(K,V,J,se);if(H(J)){if(Se=H(J),typeof Se!="function")throw Error(r(150));return J=Se.call(J),Ne(K,V,J,se)}if(typeof J.then=="function")return lt(K,V,ic(J),se);if(J.$$typeof===E)return lt(K,V,tc(K,J),se);lc(K,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,V!==null&&V.tag===6?(s(K,V.sibling),se=y(V,J),se.return=K,K=se):(s(K,V),se=Hh(J,K.mode,se),se.return=K,K=se),N(K)):s(K,V)}return function(K,V,J,se){try{Lo=0;var Se=lt(K,V,J,se);return ll=null,Se}catch(je){if(je===il||je===rc)throw je;var Ye=En(29,je,null,K.mode);return Ye.lanes=se,Ye.return=K,Ye}finally{}}}var si=Xj(!0),Zj=Xj(!1),ga=!1;function np(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rp(a,i){a=a.updateQueue,i.updateQueue===a&&(i.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function ba(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function xa(a,i,s){var f=a.updateQueue;if(f===null)return null;if(f=f.shared,(Xe&2)!==0){var y=f.pending;return y===null?i.next=i:(i.next=y.next,y.next=i),f.pending=i,i=Wu(a),Rj(a,null,s),i}return Zu(a,f,i,s),Wu(a)}function Uo(a,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var f=i.lanes;f&=a.pendingLanes,s|=f,i.lanes=s,U1(a,s)}}function ap(a,i){var s=a.updateQueue,f=a.alternate;if(f!==null&&(f=f.updateQueue,s===f)){var y=null,b=null;if(s=s.firstBaseUpdate,s!==null){do{var N={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};b===null?y=b=N:b=b.next=N,s=s.next}while(s!==null);b===null?y=b=i:b=b.next=i}else y=b=i;s={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:f.shared,callbacks:f.callbacks},a.updateQueue=s;return}a=s.lastBaseUpdate,a===null?s.firstBaseUpdate=i:a.next=i,s.lastBaseUpdate=i}var ip=!1;function Io(){if(ip){var a=al;if(a!==null)throw a}}function Ho(a,i,s,f){ip=!1;var y=a.updateQueue;ga=!1;var b=y.firstBaseUpdate,N=y.lastBaseUpdate,R=y.shared.pending;if(R!==null){y.shared.pending=null;var I=R,ee=I.next;I.next=null,N===null?b=ee:N.next=ee,N=I;var le=a.alternate;le!==null&&(le=le.updateQueue,R=le.lastBaseUpdate,R!==N&&(R===null?le.firstBaseUpdate=ee:R.next=ee,le.lastBaseUpdate=I))}if(b!==null){var ue=y.baseState;N=0,le=ee=I=null,R=b;do{var ne=R.lane&-536870913,re=ne!==R.lane;if(re?(Ue&ne)===ne:(f&ne)===ne){ne!==0&&ne===rl&&(ip=!0),le!==null&&(le=le.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var xe=a,Ne=R;ne=i;var lt=s;switch(Ne.tag){case 1:if(xe=Ne.payload,typeof xe=="function"){ue=xe.call(lt,ue,ne);break e}ue=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Ne.payload,ne=typeof xe=="function"?xe.call(lt,ue,ne):xe,ne==null)break e;ue=m({},ue,ne);break e;case 2:ga=!0}}ne=R.callback,ne!==null&&(a.flags|=64,re&&(a.flags|=8192),re=y.callbacks,re===null?y.callbacks=[ne]:re.push(ne))}else re={lane:ne,tag:R.tag,payload:R.payload,callback:R.callback,next:null},le===null?(ee=le=re,I=ue):le=le.next=re,N|=ne;if(R=R.next,R===null){if(R=y.shared.pending,R===null)break;re=R,R=re.next,re.next=null,y.lastBaseUpdate=re,y.shared.pending=null}}while(!0);le===null&&(I=ue),y.baseState=I,y.firstBaseUpdate=ee,y.lastBaseUpdate=le,b===null&&(y.shared.lanes=0),Oa|=N,a.lanes=N,a.memoizedState=ue}}function Wj(a,i){if(typeof a!="function")throw Error(r(191,a));a.call(i)}function Qj(a,i){var s=a.callbacks;if(s!==null)for(a.callbacks=null,a=0;a<s.length;a++)Wj(s[a],i)}var ol=L(null),oc=L(0);function Jj(a,i){a=Yr,q(oc,a),q(ol,i),Yr=a|i.baseLanes}function lp(){q(oc,Yr),q(ol,ol.current)}function op(){Yr=oc.current,F(ol),F(oc)}var Tn=L(null),Vn=null;function ja(a){var i=a.alternate;q(Nt,Nt.current&1),q(Tn,a),Vn===null&&(i===null||ol.current!==null||i.memoizedState!==null)&&(Vn=a)}function sp(a){q(Nt,Nt.current),q(Tn,a),Vn===null&&(Vn=a)}function e_(a){a.tag===22?(q(Nt,Nt.current),q(Tn,a),Vn===null&&(Vn=a)):_a()}function _a(){q(Nt,Nt.current),q(Tn,Tn.current)}function Cn(a){F(Tn),Vn===a&&(Vn=null),F(Nt)}var Nt=L(0);function sc(a){for(var i=a;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||pm(s)||mm(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break;for(;i.sibling===null;){if(i.return===null||i.return===a)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var qr=0,Pe=null,at=null,Mt=null,uc=!1,sl=!1,ui=!1,cc=0,Go=0,ul=null,k5=0;function wt(){throw Error(r(321))}function up(a,i){if(i===null)return!1;for(var s=0;s<i.length&&s<a.length;s++)if(!Nn(a[s],i[s]))return!1;return!0}function cp(a,i,s,f,y,b){return qr=b,Pe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,P.H=a===null||a.memoizedState===null?q_:Op,ui=!1,b=s(f,y),ui=!1,sl&&(b=n_(i,s,f,y)),t_(a),b}function t_(a){P.H=Fo;var i=at!==null&&at.next!==null;if(qr=0,Mt=at=Pe=null,uc=!1,Go=0,ul=null,i)throw Error(r(300));a===null||kt||(a=a.dependencies,a!==null&&ec(a)&&(kt=!0))}function n_(a,i,s,f){Pe=a;var y=0;do{if(sl&&(ul=null),Go=0,sl=!1,25<=y)throw Error(r(301));if(y+=1,Mt=at=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}P.H=z_,b=i(s,f)}while(sl);return b}function R5(){var a=P.H,i=a.useState()[0];return i=typeof i.then=="function"?Yo(i):i,a=a.useState()[0],(at!==null?at.memoizedState:null)!==a&&(Pe.flags|=1024),i}function fp(){var a=cc!==0;return cc=0,a}function dp(a,i,s){i.updateQueue=a.updateQueue,i.flags&=-2053,a.lanes&=~s}function hp(a){if(uc){for(a=a.memoizedState;a!==null;){var i=a.queue;i!==null&&(i.pending=null),a=a.next}uc=!1}qr=0,Mt=at=Pe=null,sl=!1,Go=cc=0,ul=null}function un(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?Pe.memoizedState=Mt=a:Mt=Mt.next=a,Mt}function Et(){if(at===null){var a=Pe.alternate;a=a!==null?a.memoizedState:null}else a=at.next;var i=Mt===null?Pe.memoizedState:Mt.next;if(i!==null)Mt=i,at=a;else{if(a===null)throw Pe.alternate===null?Error(r(467)):Error(r(310));at=a,a={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Mt===null?Pe.memoizedState=Mt=a:Mt=Mt.next=a}return Mt}function fc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yo(a){var i=Go;return Go+=1,ul===null&&(ul=[]),a=Vj(ul,a,i),i=Pe,(Mt===null?i.memoizedState:Mt.next)===null&&(i=i.alternate,P.H=i===null||i.memoizedState===null?q_:Op),a}function dc(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Yo(a);if(a.$$typeof===E)return Wt(a)}throw Error(r(438,String(a)))}function pp(a){var i=null,s=Pe.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var f=Pe.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(i={data:f.data.map(function(y){return y.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=fc(),Pe.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(a),f=0;f<a;f++)s[f]=Z;return i.index++,s}function zr(a,i){return typeof i=="function"?i(a):i}function hc(a){var i=Et();return mp(i,at,a)}function mp(a,i,s){var f=a.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=s;var y=a.baseQueue,b=f.pending;if(b!==null){if(y!==null){var N=y.next;y.next=b.next,b.next=N}i.baseQueue=y=b,f.pending=null}if(b=a.baseState,y===null)a.memoizedState=b;else{i=y.next;var R=N=null,I=null,ee=i,le=!1;do{var ue=ee.lane&-536870913;if(ue!==ee.lane?(Ue&ue)===ue:(qr&ue)===ue){var ne=ee.revertLane;if(ne===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),ue===rl&&(le=!0);else if((qr&ne)===ne){ee=ee.next,ne===rl&&(le=!0);continue}else ue={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},I===null?(R=I=ue,N=b):I=I.next=ue,Pe.lanes|=ne,Oa|=ne;ue=ee.action,ui&&s(b,ue),b=ee.hasEagerState?ee.eagerState:s(b,ue)}else ne={lane:ue,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},I===null?(R=I=ne,N=b):I=I.next=ne,Pe.lanes|=ue,Oa|=ue;ee=ee.next}while(ee!==null&&ee!==i);if(I===null?N=b:I.next=R,!Nn(b,a.memoizedState)&&(kt=!0,le&&(s=al,s!==null)))throw s;a.memoizedState=b,a.baseState=N,a.baseQueue=I,f.lastRenderedState=b}return y===null&&(f.lanes=0),[a.memoizedState,f.dispatch]}function vp(a){var i=Et(),s=i.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=a;var f=s.dispatch,y=s.pending,b=i.memoizedState;if(y!==null){s.pending=null;var N=y=y.next;do b=a(b,N.action),N=N.next;while(N!==y);Nn(b,i.memoizedState)||(kt=!0),i.memoizedState=b,i.baseQueue===null&&(i.baseState=b),s.lastRenderedState=b}return[b,f]}function r_(a,i,s){var f=Pe,y=Et(),b=He;if(b){if(s===void 0)throw Error(r(407));s=s()}else s=i();var N=!Nn((at||y).memoizedState,s);if(N&&(y.memoizedState=s,kt=!0),y=y.queue,bp(l_.bind(null,f,y,a),[a]),y.getSnapshot!==i||N||Mt!==null&&Mt.memoizedState.tag&1){if(f.flags|=2048,cl(9,{destroy:void 0},i_.bind(null,f,y,s,i),null),ut===null)throw Error(r(349));b||(qr&127)!==0||a_(f,i,s)}return s}function a_(a,i,s){a.flags|=16384,a={getSnapshot:i,value:s},i=Pe.updateQueue,i===null?(i=fc(),Pe.updateQueue=i,i.stores=[a]):(s=i.stores,s===null?i.stores=[a]:s.push(a))}function i_(a,i,s,f){i.value=s,i.getSnapshot=f,o_(i)&&s_(a)}function l_(a,i,s){return s(function(){o_(i)&&s_(a)})}function o_(a){var i=a.getSnapshot;a=a.value;try{var s=i();return!Nn(a,s)}catch{return!0}}function s_(a){var i=ei(a,2);i!==null&&bn(i,a,2)}function yp(a){var i=un();if(typeof a=="function"){var s=a;if(a=s(),ui){fa(!0);try{s()}finally{fa(!1)}}}return i.memoizedState=i.baseState=a,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zr,lastRenderedState:a},i}function u_(a,i,s,f){return a.baseState=s,mp(a,at,typeof f=="function"?f:zr)}function P5(a,i,s,f,y){if(vc(a))throw Error(r(485));if(a=i.action,a!==null){var b={payload:y,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){b.listeners.push(N)}};P.T!==null?s(!0):b.isTransition=!1,f(b),s=i.pending,s===null?(b.next=i.pending=b,c_(i,b)):(b.next=s.next,i.pending=s.next=b)}}function c_(a,i){var s=i.action,f=i.payload,y=a.state;if(i.isTransition){var b=P.T,N={};P.T=N;try{var R=s(y,f),I=P.S;I!==null&&I(N,R),f_(a,i,R)}catch(ee){gp(a,i,ee)}finally{b!==null&&N.types!==null&&(b.types=N.types),P.T=b}}else try{b=s(y,f),f_(a,i,b)}catch(ee){gp(a,i,ee)}}function f_(a,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(f){d_(a,i,f)},function(f){return gp(a,i,f)}):d_(a,i,s)}function d_(a,i,s){i.status="fulfilled",i.value=s,h_(i),a.state=s,i=a.pending,i!==null&&(s=i.next,s===i?a.pending=null:(s=s.next,i.next=s,c_(a,s)))}function gp(a,i,s){var f=a.pending;if(a.pending=null,f!==null){f=f.next;do i.status="rejected",i.reason=s,h_(i),i=i.next;while(i!==f)}a.action=null}function h_(a){a=a.listeners;for(var i=0;i<a.length;i++)(0,a[i])()}function p_(a,i){return i}function m_(a,i){if(He){var s=ut.formState;if(s!==null){e:{var f=Pe;if(He){if(vt){t:{for(var y=vt,b=Yn;y.nodeType!==8;){if(!b){y=null;break t}if(y=Fn(y.nextSibling),y===null){y=null;break t}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){vt=Fn(y.nextSibling),f=y.data==="F!";break e}}va(f)}f=!1}f&&(i=s[0])}}return s=un(),s.memoizedState=s.baseState=i,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:p_,lastRenderedState:i},s.queue=f,s=P_.bind(null,Pe,f),f.dispatch=s,f=yp(!1),b=wp.bind(null,Pe,!1,f.queue),f=un(),y={state:i,dispatch:null,action:a,pending:null},f.queue=y,s=P5.bind(null,Pe,y,b,s),y.dispatch=s,f.memoizedState=a,[i,s,!1]}function v_(a){var i=Et();return y_(i,at,a)}function y_(a,i,s){if(i=mp(a,i,p_)[0],a=hc(zr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var f=Yo(i)}catch(N){throw N===il?rc:N}else f=i;i=Et();var y=i.queue,b=y.dispatch;return s!==i.memoizedState&&(Pe.flags|=2048,cl(9,{destroy:void 0},D5.bind(null,y,s),null)),[f,b,a]}function D5(a,i){a.action=i}function g_(a){var i=Et(),s=at;if(s!==null)return y_(i,s,a);Et(),i=i.memoizedState,s=Et();var f=s.queue.dispatch;return s.memoizedState=a,[i,f,!1]}function cl(a,i,s,f){return a={tag:a,create:s,deps:f,inst:i,next:null},i=Pe.updateQueue,i===null&&(i=fc(),Pe.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=a.next=a:(f=s.next,s.next=a,a.next=f,i.lastEffect=a),a}function b_(){return Et().memoizedState}function pc(a,i,s,f){var y=un();Pe.flags|=a,y.memoizedState=cl(1|i,{destroy:void 0},s,f===void 0?null:f)}function mc(a,i,s,f){var y=Et();f=f===void 0?null:f;var b=y.memoizedState.inst;at!==null&&f!==null&&up(f,at.memoizedState.deps)?y.memoizedState=cl(i,b,s,f):(Pe.flags|=a,y.memoizedState=cl(1|i,b,s,f))}function x_(a,i){pc(8390656,8,a,i)}function bp(a,i){mc(2048,8,a,i)}function $5(a){Pe.flags|=4;var i=Pe.updateQueue;if(i===null)i=fc(),Pe.updateQueue=i,i.events=[a];else{var s=i.events;s===null?i.events=[a]:s.push(a)}}function j_(a){var i=Et().memoizedState;return $5({ref:i,nextImpl:a}),function(){if((Xe&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}function __(a,i){return mc(4,2,a,i)}function S_(a,i){return mc(4,4,a,i)}function w_(a,i){if(typeof i=="function"){a=a();var s=i(a);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return a=a(),i.current=a,function(){i.current=null}}function O_(a,i,s){s=s!=null?s.concat([a]):null,mc(4,4,w_.bind(null,i,a),s)}function xp(){}function A_(a,i){var s=Et();i=i===void 0?null:i;var f=s.memoizedState;return i!==null&&up(i,f[1])?f[0]:(s.memoizedState=[a,i],a)}function N_(a,i){var s=Et();i=i===void 0?null:i;var f=s.memoizedState;if(i!==null&&up(i,f[1]))return f[0];if(f=a(),ui){fa(!0);try{a()}finally{fa(!1)}}return s.memoizedState=[f,i],f}function jp(a,i,s){return s===void 0||(qr&1073741824)!==0&&(Ue&261930)===0?a.memoizedState=i:(a.memoizedState=s,a=ES(),Pe.lanes|=a,Oa|=a,s)}function E_(a,i,s,f){return Nn(s,i)?s:ol.current!==null?(a=jp(a,s,f),Nn(a,i)||(kt=!0),a):(qr&42)===0||(qr&1073741824)!==0&&(Ue&261930)===0?(kt=!0,a.memoizedState=s):(a=ES(),Pe.lanes|=a,Oa|=a,i)}function T_(a,i,s,f,y){var b=$.p;$.p=b!==0&&8>b?b:8;var N=P.T,R={};P.T=R,wp(a,!1,i,s);try{var I=y(),ee=P.S;if(ee!==null&&ee(R,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var le=M5(I,f);Vo(a,i,le,Rn(a))}else Vo(a,i,f,Rn(a))}catch(ue){Vo(a,i,{then:function(){},status:"rejected",reason:ue},Rn())}finally{$.p=b,N!==null&&R.types!==null&&(N.types=R.types),P.T=N}}function q5(){}function _p(a,i,s,f){if(a.tag!==5)throw Error(r(476));var y=C_(a).queue;T_(a,y,i,U,s===null?q5:function(){return M_(a),s(f)})}function C_(a){var i=a.memoizedState;if(i!==null)return i;i={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zr,lastRenderedState:U},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zr,lastRenderedState:s},next:null},a.memoizedState=i,a=a.alternate,a!==null&&(a.memoizedState=i),i}function M_(a){var i=C_(a);i.next===null&&(i=a.alternate.memoizedState),Vo(a,i.next.queue,{},Rn())}function Sp(){return Wt(us)}function k_(){return Et().memoizedState}function R_(){return Et().memoizedState}function z5(a){for(var i=a.return;i!==null;){switch(i.tag){case 24:case 3:var s=Rn();a=ba(s);var f=xa(i,a,s);f!==null&&(bn(f,i,s),Uo(f,i,s)),i={cache:Qh()},a.payload=i;return}i=i.return}}function L5(a,i,s){var f=Rn();s={lane:f,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},vc(a)?D_(i,s):(s=Uh(a,i,s,f),s!==null&&(bn(s,a,f),$_(s,i,f)))}function P_(a,i,s){var f=Rn();Vo(a,i,s,f)}function Vo(a,i,s,f){var y={lane:f,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(vc(a))D_(i,y);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=i.lastRenderedReducer,b!==null))try{var N=i.lastRenderedState,R=b(N,s);if(y.hasEagerState=!0,y.eagerState=R,Nn(R,N))return Zu(a,i,y,0),ut===null&&Xu(),!1}catch{}finally{}if(s=Uh(a,i,y,f),s!==null)return bn(s,a,f),$_(s,i,f),!0}return!1}function wp(a,i,s,f){if(f={lane:2,revertLane:nm(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},vc(a)){if(i)throw Error(r(479))}else i=Uh(a,s,f,2),i!==null&&bn(i,a,2)}function vc(a){var i=a.alternate;return a===Pe||i!==null&&i===Pe}function D_(a,i){sl=uc=!0;var s=a.pending;s===null?i.next=i:(i.next=s.next,s.next=i),a.pending=i}function $_(a,i,s){if((s&4194048)!==0){var f=i.lanes;f&=a.pendingLanes,s|=f,i.lanes=s,U1(a,s)}}var Fo={readContext:Wt,use:dc,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};Fo.useEffectEvent=wt;var q_={readContext:Wt,use:dc,useCallback:function(a,i){return un().memoizedState=[a,i===void 0?null:i],a},useContext:Wt,useEffect:x_,useImperativeHandle:function(a,i,s){s=s!=null?s.concat([a]):null,pc(4194308,4,w_.bind(null,i,a),s)},useLayoutEffect:function(a,i){return pc(4194308,4,a,i)},useInsertionEffect:function(a,i){pc(4,2,a,i)},useMemo:function(a,i){var s=un();i=i===void 0?null:i;var f=a();if(ui){fa(!0);try{a()}finally{fa(!1)}}return s.memoizedState=[f,i],f},useReducer:function(a,i,s){var f=un();if(s!==void 0){var y=s(i);if(ui){fa(!0);try{s(i)}finally{fa(!1)}}}else y=i;return f.memoizedState=f.baseState=y,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:y},f.queue=a,a=a.dispatch=L5.bind(null,Pe,a),[f.memoizedState,a]},useRef:function(a){var i=un();return a={current:a},i.memoizedState=a},useState:function(a){a=yp(a);var i=a.queue,s=P_.bind(null,Pe,i);return i.dispatch=s,[a.memoizedState,s]},useDebugValue:xp,useDeferredValue:function(a,i){var s=un();return jp(s,a,i)},useTransition:function(){var a=yp(!1);return a=T_.bind(null,Pe,a.queue,!0,!1),un().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,i,s){var f=Pe,y=un();if(He){if(s===void 0)throw Error(r(407));s=s()}else{if(s=i(),ut===null)throw Error(r(349));(Ue&127)!==0||a_(f,i,s)}y.memoizedState=s;var b={value:s,getSnapshot:i};return y.queue=b,x_(l_.bind(null,f,b,a),[a]),f.flags|=2048,cl(9,{destroy:void 0},i_.bind(null,f,b,s,i),null),s},useId:function(){var a=un(),i=ut.identifierPrefix;if(He){var s=br,f=gr;s=(f&~(1<<32-An(f)-1)).toString(32)+s,i="_"+i+"R_"+s,s=cc++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=k5++,i="_"+i+"r_"+s.toString(32)+"_";return a.memoizedState=i},useHostTransitionStatus:Sp,useFormState:m_,useActionState:m_,useOptimistic:function(a){var i=un();i.memoizedState=i.baseState=a;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=wp.bind(null,Pe,!0,s),s.dispatch=i,[a,i]},useMemoCache:pp,useCacheRefresh:function(){return un().memoizedState=z5.bind(null,Pe)},useEffectEvent:function(a){var i=un(),s={impl:a};return i.memoizedState=s,function(){if((Xe&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},Op={readContext:Wt,use:dc,useCallback:A_,useContext:Wt,useEffect:bp,useImperativeHandle:O_,useInsertionEffect:__,useLayoutEffect:S_,useMemo:N_,useReducer:hc,useRef:b_,useState:function(){return hc(zr)},useDebugValue:xp,useDeferredValue:function(a,i){var s=Et();return E_(s,at.memoizedState,a,i)},useTransition:function(){var a=hc(zr)[0],i=Et().memoizedState;return[typeof a=="boolean"?a:Yo(a),i]},useSyncExternalStore:r_,useId:k_,useHostTransitionStatus:Sp,useFormState:v_,useActionState:v_,useOptimistic:function(a,i){var s=Et();return u_(s,at,a,i)},useMemoCache:pp,useCacheRefresh:R_};Op.useEffectEvent=j_;var z_={readContext:Wt,use:dc,useCallback:A_,useContext:Wt,useEffect:bp,useImperativeHandle:O_,useInsertionEffect:__,useLayoutEffect:S_,useMemo:N_,useReducer:vp,useRef:b_,useState:function(){return vp(zr)},useDebugValue:xp,useDeferredValue:function(a,i){var s=Et();return at===null?jp(s,a,i):E_(s,at.memoizedState,a,i)},useTransition:function(){var a=vp(zr)[0],i=Et().memoizedState;return[typeof a=="boolean"?a:Yo(a),i]},useSyncExternalStore:r_,useId:k_,useHostTransitionStatus:Sp,useFormState:g_,useActionState:g_,useOptimistic:function(a,i){var s=Et();return at!==null?u_(s,at,a,i):(s.baseState=a,[a,s.queue.dispatch])},useMemoCache:pp,useCacheRefresh:R_};z_.useEffectEvent=j_;function Ap(a,i,s,f){i=a.memoizedState,s=s(f,i),s=s==null?i:m({},i,s),a.memoizedState=s,a.lanes===0&&(a.updateQueue.baseState=s)}var Np={enqueueSetState:function(a,i,s){a=a._reactInternals;var f=Rn(),y=ba(f);y.payload=i,s!=null&&(y.callback=s),i=xa(a,y,f),i!==null&&(bn(i,a,f),Uo(i,a,f))},enqueueReplaceState:function(a,i,s){a=a._reactInternals;var f=Rn(),y=ba(f);y.tag=1,y.payload=i,s!=null&&(y.callback=s),i=xa(a,y,f),i!==null&&(bn(i,a,f),Uo(i,a,f))},enqueueForceUpdate:function(a,i){a=a._reactInternals;var s=Rn(),f=ba(s);f.tag=2,i!=null&&(f.callback=i),i=xa(a,f,s),i!==null&&(bn(i,a,s),Uo(i,a,s))}};function L_(a,i,s,f,y,b,N){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(f,b,N):i.prototype&&i.prototype.isPureReactComponent?!Ro(s,f)||!Ro(y,b):!0}function B_(a,i,s,f){a=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,f),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,f),i.state!==a&&Np.enqueueReplaceState(i,i.state,null)}function ci(a,i){var s=i;if("ref"in i){s={};for(var f in i)f!=="ref"&&(s[f]=i[f])}if(a=a.defaultProps){s===i&&(s=m({},s));for(var y in a)s[y]===void 0&&(s[y]=a[y])}return s}function U_(a){Ku(a)}function I_(a){console.error(a)}function H_(a){Ku(a)}function yc(a,i){try{var s=a.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(f){setTimeout(function(){throw f})}}function G_(a,i,s){try{var f=a.onCaughtError;f(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Ep(a,i,s){return s=ba(s),s.tag=3,s.payload={element:null},s.callback=function(){yc(a,i)},s}function Y_(a){return a=ba(a),a.tag=3,a}function V_(a,i,s,f){var y=s.type.getDerivedStateFromError;if(typeof y=="function"){var b=f.value;a.payload=function(){return y(b)},a.callback=function(){G_(i,s,f)}}var N=s.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(a.callback=function(){G_(i,s,f),typeof y!="function"&&(Aa===null?Aa=new Set([this]):Aa.add(this));var R=f.stack;this.componentDidCatch(f.value,{componentStack:R!==null?R:""})})}function B5(a,i,s,f,y){if(s.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(i=s.alternate,i!==null&&nl(i,s,y,!0),s=Tn.current,s!==null){switch(s.tag){case 31:case 13:return Vn===null?Tc():s.alternate===null&&Ot===0&&(Ot=3),s.flags&=-257,s.flags|=65536,s.lanes=y,f===ac?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([f]):i.add(f),Jp(a,f,y)),!1;case 22:return s.flags|=65536,f===ac?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([f])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([f]):s.add(f)),Jp(a,f,y)),!1}throw Error(r(435,s.tag))}return Jp(a,f,y),Tc(),!1}if(He)return i=Tn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=y,f!==Fh&&(a=Error(r(422),{cause:f}),$o(In(a,s)))):(f!==Fh&&(i=Error(r(423),{cause:f}),$o(In(i,s))),a=a.current.alternate,a.flags|=65536,y&=-y,a.lanes|=y,f=In(f,s),y=Ep(a.stateNode,f,y),ap(a,y),Ot!==4&&(Ot=2)),!1;var b=Error(r(520),{cause:f});if(b=In(b,s),ts===null?ts=[b]:ts.push(b),Ot!==4&&(Ot=2),i===null)return!0;f=In(f,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,a=y&-y,s.lanes|=a,a=Ep(s.stateNode,f,a),ap(s,a),!1;case 1:if(i=s.type,b=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Aa===null||!Aa.has(b))))return s.flags|=65536,y&=-y,s.lanes|=y,y=Y_(y),V_(y,a,s,f),ap(s,y),!1}s=s.return}while(s!==null);return!1}var Tp=Error(r(461)),kt=!1;function Qt(a,i,s,f){i.child=a===null?Zj(i,null,s,f):si(i,a.child,s,f)}function F_(a,i,s,f,y){s=s.render;var b=i.ref;if("ref"in f){var N={};for(var R in f)R!=="ref"&&(N[R]=f[R])}else N=f;return ai(i),f=cp(a,i,s,N,b,y),R=fp(),a!==null&&!kt?(dp(a,i,y),Lr(a,i,y)):(He&&R&&Yh(i),i.flags|=1,Qt(a,i,f,y),i.child)}function K_(a,i,s,f,y){if(a===null){var b=s.type;return typeof b=="function"&&!Ih(b)&&b.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=b,X_(a,i,b,f,y)):(a=Qu(s.type,null,f,i,i.mode,y),a.ref=i.ref,a.return=i,i.child=a)}if(b=a.child,!qp(a,y)){var N=b.memoizedProps;if(s=s.compare,s=s!==null?s:Ro,s(N,f)&&a.ref===i.ref)return Lr(a,i,y)}return i.flags|=1,a=Rr(b,f),a.ref=i.ref,a.return=i,i.child=a}function X_(a,i,s,f,y){if(a!==null){var b=a.memoizedProps;if(Ro(b,f)&&a.ref===i.ref)if(kt=!1,i.pendingProps=f=b,qp(a,y))(a.flags&131072)!==0&&(kt=!0);else return i.lanes=a.lanes,Lr(a,i,y)}return Cp(a,i,s,f,y)}function Z_(a,i,s,f){var y=f.children,b=a!==null?a.memoizedState:null;if(a===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((i.flags&128)!==0){if(b=b!==null?b.baseLanes|s:s,a!==null){for(f=i.child=a.child,y=0;f!==null;)y=y|f.lanes|f.childLanes,f=f.sibling;f=y&~b}else f=0,i.child=null;return W_(a,i,b,s,f)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},a!==null&&nc(i,b!==null?b.cachePool:null),b!==null?Jj(i,b):lp(),e_(i);else return f=i.lanes=536870912,W_(a,i,b!==null?b.baseLanes|s:s,s,f)}else b!==null?(nc(i,b.cachePool),Jj(i,b),_a(),i.memoizedState=null):(a!==null&&nc(i,null),lp(),_a());return Qt(a,i,y,s),i.child}function Ko(a,i){return a!==null&&a.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function W_(a,i,s,f,y){var b=ep();return b=b===null?null:{parent:Ct._currentValue,pool:b},i.memoizedState={baseLanes:s,cachePool:b},a!==null&&nc(i,null),lp(),e_(i),a!==null&&nl(a,i,f,!0),i.childLanes=y,null}function gc(a,i){return i=xc({mode:i.mode,children:i.children},a.mode),i.ref=a.ref,a.child=i,i.return=a,i}function Q_(a,i,s){return si(i,a.child,null,s),a=gc(i,i.pendingProps),a.flags|=2,Cn(i),i.memoizedState=null,a}function U5(a,i,s){var f=i.pendingProps,y=(i.flags&128)!==0;if(i.flags&=-129,a===null){if(He){if(f.mode==="hidden")return a=gc(i,f),i.lanes=536870912,Ko(null,a);if(sp(i),(a=vt)?(a=cw(a,Yn),a=a!==null&&a.data==="&"?a:null,a!==null&&(i.memoizedState={dehydrated:a,treeContext:pa!==null?{id:gr,overflow:br}:null,retryLane:536870912,hydrationErrors:null},s=Dj(a),s.return=i,i.child=s,Zt=i,vt=null)):a=null,a===null)throw va(i);return i.lanes=536870912,null}return gc(i,f)}var b=a.memoizedState;if(b!==null){var N=b.dehydrated;if(sp(i),y)if(i.flags&256)i.flags&=-257,i=Q_(a,i,s);else if(i.memoizedState!==null)i.child=a.child,i.flags|=128,i=null;else throw Error(r(558));else if(kt||nl(a,i,s,!1),y=(s&a.childLanes)!==0,kt||y){if(f=ut,f!==null&&(N=I1(f,s),N!==0&&N!==b.retryLane))throw b.retryLane=N,ei(a,N),bn(f,a,N),Tp;Tc(),i=Q_(a,i,s)}else a=b.treeContext,vt=Fn(N.nextSibling),Zt=i,He=!0,ma=null,Yn=!1,a!==null&&zj(i,a),i=gc(i,f),i.flags|=4096;return i}return a=Rr(a.child,{mode:f.mode,children:f.children}),a.ref=i.ref,i.child=a,a.return=i,a}function bc(a,i){var s=i.ref;if(s===null)a!==null&&a.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(a===null||a.ref!==s)&&(i.flags|=4194816)}}function Cp(a,i,s,f,y){return ai(i),s=cp(a,i,s,f,void 0,y),f=fp(),a!==null&&!kt?(dp(a,i,y),Lr(a,i,y)):(He&&f&&Yh(i),i.flags|=1,Qt(a,i,s,y),i.child)}function J_(a,i,s,f,y,b){return ai(i),i.updateQueue=null,s=n_(i,f,s,y),t_(a),f=fp(),a!==null&&!kt?(dp(a,i,b),Lr(a,i,b)):(He&&f&&Yh(i),i.flags|=1,Qt(a,i,s,b),i.child)}function eS(a,i,s,f,y){if(ai(i),i.stateNode===null){var b=Qi,N=s.contextType;typeof N=="object"&&N!==null&&(b=Wt(N)),b=new s(f,b),i.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Np,i.stateNode=b,b._reactInternals=i,b=i.stateNode,b.props=f,b.state=i.memoizedState,b.refs={},np(i),N=s.contextType,b.context=typeof N=="object"&&N!==null?Wt(N):Qi,b.state=i.memoizedState,N=s.getDerivedStateFromProps,typeof N=="function"&&(Ap(i,s,N,f),b.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(N=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),N!==b.state&&Np.enqueueReplaceState(b,b.state,null),Ho(i,f,b,y),Io(),b.state=i.memoizedState),typeof b.componentDidMount=="function"&&(i.flags|=4194308),f=!0}else if(a===null){b=i.stateNode;var R=i.memoizedProps,I=ci(s,R);b.props=I;var ee=b.context,le=s.contextType;N=Qi,typeof le=="object"&&le!==null&&(N=Wt(le));var ue=s.getDerivedStateFromProps;le=typeof ue=="function"||typeof b.getSnapshotBeforeUpdate=="function",R=i.pendingProps!==R,le||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(R||ee!==N)&&B_(i,b,f,N),ga=!1;var ne=i.memoizedState;b.state=ne,Ho(i,f,b,y),Io(),ee=i.memoizedState,R||ne!==ee||ga?(typeof ue=="function"&&(Ap(i,s,ue,f),ee=i.memoizedState),(I=ga||L_(i,s,I,f,ne,ee,N))?(le||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(i.flags|=4194308)):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=ee),b.props=f,b.state=ee,b.context=N,f=I):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{b=i.stateNode,rp(a,i),N=i.memoizedProps,le=ci(s,N),b.props=le,ue=i.pendingProps,ne=b.context,ee=s.contextType,I=Qi,typeof ee=="object"&&ee!==null&&(I=Wt(ee)),R=s.getDerivedStateFromProps,(ee=typeof R=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==ue||ne!==I)&&B_(i,b,f,I),ga=!1,ne=i.memoizedState,b.state=ne,Ho(i,f,b,y),Io();var re=i.memoizedState;N!==ue||ne!==re||ga||a!==null&&a.dependencies!==null&&ec(a.dependencies)?(typeof R=="function"&&(Ap(i,s,R,f),re=i.memoizedState),(le=ga||L_(i,s,le,f,ne,re,I)||a!==null&&a.dependencies!==null&&ec(a.dependencies))?(ee||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(f,re,I),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(f,re,I)),typeof b.componentDidUpdate=="function"&&(i.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof b.componentDidUpdate!="function"||N===a.memoizedProps&&ne===a.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===a.memoizedProps&&ne===a.memoizedState||(i.flags|=1024),i.memoizedProps=f,i.memoizedState=re),b.props=f,b.state=re,b.context=I,f=le):(typeof b.componentDidUpdate!="function"||N===a.memoizedProps&&ne===a.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===a.memoizedProps&&ne===a.memoizedState||(i.flags|=1024),f=!1)}return b=f,bc(a,i),f=(i.flags&128)!==0,b||f?(b=i.stateNode,s=f&&typeof s.getDerivedStateFromError!="function"?null:b.render(),i.flags|=1,a!==null&&f?(i.child=si(i,a.child,null,y),i.child=si(i,null,s,y)):Qt(a,i,s,y),i.memoizedState=b.state,a=i.child):a=Lr(a,i,y),a}function tS(a,i,s,f){return ni(),i.flags|=256,Qt(a,i,s,f),i.child}var Mp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kp(a){return{baseLanes:a,cachePool:Gj()}}function Rp(a,i,s){return a=a!==null?a.childLanes&~s:0,i&&(a|=kn),a}function nS(a,i,s){var f=i.pendingProps,y=!1,b=(i.flags&128)!==0,N;if((N=b)||(N=a!==null&&a.memoizedState===null?!1:(Nt.current&2)!==0),N&&(y=!0,i.flags&=-129),N=(i.flags&32)!==0,i.flags&=-33,a===null){if(He){if(y?ja(i):_a(),(a=vt)?(a=cw(a,Yn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(i.memoizedState={dehydrated:a,treeContext:pa!==null?{id:gr,overflow:br}:null,retryLane:536870912,hydrationErrors:null},s=Dj(a),s.return=i,i.child=s,Zt=i,vt=null)):a=null,a===null)throw va(i);return mm(a)?i.lanes=32:i.lanes=536870912,null}var R=f.children;return f=f.fallback,y?(_a(),y=i.mode,R=xc({mode:"hidden",children:R},y),f=ti(f,y,s,null),R.return=i,f.return=i,R.sibling=f,i.child=R,f=i.child,f.memoizedState=kp(s),f.childLanes=Rp(a,N,s),i.memoizedState=Mp,Ko(null,f)):(ja(i),Pp(i,R))}var I=a.memoizedState;if(I!==null&&(R=I.dehydrated,R!==null)){if(b)i.flags&256?(ja(i),i.flags&=-257,i=Dp(a,i,s)):i.memoizedState!==null?(_a(),i.child=a.child,i.flags|=128,i=null):(_a(),R=f.fallback,y=i.mode,f=xc({mode:"visible",children:f.children},y),R=ti(R,y,s,null),R.flags|=2,f.return=i,R.return=i,f.sibling=R,i.child=f,si(i,a.child,null,s),f=i.child,f.memoizedState=kp(s),f.childLanes=Rp(a,N,s),i.memoizedState=Mp,i=Ko(null,f));else if(ja(i),mm(R)){if(N=R.nextSibling&&R.nextSibling.dataset,N)var ee=N.dgst;N=ee,f=Error(r(419)),f.stack="",f.digest=N,$o({value:f,source:null,stack:null}),i=Dp(a,i,s)}else if(kt||nl(a,i,s,!1),N=(s&a.childLanes)!==0,kt||N){if(N=ut,N!==null&&(f=I1(N,s),f!==0&&f!==I.retryLane))throw I.retryLane=f,ei(a,f),bn(N,a,f),Tp;pm(R)||Tc(),i=Dp(a,i,s)}else pm(R)?(i.flags|=192,i.child=a.child,i=null):(a=I.treeContext,vt=Fn(R.nextSibling),Zt=i,He=!0,ma=null,Yn=!1,a!==null&&zj(i,a),i=Pp(i,f.children),i.flags|=4096);return i}return y?(_a(),R=f.fallback,y=i.mode,I=a.child,ee=I.sibling,f=Rr(I,{mode:"hidden",children:f.children}),f.subtreeFlags=I.subtreeFlags&65011712,ee!==null?R=Rr(ee,R):(R=ti(R,y,s,null),R.flags|=2),R.return=i,f.return=i,f.sibling=R,i.child=f,Ko(null,f),f=i.child,R=a.child.memoizedState,R===null?R=kp(s):(y=R.cachePool,y!==null?(I=Ct._currentValue,y=y.parent!==I?{parent:I,pool:I}:y):y=Gj(),R={baseLanes:R.baseLanes|s,cachePool:y}),f.memoizedState=R,f.childLanes=Rp(a,N,s),i.memoizedState=Mp,Ko(a.child,f)):(ja(i),s=a.child,a=s.sibling,s=Rr(s,{mode:"visible",children:f.children}),s.return=i,s.sibling=null,a!==null&&(N=i.deletions,N===null?(i.deletions=[a],i.flags|=16):N.push(a)),i.child=s,i.memoizedState=null,s)}function Pp(a,i){return i=xc({mode:"visible",children:i},a.mode),i.return=a,a.child=i}function xc(a,i){return a=En(22,a,null,i),a.lanes=0,a}function Dp(a,i,s){return si(i,a.child,null,s),a=Pp(i,i.pendingProps.children),a.flags|=2,i.memoizedState=null,a}function rS(a,i,s){a.lanes|=i;var f=a.alternate;f!==null&&(f.lanes|=i),Zh(a.return,i,s)}function $p(a,i,s,f,y,b){var N=a.memoizedState;N===null?a.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:f,tail:s,tailMode:y,treeForkCount:b}:(N.isBackwards=i,N.rendering=null,N.renderingStartTime=0,N.last=f,N.tail=s,N.tailMode=y,N.treeForkCount=b)}function aS(a,i,s){var f=i.pendingProps,y=f.revealOrder,b=f.tail;f=f.children;var N=Nt.current,R=(N&2)!==0;if(R?(N=N&1|2,i.flags|=128):N&=1,q(Nt,N),Qt(a,i,f,s),f=He?Do:0,!R&&a!==null&&(a.flags&128)!==0)e:for(a=i.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&rS(a,s,i);else if(a.tag===19)rS(a,s,i);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(y){case"forwards":for(s=i.child,y=null;s!==null;)a=s.alternate,a!==null&&sc(a)===null&&(y=s),s=s.sibling;s=y,s===null?(y=i.child,i.child=null):(y=s.sibling,s.sibling=null),$p(i,!1,y,s,b,f);break;case"backwards":case"unstable_legacy-backwards":for(s=null,y=i.child,i.child=null;y!==null;){if(a=y.alternate,a!==null&&sc(a)===null){i.child=y;break}a=y.sibling,y.sibling=s,s=y,y=a}$p(i,!0,s,null,b,f);break;case"together":$p(i,!1,null,null,void 0,f);break;default:i.memoizedState=null}return i.child}function Lr(a,i,s){if(a!==null&&(i.dependencies=a.dependencies),Oa|=i.lanes,(s&i.childLanes)===0)if(a!==null){if(nl(a,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(a!==null&&i.child!==a.child)throw Error(r(153));if(i.child!==null){for(a=i.child,s=Rr(a,a.pendingProps),i.child=s,s.return=i;a.sibling!==null;)a=a.sibling,s=s.sibling=Rr(a,a.pendingProps),s.return=i;s.sibling=null}return i.child}function qp(a,i){return(a.lanes&i)!==0?!0:(a=a.dependencies,!!(a!==null&&ec(a)))}function I5(a,i,s){switch(i.tag){case 3:Ge(i,i.stateNode.containerInfo),ya(i,Ct,a.memoizedState.cache),ni();break;case 27:case 5:Te(i);break;case 4:Ge(i,i.stateNode.containerInfo);break;case 10:ya(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,sp(i),null;break;case 13:var f=i.memoizedState;if(f!==null)return f.dehydrated!==null?(ja(i),i.flags|=128,null):(s&i.child.childLanes)!==0?nS(a,i,s):(ja(i),a=Lr(a,i,s),a!==null?a.sibling:null);ja(i);break;case 19:var y=(a.flags&128)!==0;if(f=(s&i.childLanes)!==0,f||(nl(a,i,s,!1),f=(s&i.childLanes)!==0),y){if(f)return aS(a,i,s);i.flags|=128}if(y=i.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),q(Nt,Nt.current),f)break;return null;case 22:return i.lanes=0,Z_(a,i,s,i.pendingProps);case 24:ya(i,Ct,a.memoizedState.cache)}return Lr(a,i,s)}function iS(a,i,s){if(a!==null)if(a.memoizedProps!==i.pendingProps)kt=!0;else{if(!qp(a,s)&&(i.flags&128)===0)return kt=!1,I5(a,i,s);kt=(a.flags&131072)!==0}else kt=!1,He&&(i.flags&1048576)!==0&&qj(i,Do,i.index);switch(i.lanes=0,i.tag){case 16:e:{var f=i.pendingProps;if(a=li(i.elementType),i.type=a,typeof a=="function")Ih(a)?(f=ci(a,f),i.tag=1,i=eS(null,i,a,f,s)):(i.tag=0,i=Cp(null,i,a,f,s));else{if(a!=null){var y=a.$$typeof;if(y===M){i.tag=11,i=F_(null,i,a,f,s);break e}else if(y===k){i.tag=14,i=K_(null,i,a,f,s);break e}}throw i=Q(a)||a,Error(r(306,i,""))}}return i;case 0:return Cp(a,i,i.type,i.pendingProps,s);case 1:return f=i.type,y=ci(f,i.pendingProps),eS(a,i,f,y,s);case 3:e:{if(Ge(i,i.stateNode.containerInfo),a===null)throw Error(r(387));f=i.pendingProps;var b=i.memoizedState;y=b.element,rp(a,i),Ho(i,f,null,s);var N=i.memoizedState;if(f=N.cache,ya(i,Ct,f),f!==b.cache&&Wh(i,[Ct],s,!0),Io(),f=N.element,b.isDehydrated)if(b={element:f,isDehydrated:!1,cache:N.cache},i.updateQueue.baseState=b,i.memoizedState=b,i.flags&256){i=tS(a,i,f,s);break e}else if(f!==y){y=In(Error(r(424)),i),$o(y),i=tS(a,i,f,s);break e}else{switch(a=i.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(vt=Fn(a.firstChild),Zt=i,He=!0,ma=null,Yn=!0,s=Zj(i,null,f,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(ni(),f===y){i=Lr(a,i,s);break e}Qt(a,i,f,s)}i=i.child}return i;case 26:return bc(a,i),a===null?(s=vw(i.type,null,i.pendingProps,null))?i.memoizedState=s:He||(s=i.type,a=i.pendingProps,f=$c(we.current).createElement(s),f[Xt]=i,f[hn]=a,Jt(f,s,a),Gt(f),i.stateNode=f):i.memoizedState=vw(i.type,a.memoizedProps,i.pendingProps,a.memoizedState),null;case 27:return Te(i),a===null&&He&&(f=i.stateNode=hw(i.type,i.pendingProps,we.current),Zt=i,Yn=!0,y=vt,Ca(i.type)?(vm=y,vt=Fn(f.firstChild)):vt=y),Qt(a,i,i.pendingProps.children,s),bc(a,i),a===null&&(i.flags|=4194304),i.child;case 5:return a===null&&He&&((y=f=vt)&&(f=gD(f,i.type,i.pendingProps,Yn),f!==null?(i.stateNode=f,Zt=i,vt=Fn(f.firstChild),Yn=!1,y=!0):y=!1),y||va(i)),Te(i),y=i.type,b=i.pendingProps,N=a!==null?a.memoizedProps:null,f=b.children,fm(y,b)?f=null:N!==null&&fm(y,N)&&(i.flags|=32),i.memoizedState!==null&&(y=cp(a,i,R5,null,null,s),us._currentValue=y),bc(a,i),Qt(a,i,f,s),i.child;case 6:return a===null&&He&&((a=s=vt)&&(s=bD(s,i.pendingProps,Yn),s!==null?(i.stateNode=s,Zt=i,vt=null,a=!0):a=!1),a||va(i)),null;case 13:return nS(a,i,s);case 4:return Ge(i,i.stateNode.containerInfo),f=i.pendingProps,a===null?i.child=si(i,null,f,s):Qt(a,i,f,s),i.child;case 11:return F_(a,i,i.type,i.pendingProps,s);case 7:return Qt(a,i,i.pendingProps,s),i.child;case 8:return Qt(a,i,i.pendingProps.children,s),i.child;case 12:return Qt(a,i,i.pendingProps.children,s),i.child;case 10:return f=i.pendingProps,ya(i,i.type,f.value),Qt(a,i,f.children,s),i.child;case 9:return y=i.type._context,f=i.pendingProps.children,ai(i),y=Wt(y),f=f(y),i.flags|=1,Qt(a,i,f,s),i.child;case 14:return K_(a,i,i.type,i.pendingProps,s);case 15:return X_(a,i,i.type,i.pendingProps,s);case 19:return aS(a,i,s);case 31:return U5(a,i,s);case 22:return Z_(a,i,s,i.pendingProps);case 24:return ai(i),f=Wt(Ct),a===null?(y=ep(),y===null&&(y=ut,b=Qh(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=s),y=b),i.memoizedState={parent:f,cache:y},np(i),ya(i,Ct,y)):((a.lanes&s)!==0&&(rp(a,i),Ho(i,null,null,s),Io()),y=a.memoizedState,b=i.memoizedState,y.parent!==f?(y={parent:f,cache:f},i.memoizedState=y,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=y),ya(i,Ct,f)):(f=b.cache,ya(i,Ct,f),f!==y.cache&&Wh(i,[Ct],s,!0))),Qt(a,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function Br(a){a.flags|=4}function zp(a,i,s,f,y){if((i=(a.mode&32)!==0)&&(i=!1),i){if(a.flags|=16777216,(y&335544128)===y)if(a.stateNode.complete)a.flags|=8192;else if(kS())a.flags|=8192;else throw oi=ac,tp}else a.flags&=-16777217}function lS(a,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!jw(i))if(kS())a.flags|=8192;else throw oi=ac,tp}function jc(a,i){i!==null&&(a.flags|=4),a.flags&16384&&(i=a.tag!==22?L1():536870912,a.lanes|=i,pl|=i)}function Xo(a,i){if(!He)switch(a.tailMode){case"hidden":i=a.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?a.tail=null:s.sibling=null;break;case"collapsed":s=a.tail;for(var f=null;s!==null;)s.alternate!==null&&(f=s),s=s.sibling;f===null?i||a.tail===null?a.tail=null:a.tail.sibling=null:f.sibling=null}}function yt(a){var i=a.alternate!==null&&a.alternate.child===a.child,s=0,f=0;if(i)for(var y=a.child;y!==null;)s|=y.lanes|y.childLanes,f|=y.subtreeFlags&65011712,f|=y.flags&65011712,y.return=a,y=y.sibling;else for(y=a.child;y!==null;)s|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=a,y=y.sibling;return a.subtreeFlags|=f,a.childLanes=s,i}function H5(a,i,s){var f=i.pendingProps;switch(Vh(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(i),null;case 1:return yt(i),null;case 3:return s=i.stateNode,f=null,a!==null&&(f=a.memoizedState.cache),i.memoizedState.cache!==f&&(i.flags|=2048),$r(Ct),me(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(a===null||a.child===null)&&(tl(i)?Br(i):a===null||a.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Kh())),yt(i),null;case 26:var y=i.type,b=i.memoizedState;return a===null?(Br(i),b!==null?(yt(i),lS(i,b)):(yt(i),zp(i,y,null,f,s))):b?b!==a.memoizedState?(Br(i),yt(i),lS(i,b)):(yt(i),i.flags&=-16777217):(a=a.memoizedProps,a!==f&&Br(i),yt(i),zp(i,y,a,f,s)),null;case 27:if(Me(i),s=we.current,y=i.type,a!==null&&i.stateNode!=null)a.memoizedProps!==f&&Br(i);else{if(!f){if(i.stateNode===null)throw Error(r(166));return yt(i),null}a=de.current,tl(i)?Lj(i):(a=hw(y,f,s),i.stateNode=a,Br(i))}return yt(i),null;case 5:if(Me(i),y=i.type,a!==null&&i.stateNode!=null)a.memoizedProps!==f&&Br(i);else{if(!f){if(i.stateNode===null)throw Error(r(166));return yt(i),null}if(b=de.current,tl(i))Lj(i);else{var N=$c(we.current);switch(b){case 1:b=N.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:b=N.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":b=N.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":b=N.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":b=N.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof f.is=="string"?N.createElement("select",{is:f.is}):N.createElement("select"),f.multiple?b.multiple=!0:f.size&&(b.size=f.size);break;default:b=typeof f.is=="string"?N.createElement(y,{is:f.is}):N.createElement(y)}}b[Xt]=i,b[hn]=f;e:for(N=i.child;N!==null;){if(N.tag===5||N.tag===6)b.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===i)break e;for(;N.sibling===null;){if(N.return===null||N.return===i)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}i.stateNode=b;e:switch(Jt(b,y,f),y){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&Br(i)}}return yt(i),zp(i,i.type,a===null?null:a.memoizedProps,i.pendingProps,s),null;case 6:if(a&&i.stateNode!=null)a.memoizedProps!==f&&Br(i);else{if(typeof f!="string"&&i.stateNode===null)throw Error(r(166));if(a=we.current,tl(i)){if(a=i.stateNode,s=i.memoizedProps,f=null,y=Zt,y!==null)switch(y.tag){case 27:case 5:f=y.memoizedProps}a[Xt]=i,a=!!(a.nodeValue===s||f!==null&&f.suppressHydrationWarning===!0||nw(a.nodeValue,s)),a||va(i,!0)}else a=$c(a).createTextNode(f),a[Xt]=i,i.stateNode=a}return yt(i),null;case 31:if(s=i.memoizedState,a===null||a.memoizedState!==null){if(f=tl(i),s!==null){if(a===null){if(!f)throw Error(r(318));if(a=i.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[Xt]=i}else ni(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;yt(i),a=!1}else s=Kh(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=s),a=!0;if(!a)return i.flags&256?(Cn(i),i):(Cn(i),null);if((i.flags&128)!==0)throw Error(r(558))}return yt(i),null;case 13:if(f=i.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(y=tl(i),f!==null&&f.dehydrated!==null){if(a===null){if(!y)throw Error(r(318));if(y=i.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Xt]=i}else ni(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;yt(i),y=!1}else y=Kh(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=y),y=!0;if(!y)return i.flags&256?(Cn(i),i):(Cn(i),null)}return Cn(i),(i.flags&128)!==0?(i.lanes=s,i):(s=f!==null,a=a!==null&&a.memoizedState!==null,s&&(f=i.child,y=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(y=f.alternate.memoizedState.cachePool.pool),b=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(b=f.memoizedState.cachePool.pool),b!==y&&(f.flags|=2048)),s!==a&&s&&(i.child.flags|=8192),jc(i,i.updateQueue),yt(i),null);case 4:return me(),a===null&&lm(i.stateNode.containerInfo),yt(i),null;case 10:return $r(i.type),yt(i),null;case 19:if(F(Nt),f=i.memoizedState,f===null)return yt(i),null;if(y=(i.flags&128)!==0,b=f.rendering,b===null)if(y)Xo(f,!1);else{if(Ot!==0||a!==null&&(a.flags&128)!==0)for(a=i.child;a!==null;){if(b=sc(a),b!==null){for(i.flags|=128,Xo(f,!1),a=b.updateQueue,i.updateQueue=a,jc(i,a),i.subtreeFlags=0,a=s,s=i.child;s!==null;)Pj(s,a),s=s.sibling;return q(Nt,Nt.current&1|2),He&&Pr(i,f.treeForkCount),i.child}a=a.sibling}f.tail!==null&&rn()>Ac&&(i.flags|=128,y=!0,Xo(f,!1),i.lanes=4194304)}else{if(!y)if(a=sc(b),a!==null){if(i.flags|=128,y=!0,a=a.updateQueue,i.updateQueue=a,jc(i,a),Xo(f,!0),f.tail===null&&f.tailMode==="hidden"&&!b.alternate&&!He)return yt(i),null}else 2*rn()-f.renderingStartTime>Ac&&s!==536870912&&(i.flags|=128,y=!0,Xo(f,!1),i.lanes=4194304);f.isBackwards?(b.sibling=i.child,i.child=b):(a=f.last,a!==null?a.sibling=b:i.child=b,f.last=b)}return f.tail!==null?(a=f.tail,f.rendering=a,f.tail=a.sibling,f.renderingStartTime=rn(),a.sibling=null,s=Nt.current,q(Nt,y?s&1|2:s&1),He&&Pr(i,f.treeForkCount),a):(yt(i),null);case 22:case 23:return Cn(i),op(),f=i.memoizedState!==null,a!==null?a.memoizedState!==null!==f&&(i.flags|=8192):f&&(i.flags|=8192),f?(s&536870912)!==0&&(i.flags&128)===0&&(yt(i),i.subtreeFlags&6&&(i.flags|=8192)):yt(i),s=i.updateQueue,s!==null&&jc(i,s.retryQueue),s=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),f=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==s&&(i.flags|=2048),a!==null&&F(ii),null;case 24:return s=null,a!==null&&(s=a.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),$r(Ct),yt(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function G5(a,i){switch(Vh(i),i.tag){case 1:return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 3:return $r(Ct),me(),a=i.flags,(a&65536)!==0&&(a&128)===0?(i.flags=a&-65537|128,i):null;case 26:case 27:case 5:return Me(i),null;case 31:if(i.memoizedState!==null){if(Cn(i),i.alternate===null)throw Error(r(340));ni()}return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 13:if(Cn(i),a=i.memoizedState,a!==null&&a.dehydrated!==null){if(i.alternate===null)throw Error(r(340));ni()}return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 19:return F(Nt),null;case 4:return me(),null;case 10:return $r(i.type),null;case 22:case 23:return Cn(i),op(),a!==null&&F(ii),a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 24:return $r(Ct),null;case 25:return null;default:return null}}function oS(a,i){switch(Vh(i),i.tag){case 3:$r(Ct),me();break;case 26:case 27:case 5:Me(i);break;case 4:me();break;case 31:i.memoizedState!==null&&Cn(i);break;case 13:Cn(i);break;case 19:F(Nt);break;case 10:$r(i.type);break;case 22:case 23:Cn(i),op(),a!==null&&F(ii);break;case 24:$r(Ct)}}function Zo(a,i){try{var s=i.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var y=f.next;s=y;do{if((s.tag&a)===a){f=void 0;var b=s.create,N=s.inst;f=b(),N.destroy=f}s=s.next}while(s!==y)}}catch(R){et(i,i.return,R)}}function Sa(a,i,s){try{var f=i.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var b=y.next;f=b;do{if((f.tag&a)===a){var N=f.inst,R=N.destroy;if(R!==void 0){N.destroy=void 0,y=i;var I=s,ee=R;try{ee()}catch(le){et(y,I,le)}}}f=f.next}while(f!==b)}}catch(le){et(i,i.return,le)}}function sS(a){var i=a.updateQueue;if(i!==null){var s=a.stateNode;try{Qj(i,s)}catch(f){et(a,a.return,f)}}}function uS(a,i,s){s.props=ci(a.type,a.memoizedProps),s.state=a.memoizedState;try{s.componentWillUnmount()}catch(f){et(a,i,f)}}function Wo(a,i){try{var s=a.ref;if(s!==null){switch(a.tag){case 26:case 27:case 5:var f=a.stateNode;break;case 30:f=a.stateNode;break;default:f=a.stateNode}typeof s=="function"?a.refCleanup=s(f):s.current=f}}catch(y){et(a,i,y)}}function xr(a,i){var s=a.ref,f=a.refCleanup;if(s!==null)if(typeof f=="function")try{f()}catch(y){et(a,i,y)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(y){et(a,i,y)}else s.current=null}function cS(a){var i=a.type,s=a.memoizedProps,f=a.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&f.focus();break e;case"img":s.src?f.src=s.src:s.srcSet&&(f.srcset=s.srcSet)}}catch(y){et(a,a.return,y)}}function Lp(a,i,s){try{var f=a.stateNode;dD(f,a.type,s,i),f[hn]=i}catch(y){et(a,a.return,y)}}function fS(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Ca(a.type)||a.tag===4}function Bp(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||fS(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&&Ca(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 Up(a,i,s){var f=a.tag;if(f===5||f===6)a=a.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(a,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(a),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Mr));else if(f!==4&&(f===27&&Ca(a.type)&&(s=a.stateNode,i=null),a=a.child,a!==null))for(Up(a,i,s),a=a.sibling;a!==null;)Up(a,i,s),a=a.sibling}function _c(a,i,s){var f=a.tag;if(f===5||f===6)a=a.stateNode,i?s.insertBefore(a,i):s.appendChild(a);else if(f!==4&&(f===27&&Ca(a.type)&&(s=a.stateNode),a=a.child,a!==null))for(_c(a,i,s),a=a.sibling;a!==null;)_c(a,i,s),a=a.sibling}function dS(a){var i=a.stateNode,s=a.memoizedProps;try{for(var f=a.type,y=i.attributes;y.length;)i.removeAttributeNode(y[0]);Jt(i,f,s),i[Xt]=a,i[hn]=s}catch(b){et(a,a.return,b)}}var Ur=!1,Rt=!1,Ip=!1,hS=typeof WeakSet=="function"?WeakSet:Set,Yt=null;function Y5(a,i){if(a=a.containerInfo,um=Hc,a=Oj(a),Dh(a)){if("selectionStart"in a)var s={start:a.selectionStart,end:a.selectionEnd};else e:{s=(s=a.ownerDocument)&&s.defaultView||window;var f=s.getSelection&&s.getSelection();if(f&&f.rangeCount!==0){s=f.anchorNode;var y=f.anchorOffset,b=f.focusNode;f=f.focusOffset;try{s.nodeType,b.nodeType}catch{s=null;break e}var N=0,R=-1,I=-1,ee=0,le=0,ue=a,ne=null;t:for(;;){for(var re;ue!==s||y!==0&&ue.nodeType!==3||(R=N+y),ue!==b||f!==0&&ue.nodeType!==3||(I=N+f),ue.nodeType===3&&(N+=ue.nodeValue.length),(re=ue.firstChild)!==null;)ne=ue,ue=re;for(;;){if(ue===a)break t;if(ne===s&&++ee===y&&(R=N),ne===b&&++le===f&&(I=N),(re=ue.nextSibling)!==null)break;ue=ne,ne=ue.parentNode}ue=re}s=R===-1||I===-1?null:{start:R,end:I}}else s=null}s=s||{start:0,end:0}}else s=null;for(cm={focusedElem:a,selectionRange:s},Hc=!1,Yt=i;Yt!==null;)if(i=Yt,a=i.child,(i.subtreeFlags&1028)!==0&&a!==null)a.return=i,Yt=a;else for(;Yt!==null;){switch(i=Yt,b=i.alternate,a=i.flags,i.tag){case 0:if((a&4)!==0&&(a=i.updateQueue,a=a!==null?a.events:null,a!==null))for(s=0;s<a.length;s++)y=a[s],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,s=i,y=b.memoizedProps,b=b.memoizedState,f=s.stateNode;try{var xe=ci(s.type,y);a=f.getSnapshotBeforeUpdate(xe,b),f.__reactInternalSnapshotBeforeUpdate=a}catch(Ne){et(s,s.return,Ne)}}break;case 3:if((a&1024)!==0){if(a=i.stateNode.containerInfo,s=a.nodeType,s===9)hm(a);else if(s===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":hm(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=i.sibling,a!==null){a.return=i.return,Yt=a;break}Yt=i.return}}function pS(a,i,s){var f=s.flags;switch(s.tag){case 0:case 11:case 15:Hr(a,s),f&4&&Zo(5,s);break;case 1:if(Hr(a,s),f&4)if(a=s.stateNode,i===null)try{a.componentDidMount()}catch(N){et(s,s.return,N)}else{var y=ci(s.type,i.memoizedProps);i=i.memoizedState;try{a.componentDidUpdate(y,i,a.__reactInternalSnapshotBeforeUpdate)}catch(N){et(s,s.return,N)}}f&64&&sS(s),f&512&&Wo(s,s.return);break;case 3:if(Hr(a,s),f&64&&(a=s.updateQueue,a!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{Qj(a,i)}catch(N){et(s,s.return,N)}}break;case 27:i===null&&f&4&&dS(s);case 26:case 5:Hr(a,s),i===null&&f&4&&cS(s),f&512&&Wo(s,s.return);break;case 12:Hr(a,s);break;case 31:Hr(a,s),f&4&&yS(a,s);break;case 13:Hr(a,s),f&4&&gS(a,s),f&64&&(a=s.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(s=eD.bind(null,s),xD(a,s))));break;case 22:if(f=s.memoizedState!==null||Ur,!f){i=i!==null&&i.memoizedState!==null||Rt,y=Ur;var b=Rt;Ur=f,(Rt=i)&&!b?Gr(a,s,(s.subtreeFlags&8772)!==0):Hr(a,s),Ur=y,Rt=b}break;case 30:break;default:Hr(a,s)}}function mS(a){var i=a.alternate;i!==null&&(a.alternate=null,mS(i)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(i=a.stateNode,i!==null&&gh(i)),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 bt=null,mn=!1;function Ir(a,i,s){for(s=s.child;s!==null;)vS(a,i,s),s=s.sibling}function vS(a,i,s){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(jo,s)}catch{}switch(s.tag){case 26:Rt||xr(s,i),Ir(a,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Rt||xr(s,i);var f=bt,y=mn;Ca(s.type)&&(bt=s.stateNode,mn=!1),Ir(a,i,s),ls(s.stateNode),bt=f,mn=y;break;case 5:Rt||xr(s,i);case 6:if(f=bt,y=mn,bt=null,Ir(a,i,s),bt=f,mn=y,bt!==null)if(mn)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(s.stateNode)}catch(b){et(s,i,b)}else try{bt.removeChild(s.stateNode)}catch(b){et(s,i,b)}break;case 18:bt!==null&&(mn?(a=bt,sw(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,s.stateNode),_l(a)):sw(bt,s.stateNode));break;case 4:f=bt,y=mn,bt=s.stateNode.containerInfo,mn=!0,Ir(a,i,s),bt=f,mn=y;break;case 0:case 11:case 14:case 15:Sa(2,s,i),Rt||Sa(4,s,i),Ir(a,i,s);break;case 1:Rt||(xr(s,i),f=s.stateNode,typeof f.componentWillUnmount=="function"&&uS(s,i,f)),Ir(a,i,s);break;case 21:Ir(a,i,s);break;case 22:Rt=(f=Rt)||s.memoizedState!==null,Ir(a,i,s),Rt=f;break;default:Ir(a,i,s)}}function yS(a,i){if(i.memoizedState===null&&(a=i.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{_l(a)}catch(s){et(i,i.return,s)}}}function gS(a,i){if(i.memoizedState===null&&(a=i.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{_l(a)}catch(s){et(i,i.return,s)}}function V5(a){switch(a.tag){case 31:case 13:case 19:var i=a.stateNode;return i===null&&(i=a.stateNode=new hS),i;case 22:return a=a.stateNode,i=a._retryCache,i===null&&(i=a._retryCache=new hS),i;default:throw Error(r(435,a.tag))}}function Sc(a,i){var s=V5(a);i.forEach(function(f){if(!s.has(f)){s.add(f);var y=tD.bind(null,a,f);f.then(y,y)}})}function vn(a,i){var s=i.deletions;if(s!==null)for(var f=0;f<s.length;f++){var y=s[f],b=a,N=i,R=N;e:for(;R!==null;){switch(R.tag){case 27:if(Ca(R.type)){bt=R.stateNode,mn=!1;break e}break;case 5:bt=R.stateNode,mn=!1;break e;case 3:case 4:bt=R.stateNode.containerInfo,mn=!0;break e}R=R.return}if(bt===null)throw Error(r(160));vS(b,N,y),bt=null,mn=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)bS(i,a),i=i.sibling}var or=null;function bS(a,i){var s=a.alternate,f=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:vn(i,a),yn(a),f&4&&(Sa(3,a,a.return),Zo(3,a),Sa(5,a,a.return));break;case 1:vn(i,a),yn(a),f&512&&(Rt||s===null||xr(s,s.return)),f&64&&Ur&&(a=a.updateQueue,a!==null&&(f=a.callbacks,f!==null&&(s=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=s===null?f:s.concat(f))));break;case 26:var y=or;if(vn(i,a),yn(a),f&512&&(Rt||s===null||xr(s,s.return)),f&4){var b=s!==null?s.memoizedState:null;if(f=a.memoizedState,s===null)if(f===null)if(a.stateNode===null){e:{f=a.type,s=a.memoizedProps,y=y.ownerDocument||y;t:switch(f){case"title":b=y.getElementsByTagName("title")[0],(!b||b[wo]||b[Xt]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(f),y.head.insertBefore(b,y.querySelector("head > title"))),Jt(b,f,s),b[Xt]=a,Gt(b),f=b;break e;case"link":var N=bw("link","href",y).get(f+(s.href||""));if(N){for(var R=0;R<N.length;R++)if(b=N[R],b.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&b.getAttribute("rel")===(s.rel==null?null:s.rel)&&b.getAttribute("title")===(s.title==null?null:s.title)&&b.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){N.splice(R,1);break t}}b=y.createElement(f),Jt(b,f,s),y.head.appendChild(b);break;case"meta":if(N=bw("meta","content",y).get(f+(s.content||""))){for(R=0;R<N.length;R++)if(b=N[R],b.getAttribute("content")===(s.content==null?null:""+s.content)&&b.getAttribute("name")===(s.name==null?null:s.name)&&b.getAttribute("property")===(s.property==null?null:s.property)&&b.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&b.getAttribute("charset")===(s.charSet==null?null:s.charSet)){N.splice(R,1);break t}}b=y.createElement(f),Jt(b,f,s),y.head.appendChild(b);break;default:throw Error(r(468,f))}b[Xt]=a,Gt(b),f=b}a.stateNode=f}else xw(y,a.type,a.stateNode);else a.stateNode=gw(y,f,a.memoizedProps);else b!==f?(b===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):b.count--,f===null?xw(y,a.type,a.stateNode):gw(y,f,a.memoizedProps)):f===null&&a.stateNode!==null&&Lp(a,a.memoizedProps,s.memoizedProps)}break;case 27:vn(i,a),yn(a),f&512&&(Rt||s===null||xr(s,s.return)),s!==null&&f&4&&Lp(a,a.memoizedProps,s.memoizedProps);break;case 5:if(vn(i,a),yn(a),f&512&&(Rt||s===null||xr(s,s.return)),a.flags&32){y=a.stateNode;try{Yi(y,"")}catch(xe){et(a,a.return,xe)}}f&4&&a.stateNode!=null&&(y=a.memoizedProps,Lp(a,y,s!==null?s.memoizedProps:y)),f&1024&&(Ip=!0);break;case 6:if(vn(i,a),yn(a),f&4){if(a.stateNode===null)throw Error(r(162));f=a.memoizedProps,s=a.stateNode;try{s.nodeValue=f}catch(xe){et(a,a.return,xe)}}break;case 3:if(Lc=null,y=or,or=qc(i.containerInfo),vn(i,a),or=y,yn(a),f&4&&s!==null&&s.memoizedState.isDehydrated)try{_l(i.containerInfo)}catch(xe){et(a,a.return,xe)}Ip&&(Ip=!1,xS(a));break;case 4:f=or,or=qc(a.stateNode.containerInfo),vn(i,a),yn(a),or=f;break;case 12:vn(i,a),yn(a);break;case 31:vn(i,a),yn(a),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,Sc(a,f)));break;case 13:vn(i,a),yn(a),a.child.flags&8192&&a.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Oc=rn()),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,Sc(a,f)));break;case 22:y=a.memoizedState!==null;var I=s!==null&&s.memoizedState!==null,ee=Ur,le=Rt;if(Ur=ee||y,Rt=le||I,vn(i,a),Rt=le,Ur=ee,yn(a),f&8192)e:for(i=a.stateNode,i._visibility=y?i._visibility&-2:i._visibility|1,y&&(s===null||I||Ur||Rt||fi(a)),s=null,i=a;;){if(i.tag===5||i.tag===26){if(s===null){I=s=i;try{if(b=I.stateNode,y)N=b.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{R=I.stateNode;var ue=I.memoizedProps.style,ne=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;R.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(xe){et(I,I.return,xe)}}}else if(i.tag===6){if(s===null){I=i;try{I.stateNode.nodeValue=y?"":I.memoizedProps}catch(xe){et(I,I.return,xe)}}}else if(i.tag===18){if(s===null){I=i;try{var re=I.stateNode;y?uw(re,!0):uw(I.stateNode,!1)}catch(xe){et(I,I.return,xe)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===a)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}f&4&&(f=a.updateQueue,f!==null&&(s=f.retryQueue,s!==null&&(f.retryQueue=null,Sc(a,s))));break;case 19:vn(i,a),yn(a),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,Sc(a,f)));break;case 30:break;case 21:break;default:vn(i,a),yn(a)}}function yn(a){var i=a.flags;if(i&2){try{for(var s,f=a.return;f!==null;){if(fS(f)){s=f;break}f=f.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var y=s.stateNode,b=Bp(a);_c(a,b,y);break;case 5:var N=s.stateNode;s.flags&32&&(Yi(N,""),s.flags&=-33);var R=Bp(a);_c(a,R,N);break;case 3:case 4:var I=s.stateNode.containerInfo,ee=Bp(a);Up(a,ee,I);break;default:throw Error(r(161))}}catch(le){et(a,a.return,le)}a.flags&=-3}i&4096&&(a.flags&=-4097)}function xS(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var i=a;xS(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),a=a.sibling}}function Hr(a,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)pS(a,i.alternate,i),i=i.sibling}function fi(a){for(a=a.child;a!==null;){var i=a;switch(i.tag){case 0:case 11:case 14:case 15:Sa(4,i,i.return),fi(i);break;case 1:xr(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&uS(i,i.return,s),fi(i);break;case 27:ls(i.stateNode);case 26:case 5:xr(i,i.return),fi(i);break;case 22:i.memoizedState===null&&fi(i);break;case 30:fi(i);break;default:fi(i)}a=a.sibling}}function Gr(a,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var f=i.alternate,y=a,b=i,N=b.flags;switch(b.tag){case 0:case 11:case 15:Gr(y,b,s),Zo(4,b);break;case 1:if(Gr(y,b,s),f=b,y=f.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(ee){et(f,f.return,ee)}if(f=b,y=f.updateQueue,y!==null){var R=f.stateNode;try{var I=y.shared.hiddenCallbacks;if(I!==null)for(y.shared.hiddenCallbacks=null,y=0;y<I.length;y++)Wj(I[y],R)}catch(ee){et(f,f.return,ee)}}s&&N&64&&sS(b),Wo(b,b.return);break;case 27:dS(b);case 26:case 5:Gr(y,b,s),s&&f===null&&N&4&&cS(b),Wo(b,b.return);break;case 12:Gr(y,b,s);break;case 31:Gr(y,b,s),s&&N&4&&yS(y,b);break;case 13:Gr(y,b,s),s&&N&4&&gS(y,b);break;case 22:b.memoizedState===null&&Gr(y,b,s),Wo(b,b.return);break;case 30:break;default:Gr(y,b,s)}i=i.sibling}}function Hp(a,i){var s=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),a=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(a=i.memoizedState.cachePool.pool),a!==s&&(a!=null&&a.refCount++,s!=null&&qo(s))}function Gp(a,i){a=null,i.alternate!==null&&(a=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==a&&(i.refCount++,a!=null&&qo(a))}function sr(a,i,s,f){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)jS(a,i,s,f),i=i.sibling}function jS(a,i,s,f){var y=i.flags;switch(i.tag){case 0:case 11:case 15:sr(a,i,s,f),y&2048&&Zo(9,i);break;case 1:sr(a,i,s,f);break;case 3:sr(a,i,s,f),y&2048&&(a=null,i.alternate!==null&&(a=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==a&&(i.refCount++,a!=null&&qo(a)));break;case 12:if(y&2048){sr(a,i,s,f),a=i.stateNode;try{var b=i.memoizedProps,N=b.id,R=b.onPostCommit;typeof R=="function"&&R(N,i.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(I){et(i,i.return,I)}}else sr(a,i,s,f);break;case 31:sr(a,i,s,f);break;case 13:sr(a,i,s,f);break;case 23:break;case 22:b=i.stateNode,N=i.alternate,i.memoizedState!==null?b._visibility&2?sr(a,i,s,f):Qo(a,i):b._visibility&2?sr(a,i,s,f):(b._visibility|=2,fl(a,i,s,f,(i.subtreeFlags&10256)!==0||!1)),y&2048&&Hp(N,i);break;case 24:sr(a,i,s,f),y&2048&&Gp(i.alternate,i);break;default:sr(a,i,s,f)}}function fl(a,i,s,f,y){for(y=y&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var b=a,N=i,R=s,I=f,ee=N.flags;switch(N.tag){case 0:case 11:case 15:fl(b,N,R,I,y),Zo(8,N);break;case 23:break;case 22:var le=N.stateNode;N.memoizedState!==null?le._visibility&2?fl(b,N,R,I,y):Qo(b,N):(le._visibility|=2,fl(b,N,R,I,y)),y&&ee&2048&&Hp(N.alternate,N);break;case 24:fl(b,N,R,I,y),y&&ee&2048&&Gp(N.alternate,N);break;default:fl(b,N,R,I,y)}i=i.sibling}}function Qo(a,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=a,f=i,y=f.flags;switch(f.tag){case 22:Qo(s,f),y&2048&&Hp(f.alternate,f);break;case 24:Qo(s,f),y&2048&&Gp(f.alternate,f);break;default:Qo(s,f)}i=i.sibling}}var Jo=8192;function dl(a,i,s){if(a.subtreeFlags&Jo)for(a=a.child;a!==null;)_S(a,i,s),a=a.sibling}function _S(a,i,s){switch(a.tag){case 26:dl(a,i,s),a.flags&Jo&&a.memoizedState!==null&&kD(s,or,a.memoizedState,a.memoizedProps);break;case 5:dl(a,i,s);break;case 3:case 4:var f=or;or=qc(a.stateNode.containerInfo),dl(a,i,s),or=f;break;case 22:a.memoizedState===null&&(f=a.alternate,f!==null&&f.memoizedState!==null?(f=Jo,Jo=16777216,dl(a,i,s),Jo=f):dl(a,i,s));break;default:dl(a,i,s)}}function SS(a){var i=a.alternate;if(i!==null&&(a=i.child,a!==null)){i.child=null;do i=a.sibling,a.sibling=null,a=i;while(a!==null)}}function es(a){var i=a.deletions;if((a.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var f=i[s];Yt=f,OS(f,a)}SS(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)wS(a),a=a.sibling}function wS(a){switch(a.tag){case 0:case 11:case 15:es(a),a.flags&2048&&Sa(9,a,a.return);break;case 3:es(a);break;case 12:es(a);break;case 22:var i=a.stateNode;a.memoizedState!==null&&i._visibility&2&&(a.return===null||a.return.tag!==13)?(i._visibility&=-3,wc(a)):es(a);break;default:es(a)}}function wc(a){var i=a.deletions;if((a.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var f=i[s];Yt=f,OS(f,a)}SS(a)}for(a=a.child;a!==null;){switch(i=a,i.tag){case 0:case 11:case 15:Sa(8,i,i.return),wc(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,wc(i));break;default:wc(i)}a=a.sibling}}function OS(a,i){for(;Yt!==null;){var s=Yt;switch(s.tag){case 0:case 11:case 15:Sa(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var f=s.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:qo(s.memoizedState.cache)}if(f=s.child,f!==null)f.return=s,Yt=f;else e:for(s=a;Yt!==null;){f=Yt;var y=f.sibling,b=f.return;if(mS(f),f===s){Yt=null;break e}if(y!==null){y.return=b,Yt=y;break e}Yt=b}}}var F5={getCacheForType:function(a){var i=Wt(Ct),s=i.data.get(a);return s===void 0&&(s=a(),i.data.set(a,s)),s},cacheSignal:function(){return Wt(Ct).controller.signal}},K5=typeof WeakMap=="function"?WeakMap:Map,Xe=0,ut=null,Le=null,Ue=0,Je=0,Mn=null,wa=!1,hl=!1,Yp=!1,Yr=0,Ot=0,Oa=0,di=0,Vp=0,kn=0,pl=0,ts=null,gn=null,Fp=!1,Oc=0,AS=0,Ac=1/0,Nc=null,Aa=null,Lt=0,Na=null,ml=null,Vr=0,Kp=0,Xp=null,NS=null,ns=0,Zp=null;function Rn(){return(Xe&2)!==0&&Ue!==0?Ue&-Ue:P.T!==null?nm():H1()}function ES(){if(kn===0)if((Ue&536870912)===0||He){var a=Du;Du<<=1,(Du&3932160)===0&&(Du=262144),kn=a}else kn=536870912;return a=Tn.current,a!==null&&(a.flags|=32),kn}function bn(a,i,s){(a===ut&&(Je===2||Je===9)||a.cancelPendingCommit!==null)&&(vl(a,0),Ea(a,Ue,kn,!1)),So(a,s),((Xe&2)===0||a!==ut)&&(a===ut&&((Xe&2)===0&&(di|=s),Ot===4&&Ea(a,Ue,kn,!1)),jr(a))}function TS(a,i,s){if((Xe&6)!==0)throw Error(r(327));var f=!s&&(i&127)===0&&(i&a.expiredLanes)===0||_o(a,i),y=f?W5(a,i):Qp(a,i,!0),b=f;do{if(y===0){hl&&!f&&Ea(a,i,0,!1);break}else{if(s=a.current.alternate,b&&!X5(s)){y=Qp(a,i,!1),b=!1;continue}if(y===2){if(b=i,a.errorRecoveryDisabledLanes&b)var N=0;else N=a.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){i=N;e:{var R=a;y=ts;var I=R.current.memoizedState.isDehydrated;if(I&&(vl(R,N).flags|=256),N=Qp(R,N,!1),N!==2){if(Yp&&!I){R.errorRecoveryDisabledLanes|=b,di|=b,y=4;break e}b=gn,gn=y,b!==null&&(gn===null?gn=b:gn.push.apply(gn,b))}y=N}if(b=!1,y!==2)continue}}if(y===1){vl(a,0),Ea(a,i,0,!0);break}e:{switch(f=a,b=y,b){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i)break;case 6:Ea(f,i,kn,!wa);break e;case 2:gn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(y=Oc+300-rn(),10<y)){if(Ea(f,i,kn,!wa),qu(f,0,!0)!==0)break e;Vr=i,f.timeoutHandle=lw(CS.bind(null,f,s,gn,Nc,Fp,i,kn,di,pl,wa,b,"Throttled",-0,0),y);break e}CS(f,s,gn,Nc,Fp,i,kn,di,pl,wa,b,null,-0,0)}}break}while(!0);jr(a)}function CS(a,i,s,f,y,b,N,R,I,ee,le,ue,ne,re){if(a.timeoutHandle=-1,ue=i.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Mr},_S(i,b,ue);var xe=(b&62914560)===b?Oc-rn():(b&4194048)===b?AS-rn():0;if(xe=RD(ue,xe),xe!==null){Vr=b,a.cancelPendingCommit=xe(zS.bind(null,a,i,b,s,f,y,N,R,I,le,ue,null,ne,re)),Ea(a,b,N,!ee);return}}zS(a,i,b,s,f,y,N,R,I)}function X5(a){for(var i=a;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var f=0;f<s.length;f++){var y=s[f],b=y.getSnapshot;y=y.value;try{if(!Nn(b(),y))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===a)break;for(;i.sibling===null;){if(i.return===null||i.return===a)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Ea(a,i,s,f){i&=~Vp,i&=~di,a.suspendedLanes|=i,a.pingedLanes&=~i,f&&(a.warmLanes|=i),f=a.expirationTimes;for(var y=i;0<y;){var b=31-An(y),N=1<<b;f[b]=-1,y&=~N}s!==0&&B1(a,s,i)}function Ec(){return(Xe&6)===0?(rs(0),!1):!0}function Wp(){if(Le!==null){if(Je===0)var a=Le.return;else a=Le,Dr=ri=null,hp(a),ll=null,Lo=0,a=Le;for(;a!==null;)oS(a.alternate,a),a=a.return;Le=null}}function vl(a,i){var s=a.timeoutHandle;s!==-1&&(a.timeoutHandle=-1,mD(s)),s=a.cancelPendingCommit,s!==null&&(a.cancelPendingCommit=null,s()),Vr=0,Wp(),ut=a,Le=s=Rr(a.current,null),Ue=i,Je=0,Mn=null,wa=!1,hl=_o(a,i),Yp=!1,pl=kn=Vp=di=Oa=Ot=0,gn=ts=null,Fp=!1,(i&8)!==0&&(i|=i&32);var f=a.entangledLanes;if(f!==0)for(a=a.entanglements,f&=i;0<f;){var y=31-An(f),b=1<<y;i|=a[y],f&=~b}return Yr=i,Xu(),s}function MS(a,i){Pe=null,P.H=Fo,i===il||i===rc?(i=Fj(),Je=3):i===tp?(i=Fj(),Je=4):Je=i===Tp?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Mn=i,Le===null&&(Ot=1,yc(a,In(i,a.current)))}function kS(){var a=Tn.current;return a===null?!0:(Ue&4194048)===Ue?Vn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?a===Vn:!1}function RS(){var a=P.H;return P.H=Fo,a===null?Fo:a}function PS(){var a=P.A;return P.A=F5,a}function Tc(){Ot=4,wa||(Ue&4194048)!==Ue&&Tn.current!==null||(hl=!0),(Oa&134217727)===0&&(di&134217727)===0||ut===null||Ea(ut,Ue,kn,!1)}function Qp(a,i,s){var f=Xe;Xe|=2;var y=RS(),b=PS();(ut!==a||Ue!==i)&&(Nc=null,vl(a,i)),i=!1;var N=Ot;e:do try{if(Je!==0&&Le!==null){var R=Le,I=Mn;switch(Je){case 8:Wp(),N=6;break e;case 3:case 2:case 9:case 6:Tn.current===null&&(i=!0);var ee=Je;if(Je=0,Mn=null,yl(a,R,I,ee),s&&hl){N=0;break e}break;default:ee=Je,Je=0,Mn=null,yl(a,R,I,ee)}}Z5(),N=Ot;break}catch(le){MS(a,le)}while(!0);return i&&a.shellSuspendCounter++,Dr=ri=null,Xe=f,P.H=y,P.A=b,Le===null&&(ut=null,Ue=0,Xu()),N}function Z5(){for(;Le!==null;)DS(Le)}function W5(a,i){var s=Xe;Xe|=2;var f=RS(),y=PS();ut!==a||Ue!==i?(Nc=null,Ac=rn()+500,vl(a,i)):hl=_o(a,i);e:do try{if(Je!==0&&Le!==null){i=Le;var b=Mn;t:switch(Je){case 1:Je=0,Mn=null,yl(a,i,b,1);break;case 2:case 9:if(Yj(b)){Je=0,Mn=null,$S(i);break}i=function(){Je!==2&&Je!==9||ut!==a||(Je=7),jr(a)},b.then(i,i);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:Yj(b)?(Je=0,Mn=null,$S(i)):(Je=0,Mn=null,yl(a,i,b,7));break;case 5:var N=null;switch(Le.tag){case 26:N=Le.memoizedState;case 5:case 27:var R=Le;if(N?jw(N):R.stateNode.complete){Je=0,Mn=null;var I=R.sibling;if(I!==null)Le=I;else{var ee=R.return;ee!==null?(Le=ee,Cc(ee)):Le=null}break t}}Je=0,Mn=null,yl(a,i,b,5);break;case 6:Je=0,Mn=null,yl(a,i,b,6);break;case 8:Wp(),Ot=6;break e;default:throw Error(r(462))}}Q5();break}catch(le){MS(a,le)}while(!0);return Dr=ri=null,P.H=f,P.A=y,Xe=s,Le!==null?0:(ut=null,Ue=0,Xu(),Ot)}function Q5(){for(;Le!==null&&!Tr();)DS(Le)}function DS(a){var i=iS(a.alternate,a,Yr);a.memoizedProps=a.pendingProps,i===null?Cc(a):Le=i}function $S(a){var i=a,s=i.alternate;switch(i.tag){case 15:case 0:i=J_(s,i,i.pendingProps,i.type,void 0,Ue);break;case 11:i=J_(s,i,i.pendingProps,i.type.render,i.ref,Ue);break;case 5:hp(i);default:oS(s,i),i=Le=Pj(i,Yr),i=iS(s,i,Yr)}a.memoizedProps=a.pendingProps,i===null?Cc(a):Le=i}function yl(a,i,s,f){Dr=ri=null,hp(i),ll=null,Lo=0;var y=i.return;try{if(B5(a,y,i,s,Ue)){Ot=1,yc(a,In(s,a.current)),Le=null;return}}catch(b){if(y!==null)throw Le=y,b;Ot=1,yc(a,In(s,a.current)),Le=null;return}i.flags&32768?(He||f===1?a=!0:hl||(Ue&536870912)!==0?a=!1:(wa=a=!0,(f===2||f===9||f===3||f===6)&&(f=Tn.current,f!==null&&f.tag===13&&(f.flags|=16384))),qS(i,a)):Cc(i)}function Cc(a){var i=a;do{if((i.flags&32768)!==0){qS(i,wa);return}a=i.return;var s=H5(i.alternate,i,Yr);if(s!==null){Le=s;return}if(i=i.sibling,i!==null){Le=i;return}Le=i=a}while(i!==null);Ot===0&&(Ot=5)}function qS(a,i){do{var s=G5(a.alternate,a);if(s!==null){s.flags&=32767,Le=s;return}if(s=a.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(a=a.sibling,a!==null)){Le=a;return}Le=a=s}while(a!==null);Ot=6,Le=null}function zS(a,i,s,f,y,b,N,R,I){a.cancelPendingCommit=null;do Mc();while(Lt!==0);if((Xe&6)!==0)throw Error(r(327));if(i!==null){if(i===a.current)throw Error(r(177));if(b=i.lanes|i.childLanes,b|=Bh,MP(a,s,b,N,R,I),a===ut&&(Le=ut=null,Ue=0),ml=i,Na=a,Vr=s,Kp=b,Xp=y,NS=f,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,nD(Ru,function(){return HS(),null})):(a.callbackNode=null,a.callbackPriority=0),f=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||f){f=P.T,P.T=null,y=$.p,$.p=2,N=Xe,Xe|=4;try{Y5(a,i,s)}finally{Xe=N,$.p=y,P.T=f}}Lt=1,LS(),BS(),US()}}function LS(){if(Lt===1){Lt=0;var a=Na,i=ml,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var f=$.p;$.p=2;var y=Xe;Xe|=4;try{bS(i,a);var b=cm,N=Oj(a.containerInfo),R=b.focusedElem,I=b.selectionRange;if(N!==R&&R&&R.ownerDocument&&wj(R.ownerDocument.documentElement,R)){if(I!==null&&Dh(R)){var ee=I.start,le=I.end;if(le===void 0&&(le=ee),"selectionStart"in R)R.selectionStart=ee,R.selectionEnd=Math.min(le,R.value.length);else{var ue=R.ownerDocument||document,ne=ue&&ue.defaultView||window;if(ne.getSelection){var re=ne.getSelection(),xe=R.textContent.length,Ne=Math.min(I.start,xe),lt=I.end===void 0?Ne:Math.min(I.end,xe);!re.extend&&Ne>lt&&(N=lt,lt=Ne,Ne=N);var K=Sj(R,Ne),V=Sj(R,lt);if(K&&V&&(re.rangeCount!==1||re.anchorNode!==K.node||re.anchorOffset!==K.offset||re.focusNode!==V.node||re.focusOffset!==V.offset)){var J=ue.createRange();J.setStart(K.node,K.offset),re.removeAllRanges(),Ne>lt?(re.addRange(J),re.extend(V.node,V.offset)):(J.setEnd(V.node,V.offset),re.addRange(J))}}}}for(ue=[],re=R;re=re.parentNode;)re.nodeType===1&&ue.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<ue.length;R++){var se=ue[R];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Hc=!!um,cm=um=null}finally{Xe=y,$.p=f,P.T=s}}a.current=i,Lt=2}}function BS(){if(Lt===2){Lt=0;var a=Na,i=ml,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=P.T,P.T=null;var f=$.p;$.p=2;var y=Xe;Xe|=4;try{pS(a,i.alternate,i)}finally{Xe=y,$.p=f,P.T=s}}Lt=3}}function US(){if(Lt===4||Lt===3){Lt=0,xo();var a=Na,i=ml,s=Vr,f=NS;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Lt=5:(Lt=0,ml=Na=null,IS(a,a.pendingLanes));var y=a.pendingLanes;if(y===0&&(Aa=null),vh(s),i=i.stateNode,On&&typeof On.onCommitFiberRoot=="function")try{On.onCommitFiberRoot(jo,i,void 0,(i.current.flags&128)===128)}catch{}if(f!==null){i=P.T,y=$.p,$.p=2,P.T=null;try{for(var b=a.onRecoverableError,N=0;N<f.length;N++){var R=f[N];b(R.value,{componentStack:R.stack})}}finally{P.T=i,$.p=y}}(Vr&3)!==0&&Mc(),jr(a),y=a.pendingLanes,(s&261930)!==0&&(y&42)!==0?a===Zp?ns++:(ns=0,Zp=a):ns=0,rs(0)}}function IS(a,i){(a.pooledCacheLanes&=i)===0&&(i=a.pooledCache,i!=null&&(a.pooledCache=null,qo(i)))}function Mc(){return LS(),BS(),US(),HS()}function HS(){if(Lt!==5)return!1;var a=Na,i=Kp;Kp=0;var s=vh(Vr),f=P.T,y=$.p;try{$.p=32>s?32:s,P.T=null,s=Xp,Xp=null;var b=Na,N=Vr;if(Lt=0,ml=Na=null,Vr=0,(Xe&6)!==0)throw Error(r(331));var R=Xe;if(Xe|=4,wS(b.current),jS(b,b.current,N,s),Xe=R,rs(0,!1),On&&typeof On.onPostCommitFiberRoot=="function")try{On.onPostCommitFiberRoot(jo,b)}catch{}return!0}finally{$.p=y,P.T=f,IS(a,i)}}function GS(a,i,s){i=In(s,i),i=Ep(a.stateNode,i,2),a=xa(a,i,2),a!==null&&(So(a,2),jr(a))}function et(a,i,s){if(a.tag===3)GS(a,a,s);else for(;i!==null;){if(i.tag===3){GS(i,a,s);break}else if(i.tag===1){var f=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Aa===null||!Aa.has(f))){a=In(s,a),s=Y_(2),f=xa(i,s,2),f!==null&&(V_(s,f,i,a),So(f,2),jr(f));break}}i=i.return}}function Jp(a,i,s){var f=a.pingCache;if(f===null){f=a.pingCache=new K5;var y=new Set;f.set(i,y)}else y=f.get(i),y===void 0&&(y=new Set,f.set(i,y));y.has(s)||(Yp=!0,y.add(s),a=J5.bind(null,a,i,s),i.then(a,a))}function J5(a,i,s){var f=a.pingCache;f!==null&&f.delete(i),a.pingedLanes|=a.suspendedLanes&s,a.warmLanes&=~s,ut===a&&(Ue&s)===s&&(Ot===4||Ot===3&&(Ue&62914560)===Ue&&300>rn()-Oc?(Xe&2)===0&&vl(a,0):Vp|=s,pl===Ue&&(pl=0)),jr(a)}function YS(a,i){i===0&&(i=L1()),a=ei(a,i),a!==null&&(So(a,i),jr(a))}function eD(a){var i=a.memoizedState,s=0;i!==null&&(s=i.retryLane),YS(a,s)}function tD(a,i){var s=0;switch(a.tag){case 31:case 13:var f=a.stateNode,y=a.memoizedState;y!==null&&(s=y.retryLane);break;case 19:f=a.stateNode;break;case 22:f=a.stateNode._retryCache;break;default:throw Error(r(314))}f!==null&&f.delete(i),YS(a,s)}function nD(a,i){return ca(a,i)}var kc=null,gl=null,em=!1,Rc=!1,tm=!1,Ta=0;function jr(a){a!==gl&&a.next===null&&(gl===null?kc=gl=a:gl=gl.next=a),Rc=!0,em||(em=!0,aD())}function rs(a,i){if(!tm&&Rc){tm=!0;do for(var s=!1,f=kc;f!==null;){if(a!==0){var y=f.pendingLanes;if(y===0)var b=0;else{var N=f.suspendedLanes,R=f.pingedLanes;b=(1<<31-An(42|a)+1)-1,b&=y&~(N&~R),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(s=!0,XS(f,b))}else b=Ue,b=qu(f,f===ut?b:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(b&3)===0||_o(f,b)||(s=!0,XS(f,b));f=f.next}while(s);tm=!1}}function rD(){VS()}function VS(){Rc=em=!1;var a=0;Ta!==0&&pD()&&(a=Ta);for(var i=rn(),s=null,f=kc;f!==null;){var y=f.next,b=FS(f,i);b===0?(f.next=null,s===null?kc=y:s.next=y,y===null&&(gl=s)):(s=f,(a!==0||(b&3)!==0)&&(Rc=!0)),f=y}Lt!==0&&Lt!==5||rs(a),Ta!==0&&(Ta=0)}function FS(a,i){for(var s=a.suspendedLanes,f=a.pingedLanes,y=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var N=31-An(b),R=1<<N,I=y[N];I===-1?((R&s)===0||(R&f)!==0)&&(y[N]=CP(R,i)):I<=i&&(a.expiredLanes|=R),b&=~R}if(i=ut,s=Ue,s=qu(a,a===i?s:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f=a.callbackNode,s===0||a===i&&(Je===2||Je===9)||a.cancelPendingCommit!==null)return f!==null&&f!==null&&ir(f),a.callbackNode=null,a.callbackPriority=0;if((s&3)===0||_o(a,s)){if(i=s&-s,i===a.callbackPriority)return i;switch(f!==null&&ir(f),vh(s)){case 2:case 8:s=q1;break;case 32:s=Ru;break;case 268435456:s=z1;break;default:s=Ru}return f=KS.bind(null,a),s=ca(s,f),a.callbackPriority=i,a.callbackNode=s,i}return f!==null&&f!==null&&ir(f),a.callbackPriority=2,a.callbackNode=null,2}function KS(a,i){if(Lt!==0&&Lt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var s=a.callbackNode;if(Mc()&&a.callbackNode!==s)return null;var f=Ue;return f=qu(a,a===ut?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f===0?null:(TS(a,f,i),FS(a,rn()),a.callbackNode!=null&&a.callbackNode===s?KS.bind(null,a):null)}function XS(a,i){if(Mc())return null;TS(a,i,!0)}function aD(){vD(function(){(Xe&6)!==0?ca($1,rD):VS()})}function nm(){if(Ta===0){var a=rl;a===0&&(a=Pu,Pu<<=1,(Pu&261888)===0&&(Pu=256)),Ta=a}return Ta}function ZS(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Uu(""+a)}function WS(a,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,a.id&&s.setAttribute("form",a.id),i.parentNode.insertBefore(s,i),a=new FormData(a),s.parentNode.removeChild(s),a}function iD(a,i,s,f,y){if(i==="submit"&&s&&s.stateNode===y){var b=ZS((y[hn]||null).action),N=f.submitter;N&&(i=(i=N[hn]||null)?ZS(i.formAction):N.getAttribute("formAction"),i!==null&&(b=i,N=null));var R=new Yu("action","action",null,f,y);a.push({event:R,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Ta!==0){var I=N?WS(y,N):new FormData(y);_p(s,{pending:!0,data:I,method:y.method,action:b},null,I)}}else typeof b=="function"&&(R.preventDefault(),I=N?WS(y,N):new FormData(y),_p(s,{pending:!0,data:I,method:y.method,action:b},b,I))},currentTarget:y}]})}}for(var rm=0;rm<Lh.length;rm++){var am=Lh[rm],lD=am.toLowerCase(),oD=am[0].toUpperCase()+am.slice(1);lr(lD,"on"+oD)}lr(Ej,"onAnimationEnd"),lr(Tj,"onAnimationIteration"),lr(Cj,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(S5,"onTransitionRun"),lr(w5,"onTransitionStart"),lr(O5,"onTransitionCancel"),lr(Mj,"onTransitionEnd"),Hi("onMouseEnter",["mouseout","mouseover"]),Hi("onMouseLeave",["mouseout","mouseover"]),Hi("onPointerEnter",["pointerout","pointerover"]),Hi("onPointerLeave",["pointerout","pointerover"]),Za("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Za("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Za("onBeforeInput",["compositionend","keypress","textInput","paste"]),Za("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Za("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Za("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var as="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(" "),sD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(as));function QS(a,i){i=(i&4)!==0;for(var s=0;s<a.length;s++){var f=a[s],y=f.event;f=f.listeners;e:{var b=void 0;if(i)for(var N=f.length-1;0<=N;N--){var R=f[N],I=R.instance,ee=R.currentTarget;if(R=R.listener,I!==b&&y.isPropagationStopped())break e;b=R,y.currentTarget=ee;try{b(y)}catch(le){Ku(le)}y.currentTarget=null,b=I}else for(N=0;N<f.length;N++){if(R=f[N],I=R.instance,ee=R.currentTarget,R=R.listener,I!==b&&y.isPropagationStopped())break e;b=R,y.currentTarget=ee;try{b(y)}catch(le){Ku(le)}y.currentTarget=null,b=I}}}}function Be(a,i){var s=i[yh];s===void 0&&(s=i[yh]=new Set);var f=a+"__bubble";s.has(f)||(JS(i,a,2,!1),s.add(f))}function im(a,i,s){var f=0;i&&(f|=4),JS(s,a,f,i)}var Pc="_reactListening"+Math.random().toString(36).slice(2);function lm(a){if(!a[Pc]){a[Pc]=!0,V1.forEach(function(s){s!=="selectionchange"&&(sD.has(s)||im(s,!1,a),im(s,!0,a))});var i=a.nodeType===9?a:a.ownerDocument;i===null||i[Pc]||(i[Pc]=!0,im("selectionchange",!1,i))}}function JS(a,i,s,f){switch(Ew(i)){case 2:var y=$D;break;case 8:y=qD;break;default:y=jm}s=y.bind(null,i,s,a),y=void 0,!Ah||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(y=!0),f?y!==void 0?a.addEventListener(i,s,{capture:!0,passive:y}):a.addEventListener(i,s,!0):y!==void 0?a.addEventListener(i,s,{passive:y}):a.addEventListener(i,s,!1)}function om(a,i,s,f,y){var b=f;if((i&1)===0&&(i&2)===0&&f!==null)e:for(;;){if(f===null)return;var N=f.tag;if(N===3||N===4){var R=f.stateNode.containerInfo;if(R===y)break;if(N===4)for(N=f.return;N!==null;){var I=N.tag;if((I===3||I===4)&&N.stateNode.containerInfo===y)return;N=N.return}for(;R!==null;){if(N=Bi(R),N===null)return;if(I=N.tag,I===5||I===6||I===26||I===27){f=b=N;continue e}R=R.parentNode}}f=f.return}aj(function(){var ee=b,le=wh(s),ue=[];e:{var ne=kj.get(a);if(ne!==void 0){var re=Yu,xe=a;switch(a){case"keypress":if(Hu(s)===0)break e;case"keydown":case"keyup":re=t5;break;case"focusin":xe="focus",re=Ch;break;case"focusout":xe="blur",re=Ch;break;case"beforeblur":case"afterblur":re=Ch;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=oj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=HP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=a5;break;case Ej:case Tj:case Cj:re=VP;break;case Mj:re=l5;break;case"scroll":case"scrollend":re=UP;break;case"wheel":re=s5;break;case"copy":case"cut":case"paste":re=KP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=uj;break;case"toggle":case"beforetoggle":re=c5}var Ne=(i&4)!==0,lt=!Ne&&(a==="scroll"||a==="scrollend"),K=Ne?ne!==null?ne+"Capture":null:ne;Ne=[];for(var V=ee,J;V!==null;){var se=V;if(J=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||J===null||K===null||(se=Ao(V,K),se!=null&&Ne.push(is(V,se,J))),lt)break;V=V.return}0<Ne.length&&(ne=new re(ne,xe,null,s,le),ue.push({event:ne,listeners:Ne}))}}if((i&7)===0){e:{if(ne=a==="mouseover"||a==="pointerover",re=a==="mouseout"||a==="pointerout",ne&&s!==Sh&&(xe=s.relatedTarget||s.fromElement)&&(Bi(xe)||xe[Li]))break e;if((re||ne)&&(ne=le.window===le?le:(ne=le.ownerDocument)?ne.defaultView||ne.parentWindow:window,re?(xe=s.relatedTarget||s.toElement,re=ee,xe=xe?Bi(xe):null,xe!==null&&(lt=o(xe),Ne=xe.tag,xe!==lt||Ne!==5&&Ne!==27&&Ne!==6)&&(xe=null)):(re=null,xe=ee),re!==xe)){if(Ne=oj,se="onMouseLeave",K="onMouseEnter",V="mouse",(a==="pointerout"||a==="pointerover")&&(Ne=uj,se="onPointerLeave",K="onPointerEnter",V="pointer"),lt=re==null?ne:Oo(re),J=xe==null?ne:Oo(xe),ne=new Ne(se,V+"leave",re,s,le),ne.target=lt,ne.relatedTarget=J,se=null,Bi(le)===ee&&(Ne=new Ne(K,V+"enter",xe,s,le),Ne.target=J,Ne.relatedTarget=lt,se=Ne),lt=se,re&&xe)t:{for(Ne=uD,K=re,V=xe,J=0,se=K;se;se=Ne(se))J++;se=0;for(var Se=V;Se;Se=Ne(Se))se++;for(;0<J-se;)K=Ne(K),J--;for(;0<se-J;)V=Ne(V),se--;for(;J--;){if(K===V||V!==null&&K===V.alternate){Ne=K;break t}K=Ne(K),V=Ne(V)}Ne=null}else Ne=null;re!==null&&ew(ue,ne,re,Ne,!1),xe!==null&&lt!==null&&ew(ue,lt,xe,Ne,!0)}}e:{if(ne=ee?Oo(ee):window,re=ne.nodeName&&ne.nodeName.toLowerCase(),re==="select"||re==="input"&&ne.type==="file")var Ye=yj;else if(mj(ne))if(gj)Ye=x5;else{Ye=g5;var je=y5}else re=ne.nodeName,!re||re.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?ee&&_h(ee.elementType)&&(Ye=yj):Ye=b5;if(Ye&&(Ye=Ye(a,ee))){vj(ue,Ye,s,le);break e}je&&je(a,ne,ee),a==="focusout"&&ee&&ne.type==="number"&&ee.memoizedProps.value!=null&&jh(ne,"number",ne.value)}switch(je=ee?Oo(ee):window,a){case"focusin":(mj(je)||je.contentEditable==="true")&&(Xi=je,$h=ee,Po=null);break;case"focusout":Po=$h=Xi=null;break;case"mousedown":qh=!0;break;case"contextmenu":case"mouseup":case"dragend":qh=!1,Aj(ue,s,le);break;case"selectionchange":if(_5)break;case"keydown":case"keyup":Aj(ue,s,le)}var De;if(kh)e:{switch(a){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Ki?hj(a,s)&&(Ie="onCompositionEnd"):a==="keydown"&&s.keyCode===229&&(Ie="onCompositionStart");Ie&&(cj&&s.locale!=="ko"&&(Ki||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Ki&&(De=ij()):(ha=le,Nh="value"in ha?ha.value:ha.textContent,Ki=!0)),je=Dc(ee,Ie),0<je.length&&(Ie=new sj(Ie,a,null,s,le),ue.push({event:Ie,listeners:je}),De?Ie.data=De:(De=pj(s),De!==null&&(Ie.data=De)))),(De=d5?h5(a,s):p5(a,s))&&(Ie=Dc(ee,"onBeforeInput"),0<Ie.length&&(je=new sj("onBeforeInput","beforeinput",null,s,le),ue.push({event:je,listeners:Ie}),je.data=De)),iD(ue,a,ee,s,le)}QS(ue,i)})}function is(a,i,s){return{instance:a,listener:i,currentTarget:s}}function Dc(a,i){for(var s=i+"Capture",f=[];a!==null;){var y=a,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=Ao(a,s),y!=null&&f.unshift(is(a,y,b)),y=Ao(a,i),y!=null&&f.push(is(a,y,b))),a.tag===3)return f;a=a.return}return[]}function uD(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function ew(a,i,s,f,y){for(var b=i._reactName,N=[];s!==null&&s!==f;){var R=s,I=R.alternate,ee=R.stateNode;if(R=R.tag,I!==null&&I===f)break;R!==5&&R!==26&&R!==27||ee===null||(I=ee,y?(ee=Ao(s,b),ee!=null&&N.unshift(is(s,ee,I))):y||(ee=Ao(s,b),ee!=null&&N.push(is(s,ee,I)))),s=s.return}N.length!==0&&a.push({event:i,listeners:N})}var cD=/\r\n?/g,fD=/\u0000|\uFFFD/g;function tw(a){return(typeof a=="string"?a:""+a).replace(cD,`
`).replace(fD,"")}function nw(a,i){return i=tw(i),tw(a)===i}function it(a,i,s,f,y,b){switch(s){case"children":typeof f=="string"?i==="body"||i==="textarea"&&f===""||Yi(a,f):(typeof f=="number"||typeof f=="bigint")&&i!=="body"&&Yi(a,""+f);break;case"className":Lu(a,"class",f);break;case"tabIndex":Lu(a,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":Lu(a,s,f);break;case"style":nj(a,f,b);break;case"data":if(i!=="object"){Lu(a,"data",f);break}case"src":case"href":if(f===""&&(i!=="a"||s!=="href")){a.removeAttribute(s);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(s);break}f=Uu(""+f),a.setAttribute(s,f);break;case"action":case"formAction":if(typeof f=="function"){a.setAttribute(s,"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 b=="function"&&(s==="formAction"?(i!=="input"&&it(a,i,"name",y.name,y,null),it(a,i,"formEncType",y.formEncType,y,null),it(a,i,"formMethod",y.formMethod,y,null),it(a,i,"formTarget",y.formTarget,y,null)):(it(a,i,"encType",y.encType,y,null),it(a,i,"method",y.method,y,null),it(a,i,"target",y.target,y,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(s);break}f=Uu(""+f),a.setAttribute(s,f);break;case"onClick":f!=null&&(a.onclick=Mr);break;case"onScroll":f!=null&&Be("scroll",a);break;case"onScrollEnd":f!=null&&Be("scrollend",a);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(s=f.__html,s!=null){if(y.children!=null)throw Error(r(60));a.innerHTML=s}}break;case"multiple":a.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":a.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){a.removeAttribute("xlink:href");break}s=Uu(""+f),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(s,""+f):a.removeAttribute(s);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":f&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(s,""):a.removeAttribute(s);break;case"capture":case"download":f===!0?a.setAttribute(s,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(s,f):a.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?a.setAttribute(s,f):a.removeAttribute(s);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?a.removeAttribute(s):a.setAttribute(s,f);break;case"popover":Be("beforetoggle",a),Be("toggle",a),zu(a,"popover",f);break;case"xlinkActuate":Cr(a,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Cr(a,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Cr(a,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Cr(a,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Cr(a,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Cr(a,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Cr(a,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Cr(a,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Cr(a,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":zu(a,"is",f);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=LP.get(s)||s,zu(a,s,f))}}function sm(a,i,s,f,y,b){switch(s){case"style":nj(a,f,b);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(s=f.__html,s!=null){if(y.children!=null)throw Error(r(60));a.innerHTML=s}}break;case"children":typeof f=="string"?Yi(a,f):(typeof f=="number"||typeof f=="bigint")&&Yi(a,""+f);break;case"onScroll":f!=null&&Be("scroll",a);break;case"onScrollEnd":f!=null&&Be("scrollend",a);break;case"onClick":f!=null&&(a.onclick=Mr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!F1.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(y=s.endsWith("Capture"),i=s.slice(2,y?s.length-7:void 0),b=a[hn]||null,b=b!=null?b[s]:null,typeof b=="function"&&a.removeEventListener(i,b,y),typeof f=="function")){typeof b!="function"&&b!==null&&(s in a?a[s]=null:a.hasAttribute(s)&&a.removeAttribute(s)),a.addEventListener(i,f,y);break e}s in a?a[s]=f:f===!0?a.setAttribute(s,""):zu(a,s,f)}}}function Jt(a,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",a),Be("load",a);var f=!1,y=!1,b;for(b in s)if(s.hasOwnProperty(b)){var N=s[b];if(N!=null)switch(b){case"src":f=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:it(a,i,b,N,s,null)}}y&&it(a,i,"srcSet",s.srcSet,s,null),f&&it(a,i,"src",s.src,s,null);return;case"input":Be("invalid",a);var R=b=N=y=null,I=null,ee=null;for(f in s)if(s.hasOwnProperty(f)){var le=s[f];if(le!=null)switch(f){case"name":y=le;break;case"type":N=le;break;case"checked":I=le;break;case"defaultChecked":ee=le;break;case"value":b=le;break;case"defaultValue":R=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,i));break;default:it(a,i,f,le,s,null)}}Q1(a,b,R,I,ee,N,y,!1);return;case"select":Be("invalid",a),f=N=b=null;for(y in s)if(s.hasOwnProperty(y)&&(R=s[y],R!=null))switch(y){case"value":b=R;break;case"defaultValue":N=R;break;case"multiple":f=R;default:it(a,i,y,R,s,null)}i=b,s=N,a.multiple=!!f,i!=null?Gi(a,!!f,i,!1):s!=null&&Gi(a,!!f,s,!0);return;case"textarea":Be("invalid",a),b=y=f=null;for(N in s)if(s.hasOwnProperty(N)&&(R=s[N],R!=null))switch(N){case"value":f=R;break;case"defaultValue":y=R;break;case"children":b=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:it(a,i,N,R,s,null)}ej(a,f,y,b);return;case"option":for(I in s)if(s.hasOwnProperty(I)&&(f=s[I],f!=null))switch(I){case"selected":a.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:it(a,i,I,f,s,null)}return;case"dialog":Be("beforetoggle",a),Be("toggle",a),Be("cancel",a),Be("close",a);break;case"iframe":case"object":Be("load",a);break;case"video":case"audio":for(f=0;f<as.length;f++)Be(as[f],a);break;case"image":Be("error",a),Be("load",a);break;case"details":Be("toggle",a);break;case"embed":case"source":case"link":Be("error",a),Be("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(ee in s)if(s.hasOwnProperty(ee)&&(f=s[ee],f!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:it(a,i,ee,f,s,null)}return;default:if(_h(i)){for(le in s)s.hasOwnProperty(le)&&(f=s[le],f!==void 0&&sm(a,i,le,f,s,void 0));return}}for(R in s)s.hasOwnProperty(R)&&(f=s[R],f!=null&&it(a,i,R,f,s,null))}function dD(a,i,s,f){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,b=null,N=null,R=null,I=null,ee=null,le=null;for(re in s){var ue=s[re];if(s.hasOwnProperty(re)&&ue!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":I=ue;default:f.hasOwnProperty(re)||it(a,i,re,null,f,ue)}}for(var ne in f){var re=f[ne];if(ue=s[ne],f.hasOwnProperty(ne)&&(re!=null||ue!=null))switch(ne){case"type":b=re;break;case"name":y=re;break;case"checked":ee=re;break;case"defaultChecked":le=re;break;case"value":N=re;break;case"defaultValue":R=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,i));break;default:re!==ue&&it(a,i,ne,re,f,ue)}}xh(a,N,R,I,ee,le,b,y);return;case"select":re=N=R=ne=null;for(b in s)if(I=s[b],s.hasOwnProperty(b)&&I!=null)switch(b){case"value":break;case"multiple":re=I;default:f.hasOwnProperty(b)||it(a,i,b,null,f,I)}for(y in f)if(b=f[y],I=s[y],f.hasOwnProperty(y)&&(b!=null||I!=null))switch(y){case"value":ne=b;break;case"defaultValue":R=b;break;case"multiple":N=b;default:b!==I&&it(a,i,y,b,f,I)}i=R,s=N,f=re,ne!=null?Gi(a,!!s,ne,!1):!!f!=!!s&&(i!=null?Gi(a,!!s,i,!0):Gi(a,!!s,s?[]:"",!1));return;case"textarea":re=ne=null;for(R in s)if(y=s[R],s.hasOwnProperty(R)&&y!=null&&!f.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:it(a,i,R,null,f,y)}for(N in f)if(y=f[N],b=s[N],f.hasOwnProperty(N)&&(y!=null||b!=null))switch(N){case"value":ne=y;break;case"defaultValue":re=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==b&&it(a,i,N,y,f,b)}J1(a,ne,re);return;case"option":for(var xe in s)if(ne=s[xe],s.hasOwnProperty(xe)&&ne!=null&&!f.hasOwnProperty(xe))switch(xe){case"selected":a.selected=!1;break;default:it(a,i,xe,null,f,ne)}for(I in f)if(ne=f[I],re=s[I],f.hasOwnProperty(I)&&ne!==re&&(ne!=null||re!=null))switch(I){case"selected":a.selected=ne&&typeof ne!="function"&&typeof ne!="symbol";break;default:it(a,i,I,ne,f,re)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ne in s)ne=s[Ne],s.hasOwnProperty(Ne)&&ne!=null&&!f.hasOwnProperty(Ne)&&it(a,i,Ne,null,f,ne);for(ee in f)if(ne=f[ee],re=s[ee],f.hasOwnProperty(ee)&&ne!==re&&(ne!=null||re!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,i));break;default:it(a,i,ee,ne,f,re)}return;default:if(_h(i)){for(var lt in s)ne=s[lt],s.hasOwnProperty(lt)&&ne!==void 0&&!f.hasOwnProperty(lt)&&sm(a,i,lt,void 0,f,ne);for(le in f)ne=f[le],re=s[le],!f.hasOwnProperty(le)||ne===re||ne===void 0&&re===void 0||sm(a,i,le,ne,f,re);return}}for(var K in s)ne=s[K],s.hasOwnProperty(K)&&ne!=null&&!f.hasOwnProperty(K)&&it(a,i,K,null,f,ne);for(ue in f)ne=f[ue],re=s[ue],!f.hasOwnProperty(ue)||ne===re||ne==null&&re==null||it(a,i,ue,ne,f,re)}function rw(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hD(){if(typeof performance.getEntriesByType=="function"){for(var a=0,i=0,s=performance.getEntriesByType("resource"),f=0;f<s.length;f++){var y=s[f],b=y.transferSize,N=y.initiatorType,R=y.duration;if(b&&R&&rw(N)){for(N=0,R=y.responseEnd,f+=1;f<s.length;f++){var I=s[f],ee=I.startTime;if(ee>R)break;var le=I.transferSize,ue=I.initiatorType;le&&rw(ue)&&(I=I.responseEnd,N+=le*(I<R?1:(R-ee)/(I-ee)))}if(--f,i+=8*(b+N)/(y.duration/1e3),a++,10<a)break}}if(0<a)return i/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var um=null,cm=null;function $c(a){return a.nodeType===9?a:a.ownerDocument}function aw(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 iw(a,i){if(a===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&i==="foreignObject"?0:a}function fm(a,i){return a==="textarea"||a==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var dm=null;function pD(){var a=window.event;return a&&a.type==="popstate"?a===dm?!1:(dm=a,!0):(dm=null,!1)}var lw=typeof setTimeout=="function"?setTimeout:void 0,mD=typeof clearTimeout=="function"?clearTimeout:void 0,ow=typeof Promise=="function"?Promise:void 0,vD=typeof queueMicrotask=="function"?queueMicrotask:typeof ow<"u"?function(a){return ow.resolve(null).then(a).catch(yD)}:lw;function yD(a){setTimeout(function(){throw a})}function Ca(a){return a==="head"}function sw(a,i){var s=i,f=0;do{var y=s.nextSibling;if(a.removeChild(s),y&&y.nodeType===8)if(s=y.data,s==="/$"||s==="/&"){if(f===0){a.removeChild(y),_l(i);return}f--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")f++;else if(s==="html")ls(a.ownerDocument.documentElement);else if(s==="head"){s=a.ownerDocument.head,ls(s);for(var b=s.firstChild;b;){var N=b.nextSibling,R=b.nodeName;b[wo]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&b.rel.toLowerCase()==="stylesheet"||s.removeChild(b),b=N}}else s==="body"&&ls(a.ownerDocument.body);s=y}while(s);_l(i)}function uw(a,i){var s=a;a=0;do{var f=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),f&&f.nodeType===8)if(s=f.data,s==="/$"){if(a===0)break;a--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||a++;s=f}while(s)}function hm(a){var i=a.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":hm(s),gh(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}a.removeChild(s)}}function gD(a,i,s,f){for(;a.nodeType===1;){var y=s;if(a.nodeName.toLowerCase()!==i.toLowerCase()){if(!f&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(f){if(!a[wo])switch(i){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(b=a.getAttribute("rel"),b==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(b!==y.rel||a.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||a.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||a.getAttribute("title")!==(y.title==null?null:y.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(b=a.getAttribute("src"),(b!==(y.src==null?null:y.src)||a.getAttribute("type")!==(y.type==null?null:y.type)||a.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(i==="input"&&a.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&a.getAttribute("name")===b)return a}else return a;if(a=Fn(a.nextSibling),a===null)break}return null}function bD(a,i,s){if(i==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=Fn(a.nextSibling),a===null))return null;return a}function cw(a,i){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!i||(a=Fn(a.nextSibling),a===null))return null;return a}function pm(a){return a.data==="$?"||a.data==="$~"}function mm(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function xD(a,i){var s=a.ownerDocument;if(a.data==="$~")a._reactRetry=i;else if(a.data!=="$?"||s.readyState!=="loading")i();else{var f=function(){i(),s.removeEventListener("DOMContentLoaded",f)};s.addEventListener("DOMContentLoaded",f),a._reactRetry=f}}function Fn(a){for(;a!=null;a=a.nextSibling){var i=a.nodeType;if(i===1||i===3)break;if(i===8){if(i=a.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return a}var vm=null;function fw(a){a=a.nextSibling;for(var i=0;a;){if(a.nodeType===8){var s=a.data;if(s==="/$"||s==="/&"){if(i===0)return Fn(a.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}a=a.nextSibling}return null}function dw(a){a=a.previousSibling;for(var i=0;a;){if(a.nodeType===8){var s=a.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return a;i--}else s!=="/$"&&s!=="/&"||i++}a=a.previousSibling}return null}function hw(a,i,s){switch(i=$c(s),a){case"html":if(a=i.documentElement,!a)throw Error(r(452));return a;case"head":if(a=i.head,!a)throw Error(r(453));return a;case"body":if(a=i.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function ls(a){for(var i=a.attributes;i.length;)a.removeAttributeNode(i[0]);gh(a)}var Kn=new Map,pw=new Set;function qc(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Fr=$.d;$.d={f:jD,r:_D,D:SD,C:wD,L:OD,m:AD,X:ED,S:ND,M:TD};function jD(){var a=Fr.f(),i=Ec();return a||i}function _D(a){var i=Ui(a);i!==null&&i.tag===5&&i.type==="form"?M_(i):Fr.r(a)}var bl=typeof document>"u"?null:document;function mw(a,i,s){var f=bl;if(f&&typeof i=="string"&&i){var y=Bn(i);y='link[rel="'+a+'"][href="'+y+'"]',typeof s=="string"&&(y+='[crossorigin="'+s+'"]'),pw.has(y)||(pw.add(y),a={rel:a,crossOrigin:s,href:i},f.querySelector(y)===null&&(i=f.createElement("link"),Jt(i,"link",a),Gt(i),f.head.appendChild(i)))}}function SD(a){Fr.D(a),mw("dns-prefetch",a,null)}function wD(a,i){Fr.C(a,i),mw("preconnect",a,i)}function OD(a,i,s){Fr.L(a,i,s);var f=bl;if(f&&a&&i){var y='link[rel="preload"][as="'+Bn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(y+='[imagesrcset="'+Bn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(y+='[imagesizes="'+Bn(s.imageSizes)+'"]')):y+='[href="'+Bn(a)+'"]';var b=y;switch(i){case"style":b=xl(a);break;case"script":b=jl(a)}Kn.has(b)||(a=m({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:a,as:i},s),Kn.set(b,a),f.querySelector(y)!==null||i==="style"&&f.querySelector(os(b))||i==="script"&&f.querySelector(ss(b))||(i=f.createElement("link"),Jt(i,"link",a),Gt(i),f.head.appendChild(i)))}}function AD(a,i){Fr.m(a,i);var s=bl;if(s&&a){var f=i&&typeof i.as=="string"?i.as:"script",y='link[rel="modulepreload"][as="'+Bn(f)+'"][href="'+Bn(a)+'"]',b=y;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=jl(a)}if(!Kn.has(b)&&(a=m({rel:"modulepreload",href:a},i),Kn.set(b,a),s.querySelector(y)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(ss(b)))return}f=s.createElement("link"),Jt(f,"link",a),Gt(f),s.head.appendChild(f)}}}function ND(a,i,s){Fr.S(a,i,s);var f=bl;if(f&&a){var y=Ii(f).hoistableStyles,b=xl(a);i=i||"default";var N=y.get(b);if(!N){var R={loading:0,preload:null};if(N=f.querySelector(os(b)))R.loading=5;else{a=m({rel:"stylesheet",href:a,"data-precedence":i},s),(s=Kn.get(b))&&ym(a,s);var I=N=f.createElement("link");Gt(I),Jt(I,"link",a),I._p=new Promise(function(ee,le){I.onload=ee,I.onerror=le}),I.addEventListener("load",function(){R.loading|=1}),I.addEventListener("error",function(){R.loading|=2}),R.loading|=4,zc(N,i,f)}N={type:"stylesheet",instance:N,count:1,state:R},y.set(b,N)}}}function ED(a,i){Fr.X(a,i);var s=bl;if(s&&a){var f=Ii(s).hoistableScripts,y=jl(a),b=f.get(y);b||(b=s.querySelector(ss(y)),b||(a=m({src:a,async:!0},i),(i=Kn.get(y))&&gm(a,i),b=s.createElement("script"),Gt(b),Jt(b,"link",a),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},f.set(y,b))}}function TD(a,i){Fr.M(a,i);var s=bl;if(s&&a){var f=Ii(s).hoistableScripts,y=jl(a),b=f.get(y);b||(b=s.querySelector(ss(y)),b||(a=m({src:a,async:!0,type:"module"},i),(i=Kn.get(y))&&gm(a,i),b=s.createElement("script"),Gt(b),Jt(b,"link",a),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},f.set(y,b))}}function vw(a,i,s,f){var y=(y=we.current)?qc(y):null;if(!y)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=xl(s.href),s=Ii(y).hoistableStyles,f=s.get(i),f||(f={type:"style",instance:null,count:0,state:null},s.set(i,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){a=xl(s.href);var b=Ii(y).hoistableStyles,N=b.get(a);if(N||(y=y.ownerDocument||y,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,N),(b=y.querySelector(os(a)))&&!b._p&&(N.instance=b,N.state.loading=5),Kn.has(a)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Kn.set(a,s),b||CD(y,a,s,N.state))),i&&f===null)throw Error(r(528,""));return N}if(i&&f!==null)throw Error(r(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=jl(s),s=Ii(y).hoistableScripts,f=s.get(i),f||(f={type:"script",instance:null,count:0,state:null},s.set(i,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function xl(a){return'href="'+Bn(a)+'"'}function os(a){return'link[rel="stylesheet"]['+a+"]"}function yw(a){return m({},a,{"data-precedence":a.precedence,precedence:null})}function CD(a,i,s,f){a.querySelector('link[rel="preload"][as="style"]['+i+"]")?f.loading=1:(i=a.createElement("link"),f.preload=i,i.addEventListener("load",function(){return f.loading|=1}),i.addEventListener("error",function(){return f.loading|=2}),Jt(i,"link",s),Gt(i),a.head.appendChild(i))}function jl(a){return'[src="'+Bn(a)+'"]'}function ss(a){return"script[async]"+a}function gw(a,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var f=a.querySelector('style[data-href~="'+Bn(s.href)+'"]');if(f)return i.instance=f,Gt(f),f;var y=m({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return f=(a.ownerDocument||a).createElement("style"),Gt(f),Jt(f,"style",y),zc(f,s.precedence,a),i.instance=f;case"stylesheet":y=xl(s.href);var b=a.querySelector(os(y));if(b)return i.state.loading|=4,i.instance=b,Gt(b),b;f=yw(s),(y=Kn.get(y))&&ym(f,y),b=(a.ownerDocument||a).createElement("link"),Gt(b);var N=b;return N._p=new Promise(function(R,I){N.onload=R,N.onerror=I}),Jt(b,"link",f),i.state.loading|=4,zc(b,s.precedence,a),i.instance=b;case"script":return b=jl(s.src),(y=a.querySelector(ss(b)))?(i.instance=y,Gt(y),y):(f=s,(y=Kn.get(b))&&(f=m({},s),gm(f,y)),a=a.ownerDocument||a,y=a.createElement("script"),Gt(y),Jt(y,"link",f),a.head.appendChild(y),i.instance=y);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(f=i.instance,i.state.loading|=4,zc(f,s.precedence,a));return i.instance}function zc(a,i,s){for(var f=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=f.length?f[f.length-1]:null,b=y,N=0;N<f.length;N++){var R=f[N];if(R.dataset.precedence===i)b=R;else if(b!==y)break}b?b.parentNode.insertBefore(a,b.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(a,i.firstChild))}function ym(a,i){a.crossOrigin==null&&(a.crossOrigin=i.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=i.referrerPolicy),a.title==null&&(a.title=i.title)}function gm(a,i){a.crossOrigin==null&&(a.crossOrigin=i.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=i.referrerPolicy),a.integrity==null&&(a.integrity=i.integrity)}var Lc=null;function bw(a,i,s){if(Lc===null){var f=new Map,y=Lc=new Map;y.set(s,f)}else y=Lc,f=y.get(s),f||(f=new Map,y.set(s,f));if(f.has(a))return f;for(f.set(a,null),s=s.getElementsByTagName(a),y=0;y<s.length;y++){var b=s[y];if(!(b[wo]||b[Xt]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var N=b.getAttribute(i)||"";N=a+N;var R=f.get(N);R?R.push(b):f.set(N,[b])}}return f}function xw(a,i,s){a=a.ownerDocument||a,a.head.insertBefore(s,i==="title"?a.querySelector("head > title"):null)}function MD(a,i,s){if(s===1||i.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return a=i.disabled,typeof i.precedence=="string"&&a==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function jw(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function kD(a,i,s,f){if(s.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var y=xl(f.href),b=i.querySelector(os(y));if(b){i=b._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(a.count++,a=Bc.bind(a),i.then(a,a)),s.state.loading|=4,s.instance=b,Gt(b);return}b=i.ownerDocument||i,f=yw(f),(y=Kn.get(y))&&ym(f,y),b=b.createElement("link"),Gt(b);var N=b;N._p=new Promise(function(R,I){N.onload=R,N.onerror=I}),Jt(b,"link",f),s.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(a.count++,s=Bc.bind(a),i.addEventListener("load",s),i.addEventListener("error",s))}}var bm=0;function RD(a,i){return a.stylesheets&&a.count===0&&Ic(a,a.stylesheets),0<a.count||0<a.imgCount?function(s){var f=setTimeout(function(){if(a.stylesheets&&Ic(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+i);0<a.imgBytes&&bm===0&&(bm=62500*hD());var y=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Ic(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>bm?50:800)+i);return a.unsuspend=s,function(){a.unsuspend=null,clearTimeout(f),clearTimeout(y)}}:null}function Bc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ic(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Uc=null;function Ic(a,i){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Uc=new Map,i.forEach(PD,a),Uc=null,Bc.call(a))}function PD(a,i){if(!(i.state.loading&4)){var s=Uc.get(a);if(s)var f=s.get(null);else{s=new Map,Uc.set(a,s);for(var y=a.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var N=y[b];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(s.set(N.dataset.precedence,N),f=N)}f&&s.set(null,f)}y=i.instance,N=y.getAttribute("data-precedence"),b=s.get(N)||f,b===f&&s.set(null,y),s.set(N,y),this.count++,f=Bc.bind(this),y.addEventListener("load",f),y.addEventListener("error",f),b?b.parentNode.insertBefore(y,b.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(y,a.firstChild)),i.state.loading|=4}}var us={$$typeof:E,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function DD(a,i,s,f,y,b,N,R,I){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=ph(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ph(0),this.hiddenUpdates=ph(null),this.identifierPrefix=f,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function _w(a,i,s,f,y,b,N,R,I,ee,le,ue){return a=new DD(a,i,s,N,I,ee,le,ue,R),i=1,b===!0&&(i|=24),b=En(3,null,null,i),a.current=b,b.stateNode=a,i=Qh(),i.refCount++,a.pooledCache=i,i.refCount++,b.memoizedState={element:f,isDehydrated:s,cache:i},np(b),a}function Sw(a){return a?(a=Qi,a):Qi}function ww(a,i,s,f,y,b){y=Sw(y),f.context===null?f.context=y:f.pendingContext=y,f=ba(i),f.payload={element:s},b=b===void 0?null:b,b!==null&&(f.callback=b),s=xa(a,f,i),s!==null&&(bn(s,a,i),Uo(s,a,i))}function Ow(a,i){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var s=a.retryLane;a.retryLane=s!==0&&s<i?s:i}}function xm(a,i){Ow(a,i),(a=a.alternate)&&Ow(a,i)}function Aw(a){if(a.tag===13||a.tag===31){var i=ei(a,67108864);i!==null&&bn(i,a,67108864),xm(a,67108864)}}function Nw(a){if(a.tag===13||a.tag===31){var i=Rn();i=mh(i);var s=ei(a,i);s!==null&&bn(s,a,i),xm(a,i)}}var Hc=!0;function $D(a,i,s,f){var y=P.T;P.T=null;var b=$.p;try{$.p=2,jm(a,i,s,f)}finally{$.p=b,P.T=y}}function qD(a,i,s,f){var y=P.T;P.T=null;var b=$.p;try{$.p=8,jm(a,i,s,f)}finally{$.p=b,P.T=y}}function jm(a,i,s,f){if(Hc){var y=_m(f);if(y===null)om(a,i,f,Gc,s),Tw(a,f);else if(LD(y,a,i,s,f))f.stopPropagation();else if(Tw(a,f),i&4&&-1<zD.indexOf(a)){for(;y!==null;){var b=Ui(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var N=Xa(b.pendingLanes);if(N!==0){var R=b;for(R.pendingLanes|=2,R.entangledLanes|=2;N;){var I=1<<31-An(N);R.entanglements[1]|=I,N&=~I}jr(b),(Xe&6)===0&&(Ac=rn()+500,rs(0))}}break;case 31:case 13:R=ei(b,2),R!==null&&bn(R,b,2),Ec(),xm(b,2)}if(b=_m(f),b===null&&om(a,i,f,Gc,s),b===y)break;y=b}y!==null&&f.stopPropagation()}else om(a,i,f,null,s)}}function _m(a){return a=wh(a),Sm(a)}var Gc=null;function Sm(a){if(Gc=null,a=Bi(a),a!==null){var i=o(a);if(i===null)a=null;else{var s=i.tag;if(s===13){if(a=c(i),a!==null)return a;a=null}else if(s===31){if(a=d(i),a!==null)return a;a=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;a=null}else i!==a&&(a=null)}}return Gc=a,null}function Ew(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(ku()){case $1:return 2;case q1:return 8;case Ru:case wP:return 32;case z1:return 268435456;default:return 32}default:return 32}}var wm=!1,Ma=null,ka=null,Ra=null,cs=new Map,fs=new Map,Pa=[],zD="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 Tw(a,i){switch(a){case"focusin":case"focusout":Ma=null;break;case"dragenter":case"dragleave":ka=null;break;case"mouseover":case"mouseout":Ra=null;break;case"pointerover":case"pointerout":cs.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":fs.delete(i.pointerId)}}function ds(a,i,s,f,y,b){return a===null||a.nativeEvent!==b?(a={blockedOn:i,domEventName:s,eventSystemFlags:f,nativeEvent:b,targetContainers:[y]},i!==null&&(i=Ui(i),i!==null&&Aw(i)),a):(a.eventSystemFlags|=f,i=a.targetContainers,y!==null&&i.indexOf(y)===-1&&i.push(y),a)}function LD(a,i,s,f,y){switch(i){case"focusin":return Ma=ds(Ma,a,i,s,f,y),!0;case"dragenter":return ka=ds(ka,a,i,s,f,y),!0;case"mouseover":return Ra=ds(Ra,a,i,s,f,y),!0;case"pointerover":var b=y.pointerId;return cs.set(b,ds(cs.get(b)||null,a,i,s,f,y)),!0;case"gotpointercapture":return b=y.pointerId,fs.set(b,ds(fs.get(b)||null,a,i,s,f,y)),!0}return!1}function Cw(a){var i=Bi(a.target);if(i!==null){var s=o(i);if(s!==null){if(i=s.tag,i===13){if(i=c(s),i!==null){a.blockedOn=i,G1(a.priority,function(){Nw(s)});return}}else if(i===31){if(i=d(s),i!==null){a.blockedOn=i,G1(a.priority,function(){Nw(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){a.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Yc(a){if(a.blockedOn!==null)return!1;for(var i=a.targetContainers;0<i.length;){var s=_m(a.nativeEvent);if(s===null){s=a.nativeEvent;var f=new s.constructor(s.type,s);Sh=f,s.target.dispatchEvent(f),Sh=null}else return i=Ui(s),i!==null&&Aw(i),a.blockedOn=s,!1;i.shift()}return!0}function Mw(a,i,s){Yc(a)&&s.delete(i)}function BD(){wm=!1,Ma!==null&&Yc(Ma)&&(Ma=null),ka!==null&&Yc(ka)&&(ka=null),Ra!==null&&Yc(Ra)&&(Ra=null),cs.forEach(Mw),fs.forEach(Mw)}function Vc(a,i){a.blockedOn===i&&(a.blockedOn=null,wm||(wm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,BD)))}var Fc=null;function kw(a){Fc!==a&&(Fc=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Fc===a&&(Fc=null);for(var i=0;i<a.length;i+=3){var s=a[i],f=a[i+1],y=a[i+2];if(typeof f!="function"){if(Sm(f||s)===null)continue;break}var b=Ui(s);b!==null&&(a.splice(i,3),i-=3,_p(b,{pending:!0,data:y,method:s.method,action:f},f,y))}}))}function _l(a){function i(I){return Vc(I,a)}Ma!==null&&Vc(Ma,a),ka!==null&&Vc(ka,a),Ra!==null&&Vc(Ra,a),cs.forEach(i),fs.forEach(i);for(var s=0;s<Pa.length;s++){var f=Pa[s];f.blockedOn===a&&(f.blockedOn=null)}for(;0<Pa.length&&(s=Pa[0],s.blockedOn===null);)Cw(s),s.blockedOn===null&&Pa.shift();if(s=(a.ownerDocument||a).$$reactFormReplay,s!=null)for(f=0;f<s.length;f+=3){var y=s[f],b=s[f+1],N=y[hn]||null;if(typeof b=="function")N||kw(s);else if(N){var R=null;if(b&&b.hasAttribute("formAction")){if(y=b,N=b[hn]||null)R=N.formAction;else if(Sm(y)!==null)continue}else R=N.action;typeof R=="function"?s[f+1]=R:(s.splice(f,3),f-=3),kw(s)}}}function Rw(){function a(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(N){return y=N})},focusReset:"manual",scroll:"manual"})}function i(){y!==null&&(y(),y=null),f||setTimeout(s,20)}function s(){if(!f&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,y=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){f=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),y!==null&&(y(),y=null)}}}function Om(a){this._internalRoot=a}Kc.prototype.render=Om.prototype.render=function(a){var i=this._internalRoot;if(i===null)throw Error(r(409));var s=i.current,f=Rn();ww(s,f,a,i,null,null)},Kc.prototype.unmount=Om.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var i=a.containerInfo;ww(a.current,2,null,a,null,null),Ec(),i[Li]=null}};function Kc(a){this._internalRoot=a}Kc.prototype.unstable_scheduleHydration=function(a){if(a){var i=H1();a={blockedOn:null,target:a,priority:i};for(var s=0;s<Pa.length&&i!==0&&i<Pa[s].priority;s++);Pa.splice(s,0,a),s===0&&Cw(a)}};var Pw=t.version;if(Pw!=="19.2.8")throw Error(r(527,Pw,"19.2.8"));$.findDOMNode=function(a){var i=a._reactInternals;if(i===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=p(i),a=a!==null?v(a):null,a=a===null?null:a.stateNode,a};var UD={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xc.isDisabled&&Xc.supportsFiber)try{jo=Xc.inject(UD),On=Xc}catch{}}return ps.createRoot=function(a,i){if(!l(a))throw Error(r(299));var s=!1,f="",y=U_,b=I_,N=H_;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(y=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(N=i.onRecoverableError)),i=_w(a,1,!1,null,null,s,f,null,y,b,N,Rw),a[Li]=i.current,lm(a),new Om(i)},ps.hydrateRoot=function(a,i,s){if(!l(a))throw Error(r(299));var f=!1,y="",b=U_,N=I_,R=H_,I=null;return s!=null&&(s.unstable_strictMode===!0&&(f=!0),s.identifierPrefix!==void 0&&(y=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(N=s.onCaughtError),s.onRecoverableError!==void 0&&(R=s.onRecoverableError),s.formState!==void 0&&(I=s.formState)),i=_w(a,1,!0,i,s??null,f,y,I,b,N,R,Rw),i.context=Sw(null),s=i.current,f=Rn(),f=mh(f),y=ba(f),y.callback=null,xa(s,y,f),s=f,i.current.lanes=s,So(i,s),jr(i),a[Li]=i.current,lm(a),new Kc(i)},ps.version="19.2.8",ps}var Gw;function WD(){if(Gw)return Em.exports;Gw=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(),Em.exports=ZD(),Em.exports}var QD=WD();/**
 * react-router v7.18.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var v0=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,bM=/^[\\/]{2}/;function JD(e,t){return t+e.replace(/\\/g,"/")}var Yw="popstate";function Vw(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function e4(e={}){function t(r,l){var p;let o=(p=l.state)==null?void 0:p.masked,{pathname:c,search:d,hash:h}=o||r.location;return Gb("",{pathname:c,search:d,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,l){return typeof l=="string"?l:$s(l)}return n4(t,n,null,e)}function jt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function tr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function t4(){return Math.random().toString(36).substring(2,10)}function Fw(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Gb(e,t,n=null,r,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?so(t):t,state:n,key:t&&t.key||r||t4(),mask:l}}function $s({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 so(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 n4(e,t,n,r={}){let{window:l=document.defaultView,v5Compat:o=!1}=r,c=l.history,d="POP",h=null,p=v();p==null&&(p=0,c.replaceState({...c.state,idx:p},""));function v(){return(c.state||{idx:null}).idx}function m(){d="POP";let x=v(),O=x==null?null:x-p;p=x,h&&h({action:d,location:_.location,delta:O})}function g(x,O){d="PUSH";let w=Vw(x)?x:Gb(_.location,x,O);p=v()+1;let E=Fw(w,p),M=_.createHref(w.mask||w);try{c.pushState(E,"",M)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;l.location.assign(M)}o&&h&&h({action:d,location:_.location,delta:1})}function j(x,O){d="REPLACE";let w=Vw(x)?x:Gb(_.location,x,O);p=v();let E=Fw(w,p),M=_.createHref(w.mask||w);c.replaceState(E,"",M),o&&h&&h({action:d,location:_.location,delta:0})}function S(x){return r4(l,x)}let _={get action(){return d},get location(){return e(l,c)},listen(x){if(h)throw new Error("A history only accepts one active listener");return l.addEventListener(Yw,m),h=x,()=>{l.removeEventListener(Yw,m),h=null}},createHref(x){return t(l,x)},createURL:S,encodeLocation(x){let O=S(x);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:g,replace:j,go(x){return c.go(x)}};return _}function r4(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),jt(r,"No window.location.(origin|href) available to create URL");let l=typeof t=="string"?t:$s(t);return l=l.replace(/ $/,"%20"),!n&&bM.test(l)&&(l=r+l),new URL(l,r)}function xM(e,t,n="/"){return a4(e,t,n,!1)}function a4(e,t,n,r,l){let o=typeof t=="string"?so(t):t,c=ta(o.pathname||"/",n);if(c==null)return null;let d=i4(e),h=null,p=v4(c);for(let v=0;h==null&&v<d.length;++v)h=m4(d[v],p,r);return h}function i4(e){let t=jM(e);return l4(t),t}function jM(e,t=[],n=[],r="",l=!1){let o=(c,d,h=l,p)=>{let v={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(r)&&h)return;jt(v.relativePath.startsWith(r),`Absolute route path "${v.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(r.length)}let m=dr([r,v.relativePath]),g=n.concat(v);c.children&&c.children.length>0&&(jt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),jM(c.children,t,g,m,h)),!(c.path==null&&!c.index)&&t.push({path:m,score:h4(m,c.index),routesMeta:g.map((j,S)=>{let[_,x]=wM(j.relativePath,j.caseSensitive,S===g.length-1);return{...j,matcher:_,compiledParams:x}})})};return e.forEach((c,d)=>{var h;if(c.path===""||!((h=c.path)!=null&&h.includes("?")))o(c,d);else for(let p of _M(c.path))o(c,d,!0,p)}),t}function _M(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let c=_M(r.join("/")),d=[];return d.push(...c.map(h=>h===""?o:[o,h].join("/"))),l&&d.push(...c),d.map(h=>e.startsWith("/")&&h===""?"/":h)}function l4(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:p4(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var o4=/^:[\w-]+$/,s4=3,u4=2,c4=1,f4=10,d4=-2,Kw=e=>e==="*";function h4(e,t){let n=e.split("/"),r=n.length;return n.some(Kw)&&(r+=d4),t&&(r+=u4),n.filter(l=>!Kw(l)).reduce((l,o)=>l+(o4.test(o)?s4:o===""?c4:f4),r)}function p4(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function m4(e,t,n=!1){let{routesMeta:r}=e,l={},o="/",c=[];for(let d=0;d<r.length;++d){let h=r[d],p=d===r.length-1,v=o==="/"?t:t.slice(o.length)||"/",m={path:h.relativePath,caseSensitive:h.caseSensitive,end:p},g=h.matcher&&h.compiledParams?SM(m,v,h.matcher,h.compiledParams):xf(m,v),j=h.route;if(!g&&p&&n&&!r[r.length-1].route.index&&(g=xf({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},v)),!g)return null;Object.assign(l,g.params),c.push({params:l,pathname:dr([o,g.pathname]),pathnameBase:b4(dr([o,g.pathnameBase])),route:j}),g.pathnameBase!=="/"&&(o=dr([o,g.pathnameBase]))}return c}function xf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=wM(e.path,e.caseSensitive,e.end);return SM(e,t,n,r)}function SM(e,t,n,r){let l=t.match(n);if(!l)return null;let o=l[0],c=o.replace(/(.)\/+$/,"$1"),d=l.slice(1);return{params:r.reduce((p,{paramName:v,isOptional:m},g)=>{if(v==="*"){let S=d[g]||"";c=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const j=d[g];return m&&!j?p[v]=void 0:p[v]=(j||"").replace(/%2F/g,"/"),p},{}),pathname:o,pathnameBase:c,pattern:e}}function wM(e,t=!1,n=!0){tr(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=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,h,p,v)=>{if(r.push({paramName:d,isOptional:h!=null}),h){let m=v.charAt(p+c.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function v4(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return tr(!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 ta(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)||"/"}function y4(e,t="/"){let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?so(e):e,o;return n?(n=OM(n),n.startsWith("/")?o=Xw(n.substring(1),"/"):o=Xw(n,t)):o=t,{pathname:o,search:x4(r),hash:j4(l)}}function Xw(e,t){let n=jf(t).split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function km(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 g4(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function y0(e){let t=g4(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function _d(e,t,n,r=!1){let l;typeof e=="string"?l=so(e):(l={...e},jt(!l.pathname||!l.pathname.includes("?"),km("?","pathname","search",l)),jt(!l.pathname||!l.pathname.includes("#"),km("#","pathname","hash",l)),jt(!l.search||!l.search.includes("#"),km("#","search","hash",l)));let o=e===""||l.pathname==="",c=o?"/":l.pathname,d;if(c==null)d=n;else{let m=t.length-1;if(!r&&c.startsWith("..")){let g=c.split("/");for(;g[0]==="..";)g.shift(),m-=1;l.pathname=g.join("/")}d=m>=0?t[m]:"/"}let h=y4(l,d),p=c&&c!=="/"&&c.endsWith("/"),v=(o||c===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(p||v)&&(h.pathname+="/"),h}var OM=e=>e.replace(/[\\/]{2,}/g,"/"),dr=e=>OM(e.join("/")),jf=e=>e.replace(/\/+$/,""),b4=e=>jf(e).replace(/^\/*/,"/"),x4=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,j4=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,_4=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 S4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function w4(e){let t=e.map(n=>n.route.path).filter(Boolean);return dr(t)||"/"}var AM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function NM(e,t){let n=e;if(typeof n!="string"||!v0.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,l=!1;if(AM)try{let o=new URL(window.location.href),c=bM.test(n)?new URL(JD(n,o.protocol)):new URL(n),d=ta(c.pathname,t);c.origin===o.origin&&d!=null?n=d+c.search+c.hash:l=!0}catch{tr(!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:l,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var EM=["POST","PUT","PATCH","DELETE"];new Set(EM);var O4=["GET",...EM];new Set(O4);var A4=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function N4(e){try{return A4.includes(new URL(e).protocol)}catch{return!1}}var uo=T.createContext(null);uo.displayName="DataRouter";var Sd=T.createContext(null);Sd.displayName="DataRouterState";var TM=T.createContext(!1);function E4(){return T.useContext(TM)}var CM=T.createContext({isTransitioning:!1});CM.displayName="ViewTransition";var T4=T.createContext(new Map);T4.displayName="Fetchers";var C4=T.createContext(null);C4.displayName="Await";var zn=T.createContext(null);zn.displayName="Navigation";var xu=T.createContext(null);xu.displayName="Location";var pr=T.createContext({outlet:null,matches:[],isDataRoute:!1});pr.displayName="Route";var g0=T.createContext(null);g0.displayName="RouteError";var MM="REACT_ROUTER_ERROR",M4="REDIRECT",k4="ROUTE_ERROR_RESPONSE";function R4(e){if(e.startsWith(`${MM}:${M4}:{`))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 P4(e){if(e.startsWith(`${MM}:${k4}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new _4(t.status,t.statusText,t.data)}catch{}}function D4(e,{relative:t}={}){jt(co(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=T.useContext(zn),{hash:l,pathname:o,search:c}=_u(e,{relative:t}),d=o;return n!=="/"&&(d=o==="/"?n:dr([n,o])),r.createHref({pathname:d,search:c,hash:l})}function co(){return T.useContext(xu)!=null}function Sn(){return jt(co(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(xu).location}var kM="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function RM(e){T.useContext(zn).static||T.useLayoutEffect(e)}function mr(){let{isDataRoute:e}=T.useContext(pr);return e?K4():$4()}function $4(){jt(co(),"useNavigate() may be used only in the context of a <Router> component.");let e=T.useContext(uo),{basename:t,navigator:n}=T.useContext(zn),{matches:r}=T.useContext(pr),{pathname:l}=Sn(),o=JSON.stringify(y0(r)),c=T.useRef(!1);return RM(()=>{c.current=!0}),T.useCallback((h,p={})=>{if(tr(c.current,kM),!c.current)return;if(typeof h=="number"){n.go(h);return}let v=_d(h,JSON.parse(o),l,p.relative==="path");e==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:dr([t,v.pathname])),(p.replace?n.replace:n.push)(v,p.state,p)},[t,n,o,l,e])}T.createContext(null);function ju(){let{matches:e}=T.useContext(pr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function _u(e,{relative:t}={}){let{matches:n}=T.useContext(pr),{pathname:r}=Sn(),l=JSON.stringify(y0(n));return T.useMemo(()=>_d(e,JSON.parse(l),r,t==="path"),[e,l,r,t])}function q4(e,t){return PM(e,t)}function PM(e,t,n){var x;jt(co(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=T.useContext(zn),{matches:l}=T.useContext(pr),o=l[l.length-1],c=o?o.params:{},d=o?o.pathname:"/",h=o?o.pathnameBase:"/",p=o&&o.route;{let O=p&&p.path||"";$M(d,!p||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let v=Sn(),m;if(t){let O=typeof t=="string"?so(t):t;jt(h==="/"||((x=O.pathname)==null?void 0:x.startsWith(h)),`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 "${h}" but pathname "${O.pathname}" was given in the \`location\` prop.`),m=O}else m=v;let g=m.pathname||"/",j=g;if(h!=="/"){let O=h.replace(/^\//,"").split("/");j="/"+g.replace(/^\//,"").split("/").slice(O.length).join("/")}let S=n&&n.state.matches.length?n.state.matches.map(O=>Object.assign(O,{route:n.manifest[O.route.id]||O.route})):xM(e,{pathname:j});tr(p||S!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),tr(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.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 _=I4(S&&S.map(O=>Object.assign({},O,{params:Object.assign({},c,O.params),pathname:dr([h,r.encodeLocation?r.encodeLocation(O.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?h:dr([h,r.encodeLocation?r.encodeLocation(O.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),l,n);return t&&_?T.createElement(xu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...m},navigationType:"POP"}},_):_}function z4(){let e=F4(),t=S4(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)",l={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:o},"ErrorBoundary")," or"," ",T.createElement("code",{style:o},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},t),n?T.createElement("pre",{style:l},n):null,c)}var L4=T.createElement(z4,null),DM=class extends T.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=P4(e.digest);n&&(e=n)}let t=e!==void 0?T.createElement(pr.Provider,{value:this.props.routeContext},T.createElement(g0.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?T.createElement(B4,{error:e},t):t}};DM.contextType=TM;var Rm=new WeakMap;function B4({children:e,error:t}){let{basename:n}=T.useContext(zn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=R4(t.digest);if(r){let l=Rm.get(t);if(l)throw l;let o=NM(r.location,n),c=o.absoluteURL||o.to;if(N4(c))throw new Error("Invalid redirect location");if(AM&&!Rm.get(t))if(o.isExternal||r.reloadDocument)window.location.href=c;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw Rm.set(t,d),d}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c}`})}}return e}function U4({routeContext:e,match:t,children:n}){let r=T.useContext(uo);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),T.createElement(pr.Provider,{value:e},n)}function I4(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let l=e,o=r==null?void 0:r.errors;if(o!=null){let v=l.findIndex(m=>m.route.id&&(o==null?void 0:o[m.route.id])!==void 0);jt(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),l=l.slice(0,Math.min(l.length,v+1))}let c=!1,d=-1;if(n&&r){c=r.renderFallback;for(let v=0;v<l.length;v++){let m=l[v];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=v),m.route.id){let{loaderData:g,errors:j}=r,S=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!j||j[m.route.id]===void 0);if(m.route.lazy||S){n.isStatic&&(c=!0),d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}}let h=n==null?void 0:n.onError,p=r&&h?(v,m)=>{var g,j;h(v,{location:r.location,params:((j=(g=r.matches)==null?void 0:g[0])==null?void 0:j.params)??{},pattern:w4(r.matches),errorInfo:m})}:void 0;return l.reduceRight((v,m,g)=>{let j,S=!1,_=null,x=null;r&&(j=o&&m.route.id?o[m.route.id]:void 0,_=m.route.errorElement||L4,c&&(d<0&&g===0?($M("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,x=null):d===g&&(S=!0,x=m.route.hydrateFallbackElement||null)));let O=t.concat(l.slice(0,g+1)),w=()=>{let E;return j?E=_:S?E=x:m.route.Component?E=T.createElement(m.route.Component,null):m.route.element?E=m.route.element:E=v,T.createElement(U4,{match:m,routeContext:{outlet:v,matches:O,isDataRoute:r!=null},children:E})};return r&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?T.createElement(DM,{location:r.location,revalidation:r.revalidation,component:_,error:j,children:w(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:p}):w()},null)}function b0(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function H4(e){let t=T.useContext(uo);return jt(t,b0(e)),t}function G4(e){let t=T.useContext(Sd);return jt(t,b0(e)),t}function Y4(e){let t=T.useContext(pr);return jt(t,b0(e)),t}function x0(e){let t=Y4(e),n=t.matches[t.matches.length-1];return jt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function V4(){return x0("useRouteId")}function F4(){var r;let e=T.useContext(g0),t=G4("useRouteError"),n=x0("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function K4(){let{router:e}=H4("useNavigate"),t=x0("useNavigate"),n=T.useRef(!1);return RM(()=>{n.current=!0}),T.useCallback(async(l,o={})=>{tr(n.current,kM),n.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...o}))},[e,t])}var Zw={};function $M(e,t,n){!t&&!Zw[e]&&(Zw[e]=!0,tr(!1,n))}T.memo(X4);function X4({routes:e,manifest:t,future:n,state:r,isStatic:l,onError:o}){return PM(e,void 0,{manifest:t,state:r,isStatic:l,onError:o})}function qM({to:e,replace:t,state:n,relative:r}){jt(co(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=T.useContext(zn);tr(!l,"<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}=T.useContext(pr),{pathname:c}=Sn(),d=mr(),h=_d(e,y0(o),c,r==="path"),p=JSON.stringify(h);return T.useEffect(()=>{d(JSON.parse(p),{replace:t,state:n,relative:r})},[d,p,r,t,n]),null}function ct(e){jt(!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 Z4({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:l,static:o=!1,useTransitions:c}){jt(!co(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),h=T.useMemo(()=>({basename:d,navigator:l,static:o,useTransitions:c,future:{}}),[d,l,o,c]);typeof n=="string"&&(n=so(n));let{pathname:p="/",search:v="",hash:m="",state:g=null,key:j="default",mask:S}=n,_=T.useMemo(()=>{let x=ta(p,d);return x==null?null:{location:{pathname:x,search:v,hash:m,state:g,key:j,mask:S},navigationType:r}},[d,p,v,m,g,j,r,S]);return tr(_!=null,`<Router basename="${d}"> is not able to match the URL "${p}${v}${m}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:T.createElement(zn.Provider,{value:h},T.createElement(xu.Provider,{children:t,value:_}))}function Ww({children:e,location:t}){return q4(Yb(e),t)}function Yb(e,t=[]){let n=[];return T.Children.forEach(e,(r,l)=>{if(!T.isValidElement(r))return;let o=[...t,l];if(r.type===T.Fragment){n.push.apply(n,Yb(r.props.children,o));return}jt(r.type===ct,`[${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>`),jt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let c={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&&(c.children=Yb(r.props.children,o)),n.push(c)}),n}var mf="get",vf="application/x-www-form-urlencoded";function wd(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function W4(e){return wd(e)&&e.tagName.toLowerCase()==="button"}function Q4(e){return wd(e)&&e.tagName.toLowerCase()==="form"}function J4(e){return wd(e)&&e.tagName.toLowerCase()==="input"}function e$(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function t$(e,t){return e.button===0&&(!t||t==="_self")&&!e$(e)}function Vb(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(l=>[n,l]):[[n,r]])},[]))}function n$(e,t){let n=Vb(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(o=>{n.append(l,o)})}),n}var Wc=null;function r$(){if(Wc===null)try{new FormData(document.createElement("form"),0),Wc=!1}catch{Wc=!0}return Wc}var a$=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Pm(e){return e!=null&&!a$.has(e)?(tr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vf}"`),null):e}function i$(e,t){let n,r,l,o,c;if(Q4(e)){let d=e.getAttribute("action");r=d?ta(d,t):null,n=e.getAttribute("method")||mf,l=Pm(e.getAttribute("enctype"))||vf,o=new FormData(e)}else if(W4(e)||J4(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||d.getAttribute("action");if(r=h?ta(h,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||mf,l=Pm(e.getAttribute("formenctype"))||Pm(d.getAttribute("enctype"))||vf,o=new FormData(d,e),!r$()){let{name:p,type:v,value:m}=e;if(v==="image"){let g=p?`${p}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else p&&o.append(p,m)}}else{if(wd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=mf,r=null,l=vf,c=e}return o&&l==="text/plain"&&(c=o,o=void 0),{action:r,method:n.toLowerCase(),encType:l,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function j0(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function zM(e,t,n,r){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${r}`:l.pathname=`${l.pathname}.${r}`:l.pathname==="/"?l.pathname=`_root.${r}`:t&&ta(l.pathname,t)==="/"?l.pathname=`${jf(t)}/_root.${r}`:l.pathname=`${jf(l.pathname)}.${r}`,l}async function l$(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 o$(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 s$(e,t,n){let r=await Promise.all(e.map(async l=>{let o=t.routes[l.route.id];if(o){let c=await l$(o,n);return c.links?c.links():[]}return[]}));return d$(r.flat(1).filter(o$).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Qw(e,t,n,r,l,o){let c=(h,p)=>n[p]?h.route.id!==n[p].route.id:!0,d=(h,p)=>{var v;return n[p].pathname!==h.pathname||((v=n[p].route.path)==null?void 0:v.endsWith("*"))&&n[p].params["*"]!==h.params["*"]};return o==="assets"?t.filter((h,p)=>c(h,p)||d(h,p)):o==="data"?t.filter((h,p)=>{var m;let v=r.routes[h.route.id];if(!v||!v.hasLoader)return!1;if(c(h,p)||d(h,p))return!0;if(h.route.shouldRevalidate){let g=h.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function u$(e,t,{includeHydrateFallback:n}={}){return c$(e.map(r=>{let l=t.routes[r.route.id];if(!l)return[];let o=[l.module];return l.clientActionModule&&(o=o.concat(l.clientActionModule)),l.clientLoaderModule&&(o=o.concat(l.clientLoaderModule)),n&&l.hydrateFallbackModule&&(o=o.concat(l.hydrateFallbackModule)),l.imports&&(o=o.concat(l.imports)),o}).flat(1))}function c$(e){return[...new Set(e)]}function f$(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function d$(e,t){let n=new Set;return new Set(t),e.reduce((r,l)=>{let o=JSON.stringify(f$(l));return n.has(o)||(n.add(o),r.push({key:o,link:l})),r},[])}function _0(){let e=T.useContext(uo);return j0(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function h$(){let e=T.useContext(Sd);return j0(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var S0=T.createContext(void 0);S0.displayName="FrameworkContext";function Od(){let e=T.useContext(S0);return j0(e,"You must render this element inside a <HydratedRouter> element"),e}function p$(e,t){let n=T.useContext(S0),[r,l]=T.useState(!1),[o,c]=T.useState(!1),{onFocus:d,onBlur:h,onMouseEnter:p,onMouseLeave:v,onTouchStart:m}=t,g=T.useRef(null);T.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let _=O=>{O.forEach(w=>{c(w.isIntersecting)})},x=new IntersectionObserver(_,{threshold:.5});return g.current&&x.observe(g.current),()=>{x.disconnect()}}},[e]),T.useEffect(()=>{if(r){let _=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(_)}}},[r]);let j=()=>{l(!0)},S=()=>{l(!1),c(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:ms(d,j),onBlur:ms(h,S),onMouseEnter:ms(p,j),onMouseLeave:ms(v,S),onTouchStart:ms(m,j)}]:[!1,g,{}]}function ms(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function m$({page:e,...t}){let n=E4(),{nonce:r}=Od(),{router:l}=_0(),o=T.useMemo(()=>xM(l.routes,e,l.basename),[l.routes,e,l.basename]);return o?(t.nonce==null&&r&&(t={...t,nonce:r}),n?T.createElement(y$,{page:e,matches:o,...t}):T.createElement(g$,{page:e,matches:o,...t})):null}function v$(e){let{manifest:t,routeModules:n}=Od(),[r,l]=T.useState([]);return T.useEffect(()=>{let o=!1;return s$(e,t,n).then(c=>{o||l(c)}),()=>{o=!0}},[e,t,n]),r}function y$({page:e,matches:t,...n}){let r=Sn(),{future:l}=Od(),{basename:o}=_0(),c=T.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let d=zM(e,o,l.v8_trailingSlashAwareDataRequests,"rsc"),h=!1,p=[];for(let v of t)typeof v.route.shouldRevalidate=="function"?h=!0:p.push(v.route.id);return h&&p.length>0&&d.searchParams.set("_routes",p.join(",")),[d.pathname+d.search]},[o,l.v8_trailingSlashAwareDataRequests,e,r,t]);return T.createElement(T.Fragment,null,c.map(d=>T.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function g$({page:e,matches:t,...n}){let r=Sn(),{future:l,manifest:o,routeModules:c}=Od(),{basename:d}=_0(),{loaderData:h,matches:p}=h$(),v=T.useMemo(()=>Qw(e,t,p,o,r,"data"),[e,t,p,o,r]),m=T.useMemo(()=>Qw(e,t,p,o,r,"assets"),[e,t,p,o,r]),g=T.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let _=new Set,x=!1;if(t.forEach(w=>{var M;let E=o.routes[w.route.id];!E||!E.hasLoader||(!v.some(A=>A.route.id===w.route.id)&&w.route.id in h&&((M=c[w.route.id])!=null&&M.shouldRevalidate)||E.hasClientLoader?x=!0:_.add(w.route.id))}),_.size===0)return[];let O=zM(e,d,l.v8_trailingSlashAwareDataRequests,"data");return x&&_.size>0&&O.searchParams.set("_routes",t.filter(w=>_.has(w.route.id)).map(w=>w.route.id).join(",")),[O.pathname+O.search]},[d,l.v8_trailingSlashAwareDataRequests,h,r,o,v,t,e,c]),j=T.useMemo(()=>u$(m,o),[m,o]),S=v$(m);return T.createElement(T.Fragment,null,g.map(_=>T.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...n})),j.map(_=>T.createElement("link",{key:_,rel:"modulepreload",href:_,...n})),S.map(({key:_,link:x})=>T.createElement("link",{key:_,nonce:n.nonce,...x,crossOrigin:x.crossOrigin??n.crossOrigin})))}function b$(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var x$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{x$&&(window.__reactRouterVersion="7.18.1")}catch{}function j$({basename:e,children:t,useTransitions:n,window:r}){let l=T.useRef();l.current==null&&(l.current=e4({window:r,v5Compat:!0}));let o=l.current,[c,d]=T.useState({action:o.action,location:o.location}),h=T.useCallback(p=>{n===!1?d(p):T.startTransition(()=>d(p))},[n]);return T.useLayoutEffect(()=>o.listen(h),[o,h]),T.createElement(Z4,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,useTransitions:n})}var ft=T.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:l,reloadDocument:o,replace:c,mask:d,state:h,target:p,to:v,preventScrollReset:m,viewTransition:g,defaultShouldRevalidate:j,...S},_){let{basename:x,navigator:O,useTransitions:w}=T.useContext(zn),E=typeof v=="string"&&v0.test(v),M=NM(v,x);v=M.to;let A=D4(v,{relative:l}),C=Sn(),k=null;if(d){let D=_d(d,[],C.mask?C.mask.pathname:"/",!0);x!=="/"&&(D.pathname=D.pathname==="/"?x:dr([x,D.pathname])),k=O.createHref(D)}let[z,B,Z]=p$(r,S),G=w$(v,{replace:c,mask:d,state:h,target:p,preventScrollReset:m,relative:l,viewTransition:g,defaultShouldRevalidate:j,useTransitions:w});function H(D){t&&t(D),D.defaultPrevented||G(D)}let W=!(M.isExternal||o),Q=T.createElement("a",{...S,...Z,href:(W?k:void 0)||M.absoluteURL||A,onClick:W?H:t,ref:b$(_,B),target:p,"data-discover":!E&&n==="render"?"true":void 0});return z&&!E?T.createElement(T.Fragment,null,Q,T.createElement(m$,{page:A})):Q});ft.displayName="Link";var LM=T.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:l=!1,style:o,to:c,viewTransition:d,children:h,...p},v){let m=_u(c,{relative:p.relative}),g=Sn(),j=T.useContext(Sd),{navigator:S,basename:_}=T.useContext(zn),x=j!=null&&T$(m)&&d===!0,O=S.encodeLocation?S.encodeLocation(m).pathname:m.pathname,w=g.pathname,E=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;n||(w=w.toLowerCase(),E=E?E.toLowerCase():null,O=O.toLowerCase()),E&&_&&(E=ta(E,_)||E);const M=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let A=w===O||!l&&w.startsWith(O)&&w.charAt(M)==="/",C=E!=null&&(E===O||!l&&E.startsWith(O)&&E.charAt(O.length)==="/"),k={isActive:A,isPending:C,isTransitioning:x},z=A?t:void 0,B;typeof r=="function"?B=r(k):B=[r,A?"active":null,C?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let Z=typeof o=="function"?o(k):o;return T.createElement(ft,{...p,"aria-current":z,className:B,ref:v,style:Z,to:c,viewTransition:d},typeof h=="function"?h(k):h)});LM.displayName="NavLink";var _$=T.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:l,state:o,method:c=mf,action:d,onSubmit:h,relative:p,preventScrollReset:v,viewTransition:m,defaultShouldRevalidate:g,...j},S)=>{let{useTransitions:_}=T.useContext(zn),x=N$(),O=E$(d,{relative:p}),w=c.toLowerCase()==="get"?"get":"post",E=typeof d=="string"&&v0.test(d),M=A=>{if(h&&h(A),A.defaultPrevented)return;A.preventDefault();let C=A.nativeEvent.submitter,k=(C==null?void 0:C.getAttribute("formmethod"))||c,z=()=>x(C||A.currentTarget,{fetcherKey:t,method:k,navigate:n,replace:l,state:o,relative:p,preventScrollReset:v,viewTransition:m,defaultShouldRevalidate:g});_&&n!==!1?T.startTransition(()=>z()):z()};return T.createElement("form",{ref:S,method:w,action:O,onSubmit:r?h:M,...j,"data-discover":!E&&e==="render"?"true":void 0})});_$.displayName="Form";function S$(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function BM(e){let t=T.useContext(uo);return jt(t,S$(e)),t}function w$(e,{target:t,replace:n,mask:r,state:l,preventScrollReset:o,relative:c,viewTransition:d,defaultShouldRevalidate:h,useTransitions:p}={}){let v=mr(),m=Sn(),g=_u(e,{relative:c});return T.useCallback(j=>{if(t$(j,t)){j.preventDefault();let S=n!==void 0?n:$s(m)===$s(g),_=()=>v(e,{replace:S,mask:r,state:l,preventScrollReset:o,relative:c,viewTransition:d,defaultShouldRevalidate:h});p?T.startTransition(()=>_()):_()}},[m,v,g,n,r,l,t,e,o,c,d,h,p])}function UM(e){tr(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=T.useRef(Vb(e)),n=T.useRef(!1),r=Sn(),l=T.useMemo(()=>n$(r.search,n.current?null:t.current),[r.search]),o=mr(),c=T.useCallback((d,h)=>{const p=Vb(typeof d=="function"?d(new URLSearchParams(l)):d);n.current=!0,o("?"+p,h)},[o,l]);return[l,c]}var O$=0,A$=()=>`__${String(++O$)}__`;function N$(){let{router:e}=BM("useSubmit"),{basename:t}=T.useContext(zn),n=V4(),r=e.fetch,l=e.navigate;return T.useCallback(async(o,c={})=>{let{action:d,method:h,encType:p,formData:v,body:m}=i$(o,t);if(c.navigate===!1){let g=c.fetcherKey||A$();await r(g,n,c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:v,body:m,formMethod:c.method||h,formEncType:c.encType||p,flushSync:c.flushSync})}else await l(c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:v,body:m,formMethod:c.method||h,formEncType:c.encType||p,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,l,t,n])}function E$(e,{relative:t}={}){let{basename:n}=T.useContext(zn),r=T.useContext(pr);jt(r,"useFormAction must be used inside a RouteContext");let[l]=r.matches.slice(-1),o={..._u(e||".",{relative:t})},c=Sn();if(e==null){o.search=c.search;let d=new URLSearchParams(o.search),h=d.getAll("index");if(h.some(v=>v==="")){d.delete("index"),h.filter(m=>m).forEach(m=>d.append("index",m));let v=d.toString();o.search=v?`?${v}`:""}}return(!e||e===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:dr([n,o.pathname])),$s(o)}function T$(e,{relative:t}={}){let n=T.useContext(CM);jt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=BM("useViewTransitionState"),l=_u(e,{relative:t});if(!n.isTransitioning)return!1;let o=ta(n.currentLocation.pathname,r)||n.currentLocation.pathname,c=ta(n.nextLocation.pathname,r)||n.nextLocation.pathname;return xf(l.pathname,c)!=null||xf(l.pathname,o)!=null}const C$="/api/spa";class Jw extends Error{constructor(t,n){super(t),this.status=n}}async function Qc(e,t={}){const n=await fetch(C$+e,{credentials:"include",headers:t.body?{"Content-Type":"application/json"}:void 0,...t,body:t.body?JSON.stringify(t.body):void 0});if(n.status===401)throw window.dispatchEvent(new Event("mek:unauthorized")),new Jw("Niet ingelogd",401);let r=null;const l=await n.text();if(l)try{r=JSON.parse(l)}catch{r=null}if(!n.ok)throw new Jw(r&&r.error||`Fout ${n.status}`,n.status);return r}const ce={get:e=>Qc(e),post:(e,t)=>Qc(e,{method:"POST",body:t}),put:(e,t)=>Qc(e,{method:"PUT",body:t}),del:e=>Qc(e,{method:"DELETE"})};function Ha(e){const t=new URLSearchParams;for(const[r,l]of Object.entries(e||{}))l!=null&&l!==""&&t.set(r,l);const n=t.toString();return n?`?${n}`:""}const ye={euro:e=>new Intl.NumberFormat("nl-NL",{style:"currency",currency:"EUR"}).format(e||0),date:e=>{if(!e)return"-";const t=new Date(e);return isNaN(t)?e:t.toLocaleDateString("nl-NL",{day:"numeric",month:"short",year:"numeric"})},datetime:e=>{if(!e)return"-";const t=new Date(e);return isNaN(t)?e:t.toLocaleDateString("nl-NL",{day:"numeric",month:"short"})+" "+t.toLocaleTimeString("nl-NL",{hour:"2-digit",minute:"2-digit"})},hours:e=>`${(e||0).toLocaleString("nl-NL",{maximumFractionDigits:1})}u`},IM=T.createContext(null);function M$({children:e}){const[t,n]=T.useState(null),[r,l]=T.useState(!0);T.useEffect(()=>{ce.get("/auth/me").then(n).catch(()=>n(null)).finally(()=>l(!1))},[]),T.useEffect(()=>{const d=()=>n(null);return window.addEventListener("mek:unauthorized",d),()=>window.removeEventListener("mek:unauthorized",d)},[]);const o=T.useCallback(async(d,h)=>{const p=await ce.post("/auth/login",{username:d,password:h});return n(p),p},[]),c=T.useCallback(async()=>{try{await ce.post("/auth/logout")}catch{}n(null)},[]);return u.jsx(IM.Provider,{value:{user:t,loading:r,login:o,logout:c},children:e})}function w0(){return T.useContext(IM)}/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const k$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),R$=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),e2=e=>{const t=R$(e);return t.charAt(0).toUpperCase()+t.slice(1)},HM=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),P$=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var D$={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"};/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $$=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:o,iconNode:c,...d},h)=>T.createElement("svg",{ref:h,...D$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:HM("lucide",l),...!o&&!P$(d)&&{"aria-hidden":"true"},...d},[...c.map(([p,v])=>T.createElement(p,v)),...Array.isArray(o)?o:[o]]));/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _e=(e,t)=>{const n=T.forwardRef(({className:r,...l},o)=>T.createElement($$,{ref:o,iconNode:t,className:HM(`lucide-${k$(e2(e))}`,`lucide-${e}`,r),...l}));return n.displayName=e2(e),n};/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q$=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],z$=_e("activity",q$);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L$=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Su=_e("arrow-left",L$);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B$=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],O0=_e("arrow-right",B$);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U$=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],GM=_e("bell",U$);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const I$=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],H$=_e("bot",I$);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G$=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],A0=_e("briefcase",G$);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y$=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],V$=_e("building-2",Y$);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F$=[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",key:"10bnsj"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9",key:"1eqmu1"}],["path",{d:"M21 21v-2h-4",key:"14zm7j"}],["path",{d:"M3 5h4V3",key:"z442eg"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3",key:"ebdjd7"}]],K$=_e("cable",F$);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const X$=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Z$=_e("calendar",X$);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W$=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Q$=_e("chart-column",W$);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J$=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],e6=_e("check-check",J$);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const t6=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],YM=_e("chevron-left",t6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n6=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],VM=_e("chevron-right",n6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const r6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],FM=_e("circle-check",r6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const a6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],La=_e("clock",a6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const i6=[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]],l6=_e("construction",i6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const o6=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 12a9 3 0 0 0 5 2.69",key:"1ui2ym"}],["path",{d:"M21 9.3V5",key:"6k6cib"}],["path",{d:"M3 5v14a9 3 0 0 0 6.47 2.88",key:"i62tjy"}],["path",{d:"M12 12v4h4",key:"1bxaet"}],["path",{d:"M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16",key:"1f4ei9"}]],s6=_e("database-backup",o6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const u6=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],c6=_e("download",u6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const f6=[["path",{d:"M4 10h12",key:"1y6xl8"}],["path",{d:"M4 14h9",key:"1loblj"}],["path",{d:"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",key:"1j6lzo"}]],d6=_e("euro",f6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const h6=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],p6=_e("external-link",h6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const m6=[["path",{d:"M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"159hny"}],["path",{d:"M17 18h1",key:"uldtlt"}],["path",{d:"M12 18h1",key:"s9uhes"}],["path",{d:"M7 18h1",key:"1neino"}]],v6=_e("factory",m6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const y6=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]],g6=_e("file-search",y6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const b6=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],N0=_e("file-text",b6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const x6=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],j6=_e("flag",x6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _6=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],KM=_e("folder-kanban",_6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const S6=[["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"}]],w6=_e("globe",S6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const O6=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],A6=_e("inbox",O6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const N6=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],E6=_e("layout-dashboard",N6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const T6=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],XM=_e("lightbulb",T6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const C6=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ZM=_e("loader-circle",C6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const M6=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],k6=_e("log-out",M6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const R6=[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M16 19h6",key:"xwg31i"}]],t2=_e("mail-plus",R6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const P6=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Ad=_e("mail",P6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D6=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],WM=_e("map-pin",D6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $6=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],q6=_e("menu",$6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z6=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Nd=_e("network",z6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L6=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],B6=_e("pen-tool",L6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U6=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Ga=_e("pencil",U6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const I6=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],H6=_e("phone",I6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G6=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qt=_e("plus",G6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y6=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],V6=_e("radar",Y6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F6=[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]],qs=_e("receipt",F6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K6=[["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"}]],X6=_e("refresh-cw",K6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z6=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],W6=_e("search-x",Z6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q6=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],QM=_e("search",Q6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J6=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],e8=_e("send",J6);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const t8=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Fb=_e("server",t8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n8=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],r8=_e("settings",n8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const a8=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],i8=_e("share-2",a8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const l8=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],o8=_e("shield-check",l8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const s8=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],u8=_e("sparkles",s8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const c8=[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],f8=_e("square-check-big",c8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const d8=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],h8=_e("star",d8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const p8=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],zt=_e("trash-2",p8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const m8=[["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"}]],JM=_e("triangle-alert",m8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v8=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],e3=_e("user",v8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const y8=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],E0=_e("users",y8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const g8=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],Ed=_e("wallet",g8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const b8=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],x8=_e("workflow",b8);/**
 * @license lucide-react v0.510.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const j8=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],T0=_e("x",j8),_8=[{label:"CRM",items:[{to:"/",icon:E6,label:"Dashboard",end:!0},{to:"/clients",icon:E0,label:"Cliënten"},{to:"/engagements",icon:A0,label:"Engagements"},{to:"/tasks",icon:FM,label:"Taken"},{to:"/calendar",icon:Z$,label:"Agenda"},{to:"/email",icon:Ad,label:"Email"}]},{label:"Delivery",items:[{to:"/projects",icon:KM,label:"Projecten"},{to:"/time",icon:La,label:"Uren"},{to:"/invoices",icon:qs,label:"Facturen"},{to:"/finance",icon:Ed,label:"Finance"},{to:"/reports",icon:Q$,label:"Rapporten"}]},{label:"Data & Infra",items:[{to:"/racks",icon:Fb,label:"Racks"},{to:"/networking",icon:i8,label:"Netwerk"},{to:"/diagrams",icon:Nd,label:"Diagrammen"},{to:"/market",icon:V6,label:"Market Intel"},{to:"/ai",icon:u8,label:"AI Studio"}]},{label:"Platform",items:[{to:"/settings",icon:r8,label:"Instellingen"}]}],S8=[{href:"/quality",icon:o8,label:"Data Quality"},{href:"/architecture/designer",icon:B6,label:"Pro Designer"},{href:"/assess",icon:g6,label:"Assessments"}];function w8({children:e}){const{user:t,logout:n}=w0(),r=mr(),[l,o]=T.useState(!1),[c,d]=T.useState(0),[h,p]=T.useState("");T.useEffect(()=>{ce.get("/notifications").then(g=>d(g.unread||0)).catch(()=>{})},[]);const v=g=>{g.preventDefault(),h.trim()&&(r(`/search?q=${encodeURIComponent(h.trim())}`),p(""),o(!1))},m=u.jsxs("div",{className:"flex flex-col h-full",children:[u.jsxs("div",{className:"px-5 py-5 flex items-center gap-3 border-b border-border-soft",children:[u.jsx("div",{className:"w-9 h-9 rounded-lg bg-accent-soft flex items-center justify-center glow-accent",children:u.jsx(Nd,{className:"w-5 h-5 text-accent"})}),u.jsxs("div",{children:[u.jsx("div",{className:"font-bold text-[15px] tracking-tight",children:"Mek-Tech"}),u.jsx("div",{className:"text-[11px] text-muted",children:"Consultancy Platform"})]})]}),u.jsxs("nav",{className:"flex-1 overflow-y-auto py-4 px-3 space-y-5",children:[_8.map(g=>u.jsxs("div",{children:[u.jsx("div",{className:"px-2 mb-1.5 text-[10px] font-semibold uppercase tracking-widest text-muted",children:g.label}),u.jsx("div",{className:"space-y-0.5",children:g.items.map(j=>u.jsxs(LM,{to:j.to,end:j.end,onClick:()=>o(!1),className:({isActive:S})=>`flex items-center gap-2.5 px-2.5 py-2 rounded-lg text-[13px] transition-colors ${S?"bg-accent-soft text-accent font-medium":"text-muted hover:text-text hover:bg-card"}`,children:[u.jsx(j.icon,{className:"w-4 h-4 shrink-0"}),j.label]},j.to))})]},g.label)),u.jsxs("div",{children:[u.jsx("div",{className:"px-2 mb-1.5 text-[10px] font-semibold uppercase tracking-widest text-muted",children:"Klassiek"}),u.jsx("div",{className:"space-y-0.5",children:S8.map(g=>u.jsxs("a",{href:g.href,className:"flex items-center gap-2.5 px-2.5 py-2 rounded-lg text-[13px] text-muted hover:text-text hover:bg-card transition-colors",children:[u.jsx(g.icon,{className:"w-4 h-4 shrink-0"}),g.label,u.jsx(p6,{className:"w-3 h-3 ml-auto opacity-50"})]},g.href))})]})]}),u.jsx("div",{className:"p-3 border-t border-border-soft",children:u.jsxs("div",{className:"flex items-center gap-2.5 px-2 py-1.5",children:[u.jsx("div",{className:"w-8 h-8 rounded-full bg-accent-soft flex items-center justify-center text-accent text-xs font-bold uppercase",children:((t==null?void 0:t.username)||"?").slice(0,2)}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("div",{className:"text-[13px] font-medium truncate",children:t==null?void 0:t.username}),u.jsx("div",{className:"text-[11px] text-muted",children:t==null?void 0:t.role})]}),u.jsx("button",{onClick:n,title:"Uitloggen",className:"p-1.5 rounded-md text-muted hover:text-red hover:bg-card transition-colors",children:u.jsx(k6,{className:"w-4 h-4"})})]})})]});return u.jsxs("div",{className:"h-full flex",children:[u.jsx("aside",{className:"hidden lg:block w-60 shrink-0 bg-bg-soft border-r border-border-soft",children:m}),l&&u.jsxs("div",{className:"fixed inset-0 z-40 lg:hidden",children:[u.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>o(!1)}),u.jsx("aside",{className:"absolute left-0 top-0 bottom-0 w-64 bg-bg-soft border-r border-border z-50",children:m})]}),u.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[u.jsxs("header",{className:"h-14 shrink-0 bg-bg-soft border-b border-border-soft flex items-center gap-3 px-4",children:[u.jsx("button",{className:"lg:hidden p-2 rounded-md text-muted hover:text-text hover:bg-card",onClick:()=>o(!l),children:l?u.jsx(T0,{className:"w-5 h-5"}):u.jsx(q6,{className:"w-5 h-5"})}),u.jsx("form",{onSubmit:v,className:"flex-1 max-w-md",children:u.jsxs("div",{className:"relative",children:[u.jsx(QM,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted"}),u.jsx("input",{value:h,onChange:g=>p(g.target.value),placeholder:"Zoeken in cliënten, taken, engagements...",className:"w-full bg-card border border-border rounded-lg pl-9 pr-3 py-1.5 text-[13px] placeholder:text-muted focus:outline-none focus:border-accent/50"})]})}),u.jsx("div",{className:"ml-auto flex items-center gap-1",children:u.jsxs(ft,{to:"/notifications",className:"relative p-2 rounded-md text-muted hover:text-text hover:bg-card transition-colors",title:"Notificaties",children:[u.jsx(GM,{className:"w-5 h-5"}),c>0&&u.jsx("span",{className:"absolute top-1 right-1 w-4 h-4 rounded-full bg-red text-[10px] font-bold flex items-center justify-center pulse-dot",children:c>9?"9+":c})]})})]}),u.jsx("main",{className:"flex-1 overflow-y-auto p-4 lg:p-6",children:e})]})]})}const C0={lead:"yellow",active:"green",paused:"muted",archived:"muted",planned:"blue",in_progress:"accent",completed:"green",on_hold:"yellow",todo:"blue",done:"green",cancelled:"muted",draft:"muted",sent:"blue",paid:"green",overdue:"red",critical:"red",high:"yellow",medium:"blue",low:"muted",planning:"blue",inactive:"muted",standby:"yellow",decommissioned:"muted",new:"yellow",contacted:"blue",qualified:"accent",converted:"green",lost:"muted"},n2={accent:"bg-accent-soft text-accent",green:"bg-green/15 text-green",yellow:"bg-yellow/15 text-yellow",red:"bg-red/15 text-red",blue:"bg-blue/15 text-blue",purple:"bg-purple/15 text-purple",pink:"bg-pink/15 text-pink",muted:"bg-muted/15 text-muted"};function nt({color:e="muted",children:t,className:n=""}){return u.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-[11px] font-medium ${n2[e]||n2.muted} ${n}`,children:t})}function Tt({status:e,labels:t={}}){return u.jsx(nt,{color:C0[e]||"muted",children:t[e]||e})}function Ae({title:e,subtitle:t,actions:n,children:r,className:l="",padding:o=!0}){return u.jsxs("div",{className:`bg-card border border-border-soft rounded-xl ${l}`,children:[(e||n)&&u.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border-soft",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-[14px] font-semibold",children:e}),t&&u.jsx("div",{className:"text-[12px] text-muted mt-0.5",children:t})]}),n&&u.jsx("div",{className:"flex items-center gap-2",children:n})]}),u.jsx("div",{className:o?"p-4":"",children:r})]})}function tn({icon:e,label:t,value:n,sub:r,color:l="accent",to:o}){const c={accent:"text-accent bg-accent-soft",green:"text-green bg-green/15",yellow:"text-yellow bg-yellow/15",red:"text-red bg-red/15",blue:"text-blue bg-blue/15",purple:"text-purple bg-purple/15"},d=u.jsx("div",{className:"bg-card border border-border-soft rounded-xl p-4 card-hover h-full",children:u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-[12px] text-muted mb-1",children:t}),u.jsx("div",{className:"text-2xl font-bold tracking-tight",children:n}),r&&u.jsx("div",{className:"text-[12px] text-muted mt-1",children:r})]}),e&&u.jsx("div",{className:`w-9 h-9 rounded-lg flex items-center justify-center ${c[l]||c.accent}`,children:u.jsx(e,{className:"w-4.5 h-4.5 w-[18px] h-[18px]"})})]})});return o?u.jsx("a",{href:o,className:"block",children:d}):d}const O8={primary:"bg-accent text-bg hover:bg-accent/90 font-semibold",secondary:"bg-card border border-border text-text hover:bg-card-hover",danger:"bg-red/15 text-red hover:bg-red/25",ghost:"text-muted hover:text-text hover:bg-card"};function pe({variant:e="primary",size:t="md",loading:n,disabled:r,children:l,className:o="",...c}){const d={sm:"px-2.5 py-1 text-[12px]",md:"px-3.5 py-2 text-[13px]",lg:"px-5 py-2.5 text-[14px]"};return u.jsxs("button",{disabled:r||n,className:`inline-flex items-center justify-center gap-1.5 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${O8[e]} ${d[t]} ${o}`,...c,children:[n&&u.jsx(ZM,{className:"w-3.5 h-3.5 animate-spin"}),l]})}function te({label:e,error:t,children:n,className:r=""}){return u.jsxs("label",{className:`block ${r}`,children:[e&&u.jsx("span",{className:"block text-[12px] text-muted mb-1",children:e}),n,t&&u.jsx("span",{className:"block text-[12px] text-red mt-1",children:t})]})}const X="w-full bg-bg-soft border border-border rounded-lg px-3 py-2 text-[13px] placeholder:text-muted focus:outline-none focus:border-accent/60 transition-colors";function _t({open:e,onClose:t,title:n,children:r,wide:l}){return T.useEffect(()=>{if(!e)return;const o=c=>c.key==="Escape"&&(t==null?void 0:t());return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,t]),e?u.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[u.jsx("div",{className:"absolute inset-0 bg-black/70",onClick:t}),u.jsxs("div",{className:`relative bg-card border border-border rounded-xl w-full ${l?"max-w-3xl":"max-w-lg"} max-h-[90vh] overflow-y-auto fade-in`,children:[u.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border-soft sticky top-0 bg-card z-10",children:[u.jsx("h2",{className:"text-[15px] font-semibold",children:n}),u.jsx("button",{onClick:t,className:"p-1.5 rounded-md text-muted hover:text-text hover:bg-bg-soft",children:u.jsx(T0,{className:"w-4 h-4"})})]}),u.jsx("div",{className:"p-5",children:r})]})]}):null}function Ze({text:e="Laden..."}){return u.jsxs("div",{className:"flex items-center justify-center gap-2 py-12 text-muted",children:[u.jsx(ZM,{className:"w-5 h-5 animate-spin"}),u.jsx("span",{className:"text-[13px]",children:e})]})}function Ar({icon:e,title:t,hint:n,action:r}){return u.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e&&u.jsx("div",{className:"w-12 h-12 rounded-xl bg-accent-soft flex items-center justify-center mb-3",children:u.jsx(e,{className:"w-6 h-6 text-accent"})}),u.jsx("div",{className:"text-[14px] font-medium",children:t}),n&&u.jsx("div",{className:"text-[12px] text-muted mt-1 max-w-sm",children:n}),r&&u.jsx("div",{className:"mt-4",children:r})]})}function Oe({error:e,onRetry:t}){return e?u.jsxs("div",{className:"bg-red/10 border border-red/30 rounded-lg px-4 py-3 text-[13px] text-red flex items-center justify-between",children:[u.jsx("span",{children:String(e.message||e)}),t&&u.jsx("button",{onClick:t,className:"underline hover:no-underline ml-3 shrink-0",children:"Opnieuw"})]}):null}function Dt({columns:e,rows:t,keyFn:n,onRowClick:r,empty:l}){return!t||t.length===0?l||u.jsx("div",{className:"text-center text-muted text-[13px] py-8",children:"Geen gegevens"}):u.jsx("div",{className:"overflow-x-auto -mx-4 px-4",children:u.jsxs("table",{className:"w-full text-[13px]",children:[u.jsx("thead",{children:u.jsx("tr",{className:"text-left text-muted border-b border-border-soft",children:e.map((o,c)=>u.jsx("th",{className:`pb-2 pr-4 font-medium text-[12px] ${o.className||""}`,children:o.label},c))})}),u.jsx("tbody",{children:t.map((o,c)=>u.jsx("tr",{className:`border-b border-border-soft/50 table-row-hover ${r?"cursor-pointer":""}`,onClick:r?()=>r(o):void 0,children:e.map((d,h)=>u.jsx("td",{className:`py-2.5 pr-4 ${d.tdClassName||""}`,children:d.render?d.render(o):o[d.key]},h))},n?n(o):c))})]})})}function A8(){var j,S;const{user:e,login:t}=w0(),n=mr(),r=Sn(),[l,o]=T.useState(""),[c,d]=T.useState(""),[h,p]=T.useState(null),[v,m]=T.useState(!1);if(e){const _=((S=(j=r.state)==null?void 0:j.from)==null?void 0:S.pathname)||"/";return u.jsx(qM,{to:_,replace:!0})}const g=async _=>{_.preventDefault(),p(null),m(!0);try{await t(l,c),n("/",{replace:!0})}catch(x){p(x.message||"Inloggen mislukt")}finally{m(!1)}};return u.jsx("div",{className:"min-h-full flex items-center justify-center p-4 bg-bg",children:u.jsxs("div",{className:"w-full max-w-sm",children:[u.jsxs("div",{className:"flex flex-col items-center mb-8",children:[u.jsx("div",{className:"w-14 h-14 rounded-2xl bg-accent-soft flex items-center justify-center glow-accent mb-4",children:u.jsx(Nd,{className:"w-7 h-7 text-accent"})}),u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Mek-Tech"}),u.jsx("p",{className:"text-[13px] text-muted mt-1",children:"AI Consultancy & Data Engineering"})]}),u.jsxs("form",{onSubmit:g,className:"bg-card border border-border-soft rounded-xl p-6 space-y-4",children:[h&&u.jsx("div",{className:"bg-red/10 border border-red/30 rounded-lg px-3 py-2 text-[13px] text-red",children:h}),u.jsx(te,{label:"Gebruikersnaam",children:u.jsx("input",{className:X,value:l,onChange:_=>o(_.target.value),autoComplete:"username",autoFocus:!0,required:!0})}),u.jsx(te,{label:"Wachtwoord",children:u.jsx("input",{type:"password",className:X,value:c,onChange:_=>d(_.target.value),autoComplete:"current-password",required:!0})}),u.jsx(pe,{type:"submit",loading:v,className:"w-full",size:"lg",children:"Inloggen"})]}),u.jsx("p",{className:"text-center text-[11px] text-muted mt-6",children:"Mek-Tech v3.0 — React Edition"})]})})}function t3(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=t3(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qe(){for(var e,t,n=0,r="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=t3(e))&&(r&&(r+=" "),r+=t);return r}var Dm,r2;function wn(){if(r2)return Dm;r2=1;var e=Array.isArray;return Dm=e,Dm}var $m,a2;function n3(){if(a2)return $m;a2=1;var e=typeof Zc=="object"&&Zc&&Zc.Object===Object&&Zc;return $m=e,$m}var qm,i2;function Nr(){if(i2)return qm;i2=1;var e=n3(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return qm=n,qm}var zm,l2;function wu(){if(l2)return zm;l2=1;var e=Nr(),t=e.Symbol;return zm=t,zm}var Lm,o2;function N8(){if(o2)return Lm;o2=1;var e=wu(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,l=e?e.toStringTag:void 0;function o(c){var d=n.call(c,l),h=c[l];try{c[l]=void 0;var p=!0}catch{}var v=r.call(c);return p&&(d?c[l]=h:delete c[l]),v}return Lm=o,Lm}var Bm,s2;function E8(){if(s2)return Bm;s2=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Bm=n,Bm}var Um,u2;function la(){if(u2)return Um;u2=1;var e=wu(),t=N8(),n=E8(),r="[object Null]",l="[object Undefined]",o=e?e.toStringTag:void 0;function c(d){return d==null?d===void 0?l:r:o&&o in Object(d)?t(d):n(d)}return Um=c,Um}var Im,c2;function oa(){if(c2)return Im;c2=1;function e(t){return t!=null&&typeof t=="object"}return Im=e,Im}var Hm,f2;function fo(){if(f2)return Hm;f2=1;var e=la(),t=oa(),n="[object Symbol]";function r(l){return typeof l=="symbol"||t(l)&&e(l)==n}return Hm=r,Hm}var Gm,d2;function M0(){if(d2)return Gm;d2=1;var e=wn(),t=fo(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function l(o,c){if(e(o))return!1;var d=typeof o;return d=="number"||d=="symbol"||d=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||c!=null&&o in Object(c)}return Gm=l,Gm}var Ym,h2;function Ya(){if(h2)return Ym;h2=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Ym=e,Ym}var Vm,p2;function k0(){if(p2)return Vm;p2=1;var e=la(),t=Ya(),n="[object AsyncFunction]",r="[object Function]",l="[object GeneratorFunction]",o="[object Proxy]";function c(d){if(!t(d))return!1;var h=e(d);return h==r||h==l||h==n||h==o}return Vm=c,Vm}var Fm,m2;function T8(){if(m2)return Fm;m2=1;var e=Nr(),t=e["__core-js_shared__"];return Fm=t,Fm}var Km,v2;function C8(){if(v2)return Km;v2=1;var e=T8(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Km=n,Km}var Xm,y2;function r3(){if(y2)return Xm;y2=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Xm=n,Xm}var Zm,g2;function M8(){if(g2)return Zm;g2=1;var e=k0(),t=C8(),n=Ya(),r=r3(),l=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,h=c.toString,p=d.hasOwnProperty,v=RegExp("^"+h.call(p).replace(l,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||t(g))return!1;var j=e(g)?v:o;return j.test(r(g))}return Zm=m,Zm}var Wm,b2;function k8(){if(b2)return Wm;b2=1;function e(t,n){return t==null?void 0:t[n]}return Wm=e,Wm}var Qm,x2;function Di(){if(x2)return Qm;x2=1;var e=M8(),t=k8();function n(r,l){var o=t(r,l);return e(o)?o:void 0}return Qm=n,Qm}var Jm,j2;function Td(){if(j2)return Jm;j2=1;var e=Di(),t=e(Object,"create");return Jm=t,Jm}var ev,_2;function R8(){if(_2)return ev;_2=1;var e=Td();function t(){this.__data__=e?e(null):{},this.size=0}return ev=t,ev}var tv,S2;function P8(){if(S2)return tv;S2=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return tv=e,tv}var nv,w2;function D8(){if(w2)return nv;w2=1;var e=Td(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function l(o){var c=this.__data__;if(e){var d=c[o];return d===t?void 0:d}return r.call(c,o)?c[o]:void 0}return nv=l,nv}var rv,O2;function $8(){if(O2)return rv;O2=1;var e=Td(),t=Object.prototype,n=t.hasOwnProperty;function r(l){var o=this.__data__;return e?o[l]!==void 0:n.call(o,l)}return rv=r,rv}var av,A2;function q8(){if(A2)return av;A2=1;var e=Td(),t="__lodash_hash_undefined__";function n(r,l){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&l===void 0?t:l,this}return av=n,av}var iv,N2;function z8(){if(N2)return iv;N2=1;var e=R8(),t=P8(),n=D8(),r=$8(),l=q8();function o(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var p=c[d];this.set(p[0],p[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=l,iv=o,iv}var lv,E2;function L8(){if(E2)return lv;E2=1;function e(){this.__data__=[],this.size=0}return lv=e,lv}var ov,T2;function R0(){if(T2)return ov;T2=1;function e(t,n){return t===n||t!==t&&n!==n}return ov=e,ov}var sv,C2;function Cd(){if(C2)return sv;C2=1;var e=R0();function t(n,r){for(var l=n.length;l--;)if(e(n[l][0],r))return l;return-1}return sv=t,sv}var uv,M2;function B8(){if(M2)return uv;M2=1;var e=Cd(),t=Array.prototype,n=t.splice;function r(l){var o=this.__data__,c=e(o,l);if(c<0)return!1;var d=o.length-1;return c==d?o.pop():n.call(o,c,1),--this.size,!0}return uv=r,uv}var cv,k2;function U8(){if(k2)return cv;k2=1;var e=Cd();function t(n){var r=this.__data__,l=e(r,n);return l<0?void 0:r[l][1]}return cv=t,cv}var fv,R2;function I8(){if(R2)return fv;R2=1;var e=Cd();function t(n){return e(this.__data__,n)>-1}return fv=t,fv}var dv,P2;function H8(){if(P2)return dv;P2=1;var e=Cd();function t(n,r){var l=this.__data__,o=e(l,n);return o<0?(++this.size,l.push([n,r])):l[o][1]=r,this}return dv=t,dv}var hv,D2;function Md(){if(D2)return hv;D2=1;var e=L8(),t=B8(),n=U8(),r=I8(),l=H8();function o(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var p=c[d];this.set(p[0],p[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=l,hv=o,hv}var pv,$2;function P0(){if($2)return pv;$2=1;var e=Di(),t=Nr(),n=e(t,"Map");return pv=n,pv}var mv,q2;function G8(){if(q2)return mv;q2=1;var e=z8(),t=Md(),n=P0();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return mv=r,mv}var vv,z2;function Y8(){if(z2)return vv;z2=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return vv=e,vv}var yv,L2;function kd(){if(L2)return yv;L2=1;var e=Y8();function t(n,r){var l=n.__data__;return e(r)?l[typeof r=="string"?"string":"hash"]:l.map}return yv=t,yv}var gv,B2;function V8(){if(B2)return gv;B2=1;var e=kd();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return gv=t,gv}var bv,U2;function F8(){if(U2)return bv;U2=1;var e=kd();function t(n){return e(this,n).get(n)}return bv=t,bv}var xv,I2;function K8(){if(I2)return xv;I2=1;var e=kd();function t(n){return e(this,n).has(n)}return xv=t,xv}var jv,H2;function X8(){if(H2)return jv;H2=1;var e=kd();function t(n,r){var l=e(this,n),o=l.size;return l.set(n,r),this.size+=l.size==o?0:1,this}return jv=t,jv}var _v,G2;function D0(){if(G2)return _v;G2=1;var e=G8(),t=V8(),n=F8(),r=K8(),l=X8();function o(c){var d=-1,h=c==null?0:c.length;for(this.clear();++d<h;){var p=c[d];this.set(p[0],p[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=l,_v=o,_v}var Sv,Y2;function a3(){if(Y2)return Sv;Y2=1;var e=D0(),t="Expected a function";function n(r,l){if(typeof r!="function"||l!=null&&typeof l!="function")throw new TypeError(t);var o=function(){var c=arguments,d=l?l.apply(this,c):c[0],h=o.cache;if(h.has(d))return h.get(d);var p=r.apply(this,c);return o.cache=h.set(d,p)||h,p};return o.cache=new(n.Cache||e),o}return n.Cache=e,Sv=n,Sv}var wv,V2;function Z8(){if(V2)return wv;V2=1;var e=a3(),t=500;function n(r){var l=e(r,function(c){return o.size===t&&o.clear(),c}),o=l.cache;return l}return wv=n,wv}var Ov,F2;function W8(){if(F2)return Ov;F2=1;var e=Z8(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(l){var o=[];return l.charCodeAt(0)===46&&o.push(""),l.replace(t,function(c,d,h,p){o.push(h?p.replace(n,"$1"):d||c)}),o});return Ov=r,Ov}var Av,K2;function $0(){if(K2)return Av;K2=1;function e(t,n){for(var r=-1,l=t==null?0:t.length,o=Array(l);++r<l;)o[r]=n(t[r],r,t);return o}return Av=e,Av}var Nv,X2;function Q8(){if(X2)return Nv;X2=1;var e=wu(),t=$0(),n=wn(),r=fo(),l=e?e.prototype:void 0,o=l?l.toString:void 0;function c(d){if(typeof d=="string")return d;if(n(d))return t(d,c)+"";if(r(d))return o?o.call(d):"";var h=d+"";return h=="0"&&1/d==-1/0?"-0":h}return Nv=c,Nv}var Ev,Z2;function i3(){if(Z2)return Ev;Z2=1;var e=Q8();function t(n){return n==null?"":e(n)}return Ev=t,Ev}var Tv,W2;function l3(){if(W2)return Tv;W2=1;var e=wn(),t=M0(),n=W8(),r=i3();function l(o,c){return e(o)?o:t(o,c)?[o]:n(r(o))}return Tv=l,Tv}var Cv,Q2;function Rd(){if(Q2)return Cv;Q2=1;var e=fo();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Cv=t,Cv}var Mv,J2;function q0(){if(J2)return Mv;J2=1;var e=l3(),t=Rd();function n(r,l){l=e(l,r);for(var o=0,c=l.length;r!=null&&o<c;)r=r[t(l[o++])];return o&&o==c?r:void 0}return Mv=n,Mv}var kv,eO;function o3(){if(eO)return kv;eO=1;var e=q0();function t(n,r,l){var o=n==null?void 0:e(n,r);return o===void 0?l:o}return kv=t,kv}var J8=o3();const qn=rt(J8);var Rv,tO;function eq(){if(tO)return Rv;tO=1;function e(t){return t==null}return Rv=e,Rv}var tq=eq();const ze=rt(tq);var Pv,nO;function nq(){if(nO)return Pv;nO=1;var e=la(),t=wn(),n=oa(),r="[object String]";function l(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return Pv=l,Pv}var rq=nq();const Ni=rt(rq);var aq=k0();const ke=rt(aq);var iq=Ya();const ho=rt(iq);var Dv={exports:{}},We={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var rO;function lq(){if(rO)return We;rO=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.server_context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),S;S=Symbol.for("react.module.reference");function _(x){if(typeof x=="object"&&x!==null){var O=x.$$typeof;switch(O){case e:switch(x=x.type,x){case n:case l:case r:case p:case v:return x;default:switch(x=x&&x.$$typeof,x){case d:case c:case h:case g:case m:case o:return x;default:return O}}case t:return O}}}return We.ContextConsumer=c,We.ContextProvider=o,We.Element=e,We.ForwardRef=h,We.Fragment=n,We.Lazy=g,We.Memo=m,We.Portal=t,We.Profiler=l,We.StrictMode=r,We.Suspense=p,We.SuspenseList=v,We.isAsyncMode=function(){return!1},We.isConcurrentMode=function(){return!1},We.isContextConsumer=function(x){return _(x)===c},We.isContextProvider=function(x){return _(x)===o},We.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},We.isForwardRef=function(x){return _(x)===h},We.isFragment=function(x){return _(x)===n},We.isLazy=function(x){return _(x)===g},We.isMemo=function(x){return _(x)===m},We.isPortal=function(x){return _(x)===t},We.isProfiler=function(x){return _(x)===l},We.isStrictMode=function(x){return _(x)===r},We.isSuspense=function(x){return _(x)===p},We.isSuspenseList=function(x){return _(x)===v},We.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===l||x===r||x===p||x===v||x===j||typeof x=="object"&&x!==null&&(x.$$typeof===g||x.$$typeof===m||x.$$typeof===o||x.$$typeof===c||x.$$typeof===h||x.$$typeof===S||x.getModuleId!==void 0)},We.typeOf=_,We}var aO;function oq(){return aO||(aO=1,Dv.exports=lq()),Dv.exports}var sq=oq(),$v,iO;function s3(){if(iO)return $v;iO=1;var e=la(),t=oa(),n="[object Number]";function r(l){return typeof l=="number"||t(l)&&e(l)==n}return $v=r,$v}var qv,lO;function uq(){if(lO)return qv;lO=1;var e=s3();function t(n){return e(n)&&n!=+n}return qv=t,qv}var cq=uq();const Ou=rt(cq);var fq=s3();const dq=rt(fq);var cn=function(t){return t===0?0:t>0?1:-1},xi=function(t){return Ni(t)&&t.indexOf("%")===t.length-1},ve=function(t){return dq(t)&&!Ou(t)},hq=function(t){return ze(t)},It=function(t){return ve(t)||Ni(t)},pq=0,Au=function(t){var n=++pq;return"".concat(t||"").concat(n)},fn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ve(t)&&!Ni(t))return r;var o;if(xi(t)){var c=t.indexOf("%");o=n*parseFloat(t.slice(0,c))/100}else o=+t;return Ou(o)&&(o=r),l&&o>n&&(o=n),o},za=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},mq=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},l=0;l<n;l++)if(!r[t[l]])r[t[l]]=!0;else return!0;return!1},$a=function(t,n){return ve(t)&&ve(n)?function(r){return t+r*(n-t)}:function(){return n}};function Kb(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):qn(r,t))===n})}var vq=function(t,n){return ve(t)&&ve(n)?t-n:Ni(t)&&Ni(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Rl(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Xb(e){"@babel/helpers - typeof";return Xb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xb(e)}var yq=["viewBox","children"],gq=["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"],oO=["points","pathLength"],zv={svg:yq,polygon:oO,polyline:oO},z0=["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"],_f=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(T.isValidElement(t)&&(r=t.props),!ho(r))return null;var l={};return Object.keys(r).forEach(function(o){z0.includes(o)&&(l[o]=n||function(c){return r[o](r,c)})}),l},bq=function(t,n,r){return function(l){return t(n,r,l),null}},Ei=function(t,n,r){if(!ho(t)||Xb(t)!=="object")return null;var l=null;return Object.keys(t).forEach(function(o){var c=t[o];z0.includes(o)&&typeof c=="function"&&(l||(l={}),l[o]=bq(c,n,r))}),l},xq=["children"],jq=["children"];function sO(e,t){if(e==null)return{};var n=_q(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _q(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var uO={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Jr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},cO=null,Lv=null,L0=function e(t){if(t===cO&&Array.isArray(Lv))return Lv;var n=[];return T.Children.forEach(t,function(r){ze(r)||(sq.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Lv=n,cO=t,n};function er(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(l){return Jr(l)}):r=[Jr(t)],L0(e).forEach(function(l){var o=qn(l,"type.displayName")||qn(l,"type.name");r.indexOf(o)!==-1&&n.push(l)}),n}function Dn(e,t){var n=er(e,t);return n&&n[0]}var fO=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,l=n.height;return!(!ve(r)||r<=0||!ve(l)||l<=0)},Sq=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],wq=function(t){return t&&t.type&&Ni(t.type)&&Sq.indexOf(t.type)>=0},Oq=function(t,n,r,l){var o,c=(o=zv==null?void 0:zv[l])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!ke(t)&&(l&&c.includes(n)||gq.includes(n))||r&&z0.includes(n)},Ce=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var l=t;if(T.isValidElement(t)&&(l=t.props),!ho(l))return null;var o={};return Object.keys(l).forEach(function(c){var d;Oq((d=l)===null||d===void 0?void 0:d[c],c,n,r)&&(o[c]=l[c])}),o},Zb=function e(t,n){if(t===n)return!0;var r=T.Children.count(t);if(r!==T.Children.count(n))return!1;if(r===0)return!0;if(r===1)return dO(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var l=0;l<r;l++){var o=t[l],c=n[l];if(Array.isArray(o)||Array.isArray(c)){if(!e(o,c))return!1}else if(!dO(o,c))return!1}return!0},dO=function(t,n){if(ze(t)&&ze(n))return!0;if(!ze(t)&&!ze(n)){var r=t.props||{},l=r.children,o=sO(r,xq),c=n.props||{},d=c.children,h=sO(c,jq);return l&&d?Rl(o,h)&&Zb(l,d):!l&&!d?Rl(o,h):!1}return!1},hO=function(t,n){var r=[],l={};return L0(t).forEach(function(o,c){if(wq(o))r.push(o);else if(o){var d=Jr(o.type),h=n[d]||{},p=h.handler,v=h.once;if(p&&(!v||!l[d])){var m=p(o,d,c);r.push(m),l[d]=!0}}}),r},Aq=function(t){var n=t&&t.type;return n&&uO[n]?uO[n]:null},Nq=function(t,n){return L0(n).indexOf(t)},Eq=["children","width","height","viewBox","className","style","title","desc"];function Wb(){return Wb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wb.apply(this,arguments)}function Tq(e,t){if(e==null)return{};var n=Cq(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Qb(e){var t=e.children,n=e.width,r=e.height,l=e.viewBox,o=e.className,c=e.style,d=e.title,h=e.desc,p=Tq(e,Eq),v=l||{width:n,height:r,x:0,y:0},m=qe("recharts-surface",o);return Y.createElement("svg",Wb({},Ce(p,!0,"svg"),{className:m,width:n,height:r,style:c,viewBox:"".concat(v.x," ").concat(v.y," ").concat(v.width," ").concat(v.height)}),Y.createElement("title",null,d),Y.createElement("desc",null,h),t)}var Mq=["children","className"];function Jb(){return Jb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jb.apply(this,arguments)}function kq(e,t){if(e==null)return{};var n=Rq(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var tt=Y.forwardRef(function(e,t){var n=e.children,r=e.className,l=kq(e,Mq),o=qe("recharts-layer",r);return Y.createElement("g",Jb({className:o},Ce(l,!0),{ref:t}),n)}),hr=function(t,n){for(var r=arguments.length,l=new Array(r>2?r-2:0),o=2;o<r;o++)l[o-2]=arguments[o]},Bv,pO;function Pq(){if(pO)return Bv;pO=1;function e(t,n,r){var l=-1,o=t.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var c=Array(o);++l<o;)c[l]=t[l+n];return c}return Bv=e,Bv}var Uv,mO;function Dq(){if(mO)return Uv;mO=1;var e=Pq();function t(n,r,l){var o=n.length;return l=l===void 0?o:l,!r&&l>=o?n:e(n,r,l)}return Uv=t,Uv}var Iv,vO;function u3(){if(vO)return Iv;vO=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",l=t+n+r,o="\\ufe0e\\ufe0f",c="\\u200d",d=RegExp("["+c+e+l+o+"]");function h(p){return d.test(p)}return Iv=h,Iv}var Hv,yO;function $q(){if(yO)return Hv;yO=1;function e(t){return t.split("")}return Hv=e,Hv}var Gv,gO;function qq(){if(gO)return Gv;gO=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",l=t+n+r,o="\\ufe0e\\ufe0f",c="["+e+"]",d="["+l+"]",h="\\ud83c[\\udffb-\\udfff]",p="(?:"+d+"|"+h+")",v="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",j="\\u200d",S=p+"?",_="["+o+"]?",x="(?:"+j+"(?:"+[v,m,g].join("|")+")"+_+S+")*",O=_+S+x,w="(?:"+[v+d+"?",d,m,g,c].join("|")+")",E=RegExp(h+"(?="+h+")|"+w+O,"g");function M(A){return A.match(E)||[]}return Gv=M,Gv}var Yv,bO;function zq(){if(bO)return Yv;bO=1;var e=$q(),t=u3(),n=qq();function r(l){return t(l)?n(l):e(l)}return Yv=r,Yv}var Vv,xO;function Lq(){if(xO)return Vv;xO=1;var e=Dq(),t=u3(),n=zq(),r=i3();function l(o){return function(c){c=r(c);var d=t(c)?n(c):void 0,h=d?d[0]:c.charAt(0),p=d?e(d,1).join(""):c.slice(1);return h[o]()+p}}return Vv=l,Vv}var Fv,jO;function Bq(){if(jO)return Fv;jO=1;var e=Lq(),t=e("toUpperCase");return Fv=t,Fv}var Uq=Bq();const Pd=rt(Uq);function pt(e){return function(){return e}}const c3=Math.cos,Sf=Math.sin,vr=Math.sqrt,wf=Math.PI,Dd=2*wf,ex=Math.PI,tx=2*ex,yi=1e-6,Iq=tx-yi;function f3(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Hq(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return f3;const n=10**t;return function(r){this._+=r[0];for(let l=1,o=r.length;l<o;++l)this._+=Math.round(arguments[l]*n)/n+r[l]}}class Gq{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?f3:Hq(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,l){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+l}`}bezierCurveTo(t,n,r,l,o,c){this._append`C${+t},${+n},${+r},${+l},${this._x1=+o},${this._y1=+c}`}arcTo(t,n,r,l,o){if(t=+t,n=+n,r=+r,l=+l,o=+o,o<0)throw new Error(`negative radius: ${o}`);let c=this._x1,d=this._y1,h=r-t,p=l-n,v=c-t,m=d-n,g=v*v+m*m;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>yi)if(!(Math.abs(m*h-p*v)>yi)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let j=r-c,S=l-d,_=h*h+p*p,x=j*j+S*S,O=Math.sqrt(_),w=Math.sqrt(g),E=o*Math.tan((ex-Math.acos((_+g-x)/(2*O*w)))/2),M=E/w,A=E/O;Math.abs(M-1)>yi&&this._append`L${t+M*v},${n+M*m}`,this._append`A${o},${o},0,0,${+(m*j>v*S)},${this._x1=t+A*h},${this._y1=n+A*p}`}}arc(t,n,r,l,o,c){if(t=+t,n=+n,r=+r,c=!!c,r<0)throw new Error(`negative radius: ${r}`);let d=r*Math.cos(l),h=r*Math.sin(l),p=t+d,v=n+h,m=1^c,g=c?l-o:o-l;this._x1===null?this._append`M${p},${v}`:(Math.abs(this._x1-p)>yi||Math.abs(this._y1-v)>yi)&&this._append`L${p},${v}`,r&&(g<0&&(g=g%tx+tx),g>Iq?this._append`A${r},${r},0,1,${m},${t-d},${n-h}A${r},${r},0,1,${m},${this._x1=p},${this._y1=v}`:g>yi&&this._append`A${r},${r},0,${+(g>=ex)},${m},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,l){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+l}h${-r}Z`}toString(){return this._}}function B0(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 Gq(t)}function U0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function d3(e){this._context=e}d3.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 $d(e){return new d3(e)}function h3(e){return e[0]}function p3(e){return e[1]}function m3(e,t){var n=pt(!0),r=null,l=$d,o=null,c=B0(d);e=typeof e=="function"?e:e===void 0?h3:pt(e),t=typeof t=="function"?t:t===void 0?p3:pt(t);function d(h){var p,v=(h=U0(h)).length,m,g=!1,j;for(r==null&&(o=l(j=c())),p=0;p<=v;++p)!(p<v&&n(m=h[p],p,h))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(m,p,h),+t(m,p,h));if(j)return o=null,j+""||null}return d.x=function(h){return arguments.length?(e=typeof h=="function"?h:pt(+h),d):e},d.y=function(h){return arguments.length?(t=typeof h=="function"?h:pt(+h),d):t},d.defined=function(h){return arguments.length?(n=typeof h=="function"?h:pt(!!h),d):n},d.curve=function(h){return arguments.length?(l=h,r!=null&&(o=l(r)),d):l},d.context=function(h){return arguments.length?(h==null?r=o=null:o=l(r=h),d):r},d}function Jc(e,t,n){var r=null,l=pt(!0),o=null,c=$d,d=null,h=B0(p);e=typeof e=="function"?e:e===void 0?h3:pt(+e),t=typeof t=="function"?t:pt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?p3:pt(+n);function p(m){var g,j,S,_=(m=U0(m)).length,x,O=!1,w,E=new Array(_),M=new Array(_);for(o==null&&(d=c(w=h())),g=0;g<=_;++g){if(!(g<_&&l(x=m[g],g,m))===O)if(O=!O)j=g,d.areaStart(),d.lineStart();else{for(d.lineEnd(),d.lineStart(),S=g-1;S>=j;--S)d.point(E[S],M[S]);d.lineEnd(),d.areaEnd()}O&&(E[g]=+e(x,g,m),M[g]=+t(x,g,m),d.point(r?+r(x,g,m):E[g],n?+n(x,g,m):M[g]))}if(w)return d=null,w+""||null}function v(){return m3().defined(l).curve(c).context(o)}return p.x=function(m){return arguments.length?(e=typeof m=="function"?m:pt(+m),r=null,p):e},p.x0=function(m){return arguments.length?(e=typeof m=="function"?m:pt(+m),p):e},p.x1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:pt(+m),p):r},p.y=function(m){return arguments.length?(t=typeof m=="function"?m:pt(+m),n=null,p):t},p.y0=function(m){return arguments.length?(t=typeof m=="function"?m:pt(+m),p):t},p.y1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:pt(+m),p):n},p.lineX0=p.lineY0=function(){return v().x(e).y(t)},p.lineY1=function(){return v().x(e).y(n)},p.lineX1=function(){return v().x(r).y(t)},p.defined=function(m){return arguments.length?(l=typeof m=="function"?m:pt(!!m),p):l},p.curve=function(m){return arguments.length?(c=m,o!=null&&(d=c(o)),p):c},p.context=function(m){return arguments.length?(m==null?o=d=null:d=c(o=m),p):o},p}class v3{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 Yq(e){return new v3(e,!0)}function Vq(e){return new v3(e,!1)}const I0={draw(e,t){const n=vr(t/wf);e.moveTo(n,0),e.arc(0,0,n,0,Dd)}},Fq={draw(e,t){const n=vr(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()}},y3=vr(1/3),Kq=y3*2,Xq={draw(e,t){const n=vr(t/Kq),r=n*y3;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Zq={draw(e,t){const n=vr(t),r=-n/2;e.rect(r,r,n,n)}},Wq=.8908130915292852,g3=Sf(wf/10)/Sf(7*wf/10),Qq=Sf(Dd/10)*g3,Jq=-c3(Dd/10)*g3,ez={draw(e,t){const n=vr(t*Wq),r=Qq*n,l=Jq*n;e.moveTo(0,-n),e.lineTo(r,l);for(let o=1;o<5;++o){const c=Dd*o/5,d=c3(c),h=Sf(c);e.lineTo(h*n,-d*n),e.lineTo(d*r-h*l,h*r+d*l)}e.closePath()}},Kv=vr(3),tz={draw(e,t){const n=-vr(t/(Kv*3));e.moveTo(0,n*2),e.lineTo(-Kv*n,-n),e.lineTo(Kv*n,-n),e.closePath()}},Xn=-.5,Zn=vr(3)/2,nx=1/vr(12),nz=(nx/2+1)*3,rz={draw(e,t){const n=vr(t/nz),r=n/2,l=n*nx,o=r,c=n*nx+n,d=-o,h=c;e.moveTo(r,l),e.lineTo(o,c),e.lineTo(d,h),e.lineTo(Xn*r-Zn*l,Zn*r+Xn*l),e.lineTo(Xn*o-Zn*c,Zn*o+Xn*c),e.lineTo(Xn*d-Zn*h,Zn*d+Xn*h),e.lineTo(Xn*r+Zn*l,Xn*l-Zn*r),e.lineTo(Xn*o+Zn*c,Xn*c-Zn*o),e.lineTo(Xn*d+Zn*h,Xn*h-Zn*d),e.closePath()}};function az(e,t){let n=null,r=B0(l);e=typeof e=="function"?e:pt(e||I0),t=typeof t=="function"?t:pt(t===void 0?64:+t);function l(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return l.type=function(o){return arguments.length?(e=typeof o=="function"?o:pt(o),l):e},l.size=function(o){return arguments.length?(t=typeof o=="function"?o:pt(+o),l):t},l.context=function(o){return arguments.length?(n=o??null,l):n},l}function Of(){}function Af(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 b3(e){this._context=e}b3.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:Af(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:Af(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iz(e){return new b3(e)}function x3(e){this._context=e}x3.prototype={areaStart:Of,areaEnd:Of,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:Af(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lz(e){return new x3(e)}function j3(e){this._context=e}j3.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:Af(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oz(e){return new j3(e)}function _3(e){this._context=e}_3.prototype={areaStart:Of,areaEnd:Of,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 sz(e){return new _3(e)}function _O(e){return e<0?-1:1}function SO(e,t,n){var r=e._x1-e._x0,l=t-e._x1,o=(e._y1-e._y0)/(r||l<0&&-0),c=(n-e._y1)/(l||r<0&&-0),d=(o*l+c*r)/(r+l);return(_O(o)+_O(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(d))||0}function wO(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Xv(e,t,n){var r=e._x0,l=e._y0,o=e._x1,c=e._y1,d=(o-r)/3;e._context.bezierCurveTo(r+d,l+d*t,o-d,c-d*n,o,c)}function Nf(e){this._context=e}Nf.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:Xv(this,this._t0,wO(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,Xv(this,wO(this,n=SO(this,e,t)),n);break;default:Xv(this,this._t0,n=SO(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function S3(e){this._context=new w3(e)}(S3.prototype=Object.create(Nf.prototype)).point=function(e,t){Nf.prototype.point.call(this,t,e)};function w3(e){this._context=e}w3.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,l,o){this._context.bezierCurveTo(t,e,r,n,o,l)}};function uz(e){return new Nf(e)}function cz(e){return new S3(e)}function O3(e){this._context=e}O3.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=OO(e),l=OO(t),o=0,c=1;c<n;++o,++c)this._context.bezierCurveTo(r[0][o],l[0][o],r[1][o],l[1][o],e[c],t[c]);(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 OO(e){var t,n=e.length-1,r,l=new Array(n),o=new Array(n),c=new Array(n);for(l[0]=0,o[0]=2,c[0]=e[0]+2*e[1],t=1;t<n-1;++t)l[t]=1,o[t]=4,c[t]=4*e[t]+2*e[t+1];for(l[n-1]=2,o[n-1]=7,c[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=l[t]/o[t-1],o[t]-=r,c[t]-=r*c[t-1];for(l[n-1]=c[n-1]/o[n-1],t=n-2;t>=0;--t)l[t]=(c[t]-l[t+1])/o[t];for(o[n-1]=(e[n]+l[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-l[t+1];return[l,o]}function fz(e){return new O3(e)}function qd(e,t){this._context=e,this._t=t}qd.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 dz(e){return new qd(e,.5)}function hz(e){return new qd(e,0)}function pz(e){return new qd(e,1)}function $l(e,t){if((c=e.length)>1)for(var n=1,r,l,o=e[t[0]],c,d=o.length;n<c;++n)for(l=o,o=e[t[n]],r=0;r<d;++r)o[r][1]+=o[r][0]=isNaN(l[r][1])?l[r][0]:l[r][1]}function rx(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function mz(e,t){return e[t]}function vz(e){const t=[];return t.key=e,t}function yz(){var e=pt([]),t=rx,n=$l,r=mz;function l(o){var c=Array.from(e.apply(this,arguments),vz),d,h=c.length,p=-1,v;for(const m of o)for(d=0,++p;d<h;++d)(c[d][p]=[0,+r(m,c[d].key,p,o)]).data=m;for(d=0,v=U0(t(c));d<h;++d)c[v[d]].index=d;return n(c,v),c}return l.keys=function(o){return arguments.length?(e=typeof o=="function"?o:pt(Array.from(o)),l):e},l.value=function(o){return arguments.length?(r=typeof o=="function"?o:pt(+o),l):r},l.order=function(o){return arguments.length?(t=o==null?rx:typeof o=="function"?o:pt(Array.from(o)),l):t},l.offset=function(o){return arguments.length?(n=o??$l,l):n},l}function gz(e,t){if((r=e.length)>0){for(var n,r,l=0,o=e[0].length,c;l<o;++l){for(c=n=0;n<r;++n)c+=e[n][l][1]||0;if(c)for(n=0;n<r;++n)e[n][l][1]/=c}$l(e,t)}}function bz(e,t){if((l=e.length)>0){for(var n=0,r=e[t[0]],l,o=r.length;n<o;++n){for(var c=0,d=0;c<l;++c)d+=e[c][n][1]||0;r[n][1]+=r[n][0]=-d/2}$l(e,t)}}function xz(e,t){if(!(!((c=e.length)>0)||!((o=(l=e[t[0]]).length)>0))){for(var n=0,r=1,l,o,c;r<o;++r){for(var d=0,h=0,p=0;d<c;++d){for(var v=e[t[d]],m=v[r][1]||0,g=v[r-1][1]||0,j=(m-g)/2,S=0;S<d;++S){var _=e[t[S]],x=_[r][1]||0,O=_[r-1][1]||0;j+=x-O}h+=m,p+=j*m}l[r-1][1]+=l[r-1][0]=n,h&&(n-=p/h)}l[r-1][1]+=l[r-1][0]=n,$l(e,t)}}function zs(e){"@babel/helpers - typeof";return zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zs(e)}var jz=["type","size","sizeType"];function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ax.apply(this,arguments)}function AO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function NO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AO(Object(n),!0).forEach(function(r){_z(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _z(e,t,n){return t=Sz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sz(e){var t=wz(e,"string");return zs(t)=="symbol"?t:t+""}function wz(e,t){if(zs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Oz(e,t){if(e==null)return{};var n=Az(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Az(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var A3={symbolCircle:I0,symbolCross:Fq,symbolDiamond:Xq,symbolSquare:Zq,symbolStar:ez,symbolTriangle:tz,symbolWye:rz},Nz=Math.PI/180,Ez=function(t){var n="symbol".concat(Pd(t));return A3[n]||I0},Tz=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var l=18*Nz;return 1.25*t*t*(Math.tan(l)-Math.tan(l*2)*Math.pow(Math.tan(l),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Cz=function(t,n){A3["symbol".concat(Pd(t))]=n},H0=function(t){var n=t.type,r=n===void 0?"circle":n,l=t.size,o=l===void 0?64:l,c=t.sizeType,d=c===void 0?"area":c,h=Oz(t,jz),p=NO(NO({},h),{},{type:r,size:o,sizeType:d}),v=function(){var x=Ez(r),O=az().type(x).size(Tz(o,d,r));return O()},m=p.className,g=p.cx,j=p.cy,S=Ce(p,!0);return g===+g&&j===+j&&o===+o?Y.createElement("path",ax({},S,{className:qe("recharts-symbols",m),transform:"translate(".concat(g,", ").concat(j,")"),d:v()})):null};H0.registerSymbol=Cz;function ql(e){"@babel/helpers - typeof";return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ql(e)}function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ix.apply(this,arguments)}function EO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function Mz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EO(Object(n),!0).forEach(function(r){Ls(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kz(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E3(r.key),r)}}function Pz(e,t,n){return t&&Rz(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dz(e,t,n){return t=Ef(t),$z(e,N3()?Reflect.construct(t,n||[],Ef(e).constructor):t.apply(e,n))}function $z(e,t){if(t&&(ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qz(e)}function qz(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N3=function(){return!!e})()}function Ef(e){return Ef=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ef(e)}function zz(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lx(e,t)}function lx(e,t){return lx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},lx(e,t)}function Ls(e,t,n){return t=E3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E3(e){var t=Lz(e,"string");return ql(t)=="symbol"?t:t+""}function Lz(e,t){if(ql(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wn=32,G0=(function(e){function t(){return kz(this,t),Dz(this,t,arguments)}return zz(t,e),Pz(t,[{key:"renderIcon",value:function(r){var l=this.props.inactiveColor,o=Wn/2,c=Wn/6,d=Wn/3,h=r.inactive?l:r.color;if(r.type==="plainline")return Y.createElement("line",{strokeWidth:4,fill:"none",stroke:h,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:Wn,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return Y.createElement("path",{strokeWidth:4,fill:"none",stroke:h,d:"M0,".concat(o,"h").concat(d,`
            A`).concat(c,",").concat(c,",0,1,1,").concat(2*d,",").concat(o,`
            H`).concat(Wn,"M").concat(2*d,",").concat(o,`
            A`).concat(c,",").concat(c,",0,1,1,").concat(d,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return Y.createElement("path",{stroke:"none",fill:h,d:"M0,".concat(Wn/8,"h").concat(Wn,"v").concat(Wn*3/4,"h").concat(-Wn,"z"),className:"recharts-legend-icon"});if(Y.isValidElement(r.legendIcon)){var p=Mz({},r);return delete p.legendIcon,Y.cloneElement(r.legendIcon,p)}return Y.createElement(H0,{fill:h,cx:o,cy:o,size:Wn,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,l=this.props,o=l.payload,c=l.iconSize,d=l.layout,h=l.formatter,p=l.inactiveColor,v={x:0,y:0,width:Wn,height:Wn},m={display:d==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(j,S){var _=j.formatter||h,x=qe(Ls(Ls({"recharts-legend-item":!0},"legend-item-".concat(S),!0),"inactive",j.inactive));if(j.type==="none")return null;var O=ke(j.value)?null:j.value;hr(!ke(j.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var w=j.inactive?p:j.color;return Y.createElement("li",ix({className:x,style:m,key:"legend-item-".concat(S)},Ei(r.props,j,S)),Y.createElement(Qb,{width:c,height:c,viewBox:v,style:g},r.renderIcon(j)),Y.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},_?_(O,j,S):O))})}},{key:"render",value:function(){var r=this.props,l=r.payload,o=r.layout,c=r.align;if(!l||!l.length)return null;var d={padding:0,margin:0,textAlign:o==="horizontal"?c:"left"};return Y.createElement("ul",{className:"recharts-default-legend",style:d},this.renderItems())}}])})(T.PureComponent);Ls(G0,"displayName","Legend");Ls(G0,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Zv,TO;function Bz(){if(TO)return Zv;TO=1;var e=Md();function t(){this.__data__=new e,this.size=0}return Zv=t,Zv}var Wv,CO;function Uz(){if(CO)return Wv;CO=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Wv=e,Wv}var Qv,MO;function Iz(){if(MO)return Qv;MO=1;function e(t){return this.__data__.get(t)}return Qv=e,Qv}var Jv,kO;function Hz(){if(kO)return Jv;kO=1;function e(t){return this.__data__.has(t)}return Jv=e,Jv}var ey,RO;function Gz(){if(RO)return ey;RO=1;var e=Md(),t=P0(),n=D0(),r=200;function l(o,c){var d=this.__data__;if(d instanceof e){var h=d.__data__;if(!t||h.length<r-1)return h.push([o,c]),this.size=++d.size,this;d=this.__data__=new n(h)}return d.set(o,c),this.size=d.size,this}return ey=l,ey}var ty,PO;function T3(){if(PO)return ty;PO=1;var e=Md(),t=Bz(),n=Uz(),r=Iz(),l=Hz(),o=Gz();function c(d){var h=this.__data__=new e(d);this.size=h.size}return c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=r,c.prototype.has=l,c.prototype.set=o,ty=c,ty}var ny,DO;function Yz(){if(DO)return ny;DO=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return ny=t,ny}var ry,$O;function Vz(){if($O)return ry;$O=1;function e(t){return this.__data__.has(t)}return ry=e,ry}var ay,qO;function C3(){if(qO)return ay;qO=1;var e=D0(),t=Yz(),n=Vz();function r(l){var o=-1,c=l==null?0:l.length;for(this.__data__=new e;++o<c;)this.add(l[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,ay=r,ay}var iy,zO;function M3(){if(zO)return iy;zO=1;function e(t,n){for(var r=-1,l=t==null?0:t.length;++r<l;)if(n(t[r],r,t))return!0;return!1}return iy=e,iy}var ly,LO;function k3(){if(LO)return ly;LO=1;function e(t,n){return t.has(n)}return ly=e,ly}var oy,BO;function R3(){if(BO)return oy;BO=1;var e=C3(),t=M3(),n=k3(),r=1,l=2;function o(c,d,h,p,v,m){var g=h&r,j=c.length,S=d.length;if(j!=S&&!(g&&S>j))return!1;var _=m.get(c),x=m.get(d);if(_&&x)return _==d&&x==c;var O=-1,w=!0,E=h&l?new e:void 0;for(m.set(c,d),m.set(d,c);++O<j;){var M=c[O],A=d[O];if(p)var C=g?p(A,M,O,d,c,m):p(M,A,O,c,d,m);if(C!==void 0){if(C)continue;w=!1;break}if(E){if(!t(d,function(k,z){if(!n(E,z)&&(M===k||v(M,k,h,p,m)))return E.push(z)})){w=!1;break}}else if(!(M===A||v(M,A,h,p,m))){w=!1;break}}return m.delete(c),m.delete(d),w}return oy=o,oy}var sy,UO;function Fz(){if(UO)return sy;UO=1;var e=Nr(),t=e.Uint8Array;return sy=t,sy}var uy,IO;function Kz(){if(IO)return uy;IO=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(l,o){r[++n]=[o,l]}),r}return uy=e,uy}var cy,HO;function Y0(){if(HO)return cy;HO=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(l){r[++n]=l}),r}return cy=e,cy}var fy,GO;function Xz(){if(GO)return fy;GO=1;var e=wu(),t=Fz(),n=R0(),r=R3(),l=Kz(),o=Y0(),c=1,d=2,h="[object Boolean]",p="[object Date]",v="[object Error]",m="[object Map]",g="[object Number]",j="[object RegExp]",S="[object Set]",_="[object String]",x="[object Symbol]",O="[object ArrayBuffer]",w="[object DataView]",E=e?e.prototype:void 0,M=E?E.valueOf:void 0;function A(C,k,z,B,Z,G,H){switch(z){case w:if(C.byteLength!=k.byteLength||C.byteOffset!=k.byteOffset)return!1;C=C.buffer,k=k.buffer;case O:return!(C.byteLength!=k.byteLength||!G(new t(C),new t(k)));case h:case p:case g:return n(+C,+k);case v:return C.name==k.name&&C.message==k.message;case j:case _:return C==k+"";case m:var W=l;case S:var Q=B&c;if(W||(W=o),C.size!=k.size&&!Q)return!1;var D=H.get(C);if(D)return D==k;B|=d,H.set(C,k);var P=r(W(C),W(k),B,Z,G,H);return H.delete(C),P;case x:if(M)return M.call(C)==M.call(k)}return!1}return fy=A,fy}var dy,YO;function P3(){if(YO)return dy;YO=1;function e(t,n){for(var r=-1,l=n.length,o=t.length;++r<l;)t[o+r]=n[r];return t}return dy=e,dy}var hy,VO;function Zz(){if(VO)return hy;VO=1;var e=P3(),t=wn();function n(r,l,o){var c=l(r);return t(r)?c:e(c,o(r))}return hy=n,hy}var py,FO;function Wz(){if(FO)return py;FO=1;function e(t,n){for(var r=-1,l=t==null?0:t.length,o=0,c=[];++r<l;){var d=t[r];n(d,r,t)&&(c[o++]=d)}return c}return py=e,py}var my,KO;function Qz(){if(KO)return my;KO=1;function e(){return[]}return my=e,my}var vy,XO;function Jz(){if(XO)return vy;XO=1;var e=Wz(),t=Qz(),n=Object.prototype,r=n.propertyIsEnumerable,l=Object.getOwnPropertySymbols,o=l?function(c){return c==null?[]:(c=Object(c),e(l(c),function(d){return r.call(c,d)}))}:t;return vy=o,vy}var yy,ZO;function eL(){if(ZO)return yy;ZO=1;function e(t,n){for(var r=-1,l=Array(t);++r<t;)l[r]=n(r);return l}return yy=e,yy}var gy,WO;function tL(){if(WO)return gy;WO=1;var e=la(),t=oa(),n="[object Arguments]";function r(l){return t(l)&&e(l)==n}return gy=r,gy}var by,QO;function V0(){if(QO)return by;QO=1;var e=tL(),t=oa(),n=Object.prototype,r=n.hasOwnProperty,l=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(c){return t(c)&&r.call(c,"callee")&&!l.call(c,"callee")};return by=o,by}var As={exports:{}},xy,JO;function nL(){if(JO)return xy;JO=1;function e(){return!1}return xy=e,xy}As.exports;var eA;function D3(){return eA||(eA=1,(function(e,t){var n=Nr(),r=nL(),l=t&&!t.nodeType&&t,o=l&&!0&&e&&!e.nodeType&&e,c=o&&o.exports===l,d=c?n.Buffer:void 0,h=d?d.isBuffer:void 0,p=h||r;e.exports=p})(As,As.exports)),As.exports}var jy,tA;function F0(){if(tA)return jy;tA=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,l){var o=typeof r;return l=l??e,!!l&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<l}return jy=n,jy}var _y,nA;function K0(){if(nA)return _y;nA=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return _y=t,_y}var Sy,rA;function rL(){if(rA)return Sy;rA=1;var e=la(),t=K0(),n=oa(),r="[object Arguments]",l="[object Array]",o="[object Boolean]",c="[object Date]",d="[object Error]",h="[object Function]",p="[object Map]",v="[object Number]",m="[object Object]",g="[object RegExp]",j="[object Set]",S="[object String]",_="[object WeakMap]",x="[object ArrayBuffer]",O="[object DataView]",w="[object Float32Array]",E="[object Float64Array]",M="[object Int8Array]",A="[object Int16Array]",C="[object Int32Array]",k="[object Uint8Array]",z="[object Uint8ClampedArray]",B="[object Uint16Array]",Z="[object Uint32Array]",G={};G[w]=G[E]=G[M]=G[A]=G[C]=G[k]=G[z]=G[B]=G[Z]=!0,G[r]=G[l]=G[x]=G[o]=G[O]=G[c]=G[d]=G[h]=G[p]=G[v]=G[m]=G[g]=G[j]=G[S]=G[_]=!1;function H(W){return n(W)&&t(W.length)&&!!G[e(W)]}return Sy=H,Sy}var wy,aA;function $3(){if(aA)return wy;aA=1;function e(t){return function(n){return t(n)}}return wy=e,wy}var Ns={exports:{}};Ns.exports;var iA;function aL(){return iA||(iA=1,(function(e,t){var n=n3(),r=t&&!t.nodeType&&t,l=r&&!0&&e&&!e.nodeType&&e,o=l&&l.exports===r,c=o&&n.process,d=(function(){try{var h=l&&l.require&&l.require("util").types;return h||c&&c.binding&&c.binding("util")}catch{}})();e.exports=d})(Ns,Ns.exports)),Ns.exports}var Oy,lA;function q3(){if(lA)return Oy;lA=1;var e=rL(),t=$3(),n=aL(),r=n&&n.isTypedArray,l=r?t(r):e;return Oy=l,Oy}var Ay,oA;function iL(){if(oA)return Ay;oA=1;var e=eL(),t=V0(),n=wn(),r=D3(),l=F0(),o=q3(),c=Object.prototype,d=c.hasOwnProperty;function h(p,v){var m=n(p),g=!m&&t(p),j=!m&&!g&&r(p),S=!m&&!g&&!j&&o(p),_=m||g||j||S,x=_?e(p.length,String):[],O=x.length;for(var w in p)(v||d.call(p,w))&&!(_&&(w=="length"||j&&(w=="offset"||w=="parent")||S&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||l(w,O)))&&x.push(w);return x}return Ay=h,Ay}var Ny,sA;function lL(){if(sA)return Ny;sA=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,l=typeof r=="function"&&r.prototype||e;return n===l}return Ny=t,Ny}var Ey,uA;function z3(){if(uA)return Ey;uA=1;function e(t,n){return function(r){return t(n(r))}}return Ey=e,Ey}var Ty,cA;function oL(){if(cA)return Ty;cA=1;var e=z3(),t=e(Object.keys,Object);return Ty=t,Ty}var Cy,fA;function sL(){if(fA)return Cy;fA=1;var e=lL(),t=oL(),n=Object.prototype,r=n.hasOwnProperty;function l(o){if(!e(o))return t(o);var c=[];for(var d in Object(o))r.call(o,d)&&d!="constructor"&&c.push(d);return c}return Cy=l,Cy}var My,dA;function Nu(){if(dA)return My;dA=1;var e=k0(),t=K0();function n(r){return r!=null&&t(r.length)&&!e(r)}return My=n,My}var ky,hA;function zd(){if(hA)return ky;hA=1;var e=iL(),t=sL(),n=Nu();function r(l){return n(l)?e(l):t(l)}return ky=r,ky}var Ry,pA;function uL(){if(pA)return Ry;pA=1;var e=Zz(),t=Jz(),n=zd();function r(l){return e(l,n,t)}return Ry=r,Ry}var Py,mA;function cL(){if(mA)return Py;mA=1;var e=uL(),t=1,n=Object.prototype,r=n.hasOwnProperty;function l(o,c,d,h,p,v){var m=d&t,g=e(o),j=g.length,S=e(c),_=S.length;if(j!=_&&!m)return!1;for(var x=j;x--;){var O=g[x];if(!(m?O in c:r.call(c,O)))return!1}var w=v.get(o),E=v.get(c);if(w&&E)return w==c&&E==o;var M=!0;v.set(o,c),v.set(c,o);for(var A=m;++x<j;){O=g[x];var C=o[O],k=c[O];if(h)var z=m?h(k,C,O,c,o,v):h(C,k,O,o,c,v);if(!(z===void 0?C===k||p(C,k,d,h,v):z)){M=!1;break}A||(A=O=="constructor")}if(M&&!A){var B=o.constructor,Z=c.constructor;B!=Z&&"constructor"in o&&"constructor"in c&&!(typeof B=="function"&&B instanceof B&&typeof Z=="function"&&Z instanceof Z)&&(M=!1)}return v.delete(o),v.delete(c),M}return Py=l,Py}var Dy,vA;function fL(){if(vA)return Dy;vA=1;var e=Di(),t=Nr(),n=e(t,"DataView");return Dy=n,Dy}var $y,yA;function dL(){if(yA)return $y;yA=1;var e=Di(),t=Nr(),n=e(t,"Promise");return $y=n,$y}var qy,gA;function L3(){if(gA)return qy;gA=1;var e=Di(),t=Nr(),n=e(t,"Set");return qy=n,qy}var zy,bA;function hL(){if(bA)return zy;bA=1;var e=Di(),t=Nr(),n=e(t,"WeakMap");return zy=n,zy}var Ly,xA;function pL(){if(xA)return Ly;xA=1;var e=fL(),t=P0(),n=dL(),r=L3(),l=hL(),o=la(),c=r3(),d="[object Map]",h="[object Object]",p="[object Promise]",v="[object Set]",m="[object WeakMap]",g="[object DataView]",j=c(e),S=c(t),_=c(n),x=c(r),O=c(l),w=o;return(e&&w(new e(new ArrayBuffer(1)))!=g||t&&w(new t)!=d||n&&w(n.resolve())!=p||r&&w(new r)!=v||l&&w(new l)!=m)&&(w=function(E){var M=o(E),A=M==h?E.constructor:void 0,C=A?c(A):"";if(C)switch(C){case j:return g;case S:return d;case _:return p;case x:return v;case O:return m}return M}),Ly=w,Ly}var By,jA;function mL(){if(jA)return By;jA=1;var e=T3(),t=R3(),n=Xz(),r=cL(),l=pL(),o=wn(),c=D3(),d=q3(),h=1,p="[object Arguments]",v="[object Array]",m="[object Object]",g=Object.prototype,j=g.hasOwnProperty;function S(_,x,O,w,E,M){var A=o(_),C=o(x),k=A?v:l(_),z=C?v:l(x);k=k==p?m:k,z=z==p?m:z;var B=k==m,Z=z==m,G=k==z;if(G&&c(_)){if(!c(x))return!1;A=!0,B=!1}if(G&&!B)return M||(M=new e),A||d(_)?t(_,x,O,w,E,M):n(_,x,k,O,w,E,M);if(!(O&h)){var H=B&&j.call(_,"__wrapped__"),W=Z&&j.call(x,"__wrapped__");if(H||W){var Q=H?_.value():_,D=W?x.value():x;return M||(M=new e),E(Q,D,O,w,M)}}return G?(M||(M=new e),r(_,x,O,w,E,M)):!1}return By=S,By}var Uy,_A;function X0(){if(_A)return Uy;_A=1;var e=mL(),t=oa();function n(r,l,o,c,d){return r===l?!0:r==null||l==null||!t(r)&&!t(l)?r!==r&&l!==l:e(r,l,o,c,n,d)}return Uy=n,Uy}var Iy,SA;function vL(){if(SA)return Iy;SA=1;var e=T3(),t=X0(),n=1,r=2;function l(o,c,d,h){var p=d.length,v=p,m=!h;if(o==null)return!v;for(o=Object(o);p--;){var g=d[p];if(m&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++p<v;){g=d[p];var j=g[0],S=o[j],_=g[1];if(m&&g[2]){if(S===void 0&&!(j in o))return!1}else{var x=new e;if(h)var O=h(S,_,j,o,c,x);if(!(O===void 0?t(_,S,n|r,h,x):O))return!1}}return!0}return Iy=l,Iy}var Hy,wA;function B3(){if(wA)return Hy;wA=1;var e=Ya();function t(n){return n===n&&!e(n)}return Hy=t,Hy}var Gy,OA;function yL(){if(OA)return Gy;OA=1;var e=B3(),t=zd();function n(r){for(var l=t(r),o=l.length;o--;){var c=l[o],d=r[c];l[o]=[c,d,e(d)]}return l}return Gy=n,Gy}var Yy,AA;function U3(){if(AA)return Yy;AA=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Yy=e,Yy}var Vy,NA;function gL(){if(NA)return Vy;NA=1;var e=vL(),t=yL(),n=U3();function r(l){var o=t(l);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(c){return c===l||e(c,l,o)}}return Vy=r,Vy}var Fy,EA;function bL(){if(EA)return Fy;EA=1;function e(t,n){return t!=null&&n in Object(t)}return Fy=e,Fy}var Ky,TA;function xL(){if(TA)return Ky;TA=1;var e=l3(),t=V0(),n=wn(),r=F0(),l=K0(),o=Rd();function c(d,h,p){h=e(h,d);for(var v=-1,m=h.length,g=!1;++v<m;){var j=o(h[v]);if(!(g=d!=null&&p(d,j)))break;d=d[j]}return g||++v!=m?g:(m=d==null?0:d.length,!!m&&l(m)&&r(j,m)&&(n(d)||t(d)))}return Ky=c,Ky}var Xy,CA;function jL(){if(CA)return Xy;CA=1;var e=bL(),t=xL();function n(r,l){return r!=null&&t(r,l,e)}return Xy=n,Xy}var Zy,MA;function _L(){if(MA)return Zy;MA=1;var e=X0(),t=o3(),n=jL(),r=M0(),l=B3(),o=U3(),c=Rd(),d=1,h=2;function p(v,m){return r(v)&&l(m)?o(c(v),m):function(g){var j=t(g,v);return j===void 0&&j===m?n(g,v):e(m,j,d|h)}}return Zy=p,Zy}var Wy,kA;function po(){if(kA)return Wy;kA=1;function e(t){return t}return Wy=e,Wy}var Qy,RA;function SL(){if(RA)return Qy;RA=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Qy=e,Qy}var Jy,PA;function wL(){if(PA)return Jy;PA=1;var e=q0();function t(n){return function(r){return e(r,n)}}return Jy=t,Jy}var eg,DA;function OL(){if(DA)return eg;DA=1;var e=SL(),t=wL(),n=M0(),r=Rd();function l(o){return n(o)?e(r(o)):t(o)}return eg=l,eg}var tg,$A;function Er(){if($A)return tg;$A=1;var e=gL(),t=_L(),n=po(),r=wn(),l=OL();function o(c){return typeof c=="function"?c:c==null?n:typeof c=="object"?r(c)?t(c[0],c[1]):e(c):l(c)}return tg=o,tg}var ng,qA;function I3(){if(qA)return ng;qA=1;function e(t,n,r,l){for(var o=t.length,c=r+(l?1:-1);l?c--:++c<o;)if(n(t[c],c,t))return c;return-1}return ng=e,ng}var rg,zA;function AL(){if(zA)return rg;zA=1;function e(t){return t!==t}return rg=e,rg}var ag,LA;function NL(){if(LA)return ag;LA=1;function e(t,n,r){for(var l=r-1,o=t.length;++l<o;)if(t[l]===n)return l;return-1}return ag=e,ag}var ig,BA;function EL(){if(BA)return ig;BA=1;var e=I3(),t=AL(),n=NL();function r(l,o,c){return o===o?n(l,o,c):e(l,t,c)}return ig=r,ig}var lg,UA;function TL(){if(UA)return lg;UA=1;var e=EL();function t(n,r){var l=n==null?0:n.length;return!!l&&e(n,r,0)>-1}return lg=t,lg}var og,IA;function CL(){if(IA)return og;IA=1;function e(t,n,r){for(var l=-1,o=t==null?0:t.length;++l<o;)if(r(n,t[l]))return!0;return!1}return og=e,og}var sg,HA;function ML(){if(HA)return sg;HA=1;function e(){}return sg=e,sg}var ug,GA;function kL(){if(GA)return ug;GA=1;var e=L3(),t=ML(),n=Y0(),r=1/0,l=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return ug=l,ug}var cg,YA;function RL(){if(YA)return cg;YA=1;var e=C3(),t=TL(),n=CL(),r=k3(),l=kL(),o=Y0(),c=200;function d(h,p,v){var m=-1,g=t,j=h.length,S=!0,_=[],x=_;if(v)S=!1,g=n;else if(j>=c){var O=p?null:l(h);if(O)return o(O);S=!1,g=r,x=new e}else x=p?[]:_;e:for(;++m<j;){var w=h[m],E=p?p(w):w;if(w=v||w!==0?w:0,S&&E===E){for(var M=x.length;M--;)if(x[M]===E)continue e;p&&x.push(E),_.push(w)}else g(x,E,v)||(x!==_&&x.push(E),_.push(w))}return _}return cg=d,cg}var fg,VA;function PL(){if(VA)return fg;VA=1;var e=Er(),t=RL();function n(r,l){return r&&r.length?t(r,e(l,2)):[]}return fg=n,fg}var DL=PL();const FA=rt(DL);function H3(e,t,n){return t===!0?FA(e,n):ke(t)?FA(e,t):e}function zl(e){"@babel/helpers - typeof";return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}var $L=["ref"];function KA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function Kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KA(Object(n),!0).forEach(function(r){Ld(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Y3(r.key),r)}}function zL(e,t,n){return t&&XA(e.prototype,t),n&&XA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function LL(e,t,n){return t=Tf(t),BL(e,G3()?Reflect.construct(t,n||[],Tf(e).constructor):t.apply(e,n))}function BL(e,t){if(t&&(zl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UL(e)}function UL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(G3=function(){return!!e})()}function Tf(e){return Tf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tf(e)}function IL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ox(e,t)}function ox(e,t){return ox=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},ox(e,t)}function Ld(e,t,n){return t=Y3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y3(e){var t=HL(e,"string");return zl(t)=="symbol"?t:t+""}function HL(e,t){if(zl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function GL(e,t){if(e==null)return{};var n=YL(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YL(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function VL(e){return e.value}function FL(e,t){if(Y.isValidElement(e))return Y.cloneElement(e,t);if(typeof e=="function")return Y.createElement(e,t);t.ref;var n=GL(t,$L);return Y.createElement(G0,n)}var ZA=1,wi=(function(e){function t(){var n;qL(this,t);for(var r=arguments.length,l=new Array(r),o=0;o<r;o++)l[o]=arguments[o];return n=LL(this,t,[].concat(l)),Ld(n,"lastBoundingBox",{width:-1,height:-1}),n}return IL(t,e),zL(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,l=this.getBBox();l?(Math.abs(l.width-this.lastBoundingBox.width)>ZA||Math.abs(l.height-this.lastBoundingBox.height)>ZA)&&(this.lastBoundingBox.width=l.width,this.lastBoundingBox.height=l.height,r&&r(l)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Kr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var l=this.props,o=l.layout,c=l.align,d=l.verticalAlign,h=l.margin,p=l.chartWidth,v=l.chartHeight,m,g;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(c==="center"&&o==="vertical"){var j=this.getBBoxSnapshot();m={left:((p||0)-j.width)/2}}else m=c==="right"?{right:h&&h.right||0}:{left:h&&h.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(d==="middle"){var S=this.getBBoxSnapshot();g={top:((v||0)-S.height)/2}}else g=d==="bottom"?{bottom:h&&h.bottom||0}:{top:h&&h.top||0};return Kr(Kr({},m),g)}},{key:"render",value:function(){var r=this,l=this.props,o=l.content,c=l.width,d=l.height,h=l.wrapperStyle,p=l.payloadUniqBy,v=l.payload,m=Kr(Kr({position:"absolute",width:c||"auto",height:d||"auto"},this.getDefaultPosition(h)),h);return Y.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:function(j){r.wrapperNode=j}},FL(o,Kr(Kr({},this.props),{},{payload:H3(v,p,VL)})))}}],[{key:"getWithHeight",value:function(r,l){var o=Kr(Kr({},this.defaultProps),r.props),c=o.layout;return c==="vertical"&&ve(r.props.height)?{height:r.props.height}:c==="horizontal"?{width:r.props.width||l}:null}}])})(T.PureComponent);Ld(wi,"displayName","Legend");Ld(wi,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var dg,WA;function KL(){if(WA)return dg;WA=1;var e=wu(),t=V0(),n=wn(),r=e?e.isConcatSpreadable:void 0;function l(o){return n(o)||t(o)||!!(r&&o&&o[r])}return dg=l,dg}var hg,QA;function V3(){if(QA)return hg;QA=1;var e=P3(),t=KL();function n(r,l,o,c,d){var h=-1,p=r.length;for(o||(o=t),d||(d=[]);++h<p;){var v=r[h];l>0&&o(v)?l>1?n(v,l-1,o,c,d):e(d,v):c||(d[d.length]=v)}return d}return hg=n,hg}var pg,JA;function XL(){if(JA)return pg;JA=1;function e(t){return function(n,r,l){for(var o=-1,c=Object(n),d=l(n),h=d.length;h--;){var p=d[t?h:++o];if(r(c[p],p,c)===!1)break}return n}}return pg=e,pg}var mg,eN;function ZL(){if(eN)return mg;eN=1;var e=XL(),t=e();return mg=t,mg}var vg,tN;function F3(){if(tN)return vg;tN=1;var e=ZL(),t=zd();function n(r,l){return r&&e(r,l,t)}return vg=n,vg}var yg,nN;function WL(){if(nN)return yg;nN=1;var e=Nu();function t(n,r){return function(l,o){if(l==null)return l;if(!e(l))return n(l,o);for(var c=l.length,d=r?c:-1,h=Object(l);(r?d--:++d<c)&&o(h[d],d,h)!==!1;);return l}}return yg=t,yg}var gg,rN;function Z0(){if(rN)return gg;rN=1;var e=F3(),t=WL(),n=t(e);return gg=n,gg}var bg,aN;function K3(){if(aN)return bg;aN=1;var e=Z0(),t=Nu();function n(r,l){var o=-1,c=t(r)?Array(r.length):[];return e(r,function(d,h,p){c[++o]=l(d,h,p)}),c}return bg=n,bg}var xg,iN;function QL(){if(iN)return xg;iN=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return xg=e,xg}var jg,lN;function JL(){if(lN)return jg;lN=1;var e=fo();function t(n,r){if(n!==r){var l=n!==void 0,o=n===null,c=n===n,d=e(n),h=r!==void 0,p=r===null,v=r===r,m=e(r);if(!p&&!m&&!d&&n>r||d&&h&&v&&!p&&!m||o&&h&&v||!l&&v||!c)return 1;if(!o&&!d&&!m&&n<r||m&&l&&c&&!o&&!d||p&&l&&c||!h&&c||!v)return-1}return 0}return jg=t,jg}var _g,oN;function eB(){if(oN)return _g;oN=1;var e=JL();function t(n,r,l){for(var o=-1,c=n.criteria,d=r.criteria,h=c.length,p=l.length;++o<h;){var v=e(c[o],d[o]);if(v){if(o>=p)return v;var m=l[o];return v*(m=="desc"?-1:1)}}return n.index-r.index}return _g=t,_g}var Sg,sN;function tB(){if(sN)return Sg;sN=1;var e=$0(),t=q0(),n=Er(),r=K3(),l=QL(),o=$3(),c=eB(),d=po(),h=wn();function p(v,m,g){m.length?m=e(m,function(_){return h(_)?function(x){return t(x,_.length===1?_[0]:_)}:_}):m=[d];var j=-1;m=e(m,o(n));var S=r(v,function(_,x,O){var w=e(m,function(E){return E(_)});return{criteria:w,index:++j,value:_}});return l(S,function(_,x){return c(_,x,g)})}return Sg=p,Sg}var wg,uN;function nB(){if(uN)return wg;uN=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return wg=e,wg}var Og,cN;function rB(){if(cN)return Og;cN=1;var e=nB(),t=Math.max;function n(r,l,o){return l=t(l===void 0?r.length-1:l,0),function(){for(var c=arguments,d=-1,h=t(c.length-l,0),p=Array(h);++d<h;)p[d]=c[l+d];d=-1;for(var v=Array(l+1);++d<l;)v[d]=c[d];return v[l]=o(p),e(r,this,v)}}return Og=n,Og}var Ag,fN;function aB(){if(fN)return Ag;fN=1;function e(t){return function(){return t}}return Ag=e,Ag}var Ng,dN;function X3(){if(dN)return Ng;dN=1;var e=Di(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Ng=t,Ng}var Eg,hN;function iB(){if(hN)return Eg;hN=1;var e=aB(),t=X3(),n=po(),r=t?function(l,o){return t(l,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return Eg=r,Eg}var Tg,pN;function lB(){if(pN)return Tg;pN=1;var e=800,t=16,n=Date.now;function r(l){var o=0,c=0;return function(){var d=n(),h=t-(d-c);if(c=d,h>0){if(++o>=e)return arguments[0]}else o=0;return l.apply(void 0,arguments)}}return Tg=r,Tg}var Cg,mN;function oB(){if(mN)return Cg;mN=1;var e=iB(),t=lB(),n=t(e);return Cg=n,Cg}var Mg,vN;function sB(){if(vN)return Mg;vN=1;var e=po(),t=rB(),n=oB();function r(l,o){return n(t(l,o,e),l+"")}return Mg=r,Mg}var kg,yN;function Bd(){if(yN)return kg;yN=1;var e=R0(),t=Nu(),n=F0(),r=Ya();function l(o,c,d){if(!r(d))return!1;var h=typeof c;return(h=="number"?t(d)&&n(c,d.length):h=="string"&&c in d)?e(d[c],o):!1}return kg=l,kg}var Rg,gN;function uB(){if(gN)return Rg;gN=1;var e=V3(),t=tB(),n=sB(),r=Bd(),l=n(function(o,c){if(o==null)return[];var d=c.length;return d>1&&r(o,c[0],c[1])?c=[]:d>2&&r(c[0],c[1],c[2])&&(c=[c[0]]),t(o,e(c,1),[])});return Rg=l,Rg}var cB=uB();const W0=rt(cB);function Bs(e){"@babel/helpers - typeof";return Bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bs(e)}function sx(){return sx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sx.apply(this,arguments)}function fB(e,t){return mB(e)||pB(e,t)||hB(e,t)||dB()}function dB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hB(e,t){if(e){if(typeof e=="string")return bN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bN(e,t)}}function bN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function mB(e){if(Array.isArray(e))return e}function xN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function Pg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xN(Object(n),!0).forEach(function(r){vB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vB(e,t,n){return t=yB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yB(e){var t=gB(e,"string");return Bs(t)=="symbol"?t:t+""}function gB(e,t){if(Bs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bB(e){return Array.isArray(e)&&It(e[0])&&It(e[1])?e.join(" ~ "):e}var xB=function(t){var n=t.separator,r=n===void 0?" : ":n,l=t.contentStyle,o=l===void 0?{}:l,c=t.itemStyle,d=c===void 0?{}:c,h=t.labelStyle,p=h===void 0?{}:h,v=t.payload,m=t.formatter,g=t.itemSorter,j=t.wrapperClassName,S=t.labelClassName,_=t.label,x=t.labelFormatter,O=t.accessibilityLayer,w=O===void 0?!1:O,E=function(){if(v&&v.length){var H={padding:0,margin:0},W=(g?W0(v,g):v).map(function(Q,D){if(Q.type==="none")return null;var P=Pg({display:"block",paddingTop:4,paddingBottom:4,color:Q.color||"#000"},d),$=Q.formatter||m||bB,U=Q.value,ie=Q.name,fe=U,L=ie;if($&&fe!=null&&L!=null){var F=$(U,ie,Q,D,v);if(Array.isArray(F)){var q=fB(F,2);fe=q[0],L=q[1]}else fe=F}return Y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:P},It(L)?Y.createElement("span",{className:"recharts-tooltip-item-name"},L):null,It(L)?Y.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,Y.createElement("span",{className:"recharts-tooltip-item-value"},fe),Y.createElement("span",{className:"recharts-tooltip-item-unit"},Q.unit||""))});return Y.createElement("ul",{className:"recharts-tooltip-item-list",style:H},W)}return null},M=Pg({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),A=Pg({margin:0},p),C=!ze(_),k=C?_:"",z=qe("recharts-default-tooltip",j),B=qe("recharts-tooltip-label",S);C&&x&&v!==void 0&&v!==null&&(k=x(_,v));var Z=w?{role:"status","aria-live":"assertive"}:{};return Y.createElement("div",sx({className:z,style:M},Z),Y.createElement("p",{className:B,style:A},Y.isValidElement(k)?k:"".concat(k)),E())};function Us(e){"@babel/helpers - typeof";return Us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Us(e)}function ef(e,t,n){return t=jB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jB(e){var t=_B(e,"string");return Us(t)=="symbol"?t:t+""}function _B(e,t){if(Us(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Us(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vs="recharts-tooltip-wrapper",SB={visibility:"hidden"};function wB(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return qe(vs,ef(ef(ef(ef({},"".concat(vs,"-right"),ve(n)&&t&&ve(t.x)&&n>=t.x),"".concat(vs,"-left"),ve(n)&&t&&ve(t.x)&&n<t.x),"".concat(vs,"-bottom"),ve(r)&&t&&ve(t.y)&&r>=t.y),"".concat(vs,"-top"),ve(r)&&t&&ve(t.y)&&r<t.y))}function jN(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,l=e.offsetTopLeft,o=e.position,c=e.reverseDirection,d=e.tooltipDimension,h=e.viewBox,p=e.viewBoxDimension;if(o&&ve(o[r]))return o[r];var v=n[r]-d-l,m=n[r]+l;if(t[r])return c[r]?v:m;if(c[r]){var g=v,j=h[r];return g<j?Math.max(m,h[r]):Math.max(v,h[r])}var S=m+d,_=h[r]+p;return S>_?Math.max(v,h[r]):Math.max(m,h[r])}function OB(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function AB(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,l=e.position,o=e.reverseDirection,c=e.tooltipBox,d=e.useTranslate3d,h=e.viewBox,p,v,m;return c.height>0&&c.width>0&&n?(v=jN({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:l,reverseDirection:o,tooltipDimension:c.width,viewBox:h,viewBoxDimension:h.width}),m=jN({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:l,reverseDirection:o,tooltipDimension:c.height,viewBox:h,viewBoxDimension:h.height}),p=OB({translateX:v,translateY:m,useTranslate3d:d})):p=SB,{cssProperties:p,cssClasses:wB({translateX:v,translateY:m,coordinate:n})}}function Ll(e){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}function _N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function SN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_N(Object(n),!0).forEach(function(r){cx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_N(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EB(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,W3(r.key),r)}}function TB(e,t,n){return t&&EB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CB(e,t,n){return t=Cf(t),MB(e,Z3()?Reflect.construct(t,n||[],Cf(e).constructor):t.apply(e,n))}function MB(e,t){if(t&&(Ll(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kB(e)}function kB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z3=function(){return!!e})()}function Cf(e){return Cf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cf(e)}function RB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ux(e,t)}function ux(e,t){return ux=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},ux(e,t)}function cx(e,t,n){return t=W3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W3(e){var t=PB(e,"string");return Ll(t)=="symbol"?t:t+""}function PB(e,t){if(Ll(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ll(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wN=1,DB=(function(e){function t(){var n;NB(this,t);for(var r=arguments.length,l=new Array(r),o=0;o<r;o++)l[o]=arguments[o];return n=CB(this,t,[].concat(l)),cx(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),cx(n,"handleKeyDown",function(c){if(c.key==="Escape"){var d,h,p,v;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(d=(h=n.props.coordinate)===null||h===void 0?void 0:h.x)!==null&&d!==void 0?d:0,y:(p=(v=n.props.coordinate)===null||v===void 0?void 0:v.y)!==null&&p!==void 0?p:0}})}}),n}return RB(t,e),TB(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>wN||Math.abs(r.height-this.state.lastBoundingBox.height)>wN)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,l;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((l=this.props.coordinate)===null||l===void 0?void 0:l.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,l=this.props,o=l.active,c=l.allowEscapeViewBox,d=l.animationDuration,h=l.animationEasing,p=l.children,v=l.coordinate,m=l.hasPayload,g=l.isAnimationActive,j=l.offset,S=l.position,_=l.reverseDirection,x=l.useTranslate3d,O=l.viewBox,w=l.wrapperStyle,E=AB({allowEscapeViewBox:c,coordinate:v,offsetTopLeft:j,position:S,reverseDirection:_,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:O}),M=E.cssClasses,A=E.cssProperties,C=SN(SN({transition:g&&o?"transform ".concat(d,"ms ").concat(h):void 0},A),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&m?"visible":"hidden",position:"absolute",top:0,left:0},w);return Y.createElement("div",{tabIndex:-1,className:M,style:C,ref:function(z){r.wrapperNode=z}},p)}}])})(T.PureComponent),$B=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},mo={isSsr:$B()};function Bl(e){"@babel/helpers - typeof";return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}function ON(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function AN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ON(Object(n),!0).forEach(function(r){Q0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ON(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zB(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,J3(r.key),r)}}function LB(e,t,n){return t&&zB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function BB(e,t,n){return t=Mf(t),UB(e,Q3()?Reflect.construct(t,n||[],Mf(e).constructor):t.apply(e,n))}function UB(e,t){if(t&&(Bl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IB(e)}function IB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Q3=function(){return!!e})()}function Mf(e){return Mf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mf(e)}function HB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fx(e,t)}function fx(e,t){return fx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},fx(e,t)}function Q0(e,t,n){return t=J3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J3(e){var t=GB(e,"string");return Bl(t)=="symbol"?t:t+""}function GB(e,t){if(Bl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function YB(e){return e.dataKey}function VB(e,t){return Y.isValidElement(e)?Y.cloneElement(e,t):typeof e=="function"?Y.createElement(e,t):Y.createElement(xB,t)}var xn=(function(e){function t(){return qB(this,t),BB(this,t,arguments)}return HB(t,e),LB(t,[{key:"render",value:function(){var r=this,l=this.props,o=l.active,c=l.allowEscapeViewBox,d=l.animationDuration,h=l.animationEasing,p=l.content,v=l.coordinate,m=l.filterNull,g=l.isAnimationActive,j=l.offset,S=l.payload,_=l.payloadUniqBy,x=l.position,O=l.reverseDirection,w=l.useTranslate3d,E=l.viewBox,M=l.wrapperStyle,A=S??[];m&&A.length&&(A=H3(S.filter(function(k){return k.value!=null&&(k.hide!==!0||r.props.includeHidden)}),_,YB));var C=A.length>0;return Y.createElement(DB,{allowEscapeViewBox:c,animationDuration:d,animationEasing:h,isAnimationActive:g,active:o,coordinate:v,hasPayload:C,offset:j,position:x,reverseDirection:O,useTranslate3d:w,viewBox:E,wrapperStyle:M},VB(p,AN(AN({},this.props),{},{payload:A})))}}])})(T.PureComponent);Q0(xn,"displayName","Tooltip");Q0(xn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!mo.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Dg,NN;function FB(){if(NN)return Dg;NN=1;var e=Nr(),t=function(){return e.Date.now()};return Dg=t,Dg}var $g,EN;function KB(){if(EN)return $g;EN=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return $g=t,$g}var qg,TN;function XB(){if(TN)return qg;TN=1;var e=KB(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return qg=n,qg}var zg,CN;function ek(){if(CN)return zg;CN=1;var e=XB(),t=Ya(),n=fo(),r=NaN,l=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;function h(p){if(typeof p=="number")return p;if(n(p))return r;if(t(p)){var v=typeof p.valueOf=="function"?p.valueOf():p;p=t(v)?v+"":v}if(typeof p!="string")return p===0?p:+p;p=e(p);var m=o.test(p);return m||c.test(p)?d(p.slice(2),m?2:8):l.test(p)?r:+p}return zg=h,zg}var Lg,MN;function ZB(){if(MN)return Lg;MN=1;var e=Ya(),t=FB(),n=ek(),r="Expected a function",l=Math.max,o=Math.min;function c(d,h,p){var v,m,g,j,S,_,x=0,O=!1,w=!1,E=!0;if(typeof d!="function")throw new TypeError(r);h=n(h)||0,e(p)&&(O=!!p.leading,w="maxWait"in p,g=w?l(n(p.maxWait)||0,h):g,E="trailing"in p?!!p.trailing:E);function M(W){var Q=v,D=m;return v=m=void 0,x=W,j=d.apply(D,Q),j}function A(W){return x=W,S=setTimeout(z,h),O?M(W):j}function C(W){var Q=W-_,D=W-x,P=h-Q;return w?o(P,g-D):P}function k(W){var Q=W-_,D=W-x;return _===void 0||Q>=h||Q<0||w&&D>=g}function z(){var W=t();if(k(W))return B(W);S=setTimeout(z,C(W))}function B(W){return S=void 0,E&&v?M(W):(v=m=void 0,j)}function Z(){S!==void 0&&clearTimeout(S),x=0,v=_=m=S=void 0}function G(){return S===void 0?j:B(t())}function H(){var W=t(),Q=k(W);if(v=arguments,m=this,_=W,Q){if(S===void 0)return A(_);if(w)return clearTimeout(S),S=setTimeout(z,h),M(_)}return S===void 0&&(S=setTimeout(z,h)),j}return H.cancel=Z,H.flush=G,H}return Lg=c,Lg}var Bg,kN;function WB(){if(kN)return Bg;kN=1;var e=ZB(),t=Ya(),n="Expected a function";function r(l,o,c){var d=!0,h=!0;if(typeof l!="function")throw new TypeError(n);return t(c)&&(d="leading"in c?!!c.leading:d,h="trailing"in c?!!c.trailing:h),e(l,o,{leading:d,maxWait:o,trailing:h})}return Bg=r,Bg}var QB=WB();const tk=rt(QB);function Is(e){"@babel/helpers - typeof";return Is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Is(e)}function RN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function tf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RN(Object(n),!0).forEach(function(r){JB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JB(e,t,n){return t=eU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eU(e){var t=tU(e,"string");return Is(t)=="symbol"?t:t+""}function tU(e,t){if(Is(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Is(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nU(e,t){return lU(e)||iU(e,t)||aU(e,t)||rU()}function rU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aU(e,t){if(e){if(typeof e=="string")return PN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PN(e,t)}}function PN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iU(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function lU(e){if(Array.isArray(e))return e}var Ts=T.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,l=r===void 0?{width:-1,height:-1}:r,o=e.width,c=o===void 0?"100%":o,d=e.height,h=d===void 0?"100%":d,p=e.minWidth,v=p===void 0?0:p,m=e.minHeight,g=e.maxHeight,j=e.children,S=e.debounce,_=S===void 0?0:S,x=e.id,O=e.className,w=e.onResize,E=e.style,M=E===void 0?{}:E,A=T.useRef(null),C=T.useRef();C.current=w,T.useImperativeHandle(t,function(){return Object.defineProperty(A.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),A.current},configurable:!0})});var k=T.useState({containerWidth:l.width,containerHeight:l.height}),z=nU(k,2),B=z[0],Z=z[1],G=T.useCallback(function(W,Q){Z(function(D){var P=Math.round(W),$=Math.round(Q);return D.containerWidth===P&&D.containerHeight===$?D:{containerWidth:P,containerHeight:$}})},[]);T.useEffect(function(){var W=function(ie){var fe,L=ie[0].contentRect,F=L.width,q=L.height;G(F,q),(fe=C.current)===null||fe===void 0||fe.call(C,F,q)};_>0&&(W=tk(W,_,{trailing:!0,leading:!1}));var Q=new ResizeObserver(W),D=A.current.getBoundingClientRect(),P=D.width,$=D.height;return G(P,$),Q.observe(A.current),function(){Q.disconnect()}},[G,_]);var H=T.useMemo(function(){var W=B.containerWidth,Q=B.containerHeight;if(W<0||Q<0)return null;hr(xi(c)||xi(h),`The width(%s) and height(%s) are both fixed numbers,
       maybe you don't need to use a ResponsiveContainer.`,c,h),hr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var D=xi(c)?W:c,P=xi(h)?Q:h;n&&n>0&&(D?P=D/n:P&&(D=P*n),g&&P>g&&(P=g)),hr(D>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0,
       please check the style of container, or the props width(%s) and height(%s),
       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
       height and width.`,D,P,c,h,v,m,n);var $=!Array.isArray(j)&&Jr(j.type).endsWith("Chart");return Y.Children.map(j,function(U){return Y.isValidElement(U)?T.cloneElement(U,tf({width:D,height:P},$?{style:tf({height:"100%",width:"100%",maxHeight:P,maxWidth:D},U.props.style)}:{})):U})},[n,j,h,g,m,v,B,c]);return Y.createElement("div",{id:x?"".concat(x):void 0,className:qe("recharts-responsive-container",O),style:tf(tf({},M),{},{width:c,height:h,minWidth:v,minHeight:m,maxHeight:g}),ref:A},H)}),Ud=function(t){return null};Ud.displayName="Cell";function Hs(e){"@babel/helpers - typeof";return Hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hs(e)}function DN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function dx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DN(Object(n),!0).forEach(function(r){oU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oU(e,t,n){return t=sU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sU(e){var t=uU(e,"string");return Hs(t)=="symbol"?t:t+""}function uU(e,t){if(Hs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sl={widthCache:{},cacheCount:0},cU=2e3,fU={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},$N="recharts_measurement_span";function dU(e){var t=dx({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Cs=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||mo.isSsr)return{width:0,height:0};var r=dU(n),l=JSON.stringify({text:t,copyStyle:r});if(Sl.widthCache[l])return Sl.widthCache[l];try{var o=document.getElementById($N);o||(o=document.createElement("span"),o.setAttribute("id",$N),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var c=dx(dx({},fU),r);Object.assign(o.style,c),o.textContent="".concat(t);var d=o.getBoundingClientRect(),h={width:d.width,height:d.height};return Sl.widthCache[l]=h,++Sl.cacheCount>cU&&(Sl.cacheCount=0,Sl.widthCache={}),h}catch{return{width:0,height:0}}},hU=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Gs(e){"@babel/helpers - typeof";return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(e)}function kf(e,t){return yU(e)||vU(e,t)||mU(e,t)||pU()}function pU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mU(e,t){if(e){if(typeof e=="string")return qN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qN(e,t)}}function qN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vU(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;h=!1}else for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function yU(e){if(Array.isArray(e))return e}function gU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xU(r.key),r)}}function bU(e,t,n){return t&&zN(e.prototype,t),n&&zN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xU(e){var t=jU(e,"string");return Gs(t)=="symbol"?t:t+""}function jU(e,t){if(Gs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var LN=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,BN=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,_U=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,SU=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,nk={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},wU=Object.keys(nk),Nl="NaN";function OU(e,t){return e*nk[t]}var nf=(function(){function e(t,n){gU(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!_U.test(n)&&(this.num=NaN,this.unit=""),wU.includes(n)&&(this.num=OU(t,n),this.unit="px")}return bU(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,l=(r=SU.exec(n))!==null&&r!==void 0?r:[],o=kf(l,3),c=o[1],d=o[2];return new e(parseFloat(c),d??"")}}])})();function rk(e){if(e.includes(Nl))return Nl;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=LN.exec(t))!==null&&n!==void 0?n:[],l=kf(r,4),o=l[1],c=l[2],d=l[3],h=nf.parse(o??""),p=nf.parse(d??""),v=c==="*"?h.multiply(p):h.divide(p);if(v.isNaN())return Nl;t=t.replace(LN,v.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var m,g=(m=BN.exec(t))!==null&&m!==void 0?m:[],j=kf(g,4),S=j[1],_=j[2],x=j[3],O=nf.parse(S??""),w=nf.parse(x??""),E=_==="+"?O.add(w):O.subtract(w);if(E.isNaN())return Nl;t=t.replace(BN,E.toString())}return t}var UN=/\(([^()]*)\)/;function AU(e){for(var t=e;t.includes("(");){var n=UN.exec(t),r=kf(n,2),l=r[1];t=t.replace(UN,rk(l))}return t}function NU(e){var t=e.replace(/\s+/g,"");return t=AU(t),t=rk(t),t}function EU(e){try{return NU(e)}catch{return Nl}}function Ug(e){var t=EU(e.slice(5,-1));return t===Nl?"":t}var TU=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],CU=["dx","dy","angle","className","breakAll"];function hx(){return hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hx.apply(this,arguments)}function IN(e,t){if(e==null)return{};var n=MU(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MU(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function HN(e,t){return DU(e)||PU(e,t)||RU(e,t)||kU()}function kU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RU(e,t){if(e){if(typeof e=="string")return GN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GN(e,t)}}function GN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function PU(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;h=!1}else for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function DU(e){if(Array.isArray(e))return e}var ak=/[ \f\n\r\t\v\u2028\u2029]+/,ik=function(t){var n=t.children,r=t.breakAll,l=t.style;try{var o=[];ze(n)||(r?o=n.toString().split(""):o=n.toString().split(ak));var c=o.map(function(h){return{word:h,width:Cs(h,l).width}}),d=r?0:Cs(" ",l).width;return{wordsWithComputedWidth:c,spaceWidth:d}}catch{return null}},$U=function(t,n,r,l,o){var c=t.maxLines,d=t.children,h=t.style,p=t.breakAll,v=ve(c),m=d,g=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(P,$){var U=$.word,ie=$.width,fe=P[P.length-1];if(fe&&(l==null||o||fe.width+ie+r<Number(l)))fe.words.push(U),fe.width+=ie+r;else{var L={words:[U],width:ie};P.push(L)}return P},[])},j=g(n),S=function(D){return D.reduce(function(P,$){return P.width>$.width?P:$})};if(!v)return j;for(var _="…",x=function(D){var P=m.slice(0,D),$=ik({breakAll:p,style:h,children:P+_}).wordsWithComputedWidth,U=g($),ie=U.length>c||S(U).width>Number(l);return[ie,U]},O=0,w=m.length-1,E=0,M;O<=w&&E<=m.length-1;){var A=Math.floor((O+w)/2),C=A-1,k=x(C),z=HN(k,2),B=z[0],Z=z[1],G=x(A),H=HN(G,1),W=H[0];if(!B&&!W&&(O=A+1),B&&W&&(w=A-1),!B&&W){M=Z;break}E++}return M||j},YN=function(t){var n=ze(t)?[]:t.toString().split(ak);return[{words:n}]},qU=function(t){var n=t.width,r=t.scaleToFit,l=t.children,o=t.style,c=t.breakAll,d=t.maxLines;if((n||r)&&!mo.isSsr){var h,p,v=ik({breakAll:c,children:l,style:o});if(v){var m=v.wordsWithComputedWidth,g=v.spaceWidth;h=m,p=g}else return YN(l);return $U({breakAll:c,children:l,maxLines:d,style:o},h,p,n,r)}return YN(l)},VN="#808080",Ti=function(t){var n=t.x,r=n===void 0?0:n,l=t.y,o=l===void 0?0:l,c=t.lineHeight,d=c===void 0?"1em":c,h=t.capHeight,p=h===void 0?"0.71em":h,v=t.scaleToFit,m=v===void 0?!1:v,g=t.textAnchor,j=g===void 0?"start":g,S=t.verticalAnchor,_=S===void 0?"end":S,x=t.fill,O=x===void 0?VN:x,w=IN(t,TU),E=T.useMemo(function(){return qU({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:m,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,m,w.style,w.width]),M=w.dx,A=w.dy,C=w.angle,k=w.className,z=w.breakAll,B=IN(w,CU);if(!It(r)||!It(o))return null;var Z=r+(ve(M)?M:0),G=o+(ve(A)?A:0),H;switch(_){case"start":H=Ug("calc(".concat(p,")"));break;case"middle":H=Ug("calc(".concat((E.length-1)/2," * -").concat(d," + (").concat(p," / 2))"));break;default:H=Ug("calc(".concat(E.length-1," * -").concat(d,")"));break}var W=[];if(m){var Q=E[0].width,D=w.width;W.push("scale(".concat((ve(D)?D/Q:1)/Q,")"))}return C&&W.push("rotate(".concat(C,", ").concat(Z,", ").concat(G,")")),W.length&&(B.transform=W.join(" ")),Y.createElement("text",hx({},Ce(B,!0),{x:Z,y:G,className:qe("recharts-text",k),textAnchor:j,fill:O.includes("url")?VN:O}),E.map(function(P,$){var U=P.words.join(z?"":" ");return Y.createElement("tspan",{x:Z,dy:$===0?H:d,key:"".concat(U,"-").concat($)},U)}))};function Ua(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function zU(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function J0(e){let t,n,r;e.length!==2?(t=Ua,n=(d,h)=>Ua(e(d),h),r=(d,h)=>e(d)-h):(t=e===Ua||e===zU?e:LU,n=e,r=e);function l(d,h,p=0,v=d.length){if(p<v){if(t(h,h)!==0)return v;do{const m=p+v>>>1;n(d[m],h)<0?p=m+1:v=m}while(p<v)}return p}function o(d,h,p=0,v=d.length){if(p<v){if(t(h,h)!==0)return v;do{const m=p+v>>>1;n(d[m],h)<=0?p=m+1:v=m}while(p<v)}return p}function c(d,h,p=0,v=d.length){const m=l(d,h,p,v-1);return m>p&&r(d[m-1],h)>-r(d[m],h)?m-1:m}return{left:l,center:c,right:o}}function LU(){return 0}function lk(e){return e===null?NaN:+e}function*BU(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const UU=J0(Ua),Eu=UU.right;J0(lk).center;class FN extends Map{constructor(t,n=GU){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,l]of t)this.set(r,l)}get(t){return super.get(KN(this,t))}has(t){return super.has(KN(this,t))}set(t,n){return super.set(IU(this,t),n)}delete(t){return super.delete(HU(this,t))}}function KN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function IU({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function HU({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function GU(e){return e!==null&&typeof e=="object"?e.valueOf():e}function YU(e=Ua){if(e===Ua)return ok;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 ok(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const VU=Math.sqrt(50),FU=Math.sqrt(10),KU=Math.sqrt(2);function Rf(e,t,n){const r=(t-e)/Math.max(0,n),l=Math.floor(Math.log10(r)),o=r/Math.pow(10,l),c=o>=VU?10:o>=FU?5:o>=KU?2:1;let d,h,p;return l<0?(p=Math.pow(10,-l)/c,d=Math.round(e*p),h=Math.round(t*p),d/p<e&&++d,h/p>t&&--h,p=-p):(p=Math.pow(10,l)*c,d=Math.round(e/p),h=Math.round(t/p),d*p<e&&++d,h*p>t&&--h),h<d&&.5<=n&&n<2?Rf(e,t,n*2):[d,h,p]}function px(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[l,o,c]=r?Rf(t,e,n):Rf(e,t,n);if(!(o>=l))return[];const d=o-l+1,h=new Array(d);if(r)if(c<0)for(let p=0;p<d;++p)h[p]=(o-p)/-c;else for(let p=0;p<d;++p)h[p]=(o-p)*c;else if(c<0)for(let p=0;p<d;++p)h[p]=(l+p)/-c;else for(let p=0;p<d;++p)h[p]=(l+p)*c;return h}function mx(e,t,n){return t=+t,e=+e,n=+n,Rf(e,t,n)[2]}function vx(e,t,n){t=+t,e=+e,n=+n;const r=t<e,l=r?mx(t,e,n):mx(e,t,n);return(r?-1:1)*(l<0?1/-l:l)}function XN(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function ZN(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function sk(e,t,n=0,r=1/0,l){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(l=l===void 0?ok:YU(l);r>n;){if(r-n>600){const h=r-n+1,p=t-n+1,v=Math.log(h),m=.5*Math.exp(2*v/3),g=.5*Math.sqrt(v*m*(h-m)/h)*(p-h/2<0?-1:1),j=Math.max(n,Math.floor(t-p*m/h+g)),S=Math.min(r,Math.floor(t+(h-p)*m/h+g));sk(e,t,j,S,l)}const o=e[t];let c=n,d=r;for(ys(e,n,t),l(e[r],o)>0&&ys(e,n,r);c<d;){for(ys(e,c,d),++c,--d;l(e[c],o)<0;)++c;for(;l(e[d],o)>0;)--d}l(e[n],o)===0?ys(e,n,d):(++d,ys(e,d,r)),d<=t&&(n=d+1),t<=d&&(r=d-1)}return e}function ys(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function XU(e,t,n){if(e=Float64Array.from(BU(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return ZN(e);if(t>=1)return XN(e);var r,l=(r-1)*t,o=Math.floor(l),c=XN(sk(e,o).subarray(0,o+1)),d=ZN(e.subarray(o+1));return c+(d-c)*(l-o)}}function ZU(e,t,n=lk){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,l=(r-1)*t,o=Math.floor(l),c=+n(e[o],o,e),d=+n(e[o+1],o+1,e);return c+(d-c)*(l-o)}}function WU(e,t,n){e=+e,t=+t,n=(l=arguments.length)<2?(t=e,e=0,1):l<3?1:+n;for(var r=-1,l=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(l);++r<l;)o[r]=e+r*n;return o}function rr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function sa(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 yx=Symbol("implicit");function e1(){var e=new FN,t=[],n=[],r=yx;function l(o){let c=e.get(o);if(c===void 0){if(r!==yx)return r;e.set(o,c=t.push(o)-1)}return n[c%n.length]}return l.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new FN;for(const c of o)e.has(c)||e.set(c,t.push(c)-1);return l},l.range=function(o){return arguments.length?(n=Array.from(o),l):n.slice()},l.unknown=function(o){return arguments.length?(r=o,l):r},l.copy=function(){return e1(t,n).unknown(r)},rr.apply(l,arguments),l}function Ys(){var e=e1().unknown(void 0),t=e.domain,n=e.range,r=0,l=1,o,c,d=!1,h=0,p=0,v=.5;delete e.unknown;function m(){var g=t().length,j=l<r,S=j?l:r,_=j?r:l;o=(_-S)/Math.max(1,g-h+p*2),d&&(o=Math.floor(o)),S+=(_-S-o*(g-h))*v,c=o*(1-h),d&&(S=Math.round(S),c=Math.round(c));var x=WU(g).map(function(O){return S+o*O});return n(j?x.reverse():x)}return e.domain=function(g){return arguments.length?(t(g),m()):t()},e.range=function(g){return arguments.length?([r,l]=g,r=+r,l=+l,m()):[r,l]},e.rangeRound=function(g){return[r,l]=g,r=+r,l=+l,d=!0,m()},e.bandwidth=function(){return c},e.step=function(){return o},e.round=function(g){return arguments.length?(d=!!g,m()):d},e.padding=function(g){return arguments.length?(h=Math.min(1,p=+g),m()):h},e.paddingInner=function(g){return arguments.length?(h=Math.min(1,g),m()):h},e.paddingOuter=function(g){return arguments.length?(p=+g,m()):p},e.align=function(g){return arguments.length?(v=Math.max(0,Math.min(1,g)),m()):v},e.copy=function(){return Ys(t(),[r,l]).round(d).paddingInner(h).paddingOuter(p).align(v)},rr.apply(m(),arguments)}function uk(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return uk(t())},e}function Ms(){return uk(Ys.apply(null,arguments).paddingInner(1))}function t1(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ck(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Tu(){}var Vs=.7,Pf=1/Vs,Pl="\\s*([+-]?\\d+)\\s*",Fs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Sr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",QU=/^#([0-9a-f]{3,8})$/,JU=new RegExp(`^rgb\\(${Pl},${Pl},${Pl}\\)$`),e9=new RegExp(`^rgb\\(${Sr},${Sr},${Sr}\\)$`),t9=new RegExp(`^rgba\\(${Pl},${Pl},${Pl},${Fs}\\)$`),n9=new RegExp(`^rgba\\(${Sr},${Sr},${Sr},${Fs}\\)$`),r9=new RegExp(`^hsl\\(${Fs},${Sr},${Sr}\\)$`),a9=new RegExp(`^hsla\\(${Fs},${Sr},${Sr},${Fs}\\)$`),WN={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};t1(Tu,Ks,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:QN,formatHex:QN,formatHex8:i9,formatHsl:l9,formatRgb:JN,toString:JN});function QN(){return this.rgb().formatHex()}function i9(){return this.rgb().formatHex8()}function l9(){return fk(this).formatHsl()}function JN(){return this.rgb().formatRgb()}function Ks(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=QU.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?eE(t):n===3?new jn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?rf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?rf(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=JU.exec(e))?new jn(t[1],t[2],t[3],1):(t=e9.exec(e))?new jn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=t9.exec(e))?rf(t[1],t[2],t[3],t[4]):(t=n9.exec(e))?rf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=r9.exec(e))?rE(t[1],t[2]/100,t[3]/100,1):(t=a9.exec(e))?rE(t[1],t[2]/100,t[3]/100,t[4]):WN.hasOwnProperty(e)?eE(WN[e]):e==="transparent"?new jn(NaN,NaN,NaN,0):null}function eE(e){return new jn(e>>16&255,e>>8&255,e&255,1)}function rf(e,t,n,r){return r<=0&&(e=t=n=NaN),new jn(e,t,n,r)}function o9(e){return e instanceof Tu||(e=Ks(e)),e?(e=e.rgb(),new jn(e.r,e.g,e.b,e.opacity)):new jn}function gx(e,t,n,r){return arguments.length===1?o9(e):new jn(e,t,n,r??1)}function jn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}t1(jn,gx,ck(Tu,{brighter(e){return e=e==null?Pf:Math.pow(Pf,e),new jn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Vs:Math.pow(Vs,e),new jn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new jn(Oi(this.r),Oi(this.g),Oi(this.b),Df(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:tE,formatHex:tE,formatHex8:s9,formatRgb:nE,toString:nE}));function tE(){return`#${ji(this.r)}${ji(this.g)}${ji(this.b)}`}function s9(){return`#${ji(this.r)}${ji(this.g)}${ji(this.b)}${ji((isNaN(this.opacity)?1:this.opacity)*255)}`}function nE(){const e=Df(this.opacity);return`${e===1?"rgb(":"rgba("}${Oi(this.r)}, ${Oi(this.g)}, ${Oi(this.b)}${e===1?")":`, ${e})`}`}function Df(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Oi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ji(e){return e=Oi(e),(e<16?"0":"")+e.toString(16)}function rE(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fr(e,t,n,r)}function fk(e){if(e instanceof fr)return new fr(e.h,e.s,e.l,e.opacity);if(e instanceof Tu||(e=Ks(e)),!e)return new fr;if(e instanceof fr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,l=Math.min(t,n,r),o=Math.max(t,n,r),c=NaN,d=o-l,h=(o+l)/2;return d?(t===o?c=(n-r)/d+(n<r)*6:n===o?c=(r-t)/d+2:c=(t-n)/d+4,d/=h<.5?o+l:2-o-l,c*=60):d=h>0&&h<1?0:c,new fr(c,d,h,e.opacity)}function u9(e,t,n,r){return arguments.length===1?fk(e):new fr(e,t,n,r??1)}function fr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}t1(fr,u9,ck(Tu,{brighter(e){return e=e==null?Pf:Math.pow(Pf,e),new fr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Vs:Math.pow(Vs,e),new fr(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,l=2*n-r;return new jn(Ig(e>=240?e-240:e+120,l,r),Ig(e,l,r),Ig(e<120?e+240:e-120,l,r),this.opacity)},clamp(){return new fr(aE(this.h),af(this.s),af(this.l),Df(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=Df(this.opacity);return`${e===1?"hsl(":"hsla("}${aE(this.h)}, ${af(this.s)*100}%, ${af(this.l)*100}%${e===1?")":`, ${e})`}`}}));function aE(e){return e=(e||0)%360,e<0?e+360:e}function af(e){return Math.max(0,Math.min(1,e||0))}function Ig(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 n1=e=>()=>e;function c9(e,t){return function(n){return e+n*t}}function f9(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 d9(e){return(e=+e)==1?dk:function(t,n){return n-t?f9(t,n,e):n1(isNaN(t)?n:t)}}function dk(e,t){var n=t-e;return n?c9(e,n):n1(isNaN(e)?t:e)}const iE=(function e(t){var n=d9(t);function r(l,o){var c=n((l=gx(l)).r,(o=gx(o)).r),d=n(l.g,o.g),h=n(l.b,o.b),p=dk(l.opacity,o.opacity);return function(v){return l.r=c(v),l.g=d(v),l.b=h(v),l.opacity=p(v),l+""}}return r.gamma=e,r})(1);function h9(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),l;return function(o){for(l=0;l<n;++l)r[l]=e[l]*(1-o)+t[l]*o;return r}}function p9(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function m9(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,l=new Array(r),o=new Array(n),c;for(c=0;c<r;++c)l[c]=vo(e[c],t[c]);for(;c<n;++c)o[c]=t[c];return function(d){for(c=0;c<r;++c)o[c]=l[c](d);return o}}function v9(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function $f(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function y9(e,t){var n={},r={},l;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(l in t)l in e?n[l]=vo(e[l],t[l]):r[l]=t[l];return function(o){for(l in n)r[l]=n[l](o);return r}}var bx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hg=new RegExp(bx.source,"g");function g9(e){return function(){return e}}function b9(e){return function(t){return e(t)+""}}function x9(e,t){var n=bx.lastIndex=Hg.lastIndex=0,r,l,o,c=-1,d=[],h=[];for(e=e+"",t=t+"";(r=bx.exec(e))&&(l=Hg.exec(t));)(o=l.index)>n&&(o=t.slice(n,o),d[c]?d[c]+=o:d[++c]=o),(r=r[0])===(l=l[0])?d[c]?d[c]+=l:d[++c]=l:(d[++c]=null,h.push({i:c,x:$f(r,l)})),n=Hg.lastIndex;return n<t.length&&(o=t.slice(n),d[c]?d[c]+=o:d[++c]=o),d.length<2?h[0]?b9(h[0].x):g9(t):(t=h.length,function(p){for(var v=0,m;v<t;++v)d[(m=h[v]).i]=m.x(p);return d.join("")})}function vo(e,t){var n=typeof t,r;return t==null||n==="boolean"?n1(t):(n==="number"?$f:n==="string"?(r=Ks(t))?(t=r,iE):x9:t instanceof Ks?iE:t instanceof Date?v9:p9(t)?h9:Array.isArray(t)?m9:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?y9:$f)(e,t)}function r1(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function j9(e,t){t===void 0&&(t=e,e=vo);for(var n=0,r=t.length-1,l=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(l,l=t[++n]);return function(c){var d=Math.max(0,Math.min(r-1,Math.floor(c*=r)));return o[d](c-d)}}function _9(e){return function(){return e}}function qf(e){return+e}var lE=[0,1];function dn(e){return e}function xx(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:_9(isNaN(t)?NaN:.5)}function S9(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function w9(e,t,n){var r=e[0],l=e[1],o=t[0],c=t[1];return l<r?(r=xx(l,r),o=n(c,o)):(r=xx(r,l),o=n(o,c)),function(d){return o(r(d))}}function O9(e,t,n){var r=Math.min(e.length,t.length)-1,l=new Array(r),o=new Array(r),c=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++c<r;)l[c]=xx(e[c],e[c+1]),o[c]=n(t[c],t[c+1]);return function(d){var h=Eu(e,d,1,r)-1;return o[h](l[h](d))}}function Cu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Id(){var e=lE,t=lE,n=vo,r,l,o,c=dn,d,h,p;function v(){var g=Math.min(e.length,t.length);return c!==dn&&(c=S9(e[0],e[g-1])),d=g>2?O9:w9,h=p=null,m}function m(g){return g==null||isNaN(g=+g)?o:(h||(h=d(e.map(r),t,n)))(r(c(g)))}return m.invert=function(g){return c(l((p||(p=d(t,e.map(r),$f)))(g)))},m.domain=function(g){return arguments.length?(e=Array.from(g,qf),v()):e.slice()},m.range=function(g){return arguments.length?(t=Array.from(g),v()):t.slice()},m.rangeRound=function(g){return t=Array.from(g),n=r1,v()},m.clamp=function(g){return arguments.length?(c=g?!0:dn,v()):c!==dn},m.interpolate=function(g){return arguments.length?(n=g,v()):n},m.unknown=function(g){return arguments.length?(o=g,m):o},function(g,j){return r=g,l=j,v()}}function a1(){return Id()(dn,dn)}function A9(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function zf(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 Ul(e){return e=zf(Math.abs(e)),e?e[1]:NaN}function N9(e,t){return function(n,r){for(var l=n.length,o=[],c=0,d=e[0],h=0;l>0&&d>0&&(h+d+1>r&&(d=Math.max(1,r-h)),o.push(n.substring(l-=d,l+d)),!((h+=d+1)>r));)d=e[c=(c+1)%e.length];return o.reverse().join(t)}}function E9(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var T9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xs(e){if(!(t=T9.exec(e)))throw new Error("invalid format: "+e);var t;return new i1({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]})}Xs.prototype=i1.prototype;function i1(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+""}i1.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 C9(e){e:for(var t=e.length,n=1,r=-1,l;n<t;++n)switch(e[n]){case".":r=l=n;break;case"0":r===0&&(r=n),l=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(l+1):e}var Lf;function M9(e,t){var n=zf(e,t);if(!n)return Lf=void 0,e.toPrecision(t);var r=n[0],l=n[1],o=l-(Lf=Math.max(-8,Math.min(8,Math.floor(l/3)))*3)+1,c=r.length;return o===c?r:o>c?r+new Array(o-c+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+zf(e,Math.max(0,t+o-1))[0]}function oE(e,t){var n=zf(e,t);if(!n)return e+"";var r=n[0],l=n[1];return l<0?"0."+new Array(-l).join("0")+r:r.length>l+1?r.slice(0,l+1)+"."+r.slice(l+1):r+new Array(l-r.length+2).join("0")}const sE={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:A9,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)=>oE(e*100,t),r:oE,s:M9,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function uE(e){return e}var cE=Array.prototype.map,fE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function k9(e){var t=e.grouping===void 0||e.thousands===void 0?uE:N9(cE.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",l=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?uE:E9(cE.call(e.numerals,String)),c=e.percent===void 0?"%":e.percent+"",d=e.minus===void 0?"−":e.minus+"",h=e.nan===void 0?"NaN":e.nan+"";function p(m,g){m=Xs(m);var j=m.fill,S=m.align,_=m.sign,x=m.symbol,O=m.zero,w=m.width,E=m.comma,M=m.precision,A=m.trim,C=m.type;C==="n"?(E=!0,C="g"):sE[C]||(M===void 0&&(M=12),A=!0,C="g"),(O||j==="0"&&S==="=")&&(O=!0,j="0",S="=");var k=(g&&g.prefix!==void 0?g.prefix:"")+(x==="$"?n:x==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),z=(x==="$"?r:/[%p]/.test(C)?c:"")+(g&&g.suffix!==void 0?g.suffix:""),B=sE[C],Z=/[defgprs%]/.test(C);M=M===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function G(H){var W=k,Q=z,D,P,$;if(C==="c")Q=B(H)+Q,H="";else{H=+H;var U=H<0||1/H<0;if(H=isNaN(H)?h:B(Math.abs(H),M),A&&(H=C9(H)),U&&+H==0&&_!=="+"&&(U=!1),W=(U?_==="("?_:d:_==="-"||_==="("?"":_)+W,Q=(C==="s"&&!isNaN(H)&&Lf!==void 0?fE[8+Lf/3]:"")+Q+(U&&_==="("?")":""),Z){for(D=-1,P=H.length;++D<P;)if($=H.charCodeAt(D),48>$||$>57){Q=($===46?l+H.slice(D+1):H.slice(D))+Q,H=H.slice(0,D);break}}}E&&!O&&(H=t(H,1/0));var ie=W.length+H.length+Q.length,fe=ie<w?new Array(w-ie+1).join(j):"";switch(E&&O&&(H=t(fe+H,fe.length?w-Q.length:1/0),fe=""),S){case"<":H=W+H+Q+fe;break;case"=":H=W+fe+H+Q;break;case"^":H=fe.slice(0,ie=fe.length>>1)+W+H+Q+fe.slice(ie);break;default:H=fe+W+H+Q;break}return o(H)}return G.toString=function(){return m+""},G}function v(m,g){var j=Math.max(-8,Math.min(8,Math.floor(Ul(g)/3)))*3,S=Math.pow(10,-j),_=p((m=Xs(m),m.type="f",m),{suffix:fE[8+j/3]});return function(x){return _(S*x)}}return{format:p,formatPrefix:v}}var lf,l1,hk;R9({thousands:",",grouping:[3],currency:["$",""]});function R9(e){return lf=k9(e),l1=lf.format,hk=lf.formatPrefix,lf}function P9(e){return Math.max(0,-Ul(Math.abs(e)))}function D9(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ul(t)/3)))*3-Ul(Math.abs(e)))}function $9(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ul(t)-Ul(e))+1}function pk(e,t,n,r){var l=vx(e,t,n),o;switch(r=Xs(r??",f"),r.type){case"s":{var c=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=D9(l,c))&&(r.precision=o),hk(r,c)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=$9(l,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=P9(l))&&(r.precision=o-(r.type==="%")*2);break}}return l1(r)}function Va(e){var t=e.domain;return e.ticks=function(n){var r=t();return px(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var l=t();return pk(l[0],l[l.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),l=0,o=r.length-1,c=r[l],d=r[o],h,p,v=10;for(d<c&&(p=c,c=d,d=p,p=l,l=o,o=p);v-- >0;){if(p=mx(c,d,n),p===h)return r[l]=c,r[o]=d,t(r);if(p>0)c=Math.floor(c/p)*p,d=Math.ceil(d/p)*p;else if(p<0)c=Math.ceil(c*p)/p,d=Math.floor(d*p)/p;else break;h=p}return e},e}function Bf(){var e=a1();return e.copy=function(){return Cu(e,Bf())},rr.apply(e,arguments),Va(e)}function mk(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,qf),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return mk(e).unknown(t)},e=arguments.length?Array.from(e,qf):[0,1],Va(n)}function vk(e,t){e=e.slice();var n=0,r=e.length-1,l=e[n],o=e[r],c;return o<l&&(c=n,n=r,r=c,c=l,l=o,o=c),e[n]=t.floor(l),e[r]=t.ceil(o),e}function dE(e){return Math.log(e)}function hE(e){return Math.exp(e)}function q9(e){return-Math.log(-e)}function z9(e){return-Math.exp(-e)}function L9(e){return isFinite(e)?+("1e"+e):e<0?0:e}function B9(e){return e===10?L9:e===Math.E?Math.exp:t=>Math.pow(e,t)}function U9(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 pE(e){return(t,n)=>-e(-t,n)}function o1(e){const t=e(dE,hE),n=t.domain;let r=10,l,o;function c(){return l=U9(r),o=B9(r),n()[0]<0?(l=pE(l),o=pE(o),e(q9,z9)):e(dE,hE),t}return t.base=function(d){return arguments.length?(r=+d,c()):r},t.domain=function(d){return arguments.length?(n(d),c()):n()},t.ticks=d=>{const h=n();let p=h[0],v=h[h.length-1];const m=v<p;m&&([p,v]=[v,p]);let g=l(p),j=l(v),S,_;const x=d==null?10:+d;let O=[];if(!(r%1)&&j-g<x){if(g=Math.floor(g),j=Math.ceil(j),p>0){for(;g<=j;++g)for(S=1;S<r;++S)if(_=g<0?S/o(-g):S*o(g),!(_<p)){if(_>v)break;O.push(_)}}else for(;g<=j;++g)for(S=r-1;S>=1;--S)if(_=g>0?S/o(-g):S*o(g),!(_<p)){if(_>v)break;O.push(_)}O.length*2<x&&(O=px(p,v,x))}else O=px(g,j,Math.min(j-g,x)).map(o);return m?O.reverse():O},t.tickFormat=(d,h)=>{if(d==null&&(d=10),h==null&&(h=r===10?"s":","),typeof h!="function"&&(!(r%1)&&(h=Xs(h)).precision==null&&(h.trim=!0),h=l1(h)),d===1/0)return h;const p=Math.max(1,r*d/t.ticks().length);return v=>{let m=v/o(Math.round(l(v)));return m*r<r-.5&&(m*=r),m<=p?h(v):""}},t.nice=()=>n(vk(n(),{floor:d=>o(Math.floor(l(d))),ceil:d=>o(Math.ceil(l(d)))})),t}function yk(){const e=o1(Id()).domain([1,10]);return e.copy=()=>Cu(e,yk()).base(e.base()),rr.apply(e,arguments),e}function mE(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function vE(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function s1(e){var t=1,n=e(mE(t),vE(t));return n.constant=function(r){return arguments.length?e(mE(t=+r),vE(t)):t},Va(n)}function gk(){var e=s1(Id());return e.copy=function(){return Cu(e,gk()).constant(e.constant())},rr.apply(e,arguments)}function yE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function I9(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function H9(e){return e<0?-e*e:e*e}function u1(e){var t=e(dn,dn),n=1;function r(){return n===1?e(dn,dn):n===.5?e(I9,H9):e(yE(n),yE(1/n))}return t.exponent=function(l){return arguments.length?(n=+l,r()):n},Va(t)}function c1(){var e=u1(Id());return e.copy=function(){return Cu(e,c1()).exponent(e.exponent())},rr.apply(e,arguments),e}function G9(){return c1.apply(null,arguments).exponent(.5)}function gE(e){return Math.sign(e)*e*e}function Y9(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function bk(){var e=a1(),t=[0,1],n=!1,r;function l(o){var c=Y9(e(o));return isNaN(c)?r:n?Math.round(c):c}return l.invert=function(o){return e.invert(gE(o))},l.domain=function(o){return arguments.length?(e.domain(o),l):e.domain()},l.range=function(o){return arguments.length?(e.range((t=Array.from(o,qf)).map(gE)),l):t.slice()},l.rangeRound=function(o){return l.range(o).round(!0)},l.round=function(o){return arguments.length?(n=!!o,l):n},l.clamp=function(o){return arguments.length?(e.clamp(o),l):e.clamp()},l.unknown=function(o){return arguments.length?(r=o,l):r},l.copy=function(){return bk(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},rr.apply(l,arguments),Va(l)}function xk(){var e=[],t=[],n=[],r;function l(){var c=0,d=Math.max(1,t.length);for(n=new Array(d-1);++c<d;)n[c-1]=ZU(e,c/d);return o}function o(c){return c==null||isNaN(c=+c)?r:t[Eu(n,c)]}return o.invertExtent=function(c){var d=t.indexOf(c);return d<0?[NaN,NaN]:[d>0?n[d-1]:e[0],d<n.length?n[d]:e[e.length-1]]},o.domain=function(c){if(!arguments.length)return e.slice();e=[];for(let d of c)d!=null&&!isNaN(d=+d)&&e.push(d);return e.sort(Ua),l()},o.range=function(c){return arguments.length?(t=Array.from(c),l()):t.slice()},o.unknown=function(c){return arguments.length?(r=c,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return xk().domain(e).range(t).unknown(r)},rr.apply(o,arguments)}function jk(){var e=0,t=1,n=1,r=[.5],l=[0,1],o;function c(h){return h!=null&&h<=h?l[Eu(r,h,0,n)]:o}function d(){var h=-1;for(r=new Array(n);++h<n;)r[h]=((h+1)*t-(h-n)*e)/(n+1);return c}return c.domain=function(h){return arguments.length?([e,t]=h,e=+e,t=+t,d()):[e,t]},c.range=function(h){return arguments.length?(n=(l=Array.from(h)).length-1,d()):l.slice()},c.invertExtent=function(h){var p=l.indexOf(h);return p<0?[NaN,NaN]:p<1?[e,r[0]]:p>=n?[r[n-1],t]:[r[p-1],r[p]]},c.unknown=function(h){return arguments.length&&(o=h),c},c.thresholds=function(){return r.slice()},c.copy=function(){return jk().domain([e,t]).range(l).unknown(o)},rr.apply(Va(c),arguments)}function _k(){var e=[.5],t=[0,1],n,r=1;function l(o){return o!=null&&o<=o?t[Eu(e,o,0,r)]:n}return l.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),l):e.slice()},l.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),l):t.slice()},l.invertExtent=function(o){var c=t.indexOf(o);return[e[c-1],e[c]]},l.unknown=function(o){return arguments.length?(n=o,l):n},l.copy=function(){return _k().domain(e).range(t).unknown(n)},rr.apply(l,arguments)}const Gg=new Date,Yg=new Date;function Ht(e,t,n,r){function l(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return l.floor=o=>(e(o=new Date(+o)),o),l.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),l.round=o=>{const c=l(o),d=l.ceil(o);return o-c<d-o?c:d},l.offset=(o,c)=>(t(o=new Date(+o),c==null?1:Math.floor(c)),o),l.range=(o,c,d)=>{const h=[];if(o=l.ceil(o),d=d==null?1:Math.floor(d),!(o<c)||!(d>0))return h;let p;do h.push(p=new Date(+o)),t(o,d),e(o);while(p<o&&o<c);return h},l.filter=o=>Ht(c=>{if(c>=c)for(;e(c),!o(c);)c.setTime(c-1)},(c,d)=>{if(c>=c)if(d<0)for(;++d<=0;)for(;t(c,-1),!o(c););else for(;--d>=0;)for(;t(c,1),!o(c););}),n&&(l.count=(o,c)=>(Gg.setTime(+o),Yg.setTime(+c),e(Gg),e(Yg),Math.floor(n(Gg,Yg))),l.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?l.filter(r?c=>r(c)%o===0:c=>l.count(0,c)%o===0):l)),l}const Uf=Ht(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Uf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ht(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Uf);Uf.range;const Zr=1e3,Jn=Zr*60,Wr=Jn*60,na=Wr*24,f1=na*7,bE=na*30,Vg=na*365,_i=Ht(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Zr)},(e,t)=>(t-e)/Zr,e=>e.getUTCSeconds());_i.range;const d1=Ht(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zr)},(e,t)=>{e.setTime(+e+t*Jn)},(e,t)=>(t-e)/Jn,e=>e.getMinutes());d1.range;const h1=Ht(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Jn)},(e,t)=>(t-e)/Jn,e=>e.getUTCMinutes());h1.range;const p1=Ht(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zr-e.getMinutes()*Jn)},(e,t)=>{e.setTime(+e+t*Wr)},(e,t)=>(t-e)/Wr,e=>e.getHours());p1.range;const m1=Ht(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Wr)},(e,t)=>(t-e)/Wr,e=>e.getUTCHours());m1.range;const Mu=Ht(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Jn)/na,e=>e.getDate()-1);Mu.range;const Hd=Ht(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/na,e=>e.getUTCDate()-1);Hd.range;const Sk=Ht(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/na,e=>Math.floor(e/na));Sk.range;function $i(e){return Ht(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())*Jn)/f1)}const Gd=$i(0),If=$i(1),V9=$i(2),F9=$i(3),Il=$i(4),K9=$i(5),X9=$i(6);Gd.range;If.range;V9.range;F9.range;Il.range;K9.range;X9.range;function qi(e){return Ht(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)/f1)}const Yd=qi(0),Hf=qi(1),Z9=qi(2),W9=qi(3),Hl=qi(4),Q9=qi(5),J9=qi(6);Yd.range;Hf.range;Z9.range;W9.range;Hl.range;Q9.range;J9.range;const v1=Ht(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());v1.range;const y1=Ht(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());y1.range;const ra=Ht(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());ra.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ht(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)});ra.range;const aa=Ht(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());aa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ht(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)});aa.range;function wk(e,t,n,r,l,o){const c=[[_i,1,Zr],[_i,5,5*Zr],[_i,15,15*Zr],[_i,30,30*Zr],[o,1,Jn],[o,5,5*Jn],[o,15,15*Jn],[o,30,30*Jn],[l,1,Wr],[l,3,3*Wr],[l,6,6*Wr],[l,12,12*Wr],[r,1,na],[r,2,2*na],[n,1,f1],[t,1,bE],[t,3,3*bE],[e,1,Vg]];function d(p,v,m){const g=v<p;g&&([p,v]=[v,p]);const j=m&&typeof m.range=="function"?m:h(p,v,m),S=j?j.range(p,+v+1):[];return g?S.reverse():S}function h(p,v,m){const g=Math.abs(v-p)/m,j=J0(([,,x])=>x).right(c,g);if(j===c.length)return e.every(vx(p/Vg,v/Vg,m));if(j===0)return Uf.every(Math.max(vx(p,v,m),1));const[S,_]=c[g/c[j-1][2]<c[j][2]/g?j-1:j];return S.every(_)}return[d,h]}const[e7,t7]=wk(aa,y1,Yd,Sk,m1,h1),[n7,r7]=wk(ra,v1,Gd,Mu,p1,d1);function Fg(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 Kg(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 gs(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function a7(e){var t=e.dateTime,n=e.date,r=e.time,l=e.periods,o=e.days,c=e.shortDays,d=e.months,h=e.shortMonths,p=bs(l),v=xs(l),m=bs(o),g=xs(o),j=bs(c),S=xs(c),_=bs(d),x=xs(d),O=bs(h),w=xs(h),E={a:$,A:U,b:ie,B:fe,c:null,d:OE,e:OE,f:N7,g:q7,G:L7,H:w7,I:O7,j:A7,L:Ok,m:E7,M:T7,p:L,q:F,Q:EE,s:TE,S:C7,u:M7,U:k7,V:R7,w:P7,W:D7,x:null,X:null,y:$7,Y:z7,Z:B7,"%":NE},M={a:q,A:de,b:ge,B:we,c:null,d:AE,e:AE,f:G7,g:eI,G:nI,H:U7,I:I7,j:H7,L:Nk,m:Y7,M:V7,p:$e,q:Ge,Q:EE,s:TE,S:F7,u:K7,U:X7,V:Z7,w:W7,W:Q7,x:null,X:null,y:J7,Y:tI,Z:rI,"%":NE},A={a:Z,A:G,b:H,B:W,c:Q,d:SE,e:SE,f:x7,g:_E,G:jE,H:wE,I:wE,j:v7,L:b7,m:m7,M:y7,p:B,q:p7,Q:_7,s:S7,S:g7,u:u7,U:c7,V:f7,w:s7,W:d7,x:D,X:P,y:_E,Y:jE,Z:h7,"%":j7};E.x=C(n,E),E.X=C(r,E),E.c=C(t,E),M.x=C(n,M),M.X=C(r,M),M.c=C(t,M);function C(me,Te){return function(Me){var he=[],st=-1,ae=0,Ke=me.length,St,nn,ar;for(Me instanceof Date||(Me=new Date(+Me));++st<Ke;)me.charCodeAt(st)===37&&(he.push(me.slice(ae,st)),(nn=xE[St=me.charAt(++st)])!=null?St=me.charAt(++st):nn=St==="e"?" ":"0",(ar=Te[St])&&(St=ar(Me,nn)),he.push(St),ae=st+1);return he.push(me.slice(ae,st)),he.join("")}}function k(me,Te){return function(Me){var he=gs(1900,void 0,1),st=z(he,me,Me+="",0),ae,Ke;if(st!=Me.length)return null;if("Q"in he)return new Date(he.Q);if("s"in he)return new Date(he.s*1e3+("L"in he?he.L:0));if(Te&&!("Z"in he)&&(he.Z=0),"p"in he&&(he.H=he.H%12+he.p*12),he.m===void 0&&(he.m="q"in he?he.q:0),"V"in he){if(he.V<1||he.V>53)return null;"w"in he||(he.w=1),"Z"in he?(ae=Kg(gs(he.y,0,1)),Ke=ae.getUTCDay(),ae=Ke>4||Ke===0?Hf.ceil(ae):Hf(ae),ae=Hd.offset(ae,(he.V-1)*7),he.y=ae.getUTCFullYear(),he.m=ae.getUTCMonth(),he.d=ae.getUTCDate()+(he.w+6)%7):(ae=Fg(gs(he.y,0,1)),Ke=ae.getDay(),ae=Ke>4||Ke===0?If.ceil(ae):If(ae),ae=Mu.offset(ae,(he.V-1)*7),he.y=ae.getFullYear(),he.m=ae.getMonth(),he.d=ae.getDate()+(he.w+6)%7)}else("W"in he||"U"in he)&&("w"in he||(he.w="u"in he?he.u%7:"W"in he?1:0),Ke="Z"in he?Kg(gs(he.y,0,1)).getUTCDay():Fg(gs(he.y,0,1)).getDay(),he.m=0,he.d="W"in he?(he.w+6)%7+he.W*7-(Ke+5)%7:he.w+he.U*7-(Ke+6)%7);return"Z"in he?(he.H+=he.Z/100|0,he.M+=he.Z%100,Kg(he)):Fg(he)}}function z(me,Te,Me,he){for(var st=0,ae=Te.length,Ke=Me.length,St,nn;st<ae;){if(he>=Ke)return-1;if(St=Te.charCodeAt(st++),St===37){if(St=Te.charAt(st++),nn=A[St in xE?Te.charAt(st++):St],!nn||(he=nn(me,Me,he))<0)return-1}else if(St!=Me.charCodeAt(he++))return-1}return he}function B(me,Te,Me){var he=p.exec(Te.slice(Me));return he?(me.p=v.get(he[0].toLowerCase()),Me+he[0].length):-1}function Z(me,Te,Me){var he=j.exec(Te.slice(Me));return he?(me.w=S.get(he[0].toLowerCase()),Me+he[0].length):-1}function G(me,Te,Me){var he=m.exec(Te.slice(Me));return he?(me.w=g.get(he[0].toLowerCase()),Me+he[0].length):-1}function H(me,Te,Me){var he=O.exec(Te.slice(Me));return he?(me.m=w.get(he[0].toLowerCase()),Me+he[0].length):-1}function W(me,Te,Me){var he=_.exec(Te.slice(Me));return he?(me.m=x.get(he[0].toLowerCase()),Me+he[0].length):-1}function Q(me,Te,Me){return z(me,t,Te,Me)}function D(me,Te,Me){return z(me,n,Te,Me)}function P(me,Te,Me){return z(me,r,Te,Me)}function $(me){return c[me.getDay()]}function U(me){return o[me.getDay()]}function ie(me){return h[me.getMonth()]}function fe(me){return d[me.getMonth()]}function L(me){return l[+(me.getHours()>=12)]}function F(me){return 1+~~(me.getMonth()/3)}function q(me){return c[me.getUTCDay()]}function de(me){return o[me.getUTCDay()]}function ge(me){return h[me.getUTCMonth()]}function we(me){return d[me.getUTCMonth()]}function $e(me){return l[+(me.getUTCHours()>=12)]}function Ge(me){return 1+~~(me.getUTCMonth()/3)}return{format:function(me){var Te=C(me+="",E);return Te.toString=function(){return me},Te},parse:function(me){var Te=k(me+="",!1);return Te.toString=function(){return me},Te},utcFormat:function(me){var Te=C(me+="",M);return Te.toString=function(){return me},Te},utcParse:function(me){var Te=k(me+="",!0);return Te.toString=function(){return me},Te}}}var xE={"-":"",_:" ",0:"0"},Kt=/^\s*\d+/,i7=/^%/,l7=/[\\^$*+?|[\]().{}]/g;function Fe(e,t,n){var r=e<0?"-":"",l=(r?-e:e)+"",o=l.length;return r+(o<n?new Array(n-o+1).join(t)+l:l)}function o7(e){return e.replace(l7,"\\$&")}function bs(e){return new RegExp("^(?:"+e.map(o7).join("|")+")","i")}function xs(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function s7(e,t,n){var r=Kt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function u7(e,t,n){var r=Kt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function c7(e,t,n){var r=Kt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function f7(e,t,n){var r=Kt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function d7(e,t,n){var r=Kt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function jE(e,t,n){var r=Kt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function _E(e,t,n){var r=Kt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function h7(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 p7(e,t,n){var r=Kt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function m7(e,t,n){var r=Kt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function SE(e,t,n){var r=Kt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function v7(e,t,n){var r=Kt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function wE(e,t,n){var r=Kt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function y7(e,t,n){var r=Kt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function g7(e,t,n){var r=Kt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function b7(e,t,n){var r=Kt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function x7(e,t,n){var r=Kt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function j7(e,t,n){var r=i7.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function _7(e,t,n){var r=Kt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function S7(e,t,n){var r=Kt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function OE(e,t){return Fe(e.getDate(),t,2)}function w7(e,t){return Fe(e.getHours(),t,2)}function O7(e,t){return Fe(e.getHours()%12||12,t,2)}function A7(e,t){return Fe(1+Mu.count(ra(e),e),t,3)}function Ok(e,t){return Fe(e.getMilliseconds(),t,3)}function N7(e,t){return Ok(e,t)+"000"}function E7(e,t){return Fe(e.getMonth()+1,t,2)}function T7(e,t){return Fe(e.getMinutes(),t,2)}function C7(e,t){return Fe(e.getSeconds(),t,2)}function M7(e){var t=e.getDay();return t===0?7:t}function k7(e,t){return Fe(Gd.count(ra(e)-1,e),t,2)}function Ak(e){var t=e.getDay();return t>=4||t===0?Il(e):Il.ceil(e)}function R7(e,t){return e=Ak(e),Fe(Il.count(ra(e),e)+(ra(e).getDay()===4),t,2)}function P7(e){return e.getDay()}function D7(e,t){return Fe(If.count(ra(e)-1,e),t,2)}function $7(e,t){return Fe(e.getFullYear()%100,t,2)}function q7(e,t){return e=Ak(e),Fe(e.getFullYear()%100,t,2)}function z7(e,t){return Fe(e.getFullYear()%1e4,t,4)}function L7(e,t){var n=e.getDay();return e=n>=4||n===0?Il(e):Il.ceil(e),Fe(e.getFullYear()%1e4,t,4)}function B7(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fe(t/60|0,"0",2)+Fe(t%60,"0",2)}function AE(e,t){return Fe(e.getUTCDate(),t,2)}function U7(e,t){return Fe(e.getUTCHours(),t,2)}function I7(e,t){return Fe(e.getUTCHours()%12||12,t,2)}function H7(e,t){return Fe(1+Hd.count(aa(e),e),t,3)}function Nk(e,t){return Fe(e.getUTCMilliseconds(),t,3)}function G7(e,t){return Nk(e,t)+"000"}function Y7(e,t){return Fe(e.getUTCMonth()+1,t,2)}function V7(e,t){return Fe(e.getUTCMinutes(),t,2)}function F7(e,t){return Fe(e.getUTCSeconds(),t,2)}function K7(e){var t=e.getUTCDay();return t===0?7:t}function X7(e,t){return Fe(Yd.count(aa(e)-1,e),t,2)}function Ek(e){var t=e.getUTCDay();return t>=4||t===0?Hl(e):Hl.ceil(e)}function Z7(e,t){return e=Ek(e),Fe(Hl.count(aa(e),e)+(aa(e).getUTCDay()===4),t,2)}function W7(e){return e.getUTCDay()}function Q7(e,t){return Fe(Hf.count(aa(e)-1,e),t,2)}function J7(e,t){return Fe(e.getUTCFullYear()%100,t,2)}function eI(e,t){return e=Ek(e),Fe(e.getUTCFullYear()%100,t,2)}function tI(e,t){return Fe(e.getUTCFullYear()%1e4,t,4)}function nI(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Hl(e):Hl.ceil(e),Fe(e.getUTCFullYear()%1e4,t,4)}function rI(){return"+0000"}function NE(){return"%"}function EE(e){return+e}function TE(e){return Math.floor(+e/1e3)}var wl,Tk,Ck;aI({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 aI(e){return wl=a7(e),Tk=wl.format,wl.parse,Ck=wl.utcFormat,wl.utcParse,wl}function iI(e){return new Date(e)}function lI(e){return e instanceof Date?+e:+new Date(+e)}function g1(e,t,n,r,l,o,c,d,h,p){var v=a1(),m=v.invert,g=v.domain,j=p(".%L"),S=p(":%S"),_=p("%I:%M"),x=p("%I %p"),O=p("%a %d"),w=p("%b %d"),E=p("%B"),M=p("%Y");function A(C){return(h(C)<C?j:d(C)<C?S:c(C)<C?_:o(C)<C?x:r(C)<C?l(C)<C?O:w:n(C)<C?E:M)(C)}return v.invert=function(C){return new Date(m(C))},v.domain=function(C){return arguments.length?g(Array.from(C,lI)):g().map(iI)},v.ticks=function(C){var k=g();return e(k[0],k[k.length-1],C??10)},v.tickFormat=function(C,k){return k==null?A:p(k)},v.nice=function(C){var k=g();return(!C||typeof C.range!="function")&&(C=t(k[0],k[k.length-1],C??10)),C?g(vk(k,C)):v},v.copy=function(){return Cu(v,g1(e,t,n,r,l,o,c,d,h,p))},v}function oI(){return rr.apply(g1(n7,r7,ra,v1,Gd,Mu,p1,d1,_i,Tk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function sI(){return rr.apply(g1(e7,t7,aa,y1,Yd,Hd,m1,h1,_i,Ck).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Vd(){var e=0,t=1,n,r,l,o,c=dn,d=!1,h;function p(m){return m==null||isNaN(m=+m)?h:c(l===0?.5:(m=(o(m)-n)*l,d?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t]=m,n=o(e=+e),r=o(t=+t),l=n===r?0:1/(r-n),p):[e,t]},p.clamp=function(m){return arguments.length?(d=!!m,p):d},p.interpolator=function(m){return arguments.length?(c=m,p):c};function v(m){return function(g){var j,S;return arguments.length?([j,S]=g,c=m(j,S),p):[c(0),c(1)]}}return p.range=v(vo),p.rangeRound=v(r1),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return o=m,n=m(e),r=m(t),l=n===r?0:1/(r-n),p}}function Fa(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Mk(){var e=Va(Vd()(dn));return e.copy=function(){return Fa(e,Mk())},sa.apply(e,arguments)}function kk(){var e=o1(Vd()).domain([1,10]);return e.copy=function(){return Fa(e,kk()).base(e.base())},sa.apply(e,arguments)}function Rk(){var e=s1(Vd());return e.copy=function(){return Fa(e,Rk()).constant(e.constant())},sa.apply(e,arguments)}function b1(){var e=u1(Vd());return e.copy=function(){return Fa(e,b1()).exponent(e.exponent())},sa.apply(e,arguments)}function uI(){return b1.apply(null,arguments).exponent(.5)}function Pk(){var e=[],t=dn;function n(r){if(r!=null&&!isNaN(r=+r))return t((Eu(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let l of r)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Ua),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,l)=>t(l/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(l,o)=>XU(e,o/r))},n.copy=function(){return Pk(t).domain(e)},sa.apply(n,arguments)}function Fd(){var e=0,t=.5,n=1,r=1,l,o,c,d,h,p=dn,v,m=!1,g;function j(_){return isNaN(_=+_)?g:(_=.5+((_=+v(_))-o)*(r*_<r*o?d:h),p(m?Math.max(0,Math.min(1,_)):_))}j.domain=function(_){return arguments.length?([e,t,n]=_,l=v(e=+e),o=v(t=+t),c=v(n=+n),d=l===o?0:.5/(o-l),h=o===c?0:.5/(c-o),r=o<l?-1:1,j):[e,t,n]},j.clamp=function(_){return arguments.length?(m=!!_,j):m},j.interpolator=function(_){return arguments.length?(p=_,j):p};function S(_){return function(x){var O,w,E;return arguments.length?([O,w,E]=x,p=j9(_,[O,w,E]),j):[p(0),p(.5),p(1)]}}return j.range=S(vo),j.rangeRound=S(r1),j.unknown=function(_){return arguments.length?(g=_,j):g},function(_){return v=_,l=_(e),o=_(t),c=_(n),d=l===o?0:.5/(o-l),h=o===c?0:.5/(c-o),r=o<l?-1:1,j}}function Dk(){var e=Va(Fd()(dn));return e.copy=function(){return Fa(e,Dk())},sa.apply(e,arguments)}function $k(){var e=o1(Fd()).domain([.1,1,10]);return e.copy=function(){return Fa(e,$k()).base(e.base())},sa.apply(e,arguments)}function qk(){var e=s1(Fd());return e.copy=function(){return Fa(e,qk()).constant(e.constant())},sa.apply(e,arguments)}function x1(){var e=u1(Fd());return e.copy=function(){return Fa(e,x1()).exponent(e.exponent())},sa.apply(e,arguments)}function cI(){return x1.apply(null,arguments).exponent(.5)}const CE=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ys,scaleDiverging:Dk,scaleDivergingLog:$k,scaleDivergingPow:x1,scaleDivergingSqrt:cI,scaleDivergingSymlog:qk,scaleIdentity:mk,scaleImplicit:yx,scaleLinear:Bf,scaleLog:yk,scaleOrdinal:e1,scalePoint:Ms,scalePow:c1,scaleQuantile:xk,scaleQuantize:jk,scaleRadial:bk,scaleSequential:Mk,scaleSequentialLog:kk,scaleSequentialPow:b1,scaleSequentialQuantile:Pk,scaleSequentialSqrt:uI,scaleSequentialSymlog:Rk,scaleSqrt:G9,scaleSymlog:gk,scaleThreshold:_k,scaleTime:oI,scaleUtc:sI,tickFormat:pk},Symbol.toStringTag,{value:"Module"}));var Xg,ME;function Kd(){if(ME)return Xg;ME=1;var e=fo();function t(n,r,l){for(var o=-1,c=n.length;++o<c;){var d=n[o],h=r(d);if(h!=null&&(p===void 0?h===h&&!e(h):l(h,p)))var p=h,v=d}return v}return Xg=t,Xg}var Zg,kE;function zk(){if(kE)return Zg;kE=1;function e(t,n){return t>n}return Zg=e,Zg}var Wg,RE;function fI(){if(RE)return Wg;RE=1;var e=Kd(),t=zk(),n=po();function r(l){return l&&l.length?e(l,n,t):void 0}return Wg=r,Wg}var dI=fI();const Xd=rt(dI);var Qg,PE;function Lk(){if(PE)return Qg;PE=1;function e(t,n){return t<n}return Qg=e,Qg}var Jg,DE;function hI(){if(DE)return Jg;DE=1;var e=Kd(),t=Lk(),n=po();function r(l){return l&&l.length?e(l,n,t):void 0}return Jg=r,Jg}var pI=hI();const Zd=rt(pI);var eb,$E;function mI(){if($E)return eb;$E=1;var e=$0(),t=Er(),n=K3(),r=wn();function l(o,c){var d=r(o)?e:n;return d(o,t(c,3))}return eb=l,eb}var tb,qE;function vI(){if(qE)return tb;qE=1;var e=V3(),t=mI();function n(r,l){return e(t(r,l),1)}return tb=n,tb}var yI=vI();const gI=rt(yI);var nb,zE;function bI(){if(zE)return nb;zE=1;var e=X0();function t(n,r){return e(n,r)}return nb=t,nb}var xI=bI();const Wd=rt(xI);var yo=1e9,jI={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},_1,xt=!0,nr="[DecimalError] ",Ai=nr+"Invalid argument: ",j1=nr+"Exponent out of range: ",go=Math.floor,gi=Math.pow,_I=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$n,Vt=1e7,gt=7,Bk=9007199254740991,Gf=go(Bk/gt),be={};be.absoluteValue=be.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};be.comparedTo=be.cmp=function(e){var t,n,r,l,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,l=e.d.length,t=0,n=r<l?r:l;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===l?0:r>l^o.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*gt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};be.dividedBy=be.div=function(e){return ea(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,n=t.constructor;return dt(ea(t,new n(e),0,1),n.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return $t(this)};be.greaterThan=be.gt=function(e){return this.cmp(e)>0};be.greaterThanOrEqualTo=be.gte=function(e){return this.cmp(e)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(e){return this.cmp(e)<0};be.lessThanOrEqualTo=be.lte=function(e){return this.cmp(e)<1};be.logarithm=be.log=function(e){var t,n=this,r=n.constructor,l=r.precision,o=l+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq($n))throw Error(nr+"NaN");if(n.s<1)throw Error(nr+(n.s?"NaN":"-Infinity"));return n.eq($n)?new r(0):(xt=!1,t=ea(Zs(n,o),Zs(e,o),o),xt=!0,dt(t,l))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Hk(t,e):Uk(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,n=this,r=n.constructor,l=r.precision;if(e=new r(e),!e.s)throw Error(nr+"NaN");return n.s?(xt=!1,t=ea(n,e,0,1).times(e),xt=!0,n.minus(t)):dt(new r(n),l)};be.naturalExponential=be.exp=function(){return Ik(this)};be.naturalLogarithm=be.ln=function(){return Zs(this)};be.negated=be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};be.plus=be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Uk(t,e):Hk(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,n,r,l=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ai+e);if(t=$t(l)+1,r=l.d.length-1,n=r*gt+1,r=l.d[r],r){for(;r%10==0;r/=10)n--;for(r=l.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};be.squareRoot=be.sqrt=function(){var e,t,n,r,l,o,c,d=this,h=d.constructor;if(d.s<1){if(!d.s)return new h(0);throw Error(nr+"NaN")}for(e=$t(d),xt=!1,l=Math.sqrt(+d),l==0||l==1/0?(t=_r(d.d),(t.length+e)%2==0&&(t+="0"),l=Math.sqrt(t),e=go((e+1)/2)-(e<0||e%2),l==1/0?t="5e"+e:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new h(t)):r=new h(l.toString()),n=h.precision,l=c=n+3;;)if(o=r,r=o.plus(ea(d,o,c+2)).times(.5),_r(o.d).slice(0,c)===(t=_r(r.d)).slice(0,c)){if(t=t.slice(c-3,c+1),l==c&&t=="4999"){if(dt(o,n+1,0),o.times(o).eq(d)){r=o;break}}else if(t!="9999")break;c+=4}return xt=!0,dt(r,n)};be.times=be.mul=function(e){var t,n,r,l,o,c,d,h,p,v=this,m=v.constructor,g=v.d,j=(e=new m(e)).d;if(!v.s||!e.s)return new m(0);for(e.s*=v.s,n=v.e+e.e,h=g.length,p=j.length,h<p&&(o=g,g=j,j=o,c=h,h=p,p=c),o=[],c=h+p,r=c;r--;)o.push(0);for(r=p;--r>=0;){for(t=0,l=h+r;l>r;)d=o[l]+j[r]*g[l-r-1]+t,o[l--]=d%Vt|0,t=d/Vt|0;o[l]=(o[l]+t)%Vt|0}for(;!o[--c];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,xt?dt(e,m.precision):e};be.toDecimalPlaces=be.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Or(e,0,yo),t===void 0?t=r.rounding:Or(t,0,8),dt(n,e+$t(n)+1,t))};be.toExponential=function(e,t){var n,r=this,l=r.constructor;return e===void 0?n=Ci(r,!0):(Or(e,0,yo),t===void 0?t=l.rounding:Or(t,0,8),r=dt(new l(r),e+1,t),n=Ci(r,!0,e+1)),n};be.toFixed=function(e,t){var n,r,l=this,o=l.constructor;return e===void 0?Ci(l):(Or(e,0,yo),t===void 0?t=o.rounding:Or(t,0,8),r=dt(new o(l),e+$t(l)+1,t),n=Ci(r.abs(),!1,e+$t(r)+1),l.isneg()&&!l.isZero()?"-"+n:n)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return dt(new t(e),$t(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,n,r,l,o,c,d=this,h=d.constructor,p=12,v=+(e=new h(e));if(!e.s)return new h($n);if(d=new h(d),!d.s){if(e.s<1)throw Error(nr+"Infinity");return d}if(d.eq($n))return d;if(r=h.precision,e.eq($n))return dt(d,r);if(t=e.e,n=e.d.length-1,c=t>=n,o=d.s,c){if((n=v<0?-v:v)<=Bk){for(l=new h($n),t=Math.ceil(r/gt+4),xt=!1;n%2&&(l=l.times(d),BE(l.d,t)),n=go(n/2),n!==0;)d=d.times(d),BE(d.d,t);return xt=!0,e.s<0?new h($n).div(l):dt(l,r)}}else if(o<0)throw Error(nr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,d.s=1,xt=!1,l=e.times(Zs(d,r+p)),xt=!0,l=Ik(l),l.s=o,l};be.toPrecision=function(e,t){var n,r,l=this,o=l.constructor;return e===void 0?(n=$t(l),r=Ci(l,n<=o.toExpNeg||n>=o.toExpPos)):(Or(e,1,yo),t===void 0?t=o.rounding:Or(t,0,8),l=dt(new o(l),e,t),n=$t(l),r=Ci(l,e<=n||n<=o.toExpNeg,e)),r};be.toSignificantDigits=be.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Or(e,1,yo),t===void 0?t=r.rounding:Or(t,0,8)),dt(new r(n),e,t)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=$t(e),n=e.constructor;return Ci(e,t<=n.toExpNeg||t>=n.toExpPos)};function Uk(e,t){var n,r,l,o,c,d,h,p,v=e.constructor,m=v.precision;if(!e.s||!t.s)return t.s||(t=new v(e)),xt?dt(t,m):t;if(h=e.d,p=t.d,c=e.e,l=t.e,h=h.slice(),o=c-l,o){for(o<0?(r=h,o=-o,d=p.length):(r=p,l=c,d=h.length),c=Math.ceil(m/gt),d=c>d?c+1:d+1,o>d&&(o=d,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(d=h.length,o=p.length,d-o<0&&(o=d,r=p,p=h,h=r),n=0;o;)n=(h[--o]=h[o]+p[o]+n)/Vt|0,h[o]%=Vt;for(n&&(h.unshift(n),++l),d=h.length;h[--d]==0;)h.pop();return t.d=h,t.e=l,xt?dt(t,m):t}function Or(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Ai+e)}function _r(e){var t,n,r,l=e.length-1,o="",c=e[0];if(l>0){for(o+=c,t=1;t<l;t++)r=e[t]+"",n=gt-r.length,n&&(o+=qa(n)),o+=r;c=e[t],r=c+"",n=gt-r.length,n&&(o+=qa(n))}else if(c===0)return"0";for(;c%10===0;)c/=10;return o+c}var ea=(function(){function e(r,l){var o,c=0,d=r.length;for(r=r.slice();d--;)o=r[d]*l+c,r[d]=o%Vt|0,c=o/Vt|0;return c&&r.unshift(c),r}function t(r,l,o,c){var d,h;if(o!=c)h=o>c?1:-1;else for(d=h=0;d<o;d++)if(r[d]!=l[d]){h=r[d]>l[d]?1:-1;break}return h}function n(r,l,o){for(var c=0;o--;)r[o]-=c,c=r[o]<l[o]?1:0,r[o]=c*Vt+r[o]-l[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,l,o,c){var d,h,p,v,m,g,j,S,_,x,O,w,E,M,A,C,k,z,B=r.constructor,Z=r.s==l.s?1:-1,G=r.d,H=l.d;if(!r.s)return new B(r);if(!l.s)throw Error(nr+"Division by zero");for(h=r.e-l.e,k=H.length,A=G.length,j=new B(Z),S=j.d=[],p=0;H[p]==(G[p]||0);)++p;if(H[p]>(G[p]||0)&&--h,o==null?w=o=B.precision:c?w=o+($t(r)-$t(l))+1:w=o,w<0)return new B(0);if(w=w/gt+2|0,p=0,k==1)for(v=0,H=H[0],w++;(p<A||v)&&w--;p++)E=v*Vt+(G[p]||0),S[p]=E/H|0,v=E%H|0;else{for(v=Vt/(H[0]+1)|0,v>1&&(H=e(H,v),G=e(G,v),k=H.length,A=G.length),M=k,_=G.slice(0,k),x=_.length;x<k;)_[x++]=0;z=H.slice(),z.unshift(0),C=H[0],H[1]>=Vt/2&&++C;do v=0,d=t(H,_,k,x),d<0?(O=_[0],k!=x&&(O=O*Vt+(_[1]||0)),v=O/C|0,v>1?(v>=Vt&&(v=Vt-1),m=e(H,v),g=m.length,x=_.length,d=t(m,_,g,x),d==1&&(v--,n(m,k<g?z:H,g))):(v==0&&(d=v=1),m=H.slice()),g=m.length,g<x&&m.unshift(0),n(_,m,x),d==-1&&(x=_.length,d=t(H,_,k,x),d<1&&(v++,n(_,k<x?z:H,x))),x=_.length):d===0&&(v++,_=[0]),S[p++]=v,d&&_[0]?_[x++]=G[M]||0:(_=[G[M]],x=1);while((M++<A||_[0]!==void 0)&&w--)}return S[0]||S.shift(),j.e=h,dt(j,c?o+$t(j)+1:o)}})();function Ik(e,t){var n,r,l,o,c,d,h=0,p=0,v=e.constructor,m=v.precision;if($t(e)>16)throw Error(j1+$t(e));if(!e.s)return new v($n);for(xt=!1,d=m,c=new v(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(gi(2,p))/Math.LN10*2+5|0,d+=r,n=l=o=new v($n),v.precision=d;;){if(l=dt(l.times(e),d),n=n.times(++h),c=o.plus(ea(l,n,d)),_r(c.d).slice(0,d)===_r(o.d).slice(0,d)){for(;p--;)o=dt(o.times(o),d);return v.precision=m,t==null?(xt=!0,dt(o,m)):o}o=c}}function $t(e){for(var t=e.e*gt,n=e.d[0];n>=10;n/=10)t++;return t}function rb(e,t,n){if(t>e.LN10.sd())throw xt=!0,n&&(e.precision=n),Error(nr+"LN10 precision limit exceeded");return dt(new e(e.LN10),t)}function qa(e){for(var t="";e--;)t+="0";return t}function Zs(e,t){var n,r,l,o,c,d,h,p,v,m=1,g=10,j=e,S=j.d,_=j.constructor,x=_.precision;if(j.s<1)throw Error(nr+(j.s?"NaN":"-Infinity"));if(j.eq($n))return new _(0);if(t==null?(xt=!1,p=x):p=t,j.eq(10))return t==null&&(xt=!0),rb(_,p);if(p+=g,_.precision=p,n=_r(S),r=n.charAt(0),o=$t(j),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)j=j.times(e),n=_r(j.d),r=n.charAt(0),m++;o=$t(j),r>1?(j=new _("0."+n),o++):j=new _(r+"."+n.slice(1))}else return h=rb(_,p+2,x).times(o+""),j=Zs(new _(r+"."+n.slice(1)),p-g).plus(h),_.precision=x,t==null?(xt=!0,dt(j,x)):j;for(d=c=j=ea(j.minus($n),j.plus($n),p),v=dt(j.times(j),p),l=3;;){if(c=dt(c.times(v),p),h=d.plus(ea(c,new _(l),p)),_r(h.d).slice(0,p)===_r(d.d).slice(0,p))return d=d.times(2),o!==0&&(d=d.plus(rb(_,p+2,x).times(o+""))),d=ea(d,new _(m),p),_.precision=x,t==null?(xt=!0,dt(d,x)):d;d=h,l+=2}}function LE(e,t){var n,r,l;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(l=t.length;t.charCodeAt(l-1)===48;)--l;if(t=t.slice(r,l),t){if(l-=r,n=n-r-1,e.e=go(n/gt),e.d=[],r=(n+1)%gt,n<0&&(r+=gt),r<l){for(r&&e.d.push(+t.slice(0,r)),l-=gt;r<l;)e.d.push(+t.slice(r,r+=gt));t=t.slice(r),r=gt-t.length}else r-=l;for(;r--;)t+="0";if(e.d.push(+t),xt&&(e.e>Gf||e.e<-Gf))throw Error(j1+n)}else e.s=0,e.e=0,e.d=[0];return e}function dt(e,t,n){var r,l,o,c,d,h,p,v,m=e.d;for(c=1,o=m[0];o>=10;o/=10)c++;if(r=t-c,r<0)r+=gt,l=t,p=m[v=0];else{if(v=Math.ceil((r+1)/gt),o=m.length,v>=o)return e;for(p=o=m[v],c=1;o>=10;o/=10)c++;r%=gt,l=r-gt+c}if(n!==void 0&&(o=gi(10,c-l-1),d=p/o%10|0,h=t<0||m[v+1]!==void 0||p%o,h=n<4?(d||h)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||h||n==6&&(r>0?l>0?p/gi(10,c-l):0:m[v-1])%10&1||n==(e.s<0?8:7))),t<1||!m[0])return h?(o=$t(e),m.length=1,t=t-o-1,m[0]=gi(10,(gt-t%gt)%gt),e.e=go(-t/gt)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(r==0?(m.length=v,o=1,v--):(m.length=v+1,o=gi(10,gt-r),m[v]=l>0?(p/gi(10,c-l)%gi(10,l)|0)*o:0),h)for(;;)if(v==0){(m[0]+=o)==Vt&&(m[0]=1,++e.e);break}else{if(m[v]+=o,m[v]!=Vt)break;m[v--]=0,o=1}for(r=m.length;m[--r]===0;)m.pop();if(xt&&(e.e>Gf||e.e<-Gf))throw Error(j1+$t(e));return e}function Hk(e,t){var n,r,l,o,c,d,h,p,v,m,g=e.constructor,j=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),xt?dt(t,j):t;if(h=e.d,m=t.d,r=t.e,p=e.e,h=h.slice(),c=p-r,c){for(v=c<0,v?(n=h,c=-c,d=m.length):(n=m,r=p,d=h.length),l=Math.max(Math.ceil(j/gt),d)+2,c>l&&(c=l,n.length=1),n.reverse(),l=c;l--;)n.push(0);n.reverse()}else{for(l=h.length,d=m.length,v=l<d,v&&(d=l),l=0;l<d;l++)if(h[l]!=m[l]){v=h[l]<m[l];break}c=0}for(v&&(n=h,h=m,m=n,t.s=-t.s),d=h.length,l=m.length-d;l>0;--l)h[d++]=0;for(l=m.length;l>c;){if(h[--l]<m[l]){for(o=l;o&&h[--o]===0;)h[o]=Vt-1;--h[o],h[l]+=Vt}h[l]-=m[l]}for(;h[--d]===0;)h.pop();for(;h[0]===0;h.shift())--r;return h[0]?(t.d=h,t.e=r,xt?dt(t,j):t):new g(0)}function Ci(e,t,n){var r,l=$t(e),o=_r(e.d),c=o.length;return t?(n&&(r=n-c)>0?o=o.charAt(0)+"."+o.slice(1)+qa(r):c>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(l<0?"e":"e+")+l):l<0?(o="0."+qa(-l-1)+o,n&&(r=n-c)>0&&(o+=qa(r))):l>=c?(o+=qa(l+1-c),n&&(r=n-l-1)>0&&(o=o+"."+qa(r))):((r=l+1)<c&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-c)>0&&(l+1===c&&(o+="."),o+=qa(r))),e.s<0?"-"+o:o}function BE(e,t){if(e.length>t)return e.length=t,!0}function Gk(e){var t,n,r;function l(o){var c=this;if(!(c instanceof l))return new l(o);if(c.constructor=l,o instanceof l){c.s=o.s,c.e=o.e,c.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ai+o);if(o>0)c.s=1;else if(o<0)o=-o,c.s=-1;else{c.s=0,c.e=0,c.d=[0];return}if(o===~~o&&o<1e7){c.e=0,c.d=[o];return}return LE(c,o.toString())}else if(typeof o!="string")throw Error(Ai+o);if(o.charCodeAt(0)===45?(o=o.slice(1),c.s=-1):c.s=1,_I.test(o))LE(c,o);else throw Error(Ai+o)}if(l.prototype=be,l.ROUND_UP=0,l.ROUND_DOWN=1,l.ROUND_CEIL=2,l.ROUND_FLOOR=3,l.ROUND_HALF_UP=4,l.ROUND_HALF_DOWN=5,l.ROUND_HALF_EVEN=6,l.ROUND_HALF_CEIL=7,l.ROUND_HALF_FLOOR=8,l.clone=Gk,l.config=l.set=SI,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 l.config(e),l}function SI(e){if(!e||typeof e!="object")throw Error(nr+"Object expected");var t,n,r,l=["precision",1,yo,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<l.length;t+=3)if((r=e[n=l[t]])!==void 0)if(go(r)===r&&r>=l[t+1]&&r<=l[t+2])this[n]=r;else throw Error(Ai+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Ai+n+": "+r);return this}var _1=Gk(jI);$n=new _1(1);const ot=_1;function wI(e){return EI(e)||NI(e)||AI(e)||OI()}function OI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AI(e,t){if(e){if(typeof e=="string")return jx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jx(e,t)}}function NI(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function EI(e){if(Array.isArray(e))return jx(e)}function jx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var TI=function(t){return t},Yk={},Vk=function(t){return t===Yk},UE=function(t){return function n(){return arguments.length===0||arguments.length===1&&Vk(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},CI=function e(t,n){return t===1?n:UE(function(){for(var r=arguments.length,l=new Array(r),o=0;o<r;o++)l[o]=arguments[o];var c=l.filter(function(d){return d!==Yk}).length;return c>=t?n.apply(void 0,l):e(t-c,UE(function(){for(var d=arguments.length,h=new Array(d),p=0;p<d;p++)h[p]=arguments[p];var v=l.map(function(m){return Vk(m)?h.shift():m});return n.apply(void 0,wI(v).concat(h))}))})},Qd=function(t){return CI(t.length,t)},_x=function(t,n){for(var r=[],l=t;l<n;++l)r[l-t]=l;return r},MI=Qd(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),kI=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return TI;var l=n.reverse(),o=l[0],c=l.slice(1);return function(){return c.reduce(function(d,h){return h(d)},o.apply(void 0,arguments))}},Sx=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Fk=function(t){var n=null,r=null;return function(){for(var l=arguments.length,o=new Array(l),c=0;c<l;c++)o[c]=arguments[c];return n&&o.every(function(d,h){return d===n[h]})||(n=o,r=t.apply(void 0,o)),r}};function RI(e){var t;return e===0?t=1:t=Math.floor(new ot(e).abs().log(10).toNumber())+1,t}function PI(e,t,n){for(var r=new ot(e),l=0,o=[];r.lt(t)&&l<1e5;)o.push(r.toNumber()),r=r.add(n),l++;return o}var DI=Qd(function(e,t,n){var r=+e,l=+t;return r+n*(l-r)}),$I=Qd(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),qI=Qd(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Jd={rangeStep:PI,getDigitCount:RI,interpolateNumber:DI,uninterpolateNumber:$I,uninterpolateTruncation:qI};function wx(e){return BI(e)||LI(e)||Kk(e)||zI()}function zI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LI(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function BI(e){if(Array.isArray(e))return Ox(e)}function Ws(e,t){return HI(e)||II(e,t)||Kk(e,t)||UI()}function UI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kk(e,t){if(e){if(typeof e=="string")return Ox(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ox(e,t)}}function Ox(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function II(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,l=!1,o=void 0;try{for(var c=e[Symbol.iterator](),d;!(r=(d=c.next()).done)&&(n.push(d.value),!(t&&n.length===t));r=!0);}catch(h){l=!0,o=h}finally{try{!r&&c.return!=null&&c.return()}finally{if(l)throw o}}return n}}function HI(e){if(Array.isArray(e))return e}function Xk(e){var t=Ws(e,2),n=t[0],r=t[1],l=n,o=r;return n>r&&(l=r,o=n),[l,o]}function Zk(e,t,n){if(e.lte(0))return new ot(0);var r=Jd.getDigitCount(e.toNumber()),l=new ot(10).pow(r),o=e.div(l),c=r!==1?.05:.1,d=new ot(Math.ceil(o.div(c).toNumber())).add(n).mul(c),h=d.mul(l);return t?h:new ot(Math.ceil(h))}function GI(e,t,n){var r=1,l=new ot(e);if(!l.isint()&&n){var o=Math.abs(e);o<1?(r=new ot(10).pow(Jd.getDigitCount(e)-1),l=new ot(Math.floor(l.div(r).toNumber())).mul(r)):o>1&&(l=new ot(Math.floor(e)))}else e===0?l=new ot(Math.floor((t-1)/2)):n||(l=new ot(Math.floor(e)));var c=Math.floor((t-1)/2),d=kI(MI(function(h){return l.add(new ot(h-c).mul(r)).toNumber()}),_x);return d(0,t)}function Wk(e,t,n,r){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new ot(0),tickMin:new ot(0),tickMax:new ot(0)};var o=Zk(new ot(t).sub(e).div(n-1),r,l),c;e<=0&&t>=0?c=new ot(0):(c=new ot(e).add(t).div(2),c=c.sub(new ot(c).mod(o)));var d=Math.ceil(c.sub(e).div(o).toNumber()),h=Math.ceil(new ot(t).sub(c).div(o).toNumber()),p=d+h+1;return p>n?Wk(e,t,n,r,l+1):(p<n&&(h=t>0?h+(n-p):h,d=t>0?d:d+(n-p)),{step:o,tickMin:c.sub(new ot(d).mul(o)),tickMax:c.add(new ot(h).mul(o))})}function YI(e){var t=Ws(e,2),n=t[0],r=t[1],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=Math.max(l,2),d=Xk([n,r]),h=Ws(d,2),p=h[0],v=h[1];if(p===-1/0||v===1/0){var m=v===1/0?[p].concat(wx(_x(0,l-1).map(function(){return 1/0}))):[].concat(wx(_x(0,l-1).map(function(){return-1/0})),[v]);return n>r?Sx(m):m}if(p===v)return GI(p,l,o);var g=Wk(p,v,c,o),j=g.step,S=g.tickMin,_=g.tickMax,x=Jd.rangeStep(S,_.add(new ot(.1).mul(j)),j);return n>r?Sx(x):x}function VI(e,t){var n=Ws(e,2),r=n[0],l=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=Xk([r,l]),d=Ws(c,2),h=d[0],p=d[1];if(h===-1/0||p===1/0)return[r,l];if(h===p)return[h];var v=Math.max(t,2),m=Zk(new ot(p).sub(h).div(v-1),o,0),g=[].concat(wx(Jd.rangeStep(new ot(h),new ot(p).sub(new ot(.99).mul(m)),m)),[p]);return r>l?Sx(g):g}var FI=Fk(YI),KI=Fk(VI),XI="Invariant failed";function Mi(e,t){throw new Error(XI)}var ZI=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Gl(e){"@babel/helpers - typeof";return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(e)}function Yf(){return Yf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yf.apply(this,arguments)}function WI(e,t){return tH(e)||eH(e,t)||JI(e,t)||QI()}function QI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JI(e,t){if(e){if(typeof e=="string")return IE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IE(e,t)}}function IE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function tH(e){if(Array.isArray(e))return e}function nH(e,t){if(e==null)return{};var n=rH(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rH(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function aH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eR(r.key),r)}}function lH(e,t,n){return t&&iH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oH(e,t,n){return t=Vf(t),sH(e,Qk()?Reflect.construct(t,n||[],Vf(e).constructor):t.apply(e,n))}function sH(e,t){if(t&&(Gl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uH(e)}function uH(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qk=function(){return!!e})()}function Vf(e){return Vf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vf(e)}function cH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ax(e,t)}function Ax(e,t){return Ax=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},Ax(e,t)}function Jk(e,t,n){return t=eR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eR(e){var t=fH(e,"string");return Gl(t)=="symbol"?t:t+""}function fH(e,t){if(Gl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var eh=(function(e){function t(){return aH(this,t),oH(this,t,arguments)}return cH(t,e),lH(t,[{key:"render",value:function(){var r=this.props,l=r.offset,o=r.layout,c=r.width,d=r.dataKey,h=r.data,p=r.dataPointFormatter,v=r.xAxis,m=r.yAxis,g=nH(r,ZI),j=Ce(g,!1);this.props.direction==="x"&&v.type!=="number"&&Mi();var S=h.map(function(_){var x=p(_,d),O=x.x,w=x.y,E=x.value,M=x.errorVal;if(!M)return null;var A=[],C,k;if(Array.isArray(M)){var z=WI(M,2);C=z[0],k=z[1]}else C=k=M;if(o==="vertical"){var B=v.scale,Z=w+l,G=Z+c,H=Z-c,W=B(E-C),Q=B(E+k);A.push({x1:Q,y1:G,x2:Q,y2:H}),A.push({x1:W,y1:Z,x2:Q,y2:Z}),A.push({x1:W,y1:G,x2:W,y2:H})}else if(o==="horizontal"){var D=m.scale,P=O+l,$=P-c,U=P+c,ie=D(E-C),fe=D(E+k);A.push({x1:$,y1:fe,x2:U,y2:fe}),A.push({x1:P,y1:ie,x2:P,y2:fe}),A.push({x1:$,y1:ie,x2:U,y2:ie})}return Y.createElement(tt,Yf({className:"recharts-errorBar",key:"bar-".concat(A.map(function(L){return"".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))},j),A.map(function(L){return Y.createElement("line",Yf({},L,{key:"line-".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))}))});return Y.createElement(tt,{className:"recharts-errorBars"},S)}}])})(Y.Component);Jk(eh,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Jk(eh,"displayName","ErrorBar");function Qs(e){"@babel/helpers - typeof";return Qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(e)}function HE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function hi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HE(Object(n),!0).forEach(function(r){dH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dH(e,t,n){return t=hH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hH(e){var t=pH(e,"string");return Qs(t)=="symbol"?t:t+""}function pH(e,t){if(Qs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tR=function(t){var n=t.children,r=t.formattedGraphicalItems,l=t.legendWidth,o=t.legendContent,c=Dn(n,wi);if(!c)return null;var d=wi.defaultProps,h=d!==void 0?hi(hi({},d),c.props):{},p;return c.props&&c.props.payload?p=c.props&&c.props.payload:o==="children"?p=(r||[]).reduce(function(v,m){var g=m.item,j=m.props,S=j.sectors||j.data||[];return v.concat(S.map(function(_){return{type:c.props.iconType||g.props.legendType,value:_.name,color:_.fill,payload:_}}))},[]):p=(r||[]).map(function(v){var m=v.item,g=m.type.defaultProps,j=g!==void 0?hi(hi({},g),m.props):{},S=j.dataKey,_=j.name,x=j.legendType,O=j.hide;return{inactive:O,dataKey:S,type:h.iconType||x||"square",color:S1(m),value:_||S,payload:j}}),hi(hi(hi({},h),wi.getWithHeight(c,l)),{},{payload:p,item:c})};function Js(e){"@babel/helpers - typeof";return Js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Js(e)}function GE(e){return gH(e)||yH(e)||vH(e)||mH()}function mH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vH(e,t){if(e){if(typeof e=="string")return Nx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nx(e,t)}}function yH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gH(e){if(Array.isArray(e))return Nx(e)}function Nx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function YE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YE(Object(n),!0).forEach(function(r){Dl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dl(e,t,n){return t=bH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bH(e){var t=xH(e,"string");return Js(t)=="symbol"?t:t+""}function xH(e,t){if(Js(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Js(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sn(e,t,n){return ze(e)||ze(t)?n:It(t)?qn(e,t,n):ke(t)?t(e):n}function ks(e,t,n,r){var l=gI(e,function(d){return sn(d,t)});if(n==="number"){var o=l.filter(function(d){return ve(d)||parseFloat(d)});return o.length?[Zd(o),Xd(o)]:[1/0,-1/0]}var c=r?l.filter(function(d){return!ze(d)}):l;return c.map(function(d){return It(d)||d instanceof Date?d:""})}var jH=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,c=-1,d=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(d<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var h=o.range,p=0;p<d;p++){var v=p>0?l[p-1].coordinate:l[d-1].coordinate,m=l[p].coordinate,g=p>=d-1?l[0].coordinate:l[p+1].coordinate,j=void 0;if(cn(m-v)!==cn(g-m)){var S=[];if(cn(g-m)===cn(h[1]-h[0])){j=g;var _=m+h[1]-h[0];S[0]=Math.min(_,(_+v)/2),S[1]=Math.max(_,(_+v)/2)}else{j=v;var x=g+h[1]-h[0];S[0]=Math.min(m,(x+m)/2),S[1]=Math.max(m,(x+m)/2)}var O=[Math.min(m,(j+m)/2),Math.max(m,(j+m)/2)];if(t>O[0]&&t<=O[1]||t>=S[0]&&t<=S[1]){c=l[p].index;break}}else{var w=Math.min(v,g),E=Math.max(v,g);if(t>(w+m)/2&&t<=(E+m)/2){c=l[p].index;break}}}else for(var M=0;M<d;M++)if(M===0&&t<=(r[M].coordinate+r[M+1].coordinate)/2||M>0&&M<d-1&&t>(r[M].coordinate+r[M-1].coordinate)/2&&t<=(r[M].coordinate+r[M+1].coordinate)/2||M===d-1&&t>(r[M].coordinate+r[M-1].coordinate)/2){c=r[M].index;break}return c},S1=function(t){var n,r=t,l=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?At(At({},t.type.defaultProps),t.props):t.props,c=o.stroke,d=o.fill,h;switch(l){case"Line":h=c;break;case"Area":case"Radar":h=c&&c!=="none"?c:d;break;default:h=d;break}return h},_H=function(t){var n=t.barSize,r=t.totalSize,l=t.stackGroups,o=l===void 0?{}:l;if(!o)return{};for(var c={},d=Object.keys(o),h=0,p=d.length;h<p;h++)for(var v=o[d[h]].stackGroups,m=Object.keys(v),g=0,j=m.length;g<j;g++){var S=v[m[g]],_=S.items,x=S.cateAxisId,O=_.filter(function(k){return Jr(k.type).indexOf("Bar")>=0});if(O&&O.length){var w=O[0].type.defaultProps,E=w!==void 0?At(At({},w),O[0].props):O[0].props,M=E.barSize,A=E[x];c[A]||(c[A]=[]);var C=ze(M)?n:M;c[A].push({item:O[0],stackList:O.slice(1),barSize:ze(C)?void 0:fn(C,r,0)})}}return c},SH=function(t){var n=t.barGap,r=t.barCategoryGap,l=t.bandSize,o=t.sizeList,c=o===void 0?[]:o,d=t.maxBarSize,h=c.length;if(h<1)return null;var p=fn(n,l,0,!0),v,m=[];if(c[0].barSize===+c[0].barSize){var g=!1,j=l/h,S=c.reduce(function(M,A){return M+A.barSize||0},0);S+=(h-1)*p,S>=l&&(S-=(h-1)*p,p=0),S>=l&&j>0&&(g=!0,j*=.9,S=h*j);var _=(l-S)/2>>0,x={offset:_-p,size:0};v=c.reduce(function(M,A){var C={item:A.item,position:{offset:x.offset+x.size+p,size:g?j:A.barSize}},k=[].concat(GE(M),[C]);return x=k[k.length-1].position,A.stackList&&A.stackList.length&&A.stackList.forEach(function(z){k.push({item:z,position:x})}),k},m)}else{var O=fn(r,l,0,!0);l-2*O-(h-1)*p<=0&&(p=0);var w=(l-2*O-(h-1)*p)/h;w>1&&(w>>=0);var E=d===+d?Math.min(w,d):w;v=c.reduce(function(M,A,C){var k=[].concat(GE(M),[{item:A.item,position:{offset:O+(w+p)*C+(w-E)/2,size:E}}]);return A.stackList&&A.stackList.length&&A.stackList.forEach(function(z){k.push({item:z,position:k[k.length-1].position})}),k},m)}return v},wH=function(t,n,r,l){var o=r.children,c=r.width,d=r.margin,h=c-(d.left||0)-(d.right||0),p=tR({children:o,legendWidth:h});if(p){var v=l||{},m=v.width,g=v.height,j=p.align,S=p.verticalAlign,_=p.layout;if((_==="vertical"||_==="horizontal"&&S==="middle")&&j!=="center"&&ve(t[j]))return At(At({},t),{},Dl({},j,t[j]+(m||0)));if((_==="horizontal"||_==="vertical"&&j==="center")&&S!=="middle"&&ve(t[S]))return At(At({},t),{},Dl({},S,t[S]+(g||0)))}return t},OH=function(t,n,r){return ze(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},nR=function(t,n,r,l,o){var c=n.props.children,d=er(c,eh).filter(function(p){return OH(l,o,p.props.direction)});if(d&&d.length){var h=d.map(function(p){return p.props.dataKey});return t.reduce(function(p,v){var m=sn(v,r);if(ze(m))return p;var g=Array.isArray(m)?[Zd(m),Xd(m)]:[m,m],j=h.reduce(function(S,_){var x=sn(v,_,0),O=g[0]-Math.abs(Array.isArray(x)?x[0]:x),w=g[1]+Math.abs(Array.isArray(x)?x[1]:x);return[Math.min(O,S[0]),Math.max(w,S[1])]},[1/0,-1/0]);return[Math.min(j[0],p[0]),Math.max(j[1],p[1])]},[1/0,-1/0])}return null},AH=function(t,n,r,l,o){var c=n.map(function(d){return nR(t,d,r,o,l)}).filter(function(d){return!ze(d)});return c&&c.length?c.reduce(function(d,h){return[Math.min(d[0],h[0]),Math.max(d[1],h[1])]},[1/0,-1/0]):null},rR=function(t,n,r,l,o){var c=n.map(function(h){var p=h.props.dataKey;return r==="number"&&p&&nR(t,h,p,l)||ks(t,p,r,o)});if(r==="number")return c.reduce(function(h,p){return[Math.min(h[0],p[0]),Math.max(h[1],p[1])]},[1/0,-1/0]);var d={};return c.reduce(function(h,p){for(var v=0,m=p.length;v<m;v++)d[p[v]]||(d[p[v]]=!0,h.push(p[v]));return h},[])},aR=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},iR=function(t,n,r,l){if(l)return t.map(function(h){return h.coordinate});var o,c,d=t.map(function(h){return h.coordinate===n&&(o=!0),h.coordinate===r&&(c=!0),h.coordinate});return o||d.push(n),c||d.push(r),d},Qr=function(t,n,r){if(!t)return null;var l=t.scale,o=t.duplicateDomain,c=t.type,d=t.range,h=t.realScaleType==="scaleBand"?l.bandwidth()/2:2,p=(n||r)&&c==="category"&&l.bandwidth?l.bandwidth()/h:0;if(p=t.axisType==="angleAxis"&&(d==null?void 0:d.length)>=2?cn(d[0]-d[1])*2*p:p,n&&(t.ticks||t.niceTicks)){var v=(t.ticks||t.niceTicks).map(function(m){var g=o?o.indexOf(m):m;return{coordinate:l(g)+p,value:m,offset:p}});return v.filter(function(m){return!Ou(m.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(m,g){return{coordinate:l(m)+p,value:m,index:g,offset:p}}):l.ticks&&!r?l.ticks(t.tickCount).map(function(m){return{coordinate:l(m)+p,value:m,offset:p}}):l.domain().map(function(m,g){return{coordinate:l(m)+p,value:o?o[m]:m,index:g,offset:p}})},ab=new WeakMap,of=function(t,n){if(typeof n!="function")return t;ab.has(t)||ab.set(t,new WeakMap);var r=ab.get(t);if(r.has(n))return r.get(n);var l=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,l),l},lR=function(t,n,r){var l=t.scale,o=t.type,c=t.layout,d=t.axisType;if(l==="auto")return c==="radial"&&d==="radiusAxis"?{scale:Ys(),realScaleType:"band"}:c==="radial"&&d==="angleAxis"?{scale:Bf(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Ms(),realScaleType:"point"}:o==="category"?{scale:Ys(),realScaleType:"band"}:{scale:Bf(),realScaleType:"linear"};if(Ni(l)){var h="scale".concat(Pd(l));return{scale:(CE[h]||Ms)(),realScaleType:CE[h]?h:"point"}}return ke(l)?{scale:l}:{scale:Ms(),realScaleType:"point"}},VE=1e-4,oR=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,l=t.range(),o=Math.min(l[0],l[1])-VE,c=Math.max(l[0],l[1])+VE,d=t(n[0]),h=t(n[r-1]);(d<o||d>c||h<o||h>c)&&t.domain([n[0],n[r-1]])}},NH=function(t,n){if(!t)return null;for(var r=0,l=t.length;r<l;r++)if(t[r].item===n)return t[r].position;return null},EH=function(t,n){if(!n||n.length!==2||!ve(n[0])||!ve(n[1]))return t;var r=Math.min(n[0],n[1]),l=Math.max(n[0],n[1]),o=[t[0],t[1]];return(!ve(t[0])||t[0]<r)&&(o[0]=r),(!ve(t[1])||t[1]>l)&&(o[1]=l),o[0]>l&&(o[0]=l),o[1]<r&&(o[1]=r),o},TH=function(t){var n=t.length;if(!(n<=0))for(var r=0,l=t[0].length;r<l;++r)for(var o=0,c=0,d=0;d<n;++d){var h=Ou(t[d][r][1])?t[d][r][0]:t[d][r][1];h>=0?(t[d][r][0]=o,t[d][r][1]=o+h,o=t[d][r][1]):(t[d][r][0]=c,t[d][r][1]=c+h,c=t[d][r][1])}},CH=function(t){var n=t.length;if(!(n<=0))for(var r=0,l=t[0].length;r<l;++r)for(var o=0,c=0;c<n;++c){var d=Ou(t[c][r][1])?t[c][r][0]:t[c][r][1];d>=0?(t[c][r][0]=o,t[c][r][1]=o+d,o=t[c][r][1]):(t[c][r][0]=0,t[c][r][1]=0)}},MH={sign:TH,expand:gz,none:$l,silhouette:bz,wiggle:xz,positive:CH},kH=function(t,n,r){var l=n.map(function(d){return d.props.dataKey}),o=MH[r],c=yz().keys(l).value(function(d,h){return+sn(d,h,0)}).order(rx).offset(o);return c(t)},RH=function(t,n,r,l,o,c){if(!t)return null;var d=c?n.reverse():n,h={},p=d.reduce(function(m,g){var j,S=(j=g.type)!==null&&j!==void 0&&j.defaultProps?At(At({},g.type.defaultProps),g.props):g.props,_=S.stackId,x=S.hide;if(x)return m;var O=S[r],w=m[O]||{hasStack:!1,stackGroups:{}};if(It(_)){var E=w.stackGroups[_]||{numericAxisId:r,cateAxisId:l,items:[]};E.items.push(g),w.hasStack=!0,w.stackGroups[_]=E}else w.stackGroups[Au("_stackId_")]={numericAxisId:r,cateAxisId:l,items:[g]};return At(At({},m),{},Dl({},O,w))},h),v={};return Object.keys(p).reduce(function(m,g){var j=p[g];if(j.hasStack){var S={};j.stackGroups=Object.keys(j.stackGroups).reduce(function(_,x){var O=j.stackGroups[x];return At(At({},_),{},Dl({},x,{numericAxisId:r,cateAxisId:l,items:O.items,stackedData:kH(t,O.items,o)}))},S)}return At(At({},m),{},Dl({},g,j))},v)},sR=function(t,n){var r=n.realScaleType,l=n.type,o=n.tickCount,c=n.originalDomain,d=n.allowDecimals,h=r||n.scale;if(h!=="auto"&&h!=="linear")return null;if(o&&l==="number"&&c&&(c[0]==="auto"||c[1]==="auto")){var p=t.domain();if(!p.length)return null;var v=FI(p,o,d);return t.domain([Zd(v),Xd(v)]),{niceTicks:v}}if(o&&l==="number"){var m=t.domain(),g=KI(m,o,d);return{niceTicks:g}}return null},FE=function(t){var n=t.axis,r=t.ticks,l=t.offset,o=t.bandSize,c=t.entry,d=t.index;if(n.type==="category")return r[d]?r[d].coordinate+l:null;var h=sn(c,n.dataKey,n.domain[d]);return ze(h)?null:n.scale(h)-o/2+l},PH=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var l=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return l<=0&&o>=0?0:o<0?o:l}return r[0]},DH=function(t,n){var r,l=(r=t.type)!==null&&r!==void 0&&r.defaultProps?At(At({},t.type.defaultProps),t.props):t.props,o=l.stackId;if(It(o)){var c=n[o];if(c){var d=c.items.indexOf(t);return d>=0?c.stackedData[d]:null}}return null},$H=function(t){return t.reduce(function(n,r){return[Zd(r.concat([n[0]]).filter(ve)),Xd(r.concat([n[1]]).filter(ve))]},[1/0,-1/0])},uR=function(t,n,r){return Object.keys(t).reduce(function(l,o){var c=t[o],d=c.stackedData,h=d.reduce(function(p,v){var m=$H(v.slice(n,r+1));return[Math.min(p[0],m[0]),Math.max(p[1],m[1])]},[1/0,-1/0]);return[Math.min(h[0],l[0]),Math.max(h[1],l[1])]},[1/0,-1/0]).map(function(l){return l===1/0||l===-1/0?0:l})},KE=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,XE=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ex=function(t,n,r){if(ke(t))return t(n,r);if(!Array.isArray(t))return n;var l=[];if(ve(t[0]))l[0]=r?t[0]:Math.min(t[0],n[0]);else if(KE.test(t[0])){var o=+KE.exec(t[0])[1];l[0]=n[0]-o}else ke(t[0])?l[0]=t[0](n[0]):l[0]=n[0];if(ve(t[1]))l[1]=r?t[1]:Math.max(t[1],n[1]);else if(XE.test(t[1])){var c=+XE.exec(t[1])[1];l[1]=n[1]+c}else ke(t[1])?l[1]=t[1](n[1]):l[1]=n[1];return l},Ff=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var l=t.scale.bandwidth();if(!r||l>0)return l}if(t&&n&&n.length>=2){for(var o=W0(n,function(m){return m.coordinate}),c=1/0,d=1,h=o.length;d<h;d++){var p=o[d],v=o[d-1];c=Math.min((p.coordinate||0)-(v.coordinate||0),c)}return c===1/0?0:c}return r?void 0:0},ZE=function(t,n,r){return!t||!t.length||Wd(t,qn(r,"type.defaultProps.domain"))?n:t},cR=function(t,n){var r=t.type.defaultProps?At(At({},t.type.defaultProps),t.props):t.props,l=r.dataKey,o=r.name,c=r.unit,d=r.formatter,h=r.tooltipType,p=r.chartType,v=r.hide;return At(At({},Ce(t,!1)),{},{dataKey:l,unit:c,formatter:d,name:o||l,color:S1(t),value:sn(n,l),type:h,payload:n,chartType:p,hide:v})};function eu(e){"@babel/helpers - typeof";return eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eu(e)}function WE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function Xr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WE(Object(n),!0).forEach(function(r){fR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fR(e,t,n){return t=qH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qH(e){var t=zH(e,"string");return eu(t)=="symbol"?t:t+""}function zH(e,t){if(eu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(eu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LH(e,t){return HH(e)||IH(e,t)||UH(e,t)||BH()}function BH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UH(e,t){if(e){if(typeof e=="string")return QE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QE(e,t)}}function QE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function IH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function HH(e){if(Array.isArray(e))return e}var Kf=Math.PI/180,GH=function(t){return t*180/Math.PI},mt=function(t,n,r,l){return{x:t+Math.cos(-Kf*l)*r,y:n+Math.sin(-Kf*l)*r}},dR=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},YH=function(t,n,r,l,o){var c=t.width,d=t.height,h=t.startAngle,p=t.endAngle,v=fn(t.cx,c,c/2),m=fn(t.cy,d,d/2),g=dR(c,d,r),j=fn(t.innerRadius,g,0),S=fn(t.outerRadius,g,g*.8),_=Object.keys(n);return _.reduce(function(x,O){var w=n[O],E=w.domain,M=w.reversed,A;if(ze(w.range))l==="angleAxis"?A=[h,p]:l==="radiusAxis"&&(A=[j,S]),M&&(A=[A[1],A[0]]);else{A=w.range;var C=A,k=LH(C,2);h=k[0],p=k[1]}var z=lR(w,o),B=z.realScaleType,Z=z.scale;Z.domain(E).range(A),oR(Z);var G=sR(Z,Xr(Xr({},w),{},{realScaleType:B})),H=Xr(Xr(Xr({},w),G),{},{range:A,radius:S,realScaleType:B,scale:Z,cx:v,cy:m,innerRadius:j,outerRadius:S,startAngle:h,endAngle:p});return Xr(Xr({},x),{},fR({},O,H))},{})},VH=function(t,n){var r=t.x,l=t.y,o=n.x,c=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(l-c,2))},FH=function(t,n){var r=t.x,l=t.y,o=n.cx,c=n.cy,d=VH({x:r,y:l},{x:o,y:c});if(d<=0)return{radius:d};var h=(r-o)/d,p=Math.acos(h);return l>c&&(p=2*Math.PI-p),{radius:d,angle:GH(p),angleInRadian:p}},KH=function(t){var n=t.startAngle,r=t.endAngle,l=Math.floor(n/360),o=Math.floor(r/360),c=Math.min(l,o);return{startAngle:n-c*360,endAngle:r-c*360}},XH=function(t,n){var r=n.startAngle,l=n.endAngle,o=Math.floor(r/360),c=Math.floor(l/360),d=Math.min(o,c);return t+d*360},JE=function(t,n){var r=t.x,l=t.y,o=FH({x:r,y:l},n),c=o.radius,d=o.angle,h=n.innerRadius,p=n.outerRadius;if(c<h||c>p)return!1;if(c===0)return!0;var v=KH(n),m=v.startAngle,g=v.endAngle,j=d,S;if(m<=g){for(;j>g;)j-=360;for(;j<m;)j+=360;S=j>=m&&j<=g}else{for(;j>m;)j-=360;for(;j<g;)j+=360;S=j>=g&&j<=m}return S?Xr(Xr({},n),{},{radius:c,angle:XH(j,n)}):null},hR=function(t){return!T.isValidElement(t)&&!ke(t)&&typeof t!="boolean"?t.className:""};function tu(e){"@babel/helpers - typeof";return tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(e)}var ZH=["offset"];function WH(e){return tG(e)||eG(e)||JH(e)||QH()}function QH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JH(e,t){if(e){if(typeof e=="string")return Tx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tx(e,t)}}function eG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tG(e){if(Array.isArray(e))return Tx(e)}function Tx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nG(e,t){if(e==null)return{};var n=rG(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rG(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function eT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eT(Object(n),!0).forEach(function(r){aG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aG(e,t,n){return t=iG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iG(e){var t=lG(e,"string");return tu(t)=="symbol"?t:t+""}function lG(e,t){if(tu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nu(){return nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nu.apply(this,arguments)}var oG=function(t){var n=t.value,r=t.formatter,l=ze(t.children)?n:t.children;return ke(r)?r(l):l},sG=function(t,n){var r=cn(n-t),l=Math.min(Math.abs(n-t),360);return r*l},uG=function(t,n,r){var l=t.position,o=t.viewBox,c=t.offset,d=t.className,h=o,p=h.cx,v=h.cy,m=h.innerRadius,g=h.outerRadius,j=h.startAngle,S=h.endAngle,_=h.clockWise,x=(m+g)/2,O=sG(j,S),w=O>=0?1:-1,E,M;l==="insideStart"?(E=j+w*c,M=_):l==="insideEnd"?(E=S-w*c,M=!_):l==="end"&&(E=S+w*c,M=_),M=O<=0?M:!M;var A=mt(p,v,x,E),C=mt(p,v,x,E+(M?1:-1)*359),k="M".concat(A.x,",").concat(A.y,`
    A`).concat(x,",").concat(x,",0,1,").concat(M?0:1,`,
    `).concat(C.x,",").concat(C.y),z=ze(t.id)?Au("recharts-radial-line-"):t.id;return Y.createElement("text",nu({},r,{dominantBaseline:"central",className:qe("recharts-radial-bar-label",d)}),Y.createElement("defs",null,Y.createElement("path",{id:z,d:k})),Y.createElement("textPath",{xlinkHref:"#".concat(z)},n))},cG=function(t){var n=t.viewBox,r=t.offset,l=t.position,o=n,c=o.cx,d=o.cy,h=o.innerRadius,p=o.outerRadius,v=o.startAngle,m=o.endAngle,g=(v+m)/2;if(l==="outside"){var j=mt(c,d,p+r,g),S=j.x,_=j.y;return{x:S,y:_,textAnchor:S>=c?"start":"end",verticalAnchor:"middle"}}if(l==="center")return{x:c,y:d,textAnchor:"middle",verticalAnchor:"middle"};if(l==="centerTop")return{x:c,y:d,textAnchor:"middle",verticalAnchor:"start"};if(l==="centerBottom")return{x:c,y:d,textAnchor:"middle",verticalAnchor:"end"};var x=(h+p)/2,O=mt(c,d,x,g),w=O.x,E=O.y;return{x:w,y:E,textAnchor:"middle",verticalAnchor:"middle"}},fG=function(t){var n=t.viewBox,r=t.parentViewBox,l=t.offset,o=t.position,c=n,d=c.x,h=c.y,p=c.width,v=c.height,m=v>=0?1:-1,g=m*l,j=m>0?"end":"start",S=m>0?"start":"end",_=p>=0?1:-1,x=_*l,O=_>0?"end":"start",w=_>0?"start":"end";if(o==="top"){var E={x:d+p/2,y:h-m*l,textAnchor:"middle",verticalAnchor:j};return Ut(Ut({},E),r?{height:Math.max(h-r.y,0),width:p}:{})}if(o==="bottom"){var M={x:d+p/2,y:h+v+g,textAnchor:"middle",verticalAnchor:S};return Ut(Ut({},M),r?{height:Math.max(r.y+r.height-(h+v),0),width:p}:{})}if(o==="left"){var A={x:d-x,y:h+v/2,textAnchor:O,verticalAnchor:"middle"};return Ut(Ut({},A),r?{width:Math.max(A.x-r.x,0),height:v}:{})}if(o==="right"){var C={x:d+p+x,y:h+v/2,textAnchor:w,verticalAnchor:"middle"};return Ut(Ut({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:v}:{})}var k=r?{width:p,height:v}:{};return o==="insideLeft"?Ut({x:d+x,y:h+v/2,textAnchor:w,verticalAnchor:"middle"},k):o==="insideRight"?Ut({x:d+p-x,y:h+v/2,textAnchor:O,verticalAnchor:"middle"},k):o==="insideTop"?Ut({x:d+p/2,y:h+g,textAnchor:"middle",verticalAnchor:S},k):o==="insideBottom"?Ut({x:d+p/2,y:h+v-g,textAnchor:"middle",verticalAnchor:j},k):o==="insideTopLeft"?Ut({x:d+x,y:h+g,textAnchor:w,verticalAnchor:S},k):o==="insideTopRight"?Ut({x:d+p-x,y:h+g,textAnchor:O,verticalAnchor:S},k):o==="insideBottomLeft"?Ut({x:d+x,y:h+v-g,textAnchor:w,verticalAnchor:j},k):o==="insideBottomRight"?Ut({x:d+p-x,y:h+v-g,textAnchor:O,verticalAnchor:j},k):ho(o)&&(ve(o.x)||xi(o.x))&&(ve(o.y)||xi(o.y))?Ut({x:d+fn(o.x,p),y:h+fn(o.y,v),textAnchor:"end",verticalAnchor:"end"},k):Ut({x:d+p/2,y:h+v/2,textAnchor:"middle",verticalAnchor:"middle"},k)},dG=function(t){return"cx"in t&&ve(t.cx)};function Ft(e){var t=e.offset,n=t===void 0?5:t,r=nG(e,ZH),l=Ut({offset:n},r),o=l.viewBox,c=l.position,d=l.value,h=l.children,p=l.content,v=l.className,m=v===void 0?"":v,g=l.textBreakAll;if(!o||ze(d)&&ze(h)&&!T.isValidElement(p)&&!ke(p))return null;if(T.isValidElement(p))return T.cloneElement(p,l);var j;if(ke(p)){if(j=T.createElement(p,l),T.isValidElement(j))return j}else j=oG(l);var S=dG(o),_=Ce(l,!0);if(S&&(c==="insideStart"||c==="insideEnd"||c==="end"))return uG(l,j,_);var x=S?cG(l):fG(l);return Y.createElement(Ti,nu({className:qe("recharts-label",m)},_,x,{breakAll:g}),j)}Ft.displayName="Label";var pR=function(t){var n=t.cx,r=t.cy,l=t.angle,o=t.startAngle,c=t.endAngle,d=t.r,h=t.radius,p=t.innerRadius,v=t.outerRadius,m=t.x,g=t.y,j=t.top,S=t.left,_=t.width,x=t.height,O=t.clockWise,w=t.labelViewBox;if(w)return w;if(ve(_)&&ve(x)){if(ve(m)&&ve(g))return{x:m,y:g,width:_,height:x};if(ve(j)&&ve(S))return{x:j,y:S,width:_,height:x}}return ve(m)&&ve(g)?{x:m,y:g,width:0,height:0}:ve(n)&&ve(r)?{cx:n,cy:r,startAngle:o||l||0,endAngle:c||l||0,innerRadius:p||0,outerRadius:v||h||d||0,clockWise:O}:t.viewBox?t.viewBox:{}},hG=function(t,n){return t?t===!0?Y.createElement(Ft,{key:"label-implicit",viewBox:n}):It(t)?Y.createElement(Ft,{key:"label-implicit",viewBox:n,value:t}):T.isValidElement(t)?t.type===Ft?T.cloneElement(t,{key:"label-implicit",viewBox:n}):Y.createElement(Ft,{key:"label-implicit",content:t,viewBox:n}):ke(t)?Y.createElement(Ft,{key:"label-implicit",content:t,viewBox:n}):ho(t)?Y.createElement(Ft,nu({viewBox:n},t,{key:"label-implicit"})):null:null},pG=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var l=t.children,o=pR(t),c=er(l,Ft).map(function(h,p){return T.cloneElement(h,{viewBox:n||o,key:"label-".concat(p)})});if(!r)return c;var d=hG(t.label,n||o);return[d].concat(WH(c))};Ft.parseViewBox=pR;Ft.renderCallByParent=pG;var ib,tT;function mG(){if(tT)return ib;tT=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return ib=e,ib}var vG=mG();const yG=rt(vG);function ru(e){"@babel/helpers - typeof";return ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(e)}var gG=["valueAccessor"],bG=["data","dataKey","clockWise","id","textBreakAll"];function xG(e){return wG(e)||SG(e)||_G(e)||jG()}function jG(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _G(e,t){if(e){if(typeof e=="string")return Cx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cx(e,t)}}function SG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wG(e){if(Array.isArray(e))return Cx(e)}function Cx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xf(){return Xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xf.apply(this,arguments)}function nT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function rT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nT(Object(n),!0).forEach(function(r){OG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OG(e,t,n){return t=AG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AG(e){var t=NG(e,"string");return ru(t)=="symbol"?t:t+""}function NG(e,t){if(ru(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ru(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aT(e,t){if(e==null)return{};var n=EG(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EG(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var TG=function(t){return Array.isArray(t.value)?yG(t.value):t.value};function Ia(e){var t=e.valueAccessor,n=t===void 0?TG:t,r=aT(e,gG),l=r.data,o=r.dataKey,c=r.clockWise,d=r.id,h=r.textBreakAll,p=aT(r,bG);return!l||!l.length?null:Y.createElement(tt,{className:"recharts-label-list"},l.map(function(v,m){var g=ze(o)?n(v,m):sn(v&&v.payload,o),j=ze(d)?{}:{id:"".concat(d,"-").concat(m)};return Y.createElement(Ft,Xf({},Ce(v,!0),p,j,{parentViewBox:v.parentViewBox,value:g,textBreakAll:h,viewBox:Ft.parseViewBox(ze(c)?v:rT(rT({},v),{},{clockWise:c})),key:"label-".concat(m),index:m}))}))}Ia.displayName="LabelList";function CG(e,t){return e?e===!0?Y.createElement(Ia,{key:"labelList-implicit",data:t}):Y.isValidElement(e)||ke(e)?Y.createElement(Ia,{key:"labelList-implicit",data:t,content:e}):ho(e)?Y.createElement(Ia,Xf({data:t},e,{key:"labelList-implicit"})):null:null}function MG(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,l=er(r,Ia).map(function(c,d){return T.cloneElement(c,{data:t,key:"labelList-".concat(d)})});if(!n)return l;var o=CG(e.label,t);return[o].concat(xG(l))}Ia.renderCallByParent=MG;function au(e){"@babel/helpers - typeof";return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(e)}function Mx(){return Mx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mx.apply(this,arguments)}function iT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function lT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iT(Object(n),!0).forEach(function(r){kG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kG(e,t,n){return t=RG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RG(e){var t=PG(e,"string");return au(t)=="symbol"?t:t+""}function PG(e,t){if(au(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(au(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DG=function(t,n){var r=cn(n-t),l=Math.min(Math.abs(n-t),359.999);return r*l},sf=function(t){var n=t.cx,r=t.cy,l=t.radius,o=t.angle,c=t.sign,d=t.isExternal,h=t.cornerRadius,p=t.cornerIsExternal,v=h*(d?1:-1)+l,m=Math.asin(h/v)/Kf,g=p?o:o+c*m,j=mt(n,r,v,g),S=mt(n,r,l,g),_=p?o-c*m:o,x=mt(n,r,v*Math.cos(m*Kf),_);return{center:j,circleTangency:S,lineTangency:x,theta:m}},mR=function(t){var n=t.cx,r=t.cy,l=t.innerRadius,o=t.outerRadius,c=t.startAngle,d=t.endAngle,h=DG(c,d),p=c+h,v=mt(n,r,o,c),m=mt(n,r,o,p),g="M ".concat(v.x,",").concat(v.y,`
    A `).concat(o,",").concat(o,`,0,
    `).concat(+(Math.abs(h)>180),",").concat(+(c>p),`,
    `).concat(m.x,",").concat(m.y,`
  `);if(l>0){var j=mt(n,r,l,c),S=mt(n,r,l,p);g+="L ".concat(S.x,",").concat(S.y,`
            A `).concat(l,",").concat(l,`,0,
            `).concat(+(Math.abs(h)>180),",").concat(+(c<=p),`,
            `).concat(j.x,",").concat(j.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},$G=function(t){var n=t.cx,r=t.cy,l=t.innerRadius,o=t.outerRadius,c=t.cornerRadius,d=t.forceCornerRadius,h=t.cornerIsExternal,p=t.startAngle,v=t.endAngle,m=cn(v-p),g=sf({cx:n,cy:r,radius:o,angle:p,sign:m,cornerRadius:c,cornerIsExternal:h}),j=g.circleTangency,S=g.lineTangency,_=g.theta,x=sf({cx:n,cy:r,radius:o,angle:v,sign:-m,cornerRadius:c,cornerIsExternal:h}),O=x.circleTangency,w=x.lineTangency,E=x.theta,M=h?Math.abs(p-v):Math.abs(p-v)-_-E;if(M<0)return d?"M ".concat(S.x,",").concat(S.y,`
        a`).concat(c,",").concat(c,",0,0,1,").concat(c*2,`,0
        a`).concat(c,",").concat(c,",0,0,1,").concat(-c*2,`,0
      `):mR({cx:n,cy:r,innerRadius:l,outerRadius:o,startAngle:p,endAngle:v});var A="M ".concat(S.x,",").concat(S.y,`
    A`).concat(c,",").concat(c,",0,0,").concat(+(m<0),",").concat(j.x,",").concat(j.y,`
    A`).concat(o,",").concat(o,",0,").concat(+(M>180),",").concat(+(m<0),",").concat(O.x,",").concat(O.y,`
    A`).concat(c,",").concat(c,",0,0,").concat(+(m<0),",").concat(w.x,",").concat(w.y,`
  `);if(l>0){var C=sf({cx:n,cy:r,radius:l,angle:p,sign:m,isExternal:!0,cornerRadius:c,cornerIsExternal:h}),k=C.circleTangency,z=C.lineTangency,B=C.theta,Z=sf({cx:n,cy:r,radius:l,angle:v,sign:-m,isExternal:!0,cornerRadius:c,cornerIsExternal:h}),G=Z.circleTangency,H=Z.lineTangency,W=Z.theta,Q=h?Math.abs(p-v):Math.abs(p-v)-B-W;if(Q<0&&c===0)return"".concat(A,"L").concat(n,",").concat(r,"Z");A+="L".concat(H.x,",").concat(H.y,`
      A`).concat(c,",").concat(c,",0,0,").concat(+(m<0),",").concat(G.x,",").concat(G.y,`
      A`).concat(l,",").concat(l,",0,").concat(+(Q>180),",").concat(+(m>0),",").concat(k.x,",").concat(k.y,`
      A`).concat(c,",").concat(c,",0,0,").concat(+(m<0),",").concat(z.x,",").concat(z.y,"Z")}else A+="L".concat(n,",").concat(r,"Z");return A},qG={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},vR=function(t){var n=lT(lT({},qG),t),r=n.cx,l=n.cy,o=n.innerRadius,c=n.outerRadius,d=n.cornerRadius,h=n.forceCornerRadius,p=n.cornerIsExternal,v=n.startAngle,m=n.endAngle,g=n.className;if(c<o||v===m)return null;var j=qe("recharts-sector",g),S=c-o,_=fn(d,S,0,!0),x;return _>0&&Math.abs(v-m)<360?x=$G({cx:r,cy:l,innerRadius:o,outerRadius:c,cornerRadius:Math.min(_,S/2),forceCornerRadius:h,cornerIsExternal:p,startAngle:v,endAngle:m}):x=mR({cx:r,cy:l,innerRadius:o,outerRadius:c,startAngle:v,endAngle:m}),Y.createElement("path",Mx({},Ce(n,!0),{className:j,d:x,role:"img"}))};function iu(e){"@babel/helpers - typeof";return iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iu(e)}function kx(){return kx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kx.apply(this,arguments)}function oT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function sT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oT(Object(n),!0).forEach(function(r){zG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zG(e,t,n){return t=LG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LG(e){var t=BG(e,"string");return iu(t)=="symbol"?t:t+""}function BG(e,t){if(iu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(iu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uT={curveBasisClosed:lz,curveBasisOpen:oz,curveBasis:iz,curveBumpX:Yq,curveBumpY:Vq,curveLinearClosed:sz,curveLinear:$d,curveMonotoneX:uz,curveMonotoneY:cz,curveNatural:fz,curveStep:dz,curveStepAfter:pz,curveStepBefore:hz},uf=function(t){return t.x===+t.x&&t.y===+t.y},js=function(t){return t.x},_s=function(t){return t.y},UG=function(t,n){if(ke(t))return t;var r="curve".concat(Pd(t));return(r==="curveMonotone"||r==="curveBump")&&n?uT["".concat(r).concat(n==="vertical"?"Y":"X")]:uT[r]||$d},IG=function(t){var n=t.type,r=n===void 0?"linear":n,l=t.points,o=l===void 0?[]:l,c=t.baseLine,d=t.layout,h=t.connectNulls,p=h===void 0?!1:h,v=UG(r,d),m=p?o.filter(function(_){return uf(_)}):o,g;if(Array.isArray(c)){var j=p?c.filter(function(_){return uf(_)}):c,S=m.map(function(_,x){return sT(sT({},_),{},{base:j[x]})});return d==="vertical"?g=Jc().y(_s).x1(js).x0(function(_){return _.base.x}):g=Jc().x(js).y1(_s).y0(function(_){return _.base.y}),g.defined(uf).curve(v),g(S)}return d==="vertical"&&ve(c)?g=Jc().y(_s).x1(js).x0(c):ve(c)?g=Jc().x(js).y1(_s).y0(c):g=m3().x(js).y(_s),g.defined(uf).curve(v),g(m)},Rx=function(t){var n=t.className,r=t.points,l=t.path,o=t.pathRef;if((!r||!r.length)&&!l)return null;var c=r&&r.length?IG(t):l;return T.createElement("path",kx({},Ce(t,!1),_f(t),{className:qe("recharts-curve",n),d:c,ref:o}))},lb={exports:{}},ob,cT;function HG(){if(cT)return ob;cT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ob=e,ob}var sb,fT;function GG(){if(fT)return sb;fT=1;var e=HG();function t(){}function n(){}return n.resetWarningCache=t,sb=function(){function r(c,d,h,p,v,m){if(m!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function l(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:l,element:r,elementType:r,instanceOf:l,node:r,objectOf:l,oneOf:l,oneOfType:l,shape:l,exact:l,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},sb}var dT;function YG(){return dT||(dT=1,lb.exports=GG()()),lb.exports}var VG=YG();const Qe=rt(VG),{getOwnPropertyNames:FG,getOwnPropertySymbols:KG}=Object,{hasOwnProperty:XG}=Object.prototype;function ub(e,t){return function(r,l,o){return e(r,l,o)&&t(r,l,o)}}function cf(e){return function(n,r,l){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,l);const{cache:o}=l,c=o.get(n),d=o.get(r);if(c&&d)return c===r&&d===n;o.set(n,r),o.set(r,n);const h=e(n,r,l);return o.delete(n),o.delete(r),h}}function ZG(e){return e!=null?e[Symbol.toStringTag]:void 0}function hT(e){return FG(e).concat(KG(e))}const WG=Object.hasOwn||((e,t)=>XG.call(e,t));function zi(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const QG="__v",JG="__o",eY="_owner",{getOwnPropertyDescriptor:pT,keys:mT}=Object;function tY(e,t){return e.byteLength===t.byteLength&&Zf(new Uint8Array(e),new Uint8Array(t))}function nY(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function rY(e,t){return e.byteLength===t.byteLength&&Zf(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function aY(e,t){return zi(e.getTime(),t.getTime())}function iY(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function lY(e,t){return e===t}function vT(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const l=new Array(r),o=e.entries();let c,d,h=0;for(;(c=o.next())&&!c.done;){const p=t.entries();let v=!1,m=0;for(;(d=p.next())&&!d.done;){if(l[m]){m++;continue}const g=c.value,j=d.value;if(n.equals(g[0],j[0],h,m,e,t,n)&&n.equals(g[1],j[1],g[0],j[0],e,t,n)){v=l[m]=!0;break}m++}if(!v)return!1;h++}return!0}const oY=zi;function sY(e,t,n){const r=mT(e);let l=r.length;if(mT(t).length!==l)return!1;for(;l-- >0;)if(!yR(e,t,n,r[l]))return!1;return!0}function Ss(e,t,n){const r=hT(e);let l=r.length;if(hT(t).length!==l)return!1;let o,c,d;for(;l-- >0;)if(o=r[l],!yR(e,t,n,o)||(c=pT(e,o),d=pT(t,o),(c||d)&&(!c||!d||c.configurable!==d.configurable||c.enumerable!==d.enumerable||c.writable!==d.writable)))return!1;return!0}function uY(e,t){return zi(e.valueOf(),t.valueOf())}function cY(e,t){return e.source===t.source&&e.flags===t.flags}function yT(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const l=new Array(r),o=e.values();let c,d;for(;(c=o.next())&&!c.done;){const h=t.values();let p=!1,v=0;for(;(d=h.next())&&!d.done;){if(!l[v]&&n.equals(c.value,d.value,c.value,d.value,e,t,n)){p=l[v]=!0;break}v++}if(!p)return!1}return!0}function Zf(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function fY(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function yR(e,t,n,r){return(r===eY||r===JG||r===QG)&&(e.$$typeof||t.$$typeof)?!0:WG(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const dY="[object ArrayBuffer]",hY="[object Arguments]",pY="[object Boolean]",mY="[object DataView]",vY="[object Date]",yY="[object Error]",gY="[object Map]",bY="[object Number]",xY="[object Object]",jY="[object RegExp]",_Y="[object Set]",SY="[object String]",wY={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},OY="[object URL]",AY=Object.prototype.toString;function NY({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:l,areFunctionsEqual:o,areMapsEqual:c,areNumbersEqual:d,areObjectsEqual:h,arePrimitiveWrappersEqual:p,areRegExpsEqual:v,areSetsEqual:m,areTypedArraysEqual:g,areUrlsEqual:j,unknownTagComparators:S}){return function(x,O,w){if(x===O)return!0;if(x==null||O==null)return!1;const E=typeof x;if(E!==typeof O)return!1;if(E!=="object")return E==="number"?d(x,O,w):E==="function"?o(x,O,w):!1;const M=x.constructor;if(M!==O.constructor)return!1;if(M===Object)return h(x,O,w);if(Array.isArray(x))return t(x,O,w);if(M===Date)return r(x,O,w);if(M===RegExp)return v(x,O,w);if(M===Map)return c(x,O,w);if(M===Set)return m(x,O,w);const A=AY.call(x);if(A===vY)return r(x,O,w);if(A===jY)return v(x,O,w);if(A===gY)return c(x,O,w);if(A===_Y)return m(x,O,w);if(A===xY)return typeof x.then!="function"&&typeof O.then!="function"&&h(x,O,w);if(A===OY)return j(x,O,w);if(A===yY)return l(x,O,w);if(A===hY)return h(x,O,w);if(wY[A])return g(x,O,w);if(A===dY)return e(x,O,w);if(A===mY)return n(x,O,w);if(A===pY||A===bY||A===SY)return p(x,O,w);if(S){let C=S[A];if(!C){const k=ZG(x);k&&(C=S[k])}if(C)return C(x,O,w)}return!1}}function EY({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:tY,areArraysEqual:n?Ss:nY,areDataViewsEqual:rY,areDatesEqual:aY,areErrorsEqual:iY,areFunctionsEqual:lY,areMapsEqual:n?ub(vT,Ss):vT,areNumbersEqual:oY,areObjectsEqual:n?Ss:sY,arePrimitiveWrappersEqual:uY,areRegExpsEqual:cY,areSetsEqual:n?ub(yT,Ss):yT,areTypedArraysEqual:n?ub(Zf,Ss):Zf,areUrlsEqual:fY,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const l=cf(r.areArraysEqual),o=cf(r.areMapsEqual),c=cf(r.areObjectsEqual),d=cf(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:l,areMapsEqual:o,areObjectsEqual:c,areSetsEqual:d})}return r}function TY(e){return function(t,n,r,l,o,c,d){return e(t,n,d)}}function CY({circular:e,comparator:t,createState:n,equals:r,strict:l}){if(n)return function(d,h){const{cache:p=e?new WeakMap:void 0,meta:v}=n();return t(d,h,{cache:p,equals:r,meta:v,strict:l})};if(e)return function(d,h){return t(d,h,{cache:new WeakMap,equals:r,meta:void 0,strict:l})};const o={cache:void 0,equals:r,meta:void 0,strict:l};return function(d,h){return t(d,h,o)}}const MY=Ka();Ka({strict:!0});Ka({circular:!0});Ka({circular:!0,strict:!0});Ka({createInternalComparator:()=>zi});Ka({strict:!0,createInternalComparator:()=>zi});Ka({circular:!0,createInternalComparator:()=>zi});Ka({circular:!0,createInternalComparator:()=>zi,strict:!0});function Ka(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:l=!1}=e,o=EY(e),c=NY(o),d=n?n(c):TY(c);return CY({circular:t,comparator:c,createState:r,equals:d,strict:l})}function kY(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function gT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function l(o){n<0&&(n=o),o-n>t?(e(o),n=-1):kY(l)};requestAnimationFrame(r)}function Px(e){"@babel/helpers - typeof";return Px=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Px(e)}function RY(e){return qY(e)||$Y(e)||DY(e)||PY()}function PY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DY(e,t){if(e){if(typeof e=="string")return bT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bT(e,t)}}function bT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $Y(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qY(e){if(Array.isArray(e))return e}function zY(){var e={},t=function(){return null},n=!1,r=function l(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var c=o,d=RY(c),h=d[0],p=d.slice(1);if(typeof h=="number"){gT(l.bind(null,p),h);return}l(h),gT(l.bind(null,p));return}Px(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function lu(e){"@babel/helpers - typeof";return lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lu(e)}function xT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function jT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xT(Object(n),!0).forEach(function(r){gR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gR(e,t,n){return t=LY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LY(e){var t=BY(e,"string");return lu(t)==="symbol"?t:String(t)}function BY(e,t){if(lu(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lu(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var UY=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,l){return r.filter(function(o){return l.includes(o)})})},IY=function(t){return t},HY=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Rs=function(t,n){return Object.keys(n).reduce(function(r,l){return jT(jT({},r),{},gR({},l,t(l,n[l])))},{})},_T=function(t,n,r){return t.map(function(l){return"".concat(HY(l)," ").concat(n,"ms ").concat(r)}).join(",")};function GY(e,t){return FY(e)||VY(e,t)||bR(e,t)||YY()}function YY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VY(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function FY(e){if(Array.isArray(e))return e}function KY(e){return WY(e)||ZY(e)||bR(e)||XY()}function XY(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bR(e,t){if(e){if(typeof e=="string")return Dx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dx(e,t)}}function ZY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WY(e){if(Array.isArray(e))return Dx(e)}function Dx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Wf=1e-4,xR=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},jR=function(t,n){return t.map(function(r,l){return r*Math.pow(n,l)}).reduce(function(r,l){return r+l})},ST=function(t,n){return function(r){var l=xR(t,n);return jR(l,r)}},QY=function(t,n){return function(r){var l=xR(t,n),o=[].concat(KY(l.map(function(c,d){return c*d}).slice(1)),[0]);return jR(o,r)}},wT=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var l=n[0],o=n[1],c=n[2],d=n[3];if(n.length===1)switch(n[0]){case"linear":l=0,o=0,c=1,d=1;break;case"ease":l=.25,o=.1,c=.25,d=1;break;case"ease-in":l=.42,o=0,c=1,d=1;break;case"ease-out":l=.42,o=0,c=.58,d=1;break;case"ease-in-out":l=0,o=0,c=.58,d=1;break;default:{var h=n[0].split("(");if(h[0]==="cubic-bezier"&&h[1].split(")")[0].split(",").length===4){var p=h[1].split(")")[0].split(",").map(function(x){return parseFloat(x)}),v=GY(p,4);l=v[0],o=v[1],c=v[2],d=v[3]}}}var m=ST(l,c),g=ST(o,d),j=QY(l,c),S=function(O){return O>1?1:O<0?0:O},_=function(O){for(var w=O>1?1:O,E=w,M=0;M<8;++M){var A=m(E)-w,C=j(E);if(Math.abs(A-w)<Wf||C<Wf)return g(E);E=S(E-A/C)}return g(E)};return _.isStepper=!1,_},JY=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,l=t.damping,o=l===void 0?8:l,c=t.dt,d=c===void 0?17:c,h=function(v,m,g){var j=-(v-m)*r,S=g*o,_=g+(j-S)*d/1e3,x=g*d/1e3+v;return Math.abs(x-m)<Wf&&Math.abs(_)<Wf?[m,0]:[x,_]};return h.isStepper=!0,h.dt=d,h},eV=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var l=n[0];if(typeof l=="string")switch(l){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return wT(l);case"spring":return JY();default:if(l.split("(")[0]==="cubic-bezier")return wT(l)}return typeof l=="function"?l:null};function ou(e){"@babel/helpers - typeof";return ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ou(e)}function OT(e){return rV(e)||nV(e)||_R(e)||tV()}function tV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rV(e){if(Array.isArray(e))return qx(e)}function AT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function en(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AT(Object(n),!0).forEach(function(r){$x(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $x(e,t,n){return t=aV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aV(e){var t=iV(e,"string");return ou(t)==="symbol"?t:String(t)}function iV(e,t){if(ou(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ou(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lV(e,t){return uV(e)||sV(e,t)||_R(e,t)||oV()}function oV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _R(e,t){if(e){if(typeof e=="string")return qx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qx(e,t)}}function qx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function uV(e){if(Array.isArray(e))return e}var Qf=function(t,n,r){return t+(n-t)*r},zx=function(t){var n=t.from,r=t.to;return n!==r},cV=function e(t,n,r){var l=Rs(function(o,c){if(zx(c)){var d=t(c.from,c.to,c.velocity),h=lV(d,2),p=h[0],v=h[1];return en(en({},c),{},{from:p,velocity:v})}return c},n);return r<1?Rs(function(o,c){return zx(c)?en(en({},c),{},{velocity:Qf(c.velocity,l[o].velocity,r),from:Qf(c.from,l[o].from,r)}):c},n):e(t,l,r-1)};const fV=(function(e,t,n,r,l){var o=UY(e,t),c=o.reduce(function(x,O){return en(en({},x),{},$x({},O,[e[O],t[O]]))},{}),d=o.reduce(function(x,O){return en(en({},x),{},$x({},O,{from:e[O],velocity:0,to:t[O]}))},{}),h=-1,p,v,m=function(){return null},g=function(){return Rs(function(O,w){return w.from},d)},j=function(){return!Object.values(d).filter(zx).length},S=function(O){p||(p=O);var w=O-p,E=w/n.dt;d=cV(n,d,E),l(en(en(en({},e),t),g())),p=O,j()||(h=requestAnimationFrame(m))},_=function(O){v||(v=O);var w=(O-v)/r,E=Rs(function(A,C){return Qf.apply(void 0,OT(C).concat([n(w)]))},c);if(l(en(en(en({},e),t),E)),w<1)h=requestAnimationFrame(m);else{var M=Rs(function(A,C){return Qf.apply(void 0,OT(C).concat([n(1)]))},c);l(en(en(en({},e),t),M))}};return m=n.isStepper?S:_,function(){return requestAnimationFrame(m),function(){cancelAnimationFrame(h)}}});function Yl(e){"@babel/helpers - typeof";return Yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yl(e)}var dV=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function hV(e,t){if(e==null)return{};var n=pV(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pV(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,o;for(o=0;o<r.length;o++)l=r[o],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function cb(e){return gV(e)||yV(e)||vV(e)||mV()}function mV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vV(e,t){if(e){if(typeof e=="string")return Lx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lx(e,t)}}function yV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gV(e){if(Array.isArray(e))return Lx(e)}function Lx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function NT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function ur(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NT(Object(n),!0).forEach(function(r){Es(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Es(e,t,n){return t=SR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xV(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SR(r.key),r)}}function jV(e,t,n){return t&&xV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function SR(e){var t=_V(e,"string");return Yl(t)==="symbol"?t:String(t)}function _V(e,t){if(Yl(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yl(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SV(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bx(e,t)}function Bx(e,t){return Bx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},Bx(e,t)}function wV(e){var t=OV();return function(){var r=Jf(e),l;if(t){var o=Jf(this).constructor;l=Reflect.construct(r,arguments,o)}else l=r.apply(this,arguments);return Ux(this,l)}}function Ux(e,t){if(t&&(Yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ix(e)}function Ix(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OV(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jf(e){return Jf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jf(e)}var ia=(function(e){SV(n,e);var t=wV(n);function n(r,l){var o;bV(this,n),o=t.call(this,r,l);var c=o.props,d=c.isActive,h=c.attributeName,p=c.from,v=c.to,m=c.steps,g=c.children,j=c.duration;if(o.handleStyleChange=o.handleStyleChange.bind(Ix(o)),o.changeStyle=o.changeStyle.bind(Ix(o)),!d||j<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:v}),Ux(o);if(m&&m.length)o.state={style:m[0].style};else if(p){if(typeof g=="function")return o.state={style:p},Ux(o);o.state={style:h?Es({},h,p):p}}else o.state={style:{}};return o}return jV(n,[{key:"componentDidMount",value:function(){var l=this.props,o=l.isActive,c=l.canBegin;this.mounted=!0,!(!o||!c)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(l){var o=this.props,c=o.isActive,d=o.canBegin,h=o.attributeName,p=o.shouldReAnimate,v=o.to,m=o.from,g=this.state.style;if(d){if(!c){var j={style:h?Es({},h,v):v};this.state&&g&&(h&&g[h]!==v||!h&&g!==v)&&this.setState(j);return}if(!(MY(l.to,v)&&l.canBegin&&l.isActive)){var S=!l.canBegin||!l.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var _=S||p?m:l.to;if(this.state&&g){var x={style:h?Es({},h,_):_};(h&&g[h]!==_||!h&&g!==_)&&this.setState(x)}this.runAnimation(ur(ur({},this.props),{},{from:_,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var l=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),l&&l()}},{key:"handleStyleChange",value:function(l){this.changeStyle(l)}},{key:"changeStyle",value:function(l){this.mounted&&this.setState({style:l})}},{key:"runJSAnimation",value:function(l){var o=this,c=l.from,d=l.to,h=l.duration,p=l.easing,v=l.begin,m=l.onAnimationEnd,g=l.onAnimationStart,j=fV(c,d,eV(p),h,this.changeStyle),S=function(){o.stopJSAnimation=j()};this.manager.start([g,v,S,h,m])}},{key:"runStepAnimation",value:function(l){var o=this,c=l.steps,d=l.begin,h=l.onAnimationStart,p=c[0],v=p.style,m=p.duration,g=m===void 0?0:m,j=function(_,x,O){if(O===0)return _;var w=x.duration,E=x.easing,M=E===void 0?"ease":E,A=x.style,C=x.properties,k=x.onAnimationEnd,z=O>0?c[O-1]:x,B=C||Object.keys(A);if(typeof M=="function"||M==="spring")return[].concat(cb(_),[o.runJSAnimation.bind(o,{from:z.style,to:A,duration:w,easing:M}),w]);var Z=_T(B,w,M),G=ur(ur(ur({},z.style),A),{},{transition:Z});return[].concat(cb(_),[G,w,k]).filter(IY)};return this.manager.start([h].concat(cb(c.reduce(j,[v,Math.max(g,d)])),[l.onAnimationEnd]))}},{key:"runAnimation",value:function(l){this.manager||(this.manager=zY());var o=l.begin,c=l.duration,d=l.attributeName,h=l.to,p=l.easing,v=l.onAnimationStart,m=l.onAnimationEnd,g=l.steps,j=l.children,S=this.manager;if(this.unSubscribe=S.subscribe(this.handleStyleChange),typeof p=="function"||typeof j=="function"||p==="spring"){this.runJSAnimation(l);return}if(g.length>1){this.runStepAnimation(l);return}var _=d?Es({},d,h):h,x=_T(Object.keys(_),c,p);S.start([v,o,ur(ur({},_),{},{transition:x}),c,m])}},{key:"render",value:function(){var l=this.props,o=l.children;l.begin;var c=l.duration;l.attributeName,l.easing;var d=l.isActive;l.steps,l.from,l.to,l.canBegin,l.onAnimationEnd,l.shouldReAnimate,l.onAnimationReStart;var h=hV(l,dV),p=T.Children.count(o),v=this.state.style;if(typeof o=="function")return o(v);if(!d||p===0||c<=0)return o;var m=function(j){var S=j.props,_=S.style,x=_===void 0?{}:_,O=S.className,w=T.cloneElement(j,ur(ur({},h),{},{style:ur(ur({},x),v),className:O}));return w};return p===1?m(T.Children.only(o)):Y.createElement("div",null,T.Children.map(o,function(g){return m(g)}))}}]),n})(T.PureComponent);ia.displayName="Animate";ia.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ia.propTypes={from:Qe.oneOfType([Qe.object,Qe.string]),to:Qe.oneOfType([Qe.object,Qe.string]),attributeName:Qe.string,duration:Qe.number,begin:Qe.number,easing:Qe.oneOfType([Qe.string,Qe.func]),steps:Qe.arrayOf(Qe.shape({duration:Qe.number.isRequired,style:Qe.object.isRequired,easing:Qe.oneOfType([Qe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Qe.func]),properties:Qe.arrayOf("string"),onAnimationEnd:Qe.func})),children:Qe.oneOfType([Qe.node,Qe.func]),isActive:Qe.bool,canBegin:Qe.bool,onAnimationEnd:Qe.func,shouldReAnimate:Qe.bool,onAnimationStart:Qe.func,onAnimationReStart:Qe.func};function su(e){"@babel/helpers - typeof";return su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},su(e)}function ed(){return ed=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ed.apply(this,arguments)}function AV(e,t){return CV(e)||TV(e,t)||EV(e,t)||NV()}function NV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EV(e,t){if(e){if(typeof e=="string")return ET(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ET(e,t)}}function ET(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function CV(e){if(Array.isArray(e))return e}function TT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function CT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TT(Object(n),!0).forEach(function(r){MV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MV(e,t,n){return t=kV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kV(e){var t=RV(e,"string");return su(t)=="symbol"?t:t+""}function RV(e,t){if(su(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(su(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MT=function(t,n,r,l,o){var c=Math.min(Math.abs(r)/2,Math.abs(l)/2),d=l>=0?1:-1,h=r>=0?1:-1,p=l>=0&&r>=0||l<0&&r<0?1:0,v;if(c>0&&o instanceof Array){for(var m=[0,0,0,0],g=0,j=4;g<j;g++)m[g]=o[g]>c?c:o[g];v="M".concat(t,",").concat(n+d*m[0]),m[0]>0&&(v+="A ".concat(m[0],",").concat(m[0],",0,0,").concat(p,",").concat(t+h*m[0],",").concat(n)),v+="L ".concat(t+r-h*m[1],",").concat(n),m[1]>0&&(v+="A ".concat(m[1],",").concat(m[1],",0,0,").concat(p,`,
        `).concat(t+r,",").concat(n+d*m[1])),v+="L ".concat(t+r,",").concat(n+l-d*m[2]),m[2]>0&&(v+="A ".concat(m[2],",").concat(m[2],",0,0,").concat(p,`,
        `).concat(t+r-h*m[2],",").concat(n+l)),v+="L ".concat(t+h*m[3],",").concat(n+l),m[3]>0&&(v+="A ".concat(m[3],",").concat(m[3],",0,0,").concat(p,`,
        `).concat(t,",").concat(n+l-d*m[3])),v+="Z"}else if(c>0&&o===+o&&o>0){var S=Math.min(c,o);v="M ".concat(t,",").concat(n+d*S,`
            A `).concat(S,",").concat(S,",0,0,").concat(p,",").concat(t+h*S,",").concat(n,`
            L `).concat(t+r-h*S,",").concat(n,`
            A `).concat(S,",").concat(S,",0,0,").concat(p,",").concat(t+r,",").concat(n+d*S,`
            L `).concat(t+r,",").concat(n+l-d*S,`
            A `).concat(S,",").concat(S,",0,0,").concat(p,",").concat(t+r-h*S,",").concat(n+l,`
            L `).concat(t+h*S,",").concat(n+l,`
            A `).concat(S,",").concat(S,",0,0,").concat(p,",").concat(t,",").concat(n+l-d*S," Z")}else v="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(l," h ").concat(-r," Z");return v},PV=function(t,n){if(!t||!n)return!1;var r=t.x,l=t.y,o=n.x,c=n.y,d=n.width,h=n.height;if(Math.abs(d)>0&&Math.abs(h)>0){var p=Math.min(o,o+d),v=Math.max(o,o+d),m=Math.min(c,c+h),g=Math.max(c,c+h);return r>=p&&r<=v&&l>=m&&l<=g}return!1},DV={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},w1=function(t){var n=CT(CT({},DV),t),r=T.useRef(),l=T.useState(-1),o=AV(l,2),c=o[0],d=o[1];T.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var M=r.current.getTotalLength();M&&d(M)}catch{}},[]);var h=n.x,p=n.y,v=n.width,m=n.height,g=n.radius,j=n.className,S=n.animationEasing,_=n.animationDuration,x=n.animationBegin,O=n.isAnimationActive,w=n.isUpdateAnimationActive;if(h!==+h||p!==+p||v!==+v||m!==+m||v===0||m===0)return null;var E=qe("recharts-rectangle",j);return w?Y.createElement(ia,{canBegin:c>0,from:{width:v,height:m,x:h,y:p},to:{width:v,height:m,x:h,y:p},duration:_,animationEasing:S,isActive:w},function(M){var A=M.width,C=M.height,k=M.x,z=M.y;return Y.createElement(ia,{canBegin:c>0,from:"0px ".concat(c===-1?1:c,"px"),to:"".concat(c,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:_,isActive:O,easing:S},Y.createElement("path",ed({},Ce(n,!0),{className:E,d:MT(k,z,A,C,g),ref:r})))}):Y.createElement("path",ed({},Ce(n,!0),{className:E,d:MT(h,p,v,m,g)}))},$V=["points","className","baseLinePoints","connectNulls"];function El(){return El=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},El.apply(this,arguments)}function qV(e,t){if(e==null)return{};var n=zV(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zV(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function kT(e){return IV(e)||UV(e)||BV(e)||LV()}function LV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BV(e,t){if(e){if(typeof e=="string")return Hx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hx(e,t)}}function UV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IV(e){if(Array.isArray(e))return Hx(e)}function Hx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var RT=function(t){return t&&t.x===+t.x&&t.y===+t.y},HV=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){RT(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),RT(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Ps=function(t,n){var r=HV(t);n&&(r=[r.reduce(function(o,c){return[].concat(kT(o),kT(c))},[])]);var l=r.map(function(o){return o.reduce(function(c,d,h){return"".concat(c).concat(h===0?"M":"L").concat(d.x,",").concat(d.y)},"")}).join("");return r.length===1?"".concat(l,"Z"):l},GV=function(t,n,r){var l=Ps(t,r);return"".concat(l.slice(-1)==="Z"?l.slice(0,-1):l,"L").concat(Ps(n.reverse(),r).slice(1))},YV=function(t){var n=t.points,r=t.className,l=t.baseLinePoints,o=t.connectNulls,c=qV(t,$V);if(!n||!n.length)return null;var d=qe("recharts-polygon",r);if(l&&l.length){var h=c.stroke&&c.stroke!=="none",p=GV(n,l,o);return Y.createElement("g",{className:d},Y.createElement("path",El({},Ce(c,!0),{fill:p.slice(-1)==="Z"?c.fill:"none",stroke:"none",d:p})),h?Y.createElement("path",El({},Ce(c,!0),{fill:"none",d:Ps(n,o)})):null,h?Y.createElement("path",El({},Ce(c,!0),{fill:"none",d:Ps(l,o)})):null)}var v=Ps(n,o);return Y.createElement("path",El({},Ce(c,!0),{fill:v.slice(-1)==="Z"?c.fill:"none",className:d,d:v}))};function Gx(){return Gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gx.apply(this,arguments)}var O1=function(t){var n=t.cx,r=t.cy,l=t.r,o=t.className,c=qe("recharts-dot",o);return n===+n&&r===+r&&l===+l?T.createElement("circle",Gx({},Ce(t,!1),_f(t),{className:c,cx:n,cy:r,r:l})):null};function uu(e){"@babel/helpers - typeof";return uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uu(e)}var VV=["x","y","top","left","width","height","className"];function Yx(){return Yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yx.apply(this,arguments)}function PT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function FV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(n),!0).forEach(function(r){KV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KV(e,t,n){return t=XV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XV(e){var t=ZV(e,"string");return uu(t)=="symbol"?t:t+""}function ZV(e,t){if(uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WV(e,t){if(e==null)return{};var n=QV(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QV(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var JV=function(t,n,r,l,o,c){return"M".concat(t,",").concat(o,"v").concat(l,"M").concat(c,",").concat(n,"h").concat(r)},eF=function(t){var n=t.x,r=n===void 0?0:n,l=t.y,o=l===void 0?0:l,c=t.top,d=c===void 0?0:c,h=t.left,p=h===void 0?0:h,v=t.width,m=v===void 0?0:v,g=t.height,j=g===void 0?0:g,S=t.className,_=WV(t,VV),x=FV({x:r,y:o,top:d,left:p,width:m,height:j},_);return!ve(r)||!ve(o)||!ve(m)||!ve(j)||!ve(d)||!ve(p)?null:Y.createElement("path",Yx({},Ce(x,!0),{className:qe("recharts-cross",S),d:JV(r,o,m,j,d,p)}))},fb,DT;function tF(){if(DT)return fb;DT=1;var e=Kd(),t=zk(),n=Er();function r(l,o){return l&&l.length?e(l,n(o,2),t):void 0}return fb=r,fb}var nF=tF();const rF=rt(nF);var db,$T;function aF(){if($T)return db;$T=1;var e=Kd(),t=Er(),n=Lk();function r(l,o){return l&&l.length?e(l,t(o,2),n):void 0}return db=r,db}var iF=aF();const lF=rt(iF);var oF=["cx","cy","angle","ticks","axisLine"],sF=["ticks","tick","angle","tickFormatter","stroke"];function Vl(e){"@babel/helpers - typeof";return Vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vl(e)}function Ds(){return Ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ds.apply(this,arguments)}function qT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function pi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qT(Object(n),!0).forEach(function(r){th(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zT(e,t){if(e==null)return{};var n=uF(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function cF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,OR(r.key),r)}}function fF(e,t,n){return t&&LT(e.prototype,t),n&&LT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dF(e,t,n){return t=td(t),hF(e,wR()?Reflect.construct(t,n||[],td(e).constructor):t.apply(e,n))}function hF(e,t){if(t&&(Vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pF(e)}function pF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wR=function(){return!!e})()}function td(e){return td=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},td(e)}function mF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vx(e,t)}function Vx(e,t){return Vx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},Vx(e,t)}function th(e,t,n){return t=OR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OR(e){var t=vF(e,"string");return Vl(t)=="symbol"?t:t+""}function vF(e,t){if(Vl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nh=(function(e){function t(){return cF(this,t),dF(this,t,arguments)}return mF(t,e),fF(t,[{key:"getTickValueCoord",value:function(r){var l=r.coordinate,o=this.props,c=o.angle,d=o.cx,h=o.cy;return mt(d,h,l,c)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,l;switch(r){case"left":l="end";break;case"right":l="start";break;default:l="middle";break}return l}},{key:"getViewBox",value:function(){var r=this.props,l=r.cx,o=r.cy,c=r.angle,d=r.ticks,h=rF(d,function(v){return v.coordinate||0}),p=lF(d,function(v){return v.coordinate||0});return{cx:l,cy:o,startAngle:c,endAngle:c,innerRadius:p.coordinate||0,outerRadius:h.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,l=r.cx,o=r.cy,c=r.angle,d=r.ticks,h=r.axisLine,p=zT(r,oF),v=d.reduce(function(S,_){return[Math.min(S[0],_.coordinate),Math.max(S[1],_.coordinate)]},[1/0,-1/0]),m=mt(l,o,v[0],c),g=mt(l,o,v[1],c),j=pi(pi(pi({},Ce(p,!1)),{},{fill:"none"},Ce(h,!1)),{},{x1:m.x,y1:m.y,x2:g.x,y2:g.y});return Y.createElement("line",Ds({className:"recharts-polar-radius-axis-line"},j))}},{key:"renderTicks",value:function(){var r=this,l=this.props,o=l.ticks,c=l.tick,d=l.angle,h=l.tickFormatter,p=l.stroke,v=zT(l,sF),m=this.getTickTextAnchor(),g=Ce(v,!1),j=Ce(c,!1),S=o.map(function(_,x){var O=r.getTickValueCoord(_),w=pi(pi(pi(pi({textAnchor:m,transform:"rotate(".concat(90-d,", ").concat(O.x,", ").concat(O.y,")")},g),{},{stroke:"none",fill:p},j),{},{index:x},O),{},{payload:_});return Y.createElement(tt,Ds({className:qe("recharts-polar-radius-axis-tick",hR(c)),key:"tick-".concat(_.coordinate)},Ei(r.props,_,x)),t.renderTickItem(c,w,h?h(_.value,x):_.value))});return Y.createElement(tt,{className:"recharts-polar-radius-axis-ticks"},S)}},{key:"render",value:function(){var r=this.props,l=r.ticks,o=r.axisLine,c=r.tick;return!l||!l.length?null:Y.createElement(tt,{className:qe("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),c&&this.renderTicks(),Ft.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,l,o){var c;return Y.isValidElement(r)?c=Y.cloneElement(r,l):ke(r)?c=r(l):c=Y.createElement(Ti,Ds({},l,{className:"recharts-polar-radius-axis-tick-value"}),o),c}}])})(T.PureComponent);th(nh,"displayName","PolarRadiusAxis");th(nh,"axisType","radiusAxis");th(nh,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Fl(e){"@babel/helpers - typeof";return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(e)}function bi(){return bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bi.apply(this,arguments)}function BT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function mi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BT(Object(n),!0).forEach(function(r){rh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,NR(r.key),r)}}function gF(e,t,n){return t&&UT(e.prototype,t),n&&UT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bF(e,t,n){return t=nd(t),xF(e,AR()?Reflect.construct(t,n||[],nd(e).constructor):t.apply(e,n))}function xF(e,t){if(t&&(Fl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jF(e)}function jF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(AR=function(){return!!e})()}function nd(e){return nd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nd(e)}function _F(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fx(e,t)}function Fx(e,t){return Fx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},Fx(e,t)}function rh(e,t,n){return t=NR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NR(e){var t=SF(e,"string");return Fl(t)=="symbol"?t:t+""}function SF(e,t){if(Fl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wF=Math.PI/180,IT=1e-5,ah=(function(e){function t(){return yF(this,t),bF(this,t,arguments)}return _F(t,e),gF(t,[{key:"getTickLineCoord",value:function(r){var l=this.props,o=l.cx,c=l.cy,d=l.radius,h=l.orientation,p=l.tickSize,v=p||8,m=mt(o,c,d,r.coordinate),g=mt(o,c,d+(h==="inner"?-1:1)*v,r.coordinate);return{x1:m.x,y1:m.y,x2:g.x,y2:g.y}}},{key:"getTickTextAnchor",value:function(r){var l=this.props.orientation,o=Math.cos(-r.coordinate*wF),c;return o>IT?c=l==="outer"?"start":"end":o<-IT?c=l==="outer"?"end":"start":c="middle",c}},{key:"renderAxisLine",value:function(){var r=this.props,l=r.cx,o=r.cy,c=r.radius,d=r.axisLine,h=r.axisLineType,p=mi(mi({},Ce(this.props,!1)),{},{fill:"none"},Ce(d,!1));if(h==="circle")return Y.createElement(O1,bi({className:"recharts-polar-angle-axis-line"},p,{cx:l,cy:o,r:c}));var v=this.props.ticks,m=v.map(function(g){return mt(l,o,c,g.coordinate)});return Y.createElement(YV,bi({className:"recharts-polar-angle-axis-line"},p,{points:m}))}},{key:"renderTicks",value:function(){var r=this,l=this.props,o=l.ticks,c=l.tick,d=l.tickLine,h=l.tickFormatter,p=l.stroke,v=Ce(this.props,!1),m=Ce(c,!1),g=mi(mi({},v),{},{fill:"none"},Ce(d,!1)),j=o.map(function(S,_){var x=r.getTickLineCoord(S),O=r.getTickTextAnchor(S),w=mi(mi(mi({textAnchor:O},v),{},{stroke:"none",fill:p},m),{},{index:_,payload:S,x:x.x2,y:x.y2});return Y.createElement(tt,bi({className:qe("recharts-polar-angle-axis-tick",hR(c)),key:"tick-".concat(S.coordinate)},Ei(r.props,S,_)),d&&Y.createElement("line",bi({className:"recharts-polar-angle-axis-tick-line"},g,x)),c&&t.renderTickItem(c,w,h?h(S.value,_):S.value))});return Y.createElement(tt,{className:"recharts-polar-angle-axis-ticks"},j)}},{key:"render",value:function(){var r=this.props,l=r.ticks,o=r.radius,c=r.axisLine;return o<=0||!l||!l.length?null:Y.createElement(tt,{className:qe("recharts-polar-angle-axis",this.props.className)},c&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,l,o){var c;return Y.isValidElement(r)?c=Y.cloneElement(r,l):ke(r)?c=r(l):c=Y.createElement(Ti,bi({},l,{className:"recharts-polar-angle-axis-tick-value"}),o),c}}])})(T.PureComponent);rh(ah,"displayName","PolarAngleAxis");rh(ah,"axisType","angleAxis");rh(ah,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var hb,HT;function OF(){if(HT)return hb;HT=1;var e=z3(),t=e(Object.getPrototypeOf,Object);return hb=t,hb}var pb,GT;function AF(){if(GT)return pb;GT=1;var e=la(),t=OF(),n=oa(),r="[object Object]",l=Function.prototype,o=Object.prototype,c=l.toString,d=o.hasOwnProperty,h=c.call(Object);function p(v){if(!n(v)||e(v)!=r)return!1;var m=t(v);if(m===null)return!0;var g=d.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&c.call(g)==h}return pb=p,pb}var NF=AF();const EF=rt(NF);var mb,YT;function TF(){if(YT)return mb;YT=1;var e=la(),t=oa(),n="[object Boolean]";function r(l){return l===!0||l===!1||t(l)&&e(l)==n}return mb=r,mb}var CF=TF();const MF=rt(CF);function cu(e){"@babel/helpers - typeof";return cu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cu(e)}function rd(){return rd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rd.apply(this,arguments)}function kF(e,t){return $F(e)||DF(e,t)||PF(e,t)||RF()}function RF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PF(e,t){if(e){if(typeof e=="string")return VT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VT(e,t)}}function VT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function DF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function $F(e){if(Array.isArray(e))return e}function FT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function KT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FT(Object(n),!0).forEach(function(r){qF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qF(e,t,n){return t=zF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zF(e){var t=LF(e,"string");return cu(t)=="symbol"?t:t+""}function LF(e,t){if(cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XT=function(t,n,r,l,o){var c=r-l,d;return d="M ".concat(t,",").concat(n),d+="L ".concat(t+r,",").concat(n),d+="L ".concat(t+r-c/2,",").concat(n+o),d+="L ".concat(t+r-c/2-l,",").concat(n+o),d+="L ".concat(t,",").concat(n," Z"),d},BF={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},UF=function(t){var n=KT(KT({},BF),t),r=T.useRef(),l=T.useState(-1),o=kF(l,2),c=o[0],d=o[1];T.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&d(E)}catch{}},[]);var h=n.x,p=n.y,v=n.upperWidth,m=n.lowerWidth,g=n.height,j=n.className,S=n.animationEasing,_=n.animationDuration,x=n.animationBegin,O=n.isUpdateAnimationActive;if(h!==+h||p!==+p||v!==+v||m!==+m||g!==+g||v===0&&m===0||g===0)return null;var w=qe("recharts-trapezoid",j);return O?Y.createElement(ia,{canBegin:c>0,from:{upperWidth:0,lowerWidth:0,height:g,x:h,y:p},to:{upperWidth:v,lowerWidth:m,height:g,x:h,y:p},duration:_,animationEasing:S,isActive:O},function(E){var M=E.upperWidth,A=E.lowerWidth,C=E.height,k=E.x,z=E.y;return Y.createElement(ia,{canBegin:c>0,from:"0px ".concat(c===-1?1:c,"px"),to:"".concat(c,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:_,easing:S},Y.createElement("path",rd({},Ce(n,!0),{className:w,d:XT(k,z,M,A,C),ref:r})))}):Y.createElement("g",null,Y.createElement("path",rd({},Ce(n,!0),{className:w,d:XT(h,p,v,m,g)})))},IF=["option","shapeType","propTransformer","activeClassName","isActive"];function fu(e){"@babel/helpers - typeof";return fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fu(e)}function HF(e,t){if(e==null)return{};var n=GF(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ZT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function ad(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZT(Object(n),!0).forEach(function(r){YF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YF(e,t,n){return t=VF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VF(e){var t=FF(e,"string");return fu(t)=="symbol"?t:t+""}function FF(e,t){if(fu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KF(e,t){return ad(ad({},t),e)}function XF(e,t){return e==="symbols"}function WT(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return Y.createElement(w1,n);case"trapezoid":return Y.createElement(UF,n);case"sector":return Y.createElement(vR,n);case"symbols":if(XF(t))return Y.createElement(H0,n);break;default:return null}}function ZF(e){return T.isValidElement(e)?e.props:e}function ER(e){var t=e.option,n=e.shapeType,r=e.propTransformer,l=r===void 0?KF:r,o=e.activeClassName,c=o===void 0?"recharts-active-shape":o,d=e.isActive,h=HF(e,IF),p;if(T.isValidElement(t))p=T.cloneElement(t,ad(ad({},h),ZF(t)));else if(ke(t))p=t(h);else if(EF(t)&&!MF(t)){var v=l(t,h);p=Y.createElement(WT,{shapeType:n,elementProps:v})}else{var m=h;p=Y.createElement(WT,{shapeType:n,elementProps:m})}return d?Y.createElement(tt,{className:c},p):p}function ih(e,t){return t!=null&&"trapezoids"in e.props}function lh(e,t){return t!=null&&"sectors"in e.props}function du(e,t){return t!=null&&"points"in e.props}function WF(e,t){var n,r,l=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return l&&o}function QF(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function JF(e,t){var n=e.x===t.x,r=e.y===t.y,l=e.z===t.z;return n&&r&&l}function eK(e,t){var n;return ih(e,t)?n=WF:lh(e,t)?n=QF:du(e,t)&&(n=JF),n}function tK(e,t){var n;return ih(e,t)?n="trapezoids":lh(e,t)?n="sectors":du(e,t)&&(n="points"),n}function nK(e,t){if(ih(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(lh(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return du(e,t)?t.payload:{}}function rK(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,l=tK(n,t),o=nK(n,t),c=r.filter(function(h,p){var v=Wd(o,h),m=n.props[l].filter(function(S){var _=eK(n,t);return _(S,t)}),g=n.props[l].indexOf(m[m.length-1]),j=p===g;return v&&j}),d=r.indexOf(c[c.length-1]);return d}var yf;function Kl(e){"@babel/helpers - typeof";return Kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kl(e)}function Tl(){return Tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tl.apply(this,arguments)}function QT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QT(Object(n),!0).forEach(function(r){Qn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,CR(r.key),r)}}function iK(e,t,n){return t&&JT(e.prototype,t),n&&JT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lK(e,t,n){return t=id(t),oK(e,TR()?Reflect.construct(t,n||[],id(e).constructor):t.apply(e,n))}function oK(e,t){if(t&&(Kl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sK(e)}function sK(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TR=function(){return!!e})()}function id(e){return id=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},id(e)}function uK(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kx(e,t)}function Kx(e,t){return Kx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},Kx(e,t)}function Qn(e,t,n){return t=CR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CR(e){var t=cK(e,"string");return Kl(t)=="symbol"?t:t+""}function cK(e,t){if(Kl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ua=(function(e){function t(n){var r;return aK(this,t),r=lK(this,t,[n]),Qn(r,"pieRef",null),Qn(r,"sectorRefs",[]),Qn(r,"id",Au("recharts-pie-")),Qn(r,"handleAnimationEnd",function(){var l=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ke(l)&&l()}),Qn(r,"handleAnimationStart",function(){var l=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ke(l)&&l()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return uK(t,e),iK(t,[{key:"isActiveIndex",value:function(r){var l=this.props.activeIndex;return Array.isArray(l)?l.indexOf(r)!==-1:r===l}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var l=this.props.isAnimationActive;if(l&&!this.state.isAnimationFinished)return null;var o=this.props,c=o.label,d=o.labelLine,h=o.dataKey,p=o.valueKey,v=Ce(this.props,!1),m=Ce(c,!1),g=Ce(d,!1),j=c&&c.offsetRadius||20,S=r.map(function(_,x){var O=(_.startAngle+_.endAngle)/2,w=mt(_.cx,_.cy,_.outerRadius+j,O),E=ht(ht(ht(ht({},v),_),{},{stroke:"none"},m),{},{index:x,textAnchor:t.getTextAnchor(w.x,_.cx)},w),M=ht(ht(ht(ht({},v),_),{},{fill:"none",stroke:_.fill},g),{},{index:x,points:[mt(_.cx,_.cy,_.outerRadius,O),w]}),A=h;return ze(h)&&ze(p)?A="value":ze(h)&&(A=p),Y.createElement(tt,{key:"label-".concat(_.startAngle,"-").concat(_.endAngle,"-").concat(_.midAngle,"-").concat(x)},d&&t.renderLabelLineItem(d,M,"line"),t.renderLabelItem(c,E,sn(_,A)))});return Y.createElement(tt,{className:"recharts-pie-labels"},S)}},{key:"renderSectorsStatically",value:function(r){var l=this,o=this.props,c=o.activeShape,d=o.blendStroke,h=o.inactiveShape;return r.map(function(p,v){if((p==null?void 0:p.startAngle)===0&&(p==null?void 0:p.endAngle)===0&&r.length!==1)return null;var m=l.isActiveIndex(v),g=h&&l.hasActiveIndex()?h:null,j=m?c:g,S=ht(ht({},p),{},{stroke:d?p.fill:p.stroke,tabIndex:-1});return Y.createElement(tt,Tl({ref:function(x){x&&!l.sectorRefs.includes(x)&&l.sectorRefs.push(x)},tabIndex:-1,className:"recharts-pie-sector"},Ei(l.props,p,v),{key:"sector-".concat(p==null?void 0:p.startAngle,"-").concat(p==null?void 0:p.endAngle,"-").concat(p.midAngle,"-").concat(v)}),Y.createElement(ER,Tl({option:j,isActive:m,shapeType:"sector"},S)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,l=this.props,o=l.sectors,c=l.isAnimationActive,d=l.animationBegin,h=l.animationDuration,p=l.animationEasing,v=l.animationId,m=this.state,g=m.prevSectors,j=m.prevIsAnimationActive;return Y.createElement(ia,{begin:d,duration:h,isActive:c,easing:p,from:{t:0},to:{t:1},key:"pie-".concat(v,"-").concat(j),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(S){var _=S.t,x=[],O=o&&o[0],w=O.startAngle;return o.forEach(function(E,M){var A=g&&g[M],C=M>0?qn(E,"paddingAngle",0):0;if(A){var k=$a(A.endAngle-A.startAngle,E.endAngle-E.startAngle),z=ht(ht({},E),{},{startAngle:w+C,endAngle:w+k(_)+C});x.push(z),w=z.endAngle}else{var B=E.endAngle,Z=E.startAngle,G=$a(0,B-Z),H=G(_),W=ht(ht({},E),{},{startAngle:w+C,endAngle:w+H+C});x.push(W),w=W.endAngle}}),Y.createElement(tt,null,r.renderSectorsStatically(x))})}},{key:"attachKeyboardHandlers",value:function(r){var l=this;r.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var c=++l.state.sectorToFocus%l.sectorRefs.length;l.sectorRefs[c].focus(),l.setState({sectorToFocus:c});break}case"ArrowRight":{var d=--l.state.sectorToFocus<0?l.sectorRefs.length-1:l.state.sectorToFocus%l.sectorRefs.length;l.sectorRefs[d].focus(),l.setState({sectorToFocus:d});break}case"Escape":{l.sectorRefs[l.state.sectorToFocus].blur(),l.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,l=r.sectors,o=r.isAnimationActive,c=this.state.prevSectors;return o&&l&&l.length&&(!c||!Wd(c,l))?this.renderSectorsWithAnimation():this.renderSectorsStatically(l)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,l=this.props,o=l.hide,c=l.sectors,d=l.className,h=l.label,p=l.cx,v=l.cy,m=l.innerRadius,g=l.outerRadius,j=l.isAnimationActive,S=this.state.isAnimationFinished;if(o||!c||!c.length||!ve(p)||!ve(v)||!ve(m)||!ve(g))return null;var _=qe("recharts-pie",d);return Y.createElement(tt,{tabIndex:this.props.rootTabIndex,className:_,ref:function(O){r.pieRef=O}},this.renderSectors(),h&&this.renderLabels(c),Ft.renderCallByParent(this.props,null,!1),(!j||S)&&Ia.renderCallByParent(this.props,c,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,l){return l.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==l.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:l.curSectors,isAnimationFinished:!0}:r.sectors!==l.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,l){return r>l?"start":r<l?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,l,o){if(Y.isValidElement(r))return Y.cloneElement(r,l);if(ke(r))return r(l);var c=qe("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return Y.createElement(Rx,Tl({},l,{key:o,type:"linear",className:c}))}},{key:"renderLabelItem",value:function(r,l,o){if(Y.isValidElement(r))return Y.cloneElement(r,l);var c=o;if(ke(r)&&(c=r(l),Y.isValidElement(c)))return c;var d=qe("recharts-pie-label-text",typeof r!="boolean"&&!ke(r)?r.className:"");return Y.createElement(Ti,Tl({},l,{alignmentBaseline:"middle",className:d}),c)}}])})(T.PureComponent);yf=ua;Qn(ua,"displayName","Pie");Qn(ua,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!mo.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Qn(ua,"parseDeltaAngle",function(e,t){var n=cn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Qn(ua,"getRealPieData",function(e){var t=e.data,n=e.children,r=Ce(e,!1),l=er(n,Ud);return t&&t.length?t.map(function(o,c){return ht(ht(ht({payload:o},r),o),l&&l[c]&&l[c].props)}):l&&l.length?l.map(function(o){return ht(ht({},r),o.props)}):[]});Qn(ua,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,l=t.width,o=t.height,c=dR(l,o),d=r+fn(e.cx,l,l/2),h=n+fn(e.cy,o,o/2),p=fn(e.innerRadius,c,0),v=fn(e.outerRadius,c,c*.8),m=e.maxRadius||Math.sqrt(l*l+o*o)/2;return{cx:d,cy:h,innerRadius:p,outerRadius:v,maxRadius:m}});Qn(ua,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?ht(ht({},t.type.defaultProps),t.props):t.props,l=yf.getRealPieData(r);if(!l||!l.length)return null;var o=r.cornerRadius,c=r.startAngle,d=r.endAngle,h=r.paddingAngle,p=r.dataKey,v=r.nameKey,m=r.valueKey,g=r.tooltipType,j=Math.abs(r.minAngle),S=yf.parseCoordinateOfPie(r,n),_=yf.parseDeltaAngle(c,d),x=Math.abs(_),O=p;ze(p)&&ze(m)?(hr(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),O="value"):ze(p)&&(hr(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),O=m);var w=l.filter(function(z){return sn(z,O,0)!==0}).length,E=(x>=360?w:w-1)*h,M=x-w*j-E,A=l.reduce(function(z,B){var Z=sn(B,O,0);return z+(ve(Z)?Z:0)},0),C;if(A>0){var k;C=l.map(function(z,B){var Z=sn(z,O,0),G=sn(z,v,B),H=(ve(Z)?Z:0)/A,W;B?W=k.endAngle+cn(_)*h*(Z!==0?1:0):W=c;var Q=W+cn(_)*((Z!==0?j:0)+H*M),D=(W+Q)/2,P=(S.innerRadius+S.outerRadius)/2,$=[{name:G,value:Z,payload:z,dataKey:O,type:g}],U=mt(S.cx,S.cy,P,D);return k=ht(ht(ht({percent:H,cornerRadius:o,name:G,tooltipPayload:$,midAngle:D,middleRadius:P,tooltipPosition:U},z),S),{},{value:sn(z,O),startAngle:W,endAngle:Q,payload:z,paddingAngle:cn(_)*h}),k})}return ht(ht({},S),{},{sectors:C,data:l})});var vb,eC;function fK(){if(eC)return vb;eC=1;var e=Math.ceil,t=Math.max;function n(r,l,o,c){for(var d=-1,h=t(e((l-r)/(o||1)),0),p=Array(h);h--;)p[c?h:++d]=r,r+=o;return p}return vb=n,vb}var yb,tC;function MR(){if(tC)return yb;tC=1;var e=ek(),t=1/0,n=17976931348623157e292;function r(l){if(!l)return l===0?l:0;if(l=e(l),l===t||l===-t){var o=l<0?-1:1;return o*n}return l===l?l:0}return yb=r,yb}var gb,nC;function dK(){if(nC)return gb;nC=1;var e=fK(),t=Bd(),n=MR();function r(l){return function(o,c,d){return d&&typeof d!="number"&&t(o,c,d)&&(c=d=void 0),o=n(o),c===void 0?(c=o,o=0):c=n(c),d=d===void 0?o<c?1:-1:n(d),e(o,c,d,l)}}return gb=r,gb}var bb,rC;function hK(){if(rC)return bb;rC=1;var e=dK(),t=e();return bb=t,bb}var pK=hK();const ld=rt(pK);function hu(e){"@babel/helpers - typeof";return hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(e)}function aC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function iC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aC(Object(n),!0).forEach(function(r){kR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kR(e,t,n){return t=mK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mK(e){var t=vK(e,"string");return hu(t)=="symbol"?t:t+""}function vK(e,t){if(hu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yK=["Webkit","Moz","O","ms"],gK=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),l=yK.reduce(function(o,c){return iC(iC({},o),{},kR({},c+r,n))},{});return l[t]=n,l};function Xl(e){"@babel/helpers - typeof";return Xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xl(e)}function od(){return od=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},od.apply(this,arguments)}function lC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function xb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lC(Object(n),!0).forEach(function(r){Pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PR(r.key),r)}}function xK(e,t,n){return t&&oC(e.prototype,t),n&&oC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jK(e,t,n){return t=sd(t),_K(e,RR()?Reflect.construct(t,n||[],sd(e).constructor):t.apply(e,n))}function _K(e,t){if(t&&(Xl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SK(e)}function SK(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RR=function(){return!!e})()}function sd(e){return sd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sd(e)}function wK(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xx(e,t)}function Xx(e,t){return Xx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},Xx(e,t)}function Pn(e,t,n){return t=PR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PR(e){var t=OK(e,"string");return Xl(t)=="symbol"?t:t+""}function OK(e,t){if(Xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var AK=function(t){var n=t.data,r=t.startIndex,l=t.endIndex,o=t.x,c=t.width,d=t.travellerWidth;if(!n||!n.length)return{};var h=n.length,p=Ms().domain(ld(0,h)).range([o,o+c-d]),v=p.domain().map(function(m){return p(m)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:p(r),endX:p(l),scale:p,scaleValues:v}},sC=function(t){return t.changedTouches&&!!t.changedTouches.length},Zl=(function(e){function t(n){var r;return bK(this,t),r=jK(this,t,[n]),Pn(r,"handleDrag",function(l){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(l):r.state.isSlideMoving&&r.handleSlideDrag(l)}),Pn(r,"handleTouchMove",function(l){l.changedTouches!=null&&l.changedTouches.length>0&&r.handleDrag(l.changedTouches[0])}),Pn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var l=r.props,o=l.endIndex,c=l.onDragEnd,d=l.startIndex;c==null||c({endIndex:o,startIndex:d})}),r.detachDragEndListener()}),Pn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Pn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Pn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Pn(r,"handleSlideDragStart",function(l){var o=sC(l)?l.changedTouches[0]:l;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return wK(t,e),xK(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var l=r.startX,o=r.endX,c=this.state.scaleValues,d=this.props,h=d.gap,p=d.data,v=p.length-1,m=Math.min(l,o),g=Math.max(l,o),j=t.getIndexInRange(c,m),S=t.getIndexInRange(c,g);return{startIndex:j-j%h,endIndex:S===v?v:S-S%h}}},{key:"getTextOfTick",value:function(r){var l=this.props,o=l.data,c=l.tickFormatter,d=l.dataKey,h=sn(o[r],d,r);return ke(c)?c(h,r):h}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var l=this.state,o=l.slideMoveStartX,c=l.startX,d=l.endX,h=this.props,p=h.x,v=h.width,m=h.travellerWidth,g=h.startIndex,j=h.endIndex,S=h.onChange,_=r.pageX-o;_>0?_=Math.min(_,p+v-m-d,p+v-m-c):_<0&&(_=Math.max(_,p-c,p-d));var x=this.getIndex({startX:c+_,endX:d+_});(x.startIndex!==g||x.endIndex!==j)&&S&&S(x),this.setState({startX:c+_,endX:d+_,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,l){var o=sC(l)?l.changedTouches[0]:l;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var l=this.state,o=l.brushMoveStartX,c=l.movingTravellerId,d=l.endX,h=l.startX,p=this.state[c],v=this.props,m=v.x,g=v.width,j=v.travellerWidth,S=v.onChange,_=v.gap,x=v.data,O={startX:this.state.startX,endX:this.state.endX},w=r.pageX-o;w>0?w=Math.min(w,m+g-j-p):w<0&&(w=Math.max(w,m-p)),O[c]=p+w;var E=this.getIndex(O),M=E.startIndex,A=E.endIndex,C=function(){var z=x.length-1;return c==="startX"&&(d>h?M%_===0:A%_===0)||d<h&&A===z||c==="endX"&&(d>h?A%_===0:M%_===0)||d>h&&A===z};this.setState(Pn(Pn({},c,p+w),"brushMoveStartX",r.pageX),function(){S&&C()&&S(E)})}},{key:"handleTravellerMoveKeyboard",value:function(r,l){var o=this,c=this.state,d=c.scaleValues,h=c.startX,p=c.endX,v=this.state[l],m=d.indexOf(v);if(m!==-1){var g=m+r;if(!(g===-1||g>=d.length)){var j=d[g];l==="startX"&&j>=p||l==="endX"&&j<=h||this.setState(Pn({},l,j),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,l=r.x,o=r.y,c=r.width,d=r.height,h=r.fill,p=r.stroke;return Y.createElement("rect",{stroke:p,fill:h,x:l,y:o,width:c,height:d})}},{key:"renderPanorama",value:function(){var r=this.props,l=r.x,o=r.y,c=r.width,d=r.height,h=r.data,p=r.children,v=r.padding,m=T.Children.only(p);return m?Y.cloneElement(m,{x:l,y:o,width:c,height:d,margin:v,compact:!0,data:h}):null}},{key:"renderTravellerLayer",value:function(r,l){var o,c,d=this,h=this.props,p=h.y,v=h.travellerWidth,m=h.height,g=h.traveller,j=h.ariaLabel,S=h.data,_=h.startIndex,x=h.endIndex,O=Math.max(r,this.props.x),w=xb(xb({},Ce(this.props,!1)),{},{x:O,y:p,width:v,height:m}),E=j||"Min value: ".concat((o=S[_])===null||o===void 0?void 0:o.name,", Max value: ").concat((c=S[x])===null||c===void 0?void 0:c.name);return Y.createElement(tt,{tabIndex:0,role:"slider","aria-label":E,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[l],onTouchStart:this.travellerDragStartHandlers[l],onKeyDown:function(A){["ArrowLeft","ArrowRight"].includes(A.key)&&(A.preventDefault(),A.stopPropagation(),d.handleTravellerMoveKeyboard(A.key==="ArrowRight"?1:-1,l))},onFocus:function(){d.setState({isTravellerFocused:!0})},onBlur:function(){d.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,w))}},{key:"renderSlide",value:function(r,l){var o=this.props,c=o.y,d=o.height,h=o.stroke,p=o.travellerWidth,v=Math.min(r,l)+p,m=Math.max(Math.abs(l-r)-p,0);return Y.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:h,fillOpacity:.2,x:v,y:c,width:m,height:d})}},{key:"renderText",value:function(){var r=this.props,l=r.startIndex,o=r.endIndex,c=r.y,d=r.height,h=r.travellerWidth,p=r.stroke,v=this.state,m=v.startX,g=v.endX,j=5,S={pointerEvents:"none",fill:p};return Y.createElement(tt,{className:"recharts-brush-texts"},Y.createElement(Ti,od({textAnchor:"end",verticalAnchor:"middle",x:Math.min(m,g)-j,y:c+d/2},S),this.getTextOfTick(l)),Y.createElement(Ti,od({textAnchor:"start",verticalAnchor:"middle",x:Math.max(m,g)+h+j,y:c+d/2},S),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,l=r.data,o=r.className,c=r.children,d=r.x,h=r.y,p=r.width,v=r.height,m=r.alwaysShowText,g=this.state,j=g.startX,S=g.endX,_=g.isTextActive,x=g.isSlideMoving,O=g.isTravellerMoving,w=g.isTravellerFocused;if(!l||!l.length||!ve(d)||!ve(h)||!ve(p)||!ve(v)||p<=0||v<=0)return null;var E=qe("recharts-brush",o),M=Y.Children.count(c)===1,A=gK("userSelect","none");return Y.createElement(tt,{className:E,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:A},this.renderBackground(),M&&this.renderPanorama(),this.renderSlide(j,S),this.renderTravellerLayer(j,"startX"),this.renderTravellerLayer(S,"endX"),(_||x||O||w||m)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var l=r.x,o=r.y,c=r.width,d=r.height,h=r.stroke,p=Math.floor(o+d/2)-1;return Y.createElement(Y.Fragment,null,Y.createElement("rect",{x:l,y:o,width:c,height:d,fill:h,stroke:"none"}),Y.createElement("line",{x1:l+1,y1:p,x2:l+c-1,y2:p,fill:"none",stroke:"#fff"}),Y.createElement("line",{x1:l+1,y1:p+2,x2:l+c-1,y2:p+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,l){var o;return Y.isValidElement(r)?o=Y.cloneElement(r,l):ke(r)?o=r(l):o=t.renderDefaultTraveller(l),o}},{key:"getDerivedStateFromProps",value:function(r,l){var o=r.data,c=r.width,d=r.x,h=r.travellerWidth,p=r.updateId,v=r.startIndex,m=r.endIndex;if(o!==l.prevData||p!==l.prevUpdateId)return xb({prevData:o,prevTravellerWidth:h,prevUpdateId:p,prevX:d,prevWidth:c},o&&o.length?AK({data:o,width:c,x:d,travellerWidth:h,startIndex:v,endIndex:m}):{scale:null,scaleValues:null});if(l.scale&&(c!==l.prevWidth||d!==l.prevX||h!==l.prevTravellerWidth)){l.scale.range([d,d+c-h]);var g=l.scale.domain().map(function(j){return l.scale(j)});return{prevData:o,prevTravellerWidth:h,prevUpdateId:p,prevX:d,prevWidth:c,startX:l.scale(r.startIndex),endX:l.scale(r.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(r,l){for(var o=r.length,c=0,d=o-1;d-c>1;){var h=Math.floor((c+d)/2);r[h]>l?d=h:c=h}return l>=r[d]?d:c}}])})(T.PureComponent);Pn(Zl,"displayName","Brush");Pn(Zl,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var jb,uC;function NK(){if(uC)return jb;uC=1;var e=Z0();function t(n,r){var l;return e(n,function(o,c,d){return l=r(o,c,d),!l}),!!l}return jb=t,jb}var _b,cC;function EK(){if(cC)return _b;cC=1;var e=M3(),t=Er(),n=NK(),r=wn(),l=Bd();function o(c,d,h){var p=r(c)?e:n;return h&&l(c,d,h)&&(d=void 0),p(c,t(d,3))}return _b=o,_b}var TK=EK();const CK=rt(TK);var wr=function(t,n){var r=t.alwaysShow,l=t.ifOverflow;return r&&(l="extendDomain"),l===n},Sb,fC;function MK(){if(fC)return Sb;fC=1;var e=X3();function t(n,r,l){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:l,writable:!0}):n[r]=l}return Sb=t,Sb}var wb,dC;function kK(){if(dC)return wb;dC=1;var e=MK(),t=F3(),n=Er();function r(l,o){var c={};return o=n(o,3),t(l,function(d,h,p){e(c,h,o(d,h,p))}),c}return wb=r,wb}var RK=kK();const PK=rt(RK);var Ob,hC;function DK(){if(hC)return Ob;hC=1;function e(t,n){for(var r=-1,l=t==null?0:t.length;++r<l;)if(!n(t[r],r,t))return!1;return!0}return Ob=e,Ob}var Ab,pC;function $K(){if(pC)return Ab;pC=1;var e=Z0();function t(n,r){var l=!0;return e(n,function(o,c,d){return l=!!r(o,c,d),l}),l}return Ab=t,Ab}var Nb,mC;function qK(){if(mC)return Nb;mC=1;var e=DK(),t=$K(),n=Er(),r=wn(),l=Bd();function o(c,d,h){var p=r(c)?e:t;return h&&l(c,d,h)&&(d=void 0),p(c,n(d,3))}return Nb=o,Nb}var zK=qK();const DR=rt(zK);var LK=["x","y"];function pu(e){"@babel/helpers - typeof";return pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(e)}function Zx(){return Zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zx.apply(this,arguments)}function vC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function ws(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vC(Object(n),!0).forEach(function(r){BK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BK(e,t,n){return t=UK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UK(e){var t=IK(e,"string");return pu(t)=="symbol"?t:t+""}function IK(e,t){if(pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HK(e,t){if(e==null)return{};var n=GK(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function YK(e,t){var n=e.x,r=e.y,l=HK(e,LK),o="".concat(n),c=parseInt(o,10),d="".concat(r),h=parseInt(d,10),p="".concat(t.height||l.height),v=parseInt(p,10),m="".concat(t.width||l.width),g=parseInt(m,10);return ws(ws(ws(ws(ws({},t),l),c?{x:c}:{}),h?{y:h}:{}),{},{height:v,width:g,name:t.name,radius:t.radius})}function yC(e){return Y.createElement(ER,Zx({shapeType:"rectangle",propTransformer:YK,activeClassName:"recharts-active-bar"},e))}var VK=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,l){if(typeof t=="number")return t;var o=ve(r)||hq(r);return o?t(r,l):(o||Mi(),n)}},FK=["value","background"],$R;function Wl(e){"@babel/helpers - typeof";return Wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wl(e)}function KK(e,t){if(e==null)return{};var n=XK(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ud(){return ud=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ud.apply(this,arguments)}function gC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gC(Object(n),!0).forEach(function(r){Ba(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zR(r.key),r)}}function WK(e,t,n){return t&&bC(e.prototype,t),n&&bC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function QK(e,t,n){return t=cd(t),JK(e,qR()?Reflect.construct(t,n||[],cd(e).constructor):t.apply(e,n))}function JK(e,t){if(t&&(Wl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eX(e)}function eX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qR=function(){return!!e})()}function cd(e){return cd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cd(e)}function tX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wx(e,t)}function Wx(e,t){return Wx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},Wx(e,t)}function Ba(e,t,n){return t=zR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zR(e){var t=nX(e,"string");return Wl(t)=="symbol"?t:t+""}function nX(e,t){if(Wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _n=(function(e){function t(){var n;ZK(this,t);for(var r=arguments.length,l=new Array(r),o=0;o<r;o++)l[o]=arguments[o];return n=QK(this,t,[].concat(l)),Ba(n,"state",{isAnimationFinished:!1}),Ba(n,"id",Au("recharts-bar-")),Ba(n,"handleAnimationEnd",function(){var c=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),c&&c()}),Ba(n,"handleAnimationStart",function(){var c=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),c&&c()}),n}return tX(t,e),WK(t,[{key:"renderRectanglesStatically",value:function(r){var l=this,o=this.props,c=o.shape,d=o.dataKey,h=o.activeIndex,p=o.activeBar,v=Ce(this.props,!1);return r&&r.map(function(m,g){var j=g===h,S=j?p:c,_=Pt(Pt(Pt({},v),m),{},{isActive:j,option:S,index:g,dataKey:d,onAnimationStart:l.handleAnimationStart,onAnimationEnd:l.handleAnimationEnd});return Y.createElement(tt,ud({className:"recharts-bar-rectangle"},Ei(l.props,m,g),{key:"rectangle-".concat(m==null?void 0:m.x,"-").concat(m==null?void 0:m.y,"-").concat(m==null?void 0:m.value,"-").concat(g)}),Y.createElement(yC,_))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,l=this.props,o=l.data,c=l.layout,d=l.isAnimationActive,h=l.animationBegin,p=l.animationDuration,v=l.animationEasing,m=l.animationId,g=this.state.prevData;return Y.createElement(ia,{begin:h,duration:p,isActive:d,easing:v,from:{t:0},to:{t:1},key:"bar-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(j){var S=j.t,_=o.map(function(x,O){var w=g&&g[O];if(w){var E=$a(w.x,x.x),M=$a(w.y,x.y),A=$a(w.width,x.width),C=$a(w.height,x.height);return Pt(Pt({},x),{},{x:E(S),y:M(S),width:A(S),height:C(S)})}if(c==="horizontal"){var k=$a(0,x.height),z=k(S);return Pt(Pt({},x),{},{y:x.y+x.height-z,height:z})}var B=$a(0,x.width),Z=B(S);return Pt(Pt({},x),{},{width:Z})});return Y.createElement(tt,null,r.renderRectanglesStatically(_))})}},{key:"renderRectangles",value:function(){var r=this.props,l=r.data,o=r.isAnimationActive,c=this.state.prevData;return o&&l&&l.length&&(!c||!Wd(c,l))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(l)}},{key:"renderBackground",value:function(){var r=this,l=this.props,o=l.data,c=l.dataKey,d=l.activeIndex,h=Ce(this.props.background,!1);return o.map(function(p,v){p.value;var m=p.background,g=KK(p,FK);if(!m)return null;var j=Pt(Pt(Pt(Pt(Pt({},g),{},{fill:"#eee"},m),h),Ei(r.props,p,v)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:c,index:v,className:"recharts-bar-background-rectangle"});return Y.createElement(yC,ud({key:"background-bar-".concat(v),option:r.props.background,isActive:v===d},j))})}},{key:"renderErrorBar",value:function(r,l){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,c=o.data,d=o.xAxis,h=o.yAxis,p=o.layout,v=o.children,m=er(v,eh);if(!m)return null;var g=p==="vertical"?c[0].height/2:c[0].width/2,j=function(x,O){var w=Array.isArray(x.value)?x.value[1]:x.value;return{x:x.x,y:x.y,value:w,errorVal:sn(x,O)}},S={clipPath:r?"url(#clipPath-".concat(l,")"):null};return Y.createElement(tt,S,m.map(function(_){return Y.cloneElement(_,{key:"error-bar-".concat(l,"-").concat(_.props.dataKey),data:c,xAxis:d,yAxis:h,layout:p,offset:g,dataPointFormatter:j})}))}},{key:"render",value:function(){var r=this.props,l=r.hide,o=r.data,c=r.className,d=r.xAxis,h=r.yAxis,p=r.left,v=r.top,m=r.width,g=r.height,j=r.isAnimationActive,S=r.background,_=r.id;if(l||!o||!o.length)return null;var x=this.state.isAnimationFinished,O=qe("recharts-bar",c),w=d&&d.allowDataOverflow,E=h&&h.allowDataOverflow,M=w||E,A=ze(_)?this.id:_;return Y.createElement(tt,{className:O},w||E?Y.createElement("defs",null,Y.createElement("clipPath",{id:"clipPath-".concat(A)},Y.createElement("rect",{x:w?p:p-m/2,y:E?v:v-g/2,width:w?m:m*2,height:E?g:g*2}))):null,Y.createElement(tt,{className:"recharts-bar-rectangles",clipPath:M?"url(#clipPath-".concat(A,")"):null},S?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(M,A),(!j||x)&&Ia.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,l){return r.animationId!==l.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:l.curData}:r.data!==l.curData?{curData:r.data}:null}}])})(T.PureComponent);$R=_n;Ba(_n,"displayName","Bar");Ba(_n,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!mo.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ba(_n,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,l=e.bandSize,o=e.xAxis,c=e.yAxis,d=e.xAxisTicks,h=e.yAxisTicks,p=e.stackedData,v=e.dataStartIndex,m=e.displayedData,g=e.offset,j=NH(r,n);if(!j)return null;var S=t.layout,_=n.type.defaultProps,x=_!==void 0?Pt(Pt({},_),n.props):n.props,O=x.dataKey,w=x.children,E=x.minPointSize,M=S==="horizontal"?c:o,A=p?M.scale.domain():null,C=PH({numericAxis:M}),k=er(w,Ud),z=m.map(function(B,Z){var G,H,W,Q,D,P;p?G=EH(p[v+Z],A):(G=sn(B,O),Array.isArray(G)||(G=[C,G]));var $=VK(E,$R.defaultProps.minPointSize)(G[1],Z);if(S==="horizontal"){var U,ie=[c.scale(G[0]),c.scale(G[1])],fe=ie[0],L=ie[1];H=FE({axis:o,ticks:d,bandSize:l,offset:j.offset,entry:B,index:Z}),W=(U=L??fe)!==null&&U!==void 0?U:void 0,Q=j.size;var F=fe-L;if(D=Number.isNaN(F)?0:F,P={x:H,y:c.y,width:Q,height:c.height},Math.abs($)>0&&Math.abs(D)<Math.abs($)){var q=cn(D||$)*(Math.abs($)-Math.abs(D));W-=q,D+=q}}else{var de=[o.scale(G[0]),o.scale(G[1])],ge=de[0],we=de[1];if(H=ge,W=FE({axis:c,ticks:h,bandSize:l,offset:j.offset,entry:B,index:Z}),Q=we-ge,D=j.size,P={x:o.x,y:W,width:o.width,height:D},Math.abs($)>0&&Math.abs(Q)<Math.abs($)){var $e=cn(Q||$)*(Math.abs($)-Math.abs(Q));Q+=$e}}return Pt(Pt(Pt({},B),{},{x:H,y:W,width:Q,height:D,value:p?G:G[1],payload:B,background:P},k&&k[Z]&&k[Z].props),{},{tooltipPayload:[cR(n,B)],tooltipPosition:{x:H+Q/2,y:W+D/2}})});return Pt({data:z,layout:S},g)});function mu(e){"@babel/helpers - typeof";return mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mu(e)}function rX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LR(r.key),r)}}function aX(e,t,n){return t&&xC(e.prototype,t),n&&xC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jC(Object(n),!0).forEach(function(r){oh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oh(e,t,n){return t=LR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LR(e){var t=iX(e,"string");return mu(t)=="symbol"?t:t+""}function iX(e,t){if(mu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lX=function(t,n,r,l,o){var c=t.width,d=t.height,h=t.layout,p=t.children,v=Object.keys(n),m={left:r.left,leftMirror:r.left,right:c-r.right,rightMirror:c-r.right,top:r.top,topMirror:r.top,bottom:d-r.bottom,bottomMirror:d-r.bottom},g=!!Dn(p,_n);return v.reduce(function(j,S){var _=n[S],x=_.orientation,O=_.domain,w=_.padding,E=w===void 0?{}:w,M=_.mirror,A=_.reversed,C="".concat(x).concat(M?"Mirror":""),k,z,B,Z,G;if(_.type==="number"&&(_.padding==="gap"||_.padding==="no-gap")){var H=O[1]-O[0],W=1/0,Q=_.categoricalDomain.sort(vq);if(Q.forEach(function(de,ge){ge>0&&(W=Math.min((de||0)-(Q[ge-1]||0),W))}),Number.isFinite(W)){var D=W/H,P=_.layout==="vertical"?r.height:r.width;if(_.padding==="gap"&&(k=D*P/2),_.padding==="no-gap"){var $=fn(t.barCategoryGap,D*P),U=D*P/2;k=U-$-(U-$)/P*$}}}l==="xAxis"?z=[r.left+(E.left||0)+(k||0),r.left+r.width-(E.right||0)-(k||0)]:l==="yAxis"?z=h==="horizontal"?[r.top+r.height-(E.bottom||0),r.top+(E.top||0)]:[r.top+(E.top||0)+(k||0),r.top+r.height-(E.bottom||0)-(k||0)]:z=_.range,A&&(z=[z[1],z[0]]);var ie=lR(_,o,g),fe=ie.scale,L=ie.realScaleType;fe.domain(O).range(z),oR(fe);var F=sR(fe,cr(cr({},_),{},{realScaleType:L}));l==="xAxis"?(G=x==="top"&&!M||x==="bottom"&&M,B=r.left,Z=m[C]-G*_.height):l==="yAxis"&&(G=x==="left"&&!M||x==="right"&&M,B=m[C]-G*_.width,Z=r.top);var q=cr(cr(cr({},_),F),{},{realScaleType:L,x:B,y:Z,scale:fe,width:l==="xAxis"?r.width:_.width,height:l==="yAxis"?r.height:_.height});return q.bandSize=Ff(q,F),!_.hide&&l==="xAxis"?m[C]+=(G?-1:1)*q.height:_.hide||(m[C]+=(G?-1:1)*q.width),cr(cr({},j),{},oh({},S,q))},{})},BR=function(t,n){var r=t.x,l=t.y,o=n.x,c=n.y;return{x:Math.min(r,o),y:Math.min(l,c),width:Math.abs(o-r),height:Math.abs(c-l)}},oX=function(t){var n=t.x1,r=t.y1,l=t.x2,o=t.y2;return BR({x:n,y:r},{x:l,y:o})},UR=(function(){function e(t){rX(this,e),this.scale=t}return aX(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}case"end":{var d=this.bandwidth?this.bandwidth():0;return this.scale(n)+d}default:return this.scale(n)}if(l){var h=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+h}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),l=r[0],o=r[r.length-1];return l<=o?n>=l&&n<=o:n>=o&&n<=l}}],[{key:"create",value:function(n){return new e(n)}}])})();oh(UR,"EPS",1e-4);var A1=function(t){var n=Object.keys(t).reduce(function(r,l){return cr(cr({},r),{},oh({},l,UR.create(t[l])))},{});return cr(cr({},n),{},{apply:function(l){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=o.bandAware,d=o.position;return PK(l,function(h,p){return n[p].apply(h,{bandAware:c,position:d})})},isInRange:function(l){return DR(l,function(o,c){return n[c].isInRange(o)})}})};function sX(e){return(e%180+180)%180}var uX=function(t){var n=t.width,r=t.height,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=sX(l),c=o*Math.PI/180,d=Math.atan(r/n),h=c>d&&c<Math.PI-d?r/Math.sin(c):n/Math.cos(c);return Math.abs(h)},Eb,_C;function cX(){if(_C)return Eb;_C=1;var e=Er(),t=Nu(),n=zd();function r(l){return function(o,c,d){var h=Object(o);if(!t(o)){var p=e(c,3);o=n(o),c=function(m){return p(h[m],m,h)}}var v=l(o,c,d);return v>-1?h[p?o[v]:v]:void 0}}return Eb=r,Eb}var Tb,SC;function fX(){if(SC)return Tb;SC=1;var e=MR();function t(n){var r=e(n),l=r%1;return r===r?l?r-l:r:0}return Tb=t,Tb}var Cb,wC;function dX(){if(wC)return Cb;wC=1;var e=I3(),t=Er(),n=fX(),r=Math.max;function l(o,c,d){var h=o==null?0:o.length;if(!h)return-1;var p=d==null?0:n(d);return p<0&&(p=r(h+p,0)),e(o,t(c,3),p)}return Cb=l,Cb}var Mb,OC;function hX(){if(OC)return Mb;OC=1;var e=cX(),t=dX(),n=e(t);return Mb=n,Mb}var pX=hX();const mX=rt(pX);var vX=a3();const yX=rt(vX);var gX=yX(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),N1=T.createContext(void 0),E1=T.createContext(void 0),IR=T.createContext(void 0),HR=T.createContext({}),GR=T.createContext(void 0),YR=T.createContext(0),VR=T.createContext(0),AC=function(t){var n=t.state,r=n.xAxisMap,l=n.yAxisMap,o=n.offset,c=t.clipPathId,d=t.children,h=t.width,p=t.height,v=gX(o);return Y.createElement(N1.Provider,{value:r},Y.createElement(E1.Provider,{value:l},Y.createElement(HR.Provider,{value:o},Y.createElement(IR.Provider,{value:v},Y.createElement(GR.Provider,{value:c},Y.createElement(YR.Provider,{value:p},Y.createElement(VR.Provider,{value:h},d)))))))},bX=function(){return T.useContext(GR)},FR=function(t){var n=T.useContext(N1);n==null&&Mi();var r=n[t];return r==null&&Mi(),r},xX=function(){var t=T.useContext(N1);return za(t)},jX=function(){var t=T.useContext(E1),n=mX(t,function(r){return DR(r.domain,Number.isFinite)});return n||za(t)},KR=function(t){var n=T.useContext(E1);n==null&&Mi();var r=n[t];return r==null&&Mi(),r},_X=function(){var t=T.useContext(IR);return t},SX=function(){return T.useContext(HR)},T1=function(){return T.useContext(VR)},C1=function(){return T.useContext(YR)};function Ql(e){"@babel/helpers - typeof";return Ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ql(e)}function wX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ZR(r.key),r)}}function AX(e,t,n){return t&&OX(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function NX(e,t,n){return t=fd(t),EX(e,XR()?Reflect.construct(t,n||[],fd(e).constructor):t.apply(e,n))}function EX(e,t){if(t&&(Ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TX(e)}function TX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XR=function(){return!!e})()}function fd(e){return fd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fd(e)}function CX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qx(e,t)}function Qx(e,t){return Qx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},Qx(e,t)}function NC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function EC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NC(Object(n),!0).forEach(function(r){M1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function M1(e,t,n){return t=ZR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZR(e){var t=MX(e,"string");return Ql(t)=="symbol"?t:t+""}function MX(e,t){if(Ql(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function kX(e,t){return $X(e)||DX(e,t)||PX(e,t)||RX()}function RX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PX(e,t){if(e){if(typeof e=="string")return TC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TC(e,t)}}function TC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function DX(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function $X(e){if(Array.isArray(e))return e}function Jx(){return Jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jx.apply(this,arguments)}var qX=function(t,n){var r;return Y.isValidElement(t)?r=Y.cloneElement(t,n):ke(t)?r=t(n):r=Y.createElement("line",Jx({},n,{className:"recharts-reference-line-line"})),r},zX=function(t,n,r,l,o,c,d,h,p){var v=o.x,m=o.y,g=o.width,j=o.height;if(r){var S=p.y,_=t.y.apply(S,{position:c});if(wr(p,"discard")&&!t.y.isInRange(_))return null;var x=[{x:v+g,y:_},{x:v,y:_}];return h==="left"?x.reverse():x}if(n){var O=p.x,w=t.x.apply(O,{position:c});if(wr(p,"discard")&&!t.x.isInRange(w))return null;var E=[{x:w,y:m+j},{x:w,y:m}];return d==="top"?E.reverse():E}if(l){var M=p.segment,A=M.map(function(C){return t.apply(C,{position:c})});return wr(p,"discard")&&CK(A,function(C){return!t.isInRange(C)})?null:A}return null};function LX(e){var t=e.x,n=e.y,r=e.segment,l=e.xAxisId,o=e.yAxisId,c=e.shape,d=e.className,h=e.alwaysShow,p=bX(),v=FR(l),m=KR(o),g=_X();if(!p||!g)return null;hr(h===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var j=A1({x:v.scale,y:m.scale}),S=It(t),_=It(n),x=r&&r.length===2,O=zX(j,S,_,x,g,e.position,v.orientation,m.orientation,e);if(!O)return null;var w=kX(O,2),E=w[0],M=E.x,A=E.y,C=w[1],k=C.x,z=C.y,B=wr(e,"hidden")?"url(#".concat(p,")"):void 0,Z=EC(EC({clipPath:B},Ce(e,!0)),{},{x1:M,y1:A,x2:k,y2:z});return Y.createElement(tt,{className:qe("recharts-reference-line",d)},qX(c,Z),Ft.renderCallByParent(e,oX({x1:M,y1:A,x2:k,y2:z})))}var k1=(function(e){function t(){return wX(this,t),NX(this,t,arguments)}return CX(t,e),AX(t,[{key:"render",value:function(){return Y.createElement(LX,this.props)}}])})(Y.Component);M1(k1,"displayName","ReferenceLine");M1(k1,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function e0(){return e0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e0.apply(this,arguments)}function Jl(e){"@babel/helpers - typeof";return Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jl(e)}function CC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function MC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CC(Object(n),!0).forEach(function(r){sh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QR(r.key),r)}}function IX(e,t,n){return t&&UX(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HX(e,t,n){return t=dd(t),GX(e,WR()?Reflect.construct(t,n||[],dd(e).constructor):t.apply(e,n))}function GX(e,t){if(t&&(Jl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return YX(e)}function YX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WR=function(){return!!e})()}function dd(e){return dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dd(e)}function VX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&t0(e,t)}function t0(e,t){return t0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},t0(e,t)}function sh(e,t,n){return t=QR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QR(e){var t=FX(e,"string");return Jl(t)=="symbol"?t:t+""}function FX(e,t){if(Jl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var KX=function(t){var n=t.x,r=t.y,l=t.xAxis,o=t.yAxis,c=A1({x:l.scale,y:o.scale}),d=c.apply({x:n,y:r},{bandAware:!0});return wr(t,"discard")&&!c.isInRange(d)?null:d},uh=(function(e){function t(){return BX(this,t),HX(this,t,arguments)}return VX(t,e),IX(t,[{key:"render",value:function(){var r=this.props,l=r.x,o=r.y,c=r.r,d=r.alwaysShow,h=r.clipPathId,p=It(l),v=It(o);if(hr(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!p||!v)return null;var m=KX(this.props);if(!m)return null;var g=m.x,j=m.y,S=this.props,_=S.shape,x=S.className,O=wr(this.props,"hidden")?"url(#".concat(h,")"):void 0,w=MC(MC({clipPath:O},Ce(this.props,!0)),{},{cx:g,cy:j});return Y.createElement(tt,{className:qe("recharts-reference-dot",x)},t.renderDot(_,w),Ft.renderCallByParent(this.props,{x:g-c,y:j-c,width:2*c,height:2*c}))}}])})(Y.Component);sh(uh,"displayName","ReferenceDot");sh(uh,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});sh(uh,"renderDot",function(e,t){var n;return Y.isValidElement(e)?n=Y.cloneElement(e,t):ke(e)?n=e(t):n=Y.createElement(O1,e0({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function n0(){return n0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n0.apply(this,arguments)}function eo(e){"@babel/helpers - typeof";return eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eo(e)}function kC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function RC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kC(Object(n),!0).forEach(function(r){ch(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eP(r.key),r)}}function WX(e,t,n){return t&&ZX(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function QX(e,t,n){return t=hd(t),JX(e,JR()?Reflect.construct(t,n||[],hd(e).constructor):t.apply(e,n))}function JX(e,t){if(t&&(eo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eZ(e)}function eZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JR=function(){return!!e})()}function hd(e){return hd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hd(e)}function tZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r0(e,t)}function r0(e,t){return r0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},r0(e,t)}function ch(e,t,n){return t=eP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eP(e){var t=nZ(e,"string");return eo(t)=="symbol"?t:t+""}function nZ(e,t){if(eo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(eo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rZ=function(t,n,r,l,o){var c=o.x1,d=o.x2,h=o.y1,p=o.y2,v=o.xAxis,m=o.yAxis;if(!v||!m)return null;var g=A1({x:v.scale,y:m.scale}),j={x:t?g.x.apply(c,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(h,{position:"start"}):g.y.rangeMin},S={x:n?g.x.apply(d,{position:"end"}):g.x.rangeMax,y:l?g.y.apply(p,{position:"end"}):g.y.rangeMax};return wr(o,"discard")&&(!g.isInRange(j)||!g.isInRange(S))?null:BR(j,S)},fh=(function(e){function t(){return XX(this,t),QX(this,t,arguments)}return tZ(t,e),WX(t,[{key:"render",value:function(){var r=this.props,l=r.x1,o=r.x2,c=r.y1,d=r.y2,h=r.className,p=r.alwaysShow,v=r.clipPathId;hr(p===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=It(l),g=It(o),j=It(c),S=It(d),_=this.props.shape;if(!m&&!g&&!j&&!S&&!_)return null;var x=rZ(m,g,j,S,this.props);if(!x&&!_)return null;var O=wr(this.props,"hidden")?"url(#".concat(v,")"):void 0;return Y.createElement(tt,{className:qe("recharts-reference-area",h)},t.renderRect(_,RC(RC({clipPath:O},Ce(this.props,!0)),x)),Ft.renderCallByParent(this.props,x))}}])})(Y.Component);ch(fh,"displayName","ReferenceArea");ch(fh,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});ch(fh,"renderRect",function(e,t){var n;return Y.isValidElement(e)?n=Y.cloneElement(e,t):ke(e)?n=e(t):n=Y.createElement(w1,n0({},t,{className:"recharts-reference-area-rect"})),n});function tP(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],l=0;l<e.length;l+=t)r.push(e[l]);return r}function aZ(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return uX(r,n)}function iZ(e,t,n){var r=n==="width",l=e.x,o=e.y,c=e.width,d=e.height;return t===1?{start:r?l:o,end:r?l+c:o+d}:{start:r?l+c:o+d,end:r?l:o}}function pd(e,t,n,r,l){if(e*t<e*r||e*t>e*l)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-l)<=0}function lZ(e,t){return tP(e,t+1)}function oZ(e,t,n,r,l){for(var o=(r||[]).slice(),c=t.start,d=t.end,h=0,p=1,v=c,m=function(){var S=r==null?void 0:r[h];if(S===void 0)return{v:tP(r,p)};var _=h,x,O=function(){return x===void 0&&(x=n(S,_)),x},w=S.coordinate,E=h===0||pd(e,w,O,v,d);E||(h=0,v=c,p+=1),E&&(v=w+e*(O()/2+l),h+=p)},g;p<=o.length;)if(g=m(),g)return g.v;return[]}function vu(e){"@babel/helpers - typeof";return vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vu(e)}function PC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PC(Object(n),!0).forEach(function(r){sZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sZ(e,t,n){return t=uZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uZ(e){var t=cZ(e,"string");return vu(t)=="symbol"?t:t+""}function cZ(e,t){if(vu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fZ(e,t,n,r,l){for(var o=(r||[]).slice(),c=o.length,d=t.start,h=t.end,p=function(g){var j=o[g],S,_=function(){return S===void 0&&(S=n(j,g)),S};if(g===c-1){var x=e*(j.coordinate+e*_()/2-h);o[g]=j=ln(ln({},j),{},{tickCoord:x>0?j.coordinate-x*e:j.coordinate})}else o[g]=j=ln(ln({},j),{},{tickCoord:j.coordinate});var O=pd(e,j.tickCoord,_,d,h);O&&(h=j.tickCoord-e*(_()/2+l),o[g]=ln(ln({},j),{},{isShow:!0}))},v=c-1;v>=0;v--)p(v);return o}function dZ(e,t,n,r,l,o){var c=(r||[]).slice(),d=c.length,h=t.start,p=t.end;if(o){var v=r[d-1],m=n(v,d-1),g=e*(v.coordinate+e*m/2-p);c[d-1]=v=ln(ln({},v),{},{tickCoord:g>0?v.coordinate-g*e:v.coordinate});var j=pd(e,v.tickCoord,function(){return m},h,p);j&&(p=v.tickCoord-e*(m/2+l),c[d-1]=ln(ln({},v),{},{isShow:!0}))}for(var S=o?d-1:d,_=function(w){var E=c[w],M,A=function(){return M===void 0&&(M=n(E,w)),M};if(w===0){var C=e*(E.coordinate-e*A()/2-h);c[w]=E=ln(ln({},E),{},{tickCoord:C<0?E.coordinate-C*e:E.coordinate})}else c[w]=E=ln(ln({},E),{},{tickCoord:E.coordinate});var k=pd(e,E.tickCoord,A,h,p);k&&(h=E.tickCoord+e*(A()/2+l),c[w]=ln(ln({},E),{},{isShow:!0}))},x=0;x<S;x++)_(x);return c}function R1(e,t,n){var r=e.tick,l=e.ticks,o=e.viewBox,c=e.minTickGap,d=e.orientation,h=e.interval,p=e.tickFormatter,v=e.unit,m=e.angle;if(!l||!l.length||!r)return[];if(ve(h)||mo.isSsr)return lZ(l,typeof h=="number"&&ve(h)?h:0);var g=[],j=d==="top"||d==="bottom"?"width":"height",S=v&&j==="width"?Cs(v,{fontSize:t,letterSpacing:n}):{width:0,height:0},_=function(E,M){var A=ke(p)?p(E.value,M):E.value;return j==="width"?aZ(Cs(A,{fontSize:t,letterSpacing:n}),S,m):Cs(A,{fontSize:t,letterSpacing:n})[j]},x=l.length>=2?cn(l[1].coordinate-l[0].coordinate):1,O=iZ(o,x,j);return h==="equidistantPreserveStart"?oZ(x,O,_,l,c):(h==="preserveStart"||h==="preserveStartEnd"?g=dZ(x,O,_,l,c,h==="preserveStartEnd"):g=fZ(x,O,_,l,c),g.filter(function(w){return w.isShow}))}var hZ=["viewBox"],pZ=["viewBox"],mZ=["ticks"];function to(e){"@babel/helpers - typeof";return to=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},to(e)}function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cl.apply(this,arguments)}function DC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DC(Object(n),!0).forEach(function(r){P1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kb(e,t){if(e==null)return{};var n=vZ(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vZ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function yZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rP(r.key),r)}}function gZ(e,t,n){return t&&$C(e.prototype,t),n&&$C(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bZ(e,t,n){return t=md(t),xZ(e,nP()?Reflect.construct(t,n||[],md(e).constructor):t.apply(e,n))}function xZ(e,t){if(t&&(to(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jZ(e)}function jZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nP=function(){return!!e})()}function md(e){return md=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},md(e)}function _Z(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a0(e,t)}function a0(e,t){return a0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},a0(e,t)}function P1(e,t,n){return t=rP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rP(e){var t=SZ(e,"string");return to(t)=="symbol"?t:t+""}function SZ(e,t){if(to(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(to(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bo=(function(e){function t(n){var r;return yZ(this,t),r=bZ(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return _Z(t,e),gZ(t,[{key:"shouldComponentUpdate",value:function(r,l){var o=r.viewBox,c=kb(r,hZ),d=this.props,h=d.viewBox,p=kb(d,pZ);return!Rl(o,h)||!Rl(c,p)||!Rl(l,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var l=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];l&&this.setState({fontSize:window.getComputedStyle(l).fontSize,letterSpacing:window.getComputedStyle(l).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var l=this.props,o=l.x,c=l.y,d=l.width,h=l.height,p=l.orientation,v=l.tickSize,m=l.mirror,g=l.tickMargin,j,S,_,x,O,w,E=m?-1:1,M=r.tickSize||v,A=ve(r.tickCoord)?r.tickCoord:r.coordinate;switch(p){case"top":j=S=r.coordinate,x=c+ +!m*h,_=x-E*M,w=_-E*g,O=A;break;case"left":_=x=r.coordinate,S=o+ +!m*d,j=S-E*M,O=j-E*g,w=A;break;case"right":_=x=r.coordinate,S=o+ +m*d,j=S+E*M,O=j+E*g,w=A;break;default:j=S=r.coordinate,x=c+ +m*h,_=x+E*M,w=_+E*g,O=A;break}return{line:{x1:j,y1:_,x2:S,y2:x},tick:{x:O,y:w}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,l=r.orientation,o=r.mirror,c;switch(l){case"left":c=o?"start":"end";break;case"right":c=o?"end":"start";break;default:c="middle";break}return c}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,l=r.orientation,o=r.mirror,c="end";switch(l){case"left":case"right":c="middle";break;case"top":c=o?"start":"end";break;default:c=o?"end":"start";break}return c}},{key:"renderAxisLine",value:function(){var r=this.props,l=r.x,o=r.y,c=r.width,d=r.height,h=r.orientation,p=r.mirror,v=r.axisLine,m=Bt(Bt(Bt({},Ce(this.props,!1)),Ce(v,!1)),{},{fill:"none"});if(h==="top"||h==="bottom"){var g=+(h==="top"&&!p||h==="bottom"&&p);m=Bt(Bt({},m),{},{x1:l,y1:o+g*d,x2:l+c,y2:o+g*d})}else{var j=+(h==="left"&&!p||h==="right"&&p);m=Bt(Bt({},m),{},{x1:l+j*c,y1:o,x2:l+j*c,y2:o+d})}return Y.createElement("line",Cl({},m,{className:qe("recharts-cartesian-axis-line",qn(v,"className"))}))}},{key:"renderTicks",value:function(r,l,o){var c=this,d=this.props,h=d.tickLine,p=d.stroke,v=d.tick,m=d.tickFormatter,g=d.unit,j=R1(Bt(Bt({},this.props),{},{ticks:r}),l,o),S=this.getTickTextAnchor(),_=this.getTickVerticalAnchor(),x=Ce(this.props,!1),O=Ce(v,!1),w=Bt(Bt({},x),{},{fill:"none"},Ce(h,!1)),E=j.map(function(M,A){var C=c.getTickLineCoord(M),k=C.line,z=C.tick,B=Bt(Bt(Bt(Bt({textAnchor:S,verticalAnchor:_},x),{},{stroke:"none",fill:p},O),z),{},{index:A,payload:M,visibleTicksCount:j.length,tickFormatter:m});return Y.createElement(tt,Cl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(M.value,"-").concat(M.coordinate,"-").concat(M.tickCoord)},Ei(c.props,M,A)),h&&Y.createElement("line",Cl({},w,k,{className:qe("recharts-cartesian-axis-tick-line",qn(h,"className"))})),v&&t.renderTickItem(v,B,"".concat(ke(m)?m(M.value,A):M.value).concat(g||"")))});return Y.createElement("g",{className:"recharts-cartesian-axis-ticks"},E)}},{key:"render",value:function(){var r=this,l=this.props,o=l.axisLine,c=l.width,d=l.height,h=l.ticksGenerator,p=l.className,v=l.hide;if(v)return null;var m=this.props,g=m.ticks,j=kb(m,mZ),S=g;return ke(h)&&(S=g&&g.length>0?h(this.props):h(j)),c<=0||d<=0||!S||!S.length?null:Y.createElement(tt,{className:qe("recharts-cartesian-axis",p),ref:function(x){r.layerReference=x}},o&&this.renderAxisLine(),this.renderTicks(S,this.state.fontSize,this.state.letterSpacing),Ft.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,l,o){var c,d=qe(l.className,"recharts-cartesian-axis-tick-value");return Y.isValidElement(r)?c=Y.cloneElement(r,Bt(Bt({},l),{},{className:d})):ke(r)?c=r(Bt(Bt({},l),{},{className:d})):c=Y.createElement(Ti,Cl({},l,{className:"recharts-cartesian-axis-tick-value"}),o),c}}])})(T.Component);P1(bo,"displayName","CartesianAxis");P1(bo,"defaultProps",{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"});var wZ=["x1","y1","x2","y2","key"],OZ=["offset"];function ki(e){"@babel/helpers - typeof";return ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ki(e)}function qC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qC(Object(n),!0).forEach(function(r){AZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AZ(e,t,n){return t=NZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NZ(e){var t=EZ(e,"string");return ki(t)=="symbol"?t:t+""}function EZ(e,t){if(ki(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ki(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Si(){return Si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Si.apply(this,arguments)}function zC(e,t){if(e==null)return{};var n=TZ(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TZ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var CZ=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,l=t.x,o=t.y,c=t.width,d=t.height,h=t.ry;return Y.createElement("rect",{x:l,y:o,ry:h,width:c,height:d,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function aP(e,t){var n;if(Y.isValidElement(e))n=Y.cloneElement(e,t);else if(ke(e))n=e(t);else{var r=t.x1,l=t.y1,o=t.x2,c=t.y2,d=t.key,h=zC(t,wZ),p=Ce(h,!1);p.offset;var v=zC(p,OZ);n=Y.createElement("line",Si({},v,{x1:r,y1:l,x2:o,y2:c,fill:"none",key:d}))}return n}function MZ(e){var t=e.x,n=e.width,r=e.horizontal,l=r===void 0?!0:r,o=e.horizontalPoints;if(!l||!o||!o.length)return null;var c=o.map(function(d,h){var p=on(on({},e),{},{x1:t,y1:d,x2:t+n,y2:d,key:"line-".concat(h),index:h});return aP(l,p)});return Y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function kZ(e){var t=e.y,n=e.height,r=e.vertical,l=r===void 0?!0:r,o=e.verticalPoints;if(!l||!o||!o.length)return null;var c=o.map(function(d,h){var p=on(on({},e),{},{x1:d,y1:t,x2:d,y2:t+n,key:"line-".concat(h),index:h});return aP(l,p)});return Y.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function RZ(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,l=e.y,o=e.width,c=e.height,d=e.horizontalPoints,h=e.horizontal,p=h===void 0?!0:h;if(!p||!t||!t.length)return null;var v=d.map(function(g){return Math.round(g+l-l)}).sort(function(g,j){return g-j});l!==v[0]&&v.unshift(0);var m=v.map(function(g,j){var S=!v[j+1],_=S?l+c-g:v[j+1]-g;if(_<=0)return null;var x=j%t.length;return Y.createElement("rect",{key:"react-".concat(j),y:g,x:r,height:_,width:o,stroke:"none",fill:t[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return Y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function PZ(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,l=e.fillOpacity,o=e.x,c=e.y,d=e.width,h=e.height,p=e.verticalPoints;if(!n||!r||!r.length)return null;var v=p.map(function(g){return Math.round(g+o-o)}).sort(function(g,j){return g-j});o!==v[0]&&v.unshift(0);var m=v.map(function(g,j){var S=!v[j+1],_=S?o+d-g:v[j+1]-g;if(_<=0)return null;var x=j%r.length;return Y.createElement("rect",{key:"react-".concat(j),x:g,y:c,width:_,height:h,stroke:"none",fill:r[x],fillOpacity:l,className:"recharts-cartesian-grid-bg"})});return Y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var DZ=function(t,n){var r=t.xAxis,l=t.width,o=t.height,c=t.offset;return iR(R1(on(on(on({},bo.defaultProps),r),{},{ticks:Qr(r,!0),viewBox:{x:0,y:0,width:l,height:o}})),c.left,c.left+c.width,n)},$Z=function(t,n){var r=t.yAxis,l=t.width,o=t.height,c=t.offset;return iR(R1(on(on(on({},bo.defaultProps),r),{},{ticks:Qr(r,!0),viewBox:{x:0,y:0,width:l,height:o}})),c.top,c.top+c.height,n)},Ol={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function yu(e){var t,n,r,l,o,c,d=T1(),h=C1(),p=SX(),v=on(on({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Ol.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Ol.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Ol.horizontal,horizontalFill:(l=e.horizontalFill)!==null&&l!==void 0?l:Ol.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Ol.vertical,verticalFill:(c=e.verticalFill)!==null&&c!==void 0?c:Ol.verticalFill,x:ve(e.x)?e.x:p.left,y:ve(e.y)?e.y:p.top,width:ve(e.width)?e.width:p.width,height:ve(e.height)?e.height:p.height}),m=v.x,g=v.y,j=v.width,S=v.height,_=v.syncWithTicks,x=v.horizontalValues,O=v.verticalValues,w=xX(),E=jX();if(!ve(j)||j<=0||!ve(S)||S<=0||!ve(m)||m!==+m||!ve(g)||g!==+g)return null;var M=v.verticalCoordinatesGenerator||DZ,A=v.horizontalCoordinatesGenerator||$Z,C=v.horizontalPoints,k=v.verticalPoints;if((!C||!C.length)&&ke(A)){var z=x&&x.length,B=A({yAxis:E?on(on({},E),{},{ticks:z?x:E.ticks}):void 0,width:d,height:h,offset:p},z?!0:_);hr(Array.isArray(B),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(ki(B),"]")),Array.isArray(B)&&(C=B)}if((!k||!k.length)&&ke(M)){var Z=O&&O.length,G=M({xAxis:w?on(on({},w),{},{ticks:Z?O:w.ticks}):void 0,width:d,height:h,offset:p},Z?!0:_);hr(Array.isArray(G),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(ki(G),"]")),Array.isArray(G)&&(k=G)}return Y.createElement("g",{className:"recharts-cartesian-grid"},Y.createElement(CZ,{fill:v.fill,fillOpacity:v.fillOpacity,x:v.x,y:v.y,width:v.width,height:v.height,ry:v.ry}),Y.createElement(MZ,Si({},v,{offset:p,horizontalPoints:C,xAxis:w,yAxis:E})),Y.createElement(kZ,Si({},v,{offset:p,verticalPoints:k,xAxis:w,yAxis:E})),Y.createElement(RZ,Si({},v,{horizontalPoints:C})),Y.createElement(PZ,Si({},v,{verticalPoints:k})))}yu.displayName="CartesianGrid";function no(e){"@babel/helpers - typeof";return no=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(e)}function qZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oP(r.key),r)}}function LZ(e,t,n){return t&&zZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function BZ(e,t,n){return t=vd(t),UZ(e,iP()?Reflect.construct(t,n||[],vd(e).constructor):t.apply(e,n))}function UZ(e,t){if(t&&(no(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IZ(e)}function IZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iP=function(){return!!e})()}function vd(e){return vd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vd(e)}function HZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i0(e,t)}function i0(e,t){return i0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},i0(e,t)}function lP(e,t,n){return t=oP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oP(e){var t=GZ(e,"string");return no(t)=="symbol"?t:t+""}function GZ(e,t){if(no(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(no(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function l0(){return l0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l0.apply(this,arguments)}function YZ(e){var t=e.xAxisId,n=T1(),r=C1(),l=FR(t);return l==null?null:T.createElement(bo,l0({},l,{className:qe("recharts-".concat(l.axisType," ").concat(l.axisType),l.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(c){return Qr(c,!0)}}))}var Ri=(function(e){function t(){return qZ(this,t),BZ(this,t,arguments)}return HZ(t,e),LZ(t,[{key:"render",value:function(){return T.createElement(YZ,this.props)}}])})(T.Component);lP(Ri,"displayName","XAxis");lP(Ri,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function ro(e){"@babel/helpers - typeof";return ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ro(e)}function VZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cP(r.key),r)}}function KZ(e,t,n){return t&&FZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XZ(e,t,n){return t=yd(t),ZZ(e,sP()?Reflect.construct(t,n||[],yd(e).constructor):t.apply(e,n))}function ZZ(e,t){if(t&&(ro(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WZ(e)}function WZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sP=function(){return!!e})()}function yd(e){return yd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yd(e)}function QZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o0(e,t)}function o0(e,t){return o0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},o0(e,t)}function uP(e,t,n){return t=cP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cP(e){var t=JZ(e,"string");return ro(t)=="symbol"?t:t+""}function JZ(e,t){if(ro(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ro(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function s0(){return s0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s0.apply(this,arguments)}var eW=function(t){var n=t.yAxisId,r=T1(),l=C1(),o=KR(n);return o==null?null:T.createElement(bo,s0({},o,{className:qe("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:l},ticksGenerator:function(d){return Qr(d,!0)}}))},Pi=(function(e){function t(){return VZ(this,t),XZ(this,t,arguments)}return QZ(t,e),KZ(t,[{key:"render",value:function(){return T.createElement(eW,this.props)}}])})(T.Component);uP(Pi,"displayName","YAxis");uP(Pi,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function LC(e){return aW(e)||rW(e)||nW(e)||tW()}function tW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nW(e,t){if(e){if(typeof e=="string")return u0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u0(e,t)}}function rW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aW(e){if(Array.isArray(e))return u0(e)}function u0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c0=function(t,n,r,l,o){var c=er(t,k1),d=er(t,uh),h=[].concat(LC(c),LC(d)),p=er(t,fh),v="".concat(l,"Id"),m=l[0],g=n;if(h.length&&(g=h.reduce(function(_,x){if(x.props[v]===r&&wr(x.props,"extendDomain")&&ve(x.props[m])){var O=x.props[m];return[Math.min(_[0],O),Math.max(_[1],O)]}return _},g)),p.length){var j="".concat(m,"1"),S="".concat(m,"2");g=p.reduce(function(_,x){if(x.props[v]===r&&wr(x.props,"extendDomain")&&ve(x.props[j])&&ve(x.props[S])){var O=x.props[j],w=x.props[S];return[Math.min(_[0],O,w),Math.max(_[1],O,w)]}return _},g)}return o&&o.length&&(g=o.reduce(function(_,x){return ve(x)?[Math.min(_[0],x),Math.max(_[1],x)]:_},g)),g},Rb={exports:{}},BC;function iW(){return BC||(BC=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function l(h,p,v){this.fn=h,this.context=p,this.once=v||!1}function o(h,p,v,m,g){if(typeof v!="function")throw new TypeError("The listener must be a function");var j=new l(v,m||h,g),S=n?n+p:p;return h._events[S]?h._events[S].fn?h._events[S]=[h._events[S],j]:h._events[S].push(j):(h._events[S]=j,h._eventsCount++),h}function c(h,p){--h._eventsCount===0?h._events=new r:delete h._events[p]}function d(){this._events=new r,this._eventsCount=0}d.prototype.eventNames=function(){var p=[],v,m;if(this._eventsCount===0)return p;for(m in v=this._events)t.call(v,m)&&p.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(v)):p},d.prototype.listeners=function(p){var v=n?n+p:p,m=this._events[v];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,j=m.length,S=new Array(j);g<j;g++)S[g]=m[g].fn;return S},d.prototype.listenerCount=function(p){var v=n?n+p:p,m=this._events[v];return m?m.fn?1:m.length:0},d.prototype.emit=function(p,v,m,g,j,S){var _=n?n+p:p;if(!this._events[_])return!1;var x=this._events[_],O=arguments.length,w,E;if(x.fn){switch(x.once&&this.removeListener(p,x.fn,void 0,!0),O){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,v),!0;case 3:return x.fn.call(x.context,v,m),!0;case 4:return x.fn.call(x.context,v,m,g),!0;case 5:return x.fn.call(x.context,v,m,g,j),!0;case 6:return x.fn.call(x.context,v,m,g,j,S),!0}for(E=1,w=new Array(O-1);E<O;E++)w[E-1]=arguments[E];x.fn.apply(x.context,w)}else{var M=x.length,A;for(E=0;E<M;E++)switch(x[E].once&&this.removeListener(p,x[E].fn,void 0,!0),O){case 1:x[E].fn.call(x[E].context);break;case 2:x[E].fn.call(x[E].context,v);break;case 3:x[E].fn.call(x[E].context,v,m);break;case 4:x[E].fn.call(x[E].context,v,m,g);break;default:if(!w)for(A=1,w=new Array(O-1);A<O;A++)w[A-1]=arguments[A];x[E].fn.apply(x[E].context,w)}}return!0},d.prototype.on=function(p,v,m){return o(this,p,v,m,!1)},d.prototype.once=function(p,v,m){return o(this,p,v,m,!0)},d.prototype.removeListener=function(p,v,m,g){var j=n?n+p:p;if(!this._events[j])return this;if(!v)return c(this,j),this;var S=this._events[j];if(S.fn)S.fn===v&&(!g||S.once)&&(!m||S.context===m)&&c(this,j);else{for(var _=0,x=[],O=S.length;_<O;_++)(S[_].fn!==v||g&&!S[_].once||m&&S[_].context!==m)&&x.push(S[_]);x.length?this._events[j]=x.length===1?x[0]:x:c(this,j)}return this},d.prototype.removeAllListeners=function(p){var v;return p?(v=n?n+p:p,this._events[v]&&c(this,v)):(this._events=new r,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=n,d.EventEmitter=d,e.exports=d})(Rb)),Rb.exports}var lW=iW();const oW=rt(lW);var Pb=new oW,Db="recharts.syncMouseEvents";function gu(e){"@babel/helpers - typeof";return gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gu(e)}function sW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fP(r.key),r)}}function cW(e,t,n){return t&&uW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $b(e,t,n){return t=fP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fP(e){var t=fW(e,"string");return gu(t)=="symbol"?t:t+""}function fW(e,t){if(gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dW=(function(){function e(){sW(this,e),$b(this,"activeIndex",0),$b(this,"coordinateList",[]),$b(this,"layout","horizontal")}return cW(e,[{key:"setDetails",value:function(n){var r,l=n.coordinateList,o=l===void 0?null:l,c=n.container,d=c===void 0?null:c,h=n.layout,p=h===void 0?null:h,v=n.offset,m=v===void 0?null:v,g=n.mouseHandlerCallback,j=g===void 0?null:g;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=d??this.container,this.layout=p??this.layout,this.offset=m??this.offset,this.mouseHandlerCallback=j??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var l=this.container.getBoundingClientRect(),o=l.x,c=l.y,d=l.height,h=this.coordinateList[this.activeIndex].coordinate,p=((n=window)===null||n===void 0?void 0:n.scrollX)||0,v=((r=window)===null||r===void 0?void 0:r.scrollY)||0,m=o+h+p,g=c+this.offset.top+d/2+v;this.mouseHandlerCallback({pageX:m,pageY:g})}}}])})();function hW(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],l=e==null?void 0:e[1];if(r&&l&&ve(r)&&ve(l))return!0}return!1}function pW(e,t,n,r){var l=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-l:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-l,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function dP(e){var t=e.cx,n=e.cy,r=e.radius,l=e.startAngle,o=e.endAngle,c=mt(t,n,r,l),d=mt(t,n,r,o);return{points:[c,d],cx:t,cy:n,radius:r,startAngle:l,endAngle:o}}function mW(e,t,n){var r,l,o,c;if(e==="horizontal")r=t.x,o=r,l=n.top,c=n.top+n.height;else if(e==="vertical")l=t.y,c=l,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var d=t.cx,h=t.cy,p=t.innerRadius,v=t.outerRadius,m=t.angle,g=mt(d,h,p,m),j=mt(d,h,v,m);r=g.x,l=g.y,o=j.x,c=j.y}else return dP(t);return[{x:r,y:l},{x:o,y:c}]}function bu(e){"@babel/helpers - typeof";return bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bu(e)}function UC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function ff(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UC(Object(n),!0).forEach(function(r){vW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vW(e,t,n){return t=yW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yW(e){var t=gW(e,"string");return bu(t)=="symbol"?t:t+""}function gW(e,t){if(bu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bW(e){var t,n,r=e.element,l=e.tooltipEventType,o=e.isActive,c=e.activeCoordinate,d=e.activePayload,h=e.offset,p=e.activeTooltipIndex,v=e.tooltipAxisBandSize,m=e.layout,g=e.chartName,j=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!j||!o||!c||g!=="ScatterChart"&&l!=="axis")return null;var S,_=Rx;if(g==="ScatterChart")S=c,_=eF;else if(g==="BarChart")S=pW(m,c,h,v),_=w1;else if(m==="radial"){var x=dP(c),O=x.cx,w=x.cy,E=x.radius,M=x.startAngle,A=x.endAngle;S={cx:O,cy:w,startAngle:M,endAngle:A,innerRadius:E,outerRadius:E},_=vR}else S={points:mW(m,c,h)},_=Rx;var C=ff(ff(ff(ff({stroke:"#ccc",pointerEvents:"none"},h),S),Ce(j,!1)),{},{payload:d,payloadIndex:p,className:qe("recharts-tooltip-cursor",j.className)});return T.isValidElement(j)?T.cloneElement(j,C):T.createElement(_,C)}var xW=["item"],jW=["children","className","width","height","style","compact","title","desc"];function ao(e){"@babel/helpers - typeof";return ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ao(e)}function Ml(){return Ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ml.apply(this,arguments)}function IC(e,t){return wW(e)||SW(e,t)||pP(e,t)||_W()}function _W(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(h=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);h=!0);}catch(v){p=!0,l=v}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}function wW(e){if(Array.isArray(e))return e}function HC(e,t){if(e==null)return{};var n=OW(e,t),r,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OW(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function AW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mP(r.key),r)}}function EW(e,t,n){return t&&NW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TW(e,t,n){return t=gd(t),CW(e,hP()?Reflect.construct(t,n||[],gd(e).constructor):t.apply(e,n))}function CW(e,t){if(t&&(ao(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MW(e)}function MW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hP=function(){return!!e})()}function gd(e){return gd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gd(e)}function kW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f0(e,t)}function f0(e,t){return f0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,l){return r.__proto__=l,r},f0(e,t)}function io(e){return DW(e)||PW(e)||pP(e)||RW()}function RW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pP(e,t){if(e){if(typeof e=="string")return d0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d0(e,t)}}function PW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function DW(e){if(Array.isArray(e))return d0(e)}function d0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GC(Object(n),!0).forEach(function(r){Ee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ee(e,t,n){return t=mP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mP(e){var t=$W(e,"string");return ao(t)=="symbol"?t:t+""}function $W(e,t){if(ao(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ao(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qW={xAxis:["bottom","top"],yAxis:["left","right"]},zW={width:"100%",height:"100%"},vP={x:0,y:0};function df(e){return e}var LW=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},BW=function(t,n,r,l){var o=n.find(function(v){return v&&v.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:l.y};if(t==="vertical")return{x:l.x,y:o.coordinate};if(t==="centric"){var c=o.coordinate,d=l.radius;return oe(oe(oe({},l),mt(l.cx,l.cy,d,c)),{},{angle:c,radius:d})}var h=o.coordinate,p=l.angle;return oe(oe(oe({},l),mt(l.cx,l.cy,h,p)),{},{angle:p,radius:h})}return vP},dh=function(t,n){var r=n.graphicalItems,l=n.dataStartIndex,o=n.dataEndIndex,c=(r??[]).reduce(function(d,h){var p=h.props.data;return p&&p.length?[].concat(io(d),io(p)):d},[]);return c.length>0?c:t&&t.length&&ve(l)&&ve(o)?t.slice(l,o+1):[]};function yP(e){return e==="number"?[0,"auto"]:void 0}var h0=function(t,n,r,l){var o=t.graphicalItems,c=t.tooltipAxis,d=dh(n,t);return r<0||!o||!o.length||r>=d.length?null:o.reduce(function(h,p){var v,m=(v=p.props.data)!==null&&v!==void 0?v:n;m&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(m=m.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(c.dataKey&&!c.allowDuplicatedCategory){var j=m===void 0?d:m;g=Kb(j,c.dataKey,l)}else g=m&&m[r]||d[r];return g?[].concat(io(h),[cR(p,g)]):h},[])},YC=function(t,n,r,l){var o=l||{x:t.chartX,y:t.chartY},c=LW(o,r),d=t.orderedTooltipTicks,h=t.tooltipAxis,p=t.tooltipTicks,v=jH(c,d,p,h);if(v>=0&&p){var m=p[v]&&p[v].value,g=h0(t,n,v,m),j=BW(r,d,v,o);return{activeTooltipIndex:v,activeLabel:m,activePayload:g,activeCoordinate:j}}return null},UW=function(t,n){var r=n.axes,l=n.graphicalItems,o=n.axisType,c=n.axisIdKey,d=n.stackGroups,h=n.dataStartIndex,p=n.dataEndIndex,v=t.layout,m=t.children,g=t.stackOffset,j=aR(v,o);return r.reduce(function(S,_){var x,O=_.type.defaultProps!==void 0?oe(oe({},_.type.defaultProps),_.props):_.props,w=O.type,E=O.dataKey,M=O.allowDataOverflow,A=O.allowDuplicatedCategory,C=O.scale,k=O.ticks,z=O.includeHidden,B=O[c];if(S[B])return S;var Z=dh(t.data,{graphicalItems:l.filter(function(F){var q,de=c in F.props?F.props[c]:(q=F.type.defaultProps)===null||q===void 0?void 0:q[c];return de===B}),dataStartIndex:h,dataEndIndex:p}),G=Z.length,H,W,Q;hW(O.domain,M,w)&&(H=Ex(O.domain,null,M),j&&(w==="number"||C!=="auto")&&(Q=ks(Z,E,"category")));var D=yP(w);if(!H||H.length===0){var P,$=(P=O.domain)!==null&&P!==void 0?P:D;if(E){if(H=ks(Z,E,w),w==="category"&&j){var U=mq(H);A&&U?(W=H,H=ld(0,G)):A||(H=ZE($,H,_).reduce(function(F,q){return F.indexOf(q)>=0?F:[].concat(io(F),[q])},[]))}else if(w==="category")A?H=H.filter(function(F){return F!==""&&!ze(F)}):H=ZE($,H,_).reduce(function(F,q){return F.indexOf(q)>=0||q===""||ze(q)?F:[].concat(io(F),[q])},[]);else if(w==="number"){var ie=AH(Z,l.filter(function(F){var q,de,ge=c in F.props?F.props[c]:(q=F.type.defaultProps)===null||q===void 0?void 0:q[c],we="hide"in F.props?F.props.hide:(de=F.type.defaultProps)===null||de===void 0?void 0:de.hide;return ge===B&&(z||!we)}),E,o,v);ie&&(H=ie)}j&&(w==="number"||C!=="auto")&&(Q=ks(Z,E,"category"))}else j?H=ld(0,G):d&&d[B]&&d[B].hasStack&&w==="number"?H=g==="expand"?[0,1]:uR(d[B].stackGroups,h,p):H=rR(Z,l.filter(function(F){var q=c in F.props?F.props[c]:F.type.defaultProps[c],de="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return q===B&&(z||!de)}),w,v,!0);if(w==="number")H=c0(m,H,B,o,k),$&&(H=Ex($,H,M));else if(w==="category"&&$){var fe=$,L=H.every(function(F){return fe.indexOf(F)>=0});L&&(H=fe)}}return oe(oe({},S),{},Ee({},B,oe(oe({},O),{},{axisType:o,domain:H,categoricalDomain:Q,duplicateDomain:W,originalDomain:(x=O.domain)!==null&&x!==void 0?x:D,isCategorical:j,layout:v})))},{})},IW=function(t,n){var r=n.graphicalItems,l=n.Axis,o=n.axisType,c=n.axisIdKey,d=n.stackGroups,h=n.dataStartIndex,p=n.dataEndIndex,v=t.layout,m=t.children,g=dh(t.data,{graphicalItems:r,dataStartIndex:h,dataEndIndex:p}),j=g.length,S=aR(v,o),_=-1;return r.reduce(function(x,O){var w=O.type.defaultProps!==void 0?oe(oe({},O.type.defaultProps),O.props):O.props,E=w[c],M=yP("number");if(!x[E]){_++;var A;return S?A=ld(0,j):d&&d[E]&&d[E].hasStack?(A=uR(d[E].stackGroups,h,p),A=c0(m,A,E,o)):(A=Ex(M,rR(g,r.filter(function(C){var k,z,B=c in C.props?C.props[c]:(k=C.type.defaultProps)===null||k===void 0?void 0:k[c],Z="hide"in C.props?C.props.hide:(z=C.type.defaultProps)===null||z===void 0?void 0:z.hide;return B===E&&!Z}),"number",v),l.defaultProps.allowDataOverflow),A=c0(m,A,E,o)),oe(oe({},x),{},Ee({},E,oe(oe({axisType:o},l.defaultProps),{},{hide:!0,orientation:qn(qW,"".concat(o,".").concat(_%2),null),domain:A,originalDomain:M,isCategorical:S,layout:v})))}return x},{})},HW=function(t,n){var r=n.axisType,l=r===void 0?"xAxis":r,o=n.AxisComp,c=n.graphicalItems,d=n.stackGroups,h=n.dataStartIndex,p=n.dataEndIndex,v=t.children,m="".concat(l,"Id"),g=er(v,o),j={};return g&&g.length?j=UW(t,{axes:g,graphicalItems:c,axisType:l,axisIdKey:m,stackGroups:d,dataStartIndex:h,dataEndIndex:p}):c&&c.length&&(j=IW(t,{Axis:o,graphicalItems:c,axisType:l,axisIdKey:m,stackGroups:d,dataStartIndex:h,dataEndIndex:p})),j},GW=function(t){var n=za(t),r=Qr(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:W0(r,function(l){return l.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Ff(n,r)}},VC=function(t){var n=t.children,r=t.defaultShowTooltip,l=Dn(n,Zl),o=0,c=0;return t.data&&t.data.length!==0&&(c=t.data.length-1),l&&l.props&&(l.props.startIndex>=0&&(o=l.props.startIndex),l.props.endIndex>=0&&(c=l.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:c,activeTooltipIndex:-1,isTooltipActive:!!r}},YW=function(t){return!t||!t.length?!1:t.some(function(n){var r=Jr(n&&n.type);return r&&r.indexOf("Bar")>=0})},FC=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},VW=function(t,n){var r=t.props,l=t.graphicalItems,o=t.xAxisMap,c=o===void 0?{}:o,d=t.yAxisMap,h=d===void 0?{}:d,p=r.width,v=r.height,m=r.children,g=r.margin||{},j=Dn(m,Zl),S=Dn(m,wi),_=Object.keys(h).reduce(function(A,C){var k=h[C],z=k.orientation;return!k.mirror&&!k.hide?oe(oe({},A),{},Ee({},z,A[z]+k.width)):A},{left:g.left||0,right:g.right||0}),x=Object.keys(c).reduce(function(A,C){var k=c[C],z=k.orientation;return!k.mirror&&!k.hide?oe(oe({},A),{},Ee({},z,qn(A,"".concat(z))+k.height)):A},{top:g.top||0,bottom:g.bottom||0}),O=oe(oe({},x),_),w=O.bottom;j&&(O.bottom+=j.props.height||Zl.defaultProps.height),S&&n&&(O=wH(O,l,r,n));var E=p-O.left-O.right,M=v-O.top-O.bottom;return oe(oe({brushBottom:w},O),{},{width:Math.max(E,0),height:Math.max(M,0)})},FW=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},gP=function(t){var n=t.chartName,r=t.GraphicalChild,l=t.defaultTooltipEventType,o=l===void 0?"axis":l,c=t.validateTooltipEventTypes,d=c===void 0?["axis"]:c,h=t.axisComponents,p=t.legendContent,v=t.formatAxisMap,m=t.defaultProps,g=function(O,w){var E=w.graphicalItems,M=w.stackGroups,A=w.offset,C=w.updateId,k=w.dataStartIndex,z=w.dataEndIndex,B=O.barSize,Z=O.layout,G=O.barGap,H=O.barCategoryGap,W=O.maxBarSize,Q=FC(Z),D=Q.numericAxisName,P=Q.cateAxisName,$=YW(E),U=[];return E.forEach(function(ie,fe){var L=dh(O.data,{graphicalItems:[ie],dataStartIndex:k,dataEndIndex:z}),F=ie.type.defaultProps!==void 0?oe(oe({},ie.type.defaultProps),ie.props):ie.props,q=F.dataKey,de=F.maxBarSize,ge=F["".concat(D,"Id")],we=F["".concat(P,"Id")],$e={},Ge=h.reduce(function(ir,Tr){var xo=w["".concat(Tr.axisType,"Map")],rn=F["".concat(Tr.axisType,"Id")];xo&&xo[rn]||Tr.axisType==="zAxis"||Mi();var ku=xo[rn];return oe(oe({},ir),{},Ee(Ee({},Tr.axisType,ku),"".concat(Tr.axisType,"Ticks"),Qr(ku)))},$e),me=Ge[P],Te=Ge["".concat(P,"Ticks")],Me=M&&M[ge]&&M[ge].hasStack&&DH(ie,M[ge].stackGroups),he=Jr(ie.type).indexOf("Bar")>=0,st=Ff(me,Te),ae=[],Ke=$&&_H({barSize:B,stackGroups:M,totalSize:FW(Ge,P)});if(he){var St,nn,ar=ze(de)?W:de,yr=(St=(nn=Ff(me,Te,!0))!==null&&nn!==void 0?nn:ar)!==null&&St!==void 0?St:0;ae=SH({barGap:G,barCategoryGap:H,bandSize:yr!==st?yr:st,sizeList:Ke[we],maxBarSize:ar}),yr!==st&&(ae=ae.map(function(ir){return oe(oe({},ir),{},{position:oe(oe({},ir.position),{},{offset:ir.position.offset-yr/2})})}))}var ca=ie&&ie.type&&ie.type.getComposedData;ca&&U.push({props:oe(oe({},ca(oe(oe({},Ge),{},{displayedData:L,props:O,dataKey:q,item:ie,bandSize:st,barPosition:ae,offset:A,stackedData:Me,layout:Z,dataStartIndex:k,dataEndIndex:z}))),{},Ee(Ee(Ee({key:ie.key||"item-".concat(fe)},D,Ge[D]),P,Ge[P]),"animationId",C)),childIndex:Nq(ie,O.children),item:ie})}),U},j=function(O,w){var E=O.props,M=O.dataStartIndex,A=O.dataEndIndex,C=O.updateId;if(!fO({props:E}))return null;var k=E.children,z=E.layout,B=E.stackOffset,Z=E.data,G=E.reverseStackOrder,H=FC(z),W=H.numericAxisName,Q=H.cateAxisName,D=er(k,r),P=RH(Z,D,"".concat(W,"Id"),"".concat(Q,"Id"),B,G),$=h.reduce(function(F,q){var de="".concat(q.axisType,"Map");return oe(oe({},F),{},Ee({},de,HW(E,oe(oe({},q),{},{graphicalItems:D,stackGroups:q.axisType===W&&P,dataStartIndex:M,dataEndIndex:A}))))},{}),U=VW(oe(oe({},$),{},{props:E,graphicalItems:D}),w==null?void 0:w.legendBBox);Object.keys($).forEach(function(F){$[F]=v(E,$[F],U,F.replace("Map",""),n)});var ie=$["".concat(Q,"Map")],fe=GW(ie),L=g(E,oe(oe({},$),{},{dataStartIndex:M,dataEndIndex:A,updateId:C,graphicalItems:D,stackGroups:P,offset:U}));return oe(oe({formattedGraphicalItems:L,graphicalItems:D,offset:U,stackGroups:P},fe),$)},S=(function(x){function O(w){var E,M,A;return AW(this,O),A=TW(this,O,[w]),Ee(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ee(A,"accessibilityManager",new dW),Ee(A,"handleLegendBBoxUpdate",function(C){if(C){var k=A.state,z=k.dataStartIndex,B=k.dataEndIndex,Z=k.updateId;A.setState(oe({legendBBox:C},j({props:A.props,dataStartIndex:z,dataEndIndex:B,updateId:Z},oe(oe({},A.state),{},{legendBBox:C}))))}}),Ee(A,"handleReceiveSyncEvent",function(C,k,z){if(A.props.syncId===C){if(z===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(k)}}),Ee(A,"handleBrushChange",function(C){var k=C.startIndex,z=C.endIndex;if(k!==A.state.dataStartIndex||z!==A.state.dataEndIndex){var B=A.state.updateId;A.setState(function(){return oe({dataStartIndex:k,dataEndIndex:z},j({props:A.props,dataStartIndex:k,dataEndIndex:z,updateId:B},A.state))}),A.triggerSyncEvent({dataStartIndex:k,dataEndIndex:z})}}),Ee(A,"handleMouseEnter",function(C){var k=A.getMouseInfo(C);if(k){var z=oe(oe({},k),{},{isTooltipActive:!0});A.setState(z),A.triggerSyncEvent(z);var B=A.props.onMouseEnter;ke(B)&&B(z,C)}}),Ee(A,"triggeredAfterMouseMove",function(C){var k=A.getMouseInfo(C),z=k?oe(oe({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(z),A.triggerSyncEvent(z);var B=A.props.onMouseMove;ke(B)&&B(z,C)}),Ee(A,"handleItemMouseEnter",function(C){A.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),Ee(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),Ee(A,"handleMouseMove",function(C){C.persist(),A.throttleTriggeredAfterMouseMove(C)}),Ee(A,"handleMouseLeave",function(C){A.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};A.setState(k),A.triggerSyncEvent(k);var z=A.props.onMouseLeave;ke(z)&&z(k,C)}),Ee(A,"handleOuterEvent",function(C){var k=Aq(C),z=qn(A.props,"".concat(k));if(k&&ke(z)){var B,Z;/.*touch.*/i.test(k)?Z=A.getMouseInfo(C.changedTouches[0]):Z=A.getMouseInfo(C),z((B=Z)!==null&&B!==void 0?B:{},C)}}),Ee(A,"handleClick",function(C){var k=A.getMouseInfo(C);if(k){var z=oe(oe({},k),{},{isTooltipActive:!0});A.setState(z),A.triggerSyncEvent(z);var B=A.props.onClick;ke(B)&&B(z,C)}}),Ee(A,"handleMouseDown",function(C){var k=A.props.onMouseDown;if(ke(k)){var z=A.getMouseInfo(C);k(z,C)}}),Ee(A,"handleMouseUp",function(C){var k=A.props.onMouseUp;if(ke(k)){var z=A.getMouseInfo(C);k(z,C)}}),Ee(A,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),Ee(A,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&A.handleMouseDown(C.changedTouches[0])}),Ee(A,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&A.handleMouseUp(C.changedTouches[0])}),Ee(A,"handleDoubleClick",function(C){var k=A.props.onDoubleClick;if(ke(k)){var z=A.getMouseInfo(C);k(z,C)}}),Ee(A,"handleContextMenu",function(C){var k=A.props.onContextMenu;if(ke(k)){var z=A.getMouseInfo(C);k(z,C)}}),Ee(A,"triggerSyncEvent",function(C){A.props.syncId!==void 0&&Pb.emit(Db,A.props.syncId,C,A.eventEmitterSymbol)}),Ee(A,"applySyncEvent",function(C){var k=A.props,z=k.layout,B=k.syncMethod,Z=A.state.updateId,G=C.dataStartIndex,H=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)A.setState(oe({dataStartIndex:G,dataEndIndex:H},j({props:A.props,dataStartIndex:G,dataEndIndex:H,updateId:Z},A.state)));else if(C.activeTooltipIndex!==void 0){var W=C.chartX,Q=C.chartY,D=C.activeTooltipIndex,P=A.state,$=P.offset,U=P.tooltipTicks;if(!$)return;if(typeof B=="function")D=B(U,C);else if(B==="value"){D=-1;for(var ie=0;ie<U.length;ie++)if(U[ie].value===C.activeLabel){D=ie;break}}var fe=oe(oe({},$),{},{x:$.left,y:$.top}),L=Math.min(W,fe.x+fe.width),F=Math.min(Q,fe.y+fe.height),q=U[D]&&U[D].value,de=h0(A.state,A.props.data,D),ge=U[D]?{x:z==="horizontal"?U[D].coordinate:L,y:z==="horizontal"?F:U[D].coordinate}:vP;A.setState(oe(oe({},C),{},{activeLabel:q,activeCoordinate:ge,activePayload:de,activeTooltipIndex:D}))}else A.setState(C)}),Ee(A,"renderCursor",function(C){var k,z=A.state,B=z.isTooltipActive,Z=z.activeCoordinate,G=z.activePayload,H=z.offset,W=z.activeTooltipIndex,Q=z.tooltipAxisBandSize,D=A.getTooltipEventType(),P=(k=C.props.active)!==null&&k!==void 0?k:B,$=A.props.layout,U=C.key||"_recharts-cursor";return Y.createElement(bW,{key:U,activeCoordinate:Z,activePayload:G,activeTooltipIndex:W,chartName:n,element:C,isActive:P,layout:$,offset:H,tooltipAxisBandSize:Q,tooltipEventType:D})}),Ee(A,"renderPolarAxis",function(C,k,z){var B=qn(C,"type.axisType"),Z=qn(A.state,"".concat(B,"Map")),G=C.type.defaultProps,H=G!==void 0?oe(oe({},G),C.props):C.props,W=Z&&Z[H["".concat(B,"Id")]];return T.cloneElement(C,oe(oe({},W),{},{className:qe(B,W.className),key:C.key||"".concat(k,"-").concat(z),ticks:Qr(W,!0)}))}),Ee(A,"renderPolarGrid",function(C){var k=C.props,z=k.radialLines,B=k.polarAngles,Z=k.polarRadius,G=A.state,H=G.radiusAxisMap,W=G.angleAxisMap,Q=za(H),D=za(W),P=D.cx,$=D.cy,U=D.innerRadius,ie=D.outerRadius;return T.cloneElement(C,{polarAngles:Array.isArray(B)?B:Qr(D,!0).map(function(fe){return fe.coordinate}),polarRadius:Array.isArray(Z)?Z:Qr(Q,!0).map(function(fe){return fe.coordinate}),cx:P,cy:$,innerRadius:U,outerRadius:ie,key:C.key||"polar-grid",radialLines:z})}),Ee(A,"renderLegend",function(){var C=A.state.formattedGraphicalItems,k=A.props,z=k.children,B=k.width,Z=k.height,G=A.props.margin||{},H=B-(G.left||0)-(G.right||0),W=tR({children:z,formattedGraphicalItems:C,legendWidth:H,legendContent:p});if(!W)return null;var Q=W.item,D=HC(W,xW);return T.cloneElement(Q,oe(oe({},D),{},{chartWidth:B,chartHeight:Z,margin:G,onBBoxUpdate:A.handleLegendBBoxUpdate}))}),Ee(A,"renderTooltip",function(){var C,k=A.props,z=k.children,B=k.accessibilityLayer,Z=Dn(z,xn);if(!Z)return null;var G=A.state,H=G.isTooltipActive,W=G.activeCoordinate,Q=G.activePayload,D=G.activeLabel,P=G.offset,$=(C=Z.props.active)!==null&&C!==void 0?C:H;return T.cloneElement(Z,{viewBox:oe(oe({},P),{},{x:P.left,y:P.top}),active:$,label:D,payload:$?Q:[],coordinate:W,accessibilityLayer:B})}),Ee(A,"renderBrush",function(C){var k=A.props,z=k.margin,B=k.data,Z=A.state,G=Z.offset,H=Z.dataStartIndex,W=Z.dataEndIndex,Q=Z.updateId;return T.cloneElement(C,{key:C.key||"_recharts-brush",onChange:of(A.handleBrushChange,C.props.onChange),data:B,x:ve(C.props.x)?C.props.x:G.left,y:ve(C.props.y)?C.props.y:G.top+G.height+G.brushBottom-(z.bottom||0),width:ve(C.props.width)?C.props.width:G.width,startIndex:H,endIndex:W,updateId:"brush-".concat(Q)})}),Ee(A,"renderReferenceElement",function(C,k,z){if(!C)return null;var B=A,Z=B.clipPathId,G=A.state,H=G.xAxisMap,W=G.yAxisMap,Q=G.offset,D=C.type.defaultProps||{},P=C.props,$=P.xAxisId,U=$===void 0?D.xAxisId:$,ie=P.yAxisId,fe=ie===void 0?D.yAxisId:ie;return T.cloneElement(C,{key:C.key||"".concat(k,"-").concat(z),xAxis:H[U],yAxis:W[fe],viewBox:{x:Q.left,y:Q.top,width:Q.width,height:Q.height},clipPathId:Z})}),Ee(A,"renderActivePoints",function(C){var k=C.item,z=C.activePoint,B=C.basePoint,Z=C.childIndex,G=C.isRange,H=[],W=k.props.key,Q=k.item.type.defaultProps!==void 0?oe(oe({},k.item.type.defaultProps),k.item.props):k.item.props,D=Q.activeDot,P=Q.dataKey,$=oe(oe({index:Z,dataKey:P,cx:z.x,cy:z.y,r:4,fill:S1(k.item),strokeWidth:2,stroke:"#fff",payload:z.payload,value:z.value},Ce(D,!1)),_f(D));return H.push(O.renderActiveDot(D,$,"".concat(W,"-activePoint-").concat(Z))),B?H.push(O.renderActiveDot(D,oe(oe({},$),{},{cx:B.x,cy:B.y}),"".concat(W,"-basePoint-").concat(Z))):G&&H.push(null),H}),Ee(A,"renderGraphicChild",function(C,k,z){var B=A.filterFormatItem(C,k,z);if(!B)return null;var Z=A.getTooltipEventType(),G=A.state,H=G.isTooltipActive,W=G.tooltipAxis,Q=G.activeTooltipIndex,D=G.activeLabel,P=A.props.children,$=Dn(P,xn),U=B.props,ie=U.points,fe=U.isRange,L=U.baseLine,F=B.item.type.defaultProps!==void 0?oe(oe({},B.item.type.defaultProps),B.item.props):B.item.props,q=F.activeDot,de=F.hide,ge=F.activeBar,we=F.activeShape,$e=!!(!de&&H&&$&&(q||ge||we)),Ge={};Z!=="axis"&&$&&$.props.trigger==="click"?Ge={onClick:of(A.handleItemMouseEnter,C.props.onClick)}:Z!=="axis"&&(Ge={onMouseLeave:of(A.handleItemMouseLeave,C.props.onMouseLeave),onMouseEnter:of(A.handleItemMouseEnter,C.props.onMouseEnter)});var me=T.cloneElement(C,oe(oe({},B.props),Ge));function Te(Tr){return typeof W.dataKey=="function"?W.dataKey(Tr.payload):null}if($e)if(Q>=0){var Me,he;if(W.dataKey&&!W.allowDuplicatedCategory){var st=typeof W.dataKey=="function"?Te:"payload.".concat(W.dataKey.toString());Me=Kb(ie,st,D),he=fe&&L&&Kb(L,st,D)}else Me=ie==null?void 0:ie[Q],he=fe&&L&&L[Q];if(we||ge){var ae=C.props.activeIndex!==void 0?C.props.activeIndex:Q;return[T.cloneElement(C,oe(oe(oe({},B.props),Ge),{},{activeIndex:ae})),null,null]}if(!ze(Me))return[me].concat(io(A.renderActivePoints({item:B,activePoint:Me,basePoint:he,childIndex:Q,isRange:fe})))}else{var Ke,St=(Ke=A.getItemByXY(A.state.activeCoordinate))!==null&&Ke!==void 0?Ke:{graphicalItem:me},nn=St.graphicalItem,ar=nn.item,yr=ar===void 0?C:ar,ca=nn.childIndex,ir=oe(oe(oe({},B.props),Ge),{},{activeIndex:ca});return[T.cloneElement(yr,ir),null,null]}return fe?[me,null,null]:[me,null]}),Ee(A,"renderCustomized",function(C,k,z){return T.cloneElement(C,oe(oe({key:"recharts-customized-".concat(z)},A.props),A.state))}),Ee(A,"renderMap",{CartesianGrid:{handler:df,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:df},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:df},YAxis:{handler:df},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((E=w.id)!==null&&E!==void 0?E:Au("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=tk(A.triggeredAfterMouseMove,(M=w.throttleDelay)!==null&&M!==void 0?M:1e3/60),A.state={},A}return kW(O,x),EW(O,[{key:"componentDidMount",value:function(){var E,M;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(M=this.props.margin.top)!==null&&M!==void 0?M:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,M=E.children,A=E.data,C=E.height,k=E.layout,z=Dn(M,xn);if(z){var B=z.props.defaultIndex;if(!(typeof B!="number"||B<0||B>this.state.tooltipTicks.length-1)){var Z=this.state.tooltipTicks[B]&&this.state.tooltipTicks[B].value,G=h0(this.state,A,B,Z),H=this.state.tooltipTicks[B].coordinate,W=(this.state.offset.top+C)/2,Q=k==="horizontal",D=Q?{x:H,y:W}:{y:H,x:W},P=this.state.formattedGraphicalItems.find(function(U){var ie=U.item;return ie.type.name==="Scatter"});P&&(D=oe(oe({},D),P.props.points[B].tooltipPosition),G=P.props.points[B].tooltipPayload);var $={activeTooltipIndex:B,isTooltipActive:!0,activeLabel:Z,activePayload:G,activeCoordinate:D};this.setState($),this.renderCursor(z),this.accessibilityManager.setIndex(B)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,M){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==M.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==E.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==E.margin){var A,C;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(E){Zb([Dn(E.children,xn)],[Dn(this.props.children,xn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=Dn(this.props.children,xn);if(E&&typeof E.props.shared=="boolean"){var M=E.props.shared?"axis":"item";return d.indexOf(M)>=0?M:o}return o}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var M=this.container,A=M.getBoundingClientRect(),C=hU(A),k={chartX:Math.round(E.pageX-C.left),chartY:Math.round(E.pageY-C.top)},z=A.width/M.offsetWidth||1,B=this.inRange(k.chartX,k.chartY,z);if(!B)return null;var Z=this.state,G=Z.xAxisMap,H=Z.yAxisMap,W=this.getTooltipEventType(),Q=YC(this.state,this.props.data,this.props.layout,B);if(W!=="axis"&&G&&H){var D=za(G).scale,P=za(H).scale,$=D&&D.invert?D.invert(k.chartX):null,U=P&&P.invert?P.invert(k.chartY):null;return oe(oe({},k),{},{xValue:$,yValue:U},Q)}return Q?oe(oe({},k),Q):null}},{key:"inRange",value:function(E,M){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,k=E/A,z=M/A;if(C==="horizontal"||C==="vertical"){var B=this.state.offset,Z=k>=B.left&&k<=B.left+B.width&&z>=B.top&&z<=B.top+B.height;return Z?{x:k,y:z}:null}var G=this.state,H=G.angleAxisMap,W=G.radiusAxisMap;if(H&&W){var Q=za(H);return JE({x:k,y:z},Q)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,M=this.getTooltipEventType(),A=Dn(E,xn),C={};A&&M==="axis"&&(A.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var k=_f(this.props,this.handleOuterEvent);return oe(oe({},k),C)}},{key:"addListener",value:function(){Pb.on(Db,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Pb.removeListener(Db,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,M,A){for(var C=this.state.formattedGraphicalItems,k=0,z=C.length;k<z;k++){var B=C[k];if(B.item===E||B.props.key===E.key||M===Jr(B.item.type)&&A===B.childIndex)return B}return null}},{key:"renderClipPath",value:function(){var E=this.clipPathId,M=this.state.offset,A=M.left,C=M.top,k=M.height,z=M.width;return Y.createElement("defs",null,Y.createElement("clipPath",{id:E},Y.createElement("rect",{x:A,y:C,height:k,width:z})))}},{key:"getXScales",value:function(){var E=this.state.xAxisMap;return E?Object.entries(E).reduce(function(M,A){var C=IC(A,2),k=C[0],z=C[1];return oe(oe({},M),{},Ee({},k,z.scale))},{}):null}},{key:"getYScales",value:function(){var E=this.state.yAxisMap;return E?Object.entries(E).reduce(function(M,A){var C=IC(A,2),k=C[0],z=C[1];return oe(oe({},M),{},Ee({},k,z.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(E){var M;return(M=this.state.xAxisMap)===null||M===void 0||(M=M[E])===null||M===void 0?void 0:M.scale}},{key:"getYScaleByAxisId",value:function(E){var M;return(M=this.state.yAxisMap)===null||M===void 0||(M=M[E])===null||M===void 0?void 0:M.scale}},{key:"getItemByXY",value:function(E){var M=this.state,A=M.formattedGraphicalItems,C=M.activeItem;if(A&&A.length)for(var k=0,z=A.length;k<z;k++){var B=A[k],Z=B.props,G=B.item,H=G.type.defaultProps!==void 0?oe(oe({},G.type.defaultProps),G.props):G.props,W=Jr(G.type);if(W==="Bar"){var Q=(Z.data||[]).find(function(U){return PV(E,U)});if(Q)return{graphicalItem:B,payload:Q}}else if(W==="RadialBar"){var D=(Z.data||[]).find(function(U){return JE(E,U)});if(D)return{graphicalItem:B,payload:D}}else if(ih(B,C)||lh(B,C)||du(B,C)){var P=rK({graphicalItem:B,activeTooltipItem:C,itemData:H.data}),$=H.activeIndex===void 0?P:H.activeIndex;return{graphicalItem:oe(oe({},B),{},{childIndex:$}),payload:du(B,C)?H.data[P]:B.props.data[P]}}}return null}},{key:"render",value:function(){var E=this;if(!fO(this))return null;var M=this.props,A=M.children,C=M.className,k=M.width,z=M.height,B=M.style,Z=M.compact,G=M.title,H=M.desc,W=HC(M,jW),Q=Ce(W,!1);if(Z)return Y.createElement(AC,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Y.createElement(Qb,Ml({},Q,{width:k,height:z,title:G,desc:H}),this.renderClipPath(),hO(A,this.renderMap)));if(this.props.accessibilityLayer){var D,P;Q.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,Q.role=(P=this.props.role)!==null&&P!==void 0?P:"application",Q.onKeyDown=function(U){E.accessibilityManager.keyboardEvent(U)},Q.onFocus=function(){E.accessibilityManager.focus()}}var $=this.parseEventsOfWrapper();return Y.createElement(AC,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Y.createElement("div",Ml({className:qe("recharts-wrapper",C),style:oe({position:"relative",cursor:"default",width:k,height:z},B)},$,{ref:function(ie){E.container=ie}}),Y.createElement(Qb,Ml({},Q,{width:k,height:z,title:G,desc:H,style:zW}),this.renderClipPath(),hO(A,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(T.Component);Ee(S,"displayName",n),Ee(S,"defaultProps",oe({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},m)),Ee(S,"getDerivedStateFromProps",function(x,O){var w=x.dataKey,E=x.data,M=x.children,A=x.width,C=x.height,k=x.layout,z=x.stackOffset,B=x.margin,Z=O.dataStartIndex,G=O.dataEndIndex;if(O.updateId===void 0){var H=VC(x);return oe(oe(oe({},H),{},{updateId:0},j(oe(oe({props:x},H),{},{updateId:0}),O)),{},{prevDataKey:w,prevData:E,prevWidth:A,prevHeight:C,prevLayout:k,prevStackOffset:z,prevMargin:B,prevChildren:M})}if(w!==O.prevDataKey||E!==O.prevData||A!==O.prevWidth||C!==O.prevHeight||k!==O.prevLayout||z!==O.prevStackOffset||!Rl(B,O.prevMargin)){var W=VC(x),Q={chartX:O.chartX,chartY:O.chartY,isTooltipActive:O.isTooltipActive},D=oe(oe({},YC(O,E,k)),{},{updateId:O.updateId+1}),P=oe(oe(oe({},W),Q),D);return oe(oe(oe({},P),j(oe({props:x},P),O)),{},{prevDataKey:w,prevData:E,prevWidth:A,prevHeight:C,prevLayout:k,prevStackOffset:z,prevMargin:B,prevChildren:M})}if(!Zb(M,O.prevChildren)){var $,U,ie,fe,L=Dn(M,Zl),F=L&&($=(U=L.props)===null||U===void 0?void 0:U.startIndex)!==null&&$!==void 0?$:Z,q=L&&(ie=(fe=L.props)===null||fe===void 0?void 0:fe.endIndex)!==null&&ie!==void 0?ie:G,de=F!==Z||q!==G,ge=!ze(E),we=ge&&!de?O.updateId:O.updateId+1;return oe(oe({updateId:we},j(oe(oe({props:x},O),{},{updateId:we,dataStartIndex:F,dataEndIndex:q}),O)),{},{prevChildren:M,dataStartIndex:F,dataEndIndex:q})}return null}),Ee(S,"renderActiveDot",function(x,O,w){var E;return T.isValidElement(x)?E=T.cloneElement(x,O):ke(x)?E=x(O):E=Y.createElement(O1,O),Y.createElement(tt,{className:"recharts-active-dot",key:w},E)});var _=T.forwardRef(function(O,w){return Y.createElement(S,Ml({},O,{ref:w}))});return _.displayName=S.displayName,_},bd=gP({chartName:"BarChart",GraphicalChild:_n,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ri},{axisType:"yAxis",AxisComp:Pi}],formatAxisMap:lX}),KW=gP({chartName:"PieChart",GraphicalChild:ua,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:ah},{axisType:"radiusAxis",AxisComp:nh}],formatAxisMap:YH,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const KC=["#00d4ff","#3fb950","#d29922","#bc8cff","#f778ba","#58a6ff"],XW={assessment:"Assessment",architecture:"Architectuur",implementation:"Implementatie",monitoring:"Monitoring",consulting:"Consulting",training:"Training"},XC={planned:"Gepland",in_progress:"Lopend",completed:"Afgerond",on_hold:"On hold",draft:"Concept",sent:"Verzonden",paid:"Betaald",overdue:"Verlopen",cancelled:"Geannuleerd",todo:"Te doen",done:"Klaar",lead:"Lead",active:"Actief",paused:"Gepauzeerd",archived:"Gearchiveerd"},qb={contentStyle:{backgroundColor:"#131a2a",border:"1px solid #1f2a44",borderRadius:8,fontSize:12},labelStyle:{color:"#8b9bb8"}};function ZW(){const[e,t]=T.useState(null),[n,r]=T.useState(null),l=()=>{r(null),ce.get("/dashboard").then(t).catch(r)};if(T.useEffect(l,[]),n)return u.jsx(Oe,{error:n,onRetry:l});if(!e)return u.jsx(Ze,{});const{stats:o}=e,c=e.hoursByMonth.map(p=>({...p,maand:p.month.slice(5)})),d=e.revenueByMonth.map(p=>({...p,maand:p.month.slice(5)})),h=e.engagementByType.map(p=>({name:XW[p.type]||p.type,value:p.cnt}));return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Dashboard"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Overzicht van je consultancy-praktijk"})]}),u.jsx(ft,{to:"/clients",children:u.jsxs("span",{className:"text-[13px] text-accent hover:underline flex items-center gap-1",children:["Alle cliënten ",u.jsx(O0,{className:"w-3.5 h-3.5"})]})})]}),u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 xl:grid-cols-6 gap-3",children:[u.jsx(tn,{icon:E0,label:"Cliënten",value:o.totalClients,sub:`${o.activeClients} actief · ${o.leads} leads`,color:"accent"}),u.jsx(tn,{icon:A0,label:"Lopende engagements",value:o.activeEngagements,color:"blue"}),u.jsx(tn,{icon:FM,label:"Open taken",value:o.totalTasks-o.completedTasks,sub:o.overdueTasks>0?`${o.overdueTasks} te laat`:void 0,color:o.overdueTasks>0?"red":"green"}),u.jsx(tn,{icon:La,label:"Uren totaal",value:ye.hours(o.totalHours),sub:`${ye.hours(o.billableHours)} facturabel`,color:"purple"}),u.jsx(tn,{icon:qs,label:"Openstaand",value:ye.euro(o.totalOutstanding),color:"yellow"}),u.jsx(tn,{icon:Ed,label:"Betaald",value:ye.euro(o.totalPaid),color:"green"})]}),u.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-4",children:[u.jsx(Ae,{title:"Uren per maand",subtitle:"Totaal vs facturabel (6 mnd)",className:"xl:col-span-2",children:u.jsx("div",{className:"h-56",children:u.jsx(Ts,{width:"100%",height:"100%",children:u.jsxs(bd,{data:c,children:[u.jsx(yu,{strokeDasharray:"3 3",stroke:"#1f2a44",vertical:!1}),u.jsx(Ri,{dataKey:"maand",tick:{fill:"#8b9bb8",fontSize:11},axisLine:!1,tickLine:!1}),u.jsx(Pi,{tick:{fill:"#8b9bb8",fontSize:11},axisLine:!1,tickLine:!1}),u.jsx(xn,{...qb,cursor:{fill:"rgba(0,212,255,0.06)"}}),u.jsx(_n,{dataKey:"hours",name:"Totaal",fill:"#58a6ff",radius:[4,4,0,0]}),u.jsx(_n,{dataKey:"billable",name:"Facturabel",fill:"#00d4ff",radius:[4,4,0,0]})]})})})}),u.jsx(Ae,{title:"Engagements per type",children:u.jsx("div",{className:"h-56",children:h.length===0?u.jsx("div",{className:"h-full flex items-center justify-center text-muted text-[13px]",children:"Nog geen engagements"}):u.jsx(Ts,{width:"100%",height:"100%",children:u.jsxs(KW,{children:[u.jsx(ua,{data:h,dataKey:"value",nameKey:"name",innerRadius:50,outerRadius:75,paddingAngle:3,children:h.map((p,v)=>u.jsx(Ud,{fill:KC[v%KC.length]},v))}),u.jsx(xn,{...qb}),u.jsx(wi,{iconSize:8,wrapperStyle:{fontSize:11,color:"#8b9bb8"}})]})})})})]}),u.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-4",children:[u.jsx(Ae,{title:"Recente engagements",actions:u.jsx(ft,{to:"/engagements",className:"text-[12px] text-accent hover:underline",children:"Alles"}),className:"xl:col-span-1",children:e.recentEngagements.length===0?u.jsx("div",{className:"text-muted text-[13px] py-4 text-center",children:"Nog geen engagements"}):u.jsx("div",{className:"space-y-2",children:e.recentEngagements.slice(0,6).map(p=>u.jsxs(ft,{to:`/engagements/${p.id}`,className:"flex items-center justify-between gap-2 px-2.5 py-2 rounded-lg hover:bg-card-hover transition-colors",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[13px] font-medium truncate",children:p.title}),u.jsx("div",{className:"text-[11px] text-muted",children:p.client_name})]}),u.jsx(Tt,{status:p.status,labels:XC})]},p.id))})}),u.jsx(Ae,{title:"Taken op de plank",actions:u.jsx(ft,{to:"/tasks",className:"text-[12px] text-accent hover:underline",children:"Alles"}),className:"xl:col-span-1",children:e.upcomingTasks.length===0?u.jsx("div",{className:"text-muted text-[13px] py-4 text-center",children:"Geen open taken"}):u.jsx("div",{className:"space-y-2",children:e.upcomingTasks.slice(0,6).map(p=>u.jsxs("div",{className:"flex items-center justify-between gap-2 px-2.5 py-2 rounded-lg hover:bg-card-hover transition-colors",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[13px] font-medium truncate",children:p.title}),u.jsxs("div",{className:"text-[11px] text-muted",children:[p.client_name," · ",p.due_date?ye.date(p.due_date):"geen deadline"]})]}),u.jsx(nt,{color:XC&&p.priority==="critical"?"red":p.priority==="high"?"yellow":"blue",children:p.priority})]},p.id))})}),u.jsx(Ae,{title:"Slim advies",subtitle:"Automatisch gegenereerd",className:"xl:col-span-1",children:e.activeAdvice.length===0?u.jsxs("div",{className:"text-muted text-[13px] py-4 text-center flex flex-col items-center gap-2",children:[u.jsx(XM,{className:"w-5 h-5"})," Alles onder controle"]}):u.jsx("div",{className:"space-y-2",children:e.activeAdvice.slice(0,5).map(p=>u.jsxs("div",{className:"flex items-start gap-2.5 px-2.5 py-2 rounded-lg hover:bg-card-hover",children:[u.jsx(JM,{className:`w-4 h-4 mt-0.5 shrink-0 ${p.priority==="critical"?"text-red":p.priority==="high"?"text-yellow":"text-blue"}`}),u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[12px]",children:p.advice_text}),u.jsx("div",{className:"text-[11px] text-muted mt-0.5",children:p.client_name})]})]},p.id))})})]}),u.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4",children:[u.jsx(Ae,{title:"Omzet per maand",subtitle:"Betaald vs openstaand (6 mnd)",children:u.jsx("div",{className:"h-52",children:u.jsx(Ts,{width:"100%",height:"100%",children:u.jsxs(bd,{data:d,children:[u.jsx(yu,{strokeDasharray:"3 3",stroke:"#1f2a44",vertical:!1}),u.jsx(Ri,{dataKey:"maand",tick:{fill:"#8b9bb8",fontSize:11},axisLine:!1,tickLine:!1}),u.jsx(Pi,{tick:{fill:"#8b9bb8",fontSize:11},axisLine:!1,tickLine:!1,tickFormatter:p=>`€${p}`}),u.jsx(xn,{...qb,formatter:p=>ye.euro(p),cursor:{fill:"rgba(0,212,255,0.06)"}}),u.jsx(_n,{dataKey:"paid",name:"Betaald",fill:"#3fb950",radius:[4,4,0,0]}),u.jsx(_n,{dataKey:"outstanding",name:"Openstaand",fill:"#d29922",radius:[4,4,0,0]})]})})})}),u.jsx(Ae,{title:"Recente activiteit",actions:u.jsxs(ft,{to:"/settings?tab=audit",className:"text-[12px] text-accent hover:underline flex items-center gap-1",children:[u.jsx(z$,{className:"w-3.5 h-3.5"})," Audit-log"]}),padding:!1,children:u.jsx("div",{className:"p-4",children:u.jsx(Dt,{columns:[{label:"Wie",key:"username"},{label:"Actie",key:"action"},{label:"Wanneer",render:p=>u.jsx("span",{className:"text-muted",children:ye.datetime(p.created_at)})}],rows:e.recentAudit,keyFn:p=>p.id,empty:u.jsx("div",{className:"text-muted text-[13px] py-4 text-center",children:"Nog geen activiteit"})})})})]})]})}const bP={lead:"Lead",active:"Actief",paused:"Gepauzeerd",archived:"Gearchiveerd"},WW=[{key:"",label:"Alle"},{key:"lead",label:"Leads"},{key:"active",label:"Actief"},{key:"paused",label:"Gepauzeerd"},{key:"archived",label:"Gearchiveerd"}],ZC={name:"",industry:"",website:"",contact_name:"",contact_email:"",contact_phone:"",status:"lead",source:"",notes:""};function QW({open:e,onClose:t,client:n,onSaved:r,onDelete:l}){const[o,c]=T.useState(ZC),[d,h]=T.useState(!1),[p,v]=T.useState(null);T.useEffect(()=>{e&&(v(null),c(n?{name:n.name||"",industry:n.industry||"",website:n.website||"",contact_name:n.contact_name||"",contact_email:n.contact_email||"",contact_phone:n.contact_phone||"",status:n.status||"lead",source:n.source||"",notes:n.notes||""}:ZC))},[e,n]);const m=j=>S=>c(_=>({..._,[j]:S.target.value})),g=async j=>{j.preventDefault(),h(!0),v(null);try{n?await ce.put(`/clients/${n.id}`,o):await ce.post("/clients",o),r()}catch(S){v(S)}finally{h(!1)}};return u.jsx(_t,{open:e,onClose:t,title:n?"Cliënt bewerken":"Nieuwe cliënt",wide:!0,children:u.jsxs("form",{onSubmit:g,className:"space-y-3",children:[u.jsx(Oe,{error:p}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[u.jsx(te,{label:"Bedrijfsnaam *",className:"md:col-span-2",children:u.jsx("input",{className:X,value:o.name,onChange:m("name"),required:!0,autoFocus:!0})}),u.jsx(te,{label:"Branche",children:u.jsx("input",{className:X,value:o.industry,onChange:m("industry")})}),u.jsx(te,{label:"Website",children:u.jsx("input",{className:X,value:o.website,onChange:m("website"),placeholder:"https://..."})}),u.jsx(te,{label:"Contactpersoon",children:u.jsx("input",{className:X,value:o.contact_name,onChange:m("contact_name")})}),u.jsx(te,{label:"E-mail",children:u.jsx("input",{type:"email",className:X,value:o.contact_email,onChange:m("contact_email")})}),u.jsx(te,{label:"Telefoon",children:u.jsx("input",{className:X,value:o.contact_phone,onChange:m("contact_phone")})}),u.jsx(te,{label:"Status",children:u.jsx("select",{className:X,value:o.status,onChange:m("status"),children:Object.entries(bP).map(([j,S])=>u.jsx("option",{value:j,children:S},j))})}),u.jsx(te,{label:"Bron",className:"md:col-span-2",children:u.jsx("input",{className:X,value:o.source,onChange:m("source"),placeholder:"Bijv. referral, website, netwerk"})}),u.jsx(te,{label:"Notities",className:"md:col-span-2",children:u.jsx("textarea",{className:X,rows:3,value:o.notes,onChange:m("notes")})})]}),u.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[u.jsx("div",{children:n&&l&&u.jsxs(pe,{type:"button",variant:"danger",onClick:l,children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(pe,{type:"button",variant:"secondary",onClick:t,children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:d,children:n?"Opslaan":"Aanmaken"})]})]})]})})}function JW(){const[e,t]=T.useState(null),[n,r]=T.useState(null),[l,o]=T.useState(""),[c,d]=T.useState(""),[h,p]=T.useState(""),[v,m]=T.useState({open:!1,client:null}),g=()=>{r(null),ce.get("/clients"+Ha({status:l,search:h})).then(t).catch(r)};T.useEffect(g,[l,h]);const j=x=>{x.preventDefault(),p(c.trim())},S=()=>m({open:!1,client:null}),_=async()=>{const x=v.client;if(x&&window.confirm(`Cliënt "${x.name}" verwijderen? Dit kan niet ongedaan worden gemaakt.`))try{await ce.del(`/clients/${x.id}`),S(),g()}catch(O){r(O)}};return u.jsxs("div",{className:"space-y-4 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Cliënten"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Beheer je klantrelaties"})]}),u.jsxs(pe,{onClick:()=>m({open:!0,client:null}),children:[u.jsx(qt,{className:"w-4 h-4"})," Nieuwe cliënt"]})]}),u.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[u.jsxs("form",{onSubmit:j,className:"flex gap-2",children:[u.jsx("input",{className:X+" w-64",placeholder:"Zoeken op naam, contact of branche...",value:c,onChange:x=>d(x.target.value)}),u.jsxs(pe,{type:"submit",variant:"secondary",children:[u.jsx(QM,{className:"w-4 h-4"})," Zoeken"]})]}),u.jsx("div",{className:"flex gap-1 flex-wrap",children:WW.map(x=>u.jsx("button",{onClick:()=>o(x.key),className:`px-3 py-1.5 rounded-lg text-[12px] transition-colors ${l===x.key?"bg-accent-soft text-accent font-medium":"text-muted hover:text-text hover:bg-card"}`,children:x.label},x.key))})]}),n&&u.jsx(Oe,{error:n,onRetry:g}),!e&&!n&&u.jsx(Ze,{}),e&&u.jsx(Ae,{padding:!1,children:u.jsx("div",{className:"p-4",children:u.jsx(Dt,{columns:[{label:"Naam",render:x=>u.jsx(ft,{to:`/clients/${x.id}`,className:"font-medium text-text hover:text-accent transition-colors",children:x.name})},{label:"Contactpersoon",render:x=>x.contact_name||u.jsx("span",{className:"text-muted",children:"-"})},{label:"E-mail",render:x=>x.contact_email||u.jsx("span",{className:"text-muted",children:"-"})},{label:"Branche",render:x=>x.industry||u.jsx("span",{className:"text-muted",children:"-"})},{label:"Status",render:x=>u.jsx(Tt,{status:x.status,labels:bP})},{label:"Engagements",render:x=>x.engagement_count},{label:"Laatst bijgewerkt",render:x=>u.jsx("span",{className:"text-muted",children:ye.date(x.updated_at)})},{label:"",render:x=>u.jsx("div",{className:"flex items-center justify-end",children:u.jsx("button",{onClick:()=>m({open:!0,client:x}),className:"p-1.5 rounded-md text-muted hover:text-text hover:bg-bg-soft",title:"Bewerken",children:u.jsx(Ga,{className:"w-3.5 h-3.5"})})})}],rows:e,keyFn:x=>x.id,empty:u.jsx(Ar,{icon:E0,title:"Geen cliënten gevonden",hint:"Pas de filters aan of voeg een nieuwe cliënt toe."})})})}),u.jsx(QW,{open:v.open,client:v.client,onClose:S,onSaved:()=>{S(),g()},onDelete:_})]})}const lo={assessment:"Assessment",architecture:"Architectuur",implementation:"Implementatie",monitoring:"Monitoring",consulting:"Consulting",training:"Training"},oo={planned:"Gepland",in_progress:"Lopend",completed:"Afgerond",on_hold:"On hold"},zb="bg-bg-soft border border-border rounded-lg px-3 py-2 text-[13px] focus:outline-none focus:border-accent/60 transition-colors",WC={client_id:"",type:"assessment",title:"",description:"",start_date:"",end_date:""};function xP({open:e,onClose:t,clients:n=[],clientId:r,onSaved:l}){const[o,c]=T.useState(WC),[d,h]=T.useState(!1),[p,v]=T.useState(null);T.useEffect(()=>{e&&(v(null),c({...WC,client_id:r?String(r):""}))},[e,r]);const m=j=>S=>c(_=>({..._,[j]:S.target.value})),g=async j=>{j.preventDefault(),h(!0),v(null);try{await ce.post("/engagements",{...o,client_id:r||o.client_id}),l()}catch(S){v(S)}finally{h(!1)}};return u.jsx(_t,{open:e,onClose:t,title:"Nieuw engagement",children:u.jsxs("form",{onSubmit:g,className:"space-y-3",children:[u.jsx(Oe,{error:p}),!r&&u.jsx(te,{label:"Cliënt *",children:u.jsxs("select",{className:X,value:o.client_id,onChange:m("client_id"),required:!0,children:[u.jsx("option",{value:"",children:"— Kies een cliënt —"}),n.map(j=>u.jsx("option",{value:j.id,children:j.name},j.id))]})}),u.jsx(te,{label:"Type *",children:u.jsx("select",{className:X,value:o.type,onChange:m("type"),required:!0,children:Object.entries(lo).map(([j,S])=>u.jsx("option",{value:j,children:S},j))})}),u.jsx(te,{label:"Titel *",children:u.jsx("input",{className:X,value:o.title,onChange:m("title"),required:!0,autoFocus:!0})}),u.jsx(te,{label:"Omschrijving",children:u.jsx("textarea",{className:X,rows:3,value:o.description,onChange:m("description")})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Startdatum",children:u.jsx("input",{type:"date",className:X,value:o.start_date,onChange:m("start_date")})}),u.jsx(te,{label:"Einddatum",children:u.jsx("input",{type:"date",className:X,value:o.end_date,onChange:m("end_date")})})]}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{type:"button",variant:"secondary",onClick:t,children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:d,children:"Aanmaken"})]})]})})}function eQ(){const[e,t]=T.useState(null),[n,r]=T.useState([]),[l,o]=T.useState(null),[c,d]=T.useState({type:"",status:"",client_id:""}),[h,p]=T.useState(!1),v=()=>{o(null),ce.get("/engagements"+Ha(c)).then(t).catch(o)};T.useEffect(v,[c.type,c.status,c.client_id]),T.useEffect(()=>{ce.get("/clients").then(r).catch(()=>{})},[]);const m=g=>j=>d(S=>({...S,[g]:j.target.value}));return u.jsxs("div",{className:"space-y-4 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Engagements"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Alle opdrachten en projecten"})]}),u.jsxs(pe,{onClick:()=>p(!0),children:[u.jsx(qt,{className:"w-4 h-4"})," Nieuw engagement"]})]}),u.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[u.jsxs("select",{className:zb,value:c.type,onChange:m("type"),children:[u.jsx("option",{value:"",children:"Alle types"}),Object.entries(lo).map(([g,j])=>u.jsx("option",{value:g,children:j},g))]}),u.jsxs("select",{className:zb,value:c.status,onChange:m("status"),children:[u.jsx("option",{value:"",children:"Alle statussen"}),Object.entries(oo).map(([g,j])=>u.jsx("option",{value:g,children:j},g))]}),u.jsxs("select",{className:zb,value:c.client_id,onChange:m("client_id"),children:[u.jsx("option",{value:"",children:"Alle cliënten"}),n.map(g=>u.jsx("option",{value:g.id,children:g.name},g.id))]})]}),l&&u.jsx(Oe,{error:l,onRetry:v}),!e&&!l&&u.jsx(Ze,{}),e&&u.jsx(Ae,{padding:!1,children:u.jsx("div",{className:"p-4",children:u.jsx(Dt,{columns:[{label:"Titel",render:g=>u.jsx(ft,{to:`/engagements/${g.id}`,className:"font-medium text-text hover:text-accent transition-colors",children:g.title})},{label:"Cliënt",render:g=>u.jsx(ft,{to:`/clients/${g.client_id}`,className:"text-muted hover:text-accent transition-colors",children:g.client_name})},{label:"Type",render:g=>lo[g.type]||g.type},{label:"Status",render:g=>u.jsx(Tt,{status:g.status,labels:oo})},{label:"Taken",render:g=>g.task_count},{label:"Start",render:g=>u.jsx("span",{className:"text-muted",children:ye.date(g.start_date)})},{label:"Eind",render:g=>u.jsx("span",{className:"text-muted",children:ye.date(g.end_date)})}],rows:e,keyFn:g=>g.id,empty:u.jsx(Ar,{icon:A0,title:"Geen engagements gevonden",hint:"Pas de filters aan of maak een nieuw engagement aan."})})})}),u.jsx(xP,{open:h,onClose:()=>p(!1),clients:n,onSaved:()=>{p(!1),v()}})]})}const jP={lead:"Lead",active:"Actief",paused:"Gepauzeerd",archived:"Gearchiveerd"},tQ={draft:"Concept",sent:"Verzonden",paid:"Betaald",overdue:"Verlopen",cancelled:"Geannuleerd"},QC={name:"",industry:"",website:"",contact_name:"",contact_email:"",contact_phone:"",status:"lead",source:"",notes:""};function nQ({open:e,onClose:t,client:n,onSaved:r,onDelete:l}){const[o,c]=T.useState(QC),[d,h]=T.useState(!1),[p,v]=T.useState(null);T.useEffect(()=>{e&&(v(null),c(n?{name:n.name||"",industry:n.industry||"",website:n.website||"",contact_name:n.contact_name||"",contact_email:n.contact_email||"",contact_phone:n.contact_phone||"",status:n.status||"lead",source:n.source||"",notes:n.notes||""}:QC))},[e,n]);const m=j=>S=>c(_=>({..._,[j]:S.target.value})),g=async j=>{j.preventDefault(),h(!0),v(null);try{await ce.put(`/clients/${n.id}`,o),r()}catch(S){v(S)}finally{h(!1)}};return u.jsx(_t,{open:e,onClose:t,title:"Cliënt bewerken",wide:!0,children:u.jsxs("form",{onSubmit:g,className:"space-y-3",children:[u.jsx(Oe,{error:p}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[u.jsx(te,{label:"Bedrijfsnaam *",className:"md:col-span-2",children:u.jsx("input",{className:X,value:o.name,onChange:m("name"),required:!0,autoFocus:!0})}),u.jsx(te,{label:"Branche",children:u.jsx("input",{className:X,value:o.industry,onChange:m("industry")})}),u.jsx(te,{label:"Website",children:u.jsx("input",{className:X,value:o.website,onChange:m("website"),placeholder:"https://..."})}),u.jsx(te,{label:"Contactpersoon",children:u.jsx("input",{className:X,value:o.contact_name,onChange:m("contact_name")})}),u.jsx(te,{label:"E-mail",children:u.jsx("input",{type:"email",className:X,value:o.contact_email,onChange:m("contact_email")})}),u.jsx(te,{label:"Telefoon",children:u.jsx("input",{className:X,value:o.contact_phone,onChange:m("contact_phone")})}),u.jsx(te,{label:"Status",children:u.jsx("select",{className:X,value:o.status,onChange:m("status"),children:Object.entries(jP).map(([j,S])=>u.jsx("option",{value:j,children:S},j))})}),u.jsx(te,{label:"Bron",className:"md:col-span-2",children:u.jsx("input",{className:X,value:o.source,onChange:m("source"),placeholder:"Bijv. referral, website, netwerk"})}),u.jsx(te,{label:"Notities",className:"md:col-span-2",children:u.jsx("textarea",{className:X,rows:3,value:o.notes,onChange:m("notes")})})]}),u.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[u.jsxs(pe,{type:"button",variant:"danger",onClick:l,children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(pe,{type:"button",variant:"secondary",onClick:t,children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:d,children:"Opslaan"})]})]})]})})}const rQ={critical:"text-red",high:"text-yellow",medium:"text-blue",low:"text-muted"};function aQ(){const{id:e}=ju(),t=mr(),[n,r]=T.useState(null),[l,o]=T.useState(null),[c,d]=T.useState("overzicht"),[h,p]=T.useState(!1),[v,m]=T.useState(!1),[g,j]=T.useState(""),[S,_]=T.useState(!1),[x,O]=T.useState(null),w=()=>{o(null),ce.get(`/clients/${e}`).then(r).catch(o)};if(T.useEffect(w,[e]),!n)return l?u.jsx(Oe,{error:l,onRetry:w}):u.jsx(Ze,{});const{client:E,engagements:M,assessments:A,advice:C,diagrams:k,notes:z,timeEntries:B,invoices:Z}=n,G=B.reduce((U,ie)=>U+(ie.hours||0),0),H=E.website?/^https?:\/\//i.test(E.website)?E.website:`https://${E.website}`:null,W=async U=>{try{await ce.post(`/clients/${e}/advice/${U}/dismiss`),w()}catch(ie){o(ie)}},Q=async U=>{if(U.preventDefault(),!!g.trim()){_(!0),O(null);try{await ce.post(`/clients/${e}/notes`,{content:g.trim()}),j(""),w()}catch(ie){O(ie)}finally{_(!1)}}},D=async U=>{if(window.confirm("Deze notitie verwijderen?"))try{await ce.del(`/clients/${e}/notes/${U}`),w()}catch(ie){o(ie)}},P=async()=>{if(window.confirm(`Cliënt "${E.name}" verwijderen? Dit kan niet ongedaan worden gemaakt.`))try{await ce.del(`/clients/${E.id}`),t("/clients")}catch(U){o(U),p(!1)}},$=[{key:"overzicht",label:"Overzicht"},{key:"engagements",label:`Engagements (${M.length})`},{key:"notities",label:`Notities (${z.length})`},{key:"uren",label:`Uren (${B.length})`},{key:"facturen",label:`Facturen (${Z.length})`}];return u.jsxs("div",{className:"space-y-4 fade-in",children:[l&&u.jsx(Oe,{error:l,onRetry:w}),u.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:E.name}),u.jsx(Tt,{status:E.status,labels:jP})]}),u.jsxs("div",{className:"flex items-center gap-4 mt-1.5 text-[12px] text-muted flex-wrap",children:[E.industry&&u.jsx("span",{children:E.industry}),H&&u.jsxs("a",{href:H,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1 text-accent hover:underline",children:[u.jsx(w6,{className:"w-3.5 h-3.5"})," ",E.website]})]}),u.jsxs("div",{className:"flex items-center gap-4 mt-1 text-[12px] text-muted flex-wrap",children:[E.contact_name&&u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(e3,{className:"w-3.5 h-3.5"})," ",E.contact_name]}),E.contact_email&&u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(Ad,{className:"w-3.5 h-3.5"})," ",E.contact_email]}),E.contact_phone&&u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(H6,{className:"w-3.5 h-3.5"})," ",E.contact_phone]})]})]}),u.jsxs("div",{className:"flex gap-2 shrink-0",children:[u.jsxs(ft,{to:"/clients",className:"inline-flex items-center gap-1.5 rounded-lg px-3.5 py-2 text-[13px] bg-card border border-border text-text hover:bg-card-hover transition-colors",children:[u.jsx(Su,{className:"w-3.5 h-3.5"})," Terug"]}),u.jsxs(pe,{variant:"secondary",onClick:()=>p(!0),children:[u.jsx(Ga,{className:"w-3.5 h-3.5"})," Bewerken"]})]})]}),u.jsx("div",{className:"flex gap-1 border-b border-border-soft overflow-x-auto",children:$.map(U=>u.jsx("button",{onClick:()=>d(U.key),className:`px-3 py-2 text-[13px] whitespace-nowrap border-b-2 -mb-px transition-colors ${c===U.key?"border-accent text-text font-medium":"border-transparent text-muted hover:text-text"}`,children:U.label},U.key))}),c==="overzicht"&&u.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4",children:[u.jsx(Ae,{title:"Actief advies",subtitle:"Automatisch gegenereerd",className:"xl:col-span-2",children:C.length===0?u.jsxs("div",{className:"text-muted text-[13px] py-4 text-center flex flex-col items-center gap-2",children:[u.jsx(XM,{className:"w-5 h-5"})," Alles onder controle"]}):u.jsx("div",{className:"space-y-2",children:C.map(U=>u.jsxs("div",{className:"flex items-start gap-2.5 px-2.5 py-2 rounded-lg bg-bg-soft",children:[u.jsx(JM,{className:`w-4 h-4 mt-0.5 shrink-0 ${rQ[U.priority]||"text-blue"}`}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("div",{className:"text-[12px]",children:U.advice_text}),u.jsx("div",{className:"text-[11px] text-muted mt-0.5",children:ye.datetime(U.created_at)})]}),u.jsx("button",{onClick:()=>W(U.id),className:"p-1 rounded text-muted hover:text-text shrink-0",title:"Advies afronden",children:u.jsx(T0,{className:"w-3.5 h-3.5"})})]},U.id))})}),u.jsx(Ae,{title:"Notities",children:E.notes?u.jsx("p",{className:"text-[13px] whitespace-pre-wrap",children:E.notes}):u.jsx("div",{className:"text-muted text-[13px] py-2",children:"Geen notities"})}),u.jsx(Ae,{title:"Diagrammen",actions:u.jsx(ft,{to:"/diagrams",className:"text-[12px] text-accent hover:underline",children:"Alles"}),children:k.length===0?u.jsx("div",{className:"text-muted text-[13px] py-2",children:"Nog geen diagrammen"}):u.jsx("div",{className:"space-y-1.5",children:k.map(U=>u.jsxs(ft,{to:"/diagrams",className:"flex items-center justify-between gap-2 px-2.5 py-2 rounded-lg hover:bg-card-hover transition-colors",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[13px] font-medium truncate",children:U.name}),u.jsx("div",{className:"text-[11px] text-muted",children:U.diagram_type})]}),u.jsx("span",{className:"text-[12px] text-muted shrink-0",children:ye.date(U.updated_at)})]},U.id))})}),u.jsx(Ae,{title:`Assessments (${A.length})`,className:"xl:col-span-2",children:A.length===0?u.jsx("div",{className:"text-muted text-[13px] py-2",children:"Nog geen assessments"}):u.jsx("div",{className:"space-y-1.5",children:A.map(U=>u.jsxs("div",{className:"flex items-center justify-between gap-2 px-2.5 py-2 rounded-lg hover:bg-card-hover transition-colors",children:[u.jsxs("span",{className:"text-[13px] font-medium",children:["Assessment #",U.id]}),u.jsx("span",{className:"text-[12px] text-muted",children:ye.datetime(U.created_at)})]},U.id))})})]}),c==="engagements"&&u.jsx(Ae,{title:"Engagements",actions:u.jsxs(pe,{size:"sm",onClick:()=>m(!0),children:[u.jsx(qt,{className:"w-3.5 h-3.5"})," Nieuw engagement"]}),children:u.jsx(Dt,{columns:[{label:"Titel",render:U=>u.jsx(ft,{to:`/engagements/${U.id}`,className:"font-medium text-text hover:text-accent transition-colors",children:U.title})},{label:"Type",render:U=>lo[U.type]||U.type},{label:"Status",render:U=>u.jsx(Tt,{status:U.status,labels:oo})},{label:"Start",render:U=>u.jsx("span",{className:"text-muted",children:ye.date(U.start_date)})}],rows:M,keyFn:U=>U.id,empty:u.jsx("div",{className:"text-muted text-[13px] py-4 text-center",children:"Nog geen engagements"})})}),c==="notities"&&u.jsxs(Ae,{title:"Notities",children:[u.jsxs("form",{onSubmit:Q,className:"mb-4 space-y-2",children:[x&&u.jsx(Oe,{error:x}),u.jsxs("div",{className:"flex items-end gap-2",children:[u.jsx("textarea",{className:X,rows:2,placeholder:"Schrijf een notitie...",value:g,onChange:U=>j(U.target.value)}),u.jsx(pe,{type:"submit",loading:S,className:"shrink-0",children:"Toevoegen"})]})]}),z.length===0?u.jsx("div",{className:"text-muted text-[13px] py-4 text-center",children:"Nog geen notities"}):u.jsx("div",{className:"space-y-1.5",children:z.map(U=>u.jsxs("div",{className:"flex items-start justify-between gap-2 px-2.5 py-2 rounded-lg hover:bg-card-hover transition-colors",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[13px] whitespace-pre-wrap",children:U.content}),u.jsxs("div",{className:"text-[11px] text-muted mt-0.5",children:[U.created_by," · ",ye.datetime(U.created_at)]})]}),u.jsx("button",{onClick:()=>D(U.id),className:"p-1.5 rounded-md text-muted hover:text-red hover:bg-bg-soft shrink-0",title:"Verwijderen",children:u.jsx(zt,{className:"w-3.5 h-3.5"})})]},U.id))})]}),c==="uren"&&u.jsxs(Ae,{title:"Urenregistratie",subtitle:`Totaal: ${ye.hours(G)}`,children:[u.jsx(Dt,{columns:[{label:"Datum",render:U=>ye.date(U.date)},{label:"Gebruiker",render:U=>U.username||u.jsx("span",{className:"text-muted",children:"-"})},{label:"Uren",render:U=>ye.hours(U.hours)},{label:"Omschrijving",render:U=>U.description||u.jsx("span",{className:"text-muted",children:"-"})},{label:"Facturabel",render:U=>u.jsx(nt,{color:U.billable?"green":"muted",children:U.billable?"Ja":"Nee"})},{label:"Tarief",render:U=>u.jsx("span",{className:"text-muted",children:ye.euro(U.hourly_rate)})}],rows:B,keyFn:U=>U.id,empty:u.jsx("div",{className:"text-muted text-[13px] py-4 text-center",children:"Nog geen uren geregistreerd"})}),B.length>0&&u.jsxs("div",{className:"text-right text-[13px] mt-3 pt-3 border-t border-border-soft",children:["Totaal: ",u.jsx("span",{className:"font-semibold",children:ye.hours(G)})]})]}),c==="facturen"&&u.jsx(Ae,{title:"Facturen",children:u.jsx(Dt,{columns:[{label:"Nummer",render:U=>u.jsx(ft,{to:`/invoices/${U.id}`,className:"font-medium text-text hover:text-accent transition-colors",children:U.number})},{label:"Datum",render:U=>u.jsx("span",{className:"text-muted",children:ye.date(U.date)})},{label:"Totaal",render:U=>ye.euro(U.total)},{label:"Status",render:U=>u.jsx(Tt,{status:U.status,labels:tQ})}],rows:Z,keyFn:U=>U.id,empty:u.jsx("div",{className:"text-muted text-[13px] py-4 text-center",children:"Nog geen facturen"})})}),u.jsx(nQ,{open:h,client:E,onClose:()=>p(!1),onSaved:()=>{p(!1),w()},onDelete:P}),u.jsx(xP,{open:v,onClose:()=>m(!1),clientId:E.id,onSaved:()=>{m(!1),w()}})]})}const xd={todo:"Te doen",in_progress:"Bezig",done:"Klaar",cancelled:"Geannuleerd"},hh={critical:"Kritiek",high:"Hoog",medium:"Gemiddeld",low:"Laag"},iQ=["todo","in_progress","done","cancelled"],Al=["todo","in_progress","done"],JC={engagement_id:"",title:"",priority:"medium",due_date:""};function lQ({open:e,onClose:t,engagements:n,onSaved:r}){const[l,o]=T.useState(JC),[c,d]=T.useState(!1),[h,p]=T.useState(null);T.useEffect(()=>{e&&(p(null),o(JC))},[e]);const v=g=>j=>o(S=>({...S,[g]:j.target.value})),m=async g=>{g.preventDefault(),d(!0),p(null);try{await ce.post("/tasks",{...l,due_date:l.due_date||null}),r()}catch(j){p(j)}finally{d(!1)}};return u.jsx(_t,{open:e,onClose:t,title:"Nieuwe taak",children:u.jsxs("form",{onSubmit:m,className:"space-y-3",children:[u.jsx(Oe,{error:h}),u.jsx(te,{label:"Engagement *",children:u.jsxs("select",{className:X,value:l.engagement_id,onChange:v("engagement_id"),required:!0,children:[u.jsx("option",{value:"",children:"— Kies een engagement —"}),n.map(g=>u.jsxs("option",{value:g.id,children:[g.title," — ",g.client_name]},g.id))]})}),u.jsx(te,{label:"Titel *",children:u.jsx("input",{className:X,value:l.title,onChange:v("title"),required:!0,autoFocus:!0})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Prioriteit",children:u.jsx("select",{className:X,value:l.priority,onChange:v("priority"),children:Object.entries(hh).map(([g,j])=>u.jsx("option",{value:g,children:j},g))})}),u.jsx(te,{label:"Deadline",children:u.jsx("input",{type:"date",className:X,value:l.due_date,onChange:v("due_date")})})]}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{type:"button",variant:"secondary",onClick:t,children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:c,children:"Aanmaken"})]})]})})}function oQ({task:e,onMove:t,onDelete:n}){const r=new Date().toISOString().slice(0,10),l=e.due_date&&e.due_date<r&&e.status!=="done"&&e.status!=="cancelled",o=Al.indexOf(e.status);return u.jsxs("div",{className:"bg-card border border-border-soft rounded-lg p-2.5 space-y-1.5",children:[u.jsx("div",{className:"text-[13px] font-medium",children:e.title}),u.jsxs("div",{className:"text-[11px] text-muted truncate",children:[e.client_name," · ",e.engagement_title]}),u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx(Tt,{status:e.priority,labels:hh}),e.due_date&&u.jsx("span",{className:`text-[11px] ${l?"text-red font-medium":"text-muted"}`,children:ye.date(e.due_date)})]}),u.jsxs("div",{className:"flex items-center justify-between pt-1.5 border-t border-border-soft/50",children:[u.jsxs("div",{className:"flex gap-0.5",children:[o>0&&u.jsx("button",{onClick:()=>t(e,Al[o-1]),className:"p-1 rounded text-muted hover:text-text hover:bg-bg-soft",title:`Naar '${xd[Al[o-1]]}'`,children:u.jsx(Su,{className:"w-3.5 h-3.5"})}),o>=0&&o<Al.length-1&&u.jsx("button",{onClick:()=>t(e,Al[o+1]),className:"p-1 rounded text-muted hover:text-text hover:bg-bg-soft",title:`Naar '${xd[Al[o+1]]}'`,children:u.jsx(O0,{className:"w-3.5 h-3.5"})})]}),u.jsx("button",{onClick:()=>n(e),className:"p-1 rounded text-muted hover:text-red hover:bg-bg-soft",title:"Verwijderen",children:u.jsx(zt,{className:"w-3.5 h-3.5"})})]})]})}function sQ(){const[e,t]=T.useState(null),[n,r]=T.useState([]),[l,o]=T.useState(null),[c,d]=T.useState(!1),h=()=>{o(null),ce.get("/tasks").then(t).catch(o)};T.useEffect(h,[]),T.useEffect(()=>{ce.get("/engagements").then(r).catch(()=>{})},[]);const p=async(m,g)=>{try{await ce.post(`/tasks/${m.id}/status`,{status:g}),h()}catch(j){o(j)}},v=async m=>{if(window.confirm(`Taak "${m.title}" verwijderen?`))try{await ce.del(`/tasks/${m.id}`),h()}catch(g){o(g)}};return u.jsxs("div",{className:"space-y-4 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Taken"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Kanban-overzicht van alle taken"})]}),u.jsxs(pe,{onClick:()=>d(!0),children:[u.jsx(qt,{className:"w-4 h-4"})," Nieuwe taak"]})]}),l&&u.jsx(Oe,{error:l,onRetry:h}),!e&&!l&&u.jsx(Ze,{}),e&&e.length===0&&u.jsx(Ar,{icon:f8,title:"Nog geen taken",hint:"Maak je eerste taak aan om te beginnen.",action:u.jsxs(pe,{onClick:()=>d(!0),children:[u.jsx(qt,{className:"w-4 h-4"})," Nieuwe taak"]})}),e&&e.length>0&&u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-3 items-start",children:iQ.map(m=>{const g=e.filter(j=>j.status===m);return u.jsxs("div",{className:"bg-bg-soft border border-border-soft rounded-xl p-2.5",children:[u.jsxs("div",{className:"flex items-center justify-between px-1 pb-2",children:[u.jsx("span",{className:"text-[12px] font-semibold",children:xd[m]}),u.jsx(nt,{color:"muted",children:g.length})]}),u.jsxs("div",{className:"space-y-2",children:[g.map(j=>u.jsx(oQ,{task:j,onMove:p,onDelete:v},j.id)),g.length===0&&u.jsx("div",{className:"text-center text-[11px] text-muted py-4",children:"Geen taken"})]})]},m)})}),u.jsx(lQ,{open:c,onClose:()=>d(!1),engagements:n,onSaved:()=>{d(!1),h()}})]})}const uQ="bg-bg-soft border border-border rounded-lg px-3 py-2 text-[13px] focus:outline-none focus:border-accent/60 transition-colors",cQ="bg-bg-soft border border-border rounded-lg px-2 py-1 text-[12px] focus:outline-none focus:border-accent/60 transition-colors shrink-0",fQ={type:"assessment",title:"",description:"",start_date:"",end_date:"",status:"planned",outcome:""};function dQ({open:e,onClose:t,engagement:n,onSaved:r}){const[l,o]=T.useState(fQ),[c,d]=T.useState(!1),[h,p]=T.useState(null);T.useEffect(()=>{!e||!n||(p(null),o({type:n.type||"assessment",title:n.title||"",description:n.description||"",start_date:n.start_date||"",end_date:n.end_date||"",status:n.status||"planned",outcome:n.outcome||""}))},[e,n]);const v=g=>j=>o(S=>({...S,[g]:j.target.value})),m=async g=>{g.preventDefault(),d(!0),p(null);try{await ce.put(`/engagements/${n.id}`,l),r()}catch(j){p(j)}finally{d(!1)}};return u.jsx(_t,{open:e,onClose:t,title:"Engagement bewerken",children:u.jsxs("form",{onSubmit:m,className:"space-y-3",children:[u.jsx(Oe,{error:h}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Type *",children:u.jsx("select",{className:X,value:l.type,onChange:v("type"),required:!0,children:Object.entries(lo).map(([g,j])=>u.jsx("option",{value:g,children:j},g))})}),u.jsx(te,{label:"Status",children:u.jsx("select",{className:X,value:l.status,onChange:v("status"),children:Object.entries(oo).map(([g,j])=>u.jsx("option",{value:g,children:j},g))})})]}),u.jsx(te,{label:"Titel *",children:u.jsx("input",{className:X,value:l.title,onChange:v("title"),required:!0,autoFocus:!0})}),u.jsx(te,{label:"Omschrijving",children:u.jsx("textarea",{className:X,rows:3,value:l.description,onChange:v("description")})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Startdatum",children:u.jsx("input",{type:"date",className:X,value:l.start_date,onChange:v("start_date")})}),u.jsx(te,{label:"Einddatum",children:u.jsx("input",{type:"date",className:X,value:l.end_date,onChange:v("end_date")})})]}),u.jsx(te,{label:"Resultaat (outcome)",children:u.jsx("textarea",{className:X,rows:2,value:l.outcome,onChange:v("outcome")})}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{type:"button",variant:"secondary",onClick:t,children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:c,children:"Opslaan"})]})]})})}function hQ({open:e,onClose:t,engagementId:n,onSaved:r}){const l={title:"",priority:"medium",due_date:""},[o,c]=T.useState(l),[d,h]=T.useState(!1),[p,v]=T.useState(null);T.useEffect(()=>{e&&(v(null),c(l))},[e]);const m=j=>S=>c(_=>({..._,[j]:S.target.value})),g=async j=>{j.preventDefault(),h(!0),v(null);try{await ce.post("/tasks",{...o,engagement_id:n,due_date:o.due_date||null}),r()}catch(S){v(S)}finally{h(!1)}};return u.jsx(_t,{open:e,onClose:t,title:"Taak toevoegen",children:u.jsxs("form",{onSubmit:g,className:"space-y-3",children:[u.jsx(Oe,{error:p}),u.jsx(te,{label:"Titel *",children:u.jsx("input",{className:X,value:o.title,onChange:m("title"),required:!0,autoFocus:!0})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Prioriteit",children:u.jsx("select",{className:X,value:o.priority,onChange:m("priority"),children:Object.entries(hh).map(([j,S])=>u.jsx("option",{value:j,children:S},j))})}),u.jsx(te,{label:"Deadline",children:u.jsx("input",{type:"date",className:X,value:o.due_date,onChange:m("due_date")})})]}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{type:"button",variant:"secondary",onClick:t,children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:d,children:"Aanmaken"})]})]})})}function pQ(){const{id:e}=ju(),t=mr(),[n,r]=T.useState(null),[l,o]=T.useState(null),[c,d]=T.useState(!1),[h,p]=T.useState(!1),v=()=>{o(null),ce.get(`/engagements/${e}`).then(r).catch(o)};if(T.useEffect(v,[e]),!n)return l?u.jsx(Oe,{error:l,onRetry:v}):u.jsx(Ze,{});const{engagement:m,tasks:g,timeEntries:j}=n,S=async w=>{try{await ce.post(`/engagements/${e}/status`,{status:w.target.value}),v()}catch(E){o(E)}},_=async()=>{if(window.confirm(`Engagement "${m.title}" verwijderen? Dit kan niet ongedaan worden gemaakt.`))try{await ce.del(`/engagements/${e}`),t("/engagements")}catch(w){o(w)}},x=async(w,E)=>{try{await ce.post(`/tasks/${w}/status`,{status:E}),v()}catch(M){o(M)}},O=async w=>{if(window.confirm(`Taak "${w.title}" verwijderen?`))try{await ce.del(`/tasks/${w.id}`),v()}catch(E){o(E)}};return u.jsxs("div",{className:"space-y-4 fade-in",children:[l&&u.jsx(Oe,{error:l,onRetry:v}),u.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:m.title}),u.jsx(Tt,{status:m.status,labels:oo}),u.jsx(nt,{color:"accent",children:lo[m.type]||m.type})]}),u.jsxs("div",{className:"flex items-center gap-3 mt-1.5 text-[13px] text-muted flex-wrap",children:[u.jsx(ft,{to:`/clients/${m.client_id}`,className:"text-accent hover:underline",children:m.client_name}),u.jsxs("span",{children:[ye.date(m.start_date)," – ",ye.date(m.end_date)]})]})]}),u.jsxs("div",{className:"flex items-center gap-2 shrink-0 flex-wrap",children:[u.jsx("select",{className:uQ,value:m.status,onChange:S,title:"Status wijzigen",children:Object.entries(oo).map(([w,E])=>u.jsx("option",{value:w,children:E},w))}),u.jsxs(pe,{variant:"secondary",onClick:()=>d(!0),children:[u.jsx(Ga,{className:"w-3.5 h-3.5"})," Bewerken"]}),u.jsxs(pe,{variant:"danger",onClick:_,children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]})]})]}),(m.description||m.outcome)&&u.jsxs(Ae,{title:"Details",children:[m.description&&u.jsx("p",{className:"text-[13px] whitespace-pre-wrap",children:m.description}),m.outcome&&u.jsxs("div",{className:m.description?"mt-3 pt-3 border-t border-border-soft":"",children:[u.jsx("div",{className:"text-[12px] text-muted mb-1",children:"Resultaat"}),u.jsx("p",{className:"text-[13px] whitespace-pre-wrap",children:m.outcome})]})]}),u.jsx(Ae,{title:`Taken (${g.length})`,actions:u.jsxs(pe,{size:"sm",onClick:()=>p(!0),children:[u.jsx(qt,{className:"w-3.5 h-3.5"})," Taak toevoegen"]}),children:g.length===0?u.jsx("div",{className:"text-muted text-[13px] py-4 text-center",children:"Nog geen taken"}):u.jsx("div",{className:"space-y-1.5",children:g.map(w=>u.jsxs("div",{className:"flex items-center gap-3 px-2.5 py-2 rounded-lg hover:bg-card-hover transition-colors",children:[u.jsx("select",{className:cQ,value:w.status,onChange:E=>x(w.id,E.target.value),children:Object.entries(xd).map(([E,M])=>u.jsx("option",{value:E,children:M},E))}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("div",{className:"text-[13px] font-medium truncate",children:w.title}),w.due_date&&u.jsxs("div",{className:"text-[11px] text-muted",children:["Deadline: ",ye.date(w.due_date)]})]}),u.jsx(Tt,{status:w.priority,labels:hh}),u.jsx("button",{onClick:()=>O(w),className:"p-1.5 rounded-md text-muted hover:text-red hover:bg-bg-soft shrink-0",title:"Verwijderen",children:u.jsx(zt,{className:"w-3.5 h-3.5"})})]},w.id))})}),u.jsx(Ae,{title:`Uren (${j.length})`,children:u.jsx(Dt,{columns:[{label:"Datum",render:w=>ye.date(w.date)},{label:"Gebruiker",render:w=>w.username||u.jsx("span",{className:"text-muted",children:"-"})},{label:"Uren",render:w=>ye.hours(w.hours)},{label:"Omschrijving",render:w=>w.description||u.jsx("span",{className:"text-muted",children:"-"})},{label:"Facturabel",render:w=>u.jsx(nt,{color:w.billable?"green":"muted",children:w.billable?"Ja":"Nee"})}],rows:j,keyFn:w=>w.id,empty:u.jsx("div",{className:"text-muted text-[13px] py-4 text-center",children:"Nog geen uren geregistreerd"})})}),u.jsx(dQ,{open:c,engagement:m,onClose:()=>d(!1),onSaved:()=>{d(!1),v()}}),u.jsx(hQ,{open:h,engagementId:m.id,onClose:()=>p(!1),onSaved:()=>{p(!1),v()}})]})}const mQ=["ma","di","wo","do","vr","za","zo"],gf={meeting:"Afspraak",call:"Telefoongesprek",deadline:"Deadline",workshop:"Workshop",review:"Review",other:"Overig"},Lb={meeting:"accent",call:"blue",deadline:"red",workshop:"purple",review:"yellow",other:"muted"};function kl(e){return String(e).padStart(2,"0")}function hf(e){return`${e.getFullYear()}-${kl(e.getMonth()+1)}-${kl(e.getDate())}`}function p0(e){if(!e)return null;const t=new Date(String(e).replace(" ","T"));return isNaN(t)?null:t}function eM(e){const t=p0(e);return t?`${t.getFullYear()}-${kl(t.getMonth()+1)}-${kl(t.getDate())}T${kl(t.getHours())}:${kl(t.getMinutes())}`:""}function vQ(e){const t=new Date(e.getFullYear(),e.getMonth(),1),n=(t.getDay()+6)%7,r=new Date(t);r.setDate(t.getDate()-n);const l=[],o=new Date(r);do l.push(new Date(o)),o.setDate(o.getDate()+1);while(o.getMonth()===e.getMonth()||l.length%7!==0);return l}const tM={title:"",event_type:"meeting",start_time:"",end_time:"",all_day:!1,client_id:"",color:"#58a6ff",description:""};function yQ({form:e,setForm:t,clients:n}){const r=(l,o)=>t(c=>({...c,[l]:o}));return u.jsxs("div",{className:"space-y-3",children:[u.jsx(te,{label:"Titel *",children:u.jsx("input",{className:X,value:e.title,onChange:l=>r("title",l.target.value),placeholder:"Bijv. kickoff meeting"})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Type",children:u.jsx("select",{className:X,value:e.event_type,onChange:l=>r("event_type",l.target.value),children:Object.entries(gf).map(([l,o])=>u.jsx("option",{value:l,children:o},l))})}),u.jsx(te,{label:"Cliënt (optioneel)",children:u.jsxs("select",{className:X,value:e.client_id,onChange:l=>r("client_id",l.target.value),children:[u.jsx("option",{value:"",children:"— Geen —"}),n.map(l=>u.jsx("option",{value:l.id,children:l.name},l.id))]})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Start *",children:u.jsx("input",{type:"datetime-local",className:X,value:e.start_time,onChange:l=>r("start_time",l.target.value)})}),u.jsx(te,{label:"Einde *",children:u.jsx("input",{type:"datetime-local",className:X,value:e.end_time,onChange:l=>r("end_time",l.target.value)})})]}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsxs("label",{className:"flex items-center gap-2 text-[13px] cursor-pointer",children:[u.jsx("input",{type:"checkbox",checked:e.all_day,onChange:l=>r("all_day",l.target.checked),className:"accent-[#00d4ff]"}),"Hele dag"]}),u.jsxs("label",{className:"flex items-center gap-2 text-[13px] cursor-pointer",children:["Kleur",u.jsx("input",{type:"color",value:e.color,onChange:l=>r("color",l.target.value),className:"w-8 h-8 rounded cursor-pointer bg-transparent border border-border"})]})]}),u.jsx(te,{label:"Beschrijving",children:u.jsx("textarea",{className:X,rows:3,value:e.description,onChange:l=>r("description",l.target.value)})})]})}function gQ(){const[e,t]=T.useState(()=>{const P=new Date;return P.setDate(1),P}),[n,r]=T.useState(null),[l,o]=T.useState([]),[c,d]=T.useState(null),[h,p]=T.useState(!1),[v,m]=T.useState(tM),[g,j]=T.useState(null),[S,_]=T.useState(!1),[x,O]=T.useState(null),[w,E]=T.useState(null),M=()=>{d(null),ce.get("/calendar").then(r).catch(d)};T.useEffect(M,[]),T.useEffect(()=>{ce.get("/clients").then(o).catch(()=>{})},[]);const A=T.useMemo(()=>vQ(e),[e]),C=A.length/7,k=hf(new Date),z=T.useMemo(()=>{const P={};for(const $ of n||[]){const U=p0($.start_time),ie=p0($.end_time)||U;if(!U)continue;const fe=new Date(U.getFullYear(),U.getMonth(),U.getDate()),L=new Date(ie.getFullYear(),ie.getMonth(),ie.getDate());for(;fe<=L;){const F=hf(fe);(P[F]=P[F]||[]).push($),fe.setDate(fe.getDate()+1)}}return P},[n]),B=P=>{const $=new Date(e);$.setMonth($.getMonth()+P),t($)},Z=()=>{const P=new Date;P.setDate(1),t(P)},G=P=>{const $=hf(P);j(null),m({...tM,start_time:`${$}T09:00`,end_time:`${$}T10:00`}),O(null),p(!0)},H=P=>{E(null),j(P.id),m({title:P.title||"",event_type:P.event_type||"meeting",start_time:eM(P.start_time),end_time:eM(P.end_time),all_day:!!P.all_day,client_id:P.client_id||"",color:P.color||"#58a6ff",description:P.description||""}),O(null),p(!0)},W=async()=>{if(!v.title.trim())return O("Titel is verplicht");if(!v.start_time||!v.end_time)return O("Start- en eindtijd zijn verplicht");_(!0),O(null);try{const P={...v,client_id:v.client_id||null};g?await ce.put(`/calendar/${g}`,P):await ce.post("/calendar",P),p(!1),M()}catch(P){O(P.message)}finally{_(!1)}},Q=async P=>{if(window.confirm(`Event "${P.title}" verwijderen?`))try{await ce.del(`/calendar/${P.id}`),E(null),M()}catch($){alert($.message)}};if(c)return u.jsx(Oe,{error:c,onRetry:M});if(!n)return u.jsx(Ze,{});const D=e.toLocaleDateString("nl-NL",{month:"long",year:"numeric"});return u.jsxs("div",{className:"space-y-4 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Kalender"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5 capitalize",children:D})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(pe,{variant:"secondary",size:"sm",onClick:()=>B(-1),children:u.jsx(YM,{className:"w-4 h-4"})}),u.jsx(pe,{variant:"secondary",size:"sm",onClick:Z,children:"Vandaag"}),u.jsx(pe,{variant:"secondary",size:"sm",onClick:()=>B(1),children:u.jsx(VM,{className:"w-4 h-4"})}),u.jsxs(pe,{size:"sm",onClick:()=>G(new Date),children:[u.jsx(qt,{className:"w-3.5 h-3.5"})," Nieuw event"]})]})]}),u.jsxs(Ae,{padding:!1,className:"overflow-hidden",children:[u.jsx("div",{className:"grid grid-cols-7 border-b border-border-soft",children:mQ.map(P=>u.jsx("div",{className:"px-2 py-2 text-[11px] font-medium text-muted text-center uppercase tracking-wide",children:P},P))}),u.jsx("div",{className:"grid grid-cols-7",style:{gridTemplateRows:`repeat(${C}, minmax(96px, auto))`},children:A.map(P=>{const $=hf(P),U=z[$]||[],ie=P.getMonth()===e.getMonth(),fe=$===k;return u.jsxs("div",{onClick:()=>G(P),className:`border-b border-r border-border-soft/50 p-1.5 cursor-pointer hover:bg-card-hover transition-colors min-h-[96px] ${ie?"":"bg-bg-soft/40"}`,children:[u.jsx("div",{className:"flex justify-end mb-1",children:u.jsx("span",{className:`text-[11px] w-6 h-6 flex items-center justify-center rounded-full ${fe?"ring-2 ring-accent text-accent font-bold":ie?"text-text":"text-muted"}`,children:P.getDate()})}),u.jsxs("div",{className:"space-y-0.5",children:[U.slice(0,3).map(L=>u.jsxs("button",{onClick:F=>{F.stopPropagation(),E(L)},className:"w-full flex items-center gap-1 px-1.5 py-0.5 rounded text-left text-[11px] leading-tight",style:{backgroundColor:`${L.color||"#58a6ff"}33`,color:L.color||"#58a6ff"},children:[u.jsx("span",{className:"truncate flex-1",children:L.title}),u.jsx("span",{className:"hidden xl:inline shrink-0",children:u.jsx(nt,{color:Lb[L.event_type]||"muted",children:gf[L.event_type]||L.event_type})})]},L.id)),U.length>3&&u.jsxs("div",{className:"text-[10px] text-muted px-1.5",children:["+",U.length-3," meer"]})]})]},$)})})]}),u.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[u.jsx("span",{className:"text-[12px] text-muted",children:"Legenda:"}),Object.entries(gf).map(([P,$])=>u.jsx(nt,{color:Lb[P],children:$},P))]}),u.jsxs(_t,{open:h,onClose:()=>p(!1),title:g?"Event bewerken":"Nieuw event",children:[u.jsx(yQ,{form:v,setForm:m,clients:l}),x&&u.jsx("div",{className:"text-red text-[12px] mt-3",children:x}),u.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[u.jsx(pe,{variant:"secondary",onClick:()=>p(!1),children:"Annuleren"}),u.jsx(pe,{onClick:W,loading:S,children:g?"Opslaan":"Toevoegen"})]})]}),u.jsx(_t,{open:!!w,onClose:()=>E(null),title:(w==null?void 0:w.title)||"",children:w&&u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[u.jsx(nt,{color:Lb[w.event_type]||"muted",children:gf[w.event_type]||w.event_type}),!!w.all_day&&u.jsx(nt,{color:"blue",children:"Hele dag"}),u.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[12px] text-muted",children:[u.jsx("span",{className:"w-3 h-3 rounded-full inline-block",style:{backgroundColor:w.color||"#58a6ff"}}),w.color]})]}),u.jsxs("div",{className:"flex items-center gap-2 text-[13px] text-muted",children:[u.jsx(La,{className:"w-4 h-4 shrink-0"}),u.jsxs("span",{children:[ye.datetime(w.start_time)," — ",ye.datetime(w.end_time)]})]}),w.client_name&&u.jsxs("div",{className:"flex items-center gap-2 text-[13px] text-muted",children:[u.jsx(e3,{className:"w-4 h-4 shrink-0"}),u.jsx("span",{children:w.client_name})]}),w.description&&u.jsx("p",{className:"text-[13px] whitespace-pre-wrap",children:w.description}),u.jsxs("div",{className:"flex justify-between pt-2 border-t border-border-soft",children:[u.jsxs(pe,{variant:"danger",size:"sm",onClick:()=>Q(w),children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]}),u.jsxs(pe,{size:"sm",onClick:()=>H(w),children:[u.jsx(Ga,{className:"w-3.5 h-3.5"})," Bewerken"]})]})]})})]})}const nM={to:"",cc:"",bcc:"",subject:"",text:""},rM={email:"",name:"",imap_host:"",imap_port:993,imap_secure:!0,imap_user:"",imap_pass:"",smtp_host:"",smtp_port:587,smtp_secure:!0,smtp_user:"",smtp_pass:""};function bQ({tabs:e,active:t,onChange:n}){return u.jsx("div",{className:"flex gap-1 border-b border-border-soft",children:e.map(r=>u.jsx("button",{onClick:()=>n(r.key),className:`px-3.5 py-2 text-[13px] font-medium border-b-2 -mb-px transition-colors ${t===r.key?"border-accent text-accent":"border-transparent text-muted hover:text-text"}`,children:r.label},r.key))})}function xQ(){const[e,t]=T.useState("inbox"),[n,r]=T.useState(null),[l,o]=T.useState(null),[c,d]=T.useState(!1),[h,p]=T.useState(null),[v,m]=T.useState(!1),[g,j]=T.useState(nM),[S,_]=T.useState(!1),[x,O]=T.useState(null),[w,E]=T.useState(null),[M,A]=T.useState(!1),[C,k]=T.useState(null),[z,B]=T.useState(null),[Z,G]=T.useState(null),[H,W]=T.useState(!1),[Q,D]=T.useState(null),[P,$]=T.useState(rM),[U,ie]=T.useState(!1),[fe,L]=T.useState(null),F=()=>{o(null),ce.get("/email/messages").then(r).catch(o)},q=()=>{G(null),ce.get("/email/accounts").then(B).catch(G)};T.useEffect(()=>{F(),q()},[]);const de=(ae,Ke)=>{p({type:ae,text:Ke}),setTimeout(()=>p(null),6e3)},ge=async()=>{d(!0),p(null);try{await ce.post("/email/sync"),de("green","Inbox gesynchroniseerd"),F()}catch(ae){de("red",ae.message||String(ae))}finally{d(!1)}},we=()=>{j(nM),O(null),m(!0)},$e=async ae=>{ae.preventDefault(),_(!0),O(null);try{await ce.post("/email/send",g),m(!1),de("green","E-mail verzonden")}catch(Ke){O(Ke)}finally{_(!1)}},Ge=ae=>{E(null),k(null),A(!0),ce.get(`/email/messages/${ae.id}`).then(Ke=>{E(Ke),F()}).catch(k).finally(()=>A(!1))},me=()=>{E(null),k(null),A(!1)},Te=()=>{D(null),$(rM),L(null),W(!0)},Me=ae=>{D(ae),$({email:ae.email||"",name:ae.name||"",imap_host:ae.imap_host||"",imap_port:ae.imap_port||993,imap_secure:!!ae.imap_secure,imap_user:ae.imap_user||"",imap_pass:"",smtp_host:ae.smtp_host||"",smtp_port:ae.smtp_port||587,smtp_secure:!!ae.smtp_secure,smtp_user:ae.smtp_user||"",smtp_pass:""}),L(null),W(!0)},he=async ae=>{ae.preventDefault(),ie(!0),L(null);try{await ce.post("/email/accounts",{...P,id:Q?Q.id:void 0}),W(!1),q()}catch(Ke){L(Ke)}finally{ie(!1)}},st=M||!!w||!!C;return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"E-mail"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Postvak IN en e-mailaccounts"})]}),e==="inbox"?u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(pe,{variant:"secondary",onClick:ge,loading:c,children:[u.jsx(X6,{className:"w-4 h-4"})," Synchroniseren"]}),u.jsxs(pe,{onClick:we,children:[u.jsx(t2,{className:"w-4 h-4"})," Nieuwe e-mail"]})]}):u.jsxs(pe,{onClick:Te,children:[u.jsx(t2,{className:"w-4 h-4"})," Account toevoegen"]})]}),h&&u.jsx("div",{className:`rounded-lg px-4 py-3 text-[13px] border ${h.type==="green"?"bg-green/10 border-green/30 text-green":"bg-red/10 border-red/30 text-red"}`,children:h.text}),u.jsx(bQ,{tabs:[{key:"inbox",label:"Postvak IN"},{key:"accounts",label:"Accounts"}],active:e,onChange:t}),e==="inbox"&&u.jsx(Ae,{padding:!1,children:u.jsx("div",{className:"p-4",children:l?u.jsx(Oe,{error:l,onRetry:F}):n?u.jsx(Dt,{columns:[{label:"",className:"w-6",render:ae=>ae.seen?null:u.jsx("span",{className:"block w-2 h-2 rounded-full bg-blue",title:"Ongelezen"})},{label:"Van",render:ae=>u.jsx("span",{className:ae.seen?"":"font-semibold",children:ae.from_name||ae.from_addr||"-"})},{label:"Onderwerp",render:ae=>u.jsx("button",{onClick:()=>Ge(ae),className:`text-left text-accent hover:underline ${ae.seen?"":"font-semibold"}`,children:ae.subject||"(geen onderwerp)"})},{label:"Datum",render:ae=>u.jsx("span",{className:"text-muted",children:ye.datetime(ae.date)})},{label:"Account",render:ae=>u.jsx("span",{className:"text-muted",children:ae.account_email})}],rows:n,keyFn:ae=>ae.id,empty:u.jsxs("div",{className:"flex flex-col items-center py-10 text-muted",children:[u.jsx(A6,{className:"w-8 h-8 mb-2"}),u.jsx("div",{className:"text-[13px]",children:"Geen berichten — synchroniseer je inbox"})]})}):u.jsx(Ze,{})})}),e==="accounts"&&u.jsx(Ae,{padding:!1,children:u.jsx("div",{className:"p-4",children:Z?u.jsx(Oe,{error:Z,onRetry:q}):z?u.jsx(Dt,{columns:[{label:"Email",render:ae=>u.jsxs("span",{className:"font-medium flex items-center gap-2",children:[u.jsx(Ad,{className:"w-3.5 h-3.5 text-muted"}),ae.email]})},{label:"IMAP",render:ae=>u.jsxs("span",{className:"text-muted",children:[ae.imap_host,":",ae.imap_port]})},{label:"SMTP",render:ae=>u.jsxs("span",{className:"text-muted",children:[ae.smtp_host,":",ae.smtp_port]})},{label:"Actief",render:ae=>u.jsx(nt,{color:ae.active?"green":"muted",children:ae.active?"Actief":"Inactief"})}],rows:z,keyFn:ae=>ae.id,onRowClick:Me,empty:u.jsx("div",{className:"text-center text-muted text-[13px] py-8",children:"Nog geen accounts geconfigureerd"})}):u.jsx(Ze,{})})}),u.jsx(_t,{open:v,onClose:()=>m(!1),title:"Nieuwe e-mail",children:u.jsxs("form",{onSubmit:$e,className:"space-y-3",children:[x&&u.jsx(Oe,{error:x}),u.jsx(te,{label:"Aan *",children:u.jsx("input",{className:X,value:g.to,onChange:ae=>j({...g,to:ae.target.value}),required:!0})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"CC",children:u.jsx("input",{className:X,value:g.cc,onChange:ae=>j({...g,cc:ae.target.value})})}),u.jsx(te,{label:"BCC",children:u.jsx("input",{className:X,value:g.bcc,onChange:ae=>j({...g,bcc:ae.target.value})})})]}),u.jsx(te,{label:"Onderwerp *",children:u.jsx("input",{className:X,value:g.subject,onChange:ae=>j({...g,subject:ae.target.value}),required:!0})}),u.jsx(te,{label:"Bericht",children:u.jsx("textarea",{rows:8,className:X,value:g.text,onChange:ae=>j({...g,text:ae.target.value})})}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{variant:"secondary",type:"button",onClick:()=>m(!1),children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:S,children:"Verzenden"})]})]})}),u.jsxs(_t,{open:st,onClose:me,title:w?w.subject||"(geen onderwerp)":"Bericht laden",wide:!0,children:[M&&u.jsx(Ze,{}),C&&u.jsx(Oe,{error:C}),w&&u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"text-[12px] text-muted space-y-0.5",children:[u.jsxs("div",{children:["Van: ",u.jsx("span",{className:"text-text",children:w.from_name||w.from_addr})]}),u.jsxs("div",{children:["Datum: ",u.jsx("span",{className:"text-text",children:ye.datetime(w.date)})]}),u.jsxs("div",{children:["Account: ",u.jsx("span",{className:"text-text",children:w.account_email})]})]}),u.jsx("div",{className:"border-t border-border-soft pt-3 text-[13px] whitespace-pre-wrap max-h-[50vh] overflow-y-auto",children:w.body_text||"(geen inhoud)"}),u.jsx("div",{className:"flex justify-end pt-1",children:u.jsx(pe,{variant:"secondary",onClick:me,children:"Sluiten"})})]})]}),u.jsx(_t,{open:H,onClose:()=>W(!1),title:Q?"Account bewerken":"Account toevoegen",wide:!0,children:u.jsxs("form",{onSubmit:he,className:"space-y-3",children:[fe&&u.jsx(Oe,{error:fe}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"E-mailadres *",children:u.jsx("input",{type:"email",className:X,value:P.email,onChange:ae=>$({...P,email:ae.target.value}),required:!0})}),u.jsx(te,{label:"Weergavenaam",children:u.jsx("input",{className:X,value:P.name,onChange:ae=>$({...P,name:ae.target.value})})})]}),u.jsx("div",{className:"text-[12px] text-muted font-medium pt-1",children:"IMAP (inkomend)"}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(te,{label:"IMAP host *",className:"col-span-2",children:u.jsx("input",{className:X,value:P.imap_host,onChange:ae=>$({...P,imap_host:ae.target.value}),required:!0})}),u.jsx(te,{label:"Poort",children:u.jsx("input",{type:"number",className:X,value:P.imap_port,onChange:ae=>$({...P,imap_port:ae.target.value})})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"IMAP gebruiker *",children:u.jsx("input",{className:X,value:P.imap_user,onChange:ae=>$({...P,imap_user:ae.target.value}),required:!0})}),u.jsx(te,{label:"IMAP wachtwoord *",children:u.jsx("input",{type:"password",className:X,value:P.imap_pass,onChange:ae=>$({...P,imap_pass:ae.target.value}),placeholder:Q?"Leeg laten om te behouden":"",required:!Q})})]}),u.jsxs("label",{className:"flex items-center gap-2 text-[13px] cursor-pointer",children:[u.jsx("input",{type:"checkbox",checked:P.imap_secure,onChange:ae=>$({...P,imap_secure:ae.target.checked}),className:"accent-[#00d4ff]"}),"IMAP via SSL/TLS"]}),u.jsx("div",{className:"text-[12px] text-muted font-medium pt-1",children:"SMTP (uitgaand)"}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(te,{label:"SMTP host",className:"col-span-2",children:u.jsx("input",{className:X,value:P.smtp_host,onChange:ae=>$({...P,smtp_host:ae.target.value}),placeholder:"Standaard = IMAP host"})}),u.jsx(te,{label:"Poort",children:u.jsx("input",{type:"number",className:X,value:P.smtp_port,onChange:ae=>$({...P,smtp_port:ae.target.value})})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"SMTP gebruiker",children:u.jsx("input",{className:X,value:P.smtp_user,onChange:ae=>$({...P,smtp_user:ae.target.value}),placeholder:"Standaard = IMAP gebruiker"})}),u.jsx(te,{label:"SMTP wachtwoord",children:u.jsx("input",{type:"password",className:X,value:P.smtp_pass,onChange:ae=>$({...P,smtp_pass:ae.target.value}),placeholder:Q?"Leeg laten om te behouden":"Standaard = IMAP wachtwoord"})})]}),u.jsxs("label",{className:"flex items-center gap-2 text-[13px] cursor-pointer",children:[u.jsx("input",{type:"checkbox",checked:P.smtp_secure,onChange:ae=>$({...P,smtp_secure:ae.target.checked}),className:"accent-[#00d4ff]"}),"SMTP via SSL/TLS"]}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{variant:"secondary",type:"button",onClick:()=>W(!1),children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:U,children:"Opslaan"})]})]})})]})}const D1={planning:"Planning",in_progress:"Bezig",completed:"Afgerond",on_hold:"On hold"},jd={low:"Laag",medium:"Gemiddeld",high:"Hoog",critical:"Kritiek"},aM={name:"",client_id:"",description:"",status:"planning",priority:"medium",budget:"",start_date:"",end_date:""};function _P({open:e,onClose:t,clients:n,project:r,onSaved:l}){const[o,c]=T.useState(aM),[d,h]=T.useState(!1),[p,v]=T.useState(null);T.useEffect(()=>{e&&(v(null),c(r?{name:r.name||"",client_id:r.client_id||"",description:r.description||"",status:r.status||"planning",priority:r.priority||"medium",budget:r.budget??"",start_date:r.start_date||"",end_date:r.end_date||""}:aM))},[e,r]);const m=(j,S)=>c(_=>({..._,[j]:S})),g=async()=>{if(!o.name.trim())return v("Projectnaam is verplicht");h(!0),v(null);try{const j={...o,client_id:o.client_id||null,budget:o.budget===""?null:Number(o.budget),start_date:o.start_date||null,end_date:o.end_date||null};r?await ce.put(`/projects/${r.id}`,j):await ce.post("/projects",j),t(),l==null||l()}catch(j){v(j.message)}finally{h(!1)}};return u.jsxs(_t,{open:e,onClose:t,title:r?"Project bewerken":"Nieuw project",children:[u.jsxs("div",{className:"space-y-3",children:[u.jsx(te,{label:"Naam *",children:u.jsx("input",{className:X,value:o.name,onChange:j=>m("name",j.target.value),placeholder:"Bijv. migratie naar Azure"})}),u.jsx(te,{label:"Cliënt",children:u.jsxs("select",{className:X,value:o.client_id,onChange:j=>m("client_id",j.target.value),children:[u.jsx("option",{value:"",children:"— Geen —"}),n.map(j=>u.jsx("option",{value:j.id,children:j.name},j.id))]})}),u.jsx(te,{label:"Beschrijving",children:u.jsx("textarea",{className:X,rows:3,value:o.description,onChange:j=>m("description",j.target.value)})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Status",children:u.jsx("select",{className:X,value:o.status,onChange:j=>m("status",j.target.value),children:Object.entries(D1).map(([j,S])=>u.jsx("option",{value:j,children:S},j))})}),u.jsx(te,{label:"Prioriteit",children:u.jsx("select",{className:X,value:o.priority,onChange:j=>m("priority",j.target.value),children:Object.entries(jd).map(([j,S])=>u.jsx("option",{value:j,children:S},j))})})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(te,{label:"Budget (€)",children:u.jsx("input",{type:"number",min:"0",step:"0.01",className:X,value:o.budget,onChange:j=>m("budget",j.target.value)})}),u.jsx(te,{label:"Startdatum",children:u.jsx("input",{type:"date",className:X,value:o.start_date,onChange:j=>m("start_date",j.target.value)})}),u.jsx(te,{label:"Einddatum",children:u.jsx("input",{type:"date",className:X,value:o.end_date,onChange:j=>m("end_date",j.target.value)})})]})]}),p&&u.jsx("div",{className:"text-red text-[12px] mt-3",children:p}),u.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[u.jsx(pe,{variant:"secondary",onClick:t,children:"Annuleren"}),u.jsx(pe,{onClick:g,loading:d,children:r?"Opslaan":"Aanmaken"})]})]})}function jQ(){const[e,t]=T.useState(null),[n,r]=T.useState([]),[l,o]=T.useState(null),[c,d]=T.useState(!1),h=()=>{o(null),ce.get("/projects").then(t).catch(o)};return T.useEffect(h,[]),T.useEffect(()=>{ce.get("/clients").then(r).catch(()=>{})},[]),l?u.jsx(Oe,{error:l,onRetry:h}):e?u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Projecten"}),u.jsxs("p",{className:"text-[13px] text-muted mt-0.5",children:[e.length," project",e.length===1?"":"en"]})]}),u.jsxs(pe,{onClick:()=>d(!0),children:[u.jsx(qt,{className:"w-4 h-4"})," Nieuw project"]})]}),e.length===0?u.jsx(Ae,{children:u.jsx(Ar,{icon:KM,title:"Nog geen projecten",hint:"Maak je eerste project aan om taken en milestones te beheren.",action:u.jsxs(pe,{onClick:()=>d(!0),children:[u.jsx(qt,{className:"w-4 h-4"})," Nieuw project"]})})}):u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:e.map(p=>{const v=p.task_count>0?Math.round(p.done_count/p.task_count*100):0;return u.jsxs(Ae,{className:"card-hover",children:[u.jsxs("div",{className:"flex items-start justify-between gap-2",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx(ft,{to:`/projects/${p.id}`,className:"font-semibold text-[14px] hover:text-accent transition-colors block truncate",children:p.name}),u.jsx("div",{className:"text-[12px] text-muted mt-0.5",children:p.client_name||"Geen cliënt"})]}),u.jsx(Tt,{status:p.status,labels:D1})]}),u.jsxs("div",{className:"mt-4",children:[u.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted mb-1",children:[u.jsx("span",{children:"Voortgang"}),u.jsxs("span",{children:[p.done_count,"/",p.task_count," taken · ",v,"%"]})]}),u.jsx("div",{className:"h-1.5 rounded-full bg-bg-soft overflow-hidden",children:u.jsx("div",{className:"h-full bg-accent rounded-full transition-all",style:{width:`${v}%`}})})]}),u.jsxs("div",{className:"flex items-center justify-between mt-4 text-[12px] text-muted",children:[u.jsxs("span",{children:[ye.date(p.start_date)," — ",ye.date(p.end_date)]}),p.budget!=null&&u.jsx("span",{className:"font-medium text-text",children:ye.euro(p.budget)})]})]},p.id)})}),u.jsx(_P,{open:c,onClose:()=>d(!1),clients:n,onSaved:h})]}):u.jsx(Ze,{})}const _Q=[{key:"todo",label:"Te doen"},{key:"in_progress",label:"Bezig"},{key:"done",label:"Klaar"}],pf=["todo","in_progress","done"],SQ={pending:"Open",done:"Behaald",completed:"Behaald",missed:"Gemist"},Bb={title:"",description:"",assignee_id:"",priority:"medium",due_date:""};function wQ({task:e,onMove:t,onProgress:n,onDelete:r}){const l=pf.indexOf(e.status);return u.jsxs("div",{className:"bg-bg-soft border border-border-soft rounded-lg p-3 space-y-2",children:[u.jsxs("div",{className:"flex items-start justify-between gap-2",children:[u.jsx("div",{className:"text-[13px] font-medium leading-snug",children:e.title}),u.jsx("button",{onClick:()=>r(e),className:"p-1 rounded text-muted hover:text-red hover:bg-red/10 shrink-0",title:"Taak verwijderen",children:u.jsx(zt,{className:"w-3.5 h-3.5"})})]}),u.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[u.jsx(nt,{color:C0[e.priority]||"muted",children:jd[e.priority]||e.priority}),e.assignee_name&&u.jsx("span",{className:"text-[11px] text-muted",children:e.assignee_name}),e.due_date&&u.jsxs("span",{className:"text-[11px] text-muted",children:["· ",ye.date(e.due_date)]})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted mb-1",children:[u.jsx("span",{children:"Voortgang"}),u.jsxs("span",{children:[e.progress||0,"%"]})]}),u.jsx("input",{type:"range",min:"0",max:"100",step:"5",value:e.progress||0,onChange:o=>n(e,Number(o.target.value)),className:"w-full h-1.5 accent-[#00d4ff] cursor-pointer"})]}),u.jsxs("div",{className:"flex items-center justify-between pt-1",children:[u.jsx("button",{disabled:l<=0,onClick:()=>t(e,pf[l-1]),className:"p-1 rounded text-muted hover:text-text hover:bg-card disabled:opacity-30 disabled:cursor-not-allowed",title:"Naar vorige status",children:u.jsx(YM,{className:"w-4 h-4"})}),u.jsx(Tt,{status:e.status,labels:{todo:"Te doen",in_progress:"Bezig",done:"Klaar"}}),u.jsx("button",{disabled:l>=pf.length-1,onClick:()=>t(e,pf[l+1]),className:"p-1 rounded text-muted hover:text-text hover:bg-card disabled:opacity-30 disabled:cursor-not-allowed",title:"Naar volgende status",children:u.jsx(VM,{className:"w-4 h-4"})})]})]})}function OQ(){const{id:e}=ju(),t=mr(),[n,r]=T.useState(null),[l,o]=T.useState([]),[c,d]=T.useState([]),[h,p]=T.useState(null),[v,m]=T.useState(!1),[g,j]=T.useState(!1),[S,_]=T.useState(Bb),[x,O]=T.useState(!1),[w,E]=T.useState(null),M=()=>{p(null),ce.get(`/projects/${e}`).then(r).catch(p)};if(T.useEffect(M,[e]),T.useEffect(()=>{ce.get("/clients").then(o).catch(()=>{}),ce.get("/users").then(d).catch(()=>{})},[]),h)return u.jsx(Oe,{error:h,onRetry:M});if(!n)return u.jsx(Ze,{});const{project:A,tasks:C,milestones:k}=n,z=C.filter(D=>D.status==="done").length,B=C.length>0?Math.round(z/C.length*100):0,Z=async(D,P)=>{try{await ce.post(`/projects/tasks/${D.id}/status`,{status:P}),M()}catch($){alert($.message)}},G=async(D,P)=>{r($=>({...$,tasks:$.tasks.map(U=>U.id===D.id?{...U,progress:P}:U)}));try{await ce.post(`/projects/tasks/${D.id}/progress`,{progress:P})}catch($){alert($.message),M()}},H=async D=>{if(window.confirm(`Taak "${D.title}" verwijderen?`))try{await ce.del(`/projects/tasks/${D.id}`),M()}catch(P){alert(P.message)}},W=async()=>{if(window.confirm(`Project "${A.name}" en alle bijbehorende taken verwijderen?`))try{await ce.del(`/projects/${A.id}`),t("/projects")}catch(D){alert(D.message)}},Q=async()=>{if(!S.title.trim())return E("Titel is verplicht");O(!0),E(null);try{await ce.post(`/projects/${e}/tasks`,{...S,assignee_id:S.assignee_id||null,due_date:S.due_date||null}),j(!1),_(Bb),M()}catch(D){E(D.message)}finally{O(!1)}};return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{children:[u.jsxs(ft,{to:"/projects",className:"inline-flex items-center gap-1 text-[12px] text-muted hover:text-accent mb-2",children:[u.jsx(Su,{className:"w-3.5 h-3.5"})," Terug naar projecten"]}),u.jsxs("div",{className:"flex items-start justify-between gap-3 flex-wrap",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:A.name}),u.jsxs("div",{className:"flex items-center gap-2 mt-1.5 flex-wrap",children:[A.client_id?u.jsx(ft,{to:`/clients/${A.client_id}`,className:"text-[13px] text-accent hover:underline",children:A.client_name}):u.jsx("span",{className:"text-[13px] text-muted",children:"Geen cliënt"}),u.jsx(Tt,{status:A.status,labels:D1}),u.jsx(nt,{color:C0[A.priority]||"muted",children:jd[A.priority]||A.priority}),u.jsxs("span",{className:"text-[12px] text-muted",children:[ye.date(A.start_date)," — ",ye.date(A.end_date)]}),A.budget!=null&&u.jsx("span",{className:"text-[12px] font-medium",children:ye.euro(A.budget)})]}),A.description&&u.jsx("p",{className:"text-[13px] text-muted mt-2 max-w-2xl",children:A.description})]}),u.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[u.jsxs(pe,{variant:"secondary",size:"sm",onClick:()=>m(!0),children:[u.jsx(Ga,{className:"w-3.5 h-3.5"})," Bewerken"]}),u.jsxs(pe,{variant:"danger",size:"sm",onClick:W,children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]})]})]}),u.jsxs("div",{className:"mt-4",children:[u.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted mb-1",children:[u.jsx("span",{children:"Voortgang project"}),u.jsxs("span",{children:[z,"/",C.length," taken klaar · ",B,"%"]})]}),u.jsx("div",{className:"h-2 rounded-full bg-bg-soft overflow-hidden",children:u.jsx("div",{className:"h-full bg-accent rounded-full transition-all",style:{width:`${B}%`}})})]})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsx("h2",{className:"text-[15px] font-semibold",children:"Taken"}),u.jsxs(pe,{size:"sm",onClick:()=>{_(Bb),E(null),j(!0)},children:[u.jsx(qt,{className:"w-3.5 h-3.5"})," Taak toevoegen"]})]}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:_Q.map(D=>{const P=C.filter($=>$.status===D.key);return u.jsxs("div",{className:"bg-card border border-border-soft rounded-xl p-3",children:[u.jsxs("div",{className:"flex items-center justify-between px-1 pb-2",children:[u.jsx("span",{className:"text-[12px] font-semibold uppercase tracking-wide text-muted",children:D.label}),u.jsx("span",{className:"text-[11px] text-muted",children:P.length})]}),u.jsx("div",{className:"space-y-2",children:P.length===0?u.jsx("div",{className:"text-[12px] text-muted text-center py-6",children:"Geen taken"}):P.map($=>u.jsx(wQ,{task:$,onMove:Z,onProgress:G,onDelete:H},$.id))})]},D.key)})})]}),k.length>0&&u.jsx(Ae,{title:"Milestones",subtitle:`${k.length} mijlpaal${k.length===1?"":"en"}`,children:u.jsx("div",{className:"space-y-2",children:k.map(D=>u.jsxs("div",{className:"flex items-center justify-between gap-2 px-2.5 py-2 rounded-lg hover:bg-card-hover",children:[u.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[u.jsx(j6,{className:"w-4 h-4 text-accent shrink-0"}),u.jsx("span",{className:"text-[13px] font-medium truncate",children:D.name})]}),u.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[u.jsx("span",{className:"text-[12px] text-muted",children:ye.date(D.target_date)}),u.jsx(Tt,{status:D.status,labels:SQ})]})]},D.id))})}),u.jsx(_P,{open:v,onClose:()=>m(!1),clients:l,project:A,onSaved:M}),u.jsxs(_t,{open:g,onClose:()=>j(!1),title:"Taak toevoegen",children:[u.jsxs("div",{className:"space-y-3",children:[u.jsx(te,{label:"Titel *",children:u.jsx("input",{className:X,value:S.title,onChange:D=>_(P=>({...P,title:D.target.value})),placeholder:"Bijv. inventarisatie uitvoeren"})}),u.jsx(te,{label:"Beschrijving",children:u.jsx("textarea",{className:X,rows:3,value:S.description,onChange:D=>_(P=>({...P,description:D.target.value}))})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Toegewezen aan",children:u.jsxs("select",{className:X,value:S.assignee_id,onChange:D=>_(P=>({...P,assignee_id:D.target.value})),children:[u.jsx("option",{value:"",children:"— Niemand —"}),c.map(D=>u.jsx("option",{value:D.id,children:D.username},D.id))]})}),u.jsx(te,{label:"Prioriteit",children:u.jsx("select",{className:X,value:S.priority,onChange:D=>_(P=>({...P,priority:D.target.value})),children:Object.entries(jd).map(([D,P])=>u.jsx("option",{value:D,children:P},D))})})]}),u.jsx(te,{label:"Deadline",children:u.jsx("input",{type:"date",className:X,value:S.due_date,onChange:D=>_(P=>({...P,due_date:D.target.value}))})})]}),w&&u.jsx("div",{className:"text-red text-[12px] mt-3",children:w}),u.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[u.jsx(pe,{variant:"secondary",onClick:()=>j(!1),children:"Annuleren"}),u.jsx(pe,{onClick:Q,loading:x,children:"Toevoegen"})]})]})]})}const iM=()=>new Date().toISOString().split("T")[0],lM={client_id:"",engagement_id:"",date:"",hours:"",description:"",billable:!0,hourly_rate:150};function AQ({open:e,onClose:t,entry:n,clients:r,engagements:l,onSaved:o}){const[c,d]=T.useState(lM),[h,p]=T.useState(!1),[v,m]=T.useState(null);T.useEffect(()=>{e&&(m(null),d(n?{client_id:n.client_id||"",engagement_id:n.engagement_id||"",date:n.date||iM(),hours:n.hours??"",description:n.description||"",billable:!!n.billable,hourly_rate:n.hourly_rate??150}:{...lM,date:iM()}))},[e,n]);const g=(_,x)=>d(O=>({...O,[_]:x})),j=c.client_id?l.filter(_=>String(_.client_id)===String(c.client_id)):[],S=async _=>{_.preventDefault(),p(!0),m(null);try{const x={...c,client_id:c.client_id||null,engagement_id:c.engagement_id||null};n?await ce.put(`/time/${n.id}`,x):await ce.post("/time",x),o(),t()}catch(x){m(x)}finally{p(!1)}};return u.jsx(_t,{open:e,onClose:t,title:n?"Uren bewerken":"Uren toevoegen",children:u.jsxs("form",{onSubmit:S,className:"space-y-4",children:[u.jsx(Oe,{error:v}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Cliënt",children:u.jsxs("select",{className:X,value:c.client_id,onChange:_=>d(x=>({...x,client_id:_.target.value,engagement_id:""})),children:[u.jsx("option",{value:"",children:"— Geen —"}),r.map(_=>u.jsx("option",{value:_.id,children:_.name},_.id))]})}),u.jsx(te,{label:"Engagement",children:u.jsxs("select",{className:`${X} disabled:opacity-50`,value:c.engagement_id,onChange:_=>g("engagement_id",_.target.value),disabled:!c.client_id,children:[u.jsx("option",{value:"",children:"— Geen —"}),j.map(_=>u.jsxs("option",{value:_.id,children:[_.title," — ",_.client_name]},_.id))]})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Datum *",children:u.jsx("input",{type:"date",required:!0,className:X,value:c.date,onChange:_=>g("date",_.target.value)})}),u.jsx(te,{label:"Uren *",children:u.jsx("input",{type:"number",required:!0,step:"0.25",min:"0",className:X,value:c.hours,onChange:_=>g("hours",_.target.value),placeholder:"bijv. 2.5"})})]}),u.jsx(te,{label:"Omschrijving",children:u.jsx("textarea",{className:X,rows:2,value:c.description,onChange:_=>g("description",_.target.value),placeholder:"Wat heb je gedaan?"})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3 items-end",children:[u.jsx(te,{label:"Uurtarief",children:u.jsx("input",{type:"number",step:"0.01",min:"0",className:X,value:c.hourly_rate,onChange:_=>g("hourly_rate",_.target.value)})}),u.jsxs("label",{className:"flex items-center gap-2 pb-2 cursor-pointer",children:[u.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-accent",checked:c.billable,onChange:_=>g("billable",_.target.checked)}),u.jsx("span",{className:"text-[13px]",children:"Facturabel"})]})]}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{type:"button",variant:"secondary",onClick:t,children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:h,children:n?"Opslaan":"Toevoegen"})]})]})})}function NQ({open:e,onClose:t,clients:n}){const[r,l]=T.useState({client_id:"",date_from:"",date_to:""}),[o,c]=T.useState(!1),[d,h]=T.useState(null),[p,v]=T.useState(null);T.useEffect(()=>{e&&(l({client_id:"",date_from:"",date_to:""}),h(null),v(null))},[e]);const m=(j,S)=>l(_=>({..._,[j]:S})),g=async j=>{j.preventDefault(),c(!0),h(null);try{const S=await ce.post("/time/create-invoice",{client_id:r.client_id,date_from:r.date_from||void 0,date_to:r.date_to||void 0});v(S)}catch(S){h(S)}finally{c(!1)}};return u.jsx(_t,{open:e,onClose:t,title:"Factuur maken uit uren",children:p?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"bg-green/10 border border-green/30 rounded-lg px-4 py-3 text-[13px] text-green",children:["Factuur ",u.jsx("span",{className:"font-semibold",children:p.number})," is aangemaakt uit de facturabele uren."]}),u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsx(pe,{variant:"secondary",onClick:t,children:"Sluiten"}),u.jsx(ft,{to:`/invoices/${p.id}`,children:u.jsx(pe,{children:"Bekijk factuur"})})]})]}):u.jsxs("form",{onSubmit:g,className:"space-y-4",children:[u.jsx(Oe,{error:d}),u.jsx(te,{label:"Cliënt *",children:u.jsxs("select",{required:!0,className:X,value:r.client_id,onChange:j=>m("client_id",j.target.value),children:[u.jsx("option",{value:"",children:"— Kies een cliënt —"}),n.map(j=>u.jsx("option",{value:j.id,children:j.name},j.id))]})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Van datum",children:u.jsx("input",{type:"date",className:X,value:r.date_from,onChange:j=>m("date_from",j.target.value)})}),u.jsx(te,{label:"Tot datum",children:u.jsx("input",{type:"date",className:X,value:r.date_to,onChange:j=>m("date_to",j.target.value)})})]}),u.jsx("p",{className:"text-[12px] text-muted",children:"Alle facturabele uren van deze cliënt (binnen de periode) worden op één conceptfactuur gezet."}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{type:"button",variant:"secondary",onClick:t,children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:o,children:"Factuur maken"})]})]})})}function EQ(){const[e,t]=T.useState(null),[n,r]=T.useState([]),[l,o]=T.useState([]),[c,d]=T.useState(null),[h,p]=T.useState({client_id:"",date_from:"",date_to:""}),[v,m]=T.useState({open:!1,entry:null}),[g,j]=T.useState(!1);T.useEffect(()=>{ce.get("/clients").then(r).catch(()=>{}),ce.get("/engagements").then(o).catch(()=>{})},[]);const S=()=>{d(null),ce.get("/time"+Ha(h)).then(t).catch(d)};T.useEffect(S,[h]);const _=T.useMemo(()=>e?e.entries.filter(w=>w.billable).reduce((w,E)=>w+E.hours*(E.hourly_rate||0),0):0,[e]),x=async w=>{if(window.confirm(`${ye.hours(w.hours)} op ${ye.date(w.date)} verwijderen?`))try{await ce.del(`/time/${w.id}`),S()}catch(E){alert(E.message)}},O=(w,E)=>p(M=>({...M,[w]:E}));return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Urenregistratie"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Registreer en factureer je gewerkte uren"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(pe,{variant:"secondary",onClick:()=>j(!0),children:[u.jsx(N0,{className:"w-3.5 h-3.5"})," Factuur maken uit uren"]}),u.jsxs(pe,{onClick:()=>m({open:!0,entry:null}),children:[u.jsx(qt,{className:"w-3.5 h-3.5"})," Uren toevoegen"]})]})]}),c?u.jsx(Oe,{error:c,onRetry:S}):e?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[u.jsx(tn,{icon:La,label:"Totaal uren",value:ye.hours(e.totalHours),color:"blue"}),u.jsx(tn,{icon:La,label:"Facturabel",value:ye.hours(e.billableHours),color:"green"}),u.jsx(tn,{icon:La,label:"Niet-facturabel",value:ye.hours(e.totalHours-e.billableHours),color:"yellow"}),u.jsx(tn,{icon:d6,label:"Geschatte waarde",value:ye.euro(_),sub:"facturabele uren × tarief",color:"accent"})]}),u.jsxs(Ae,{children:[u.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-4",children:[u.jsxs("select",{className:`${X} !w-auto`,value:h.client_id,onChange:w=>O("client_id",w.target.value),children:[u.jsx("option",{value:"",children:"Alle cliënten"}),n.map(w=>u.jsx("option",{value:w.id,children:w.name},w.id))]}),u.jsx("input",{type:"date",className:`${X} !w-auto`,value:h.date_from,onChange:w=>O("date_from",w.target.value),title:"Van datum"}),u.jsx("span",{className:"text-muted text-[12px]",children:"t/m"}),u.jsx("input",{type:"date",className:`${X} !w-auto`,value:h.date_to,onChange:w=>O("date_to",w.target.value),title:"Tot datum"}),(h.client_id||h.date_from||h.date_to)&&u.jsx(pe,{variant:"ghost",size:"sm",onClick:()=>p({client_id:"",date_from:"",date_to:""}),children:"Filters wissen"})]}),u.jsx(Dt,{columns:[{label:"Datum",render:w=>u.jsx("span",{className:"text-muted",children:ye.date(w.date)})},{label:"Cliënt",render:w=>w.client_name||"-"},{label:"Engagement",render:w=>w.engagement_title||"-"},{label:"Omschrijving",render:w=>u.jsx("span",{className:"text-muted",children:w.description||"-"})},{label:"Uren",render:w=>ye.hours(w.hours)},{label:"Tarief",render:w=>ye.euro(w.hourly_rate)},{label:"Facturabel",render:w=>w.billable?u.jsx(nt,{color:"green",children:"Ja"}):u.jsx(nt,{color:"muted",children:"Nee"})},{label:"Gebruiker",render:w=>u.jsx("span",{className:"text-muted",children:w.username||"-"})},{label:"Acties",render:w=>u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx("button",{onClick:()=>m({open:!0,entry:w}),className:"p-1.5 rounded-md text-muted hover:text-text hover:bg-bg-soft",title:"Bewerken",children:u.jsx(Ga,{className:"w-3.5 h-3.5"})}),u.jsx("button",{onClick:()=>x(w),className:"p-1.5 rounded-md text-muted hover:text-red hover:bg-red/10",title:"Verwijderen",children:u.jsx(zt,{className:"w-3.5 h-3.5"})})]})}],rows:e.entries,keyFn:w=>w.id,empty:u.jsx(Ar,{icon:La,title:"Geen uren gevonden",hint:"Voeg je eerste tijdregistratie toe of pas de filters aan."})})]})]}):u.jsx(Ze,{}),u.jsx(AQ,{open:v.open,entry:v.entry,clients:n,engagements:l,onClose:()=>m({open:!1,entry:null}),onSaved:S}),u.jsx(NQ,{open:g,onClose:()=>{j(!1),S()},clients:n})]})}const TQ=()=>new Date().toISOString().split("T")[0],CQ={draft:"Concept",sent:"Verzonden",paid:"Betaald",overdue:"Verlopen",cancelled:"Geannuleerd"},Ub={description:"",quantity:1,unit_price:""};function MQ({open:e,onClose:t,clients:n,onSaved:r}){const[l,o]=T.useState({client_id:"",date:"",due_date:"",notes:""}),[c,d]=T.useState([{...Ub}]),[h,p]=T.useState(!1),[v,m]=T.useState(null);T.useEffect(()=>{e&&(o({client_id:"",date:TQ(),due_date:"",notes:""}),d([{...Ub}]),m(null))},[e]);const g=(M,A)=>o(C=>({...C,[M]:A})),j=(M,A,C)=>d(k=>k.map((z,B)=>B===M?{...z,[A]:C}:z)),S=()=>d(M=>[...M,{...Ub}]),_=M=>d(A=>A.filter((C,k)=>k!==M)),x=T.useMemo(()=>c.reduce((M,A)=>M+(parseFloat(A.quantity)||0)*(parseFloat(A.unit_price)||0),0),[c]),O=x*.21,w=x+O,E=async M=>{M.preventDefault(),p(!0),m(null);try{await ce.post("/invoices",{client_id:l.client_id,date:l.date,due_date:l.due_date,notes:l.notes,items:c.filter(A=>A.description.trim()),subtotal:x,tax:O}),r(),t()}catch(A){m(A)}finally{p(!1)}};return u.jsx(_t,{open:e,onClose:t,title:"Nieuwe factuur",wide:!0,children:u.jsxs("form",{onSubmit:E,className:"space-y-4",children:[u.jsx(Oe,{error:v}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[u.jsx(te,{label:"Cliënt *",children:u.jsxs("select",{required:!0,className:X,value:l.client_id,onChange:M=>g("client_id",M.target.value),children:[u.jsx("option",{value:"",children:"— Kies een cliënt —"}),n.map(M=>u.jsx("option",{value:M.id,children:M.name},M.id))]})}),u.jsx(te,{label:"Factuurdatum",children:u.jsx("input",{type:"date",className:X,value:l.date,onChange:M=>g("date",M.target.value)})}),u.jsx(te,{label:"Vervaldatum",children:u.jsx("input",{type:"date",className:X,value:l.due_date,onChange:M=>g("due_date",M.target.value)})})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("span",{className:"text-[12px] text-muted",children:"Factuurregels"}),u.jsxs(pe,{type:"button",variant:"secondary",size:"sm",onClick:S,children:[u.jsx(qt,{className:"w-3 h-3"})," Regel toevoegen"]})]}),u.jsx("div",{className:"space-y-2",children:c.map((M,A)=>u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{className:`${X} flex-1`,placeholder:"Omschrijving",value:M.description,onChange:C=>j(A,"description",C.target.value)}),u.jsx("input",{type:"number",min:"0",step:"0.25",className:`${X} !w-24`,placeholder:"Aantal",value:M.quantity,onChange:C=>j(A,"quantity",C.target.value)}),u.jsx("input",{type:"number",min:"0",step:"0.01",className:`${X} !w-28`,placeholder:"Prijs",value:M.unit_price,onChange:C=>j(A,"unit_price",C.target.value)}),u.jsx("span",{className:"text-[12px] text-muted w-24 text-right shrink-0",children:ye.euro((parseFloat(M.quantity)||0)*(parseFloat(M.unit_price)||0))}),u.jsx("button",{type:"button",onClick:()=>_(A),disabled:c.length===1,className:"p-1.5 rounded-md text-muted hover:text-red hover:bg-red/10 disabled:opacity-30 disabled:cursor-not-allowed shrink-0",title:"Regel verwijderen",children:u.jsx(zt,{className:"w-3.5 h-3.5"})})]},A))})]}),u.jsx("div",{className:"flex justify-end",children:u.jsxs("div",{className:"w-64 space-y-1.5 text-[13px]",children:[u.jsxs("div",{className:"flex justify-between",children:[u.jsx("span",{className:"text-muted",children:"Subtotaal"}),u.jsx("span",{children:ye.euro(x)})]}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("span",{className:"text-muted",children:"BTW (21%)"}),u.jsx("span",{children:ye.euro(O)})]}),u.jsxs("div",{className:"flex justify-between font-semibold border-t border-border-soft pt-1.5",children:[u.jsx("span",{children:"Totaal"}),u.jsx("span",{children:ye.euro(w)})]})]})}),u.jsx(te,{label:"Notities",children:u.jsx("textarea",{className:X,rows:2,value:l.notes,onChange:M=>g("notes",M.target.value),placeholder:"Bijv. betalingsvoorwaarden"})}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{type:"button",variant:"secondary",onClick:t,children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:h,children:"Factuur aanmaken"})]})]})})}function kQ(){const[e,t]=T.useState(null),[n,r]=T.useState([]),[l,o]=T.useState(null),[c,d]=T.useState(!1),h=mr();T.useEffect(()=>{ce.get("/clients").then(r).catch(()=>{})},[]);const p=()=>{o(null),ce.get("/invoices").then(t).catch(o)};return T.useEffect(p,[]),u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Facturen"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Beheer je facturatie en betalingen"})]}),u.jsxs(pe,{onClick:()=>d(!0),children:[u.jsx(qt,{className:"w-3.5 h-3.5"})," Nieuwe factuur"]})]}),l?u.jsx(Oe,{error:l,onRetry:p}):e?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:[u.jsx(tn,{icon:qs,label:"Openstaand",value:ye.euro(e.totalOutstanding),color:"yellow"}),u.jsx(tn,{icon:Ed,label:"Betaald",value:ye.euro(e.totalPaid),color:"green"}),u.jsx(tn,{icon:N0,label:"Totaal facturen",value:e.invoices.length,color:"accent"})]}),u.jsx(Ae,{children:u.jsx(Dt,{columns:[{label:"Nummer",render:v=>u.jsx(ft,{to:`/invoices/${v.id}`,onClick:m=>m.stopPropagation(),className:"font-medium text-accent hover:underline",children:v.number})},{label:"Cliënt",key:"client_name"},{label:"Datum",render:v=>u.jsx("span",{className:"text-muted",children:ye.date(v.date)})},{label:"Vervaldatum",render:v=>u.jsx("span",{className:"text-muted",children:v.due_date?ye.date(v.due_date):"-"})},{label:"Totaal",render:v=>ye.euro(v.total)},{label:"Status",render:v=>u.jsx(Tt,{status:v.status,labels:CQ})}],rows:e.invoices,keyFn:v=>v.id,onRowClick:v=>h(`/invoices/${v.id}`),empty:u.jsx(Ar,{icon:qs,title:"Nog geen facturen",hint:"Maak je eerste factuur aan of genereer er een uit je uren."})})})]}):u.jsx(Ze,{}),u.jsx(MQ,{open:c,onClose:()=>d(!1),clients:n,onSaved:p})]})}const oM={draft:"Concept",sent:"Verzonden",paid:"Betaald",overdue:"Verlopen",cancelled:"Geannuleerd"};function RQ(){const{id:e}=ju(),t=mr(),[n,r]=T.useState(null),[l,o]=T.useState(null),[c,d]=T.useState(null),[h,p]=T.useState(!1),[v,m]=T.useState(!1),g=()=>{o(null),ce.get(`/invoices/${e}`).then(r).catch(o)};T.useEffect(g,[e]);const j=async w=>{m(!0),d(null);try{await ce.post(`/invoices/${e}/status`,{status:w}),g()}catch(E){d({type:"error",msg:E.message})}finally{m(!1)}},S=async()=>{if(window.confirm("Factuur per e-mail versturen naar de cliënt?")){p(!0),d(null);try{await ce.post(`/invoices/${e}/send-email`),d({type:"success",msg:"Factuur is succesvol per e-mail verstuurd."}),g()}catch(w){d({type:"error",msg:w.message})}finally{p(!1)}}},_=async()=>{if(window.confirm(`Factuur ${n.invoice.number} definitief verwijderen?`))try{await ce.del(`/invoices/${e}`),t("/invoices")}catch(w){d({type:"error",msg:w.message})}};if(l)return u.jsx(Oe,{error:l,onRetry:g});if(!n)return u.jsx(Ze,{});const{invoice:x,items:O}=n;return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(ft,{to:"/invoices",children:u.jsxs(pe,{variant:"secondary",size:"sm",children:[u.jsx(Su,{className:"w-3.5 h-3.5"})," Terug"]})}),u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:x.number}),u.jsx(Tt,{status:x.status,labels:oM})]}),u.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[u.jsx("select",{className:"bg-bg-soft border border-border rounded-lg px-3 py-2 text-[13px] focus:outline-none focus:border-accent/60 disabled:opacity-50",value:x.status,disabled:v,onChange:w=>j(w.target.value),children:Object.entries(oM).map(([w,E])=>u.jsx("option",{value:w,children:E},w))}),u.jsxs(pe,{variant:"secondary",onClick:S,loading:h,children:[u.jsx(Ad,{className:"w-3.5 h-3.5"})," E-mail versturen"]}),u.jsxs(pe,{variant:"danger",onClick:_,children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]})]})]}),c&&u.jsx("div",{className:`rounded-lg px-4 py-3 text-[13px] border ${c.type==="success"?"bg-green/10 border-green/30 text-green":"bg-red/10 border-red/30 text-red"}`,children:c.msg}),u.jsx(Ae,{padding:!1,className:"max-w-3xl",children:u.jsxs("div",{className:"p-6 space-y-6",children:[u.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-[11px] uppercase tracking-wide text-muted mb-1",children:"Factuur voor"}),u.jsx("div",{className:"text-[15px] font-semibold",children:x.client_name}),u.jsxs("div",{className:"text-[12px] text-muted mt-1 space-y-0.5",children:[x.contact_name&&u.jsx("div",{children:x.contact_name}),x.contact_email&&u.jsx("div",{children:x.contact_email}),x.website&&u.jsx("div",{children:x.website})]})]}),u.jsxs("div",{className:"text-right text-[13px] space-y-1",children:[u.jsxs("div",{children:[u.jsx("span",{className:"text-muted",children:"Factuurnummer: "}),u.jsx("span",{className:"font-medium",children:x.number})]}),u.jsxs("div",{children:[u.jsx("span",{className:"text-muted",children:"Factuurdatum: "}),u.jsx("span",{children:ye.date(x.date)})]}),u.jsxs("div",{children:[u.jsx("span",{className:"text-muted",children:"Vervaldatum: "}),u.jsx("span",{children:x.due_date?ye.date(x.due_date):"-"})]})]})]}),u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"w-full text-[13px]",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"text-left text-muted border-b border-border-soft",children:[u.jsx("th",{className:"pb-2 pr-4 font-medium text-[12px]",children:"Omschrijving"}),u.jsx("th",{className:"pb-2 pr-4 font-medium text-[12px] text-right",children:"Aantal"}),u.jsx("th",{className:"pb-2 pr-4 font-medium text-[12px] text-right",children:"Tarief"}),u.jsx("th",{className:"pb-2 font-medium text-[12px] text-right",children:"Totaal"})]})}),u.jsxs("tbody",{children:[O.map(w=>u.jsxs("tr",{className:"border-b border-border-soft/50",children:[u.jsx("td",{className:"py-2.5 pr-4",children:w.description}),u.jsx("td",{className:"py-2.5 pr-4 text-right text-muted",children:(w.quantity||0).toLocaleString("nl-NL")}),u.jsx("td",{className:"py-2.5 pr-4 text-right text-muted",children:ye.euro(w.unit_price)}),u.jsx("td",{className:"py-2.5 text-right",children:ye.euro(w.total)})]},w.id)),O.length===0&&u.jsx("tr",{children:u.jsx("td",{colSpan:4,className:"py-6 text-center text-muted",children:"Geen factuurregels"})})]})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsxs("div",{className:"w-64 space-y-1.5 text-[13px]",children:[u.jsxs("div",{className:"flex justify-between",children:[u.jsx("span",{className:"text-muted",children:"Subtotaal"}),u.jsx("span",{children:ye.euro(x.subtotal)})]}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("span",{className:"text-muted",children:"BTW"}),u.jsx("span",{children:ye.euro(x.tax)})]}),u.jsxs("div",{className:"flex justify-between font-bold text-[15px] border-t border-border-soft pt-1.5",children:[u.jsx("span",{children:"Totaal"}),u.jsx("span",{children:ye.euro(x.total)})]})]})}),x.notes&&u.jsxs("div",{className:"border-t border-border-soft pt-4",children:[u.jsx("div",{className:"text-[11px] uppercase tracking-wide text-muted mb-1",children:"Notities"}),u.jsx("div",{className:"text-[13px] whitespace-pre-wrap",children:x.notes})]})]})})]})}const sM={contentStyle:{backgroundColor:"#131a2a",border:"1px solid #1f2a44",borderRadius:8,fontSize:12},labelStyle:{color:"#8b9bb8"}},bf=new Date().getFullYear(),PQ=[bf-2,bf-1,bf];function DQ(){const[e,t]=T.useState(bf),[n,r]=T.useState(null),[l,o]=T.useState(null),c=()=>{o(null),ce.get("/finance"+Ha({year:e})).then(r).catch(o)};return T.useEffect(c,[e]),u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Financiën"}),u.jsxs("p",{className:"text-[13px] text-muted mt-0.5",children:["Uren en omzet over ",(n==null?void 0:n.year)??e]})]}),u.jsx("select",{className:"bg-bg-soft border border-border rounded-lg px-3 py-2 text-[13px] focus:outline-none focus:border-accent/60",value:e,onChange:d=>t(parseInt(d.target.value)),children:PQ.map(d=>u.jsx("option",{value:d,children:d},d))})]}),l?u.jsx(Oe,{error:l,onRetry:c}):n?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[u.jsx(tn,{icon:La,label:"Uren dit jaar",value:ye.hours(n.totals.hoursThisYear),color:"blue"}),u.jsx(tn,{icon:Ed,label:"Betaald dit jaar",value:ye.euro(n.totals.paidThisYear),color:"green"}),u.jsx(tn,{icon:qs,label:"Openstaand totaal",value:ye.euro(n.totals.outstanding),color:"yellow"}),u.jsx(tn,{icon:N0,label:"Concept-facturen",value:ye.euro(n.totals.draftTotal),sub:"nog niet verzonden",color:"accent"})]}),u.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4",children:[u.jsx(Ae,{title:"Uren per maand",subtitle:`Totaal vs facturabel (${n.year})`,children:u.jsx("div",{className:"h-56",children:n.timeStats.length===0?u.jsxs("div",{className:"h-full flex items-center justify-center text-muted text-[13px]",children:["Geen uren in ",n.year]}):u.jsx(Ts,{width:"100%",height:"100%",children:u.jsxs(bd,{data:n.timeStats,children:[u.jsx(yu,{strokeDasharray:"3 3",stroke:"#1f2a44",vertical:!1}),u.jsx(Ri,{dataKey:"month",tick:{fill:"#8b9bb8",fontSize:11},axisLine:!1,tickLine:!1}),u.jsx(Pi,{tick:{fill:"#8b9bb8",fontSize:11},axisLine:!1,tickLine:!1}),u.jsx(xn,{...sM,cursor:{fill:"rgba(0,212,255,0.06)"}}),u.jsx(_n,{dataKey:"hours",name:"Totaal",fill:"#58a6ff",radius:[4,4,0,0]}),u.jsx(_n,{dataKey:"billable_hours",name:"Facturabel",fill:"#00d4ff",radius:[4,4,0,0]})]})})})}),u.jsx(Ae,{title:"Omzet per maand",subtitle:`Betaald vs openstaand (${n.year})`,children:u.jsx("div",{className:"h-56",children:n.invoiceStats.length===0?u.jsxs("div",{className:"h-full flex items-center justify-center text-muted text-[13px]",children:["Geen facturen in ",n.year]}):u.jsx(Ts,{width:"100%",height:"100%",children:u.jsxs(bd,{data:n.invoiceStats,children:[u.jsx(yu,{strokeDasharray:"3 3",stroke:"#1f2a44",vertical:!1}),u.jsx(Ri,{dataKey:"month",tick:{fill:"#8b9bb8",fontSize:11},axisLine:!1,tickLine:!1}),u.jsx(Pi,{tick:{fill:"#8b9bb8",fontSize:11},axisLine:!1,tickLine:!1,tickFormatter:d=>`€${d}`}),u.jsx(xn,{...sM,formatter:d=>ye.euro(d),cursor:{fill:"rgba(0,212,255,0.06)"}}),u.jsx(_n,{dataKey:"paid",name:"Betaald",fill:"#3fb950",radius:[4,4,0,0]}),u.jsx(_n,{dataKey:"outstanding",name:"Openstaand",fill:"#d29922",radius:[4,4,0,0]})]})})})})]})]}):u.jsx(Ze,{})]})}const uM={client_id:"",name:"",location:"",datacenter:"",total_units:42,notes:""};function $Q(){const[e,t]=T.useState(null),[n,r]=T.useState(null),[l,o]=T.useState([]),[c,d]=T.useState(!1),[h,p]=T.useState(uM),[v,m]=T.useState(!1),[g,j]=T.useState(null),S=()=>{r(null),ce.get("/racks").then(t).catch(r)};T.useEffect(S,[]),T.useEffect(()=>{ce.get("/clients").then(o).catch(()=>{})},[]);const _=()=>{p(uM),j(null),d(!0)},x=async O=>{O.preventDefault(),m(!0),j(null);try{await ce.post("/racks",{...h,total_units:parseInt(h.total_units,10)||42}),d(!1),S()}catch(w){j(w)}finally{m(!1)}};return n?u.jsx(Oe,{error:n,onRetry:S}):e?u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Racks"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Rack-inventaris per cliënt"})]}),u.jsxs(pe,{onClick:_,children:[u.jsx(qt,{className:"w-4 h-4"})," Nieuw rack"]})]}),e.length===0?u.jsx(Ae,{children:u.jsx(Ar,{icon:Fb,title:"Nog geen racks",hint:"Maak je eerste rack aan om devices toe te voegen.",action:u.jsxs(pe,{onClick:_,children:[u.jsx(qt,{className:"w-4 h-4"})," Nieuw rack"]})})}):u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:e.map(O=>{const w=O.total_units||42,E=O.device_count||0,M=Math.min(100,Math.round(E/w*100));return u.jsxs("div",{className:"bg-card border border-border-soft rounded-xl p-4 card-hover",children:[u.jsxs("div",{className:"flex items-start justify-between gap-2",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx(ft,{to:`/racks/${O.id}`,className:"text-[14px] font-semibold text-accent hover:underline truncate block",children:O.name}),u.jsx("div",{className:"text-[12px] text-muted mt-0.5",children:O.client_name})]}),u.jsx("div",{className:"w-9 h-9 rounded-lg bg-accent-soft flex items-center justify-center shrink-0",children:u.jsx(Fb,{className:"w-[18px] h-[18px] text-accent"})})]}),(O.location||O.datacenter)&&u.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] text-muted mt-2",children:[u.jsx(WM,{className:"w-3.5 h-3.5 shrink-0"}),u.jsx("span",{className:"truncate",children:[O.location,O.datacenter].filter(Boolean).join(" · ")})]}),u.jsxs("div",{className:"mt-3",children:[u.jsxs("div",{className:"flex items-center justify-between text-[12px] mb-1",children:[u.jsx("span",{className:"text-muted",children:"Bezetting"}),u.jsxs("span",{children:[E," / ",w,"U bezet"]})]}),u.jsx("div",{className:"h-1.5 bg-bg-soft rounded-full overflow-hidden",children:u.jsx("div",{className:"h-full bg-accent rounded-full",style:{width:`${M}%`}})})]})]},O.id)})}),u.jsx(_t,{open:c,onClose:()=>d(!1),title:"Nieuw rack",children:u.jsxs("form",{onSubmit:x,className:"space-y-3",children:[g&&u.jsx(Oe,{error:g}),u.jsx(te,{label:"Cliënt *",children:u.jsxs("select",{className:X,value:h.client_id,onChange:O=>p({...h,client_id:O.target.value}),required:!0,children:[u.jsx("option",{value:"",children:"— Kies cliënt —"}),l.map(O=>u.jsx("option",{value:O.id,children:O.name},O.id))]})}),u.jsx(te,{label:"Naam *",children:u.jsx("input",{className:X,value:h.name,onChange:O=>p({...h,name:O.target.value}),required:!0})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Locatie",children:u.jsx("input",{className:X,value:h.location,onChange:O=>p({...h,location:O.target.value})})}),u.jsx(te,{label:"Datacenter",children:u.jsx("input",{className:X,value:h.datacenter,onChange:O=>p({...h,datacenter:O.target.value})})})]}),u.jsx(te,{label:"Aantal U",children:u.jsx("input",{type:"number",min:"1",className:X,value:h.total_units,onChange:O=>p({...h,total_units:O.target.value})})}),u.jsx(te,{label:"Notities",children:u.jsx("textarea",{rows:3,className:X,value:h.notes,onChange:O=>p({...h,notes:O.target.value})})}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{variant:"secondary",type:"button",onClick:()=>d(!1),children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:v,children:"Opslaan"})]})]})})]}):u.jsx(Ze,{})}const vi=28,qQ=["server","switch","router","firewall","storage","ups","pdu","other"],Ib={server:"bg-blue/20 border-blue/60 text-blue",switch:"bg-green/20 border-green/60 text-green",firewall:"bg-red/20 border-red/60 text-red",storage:"bg-purple/20 border-purple/60 text-purple",ups:"bg-yellow/20 border-yellow/60 text-yellow"},cM="bg-accent-soft border-accent/60 text-accent",zQ={active:"Actief",standby:"Standby",decommissioned:"Uitgefaseerd"},fM={name:"",device_type:"server",model:"",manufacturer:"",position_u:1,height_u:1,mgmt_ip:"",serial:"",asset_tag:"",status:"active",specs:"",notes:""};function LQ(){const{id:e}=ju(),t=mr(),[n,r]=T.useState(null),[l,o]=T.useState(null),[c,d]=T.useState(!1),[h,p]=T.useState(null),[v,m]=T.useState(!1),[g,j]=T.useState(null),[S,_]=T.useState(fM),[x,O]=T.useState(!1),[w,E]=T.useState(null),M=()=>{o(null),ce.get(`/racks/${e}`).then(r).catch(o)};if(T.useEffect(M,[e]),l)return u.jsx(Oe,{error:l,onRetry:M});if(!n)return u.jsx(Ze,{});const{rack:A,devices:C}=n,k=A.total_units||42,z=()=>{p({name:A.name||"",location:A.location||"",datacenter:A.datacenter||"",total_units:k,notes:A.notes||""}),E(null),d(!0)},B=async D=>{D.preventDefault(),O(!0),E(null);try{await ce.put(`/racks/${e}`,{...h,total_units:parseInt(h.total_units,10)||42}),d(!1),M()}catch(P){E(P)}finally{O(!1)}},Z=async()=>{if(window.confirm(`Rack "${A.name}" en alle devices verwijderen?`))try{await ce.del(`/racks/${e}`),t("/racks")}catch(D){alert(D.message||String(D))}},G=()=>{j(null),_(fM),E(null),m(!0)},H=D=>{j(D),_({name:D.name||"",device_type:D.device_type||"server",model:D.model||"",manufacturer:D.manufacturer||"",position_u:D.position_u||1,height_u:D.height_u||1,mgmt_ip:D.mgmt_ip||"",serial:D.serial||"",asset_tag:D.asset_tag||"",status:D.status||"active",specs:D.specs||"",notes:D.notes||""}),E(null),m(!0)},W=async D=>{D.preventDefault(),O(!0),E(null);const P={...S,position_u:parseInt(S.position_u,10),height_u:parseInt(S.height_u,10)||1};try{g?await ce.put(`/racks/devices/${g.id}`,P):await ce.post(`/racks/${e}/devices`,P),m(!1),M()}catch($){E($)}finally{O(!1)}},Q=async()=>{if(g&&window.confirm(`Device "${g.name}" verwijderen?`)){O(!0),E(null);try{await ce.del(`/racks/devices/${g.id}`),m(!1),M()}catch(D){E(D)}finally{O(!1)}}};return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsxs("div",{children:[u.jsxs(ft,{to:"/racks",className:"text-[12px] text-muted hover:text-text flex items-center gap-1 mb-1",children:[u.jsx(Su,{className:"w-3.5 h-3.5"})," Terug naar racks"]}),u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:A.name}),u.jsxs("div",{className:"text-[13px] text-muted mt-0.5 flex items-center gap-2 flex-wrap",children:[u.jsx(ft,{to:`/clients/${A.client_id}`,className:"text-accent hover:underline",children:A.client_name}),(A.location||A.datacenter)&&u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(WM,{className:"w-3.5 h-3.5"}),[A.location,A.datacenter].filter(Boolean).join(" · ")]})]})]}),u.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[u.jsxs(pe,{variant:"secondary",onClick:z,children:[u.jsx(Ga,{className:"w-3.5 h-3.5"})," Bewerken"]}),u.jsxs(pe,{variant:"danger",onClick:Z,children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]})]})]}),u.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 items-start",children:[u.jsxs(Ae,{title:"Rack-overzicht",subtitle:`${C.length} devices · ${k}U`,actions:u.jsxs(pe,{size:"sm",onClick:G,children:[u.jsx(qt,{className:"w-3.5 h-3.5"})," Device"]}),children:[u.jsx("div",{className:"flex justify-center",children:u.jsxs("div",{className:"flex gap-1.5",children:[u.jsx("div",{className:"flex flex-col text-right",style:{width:34},children:Array.from({length:k},(D,P)=>u.jsxs("div",{className:"text-[10px] text-muted flex items-center justify-end pr-1",style:{height:vi},children:["U",P+1]},P))}),u.jsxs("div",{className:"relative border-2 border-border rounded-md bg-bg-soft overflow-hidden",style:{width:260,height:k*vi},children:[Array.from({length:k},(D,P)=>u.jsx("div",{className:"absolute left-0 right-0 border-b border-border-soft/40",style:{top:P*vi,height:vi}},P)),C.map(D=>{const P=Math.max(1,Math.min(D.position_u||1,k)),$=Math.max(1,D.height_u||1),U=Ib[D.device_type]||cM;return u.jsxs("button",{onClick:()=>H(D),title:`${D.name}${D.model?` — ${D.model}`:""} (U${P}${$>1?`–U${P+$-1}`:""})`,className:`absolute left-1 right-1 rounded border px-2 flex flex-col justify-center overflow-hidden text-left hover:brightness-125 transition-all cursor-pointer ${U}`,style:{top:(P-1)*vi+1,height:$*vi-2},children:[u.jsx("span",{className:"text-[11px] font-semibold truncate leading-tight",children:D.name}),D.model&&$*vi>=36&&u.jsx("span",{className:"text-[10px] opacity-75 truncate leading-tight",children:D.model})]},D.id)})]})]})}),u.jsxs("div",{className:"flex items-center gap-3 flex-wrap mt-4 pt-3 border-t border-border-soft",children:[Object.keys(Ib).map(D=>u.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-muted",children:[u.jsx("span",{className:`w-2.5 h-2.5 rounded-sm border ${Ib[D]}`})," ",D]},D)),u.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-muted",children:[u.jsx("span",{className:`w-2.5 h-2.5 rounded-sm border ${cM}`})," overig"]})]})]}),u.jsx(Ae,{title:"Devices",subtitle:`${C.length} in dit rack`,children:u.jsx(Dt,{columns:[{label:"Naam",render:D=>u.jsx("span",{className:"text-accent font-medium",children:D.name})},{label:"Type",render:D=>u.jsx(nt,{color:"blue",children:D.device_type})},{label:"Model",render:D=>u.jsx("span",{className:"text-muted",children:D.model||"-"})},{label:"Positie",render:D=>`U${D.position_u}`},{label:"Mgmt IP",render:D=>u.jsx("span",{className:"text-muted",children:D.mgmt_ip||"-"})},{label:"Status",render:D=>u.jsx(Tt,{status:D.status,labels:zQ})}],rows:C,keyFn:D=>D.id,onRowClick:H,empty:u.jsx("div",{className:"text-center text-muted text-[13px] py-8",children:"Nog geen devices in dit rack"})})})]}),u.jsx(_t,{open:c,onClose:()=>d(!1),title:"Rack bewerken",children:h&&u.jsxs("form",{onSubmit:B,className:"space-y-3",children:[w&&u.jsx(Oe,{error:w}),u.jsx(te,{label:"Naam *",children:u.jsx("input",{className:X,value:h.name,onChange:D=>p({...h,name:D.target.value}),required:!0})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Locatie",children:u.jsx("input",{className:X,value:h.location,onChange:D=>p({...h,location:D.target.value})})}),u.jsx(te,{label:"Datacenter",children:u.jsx("input",{className:X,value:h.datacenter,onChange:D=>p({...h,datacenter:D.target.value})})})]}),u.jsx(te,{label:"Aantal U",children:u.jsx("input",{type:"number",min:"1",className:X,value:h.total_units,onChange:D=>p({...h,total_units:D.target.value})})}),u.jsx(te,{label:"Notities",children:u.jsx("textarea",{rows:3,className:X,value:h.notes,onChange:D=>p({...h,notes:D.target.value})})}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{variant:"secondary",type:"button",onClick:()=>d(!1),children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:x,children:"Opslaan"})]})]})}),u.jsx(_t,{open:v,onClose:()=>m(!1),title:g?"Device bewerken":"Device toevoegen",wide:!0,children:u.jsxs("form",{onSubmit:W,className:"space-y-3",children:[w&&u.jsx(Oe,{error:w}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Naam *",children:u.jsx("input",{className:X,value:S.name,onChange:D=>_({...S,name:D.target.value}),required:!0})}),u.jsx(te,{label:"Type",children:u.jsx("select",{className:X,value:S.device_type,onChange:D=>_({...S,device_type:D.target.value}),children:qQ.map(D=>u.jsx("option",{value:D,children:D},D))})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Model",children:u.jsx("input",{className:X,value:S.model,onChange:D=>_({...S,model:D.target.value})})}),u.jsx(te,{label:"Fabrikant",children:u.jsx("input",{className:X,value:S.manufacturer,onChange:D=>_({...S,manufacturer:D.target.value})})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:`Positie U * (1–${k})`,children:u.jsx("input",{type:"number",min:"1",max:k,className:X,value:S.position_u,onChange:D=>_({...S,position_u:D.target.value}),required:!0})}),u.jsx(te,{label:"Hoogte (U)",children:u.jsx("input",{type:"number",min:"1",max:k,className:X,value:S.height_u,onChange:D=>_({...S,height_u:D.target.value})})})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(te,{label:"Mgmt IP",children:u.jsx("input",{className:X,value:S.mgmt_ip,onChange:D=>_({...S,mgmt_ip:D.target.value})})}),u.jsx(te,{label:"Serienummer",children:u.jsx("input",{className:X,value:S.serial,onChange:D=>_({...S,serial:D.target.value})})}),u.jsx(te,{label:"Asset-tag",children:u.jsx("input",{className:X,value:S.asset_tag,onChange:D=>_({...S,asset_tag:D.target.value})})})]}),u.jsx(te,{label:"Status",children:u.jsxs("select",{className:X,value:S.status,onChange:D=>_({...S,status:D.target.value}),children:[u.jsx("option",{value:"active",children:"Actief"}),u.jsx("option",{value:"standby",children:"Standby"}),u.jsx("option",{value:"decommissioned",children:"Uitgefaseerd"})]})}),u.jsx(te,{label:"Specs",children:u.jsx("textarea",{rows:2,className:X,value:S.specs,onChange:D=>_({...S,specs:D.target.value})})}),u.jsx(te,{label:"Notities",children:u.jsx("textarea",{rows:2,className:X,value:S.notes,onChange:D=>_({...S,notes:D.target.value})})}),u.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[u.jsx("div",{children:g&&u.jsxs(pe,{variant:"danger",type:"button",onClick:Q,loading:x,children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(pe,{variant:"secondary",type:"button",onClick:()=>m(!1),children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:x,children:"Opslaan"})]})]})]})})]})}const dM={active:"Actief",standby:"Standby",decommissioned:"Uitgefaseerd"},BQ=["switch","router","firewall","loadbalancer","ap","other"],Hb={rack_device:"Rack-device",network_device:"Netwerkdevice",external:"Extern"},UQ=["copper","sfp","sfp+","qsfp","dac","fiber"],hM={client_id:"",name:"",device_type:"switch",model:"",manufacturer:"",ip_address:"",mgmt_ip:"",ports_count:24,os_version:"",status:"active",notes:""},pM={client_id:"",name:"",from_type:"network_device",from_id:"",from_port:"",to_type:"network_device",to_id:"",to_port:"",media_type:"copper",speed:"1GbE",vlan:"",status:"active",notes:""};function IQ({tabs:e,active:t,onChange:n}){return u.jsx("div",{className:"flex gap-1 border-b border-border-soft",children:e.map(r=>u.jsx("button",{onClick:()=>n(r.key),className:`px-3.5 py-2 text-[13px] font-medium border-b-2 -mb-px transition-colors ${t===r.key?"border-accent text-accent":"border-transparent text-muted hover:text-text"}`,children:r.label},r.key))})}function HQ(){const[e,t]=T.useState("devices"),[n,r]=T.useState([]),[l,o]=T.useState(null),[c,d]=T.useState(null),[h,p]=T.useState(!1),[v,m]=T.useState(null),[g,j]=T.useState(hM),[S,_]=T.useState(null),[x,O]=T.useState(null),[w,E]=T.useState(!1),[M,A]=T.useState(null),[C,k]=T.useState(pM),[z,B]=T.useState(!1),[Z,G]=T.useState(null),H=()=>{d(null),ce.get("/networking/devices").then(o).catch(d)},W=()=>{O(null),ce.get("/networking/connections").then(_).catch(O)};T.useEffect(()=>{H(),W()},[]),T.useEffect(()=>{ce.get("/clients").then(r).catch(()=>{})},[]);const Q=()=>{m(null),j(hM),G(null),p(!0)},D=q=>{m(q),j({client_id:q.client_id,name:q.name||"",device_type:q.device_type||"switch",model:q.model||"",manufacturer:q.manufacturer||"",ip_address:q.ip_address||"",mgmt_ip:q.mgmt_ip||"",ports_count:q.ports_count??24,os_version:q.os_version||"",status:q.status||"active",notes:q.notes||""}),G(null),p(!0)},P=async q=>{q.preventDefault(),B(!0),G(null);const de={...g,ports_count:parseInt(g.ports_count,10)||24};try{v?await ce.put(`/networking/devices/${v.id}`,de):await ce.post("/networking/devices",de),p(!1),H()}catch(ge){G(ge)}finally{B(!1)}},$=async()=>{if(v&&window.confirm(`Device "${v.name}" verwijderen?`)){B(!0),G(null);try{await ce.del(`/networking/devices/${v.id}`),p(!1),H()}catch(q){G(q)}finally{B(!1)}}},U=()=>{A(null),k(pM),G(null),E(!0)},ie=q=>{A(q),k({client_id:q.client_id,name:q.name||"",from_type:q.from_type||"network_device",from_id:q.from_id??"",from_port:q.from_port||"",to_type:q.to_type||"network_device",to_id:q.to_id??"",to_port:q.to_port||"",media_type:q.media_type||"copper",speed:q.speed||"1GbE",vlan:q.vlan||"",status:q.status||"active",notes:q.notes||""}),G(null),E(!0)},fe=async q=>{q.preventDefault(),B(!0),G(null);const de={...C,from_id:C.from_id===""?null:parseInt(C.from_id,10),to_id:C.to_id===""?null:parseInt(C.to_id,10)};try{M?await ce.put(`/networking/connections/${M.id}`,de):await ce.post("/networking/connections",de),E(!1),W()}catch(ge){G(ge)}finally{B(!1)}},L=async()=>{if(M&&window.confirm("Deze connectie verwijderen?")){B(!0),G(null);try{await ce.del(`/networking/connections/${M.id}`),E(!1),W()}catch(q){G(q)}finally{B(!1)}}},F=(q,de)=>[Hb[q]||q||"-",de].filter(Boolean).join(" · ");return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Netwerken"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Netwerkdevices en connecties"})]}),e==="devices"?u.jsxs(pe,{onClick:Q,children:[u.jsx(qt,{className:"w-4 h-4"})," Nieuw device"]}):u.jsxs(pe,{onClick:U,children:[u.jsx(qt,{className:"w-4 h-4"})," Nieuwe connectie"]})]}),u.jsx(IQ,{tabs:[{key:"devices",label:"Devices"},{key:"connections",label:"Connecties"}],active:e,onChange:t}),e==="devices"&&u.jsx(Ae,{padding:!1,children:u.jsx("div",{className:"p-4",children:c?u.jsx(Oe,{error:c,onRetry:H}):l?u.jsx(Dt,{columns:[{label:"Naam",render:q=>u.jsxs("span",{className:"font-medium flex items-center gap-2",children:[u.jsx(Nd,{className:"w-3.5 h-3.5 text-muted"}),q.name]})},{label:"Type",render:q=>u.jsx(nt,{color:"blue",children:q.device_type})},{label:"Cliënt",key:"client_name"},{label:"Model",render:q=>u.jsx("span",{className:"text-muted",children:q.model||"-"})},{label:"IP",render:q=>u.jsx("span",{className:"text-muted",children:q.ip_address||"-"})},{label:"Mgmt IP",render:q=>u.jsx("span",{className:"text-muted",children:q.mgmt_ip||"-"})},{label:"Poorten",render:q=>q.ports_count??"-"},{label:"Status",render:q=>u.jsx(Tt,{status:q.status,labels:dM})}],rows:l,keyFn:q=>q.id,onRowClick:D,empty:u.jsx("div",{className:"text-center text-muted text-[13px] py-8",children:"Nog geen netwerkdevices"})}):u.jsx(Ze,{})})}),e==="connections"&&u.jsx(Ae,{padding:!1,children:u.jsx("div",{className:"p-4",children:x?u.jsx(Oe,{error:x,onRetry:W}):S?u.jsx(Dt,{columns:[{label:"Naam",render:q=>u.jsxs("span",{className:"font-medium flex items-center gap-2",children:[u.jsx(K$,{className:"w-3.5 h-3.5 text-muted"}),q.name||"-"]})},{label:"Cliënt",key:"client_name"},{label:"Van",render:q=>F(q.from_type,q.from_port)},{label:"Naar",render:q=>F(q.to_type,q.to_port)},{label:"Media",render:q=>u.jsx(nt,{color:"purple",children:q.media_type||"-"})},{label:"Snelheid",render:q=>u.jsx("span",{className:"text-muted",children:q.speed||"-"})},{label:"VLAN",render:q=>u.jsx("span",{className:"text-muted",children:q.vlan||"-"})},{label:"Status",render:q=>u.jsx(Tt,{status:q.status,labels:dM})}],rows:S,keyFn:q=>q.id,onRowClick:ie,empty:u.jsx("div",{className:"text-center text-muted text-[13px] py-8",children:"Nog geen connecties"})}):u.jsx(Ze,{})})}),u.jsx(_t,{open:h,onClose:()=>p(!1),title:v?"Device bewerken":"Nieuw device",wide:!0,children:u.jsxs("form",{onSubmit:P,className:"space-y-3",children:[Z&&u.jsx(Oe,{error:Z}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Cliënt *",children:u.jsxs("select",{className:X,value:g.client_id,onChange:q=>j({...g,client_id:q.target.value}),required:!0,disabled:!!v,children:[u.jsx("option",{value:"",children:"— Kies cliënt —"}),n.map(q=>u.jsx("option",{value:q.id,children:q.name},q.id))]})}),u.jsx(te,{label:"Naam *",children:u.jsx("input",{className:X,value:g.name,onChange:q=>j({...g,name:q.target.value}),required:!0})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Type *",children:u.jsx("select",{className:X,value:g.device_type,onChange:q=>j({...g,device_type:q.target.value}),required:!0,children:BQ.map(q=>u.jsx("option",{value:q,children:q},q))})}),u.jsx(te,{label:"Model",children:u.jsx("input",{className:X,value:g.model,onChange:q=>j({...g,model:q.target.value})})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Fabrikant",children:u.jsx("input",{className:X,value:g.manufacturer,onChange:q=>j({...g,manufacturer:q.target.value})})}),u.jsx(te,{label:"Aantal poorten",children:u.jsx("input",{type:"number",min:"0",className:X,value:g.ports_count,onChange:q=>j({...g,ports_count:q.target.value})})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"IP-adres",children:u.jsx("input",{className:X,value:g.ip_address,onChange:q=>j({...g,ip_address:q.target.value})})}),u.jsx(te,{label:"Mgmt IP",children:u.jsx("input",{className:X,value:g.mgmt_ip,onChange:q=>j({...g,mgmt_ip:q.target.value})})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"OS-versie",children:u.jsx("input",{className:X,value:g.os_version,onChange:q=>j({...g,os_version:q.target.value})})}),u.jsx(te,{label:"Status",children:u.jsxs("select",{className:X,value:g.status,onChange:q=>j({...g,status:q.target.value}),children:[u.jsx("option",{value:"active",children:"Actief"}),u.jsx("option",{value:"standby",children:"Standby"}),u.jsx("option",{value:"decommissioned",children:"Uitgefaseerd"})]})})]}),u.jsx(te,{label:"Notities",children:u.jsx("textarea",{rows:2,className:X,value:g.notes,onChange:q=>j({...g,notes:q.target.value})})}),u.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[u.jsx("div",{children:v&&u.jsxs(pe,{variant:"danger",type:"button",onClick:$,loading:z,children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(pe,{variant:"secondary",type:"button",onClick:()=>p(!1),children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:z,children:"Opslaan"})]})]})]})}),u.jsx(_t,{open:w,onClose:()=>E(!1),title:M?"Connectie bewerken":"Nieuwe connectie",wide:!0,children:u.jsxs("form",{onSubmit:fe,className:"space-y-3",children:[Z&&u.jsx(Oe,{error:Z}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Cliënt *",children:u.jsxs("select",{className:X,value:C.client_id,onChange:q=>k({...C,client_id:q.target.value}),required:!0,disabled:!!M,children:[u.jsx("option",{value:"",children:"— Kies cliënt —"}),n.map(q=>u.jsx("option",{value:q.id,children:q.name},q.id))]})}),u.jsx(te,{label:"Naam",children:u.jsx("input",{className:X,value:C.name,onChange:q=>k({...C,name:q.target.value})})})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(te,{label:"Van type *",children:u.jsx("select",{className:X,value:C.from_type,onChange:q=>k({...C,from_type:q.target.value}),required:!0,children:Object.entries(Hb).map(([q,de])=>u.jsx("option",{value:q,children:de},q))})}),u.jsx(te,{label:"Van ID",children:u.jsx("input",{type:"number",min:"0",className:X,value:C.from_id,onChange:q=>k({...C,from_id:q.target.value})})}),u.jsx(te,{label:"Van poort",children:u.jsx("input",{className:X,placeholder:"bijv. Gi0/1",value:C.from_port,onChange:q=>k({...C,from_port:q.target.value})})})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(te,{label:"Naar type *",children:u.jsx("select",{className:X,value:C.to_type,onChange:q=>k({...C,to_type:q.target.value}),required:!0,children:Object.entries(Hb).map(([q,de])=>u.jsx("option",{value:q,children:de},q))})}),u.jsx(te,{label:"Naar ID",children:u.jsx("input",{type:"number",min:"0",className:X,value:C.to_id,onChange:q=>k({...C,to_id:q.target.value})})}),u.jsx(te,{label:"Naar poort",children:u.jsx("input",{className:X,placeholder:"bijv. eth0",value:C.to_port,onChange:q=>k({...C,to_port:q.target.value})})})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(te,{label:"Mediatype",children:u.jsx("select",{className:X,value:C.media_type,onChange:q=>k({...C,media_type:q.target.value}),children:UQ.map(q=>u.jsx("option",{value:q,children:q},q))})}),u.jsx(te,{label:"Snelheid",children:u.jsx("input",{className:X,value:C.speed,onChange:q=>k({...C,speed:q.target.value})})}),u.jsx(te,{label:"VLAN",children:u.jsx("input",{className:X,value:C.vlan,onChange:q=>k({...C,vlan:q.target.value})})})]}),u.jsx(te,{label:"Status",children:u.jsxs("select",{className:X,value:C.status,onChange:q=>k({...C,status:q.target.value}),children:[u.jsx("option",{value:"active",children:"Actief"}),u.jsx("option",{value:"standby",children:"Standby"}),u.jsx("option",{value:"decommissioned",children:"Uitgefaseerd"})]})}),u.jsx(te,{label:"Notities",children:u.jsx("textarea",{rows:2,className:X,value:C.notes,onChange:q=>k({...C,notes:q.target.value})})}),u.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[u.jsx("div",{children:M&&u.jsxs(pe,{variant:"danger",type:"button",onClick:L,loading:z,children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(pe,{variant:"secondary",type:"button",onClick:()=>E(!1),children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:z,children:"Opslaan"})]})]})]})})]})}const mM={data_architecture:"Data-architectuur",network_topology:"Netwerk-topologie",system_architecture:"Systeem-architectuur",application_flow:"Applicatie-flow",application_landscape:"Applicatie-landscape"},vM={data_architecture:"accent",network_topology:"green",system_architecture:"purple",application_flow:"blue",application_landscape:"pink"};function GQ(e){var t;return((t=e.data)==null?void 0:t.label)||e.label||e.name||e.id}function YQ(){const[e,t]=T.useState(null),[n,r]=T.useState(null),[l,o]=T.useState(null),[c,d]=T.useState(!1),[h,p]=T.useState(null),[v,m]=T.useState(!1),g=()=>{r(null),ce.get("/diagrams").then(t).catch(r)};T.useEffect(g,[]);const j=O=>{o(null),p(null),d(!0),ce.get(`/diagrams/${O.id}`).then(o).catch(p).finally(()=>d(!1))},S=()=>{o(null),p(null),d(!1)},_=async()=>{if(l&&window.confirm(`Diagram "${l.name}" verwijderen?`)){m(!0),p(null);try{await ce.del(`/diagrams/${l.id}`),S(),g()}catch(O){p(O)}finally{m(!1)}}};if(n)return u.jsx(Oe,{error:n,onRetry:g});if(!e)return u.jsx(Ze,{});const x=c||!!l||!!h;return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Diagrammen"}),u.jsxs("p",{className:"text-[13px] text-muted mt-0.5",children:["Bewerken van diagrammen kan in de"," ",u.jsx("a",{href:"/architecture",className:"text-accent underline",children:"klassieke editor"})]})]}),u.jsx(Ae,{padding:!1,children:u.jsx("div",{className:"p-4",children:u.jsx(Dt,{columns:[{label:"Naam",render:O=>u.jsxs("span",{className:"font-medium flex items-center gap-2",children:[u.jsx(x8,{className:"w-3.5 h-3.5 text-muted"}),O.name]})},{label:"Cliënt",key:"client_name"},{label:"Type",render:O=>u.jsx(nt,{color:vM[O.diagram_type]||"muted",children:mM[O.diagram_type]||O.diagram_type})},{label:"Beschrijving",render:O=>u.jsx("span",{className:"text-muted block max-w-xs truncate",children:O.description||"-"})},{label:"Bijgewerkt",render:O=>u.jsx("span",{className:"text-muted",children:ye.datetime(O.updated_at)})}],rows:e,keyFn:O=>O.id,onRowClick:j,empty:u.jsx("div",{className:"text-center text-muted text-[13px] py-8",children:"Nog geen diagrammen"})})})}),u.jsxs(_t,{open:x,onClose:S,title:l?l.name:"Diagram laden",wide:!0,children:[c&&u.jsx(Ze,{}),h&&u.jsx(Oe,{error:h}),l&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center gap-2 flex-wrap text-[12px] text-muted",children:[u.jsx(nt,{color:vM[l.diagram_type]||"muted",children:mM[l.diagram_type]||l.diagram_type}),u.jsxs("span",{children:["Bijgewerkt: ",ye.datetime(l.updated_at)]})]}),l.description&&u.jsx("p",{className:"text-[13px] text-muted",children:l.description}),u.jsxs("div",{children:[u.jsxs("h3",{className:"text-[13px] font-semibold mb-2",children:["Nodes (",l.nodes.length,")"]}),l.nodes.length===0?u.jsx("div",{className:"text-muted text-[13px]",children:"Geen nodes"}):u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:l.nodes.map((O,w)=>{var E,M;return u.jsxs("div",{className:"bg-bg-soft border border-border-soft rounded-lg px-3 py-2",children:[u.jsx("div",{className:"text-[13px] font-medium truncate",children:GQ(O)}),(O.type||((E=O.data)==null?void 0:E.type))&&u.jsx(nt,{color:"blue",className:"mt-1",children:((M=O.data)==null?void 0:M.type)||O.type})]},O.id||w)})})]}),u.jsxs("div",{children:[u.jsxs("h3",{className:"text-[13px] font-semibold mb-2",children:["Verbindingen (",l.edges.length,")"]}),l.edges.length===0?u.jsx("div",{className:"text-muted text-[13px]",children:"Geen verbindingen"}):u.jsx("div",{className:"space-y-1",children:l.edges.map((O,w)=>u.jsxs("div",{className:"flex items-center gap-2 text-[12px] text-muted bg-bg-soft border border-border-soft rounded-lg px-3 py-1.5",children:[u.jsx("span",{className:"text-text",children:O.source}),u.jsx(O0,{className:"w-3.5 h-3.5 shrink-0"}),u.jsx("span",{className:"text-text",children:O.target}),O.label&&u.jsx(nt,{color:"muted",className:"ml-1",children:O.label})]},O.id||w))})]}),u.jsxs("div",{className:"flex justify-between items-center pt-2 border-t border-border-soft",children:[u.jsxs(pe,{variant:"danger",onClick:_,loading:v,children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]}),u.jsx(pe,{variant:"secondary",onClick:S,children:"Sluiten"})]})]})]})]})}function VQ({tabs:e,active:t,onChange:n}){return u.jsx("div",{className:"flex gap-1 border-b border-border-soft",children:e.map(r=>u.jsx("button",{onClick:()=>n(r.key),className:`px-3.5 py-2 text-[13px] font-medium border-b-2 -mb-px transition-colors ${t===r.key?"border-accent text-accent":"border-transparent text-muted hover:text-text"}`,children:r.label},r.key))})}function FQ(e){return e>=70?"green":e>=40?"yellow":"muted"}function KQ(){const[e,t]=T.useState("datacenters"),[n,r]=T.useState(null),[l,o]=T.useState({search:"",vendor:"",region:"",type:"",sort:""}),[c,d]=T.useState(null),[h,p]=T.useState(null),[v,m]=T.useState({search:"",industry:"",data_warehouse:"",city:"",sort:""}),[g,j]=T.useState(null),[S,_]=T.useState(null);return T.useEffect(()=>{ce.get("/market/filters").then(r).catch(()=>r({}))},[]),T.useEffect(()=>{p(null),d(null),ce.get(`/market/datacenters${Ha(l)}`).then(d).catch(p)},[l]),T.useEffect(()=>{_(null),j(null),ce.get(`/market/companies${Ha(v)}`).then(j).catch(_)},[v]),u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Marktverkenning"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Datacenters en tech-bedrijven in de regio"})]}),u.jsx(VQ,{tabs:[{key:"datacenters",label:"Datacenters"},{key:"companies",label:"Tech-bedrijven"}],active:e,onChange:t}),e==="datacenters"&&u.jsx(Ae,{padding:!1,children:u.jsxs("div",{className:"p-4 space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-2",children:[u.jsx("input",{className:X,placeholder:"Zoeken...",value:l.search,onChange:x=>o({...l,search:x.target.value})}),u.jsxs("select",{className:X,value:l.vendor,onChange:x=>o({...l,vendor:x.target.value}),children:[u.jsx("option",{value:"",children:"Alle vendors"}),((n==null?void 0:n.vendors)||[]).map(x=>u.jsx("option",{value:x,children:x},x))]}),u.jsxs("select",{className:X,value:l.region,onChange:x=>o({...l,region:x.target.value}),children:[u.jsx("option",{value:"",children:"Alle regio's"}),((n==null?void 0:n.regions)||[]).map(x=>u.jsx("option",{value:x,children:x},x))]}),u.jsxs("select",{className:X,value:l.type,onChange:x=>o({...l,type:x.target.value}),children:[u.jsx("option",{value:"",children:"Alle types"}),((n==null?void 0:n.types)||[]).map(x=>u.jsx("option",{value:x,children:x},x))]}),u.jsxs("select",{className:X,value:l.sort,onChange:x=>o({...l,sort:x.target.value}),children:[u.jsx("option",{value:"",children:"Sorteer: vermogen"}),u.jsx("option",{value:"name",children:"Sorteer: naam"})]})]}),h?u.jsx(Oe,{error:h}):c?u.jsx(Dt,{columns:[{label:"Naam",render:x=>u.jsxs("span",{className:"font-medium flex items-center gap-2",children:[u.jsx(V$,{className:"w-3.5 h-3.5 text-muted"}),x.name]})},{label:"Stad",key:"city"},{label:"Regio",render:x=>u.jsx("span",{className:"text-muted",children:x.region||"-"})},{label:"Type",render:x=>u.jsx("span",{className:"text-muted",children:x.type||"-"})},{label:"Operator",render:x=>u.jsx("span",{className:"text-muted",children:x.operator||"-"})},{label:"Tier",render:x=>x.tier?u.jsx(nt,{color:"accent",children:x.tier}):u.jsx("span",{className:"text-muted",children:"-"})},{label:"Vermogen",render:x=>x.power_mw!=null?`${x.power_mw} MW`:"-"},{label:"Vendors",render:x=>u.jsx("span",{className:"text-muted block max-w-[220px] truncate",children:x.network_vendors||"-"})}],rows:c,keyFn:x=>x.id,empty:u.jsx("div",{className:"text-center text-muted text-[13px] py-8",children:"Geen datacenters gevonden"})}):u.jsx(Ze,{})]})}),e==="companies"&&u.jsx(Ae,{padding:!1,children:u.jsxs("div",{className:"p-4 space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-2",children:[u.jsx("input",{className:X,placeholder:"Zoeken...",value:v.search,onChange:x=>m({...v,search:x.target.value})}),u.jsxs("select",{className:X,value:v.industry,onChange:x=>m({...v,industry:x.target.value}),children:[u.jsx("option",{value:"",children:"Alle branches"}),((n==null?void 0:n.industries)||[]).map(x=>u.jsx("option",{value:x,children:x},x))]}),u.jsxs("select",{className:X,value:v.data_warehouse,onChange:x=>m({...v,data_warehouse:x.target.value}),children:[u.jsx("option",{value:"",children:"Alle data warehouses"}),((n==null?void 0:n.data_warehouses)||[]).map(x=>u.jsx("option",{value:x,children:x},x))]}),u.jsxs("select",{className:X,value:v.city,onChange:x=>m({...v,city:x.target.value}),children:[u.jsx("option",{value:"",children:"Alle steden"}),((n==null?void 0:n.cities)||[]).map(x=>u.jsx("option",{value:x,children:x},x))]}),u.jsxs("select",{className:X,value:v.sort,onChange:x=>m({...v,sort:x.target.value}),children:[u.jsx("option",{value:"",children:"Sorteer: lead score"}),u.jsx("option",{value:"name",children:"Sorteer: naam"}),u.jsx("option",{value:"employees",children:"Sorteer: werknemers"})]})]}),S?u.jsx(Oe,{error:S}):g?u.jsx(Dt,{columns:[{label:"Naam",render:x=>u.jsxs("span",{className:"font-medium flex items-center gap-2",children:[u.jsx(v6,{className:"w-3.5 h-3.5 text-muted"}),x.name]})},{label:"Branche",render:x=>u.jsx("span",{className:"text-muted",children:x.industry||"-"})},{label:"Stad",render:x=>u.jsx("span",{className:"text-muted",children:x.city||"-"})},{label:"Werknemers",render:x=>x.employees??"-"},{label:"Data warehouse",render:x=>u.jsx("span",{className:"text-muted block max-w-[160px] truncate",children:x.data_warehouse||"-"})},{label:"BI-tools",render:x=>u.jsx("span",{className:"text-muted block max-w-[140px] truncate",children:x.bi_tools||"-"})},{label:"Cloud",render:x=>u.jsx("span",{className:"text-muted",children:x.cloud_provider||"-"})},{label:"Lead score",render:x=>u.jsx(nt,{color:FQ(x.lead_score),children:x.lead_score??"-"})},{label:"Lead status",render:x=>u.jsx("span",{className:"text-muted",children:x.lead_status||"-"})}],rows:g,keyFn:x=>x.id,empty:u.jsx("div",{className:"text-center text-muted text-[13px] py-8",children:"Geen bedrijven gevonden"})}):u.jsx(Ze,{})]})})]})}const XQ=["openrouter","openai","anthropic","deepseek","groq","ollama","azure","custom"],yM={name:"",provider_type:"openrouter",api_key:"",base_url:"",default_model:"",is_active:!0,is_default:!1};function ZQ(){const[e,t]=T.useState(null),[n,r]=T.useState(null),[l,o]=T.useState(!1),[c,d]=T.useState(null),[h,p]=T.useState(yM),[v,m]=T.useState(!1),[g,j]=T.useState(null),[S,_]=T.useState([]),[x,O]=T.useState(""),[w,E]=T.useState(!1),[M,A]=T.useState(null),[C,k]=T.useState([]),[z,B]=T.useState(""),Z=T.useRef(null),G=()=>{r(null),ce.get("/ai/providers").then(t).catch(r)};T.useEffect(G,[]),T.useEffect(()=>{ce.get("/clients").then(k).catch(()=>{})},[]),T.useEffect(()=>{Z.current&&(Z.current.scrollTop=Z.current.scrollHeight)},[S,w]);const H=()=>{d(null),p(yM),j(null),o(!0)},W=$=>{d($),p({name:$.name||"",provider_type:$.provider_type||"openrouter",api_key:"",base_url:$.base_url||"",default_model:$.default_model||"",is_active:!!$.is_active,is_default:!!$.is_default}),j(null),o(!0)},Q=async $=>{$.preventDefault(),m(!0),j(null);try{await ce.post("/ai/providers",{...h,id:c?c.id:void 0}),o(!1),G()}catch(U){j(U)}finally{m(!1)}},D=async $=>{if(window.confirm(`Provider "${$.name}" verwijderen?`))try{await ce.del(`/ai/providers/${$.id}`),G()}catch(U){alert(U.message||String(U))}},P=async $=>{$==null||$.preventDefault();const U=x.trim();if(!(!U||w)){O(""),A(null),_(ie=>[...ie,{role:"user",content:U}]),E(!0);try{const ie=await ce.post("/ai/chat",{message:U,client_id:z||void 0});_(fe=>[...fe,{role:"assistant",content:ie.content,model:ie.model}])}catch(ie){A(ie)}finally{E(!1)}}};return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"AI"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Providers beheren en chatten met AI"})]}),u.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 items-start",children:[u.jsx(Ae,{title:"Providers",subtitle:"Geconfigureerde AI-providers",actions:u.jsxs(pe,{size:"sm",onClick:H,children:[u.jsx(qt,{className:"w-3.5 h-3.5"})," Provider toevoegen"]}),children:n?u.jsx(Oe,{error:n,onRetry:G}):e?e.length===0?u.jsx("div",{className:"text-muted text-[13px] py-6 text-center",children:"Nog geen providers geconfigureerd"}):u.jsx("div",{className:"space-y-2",children:e.map($=>u.jsxs("div",{className:"flex items-center gap-3 bg-bg-soft border border-border-soft rounded-lg px-3 py-2.5",children:[u.jsx("span",{className:`w-2 h-2 rounded-full shrink-0 ${$.is_active?"bg-green":"bg-muted/40"}`,title:$.is_active?"Actief":"Inactief"}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-[13px] font-medium truncate",children:$.name}),u.jsx(nt,{color:"blue",children:$.provider_type}),!!$.is_default&&u.jsx(h8,{className:"w-3.5 h-3.5 text-yellow fill-yellow shrink-0"})]}),u.jsxs("div",{className:"text-[11px] text-muted mt-0.5 truncate",children:[$.default_model||"geen model"," ",$.api_key?`· ${$.api_key}`:""]})]}),u.jsx("button",{onClick:()=>W($),className:"p-1.5 rounded-md text-muted hover:text-text hover:bg-card shrink-0",title:"Bewerken",children:u.jsx(Ga,{className:"w-3.5 h-3.5"})}),u.jsx("button",{onClick:()=>D($),className:"p-1.5 rounded-md text-muted hover:text-red hover:bg-red/10 shrink-0",title:"Verwijderen",children:u.jsx(zt,{className:"w-3.5 h-3.5"})})]},$.id))}):u.jsx(Ze,{})}),u.jsxs(Ae,{title:"AI Chat",subtitle:"Stel een vraag aan de actieve provider",padding:!1,className:"flex flex-col",children:[u.jsx("div",{className:"px-4 pt-3",children:u.jsxs("select",{className:X,value:z,onChange:$=>B($.target.value),children:[u.jsx("option",{value:"",children:"Geen cliënt-context"}),C.map($=>u.jsxs("option",{value:$.id,children:["Koppel aan: ",$.name]},$.id))]})}),u.jsxs("div",{ref:Z,className:"flex-1 overflow-y-auto px-4 py-3 space-y-3 min-h-[320px] max-h-[480px]",children:[S.length===0&&!w&&u.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-muted py-12",children:[u.jsx(H$,{className:"w-8 h-8 mb-2"}),u.jsx("div",{className:"text-[13px]",children:"Start een gesprek met de AI"})]}),S.map(($,U)=>$.role==="user"?u.jsx("div",{className:"flex justify-end",children:u.jsx("div",{className:"max-w-[80%] bg-accent text-bg rounded-2xl rounded-br-sm px-3.5 py-2 text-[13px] whitespace-pre-wrap",children:$.content})},U):u.jsx("div",{className:"flex justify-start",children:u.jsxs("div",{className:"max-w-[80%]",children:[u.jsx("div",{className:"bg-card border border-border-soft rounded-2xl rounded-bl-sm px-3.5 py-2 text-[13px] whitespace-pre-wrap",children:$.content}),$.model&&u.jsx("div",{className:"text-[10px] text-muted mt-1 ml-1",children:$.model})]})},U)),w&&u.jsx("div",{className:"flex justify-start",children:u.jsxs("div",{className:"bg-card border border-border-soft rounded-2xl rounded-bl-sm px-4 py-3 flex items-center gap-1.5",children:[u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-muted animate-bounce",style:{animationDelay:"0ms"}}),u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-muted animate-bounce",style:{animationDelay:"150ms"}}),u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-muted animate-bounce",style:{animationDelay:"300ms"}})]})})]}),M&&u.jsx("div",{className:"px-4 pb-2",children:u.jsx(Oe,{error:M})}),u.jsxs("form",{onSubmit:P,className:"flex items-center gap-2 p-3 border-t border-border-soft",children:[u.jsx("input",{className:X,placeholder:"Typ je bericht...",value:x,onChange:$=>O($.target.value),disabled:w}),u.jsxs(pe,{type:"submit",loading:w,disabled:!x.trim(),children:[u.jsx(e8,{className:"w-4 h-4"})," Verstuur"]})]})]})]}),u.jsx(_t,{open:l,onClose:()=>o(!1),title:c?"Provider bewerken":"Provider toevoegen",children:u.jsxs("form",{onSubmit:Q,className:"space-y-3",children:[g&&u.jsx(Oe,{error:g}),u.jsx(te,{label:"Naam *",children:u.jsx("input",{className:X,value:h.name,onChange:$=>p({...h,name:$.target.value}),required:!0})}),u.jsx(te,{label:"Type",children:u.jsx("select",{className:X,value:h.provider_type,onChange:$=>p({...h,provider_type:$.target.value}),children:XQ.map($=>u.jsx("option",{value:$,children:$},$))})}),u.jsx(te,{label:"API-key",children:u.jsx("input",{type:"password",className:X,value:h.api_key,onChange:$=>p({...h,api_key:$.target.value}),placeholder:c?"Leeg laten om te behouden":"sk-..."})}),u.jsx(te,{label:"Base URL",children:u.jsx("input",{className:X,value:h.base_url,onChange:$=>p({...h,base_url:$.target.value}),placeholder:"https://..."})}),u.jsx(te,{label:"Standaard model",children:u.jsx("input",{className:X,value:h.default_model,onChange:$=>p({...h,default_model:$.target.value})})}),u.jsxs("div",{className:"flex items-center gap-5",children:[u.jsxs("label",{className:"flex items-center gap-2 text-[13px] cursor-pointer",children:[u.jsx("input",{type:"checkbox",checked:h.is_active,onChange:$=>p({...h,is_active:$.target.checked}),className:"accent-[#00d4ff]"}),"Actief"]}),u.jsxs("label",{className:"flex items-center gap-2 text-[13px] cursor-pointer",children:[u.jsx("input",{type:"checkbox",checked:h.is_default,onChange:$=>p({...h,is_default:$.target.checked}),className:"accent-[#00d4ff]"}),"Standaard provider"]})]}),u.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[u.jsx(pe,{variant:"secondary",type:"button",onClick:()=>o(!1),children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:v,children:"Opslaan"})]})]})})]})}const WQ={info:"blue",warning:"yellow",error:"red",success:"green",advice:"purple",reminder:"accent",system:"muted"};function QQ(){const[e,t]=T.useState(null),[n,r]=T.useState(null),[l,o]=T.useState(!1),c=()=>{r(null),ce.get("/notifications").then(t).catch(r)};T.useEffect(c,[]);const d=async()=>{o(!0);try{await ce.post("/notifications/read-all"),c()}catch(m){alert(m.message)}finally{o(!1)}},h=async m=>{if(!m.read)try{await ce.post(`/notifications/${m.id}/read`),c()}catch(g){alert(g.message)}};if(n)return u.jsx(Oe,{error:n,onRetry:c});if(!e)return u.jsx(Ze,{});const{notifications:p,unread:v}=e;return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Notificaties"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:v>0?`${v} ongelezen`:"Alles gelezen"})]}),v>0&&u.jsxs(pe,{variant:"secondary",onClick:d,loading:l,children:[u.jsx(e6,{className:"w-4 h-4"})," Alles als gelezen markeren"]})]}),p.length===0?u.jsx(Ae,{children:u.jsx(Ar,{icon:GM,title:"Geen notificaties",hint:"Je bent helemaal bij."})}):u.jsx("div",{className:"space-y-2",children:p.map(m=>u.jsx("div",{onClick:()=>h(m),className:`bg-card border border-border-soft rounded-xl px-4 py-3 transition-colors ${m.read?"":"border-l-2 border-l-accent cursor-pointer hover:bg-card-hover"}`,children:u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:`text-[13px] ${m.read?"":"font-medium"}`,children:m.title}),m.message&&u.jsx("div",{className:"text-[12px] text-muted mt-0.5",children:m.message})]}),u.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[m.type&&u.jsx(nt,{color:WQ[m.type]||"muted",children:m.type}),u.jsx("span",{className:"text-[11px] text-muted whitespace-nowrap",children:ye.datetime(m.created_at)})]})]})},m.id))})]})}const JQ={lead:"Lead",active:"Actief",paused:"Gepauzeerd",archived:"Gearchiveerd"},eJ={todo:"Te doen",in_progress:"Bezig",done:"Klaar",cancelled:"Geannuleerd"};function Os({to:e,children:t}){const n=u.jsx("div",{className:"flex items-center justify-between gap-2 px-2.5 py-2 rounded-lg hover:bg-card-hover transition-colors",children:t});return e?u.jsx(ft,{to:e,className:"block",children:n}):n}function tJ(){const[e]=UM(),t=(e.get("q")||"").trim(),[n,r]=T.useState(null),[l,o]=T.useState(null);if(T.useEffect(()=>{if(r(null),o(null),!t){r({clients:[],engagements:[],tasks:[],diagrams:[],notes:[]});return}ce.get(`/search${Ha({q:t})}`).then(r).catch(o)},[t]),l)return u.jsx(Oe,{error:l,onRetry:()=>ce.get(`/search${Ha({q:t})}`).then(r).catch(o)});if(!n)return u.jsx(Ze,{text:`Zoeken naar "${t}"...`});const{clients:c,engagements:d,tasks:h,diagrams:p,notes:v}=n,m=c.length+d.length+h.length+p.length+v.length;return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{children:[u.jsxs("h1",{className:"text-xl font-bold tracking-tight",children:["Zoekresultaten voor “",t,"”"]}),u.jsxs("p",{className:"text-[13px] text-muted mt-0.5",children:[m," resultaat",m===1?"":"en"," gevonden"]})]}),m===0?u.jsx(Ae,{children:u.jsx(Ar,{icon:W6,title:"Geen resultaten",hint:`Er is niets gevonden voor "${t}". Probeer een andere zoekterm.`})}):u.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4",children:[c.length>0&&u.jsx(Ae,{title:"Cliënten",subtitle:`${c.length} gevonden`,children:u.jsx("div",{className:"space-y-1",children:c.map(g=>u.jsxs(Os,{to:`/clients/${g.id}`,children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[13px] font-medium truncate",children:g.name}),g.industry&&u.jsx("div",{className:"text-[11px] text-muted",children:g.industry})]}),u.jsx(Tt,{status:g.status,labels:JQ})]},g.id))})}),d.length>0&&u.jsx(Ae,{title:"Engagements",subtitle:`${d.length} gevonden`,children:u.jsx("div",{className:"space-y-1",children:d.map(g=>u.jsxs(Os,{to:`/engagements/${g.id}`,children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[13px] font-medium truncate",children:g.title}),u.jsx("div",{className:"text-[11px] text-muted",children:g.client_name})]}),u.jsx(Tt,{status:g.status,labels:{planned:"Gepland",in_progress:"Lopend",completed:"Afgerond",on_hold:"On hold"}})]},g.id))})}),h.length>0&&u.jsx(Ae,{title:"Taken",subtitle:`${h.length} gevonden`,children:u.jsx("div",{className:"space-y-1",children:h.map(g=>u.jsxs(Os,{children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[13px] font-medium truncate",children:g.title}),u.jsxs("div",{className:"text-[11px] text-muted",children:[g.client_name,g.engagement_title?` · ${g.engagement_title}`:""]})]}),u.jsx(Tt,{status:g.status,labels:eJ})]},g.id))})}),p.length>0&&u.jsx(Ae,{title:"Diagrammen",subtitle:`${p.length} gevonden`,children:u.jsx("div",{className:"space-y-1",children:p.map(g=>u.jsxs(Os,{to:"/diagrams",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[13px] font-medium truncate",children:g.name}),u.jsx("div",{className:"text-[11px] text-muted",children:g.client_name})]}),u.jsx(nt,{color:"purple",children:g.diagram_type})]},g.id))})}),v.length>0&&u.jsx(Ae,{title:"Notities",subtitle:`${v.length} gevonden`,children:u.jsx("div",{className:"space-y-1",children:v.map(g=>u.jsx(Os,{to:`/clients/${g.client_id}`,children:u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[13px] truncate",children:g.content.length>120?`${g.content.slice(0,120)}…`:g.content}),u.jsxs("div",{className:"text-[11px] text-muted",children:[g.client_name," · ",ye.date(g.created_at)]})]})},g.id))})})]})]})}const nJ=[{key:"algemeen",label:"Algemeen"},{key:"gebruikers",label:"Gebruikers"},{key:"backups",label:"Backups"},{key:"audit",label:"Audit-log"}],rJ={admin:"accent",consultant:"blue",viewer:"muted"},aJ={admin:"Admin",consultant:"Consultant",viewer:"Viewer"},gM={username:"",password:"",email:"",role:"viewer"};function SP({banner:e}){return e?u.jsx("div",{className:`rounded-lg px-4 py-3 text-[13px] border ${e.type==="green"?"bg-green/10 border-green/30 text-green":"bg-red/10 border-red/30 text-red"}`,children:e.text}):null}function iJ(){const[e,t]=T.useState(null),[n,r]=T.useState(null),[l,o]=T.useState(!1),[c,d]=T.useState(null),h=()=>{r(null),ce.get("/settings").then(t).catch(r)};T.useEffect(h,[]);const p=async m=>{m.preventDefault(),o(!0),d(null);try{await ce.post("/settings",e),d({type:"green",text:"Instellingen opgeslagen"})}catch(g){d({type:"red",text:g.message||String(g)})}finally{o(!1)}};if(n)return u.jsx(Oe,{error:n,onRetry:h});if(!e)return u.jsx(Ze,{});const v=m=>g=>t({...e,[m]:g.target.value});return u.jsx(Ae,{title:"Algemene instellingen",children:u.jsxs("form",{onSubmit:p,className:"space-y-3 max-w-2xl",children:[u.jsx(SP,{banner:c}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Merknaam",children:u.jsx("input",{className:X,value:e.brand_name||"",onChange:v("brand_name")})}),u.jsx(te,{label:"Taal",children:u.jsxs("select",{className:X,value:e.language||"nl",onChange:v("language"),children:[u.jsx("option",{value:"nl",children:"Nederlands"}),u.jsx("option",{value:"en",children:"English"})]})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"Thema",children:u.jsx("input",{className:X,value:e.theme||"",onChange:v("theme")})}),u.jsx(te,{label:"Showcase URL",children:u.jsx("input",{className:X,value:e.showcase_url||"",onChange:v("showcase_url")})})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(te,{label:"Standaard pagina",children:u.jsx("input",{className:X,value:e.default_page||"",onChange:v("default_page")})}),u.jsx(te,{label:"Auto-refresh",children:u.jsxs("select",{className:X,value:String(e.auto_refresh??"0"),onChange:v("auto_refresh"),children:[u.jsx("option",{value:"0",children:"Uit"}),u.jsx("option",{value:"1",children:"Aan"})]})}),u.jsx(te,{label:"Items per pagina",children:u.jsx("input",{type:"number",min:"1",className:X,value:e.items_per_page||"",onChange:v("items_per_page")})})]}),u.jsx("div",{className:"text-[12px] text-muted font-medium pt-1",children:"SMTP (uitgaande e-mail)"}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(te,{label:"SMTP host",className:"col-span-2",children:u.jsx("input",{className:X,value:e.smtp_host||"",onChange:v("smtp_host")})}),u.jsx(te,{label:"SMTP poort",children:u.jsx("input",{className:X,value:e.smtp_port||"",onChange:v("smtp_port")})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(te,{label:"SMTP gebruiker",children:u.jsx("input",{className:X,value:e.smtp_user||"",onChange:v("smtp_user")})}),u.jsx(te,{label:"SMTP wachtwoord",children:u.jsx("input",{type:"password",className:X,value:e.smtp_pass||"",onChange:v("smtp_pass"),placeholder:"••••••••"})})]}),u.jsx(te,{label:"Slack webhook",children:u.jsx("input",{className:X,value:e.slack_webhook||"",onChange:v("slack_webhook")})}),u.jsx("div",{className:"pt-1",children:u.jsx(pe,{type:"submit",loading:l,children:"Opslaan"})})]})})}function lJ(){const[e,t]=T.useState(null),[n,r]=T.useState(null),[l,o]=T.useState(!1),[c,d]=T.useState(null),[h,p]=T.useState(gM),[v,m]=T.useState(!1),[g,j]=T.useState(null),S=()=>{r(null),ce.get("/users").then(t).catch(r)};T.useEffect(S,[]);const _=()=>{d(null),p(gM),j(null),o(!0)},x=E=>{d(E),p({username:E.username,password:"",email:E.email||"",role:E.role||"viewer"}),j(null),o(!0)},O=async E=>{if(E.preventDefault(),!c&&h.password.length<6){j(new Error("Wachtwoord moet minimaal 6 tekens zijn"));return}m(!0),j(null);try{c?await ce.put(`/users/${c.id}`,{email:h.email,role:h.role,password:h.password||void 0}):await ce.post("/users",h),o(!1),S()}catch(M){j(M)}finally{m(!1)}},w=async()=>{if(c&&window.confirm(`Gebruiker "${c.username}" verwijderen?`)){m(!0),j(null);try{await ce.del(`/users/${c.id}`),o(!1),S()}catch(E){j(E)}finally{m(!1)}}};return n?u.jsx(Oe,{error:n,onRetry:S}):e?u.jsxs(Ae,{title:"Gebruikers",actions:u.jsxs(pe,{size:"sm",onClick:_,children:[u.jsx(qt,{className:"w-3.5 h-3.5"})," Nieuwe gebruiker"]}),children:[u.jsx(Dt,{columns:[{label:"Username",render:E=>u.jsx("span",{className:"font-medium",children:E.username})},{label:"Email",render:E=>u.jsx("span",{className:"text-muted",children:E.email||"-"})},{label:"Rol",render:E=>u.jsx(nt,{color:rJ[E.role]||"muted",children:aJ[E.role]||E.role})},{label:"Aangemaakt",render:E=>u.jsx("span",{className:"text-muted",children:ye.date(E.created_at)})}],rows:e,keyFn:E=>E.id,onRowClick:x}),u.jsx(_t,{open:l,onClose:()=>o(!1),title:c?`Gebruiker "${c.username}" bewerken`:"Nieuwe gebruiker",children:u.jsxs("form",{onSubmit:O,className:"space-y-3",children:[g&&u.jsx(Oe,{error:g}),!c&&u.jsx(te,{label:"Gebruikersnaam *",children:u.jsx("input",{className:X,value:h.username,onChange:E=>p({...h,username:E.target.value}),required:!0})}),u.jsx(te,{label:c?"Nieuw wachtwoord (leeg = behouden)":"Wachtwoord * (min. 6 tekens)",children:u.jsx("input",{type:"password",className:X,value:h.password,onChange:E=>p({...h,password:E.target.value}),required:!c,minLength:c?void 0:6})}),u.jsx(te,{label:"Email",children:u.jsx("input",{type:"email",className:X,value:h.email,onChange:E=>p({...h,email:E.target.value})})}),u.jsx(te,{label:"Rol",children:u.jsxs("select",{className:X,value:h.role,onChange:E=>p({...h,role:E.target.value}),children:[u.jsx("option",{value:"viewer",children:"Viewer"}),u.jsx("option",{value:"consultant",children:"Consultant"}),u.jsx("option",{value:"admin",children:"Admin"})]})}),u.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[u.jsx("div",{children:c&&u.jsxs(pe,{variant:"danger",type:"button",onClick:w,loading:v,children:[u.jsx(zt,{className:"w-3.5 h-3.5"})," Verwijderen"]})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(pe,{variant:"secondary",type:"button",onClick:()=>o(!1),children:"Annuleren"}),u.jsx(pe,{type:"submit",loading:v,children:"Opslaan"})]})]})]})})]}):u.jsx(Ze,{})}function oJ(){const[e,t]=T.useState(null),[n,r]=T.useState(null),[l,o]=T.useState(!1),[c,d]=T.useState(null),h=()=>{r(null),ce.get("/backup").then(t).catch(r)};T.useEffect(h,[]);const p=async()=>{o(!0),d(null);try{const m=await ce.post("/backup/create");d({type:"green",text:`Backup gemaakt: ${m.filename}`}),h()}catch(m){d({type:"red",text:m.message||String(m)})}finally{o(!1)}},v=async m=>{if(window.confirm(`Backup "${m.filename}" verwijderen?`)){d(null);try{await ce.post(`/backup/delete/${encodeURIComponent(m.filename)}`),h()}catch(g){d({type:"red",text:g.message||String(g)})}}};return n?u.jsx(Oe,{error:n,onRetry:h}):e?u.jsx(Ae,{title:"Backups",subtitle:"Database- en bestandsbackups",actions:u.jsxs(pe,{size:"sm",onClick:p,loading:l,children:[u.jsx(s6,{className:"w-3.5 h-3.5"})," Backup maken"]}),children:u.jsxs("div",{className:"space-y-3",children:[u.jsx(SP,{banner:c}),u.jsx(Dt,{columns:[{label:"Bestandsnaam",render:m=>u.jsxs("span",{className:"font-medium flex items-center gap-2",children:[u.jsx(c6,{className:"w-3.5 h-3.5 text-muted"}),m.filename]})},{label:"Grootte",render:m=>u.jsx("span",{className:"text-muted",children:m.sizeLabel||m.size||"-"})},{label:"Aangemaakt",render:m=>u.jsx("span",{className:"text-muted",children:ye.datetime(m.created_at)})},{label:"",className:"text-right",render:m=>u.jsx("button",{onClick:()=>v(m),className:"p-1.5 rounded-md text-muted hover:text-red hover:bg-red/10",title:"Verwijderen",children:u.jsx(zt,{className:"w-3.5 h-3.5"})})}],rows:e,keyFn:m=>m.filename,empty:u.jsx("div",{className:"text-center text-muted text-[13px] py-8",children:"Nog geen backups"})})]})}):u.jsx(Ze,{})}function sJ(){const[e,t]=T.useState(1),[n,r]=T.useState(null),[l,o]=T.useState(null),c=()=>{o(null),ce.get(`/audit?page=${e}`).then(r).catch(o)};return T.useEffect(c,[e]),l?u.jsx(Oe,{error:l,onRetry:c}):n?u.jsxs(Ae,{title:"Audit-log",subtitle:`${n.total} gebeurtenissen`,children:[u.jsx(Dt,{columns:[{label:"Wanneer",render:d=>u.jsx("span",{className:"text-muted whitespace-nowrap",children:ye.datetime(d.created_at)})},{label:"Gebruiker",render:d=>d.username||"-"},{label:"Actie",render:d=>u.jsx(nt,{color:"blue",children:d.action})},{label:"Entiteit",render:d=>u.jsx("span",{className:"text-muted",children:[d.entity_type,d.entity_id].filter(h=>h!=null&&h!=="").join(" #")||"-"})},{label:"Details",render:d=>u.jsx("span",{className:"text-muted block max-w-sm truncate",children:d.details||"-"})}],rows:n.entries,keyFn:d=>d.id,empty:u.jsx("div",{className:"text-center text-muted text-[13px] py-8",children:"Nog geen activiteit"})}),u.jsxs("div",{className:"flex items-center justify-between pt-3 mt-1 border-t border-border-soft",children:[u.jsx(pe,{variant:"secondary",size:"sm",disabled:e<=1,onClick:()=>t(d=>d-1),children:"Vorige"}),u.jsxs("span",{className:"text-[12px] text-muted",children:["Pagina ",n.page," van ",n.totalPages||1]}),u.jsx(pe,{variant:"secondary",size:"sm",disabled:e>=(n.totalPages||1),onClick:()=>t(d=>d+1),children:"Volgende"})]})]}):u.jsx(Ze,{})}function uJ(){const[e,t]=UM(),n=e.get("tab")||"algemeen",r=l=>t({tab:l});return u.jsxs("div",{className:"space-y-5 fade-in",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:"Instellingen"}),u.jsx("p",{className:"text-[13px] text-muted mt-0.5",children:"Applicatie-instellingen, gebruikers, backups en audit-log"})]}),u.jsx("div",{className:"flex gap-1 border-b border-border-soft",children:nJ.map(l=>u.jsx("button",{onClick:()=>r(l.key),className:`px-3.5 py-2 text-[13px] font-medium border-b-2 -mb-px transition-colors ${n===l.key?"border-accent text-accent":"border-transparent text-muted hover:text-text"}`,children:l.label},l.key))}),n==="algemeen"&&u.jsx(iJ,{}),n==="gebruikers"&&u.jsx(lJ,{}),n==="backups"&&u.jsx(oJ,{}),n==="audit"&&u.jsx(sJ,{})]})}function cJ(){const{pathname:e}=Sn();return u.jsx(Ar,{icon:l6,title:"Deze module wordt nog gebouwd",hint:`De route ${e} is onderdeel van de nieuwe SPA maar de pagina is nog niet klaar.`})}function fJ(){return u.jsx("div",{className:"h-full flex items-center justify-center",children:u.jsx("div",{className:"w-8 h-8 border-2 border-accent border-t-transparent rounded-full animate-spin"})})}function dJ({children:e}){const{user:t,loading:n}=w0(),r=Sn();return n?u.jsx(fJ,{}):t?e:u.jsx(qM,{to:"/login",state:{from:r},replace:!0})}function hJ(){return u.jsxs(Ww,{children:[u.jsx(ct,{path:"/login",element:u.jsx(A8,{})}),u.jsx(ct,{path:"/*",element:u.jsx(dJ,{children:u.jsx(w8,{children:u.jsxs(Ww,{children:[u.jsx(ct,{path:"/",element:u.jsx(ZW,{})}),u.jsx(ct,{path:"/clients",element:u.jsx(JW,{})}),u.jsx(ct,{path:"/clients/:id",element:u.jsx(aQ,{})}),u.jsx(ct,{path:"/engagements",element:u.jsx(eQ,{})}),u.jsx(ct,{path:"/engagements/:id",element:u.jsx(pQ,{})}),u.jsx(ct,{path:"/tasks",element:u.jsx(sQ,{})}),u.jsx(ct,{path:"/calendar",element:u.jsx(gQ,{})}),u.jsx(ct,{path:"/email",element:u.jsx(xQ,{})}),u.jsx(ct,{path:"/projects",element:u.jsx(jQ,{})}),u.jsx(ct,{path:"/projects/:id",element:u.jsx(OQ,{})}),u.jsx(ct,{path:"/time",element:u.jsx(EQ,{})}),u.jsx(ct,{path:"/invoices",element:u.jsx(kQ,{})}),u.jsx(ct,{path:"/invoices/:id",element:u.jsx(RQ,{})}),u.jsx(ct,{path:"/finance",element:u.jsx(DQ,{})}),u.jsx(ct,{path:"/racks",element:u.jsx($Q,{})}),u.jsx(ct,{path:"/racks/:id",element:u.jsx(LQ,{})}),u.jsx(ct,{path:"/networking",element:u.jsx(HQ,{})}),u.jsx(ct,{path:"/diagrams",element:u.jsx(YQ,{})}),u.jsx(ct,{path:"/market",element:u.jsx(KQ,{})}),u.jsx(ct,{path:"/ai",element:u.jsx(ZQ,{})}),u.jsx(ct,{path:"/notifications",element:u.jsx(QQ,{})}),u.jsx(ct,{path:"/search",element:u.jsx(tJ,{})}),u.jsx(ct,{path:"/settings",element:u.jsx(uJ,{})}),u.jsx(ct,{path:"*",element:u.jsx(cJ,{})})]})})})})]})}QD.createRoot(document.getElementById("root")).render(u.jsx(Y.StrictMode,{children:u.jsx(j$,{basename:"/app",children:u.jsx(M$,{children:u.jsx(hJ,{})})})}));
