function gI(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var Vl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ih={exports:{}},ms={},ah={exports:{}},De={};/** * @license React * react.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 oS;function bI(){if(oS)return De;oS=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),p=Symbol.iterator;function m(L){return L===null||typeof L!="object"?null:(L=p&&L[p]||L["@@iterator"],typeof L=="function"?L:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,x={};function g(L,H,oe){this.props=L,this.context=H,this.refs=x,this.updater=oe||b}g.prototype.isReactComponent={},g.prototype.setState=function(L,H){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,H,"setState")},g.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function j(){}j.prototype=g.prototype;function E(L,H,oe){this.props=L,this.context=H,this.refs=x,this.updater=oe||b}var A=E.prototype=new j;A.constructor=E,O(A,g.prototype),A.isPureReactComponent=!0;var T=Array.isArray,P=Object.prototype.hasOwnProperty,_={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};function R(L,H,oe){var ce,me={},Pe=null,Le=null;if(H!=null)for(ce in H.ref!==void 0&&(Le=H.ref),H.key!==void 0&&(Pe=""+H.key),H)P.call(H,ce)&&!N.hasOwnProperty(ce)&&(me[ce]=H[ce]);var Ae=arguments.length-2;if(Ae===1)me.children=oe;else if(1>>1,H=K[L];if(0>>1;Li(me,Z))Pei(Le,me)?(K[L]=Le,K[Pe]=Z,L=Pe):(K[L]=me,K[ce]=Z,L=ce);else if(Pei(Le,Z))K[L]=Le,K[Pe]=Z,L=Pe;else break e}}return ee}function i(K,ee){var Z=K.sortIndex-ee.sortIndex;return Z!==0?Z:K.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var f=[],d=[],v=1,p=null,m=3,b=!1,O=!1,x=!1,g=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(K){for(var ee=r(d);ee!==null;){if(ee.callback===null)n(d);else if(ee.startTime<=K)n(d),ee.sortIndex=ee.expirationTime,t(f,ee);else break;ee=r(d)}}function T(K){if(x=!1,A(K),!O)if(r(f)!==null)O=!0,Y(P);else{var ee=r(d);ee!==null&&J(T,ee.startTime-K)}}function P(K,ee){O=!1,x&&(x=!1,j(R),R=-1),b=!0;var Z=m;try{for(A(ee),p=r(f);p!==null&&(!(p.expirationTime>ee)||K&&!q());){var L=p.callback;if(typeof L=="function"){p.callback=null,m=p.priorityLevel;var H=L(p.expirationTime<=ee);ee=e.unstable_now(),typeof H=="function"?p.callback=H:p===r(f)&&n(f),A(ee)}else n(f);p=r(f)}if(p!==null)var oe=!0;else{var ce=r(d);ce!==null&&J(T,ce.startTime-ee),oe=!1}return oe}finally{p=null,m=Z,b=!1}}var _=!1,N=null,R=-1,I=5,W=-1;function q(){return!(e.unstable_now()-WK||125L?(K.sortIndex=Z,t(d,K),r(f)===null&&K===r(d)&&(x?(j(R),R=-1):x=!0,J(T,Z-L))):(K.sortIndex=H,t(f,K),O||b||(O=!0,Y(P))),K},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(K){var ee=m;return function(){var Z=m;m=ee;try{return K.apply(this,arguments)}finally{m=Z}}}})(uh)),uh}var fS;function _I(){return fS||(fS=1,sh.exports=OI()),sh.exports}/** * @license React * react-dom.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 dS;function PI(){if(dS)return Qt;dS=1;var e=Z0(),t=_I();function r(a){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,d=/^[: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]*$/,v={},p={};function m(a){return f.call(p,a)?!0:f.call(v,a)?!1:d.test(a)?p[a]=!0:(v[a]=!0,!1)}function b(a,s,c,h){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function O(a,s,c,h){if(s===null||typeof s>"u"||b(a,s,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function x(a,s,c,h,y,S,k){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=y,this.mustUseProperty=c,this.propertyName=a,this.type=s,this.sanitizeURL=S,this.removeEmptyString=k}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){g[a]=new x(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var s=a[0];g[s]=new x(s,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){g[a]=new x(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){g[a]=new x(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){g[a]=new x(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){g[a]=new x(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){g[a]=new x(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){g[a]=new x(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){g[a]=new x(a,5,!1,a.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function E(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var s=a.replace(j,E);g[s]=new x(s,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var s=a.replace(j,E);g[s]=new x(s,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var s=a.replace(j,E);g[s]=new x(s,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){g[a]=new x(a,1,!1,a.toLowerCase(),null,!1,!1)}),g.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){g[a]=new x(a,1,!1,a.toLowerCase(),null,!0,!0)});function A(a,s,c,h){var y=g.hasOwnProperty(s)?g[s]:null;(y!==null?y.type!==0:h||!(2M||y[k]!==S[M]){var B=` `+y[k].replace(" at new "," at ");return a.displayName&&B.includes("")&&(B=B.replace("",a.displayName)),B}while(1<=k&&0<=M);break}}}finally{oe=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?H(a):""}function me(a){switch(a.tag){case 5:return H(a.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return a=ce(a.type,!1),a;case 11:return a=ce(a.type.render,!1),a;case 1:return a=ce(a.type,!0),a;default:return""}}function Pe(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case N:return"Fragment";case _:return"Portal";case I:return"Profiler";case R:return"StrictMode";case U:return"Suspense";case z:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case q:return(a.displayName||"Context")+".Consumer";case W:return(a._context.displayName||"Context")+".Provider";case $:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case V:return s=a.displayName||null,s!==null?s:Pe(a.type)||"Memo";case Y:s=a._payload,a=a._init;try{return Pe(a(s))}catch{}}return null}function Le(a){var s=a.type;switch(a.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=s.render,a=a.displayName||a.name||"",s.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Pe(s);case 8:return s===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ae(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function ae(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ge(a){var s=ae(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,s),h=""+a[s];if(!a.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var y=c.get,S=c.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return y.call(this)},set:function(k){h=""+k,S.call(this,k)}}),Object.defineProperty(a,s,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(k){h=""+k},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Te(a){a._valueTracker||(a._valueTracker=ge(a))}function ne(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return a&&(h=ae(a)?a.checked?"true":"false":a.value),a=h,a!==c?(s.setValue(a),!0):!1}function We(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}}function Ne(a,s){var c=s.checked;return Z({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??a._wrapperState.initialChecked})}function Ce(a,s){var c=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;c=Ae(s.value!=null?s.value:c),a._wrapperState={initialChecked:h,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Je(a,s){s=s.checked,s!=null&&A(a,"checked",s,!1)}function st(a,s){Je(a,s);var c=Ae(s.value),h=s.type;if(c!=null)h==="number"?(c===0&&a.value===""||a.value!=c)&&(a.value=""+c):a.value!==""+c&&(a.value=""+c);else if(h==="submit"||h==="reset"){a.removeAttribute("value");return}s.hasOwnProperty("value")?Wr(a,s.type,c):s.hasOwnProperty("defaultValue")&&Wr(a,s.type,Ae(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(a.defaultChecked=!!s.defaultChecked)}function Pr(a,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+a._wrapperState.initialValue,c||s===a.value||(a.value=s),a.defaultValue=s}c=a.name,c!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,c!==""&&(a.name=c)}function Wr(a,s,c){(s!=="number"||We(a.ownerDocument)!==a)&&(c==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c))}var Hr=Array.isArray;function Ht(a,s,c,h){if(a=a.options,s){s={};for(var y=0;y"+s.valueOf().toString()+"",s=Bu.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;s.firstChild;)a.appendChild(s.firstChild)}});function No(a,s){if(s){var c=a.firstChild;if(c&&c===a.lastChild&&c.nodeType===3){c.nodeValue=s;return}}a.textContent=s}var Ro={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},S$=["Webkit","ms","Moz","O"];Object.keys(Ro).forEach(function(a){S$.forEach(function(s){s=s+a.charAt(0).toUpperCase()+a.substring(1),Ro[s]=Ro[a]})});function wx(a,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||Ro.hasOwnProperty(a)&&Ro[a]?(""+s).trim():s+"px"}function Sx(a,s){a=a.style;for(var c in s)if(s.hasOwnProperty(c)){var h=c.indexOf("--")===0,y=wx(c,s[c],h);c==="float"&&(c="cssFloat"),h?a.setProperty(c,y):a[c]=y}}var O$=Z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function md(a,s){if(s){if(O$[a]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,a));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function yd(a,s){if(a.indexOf("-")===-1)return typeof s.is=="string";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 gd=null;function bd(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var xd=null,ia=null,aa=null;function Ox(a){if(a=ts(a)){if(typeof xd!="function")throw Error(r(280));var s=a.stateNode;s&&(s=ul(s),xd(a.stateNode,a.type,s))}}function _x(a){ia?aa?aa.push(a):aa=[a]:ia=a}function Px(){if(ia){var a=ia,s=aa;if(aa=ia=null,Ox(a),s)for(a=0;a>>=0,a===0?32:31-($$(a)/M$|0)|0}var Wu=64,Hu=4194304;function Do(a){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: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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Ku(a,s){var c=a.pendingLanes;if(c===0)return 0;var h=0,y=a.suspendedLanes,S=a.pingedLanes,k=c&268435455;if(k!==0){var M=k&~y;M!==0?h=Do(M):(S&=k,S!==0&&(h=Do(S)))}else k=c&~y,k!==0?h=Do(k):S!==0&&(h=Do(S));if(h===0)return 0;if(s!==0&&s!==h&&(s&y)===0&&(y=h&-h,S=s&-s,y>=S||y===16&&(S&4194240)!==0))return s;if((h&4)!==0&&(h|=c&16),s=a.entangledLanes,s!==0)for(a=a.entanglements,s&=h;0c;c++)s.push(a);return s}function Lo(a,s,c){a.pendingLanes|=s,s!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,s=31-Er(s),a[s]=c}function B$(a,s){var c=a.pendingLanes&~s;a.pendingLanes=s,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=s,a.mutableReadLanes&=s,a.entangledLanes&=s,s=a.entanglements;var h=a.eventTimes;for(a=a.expirationTimes;0=Ko),Jx=" ",ew=!1;function tw(a,s){switch(a){case"keyup":return pM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rw(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var ua=!1;function vM(a,s){switch(a){case"compositionend":return rw(s);case"keypress":return s.which!==32?null:(ew=!0,Jx);case"textInput":return a=s.data,a===Jx&&ew?null:a;default:return null}}function mM(a,s){if(ua)return a==="compositionend"||!Ld&&tw(a,s)?(a=Vx(),Qu=Nd=zn=null,ua=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:c,offset:s-a};a=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=lw(c)}}function fw(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?fw(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function dw(){for(var a=window,s=We();s instanceof a.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)a=s.contentWindow;else break;s=We(a.document)}return s}function qd(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}function PM(a){var s=dw(),c=a.focusedElem,h=a.selectionRange;if(s!==c&&c&&c.ownerDocument&&fw(c.ownerDocument.documentElement,c)){if(h!==null&&qd(c)){if(s=h.start,a=h.end,a===void 0&&(a=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(a,c.value.length);else if(a=(s=c.ownerDocument||document)&&s.defaultView||window,a.getSelection){a=a.getSelection();var y=c.textContent.length,S=Math.min(h.start,y);h=h.end===void 0?S:Math.min(h.end,y),!a.extend&&S>h&&(y=h,h=S,S=y),y=cw(c,S);var k=cw(c,h);y&&k&&(a.rangeCount!==1||a.anchorNode!==y.node||a.anchorOffset!==y.offset||a.focusNode!==k.node||a.focusOffset!==k.offset)&&(s=s.createRange(),s.setStart(y.node,y.offset),a.removeAllRanges(),S>h?(a.addRange(s),a.extend(k.node,k.offset)):(s.setEnd(k.node,k.offset),a.addRange(s)))}}for(s=[],a=c;a=a.parentNode;)a.nodeType===1&&s.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c=document.documentMode,la=null,zd=null,Yo=null,Ud=!1;function pw(a,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Ud||la==null||la!==We(h)||(h=la,"selectionStart"in h&&qd(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Yo&&Xo(Yo,h)||(Yo=h,h=al(zd,"onSelect"),0ha||(a.current=tp[ha],tp[ha]=null,ha--)}function Xe(a,s){ha++,tp[ha]=a.current,a.current=s}var Kn={},Rt=Hn(Kn),Kt=Hn(!1),bi=Kn;function va(a,s){var c=a.type.contextTypes;if(!c)return Kn;var h=a.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var y={},S;for(S in c)y[S]=s[S];return h&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=s,a.__reactInternalMemoizedMaskedChildContext=y),y}function Vt(a){return a=a.childContextTypes,a!=null}function ll(){tt(Kt),tt(Rt)}function Aw(a,s,c){if(Rt.current!==Kn)throw Error(r(168));Xe(Rt,s),Xe(Kt,c)}function Tw(a,s,c){var h=a.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var y in h)if(!(y in s))throw Error(r(108,Le(a)||"Unknown",y));return Z({},c,h)}function cl(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Kn,bi=Rt.current,Xe(Rt,a),Xe(Kt,Kt.current),!0}function Cw(a,s,c){var h=a.stateNode;if(!h)throw Error(r(169));c?(a=Tw(a,s,bi),h.__reactInternalMemoizedMergedChildContext=a,tt(Kt),tt(Rt),Xe(Rt,a)):tt(Kt),Xe(Kt,c)}var un=null,fl=!1,rp=!1;function kw(a){un===null?un=[a]:un.push(a)}function DM(a){fl=!0,kw(a)}function Vn(){if(!rp&&un!==null){rp=!0;var a=0,s=Ke;try{var c=un;for(Ke=1;a>=k,y-=k,ln=1<<32-Er(s)+y|c<je?(jt=we,we=null):jt=we.sibling;var Fe=re(G,we,X[je],ue);if(Fe===null){we===null&&(we=jt);break}a&&we&&Fe.alternate===null&&s(G,we),F=S(Fe,F,je),xe===null?ye=Fe:xe.sibling=Fe,xe=Fe,we=jt}if(je===X.length)return c(G,we),nt&&wi(G,je),ye;if(we===null){for(;jeje?(jt=we,we=null):jt=we.sibling;var ri=re(G,we,Fe.value,ue);if(ri===null){we===null&&(we=jt);break}a&&we&&ri.alternate===null&&s(G,we),F=S(ri,F,je),xe===null?ye=ri:xe.sibling=ri,xe=ri,we=jt}if(Fe.done)return c(G,we),nt&&wi(G,je),ye;if(we===null){for(;!Fe.done;je++,Fe=X.next())Fe=se(G,Fe.value,ue),Fe!==null&&(F=S(Fe,F,je),xe===null?ye=Fe:xe.sibling=Fe,xe=Fe);return nt&&wi(G,je),ye}for(we=h(G,we);!Fe.done;je++,Fe=X.next())Fe=fe(we,G,je,Fe.value,ue),Fe!==null&&(a&&Fe.alternate!==null&&we.delete(Fe.key===null?je:Fe.key),F=S(Fe,F,je),xe===null?ye=Fe:xe.sibling=Fe,xe=Fe);return a&&we.forEach(function(yI){return s(G,yI)}),nt&&wi(G,je),ye}function dt(G,F,X,ue){if(typeof X=="object"&&X!==null&&X.type===N&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case P:e:{for(var ye=X.key,xe=F;xe!==null;){if(xe.key===ye){if(ye=X.type,ye===N){if(xe.tag===7){c(G,xe.sibling),F=y(xe,X.props.children),F.return=G,G=F;break e}}else if(xe.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===Y&&Dw(ye)===xe.type){c(G,xe.sibling),F=y(xe,X.props),F.ref=rs(G,xe,X),F.return=G,G=F;break e}c(G,xe);break}else s(G,xe);xe=xe.sibling}X.type===N?(F=Ti(X.props.children,G.mode,ue,X.key),F.return=G,G=F):(ue=Bl(X.type,X.key,X.props,null,G.mode,ue),ue.ref=rs(G,F,X),ue.return=G,G=ue)}return k(G);case _:e:{for(xe=X.key;F!==null;){if(F.key===xe)if(F.tag===4&&F.stateNode.containerInfo===X.containerInfo&&F.stateNode.implementation===X.implementation){c(G,F.sibling),F=y(F,X.children||[]),F.return=G,G=F;break e}else{c(G,F);break}else s(G,F);F=F.sibling}F=Jp(X,G.mode,ue),F.return=G,G=F}return k(G);case Y:return xe=X._init,dt(G,F,xe(X._payload),ue)}if(Hr(X))return he(G,F,X,ue);if(ee(X))return ve(G,F,X,ue);vl(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"?(X=""+X,F!==null&&F.tag===6?(c(G,F.sibling),F=y(F,X),F.return=G,G=F):(c(G,F),F=Zp(X,G.mode,ue),F.return=G,G=F),k(G)):c(G,F)}return dt}var ba=Lw(!0),Bw=Lw(!1),ml=Hn(null),yl=null,xa=null,up=null;function lp(){up=xa=yl=null}function cp(a){var s=ml.current;tt(ml),a._currentValue=s}function fp(a,s,c){for(;a!==null;){var h=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),a===c)break;a=a.return}}function wa(a,s){yl=a,up=xa=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&s)!==0&&(Gt=!0),a.firstContext=null)}function hr(a){var s=a._currentValue;if(up!==a)if(a={context:a,memoizedValue:s,next:null},xa===null){if(yl===null)throw Error(r(308));xa=a,yl.dependencies={lanes:0,firstContext:a}}else xa=xa.next=a;return s}var Si=null;function dp(a){Si===null?Si=[a]:Si.push(a)}function Fw(a,s,c,h){var y=s.interleaved;return y===null?(c.next=c,dp(s)):(c.next=y.next,y.next=c),s.interleaved=c,fn(a,h)}function fn(a,s){a.lanes|=s;var c=a.alternate;for(c!==null&&(c.lanes|=s),c=a,a=a.return;a!==null;)a.childLanes|=s,c=a.alternate,c!==null&&(c.childLanes|=s),c=a,a=a.return;return c.tag===3?c.stateNode:null}var Gn=!1;function pp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qw(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function dn(a,s){return{eventTime:a,lane:s,tag:0,payload:null,callback:null,next:null}}function Xn(a,s,c){var h=a.updateQueue;if(h===null)return null;if(h=h.shared,(Be&2)!==0){var y=h.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),h.pending=s,fn(a,c)}return y=h.interleaved,y===null?(s.next=s,dp(h)):(s.next=y.next,y.next=s),h.interleaved=s,fn(a,c)}function gl(a,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var h=s.lanes;h&=a.pendingLanes,c|=h,s.lanes=c,Ed(a,c)}}function zw(a,s){var c=a.updateQueue,h=a.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var y=null,S=null;if(c=c.firstBaseUpdate,c!==null){do{var k={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};S===null?y=S=k:S=S.next=k,c=c.next}while(c!==null);S===null?y=S=s:S=S.next=s}else y=S=s;c={baseState:h.baseState,firstBaseUpdate:y,lastBaseUpdate:S,shared:h.shared,effects:h.effects},a.updateQueue=c;return}a=c.lastBaseUpdate,a===null?c.firstBaseUpdate=s:a.next=s,c.lastBaseUpdate=s}function bl(a,s,c,h){var y=a.updateQueue;Gn=!1;var S=y.firstBaseUpdate,k=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var B=M,Q=B.next;B.next=null,k===null?S=Q:k.next=Q,k=B;var ie=a.alternate;ie!==null&&(ie=ie.updateQueue,M=ie.lastBaseUpdate,M!==k&&(M===null?ie.firstBaseUpdate=Q:M.next=Q,ie.lastBaseUpdate=B))}if(S!==null){var se=y.baseState;k=0,ie=Q=B=null,M=S;do{var re=M.lane,fe=M.eventTime;if((h&re)===re){ie!==null&&(ie=ie.next={eventTime:fe,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var he=a,ve=M;switch(re=s,fe=c,ve.tag){case 1:if(he=ve.payload,typeof he=="function"){se=he.call(fe,se,re);break e}se=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=ve.payload,re=typeof he=="function"?he.call(fe,se,re):he,re==null)break e;se=Z({},se,re);break e;case 2:Gn=!0}}M.callback!==null&&M.lane!==0&&(a.flags|=64,re=y.effects,re===null?y.effects=[M]:re.push(M))}else fe={eventTime:fe,lane:re,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ie===null?(Q=ie=fe,B=se):ie=ie.next=fe,k|=re;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;re=M,M=re.next,re.next=null,y.lastBaseUpdate=re,y.shared.pending=null}}while(!0);if(ie===null&&(B=se),y.baseState=B,y.firstBaseUpdate=Q,y.lastBaseUpdate=ie,s=y.shared.interleaved,s!==null){y=s;do k|=y.lane,y=y.next;while(y!==s)}else S===null&&(y.shared.lanes=0);Pi|=k,a.lanes=k,a.memoizedState=se}}function Uw(a,s,c){if(a=s.effects,s.effects=null,a!==null)for(s=0;sc?c:4,a(!0);var h=gp.transition;gp.transition={};try{a(!1),s()}finally{Ke=c,gp.transition=h}}function u1(){return vr().memoizedState}function qM(a,s,c){var h=Jn(a);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},l1(a))c1(s,c);else if(c=Fw(a,s,c,h),c!==null){var y=Ft();Rr(c,a,h,y),f1(c,s,h)}}function zM(a,s,c){var h=Jn(a),y={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(l1(a))c1(s,y);else{var S=a.alternate;if(a.lanes===0&&(S===null||S.lanes===0)&&(S=s.lastRenderedReducer,S!==null))try{var k=s.lastRenderedState,M=S(k,c);if(y.hasEagerState=!0,y.eagerState=M,Ar(M,k)){var B=s.interleaved;B===null?(y.next=y,dp(s)):(y.next=B.next,B.next=y),s.interleaved=y;return}}catch{}finally{}c=Fw(a,s,y,h),c!==null&&(y=Ft(),Rr(c,a,h,y),f1(c,s,h))}}function l1(a){var s=a.alternate;return a===ot||s!==null&&s===ot}function c1(a,s){os=Sl=!0;var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}function f1(a,s,c){if((c&4194240)!==0){var h=s.lanes;h&=a.pendingLanes,c|=h,s.lanes=c,Ed(a,c)}}var Pl={readContext:hr,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useInsertionEffect:$t,useLayoutEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useMutableSource:$t,useSyncExternalStore:$t,useId:$t,unstable_isNewReconciler:!1},UM={readContext:hr,useCallback:function(a,s){return Xr().memoizedState=[a,s===void 0?null:s],a},useContext:hr,useEffect:e1,useImperativeHandle:function(a,s,c){return c=c!=null?c.concat([a]):null,Ol(4194308,4,n1.bind(null,s,a),c)},useLayoutEffect:function(a,s){return Ol(4194308,4,a,s)},useInsertionEffect:function(a,s){return Ol(4,2,a,s)},useMemo:function(a,s){var c=Xr();return s=s===void 0?null:s,a=a(),c.memoizedState=[a,s],a},useReducer:function(a,s,c){var h=Xr();return s=c!==void 0?c(s):s,h.memoizedState=h.baseState=s,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:s},h.queue=a,a=a.dispatch=qM.bind(null,ot,a),[h.memoizedState,a]},useRef:function(a){var s=Xr();return a={current:a},s.memoizedState=a},useState:Zw,useDebugValue:Pp,useDeferredValue:function(a){return Xr().memoizedState=a},useTransition:function(){var a=Zw(!1),s=a[0];return a=FM.bind(null,a[1]),Xr().memoizedState=a,[s,a]},useMutableSource:function(){},useSyncExternalStore:function(a,s,c){var h=ot,y=Xr();if(nt){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),Pt===null)throw Error(r(349));(_i&30)!==0||Vw(h,s,c)}y.memoizedState=c;var S={value:c,getSnapshot:s};return y.queue=S,e1(Xw.bind(null,h,S,a),[a]),h.flags|=2048,ls(9,Gw.bind(null,h,S,c,s),void 0,null),c},useId:function(){var a=Xr(),s=Pt.identifierPrefix;if(nt){var c=cn,h=ln;c=(h&~(1<<32-Er(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=ss++,0<\/script>",a=a.removeChild(a.firstChild)):typeof h.is=="string"?a=k.createElement(c,{is:h.is}):(a=k.createElement(c),c==="select"&&(k=a,h.multiple?k.multiple=!0:h.size&&(k.size=h.size))):a=k.createElementNS(a,c),a[Vr]=s,a[es]=h,k1(a,s,!1,!1),s.stateNode=a;e:{switch(k=yd(c,h),c){case"dialog":et("cancel",a),et("close",a),y=h;break;case"iframe":case"object":case"embed":et("load",a),y=h;break;case"video":case"audio":for(y=0;yja&&(s.flags|=128,h=!0,cs(S,!1),s.lanes=4194304)}else{if(!h)if(a=xl(k),a!==null){if(s.flags|=128,h=!0,c=a.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),cs(S,!0),S.tail===null&&S.tailMode==="hidden"&&!k.alternate&&!nt)return Mt(s),null}else 2*ft()-S.renderingStartTime>ja&&c!==1073741824&&(s.flags|=128,h=!0,cs(S,!1),s.lanes=4194304);S.isBackwards?(k.sibling=s.child,s.child=k):(c=S.last,c!==null?c.sibling=k:s.child=k,S.last=k)}return S.tail!==null?(s=S.tail,S.rendering=s,S.tail=s.sibling,S.renderingStartTime=ft(),s.sibling=null,c=at.current,Xe(at,h?c&1|2:c&1),s):(Mt(s),null);case 22:case 23:return Xp(),h=s.memoizedState!==null,a!==null&&a.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(nr&1073741824)!==0&&(Mt(s),s.subtreeFlags&6&&(s.flags|=8192)):Mt(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function QM(a,s){switch(ip(s),s.tag){case 1:return Vt(s.type)&&ll(),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Sa(),tt(Kt),tt(Rt),yp(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 5:return vp(s),null;case 13:if(tt(at),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));ga()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return tt(at),null;case 4:return Sa(),null;case 10:return cp(s.type._context),null;case 22:case 23:return Xp(),null;case 24:return null;default:return null}}var Tl=!1,It=!1,ZM=typeof WeakSet=="function"?WeakSet:Set,de=null;function _a(a,s){var c=a.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){ut(a,s,h)}else c.current=null}function Dp(a,s,c){try{c()}catch(h){ut(a,s,h)}}var $1=!1;function JM(a,s){if(Xd=Xu,a=dw(),qd(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else e:{c=(c=a.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var y=h.anchorOffset,S=h.focusNode;h=h.focusOffset;try{c.nodeType,S.nodeType}catch{c=null;break e}var k=0,M=-1,B=-1,Q=0,ie=0,se=a,re=null;t:for(;;){for(var fe;se!==c||y!==0&&se.nodeType!==3||(M=k+y),se!==S||h!==0&&se.nodeType!==3||(B=k+h),se.nodeType===3&&(k+=se.nodeValue.length),(fe=se.firstChild)!==null;)re=se,se=fe;for(;;){if(se===a)break t;if(re===c&&++Q===y&&(M=k),re===S&&++ie===h&&(B=k),(fe=se.nextSibling)!==null)break;se=re,re=se.parentNode}se=fe}c=M===-1||B===-1?null:{start:M,end:B}}else c=null}c=c||{start:0,end:0}}else c=null;for(Yd={focusedElem:a,selectionRange:c},Xu=!1,de=s;de!==null;)if(s=de,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,de=a;else for(;de!==null;){s=de;try{var he=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(he!==null){var ve=he.memoizedProps,dt=he.memoizedState,G=s.stateNode,F=G.getSnapshotBeforeUpdate(s.elementType===s.type?ve:Cr(s.type,ve),dt);G.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var X=s.stateNode.containerInfo;X.nodeType===1?X.textContent="":X.nodeType===9&&X.documentElement&&X.removeChild(X.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ue){ut(s,s.return,ue)}if(a=s.sibling,a!==null){a.return=s.return,de=a;break}de=s.return}return he=$1,$1=!1,he}function fs(a,s,c){var h=s.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var y=h=h.next;do{if((y.tag&a)===a){var S=y.destroy;y.destroy=void 0,S!==void 0&&Dp(s,c,S)}y=y.next}while(y!==h)}}function Cl(a,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&a)===a){var h=c.create;c.destroy=h()}c=c.next}while(c!==s)}}function Lp(a){var s=a.ref;if(s!==null){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}typeof s=="function"?s(a):s.current=a}}function M1(a){var s=a.alternate;s!==null&&(a.alternate=null,M1(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&(delete s[Vr],delete s[es],delete s[ep],delete s[MM],delete s[IM])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function I1(a){return a.tag===5||a.tag===3||a.tag===4}function D1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||I1(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.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 Bp(a,s,c){var h=a.tag;if(h===5||h===6)a=a.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(a,s):c.insertBefore(a,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(a,c)):(s=c,s.appendChild(a)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=sl));else if(h!==4&&(a=a.child,a!==null))for(Bp(a,s,c),a=a.sibling;a!==null;)Bp(a,s,c),a=a.sibling}function Fp(a,s,c){var h=a.tag;if(h===5||h===6)a=a.stateNode,s?c.insertBefore(a,s):c.appendChild(a);else if(h!==4&&(a=a.child,a!==null))for(Fp(a,s,c),a=a.sibling;a!==null;)Fp(a,s,c),a=a.sibling}var Ct=null,kr=!1;function Yn(a,s,c){for(c=c.child;c!==null;)L1(a,s,c),c=c.sibling}function L1(a,s,c){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(Uu,c)}catch{}switch(c.tag){case 5:It||_a(c,s);case 6:var h=Ct,y=kr;Ct=null,Yn(a,s,c),Ct=h,kr=y,Ct!==null&&(kr?(a=Ct,c=c.stateNode,a.nodeType===8?a.parentNode.removeChild(c):a.removeChild(c)):Ct.removeChild(c.stateNode));break;case 18:Ct!==null&&(kr?(a=Ct,c=c.stateNode,a.nodeType===8?Jd(a.parentNode,c):a.nodeType===1&&Jd(a,c),Uo(a)):Jd(Ct,c.stateNode));break;case 4:h=Ct,y=kr,Ct=c.stateNode.containerInfo,kr=!0,Yn(a,s,c),Ct=h,kr=y;break;case 0:case 11:case 14:case 15:if(!It&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){y=h=h.next;do{var S=y,k=S.destroy;S=S.tag,k!==void 0&&((S&2)!==0||(S&4)!==0)&&Dp(c,s,k),y=y.next}while(y!==h)}Yn(a,s,c);break;case 1:if(!It&&(_a(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(M){ut(c,s,M)}Yn(a,s,c);break;case 21:Yn(a,s,c);break;case 22:c.mode&1?(It=(h=It)||c.memoizedState!==null,Yn(a,s,c),It=h):Yn(a,s,c);break;default:Yn(a,s,c)}}function B1(a){var s=a.updateQueue;if(s!==null){a.updateQueue=null;var c=a.stateNode;c===null&&(c=a.stateNode=new ZM),s.forEach(function(h){var y=uI.bind(null,a,h);c.has(h)||(c.add(h),h.then(y,y))})}}function Nr(a,s){var c=s.deletions;if(c!==null)for(var h=0;hy&&(y=k),h&=~S}if(h=y,h=ft()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*tI(h/1960))-h,10a?16:a,Zn===null)var h=!1;else{if(a=Zn,Zn=null,Ml=0,(Be&6)!==0)throw Error(r(331));var y=Be;for(Be|=4,de=a.current;de!==null;){var S=de,k=S.child;if((de.flags&16)!==0){var M=S.deletions;if(M!==null){for(var B=0;Bft()-Up?Ei(a,0):zp|=c),Yt(a,s)}function Z1(a,s){s===0&&((a.mode&1)===0?s=1:(s=Hu,Hu<<=1,(Hu&130023424)===0&&(Hu=4194304)));var c=Ft();a=fn(a,s),a!==null&&(Lo(a,s,c),Yt(a,c))}function sI(a){var s=a.memoizedState,c=0;s!==null&&(c=s.retryLane),Z1(a,c)}function uI(a,s){var c=0;switch(a.tag){case 13:var h=a.stateNode,y=a.memoizedState;y!==null&&(c=y.retryLane);break;case 19:h=a.stateNode;break;default:throw Error(r(314))}h!==null&&h.delete(s),Z1(a,c)}var J1;J1=function(a,s,c){if(a!==null)if(a.memoizedProps!==s.pendingProps||Kt.current)Gt=!0;else{if((a.lanes&c)===0&&(s.flags&128)===0)return Gt=!1,XM(a,s,c);Gt=(a.flags&131072)!==0}else Gt=!1,nt&&(s.flags&1048576)!==0&&Nw(s,pl,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;Al(a,s),a=s.pendingProps;var y=va(s,Rt.current);wa(s,c),y=xp(null,s,h,a,y,c);var S=wp();return s.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Vt(h)?(S=!0,cl(s)):S=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,pp(s),y.updater=jl,s.stateNode=y,y._reactInternals=s,Ep(s,h,a,c),s=kp(null,s,h,!0,S,c)):(s.tag=0,nt&&S&&np(s),Bt(null,s,y,c),s=s.child),s;case 16:h=s.elementType;e:{switch(Al(a,s),a=s.pendingProps,y=h._init,h=y(h._payload),s.type=h,y=s.tag=cI(h),a=Cr(h,a),y){case 0:s=Cp(null,s,h,a,c);break e;case 1:s=P1(null,s,h,a,c);break e;case 11:s=x1(null,s,h,a,c);break e;case 14:s=w1(null,s,h,Cr(h.type,a),c);break e}throw Error(r(306,h,""))}return s;case 0:return h=s.type,y=s.pendingProps,y=s.elementType===h?y:Cr(h,y),Cp(a,s,h,y,c);case 1:return h=s.type,y=s.pendingProps,y=s.elementType===h?y:Cr(h,y),P1(a,s,h,y,c);case 3:e:{if(j1(s),a===null)throw Error(r(387));h=s.pendingProps,S=s.memoizedState,y=S.element,qw(a,s),bl(s,h,null,c);var k=s.memoizedState;if(h=k.element,S.isDehydrated)if(S={element:h,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},s.updateQueue.baseState=S,s.memoizedState=S,s.flags&256){y=Oa(Error(r(423)),s),s=E1(a,s,h,c,y);break e}else if(h!==y){y=Oa(Error(r(424)),s),s=E1(a,s,h,c,y);break e}else for(rr=Wn(s.stateNode.containerInfo.firstChild),tr=s,nt=!0,Tr=null,c=Bw(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(ga(),h===y){s=pn(a,s,c);break e}Bt(a,s,h,c)}s=s.child}return s;case 5:return Ww(s),a===null&&op(s),h=s.type,y=s.pendingProps,S=a!==null?a.memoizedProps:null,k=y.children,Qd(h,y)?k=null:S!==null&&Qd(h,S)&&(s.flags|=32),_1(a,s),Bt(a,s,k,c),s.child;case 6:return a===null&&op(s),null;case 13:return A1(a,s,c);case 4:return hp(s,s.stateNode.containerInfo),h=s.pendingProps,a===null?s.child=ba(s,null,h,c):Bt(a,s,h,c),s.child;case 11:return h=s.type,y=s.pendingProps,y=s.elementType===h?y:Cr(h,y),x1(a,s,h,y,c);case 7:return Bt(a,s,s.pendingProps,c),s.child;case 8:return Bt(a,s,s.pendingProps.children,c),s.child;case 12:return Bt(a,s,s.pendingProps.children,c),s.child;case 10:e:{if(h=s.type._context,y=s.pendingProps,S=s.memoizedProps,k=y.value,Xe(ml,h._currentValue),h._currentValue=k,S!==null)if(Ar(S.value,k)){if(S.children===y.children&&!Kt.current){s=pn(a,s,c);break e}}else for(S=s.child,S!==null&&(S.return=s);S!==null;){var M=S.dependencies;if(M!==null){k=S.child;for(var B=M.firstContext;B!==null;){if(B.context===h){if(S.tag===1){B=dn(-1,c&-c),B.tag=2;var Q=S.updateQueue;if(Q!==null){Q=Q.shared;var ie=Q.pending;ie===null?B.next=B:(B.next=ie.next,ie.next=B),Q.pending=B}}S.lanes|=c,B=S.alternate,B!==null&&(B.lanes|=c),fp(S.return,c,s),M.lanes|=c;break}B=B.next}}else if(S.tag===10)k=S.type===s.type?null:S.child;else if(S.tag===18){if(k=S.return,k===null)throw Error(r(341));k.lanes|=c,M=k.alternate,M!==null&&(M.lanes|=c),fp(k,c,s),k=S.sibling}else k=S.child;if(k!==null)k.return=S;else for(k=S;k!==null;){if(k===s){k=null;break}if(S=k.sibling,S!==null){S.return=k.return,k=S;break}k=k.return}S=k}Bt(a,s,y.children,c),s=s.child}return s;case 9:return y=s.type,h=s.pendingProps.children,wa(s,c),y=hr(y),h=h(y),s.flags|=1,Bt(a,s,h,c),s.child;case 14:return h=s.type,y=Cr(h,s.pendingProps),y=Cr(h.type,y),w1(a,s,h,y,c);case 15:return S1(a,s,s.type,s.pendingProps,c);case 17:return h=s.type,y=s.pendingProps,y=s.elementType===h?y:Cr(h,y),Al(a,s),s.tag=1,Vt(h)?(a=!0,cl(s)):a=!1,wa(s,c),p1(s,h,y),Ep(s,h,y,c),kp(null,s,h,!0,a,c);case 19:return C1(a,s,c);case 22:return O1(a,s,c)}throw Error(r(156,s.tag))};function eS(a,s){return Rx(a,s)}function lI(a,s,c,h){this.tag=a,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yr(a,s,c,h){return new lI(a,s,c,h)}function Qp(a){return a=a.prototype,!(!a||!a.isReactComponent)}function cI(a){if(typeof a=="function")return Qp(a)?1:0;if(a!=null){if(a=a.$$typeof,a===$)return 11;if(a===V)return 14}return 2}function ti(a,s){var c=a.alternate;return c===null?(c=yr(a.tag,s,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=s,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=a.flags&14680064,c.childLanes=a.childLanes,c.lanes=a.lanes,c.child=a.child,c.memoizedProps=a.memoizedProps,c.memoizedState=a.memoizedState,c.updateQueue=a.updateQueue,s=a.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=a.sibling,c.index=a.index,c.ref=a.ref,c}function Bl(a,s,c,h,y,S){var k=2;if(h=a,typeof a=="function")Qp(a)&&(k=1);else if(typeof a=="string")k=5;else e:switch(a){case N:return Ti(c.children,y,S,s);case R:k=8,y|=8;break;case I:return a=yr(12,c,s,y|2),a.elementType=I,a.lanes=S,a;case U:return a=yr(13,c,s,y),a.elementType=U,a.lanes=S,a;case z:return a=yr(19,c,s,y),a.elementType=z,a.lanes=S,a;case J:return Fl(c,y,S,s);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case W:k=10;break e;case q:k=9;break e;case $:k=11;break e;case V:k=14;break e;case Y:k=16,h=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return s=yr(k,c,s,y),s.elementType=a,s.type=h,s.lanes=S,s}function Ti(a,s,c,h){return a=yr(7,a,h,s),a.lanes=c,a}function Fl(a,s,c,h){return a=yr(22,a,h,s),a.elementType=J,a.lanes=c,a.stateNode={isHidden:!1},a}function Zp(a,s,c){return a=yr(6,a,null,s),a.lanes=c,a}function Jp(a,s,c){return s=yr(4,a.children!==null?a.children:[],a.key,s),s.lanes=c,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}function fI(a,s,c,h,y){this.tag=s,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jd(0),this.expirationTimes=jd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jd(0),this.identifierPrefix=h,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function eh(a,s,c,h,y,S,k,M,B){return a=new fI(a,s,c,M,B),s===1?(s=1,S===!0&&(s|=8)):s=0,S=yr(3,null,null,s),a.current=S,S.stateNode=a,S.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},pp(S),a}function dI(a,s,c){var h=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),oh.exports=PI(),oh.exports}var hS;function jI(){if(hS)return Gl;hS=1;var e=DT();return Gl.createRoot=e.createRoot,Gl.hydrateRoot=e.hydrateRoot,Gl}var EI=jI();const AI=Ue(EI);var TI=DT();const Ma=Ue(TI);/** * @remix-run/router v1.23.2 * * 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 */function Ls(){return Ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function xf(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kI(){return Math.random().toString(36).substr(2,8)}function mS(e,t){return{usr:e.state,key:e.key,idx:t}}function xg(e,t,r,n){return r===void 0&&(r=null),Ls({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Yi(t):t,{state:r,key:t&&t.key||n||kI()})}function pc(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Yi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function NI(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,u=i.history,l=oi.Pop,f=null,d=v();d==null&&(d=0,u.replaceState(Ls({},u.state,{idx:d}),""));function v(){return(u.state||{idx:null}).idx}function p(){l=oi.Pop;let g=v(),j=g==null?null:g-d;d=g,f&&f({action:l,location:x.location,delta:j})}function m(g,j){l=oi.Push;let E=xg(x.location,g,j);r&&r(E,g),d=v()+1;let A=mS(E,d),T=x.createHref(E);try{u.pushState(A,"",T)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(T)}o&&f&&f({action:l,location:x.location,delta:1})}function b(g,j){l=oi.Replace;let E=xg(x.location,g,j);r&&r(E,g),d=v();let A=mS(E,d),T=x.createHref(E);u.replaceState(A,"",T),o&&f&&f({action:l,location:x.location,delta:0})}function O(g){let j=i.location.origin!=="null"?i.location.origin:i.location.href,E=typeof g=="string"?g:pc(g);return E=E.replace(/ $/,"%20"),ct(j,"No window.location.(origin|href) available to create URL for href: "+E),new URL(E,j)}let x={get action(){return l},get location(){return e(i,u)},listen(g){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(vS,p),f=g,()=>{i.removeEventListener(vS,p),f=null}},createHref(g){return t(i,g)},createURL:O,encodeLocation(g){let j=O(g);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:m,replace:b,go(g){return u.go(g)}};return x}var yS;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(yS||(yS={}));function RI(e,t,r){return r===void 0&&(r="/"),$I(e,t,r)}function $I(e,t,r,n){let i=typeof t=="string"?Yi(t):t,o=Ka(i.pathname||"/",r);if(o==null)return null;let u=LT(e);MI(u);let l=null;for(let f=0;l==null&&f{let f={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:u,route:o};f.relativePath.startsWith("/")&&(ct(f.relativePath.startsWith(n),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(n.length));let d=ui([n,f.relativePath]),v=r.concat(f);o.children&&o.children.length>0&&(ct(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),LT(o.children,t,v,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:zI(d,o.index),routesMeta:v})};return e.forEach((o,u)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,u);else for(let f of BT(o.path))i(o,u,f)}),t}function BT(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let u=BT(n.join("/")),l=[];return l.push(...u.map(f=>f===""?o:[o,f].join("/"))),i&&l.push(...u),l.map(f=>e.startsWith("/")&&f===""?"/":f)}function MI(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:UI(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const II=/^:[\w-]+$/,DI=3,LI=2,BI=1,FI=10,qI=-2,gS=e=>e==="*";function zI(e,t){let r=e.split("/"),n=r.length;return r.some(gS)&&(n+=qI),t&&(n+=LI),r.filter(i=>!gS(i)).reduce((i,o)=>i+(II.test(o)?DI:o===""?BI:FI),n)}function UI(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function WI(e,t,r){let{routesMeta:n}=e,i={},o="/",u=[];for(let l=0;l{let{paramName:m,isOptional:b}=v;if(m==="*"){let x=l[p]||"";u=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const O=l[p];return b&&!O?d[m]=void 0:d[m]=(O||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:u,pattern:e}}function HI(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),xf(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,l,f)=>(n.push({paramName:l,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function KI(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return xf(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ka(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const VI=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,GI=e=>VI.test(e);function XI(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Yi(e):e,o;if(r)if(GI(r))o=r;else{if(r.includes("//")){let u=r;r=r.replace(/\/\/+/g,"/"),xf(!1,"Pathnames cannot have embedded double slashes - normalizing "+(u+" -> "+r))}r.startsWith("/")?o=bS(r.substring(1),"/"):o=bS(r,t)}else o=t;return{pathname:o,search:ZI(n),hash:JI(i)}}function bS(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function lh(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function YI(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function FT(e,t){let r=YI(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function qT(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Yi(e):(i=Ls({},e),ct(!i.pathname||!i.pathname.includes("?"),lh("?","pathname","search",i)),ct(!i.pathname||!i.pathname.includes("#"),lh("#","pathname","hash",i)),ct(!i.search||!i.search.includes("#"),lh("#","search","hash",i)));let o=e===""||i.pathname==="",u=o?"/":i.pathname,l;if(u==null)l=r;else{let p=t.length-1;if(!n&&u.startsWith("..")){let m=u.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}l=p>=0?t[p]:"/"}let f=XI(i,l),d=u&&u!=="/"&&u.endsWith("/"),v=(o||u===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(d||v)&&(f.pathname+="/"),f}const ui=e=>e.join("/").replace(/\/\/+/g,"/"),QI=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ZI=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,JI=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function e2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const zT=["post","put","patch","delete"];new Set(zT);const t2=["get",...zT];new Set(t2);/** * React Router v6.30.3 * * 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 */function Bs(){return Bs=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l.current=!0}),C.useCallback(function(d,v){if(v===void 0&&(v={}),!l.current)return;if(typeof d=="number"){n.go(d);return}let p=qT(d,JSON.parse(u),o,v.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:ui([t,p.pathname])),(v.replace?n.replace:n.push)(p,v.state,v)},[t,n,u,o,e])}const i2=C.createContext(null);function a2(e){let t=C.useContext(Rn).outlet;return t&&C.createElement(i2.Provider,{value:e},t)}function KT(){let{matches:e}=C.useContext(Rn),t=e[e.length-1];return t?t.params:{}}function Of(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=C.useContext(di),{matches:i}=C.useContext(Rn),{pathname:o}=bo(),u=JSON.stringify(FT(i,n.v7_relativeSplatPath));return C.useMemo(()=>qT(e,JSON.parse(u),o,r==="path"),[e,u,o,r])}function o2(e,t){return s2(e,t)}function s2(e,t,r,n){Pu()||ct(!1);let{navigator:i}=C.useContext(di),{matches:o}=C.useContext(Rn),u=o[o.length-1],l=u?u.params:{};u&&u.pathname;let f=u?u.pathnameBase:"/";u&&u.route;let d=bo(),v;if(t){var p;let g=typeof t=="string"?Yi(t):t;f==="/"||(p=g.pathname)!=null&&p.startsWith(f)||ct(!1),v=g}else v=d;let m=v.pathname||"/",b=m;if(f!=="/"){let g=f.replace(/^\//,"").split("/");b="/"+m.replace(/^\//,"").split("/").slice(g.length).join("/")}let O=RI(e,{pathname:b}),x=d2(O&&O.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:ui([f,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?f:ui([f,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,r,n);return t&&x?C.createElement(Sf.Provider,{value:{location:Bs({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:oi.Pop}},x):x}function u2(){let e=m2(),t=e2(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),r?C.createElement("pre",{style:i},r):null,null)}const l2=C.createElement(u2,null);class c2 extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?C.createElement(Rn.Provider,{value:this.props.routeContext},C.createElement(WT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function f2(e){let{routeContext:t,match:r,children:n}=e,i=C.useContext(wf);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),C.createElement(Rn.Provider,{value:t},n)}function d2(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let u=e,l=(i=r)==null?void 0:i.errors;if(l!=null){let v=u.findIndex(p=>p.route.id&&(l==null?void 0:l[p.route.id])!==void 0);v>=0||ct(!1),u=u.slice(0,Math.min(u.length,v+1))}let f=!1,d=-1;if(r&&n&&n.v7_partialHydration)for(let v=0;v=0?u=u.slice(0,d+1):u=[u[0]];break}}}return u.reduceRight((v,p,m)=>{let b,O=!1,x=null,g=null;r&&(b=l&&p.route.id?l[p.route.id]:void 0,x=p.route.errorElement||l2,f&&(d<0&&m===0?(g2("route-fallback"),O=!0,g=null):d===m&&(O=!0,g=p.route.hydrateFallbackElement||null)));let j=t.concat(u.slice(0,m+1)),E=()=>{let A;return b?A=x:O?A=g:p.route.Component?A=C.createElement(p.route.Component,null):p.route.element?A=p.route.element:A=v,C.createElement(f2,{match:p,routeContext:{outlet:v,matches:j,isDataRoute:r!=null},children:A})};return r&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?C.createElement(c2,{location:r.location,revalidation:r.revalidation,component:x,error:b,children:E(),routeContext:{outlet:null,matches:j,isDataRoute:!0}}):E()},null)}var VT=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(VT||{}),GT=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(GT||{});function p2(e){let t=C.useContext(wf);return t||ct(!1),t}function h2(e){let t=C.useContext(UT);return t||ct(!1),t}function v2(e){let t=C.useContext(Rn);return t||ct(!1),t}function XT(e){let t=v2(),r=t.matches[t.matches.length-1];return r.route.id||ct(!1),r.route.id}function m2(){var e;let t=C.useContext(WT),r=h2(),n=XT();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function y2(){let{router:e}=p2(VT.UseNavigateStable),t=XT(GT.UseNavigateStable),r=C.useRef(!1);return HT(()=>{r.current=!0}),C.useCallback(function(i,o){o===void 0&&(o={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Bs({fromRouteId:t},o)))},[e,t])}const xS={};function g2(e,t,r){xS[e]||(xS[e]=!0)}function b2(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function x2(e){return a2(e.context)}function Ri(e){ct(!1)}function w2(e){let{basename:t="/",children:r=null,location:n,navigationType:i=oi.Pop,navigator:o,static:u=!1,future:l}=e;Pu()&&ct(!1);let f=t.replace(/^\/*/,"/"),d=C.useMemo(()=>({basename:f,navigator:o,static:u,future:Bs({v7_relativeSplatPath:!1},l)}),[f,l,o,u]);typeof n=="string"&&(n=Yi(n));let{pathname:v="/",search:p="",hash:m="",state:b=null,key:O="default"}=n,x=C.useMemo(()=>{let g=Ka(v,f);return g==null?null:{location:{pathname:g,search:p,hash:m,state:b,key:O},navigationType:i}},[f,v,p,m,b,O,i]);return x==null?null:C.createElement(di.Provider,{value:d},C.createElement(Sf.Provider,{children:r,value:x}))}function S2(e){let{children:t,location:r}=e;return o2(Sg(t),r)}new Promise(()=>{});function Sg(e,t){t===void 0&&(t=[]);let r=[];return C.Children.forEach(e,(n,i)=>{if(!C.isValidElement(n))return;let o=[...t,i];if(n.type===C.Fragment){r.push.apply(r,Sg(n.props.children,o));return}n.type!==Ri&&ct(!1),!n.props.index||!n.props.children||ct(!1);let u={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(u.children=Sg(n.props.children,o)),r.push(u)}),r}/** * React Router DOM v6.30.3 * * 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 */function hc(){return hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function O2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function _2(e,t){return e.button===0&&(!t||t==="_self")&&!O2(e)}function Og(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function P2(e,t){let r=Og(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(o=>{r.append(i,o)})}),r}const j2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],E2=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],A2="6";try{window.__reactRouterVersion=A2}catch{}const T2=C.createContext({isTransitioning:!1}),C2="startTransition",wS=SI[C2];function k2(e){let{basename:t,children:r,future:n,window:i}=e,o=C.useRef();o.current==null&&(o.current=CI({window:i,v5Compat:!0}));let u=o.current,[l,f]=C.useState({action:u.action,location:u.location}),{v7_startTransition:d}=n||{},v=C.useCallback(p=>{d&&wS?wS(()=>f(p)):f(p)},[f,d]);return C.useLayoutEffect(()=>u.listen(v),[u,v]),C.useEffect(()=>b2(n),[n]),C.createElement(w2,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:u,future:n})}const N2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",R2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fs=C.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:o,replace:u,state:l,target:f,to:d,preventScrollReset:v,viewTransition:p}=t,m=YT(t,j2),{basename:b}=C.useContext(di),O,x=!1;if(typeof d=="string"&&R2.test(d)&&(O=d,N2))try{let A=new URL(window.location.href),T=d.startsWith("//")?new URL(A.protocol+d):new URL(d),P=Ka(T.pathname,b);T.origin===A.origin&&P!=null?d=P+T.search+T.hash:x=!0}catch{}let g=r2(d,{relative:i}),j=M2(d,{replace:u,state:l,target:f,preventScrollReset:v,relative:i,viewTransition:p});function E(A){n&&n(A),A.defaultPrevented||j(A)}return C.createElement("a",hc({},m,{href:O||g,onClick:x||o?n:E,ref:r,target:f}))}),Xl=C.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:i=!1,className:o="",end:u=!1,style:l,to:f,viewTransition:d,children:v}=t,p=YT(t,E2),m=Of(f,{relative:p.relative}),b=bo(),O=C.useContext(UT),{navigator:x,basename:g}=C.useContext(di),j=O!=null&&D2(m)&&d===!0,E=x.encodeLocation?x.encodeLocation(m).pathname:m.pathname,A=b.pathname,T=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;i||(A=A.toLowerCase(),T=T?T.toLowerCase():null,E=E.toLowerCase()),T&&g&&(T=Ka(T,g)||T);const P=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let _=A===E||!u&&A.startsWith(E)&&A.charAt(P)==="/",N=T!=null&&(T===E||!u&&T.startsWith(E)&&T.charAt(E.length)==="/"),R={isActive:_,isPending:N,isTransitioning:j},I=_?n:void 0,W;typeof o=="function"?W=o(R):W=[o,_?"active":null,N?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let q=typeof l=="function"?l(R):l;return C.createElement(Fs,hc({},p,{"aria-current":I,className:W,ref:r,style:q,to:f,viewTransition:d}),typeof v=="function"?v(R):v)});var _g;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(_g||(_g={}));var SS;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(SS||(SS={}));function $2(e){let t=C.useContext(wf);return t||ct(!1),t}function M2(e,t){let{target:r,replace:n,state:i,preventScrollReset:o,relative:u,viewTransition:l}=t===void 0?{}:t,f=ju(),d=bo(),v=Of(e,{relative:u});return C.useCallback(p=>{if(_2(p,r)){p.preventDefault();let m=n!==void 0?n:pc(d)===pc(v);f(e,{replace:m,state:i,preventScrollReset:o,relative:u,viewTransition:l})}},[d,f,v,n,i,r,e,o,u,l])}function I2(e){let t=C.useRef(Og(e)),r=C.useRef(!1),n=bo(),i=C.useMemo(()=>P2(n.search,r.current?null:t.current),[n.search]),o=ju(),u=C.useCallback((l,f)=>{const d=Og(typeof l=="function"?l(i):l);r.current=!0,o("?"+d,f)},[o,i]);return[i,u]}function D2(e,t){t===void 0&&(t={});let r=C.useContext(T2);r==null&&ct(!1);let{basename:n}=$2(_g.useViewTransitionState),i=Of(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=Ka(r.currentLocation.pathname,n)||r.currentLocation.pathname,u=Ka(r.nextLocation.pathname,n)||r.nextLocation.pathname;return wg(i.pathname,u)!=null||wg(i.pathname,o)!=null}const L2={"nav.dashboard":{fr:"Dashboard",en:"Dashboard"},"nav.sessions":{fr:"Sessions",en:"Sessions"},"nav.users":{fr:"Utilisateurs",en:"Users"},"dashboard.title":{fr:"Dashboard",en:"Dashboard"},"dashboard.totalSessions":{fr:"Sessions",en:"Sessions"},"dashboard.totalUsers":{fr:"Utilisateurs",en:"Users"},"dashboard.successRate":{fr:"Taux de réussite",en:"Success Rate"},"dashboard.avgPrecision":{fr:"Précision moy.",en:"Avg. Precision"},"dashboard.sessionsByType":{fr:"Sessions par type",en:"Sessions by Type"},"dashboard.monthlyActivity":{fr:"Activité mensuelle",en:"Monthly Activity"},"dashboard.recentSessions":{fr:"Sessions récentes",en:"Recent Sessions"},"dashboard.topPrecision":{fr:"Top Précision",en:"Top Precision"},"sessions.title":{fr:"Sessions",en:"Sessions"},"sessions.sessionType":{fr:"Type de session",en:"Session Type"},"sessions.allTypes":{fr:"Tous les types",en:"All Types"},"sessions.result":{fr:"Résultat",en:"Result"},"sessions.all":{fr:"Tous",en:"All"},"sessions.success":{fr:"Réussi",en:"Success"},"sessions.failed":{fr:"Échoué",en:"Failed"},"sessions.search":{fr:"Scénario, map, nom...",en:"Scenario, map, name..."},"sessions.noSession":{fr:"Aucune session trouvée",en:"No session found"},"session.backToSessions":{fr:"Retour aux sessions",en:"Back to Sessions"},"session.notFound":{fr:"Session non trouvée",en:"Session not found"},"session.score":{fr:"Score",en:"Score"},"session.duration":{fr:"Durée",en:"Duration"},"session.enemiesHit":{fr:"Ennemis touchés",en:"Enemies Hit"},"session.civiliansHit":{fr:"Civils touchés",en:"Civilians Hit"},"session.damageTaken":{fr:"Dégâts reçus",en:"Damage Taken"},"session.participants":{fr:"Participants",en:"Participants"},"session.objectives":{fr:"Objectifs",en:"Objectives"},"session.hitDistribution":{fr:"Répartition des impacts",en:"Hit Distribution"},"session.shotDetails":{fr:"Détail des tirs",en:"Shot Details"},"table.date":{fr:"Date",en:"Date"},"table.type":{fr:"Type",en:"Type"},"table.scenario":{fr:"Scénario",en:"Scenario"},"table.map":{fr:"Map",en:"Map"},"table.score":{fr:"Score",en:"Score"},"table.enemies":{fr:"Ennemis",en:"Enemies"},"table.civilians":{fr:"Civils",en:"Civilians"},"table.duration":{fr:"Durée",en:"Duration"},"table.result":{fr:"Résultat",en:"Result"},"table.user":{fr:"Utilisateur",en:"User"},"table.shotsFired":{fr:"Tirs effectués",en:"Shots Fired"},"table.shotsMissed":{fr:"Tirs manqués",en:"Shots Missed"},"table.enemiesHit":{fr:"Ennemis touchés",en:"Enemies Hit"},"table.civiliansHit":{fr:"Civils touchés",en:"Civilians Hit"},"table.avgPrecision":{fr:"Précision moy.",en:"Avg. Precision"},"table.reactionTime":{fr:"Temps réaction",en:"Reaction Time"},"table.hitsReceivedIA":{fr:"Tirs reçus (IA)",en:"Hits from IA"},"table.enemiesKilled":{fr:"Ennemis tués",en:"Enemies Killed"},"table.civiliansKilled":{fr:"Civils tués",en:"Civilians Killed"},"table.username":{fr:"Username",en:"Username"},"table.name":{fr:"Nom",en:"Name"},"table.avgReaction":{fr:"Réaction moy.",en:"Avg. Reaction"},"table.lastConnection":{fr:"Dernière connexion",en:"Last Connection"},"shot.index":{fr:"#",en:"#"},"shot.shooter":{fr:"Tireur",en:"Shooter"},"shot.impactType":{fr:"Type impact",en:"Impact Type"},"shot.target":{fr:"Cible",en:"Target"},"shot.boneZone":{fr:"Os/Zone",en:"Bone/Zone"},"shot.precision":{fr:"Précision",en:"Precision"},"shot.distance":{fr:"Distance",en:"Distance"},"shot.reaction":{fr:"Réaction",en:"Reaction"},"shot.killed":{fr:"Tué",en:"Killed"},"shot.time":{fr:"Temps",en:"Time"},"users.title":{fr:"Utilisateurs",en:"Users"},"users.search":{fr:"Rechercher par nom, prénom ou username...",en:"Search by name or username..."},"users.noUser":{fr:"Aucun utilisateur trouvé",en:"No user found"},"user.backToUsers":{fr:"Retour aux utilisateurs",en:"Back to Users"},"user.notFound":{fr:"Utilisateur non trouvé",en:"User not found"},"user.male":{fr:"Homme",en:"Male"},"user.female":{fr:"Femme",en:"Female"},"user.leftHanded":{fr:"Gaucher",en:"Left-handed"},"user.rightHanded":{fr:"Droitier",en:"Right-handed"},"user.height":{fr:"Taille",en:"Height"},"user.avatar":{fr:"Avatar",en:"Avatar"},"user.weapon":{fr:"Arme",en:"Weapon"},"user.sessions":{fr:"Sessions",en:"Sessions"},"user.totalTime":{fr:"Temps total",en:"Total Time"},"user.avgPrecision":{fr:"Précision moy.",en:"Avg. Precision"},"user.avgReaction":{fr:"Réaction moy.",en:"Avg. Reaction"},"user.shotsFired":{fr:"Tirs effectués",en:"Shots Fired"},"user.enemiesKilled":{fr:"Ennemis tués",en:"Enemies Killed"},"user.detailedStats":{fr:"Statistiques globales détaillées",en:"Detailed Global Statistics"},"user.shots":{fr:"Tirs",en:"Shots"},"user.hitsReceived":{fr:"Tirs reçus",en:"Hits Received"},"user.eliminations":{fr:"Éliminations",en:"Eliminations"},"user.precisionEvolution":{fr:"Évolution Précision / Temps de réaction",en:"Precision / Reaction Time Evolution"},"user.sessionTypeDistrib":{fr:"Répartition par type de session",en:"Distribution by Session Type"},"user.sessionHistory":{fr:"Historique des sessions",en:"Session History"},"user.noSession":{fr:"Aucune session",en:"No sessions"},"stats.shotsFired":{fr:"Tirs effectués",en:"Shots fired"},"stats.shotsMissed":{fr:"Tirs manqués",en:"Shots missed"},"stats.enemiesHit":{fr:"Ennemis touchés",en:"Enemies hit"},"stats.civiliansHit":{fr:"Civils touchés",en:"Civilians hit"},"stats.policeHit":{fr:"Police touchée",en:"Police hit"},"stats.fromEnemyIA":{fr:"Depuis IA ennemie",en:"From enemy AI"},"stats.fromEnemyUsers":{fr:"Depuis joueurs ennemis",en:"From enemy players"},"stats.fromPolice":{fr:"Depuis police (tir ami)",en:"From police (friendly fire)"},"stats.enemiesKilled":{fr:"Ennemis tués",en:"Enemies killed"},"stats.civiliansKilled":{fr:"Civils tués",en:"Civilians killed"},"stats.policeKilled":{fr:"Police tuée",en:"Police killed"},"obj.civilian":{fr:"Protection civils",en:"Civilian Protection"},"obj.time":{fr:"Temps",en:"Time"},"obj.enemy":{fr:"Ennemis",en:"Enemies"},"obj.health":{fr:"Santé",en:"Health"},"obj.precision":{fr:"Précision",en:"Precision"},"obj.reactTime":{fr:"Temps de réaction",en:"Reaction Time"},"obj.ammoLimit":{fr:"Munitions",en:"Ammo"},"obj.target":{fr:"Cibles",en:"Targets"},"obj.overall":{fr:"Global",en:"Overall"},"sessionType.0":{fr:"Stand de Tir",en:"Fire Range"},"sessionType.1":{fr:"Challenge",en:"Challenge"},"sessionType.2":{fr:"Protection",en:"Protect"},"sessionType.3":{fr:"Désescalade",en:"De-Escalation"},"sessionType.4":{fr:"Terrorisme",en:"Terrorism"},"sessionType.5":{fr:"Incendie",en:"Fire Extinction"},"sessionType.6":{fr:"Récupération",en:"Recovering"},"sessionType.7":{fr:"Tir Longue Distance",en:"Long Range"},"hitType.enemy":{fr:"Ennemi",en:"Enemy"},"hitType.civilian":{fr:"Civil",en:"Civilian"},"hitType.police":{fr:"Police",en:"Police"},"hitType.object":{fr:"Objet",en:"Object"},"hitType.paperTarget":{fr:"Cible Papier",en:"Paper Target"},"hitType.target":{fr:"Cible",en:"Target"},"hitType.deadBody":{fr:"Corps",en:"Dead Body"},"badge.success":{fr:"Réussi",en:"Success"},"badge.failed":{fr:"Échoué",en:"Failed"},"badge.killed":{fr:"Tué",en:"Killed"},"firerange.personalStats":{fr:"Statistiques personnelles",en:"Personal Statistics"},"firerange.shotsFired":{fr:"Tirs effectués",en:"Shots Fired"},"firerange.shotsMissed":{fr:"Tirs manqués",en:"Missed Shots"},"firerange.avgPrecision":{fr:"Précision moyenne",en:"Average Precision"},"firerange.precisionChart":{fr:"Précision des tirs durant la session",en:"Shots Precision During Session"},"firerange.targetView":{fr:"Impacts sur la cible",en:"Target Hits"},"firerange.targetsHit":{fr:"Cibles touchées",en:"Targets Hit"},"firerange.avgReaction":{fr:"Réaction moyenne",en:"Avg. Reaction Time"},"firerange.reactionChart":{fr:"Temps de réaction durant la session",en:"Reaction Time During Session"},"chart.sessions":{fr:"Sessions",en:"Sessions"},"chart.precision":{fr:"Précision",en:"Precision"},"chart.reactionTime":{fr:"Temps réaction (ms)",en:"Reaction Time (ms)"},"print.btn":{fr:"Imprimer",en:"Print"},"print.generatedOn":{fr:"Généré le",en:"Generated on"},loading:{fr:"Chargement...",en:"Loading..."},noData:{fr:"Aucune donnée",en:"No data"}},QT=C.createContext(null);function B2({children:e}){const[t,r]=C.useState(()=>{const o=localStorage.getItem("proserve-lang");return o==="en"||o==="fr"?o:"fr"}),n=C.useCallback(o=>{r(o),localStorage.setItem("proserve-lang",o)},[]),i=C.useCallback(o=>{var u;return((u=L2[o])==null?void 0:u[t])||o},[t]);return w.jsx(QT.Provider,{value:{lang:t,setLang:n,t:i},children:e})}function zr(){const e=C.useContext(QT);if(!e)throw new Error("useI18n must be used within I18nProvider");return e}var ch={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */var OS;function F2(){return OS||(OS=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",u=0;ue!=null?String(e):t||null;function Pg(){return Pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?v-1:0),m=1;m{e=Re(e,"navbar-brand");const o=r||(n.href?"a":"span");return w.jsx(o,{...n,ref:i,className:Oe(t,e)})});rC.displayName="NavbarBrand";function eb(e){return e&&e.ownerDocument||document}function G2(e){var t=eb(e);return t&&t.defaultView||window}function X2(e,t){return G2(e).getComputedStyle(e,t)}var Y2=/([A-Z])/g;function Q2(e){return e.replace(Y2,"-$1").toLowerCase()}var Z2=/^ms-/;function Yl(e){return Q2(e).replace(Z2,"-ms-")}var J2=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function eD(e){return!!(e&&J2.test(e))}function On(e,t){var r="",n="";if(typeof t=="string")return e.style.getPropertyValue(Yl(t))||X2(e).getPropertyValue(Yl(t));Object.keys(t).forEach(function(i){var o=t[i];!o&&o!==0?e.style.removeProperty(Yl(i)):eD(i)?n+=i+"("+o+") ":r+=Yl(i)+": "+o+";"}),n&&(r+="transform: "+n+";"),e.style.cssText+=";"+r}var fh={exports:{}},dh,PS;function tD(){if(PS)return dh;PS=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return dh=e,dh}var ph,jS;function rD(){if(jS)return ph;jS=1;var e=tD();function t(){}function r(){}return r.resetWarningCache=t,ph=function(){function n(u,l,f,d,v,p){if(p!==e){var m=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 m.name="Invariant Violation",m}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},ph}var ES;function nD(){return ES||(ES=1,fh.exports=rD()()),fh.exports}var iD=nD();const Ie=Ue(iD),AS={disabled:!1},nC=D.createContext(null);var aD=function(t){return t.scrollTop},Es="unmounted",ni="exited",Lr="entering",gn="entered",qs="exiting",$n=(function(e){H2(t,e);function t(n,i){var o;o=e.call(this,n,i)||this;var u=i,l=u&&!u.isMounting?n.enter:n.appear,f;return o.appearStatus=null,n.in?l?(f=ni,o.appearStatus=Lr):f=gn:n.unmountOnExit||n.mountOnEnter?f=Es:f=ni,o.state={status:f},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var u=i.in;return u&&o.status===Es?{status:ni}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var o=null;if(i!==this.props){var u=this.state.status;this.props.in?u!==Lr&&u!==gn&&(o=Lr):(u===Lr||u===gn)&&(o=qs)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,o,u,l;return o=u=l=i,i!=null&&typeof i!="number"&&(o=i.exit,u=i.enter,l=i.appear!==void 0?i.appear:u),{exit:o,enter:u,appear:l}},r.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Lr){if(this.props.unmountOnExit||this.props.mountOnEnter){var u=this.props.nodeRef?this.props.nodeRef.current:Ma.findDOMNode(this);u&&aD(u)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ni&&this.setState({status:Es})},r.performEnter=function(i){var o=this,u=this.props.enter,l=this.context?this.context.isMounting:i,f=this.props.nodeRef?[l]:[Ma.findDOMNode(this),l],d=f[0],v=f[1],p=this.getTimeouts(),m=l?p.appear:p.enter;if(!i&&!u||AS.disabled){this.safeSetState({status:gn},function(){o.props.onEntered(d)});return}this.props.onEnter(d,v),this.safeSetState({status:Lr},function(){o.props.onEntering(d,v),o.onTransitionEnd(m,function(){o.safeSetState({status:gn},function(){o.props.onEntered(d,v)})})})},r.performExit=function(){var i=this,o=this.props.exit,u=this.getTimeouts(),l=this.props.nodeRef?void 0:Ma.findDOMNode(this);if(!o||AS.disabled){this.safeSetState({status:ni},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:qs},function(){i.props.onExiting(l),i.onTransitionEnd(u.exit,function(){i.safeSetState({status:ni},function(){i.props.onExited(l)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},r.setNextCallback=function(i){var o=this,u=!0;return this.nextCallback=function(l){u&&(u=!1,o.nextCallback=null,i(l))},this.nextCallback.cancel=function(){u=!1},this.nextCallback},r.onTransitionEnd=function(i,o){this.setNextCallback(o);var u=this.props.nodeRef?this.props.nodeRef.current:Ma.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!u||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var f=this.props.nodeRef?[this.nextCallback]:[u,this.nextCallback],d=f[0],v=f[1];this.props.addEndListener(d,v)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===Es)return null;var o=this.props,u=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=ZT(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return D.createElement(nC.Provider,{value:null},typeof u=="function"?u(i,l):D.cloneElement(D.Children.only(u),l))},t})(D.Component);$n.contextType=nC;$n.propTypes={};function Aa(){}$n.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Aa,onEntering:Aa,onEntered:Aa,onExit:Aa,onExiting:Aa,onExited:Aa};$n.UNMOUNTED=Es;$n.EXITED=ni;$n.ENTERING=Lr;$n.ENTERED=gn;$n.EXITING=qs;function oD(e){return e.code==="Escape"||e.keyCode===27}function sD(){const e=C.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}function xo(e){if(!e||typeof e=="function")return null;const{major:t}=sD();return t>=19?e.props.ref:e.ref}const Pf=!!(typeof window<"u"&&window.document&&window.document.createElement);var Eg=!1,Ag=!1;try{var hh={get passive(){return Eg=!0},get once(){return Ag=Eg=!0}};Pf&&(window.addEventListener("test",hh,hh),window.removeEventListener("test",hh,!0))}catch{}function uD(e,t,r,n){if(n&&typeof n!="boolean"&&!Ag){var i=n.once,o=n.capture,u=r;!Ag&&i&&(u=r.__once||function l(f){this.removeEventListener(t,l,o),r.call(this,f)},r.__once=u),e.addEventListener(t,u,Eg?n:o)}e.addEventListener(t,r,n)}function lD(e,t,r,n){var i=n&&typeof n!="boolean"?n.capture:n;e.removeEventListener(t,r,i),r.__once&&e.removeEventListener(t,r.__once,i)}function mc(e,t,r,n){return uD(e,t,r,n),function(){lD(e,t,r,n)}}function cD(e,t,r,n){if(n===void 0&&(n=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,r,n),e.dispatchEvent(i)}}function fD(e){var t=On(e,"transitionDuration")||"",r=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*r}function dD(e,t,r){r===void 0&&(r=5);var n=!1,i=setTimeout(function(){n||cD(e,"transitionend",!0)},t+r),o=mc(e,"transitionend",function(){n=!0},{once:!0});return function(){clearTimeout(i),o()}}function pD(e,t,r,n){r==null&&(r=fD(e)||0);var i=dD(e,r,n),o=mc(e,"transitionend",t);return function(){i(),o()}}function TS(e,t){const r=On(e,t)||"",n=r.indexOf("ms")===-1?1e3:1;return parseFloat(r)*n}function tb(e,t){const r=TS(e,"transitionDuration"),n=TS(e,"transitionDelay"),i=pD(e,o=>{o.target===e&&(i(),t(o))},r+n)}function ys(...e){return e.filter(t=>t!=null).reduce((t,r)=>{if(typeof r!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return t===null?r:function(...i){t.apply(this,i),r.apply(this,i)}},null)}function iC(e){e.offsetHeight}const CS=e=>!e||typeof e=="function"?e:t=>{e.current=t};function hD(e,t){const r=CS(e),n=CS(t);return i=>{r&&r(i),n&&n(i)}}function vD(e,t){return C.useMemo(()=>hD(e,t),[e,t])}function mD(e){return e&&"setState"in e?Ma.findDOMNode(e):e??null}const jf=D.forwardRef(({onEnter:e,onEntering:t,onEntered:r,onExit:n,onExiting:i,onExited:o,addEndListener:u,children:l,childRef:f,...d},v)=>{const p=C.useRef(null),m=vD(p,f),b=_=>{m(mD(_))},O=_=>N=>{_&&p.current&&_(p.current,N)},x=C.useCallback(O(e),[e]),g=C.useCallback(O(t),[t]),j=C.useCallback(O(r),[r]),E=C.useCallback(O(n),[n]),A=C.useCallback(O(i),[i]),T=C.useCallback(O(o),[o]),P=C.useCallback(O(u),[u]);return w.jsx($n,{ref:v,...d,onEnter:x,onEntered:j,onEntering:g,onExit:E,onExited:T,onExiting:A,addEndListener:P,nodeRef:p,children:typeof l=="function"?(_,N)=>l(_,{...N,ref:b}):D.cloneElement(l,{ref:b})})});jf.displayName="TransitionWrapper";const yD={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function gD(e,t){const r=`offset${e[0].toUpperCase()}${e.slice(1)}`,n=t[r],i=yD[e];return n+parseInt(On(t,i[0]),10)+parseInt(On(t,i[1]),10)}const bD={[ni]:"collapse",[qs]:"collapsing",[Lr]:"collapsing",[gn]:"collapse show"},aC=D.forwardRef(({onEnter:e,onEntering:t,onEntered:r,onExit:n,onExiting:i,className:o,children:u,dimension:l="height",in:f=!1,timeout:d=300,mountOnEnter:v=!1,unmountOnExit:p=!1,appear:m=!1,getDimensionValue:b=gD,...O},x)=>{const g=typeof l=="function"?l():l,j=C.useMemo(()=>ys(_=>{_.style[g]="0"},e),[g,e]),E=C.useMemo(()=>ys(_=>{const N=`scroll${g[0].toUpperCase()}${g.slice(1)}`;_.style[g]=`${_[N]}px`},t),[g,t]),A=C.useMemo(()=>ys(_=>{_.style[g]=null},r),[g,r]),T=C.useMemo(()=>ys(_=>{_.style[g]=`${b(g,_)}px`,iC(_)},n),[n,b,g]),P=C.useMemo(()=>ys(_=>{_.style[g]=null},i),[g,i]);return w.jsx(jf,{ref:x,addEndListener:tb,...O,"aria-expanded":O.role?f:null,onEnter:j,onEntering:E,onEntered:A,onExit:T,onExiting:P,childRef:xo(u),in:f,timeout:d,mountOnEnter:v,unmountOnExit:p,appear:m,children:(_,N)=>D.cloneElement(u,{...N,className:Oe(o,u.props.className,bD[_],g==="width"&&"collapse-horizontal")})})});aC.displayName="Collapse";const wo=C.createContext(null);wo.displayName="NavbarContext";const oC=C.forwardRef(({children:e,bsPrefix:t,...r},n)=>{t=Re(t,"navbar-collapse");const i=C.useContext(wo);return w.jsx(aC,{in:!!(i&&i.expanded),...r,children:w.jsx("div",{ref:n,className:t,children:e})})});oC.displayName="NavbarCollapse";function xD(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e},[e]),t}function Ef(e){const t=xD(e);return C.useCallback(function(...r){return t.current&&t.current(...r)},[t])}const sC=C.forwardRef(({bsPrefix:e,className:t,children:r,label:n="Toggle navigation",as:i="button",onClick:o,...u},l)=>{e=Re(e,"navbar-toggler");const{onToggle:f,expanded:d}=C.useContext(wo)||{},v=Ef(p=>{o&&o(p),f&&f()});return i==="button"&&(u.type="button"),w.jsx(i,{...u,ref:l,onClick:v,"aria-label":n,className:Oe(t,e,!d&&"collapsed"),children:r||w.jsx("span",{className:`${e}-icon`})})});sC.displayName="NavbarToggle";const wD=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",SD=typeof document<"u",OD=SD||wD?C.useLayoutEffect:C.useEffect,Tg=new WeakMap,kS=(e,t)=>{if(!e||!t)return;const r=Tg.get(t)||new Map;Tg.set(t,r);let n=r.get(e);return n||(n=t.matchMedia(e),n.refCount=0,r.set(n.media,n)),n};function _D(e,t=typeof window>"u"?void 0:window){const r=kS(e,t),[n,i]=C.useState(()=>r?r.matches:!1);return OD(()=>{let o=kS(e,t);if(!o)return i(!1);let u=Tg.get(t);const l=()=>{i(o.matches)};return o.refCount++,o.addListener(l),l(),()=>{o.removeListener(l),o.refCount--,o.refCount<=0&&(u==null||u.delete(o.media)),o=void 0}},[e]),n}function PD(e){const t=Object.keys(e);function r(l,f){return l===f?f:l?`${l} and ${f}`:f}function n(l){return t[Math.min(t.indexOf(l)+1,t.length-1)]}function i(l){const f=n(l);let d=e[f];return typeof d=="number"?d=`${d-.2}px`:d=`calc(${d} - 0.2px)`,`(max-width: ${d})`}function o(l){let f=e[l];return typeof f=="number"&&(f=`${f}px`),`(min-width: ${f})`}function u(l,f,d){let v;typeof l=="object"?(v=l,d=f,f=!0):(f=f||!0,v={[l]:f});let p=C.useMemo(()=>Object.entries(v).reduce((m,[b,O])=>((O==="up"||O===!0)&&(m=r(m,o(b))),(O==="down"||O===!0)&&(m=r(m,i(b))),m),""),[JSON.stringify(v)]);return _D(p,d)}return u}const jD=PD({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400});function vh(e){e===void 0&&(e=eb());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function NS(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function ED(){const e=C.useRef(!0),t=C.useRef(()=>e.current);return C.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function AD(e){const t=C.useRef(e);return t.current=e,t}function TD(e){const t=AD(e);C.useEffect(()=>()=>t.current(),[])}function CD(e){const t=C.useRef(null);return C.useEffect(()=>{t.current=e}),t.current}function kD(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e},[e]),t}function bn(e){const t=kD(e);return C.useCallback(function(...r){return t.current&&t.current(...r)},[t])}const ND="data-rr-ui-",RD="rrUi";function Af(e){return`${ND}${e}`}function $D(e){return`${RD}${e}`}function MD(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const RS=Af("modal-open");class rb{constructor({ownerDocument:t,handleContainerOverflow:r=!0,isRTL:n=!1}={}){this.handleContainerOverflow=r,this.isRTL=n,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return MD(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const r={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();t.style={overflow:i.style.overflow,[n]:i.style[n]},t.scrollBarWidth&&(r[n]=`${parseInt(On(i,n)||"0",10)+t.scrollBarWidth}px`),i.setAttribute(RS,""),On(i,r)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const r=this.getElement();r.removeAttribute(RS),Object.assign(r.style,t.style)}add(t){let r=this.modals.indexOf(t);return r!==-1||(r=this.modals.length,this.modals.push(t),this.setModalAttributes(t),r!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),r}remove(t){const r=this.modals.indexOf(t);r!==-1&&(this.modals.splice(r,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const uC=C.createContext(Pf?window:void 0);uC.Provider;function nb(){return C.useContext(uC)}const mh=(e,t)=>Pf?e==null?(t||eb()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function ID(e,t){const r=nb(),[n,i]=C.useState(()=>mh(e,r==null?void 0:r.document));if(!n){const o=mh(e);o&&i(o)}return C.useEffect(()=>{},[t,n]),C.useEffect(()=>{const o=mh(e);o!==n&&i(o)},[e,n]),n}const $S=e=>!e||typeof e=="function"?e:t=>{e.current=t};function DD(e,t){const r=$S(e),n=$S(t);return i=>{r&&r(i),n&&n(i)}}function Tf(e,t){return C.useMemo(()=>DD(e,t),[e,t])}const LD=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",BD=typeof document<"u",MS=BD||LD?C.useLayoutEffect:C.useEffect;function FD({children:e,in:t,onExited:r,mountOnEnter:n,unmountOnExit:i}){const o=C.useRef(null),u=C.useRef(t),l=bn(r);C.useEffect(()=>{t?u.current=!0:l(o.current)},[t,l]);const f=Tf(o,xo(e)),d=C.cloneElement(e,{ref:f});return t?d:i||!u.current&&n?null:d}const qD=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function zD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function UD(e){let{onEnter:t,onEntering:r,onEntered:n,onExit:i,onExiting:o,onExited:u,addEndListener:l,children:f}=e,d=zD(e,qD);const v=C.useRef(null),p=Tf(v,xo(f)),m=T=>P=>{T&&v.current&&T(v.current,P)},b=C.useCallback(m(t),[t]),O=C.useCallback(m(r),[r]),x=C.useCallback(m(n),[n]),g=C.useCallback(m(i),[i]),j=C.useCallback(m(o),[o]),E=C.useCallback(m(u),[u]),A=C.useCallback(m(l),[l]);return Object.assign({},d,{nodeRef:v},t&&{onEnter:b},r&&{onEntering:O},n&&{onEntered:x},i&&{onExit:g},o&&{onExiting:j},u&&{onExited:E},l&&{addEndListener:A},{children:typeof f=="function"?(T,P)=>f(T,Object.assign({},P,{ref:p})):C.cloneElement(f,{ref:p})})}const WD=["component"];function HD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}const KD=C.forwardRef((e,t)=>{let{component:r}=e,n=HD(e,WD);const i=UD(n);return w.jsx(r,Object.assign({ref:t},i))});function VD({in:e,onTransition:t}){const r=C.useRef(null),n=C.useRef(!0),i=bn(t);return MS(()=>{if(!r.current)return;let o=!1;return i({in:e,element:r.current,initial:n.current,isStale:()=>o}),()=>{o=!0}},[e,i]),MS(()=>(n.current=!1,()=>{n.current=!0}),[]),r}function GD({children:e,in:t,onExited:r,onEntered:n,transition:i}){const[o,u]=C.useState(!t);t&&o&&u(!1);const l=VD({in:!!t,onTransition:d=>{const v=()=>{d.isStale()||(d.in?n==null||n(d.element,d.initial):(u(!0),r==null||r(d.element)))};Promise.resolve(i(d)).then(v,p=>{throw d.in||u(!0),p})}}),f=Tf(l,xo(e));return o&&!t?null:C.cloneElement(e,{ref:f})}function IS(e,t,r){return e?w.jsx(KD,Object.assign({},r,{component:e})):t?w.jsx(GD,Object.assign({},r,{transition:t})):w.jsx(FD,Object.assign({},r))}const XD=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function YD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}let yh;function QD(e){return yh||(yh=new rb({ownerDocument:e==null?void 0:e.document})),yh}function ZD(e){const t=nb(),r=e||QD(t),n=C.useRef({dialog:null,backdrop:null});return Object.assign(n.current,{add:()=>r.add(n.current),remove:()=>r.remove(n.current),isTopModal:()=>r.isTopModal(n.current),setDialogRef:C.useCallback(i=>{n.current.dialog=i},[]),setBackdropRef:C.useCallback(i=>{n.current.backdrop=i},[])})}const lC=C.forwardRef((e,t)=>{let{show:r=!1,role:n="dialog",className:i,style:o,children:u,backdrop:l=!0,keyboard:f=!0,onBackdropClick:d,onEscapeKeyDown:v,transition:p,runTransition:m,backdropTransition:b,runBackdropTransition:O,autoFocus:x=!0,enforceFocus:g=!0,restoreFocus:j=!0,restoreFocusOptions:E,renderDialog:A,renderBackdrop:T=Ce=>w.jsx("div",Object.assign({},Ce)),manager:P,container:_,onShow:N,onHide:R=()=>{},onExit:I,onExited:W,onExiting:q,onEnter:$,onEntering:U,onEntered:z}=e,V=YD(e,XD);const Y=nb(),J=ID(_),K=ZD(P),ee=ED(),Z=CD(r),[L,H]=C.useState(!r),oe=C.useRef(null);C.useImperativeHandle(t,()=>K,[K]),Pf&&!Z&&r&&(oe.current=vh(Y==null?void 0:Y.document)),r&&L&&H(!1);const ce=bn(()=>{if(K.add(),ge.current=mc(document,"keydown",Ae),ae.current=mc(document,"focus",()=>setTimeout(Pe),!0),N&&N(),x){var Ce,Je;const st=vh((Ce=(Je=K.dialog)==null?void 0:Je.ownerDocument)!=null?Ce:Y==null?void 0:Y.document);K.dialog&&st&&!NS(K.dialog,st)&&(oe.current=st,K.dialog.focus())}}),me=bn(()=>{if(K.remove(),ge.current==null||ge.current(),ae.current==null||ae.current(),j){var Ce;(Ce=oe.current)==null||Ce.focus==null||Ce.focus(E),oe.current=null}});C.useEffect(()=>{!r||!J||ce()},[r,J,ce]),C.useEffect(()=>{L&&me()},[L,me]),TD(()=>{me()});const Pe=bn(()=>{if(!g||!ee()||!K.isTopModal())return;const Ce=vh(Y==null?void 0:Y.document);K.dialog&&Ce&&!NS(K.dialog,Ce)&&K.dialog.focus()}),Le=bn(Ce=>{Ce.target===Ce.currentTarget&&(d==null||d(Ce),l===!0&&R())}),Ae=bn(Ce=>{f&&oD(Ce)&&K.isTopModal()&&(v==null||v(Ce),Ce.defaultPrevented||R())}),ae=C.useRef(),ge=C.useRef(),Te=(...Ce)=>{H(!0),W==null||W(...Ce)};if(!J)return null;const ne=Object.assign({role:n,ref:K.setDialogRef,"aria-modal":n==="dialog"?!0:void 0},V,{style:o,className:i,tabIndex:-1});let We=A?A(ne):w.jsx("div",Object.assign({},ne,{children:C.cloneElement(u,{role:"document"})}));We=IS(p,m,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!r,onExit:I,onExiting:q,onExited:Te,onEnter:$,onEntering:U,onEntered:z,children:We});let Ne=null;return l&&(Ne=T({ref:K.setBackdropRef,onClick:Le}),Ne=IS(b,O,{in:!!r,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Ne})),w.jsx(w.Fragment,{children:Ma.createPortal(w.jsxs(w.Fragment,{children:[Ne,We]}),J)})});lC.displayName="Modal";const JD=Object.assign(lC,{Manager:rb}),eL={[Lr]:"show",[gn]:"show"},cC=C.forwardRef(({className:e,children:t,transitionClasses:r={},onEnter:n,...i},o)=>{const u={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},l=C.useCallback((f,d)=>{iC(f),n==null||n(f,d)},[n]);return w.jsx(jf,{ref:o,addEndListener:tb,...u,onEnter:l,childRef:xo(t),children:(f,d)=>C.cloneElement(t,{...d,className:Oe("fade",e,t.props.className,eL[f],r[f])})})});cC.displayName="Fade";const fC=C.forwardRef(({className:e,bsPrefix:t,as:r="div",...n},i)=>(t=Re(t,"offcanvas-body"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));fC.displayName="OffcanvasBody";const tL={[Lr]:"show",[gn]:"show"},dC=C.forwardRef(({bsPrefix:e,className:t,children:r,in:n=!1,mountOnEnter:i=!1,unmountOnExit:o=!1,appear:u=!1,...l},f)=>(e=Re(e,"offcanvas"),w.jsx(jf,{ref:f,addEndListener:tb,in:n,mountOnEnter:i,unmountOnExit:o,appear:u,...l,childRef:xo(r),children:(d,v)=>C.cloneElement(r,{...v,className:Oe(t,r.props.className,(d===Lr||d===qs)&&`${e}-toggling`,tL[d])})})));dC.displayName="OffcanvasToggling";const pC=C.createContext({onHide(){}}),rL={"aria-label":Ie.string,onClick:Ie.func,variant:Ie.oneOf(["white"])},ib=C.forwardRef(({className:e,variant:t,"aria-label":r="Close",...n},i)=>w.jsx("button",{ref:i,type:"button",className:Oe("btn-close",t&&`btn-close-${t}`,e),"aria-label":r,...n}));ib.displayName="CloseButton";ib.propTypes=rL;const hC=C.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:r=!1,onHide:n,children:i,...o},u)=>{const l=C.useContext(pC),f=Ef(()=>{l==null||l.onHide(),n==null||n()});return w.jsxs("div",{ref:u,...o,children:[i,r&&w.jsx(ib,{"aria-label":e,variant:t,onClick:f})]})});hC.displayName="AbstractModalHeader";const vC=C.forwardRef(({bsPrefix:e,className:t,closeLabel:r="Close",closeButton:n=!1,...i},o)=>(e=Re(e,"offcanvas-header"),w.jsx(hC,{ref:o,...i,className:Oe(t,e),closeLabel:r,closeButton:n})));vC.displayName="OffcanvasHeader";const ab=(e=>C.forwardRef((t,r)=>w.jsx("div",{...t,ref:r,className:Oe(t.className,e)}))),nL=ab("h5"),mC=C.forwardRef(({className:e,bsPrefix:t,as:r=nL,...n},i)=>(t=Re(t,"offcanvas-title"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));mC.displayName="OffcanvasTitle";function iL(e,t){return e.classList?e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function aL(e,t){e.classList?e.classList.add(t):iL(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}var oL=Function.prototype.bind.call(Function.prototype.call,[].slice);function $i(e,t){return oL(e.querySelectorAll(t))}function DS(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function sL(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=DS(e.className,t):e.setAttribute("class",DS(e.className&&e.className.baseVal||"",t))}const Ta={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class yC extends rb{adjustAndStore(t,r,n){const i=r.style[t];r.dataset[t]=i,On(r,{[t]:`${parseFloat(On(r,t))+n}px`})}restore(t,r){const n=r.dataset[t];n!==void 0&&(delete r.dataset[t],On(r,{[t]:n}))}setContainerStyle(t){super.setContainerStyle(t);const r=this.getElement();if(aL(r,"modal-open"),!t.scrollBarWidth)return;const n=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";$i(r,Ta.FIXED_CONTENT).forEach(o=>this.adjustAndStore(n,o,t.scrollBarWidth)),$i(r,Ta.STICKY_CONTENT).forEach(o=>this.adjustAndStore(i,o,-t.scrollBarWidth)),$i(r,Ta.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(i,o,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const r=this.getElement();sL(r,"modal-open");const n=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";$i(r,Ta.FIXED_CONTENT).forEach(o=>this.restore(n,o)),$i(r,Ta.STICKY_CONTENT).forEach(o=>this.restore(i,o)),$i(r,Ta.NAVBAR_TOGGLER).forEach(o=>this.restore(i,o))}}let gh;function uL(e){return gh||(gh=new yC(e)),gh}function lL(e){return w.jsx(dC,{...e})}function cL(e){return w.jsx(cC,{...e})}const gC=C.forwardRef(({bsPrefix:e,className:t,children:r,"aria-labelledby":n,placement:i="start",responsive:o,show:u=!1,backdrop:l=!0,keyboard:f=!0,scroll:d=!1,onEscapeKeyDown:v,onShow:p,onHide:m,container:b,autoFocus:O=!0,enforceFocus:x=!0,restoreFocus:g=!0,restoreFocusOptions:j,onEntered:E,onExit:A,onExiting:T,onEnter:P,onEntering:_,onExited:N,backdropClassName:R,manager:I,renderStaticNode:W=!1,...q},$)=>{const U=C.useRef();e=Re(e,"offcanvas");const[z,V]=C.useState(!1),Y=Ef(m),J=jD(o||"xs","up");C.useEffect(()=>{V(o?u&&!J:u)},[u,o,J]);const K=C.useMemo(()=>({onHide:Y}),[Y]);function ee(){return I||(d?(U.current||(U.current=new yC({handleContainerOverflow:!1})),U.current):uL())}const Z=(ce,...me)=>{ce&&(ce.style.visibility="visible"),P==null||P(ce,...me)},L=(ce,...me)=>{ce&&(ce.style.visibility=""),N==null||N(...me)},H=C.useCallback(ce=>w.jsx("div",{...ce,className:Oe(`${e}-backdrop`,R)}),[R,e]),oe=ce=>w.jsx("div",{...ce,...q,className:Oe(t,o?`${e}-${o}`:e,`${e}-${i}`),"aria-labelledby":n,children:r});return w.jsxs(w.Fragment,{children:[!z&&(o||W)&&oe({}),w.jsx(pC.Provider,{value:K,children:w.jsx(JD,{show:z,ref:$,backdrop:l,container:b,keyboard:f,autoFocus:O,enforceFocus:x&&!d,restoreFocus:g,restoreFocusOptions:j,onEscapeKeyDown:v,onShow:p,onHide:Y,onEnter:Z,onEntering:_,onEntered:E,onExit:A,onExiting:T,onExited:L,manager:ee(),transition:lL,backdropTransition:cL,renderBackdrop:H,renderDialog:oe})})]})});gC.displayName="Offcanvas";const fL=Object.assign(gC,{Body:fC,Header:vC,Title:mC}),bC=C.forwardRef(({onHide:e,...t},r)=>{const n=C.useContext(wo),i=Ef(()=>{n==null||n.onToggle==null||n.onToggle(),e==null||e()});return w.jsx(fL,{ref:r,show:!!(n!=null&&n.expanded),...t,renderStaticNode:!0,onHide:i})});bC.displayName="NavbarOffcanvas";const xC=C.forwardRef(({className:e,bsPrefix:t,as:r="span",...n},i)=>(t=Re(t,"navbar-text"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));xC.displayName="NavbarText";const wC=C.forwardRef((e,t)=>{const{bsPrefix:r,expand:n=!0,variant:i="light",bg:o,fixed:u,sticky:l,className:f,as:d="nav",expanded:v,onToggle:p,onSelect:m,collapseOnSelect:b=!1,...O}=JT(e,{expanded:"onToggle"}),x=Re(r,"navbar"),g=C.useCallback((...A)=>{m==null||m(...A),b&&v&&(p==null||p(!1))},[m,b,v,p]);O.role===void 0&&d!=="nav"&&(O.role="navigation");let j=`${x}-expand`;typeof n=="string"&&(j=`${j}-${n}`);const E=C.useMemo(()=>({onToggle:()=>p==null?void 0:p(!v),bsPrefix:x,expanded:!!v,expand:n}),[x,v,n,p]);return w.jsx(wo.Provider,{value:E,children:w.jsx(vc.Provider,{value:g,children:w.jsx(d,{ref:t,...O,className:Oe(f,x,n&&j,i&&`${x}-${i}`,o&&`bg-${o}`,l&&`sticky-${l}`,u&&`fixed-${u}`)})})})});wC.displayName="Navbar";const Ql=Object.assign(wC,{Brand:rC,Collapse:oC,Offcanvas:bC,Text:xC,Toggle:sC});function dL(){const[,e]=C.useReducer(t=>t+1,0);return e}const ob=C.createContext(null);ob.displayName="NavContext";const SC=C.createContext(null),pL=["as","disabled"];function hL(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function vL(e){return!e||e.trim()==="#"}function OC({tagName:e,disabled:t,href:r,target:n,rel:i,role:o,onClick:u,tabIndex:l=0,type:f}){e||(r!=null||n!=null||i!=null?e="a":e="button");const d={tagName:e};if(e==="button")return[{type:f||"button",disabled:t},d];const v=m=>{if((t||e==="a"&&vL(r))&&m.preventDefault(),t){m.stopPropagation();return}u==null||u(m)},p=m=>{m.key===" "&&(m.preventDefault(),v(m))};return e==="a"&&(r||(r="#"),t&&(r=void 0)),[{role:o??"button",disabled:void 0,tabIndex:t?void 0:l,href:r,target:e==="a"?n:void 0,"aria-disabled":t||void 0,rel:e==="a"?i:void 0,onClick:v,onKeyDown:p},d]}const _C=C.forwardRef((e,t)=>{let{as:r,disabled:n}=e,i=hL(e,pL);const[o,{tagName:u}]=OC(Object.assign({tagName:r,disabled:n},i));return w.jsx(u,Object.assign({},i,o,{ref:t}))});_C.displayName="Button";const mL=["as","active","eventKey"];function yL(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function PC({key:e,onClick:t,active:r,id:n,role:i,disabled:o}){const u=C.useContext(vc),l=C.useContext(ob),f=C.useContext(SC);let d=r;const v={role:i};if(l){!i&&l.role==="tablist"&&(v.role="tab");const p=l.getControllerId(e??null),m=l.getControlledId(e??null);v[Af("event-key")]=e,v.id=p||n,d=r==null&&e!=null?l.activeKey===e:r,(d||!(f!=null&&f.unmountOnExit)&&!(f!=null&&f.mountOnEnter))&&(v["aria-controls"]=m)}return v.role==="tab"&&(v["aria-selected"]=d,d||(v.tabIndex=-1),o&&(v.tabIndex=-1,v["aria-disabled"]=!0)),v.onClick=bn(p=>{o||(t==null||t(p),e!=null&&u&&!p.isPropagationStopped()&&u(e,p))}),[v,{isActive:d}]}const jC=C.forwardRef((e,t)=>{let{as:r=_C,active:n,eventKey:i}=e,o=yL(e,mL);const[u,l]=PC(Object.assign({key:J0(i,o.href),active:n},o));return u[Af("active")]=l.isActive,w.jsx(r,Object.assign({},o,u,{ref:t}))});jC.displayName="NavItem";const gL=["as","onSelect","activeKey","role","onKeyDown"];function bL(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}const LS=()=>{},BS=Af("event-key"),EC=C.forwardRef((e,t)=>{let{as:r="div",onSelect:n,activeKey:i,role:o,onKeyDown:u}=e,l=bL(e,gL);const f=dL(),d=C.useRef(!1),v=C.useContext(vc),p=C.useContext(SC);let m,b;p&&(o=o||"tablist",i=p.activeKey,m=p.getControlledId,b=p.getControllerId);const O=C.useRef(null),x=A=>{const T=O.current;if(!T)return null;const P=$i(T,`[${BS}]:not([aria-disabled=true])`),_=T.querySelector("[aria-selected=true]");if(!_||_!==document.activeElement)return null;const N=P.indexOf(_);if(N===-1)return null;let R=N+A;return R>=P.length&&(R=0),R<0&&(R=P.length-1),P[R]},g=(A,T)=>{A!=null&&(n==null||n(A,T),v==null||v(A,T))},j=A=>{if(u==null||u(A),!p)return;let T;switch(A.key){case"ArrowLeft":case"ArrowUp":T=x(-1);break;case"ArrowRight":case"ArrowDown":T=x(1);break;default:return}T&&(A.preventDefault(),g(T.dataset[$D("EventKey")]||null,A),d.current=!0,f())};C.useEffect(()=>{if(O.current&&d.current){const A=O.current.querySelector(`[${BS}][aria-selected=true]`);A==null||A.focus()}d.current=!1});const E=Tf(t,O);return w.jsx(vc.Provider,{value:g,children:w.jsx(ob.Provider,{value:{role:o,activeKey:J0(i),getControlledId:m||LS,getControllerId:b||LS},children:w.jsx(r,Object.assign({},l,{onKeyDown:j,ref:E,role:o}))})})});EC.displayName="Nav";const xL=Object.assign(EC,{Item:jC}),sb=C.createContext(null);sb.displayName="CardHeaderContext";const AC=C.forwardRef(({className:e,bsPrefix:t,as:r="div",...n},i)=>(t=Re(t,"nav-item"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));AC.displayName="NavItem";const wL=["onKeyDown"];function SL(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function OL(e){return!e||e.trim()==="#"}const ub=C.forwardRef((e,t)=>{let{onKeyDown:r}=e,n=SL(e,wL);const[i]=OC(Object.assign({tagName:"a"},n)),o=bn(u=>{i.onKeyDown(u),r==null||r(u)});return OL(n.href)||n.role==="button"?w.jsx("a",Object.assign({ref:t},n,i,{onKeyDown:o})):w.jsx("a",Object.assign({ref:t},n,{onKeyDown:r}))});ub.displayName="Anchor";const TC=C.forwardRef(({bsPrefix:e,className:t,as:r=ub,active:n,eventKey:i,disabled:o=!1,...u},l)=>{e=Re(e,"nav-link");const[f,d]=PC({key:J0(i,u.href),active:n,disabled:o,...u});return w.jsx(r,{...u,...f,ref:l,disabled:o,className:Oe(t,e,o&&"disabled",d.isActive&&"active")})});TC.displayName="NavLink";const CC=C.forwardRef((e,t)=>{const{as:r="div",bsPrefix:n,variant:i,fill:o=!1,justify:u=!1,navbar:l,navbarScroll:f,className:d,activeKey:v,...p}=JT(e,{activeKey:"onSelect"}),m=Re(n,"nav");let b,O,x=!1;const g=C.useContext(wo),j=C.useContext(sb);return g?(b=g.bsPrefix,x=l??!0):j&&({cardHeaderBsPrefix:O}=j),w.jsx(xL,{as:r,ref:t,activeKey:v,className:Oe(d,{[m]:!x,[`${b}-nav`]:x,[`${b}-nav-scroll`]:x&&f,[`${O}-${i}`]:!!O,[`${m}-${i}`]:!!i,[`${m}-fill`]:o,[`${m}-justified`]:u}),...p})});CC.displayName="Nav";const Zl=Object.assign(CC,{Item:AC,Link:TC}),lb=C.forwardRef(({bsPrefix:e,fluid:t=!1,as:r="div",className:n,...i},o)=>{const u=Re(e,"container"),l=typeof t=="string"?`-${t}`:"-fluid";return w.jsx(r,{ref:o,...i,className:Oe(n,t?`${u}${l}`:u)})});lb.displayName="Container";const _L="/ProserveReport/",PL=`${_L}logo.png`;function jL(){const{lang:e,setLang:t,t:r}=zr();return w.jsx(Ql,{bg:"dark",variant:"dark",expand:"lg",className:"app-navbar",children:w.jsxs(lb,{fluid:!0,children:[w.jsxs(Ql.Brand,{as:Xl,to:"/",className:"fw-bold d-flex align-items-center gap-2",children:[w.jsx("img",{src:PL,alt:"Logo",className:"brand-logo"}),w.jsxs("span",{children:[w.jsx("span",{className:"brand-proserve",children:"PROSERVE"}),w.jsx("span",{className:"brand-report ms-2",children:"Report"})]})]}),w.jsx(Ql.Toggle,{"aria-controls":"main-nav"}),w.jsxs(Ql.Collapse,{id:"main-nav",children:[w.jsxs(Zl,{className:"me-auto",children:[w.jsx(Zl.Link,{as:Xl,to:"/",end:!0,children:r("nav.dashboard")}),w.jsx(Zl.Link,{as:Xl,to:"/sessions",children:r("nav.sessions")}),w.jsx(Zl.Link,{as:Xl,to:"/users",children:r("nav.users")})]}),w.jsxs("div",{className:"lang-switcher",children:[w.jsx("button",{className:`lang-btn ${e==="fr"?"active":""}`,onClick:()=>t("fr"),children:"FR"}),w.jsx("button",{className:`lang-btn ${e==="en"?"active":""}`,onClick:()=>t("en"),children:"EN"})]})]})]})})}function EL(){return w.jsxs("div",{className:"app-layout",children:[w.jsx(jL,{}),w.jsx(lb,{fluid:!0,className:"main-content py-4 px-4",children:w.jsx(x2,{})})]})}const ur=C.forwardRef(({bsPrefix:e,className:t,as:r="div",...n},i)=>{const o=Re(e,"row"),u=eC(),l=tC(),f=`${o}-cols`,d=[];return u.forEach(v=>{const p=n[v];delete n[v];let m;p!=null&&typeof p=="object"?{cols:m}=p:m=p;const b=v!==l?`-${v}`:"";m!=null&&d.push(`${f}${b}-${m}`)}),w.jsx(r,{ref:i,...n,className:Oe(t,o,...d)})});ur.displayName="Row";function AL({as:e,bsPrefix:t,className:r,...n}){t=Re(t,"col");const i=eC(),o=tC(),u=[],l=[];return i.forEach(f=>{const d=n[f];delete n[f];let v,p,m;typeof d=="object"&&d!=null?{span:v,offset:p,order:m}=d:v=d;const b=f!==o?`-${f}`:"";v&&u.push(v===!0?`${t}${b}`:`${t}${b}-${v}`),m!=null&&l.push(`order${b}-${m}`),p!=null&&l.push(`offset${b}-${p}`)}),[{...n,className:Oe(r,...u,...l)},{as:e,bsPrefix:t,spans:u}]}const $e=C.forwardRef((e,t)=>{const[{className:r,...n},{as:i="div",bsPrefix:o,spans:u}]=AL(e);return w.jsx(i,{...n,ref:t,className:Oe(r,!u.length&&o)})});$e.displayName="Col";const cb=C.forwardRef(({className:e,bsPrefix:t,as:r="div",...n},i)=>(t=Re(t,"card-body"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));cb.displayName="CardBody";const kC=C.forwardRef(({className:e,bsPrefix:t,as:r="div",...n},i)=>(t=Re(t,"card-footer"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));kC.displayName="CardFooter";const NC=C.forwardRef(({bsPrefix:e,className:t,as:r="div",...n},i)=>{const o=Re(e,"card-header"),u=C.useMemo(()=>({cardHeaderBsPrefix:o}),[o]);return w.jsx(sb.Provider,{value:u,children:w.jsx(r,{ref:i,...n,className:Oe(t,o)})})});NC.displayName="CardHeader";const RC=C.forwardRef(({bsPrefix:e,className:t,variant:r,as:n="img",...i},o)=>{const u=Re(e,"card-img");return w.jsx(n,{ref:o,className:Oe(r?`${u}-${r}`:u,t),...i})});RC.displayName="CardImg";const $C=C.forwardRef(({className:e,bsPrefix:t,as:r="div",...n},i)=>(t=Re(t,"card-img-overlay"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));$C.displayName="CardImgOverlay";const MC=C.forwardRef(({className:e,bsPrefix:t,as:r="a",...n},i)=>(t=Re(t,"card-link"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));MC.displayName="CardLink";const TL=ab("h6"),IC=C.forwardRef(({className:e,bsPrefix:t,as:r=TL,...n},i)=>(t=Re(t,"card-subtitle"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));IC.displayName="CardSubtitle";const DC=C.forwardRef(({className:e,bsPrefix:t,as:r="p",...n},i)=>(t=Re(t,"card-text"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));DC.displayName="CardText";const CL=ab("h5"),LC=C.forwardRef(({className:e,bsPrefix:t,as:r=CL,...n},i)=>(t=Re(t,"card-title"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));LC.displayName="CardTitle";const BC=C.forwardRef(({bsPrefix:e,className:t,bg:r,text:n,border:i,body:o=!1,children:u,as:l="div",...f},d)=>{const v=Re(e,"card");return w.jsx(l,{ref:d,...f,className:Oe(t,v,r&&`bg-${r}`,n&&`text-${n}`,i&&`border-${i}`),children:o?w.jsx(cb,{children:u}):u})});BC.displayName="Card";const be=Object.assign(BC,{Img:RC,Title:LC,Subtitle:IC,Body:cb,Link:MC,Text:DC,Header:NC,Footer:kC,ImgOverlay:$C}),Fr=C.forwardRef(({bsPrefix:e,className:t,striped:r,bordered:n,borderless:i,hover:o,size:u,variant:l,responsive:f,...d},v)=>{const p=Re(e,"table"),m=Oe(t,p,l&&`${p}-${l}`,u&&`${p}-${u}`,r&&`${p}-${typeof r=="string"?`striped-${r}`:"striped"}`,n&&`${p}-bordered`,i&&`${p}-borderless`,o&&`${p}-hover`),b=w.jsx("table",{...d,className:m,ref:v});if(f){let O=`${p}-responsive`;return typeof f=="string"&&(O=`${O}-${f}`),w.jsx("div",{className:O,children:b})}return b});Fr.displayName="Table";const kL="/proserve";async function rn(e,t={}){const r=new URLSearchParams;for(const[i,o]of Object.entries(t))r.append(i,String(o));const n=await fetch(`${kL}/${e}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});if(!n.ok)throw new Error(`API error: ${n.status} ${n.statusText}`);return n.json()}async function FC(e=-1){return(await rn("lists/all_sessions.php",{typeId:e})).stats||[]}async function NL(e,t=-1){return(await rn("lists/sessions_for_user.php",{userId:e,typeId:t})).stats||[]}async function RL(e){return(await rn("session/get.php",{sessionId:e})).session||null}async function qC(){return(await rn("lists/all_users.php")).stats||[]}async function $L(e){return(await rn("user/get.php",{userId:e})).user||null}async function ML(e){return(await rn("lists/users_in_session.php",{sessionId:e})).stats||[]}async function IL(e,t=-1){return(await rn("stats/get.php",{sessionId:e,userId:t})).stats||[]}async function DL(e,t=-1,r=-1){const n={sessionId:e};return t>0&&(n.userId=t),r>=0&&(n.sessionType=r),(await rn("stats/get.php",n)).stats||[]}async function LL(e,t=-1){const r={sessionId:e};return t>0&&(r.userId=t),(await rn("session/getobjectives.php",r)).participation||null}async function BL(e,t=!0){var n;return((n=(await rn("stats/userhistory.php",{userId:e,sessionId:-1,quickMode:t?"true":"false"})).stats)==null?void 0:n[0])||null}function pt({title:e,value:t,subtitle:r,color:n="#4a90d9",onClick:i}){return w.jsx(be,{className:`stat-card h-100${i?" clickable-row":""}`,onClick:i,style:i?{cursor:"pointer"}:void 0,children:w.jsxs(be.Body,{className:"text-center",children:[w.jsx(be.Subtitle,{className:"mb-2 text-muted-custom",children:e}),w.jsx(be.Title,{className:"stat-value",style:{color:n},children:t}),r&&w.jsx("small",{className:"text-muted-custom",children:r})]})})}const qa=C.forwardRef(({bsPrefix:e,bg:t="primary",pill:r=!1,text:n,className:i,as:o="span",...u},l)=>{const f=Re(e,"badge");return w.jsx(o,{ref:l,...u,className:Oe(i,f,r&&"rounded-pill",n&&`text-${n}`,t&&`bg-${t}`)})});qa.displayName="Badge";function Cf({success:e,score:t}){const{t:r}=zr();return w.jsxs(qa,{bg:e?"success":"danger",children:[t!==void 0&&w.jsx("span",{className:"me-1",children:t}),r(e?"badge.success":"badge.failed")]})}var mn=(e=>(e[e.FireRange=0]="FireRange",e[e.Challenge=1]="Challenge",e[e.Protect=2]="Protect",e[e.DeEscalation=3]="DeEscalation",e[e.Terrorism=4]="Terrorism",e[e.FireExtinction=5]="FireExtinction",e[e.Recovering=6]="Recovering",e[e.LongRange=7]="LongRange",e))(mn||{});const FL={0:"Stand de Tir",1:"Challenge",2:"Protection",3:"Désescalade",4:"Terrorisme",5:"Incendie",6:"Récupération",7:"Tir Longue Distance"},zC={0:"#4a90d9",1:"#9b59b6",2:"#27ae60",3:"#f39c12",4:"#e74c3c",5:"#e67e22",6:"#1abc9c",7:"#2980b9"},qL={0:"Ennemi",1:"Civil",2:"Police",3:"Objet",4:"Cible Papier",5:"Cible",6:"Corps"};function zs({typeId:e}){const{t}=zr(),r=t(`sessionType.${e}`),n=zC[e]||"#6c757d";return w.jsx(qa,{style:{backgroundColor:n},className:"session-type-badge",children:r})}const UC=C.forwardRef(({bsPrefix:e,variant:t,animation:r="border",size:n,as:i="div",className:o,...u},l)=>{e=Re(e,"spinner");const f=`${e}-${r}`;return w.jsx(i,{ref:l,...u,className:Oe(o,f,n&&`${f}-${n}`,t&&`text-${t}`)})});UC.displayName="Spinner";function Eu(){const{t:e}=zr();return w.jsxs("div",{className:"d-flex justify-content-center align-items-center py-5",children:[w.jsx(UC,{animation:"border",variant:"primary"}),w.jsx("span",{className:"ms-3 text-muted-custom",children:e("loading")})]})}function WC(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t-1}return Xh=t,Xh}var Yh,yO;function iB(){if(yO)return Yh;yO=1;var e=Nf();function t(r,n){var i=this.__data__,o=e(i,r);return o<0?(++this.size,i.push([r,n])):i[o][1]=n,this}return Yh=t,Yh}var Qh,gO;function Rf(){if(gO)return Qh;gO=1;var e=eB(),t=tB(),r=rB(),n=nB(),i=iB();function o(u){var l=-1,f=u==null?0:u.length;for(this.clear();++l0?1:-1},Li=function(t){return Wi(t)&&t.indexOf("%")===t.length-1},le=function(t){return EB(t)&&!Tu(t)},AB=function(t){return ke(t)},St=function(t){return le(t)||Wi(t)},TB=0,_o=function(t){var r=++TB;return"".concat(t||"").concat(r)},Ut=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!le(t)&&!Wi(t))return n;var o;if(Li(t)){var u=t.indexOf("%");o=r*parseFloat(t.slice(0,u))/100}else o=+t;return Tu(o)&&(o=n),i&&o>r&&(o=r),o},ai=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},CB=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function kg(e){"@babel/helpers - typeof";return kg=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},kg(e)}var KO={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"},_n=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},VO=null,Ov=null,bb=function e(t){if(t===VO&&Array.isArray(Ov))return Ov;var r=[];return C.Children.forEach(t,function(n){ke(n)||(OB.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Ov=r,VO=t,r};function fr(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return _n(i)}):n=[_n(t)],bb(e).forEach(function(i){var o=cr(i,"type.displayName")||cr(i,"type.name");n.indexOf(o)!==-1&&r.push(i)}),r}function or(e,t){var r=fr(e,t);return r&&r[0]}var GO=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!le(n)||n<=0||!le(i)||i<=0)},LB=["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"],BB=function(t){return t&&t.type&&Wi(t.type)&&LB.indexOf(t.type)>=0},FB=function(t){return t&&kg(t)==="object"&&"clipDot"in t},qB=function(t,r,n,i){var o,u=(o=Sv==null?void 0:Sv[i])!==null&&o!==void 0?o:[];return r.startsWith("data-")||!Ee(t)&&(i&&u.includes(r)||RB.includes(r))||n&&gb.includes(r)},Se=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(C.isValidElement(t)&&(i=t.props),!Oo(i))return null;var o={};return Object.keys(i).forEach(function(u){var l;qB((l=i)===null||l===void 0?void 0:l[u],u,r,n)&&(o[u]=i[u])}),o},Ng=function e(t,r){if(t===r)return!0;var n=C.Children.count(t);if(n!==C.Children.count(r))return!1;if(n===0)return!0;if(n===1)return XO(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function KB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $g(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,o=e.className,u=e.style,l=e.title,f=e.desc,d=HB(e,WB),v=i||{width:r,height:n,x:0,y:0},p=Me("recharts-surface",o);return D.createElement("svg",Rg({},Se(d,!0,"svg"),{className:p,width:r,height:n,style:u,viewBox:"".concat(v.x," ").concat(v.y," ").concat(v.width," ").concat(v.height)}),D.createElement("title",null,l),D.createElement("desc",null,f),t)}var VB=["children","className"];function Mg(){return Mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var qe=D.forwardRef(function(e,t){var r=e.children,n=e.className,i=GB(e,VB),o=Me("recharts-layer",n);return D.createElement("g",Mg({className:o},Se(i,!0),{ref:t}),r)}),qr=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;oo?0:o+r),n=n>o?o:n,n<0&&(n+=o),o=r>n?0:n-r>>>0,r>>>=0;for(var u=Array(o);++i=o?r:e(r,n,i)}return Pv=t,Pv}var jv,JO;function ZC(){if(JO)return jv;JO=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",u="\\u200d",l=RegExp("["+u+e+i+o+"]");function f(d){return l.test(d)}return jv=f,jv}var Ev,e_;function ZB(){if(e_)return Ev;e_=1;function e(t){return t.split("")}return Ev=e,Ev}var Av,t_;function JB(){if(t_)return Av;t_=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",u="["+e+"]",l="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+l+"|"+f+")",v="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",b="\\u200d",O=d+"?",x="["+o+"]?",g="(?:"+b+"(?:"+[v,p,m].join("|")+")"+x+O+")*",j=x+O+g,E="(?:"+[v+l+"?",l,p,m,u].join("|")+")",A=RegExp(f+"(?="+f+")|"+E+j,"g");function T(P){return P.match(A)||[]}return Av=T,Av}var Tv,r_;function e3(){if(r_)return Tv;r_=1;var e=ZB(),t=ZC(),r=JB();function n(i){return t(i)?r(i):e(i)}return Tv=n,Tv}var Cv,n_;function t3(){if(n_)return Cv;n_=1;var e=QB(),t=ZC(),r=e3(),n=GC();function i(o){return function(u){u=n(u);var l=t(u)?r(u):void 0,f=l?l[0]:u.charAt(0),d=l?e(l,1).join(""):u.slice(1);return f[o]()+d}}return Cv=i,Cv}var kv,i_;function r3(){if(i_)return kv;i_=1;var e=t3(),t=e("toUpperCase");return kv=t,kv}var n3=r3();const If=Ue(n3);function Qe(e){return function(){return e}}const JC=Math.cos,bc=Math.sin,Ur=Math.sqrt,xc=Math.PI,Df=2*xc,Ig=Math.PI,Dg=2*Ig,Mi=1e-6,i3=Dg-Mi;function ek(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ek;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;iMi)if(!(Math.abs(p*f-d*v)>Mi)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-u,O=i-l,x=f*f+d*d,g=b*b+O*O,j=Math.sqrt(x),E=Math.sqrt(m),A=o*Math.tan((Ig-Math.acos((x+m-g)/(2*j*E)))/2),T=A/E,P=A/j;Math.abs(T-1)>Mi&&this._append`L${t+T*v},${r+T*p}`,this._append`A${o},${o},0,0,${+(p*b>v*O)},${this._x1=t+P*f},${this._y1=r+P*d}`}}arc(t,r,n,i,o,u){if(t=+t,r=+r,n=+n,u=!!u,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),f=n*Math.sin(i),d=t+l,v=r+f,p=1^u,m=u?i-o:o-i;this._x1===null?this._append`M${d},${v}`:(Math.abs(this._x1-d)>Mi||Math.abs(this._y1-v)>Mi)&&this._append`L${d},${v}`,n&&(m<0&&(m=m%Dg+Dg),m>i3?this._append`A${n},${n},0,1,${p},${t-l},${r-f}A${n},${n},0,1,${p},${this._x1=d},${this._y1=v}`:m>Mi&&this._append`A${n},${n},0,${+(m>=Ig)},${p},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function xb(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new o3(t)}function wb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tk(e){this._context=e}tk.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 Lf(e){return new tk(e)}function rk(e){return e[0]}function nk(e){return e[1]}function ik(e,t){var r=Qe(!0),n=null,i=Lf,o=null,u=xb(l);e=typeof e=="function"?e:e===void 0?rk:Qe(e),t=typeof t=="function"?t:t===void 0?nk:Qe(t);function l(f){var d,v=(f=wb(f)).length,p,m=!1,b;for(n==null&&(o=i(b=u())),d=0;d<=v;++d)!(d=b;--O)l.point(A[O],T[O]);l.lineEnd(),l.areaEnd()}j&&(A[m]=+e(g,m,p),T[m]=+t(g,m,p),l.point(n?+n(g,m,p):A[m],r?+r(g,m,p):T[m]))}if(E)return l=null,E+""||null}function v(){return ik().defined(i).curve(u).context(o)}return d.x=function(p){return arguments.length?(e=typeof p=="function"?p:Qe(+p),n=null,d):e},d.x0=function(p){return arguments.length?(e=typeof p=="function"?p:Qe(+p),d):e},d.x1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:Qe(+p),d):n},d.y=function(p){return arguments.length?(t=typeof p=="function"?p:Qe(+p),r=null,d):t},d.y0=function(p){return arguments.length?(t=typeof p=="function"?p:Qe(+p),d):t},d.y1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:Qe(+p),d):r},d.lineX0=d.lineY0=function(){return v().x(e).y(t)},d.lineY1=function(){return v().x(e).y(r)},d.lineX1=function(){return v().x(n).y(t)},d.defined=function(p){return arguments.length?(i=typeof p=="function"?p:Qe(!!p),d):i},d.curve=function(p){return arguments.length?(u=p,o!=null&&(l=u(o)),d):u},d.context=function(p){return arguments.length?(p==null?o=l=null:l=u(o=p),d):o},d}class ak{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function s3(e){return new ak(e,!0)}function u3(e){return new ak(e,!1)}const Sb={draw(e,t){const r=Ur(t/xc);e.moveTo(r,0),e.arc(0,0,r,0,Df)}},l3={draw(e,t){const r=Ur(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},ok=Ur(1/3),c3=ok*2,f3={draw(e,t){const r=Ur(t/c3),n=r*ok;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},d3={draw(e,t){const r=Ur(t),n=-r/2;e.rect(n,n,r,r)}},p3=.8908130915292852,sk=bc(xc/10)/bc(7*xc/10),h3=bc(Df/10)*sk,v3=-JC(Df/10)*sk,m3={draw(e,t){const r=Ur(t*p3),n=h3*r,i=v3*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const u=Df*o/5,l=JC(u),f=bc(u);e.lineTo(f*r,-l*r),e.lineTo(l*n-f*i,f*n+l*i)}e.closePath()}},Nv=Ur(3),y3={draw(e,t){const r=-Ur(t/(Nv*3));e.moveTo(0,r*2),e.lineTo(-Nv*r,-r),e.lineTo(Nv*r,-r),e.closePath()}},gr=-.5,br=Ur(3)/2,Lg=1/Ur(12),g3=(Lg/2+1)*3,b3={draw(e,t){const r=Ur(t/g3),n=r/2,i=r*Lg,o=n,u=r*Lg+r,l=-o,f=u;e.moveTo(n,i),e.lineTo(o,u),e.lineTo(l,f),e.lineTo(gr*n-br*i,br*n+gr*i),e.lineTo(gr*o-br*u,br*o+gr*u),e.lineTo(gr*l-br*f,br*l+gr*f),e.lineTo(gr*n+br*i,gr*i-br*n),e.lineTo(gr*o+br*u,gr*u-br*o),e.lineTo(gr*l+br*f,gr*f-br*l),e.closePath()}};function x3(e,t){let r=null,n=xb(i);e=typeof e=="function"?e:Qe(e||Sb),t=typeof t=="function"?t:Qe(t===void 0?64:+t);function i(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Qe(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Qe(+o),i):t},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function wc(){}function Sc(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function uk(e){this._context=e}uk.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:Sc(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:Sc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function w3(e){return new uk(e)}function lk(e){this._context=e}lk.prototype={areaStart:wc,areaEnd:wc,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:Sc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function S3(e){return new lk(e)}function ck(e){this._context=e}ck.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Sc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function O3(e){return new ck(e)}function fk(e){this._context=e}fk.prototype={areaStart:wc,areaEnd:wc,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 _3(e){return new fk(e)}function a_(e){return e<0?-1:1}function o_(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),u=(r-e._y1)/(i||n<0&&-0),l=(o*i+u*n)/(n+i);return(a_(o)+a_(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(l))||0}function s_(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Rv(e,t,r){var n=e._x0,i=e._y0,o=e._x1,u=e._y1,l=(o-n)/3;e._context.bezierCurveTo(n+l,i+l*t,o-l,u-l*r,o,u)}function Oc(e){this._context=e}Oc.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:Rv(this,this._t0,s_(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Rv(this,s_(this,r=o_(this,e,t)),r);break;default:Rv(this,this._t0,r=o_(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function dk(e){this._context=new pk(e)}(dk.prototype=Object.create(Oc.prototype)).point=function(e,t){Oc.prototype.point.call(this,t,e)};function pk(e){this._context=e}pk.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function P3(e){return new Oc(e)}function j3(e){return new dk(e)}function hk(e){this._context=e}hk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=u_(e),i=u_(t),o=0,u=1;u=0;--t)i[t]=(u[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function A3(e){return new Bf(e,.5)}function T3(e){return new Bf(e,0)}function C3(e){return new Bf(e,1)}function Va(e,t){if((u=e.length)>1)for(var r=1,n,i,o=e[t[0]],u,l=o.length;r=0;)r[t]=t;return r}function k3(e,t){return e[t]}function N3(e){const t=[];return t.key=e,t}function R3(){var e=Qe([]),t=Bg,r=Va,n=k3;function i(o){var u=Array.from(e.apply(this,arguments),N3),l,f=u.length,d=-1,v;for(const p of o)for(l=0,++d;l0){for(var r,n,i=0,o=e[0].length,u;i0){for(var r=0,n=e[t[0]],i,o=n.length;r0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,u;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function z3(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var vk={symbolCircle:Sb,symbolCross:l3,symbolDiamond:f3,symbolSquare:d3,symbolStar:m3,symbolTriangle:y3,symbolWye:b3},U3=Math.PI/180,W3=function(t){var r="symbol".concat(If(t));return vk[r]||Sb},H3=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*U3;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),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}},K3=function(t,r){vk["symbol".concat(If(t))]=r},Ob=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,o=i===void 0?64:i,u=t.sizeType,l=u===void 0?"area":u,f=q3(t,D3),d=c_(c_({},f),{},{type:n,size:o,sizeType:l}),v=function(){var g=W3(n),j=x3().type(g).size(H3(o,l,n));return j()},p=d.className,m=d.cx,b=d.cy,O=Se(d,!0);return m===+m&&b===+b&&o===+o?D.createElement("path",Fg({},O,{className:Me("recharts-symbols",p),transform:"translate(".concat(m,", ").concat(b,")"),d:v()})):null};Ob.registerSymbol=K3;function Ga(e){"@babel/helpers - typeof";return Ga=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},Ga(e)}function qg(){return qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var E=b.inactive?d:b.color;return D.createElement("li",qg({className:g,style:p,key:"legend-item-".concat(O)},Hi(n.props,b,O)),D.createElement($g,{width:u,height:u,viewBox:v,style:m},n.renderIcon(b)),D.createElement("span",{className:"recharts-legend-item-text",style:{color:E}},x?x(j,b,O):j))})}},{key:"render",value:function(){var n=this.props,i=n.payload,o=n.layout,u=n.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:o==="horizontal"?u:"left"};return D.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(C.PureComponent);Ws(_b,"displayName","Legend");Ws(_b,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var $v,d_;function rF(){if(d_)return $v;d_=1;var e=Rf();function t(){this.__data__=new e,this.size=0}return $v=t,$v}var Mv,p_;function nF(){if(p_)return Mv;p_=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Mv=e,Mv}var Iv,h_;function iF(){if(h_)return Iv;h_=1;function e(t){return this.__data__.get(t)}return Iv=e,Iv}var Dv,v_;function aF(){if(v_)return Dv;v_=1;function e(t){return this.__data__.has(t)}return Dv=e,Dv}var Lv,m_;function oF(){if(m_)return Lv;m_=1;var e=Rf(),t=hb(),r=vb(),n=200;function i(o,u){var l=this.__data__;if(l instanceof e){var f=l.__data__;if(!t||f.lengthb))return!1;var x=p.get(u),g=p.get(l);if(x&&g)return x==l&&g==u;var j=-1,E=!0,A=f&i?new e:void 0;for(p.set(u,l),p.set(l,u);++j-1&&n%1==0&&n-1&&r%1==0&&r<=e}return om=t,om}var sm,F_;function bF(){if(F_)return sm;F_=1;var e=Mn(),t=Ab(),r=In(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",u="[object Date]",l="[object Error]",f="[object Function]",d="[object Map]",v="[object Number]",p="[object Object]",m="[object RegExp]",b="[object Set]",O="[object String]",x="[object WeakMap]",g="[object ArrayBuffer]",j="[object DataView]",E="[object Float32Array]",A="[object Float64Array]",T="[object Int8Array]",P="[object Int16Array]",_="[object Int32Array]",N="[object Uint8Array]",R="[object Uint8ClampedArray]",I="[object Uint16Array]",W="[object Uint32Array]",q={};q[E]=q[A]=q[T]=q[P]=q[_]=q[N]=q[R]=q[I]=q[W]=!0,q[n]=q[i]=q[g]=q[o]=q[j]=q[u]=q[l]=q[f]=q[d]=q[v]=q[p]=q[m]=q[b]=q[O]=q[x]=!1;function $(U){return r(U)&&t(U.length)&&!!q[e(U)]}return sm=$,sm}var um,q_;function Pk(){if(q_)return um;q_=1;function e(t){return function(r){return t(r)}}return um=e,um}var Ts={exports:{}};Ts.exports;var z_;function xF(){return z_||(z_=1,(function(e,t){var r=HC(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,u=o&&r.process,l=(function(){try{var f=i&&i.require&&i.require("util").types;return f||u&&u.binding&&u.binding("util")}catch{}})();e.exports=l})(Ts,Ts.exports)),Ts.exports}var lm,U_;function jk(){if(U_)return lm;U_=1;var e=bF(),t=Pk(),r=xF(),n=r&&r.isTypedArray,i=n?t(n):e;return lm=i,lm}var cm,W_;function wF(){if(W_)return cm;W_=1;var e=mF(),t=jb(),r=Jt(),n=_k(),i=Eb(),o=jk(),u=Object.prototype,l=u.hasOwnProperty;function f(d,v){var p=r(d),m=!p&&t(d),b=!p&&!m&&n(d),O=!p&&!m&&!b&&o(d),x=p||m||b||O,g=x?e(d.length,String):[],j=g.length;for(var E in d)(v||l.call(d,E))&&!(x&&(E=="length"||b&&(E=="offset"||E=="parent")||O&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||i(E,j)))&&g.push(E);return g}return cm=f,cm}var fm,H_;function SF(){if(H_)return fm;H_=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return fm=t,fm}var dm,K_;function Ek(){if(K_)return dm;K_=1;function e(t,r){return function(n){return t(r(n))}}return dm=e,dm}var pm,V_;function OF(){if(V_)return pm;V_=1;var e=Ek(),t=e(Object.keys,Object);return pm=t,pm}var hm,G_;function _F(){if(G_)return hm;G_=1;var e=SF(),t=OF(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var u=[];for(var l in Object(o))n.call(o,l)&&l!="constructor"&&u.push(l);return u}return hm=i,hm}var vm,X_;function Cu(){if(X_)return vm;X_=1;var e=db(),t=Ab();function r(n){return n!=null&&t(n.length)&&!e(n)}return vm=r,vm}var mm,Y_;function Ff(){if(Y_)return mm;Y_=1;var e=wF(),t=_F(),r=Cu();function n(i){return r(i)?e(i):t(i)}return mm=n,mm}var ym,Q_;function PF(){if(Q_)return ym;Q_=1;var e=dF(),t=vF(),r=Ff();function n(i){return e(i,r,t)}return ym=n,ym}var gm,Z_;function jF(){if(Z_)return gm;Z_=1;var e=PF(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,u,l,f,d,v){var p=l&t,m=e(o),b=m.length,O=e(u),x=O.length;if(b!=x&&!p)return!1;for(var g=b;g--;){var j=m[g];if(!(p?j in u:n.call(u,j)))return!1}var E=v.get(o),A=v.get(u);if(E&&A)return E==u&&A==o;var T=!0;v.set(o,u),v.set(u,o);for(var P=p;++g-1}return Wm=t,Wm}var Hm,PP;function KF(){if(PP)return Hm;PP=1;function e(t,r,n){for(var i=-1,o=t==null?0:t.length;++i=u){var j=d?null:i(f);if(j)return o(j);O=!1,m=n,g=new e}else g=d?[]:x;e:for(;++p=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function uq(e){return e.value}function lq(e,t){if(D.isValidElement(e))return D.cloneElement(e,t);if(typeof e=="function")return D.createElement(e,t);t.ref;var r=oq(t,ZF);return D.createElement(_b,r)}var RP=1,Pn=(function(e){function t(){var r;JF(this,t);for(var n=arguments.length,i=new Array(n),o=0;oRP||Math.abs(i.height-this.lastBoundingBox.height)>RP)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?vn({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,o=i.layout,u=i.align,l=i.verticalAlign,f=i.margin,d=i.chartWidth,v=i.chartHeight,p,m;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(u==="center"&&o==="vertical"){var b=this.getBBoxSnapshot();p={left:((d||0)-b.width)/2}}else p=u==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var O=this.getBBoxSnapshot();m={top:((v||0)-O.height)/2}}else m=l==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return vn(vn({},p),m)}},{key:"render",value:function(){var n=this,i=this.props,o=i.content,u=i.width,l=i.height,f=i.wrapperStyle,d=i.payloadUniqBy,v=i.payload,p=vn(vn({position:"absolute",width:u||"auto",height:l||"auto"},this.getDefaultPosition(f)),f);return D.createElement("div",{className:"recharts-legend-wrapper",style:p,ref:function(b){n.wrapperNode=b}},lq(o,vn(vn({},this.props),{},{payload:Nk(v,d,uq)})))}}],[{key:"getWithHeight",value:function(n,i){var o=vn(vn({},this.defaultProps),n.props),u=o.layout;return u==="vertical"&&le(n.props.height)?{height:n.props.height}:u==="horizontal"?{width:n.props.width||i}:null}}])})(C.PureComponent);qf(Pn,"displayName","Legend");qf(Pn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ym,$P;function cq(){if($P)return Ym;$P=1;var e=Au(),t=jb(),r=Jt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return Ym=i,Ym}var Qm,MP;function Mk(){if(MP)return Qm;MP=1;var e=Ok(),t=cq();function r(n,i,o,u,l){var f=-1,d=n.length;for(o||(o=t),l||(l=[]);++f0&&o(v)?i>1?r(v,i-1,o,u,l):e(l,v):u||(l[l.length]=v)}return l}return Qm=r,Qm}var Zm,IP;function fq(){if(IP)return Zm;IP=1;function e(t){return function(r,n,i){for(var o=-1,u=Object(r),l=i(r),f=l.length;f--;){var d=l[t?f:++o];if(n(u[d],d,u)===!1)break}return r}}return Zm=e,Zm}var Jm,DP;function dq(){if(DP)return Jm;DP=1;var e=fq(),t=e();return Jm=t,Jm}var ey,LP;function Ik(){if(LP)return ey;LP=1;var e=dq(),t=Ff();function r(n,i){return n&&e(n,i,t)}return ey=r,ey}var ty,BP;function pq(){if(BP)return ty;BP=1;var e=Cu();function t(r,n){return function(i,o){if(i==null)return i;if(!e(i))return r(i,o);for(var u=i.length,l=n?u:-1,f=Object(i);(n?l--:++ln||l&&f&&v&&!d&&!p||o&&f&&v||!i&&v||!u)return 1;if(!o&&!l&&!p&&r=d)return v;var p=i[o];return v*(p=="desc"?-1:1)}}return r.index-n.index}return oy=t,oy}var sy,HP;function yq(){if(HP)return sy;HP=1;var e=mb(),t=yb(),r=an(),n=Dk(),i=hq(),o=Pk(),u=mq(),l=Po(),f=Jt();function d(v,p,m){p.length?p=e(p,function(x){return f(x)?function(g){return t(g,x.length===1?x[0]:x)}:x}):p=[l];var b=-1;p=e(p,o(r));var O=n(v,function(x,g,j){var E=e(p,function(A){return A(x)});return{criteria:E,index:++b,value:x}});return i(O,function(x,g){return u(x,g,m)})}return sy=d,sy}var uy,KP;function gq(){if(KP)return uy;KP=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return uy=e,uy}var ly,VP;function bq(){if(VP)return ly;VP=1;var e=gq(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var u=arguments,l=-1,f=t(u.length-i,0),d=Array(f);++l0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return py=n,py}var hy,ZP;function Oq(){if(ZP)return hy;ZP=1;var e=wq(),t=Sq(),r=t(e);return hy=r,hy}var vy,JP;function _q(){if(JP)return vy;JP=1;var e=Po(),t=bq(),r=Oq();function n(i,o){return r(t(i,o,e),i+"")}return vy=n,vy}var my,ej;function zf(){if(ej)return my;ej=1;var e=pb(),t=Cu(),r=Eb(),n=pi();function i(o,u,l){if(!n(l))return!1;var f=typeof u;return(f=="number"?t(l)&&r(u,l.length):f=="string"&&u in l)?e(l[u],o):!1}return my=i,my}var yy,tj;function Pq(){if(tj)return yy;tj=1;var e=Mk(),t=yq(),r=_q(),n=zf(),i=r(function(o,u){if(o==null)return[];var l=u.length;return l>1&&n(o,u[0],u[1])?u=[]:l>2&&n(u[0],u[1],u[2])&&(u=[u[0]]),t(o,e(u,1),[])});return yy=i,yy}var jq=Pq();const kb=Ue(jq);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 Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(gs,"-left"),le(r)&&t&&le(t.x)&&r=t.y),"".concat(gs,"-top"),le(n)&&t&&le(t.y)&&nx?Math.max(v,f[n]):Math.max(p,f[n])}function qq(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function zq(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,o=e.reverseDirection,u=e.tooltipBox,l=e.useTranslate3d,f=e.viewBox,d,v,p;return u.height>0&&u.width>0&&r?(v=ij({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:u.width,viewBox:f,viewBoxDimension:f.width}),p=ij({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:u.height,viewBox:f,viewBoxDimension:f.height}),d=qq({translateX:v,translateY:p,useTranslate3d:l})):d=Bq,{cssProperties:d,cssClasses:Fq({translateX:v,translateY:p,coordinate:r})}}function Ya(e){"@babel/helpers - typeof";return Ya=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},Ya(e)}function aj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function oj(e){for(var t=1;tsj||Math.abs(n.height-this.state.lastBoundingBox.height)>sj)&&this.setState({lastBoundingBox:{width:n.width,height:n.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 n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,o=i.active,u=i.allowEscapeViewBox,l=i.animationDuration,f=i.animationEasing,d=i.children,v=i.coordinate,p=i.hasPayload,m=i.isAnimationActive,b=i.offset,O=i.position,x=i.reverseDirection,g=i.useTranslate3d,j=i.viewBox,E=i.wrapperStyle,A=zq({allowEscapeViewBox:u,coordinate:v,offsetTopLeft:b,position:O,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:j}),T=A.cssClasses,P=A.cssProperties,_=oj(oj({transition:m&&o?"transform ".concat(l,"ms ").concat(f):void 0},P),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&p?"visible":"hidden",position:"absolute",top:0,left:0},E);return D.createElement("div",{tabIndex:-1,className:T,style:_,ref:function(R){n.wrapperNode=R}},d)}}])})(C.PureComponent),Zq=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Zi={isSsr:Zq()};function Qa(e){"@babel/helpers - typeof";return Qa=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},Qa(e)}function uj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lj(e){for(var t=1;t0;return D.createElement(Qq,{allowEscapeViewBox:u,animationDuration:l,animationEasing:f,isAnimationActive:m,active:o,coordinate:v,hasPayload:_,offset:b,position:g,reverseDirection:j,useTranslate3d:E,viewBox:A,wrapperStyle:T},uz(d,lj(lj({},this.props),{},{payload:P})))}}])})(C.PureComponent);Nb(qt,"displayName","Tooltip");Nb(qt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Zi.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 by,cj;function lz(){if(cj)return by;cj=1;var e=nn(),t=function(){return e.Date.now()};return by=t,by}var xy,fj;function cz(){if(fj)return xy;fj=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return xy=t,xy}var wy,dj;function fz(){if(dj)return wy;dj=1;var e=cz(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return wy=r,wy}var Sy,pj;function Uk(){if(pj)return Sy;pj=1;var e=fz(),t=pi(),r=So(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;function f(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var v=typeof d.valueOf=="function"?d.valueOf():d;d=t(v)?v+"":v}if(typeof d!="string")return d===0?d:+d;d=e(d);var p=o.test(d);return p||u.test(d)?l(d.slice(2),p?2:8):i.test(d)?n:+d}return Sy=f,Sy}var Oy,hj;function dz(){if(hj)return Oy;hj=1;var e=pi(),t=lz(),r=Uk(),n="Expected a function",i=Math.max,o=Math.min;function u(l,f,d){var v,p,m,b,O,x,g=0,j=!1,E=!1,A=!0;if(typeof l!="function")throw new TypeError(n);f=r(f)||0,e(d)&&(j=!!d.leading,E="maxWait"in d,m=E?i(r(d.maxWait)||0,f):m,A="trailing"in d?!!d.trailing:A);function T(U){var z=v,V=p;return v=p=void 0,g=U,b=l.apply(V,z),b}function P(U){return g=U,O=setTimeout(R,f),j?T(U):b}function _(U){var z=U-x,V=U-g,Y=f-z;return E?o(Y,m-V):Y}function N(U){var z=U-x,V=U-g;return x===void 0||z>=f||z<0||E&&V>=m}function R(){var U=t();if(N(U))return I(U);O=setTimeout(R,_(U))}function I(U){return O=void 0,A&&v?T(U):(v=p=void 0,b)}function W(){O!==void 0&&clearTimeout(O),g=0,v=x=p=O=void 0}function q(){return O===void 0?b:I(t())}function $(){var U=t(),z=N(U);if(v=arguments,p=this,x=U,z){if(O===void 0)return P(x);if(E)return clearTimeout(O),O=setTimeout(R,f),T(x)}return O===void 0&&(O=setTimeout(R,f)),b}return $.cancel=W,$.flush=q,$}return Oy=u,Oy}var _y,vj;function pz(){if(vj)return _y;vj=1;var e=dz(),t=pi(),r="Expected a function";function n(i,o,u){var l=!0,f=!0;if(typeof i!="function")throw new TypeError(r);return t(u)&&(l="leading"in u?!!u.leading:l,f="trailing"in u?!!u.trailing:f),e(i,o,{leading:l,maxWait:o,trailing:f})}return _y=n,_y}var hz=pz();const Wk=Ue(hz);function Vs(e){"@babel/helpers - typeof";return Vs=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},Vs(e)}function mj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tc(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(U=Wk(U,x,{trailing:!0,leading:!1}));var z=new ResizeObserver(U),V=P.current.getBoundingClientRect(),Y=V.width,J=V.height;return q(Y,J),z.observe(P.current),function(){z.disconnect()}},[q,x]);var $=C.useMemo(function(){var U=I.containerWidth,z=I.containerHeight;if(U<0||z<0)return null;qr(Li(u)||Li(f),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,u,f),qr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var V=Li(u)?U:u,Y=Li(f)?z:f;r&&r>0&&(V?Y=V/r:Y&&(V=Y*r),m&&Y>m&&(Y=m)),qr(V>0||Y>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.`,V,Y,u,f,v,p,r);var J=!Array.isArray(b)&&_n(b.type).endsWith("Chart");return D.Children.map(b,function(K){return D.isValidElement(K)?C.cloneElement(K,tc({width:V,height:Y},J?{style:tc({height:"100%",width:"100%",maxHeight:Y,maxWidth:V},K.props.style)}:{})):K})},[r,b,f,m,p,v,I,u]);return D.createElement("div",{id:g?"".concat(g):void 0,className:Me("recharts-responsive-container",j),style:tc(tc({},T),{},{width:u,height:f,minWidth:v,minHeight:p,maxHeight:m}),ref:P},$)}),ku=function(t){return null};ku.displayName="Cell";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 gj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gg(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Zi.isSsr)return{width:0,height:0};var n=Az(r),i=JSON.stringify({text:t,copyStyle:n});if(Ca.widthCache[i])return Ca.widthCache[i];try{var o=document.getElementById(bj);o||(o=document.createElement("span"),o.setAttribute("id",bj),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var u=Gg(Gg({},Ez),n);Object.assign(o.style,u),o.textContent="".concat(t);var l=o.getBoundingClientRect(),f={width:l.width,height:l.height};return Ca.widthCache[i]=f,++Ca.cacheCount>jz&&(Ca.cacheCount=0,Ca.widthCache={}),f}catch{return{width:0,height:0}}},Tz=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Xs(e){"@babel/helpers - typeof";return Xs=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},Xs(e)}function Ac(e,t){return Rz(e)||Nz(e,t)||kz(e,t)||Cz()}function Cz(){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 kz(e,t){if(e){if(typeof e=="string")return xj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xj(e,t)}}function xj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Vz(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function jj(e,t){return Qz(e)||Yz(e,t)||Xz(e,t)||Gz()}function Gz(){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 Xz(e,t){if(e){if(typeof e=="string")return Ej(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ej(e,t)}}function Ej(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return V.reduce(function(Y,J){var K=J.word,ee=J.width,Z=Y[Y.length-1];if(Z&&(i==null||o||Z.width+ee+nJ.width?Y:J})};if(!v)return b;for(var x="…",g=function(V){var Y=p.slice(0,V),J=Gk({breakAll:d,style:f,children:Y+x}).wordsWithComputedWidth,K=m(J),ee=K.length>u||O(K).width>Number(i);return[ee,K]},j=0,E=p.length-1,A=0,T;j<=E&&A<=p.length-1;){var P=Math.floor((j+E)/2),_=P-1,N=g(_),R=jj(N,2),I=R[0],W=R[1],q=g(P),$=jj(q,1),U=$[0];if(!I&&!U&&(j=P+1),I&&U&&(E=P-1),!I&&U){T=W;break}A++}return T||b},Aj=function(t){var r=ke(t)?[]:t.toString().split(Vk);return[{words:r}]},Jz=function(t){var r=t.width,n=t.scaleToFit,i=t.children,o=t.style,u=t.breakAll,l=t.maxLines;if((r||n)&&!Zi.isSsr){var f,d,v=Gk({breakAll:u,children:i,style:o});if(v){var p=v.wordsWithComputedWidth,m=v.spaceWidth;f=p,d=m}else return Aj(i);return Zz({breakAll:u,children:i,maxLines:l,style:o},f,d,r,n)}return Aj(i)},Tj="#808080",Ki=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,o=i===void 0?0:i,u=t.lineHeight,l=u===void 0?"1em":u,f=t.capHeight,d=f===void 0?"0.71em":f,v=t.scaleToFit,p=v===void 0?!1:v,m=t.textAnchor,b=m===void 0?"start":m,O=t.verticalAnchor,x=O===void 0?"end":O,g=t.fill,j=g===void 0?Tj:g,E=Pj(t,Hz),A=C.useMemo(function(){return Jz({breakAll:E.breakAll,children:E.children,maxLines:E.maxLines,scaleToFit:p,style:E.style,width:E.width})},[E.breakAll,E.children,E.maxLines,p,E.style,E.width]),T=E.dx,P=E.dy,_=E.angle,N=E.className,R=E.breakAll,I=Pj(E,Kz);if(!St(n)||!St(o))return null;var W=n+(le(T)?T:0),q=o+(le(P)?P:0),$;switch(x){case"start":$=Py("calc(".concat(d,")"));break;case"middle":$=Py("calc(".concat((A.length-1)/2," * -").concat(l," + (").concat(d," / 2))"));break;default:$=Py("calc(".concat(A.length-1," * -").concat(l,")"));break}var U=[];if(p){var z=A[0].width,V=E.width;U.push("scale(".concat((le(V)?V/z:1)/z,")"))}return _&&U.push("rotate(".concat(_,", ").concat(W,", ").concat(q,")")),U.length&&(I.transform=U.join(" ")),D.createElement("text",Xg({},Se(I,!0),{x:W,y:q,className:Me("recharts-text",N),textAnchor:b,fill:j.includes("url")?Tj:j}),A.map(function(Y,J){var K=Y.words.join(R?"":" ");return D.createElement("tspan",{x:W,dy:J===0?$:l,key:"".concat(K,"-").concat(J)},K)}))};function li(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function eU(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Rb(e){let t,r,n;e.length!==2?(t=li,r=(l,f)=>li(e(l),f),n=(l,f)=>e(l)-f):(t=e===li||e===eU?e:tU,r=e,n=e);function i(l,f,d=0,v=l.length){if(d>>1;r(l[p],f)<0?d=p+1:v=p}while(d>>1;r(l[p],f)<=0?d=p+1:v=p}while(dd&&n(l[p-1],f)>-n(l[p],f)?p-1:p}return{left:i,center:u,right:o}}function tU(){return 0}function Xk(e){return e===null?NaN:+e}function*rU(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const nU=Rb(li),Nu=nU.right;Rb(Xk).center;class Cj extends Map{constructor(t,r=oU){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(kj(this,t))}has(t){return super.has(kj(this,t))}set(t,r){return super.set(iU(this,t),r)}delete(t){return super.delete(aU(this,t))}}function kj({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function iU({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function aU({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function oU(e){return e!==null&&typeof e=="object"?e.valueOf():e}function sU(e=li){if(e===li)return Yk;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function Yk(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const uU=Math.sqrt(50),lU=Math.sqrt(10),cU=Math.sqrt(2);function Tc(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),u=o>=uU?10:o>=lU?5:o>=cU?2:1;let l,f,d;return i<0?(d=Math.pow(10,-i)/u,l=Math.round(e*d),f=Math.round(t*d),l/dt&&--f,d=-d):(d=Math.pow(10,i)*u,l=Math.round(e/d),f=Math.round(t/d),l*dt&&--f),f0))return[];if(e===t)return[e];const n=t=i))return[];const l=o-i+1,f=new Array(l);if(n)if(u<0)for(let d=0;d=n)&&(r=n);return r}function Rj(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Qk(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?Yk:sU(i);n>r;){if(n-r>600){const f=n-r+1,d=t-r+1,v=Math.log(f),p=.5*Math.exp(2*v/3),m=.5*Math.sqrt(v*p*(f-p)/f)*(d-f/2<0?-1:1),b=Math.max(r,Math.floor(t-d*p/f+m)),O=Math.min(n,Math.floor(t+(f-d)*p/f+m));Qk(e,t,b,O,i)}const o=e[t];let u=r,l=n;for(bs(e,r,t),i(e[n],o)>0&&bs(e,r,n);u0;)--l}i(e[r],o)===0?bs(e,r,l):(++l,bs(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function bs(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function fU(e,t,r){if(e=Float64Array.from(rU(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Rj(e);if(t>=1)return Nj(e);var n,i=(n-1)*t,o=Math.floor(i),u=Nj(Qk(e,o).subarray(0,o+1)),l=Rj(e.subarray(o+1));return u+(l-u)*(i-o)}}function dU(e,t,r=Xk){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),u=+r(e[o],o,e),l=+r(e[o+1],o+1,e);return u+(l-u)*(i-o)}}function pU(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?nc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?nc(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=vU.exec(e))?new Zt(t[1],t[2],t[3],1):(t=mU.exec(e))?new Zt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=yU.exec(e))?nc(t[1],t[2],t[3],t[4]):(t=gU.exec(e))?nc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=bU.exec(e))?Fj(t[1],t[2]/100,t[3]/100,1):(t=xU.exec(e))?Fj(t[1],t[2]/100,t[3]/100,t[4]):$j.hasOwnProperty(e)?Dj($j[e]):e==="transparent"?new Zt(NaN,NaN,NaN,0):null}function Dj(e){return new Zt(e>>16&255,e>>8&255,e&255,1)}function nc(e,t,r,n){return n<=0&&(e=t=r=NaN),new Zt(e,t,r,n)}function OU(e){return e instanceof Ru||(e=Js(e)),e?(e=e.rgb(),new Zt(e.r,e.g,e.b,e.opacity)):new Zt}function e0(e,t,r,n){return arguments.length===1?OU(e):new Zt(e,t,r,n??1)}function Zt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Mb(Zt,e0,Jk(Ru,{brighter(e){return e=e==null?Cc:Math.pow(Cc,e),new Zt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Qs:Math.pow(Qs,e),new Zt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Zt(zi(this.r),zi(this.g),zi(this.b),kc(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:Lj,formatHex:Lj,formatHex8:_U,formatRgb:Bj,toString:Bj}));function Lj(){return`#${Bi(this.r)}${Bi(this.g)}${Bi(this.b)}`}function _U(){return`#${Bi(this.r)}${Bi(this.g)}${Bi(this.b)}${Bi((isNaN(this.opacity)?1:this.opacity)*255)}`}function Bj(){const e=kc(this.opacity);return`${e===1?"rgb(":"rgba("}${zi(this.r)}, ${zi(this.g)}, ${zi(this.b)}${e===1?")":`, ${e})`}`}function kc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Bi(e){return e=zi(e),(e<16?"0":"")+e.toString(16)}function Fj(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Br(e,t,r,n)}function eN(e){if(e instanceof Br)return new Br(e.h,e.s,e.l,e.opacity);if(e instanceof Ru||(e=Js(e)),!e)return new Br;if(e instanceof Br)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),u=NaN,l=o-i,f=(o+i)/2;return l?(t===o?u=(r-n)/l+(r0&&f<1?0:u,new Br(u,l,f,e.opacity)}function PU(e,t,r,n){return arguments.length===1?eN(e):new Br(e,t,r,n??1)}function Br(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Mb(Br,PU,Jk(Ru,{brighter(e){return e=e==null?Cc:Math.pow(Cc,e),new Br(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Qs:Math.pow(Qs,e),new Br(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Zt(jy(e>=240?e-240:e+120,i,n),jy(e,i,n),jy(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Br(qj(this.h),ic(this.s),ic(this.l),kc(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=kc(this.opacity);return`${e===1?"hsl(":"hsla("}${qj(this.h)}, ${ic(this.s)*100}%, ${ic(this.l)*100}%${e===1?")":`, ${e})`}`}}));function qj(e){return e=(e||0)%360,e<0?e+360:e}function ic(e){return Math.max(0,Math.min(1,e||0))}function jy(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Ib=e=>()=>e;function jU(e,t){return function(r){return e+r*t}}function EU(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function AU(e){return(e=+e)==1?tN:function(t,r){return r-t?EU(t,r,e):Ib(isNaN(t)?r:t)}}function tN(e,t){var r=t-e;return r?jU(e,r):Ib(isNaN(e)?t:e)}const zj=(function e(t){var r=AU(t);function n(i,o){var u=r((i=e0(i)).r,(o=e0(o)).r),l=r(i.g,o.g),f=r(i.b,o.b),d=tN(i.opacity,o.opacity);return function(v){return i.r=u(v),i.g=l(v),i.b=f(v),i.opacity=d(v),i+""}}return n.gamma=e,n})(1);function TU(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;ir&&(o=t.slice(r,o),l[u]?l[u]+=o:l[++u]=o),(n=n[0])===(i=i[0])?l[u]?l[u]+=i:l[++u]=i:(l[++u]=null,f.push({i:u,x:Nc(n,i)})),r=Ey.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function FU(e,t,r){var n=e[0],i=e[1],o=t[0],u=t[1];return i2?qU:FU,f=d=null,p}function p(m){return m==null||isNaN(m=+m)?o:(f||(f=l(e.map(n),t,r)))(n(u(m)))}return p.invert=function(m){return u(i((d||(d=l(t,e.map(n),Nc)))(m)))},p.domain=function(m){return arguments.length?(e=Array.from(m,Rc),v()):e.slice()},p.range=function(m){return arguments.length?(t=Array.from(m),v()):t.slice()},p.rangeRound=function(m){return t=Array.from(m),r=Db,v()},p.clamp=function(m){return arguments.length?(u=m?!0:Wt,v()):u!==Wt},p.interpolate=function(m){return arguments.length?(r=m,v()):r},p.unknown=function(m){return arguments.length?(o=m,p):o},function(m,b){return n=m,i=b,v()}}function Lb(){return Uf()(Wt,Wt)}function zU(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function $c(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Za(e){return e=$c(Math.abs(e)),e?e[1]:NaN}function UU(e,t){return function(r,n){for(var i=r.length,o=[],u=0,l=e[0],f=0;i>0&&l>0&&(f+l+1>n&&(l=Math.max(1,n-f)),o.push(r.substring(i-=l,i+l)),!((f+=l+1)>n));)l=e[u=(u+1)%e.length];return o.reverse().join(t)}}function WU(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var HU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function eu(e){if(!(t=HU.exec(e)))throw new Error("invalid format: "+e);var t;return new Bb({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]})}eu.prototype=Bb.prototype;function Bb(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+""}Bb.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 KU(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Mc;function VU(e,t){var r=$c(e,t);if(!r)return Mc=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(Mc=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,u=n.length;return o===u?n:o>u?n+new Array(o-u+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+$c(e,Math.max(0,t+o-1))[0]}function Wj(e,t){var r=$c(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const Hj={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:zU,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)=>Wj(e*100,t),r:Wj,s:VU,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Kj(e){return e}var Vj=Array.prototype.map,Gj=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function GU(e){var t=e.grouping===void 0||e.thousands===void 0?Kj:UU(Vj.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Kj:WU(Vj.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function d(p,m){p=eu(p);var b=p.fill,O=p.align,x=p.sign,g=p.symbol,j=p.zero,E=p.width,A=p.comma,T=p.precision,P=p.trim,_=p.type;_==="n"?(A=!0,_="g"):Hj[_]||(T===void 0&&(T=12),P=!0,_="g"),(j||b==="0"&&O==="=")&&(j=!0,b="0",O="=");var N=(m&&m.prefix!==void 0?m.prefix:"")+(g==="$"?r:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():""),R=(g==="$"?n:/[%p]/.test(_)?u:"")+(m&&m.suffix!==void 0?m.suffix:""),I=Hj[_],W=/[defgprs%]/.test(_);T=T===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function q($){var U=N,z=R,V,Y,J;if(_==="c")z=I($)+z,$="";else{$=+$;var K=$<0||1/$<0;if($=isNaN($)?f:I(Math.abs($),T),P&&($=KU($)),K&&+$==0&&x!=="+"&&(K=!1),U=(K?x==="("?x:l:x==="-"||x==="("?"":x)+U,z=(_==="s"&&!isNaN($)&&Mc!==void 0?Gj[8+Mc/3]:"")+z+(K&&x==="("?")":""),W){for(V=-1,Y=$.length;++VJ||J>57){z=(J===46?i+$.slice(V+1):$.slice(V))+z,$=$.slice(0,V);break}}}A&&!j&&($=t($,1/0));var ee=U.length+$.length+z.length,Z=ee>1)+U+$+z+Z.slice(ee);break;default:$=Z+U+$+z;break}return o($)}return q.toString=function(){return p+""},q}function v(p,m){var b=Math.max(-8,Math.min(8,Math.floor(Za(m)/3)))*3,O=Math.pow(10,-b),x=d((p=eu(p),p.type="f",p),{suffix:Gj[8+b/3]});return function(g){return x(O*g)}}return{format:d,formatPrefix:v}}var ac,Fb,rN;XU({thousands:",",grouping:[3],currency:["$",""]});function XU(e){return ac=GU(e),Fb=ac.format,rN=ac.formatPrefix,ac}function YU(e){return Math.max(0,-Za(Math.abs(e)))}function QU(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Za(t)/3)))*3-Za(Math.abs(e)))}function ZU(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Za(t)-Za(e))+1}function nN(e,t,r,n){var i=Zg(e,t,r),o;switch(n=eu(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=QU(i,u))&&(n.precision=o),rN(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=ZU(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=YU(i))&&(n.precision=o-(n.type==="%")*2);break}}return Fb(n)}function hi(e){var t=e.domain;return e.ticks=function(r){var n=t();return Yg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return nN(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,u=n[i],l=n[o],f,d,v=10;for(l0;){if(d=Qg(u,l,r),d===f)return n[i]=u,n[o]=l,t(n);if(d>0)u=Math.floor(u/d)*d,l=Math.ceil(l/d)*d;else if(d<0)u=Math.ceil(u*d)/d,l=Math.floor(l*d)/d;else break;f=d}return e},e}function Ic(){var e=Lb();return e.copy=function(){return $u(e,Ic())},_r.apply(e,arguments),hi(e)}function iN(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Rc),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return iN(e).unknown(t)},e=arguments.length?Array.from(e,Rc):[0,1],hi(r)}function aN(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],u;return oMath.pow(e,t)}function n4(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 Qj(e){return(t,r)=>-e(-t,r)}function qb(e){const t=e(Xj,Yj),r=t.domain;let n=10,i,o;function u(){return i=n4(n),o=r4(n),r()[0]<0?(i=Qj(i),o=Qj(o),e(JU,e4)):e(Xj,Yj),t}return t.base=function(l){return arguments.length?(n=+l,u()):n},t.domain=function(l){return arguments.length?(r(l),u()):r()},t.ticks=l=>{const f=r();let d=f[0],v=f[f.length-1];const p=v0){for(;m<=b;++m)for(O=1;Ov)break;j.push(x)}}else for(;m<=b;++m)for(O=n-1;O>=1;--O)if(x=m>0?O/o(-m):O*o(m),!(xv)break;j.push(x)}j.length*2{if(l==null&&(l=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=eu(f)).precision==null&&(f.trim=!0),f=Fb(f)),l===1/0)return f;const d=Math.max(1,n*l/t.ticks().length);return v=>{let p=v/o(Math.round(i(v)));return p*nr(aN(r(),{floor:l=>o(Math.floor(i(l))),ceil:l=>o(Math.ceil(i(l)))})),t}function oN(){const e=qb(Uf()).domain([1,10]);return e.copy=()=>$u(e,oN()).base(e.base()),_r.apply(e,arguments),e}function Zj(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Jj(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function zb(e){var t=1,r=e(Zj(t),Jj(t));return r.constant=function(n){return arguments.length?e(Zj(t=+n),Jj(t)):t},hi(r)}function sN(){var e=zb(Uf());return e.copy=function(){return $u(e,sN()).constant(e.constant())},_r.apply(e,arguments)}function eE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function i4(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function a4(e){return e<0?-e*e:e*e}function Ub(e){var t=e(Wt,Wt),r=1;function n(){return r===1?e(Wt,Wt):r===.5?e(i4,a4):e(eE(r),eE(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},hi(t)}function Wb(){var e=Ub(Uf());return e.copy=function(){return $u(e,Wb()).exponent(e.exponent())},_r.apply(e,arguments),e}function o4(){return Wb.apply(null,arguments).exponent(.5)}function tE(e){return Math.sign(e)*e*e}function s4(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function uN(){var e=Lb(),t=[0,1],r=!1,n;function i(o){var u=s4(e(o));return isNaN(u)?n:r?Math.round(u):u}return i.invert=function(o){return e.invert(tE(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Rc)).map(tE)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return uN(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},_r.apply(i,arguments),hi(i)}function lN(){var e=[],t=[],r=[],n;function i(){var u=0,l=Math.max(1,t.length);for(r=new Array(l-1);++u0?r[l-1]:e[0],l=r?[n[r-1],t]:[n[d-1],n[d]]},u.unknown=function(f){return arguments.length&&(o=f),u},u.thresholds=function(){return n.slice()},u.copy=function(){return cN().domain([e,t]).range(i).unknown(o)},_r.apply(hi(u),arguments)}function fN(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[Nu(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var u=t.indexOf(o);return[e[u-1],e[u]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return fN().domain(e).range(t).unknown(r)},_r.apply(i,arguments)}const Ay=new Date,Ty=new Date;function Ot(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const u=i(o),l=i.ceil(o);return o-u(t(o=new Date(+o),u==null?1:Math.floor(u)),o),i.range=(o,u,l)=>{const f=[];if(o=i.ceil(o),l=l==null?1:Math.floor(l),!(o0))return f;let d;do f.push(d=new Date(+o)),t(o,l),e(o);while(dOt(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,l)=>{if(u>=u)if(l<0)for(;++l<=0;)for(;t(u,-1),!o(u););else for(;--l>=0;)for(;t(u,1),!o(u););}),r&&(i.count=(o,u)=>(Ay.setTime(+o),Ty.setTime(+u),e(Ay),e(Ty),Math.floor(r(Ay,Ty))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?u=>n(u)%o===0:u=>i.count(0,u)%o===0):i)),i}const Dc=Ot(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Dc.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ot(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Dc);Dc.range;const xn=1e3,Sr=xn*60,wn=Sr*60,An=wn*24,Hb=An*7,rE=An*30,Cy=An*365,Fi=Ot(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*xn)},(e,t)=>(t-e)/xn,e=>e.getUTCSeconds());Fi.range;const Kb=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xn)},(e,t)=>{e.setTime(+e+t*Sr)},(e,t)=>(t-e)/Sr,e=>e.getMinutes());Kb.range;const Vb=Ot(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Sr)},(e,t)=>(t-e)/Sr,e=>e.getUTCMinutes());Vb.range;const Gb=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xn-e.getMinutes()*Sr)},(e,t)=>{e.setTime(+e+t*wn)},(e,t)=>(t-e)/wn,e=>e.getHours());Gb.range;const Xb=Ot(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*wn)},(e,t)=>(t-e)/wn,e=>e.getUTCHours());Xb.range;const Mu=Ot(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Sr)/An,e=>e.getDate()-1);Mu.range;const Wf=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/An,e=>e.getUTCDate()-1);Wf.range;const dN=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/An,e=>Math.floor(e/An));dN.range;function Ji(e){return Ot(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Sr)/Hb)}const Hf=Ji(0),Lc=Ji(1),u4=Ji(2),l4=Ji(3),Ja=Ji(4),c4=Ji(5),f4=Ji(6);Hf.range;Lc.range;u4.range;l4.range;Ja.range;c4.range;f4.range;function ea(e){return Ot(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Hb)}const Kf=ea(0),Bc=ea(1),d4=ea(2),p4=ea(3),eo=ea(4),h4=ea(5),v4=ea(6);Kf.range;Bc.range;d4.range;p4.range;eo.range;h4.range;v4.range;const Yb=Ot(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());Yb.range;const Qb=Ot(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());Qb.range;const Tn=Ot(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());Tn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Tn.range;const Cn=Ot(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());Cn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Cn.range;function pN(e,t,r,n,i,o){const u=[[Fi,1,xn],[Fi,5,5*xn],[Fi,15,15*xn],[Fi,30,30*xn],[o,1,Sr],[o,5,5*Sr],[o,15,15*Sr],[o,30,30*Sr],[i,1,wn],[i,3,3*wn],[i,6,6*wn],[i,12,12*wn],[n,1,An],[n,2,2*An],[r,1,Hb],[t,1,rE],[t,3,3*rE],[e,1,Cy]];function l(d,v,p){const m=vg).right(u,m);if(b===u.length)return e.every(Zg(d/Cy,v/Cy,p));if(b===0)return Dc.every(Math.max(Zg(d,v,p),1));const[O,x]=u[m/u[b-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?(Ne=Ny(xs(ne.y,0,1)),Ce=Ne.getUTCDay(),Ne=Ce>4||Ce===0?Bc.ceil(Ne):Bc(Ne),Ne=Wf.offset(Ne,(ne.V-1)*7),ne.y=Ne.getUTCFullYear(),ne.m=Ne.getUTCMonth(),ne.d=Ne.getUTCDate()+(ne.w+6)%7):(Ne=ky(xs(ne.y,0,1)),Ce=Ne.getDay(),Ne=Ce>4||Ce===0?Lc.ceil(Ne):Lc(Ne),Ne=Mu.offset(Ne,(ne.V-1)*7),ne.y=Ne.getFullYear(),ne.m=Ne.getMonth(),ne.d=Ne.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ce="Z"in ne?Ny(xs(ne.y,0,1)).getUTCDay():ky(xs(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Ce+5)%7:ne.w+ne.U*7-(Ce+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,Ny(ne)):ky(ne)}}function R(ae,ge,Te,ne){for(var We=0,Ne=ge.length,Ce=Te.length,Je,st;We=Ce)return-1;if(Je=ge.charCodeAt(We++),Je===37){if(Je=ge.charAt(We++),st=P[Je in nE?ge.charAt(We++):Je],!st||(ne=st(ae,Te,ne))<0)return-1}else if(Je!=Te.charCodeAt(ne++))return-1}return ne}function I(ae,ge,Te){var ne=d.exec(ge.slice(Te));return ne?(ae.p=v.get(ne[0].toLowerCase()),Te+ne[0].length):-1}function W(ae,ge,Te){var ne=b.exec(ge.slice(Te));return ne?(ae.w=O.get(ne[0].toLowerCase()),Te+ne[0].length):-1}function q(ae,ge,Te){var ne=p.exec(ge.slice(Te));return ne?(ae.w=m.get(ne[0].toLowerCase()),Te+ne[0].length):-1}function $(ae,ge,Te){var ne=j.exec(ge.slice(Te));return ne?(ae.m=E.get(ne[0].toLowerCase()),Te+ne[0].length):-1}function U(ae,ge,Te){var ne=x.exec(ge.slice(Te));return ne?(ae.m=g.get(ne[0].toLowerCase()),Te+ne[0].length):-1}function z(ae,ge,Te){return R(ae,t,ge,Te)}function V(ae,ge,Te){return R(ae,r,ge,Te)}function Y(ae,ge,Te){return R(ae,n,ge,Te)}function J(ae){return u[ae.getDay()]}function K(ae){return o[ae.getDay()]}function ee(ae){return f[ae.getMonth()]}function Z(ae){return l[ae.getMonth()]}function L(ae){return i[+(ae.getHours()>=12)]}function H(ae){return 1+~~(ae.getMonth()/3)}function oe(ae){return u[ae.getUTCDay()]}function ce(ae){return o[ae.getUTCDay()]}function me(ae){return f[ae.getUTCMonth()]}function Pe(ae){return l[ae.getUTCMonth()]}function Le(ae){return i[+(ae.getUTCHours()>=12)]}function Ae(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var ge=_(ae+="",A);return ge.toString=function(){return ae},ge},parse:function(ae){var ge=N(ae+="",!1);return ge.toString=function(){return ae},ge},utcFormat:function(ae){var ge=_(ae+="",T);return ge.toString=function(){return ae},ge},utcParse:function(ae){var ge=N(ae+="",!0);return ge.toString=function(){return ae},ge}}}var nE={"-":"",_:" ",0:"0"},Tt=/^\s*\d+/,w4=/^%/,S4=/[\\^$*+?|[\]().{}]/g;function ze(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[t.toLowerCase(),r]))}function _4(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function P4(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function j4(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function E4(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function A4(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function iE(e,t,r){var n=Tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function aE(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function T4(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function C4(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function k4(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function oE(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function N4(e,t,r){var n=Tt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function sE(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function R4(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function $4(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function M4(e,t,r){var n=Tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function I4(e,t,r){var n=Tt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function D4(e,t,r){var n=w4.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function L4(e,t,r){var n=Tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function B4(e,t,r){var n=Tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function uE(e,t){return ze(e.getDate(),t,2)}function F4(e,t){return ze(e.getHours(),t,2)}function q4(e,t){return ze(e.getHours()%12||12,t,2)}function z4(e,t){return ze(1+Mu.count(Tn(e),e),t,3)}function hN(e,t){return ze(e.getMilliseconds(),t,3)}function U4(e,t){return hN(e,t)+"000"}function W4(e,t){return ze(e.getMonth()+1,t,2)}function H4(e,t){return ze(e.getMinutes(),t,2)}function K4(e,t){return ze(e.getSeconds(),t,2)}function V4(e){var t=e.getDay();return t===0?7:t}function G4(e,t){return ze(Hf.count(Tn(e)-1,e),t,2)}function vN(e){var t=e.getDay();return t>=4||t===0?Ja(e):Ja.ceil(e)}function X4(e,t){return e=vN(e),ze(Ja.count(Tn(e),e)+(Tn(e).getDay()===4),t,2)}function Y4(e){return e.getDay()}function Q4(e,t){return ze(Lc.count(Tn(e)-1,e),t,2)}function Z4(e,t){return ze(e.getFullYear()%100,t,2)}function J4(e,t){return e=vN(e),ze(e.getFullYear()%100,t,2)}function e8(e,t){return ze(e.getFullYear()%1e4,t,4)}function t8(e,t){var r=e.getDay();return e=r>=4||r===0?Ja(e):Ja.ceil(e),ze(e.getFullYear()%1e4,t,4)}function r8(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ze(t/60|0,"0",2)+ze(t%60,"0",2)}function lE(e,t){return ze(e.getUTCDate(),t,2)}function n8(e,t){return ze(e.getUTCHours(),t,2)}function i8(e,t){return ze(e.getUTCHours()%12||12,t,2)}function a8(e,t){return ze(1+Wf.count(Cn(e),e),t,3)}function mN(e,t){return ze(e.getUTCMilliseconds(),t,3)}function o8(e,t){return mN(e,t)+"000"}function s8(e,t){return ze(e.getUTCMonth()+1,t,2)}function u8(e,t){return ze(e.getUTCMinutes(),t,2)}function l8(e,t){return ze(e.getUTCSeconds(),t,2)}function c8(e){var t=e.getUTCDay();return t===0?7:t}function f8(e,t){return ze(Kf.count(Cn(e)-1,e),t,2)}function yN(e){var t=e.getUTCDay();return t>=4||t===0?eo(e):eo.ceil(e)}function d8(e,t){return e=yN(e),ze(eo.count(Cn(e),e)+(Cn(e).getUTCDay()===4),t,2)}function p8(e){return e.getUTCDay()}function h8(e,t){return ze(Bc.count(Cn(e)-1,e),t,2)}function v8(e,t){return ze(e.getUTCFullYear()%100,t,2)}function m8(e,t){return e=yN(e),ze(e.getUTCFullYear()%100,t,2)}function y8(e,t){return ze(e.getUTCFullYear()%1e4,t,4)}function g8(e,t){var r=e.getUTCDay();return e=r>=4||r===0?eo(e):eo.ceil(e),ze(e.getUTCFullYear()%1e4,t,4)}function b8(){return"+0000"}function cE(){return"%"}function fE(e){return+e}function dE(e){return Math.floor(+e/1e3)}var ka,gN,bN;x8({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 x8(e){return ka=x4(e),gN=ka.format,ka.parse,bN=ka.utcFormat,ka.utcParse,ka}function w8(e){return new Date(e)}function S8(e){return e instanceof Date?+e:+new Date(+e)}function Zb(e,t,r,n,i,o,u,l,f,d){var v=Lb(),p=v.invert,m=v.domain,b=d(".%L"),O=d(":%S"),x=d("%I:%M"),g=d("%I %p"),j=d("%a %d"),E=d("%b %d"),A=d("%B"),T=d("%Y");function P(_){return(f(_)<_?b:l(_)<_?O:u(_)<_?x:o(_)<_?g:n(_)<_?i(_)<_?j:E:r(_)<_?A:T)(_)}return v.invert=function(_){return new Date(p(_))},v.domain=function(_){return arguments.length?m(Array.from(_,S8)):m().map(w8)},v.ticks=function(_){var N=m();return e(N[0],N[N.length-1],_??10)},v.tickFormat=function(_,N){return N==null?P:d(N)},v.nice=function(_){var N=m();return(!_||typeof _.range!="function")&&(_=t(N[0],N[N.length-1],_??10)),_?m(aN(N,_)):v},v.copy=function(){return $u(v,Zb(e,t,r,n,i,o,u,l,f,d))},v}function O8(){return _r.apply(Zb(g4,b4,Tn,Yb,Hf,Mu,Gb,Kb,Fi,gN).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function _8(){return _r.apply(Zb(m4,y4,Cn,Qb,Kf,Wf,Xb,Vb,Fi,bN).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Vf(){var e=0,t=1,r,n,i,o,u=Wt,l=!1,f;function d(p){return p==null||isNaN(p=+p)?f:u(i===0?.5:(p=(o(p)-r)*i,l?Math.max(0,Math.min(1,p)):p))}d.domain=function(p){return arguments.length?([e,t]=p,r=o(e=+e),n=o(t=+t),i=r===n?0:1/(n-r),d):[e,t]},d.clamp=function(p){return arguments.length?(l=!!p,d):l},d.interpolator=function(p){return arguments.length?(u=p,d):u};function v(p){return function(m){var b,O;return arguments.length?([b,O]=m,u=p(b,O),d):[u(0),u(1)]}}return d.range=v(jo),d.rangeRound=v(Db),d.unknown=function(p){return arguments.length?(f=p,d):f},function(p){return o=p,r=p(e),n=p(t),i=r===n?0:1/(n-r),d}}function vi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function xN(){var e=hi(Vf()(Wt));return e.copy=function(){return vi(e,xN())},Dn.apply(e,arguments)}function wN(){var e=qb(Vf()).domain([1,10]);return e.copy=function(){return vi(e,wN()).base(e.base())},Dn.apply(e,arguments)}function SN(){var e=zb(Vf());return e.copy=function(){return vi(e,SN()).constant(e.constant())},Dn.apply(e,arguments)}function Jb(){var e=Ub(Vf());return e.copy=function(){return vi(e,Jb()).exponent(e.exponent())},Dn.apply(e,arguments)}function P8(){return Jb.apply(null,arguments).exponent(.5)}function ON(){var e=[],t=Wt;function r(n){if(n!=null&&!isNaN(n=+n))return t((Nu(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(li),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>fU(e,o/n))},r.copy=function(){return ON(t).domain(e)},Dn.apply(r,arguments)}function Gf(){var e=0,t=.5,r=1,n=1,i,o,u,l,f,d=Wt,v,p=!1,m;function b(x){return isNaN(x=+x)?m:(x=.5+((x=+v(x))-o)*(n*xr}return $y=e,$y}var My,mE;function E8(){if(mE)return My;mE=1;var e=Xf(),t=EN(),r=Po();function n(i){return i&&i.length?e(i,r,t):void 0}return My=n,My}var A8=E8();const Yf=Ue(A8);var Iy,yE;function AN(){if(yE)return Iy;yE=1;function e(t,r){return te.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};pe.decimalPlaces=pe.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*rt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};pe.dividedBy=pe.div=function(e){return jn(this,new this.constructor(e))};pe.dividedToIntegerBy=pe.idiv=function(e){var t=this,r=t.constructor;return Ge(jn(t,new r(e),0,1),r.precision)};pe.equals=pe.eq=function(e){return!this.cmp(e)};pe.exponent=function(){return mt(this)};pe.greaterThan=pe.gt=function(e){return this.cmp(e)>0};pe.greaterThanOrEqualTo=pe.gte=function(e){return this.cmp(e)>=0};pe.isInteger=pe.isint=function(){return this.e>this.d.length-2};pe.isNegative=pe.isneg=function(){return this.s<0};pe.isPositive=pe.ispos=function(){return this.s>0};pe.isZero=function(){return this.s===0};pe.lessThan=pe.lt=function(e){return this.cmp(e)<0};pe.lessThanOrEqualTo=pe.lte=function(e){return this.cmp(e)<1};pe.logarithm=pe.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(lr))throw Error(Or+"NaN");if(r.s<1)throw Error(Or+(r.s?"NaN":"-Infinity"));return r.eq(lr)?new n(0):(it=!1,t=jn(tu(r,o),tu(e,o),o),it=!0,Ge(t,i))};pe.minus=pe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?NN(t,e):CN(t,(e.s=-e.s,e))};pe.modulo=pe.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Or+"NaN");return r.s?(it=!1,t=jn(r,e,0,1).times(e),it=!0,r.minus(t)):Ge(new n(r),i)};pe.naturalExponential=pe.exp=function(){return kN(this)};pe.naturalLogarithm=pe.ln=function(){return tu(this)};pe.negated=pe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};pe.plus=pe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?CN(t,e):NN(t,(e.s=-e.s,e))};pe.precision=pe.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ui+e);if(t=mt(i)+1,n=i.d.length-1,r=n*rt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};pe.squareRoot=pe.sqrt=function(){var e,t,r,n,i,o,u,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(Or+"NaN")}for(e=mt(l),it=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=Qr(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ao((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=u=r+3;;)if(o=n,n=o.plus(jn(l,o,u+2)).times(.5),Qr(o.d).slice(0,u)===(t=Qr(n.d)).slice(0,u)){if(t=t.slice(u-3,u+1),i==u&&t=="4999"){if(Ge(o,r+1,0),o.times(o).eq(l)){n=o;break}}else if(t!="9999")break;u+=4}return it=!0,Ge(n,r)};pe.times=pe.mul=function(e){var t,r,n,i,o,u,l,f,d,v=this,p=v.constructor,m=v.d,b=(e=new p(e)).d;if(!v.s||!e.s)return new p(0);for(e.s*=v.s,r=v.e+e.e,f=m.length,d=b.length,f=0;){for(t=0,i=f+n;i>n;)l=o[i]+b[n]*m[i-n-1]+t,o[i--]=l%Et|0,t=l/Et|0;o[i]=(o[i]+t)%Et|0}for(;!o[--u];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,it?Ge(e,p.precision):e};pe.toDecimalPlaces=pe.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(en(e,0,Eo),t===void 0?t=n.rounding:en(t,0,8),Ge(r,e+mt(r)+1,t))};pe.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Vi(n,!0):(en(e,0,Eo),t===void 0?t=i.rounding:en(t,0,8),n=Ge(new i(n),e+1,t),r=Vi(n,!0,e+1)),r};pe.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Vi(i):(en(e,0,Eo),t===void 0?t=o.rounding:en(t,0,8),n=Ge(new o(i),e+mt(i)+1,t),r=Vi(n.abs(),!1,e+mt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};pe.toInteger=pe.toint=function(){var e=this,t=e.constructor;return Ge(new t(e),mt(e)+1,t.rounding)};pe.toNumber=function(){return+this};pe.toPower=pe.pow=function(e){var t,r,n,i,o,u,l=this,f=l.constructor,d=12,v=+(e=new f(e));if(!e.s)return new f(lr);if(l=new f(l),!l.s){if(e.s<1)throw Error(Or+"Infinity");return l}if(l.eq(lr))return l;if(n=f.precision,e.eq(lr))return Ge(l,n);if(t=e.e,r=e.d.length-1,u=t>=r,o=l.s,u){if((r=v<0?-v:v)<=TN){for(i=new f(lr),t=Math.ceil(n/rt+4),it=!1;r%2&&(i=i.times(l),OE(i.d,t)),r=Ao(r/2),r!==0;)l=l.times(l),OE(l.d,t);return it=!0,e.s<0?new f(lr).div(i):Ge(i,n)}}else if(o<0)throw Error(Or+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,it=!1,i=e.times(tu(l,n+d)),it=!0,i=kN(i),i.s=o,i};pe.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=mt(i),n=Vi(i,r<=o.toExpNeg||r>=o.toExpPos)):(en(e,1,Eo),t===void 0?t=o.rounding:en(t,0,8),i=Ge(new o(i),e,t),r=mt(i),n=Vi(i,e<=r||r<=o.toExpNeg,e)),n};pe.toSignificantDigits=pe.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(en(e,1,Eo),t===void 0?t=n.rounding:en(t,0,8)),Ge(new n(r),e,t)};pe.toString=pe.valueOf=pe.val=pe.toJSON=pe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=mt(e),r=e.constructor;return Vi(e,t<=r.toExpNeg||t>=r.toExpPos)};function CN(e,t){var r,n,i,o,u,l,f,d,v=e.constructor,p=v.precision;if(!e.s||!t.s)return t.s||(t=new v(e)),it?Ge(t,p):t;if(f=e.d,d=t.d,u=e.e,i=t.e,f=f.slice(),o=u-i,o){for(o<0?(n=f,o=-o,l=d.length):(n=d,i=u,l=f.length),u=Math.ceil(p/rt),l=u>l?u+1:l+1,o>l&&(o=l,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(l=f.length,o=d.length,l-o<0&&(o=l,n=d,d=f,f=n),r=0;o;)r=(f[--o]=f[o]+d[o]+r)/Et|0,f[o]%=Et;for(r&&(f.unshift(r),++i),l=f.length;f[--l]==0;)f.pop();return t.d=f,t.e=i,it?Ge(t,p):t}function en(e,t,r){if(e!==~~e||er)throw Error(Ui+e)}function Qr(e){var t,r,n,i=e.length-1,o="",u=e[0];if(i>0){for(o+=u,t=1;tu?1:-1;else for(l=f=0;li[l]?1:-1;break}return f}function r(n,i,o){for(var u=0;o--;)n[o]-=u,u=n[o]1;)n.shift()}return function(n,i,o,u){var l,f,d,v,p,m,b,O,x,g,j,E,A,T,P,_,N,R,I=n.constructor,W=n.s==i.s?1:-1,q=n.d,$=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(Or+"Division by zero");for(f=n.e-i.e,N=$.length,P=q.length,b=new I(W),O=b.d=[],d=0;$[d]==(q[d]||0);)++d;if($[d]>(q[d]||0)&&--f,o==null?E=o=I.precision:u?E=o+(mt(n)-mt(i))+1:E=o,E<0)return new I(0);if(E=E/rt+2|0,d=0,N==1)for(v=0,$=$[0],E++;(d1&&($=e($,v),q=e(q,v),N=$.length,P=q.length),T=N,x=q.slice(0,N),g=x.length;g=Et/2&&++_;do v=0,l=t($,x,N,g),l<0?(j=x[0],N!=g&&(j=j*Et+(x[1]||0)),v=j/_|0,v>1?(v>=Et&&(v=Et-1),p=e($,v),m=p.length,g=x.length,l=t(p,x,m,g),l==1&&(v--,r(p,N16)throw Error(tx+mt(e));if(!e.s)return new v(lr);for(it=!1,l=p,u=new v(.03125);e.abs().gte(.1);)e=e.times(u),d+=5;for(n=Math.log(Ii(2,d))/Math.LN10*2+5|0,l+=n,r=i=o=new v(lr),v.precision=l;;){if(i=Ge(i.times(e),l),r=r.times(++f),u=o.plus(jn(i,r,l)),Qr(u.d).slice(0,l)===Qr(o.d).slice(0,l)){for(;d--;)o=Ge(o.times(o),l);return v.precision=p,t==null?(it=!0,Ge(o,p)):o}o=u}}function mt(e){for(var t=e.e*rt,r=e.d[0];r>=10;r/=10)t++;return t}function qy(e,t,r){if(t>e.LN10.sd())throw it=!0,r&&(e.precision=r),Error(Or+"LN10 precision limit exceeded");return Ge(new e(e.LN10),t)}function ii(e){for(var t="";e--;)t+="0";return t}function tu(e,t){var r,n,i,o,u,l,f,d,v,p=1,m=10,b=e,O=b.d,x=b.constructor,g=x.precision;if(b.s<1)throw Error(Or+(b.s?"NaN":"-Infinity"));if(b.eq(lr))return new x(0);if(t==null?(it=!1,d=g):d=t,b.eq(10))return t==null&&(it=!0),qy(x,d);if(d+=m,x.precision=d,r=Qr(O),n=r.charAt(0),o=mt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Qr(b.d),n=r.charAt(0),p++;o=mt(b),n>1?(b=new x("0."+r),o++):b=new x(n+"."+r.slice(1))}else return f=qy(x,d+2,g).times(o+""),b=tu(new x(n+"."+r.slice(1)),d-m).plus(f),x.precision=g,t==null?(it=!0,Ge(b,g)):b;for(l=u=b=jn(b.minus(lr),b.plus(lr),d),v=Ge(b.times(b),d),i=3;;){if(u=Ge(u.times(v),d),f=l.plus(jn(u,new x(i),d)),Qr(f.d).slice(0,d)===Qr(l.d).slice(0,d))return l=l.times(2),o!==0&&(l=l.plus(qy(x,d+2,g).times(o+""))),l=jn(l,new x(p),d),x.precision=g,t==null?(it=!0,Ge(l,g)):l;l=f,i+=2}}function SE(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Ao(r/rt),e.d=[],n=(r+1)%rt,r<0&&(n+=rt),nFc||e.e<-Fc))throw Error(tx+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ge(e,t,r){var n,i,o,u,l,f,d,v,p=e.d;for(u=1,o=p[0];o>=10;o/=10)u++;if(n=t-u,n<0)n+=rt,i=t,d=p[v=0];else{if(v=Math.ceil((n+1)/rt),o=p.length,v>=o)return e;for(d=o=p[v],u=1;o>=10;o/=10)u++;n%=rt,i=n-rt+u}if(r!==void 0&&(o=Ii(10,u-i-1),l=d/o%10|0,f=t<0||p[v+1]!==void 0||d%o,f=r<4?(l||f)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||f||r==6&&(n>0?i>0?d/Ii(10,u-i):0:p[v-1])%10&1||r==(e.s<0?8:7))),t<1||!p[0])return f?(o=mt(e),p.length=1,t=t-o-1,p[0]=Ii(10,(rt-t%rt)%rt),e.e=Ao(-t/rt)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(n==0?(p.length=v,o=1,v--):(p.length=v+1,o=Ii(10,rt-n),p[v]=i>0?(d/Ii(10,u-i)%Ii(10,i)|0)*o:0),f)for(;;)if(v==0){(p[0]+=o)==Et&&(p[0]=1,++e.e);break}else{if(p[v]+=o,p[v]!=Et)break;p[v--]=0,o=1}for(n=p.length;p[--n]===0;)p.pop();if(it&&(e.e>Fc||e.e<-Fc))throw Error(tx+mt(e));return e}function NN(e,t){var r,n,i,o,u,l,f,d,v,p,m=e.constructor,b=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),it?Ge(t,b):t;if(f=e.d,p=t.d,n=t.e,d=e.e,f=f.slice(),u=d-n,u){for(v=u<0,v?(r=f,u=-u,l=p.length):(r=p,n=d,l=f.length),i=Math.max(Math.ceil(b/rt),l)+2,u>i&&(u=i,r.length=1),r.reverse(),i=u;i--;)r.push(0);r.reverse()}else{for(i=f.length,l=p.length,v=i0;--i)f[l++]=0;for(i=p.length;i>u;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+ii(n):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ii(-i-1)+o,r&&(n=r-u)>0&&(o+=ii(n))):i>=u?(o+=ii(i+1-u),r&&(n=r-i-1)>0&&(o=o+"."+ii(n))):((n=i+1)0&&(i+1===u&&(o+="."),o+=ii(n))),e.s<0?"-"+o:o}function OE(e,t){if(e.length>t)return e.length=t,!0}function RN(e){var t,r,n;function i(o){var u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,o instanceof i){u.s=o.s,u.e=o.e,u.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ui+o);if(o>0)u.s=1;else if(o<0)o=-o,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(o===~~o&&o<1e7){u.e=0,u.d=[o];return}return SE(u,o.toString())}else if(typeof o!="string")throw Error(Ui+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,L8.test(o))SE(u,o);else throw Error(Ui+o)}if(i.prototype=pe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=RN,i.config=i.set=B8,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ui+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ui+r+": "+n);return this}var rx=RN(D8);lr=new rx(1);const Ve=rx;function F8(e){return W8(e)||U8(e)||z8(e)||q8()}function q8(){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 z8(e,t){if(e){if(typeof e=="string")return n0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n0(e,t)}}function U8(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function W8(e){if(Array.isArray(e))return n0(e)}function n0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-u,_E(function(){for(var l=arguments.length,f=new Array(l),d=0;de.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,o=void 0;try{for(var u=e[Symbol.iterator](),l;!(n=(l=u.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(f){i=!0,o=f}finally{try{!n&&u.return!=null&&u.return()}finally{if(i)throw o}}return r}}function a6(e){if(Array.isArray(e))return e}function LN(e){var t=ru(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]}function BN(e,t,r){if(e.lte(0))return new Ve(0);var n=Jf.getDigitCount(e.toNumber()),i=new Ve(10).pow(n),o=e.div(i),u=n!==1?.05:.1,l=new Ve(Math.ceil(o.div(u).toNumber())).add(r).mul(u),f=l.mul(i);return t?f:new Ve(Math.ceil(f))}function o6(e,t,r){var n=1,i=new Ve(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new Ve(10).pow(Jf.getDigitCount(e)-1),i=new Ve(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new Ve(Math.floor(e)))}else e===0?i=new Ve(Math.floor((t-1)/2)):r||(i=new Ve(Math.floor(e)));var u=Math.floor((t-1)/2),l=G8(V8(function(f){return i.add(new Ve(f-u).mul(n)).toNumber()}),i0);return l(0,t)}function FN(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ve(0),tickMin:new Ve(0),tickMax:new Ve(0)};var o=BN(new Ve(t).sub(e).div(r-1),n,i),u;e<=0&&t>=0?u=new Ve(0):(u=new Ve(e).add(t).div(2),u=u.sub(new Ve(u).mod(o)));var l=Math.ceil(u.sub(e).div(o).toNumber()),f=Math.ceil(new Ve(t).sub(u).div(o).toNumber()),d=l+f+1;return d>r?FN(e,t,r,n,i+1):(d0?f+(r-d):f,l=t>0?l:l+(r-d)),{step:o,tickMin:u.sub(new Ve(l).mul(o)),tickMax:u.add(new Ve(f).mul(o))})}function s6(e){var t=ru(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=Math.max(i,2),l=LN([r,n]),f=ru(l,2),d=f[0],v=f[1];if(d===-1/0||v===1/0){var p=v===1/0?[d].concat(o0(i0(0,i-1).map(function(){return 1/0}))):[].concat(o0(i0(0,i-1).map(function(){return-1/0})),[v]);return r>n?a0(p):p}if(d===v)return o6(d,i,o);var m=FN(d,v,u,o),b=m.step,O=m.tickMin,x=m.tickMax,g=Jf.rangeStep(O,x.add(new Ve(.1).mul(b)),b);return r>n?a0(g):g}function u6(e,t){var r=ru(e,2),n=r[0],i=r[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=LN([n,i]),l=ru(u,2),f=l[0],d=l[1];if(f===-1/0||d===1/0)return[n,i];if(f===d)return[f];var v=Math.max(t,2),p=BN(new Ve(d).sub(f).div(v-1),o,0),m=[].concat(o0(Jf.rangeStep(new Ve(f),new Ve(d).sub(new Ve(.99).mul(p)),p)),[d]);return n>i?a0(m):m}var l6=IN(s6),c6=IN(u6),f6="Invariant failed";function Gi(e,t){throw new Error(f6)}var d6=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function b6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function x6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w6(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,u=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var f=o.range,d=0;d0?i[d-1].coordinate:i[l-1].coordinate,p=i[d].coordinate,m=d>=l-1?i[0].coordinate:i[d+1].coordinate,b=void 0;if(zt(p-v)!==zt(m-p)){var O=[];if(zt(m-p)===zt(f[1]-f[0])){b=m;var x=p+f[1]-f[0];O[0]=Math.min(x,(x+v)/2),O[1]=Math.max(x,(x+v)/2)}else{b=v;var g=m+f[1]-f[0];O[0]=Math.min(p,(g+p)/2),O[1]=Math.max(p,(g+p)/2)}var j=[Math.min(p,(b+p)/2),Math.max(p,(b+p)/2)];if(t>j[0]&&t<=j[1]||t>=O[0]&&t<=O[1]){u=i[d].index;break}}else{var E=Math.min(v,m),A=Math.max(v,m);if(t>(E+p)/2&&t<=(A+p)/2){u=i[d].index;break}}}else for(var T=0;T0&&T(n[T].coordinate+n[T-1].coordinate)/2&&t<=(n[T].coordinate+n[T+1].coordinate)/2||T===l-1&&t>(n[T].coordinate+n[T-1].coordinate)/2){u=n[T].index;break}return u},nx=function(t){var r,n=t,i=n.type.displayName,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?lt(lt({},t.type.defaultProps),t.props):t.props,u=o.stroke,l=o.fill,f;switch(i){case"Line":f=u;break;case"Area":case"Radar":f=u&&u!=="none"?u:l;break;default:f=l;break}return f},L6=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var u={},l=Object.keys(o),f=0,d=l.length;f=0});if(j&&j.length){var E=j[0].type.defaultProps,A=E!==void 0?lt(lt({},E),j[0].props):j[0].props,T=A.barSize,P=A[g];u[P]||(u[P]=[]);var _=ke(T)?r:T;u[P].push({item:j[0],stackList:j.slice(1),barSize:ke(_)?void 0:Ut(_,n,0)})}}return u},B6=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,o=t.sizeList,u=o===void 0?[]:o,l=t.maxBarSize,f=u.length;if(f<1)return null;var d=Ut(r,i,0,!0),v,p=[];if(u[0].barSize===+u[0].barSize){var m=!1,b=i/f,O=u.reduce(function(T,P){return T+P.barSize||0},0);O+=(f-1)*d,O>=i&&(O-=(f-1)*d,d=0),O>=i&&b>0&&(m=!0,b*=.9,O=f*b);var x=(i-O)/2>>0,g={offset:x-d,size:0};v=u.reduce(function(T,P){var _={item:P.item,position:{offset:g.offset+g.size+d,size:m?b:P.barSize}},N=[].concat(EE(T),[_]);return g=N[N.length-1].position,P.stackList&&P.stackList.length&&P.stackList.forEach(function(R){N.push({item:R,position:g})}),N},p)}else{var j=Ut(n,i,0,!0);i-2*j-(f-1)*d<=0&&(d=0);var E=(i-2*j-(f-1)*d)/f;E>1&&(E>>=0);var A=l===+l?Math.min(E,l):E;v=u.reduce(function(T,P,_){var N=[].concat(EE(T),[{item:P.item,position:{offset:j+(E+d)*_+(E-A)/2,size:A}}]);return P.stackList&&P.stackList.length&&P.stackList.forEach(function(R){N.push({item:R,position:N[N.length-1].position})}),N},p)}return v},F6=function(t,r,n,i){var o=n.children,u=n.width,l=n.margin,f=u-(l.left||0)-(l.right||0),d=WN({children:o,legendWidth:f});if(d){var v=i||{},p=v.width,m=v.height,b=d.align,O=d.verticalAlign,x=d.layout;if((x==="vertical"||x==="horizontal"&&O==="middle")&&b!=="center"&&le(t[b]))return lt(lt({},t),{},Ha({},b,t[b]+(p||0)));if((x==="horizontal"||x==="vertical"&&b==="center")&&O!=="middle"&&le(t[O]))return lt(lt({},t),{},Ha({},O,t[O]+(m||0)))}return t},q6=function(t,r,n){return ke(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},HN=function(t,r,n,i,o){var u=r.props.children,l=fr(u,Du).filter(function(d){return q6(i,o,d.props.direction)});if(l&&l.length){var f=l.map(function(d){return d.props.dataKey});return t.reduce(function(d,v){var p=wt(v,n);if(ke(p))return d;var m=Array.isArray(p)?[Qf(p),Yf(p)]:[p,p],b=f.reduce(function(O,x){var g=wt(v,x,0),j=m[0]-Math.abs(Array.isArray(g)?g[0]:g),E=m[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(j,O[0]),Math.max(E,O[1])]},[1/0,-1/0]);return[Math.min(b[0],d[0]),Math.max(b[1],d[1])]},[1/0,-1/0])}return null},z6=function(t,r,n,i,o){var u=r.map(function(l){return HN(t,l,n,o,i)}).filter(function(l){return!ke(l)});return u&&u.length?u.reduce(function(l,f){return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]):null},KN=function(t,r,n,i,o){var u=r.map(function(f){var d=f.props.dataKey;return n==="number"&&d&&HN(t,f,d,i)||Rs(t,d,n,o)});if(n==="number")return u.reduce(function(f,d){return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);var l={};return u.reduce(function(f,d){for(var v=0,p=d.length;v=2?zt(l[0]-l[1])*2*d:d,r&&(t.ticks||t.niceTicks)){var v=(t.ticks||t.niceTicks).map(function(p){var m=o?o.indexOf(p):p;return{coordinate:i(m)+d,value:p,offset:d}});return v.filter(function(p){return!Tu(p.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(p,m){return{coordinate:i(p)+d,value:p,index:m,offset:d}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(p){return{coordinate:i(p)+d,value:p,offset:d}}):i.domain().map(function(p,m){return{coordinate:i(p)+d,value:o?o[p]:p,index:m,offset:d}})},zy=new WeakMap,oc=function(t,r){if(typeof r!="function")return t;zy.has(t)||zy.set(t,new WeakMap);var n=zy.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},XN=function(t,r,n){var i=t.scale,o=t.type,u=t.layout,l=t.axisType;if(i==="auto")return u==="radial"&&l==="radiusAxis"?{scale:Ys(),realScaleType:"band"}:u==="radial"&&l==="angleAxis"?{scale:Ic(),realScaleType:"linear"}:o==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Ns(),realScaleType:"point"}:o==="category"?{scale:Ys(),realScaleType:"band"}:{scale:Ic(),realScaleType:"linear"};if(Wi(i)){var f="scale".concat(If(i));return{scale:(pE[f]||Ns)(),realScaleType:pE[f]?f:"point"}}return Ee(i)?{scale:i}:{scale:Ns(),realScaleType:"point"}},TE=1e-4,YN=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),o=Math.min(i[0],i[1])-TE,u=Math.max(i[0],i[1])+TE,l=t(r[0]),f=t(r[n-1]);(lu||fu)&&t.domain([r[0],r[n-1]])}},U6=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[l][n][0]=o,t[l][n][1]=o+f,o=t[l][n][1]):(t[l][n][0]=u,t[l][n][1]=u+f,u=t[l][n][1])}},K6=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[u][n][0]=o,t[u][n][1]=o+l,o=t[u][n][1]):(t[u][n][0]=0,t[u][n][1]=0)}},V6={sign:H6,expand:$3,none:Va,silhouette:M3,wiggle:I3,positive:K6},G6=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),o=V6[n],u=R3().keys(i).value(function(l,f){return+wt(l,f,0)}).order(Bg).offset(o);return u(t)},X6=function(t,r,n,i,o,u){if(!t)return null;var l=u?r.reverse():r,f={},d=l.reduce(function(p,m){var b,O=(b=m.type)!==null&&b!==void 0&&b.defaultProps?lt(lt({},m.type.defaultProps),m.props):m.props,x=O.stackId,g=O.hide;if(g)return p;var j=O[n],E=p[j]||{hasStack:!1,stackGroups:{}};if(St(x)){var A=E.stackGroups[x]||{numericAxisId:n,cateAxisId:i,items:[]};A.items.push(m),E.hasStack=!0,E.stackGroups[x]=A}else E.stackGroups[_o("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[m]};return lt(lt({},p),{},Ha({},j,E))},f),v={};return Object.keys(d).reduce(function(p,m){var b=d[m];if(b.hasStack){var O={};b.stackGroups=Object.keys(b.stackGroups).reduce(function(x,g){var j=b.stackGroups[g];return lt(lt({},x),{},Ha({},g,{numericAxisId:n,cateAxisId:i,items:j.items,stackedData:G6(t,j.items,o)}))},O)}return lt(lt({},p),{},Ha({},m,b))},v)},QN=function(t,r){var n=r.realScaleType,i=r.type,o=r.tickCount,u=r.originalDomain,l=r.allowDecimals,f=n||r.scale;if(f!=="auto"&&f!=="linear")return null;if(o&&i==="number"&&u&&(u[0]==="auto"||u[1]==="auto")){var d=t.domain();if(!d.length)return null;var v=l6(d,o,l);return t.domain([Qf(v),Yf(v)]),{niceTicks:v}}if(o&&i==="number"){var p=t.domain(),m=c6(p,o,l);return{niceTicks:m}}return null};function CE(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,u=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ke(i[t.dataKey])){var l=yc(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var f=wt(i,ke(u)?t.dataKey:u);return ke(f)?null:t.scale(f)}var kE=function(t){var r=t.axis,n=t.ticks,i=t.offset,o=t.bandSize,u=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var f=wt(u,r.dataKey,r.domain[l]);return ke(f)?null:r.scale(f)-o/2+i},Y6=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return i<=0&&o>=0?0:o<0?o:i}return n[0]},Q6=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?lt(lt({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(St(o)){var u=r[o];if(u){var l=u.items.indexOf(t);return l>=0?u.stackedData[l]:null}}return null},Z6=function(t){return t.reduce(function(r,n){return[Qf(n.concat([r[0]]).filter(le)),Yf(n.concat([r[1]]).filter(le))]},[1/0,-1/0])},ZN=function(t,r,n){return Object.keys(t).reduce(function(i,o){var u=t[o],l=u.stackedData,f=l.reduce(function(d,v){var p=Z6(v.slice(r,n+1));return[Math.min(d[0],p[0]),Math.max(d[1],p[1])]},[1/0,-1/0]);return[Math.min(f[0],i[0]),Math.max(f[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},NE=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,RE=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,c0=function(t,r,n){if(Ee(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(le(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(NE.test(t[0])){var o=+NE.exec(t[0])[1];i[0]=r[0]-o}else Ee(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(le(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(RE.test(t[1])){var u=+RE.exec(t[1])[1];i[1]=r[1]+u}else Ee(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},Uc=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var o=kb(r,function(p){return p.coordinate}),u=1/0,l=1,f=o.length;le.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},s5=function(t,r,n,i,o){var u=t.width,l=t.height,f=t.startAngle,d=t.endAngle,v=Ut(t.cx,u,u/2),p=Ut(t.cy,l,l/2),m=tR(u,l,n),b=Ut(t.innerRadius,m,0),O=Ut(t.outerRadius,m,m*.8),x=Object.keys(r);return x.reduce(function(g,j){var E=r[j],A=E.domain,T=E.reversed,P;if(ke(E.range))i==="angleAxis"?P=[f,d]:i==="radiusAxis"&&(P=[b,O]),T&&(P=[P[1],P[0]]);else{P=E.range;var _=P,N=t5(_,2);f=N[0],d=N[1]}var R=XN(E,o),I=R.realScaleType,W=R.scale;W.domain(A).range(P),YN(W);var q=QN(W,yn(yn({},E),{},{realScaleType:I})),$=yn(yn(yn({},E),q),{},{range:P,radius:O,realScaleType:I,scale:W,cx:v,cy:p,innerRadius:b,outerRadius:O,startAngle:f,endAngle:d});return yn(yn({},g),{},eR({},j,$))},{})},u5=function(t,r){var n=t.x,i=t.y,o=r.x,u=r.y;return Math.sqrt(Math.pow(n-o,2)+Math.pow(i-u,2))},l5=function(t,r){var n=t.x,i=t.y,o=r.cx,u=r.cy,l=u5({x:n,y:i},{x:o,y:u});if(l<=0)return{radius:l};var f=(n-o)/l,d=Math.acos(f);return i>u&&(d=2*Math.PI-d),{radius:l,angle:o5(d),angleInRadian:d}},c5=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),u=Math.min(i,o);return{startAngle:r-u*360,endAngle:n-u*360}},f5=function(t,r){var n=r.startAngle,i=r.endAngle,o=Math.floor(n/360),u=Math.floor(i/360),l=Math.min(o,u);return t+l*360},DE=function(t,r){var n=t.x,i=t.y,o=l5({x:n,y:i},r),u=o.radius,l=o.angle,f=r.innerRadius,d=r.outerRadius;if(ud)return!1;if(u===0)return!0;var v=c5(r),p=v.startAngle,m=v.endAngle,b=l,O;if(p<=m){for(;b>m;)b-=360;for(;b=p&&b<=m}else{for(;b>p;)b-=360;for(;b=m&&b<=p}return O?yn(yn({},r),{},{radius:u,angle:f5(b,r)}):null},rR=function(t){return!C.isValidElement(t)&&!Ee(t)&&typeof t!="boolean"?t.className:""};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)}var d5=["offset"];function p5(e){return y5(e)||m5(e)||v5(e)||h5()}function h5(){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 v5(e,t){if(e){if(typeof e=="string")return f0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f0(e,t)}}function m5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function y5(e){if(Array.isArray(e))return f0(e)}function f0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function b5(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function LE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xt(e){for(var t=1;t=0?1:-1,A,T;i==="insideStart"?(A=b+E*u,T=x):i==="insideEnd"?(A=O-E*u,T=!x):i==="end"&&(A=O+E*u,T=x),T=j<=0?T:!T;var P=Ze(d,v,g,A),_=Ze(d,v,g,A+(T?1:-1)*359),N="M".concat(P.x,",").concat(P.y,` A`).concat(g,",").concat(g,",0,1,").concat(T?0:1,`, `).concat(_.x,",").concat(_.y),R=ke(t.id)?_o("recharts-radial-line-"):t.id;return D.createElement("text",su({},n,{dominantBaseline:"central",className:Me("recharts-radial-bar-label",l)}),D.createElement("defs",null,D.createElement("path",{id:R,d:N})),D.createElement("textPath",{xlinkHref:"#".concat(R)},r))},j5=function(t){var r=t.viewBox,n=t.offset,i=t.position,o=r,u=o.cx,l=o.cy,f=o.innerRadius,d=o.outerRadius,v=o.startAngle,p=o.endAngle,m=(v+p)/2;if(i==="outside"){var b=Ze(u,l,d+n,m),O=b.x,x=b.y;return{x:O,y:x,textAnchor:O>=u?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:u,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:u,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:u,y:l,textAnchor:"middle",verticalAnchor:"end"};var g=(f+d)/2,j=Ze(u,l,g,m),E=j.x,A=j.y;return{x:E,y:A,textAnchor:"middle",verticalAnchor:"middle"}},E5=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,o=t.position,u=r,l=u.x,f=u.y,d=u.width,v=u.height,p=v>=0?1:-1,m=p*i,b=p>0?"end":"start",O=p>0?"start":"end",x=d>=0?1:-1,g=x*i,j=x>0?"end":"start",E=x>0?"start":"end";if(o==="top"){var A={x:l+d/2,y:f-p*i,textAnchor:"middle",verticalAnchor:b};return xt(xt({},A),n?{height:Math.max(f-n.y,0),width:d}:{})}if(o==="bottom"){var T={x:l+d/2,y:f+v+m,textAnchor:"middle",verticalAnchor:O};return xt(xt({},T),n?{height:Math.max(n.y+n.height-(f+v),0),width:d}:{})}if(o==="left"){var P={x:l-g,y:f+v/2,textAnchor:j,verticalAnchor:"middle"};return xt(xt({},P),n?{width:Math.max(P.x-n.x,0),height:v}:{})}if(o==="right"){var _={x:l+d+g,y:f+v/2,textAnchor:E,verticalAnchor:"middle"};return xt(xt({},_),n?{width:Math.max(n.x+n.width-_.x,0),height:v}:{})}var N=n?{width:d,height:v}:{};return o==="insideLeft"?xt({x:l+g,y:f+v/2,textAnchor:E,verticalAnchor:"middle"},N):o==="insideRight"?xt({x:l+d-g,y:f+v/2,textAnchor:j,verticalAnchor:"middle"},N):o==="insideTop"?xt({x:l+d/2,y:f+m,textAnchor:"middle",verticalAnchor:O},N):o==="insideBottom"?xt({x:l+d/2,y:f+v-m,textAnchor:"middle",verticalAnchor:b},N):o==="insideTopLeft"?xt({x:l+g,y:f+m,textAnchor:E,verticalAnchor:O},N):o==="insideTopRight"?xt({x:l+d-g,y:f+m,textAnchor:j,verticalAnchor:O},N):o==="insideBottomLeft"?xt({x:l+g,y:f+v-m,textAnchor:E,verticalAnchor:b},N):o==="insideBottomRight"?xt({x:l+d-g,y:f+v-m,textAnchor:j,verticalAnchor:b},N):Oo(o)&&(le(o.x)||Li(o.x))&&(le(o.y)||Li(o.y))?xt({x:l+Ut(o.x,d),y:f+Ut(o.y,v),textAnchor:"end",verticalAnchor:"end"},N):xt({x:l+d/2,y:f+v/2,textAnchor:"middle",verticalAnchor:"middle"},N)},A5=function(t){return"cx"in t&&le(t.cx)};function At(e){var t=e.offset,r=t===void 0?5:t,n=g5(e,d5),i=xt({offset:r},n),o=i.viewBox,u=i.position,l=i.value,f=i.children,d=i.content,v=i.className,p=v===void 0?"":v,m=i.textBreakAll;if(!o||ke(l)&&ke(f)&&!C.isValidElement(d)&&!Ee(d))return null;if(C.isValidElement(d))return C.cloneElement(d,i);var b;if(Ee(d)){if(b=C.createElement(d,i),C.isValidElement(b))return b}else b=O5(i);var O=A5(o),x=Se(i,!0);if(O&&(u==="insideStart"||u==="insideEnd"||u==="end"))return P5(i,b,x);var g=O?j5(i):E5(i);return D.createElement(Ki,su({className:Me("recharts-label",p)},x,g,{breakAll:m}),b)}At.displayName="Label";var nR=function(t){var r=t.cx,n=t.cy,i=t.angle,o=t.startAngle,u=t.endAngle,l=t.r,f=t.radius,d=t.innerRadius,v=t.outerRadius,p=t.x,m=t.y,b=t.top,O=t.left,x=t.width,g=t.height,j=t.clockWise,E=t.labelViewBox;if(E)return E;if(le(x)&&le(g)){if(le(p)&&le(m))return{x:p,y:m,width:x,height:g};if(le(b)&&le(O))return{x:b,y:O,width:x,height:g}}return le(p)&&le(m)?{x:p,y:m,width:0,height:0}:le(r)&&le(n)?{cx:r,cy:n,startAngle:o||i||0,endAngle:u||i||0,innerRadius:d||0,outerRadius:v||f||l||0,clockWise:j}:t.viewBox?t.viewBox:{}},T5=function(t,r){return t?t===!0?D.createElement(At,{key:"label-implicit",viewBox:r}):St(t)?D.createElement(At,{key:"label-implicit",viewBox:r,value:t}):C.isValidElement(t)?t.type===At?C.cloneElement(t,{key:"label-implicit",viewBox:r}):D.createElement(At,{key:"label-implicit",content:t,viewBox:r}):Ee(t)?D.createElement(At,{key:"label-implicit",content:t,viewBox:r}):Oo(t)?D.createElement(At,su({viewBox:r},t,{key:"label-implicit"})):null:null},C5=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,o=nR(t),u=fr(i,At).map(function(f,d){return C.cloneElement(f,{viewBox:r||o,key:"label-".concat(d)})});if(!n)return u;var l=T5(t.label,r||o);return[l].concat(p5(u))};At.parseViewBox=nR;At.renderCallByParent=C5;var Uy,BE;function k5(){if(BE)return Uy;BE=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Uy=e,Uy}var N5=k5();const R5=Ue(N5);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 $5=["valueAccessor"],M5=["data","dataKey","clockWise","id","textBreakAll"];function I5(e){return F5(e)||B5(e)||L5(e)||D5()}function D5(){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 L5(e,t){if(e){if(typeof e=="string")return d0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d0(e,t)}}function B5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F5(e){if(Array.isArray(e))return d0(e)}function d0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function W5(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var H5=function(t){return Array.isArray(t.value)?R5(t.value):t.value};function En(e){var t=e.valueAccessor,r=t===void 0?H5:t,n=zE(e,$5),i=n.data,o=n.dataKey,u=n.clockWise,l=n.id,f=n.textBreakAll,d=zE(n,M5);return!i||!i.length?null:D.createElement(qe,{className:"recharts-label-list"},i.map(function(v,p){var m=ke(o)?r(v,p):wt(v&&v.payload,o),b=ke(l)?{}:{id:"".concat(l,"-").concat(p)};return D.createElement(At,Hc({},Se(v,!0),d,b,{parentViewBox:v.parentViewBox,value:m,textBreakAll:f,viewBox:At.parseViewBox(ke(u)?v:qE(qE({},v),{},{clockWise:u})),key:"label-".concat(p),index:p}))}))}En.displayName="LabelList";function K5(e,t){return e?e===!0?D.createElement(En,{key:"labelList-implicit",data:t}):D.isValidElement(e)||Ee(e)?D.createElement(En,{key:"labelList-implicit",data:t,content:e}):Oo(e)?D.createElement(En,Hc({data:t},e,{key:"labelList-implicit"})):null:null}function V5(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=fr(n,En).map(function(u,l){return C.cloneElement(u,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var o=K5(e.label,t);return[o].concat(I5(i))}En.renderCallByParent=V5;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 p0(){return p0=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(u>d),`, `).concat(p.x,",").concat(p.y,` `);if(i>0){var b=Ze(r,n,i,u),O=Ze(r,n,i,d);m+="L ".concat(O.x,",").concat(O.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(f)>180),",").concat(+(u<=d),`, `).concat(b.x,",").concat(b.y," Z")}else m+="L ".concat(r,",").concat(n," Z");return m},Z5=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,u=t.cornerRadius,l=t.forceCornerRadius,f=t.cornerIsExternal,d=t.startAngle,v=t.endAngle,p=zt(v-d),m=sc({cx:r,cy:n,radius:o,angle:d,sign:p,cornerRadius:u,cornerIsExternal:f}),b=m.circleTangency,O=m.lineTangency,x=m.theta,g=sc({cx:r,cy:n,radius:o,angle:v,sign:-p,cornerRadius:u,cornerIsExternal:f}),j=g.circleTangency,E=g.lineTangency,A=g.theta,T=f?Math.abs(d-v):Math.abs(d-v)-x-A;if(T<0)return l?"M ".concat(O.x,",").concat(O.y,` a`).concat(u,",").concat(u,",0,0,1,").concat(u*2,`,0 a`).concat(u,",").concat(u,",0,0,1,").concat(-u*2,`,0 `):iR({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:d,endAngle:v});var P="M ".concat(O.x,",").concat(O.y,` A`).concat(u,",").concat(u,",0,0,").concat(+(p<0),",").concat(b.x,",").concat(b.y,` A`).concat(o,",").concat(o,",0,").concat(+(T>180),",").concat(+(p<0),",").concat(j.x,",").concat(j.y,` A`).concat(u,",").concat(u,",0,0,").concat(+(p<0),",").concat(E.x,",").concat(E.y,` `);if(i>0){var _=sc({cx:r,cy:n,radius:i,angle:d,sign:p,isExternal:!0,cornerRadius:u,cornerIsExternal:f}),N=_.circleTangency,R=_.lineTangency,I=_.theta,W=sc({cx:r,cy:n,radius:i,angle:v,sign:-p,isExternal:!0,cornerRadius:u,cornerIsExternal:f}),q=W.circleTangency,$=W.lineTangency,U=W.theta,z=f?Math.abs(d-v):Math.abs(d-v)-I-U;if(z<0&&u===0)return"".concat(P,"L").concat(r,",").concat(n,"Z");P+="L".concat($.x,",").concat($.y,` A`).concat(u,",").concat(u,",0,0,").concat(+(p<0),",").concat(q.x,",").concat(q.y,` A`).concat(i,",").concat(i,",0,").concat(+(z>180),",").concat(+(p>0),",").concat(N.x,",").concat(N.y,` A`).concat(u,",").concat(u,",0,0,").concat(+(p<0),",").concat(R.x,",").concat(R.y,"Z")}else P+="L".concat(r,",").concat(n,"Z");return P},J5={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},aR=function(t){var r=WE(WE({},J5),t),n=r.cx,i=r.cy,o=r.innerRadius,u=r.outerRadius,l=r.cornerRadius,f=r.forceCornerRadius,d=r.cornerIsExternal,v=r.startAngle,p=r.endAngle,m=r.className;if(u0&&Math.abs(v-p)<360?g=Z5({cx:n,cy:i,innerRadius:o,outerRadius:u,cornerRadius:Math.min(x,O/2),forceCornerRadius:f,cornerIsExternal:d,startAngle:v,endAngle:p}):g=iR({cx:n,cy:i,innerRadius:o,outerRadius:u,startAngle:v,endAngle:p}),D.createElement("path",p0({},Se(r,!0),{className:b,d:g,role:"img"}))};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 h0(){return h0=Object.assign?Object.assign.bind():function(e){for(var t=1;tsW.call(e,t));function ta(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const cW="__v",fW="__o",dW="_owner",{getOwnPropertyDescriptor:XE,keys:YE}=Object;function pW(e,t){return e.byteLength===t.byteLength&&Vc(new Uint8Array(e),new Uint8Array(t))}function hW(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function vW(e,t){return e.byteLength===t.byteLength&&Vc(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function mW(e,t){return ta(e.getTime(),t.getTime())}function yW(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function gW(e,t){return e===t}function QE(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),o=e.entries();let u,l,f=0;for(;(u=o.next())&&!u.done;){const d=t.entries();let v=!1,p=0;for(;(l=d.next())&&!l.done;){if(i[p]){p++;continue}const m=u.value,b=l.value;if(r.equals(m[0],b[0],f,p,e,t,r)&&r.equals(m[1],b[1],m[0],b[0],e,t,r)){v=i[p]=!0;break}p++}if(!v)return!1;f++}return!0}const bW=ta;function xW(e,t,r){const n=YE(e);let i=n.length;if(YE(t).length!==i)return!1;for(;i-- >0;)if(!oR(e,t,r,n[i]))return!1;return!0}function Ps(e,t,r){const n=GE(e);let i=n.length;if(GE(t).length!==i)return!1;let o,u,l;for(;i-- >0;)if(o=n[i],!oR(e,t,r,o)||(u=XE(e,o),l=XE(t,o),(u||l)&&(!u||!l||u.configurable!==l.configurable||u.enumerable!==l.enumerable||u.writable!==l.writable)))return!1;return!0}function wW(e,t){return ta(e.valueOf(),t.valueOf())}function SW(e,t){return e.source===t.source&&e.flags===t.flags}function ZE(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),o=e.values();let u,l;for(;(u=o.next())&&!u.done;){const f=t.values();let d=!1,v=0;for(;(l=f.next())&&!l.done;){if(!i[v]&&r.equals(u.value,l.value,u.value,l.value,e,t,r)){d=i[v]=!0;break}v++}if(!d)return!1}return!0}function Vc(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function OW(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 oR(e,t,r,n){return(n===dW||n===fW||n===cW)&&(e.$$typeof||t.$$typeof)?!0:lW(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const _W="[object ArrayBuffer]",PW="[object Arguments]",jW="[object Boolean]",EW="[object DataView]",AW="[object Date]",TW="[object Error]",CW="[object Map]",kW="[object Number]",NW="[object Object]",RW="[object RegExp]",$W="[object Set]",MW="[object String]",IW={"[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},DW="[object URL]",LW=Object.prototype.toString;function BW({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:u,areNumbersEqual:l,areObjectsEqual:f,arePrimitiveWrappersEqual:d,areRegExpsEqual:v,areSetsEqual:p,areTypedArraysEqual:m,areUrlsEqual:b,unknownTagComparators:O}){return function(g,j,E){if(g===j)return!0;if(g==null||j==null)return!1;const A=typeof g;if(A!==typeof j)return!1;if(A!=="object")return A==="number"?l(g,j,E):A==="function"?o(g,j,E):!1;const T=g.constructor;if(T!==j.constructor)return!1;if(T===Object)return f(g,j,E);if(Array.isArray(g))return t(g,j,E);if(T===Date)return n(g,j,E);if(T===RegExp)return v(g,j,E);if(T===Map)return u(g,j,E);if(T===Set)return p(g,j,E);const P=LW.call(g);if(P===AW)return n(g,j,E);if(P===RW)return v(g,j,E);if(P===CW)return u(g,j,E);if(P===$W)return p(g,j,E);if(P===NW)return typeof g.then!="function"&&typeof j.then!="function"&&f(g,j,E);if(P===DW)return b(g,j,E);if(P===TW)return i(g,j,E);if(P===PW)return f(g,j,E);if(IW[P])return m(g,j,E);if(P===_W)return e(g,j,E);if(P===EW)return r(g,j,E);if(P===jW||P===kW||P===MW)return d(g,j,E);if(O){let _=O[P];if(!_){const N=uW(g);N&&(_=O[N])}if(_)return _(g,j,E)}return!1}}function FW({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:pW,areArraysEqual:r?Ps:hW,areDataViewsEqual:vW,areDatesEqual:mW,areErrorsEqual:yW,areFunctionsEqual:gW,areMapsEqual:r?Wy(QE,Ps):QE,areNumbersEqual:bW,areObjectsEqual:r?Ps:xW,arePrimitiveWrappersEqual:wW,areRegExpsEqual:SW,areSetsEqual:r?Wy(ZE,Ps):ZE,areTypedArraysEqual:r?Wy(Vc,Ps):Vc,areUrlsEqual:OW,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=lc(n.areArraysEqual),o=lc(n.areMapsEqual),u=lc(n.areObjectsEqual),l=lc(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:u,areSetsEqual:l})}return n}function qW(e){return function(t,r,n,i,o,u,l){return e(t,r,l)}}function zW({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(l,f){const{cache:d=e?new WeakMap:void 0,meta:v}=r();return t(l,f,{cache:d,equals:n,meta:v,strict:i})};if(e)return function(l,f){return t(l,f,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const o={cache:void 0,equals:n,meta:void 0,strict:i};return function(l,f){return t(l,f,o)}}const UW=mi();mi({strict:!0});mi({circular:!0});mi({circular:!0,strict:!0});mi({createInternalComparator:()=>ta});mi({strict:!0,createInternalComparator:()=>ta});mi({circular:!0,createInternalComparator:()=>ta});mi({circular:!0,createInternalComparator:()=>ta,strict:!0});function mi(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,o=FW(e),u=BW(o),l=r?r(u):qW(u);return zW({circular:t,comparator:u,createState:n,equals:l,strict:i})}function WW(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function JE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(o){r<0&&(r=o),o-r>t?(e(o),r=-1):WW(i)};requestAnimationFrame(n)}function v0(e){"@babel/helpers - typeof";return v0=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},v0(e)}function HW(e){return XW(e)||GW(e)||VW(e)||KW()}function KW(){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 VW(e,t){if(e){if(typeof e=="string")return eA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eA(e,t)}}function eA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:j<0?0:j},x=function(j){for(var E=j>1?1:j,A=E,T=0;T<8;++T){var P=p(A)-E,_=b(A);if(Math.abs(P-E)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,u=t.dt,l=u===void 0?17:u,f=function(v,p,m){var b=-(v-p)*n,O=m*o,x=m+(b-O)*l/1e3,g=m*l/1e3+v;return Math.abs(g-p)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jH(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}function Hy(e){return CH(e)||TH(e)||AH(e)||EH()}function EH(){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 AH(e,t){if(e){if(typeof e=="string")return x0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return x0(e,t)}}function TH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CH(e){if(Array.isArray(e))return x0(e)}function x0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"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 Yc(e){return Yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yc(e)}var tn=(function(e){MH(r,e);var t=IH(r);function r(n,i){var o;kH(this,r),o=t.call(this,n,i);var u=o.props,l=u.isActive,f=u.attributeName,d=u.from,v=u.to,p=u.steps,m=u.children,b=u.duration;if(o.handleStyleChange=o.handleStyleChange.bind(O0(o)),o.changeStyle=o.changeStyle.bind(O0(o)),!l||b<=0)return o.state={style:{}},typeof m=="function"&&(o.state={style:v}),S0(o);if(p&&p.length)o.state={style:p[0].style};else if(d){if(typeof m=="function")return o.state={style:d},S0(o);o.state={style:f?Cs({},f,d):d}}else o.state={style:{}};return o}return RH(r,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,u=i.canBegin;this.mounted=!0,!(!o||!u)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,u=o.isActive,l=o.canBegin,f=o.attributeName,d=o.shouldReAnimate,v=o.to,p=o.from,m=this.state.style;if(l){if(!u){var b={style:f?Cs({},f,v):v};this.state&&m&&(f&&m[f]!==v||!f&&m!==v)&&this.setState(b);return}if(!(UW(i.to,v)&&i.canBegin&&i.isActive)){var O=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var x=O||d?p:i.to;if(this.state&&m){var g={style:f?Cs({},f,x):x};(f&&m[f]!==x||!f&&m!==x)&&this.setState(g)}this.runAnimation($r($r({},this.props),{},{from:x,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,u=i.from,l=i.to,f=i.duration,d=i.easing,v=i.begin,p=i.onAnimationEnd,m=i.onAnimationStart,b=OH(u,l,dH(d),f,this.changeStyle),O=function(){o.stopJSAnimation=b()};this.manager.start([m,v,O,f,p])}},{key:"runStepAnimation",value:function(i){var o=this,u=i.steps,l=i.begin,f=i.onAnimationStart,d=u[0],v=d.style,p=d.duration,m=p===void 0?0:p,b=function(x,g,j){if(j===0)return x;var E=g.duration,A=g.easing,T=A===void 0?"ease":A,P=g.style,_=g.properties,N=g.onAnimationEnd,R=j>0?u[j-1]:g,I=_||Object.keys(P);if(typeof T=="function"||T==="spring")return[].concat(Hy(x),[o.runJSAnimation.bind(o,{from:R.style,to:P,duration:E,easing:T}),E]);var W=nA(I,E,T),q=$r($r($r({},R.style),P),{},{transition:W});return[].concat(Hy(x),[q,E,N]).filter(eH)};return this.manager.start([f].concat(Hy(u.reduce(b,[v,Math.max(m,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=YW());var o=i.begin,u=i.duration,l=i.attributeName,f=i.to,d=i.easing,v=i.onAnimationStart,p=i.onAnimationEnd,m=i.steps,b=i.children,O=this.manager;if(this.unSubscribe=O.subscribe(this.handleStyleChange),typeof d=="function"||typeof b=="function"||d==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var x=l?Cs({},l,f):f,g=nA(Object.keys(x),u,d);O.start([v,o,$r($r({},x),{},{transition:g}),u,p])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var u=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var f=PH(i,_H),d=C.Children.count(o),v=this.state.style;if(typeof o=="function")return o(v);if(!l||d===0||u<=0)return o;var p=function(b){var O=b.props,x=O.style,g=x===void 0?{}:x,j=O.className,E=C.cloneElement(b,$r($r({},f),{},{style:$r($r({},g),v),className:j}));return E};return d===1?p(C.Children.only(o)):D.createElement("div",null,C.Children.map(o,function(m){return p(m)}))}}]),r})(C.PureComponent);tn.displayName="Animate";tn.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};tn.propTypes={from:Ie.oneOfType([Ie.object,Ie.string]),to:Ie.oneOfType([Ie.object,Ie.string]),attributeName:Ie.string,duration:Ie.number,begin:Ie.number,easing:Ie.oneOfType([Ie.string,Ie.func]),steps:Ie.arrayOf(Ie.shape({duration:Ie.number.isRequired,style:Ie.object.isRequired,easing:Ie.oneOfType([Ie.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ie.func]),properties:Ie.arrayOf("string"),onAnimationEnd:Ie.func})),children:Ie.oneOfType([Ie.node,Ie.func]),isActive:Ie.bool,canBegin:Ie.bool,onAnimationEnd:Ie.func,shouldReAnimate:Ie.bool,onAnimationStart:Ie.func,onAnimationReStart:Ie.func};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 Qc(){return Qc=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,f=n>=0?1:-1,d=i>=0&&n>=0||i<0&&n<0?1:0,v;if(u>0&&o instanceof Array){for(var p=[0,0,0,0],m=0,b=4;mu?u:o[m];v="M".concat(t,",").concat(r+l*p[0]),p[0]>0&&(v+="A ".concat(p[0],",").concat(p[0],",0,0,").concat(d,",").concat(t+f*p[0],",").concat(r)),v+="L ".concat(t+n-f*p[1],",").concat(r),p[1]>0&&(v+="A ".concat(p[1],",").concat(p[1],",0,0,").concat(d,`, `).concat(t+n,",").concat(r+l*p[1])),v+="L ".concat(t+n,",").concat(r+i-l*p[2]),p[2]>0&&(v+="A ".concat(p[2],",").concat(p[2],",0,0,").concat(d,`, `).concat(t+n-f*p[2],",").concat(r+i)),v+="L ".concat(t+f*p[3],",").concat(r+i),p[3]>0&&(v+="A ".concat(p[3],",").concat(p[3],",0,0,").concat(d,`, `).concat(t,",").concat(r+i-l*p[3])),v+="Z"}else if(u>0&&o===+o&&o>0){var O=Math.min(u,o);v="M ".concat(t,",").concat(r+l*O,` A `).concat(O,",").concat(O,",0,0,").concat(d,",").concat(t+f*O,",").concat(r,` L `).concat(t+n-f*O,",").concat(r,` A `).concat(O,",").concat(O,",0,0,").concat(d,",").concat(t+n,",").concat(r+l*O,` L `).concat(t+n,",").concat(r+i-l*O,` A `).concat(O,",").concat(O,",0,0,").concat(d,",").concat(t+n-f*O,",").concat(r+i,` L `).concat(t+f*O,",").concat(r+i,` A `).concat(O,",").concat(O,",0,0,").concat(d,",").concat(t,",").concat(r+i-l*O," Z")}else v="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return v},KH=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,o=r.x,u=r.y,l=r.width,f=r.height;if(Math.abs(l)>0&&Math.abs(f)>0){var d=Math.min(o,o+l),v=Math.max(o,o+l),p=Math.min(u,u+f),m=Math.max(u,u+f);return n>=d&&n<=v&&i>=p&&i<=m}return!1},VH={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ix=function(t){var r=fA(fA({},VH),t),n=C.useRef(),i=C.useState(-1),o=LH(i,2),u=o[0],l=o[1];C.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var T=n.current.getTotalLength();T&&l(T)}catch{}},[]);var f=r.x,d=r.y,v=r.width,p=r.height,m=r.radius,b=r.className,O=r.animationEasing,x=r.animationDuration,g=r.animationBegin,j=r.isAnimationActive,E=r.isUpdateAnimationActive;if(f!==+f||d!==+d||v!==+v||p!==+p||v===0||p===0)return null;var A=Me("recharts-rectangle",b);return E?D.createElement(tn,{canBegin:u>0,from:{width:v,height:p,x:f,y:d},to:{width:v,height:p,x:f,y:d},duration:x,animationEasing:O,isActive:E},function(T){var P=T.width,_=T.height,N=T.x,R=T.y;return D.createElement(tn,{canBegin:u>0,from:"0px ".concat(u===-1?1:u,"px"),to:"".concat(u,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:x,isActive:j,easing:O},D.createElement("path",Qc({},Se(r,!0),{className:A,d:dA(N,R,P,_,m),ref:n})))}):D.createElement("path",Qc({},Se(r,!0),{className:A,d:dA(f,d,v,p,m)}))},GH=["points","className","baseLinePoints","connectNulls"];function Da(){return Da=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function YH(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function pA(e){return eK(e)||JH(e)||ZH(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 ZH(e,t){if(e){if(typeof e=="string")return _0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _0(e,t)}}function JH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eK(e){if(Array.isArray(e))return _0(e)}function _0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){hA(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),hA(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},Ms=function(t,r){var n=tK(t);r&&(n=[n.reduce(function(o,u){return[].concat(pA(o),pA(u))},[])]);var i=n.map(function(o){return o.reduce(function(u,l,f){return"".concat(u).concat(f===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},rK=function(t,r,n){var i=Ms(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Ms(r.reverse(),n).slice(1))},nK=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,o=t.connectNulls,u=XH(t,GH);if(!r||!r.length)return null;var l=Me("recharts-polygon",n);if(i&&i.length){var f=u.stroke&&u.stroke!=="none",d=rK(r,i,o);return D.createElement("g",{className:l},D.createElement("path",Da({},Se(u,!0),{fill:d.slice(-1)==="Z"?u.fill:"none",stroke:"none",d})),f?D.createElement("path",Da({},Se(u,!0),{fill:"none",d:Ms(r,o)})):null,f?D.createElement("path",Da({},Se(u,!0),{fill:"none",d:Ms(i,o)})):null)}var v=Ms(r,o);return D.createElement("path",Da({},Se(u,!0),{fill:v.slice(-1)==="Z"?u.fill:"none",className:l,d:v}))};function P0(){return P0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cK(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var fK=function(t,r,n,i,o,u){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(u,",").concat(r,"h").concat(n)},dK=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,o=i===void 0?0:i,u=t.top,l=u===void 0?0:u,f=t.left,d=f===void 0?0:f,v=t.width,p=v===void 0?0:v,m=t.height,b=m===void 0?0:m,O=t.className,x=lK(t,iK),g=aK({x:n,y:o,top:l,left:d,width:p,height:b},x);return!le(n)||!le(o)||!le(p)||!le(b)||!le(l)||!le(d)?null:D.createElement("path",j0({},Se(g,!0),{className:Me("recharts-cross",O),d:fK(n,o,p,b,l,d)}))},Ky,mA;function pK(){if(mA)return Ky;mA=1;var e=Xf(),t=EN(),r=an();function n(i,o){return i&&i.length?e(i,r(o,2),t):void 0}return Ky=n,Ky}var hK=pK();const vK=Ue(hK);var Vy,yA;function mK(){if(yA)return Vy;yA=1;var e=Xf(),t=an(),r=AN();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return Vy=n,Vy}var yK=mK();const gK=Ue(yK);var bK=["cx","cy","angle","ticks","axisLine"],xK=["ticks","tick","angle","tickFormatter","stroke"];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 Is(){return Is=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wK(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function SK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xA(e,t){for(var r=0;rOA?u=i==="outer"?"start":"end":o<-OA?u=i==="outer"?"end":"start":u="middle",u}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,o=n.cy,u=n.radius,l=n.axisLine,f=n.axisLineType,d=Ni(Ni({},Se(this.props,!1)),{},{fill:"none"},Se(l,!1));if(f==="circle")return D.createElement(ed,Di({className:"recharts-polar-angle-axis-line"},d,{cx:i,cy:o,r:u}));var v=this.props.ticks,p=v.map(function(m){return Ze(i,o,u,m.coordinate)});return D.createElement(nK,Di({className:"recharts-polar-angle-axis-line"},d,{points:p}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,o=i.ticks,u=i.tick,l=i.tickLine,f=i.tickFormatter,d=i.stroke,v=Se(this.props,!1),p=Se(u,!1),m=Ni(Ni({},v),{},{fill:"none"},Se(l,!1)),b=o.map(function(O,x){var g=n.getTickLineCoord(O),j=n.getTickTextAnchor(O),E=Ni(Ni(Ni({textAnchor:j},v),{},{stroke:"none",fill:d},p),{},{index:x,payload:O,x:g.x2,y:g.y2});return D.createElement(qe,Di({className:Me("recharts-polar-angle-axis-tick",rR(u)),key:"tick-".concat(O.coordinate)},Hi(n.props,O,x)),l&&D.createElement("line",Di({className:"recharts-polar-angle-axis-tick-line"},m,g)),u&&t.renderTickItem(u,E,f?f(O.value,x):O.value))});return D.createElement(qe,{className:"recharts-polar-angle-axis-ticks"},b)}},{key:"render",value:function(){var n=this.props,i=n.ticks,o=n.radius,u=n.axisLine;return o<=0||!i||!i.length?null:D.createElement(qe,{className:Me("recharts-polar-angle-axis",this.props.className)},u&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,o){var u;return D.isValidElement(n)?u=D.cloneElement(n,i):Ee(n)?u=n(i):u=D.createElement(Ki,Di({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),u}}])})(C.PureComponent);nd(id,"displayName","PolarAngleAxis");nd(id,"axisType","angleAxis");nd(id,"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 Gy,_A;function DK(){if(_A)return Gy;_A=1;var e=Ek(),t=e(Object.getPrototypeOf,Object);return Gy=t,Gy}var Xy,PA;function LK(){if(PA)return Xy;PA=1;var e=Mn(),t=DK(),r=In(),n="[object Object]",i=Function.prototype,o=Object.prototype,u=i.toString,l=o.hasOwnProperty,f=u.call(Object);function d(v){if(!r(v)||e(v)!=n)return!1;var p=t(v);if(p===null)return!0;var m=l.call(p,"constructor")&&p.constructor;return typeof m=="function"&&m instanceof m&&u.call(m)==f}return Xy=d,Xy}var BK=LK();const FK=Ue(BK);var Yy,jA;function qK(){if(jA)return Yy;jA=1;var e=Mn(),t=In(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return Yy=n,Yy}var zK=qK();const UK=Ue(zK);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 ef(){return ef=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:m,x:f,y:d},to:{upperWidth:v,lowerWidth:p,height:m,x:f,y:d},duration:x,animationEasing:O,isActive:j},function(A){var T=A.upperWidth,P=A.lowerWidth,_=A.height,N=A.x,R=A.y;return D.createElement(tn,{canBegin:u>0,from:"0px ".concat(u===-1?1:u,"px"),to:"".concat(u,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:x,easing:O},D.createElement("path",ef({},Se(r,!0),{className:E,d:CA(N,R,T,P,_),ref:n})))}):D.createElement("g",null,D.createElement("path",ef({},Se(r,!0),{className:E,d:CA(f,d,v,p,m)})))},e9=["option","shapeType","propTransformer","activeClassName","isActive"];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 t9(e,t){if(e==null)return{};var r=r9(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function r9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function kA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tf(e){for(var t=1;t0?cr(A,"paddingAngle",0):0;if(P){var N=sr(P.endAngle-P.startAngle,A.endAngle-A.startAngle),R=Ye(Ye({},A),{},{startAngle:E+_,endAngle:E+N(x)+_});g.push(R),E=R.endAngle}else{var I=A.endAngle,W=A.startAngle,q=sr(0,I-W),$=q(x),U=Ye(Ye({},A),{},{startAngle:E+_,endAngle:E+$+_});g.push(U),E=U.endAngle}}),D.createElement(qe,null,n.renderSectorsStatically(g))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var u=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[u].focus(),i.setState({sectorToFocus:u});break}case"ArrowRight":{var l=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[l].focus(),i.setState({sectorToFocus:l});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,o=n.isAnimationActive,u=this.state.prevSectors;return o&&i&&i.length&&(!u||!Iu(u,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,o=i.hide,u=i.sectors,l=i.className,f=i.label,d=i.cx,v=i.cy,p=i.innerRadius,m=i.outerRadius,b=i.isAnimationActive,O=this.state.isAnimationFinished;if(o||!u||!u.length||!le(d)||!le(v)||!le(p)||!le(m))return null;var x=Me("recharts-pie",l);return D.createElement(qe,{tabIndex:this.props.rootTabIndex,className:x,ref:function(j){n.pieRef=j}},this.renderSectors(),f&&this.renderLabels(u),At.renderCallByParent(this.props,null,!1),(!b||O)&&En.renderCallByParent(this.props,u,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n=360?E:E-1)*f,T=g-E*b-A,P=i.reduce(function(R,I){var W=wt(I,j,0);return R+(le(W)?W:0)},0),_;if(P>0){var N;_=i.map(function(R,I){var W=wt(R,j,0),q=wt(R,v,I),$=(le(W)?W:0)/P,U;I?U=N.endAngle+zt(x)*f*(W!==0?1:0):U=u;var z=U+zt(x)*((W!==0?b:0)+$*T),V=(U+z)/2,Y=(O.innerRadius+O.outerRadius)/2,J=[{name:q,value:W,payload:R,dataKey:j,type:m}],K=Ze(O.cx,O.cy,Y,V);return N=Ye(Ye(Ye({percent:$,cornerRadius:o,name:q,tooltipPayload:J,midAngle:V,middleRadius:Y,tooltipPosition:K},R),O),{},{value:wt(R,j),startAngle:U,endAngle:z,payload:R,paddingAngle:zt(x)*f}),N})}return Ye(Ye({},O),{},{sectors:_,data:i})});var Qy,MA;function O9(){if(MA)return Qy;MA=1;var e=Math.ceil,t=Math.max;function r(n,i,o,u){for(var l=-1,f=t(e((i-n)/(o||1)),0),d=Array(f);f--;)d[u?f:++l]=n,n+=o;return d}return Qy=r,Qy}var Zy,IA;function xR(){if(IA)return Zy;IA=1;var e=Uk(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*r}return i===i?i:0}return Zy=n,Zy}var Jy,DA;function _9(){if(DA)return Jy;DA=1;var e=O9(),t=zf(),r=xR();function n(i){return function(o,u,l){return l&&typeof l!="number"&&t(o,u,l)&&(u=l=void 0),o=r(o),u===void 0?(u=o,o=0):u=r(u),l=l===void 0?o0&&n.handleDrag(i.changedTouches[0])}),ar(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,o=i.endIndex,u=i.onDragEnd,l=i.startIndex;u==null||u({endIndex:o,startIndex:l})}),n.detachDragEndListener()}),ar(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),ar(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),ar(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),ar(n,"handleSlideDragStart",function(i){var o=UA(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return I9(t,e),N9(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,o=n.endX,u=this.state.scaleValues,l=this.props,f=l.gap,d=l.data,v=d.length-1,p=Math.min(i,o),m=Math.max(i,o),b=t.getIndexInRange(u,p),O=t.getIndexInRange(u,m);return{startIndex:b-b%f,endIndex:O===v?v:O-O%f}}},{key:"getTextOfTick",value:function(n){var i=this.props,o=i.data,u=i.tickFormatter,l=i.dataKey,f=wt(o[n],l,n);return Ee(u)?u(f,n):f}},{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(n){var i=this.state,o=i.slideMoveStartX,u=i.startX,l=i.endX,f=this.props,d=f.x,v=f.width,p=f.travellerWidth,m=f.startIndex,b=f.endIndex,O=f.onChange,x=n.pageX-o;x>0?x=Math.min(x,d+v-p-l,d+v-p-u):x<0&&(x=Math.max(x,d-u,d-l));var g=this.getIndex({startX:u+x,endX:l+x});(g.startIndex!==m||g.endIndex!==b)&&O&&O(g),this.setState({startX:u+x,endX:l+x,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var o=UA(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,o=i.brushMoveStartX,u=i.movingTravellerId,l=i.endX,f=i.startX,d=this.state[u],v=this.props,p=v.x,m=v.width,b=v.travellerWidth,O=v.onChange,x=v.gap,g=v.data,j={startX:this.state.startX,endX:this.state.endX},E=n.pageX-o;E>0?E=Math.min(E,p+m-b-d):E<0&&(E=Math.max(E,p-d)),j[u]=d+E;var A=this.getIndex(j),T=A.startIndex,P=A.endIndex,_=function(){var R=g.length-1;return u==="startX"&&(l>f?T%x===0:P%x===0)||lf?P%x===0:T%x===0)||l>f&&P===R};this.setState(ar(ar({},u,d+E),"brushMoveStartX",n.pageX),function(){O&&_()&&O(A)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var o=this,u=this.state,l=u.scaleValues,f=u.startX,d=u.endX,v=this.state[i],p=l.indexOf(v);if(p!==-1){var m=p+n;if(!(m===-1||m>=l.length)){var b=l[m];i==="startX"&&b>=d||i==="endX"&&b<=f||this.setState(ar({},i,b),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,o=n.y,u=n.width,l=n.height,f=n.fill,d=n.stroke;return D.createElement("rect",{stroke:d,fill:f,x:i,y:o,width:u,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,o=n.y,u=n.width,l=n.height,f=n.data,d=n.children,v=n.padding,p=C.Children.only(d);return p?D.cloneElement(p,{x:i,y:o,width:u,height:l,margin:v,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(n,i){var o,u,l=this,f=this.props,d=f.y,v=f.travellerWidth,p=f.height,m=f.traveller,b=f.ariaLabel,O=f.data,x=f.startIndex,g=f.endIndex,j=Math.max(n,this.props.x),E=tg(tg({},Se(this.props,!1)),{},{x:j,y:d,width:v,height:p}),A=b||"Min value: ".concat((o=O[x])===null||o===void 0?void 0:o.name,", Max value: ").concat((u=O[g])===null||u===void 0?void 0:u.name);return D.createElement(qe,{tabIndex:0,role:"slider","aria-label":A,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(P){["ArrowLeft","ArrowRight"].includes(P.key)&&(P.preventDefault(),P.stopPropagation(),l.handleTravellerMoveKeyboard(P.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(m,E))}},{key:"renderSlide",value:function(n,i){var o=this.props,u=o.y,l=o.height,f=o.stroke,d=o.travellerWidth,v=Math.min(n,i)+d,p=Math.max(Math.abs(i-n)-d,0);return D.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:v,y:u,width:p,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,o=n.endIndex,u=n.y,l=n.height,f=n.travellerWidth,d=n.stroke,v=this.state,p=v.startX,m=v.endX,b=5,O={pointerEvents:"none",fill:d};return D.createElement(qe,{className:"recharts-brush-texts"},D.createElement(Ki,af({textAnchor:"end",verticalAnchor:"middle",x:Math.min(p,m)-b,y:u+l/2},O),this.getTextOfTick(i)),D.createElement(Ki,af({textAnchor:"start",verticalAnchor:"middle",x:Math.max(p,m)+f+b,y:u+l/2},O),this.getTextOfTick(o)))}},{key:"render",value:function(){var n=this.props,i=n.data,o=n.className,u=n.children,l=n.x,f=n.y,d=n.width,v=n.height,p=n.alwaysShowText,m=this.state,b=m.startX,O=m.endX,x=m.isTextActive,g=m.isSlideMoving,j=m.isTravellerMoving,E=m.isTravellerFocused;if(!i||!i.length||!le(l)||!le(f)||!le(d)||!le(v)||d<=0||v<=0)return null;var A=Me("recharts-brush",o),T=D.Children.count(u)===1,P=C9("userSelect","none");return D.createElement(qe,{className:A,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:P},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(b,O),this.renderTravellerLayer(b,"startX"),this.renderTravellerLayer(O,"endX"),(x||g||j||E||p)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,o=n.y,u=n.width,l=n.height,f=n.stroke,d=Math.floor(o+l/2)-1;return D.createElement(D.Fragment,null,D.createElement("rect",{x:i,y:o,width:u,height:l,fill:f,stroke:"none"}),D.createElement("line",{x1:i+1,y1:d,x2:i+u-1,y2:d,fill:"none",stroke:"#fff"}),D.createElement("line",{x1:i+1,y1:d+2,x2:i+u-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var o;return D.isValidElement(n)?o=D.cloneElement(n,i):Ee(n)?o=n(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(n,i){var o=n.data,u=n.width,l=n.x,f=n.travellerWidth,d=n.updateId,v=n.startIndex,p=n.endIndex;if(o!==i.prevData||d!==i.prevUpdateId)return tg({prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:l,prevWidth:u},o&&o.length?L9({data:o,width:u,x:l,travellerWidth:f,startIndex:v,endIndex:p}):{scale:null,scaleValues:null});if(i.scale&&(u!==i.prevWidth||l!==i.prevX||f!==i.prevTravellerWidth)){i.scale.range([l,l+u-f]);var m=i.scale.domain().map(function(b){return i.scale(b)});return{prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:l,prevWidth:u,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(n,i){for(var o=n.length,u=0,l=o-1;l-u>1;){var f=Math.floor((u+l)/2);n[f]>i?l=f:u=f}return i>=n[l]?l:u}}])})(C.PureComponent);ar(so,"displayName","Brush");ar(so,"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 rg,WA;function B9(){if(WA)return rg;WA=1;var e=Cb();function t(r,n){var i;return e(r,function(o,u,l){return i=n(o,u,l),!i}),!!i}return rg=t,rg}var ng,HA;function F9(){if(HA)return ng;HA=1;var e=xk(),t=an(),r=B9(),n=Jt(),i=zf();function o(u,l,f){var d=n(u)?e:r;return f&&i(u,l,f)&&(l=void 0),d(u,t(l,3))}return ng=o,ng}var q9=F9();const z9=Ue(q9);var Jr=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},ig,KA;function U9(){if(KA)return ig;KA=1;var e=Lk();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return ig=t,ig}var ag,VA;function W9(){if(VA)return ag;VA=1;var e=U9(),t=Ik(),r=an();function n(i,o){var u={};return o=r(o,3),t(i,function(l,f,d){e(u,f,o(l,f,d))}),u}return ag=n,ag}var H9=W9();const K9=Ue(H9);var og,GA;function V9(){if(GA)return og;GA=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function nV(e,t){var r=e.x,n=e.y,i=tV(e,Q9),o="".concat(r),u=parseInt(o,10),l="".concat(n),f=parseInt(l,10),d="".concat(t.height||i.height),v=parseInt(d,10),p="".concat(t.width||i.width),m=parseInt(p,10);return js(js(js(js(js({},t),i),u?{x:u}:{}),f?{y:f}:{}),{},{height:v,width:m,name:t.name,radius:t.radius})}function ZA(e){return D.createElement(yR,k0({shapeType:"rectangle",propTransformer:nV,activeClassName:"recharts-active-bar"},e))}var iV=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var o=le(n)||AB(n);return o?t(n,i):(o||Gi(),r)}},aV=["value","background"],PR;function uo(e){"@babel/helpers - typeof";return uo=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},uo(e)}function oV(e,t){if(e==null)return{};var r=sV(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sf(){return sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(V)0&&Math.abs(z)0&&(U=Math.min((ce||0)-(z[me-1]||0),U))}),Number.isFinite(U)){var V=U/$,Y=x.layout==="vertical"?n.height:n.width;if(x.padding==="gap"&&(N=V*Y/2),x.padding==="no-gap"){var J=Ut(t.barCategoryGap,V*Y),K=V*Y/2;N=K-J-(K-J)/Y*J}}}i==="xAxis"?R=[n.left+(A.left||0)+(N||0),n.left+n.width-(A.right||0)-(N||0)]:i==="yAxis"?R=f==="horizontal"?[n.top+n.height-(A.bottom||0),n.top+(A.top||0)]:[n.top+(A.top||0)+(N||0),n.top+n.height-(A.bottom||0)-(N||0)]:R=x.range,P&&(R=[R[1],R[0]]);var ee=XN(x,o,m),Z=ee.scale,L=ee.realScaleType;Z.domain(j).range(R),YN(Z);var H=QN(Z,Ir(Ir({},x),{},{realScaleType:L}));i==="xAxis"?(q=g==="top"&&!T||g==="bottom"&&T,I=n.left,W=p[_]-q*x.height):i==="yAxis"&&(q=g==="left"&&!T||g==="right"&&T,I=p[_]-q*x.width,W=n.top);var oe=Ir(Ir(Ir({},x),H),{},{realScaleType:L,x:I,y:W,scale:Z,width:i==="xAxis"?n.width:x.width,height:i==="yAxis"?n.height:x.height});return oe.bandSize=Uc(oe,H),!x.hide&&i==="xAxis"?p[_]+=(q?-1:1)*oe.height:x.hide||(p[_]+=(q?-1:1)*oe.width),Ir(Ir({},b),{},sd({},O,oe))},{})},CR=function(t,r){var n=t.x,i=t.y,o=r.x,u=r.y;return{x:Math.min(n,o),y:Math.min(i,u),width:Math.abs(o-n),height:Math.abs(u-i)}},gV=function(t){var r=t.x1,n=t.y1,i=t.x2,o=t.y2;return CR({x:r,y:n},{x:i,y:o})},kR=(function(){function e(t){vV(this,e),this.scale=t}return mV(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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,o=n.position;if(r!==void 0){if(o)switch(o){case"start":return this.scale(r);case"middle":{var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+u}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(i){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+f}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],o=n[n.length-1];return i<=o?r>=i&&r<=o:r>=o&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])})();sd(kR,"EPS",1e-4);var ax=function(t){var r=Object.keys(t).reduce(function(n,i){return Ir(Ir({},n),{},sd({},i,kR.create(t[i])))},{});return Ir(Ir({},r),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=o.bandAware,l=o.position;return K9(i,function(f,d){return r[d].apply(f,{bandAware:u,position:l})})},isInRange:function(i){return _R(i,function(o,u){return r[u].isInRange(o)})}})};function bV(e){return(e%180+180)%180}var xV=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=bV(i),u=o*Math.PI/180,l=Math.atan(n/r),f=u>l&&u-1?f[d?o[v]:v]:void 0}}return lg=n,lg}var cg,iT;function SV(){if(iT)return cg;iT=1;var e=xR();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return cg=t,cg}var fg,aT;function OV(){if(aT)return fg;aT=1;var e=kk(),t=an(),r=SV(),n=Math.max;function i(o,u,l){var f=o==null?0:o.length;if(!f)return-1;var d=l==null?0:r(l);return d<0&&(d=n(f+d,0)),e(o,t(u,3),d)}return fg=i,fg}var dg,oT;function _V(){if(oT)return dg;oT=1;var e=wV(),t=OV(),r=e(t);return dg=r,dg}var PV=_V();const jV=Ue(PV);var EV=VC();const AV=Ue(EV);var TV=AV(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("")}),ox=C.createContext(void 0),sx=C.createContext(void 0),NR=C.createContext(void 0),RR=C.createContext({}),$R=C.createContext(void 0),MR=C.createContext(0),IR=C.createContext(0),sT=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,o=r.offset,u=t.clipPathId,l=t.children,f=t.width,d=t.height,v=TV(o);return D.createElement(ox.Provider,{value:n},D.createElement(sx.Provider,{value:i},D.createElement(RR.Provider,{value:o},D.createElement(NR.Provider,{value:v},D.createElement($R.Provider,{value:u},D.createElement(MR.Provider,{value:d},D.createElement(IR.Provider,{value:f},l)))))))},CV=function(){return C.useContext($R)},DR=function(t){var r=C.useContext(ox);r==null&&Gi();var n=r[t];return n==null&&Gi(),n},kV=function(){var t=C.useContext(ox);return ai(t)},NV=function(){var t=C.useContext(sx),r=jV(t,function(n){return _R(n.domain,Number.isFinite)});return r||ai(t)},LR=function(t){var r=C.useContext(sx);r==null&&Gi();var n=r[t];return n==null&&Gi(),n},RV=function(){var t=C.useContext(NR);return t},$V=function(){return C.useContext(RR)},ux=function(){return C.useContext(IR)},lx=function(){return C.useContext(MR)};function lo(e){"@babel/helpers - typeof";return lo=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},lo(e)}function MV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IV(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function y7(e,t){return HR(e,t+1)}function g7(e,t,r,n,i){for(var o=(n||[]).slice(),u=t.start,l=t.end,f=0,d=1,v=u,p=function(){var O=n==null?void 0:n[f];if(O===void 0)return{v:HR(n,d)};var x=f,g,j=function(){return g===void 0&&(g=r(O,x)),g},E=O.coordinate,A=f===0||df(e,E,j,v,l);A||(f=0,v=u,d+=1),A&&(v=E+e*(j()/2+i),f+=d)},m;d<=o.length;)if(m=p(),m)return m.v;return[]}function wu(e){"@babel/helpers - typeof";return wu=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},wu(e)}function vT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dt(e){for(var t=1;t0?b.coordinate-g*e:b.coordinate})}else o[m]=b=Dt(Dt({},b),{},{tickCoord:b.coordinate});var j=df(e,b.tickCoord,x,l,f);j&&(f=b.tickCoord-e*(x()/2+i),o[m]=Dt(Dt({},b),{},{isShow:!0}))},v=u-1;v>=0;v--)d(v);return o}function O7(e,t,r,n,i,o){var u=(n||[]).slice(),l=u.length,f=t.start,d=t.end;if(o){var v=n[l-1],p=r(v,l-1),m=e*(v.coordinate+e*p/2-d);u[l-1]=v=Dt(Dt({},v),{},{tickCoord:m>0?v.coordinate-m*e:v.coordinate});var b=df(e,v.tickCoord,function(){return p},f,d);b&&(d=v.tickCoord-e*(p/2+i),u[l-1]=Dt(Dt({},v),{},{isShow:!0}))}for(var O=o?l-1:l,x=function(E){var A=u[E],T,P=function(){return T===void 0&&(T=r(A,E)),T};if(E===0){var _=e*(A.coordinate-e*P()/2-f);u[E]=A=Dt(Dt({},A),{},{tickCoord:_<0?A.coordinate-_*e:A.coordinate})}else u[E]=A=Dt(Dt({},A),{},{tickCoord:A.coordinate});var N=df(e,A.tickCoord,P,f,d);N&&(f=A.tickCoord+e*(P()/2+i),u[E]=Dt(Dt({},A),{},{isShow:!0}))},g=0;g=2?zt(i[1].coordinate-i[0].coordinate):1,j=m7(o,g,b);return f==="equidistantPreserveStart"?g7(g,j,x,i,u):(f==="preserveStart"||f==="preserveStartEnd"?m=O7(g,j,x,i,u,f==="preserveStartEnd"):m=S7(g,j,x,i,u),m.filter(function(E){return E.isShow}))}var _7=["viewBox"],P7=["viewBox"],j7=["ticks"];function po(e){"@babel/helpers - typeof";return po=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},po(e)}function Ba(){return Ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function E7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function A7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yT(e,t){for(var r=0;r0?f(this.props):f(b)),u<=0||l<=0||!O||!O.length?null:D.createElement(qe,{className:Me("recharts-cartesian-axis",d),ref:function(g){n.layerReference=g}},o&&this.renderAxisLine(),this.renderTicks(O,this.state.fontSize,this.state.letterSpacing),At.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,o){var u,l=Me(i.className,"recharts-cartesian-axis-tick-value");return D.isValidElement(n)?u=D.cloneElement(n,bt(bt({},i),{},{className:l})):Ee(n)?u=n(bt(bt({},i),{},{className:l})):u=D.createElement(Ki,Ba({},i,{className:"recharts-cartesian-axis-tick-value"}),o),u}}])})(C.Component);px(To,"displayName","CartesianAxis");px(To,"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 M7=["x1","y1","x2","y2","key"],I7=["offset"];function Xi(e){"@babel/helpers - typeof";return Xi=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},Xi(e)}function gT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function F7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var q7=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,o=t.y,u=t.width,l=t.height,f=t.ry;return D.createElement("rect",{x:i,y:o,ry:f,width:u,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function GR(e,t){var r;if(D.isValidElement(e))r=D.cloneElement(e,t);else if(Ee(e))r=e(t);else{var n=t.x1,i=t.y1,o=t.x2,u=t.y2,l=t.key,f=bT(t,M7),d=Se(f,!1);d.offset;var v=bT(d,I7);r=D.createElement("line",qi({},v,{x1:n,y1:i,x2:o,y2:u,fill:"none",key:l}))}return r}function z7(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var u=o.map(function(l,f){var d=Lt(Lt({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(f),index:f});return GR(i,d)});return D.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function U7(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;var u=o.map(function(l,f){var d=Lt(Lt({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(f),index:f});return GR(i,d)});return D.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function W7(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,u=e.height,l=e.horizontalPoints,f=e.horizontal,d=f===void 0?!0:f;if(!d||!t||!t.length)return null;var v=l.map(function(m){return Math.round(m+i-i)}).sort(function(m,b){return m-b});i!==v[0]&&v.unshift(0);var p=v.map(function(m,b){var O=!v[b+1],x=O?i+u-m:v[b+1]-m;if(x<=0)return null;var g=b%t.length;return D.createElement("rect",{key:"react-".concat(b),y:m,x:n,height:x,width:o,stroke:"none",fill:t[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return D.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function H7(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,u=e.y,l=e.width,f=e.height,d=e.verticalPoints;if(!r||!n||!n.length)return null;var v=d.map(function(m){return Math.round(m+o-o)}).sort(function(m,b){return m-b});o!==v[0]&&v.unshift(0);var p=v.map(function(m,b){var O=!v[b+1],x=O?o+l-m:v[b+1]-m;if(x<=0)return null;var g=b%n.length;return D.createElement("rect",{key:"react-".concat(b),x:m,y:u,width:x,height:f,stroke:"none",fill:n[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return D.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var K7=function(t,r){var n=t.xAxis,i=t.width,o=t.height,u=t.offset;return GN(dx(Lt(Lt(Lt({},To.defaultProps),n),{},{ticks:Sn(n,!0),viewBox:{x:0,y:0,width:i,height:o}})),u.left,u.left+u.width,r)},V7=function(t,r){var n=t.yAxis,i=t.width,o=t.height,u=t.offset;return GN(dx(Lt(Lt(Lt({},To.defaultProps),n),{},{ticks:Sn(n,!0),viewBox:{x:0,y:0,width:i,height:o}})),u.top,u.top+u.height,r)},Na={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Su(e){var t,r,n,i,o,u,l=ux(),f=lx(),d=$V(),v=Lt(Lt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Na.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Na.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Na.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Na.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Na.vertical,verticalFill:(u=e.verticalFill)!==null&&u!==void 0?u:Na.verticalFill,x:le(e.x)?e.x:d.left,y:le(e.y)?e.y:d.top,width:le(e.width)?e.width:d.width,height:le(e.height)?e.height:d.height}),p=v.x,m=v.y,b=v.width,O=v.height,x=v.syncWithTicks,g=v.horizontalValues,j=v.verticalValues,E=kV(),A=NV();if(!le(b)||b<=0||!le(O)||O<=0||!le(p)||p!==+p||!le(m)||m!==+m)return null;var T=v.verticalCoordinatesGenerator||K7,P=v.horizontalCoordinatesGenerator||V7,_=v.horizontalPoints,N=v.verticalPoints;if((!_||!_.length)&&Ee(P)){var R=g&&g.length,I=P({yAxis:A?Lt(Lt({},A),{},{ticks:R?g:A.ticks}):void 0,width:l,height:f,offset:d},R?!0:x);qr(Array.isArray(I),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Xi(I),"]")),Array.isArray(I)&&(_=I)}if((!N||!N.length)&&Ee(T)){var W=j&&j.length,q=T({xAxis:E?Lt(Lt({},E),{},{ticks:W?j:E.ticks}):void 0,width:l,height:f,offset:d},W?!0:x);qr(Array.isArray(q),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Xi(q),"]")),Array.isArray(q)&&(N=q)}return D.createElement("g",{className:"recharts-cartesian-grid"},D.createElement(q7,{fill:v.fill,fillOpacity:v.fillOpacity,x:v.x,y:v.y,width:v.width,height:v.height,ry:v.ry}),D.createElement(z7,qi({},v,{offset:d,horizontalPoints:_,xAxis:E,yAxis:A})),D.createElement(U7,qi({},v,{offset:d,verticalPoints:N,xAxis:E,yAxis:A})),D.createElement(W7,qi({},v,{horizontalPoints:_})),D.createElement(H7,qi({},v,{verticalPoints:N})))}Su.displayName="CartesianGrid";var G7=["type","layout","connectNulls","ref"],X7=["key"];function ho(e){"@babel/helpers - typeof";return ho=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},ho(e)}function xT(e,t){if(e==null)return{};var r=Y7(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Y7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ds(){return Ds=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rp){b=[].concat(Ra(f.slice(0,O)),[p-x]);break}var g=b.length%2===0?[0,m]:[m];return[].concat(Ra(t.repeat(f,v)),Ra(b),g).map(function(j){return"".concat(j,"px")}).join(", ")}),Dr(r,"id",_o("recharts-line-")),Dr(r,"pathRef",function(u){r.mainCurve=u}),Dr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Dr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return oG(t,e),rG(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,u=o.points,l=o.xAxis,f=o.yAxis,d=o.layout,v=o.children,p=fr(v,Du);if(!p)return null;var m=function(x,g){return{x:x.x,y:x.y,value:x.value,errorVal:wt(x.payload,g)}},b={clipPath:n?"url(#clipPath-".concat(i,")"):null};return D.createElement(qe,b,p.map(function(O){return D.cloneElement(O,{key:"bar-".concat(O.props.dataKey),data:u,xAxis:l,yAxis:f,layout:d,dataPointFormatter:m})}))}},{key:"renderDots",value:function(n,i,o){var u=this.props.isAnimationActive;if(u&&!this.state.isAnimationFinished)return null;var l=this.props,f=l.dot,d=l.points,v=l.dataKey,p=Se(this.props,!1),m=Se(f,!0),b=d.map(function(x,g){var j=ir(ir(ir({key:"dot-".concat(g),r:3},p),m),{},{index:g,cx:x.x,cy:x.y,value:x.value,dataKey:v,payload:x.payload,points:d});return t.renderDotItem(f,j)}),O={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return D.createElement(qe,Ds({className:"recharts-line-dots",key:"dots"},O),b)}},{key:"renderCurveStatically",value:function(n,i,o,u){var l=this.props,f=l.type,d=l.layout,v=l.connectNulls;l.ref;var p=xT(l,G7),m=ir(ir(ir({},Se(p,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:n},u),{},{type:f,layout:d,connectNulls:v});return D.createElement(Kc,Ds({},m,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var o=this,u=this.props,l=u.points,f=u.strokeDasharray,d=u.isAnimationActive,v=u.animationBegin,p=u.animationDuration,m=u.animationEasing,b=u.animationId,O=u.animateNewValues,x=u.width,g=u.height,j=this.state,E=j.prevPoints,A=j.totalLength;return D.createElement(tn,{begin:v,duration:p,isActive:d,easing:m,from:{t:0},to:{t:1},key:"line-".concat(b),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(T){var P=T.t;if(E){var _=E.length/l.length,N=l.map(function($,U){var z=Math.floor(U*_);if(E[z]){var V=E[z],Y=sr(V.x,$.x),J=sr(V.y,$.y);return ir(ir({},$),{},{x:Y(P),y:J(P)})}if(O){var K=sr(x*2,$.x),ee=sr(g/2,$.y);return ir(ir({},$),{},{x:K(P),y:ee(P)})}return ir(ir({},$),{},{x:$.x,y:$.y})});return o.renderCurveStatically(N,n,i)}var R=sr(0,A),I=R(P),W;if(f){var q="".concat(f).split(/[,\s]+/gim).map(function($){return parseFloat($)});W=o.getStrokeDasharray(I,A,q)}else W=o.generateSimpleStrokeDasharray(A,I);return o.renderCurveStatically(l,n,i,{strokeDasharray:W})})}},{key:"renderCurve",value:function(n,i){var o=this.props,u=o.points,l=o.isAnimationActive,f=this.state,d=f.prevPoints,v=f.totalLength;return l&&u&&u.length&&(!d&&v>0||!Iu(d,u))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(u,n,i)}},{key:"render",value:function(){var n,i=this.props,o=i.hide,u=i.dot,l=i.points,f=i.className,d=i.xAxis,v=i.yAxis,p=i.top,m=i.left,b=i.width,O=i.height,x=i.isAnimationActive,g=i.id;if(o||!l||!l.length)return null;var j=this.state.isAnimationFinished,E=l.length===1,A=Me("recharts-line",f),T=d&&d.allowDataOverflow,P=v&&v.allowDataOverflow,_=T||P,N=ke(g)?this.id:g,R=(n=Se(u,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},I=R.r,W=I===void 0?3:I,q=R.strokeWidth,$=q===void 0?2:q,U=FB(u)?u:{},z=U.clipDot,V=z===void 0?!0:z,Y=W*2+$;return D.createElement(qe,{className:A},T||P?D.createElement("defs",null,D.createElement("clipPath",{id:"clipPath-".concat(N)},D.createElement("rect",{x:T?m:m-b/2,y:P?p:p-O/2,width:T?b:b*2,height:P?O:O*2})),!V&&D.createElement("clipPath",{id:"clipPath-dots-".concat(N)},D.createElement("rect",{x:m-Y/2,y:p-Y/2,width:b+Y,height:O+Y}))):null,!E&&this.renderCurve(_,N),this.renderErrorBar(_,N),(E||u)&&this.renderDots(_,V,N),(!x||j)&&En.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var o=n.length%2!==0?[].concat(Ra(n),[0]):n,u=[],l=0;le.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function YG(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function QG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZG(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?u:t&&t.length&&le(i)&&le(o)?t.slice(i,o+1):[]};function l$(e){return e==="number"?[0,"auto"]:void 0}var Y0=function(t,r,n,i){var o=t.graphicalItems,u=t.tooltipAxis,l=dd(r,t);return n<0||!o||!o.length||n>=l.length?null:o.reduce(function(f,d){var v,p=(v=d.props.data)!==null&&v!==void 0?v:r;p&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(p=p.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(u.dataKey&&!u.allowDuplicatedCategory){var b=p===void 0?l:p;m=yc(b,u.dataKey,i)}else m=p&&p[n]||l[n];return m?[].concat(go(f),[JN(d,m)]):f},[])},TT=function(t,r,n,i){var o=i||{x:t.chartX,y:t.chartY},u=cX(o,n),l=t.orderedTooltipTicks,f=t.tooltipAxis,d=t.tooltipTicks,v=D6(u,l,d,f);if(v>=0&&d){var p=d[v]&&d[v].value,m=Y0(t,r,v,p),b=fX(n,l,v,o);return{activeTooltipIndex:v,activeLabel:p,activePayload:m,activeCoordinate:b}}return null},dX=function(t,r){var n=r.axes,i=r.graphicalItems,o=r.axisType,u=r.axisIdKey,l=r.stackGroups,f=r.dataStartIndex,d=r.dataEndIndex,v=t.layout,p=t.children,m=t.stackOffset,b=VN(v,o);return n.reduce(function(O,x){var g,j=x.type.defaultProps!==void 0?te(te({},x.type.defaultProps),x.props):x.props,E=j.type,A=j.dataKey,T=j.allowDataOverflow,P=j.allowDuplicatedCategory,_=j.scale,N=j.ticks,R=j.includeHidden,I=j[u];if(O[I])return O;var W=dd(t.data,{graphicalItems:i.filter(function(H){var oe,ce=u in H.props?H.props[u]:(oe=H.type.defaultProps)===null||oe===void 0?void 0:oe[u];return ce===I}),dataStartIndex:f,dataEndIndex:d}),q=W.length,$,U,z;LG(j.domain,T,E)&&($=c0(j.domain,null,T),b&&(E==="number"||_!=="auto")&&(z=Rs(W,A,"category")));var V=l$(E);if(!$||$.length===0){var Y,J=(Y=j.domain)!==null&&Y!==void 0?Y:V;if(A){if($=Rs(W,A,E),E==="category"&&b){var K=CB($);P&&K?(U=$,$=nf(0,q)):P||($=$E(J,$,x).reduce(function(H,oe){return H.indexOf(oe)>=0?H:[].concat(go(H),[oe])},[]))}else if(E==="category")P?$=$.filter(function(H){return H!==""&&!ke(H)}):$=$E(J,$,x).reduce(function(H,oe){return H.indexOf(oe)>=0||oe===""||ke(oe)?H:[].concat(go(H),[oe])},[]);else if(E==="number"){var ee=z6(W,i.filter(function(H){var oe,ce,me=u in H.props?H.props[u]:(oe=H.type.defaultProps)===null||oe===void 0?void 0:oe[u],Pe="hide"in H.props?H.props.hide:(ce=H.type.defaultProps)===null||ce===void 0?void 0:ce.hide;return me===I&&(R||!Pe)}),A,o,v);ee&&($=ee)}b&&(E==="number"||_!=="auto")&&(z=Rs(W,A,"category"))}else b?$=nf(0,q):l&&l[I]&&l[I].hasStack&&E==="number"?$=m==="expand"?[0,1]:ZN(l[I].stackGroups,f,d):$=KN(W,i.filter(function(H){var oe=u in H.props?H.props[u]:H.type.defaultProps[u],ce="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return oe===I&&(R||!ce)}),E,v,!0);if(E==="number")$=V0(p,$,I,o,N),J&&($=c0(J,$,T));else if(E==="category"&&J){var Z=J,L=$.every(function(H){return Z.indexOf(H)>=0});L&&($=Z)}}return te(te({},O),{},_e({},I,te(te({},j),{},{axisType:o,domain:$,categoricalDomain:z,duplicateDomain:U,originalDomain:(g=j.domain)!==null&&g!==void 0?g:V,isCategorical:b,layout:v})))},{})},pX=function(t,r){var n=r.graphicalItems,i=r.Axis,o=r.axisType,u=r.axisIdKey,l=r.stackGroups,f=r.dataStartIndex,d=r.dataEndIndex,v=t.layout,p=t.children,m=dd(t.data,{graphicalItems:n,dataStartIndex:f,dataEndIndex:d}),b=m.length,O=VN(v,o),x=-1;return n.reduce(function(g,j){var E=j.type.defaultProps!==void 0?te(te({},j.type.defaultProps),j.props):j.props,A=E[u],T=l$("number");if(!g[A]){x++;var P;return O?P=nf(0,b):l&&l[A]&&l[A].hasStack?(P=ZN(l[A].stackGroups,f,d),P=V0(p,P,A,o)):(P=c0(T,KN(m,n.filter(function(_){var N,R,I=u in _.props?_.props[u]:(N=_.type.defaultProps)===null||N===void 0?void 0:N[u],W="hide"in _.props?_.props.hide:(R=_.type.defaultProps)===null||R===void 0?void 0:R.hide;return I===A&&!W}),"number",v),i.defaultProps.allowDataOverflow),P=V0(p,P,A,o)),te(te({},g),{},_e({},A,te(te({axisType:o},i.defaultProps),{},{hide:!0,orientation:cr(uX,"".concat(o,".").concat(x%2),null),domain:P,originalDomain:T,isCategorical:O,layout:v})))}return g},{})},hX=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,o=r.AxisComp,u=r.graphicalItems,l=r.stackGroups,f=r.dataStartIndex,d=r.dataEndIndex,v=t.children,p="".concat(i,"Id"),m=fr(v,o),b={};return m&&m.length?b=dX(t,{axes:m,graphicalItems:u,axisType:i,axisIdKey:p,stackGroups:l,dataStartIndex:f,dataEndIndex:d}):u&&u.length&&(b=pX(t,{Axis:o,graphicalItems:u,axisType:i,axisIdKey:p,stackGroups:l,dataStartIndex:f,dataEndIndex:d})),b},vX=function(t){var r=ai(t),n=Sn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:kb(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Uc(r,n)}},CT=function(t){var r=t.children,n=t.defaultShowTooltip,i=or(r,so),o=0,u=0;return t.data&&t.data.length!==0&&(u=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(u=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:u,activeTooltipIndex:-1,isTooltipActive:!!n}},mX=function(t){return!t||!t.length?!1:t.some(function(r){var n=_n(r&&r.type);return n&&n.indexOf("Bar")>=0})},kT=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"}},yX=function(t,r){var n=t.props,i=t.graphicalItems,o=t.xAxisMap,u=o===void 0?{}:o,l=t.yAxisMap,f=l===void 0?{}:l,d=n.width,v=n.height,p=n.children,m=n.margin||{},b=or(p,so),O=or(p,Pn),x=Object.keys(f).reduce(function(P,_){var N=f[_],R=N.orientation;return!N.mirror&&!N.hide?te(te({},P),{},_e({},R,P[R]+N.width)):P},{left:m.left||0,right:m.right||0}),g=Object.keys(u).reduce(function(P,_){var N=u[_],R=N.orientation;return!N.mirror&&!N.hide?te(te({},P),{},_e({},R,cr(P,"".concat(R))+N.height)):P},{top:m.top||0,bottom:m.bottom||0}),j=te(te({},g),x),E=j.bottom;b&&(j.bottom+=b.props.height||so.defaultProps.height),O&&r&&(j=F6(j,i,n,r));var A=d-j.left-j.right,T=v-j.top-j.bottom;return te(te({brushBottom:E},j),{},{width:Math.max(A,0),height:Math.max(T,0)})},gX=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},hx=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,u=t.validateTooltipEventTypes,l=u===void 0?["axis"]:u,f=t.axisComponents,d=t.legendContent,v=t.formatAxisMap,p=t.defaultProps,m=function(j,E){var A=E.graphicalItems,T=E.stackGroups,P=E.offset,_=E.updateId,N=E.dataStartIndex,R=E.dataEndIndex,I=j.barSize,W=j.layout,q=j.barGap,$=j.barCategoryGap,U=j.maxBarSize,z=kT(W),V=z.numericAxisName,Y=z.cateAxisName,J=mX(A),K=[];return A.forEach(function(ee,Z){var L=dd(j.data,{graphicalItems:[ee],dataStartIndex:N,dataEndIndex:R}),H=ee.type.defaultProps!==void 0?te(te({},ee.type.defaultProps),ee.props):ee.props,oe=H.dataKey,ce=H.maxBarSize,me=H["".concat(V,"Id")],Pe=H["".concat(Y,"Id")],Le={},Ae=f.reduce(function(Ht,jr){var na=E["".concat(jr.axisType,"Map")],Co=H["".concat(jr.axisType,"Id")];na&&na[Co]||jr.axisType==="zAxis"||Gi();var ko=na[Co];return te(te({},Ht),{},_e(_e({},jr.axisType,ko),"".concat(jr.axisType,"Ticks"),Sn(ko)))},Le),ae=Ae[Y],ge=Ae["".concat(Y,"Ticks")],Te=T&&T[me]&&T[me].hasStack&&Q6(ee,T[me].stackGroups),ne=_n(ee.type).indexOf("Bar")>=0,We=Uc(ae,ge),Ne=[],Ce=J&&L6({barSize:I,stackGroups:T,totalSize:gX(Ae,Y)});if(ne){var Je,st,Pr=ke(ce)?U:ce,Wr=(Je=(st=Uc(ae,ge,!0))!==null&&st!==void 0?st:Pr)!==null&&Je!==void 0?Je:0;Ne=B6({barGap:q,barCategoryGap:$,bandSize:Wr!==We?Wr:We,sizeList:Ce[Pe],maxBarSize:Pr}),Wr!==We&&(Ne=Ne.map(function(Ht){return te(te({},Ht),{},{position:te(te({},Ht.position),{},{offset:Ht.position.offset-Wr/2})})}))}var Hr=ee&&ee.type&&ee.type.getComposedData;Hr&&K.push({props:te(te({},Hr(te(te({},Ae),{},{displayedData:L,props:j,dataKey:oe,item:ee,bandSize:We,barPosition:Ne,offset:P,stackedData:Te,layout:W,dataStartIndex:N,dataEndIndex:R}))),{},_e(_e(_e({key:ee.key||"item-".concat(Z)},V,Ae[V]),Y,Ae[Y]),"animationId",_)),childIndex:UB(ee,j.children),item:ee})}),K},b=function(j,E){var A=j.props,T=j.dataStartIndex,P=j.dataEndIndex,_=j.updateId;if(!GO({props:A}))return null;var N=A.children,R=A.layout,I=A.stackOffset,W=A.data,q=A.reverseStackOrder,$=kT(R),U=$.numericAxisName,z=$.cateAxisName,V=fr(N,n),Y=X6(W,V,"".concat(U,"Id"),"".concat(z,"Id"),I,q),J=f.reduce(function(H,oe){var ce="".concat(oe.axisType,"Map");return te(te({},H),{},_e({},ce,hX(A,te(te({},oe),{},{graphicalItems:V,stackGroups:oe.axisType===U&&Y,dataStartIndex:T,dataEndIndex:P}))))},{}),K=yX(te(te({},J),{},{props:A,graphicalItems:V}),E==null?void 0:E.legendBBox);Object.keys(J).forEach(function(H){J[H]=v(A,J[H],K,H.replace("Map",""),r)});var ee=J["".concat(z,"Map")],Z=vX(ee),L=m(A,te(te({},J),{},{dataStartIndex:T,dataEndIndex:P,updateId:_,graphicalItems:V,stackGroups:Y,offset:K}));return te(te({formattedGraphicalItems:L,graphicalItems:V,offset:K,stackGroups:Y},Z),J)},O=(function(g){function j(E){var A,T,P;return QG(this,j),P=eX(this,j,[E]),_e(P,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),_e(P,"accessibilityManager",new DG),_e(P,"handleLegendBBoxUpdate",function(_){if(_){var N=P.state,R=N.dataStartIndex,I=N.dataEndIndex,W=N.updateId;P.setState(te({legendBBox:_},b({props:P.props,dataStartIndex:R,dataEndIndex:I,updateId:W},te(te({},P.state),{},{legendBBox:_}))))}}),_e(P,"handleReceiveSyncEvent",function(_,N,R){if(P.props.syncId===_){if(R===P.eventEmitterSymbol&&typeof P.props.syncMethod!="function")return;P.applySyncEvent(N)}}),_e(P,"handleBrushChange",function(_){var N=_.startIndex,R=_.endIndex;if(N!==P.state.dataStartIndex||R!==P.state.dataEndIndex){var I=P.state.updateId;P.setState(function(){return te({dataStartIndex:N,dataEndIndex:R},b({props:P.props,dataStartIndex:N,dataEndIndex:R,updateId:I},P.state))}),P.triggerSyncEvent({dataStartIndex:N,dataEndIndex:R})}}),_e(P,"handleMouseEnter",function(_){var N=P.getMouseInfo(_);if(N){var R=te(te({},N),{},{isTooltipActive:!0});P.setState(R),P.triggerSyncEvent(R);var I=P.props.onMouseEnter;Ee(I)&&I(R,_)}}),_e(P,"triggeredAfterMouseMove",function(_){var N=P.getMouseInfo(_),R=N?te(te({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};P.setState(R),P.triggerSyncEvent(R);var I=P.props.onMouseMove;Ee(I)&&I(R,_)}),_e(P,"handleItemMouseEnter",function(_){P.setState(function(){return{isTooltipActive:!0,activeItem:_,activePayload:_.tooltipPayload,activeCoordinate:_.tooltipPosition||{x:_.cx,y:_.cy}}})}),_e(P,"handleItemMouseLeave",function(){P.setState(function(){return{isTooltipActive:!1}})}),_e(P,"handleMouseMove",function(_){_.persist(),P.throttleTriggeredAfterMouseMove(_)}),_e(P,"handleMouseLeave",function(_){P.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};P.setState(N),P.triggerSyncEvent(N);var R=P.props.onMouseLeave;Ee(R)&&R(N,_)}),_e(P,"handleOuterEvent",function(_){var N=zB(_),R=cr(P.props,"".concat(N));if(N&&Ee(R)){var I,W;/.*touch.*/i.test(N)?W=P.getMouseInfo(_.changedTouches[0]):W=P.getMouseInfo(_),R((I=W)!==null&&I!==void 0?I:{},_)}}),_e(P,"handleClick",function(_){var N=P.getMouseInfo(_);if(N){var R=te(te({},N),{},{isTooltipActive:!0});P.setState(R),P.triggerSyncEvent(R);var I=P.props.onClick;Ee(I)&&I(R,_)}}),_e(P,"handleMouseDown",function(_){var N=P.props.onMouseDown;if(Ee(N)){var R=P.getMouseInfo(_);N(R,_)}}),_e(P,"handleMouseUp",function(_){var N=P.props.onMouseUp;if(Ee(N)){var R=P.getMouseInfo(_);N(R,_)}}),_e(P,"handleTouchMove",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&P.throttleTriggeredAfterMouseMove(_.changedTouches[0])}),_e(P,"handleTouchStart",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&P.handleMouseDown(_.changedTouches[0])}),_e(P,"handleTouchEnd",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&P.handleMouseUp(_.changedTouches[0])}),_e(P,"handleDoubleClick",function(_){var N=P.props.onDoubleClick;if(Ee(N)){var R=P.getMouseInfo(_);N(R,_)}}),_e(P,"handleContextMenu",function(_){var N=P.props.onContextMenu;if(Ee(N)){var R=P.getMouseInfo(_);N(R,_)}}),_e(P,"triggerSyncEvent",function(_){P.props.syncId!==void 0&&vg.emit(mg,P.props.syncId,_,P.eventEmitterSymbol)}),_e(P,"applySyncEvent",function(_){var N=P.props,R=N.layout,I=N.syncMethod,W=P.state.updateId,q=_.dataStartIndex,$=_.dataEndIndex;if(_.dataStartIndex!==void 0||_.dataEndIndex!==void 0)P.setState(te({dataStartIndex:q,dataEndIndex:$},b({props:P.props,dataStartIndex:q,dataEndIndex:$,updateId:W},P.state)));else if(_.activeTooltipIndex!==void 0){var U=_.chartX,z=_.chartY,V=_.activeTooltipIndex,Y=P.state,J=Y.offset,K=Y.tooltipTicks;if(!J)return;if(typeof I=="function")V=I(K,_);else if(I==="value"){V=-1;for(var ee=0;ee=0){var Te,ne;if(U.dataKey&&!U.allowDuplicatedCategory){var We=typeof U.dataKey=="function"?ge:"payload.".concat(U.dataKey.toString());Te=yc(ee,We,V),ne=Z&&L&&yc(L,We,V)}else Te=ee==null?void 0:ee[z],ne=Z&&L&&L[z];if(Pe||me){var Ne=_.props.activeIndex!==void 0?_.props.activeIndex:z;return[C.cloneElement(_,te(te(te({},I.props),Ae),{},{activeIndex:Ne})),null,null]}if(!ke(Te))return[ae].concat(go(P.renderActivePoints({item:I,activePoint:Te,basePoint:ne,childIndex:z,isRange:Z})))}else{var Ce,Je=(Ce=P.getItemByXY(P.state.activeCoordinate))!==null&&Ce!==void 0?Ce:{graphicalItem:ae},st=Je.graphicalItem,Pr=st.item,Wr=Pr===void 0?_:Pr,Hr=st.childIndex,Ht=te(te(te({},I.props),Ae),{},{activeIndex:Hr});return[C.cloneElement(Wr,Ht),null,null]}return Z?[ae,null,null]:[ae,null]}),_e(P,"renderCustomized",function(_,N,R){return C.cloneElement(_,te(te({key:"recharts-customized-".concat(R)},P.props),P.state))}),_e(P,"renderMap",{CartesianGrid:{handler:fc,once:!0},ReferenceArea:{handler:P.renderReferenceElement},ReferenceLine:{handler:fc},ReferenceDot:{handler:P.renderReferenceElement},XAxis:{handler:fc},YAxis:{handler:fc},Brush:{handler:P.renderBrush,once:!0},Bar:{handler:P.renderGraphicChild},Line:{handler:P.renderGraphicChild},Area:{handler:P.renderGraphicChild},Radar:{handler:P.renderGraphicChild},RadialBar:{handler:P.renderGraphicChild},Scatter:{handler:P.renderGraphicChild},Pie:{handler:P.renderGraphicChild},Funnel:{handler:P.renderGraphicChild},Tooltip:{handler:P.renderCursor,once:!0},PolarGrid:{handler:P.renderPolarGrid,once:!0},PolarAngleAxis:{handler:P.renderPolarAxis},PolarRadiusAxis:{handler:P.renderPolarAxis},Customized:{handler:P.renderCustomized}}),P.clipPathId="".concat((A=E.id)!==null&&A!==void 0?A:_o("recharts"),"-clip"),P.throttleTriggeredAfterMouseMove=Wk(P.triggeredAfterMouseMove,(T=E.throttleDelay)!==null&&T!==void 0?T:1e3/60),P.state={},P}return nX(j,g),JG(j,[{key:"componentDidMount",value:function(){var A,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var A=this.props,T=A.children,P=A.data,_=A.height,N=A.layout,R=or(T,qt);if(R){var I=R.props.defaultIndex;if(!(typeof I!="number"||I<0||I>this.state.tooltipTicks.length-1)){var W=this.state.tooltipTicks[I]&&this.state.tooltipTicks[I].value,q=Y0(this.state,P,I,W),$=this.state.tooltipTicks[I].coordinate,U=(this.state.offset.top+_)/2,z=N==="horizontal",V=z?{x:$,y:U}:{y:$,x:U},Y=this.state.formattedGraphicalItems.find(function(K){var ee=K.item;return ee.type.name==="Scatter"});Y&&(V=te(te({},V),Y.props.points[I].tooltipPosition),q=Y.props.points[I].tooltipPayload);var J={activeTooltipIndex:I,isTooltipActive:!0,activeLabel:W,activePayload:q,activeCoordinate:V};this.setState(J),this.renderCursor(R),this.accessibilityManager.setIndex(I)}}}},{key:"getSnapshotBeforeUpdate",value:function(A,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==A.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==A.margin){var P,_;this.accessibilityManager.setDetails({offset:{left:(P=this.props.margin.left)!==null&&P!==void 0?P:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0}})}return null}},{key:"componentDidUpdate",value:function(A){Ng([or(A.children,qt)],[or(this.props.children,qt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var A=or(this.props.children,qt);if(A&&typeof A.props.shared=="boolean"){var T=A.props.shared?"axis":"item";return l.indexOf(T)>=0?T:o}return o}},{key:"getMouseInfo",value:function(A){if(!this.container)return null;var T=this.container,P=T.getBoundingClientRect(),_=Tz(P),N={chartX:Math.round(A.pageX-_.left),chartY:Math.round(A.pageY-_.top)},R=P.width/T.offsetWidth||1,I=this.inRange(N.chartX,N.chartY,R);if(!I)return null;var W=this.state,q=W.xAxisMap,$=W.yAxisMap,U=this.getTooltipEventType(),z=TT(this.state,this.props.data,this.props.layout,I);if(U!=="axis"&&q&&$){var V=ai(q).scale,Y=ai($).scale,J=V&&V.invert?V.invert(N.chartX):null,K=Y&&Y.invert?Y.invert(N.chartY):null;return te(te({},N),{},{xValue:J,yValue:K},z)}return z?te(te({},N),z):null}},{key:"inRange",value:function(A,T){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_=this.props.layout,N=A/P,R=T/P;if(_==="horizontal"||_==="vertical"){var I=this.state.offset,W=N>=I.left&&N<=I.left+I.width&&R>=I.top&&R<=I.top+I.height;return W?{x:N,y:R}:null}var q=this.state,$=q.angleAxisMap,U=q.radiusAxisMap;if($&&U){var z=ai($);return DE({x:N,y:R},z)}return null}},{key:"parseEventsOfWrapper",value:function(){var A=this.props.children,T=this.getTooltipEventType(),P=or(A,qt),_={};P&&T==="axis"&&(P.props.trigger==="click"?_={onClick:this.handleClick}:_={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 N=gc(this.props,this.handleOuterEvent);return te(te({},N),_)}},{key:"addListener",value:function(){vg.on(mg,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){vg.removeListener(mg,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(A,T,P){for(var _=this.state.formattedGraphicalItems,N=0,R=_.length;N{r[i.sessionTypeAsInt]=(r[i.sessionTypeAsInt]||0)+1});const n=Object.entries(r).map(([i,o])=>({name:FL[Number(i)]||`Type ${i}`,value:o,color:zC[Number(i)]||"#6c757d",typeId:Number(i)}));return n.length===0?w.jsx("p",{className:"text-muted-custom text-center",children:"Aucune donnée"}):w.jsx(Ua,{width:"100%",height:300,children:w.jsxs(c$,{children:[w.jsx(on,{data:n,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:100,label:!0,style:t?{cursor:"pointer"}:void 0,onClick:t?(i,o)=>t(n[o].typeId):void 0,children:n.map((i,o)=>w.jsx(ku,{fill:i.color},o))}),w.jsx(qt,{contentStyle:{backgroundColor:"#1a1a2e",border:"1px solid #333"}}),w.jsx(Pn,{})]})})}function wX({sessions:e}){const t={};e.forEach(n=>{if(n.sessionDateAsString){const i=new Date(n.sessionDateAsString),o=`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}`;t[o]=(t[o]||0)+1}});const r=Object.entries(t).sort(([n],[i])=>n.localeCompare(i)).slice(-12).map(([n,i])=>({month:n,sessions:i}));return r.length===0?w.jsx("p",{className:"text-muted-custom text-center",children:"Aucune donnée"}):w.jsx(Ua,{width:"100%",height:300,children:w.jsxs(bX,{data:r,children:[w.jsx(Su,{strokeDasharray:"3 3",stroke:"#333"}),w.jsx(fi,{dataKey:"month",stroke:"#888"}),w.jsx(kn,{stroke:"#888",allowDecimals:!1}),w.jsx(qt,{contentStyle:{backgroundColor:"#1a1a2e",border:"1px solid #333"}}),w.jsx(ra,{dataKey:"sessions",fill:"#4a90d9",name:"Sessions"})]})})}function SX(e){const t=Math.floor(e/60),r=Math.floor(e%60);return`${t}m ${r}s`}function OX(e,t){return e?new Date(e).toLocaleDateString(t==="fr"?"fr-FR":"en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}):"-"}function _X(){const{t:e,lang:t}=zr(),r=ju(),[n,i]=C.useState([]),[o,u]=C.useState([]),[l,f]=C.useState(!0);if(C.useEffect(()=>{Promise.all([FC(),qC()]).then(([x,g])=>{i(x),u(g)}).finally(()=>f(!1))},[]),l)return w.jsx(Eu,{});const d=n.length,v=o.length,p=d>0?Math.round(n.filter(x=>x.success).length/d*100):0,m=o.length>0?Math.round(o.reduce((x,g)=>x+g.avgPrecision,0)/o.length*100)/100:0,b=n.slice(0,10),O=[...o].sort((x,g)=>g.avgPrecision-x.avgPrecision).slice(0,5);return w.jsxs(w.Fragment,{children:[w.jsx("h2",{className:"mb-4",children:e("dashboard.title")}),w.jsxs(ur,{className:"mb-4 g-3",children:[w.jsx($e,{xs:6,md:3,children:w.jsx(pt,{title:e("dashboard.totalSessions"),value:d,color:"#4a90d9",onClick:()=>r("/sessions")})}),w.jsx($e,{xs:6,md:3,children:w.jsx(pt,{title:e("dashboard.totalUsers"),value:v,color:"#9b59b6",onClick:()=>r("/users")})}),w.jsx($e,{xs:6,md:3,children:w.jsx(pt,{title:e("dashboard.successRate"),value:`${p}%`,color:"#27ae60"})}),w.jsx($e,{xs:6,md:3,children:w.jsx(pt,{title:e("dashboard.avgPrecision"),value:m.toFixed(1),color:"#f39c12"})})]}),w.jsxs(ur,{className:"mb-4 g-3",children:[w.jsx($e,{md:6,children:w.jsx(be,{className:"chart-card",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:e("dashboard.sessionsByType")}),w.jsx(xX,{sessions:n,onSliceClick:x=>r(`/sessions?type=${x}`)})]})})}),w.jsx($e,{md:6,children:w.jsx(be,{className:"chart-card",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:e("dashboard.monthlyActivity")}),w.jsx(wX,{sessions:n})]})})})]}),w.jsxs(ur,{className:"g-3",children:[w.jsx($e,{md:8,children:w.jsx(be,{className:"data-card",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:e("dashboard.recentSessions")}),w.jsxs(Fr,{hover:!0,responsive:!0,className:"data-table mb-0",children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("th",{children:e("table.date")}),w.jsx("th",{children:e("table.type")}),w.jsx("th",{children:e("table.scenario")}),w.jsx("th",{children:e("table.score")}),w.jsx("th",{children:e("table.duration")}),w.jsx("th",{children:e("table.result")})]})}),w.jsx("tbody",{children:b.map(x=>w.jsxs("tr",{className:"clickable-row",onClick:()=>r(`/sessions/${x.id}`),children:[w.jsx("td",{children:OX(x.sessionDateAsString,t)}),w.jsx("td",{children:w.jsx(zs,{typeId:x.sessionTypeAsInt})}),w.jsx("td",{children:x.scenarioName||"-"}),w.jsx("td",{children:x.score}),w.jsx("td",{children:SX(x.timeToFinish)}),w.jsx("td",{children:w.jsx(Cf,{success:x.success})})]},x.id))})]})]})})}),w.jsx($e,{md:4,children:w.jsx(be,{className:"data-card",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:e("dashboard.topPrecision")}),w.jsxs(Fr,{hover:!0,className:"data-table mb-0",children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("th",{children:"#"}),w.jsx("th",{children:e("table.user")}),w.jsx("th",{children:e("chart.precision")})]})}),w.jsx("tbody",{children:O.map((x,g)=>w.jsxs("tr",{className:"clickable-row",onClick:()=>r(`/users/${x.id}`),children:[w.jsx("td",{children:g+1}),w.jsx("td",{children:x.firstName&&x.lastName?`${x.firstName} ${x.lastName}`:x.username}),w.jsx("td",{children:x.avgPrecision.toFixed(1)})]},x.id))})]})]})})})]})]})}const PX={type:Ie.string,tooltip:Ie.bool,as:Ie.elementType},pd=C.forwardRef(({as:e="div",className:t,type:r="valid",tooltip:n=!1,...i},o)=>w.jsx(e,{...i,ref:o,className:Oe(t,`${r}-${n?"tooltip":"feedback"}`)}));pd.displayName="Feedback";pd.propTypes=PX;const Nn=C.createContext({}),vx=C.forwardRef(({id:e,bsPrefix:t,className:r,type:n="checkbox",isValid:i=!1,isInvalid:o=!1,as:u="input",...l},f)=>{const{controlId:d}=C.useContext(Nn);return t=Re(t,"form-check-input"),w.jsx(u,{...l,ref:f,type:n,id:e||d,className:Oe(r,t,i&&"is-valid",o&&"is-invalid")})});vx.displayName="FormCheckInput";const gf=C.forwardRef(({bsPrefix:e,className:t,htmlFor:r,...n},i)=>{const{controlId:o}=C.useContext(Nn);return e=Re(e,"form-check-label"),w.jsx("label",{...n,ref:i,htmlFor:r||o,className:Oe(t,e)})});gf.displayName="FormCheckLabel";function jX(e,t){let r=0;return C.Children.map(e,n=>C.isValidElement(n)?t(n,r++):n)}function EX(e,t){return C.Children.toArray(e).some(r=>C.isValidElement(r)&&r.type===t)}const f$=C.forwardRef(({id:e,bsPrefix:t,bsSwitchPrefix:r,inline:n=!1,reverse:i=!1,disabled:o=!1,isValid:u=!1,isInvalid:l=!1,feedbackTooltip:f=!1,feedback:d,feedbackType:v,className:p,style:m,title:b="",type:O="checkbox",label:x,children:g,as:j="input",...E},A)=>{t=Re(t,"form-check"),r=Re(r,"form-switch");const{controlId:T}=C.useContext(Nn),P=C.useMemo(()=>({controlId:e||T}),[T,e]),_=!g&&x!=null&&x!==!1||EX(g,gf),N=w.jsx(vx,{...E,type:O==="switch"?"checkbox":O,ref:A,isValid:u,isInvalid:l,disabled:o,as:j});return w.jsx(Nn.Provider,{value:P,children:w.jsx("div",{style:m,className:Oe(p,_&&t,n&&`${t}-inline`,i&&`${t}-reverse`,O==="switch"&&r),children:g||w.jsxs(w.Fragment,{children:[N,_&&w.jsx(gf,{title:b,children:x}),d&&w.jsx(pd,{type:v,tooltip:f,children:d})]})})})});f$.displayName="FormCheck";const bf=Object.assign(f$,{Input:vx,Label:gf}),d$=C.forwardRef(({bsPrefix:e,type:t,size:r,htmlSize:n,id:i,className:o,isValid:u=!1,isInvalid:l=!1,plaintext:f,readOnly:d,as:v="input",...p},m)=>{const{controlId:b}=C.useContext(Nn);return e=Re(e,"form-control"),w.jsx(v,{...p,type:t,size:n,ref:m,readOnly:d,id:i||b,className:Oe(o,f?`${e}-plaintext`:e,r&&`${e}-${r}`,t==="color"&&`${e}-color`,u&&"is-valid",l&&"is-invalid")})});d$.displayName="FormControl";const AX=Object.assign(d$,{Feedback:pd}),p$=C.forwardRef(({className:e,bsPrefix:t,as:r="div",...n},i)=>(t=Re(t,"form-floating"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));p$.displayName="FormFloating";const mx=C.forwardRef(({controlId:e,as:t="div",...r},n)=>{const i=C.useMemo(()=>({controlId:e}),[e]);return w.jsx(Nn.Provider,{value:i,children:w.jsx(t,{...r,ref:n})})});mx.displayName="FormGroup";const h$=C.forwardRef(({as:e="label",bsPrefix:t,column:r=!1,visuallyHidden:n=!1,className:i,htmlFor:o,...u},l)=>{const{controlId:f}=C.useContext(Nn);t=Re(t,"form-label");let d="col-form-label";typeof r=="string"&&(d=`${d} ${d}-${r}`);const v=Oe(i,t,n&&"visually-hidden",r&&d);return o=o||f,r?w.jsx($e,{ref:l,as:"label",className:v,htmlFor:o,...u}):w.jsx(e,{ref:l,className:v,htmlFor:o,...u})});h$.displayName="FormLabel";const v$=C.forwardRef(({bsPrefix:e,className:t,id:r,...n},i)=>{const{controlId:o}=C.useContext(Nn);return e=Re(e,"form-range"),w.jsx("input",{...n,type:"range",ref:i,className:Oe(t,e),id:r||o})});v$.displayName="FormRange";const m$=C.forwardRef(({bsPrefix:e,size:t,htmlSize:r,className:n,isValid:i=!1,isInvalid:o=!1,id:u,...l},f)=>{const{controlId:d}=C.useContext(Nn);return e=Re(e,"form-select"),w.jsx("select",{...l,size:r,ref:f,className:Oe(n,e,t&&`${e}-${t}`,i&&"is-valid",o&&"is-invalid"),id:u||d})});m$.displayName="FormSelect";const y$=C.forwardRef(({bsPrefix:e,className:t,as:r="small",muted:n,...i},o)=>(e=Re(e,"form-text"),w.jsx(r,{...i,ref:o,className:Oe(t,e,n&&"text-muted")})));y$.displayName="FormText";const g$=C.forwardRef((e,t)=>w.jsx(bf,{...e,ref:t,type:"switch"}));g$.displayName="Switch";const TX=Object.assign(g$,{Input:bf.Input,Label:bf.Label}),b$=C.forwardRef(({bsPrefix:e,className:t,children:r,controlId:n,label:i,...o},u)=>(e=Re(e,"form-floating"),w.jsxs(mx,{ref:u,className:Oe(t,e),controlId:n,...o,children:[r,w.jsx("label",{htmlFor:n,children:i})]})));b$.displayName="FloatingLabel";const CX={_ref:Ie.any,validated:Ie.bool,as:Ie.elementType},yx=C.forwardRef(({className:e,validated:t,as:r="form",...n},i)=>w.jsx(r,{...n,ref:i,className:Oe(e,t&&"was-validated")}));yx.displayName="Form";yx.propTypes=CX;const Mr=Object.assign(yx,{Group:mx,Control:AX,Floating:p$,Check:bf,Switch:TX,Label:h$,Text:y$,Range:v$,Select:m$,FloatingLabel:b$}),gx=C.forwardRef(({active:e=!1,disabled:t=!1,className:r,style:n,activeLabel:i="(current)",children:o,linkStyle:u,linkClassName:l,as:f=ub,...d},v)=>{const p=e||t?"span":f;return w.jsx("li",{ref:v,style:n,className:Oe(r,"page-item",{active:e,disabled:t}),children:w.jsxs(p,{className:Oe("page-link",l),style:u,...d,children:[o,e&&i&&w.jsx("span",{className:"visually-hidden",children:i})]})})});gx.displayName="PageItem";function Lu(e,t,r=e){const n=C.forwardRef(({children:i,...o},u)=>w.jsxs(gx,{...o,ref:u,children:[w.jsx("span",{"aria-hidden":"true",children:i||t}),w.jsx("span",{className:"visually-hidden",children:r})]}));return n.displayName=e,n}const kX=Lu("First","«"),NX=Lu("Prev","‹","Previous"),RX=Lu("Ellipsis","…","More"),$X=Lu("Next","›"),MX=Lu("Last","»"),x$=C.forwardRef(({bsPrefix:e,className:t,size:r,...n},i)=>{const o=Re(e,"pagination");return w.jsx("ul",{ref:i,...n,className:Oe(t,o,r&&`${o}-${r}`)})});x$.displayName="Pagination";const $a=Object.assign(x$,{First:kX,Prev:NX,Ellipsis:RX,Item:gx,Next:$X,Last:MX}),IX="/ProserveReport/",DX=`${IX}logo.png`;function hd({subtitle:e}){const{t}=zr(),n=new Date().toLocaleDateString("fr-FR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"});return w.jsxs("div",{className:"print-header",children:[w.jsx("img",{src:DX,alt:"Logo"}),w.jsx("span",{className:"print-title",children:"PROSERVE Report"}),e&&w.jsxs("span",{style:{color:"#333",fontSize:"0.9rem"},children:["— ",e]}),w.jsxs("span",{className:"print-subtitle",children:[t("print.generatedOn")," ",n]})]})}const gg=20;function LX(e){const t=Math.floor(e/60),r=Math.floor(e%60);return`${t}m ${r}s`}function BX(e,t){return e?new Date(e).toLocaleDateString(t==="fr"?"fr-FR":"en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}):"-"}function FX(){const{t:e,lang:t}=zr(),r=ju(),[n,i]=I2(),[o,u]=C.useState([]),[l,f]=C.useState(!0),d=n.get("type"),[v,p]=C.useState(d!==null?Number(d):-1),[m,b]=C.useState("all"),[O,x]=C.useState(""),[g,j]=C.useState("sessionDateAsString"),[E,A]=C.useState("desc"),[T,P]=C.useState(1);C.useEffect(()=>{FC().then(u).finally(()=>f(!1))},[]);const _=C.useMemo(()=>{let $=o;if(v>=0&&($=$.filter(U=>U.sessionTypeAsInt===v)),m==="success"?$=$.filter(U=>U.success):m==="failed"&&($=$.filter(U=>!U.success)),O.trim()){const U=O.toLowerCase();$=$.filter(z=>z.scenarioName.toLowerCase().includes(U)||z.mapName.toLowerCase().includes(U)||z.sessionName.toLowerCase().includes(U))}return[...$].sort((U,z)=>{const V=U[g],Y=z[g];return typeof V=="string"&&typeof Y=="string"?E==="asc"?V.localeCompare(Y):Y.localeCompare(V):E==="asc"?Number(V)-Number(Y):Number(Y)-Number(V)})},[o,v,m,O,g,E]),N=Math.ceil(_.length/gg),R=_.slice((T-1)*gg,T*gg);function I($){g===$?A(E==="asc"?"desc":"asc"):(j($),A("desc"))}function W($){return g!==$?"":E==="asc"?" ▲":" ▼"}if(l)return w.jsx(Eu,{});const q=[...new Set(o.map($=>$.sessionTypeAsInt))].sort();return w.jsxs(w.Fragment,{children:[w.jsx(hd,{subtitle:e("sessions.title")}),w.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-4",children:[w.jsxs("h2",{className:"mb-0",children:[e("sessions.title")," (",_.length,")"]}),w.jsx("button",{className:"print-btn no-print",onClick:()=>window.print(),children:e("print.btn")})]}),w.jsx(be,{className:"data-card mb-4 no-print",children:w.jsx(be.Body,{children:w.jsxs(ur,{className:"g-3",children:[w.jsx($e,{md:3,children:w.jsxs(Mr.Group,{children:[w.jsx(Mr.Label,{className:"text-muted-custom",children:e("sessions.sessionType")}),w.jsxs(Mr.Select,{value:v,onChange:$=>{const U=Number($.target.value);p(U),P(1),U>=0?i({type:String(U)}):i({})},className:"filter-select",children:[w.jsx("option",{value:-1,children:e("sessions.allTypes")}),q.map($=>w.jsx("option",{value:$,children:e(`sessionType.${$}`)},$))]})]})}),w.jsx($e,{md:3,children:w.jsxs(Mr.Group,{children:[w.jsx(Mr.Label,{className:"text-muted-custom",children:e("sessions.result")}),w.jsxs(Mr.Select,{value:m,onChange:$=>{b($.target.value),P(1)},className:"filter-select",children:[w.jsx("option",{value:"all",children:e("sessions.all")}),w.jsx("option",{value:"success",children:e("sessions.success")}),w.jsx("option",{value:"failed",children:e("sessions.failed")})]})]})}),w.jsx($e,{md:6,children:w.jsxs(Mr.Group,{children:[w.jsx(Mr.Label,{className:"text-muted-custom",children:e("sessions.search")}),w.jsx(Mr.Control,{type:"text",placeholder:e("sessions.search"),value:O,onChange:$=>{x($.target.value),P(1)},className:"filter-input"})]})})]})})}),w.jsx(be,{className:"data-card",children:w.jsx(be.Body,{className:"p-0",children:w.jsxs(Fr,{hover:!0,responsive:!0,className:"data-table mb-0",children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsxs("th",{className:"sortable",onClick:()=>I("sessionDateAsString"),children:[e("table.date"),W("sessionDateAsString")]}),w.jsxs("th",{className:"sortable",onClick:()=>I("sessionTypeAsInt"),children:[e("table.type"),W("sessionTypeAsInt")]}),w.jsxs("th",{className:"sortable",onClick:()=>I("scenarioName"),children:[e("table.scenario"),W("scenarioName")]}),w.jsx("th",{children:e("table.map")}),w.jsxs("th",{className:"sortable",onClick:()=>I("score"),children:[e("table.score"),W("score")]}),w.jsx("th",{children:e("table.enemies")}),w.jsx("th",{children:e("table.civilians")}),w.jsxs("th",{className:"sortable",onClick:()=>I("timeToFinish"),children:[e("table.duration"),W("timeToFinish")]}),w.jsx("th",{children:e("table.result")})]})}),w.jsxs("tbody",{children:[R.map($=>w.jsxs("tr",{className:"clickable-row",onClick:()=>r(`/sessions/${$.id}`),children:[w.jsx("td",{children:BX($.sessionDateAsString,t)}),w.jsx("td",{children:w.jsx(zs,{typeId:$.sessionTypeAsInt})}),w.jsx("td",{children:$.scenarioName||"-"}),w.jsx("td",{children:$.mapName||"-"}),w.jsx("td",{className:"fw-bold",children:$.score}),w.jsx("td",{children:$.nbEnemyHit}),w.jsx("td",{className:$.nbCivilsHit>0?"text-danger":"",children:$.nbCivilsHit}),w.jsx("td",{children:LX($.timeToFinish)}),w.jsx("td",{children:w.jsx(Cf,{success:$.success})})]},$.id)),R.length===0&&w.jsx("tr",{children:w.jsx("td",{colSpan:9,className:"text-center text-muted-custom py-4",children:e("sessions.noSession")})})]})]})})}),N>1&&w.jsx("div",{className:"d-flex justify-content-center mt-3",children:w.jsxs($a,{className:"custom-pagination",children:[w.jsx($a.First,{onClick:()=>P(1),disabled:T===1}),w.jsx($a.Prev,{onClick:()=>P(T-1),disabled:T===1}),Array.from({length:Math.min(N,5)},($,U)=>{const V=Math.max(1,Math.min(T-2,N-4))+U;return V>N?null:w.jsx($a.Item,{active:V===T,onClick:()=>P(V),children:V},V)}),w.jsx($a.Next,{onClick:()=>P(T+1),disabled:T===N}),w.jsx($a.Last,{onClick:()=>P(N),disabled:T===N})]})})]})}const NT=1e3;function qX(e,t,r){const n=(e-t)/(r-t)*100;return Math.round(n*NT)/NT}function RT({min:e,now:t,max:r,label:n,visuallyHidden:i,striped:o,animated:u,className:l,style:f,variant:d,bsPrefix:v,...p},m){return w.jsx("div",{ref:m,...p,role:"progressbar",className:Oe(l,`${v}-bar`,{[`bg-${d}`]:d,[`${v}-bar-animated`]:u,[`${v}-bar-striped`]:u||o}),style:{width:`${qX(t,e,r)}%`,...f},"aria-valuenow":t,"aria-valuemin":e,"aria-valuemax":r,children:i?w.jsx("span",{className:"visually-hidden",children:n}):n})}const w$=C.forwardRef(({isChild:e=!1,...t},r)=>{const n={min:0,max:100,animated:!1,visuallyHidden:!1,striped:!1,...t};if(n.bsPrefix=Re(n.bsPrefix,"progress"),e)return RT(n,r);const{min:i,now:o,max:u,label:l,visuallyHidden:f,striped:d,animated:v,bsPrefix:p,variant:m,className:b,children:O,...x}=n;return w.jsx("div",{ref:r,...x,className:Oe(b,p),children:O?jX(O,g=>C.cloneElement(g,{isChild:!0})):RT({min:i,now:o,max:u,label:l,visuallyHidden:f,striped:d,animated:v,bsPrefix:p,variant:m},r)})});w$.displayName="ProgressBar";const zX={human:{image:"HumanTarget.png",ratio:.7183098591549296,maxW:320},longRange:{image:"longRangeTarget.PNG",ratio:1,maxW:480}};function UX({shots:e,variant:t="human"}){const{image:r,ratio:n,maxW:i}=zX[t],o=100,u=o*n;return w.jsx("div",{style:{width:"100%",maxWidth:i,margin:"0 auto",aspectRatio:`${n}`},children:w.jsxs("svg",{viewBox:`0 0 ${u} ${o}`,width:"100%",height:"100%",style:{display:"block"},children:[w.jsx("image",{href:`/ProserveReport/${r}`,x:"0",y:"0",width:u,height:o,preserveAspectRatio:"none"}),e.map(l=>{const f=l.x*u,d=l.y*o;return w.jsxs("g",{children:[w.jsx("circle",{cx:f,cy:d,r:1.2,fill:"#00e5ff",stroke:"#000",strokeWidth:.3,opacity:.9}),w.jsx("text",{x:f+2,y:d+1,fill:"#00e5ff",fontSize:2.8,fontWeight:"bold",stroke:"#000",strokeWidth:.15,paintOrder:"stroke",children:l.index})]},l.index)})]})})}function $T(e){const t=Math.floor(e/60),r=Math.floor(e%60);return`${t}m ${r}s`}function WX(e,t){return e?new Date(e).toLocaleDateString(t==="fr"?"fr-FR":"en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}):"-"}const MT={enemy:"#27ae60",civilian:"#e74c3c",police:"#f39c12",object:"#6c757d",target:"#4a90d9",paperTarget:"#2980b9",deadBody:"#95a5a6"},HX={Ennemi:"enemy",Civil:"civilian",Police:"police",Objet:"object",Cible:"target","Cible Papier":"paperTarget",Corps:"deadBody"},bg={enemy:"hitType.enemy",civilian:"hitType.civilian",police:"hitType.police",object:"hitType.object",target:"hitType.target",paperTarget:"hitType.paperTarget",deadBody:"hitType.deadBody"};function KX(){const{id:e}=KT(),t=Number(e),{t:r,lang:n}=zr(),[i,o]=C.useState(null),[u,l]=C.useState([]),[f,d]=C.useState([]),[v,p]=C.useState(null),[m,b]=C.useState([]),[O,x]=C.useState(!0);if(C.useEffect(()=>{t&&Promise.all([RL(t).catch(()=>null),ML(t).catch(()=>[]),IL(t).catch(()=>[]),LL(t).catch(()=>null)]).then(([_,N,R,I])=>{if(o(_),l(N),d(R),p(I),_){const W=_.sessionTypeAsInt;(W===mn.FireRange||W===mn.Challenge||W===mn.LongRange)&&DL(t,-1,W).then(b)}}).finally(()=>x(!1))},[t]),O)return w.jsx(Eu,{});if(!i)return w.jsx("p",{className:"text-center text-muted-custom py-5",children:r("session.notFound")});let g=null;if(v!=null&&v.resultsAsString)try{g=JSON.parse(v.resultsAsString)}catch{}const j={};f.forEach(_=>{_.nbEnemyHitsByUser>0&&(j.enemy=(j.enemy||0)+_.nbEnemyHitsByUser),_.nbCivilHitsByUser>0&&(j.civilian=(j.civilian||0)+_.nbCivilHitsByUser),_.nbPoliceHitsByUser>0&&(j.police=(j.police||0)+_.nbPoliceHitsByUser),_.nbObjectHitsByUser>0&&(j.object=(j.object||0)+_.nbObjectHitsByUser)});const E=Object.entries(j).map(([_,N])=>({name:r(bg[_]),value:N,color:MT[_]||"#6c757d"})),A=new Map(u.map(_=>[_.id,_])),T=i.sessionTypeAsInt===mn.FireRange||i.sessionTypeAsInt===mn.Challenge||i.sessionTypeAsInt===mn.LongRange,P=i.sessionTypeAsInt===mn.Challenge;return w.jsxs(w.Fragment,{children:[w.jsx(hd,{subtitle:i.sessionName||i.scenarioName||`Session #${i.id}`}),w.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-3",children:[w.jsxs(Fs,{to:"/sessions",className:"text-muted-custom no-print",children:["← ",r("session.backToSessions")]}),w.jsx("button",{className:"print-btn no-print",onClick:()=>window.print(),children:r("print.btn")})]}),w.jsx(be,{className:"data-card mb-4",children:w.jsx(be.Body,{children:w.jsxs(ur,{className:"align-items-center",children:[w.jsxs($e,{children:[w.jsx("h3",{className:"mb-1",children:i.sessionName||i.scenarioName||`Session #${i.id}`}),w.jsxs("div",{className:"d-flex gap-3 align-items-center flex-wrap",children:[w.jsx(zs,{typeId:i.sessionTypeAsInt}),w.jsx("span",{className:"text-muted-custom",children:WX(i.sessionDateAsString,n)}),w.jsxs("span",{className:"text-muted-custom",children:["Map: ",i.mapName||"-"]}),w.jsxs("span",{className:"text-muted-custom",children:["Scenario: ",i.scenarioName||"-"]})]}),u.length>0&&w.jsxs("div",{className:"mt-2 text-muted-custom",style:{fontSize:"0.9rem"},children:[r("session.participants"),": ",u.map(_=>_.firstName&&_.lastName?`${_.firstName} ${_.lastName}`:_.username).join(", ")]})]}),w.jsx($e,{xs:"auto",children:w.jsx(Cf,{success:i.success})})]})})}),!T&&w.jsxs(ur,{className:"mb-4 g-3",children:[w.jsx($e,{xs:6,md:2,children:w.jsx(pt,{title:r("session.duration"),value:$T(i.timeToFinish),color:"#9b59b6"})}),w.jsx($e,{xs:6,md:2,children:w.jsx(pt,{title:r("session.enemiesHit"),value:i.nbEnemyHit,color:"#27ae60"})}),w.jsx($e,{xs:6,md:2,children:w.jsx(pt,{title:r("session.civiliansHit"),value:i.nbCivilsHit,color:i.nbCivilsHit>0?"#e74c3c":"#27ae60"})}),w.jsx($e,{xs:6,md:2,children:w.jsx(pt,{title:r("session.damageTaken"),value:Math.round(i.damageTaken),color:"#f39c12"})}),w.jsx($e,{xs:6,md:2,children:w.jsx(pt,{title:r("session.participants"),value:u.length,color:"#1abc9c"})})]}),T&&m.length>0&&(()=>{const _=(z,...V)=>{for(const Y of V)if(z[Y]!=null)return z[Y];return 0},N=m.filter(z=>_(z,"ReactId","reactId")>=0),R=m.filter(z=>_(z,"ReactId","reactId")<0).length,I=N.length===0?"-":`${(N.reduce((V,Y)=>V+_(Y,"HitPrecision","hitPrecision"),0)/N.length*100).toFixed(1)}%`,W=(()=>{const z=m.filter(Y=>_(Y,"ReactionTime","reactionTime")>0);return z.length===0?"-":`${(z.reduce((Y,J)=>Y+_(J,"ReactionTime","reactionTime"),0)/z.length/1e3).toFixed(3)} s`})(),q=m.map(z=>({shot:_(z,"ShotIndex","shotIndex"),precision:_(z,"ReactId","reactId")>=0?Math.round(_(z,"HitPrecision","hitPrecision")*100):0})),$=N.filter(z=>_(z,"ReactionTime","reactionTime")>0).map(z=>({shot:_(z,"ShotIndex","shotIndex"),reaction:Math.round(_(z,"ReactionTime","reactionTime"))})),U=N.map(z=>({index:_(z,"ShotIndex","shotIndex"),x:_(z,"HitLocationX","hitLocationX"),y:_(z,"HitLocationY","hitLocationY"),precision:_(z,"HitPrecision","hitPrecision")}));return w.jsxs(ur,{className:"mb-4 g-3",children:[w.jsx($e,{lg:3,children:w.jsxs(ur,{className:"g-3",children:[w.jsx($e,{xs:6,lg:P?6:12,children:w.jsx(pt,{title:r("session.duration"),value:$T(i.timeToFinish),color:"#9b59b6"})}),w.jsx($e,{xs:6,lg:P?6:12,children:w.jsx(pt,{title:r("firerange.shotsFired"),value:m.length,color:"#1abc9c"})}),P&&w.jsx($e,{xs:6,lg:6,children:w.jsx(pt,{title:r("firerange.targetsHit"),value:N.length,color:"#4a90d9"})}),w.jsx($e,{xs:6,lg:P?6:12,children:w.jsx(pt,{title:r("firerange.shotsMissed"),value:R,color:"#e74c3c"})}),w.jsx($e,{xs:6,lg:P?6:12,children:w.jsx(pt,{title:r("firerange.avgPrecision"),value:I,color:"#27ae60"})}),P&&w.jsx($e,{xs:6,lg:6,children:w.jsx(pt,{title:r("firerange.avgReaction"),value:W,color:"#f39c12"})})]})}),!P&&w.jsx($e,{lg:4,children:w.jsx(be,{className:"data-card h-100",children:w.jsxs(be.Body,{className:"d-flex flex-column",children:[w.jsx(be.Title,{className:"text-center",children:r("firerange.targetView")}),w.jsx("div",{className:"d-flex flex-grow-1 align-items-center justify-content-center",children:w.jsx(UX,{shots:U,variant:i.sessionTypeAsInt===mn.LongRange?"longRange":"human"})})]})})}),w.jsx($e,{lg:P?9:5,children:w.jsx(be,{className:"data-card h-100",children:w.jsxs(be.Body,{className:"d-flex flex-column",children:[w.jsx(be.Title,{className:"text-center",children:r(P?"firerange.reactionChart":"firerange.precisionChart")}),w.jsx("div",{className:"d-flex flex-grow-1 align-items-center",children:P?w.jsx(Ua,{width:"100%",height:250,children:w.jsxs(Q0,{data:$,margin:{top:10,right:20,left:10,bottom:5},children:[w.jsx(Su,{strokeDasharray:"3 3",stroke:"#333"}),w.jsx(fi,{dataKey:"shot",stroke:"#999"}),w.jsx(kn,{stroke:"#999",width:50,tickFormatter:z=>`${z}`}),w.jsx(qt,{contentStyle:{backgroundColor:"#1a1a2e",border:"1px solid #333"},formatter:z=>[`${z} ms`,r("chart.reactionTime")]}),w.jsx(ci,{type:"linear",dataKey:"reaction",stroke:"#f39c12",strokeWidth:2,dot:{fill:"#f39c12",r:4},activeDot:{r:6}})]})}):w.jsx(Ua,{width:"100%",height:250,children:w.jsxs(Q0,{data:q,margin:{top:10,right:20,left:10,bottom:5},children:[w.jsx(Su,{strokeDasharray:"3 3",stroke:"#333"}),w.jsx(fi,{dataKey:"shot",stroke:"#999"}),w.jsx(kn,{domain:[0,100],stroke:"#999",width:50,tickFormatter:z=>`${z}`}),w.jsx(qt,{contentStyle:{backgroundColor:"#1a1a2e",border:"1px solid #333"},formatter:z=>[`${z}%`,r("chart.precision")]}),w.jsx(ci,{type:"linear",dataKey:"precision",stroke:"#ff6b8a",strokeWidth:2,dot:{fill:"#ff6b8a",r:4},activeDot:{r:6}})]})})})]})})})]})})(),!T&&w.jsx(be,{className:"data-card mb-4",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:r("session.participants")}),w.jsxs(Fr,{hover:!0,responsive:!0,className:"data-table mb-0",children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("th",{children:r("table.user")}),w.jsx("th",{children:r("table.shotsFired")}),w.jsx("th",{children:r("table.shotsMissed")}),w.jsx("th",{children:r("table.enemiesHit")}),w.jsx("th",{children:r("table.civiliansHit")}),w.jsx("th",{children:r("table.avgPrecision")}),w.jsx("th",{children:r("table.reactionTime")}),w.jsx("th",{children:r("table.hitsReceivedIA")}),w.jsx("th",{children:r("table.enemiesKilled")}),w.jsx("th",{children:r("table.civiliansKilled")})]})}),w.jsxs("tbody",{children:[f.map((_,N)=>{const R=A.get(_.userId);return w.jsxs("tr",{children:[w.jsx("td",{children:w.jsx(Fs,{to:`/users/${_.userId}`,className:"table-link",children:R?R.firstName&&R.lastName?`${R.firstName} ${R.lastName}`:R.username:`User #${_.userId}`})}),w.jsx("td",{children:_.nbFiredShotsByUser}),w.jsx("td",{children:_.nbMissedShotsByUser}),w.jsx("td",{children:_.nbEnemyHitsByUser}),w.jsx("td",{className:_.nbCivilHitsByUser>0?"text-danger":"",children:_.nbCivilHitsByUser}),w.jsx("td",{children:_.averagePrecision!=null?`${(_.averagePrecision*100).toFixed(1)}%`:"-"}),w.jsx("td",{children:_.averageReactionTime!=null&&_.averageReactionTime>0?`${_.averageReactionTime.toFixed(0)} ms`:"-"}),w.jsx("td",{children:_.nbReceivedHitsFromEnemyIA??0}),w.jsx("td",{children:_.totalEnemyKilled??0}),w.jsx("td",{className:(_.totalCivilKilled??0)>0?"text-danger":"",children:_.totalCivilKilled??0})]},N)}),f.length===0&&w.jsx("tr",{children:w.jsx("td",{colSpan:10,className:"text-center text-muted-custom",children:r("noData")})})]})]})]})}),w.jsxs(ur,{className:"mb-4 g-3",children:[g&&!P&&w.jsx($e,{md:6,children:w.jsx(be,{className:"data-card h-100",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:r("session.objectives")}),Object.entries(g).map(([_,N])=>{if(!N||typeof N!="object")return null;const R=N.maxScore>0?N.score/N.maxScore*100:0;return w.jsxs("div",{className:"mb-3",children:[w.jsxs("div",{className:"d-flex justify-content-between mb-1",children:[w.jsx("span",{children:r(`obj.${_}`)}),w.jsxs("span",{children:[N.score,"/",N.maxScore,N.success!==void 0&&w.jsx(qa,{bg:N.success?"success":"danger",className:"ms-2",children:N.success?"OK":"X"})]})]}),w.jsx(w$,{now:R,variant:N.success?"success":"danger",className:"objective-bar"})]},_)})]})})}),E.length>0&&w.jsx($e,{md:g?6:12,children:w.jsx(be,{className:"chart-card h-100",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:r("session.hitDistribution")}),w.jsx(Ua,{width:"100%",height:250,children:w.jsxs(c$,{children:[w.jsx(on,{data:E,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:80,label:!0,children:E.map((_,N)=>w.jsx(ku,{fill:_.color},N))}),w.jsx(qt,{contentStyle:{backgroundColor:"#1a1a2e",border:"1px solid #333"}}),w.jsx(Pn,{})]})})]})})})]}),!T&&m.length>0&&w.jsx(be,{className:"data-card mb-4",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:r("session.shotDetails")}),w.jsxs(Fr,{hover:!0,responsive:!0,className:"data-table mb-0",size:"sm",children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("th",{children:r("shot.index")}),w.jsx("th",{children:r("shot.shooter")}),w.jsx("th",{children:r("shot.impactType")}),w.jsx("th",{children:r("shot.target")}),w.jsx("th",{children:r("shot.boneZone")}),w.jsx("th",{children:r("shot.precision")}),w.jsx("th",{children:r("shot.distance")}),w.jsx("th",{children:r("shot.reaction")}),w.jsx("th",{children:r("shot.killed")}),w.jsx("th",{children:r("shot.time")})]})}),w.jsx("tbody",{children:m.map((_,N)=>{const R=qL[_.reactTypeId]||"",I=HX[R]||"",W=I&&bg[I]?r(bg[I]):_.reactType||"-",q=MT[I]||"#6c757d";return w.jsxs("tr",{children:[w.jsx("td",{children:_.shotIndex}),w.jsx("td",{children:_.shooterName||`#${_.shooterId}`}),w.jsx("td",{children:w.jsx(qa,{bg:"secondary",style:{backgroundColor:q},children:W})}),w.jsx("td",{children:_.targetName||_.targetUserName||"-"}),w.jsx("td",{children:_.targetBoneName||_.hitLocationTag||"-"}),w.jsx("td",{children:_.hitPrecision!=null?`${(_.hitPrecision*100).toFixed(1)}%`:"-"}),w.jsx("td",{children:_.hitTargetDistance!=null&&_.hitTargetDistance>0?`${_.hitTargetDistance.toFixed(1)}m`:"-"}),w.jsx("td",{children:_.reactionTime!=null&&_.reactionTime>0?`${_.reactionTime.toFixed(0)}ms`:"-"}),w.jsx("td",{children:_.targetKilled?w.jsx(qa,{bg:"danger",children:r("badge.killed")}):"-"}),w.jsx("td",{children:_.timeStamp!=null?`${_.timeStamp.toFixed(1)}s`:"-"})]},N)})})]})]})})]})}function VX(e,t){if(!e)return"-";const r=new Date(e),n=t==="fr"?"fr-FR":"en-US";return r.toLocaleDateString(n,{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}function GX(){const{t:e,lang:t}=zr(),r=ju(),[n,i]=C.useState([]),[o,u]=C.useState(!0),[l,f]=C.useState(""),[d,v]=C.useState("avgPrecision"),[p,m]=C.useState("desc");C.useEffect(()=>{qC().then(i).finally(()=>u(!1))},[]);const b=C.useMemo(()=>{let g=n;if(l.trim()){const j=l.toLowerCase();g=g.filter(E=>E.username.toLowerCase().includes(j)||E.firstName.toLowerCase().includes(j)||E.lastName.toLowerCase().includes(j))}return[...g].sort((j,E)=>{const A=j[d],T=E[d];return typeof A=="string"&&typeof T=="string"?p==="asc"?A.localeCompare(T):T.localeCompare(A):p==="asc"?Number(A)-Number(T):Number(T)-Number(A)})},[n,l,d,p]);function O(g){d===g?m(p==="asc"?"desc":"asc"):(v(g),m("desc"))}function x(g){return d!==g?"":p==="asc"?" ▲":" ▼"}return o?w.jsx(Eu,{}):w.jsxs(w.Fragment,{children:[w.jsx(hd,{subtitle:e("users.title")}),w.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-4",children:[w.jsxs("h2",{className:"mb-0",children:[e("users.title")," (",b.length,")"]}),w.jsx("button",{className:"print-btn no-print",onClick:()=>window.print(),children:e("print.btn")})]}),w.jsx(be,{className:"data-card mb-4 no-print",children:w.jsx(be.Body,{children:w.jsx(Mr.Group,{children:w.jsx(Mr.Control,{type:"text",placeholder:e("users.search"),value:l,onChange:g=>f(g.target.value),className:"filter-input"})})})}),w.jsx(be,{className:"data-card",children:w.jsx(be.Body,{className:"p-0",children:w.jsxs(Fr,{hover:!0,responsive:!0,className:"data-table mb-0",children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsxs("th",{className:"sortable",onClick:()=>O("username"),children:[e("table.username"),x("username")]}),w.jsxs("th",{className:"sortable",onClick:()=>O("firstName"),children:[e("table.name"),x("firstName")]}),w.jsxs("th",{className:"sortable",onClick:()=>O("avgPrecision"),children:[e("table.avgPrecision"),x("avgPrecision")]}),w.jsxs("th",{className:"sortable",onClick:()=>O("avgReaction"),children:[e("table.avgReaction"),x("avgReaction")]}),w.jsxs("th",{className:"sortable",onClick:()=>O("lastConnection"),children:[e("table.lastConnection"),x("lastConnection")]})]})}),w.jsxs("tbody",{children:[b.map(g=>w.jsxs("tr",{className:"clickable-row",onClick:()=>r(`/users/${g.id}`),children:[w.jsx("td",{children:g.username}),w.jsx("td",{children:g.firstName||g.lastName?`${g.firstName} ${g.lastName}`.trim():"-"}),w.jsx("td",{className:"fw-bold",children:g.avgPrecision.toFixed(1)}),w.jsx("td",{children:g.avgReaction>0?`${g.avgReaction.toFixed(0)} ms`:"-"}),w.jsx("td",{children:VX(g.lastConnection,t)})]},g.id)),b.length===0&&w.jsx("tr",{children:w.jsx("td",{colSpan:5,className:"text-center text-muted-custom py-4",children:e("users.noUser")})})]})]})})})]})}function XX({debriefRows:e}){const{t,lang:r}=zr(),n=new Map;e.forEach(o=>{n.has(o.sessionId)||n.set(o.sessionId,{date:o.sessionDate,precisions:[],reactions:[]});const u=n.get(o.sessionId);o.hitPrecision>0&&u.precisions.push(o.hitPrecision),o.reactionTime>0&&u.reactions.push(o.reactionTime)});const i=Array.from(n.entries()).map(([,o])=>{const u=o.precisions.length>0?Math.round(o.precisions.reduce((f,d)=>f+d,0)/o.precisions.length*100)/100:0,l=o.reactions.length>0?Math.round(o.reactions.reduce((f,d)=>f+d,0)/o.reactions.length):0;return{date:o.date,dateLabel:new Date(o.date).toLocaleDateString(r==="fr"?"fr-FR":"en-US",{day:"2-digit",month:"2-digit"}),precision:u,reactionTime:l}}).sort((o,u)=>new Date(o.date).getTime()-new Date(u.date).getTime());return i.length===0?w.jsx("p",{className:"text-muted-custom text-center",children:"Aucune donnée"}):w.jsx(Ua,{width:"100%",height:300,children:w.jsxs(Q0,{data:i,children:[w.jsx(Su,{strokeDasharray:"3 3",stroke:"#333"}),w.jsx(fi,{dataKey:"dateLabel",stroke:"#888"}),w.jsx(kn,{yAxisId:"left",stroke:"#4a90d9"}),w.jsx(kn,{yAxisId:"right",orientation:"right",stroke:"#f39c12"}),w.jsx(qt,{contentStyle:{backgroundColor:"#1a1a2e",border:"1px solid #333"},labelFormatter:o=>o}),w.jsx(Pn,{}),w.jsx(ci,{yAxisId:"left",type:"monotone",dataKey:"precision",stroke:"#4a90d9",name:t("chart.precision"),strokeWidth:2,dot:{r:3}}),w.jsx(ci,{yAxisId:"right",type:"monotone",dataKey:"reactionTime",stroke:"#f39c12",name:t("chart.reactionTime"),strokeWidth:2,dot:{r:3}})]})})}function IT(e){if(e<60)return`${Math.floor(e)}s`;if(e<3600)return`${Math.floor(e/60)}m ${Math.floor(e%60)}s`;const t=Math.floor(e/3600),r=Math.floor(e%3600/60);return`${t}h ${r}m`}function YX(e,t){if(!e)return"-";const r=new Date(e),n=t==="fr"?"fr-FR":"en-US";return r.toLocaleDateString(n,{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}function QX(){const{id:e}=KT(),t=Number(e),{t:r,lang:n}=zr(),[i,o]=C.useState(null),[u,l]=C.useState([]),[f,d]=C.useState(null),[v,p]=C.useState(!0);if(C.useEffect(()=>{t&&Promise.all([$L(t).catch(()=>null),NL(t).catch(()=>[]),BL(t,!0).catch(()=>null)]).then(([x,g,j])=>{o(x),l(g),d(j)}).finally(()=>p(!1))},[t]),v)return w.jsx(Eu,{});if(!i)return w.jsx("p",{className:"text-center text-muted-custom py-5",children:r("user.notFound")});const m=i.firstName&&i.lastName?`${i.firstName} ${i.lastName}`:i.username,b=f==null?void 0:f.totals,O={};return u.forEach(x=>{O[x.sessionTypeAsInt]=(O[x.sessionTypeAsInt]||0)+1}),w.jsxs(w.Fragment,{children:[w.jsx(hd,{subtitle:m}),w.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-3",children:[w.jsxs(Fs,{to:"/users",className:"text-muted-custom no-print",children:["← ",r("user.backToUsers")]}),w.jsx("button",{className:"print-btn no-print",onClick:()=>window.print(),children:r("print.btn")})]}),w.jsx(be,{className:"data-card mb-4",children:w.jsx(be.Body,{children:w.jsx(ur,{children:w.jsxs($e,{children:[w.jsx("h3",{className:"mb-1",children:m}),w.jsxs("div",{className:"d-flex gap-3 flex-wrap text-muted-custom",children:[w.jsxs("span",{children:["@",i.username]}),w.jsx("span",{children:i.maleGender?r("user.male"):r("user.female")}),w.jsx("span",{children:i.leftHanded?r("user.leftHanded"):r("user.rightHanded")}),i.size>0&&w.jsxs("span",{children:[r("user.height"),": ",i.size," cm"]}),i.charSkinAssetName&&w.jsxs("span",{children:[r("user.avatar"),": ",i.charSkinAssetName]}),i.weaponAssetName&&w.jsxs("span",{children:[r("user.weapon"),": ",i.weaponAssetName]})]})]})})})}),w.jsxs(ur,{className:"mb-4 g-3",children:[w.jsx($e,{xs:6,md:2,children:w.jsx(pt,{title:r("user.sessions"),value:(f==null?void 0:f.nbSessions)||u.length,color:"#4a90d9"})}),w.jsx($e,{xs:6,md:2,children:w.jsx(pt,{title:r("user.totalTime"),value:IT((f==null?void 0:f.totalDuration)||0),color:"#9b59b6"})}),w.jsx($e,{xs:6,md:2,children:w.jsx(pt,{title:r("user.avgPrecision"),value:i.avgPrecision!=null?i.avgPrecision.toFixed(1):"-",color:"#27ae60"})}),w.jsx($e,{xs:6,md:2,children:w.jsx(pt,{title:r("user.avgReaction"),value:i.avgReaction!=null&&i.avgReaction>0?`${i.avgReaction.toFixed(0)}ms`:"-",color:"#f39c12"})}),w.jsx($e,{xs:6,md:2,children:w.jsx(pt,{title:r("user.shotsFired"),value:(b==null?void 0:b.nbFiredShotsByUser)||0,color:"#1abc9c"})}),w.jsx($e,{xs:6,md:2,children:w.jsx(pt,{title:r("user.enemiesKilled"),value:(b==null?void 0:b.totalEnemyKilled)||0,color:"#e74c3c"})})]}),b&&w.jsx(be,{className:"data-card mb-4",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:r("user.detailedStats")}),w.jsxs(ur,{className:"g-3",children:[w.jsxs($e,{md:4,children:[w.jsx("h6",{className:"text-muted-custom",children:r("user.shots")}),w.jsx(Fr,{size:"sm",className:"data-table mb-0",children:w.jsxs("tbody",{children:[w.jsxs("tr",{children:[w.jsx("td",{children:r("stats.shotsFired")}),w.jsx("td",{className:"fw-bold",children:b.nbFiredShotsByUser})]}),w.jsxs("tr",{children:[w.jsx("td",{children:r("stats.shotsMissed")}),w.jsx("td",{children:b.nbMissedShotsByUser})]}),w.jsxs("tr",{children:[w.jsx("td",{children:r("stats.enemiesHit")}),w.jsx("td",{className:"text-success",children:b.nbEnemyHitsByUser})]}),w.jsxs("tr",{children:[w.jsx("td",{children:r("stats.civiliansHit")}),w.jsx("td",{className:b.nbCivilHitsByUser>0?"text-danger":"",children:b.nbCivilHitsByUser})]}),w.jsxs("tr",{children:[w.jsx("td",{children:r("stats.policeHit")}),w.jsx("td",{className:b.nbPoliceHitsByUser>0?"text-warning":"",children:b.nbPoliceHitsByUser})]})]})})]}),w.jsxs($e,{md:4,children:[w.jsx("h6",{className:"text-muted-custom",children:r("user.hitsReceived")}),w.jsx(Fr,{size:"sm",className:"data-table mb-0",children:w.jsxs("tbody",{children:[w.jsxs("tr",{children:[w.jsx("td",{children:r("stats.fromEnemyIA")}),w.jsx("td",{children:b.nbReceivedHitsFromEnemyIA})]}),w.jsxs("tr",{children:[w.jsx("td",{children:r("stats.fromEnemyUsers")}),w.jsx("td",{children:b.nbReceivedHitsFromEnemyUser})]}),w.jsxs("tr",{children:[w.jsx("td",{children:r("stats.fromPolice")}),w.jsx("td",{className:b.nbReceivedHitsFromPoliceUser>0?"text-warning":"",children:b.nbReceivedHitsFromPoliceUser})]})]})})]}),w.jsxs($e,{md:4,children:[w.jsx("h6",{className:"text-muted-custom",children:r("user.eliminations")}),w.jsx(Fr,{size:"sm",className:"data-table mb-0",children:w.jsxs("tbody",{children:[w.jsxs("tr",{children:[w.jsx("td",{children:r("stats.enemiesKilled")}),w.jsx("td",{className:"text-success",children:b.totalEnemyKilled})]}),w.jsxs("tr",{children:[w.jsx("td",{children:r("stats.civiliansKilled")}),w.jsx("td",{className:b.totalCivilKilled>0?"text-danger fw-bold":"",children:b.totalCivilKilled})]}),w.jsxs("tr",{children:[w.jsx("td",{children:r("stats.policeKilled")}),w.jsx("td",{className:b.totalPoliceKilled>0?"text-warning":"",children:b.totalPoliceKilled})]})]})})]})]})]})}),(f==null?void 0:f.sessionDebriefRows)&&f.sessionDebriefRows.length>1&&w.jsx(be,{className:"chart-card mb-4",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:r("user.precisionEvolution")}),w.jsx(XX,{debriefRows:f.sessionDebriefRows})]})}),Object.keys(O).length>0&&w.jsx(be,{className:"data-card mb-4",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:r("user.sessionTypeDistrib")}),w.jsx("div",{className:"d-flex gap-3 flex-wrap",children:Object.entries(O).map(([x,g])=>w.jsxs("div",{className:"text-center",children:[w.jsx(zs,{typeId:Number(x)}),w.jsx("div",{className:"fw-bold mt-1",children:g})]},x))})]})}),w.jsx(be,{className:"data-card",children:w.jsxs(be.Body,{children:[w.jsxs(be.Title,{children:[r("user.sessionHistory")," (",u.length,")"]}),w.jsxs(Fr,{hover:!0,responsive:!0,className:"data-table mb-0",children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("th",{children:r("table.date")}),w.jsx("th",{children:r("table.type")}),w.jsx("th",{children:r("table.scenario")}),w.jsx("th",{children:r("table.score")}),w.jsx("th",{children:r("table.duration")}),w.jsx("th",{children:r("table.result")})]})}),w.jsxs("tbody",{children:[u.map(x=>w.jsxs("tr",{children:[w.jsx("td",{children:w.jsx(Fs,{to:`/sessions/${x.id}`,className:"table-link",children:YX(x.sessionDateAsString,n)})}),w.jsx("td",{children:w.jsx(zs,{typeId:x.sessionTypeAsInt})}),w.jsx("td",{children:x.scenarioName||"-"}),w.jsx("td",{className:"fw-bold",children:x.score}),w.jsx("td",{children:IT(x.timeToFinish)}),w.jsx("td",{children:w.jsx(Cf,{success:x.success})})]},x.id)),u.length===0&&w.jsx("tr",{children:w.jsx("td",{colSpan:6,className:"text-center text-muted-custom",children:r("user.noSession")})})]})]})]})})]})}function ZX(){return w.jsx(S2,{children:w.jsxs(Ri,{element:w.jsx(EL,{}),children:[w.jsx(Ri,{path:"/",element:w.jsx(_X,{})}),w.jsx(Ri,{path:"/sessions",element:w.jsx(FX,{})}),w.jsx(Ri,{path:"/sessions/:id",element:w.jsx(KX,{})}),w.jsx(Ri,{path:"/users",element:w.jsx(GX,{})}),w.jsx(Ri,{path:"/users/:id",element:w.jsx(QX,{})})]})})}AI.createRoot(document.getElementById("root")).render(w.jsx(D.StrictMode,{children:w.jsx(B2,{children:w.jsx(k2,{children:w.jsx(ZX,{})})})}));