function mI(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 Wl=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:{}},Ie={};/** * @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 aS;function yI(){if(aS)return Ie;aS=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 E(){}E.prototype=g.prototype;function A(L,H,oe){this.props=L,this.context=H,this.refs=x,this.updater=oe||b}var j=A.prototype=new E;j.constructor=A,O(j,g.prototype),j.isPureReactComponent=!0;var T=Array.isArray,_=Object.prototype.hasOwnProperty,P={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)_.call(H,ce)&&!N.hasOwnProperty(ce)&&(me[ce]=H[ce]);var je=arguments.length-2;if(je===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,E=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(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,j(K),!O)if(r(f)!==null)O=!0,Y(_);else{var ee=r(d);ee!==null&&J(T,ee.startTime-K)}}function _(K,ee){O=!1,x&&(x=!1,E(R),R=-1),b=!0;var Z=m;try{for(j(ee),p=r(f);p!==null&&(!(p.expirationTime>ee)||K&&!F());){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),j(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 P=!1,N=null,R=-1,I=5,U=-1;function F(){return!(e.unstable_now()-UK||125L?(K.sortIndex=Z,t(d,K),r(f)===null&&K===r(d)&&(x?(E(R),R=-1):x=!0,J(T,Z-L))):(K.sortIndex=H,t(f,K),O||b||(O=!0,Y(_))),K},e.unstable_shouldYield=F,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 cS;function SI(){return cS||(cS=1,sh.exports=wI()),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 fS;function OI(){if(fS)return Qt;fS=1;var e=Q0(),t=SI();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 E=/[\-:]([a-z])/g;function A(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(E,A);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(E,A);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(E,A);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 j(a,s,c,h){var y=g.hasOwnProperty(s)?g[s]:null;(y!==null?y.type!==0:h||!(2$||y[k]!==S[$]){var B=` `+y[k].replace(" at new "," at ");return a.displayName&&B.includes("")&&(B=B.replace("",a.displayName)),B}while(1<=k&&0<=$);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 P:return"Portal";case I:return"Profiler";case R:return"StrictMode";case W:return"Suspense";case z:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case F:return(a.displayName||"Context")+".Consumer";case U:return(a._context.displayName||"Context")+".Provider";case M: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 je(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=je(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&&j(a,"checked",s,!1)}function st(a,s){Je(a,s);var c=je(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,je(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(a.defaultChecked=!!s.defaultChecked)}function Er(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=Iu.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},xM=["Webkit","ms","Moz","O"];Object.keys(Ro).forEach(function(a){xM.forEach(function(s){s=s+a.charAt(0).toUpperCase()+a.substring(1),Ro[s]=Ro[a]})});function xx(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 wx(a,s){a=a.style;for(var c in s)if(s.hasOwnProperty(c)){var h=c.indexOf("--")===0,y=xx(c,s[c],h);c==="float"&&(c="cssFloat"),h?a.setProperty(c,y):a[c]=y}}var wM=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(wM[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,na=null,ia=null;function Sx(a){if(a=ts(a)){if(typeof xd!="function")throw Error(r(280));var s=a.stateNode;s&&(s=al(s),xd(a.stateNode,a.type,s))}}function Ox(a){na?ia?ia.push(a):ia=[a]:na=a}function _x(){if(na){var a=na,s=ia;if(ia=na=null,Sx(a),s)for(a=0;a>>=0,a===0?32:31-(NM(a)/RM|0)|0}var qu=64,zu=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 Uu(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 $=k&~y;$!==0?h=Do($):(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-jr(s),a[s]=c}function DM(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),Zx=" ",Jx=!1;function ew(a,s){switch(a){case"keyup":return f$.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tw(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var sa=!1;function p$(a,s){switch(a){case"compositionend":return tw(s);case"keypress":return s.which!==32?null:(Jx=!0,Zx);case"textInput":return a=s.data,a===Zx&&Jx?null:a;default:return null}}function h$(a,s){if(sa)return a==="compositionend"||!Ld&&ew(a,s)?(a=Kx(),Gu=Nd=Un=null,sa=!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=uw(c)}}function cw(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?cw(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function fw(){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 O$(a){var s=fw(),c=a.focusedElem,h=a.selectionRange;if(s!==c&&c&&c.ownerDocument&&cw(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=lw(c,S);var k=lw(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,ua=null,zd=null,Yo=null,Ud=!1;function dw(a,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Ud||ua==null||ua!==We(h)||(h=ua,"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=rl(zd,"onSelect"),0pa||(a.current=tp[pa],tp[pa]=null,pa--)}function Xe(a,s){pa++,tp[pa]=a.current,a.current=s}var Vn={},Nt=Kn(Vn),Kt=Kn(!1),bi=Vn;function ha(a,s){var c=a.type.contextTypes;if(!c)return Vn;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 ol(){tt(Kt),tt(Nt)}function Aw(a,s,c){if(Nt.current!==Vn)throw Error(r(168));Xe(Nt,s),Xe(Kt,c)}function jw(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 sl(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vn,bi=Nt.current,Xe(Nt,a),Xe(Kt,Kt.current),!0}function Tw(a,s,c){var h=a.stateNode;if(!h)throw Error(r(169));c?(a=jw(a,s,bi),h.__reactInternalMemoizedMergedChildContext=a,tt(Kt),tt(Nt),Xe(Nt,a)):tt(Kt),Xe(Kt,c)}var un=null,ul=!1,rp=!1;function Cw(a){un===null?un=[a]:un.push(a)}function $$(a){ul=!0,Cw(a)}function Gn(){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-jr(s)+y|c<Ee?(Pt=we,we=null):Pt=we.sibling;var Fe=re(G,we,X[Ee],ue);if(Fe===null){we===null&&(we=Pt);break}a&&we&&Fe.alternate===null&&s(G,we),q=S(Fe,q,Ee),xe===null?ye=Fe:xe.sibling=Fe,xe=Fe,we=Pt}if(Ee===X.length)return c(G,we),nt&&wi(G,Ee),ye;if(we===null){for(;EeEe?(Pt=we,we=null):Pt=we.sibling;var ni=re(G,we,Fe.value,ue);if(ni===null){we===null&&(we=Pt);break}a&&we&&ni.alternate===null&&s(G,we),q=S(ni,q,Ee),xe===null?ye=ni:xe.sibling=ni,xe=ni,we=Pt}if(Fe.done)return c(G,we),nt&&wi(G,Ee),ye;if(we===null){for(;!Fe.done;Ee++,Fe=X.next())Fe=se(G,Fe.value,ue),Fe!==null&&(q=S(Fe,q,Ee),xe===null?ye=Fe:xe.sibling=Fe,xe=Fe);return nt&&wi(G,Ee),ye}for(we=h(G,we);!Fe.done;Ee++,Fe=X.next())Fe=fe(we,G,Ee,Fe.value,ue),Fe!==null&&(a&&Fe.alternate!==null&&we.delete(Fe.key===null?Ee:Fe.key),q=S(Fe,q,Ee),xe===null?ye=Fe:xe.sibling=Fe,xe=Fe);return a&&we.forEach(function(vI){return s(G,vI)}),nt&&wi(G,Ee),ye}function dt(G,q,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 _:e:{for(var ye=X.key,xe=q;xe!==null;){if(xe.key===ye){if(ye=X.type,ye===N){if(xe.tag===7){c(G,xe.sibling),q=y(xe,X.props.children),q.return=G,G=q;break e}}else if(xe.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===Y&&Iw(ye)===xe.type){c(G,xe.sibling),q=y(xe,X.props),q.ref=rs(G,xe,X),q.return=G,G=q;break e}c(G,xe);break}else s(G,xe);xe=xe.sibling}X.type===N?(q=Ti(X.props.children,G.mode,ue,X.key),q.return=G,G=q):(ue=Il(X.type,X.key,X.props,null,G.mode,ue),ue.ref=rs(G,q,X),ue.return=G,G=ue)}return k(G);case P:e:{for(xe=X.key;q!==null;){if(q.key===xe)if(q.tag===4&&q.stateNode.containerInfo===X.containerInfo&&q.stateNode.implementation===X.implementation){c(G,q.sibling),q=y(q,X.children||[]),q.return=G,G=q;break e}else{c(G,q);break}else s(G,q);q=q.sibling}q=Jp(X,G.mode,ue),q.return=G,G=q}return k(G);case Y:return xe=X._init,dt(G,q,xe(X._payload),ue)}if(Hr(X))return he(G,q,X,ue);if(ee(X))return ve(G,q,X,ue);dl(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"?(X=""+X,q!==null&&q.tag===6?(c(G,q.sibling),q=y(q,X),q.return=G,G=q):(c(G,q),q=Zp(X,G.mode,ue),q.return=G,G=q),k(G)):c(G,q)}return dt}var ga=Dw(!0),Lw=Dw(!1),pl=Kn(null),hl=null,ba=null,up=null;function lp(){up=ba=hl=null}function cp(a){var s=pl.current;tt(pl),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 xa(a,s){hl=a,up=ba=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},ba===null){if(hl===null)throw Error(r(308));ba=a,hl.dependencies={lanes:0,firstContext:a}}else ba=ba.next=a;return s}var Si=null;function dp(a){Si===null?Si=[a]:Si.push(a)}function Bw(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 Xn=!1;function pp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fw(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 Yn(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 vl(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,Ad(a,c)}}function qw(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 ml(a,s,c,h){var y=a.updateQueue;Xn=!1;var S=y.firstBaseUpdate,k=y.lastBaseUpdate,$=y.shared.pending;if($!==null){y.shared.pending=null;var B=$,Q=B.next;B.next=null,k===null?S=Q:k.next=Q,k=B;var ie=a.alternate;ie!==null&&(ie=ie.updateQueue,$=ie.lastBaseUpdate,$!==k&&($===null?ie.firstBaseUpdate=Q:$.next=Q,ie.lastBaseUpdate=B))}if(S!==null){var se=y.baseState;k=0,ie=Q=B=null,$=S;do{var re=$.lane,fe=$.eventTime;if((h&re)===re){ie!==null&&(ie=ie.next={eventTime:fe,lane:0,tag:$.tag,payload:$.payload,callback:$.callback,next:null});e:{var he=a,ve=$;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:Xn=!0}}$.callback!==null&&$.lane!==0&&(a.flags|=64,re=y.effects,re===null?y.effects=[$]:re.push($))}else fe={eventTime:fe,lane:re,tag:$.tag,payload:$.payload,callback:$.callback,next:null},ie===null?(Q=ie=fe,B=se):ie=ie.next=fe,k|=re;if($=$.next,$===null){if($=y.shared.pending,$===null)break;re=$,$=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 zw(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 s1(){return vr().memoizedState}function B$(a,s,c){var h=ei(a);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},u1(a))l1(s,c);else if(c=Bw(a,s,c,h),c!==null){var y=Ft();Mr(c,a,h,y),c1(c,s,h)}}function F$(a,s,c){var h=ei(a),y={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(u1(a))l1(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,$=S(k,c);if(y.hasEagerState=!0,y.eagerState=$,Tr($,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=Bw(a,s,y,h),c!==null&&(y=Ft(),Mr(c,a,h,y),c1(c,s,h))}}function u1(a){var s=a.alternate;return a===ot||s!==null&&s===ot}function l1(a,s){os=bl=!0;var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}function c1(a,s,c){if((c&4194240)!==0){var h=s.lanes;h&=a.pendingLanes,c|=h,s.lanes=c,Ad(a,c)}}var Sl={readContext:hr,useCallback:Rt,useContext:Rt,useEffect:Rt,useImperativeHandle:Rt,useInsertionEffect:Rt,useLayoutEffect:Rt,useMemo:Rt,useReducer:Rt,useRef:Rt,useState:Rt,useDebugValue:Rt,useDeferredValue:Rt,useTransition:Rt,useMutableSource:Rt,useSyncExternalStore:Rt,useId:Rt,unstable_isNewReconciler:!1},q$={readContext:hr,useCallback:function(a,s){return Xr().memoizedState=[a,s===void 0?null:s],a},useContext:hr,useEffect:Jw,useImperativeHandle:function(a,s,c){return c=c!=null?c.concat([a]):null,xl(4194308,4,r1.bind(null,s,a),c)},useLayoutEffect:function(a,s){return xl(4194308,4,a,s)},useInsertionEffect:function(a,s){return xl(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=B$.bind(null,ot,a),[h.memoizedState,a]},useRef:function(a){var s=Xr();return a={current:a},s.memoizedState=a},useState:Qw,useDebugValue:Pp,useDeferredValue:function(a){return Xr().memoizedState=a},useTransition:function(){var a=Qw(!1),s=a[0];return a=L$.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(),_t===null)throw Error(r(349));(_i&30)!==0||Kw(h,s,c)}y.memoizedState=c;var S={value:c,getSnapshot:s};return y.queue=S,Jw(Gw.bind(null,h,S,a),[a]),h.flags|=2048,ls(9,Vw.bind(null,h,S,c,s),void 0,null),c},useId:function(){var a=Xr(),s=_t.identifierPrefix;if(nt){var c=cn,h=ln;c=(h&~(1<<32-jr(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,C1(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;yPa&&(s.flags|=128,h=!0,cs(S,!1),s.lanes=4194304)}else{if(!h)if(a=yl(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>Pa&&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 X$(a,s){switch(ip(s),s.tag){case 1:return Vt(s.type)&&ol(),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return wa(),tt(Kt),tt(Nt),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));ya()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return tt(at),null;case 4:return wa(),null;case 10:return cp(s.type._context),null;case 22:case 23:return Xp(),null;case 24:return null;default:return null}}var El=!1,$t=!1,Y$=typeof WeakSet=="function"?WeakSet:Set,de=null;function Oa(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 R1=!1;function Q$(a,s){if(Xd=Ku,a=fw(),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,$=-1,B=-1,Q=0,ie=0,se=a,re=null;t:for(;;){for(var fe;se!==c||y!==0&&se.nodeType!==3||($=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&&($=k),re===S&&++ie===h&&(B=k),(fe=se.nextSibling)!==null)break;se=re,re=se.parentNode}se=fe}c=$===-1||B===-1?null:{start:$,end:B}}else c=null}c=c||{start:0,end:0}}else c=null;for(Yd={focusedElem:a,selectionRange:c},Ku=!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,q=G.getSnapshotBeforeUpdate(s.elementType===s.type?ve:kr(s.type,ve),dt);G.__reactInternalSnapshotBeforeUpdate=q}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=R1,R1=!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 Al(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[R$],delete s[M$])),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 $1(a){return a.tag===5||a.tag===3||a.tag===4}function I1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||$1(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=il));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 Tt=null,Nr=!1;function Qn(a,s,c){for(c=c.child;c!==null;)D1(a,s,c),c=c.sibling}function D1(a,s,c){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(Fu,c)}catch{}switch(c.tag){case 5:$t||Oa(c,s);case 6:var h=Tt,y=Nr;Tt=null,Qn(a,s,c),Tt=h,Nr=y,Tt!==null&&(Nr?(a=Tt,c=c.stateNode,a.nodeType===8?a.parentNode.removeChild(c):a.removeChild(c)):Tt.removeChild(c.stateNode));break;case 18:Tt!==null&&(Nr?(a=Tt,c=c.stateNode,a.nodeType===8?Jd(a.parentNode,c):a.nodeType===1&&Jd(a,c),Uo(a)):Jd(Tt,c.stateNode));break;case 4:h=Tt,y=Nr,Tt=c.stateNode.containerInfo,Nr=!0,Qn(a,s,c),Tt=h,Nr=y;break;case 0:case 11:case 14:case 15:if(!$t&&(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)}Qn(a,s,c);break;case 1:if(!$t&&(Oa(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch($){ut(c,s,$)}Qn(a,s,c);break;case 21:Qn(a,s,c);break;case 22:c.mode&1?($t=(h=$t)||c.memoizedState!==null,Qn(a,s,c),$t=h):Qn(a,s,c);break;default:Qn(a,s,c)}}function L1(a){var s=a.updateQueue;if(s!==null){a.updateQueue=null;var c=a.stateNode;c===null&&(c=a.stateNode=new Y$),s.forEach(function(h){var y=oI.bind(null,a,h);c.has(h)||(c.add(h),h.then(y,y))})}}function Rr(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*J$(h/1960))-h,10a?16:a,Jn===null)var h=!1;else{if(a=Jn,Jn=null,Nl=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 $=S.deletions;if($!==null){for(var B=0;B<$.length;B++){var Q=$[B];for(de=Q;de!==null;){var ie=de;switch(ie.tag){case 0:case 11:case 15:fs(8,ie,S)}var se=ie.child;if(se!==null)se.return=ie,de=se;else for(;de!==null;){ie=de;var re=ie.sibling,fe=ie.return;if(M1(ie),ie===Q){de=null;break}if(re!==null){re.return=fe,de=re;break}de=fe}}}var he=S.alternate;if(he!==null){var ve=he.child;if(ve!==null){he.child=null;do{var dt=ve.sibling;ve.sibling=null,ve=dt}while(ve!==null)}}de=S}}if((S.subtreeFlags&2064)!==0&&k!==null)k.return=S,de=k;else e:for(;de!==null;){if(S=de,(S.flags&2048)!==0)switch(S.tag){case 0:case 11:case 15:fs(9,S,S.return)}var G=S.sibling;if(G!==null){G.return=S.return,de=G;break e}de=S.return}}var q=a.current;for(de=q;de!==null;){k=de;var X=k.child;if((k.subtreeFlags&2064)!==0&&X!==null)X.return=k,de=X;else e:for(k=q;de!==null;){if($=de,($.flags&2048)!==0)try{switch($.tag){case 0:case 11:case 15:Al(9,$)}}catch(ye){ut($,$.return,ye)}if($===k){de=null;break e}var ue=$.sibling;if(ue!==null){ue.return=$.return,de=ue;break e}de=$.return}}if(Be=y,Gn(),Kr&&typeof Kr.onPostCommitFiberRoot=="function")try{Kr.onPostCommitFiberRoot(Fu,a)}catch{}h=!0}return h}finally{Ke=c,mr.transition=s}}return!1}function Y1(a,s,c){s=Sa(c,s),s=h1(a,s,1),a=Yn(a,s,1),s=Ft(),a!==null&&(Lo(a,1,s),Yt(a,s))}function ut(a,s,c){if(a.tag===3)Y1(a,a,c);else for(;s!==null;){if(s.tag===3){Y1(s,a,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Zn===null||!Zn.has(h))){a=Sa(c,a),a=v1(s,a,1),s=Yn(s,a,1),a=Ft(),s!==null&&(Lo(s,1,a),Yt(s,a));break}}s=s.return}}function iI(a,s,c){var h=a.pingCache;h!==null&&h.delete(s),s=Ft(),a.pingedLanes|=a.suspendedLanes&c,_t===a&&(Ct&c)===c&&(yt===4||yt===3&&(Ct&130023424)===Ct&&500>ft()-Up?Ai(a,0):zp|=c),Yt(a,s)}function Q1(a,s){s===0&&((a.mode&1)===0?s=1:(s=zu,zu<<=1,(zu&130023424)===0&&(zu=4194304)));var c=Ft();a=fn(a,s),a!==null&&(Lo(a,s,c),Yt(a,c))}function aI(a){var s=a.memoizedState,c=0;s!==null&&(c=s.retryLane),Q1(a,c)}function oI(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),Q1(a,c)}var Z1;Z1=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,V$(a,s,c);Gt=(a.flags&131072)!==0}else Gt=!1,nt&&(s.flags&1048576)!==0&&kw(s,cl,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;Pl(a,s),a=s.pendingProps;var y=ha(s,Nt.current);xa(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,sl(s)):S=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,pp(s),y.updater=Ol,s.stateNode=y,y._reactInternals=s,Ap(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(Pl(a,s),a=s.pendingProps,y=h._init,h=y(h._payload),s.type=h,y=s.tag=uI(h),a=kr(h,a),y){case 0:s=Cp(null,s,h,a,c);break e;case 1:s=_1(null,s,h,a,c);break e;case 11:s=b1(null,s,h,a,c);break e;case 14:s=x1(null,s,h,kr(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:kr(h,y),Cp(a,s,h,y,c);case 1:return h=s.type,y=s.pendingProps,y=s.elementType===h?y:kr(h,y),_1(a,s,h,y,c);case 3:e:{if(P1(s),a===null)throw Error(r(387));h=s.pendingProps,S=s.memoizedState,y=S.element,Fw(a,s),ml(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=Sa(Error(r(423)),s),s=E1(a,s,h,c,y);break e}else if(h!==y){y=Sa(Error(r(424)),s),s=E1(a,s,h,c,y);break e}else for(rr=Hn(s.stateNode.containerInfo.firstChild),tr=s,nt=!0,Cr=null,c=Lw(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(ya(),h===y){s=pn(a,s,c);break e}Bt(a,s,h,c)}s=s.child}return s;case 5:return Uw(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),O1(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=ga(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:kr(h,y),b1(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(pl,h._currentValue),h._currentValue=k,S!==null)if(Tr(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 $=S.dependencies;if($!==null){k=S.child;for(var B=$.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),$.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,$=k.alternate,$!==null&&($.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,xa(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=kr(h,s.pendingProps),y=kr(h.type,y),x1(a,s,h,y,c);case 15:return w1(a,s,s.type,s.pendingProps,c);case 17:return h=s.type,y=s.pendingProps,y=s.elementType===h?y:kr(h,y),Pl(a,s),s.tag=1,Vt(h)?(a=!0,sl(s)):a=!1,xa(s,c),d1(s,h,y),Ap(s,h,y,c),kp(null,s,h,!0,a,c);case 19:return T1(a,s,c);case 22:return S1(a,s,c)}throw Error(r(156,s.tag))};function J1(a,s){return Nx(a,s)}function sI(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 sI(a,s,c,h)}function Qp(a){return a=a.prototype,!(!a||!a.isReactComponent)}function uI(a){if(typeof a=="function")return Qp(a)?1:0;if(a!=null){if(a=a.$$typeof,a===M)return 11;if(a===V)return 14}return 2}function ri(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 Il(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 W:return a=yr(13,c,s,y),a.elementType=W,a.lanes=S,a;case z:return a=yr(19,c,s,y),a.elementType=z,a.lanes=S,a;case J:return Dl(c,y,S,s);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case U:k=10;break e;case F:k=9;break e;case M: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 Dl(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 lI(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=Ed(0),this.expirationTimes=Ed(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ed(0),this.identifierPrefix=h,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function eh(a,s,c,h,y,S,k,$,B){return a=new lI(a,s,c,$,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 cI(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=OI(),oh.exports}var pS;function _I(){if(pS)return Hl;pS=1;var e=$T();return Hl.createRoot=e.createRoot,Hl.hydrateRoot=e.hydrateRoot,Hl}var PI=_I();const EI=Ue(PI);var AI=$T();const $a=Ue(AI);/** * @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 gf(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function TI(){return Math.random().toString(36).substr(2,8)}function vS(e,t){return{usr:e.state,key:e.key,idx:t}}function bg(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||TI()})}function cc(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 CI(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,u=i.history,l=si.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=si.Pop;let g=v(),E=g==null?null:g-d;d=g,f&&f({action:l,location:x.location,delta:E})}function m(g,E){l=si.Push;let A=bg(x.location,g,E);r&&r(A,g),d=v()+1;let j=vS(A,d),T=x.createHref(A);try{u.pushState(j,"",T)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;i.location.assign(T)}o&&f&&f({action:l,location:x.location,delta:1})}function b(g,E){l=si.Replace;let A=bg(x.location,g,E);r&&r(A,g),d=v();let j=vS(A,d),T=x.createHref(A);u.replaceState(j,"",T),o&&f&&f({action:l,location:x.location,delta:0})}function O(g){let E=i.location.origin!=="null"?i.location.origin:i.location.href,A=typeof g=="string"?g:cc(g);return A=A.replace(/ $/,"%20"),ct(E,"No window.location.(origin|href) available to create URL for href: "+A),new URL(A,E)}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(hS,p),f=g,()=>{i.removeEventListener(hS,p),f=null}},createHref(g){return t(i,g)},createURL:O,encodeLocation(g){let E=O(g);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:m,replace:b,go(g){return u.go(g)}};return x}var mS;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(mS||(mS={}));function kI(e,t,r){return r===void 0&&(r="/"),NI(e,t,r)}function NI(e,t,r,n){let i=typeof t=="string"?Yi(t):t,o=Ka(i.pathname||"/",r);if(o==null)return null;let u=IT(e);RI(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=li([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+'".')),IT(o.children,t,v,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:FI(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 DT(o.path))i(o,u,f)}),t}function DT(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=DT(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 RI(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:qI(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const MI=/^:[\w-]+$/,$I=3,II=2,DI=1,LI=10,BI=-2,yS=e=>e==="*";function FI(e,t){let r=e.split("/"),n=r.length;return r.some(yS)&&(n+=BI),t&&(n+=II),r.filter(i=>!yS(i)).reduce((i,o)=>i+(MI.test(o)?$I:o===""?DI:LI),n)}function qI(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 zI(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 UI(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),gf(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 WI(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return gf(!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 HI=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,KI=e=>HI.test(e);function VI(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Yi(e):e,o;if(r)if(KI(r))o=r;else{if(r.includes("//")){let u=r;r=r.replace(/\/\/+/g,"/"),gf(!1,"Pathnames cannot have embedded double slashes - normalizing "+(u+" -> "+r))}r.startsWith("/")?o=gS(r.substring(1),"/"):o=gS(r,t)}else o=t;return{pathname:o,search:YI(n),hash:QI(i)}}function gS(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 GI(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function LT(e,t){let r=GI(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function BT(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=VI(i,l),d=u&&u!=="/"&&u.endsWith("/"),v=(o||u===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(d||v)&&(f.pathname+="/"),f}const li=e=>e.join("/").replace(/\/\/+/g,"/"),XI=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),YI=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,QI=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ZI(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const FT=["post","put","patch","delete"];new Set(FT);const JI=["get",...FT];new Set(JI);/** * 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=BT(d,JSON.parse(u),o,v.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:li([t,p.pathname])),(v.replace?n.replace:n.push)(p,v.state,v)},[t,n,u,o,e])}const r2=C.createContext(null);function n2(e){let t=C.useContext(Rn).outlet;return t&&C.createElement(r2.Provider,{value:e},t)}function WT(){let{matches:e}=C.useContext(Rn),t=e[e.length-1];return t?t.params:{}}function wf(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(LT(i,n.v7_relativeSplatPath));return C.useMemo(()=>BT(e,JSON.parse(u),o,r==="path"),[e,u,o,r])}function i2(e,t){return a2(e,t)}function a2(e,t,r,n){Ou()||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=kI(e,{pathname:b}),x=c2(O&&O.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:li([f,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?f:li([f,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,r,n);return t&&x?C.createElement(xf.Provider,{value:{location:Bs({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:si.Pop}},x):x}function o2(){let e=h2(),t=ZI(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 s2=C.createElement(o2,null);class u2 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(zT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function l2(e){let{routeContext:t,match:r,children:n}=e,i=C.useContext(bf);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 c2(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||s2,f&&(d<0&&m===0?(m2("route-fallback"),O=!0,g=null):d===m&&(O=!0,g=p.route.hydrateFallbackElement||null)));let E=t.concat(u.slice(0,m+1)),A=()=>{let j;return b?j=x:O?j=g:p.route.Component?j=C.createElement(p.route.Component,null):p.route.element?j=p.route.element:j=v,C.createElement(l2,{match:p,routeContext:{outlet:v,matches:E,isDataRoute:r!=null},children:j})};return r&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?C.createElement(u2,{location:r.location,revalidation:r.revalidation,component:x,error:b,children:A(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):A()},null)}var HT=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(HT||{}),KT=(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})(KT||{});function f2(e){let t=C.useContext(bf);return t||ct(!1),t}function d2(e){let t=C.useContext(qT);return t||ct(!1),t}function p2(e){let t=C.useContext(Rn);return t||ct(!1),t}function VT(e){let t=p2(),r=t.matches[t.matches.length-1];return r.route.id||ct(!1),r.route.id}function h2(){var e;let t=C.useContext(zT),r=d2(),n=VT();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function v2(){let{router:e}=f2(HT.UseNavigateStable),t=VT(KT.UseNavigateStable),r=C.useRef(!1);return UT(()=>{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 bS={};function m2(e,t,r){bS[e]||(bS[e]=!0)}function y2(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function g2(e){return n2(e.context)}function Ri(e){ct(!1)}function b2(e){let{basename:t="/",children:r=null,location:n,navigationType:i=si.Pop,navigator:o,static:u=!1,future:l}=e;Ou()&&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(xf.Provider,{children:r,value:x}))}function x2(e){let{children:t,location:r}=e;return i2(wg(t),r)}new Promise(()=>{});function wg(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,wg(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=wg(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 fc(){return fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function w2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function S2(e,t){return e.button===0&&(!t||t==="_self")&&!w2(e)}function Sg(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 O2(e,t){let r=Sg(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(o=>{r.append(i,o)})}),r}const _2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],P2=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],E2="6";try{window.__reactRouterVersion=E2}catch{}const A2=C.createContext({isTransitioning:!1}),j2="startTransition",xS=xI[j2];function T2(e){let{basename:t,children:r,future:n,window:i}=e,o=C.useRef();o.current==null&&(o.current=jI({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&&xS?xS(()=>f(p)):f(p)},[f,d]);return C.useLayoutEffect(()=>u.listen(v),[u,v]),C.useEffect(()=>y2(n),[n]),C.createElement(b2,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:u,future:n})}const C2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",k2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dc=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=GT(t,_2),{basename:b}=C.useContext(di),O,x=!1;if(typeof d=="string"&&k2.test(d)&&(O=d,C2))try{let j=new URL(window.location.href),T=d.startsWith("//")?new URL(j.protocol+d):new URL(d),_=Ka(T.pathname,b);T.origin===j.origin&&_!=null?d=_+T.search+T.hash:x=!0}catch{}let g=e2(d,{relative:i}),E=R2(d,{replace:u,state:l,target:f,preventScrollReset:v,relative:i,viewTransition:p});function A(j){n&&n(j),j.defaultPrevented||E(j)}return C.createElement("a",fc({},m,{href:O||g,onClick:x||o?n:A,ref:r,target:f}))}),Kl=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=GT(t,P2),m=wf(f,{relative:p.relative}),b=bo(),O=C.useContext(qT),{navigator:x,basename:g}=C.useContext(di),E=O!=null&&$2(m)&&d===!0,A=x.encodeLocation?x.encodeLocation(m).pathname:m.pathname,j=b.pathname,T=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;i||(j=j.toLowerCase(),T=T?T.toLowerCase():null,A=A.toLowerCase()),T&&g&&(T=Ka(T,g)||T);const _=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let P=j===A||!u&&j.startsWith(A)&&j.charAt(_)==="/",N=T!=null&&(T===A||!u&&T.startsWith(A)&&T.charAt(A.length)==="/"),R={isActive:P,isPending:N,isTransitioning:E},I=P?n:void 0,U;typeof o=="function"?U=o(R):U=[o,P?"active":null,N?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let F=typeof l=="function"?l(R):l;return C.createElement(dc,fc({},p,{"aria-current":I,className:U,ref:r,style:F,to:f,viewTransition:d}),typeof v=="function"?v(R):v)});var Og;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Og||(Og={}));var wS;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(wS||(wS={}));function N2(e){let t=C.useContext(bf);return t||ct(!1),t}function R2(e,t){let{target:r,replace:n,state:i,preventScrollReset:o,relative:u,viewTransition:l}=t===void 0?{}:t,f=_u(),d=bo(),v=wf(e,{relative:u});return C.useCallback(p=>{if(S2(p,r)){p.preventDefault();let m=n!==void 0?n:cc(d)===cc(v);f(e,{replace:m,state:i,preventScrollReset:o,relative:u,viewTransition:l})}},[d,f,v,n,i,r,e,o,u,l])}function M2(e){let t=C.useRef(Sg(e)),r=C.useRef(!1),n=bo(),i=C.useMemo(()=>O2(n.search,r.current?null:t.current),[n.search]),o=_u(),u=C.useCallback((l,f)=>{const d=Sg(typeof l=="function"?l(i):l);r.current=!0,o("?"+d,f)},[o,i]);return[i,u]}function $2(e,t){t===void 0&&(t={});let r=C.useContext(A2);r==null&&ct(!1);let{basename:n}=N2(Og.useViewTransitionState),i=wf(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 xg(i.pathname,u)!=null||xg(i.pathname,o)!=null}const I2={"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"},"session.global":{fr:"Global",en:"Global"},"session.personalStats":{fr:"Statistiques personnelles",en:"Personal Statistics"},"session.globalStats":{fr:"Statistiques globales",en:"Global Statistics"},"session.friendlyFire":{fr:"Tirs amis",en:"Friendly Fire"},"session.hitsReceived":{fr:"Tirs reçus",en:"Hits Received"},"session.shotsInSession":{fr:"Tirs durant la session",en:"Shots In Session"},"session.missed":{fr:"Manqués",en:"Missed"},"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"}},XT=C.createContext(null);function D2({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=I2[o])==null?void 0:u[t])||o},[t]);return w.jsx(XT.Provider,{value:{lang:t,setLang:n,t:i},children:e})}function zr(){const e=C.useContext(XT);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 SS;function L2(){return SS||(SS=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",u=0;ue!=null?String(e):t||null;function _g(){return _g=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)})});eC.displayName="NavbarBrand";function J0(e){return e&&e.ownerDocument||document}function K2(e){var t=J0(e);return t&&t.defaultView||window}function V2(e,t){return K2(e).getComputedStyle(e,t)}var G2=/([A-Z])/g;function X2(e){return e.replace(G2,"-$1").toLowerCase()}var Y2=/^ms-/;function Vl(e){return X2(e).replace(Y2,"-ms-")}var Q2=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Z2(e){return!!(e&&Q2.test(e))}function On(e,t){var r="",n="";if(typeof t=="string")return e.style.getPropertyValue(Vl(t))||V2(e).getPropertyValue(Vl(t));Object.keys(t).forEach(function(i){var o=t[i];!o&&o!==0?e.style.removeProperty(Vl(i)):Z2(i)?n+=i+"("+o+") ":r+=Vl(i)+": "+o+";"}),n&&(r+="transform: "+n+";"),e.style.cssText+=";"+r}var fh={exports:{}},dh,_S;function J2(){if(_S)return dh;_S=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return dh=e,dh}var ph,PS;function eD(){if(PS)return ph;PS=1;var e=J2();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 tD(){return ES||(ES=1,fh.exports=eD()()),fh.exports}var rD=tD();const $e=Ue(rD),AS={disabled:!1},tC=D.createContext(null);var nD=function(t){return t.scrollTop},As="unmounted",ii="exited",Lr="entering",yn="entered",Fs="exiting",Mn=(function(e){U2(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=ii,o.appearStatus=Lr):f=yn:n.unmountOnExit||n.mountOnEnter?f=As:f=ii,o.state={status:f},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var u=i.in;return u&&o.status===As?{status:ii}: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!==yn&&(o=Lr):(u===Lr||u===yn)&&(o=Fs)}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:$a.findDOMNode(this);u&&nD(u)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ii&&this.setState({status:As})},r.performEnter=function(i){var o=this,u=this.props.enter,l=this.context?this.context.isMounting:i,f=this.props.nodeRef?[l]:[$a.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:yn},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:yn},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:$a.findDOMNode(this);if(!o||AS.disabled){this.safeSetState({status:ii},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Fs},function(){i.props.onExiting(l),i.onTransitionEnd(u.exit,function(){i.safeSetState({status:ii},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:$a.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===As)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=YT(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return D.createElement(tC.Provider,{value:null},typeof u=="function"?u(i,l):D.cloneElement(D.Children.only(u),l))},t})(D.Component);Mn.contextType=tC;Mn.propTypes={};function Aa(){}Mn.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};Mn.UNMOUNTED=As;Mn.EXITED=ii;Mn.ENTERING=Lr;Mn.ENTERED=yn;Mn.EXITING=Fs;function iD(e){return e.code==="Escape"||e.keyCode===27}function aD(){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}=aD();return t>=19?e.props.ref:e.ref}const Of=!!(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}};Of&&(window.addEventListener("test",hh,hh),window.removeEventListener("test",hh,!0))}catch{}function oD(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 sD(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 hc(e,t,r,n){return oD(e,t,r,n),function(){sD(e,t,r,n)}}function uD(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 lD(e){var t=On(e,"transitionDuration")||"",r=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*r}function cD(e,t,r){r===void 0&&(r=5);var n=!1,i=setTimeout(function(){n||uD(e,"transitionend",!0)},t+r),o=hc(e,"transitionend",function(){n=!0},{once:!0});return function(){clearTimeout(i),o()}}function fD(e,t,r,n){r==null&&(r=lD(e)||0);var i=cD(e,r,n),o=hc(e,"transitionend",t);return function(){i(),o()}}function jS(e,t){const r=On(e,t)||"",n=r.indexOf("ms")===-1?1e3:1;return parseFloat(r)*n}function eb(e,t){const r=jS(e,"transitionDuration"),n=jS(e,"transitionDelay"),i=fD(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 rC(e){e.offsetHeight}const TS=e=>!e||typeof e=="function"?e:t=>{e.current=t};function dD(e,t){const r=TS(e),n=TS(t);return i=>{r&&r(i),n&&n(i)}}function pD(e,t){return C.useMemo(()=>dD(e,t),[e,t])}function hD(e){return e&&"setState"in e?$a.findDOMNode(e):e??null}const _f=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=pD(p,f),b=P=>{m(hD(P))},O=P=>N=>{P&&p.current&&P(p.current,N)},x=C.useCallback(O(e),[e]),g=C.useCallback(O(t),[t]),E=C.useCallback(O(r),[r]),A=C.useCallback(O(n),[n]),j=C.useCallback(O(i),[i]),T=C.useCallback(O(o),[o]),_=C.useCallback(O(u),[u]);return w.jsx(Mn,{ref:v,...d,onEnter:x,onEntered:E,onEntering:g,onExit:A,onExited:T,onExiting:j,addEndListener:_,nodeRef:p,children:typeof l=="function"?(P,N)=>l(P,{...N,ref:b}):D.cloneElement(l,{ref:b})})});_f.displayName="TransitionWrapper";const vD={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function mD(e,t){const r=`offset${e[0].toUpperCase()}${e.slice(1)}`,n=t[r],i=vD[e];return n+parseInt(On(t,i[0]),10)+parseInt(On(t,i[1]),10)}const yD={[ii]:"collapse",[Fs]:"collapsing",[Lr]:"collapsing",[yn]:"collapse show"},nC=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=mD,...O},x)=>{const g=typeof l=="function"?l():l,E=C.useMemo(()=>ys(P=>{P.style[g]="0"},e),[g,e]),A=C.useMemo(()=>ys(P=>{const N=`scroll${g[0].toUpperCase()}${g.slice(1)}`;P.style[g]=`${P[N]}px`},t),[g,t]),j=C.useMemo(()=>ys(P=>{P.style[g]=null},r),[g,r]),T=C.useMemo(()=>ys(P=>{P.style[g]=`${b(g,P)}px`,rC(P)},n),[n,b,g]),_=C.useMemo(()=>ys(P=>{P.style[g]=null},i),[g,i]);return w.jsx(_f,{ref:x,addEndListener:eb,...O,"aria-expanded":O.role?f:null,onEnter:E,onEntering:A,onEntered:j,onExit:T,onExiting:_,childRef:xo(u),in:f,timeout:d,mountOnEnter:v,unmountOnExit:p,appear:m,children:(P,N)=>D.cloneElement(u,{...N,className:Oe(o,u.props.className,yD[P],g==="width"&&"collapse-horizontal")})})});nC.displayName="Collapse";const wo=C.createContext(null);wo.displayName="NavbarContext";const iC=C.forwardRef(({children:e,bsPrefix:t,...r},n)=>{t=Re(t,"navbar-collapse");const i=C.useContext(wo);return w.jsx(nC,{in:!!(i&&i.expanded),...r,children:w.jsx("div",{ref:n,className:t,children:e})})});iC.displayName="NavbarCollapse";function gD(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e},[e]),t}function Pf(e){const t=gD(e);return C.useCallback(function(...r){return t.current&&t.current(...r)},[t])}const aC=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=Pf(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`})})});aC.displayName="NavbarToggle";const bD=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",xD=typeof document<"u",wD=xD||bD?C.useLayoutEffect:C.useEffect,jg=new WeakMap,CS=(e,t)=>{if(!e||!t)return;const r=jg.get(t)||new Map;jg.set(t,r);let n=r.get(e);return n||(n=t.matchMedia(e),n.refCount=0,r.set(n.media,n)),n};function SD(e,t=typeof window>"u"?void 0:window){const r=CS(e,t),[n,i]=C.useState(()=>r?r.matches:!1);return wD(()=>{let o=CS(e,t);if(!o)return i(!1);let u=jg.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 OD(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 SD(p,d)}return u}const _D=OD({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400});function vh(e){e===void 0&&(e=J0());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function kS(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function PD(){const e=C.useRef(!0),t=C.useRef(()=>e.current);return C.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function ED(e){const t=C.useRef(e);return t.current=e,t}function AD(e){const t=ED(e);C.useEffect(()=>()=>t.current(),[])}function jD(e){const t=C.useRef(null);return C.useEffect(()=>{t.current=e}),t.current}function TD(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e},[e]),t}function gn(e){const t=TD(e);return C.useCallback(function(...r){return t.current&&t.current(...r)},[t])}const CD="data-rr-ui-",kD="rrUi";function Ef(e){return`${CD}${e}`}function ND(e){return`${kD}${e}`}function RD(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const NS=Ef("modal-open");class tb{constructor({ownerDocument:t,handleContainerOverflow:r=!0,isRTL:n=!1}={}){this.handleContainerOverflow=r,this.isRTL=n,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return RD(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(NS,""),On(i,r)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const r=this.getElement();r.removeAttribute(NS),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 oC=C.createContext(Of?window:void 0);oC.Provider;function rb(){return C.useContext(oC)}const mh=(e,t)=>Of?e==null?(t||J0()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function MD(e,t){const r=rb(),[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 RS=e=>!e||typeof e=="function"?e:t=>{e.current=t};function $D(e,t){const r=RS(e),n=RS(t);return i=>{r&&r(i),n&&n(i)}}function Af(e,t){return C.useMemo(()=>$D(e,t),[e,t])}const ID=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",DD=typeof document<"u",MS=DD||ID?C.useLayoutEffect:C.useEffect;function LD({children:e,in:t,onExited:r,mountOnEnter:n,unmountOnExit:i}){const o=C.useRef(null),u=C.useRef(t),l=gn(r);C.useEffect(()=>{t?u.current=!0:l(o.current)},[t,l]);const f=Af(o,xo(e)),d=C.cloneElement(e,{ref:f});return t?d:i||!u.current&&n?null:d}const BD=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function FD(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 qD(e){let{onEnter:t,onEntering:r,onEntered:n,onExit:i,onExiting:o,onExited:u,addEndListener:l,children:f}=e,d=FD(e,BD);const v=C.useRef(null),p=Af(v,xo(f)),m=T=>_=>{T&&v.current&&T(v.current,_)},b=C.useCallback(m(t),[t]),O=C.useCallback(m(r),[r]),x=C.useCallback(m(n),[n]),g=C.useCallback(m(i),[i]),E=C.useCallback(m(o),[o]),A=C.useCallback(m(u),[u]),j=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:E},u&&{onExited:A},l&&{addEndListener:j},{children:typeof f=="function"?(T,_)=>f(T,Object.assign({},_,{ref:p})):C.cloneElement(f,{ref:p})})}const zD=["component"];function UD(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 WD=C.forwardRef((e,t)=>{let{component:r}=e,n=UD(e,zD);const i=qD(n);return w.jsx(r,Object.assign({ref:t},i))});function HD({in:e,onTransition:t}){const r=C.useRef(null),n=C.useRef(!0),i=gn(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 KD({children:e,in:t,onExited:r,onEntered:n,transition:i}){const[o,u]=C.useState(!t);t&&o&&u(!1);const l=HD({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=Af(l,xo(e));return o&&!t?null:C.cloneElement(e,{ref:f})}function $S(e,t,r){return e?w.jsx(WD,Object.assign({},r,{component:e})):t?w.jsx(KD,Object.assign({},r,{transition:t})):w.jsx(LD,Object.assign({},r))}const VD=["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 GD(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 XD(e){return yh||(yh=new tb({ownerDocument:e==null?void 0:e.document})),yh}function YD(e){const t=rb(),r=e||XD(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 sC=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:E=!0,restoreFocusOptions:A,renderDialog:j,renderBackdrop:T=Ce=>w.jsx("div",Object.assign({},Ce)),manager:_,container:P,onShow:N,onHide:R=()=>{},onExit:I,onExited:U,onExiting:F,onEnter:M,onEntering:W,onEntered:z}=e,V=GD(e,VD);const Y=rb(),J=MD(P),K=YD(_),ee=PD(),Z=jD(r),[L,H]=C.useState(!r),oe=C.useRef(null);C.useImperativeHandle(t,()=>K,[K]),Of&&!Z&&r&&(oe.current=vh(Y==null?void 0:Y.document)),r&&L&&H(!1);const ce=gn(()=>{if(K.add(),ge.current=hc(document,"keydown",je),ae.current=hc(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&&!kS(K.dialog,st)&&(oe.current=st,K.dialog.focus())}}),me=gn(()=>{if(K.remove(),ge.current==null||ge.current(),ae.current==null||ae.current(),E){var Ce;(Ce=oe.current)==null||Ce.focus==null||Ce.focus(A),oe.current=null}});C.useEffect(()=>{!r||!J||ce()},[r,J,ce]),C.useEffect(()=>{L&&me()},[L,me]),AD(()=>{me()});const Pe=gn(()=>{if(!g||!ee()||!K.isTopModal())return;const Ce=vh(Y==null?void 0:Y.document);K.dialog&&Ce&&!kS(K.dialog,Ce)&&K.dialog.focus()}),Le=gn(Ce=>{Ce.target===Ce.currentTarget&&(d==null||d(Ce),l===!0&&R())}),je=gn(Ce=>{f&&iD(Ce)&&K.isTopModal()&&(v==null||v(Ce),Ce.defaultPrevented||R())}),ae=C.useRef(),ge=C.useRef(),Te=(...Ce)=>{H(!0),U==null||U(...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=j?j(ne):w.jsx("div",Object.assign({},ne,{children:C.cloneElement(u,{role:"document"})}));We=$S(p,m,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!r,onExit:I,onExiting:F,onExited:Te,onEnter:M,onEntering:W,onEntered:z,children:We});let Ne=null;return l&&(Ne=T({ref:K.setBackdropRef,onClick:Le}),Ne=$S(b,O,{in:!!r,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Ne})),w.jsx(w.Fragment,{children:$a.createPortal(w.jsxs(w.Fragment,{children:[Ne,We]}),J)})});sC.displayName="Modal";const QD=Object.assign(sC,{Manager:tb}),ZD={[Lr]:"show",[yn]:"show"},uC=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)=>{rC(f),n==null||n(f,d)},[n]);return w.jsx(_f,{ref:o,addEndListener:eb,...u,onEnter:l,childRef:xo(t),children:(f,d)=>C.cloneElement(t,{...d,className:Oe("fade",e,t.props.className,ZD[f],r[f])})})});uC.displayName="Fade";const lC=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})));lC.displayName="OffcanvasBody";const JD={[Lr]:"show",[yn]:"show"},cC=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(_f,{ref:f,addEndListener:eb,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===Fs)&&`${e}-toggling`,JD[d])})})));cC.displayName="OffcanvasToggling";const fC=C.createContext({onHide(){}}),eL={"aria-label":$e.string,onClick:$e.func,variant:$e.oneOf(["white"])},nb=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}));nb.displayName="CloseButton";nb.propTypes=eL;const dC=C.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:r=!1,onHide:n,children:i,...o},u)=>{const l=C.useContext(fC),f=Pf(()=>{l==null||l.onHide(),n==null||n()});return w.jsxs("div",{ref:u,...o,children:[i,r&&w.jsx(nb,{"aria-label":e,variant:t,onClick:f})]})});dC.displayName="AbstractModalHeader";const pC=C.forwardRef(({bsPrefix:e,className:t,closeLabel:r="Close",closeButton:n=!1,...i},o)=>(e=Re(e,"offcanvas-header"),w.jsx(dC,{ref:o,...i,className:Oe(t,e),closeLabel:r,closeButton:n})));pC.displayName="OffcanvasHeader";const ib=(e=>C.forwardRef((t,r)=>w.jsx("div",{...t,ref:r,className:Oe(t.className,e)}))),tL=ib("h5"),hC=C.forwardRef(({className:e,bsPrefix:t,as:r=tL,...n},i)=>(t=Re(t,"offcanvas-title"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));hC.displayName="OffcanvasTitle";function rL(e,t){return e.classList?e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function nL(e,t){e.classList?e.classList.add(t):rL(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}var iL=Function.prototype.bind.call(Function.prototype.call,[].slice);function Mi(e,t){return iL(e.querySelectorAll(t))}function IS(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function aL(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=IS(e.className,t):e.setAttribute("class",IS(e.className&&e.className.baseVal||"",t))}const ja={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class vC extends tb{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(nL(r,"modal-open"),!t.scrollBarWidth)return;const n=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Mi(r,ja.FIXED_CONTENT).forEach(o=>this.adjustAndStore(n,o,t.scrollBarWidth)),Mi(r,ja.STICKY_CONTENT).forEach(o=>this.adjustAndStore(i,o,-t.scrollBarWidth)),Mi(r,ja.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(i,o,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const r=this.getElement();aL(r,"modal-open");const n=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Mi(r,ja.FIXED_CONTENT).forEach(o=>this.restore(n,o)),Mi(r,ja.STICKY_CONTENT).forEach(o=>this.restore(i,o)),Mi(r,ja.NAVBAR_TOGGLER).forEach(o=>this.restore(i,o))}}let gh;function oL(e){return gh||(gh=new vC(e)),gh}function sL(e){return w.jsx(cC,{...e})}function uL(e){return w.jsx(uC,{...e})}const mC=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:E,onEntered:A,onExit:j,onExiting:T,onEnter:_,onEntering:P,onExited:N,backdropClassName:R,manager:I,renderStaticNode:U=!1,...F},M)=>{const W=C.useRef();e=Re(e,"offcanvas");const[z,V]=C.useState(!1),Y=Pf(m),J=_D(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?(W.current||(W.current=new vC({handleContainerOverflow:!1})),W.current):oL())}const Z=(ce,...me)=>{ce&&(ce.style.visibility="visible"),_==null||_(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,...F,className:Oe(t,o?`${e}-${o}`:e,`${e}-${i}`),"aria-labelledby":n,children:r});return w.jsxs(w.Fragment,{children:[!z&&(o||U)&&oe({}),w.jsx(fC.Provider,{value:K,children:w.jsx(QD,{show:z,ref:M,backdrop:l,container:b,keyboard:f,autoFocus:O,enforceFocus:x&&!d,restoreFocus:g,restoreFocusOptions:E,onEscapeKeyDown:v,onShow:p,onHide:Y,onEnter:Z,onEntering:P,onEntered:A,onExit:j,onExiting:T,onExited:L,manager:ee(),transition:sL,backdropTransition:uL,renderBackdrop:H,renderDialog:oe})})]})});mC.displayName="Offcanvas";const lL=Object.assign(mC,{Body:lC,Header:pC,Title:hC}),yC=C.forwardRef(({onHide:e,...t},r)=>{const n=C.useContext(wo),i=Pf(()=>{n==null||n.onToggle==null||n.onToggle(),e==null||e()});return w.jsx(lL,{ref:r,show:!!(n!=null&&n.expanded),...t,renderStaticNode:!0,onHide:i})});yC.displayName="NavbarOffcanvas";const gC=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})));gC.displayName="NavbarText";const bC=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}=QT(e,{expanded:"onToggle"}),x=Re(r,"navbar"),g=C.useCallback((...j)=>{m==null||m(...j),b&&v&&(p==null||p(!1))},[m,b,v,p]);O.role===void 0&&d!=="nav"&&(O.role="navigation");let E=`${x}-expand`;typeof n=="string"&&(E=`${E}-${n}`);const A=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:A,children:w.jsx(pc.Provider,{value:g,children:w.jsx(d,{ref:t,...O,className:Oe(f,x,n&&E,i&&`${x}-${i}`,o&&`bg-${o}`,l&&`sticky-${l}`,u&&`fixed-${u}`)})})})});bC.displayName="Navbar";const Gl=Object.assign(bC,{Brand:eC,Collapse:iC,Offcanvas:yC,Text:gC,Toggle:aC});function cL(){const[,e]=C.useReducer(t=>t+1,0);return e}const ab=C.createContext(null);ab.displayName="NavContext";const xC=C.createContext(null),fL=["as","disabled"];function dL(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 pL(e){return!e||e.trim()==="#"}function wC({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"&&pL(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 SC=C.forwardRef((e,t)=>{let{as:r,disabled:n}=e,i=dL(e,fL);const[o,{tagName:u}]=wC(Object.assign({tagName:r,disabled:n},i));return w.jsx(u,Object.assign({},i,o,{ref:t}))});SC.displayName="Button";const hL=["as","active","eventKey"];function vL(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 OC({key:e,onClick:t,active:r,id:n,role:i,disabled:o}){const u=C.useContext(pc),l=C.useContext(ab),f=C.useContext(xC);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[Ef("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=gn(p=>{o||(t==null||t(p),e!=null&&u&&!p.isPropagationStopped()&&u(e,p))}),[v,{isActive:d}]}const _C=C.forwardRef((e,t)=>{let{as:r=SC,active:n,eventKey:i}=e,o=vL(e,hL);const[u,l]=OC(Object.assign({key:Z0(i,o.href),active:n},o));return u[Ef("active")]=l.isActive,w.jsx(r,Object.assign({},o,u,{ref:t}))});_C.displayName="NavItem";const mL=["as","onSelect","activeKey","role","onKeyDown"];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}const DS=()=>{},LS=Ef("event-key"),PC=C.forwardRef((e,t)=>{let{as:r="div",onSelect:n,activeKey:i,role:o,onKeyDown:u}=e,l=yL(e,mL);const f=cL(),d=C.useRef(!1),v=C.useContext(pc),p=C.useContext(xC);let m,b;p&&(o=o||"tablist",i=p.activeKey,m=p.getControlledId,b=p.getControllerId);const O=C.useRef(null),x=j=>{const T=O.current;if(!T)return null;const _=Mi(T,`[${LS}]:not([aria-disabled=true])`),P=T.querySelector("[aria-selected=true]");if(!P||P!==document.activeElement)return null;const N=_.indexOf(P);if(N===-1)return null;let R=N+j;return R>=_.length&&(R=0),R<0&&(R=_.length-1),_[R]},g=(j,T)=>{j!=null&&(n==null||n(j,T),v==null||v(j,T))},E=j=>{if(u==null||u(j),!p)return;let T;switch(j.key){case"ArrowLeft":case"ArrowUp":T=x(-1);break;case"ArrowRight":case"ArrowDown":T=x(1);break;default:return}T&&(j.preventDefault(),g(T.dataset[ND("EventKey")]||null,j),d.current=!0,f())};C.useEffect(()=>{if(O.current&&d.current){const j=O.current.querySelector(`[${LS}][aria-selected=true]`);j==null||j.focus()}d.current=!1});const A=Af(t,O);return w.jsx(pc.Provider,{value:g,children:w.jsx(ab.Provider,{value:{role:o,activeKey:Z0(i),getControlledId:m||DS,getControllerId:b||DS},children:w.jsx(r,Object.assign({},l,{onKeyDown:E,ref:A,role:o}))})})});PC.displayName="Nav";const gL=Object.assign(PC,{Item:_C}),ob=C.createContext(null);ob.displayName="CardHeaderContext";const EC=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})));EC.displayName="NavItem";const bL=["onKeyDown"];function xL(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 wL(e){return!e||e.trim()==="#"}const sb=C.forwardRef((e,t)=>{let{onKeyDown:r}=e,n=xL(e,bL);const[i]=wC(Object.assign({tagName:"a"},n)),o=gn(u=>{i.onKeyDown(u),r==null||r(u)});return wL(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}))});sb.displayName="Anchor";const AC=C.forwardRef(({bsPrefix:e,className:t,as:r=sb,active:n,eventKey:i,disabled:o=!1,...u},l)=>{e=Re(e,"nav-link");const[f,d]=OC({key:Z0(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")})});AC.displayName="NavLink";const jC=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}=QT(e,{activeKey:"onSelect"}),m=Re(n,"nav");let b,O,x=!1;const g=C.useContext(wo),E=C.useContext(ob);return g?(b=g.bsPrefix,x=l??!0):E&&({cardHeaderBsPrefix:O}=E),w.jsx(gL,{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})});jC.displayName="Nav";const Xl=Object.assign(jC,{Item:EC,Link:AC}),ub=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)})});ub.displayName="Container";const SL="/ProserveReport/",OL=`${SL}logo.png`;function _L(){const{lang:e,setLang:t,t:r}=zr();return w.jsx(Gl,{bg:"dark",variant:"dark",expand:"lg",className:"app-navbar",children:w.jsxs(ub,{fluid:!0,children:[w.jsxs(Gl.Brand,{as:Kl,to:"/",className:"fw-bold d-flex align-items-center gap-2",children:[w.jsx("img",{src:OL,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(Gl.Toggle,{"aria-controls":"main-nav"}),w.jsxs(Gl.Collapse,{id:"main-nav",children:[w.jsxs(Xl,{className:"me-auto",children:[w.jsx(Xl.Link,{as:Kl,to:"/",end:!0,children:r("nav.dashboard")}),w.jsx(Xl.Link,{as:Kl,to:"/sessions",children:r("nav.sessions")}),w.jsx(Xl.Link,{as:Kl,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 PL(){return w.jsxs("div",{className:"app-layout",children:[w.jsx(_L,{}),w.jsx(ub,{fluid:!0,className:"main-content py-4 px-4",children:w.jsx(g2,{})})]})}const ur=C.forwardRef(({bsPrefix:e,className:t,as:r="div",...n},i)=>{const o=Re(e,"row"),u=ZT(),l=JT(),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 EL({as:e,bsPrefix:t,className:r,...n}){t=Re(t,"col");const i=ZT(),o=JT(),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 De=C.forwardRef((e,t)=>{const[{className:r,...n},{as:i="div",bsPrefix:o,spans:u}]=EL(e);return w.jsx(i,{...n,ref:t,className:Oe(r,!u.length&&o)})});De.displayName="Col";const lb=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})));lb.displayName="CardBody";const TC=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})));TC.displayName="CardFooter";const CC=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(ob.Provider,{value:u,children:w.jsx(r,{ref:i,...n,className:Oe(t,o)})})});CC.displayName="CardHeader";const kC=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})});kC.displayName="CardImg";const NC=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})));NC.displayName="CardImgOverlay";const RC=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})));RC.displayName="CardLink";const AL=ib("h6"),MC=C.forwardRef(({className:e,bsPrefix:t,as:r=AL,...n},i)=>(t=Re(t,"card-subtitle"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));MC.displayName="CardSubtitle";const $C=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})));$C.displayName="CardText";const jL=ib("h5"),IC=C.forwardRef(({className:e,bsPrefix:t,as:r=jL,...n},i)=>(t=Re(t,"card-title"),w.jsx(r,{ref:i,className:Oe(e,t),...n})));IC.displayName="CardTitle";const DC=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(lb,{children:u}):u})});DC.displayName="Card";const be=Object.assign(DC,{Img:kC,Title:IC,Subtitle:MC,Body:lb,Link:RC,Text:$C,Header:CC,Footer:TC,ImgOverlay:NC}),bn=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});bn.displayName="Table";const TL="/proserve";async function nn(e,t={}){const r=new URLSearchParams;for(const[i,o]of Object.entries(t))r.append(i,String(o));const n=await fetch(`${TL}/${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 LC(e=-1){return(await nn("lists/all_sessions.php",{typeId:e})).stats||[]}async function CL(e,t=-1){return(await nn("lists/sessions_for_user.php",{userId:e,typeId:t})).stats||[]}async function kL(e){return(await nn("session/get.php",{sessionId:e})).session||null}async function BC(){return(await nn("lists/all_users.php")).stats||[]}async function NL(e){return(await nn("user/get.php",{userId:e})).user||null}async function RL(e){return(await nn("lists/users_in_session.php",{sessionId:e})).stats||[]}async function ML(e,t=-1){return(await nn("stats/get.php",{sessionId:e,userId:t})).stats||[]}async function $L(e,t=-1,r=-1){const n={sessionId:e};return t>0&&(n.userId=t),r>=0&&(n.sessionType=r),(await nn("stats/get.php",n)).stats||[]}async function IL(e,t=-1){const r={sessionId:e};return t>0&&(r.userId=t),(await nn("session/getobjectives.php",r)).participation||null}async function DL(e,t=!0){var n;return((n=(await nn("stats/userhistory.php",{userId:e,sessionId:-1,quickMode:t?"true":"false"})).stats)==null?void 0:n[0])||null}function Dt({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 jf=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}`)})});jf.displayName="Badge";function Tf({success:e,score:t}){const{t:r}=zr();return w.jsxs(jf,{bg:e?"success":"danger",children:[t!==void 0&&w.jsx("span",{className:"me-1",children:t}),r(e?"badge.success":"badge.failed")]})}var Ma=(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))(Ma||{});const LL={0:"Stand de Tir",1:"Challenge",2:"Protection",3:"Désescalade",4:"Terrorisme",5:"Incendie",6:"Récupération",7:"Tir Longue Distance"},FC={0:"#4a90d9",1:"#9b59b6",2:"#27ae60",3:"#f39c12",4:"#e74c3c",5:"#e67e22",6:"#1abc9c",7:"#2980b9"};function qs({typeId:e}){const{t}=zr(),r=t(`sessionType.${e}`),n=FC[e]||"#6c757d";return w.jsx(jf,{style:{backgroundColor:n},className:"session-type-badge",children:r})}const qC=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}`)})});qC.displayName="Spinner";function Pu(){const{t:e}=zr();return w.jsxs("div",{className:"d-flex justify-content-center align-items-center py-5",children:[w.jsx(qC,{animation:"border",variant:"primary"}),w.jsx("span",{className:"ms-3 text-muted-custom",children:e("loading")})]})}function zC(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,mO;function tB(){if(mO)return Yh;mO=1;var e=kf();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,yO;function Nf(){if(yO)return Qh;yO=1;var e=QL(),t=ZL(),r=JL(),n=eB(),i=tB();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 _B(t)&&!Au(t)},PB=function(t){return ke(t)},wt=function(t){return le(t)||Wi(t)},EB=0,_o=function(t){var r=++EB;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 Au(o)&&(o=n),i&&o>r&&(o=r),o},oi=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},AB=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 MB(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 Cg(e){"@babel/helpers - typeof";return Cg=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},Cg(e)}var HO={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":""},KO=null,Ov=null,gb=function e(t){if(t===KO&&Array.isArray(Ov))return Ov;var r=[];return C.Children.forEach(t,function(n){ke(n)||(xB.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Ov=r,KO=t,r};function fr(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return _n(i)}):n=[_n(t)],gb(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 VO=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)},$B=["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"],IB=function(t){return t&&t.type&&Wi(t.type)&&$B.indexOf(t.type)>=0},DB=function(t){return t&&Cg(t)==="object"&&"clipDot"in t},LB=function(t,r,n,i){var o,u=(o=Sv==null?void 0:Sv[i])!==null&&o!==void 0?o:[];return r.startsWith("data-")||!Ae(t)&&(i&&u.includes(r)||CB.includes(r))||n&&yb.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;LB((l=i)===null||l===void 0?void 0:l[u],u,r,n)&&(o[u]=i[u])}),o},kg=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 GO(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 UB(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 Rg(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=zB(e,qB),v=i||{width:r,height:n,x:0,y:0},p=Me("recharts-surface",o);return D.createElement("svg",Ng({},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 WB=["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 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}var qe=D.forwardRef(function(e,t){var r=e.children,n=e.className,i=HB(e,WB),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 Ev,ZO;function YC(){if(ZO)return Ev;ZO=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 Ev=f,Ev}var Av,JO;function XB(){if(JO)return Av;JO=1;function e(t){return t.split("")}return Av=e,Av}var jv,e_;function YB(){if(e_)return jv;e_=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+")*",E=x+O+g,A="(?:"+[v+l+"?",l,p,m,u].join("|")+")",j=RegExp(f+"(?="+f+")|"+A+E,"g");function T(_){return _.match(j)||[]}return jv=T,jv}var Tv,t_;function QB(){if(t_)return Tv;t_=1;var e=XB(),t=YC(),r=YB();function n(i){return t(i)?r(i):e(i)}return Tv=n,Tv}var Cv,r_;function ZB(){if(r_)return Cv;r_=1;var e=GB(),t=YC(),r=QB(),n=KC();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,n_;function JB(){if(n_)return kv;n_=1;var e=ZB(),t=e("toUpperCase");return kv=t,kv}var e3=JB();const $f=Ue(e3);function Qe(e){return function(){return e}}const QC=Math.cos,yc=Math.sin,Ur=Math.sqrt,gc=Math.PI,If=2*gc,$g=Math.PI,Ig=2*$g,$i=1e-6,t3=Ig-$i;function ZC(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ZC;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;i$i)if(!(Math.abs(p*f-d*v)>$i)||!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,E=Math.sqrt(x),A=Math.sqrt(m),j=o*Math.tan(($g-Math.acos((x+m-g)/(2*E*A)))/2),T=j/A,_=j/E;Math.abs(T-1)>$i&&this._append`L${t+T*v},${r+T*p}`,this._append`A${o},${o},0,0,${+(p*b>v*O)},${this._x1=t+_*f},${this._y1=r+_*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)>$i||Math.abs(this._y1-v)>$i)&&this._append`L${d},${v}`,n&&(m<0&&(m=m%Ig+Ig),m>t3?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>$i&&this._append`A${n},${n},0,${+(m>=$g)},${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 bb(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 n3(t)}function xb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function JC(e){this._context=e}JC.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 Df(e){return new JC(e)}function ek(e){return e[0]}function tk(e){return e[1]}function rk(e,t){var r=Qe(!0),n=null,i=Df,o=null,u=bb(l);e=typeof e=="function"?e:e===void 0?ek:Qe(e),t=typeof t=="function"?t:t===void 0?tk:Qe(t);function l(f){var d,v=(f=xb(f)).length,p,m=!1,b;for(n==null&&(o=i(b=u())),d=0;d<=v;++d)!(d=b;--O)l.point(j[O],T[O]);l.lineEnd(),l.areaEnd()}E&&(j[m]=+e(g,m,p),T[m]=+t(g,m,p),l.point(n?+n(g,m,p):j[m],r?+r(g,m,p):T[m]))}if(A)return l=null,A+""||null}function v(){return rk().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 nk{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 i3(e){return new nk(e,!0)}function a3(e){return new nk(e,!1)}const wb={draw(e,t){const r=Ur(t/gc);e.moveTo(r,0),e.arc(0,0,r,0,If)}},o3={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()}},ik=Ur(1/3),s3=ik*2,u3={draw(e,t){const r=Ur(t/s3),n=r*ik;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},l3={draw(e,t){const r=Ur(t),n=-r/2;e.rect(n,n,r,r)}},c3=.8908130915292852,ak=yc(gc/10)/yc(7*gc/10),f3=yc(If/10)*ak,d3=-QC(If/10)*ak,p3={draw(e,t){const r=Ur(t*c3),n=f3*r,i=d3*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const u=If*o/5,l=QC(u),f=yc(u);e.lineTo(f*r,-l*r),e.lineTo(l*n-f*i,f*n+l*i)}e.closePath()}},Nv=Ur(3),h3={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,Dg=1/Ur(12),v3=(Dg/2+1)*3,m3={draw(e,t){const r=Ur(t/v3),n=r/2,i=r*Dg,o=n,u=r*Dg+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 y3(e,t){let r=null,n=bb(i);e=typeof e=="function"?e:Qe(e||wb),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 bc(){}function xc(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 ok(e){this._context=e}ok.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:xc(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:xc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function g3(e){return new ok(e)}function sk(e){this._context=e}sk.prototype={areaStart:bc,areaEnd:bc,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:xc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function b3(e){return new sk(e)}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(){(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:xc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function x3(e){return new uk(e)}function lk(e){this._context=e}lk.prototype={areaStart:bc,areaEnd:bc,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 w3(e){return new lk(e)}function i_(e){return e<0?-1:1}function a_(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(i_(o)+i_(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(l))||0}function o_(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 wc(e){this._context=e}wc.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,o_(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,o_(this,r=a_(this,e,t)),r);break;default:Rv(this,this._t0,r=a_(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ck(e){this._context=new fk(e)}(ck.prototype=Object.create(wc.prototype)).point=function(e,t){wc.prototype.point.call(this,t,e)};function fk(e){this._context=e}fk.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 S3(e){return new wc(e)}function O3(e){return new ck(e)}function dk(e){this._context=e}dk.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=s_(e),i=s_(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 P3(e){return new Lf(e,.5)}function E3(e){return new Lf(e,0)}function A3(e){return new Lf(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 j3(e,t){return e[t]}function T3(e){const t=[];return t.key=e,t}function C3(){var e=Qe([]),t=Lg,r=Va,n=j3;function i(o){var u=Array.from(e.apply(this,arguments),T3),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 B3(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 pk={symbolCircle:wb,symbolCross:o3,symbolDiamond:u3,symbolSquare:l3,symbolStar:p3,symbolTriangle:h3,symbolWye:m3},F3=Math.PI/180,q3=function(t){var r="symbol".concat($f(t));return pk[r]||wb},z3=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*F3;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}},U3=function(t,r){pk["symbol".concat($f(t))]=r},Sb=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=L3(t,M3),d=l_(l_({},f),{},{type:n,size:o,sizeType:l}),v=function(){var g=q3(n),E=y3().type(g).size(z3(o,l,n));return E()},p=d.className,m=d.cx,b=d.cy,O=Se(d,!0);return m===+m&&b===+b&&o===+o?D.createElement("path",Bg({},O,{className:Me("recharts-symbols",p),transform:"translate(".concat(m,", ").concat(b,")"),d:v()})):null};Sb.registerSymbol=U3;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 Fg(){return Fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var A=b.inactive?d:b.color;return D.createElement("li",Fg({className:g,style:p,key:"legend-item-".concat(O)},Hi(n.props,b,O)),D.createElement(Rg,{width:u,height:u,viewBox:v,style:m},n.renderIcon(b)),D.createElement("span",{className:"recharts-legend-item-text",style:{color:A}},x?x(E,b,O):E))})}},{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);Us(Ob,"displayName","Legend");Us(Ob,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Mv,f_;function J3(){if(f_)return Mv;f_=1;var e=Nf();function t(){this.__data__=new e,this.size=0}return Mv=t,Mv}var $v,d_;function eF(){if(d_)return $v;d_=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return $v=e,$v}var Iv,p_;function tF(){if(p_)return Iv;p_=1;function e(t){return this.__data__.get(t)}return Iv=e,Iv}var Dv,h_;function rF(){if(h_)return Dv;h_=1;function e(t){return this.__data__.has(t)}return Dv=e,Dv}var Lv,v_;function nF(){if(v_)return Lv;v_=1;var e=Nf(),t=pb(),r=hb(),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 E=-1,A=!0,j=f&i?new e:void 0;for(p.set(u,l),p.set(l,u);++E-1&&n%1==0&&n-1&&r%1==0&&r<=e}return om=t,om}var sm,B_;function mF(){if(B_)return sm;B_=1;var e=$n(),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]",E="[object DataView]",A="[object Float32Array]",j="[object Float64Array]",T="[object Int8Array]",_="[object Int16Array]",P="[object Int32Array]",N="[object Uint8Array]",R="[object Uint8ClampedArray]",I="[object Uint16Array]",U="[object Uint32Array]",F={};F[A]=F[j]=F[T]=F[_]=F[P]=F[N]=F[R]=F[I]=F[U]=!0,F[n]=F[i]=F[g]=F[o]=F[E]=F[u]=F[l]=F[f]=F[d]=F[v]=F[p]=F[m]=F[b]=F[O]=F[x]=!1;function M(W){return r(W)&&t(W.length)&&!!F[e(W)]}return sm=M,sm}var um,F_;function Ok(){if(F_)return um;F_=1;function e(t){return function(r){return t(r)}}return um=e,um}var Ts={exports:{}};Ts.exports;var q_;function yF(){return q_||(q_=1,(function(e,t){var r=UC(),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,z_;function _k(){if(z_)return lm;z_=1;var e=mF(),t=Ok(),r=yF(),n=r&&r.isTypedArray,i=n?t(n):e;return lm=i,lm}var cm,U_;function gF(){if(U_)return cm;U_=1;var e=pF(),t=Pb(),r=Jt(),n=Sk(),i=Eb(),o=_k(),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):[],E=g.length;for(var A in d)(v||l.call(d,A))&&!(x&&(A=="length"||b&&(A=="offset"||A=="parent")||O&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||i(A,E)))&&g.push(A);return g}return cm=f,cm}var fm,W_;function bF(){if(W_)return fm;W_=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,H_;function Pk(){if(H_)return dm;H_=1;function e(t,r){return function(n){return t(r(n))}}return dm=e,dm}var pm,K_;function xF(){if(K_)return pm;K_=1;var e=Pk(),t=e(Object.keys,Object);return pm=t,pm}var hm,V_;function wF(){if(V_)return hm;V_=1;var e=bF(),t=xF(),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,G_;function ju(){if(G_)return vm;G_=1;var e=fb(),t=Ab();function r(n){return n!=null&&t(n.length)&&!e(n)}return vm=r,vm}var mm,X_;function Bf(){if(X_)return mm;X_=1;var e=gF(),t=wF(),r=ju();function n(i){return r(i)?e(i):t(i)}return mm=n,mm}var ym,Y_;function SF(){if(Y_)return ym;Y_=1;var e=lF(),t=dF(),r=Bf();function n(i){return e(i,r,t)}return ym=n,ym}var gm,Q_;function OF(){if(Q_)return gm;Q_=1;var e=SF(),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 E=m[g];if(!(p?E in u:n.call(u,E)))return!1}var A=v.get(o),j=v.get(u);if(A&&j)return A==u&&j==o;var T=!0;v.set(o,u),v.set(u,o);for(var _=p;++g-1}return Wm=t,Wm}var Hm,_P;function UF(){if(_P)return Hm;_P=1;function e(t,r,n){for(var i=-1,o=t==null?0:t.length;++i=u){var E=d?null:i(f);if(E)return o(E);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 iq(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 aq(e){return e.value}function oq(e,t){if(D.isValidElement(e))return D.cloneElement(e,t);if(typeof e=="function")return D.createElement(e,t);t.ref;var r=nq(t,XF);return D.createElement(Ob,r)}var NP=1,Pn=(function(e){function t(){var r;YF(this,t);for(var n=arguments.length,i=new Array(n),o=0;oNP||Math.abs(i.height-this.lastBoundingBox.height)>NP)&&(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}},oq(o,vn(vn({},this.props),{},{payload:Ck(v,d,aq)})))}}],[{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);Ff(Pn,"displayName","Legend");Ff(Pn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ym,RP;function sq(){if(RP)return Ym;RP=1;var e=Eu(),t=Pb(),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 Rk(){if(MP)return Qm;MP=1;var e=wk(),t=sq();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,$P;function uq(){if($P)return Zm;$P=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,IP;function lq(){if(IP)return Jm;IP=1;var e=uq(),t=e();return Jm=t,Jm}var ey,DP;function Mk(){if(DP)return ey;DP=1;var e=lq(),t=Bf();function r(n,i){return n&&e(n,i,t)}return ey=r,ey}var ty,LP;function cq(){if(LP)return ty;LP=1;var e=ju();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,WP;function hq(){if(WP)return sy;WP=1;var e=vb(),t=mb(),r=on(),n=$k(),i=fq(),o=Ok(),u=pq(),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,E){var A=e(p,function(j){return j(x)});return{criteria:A,index:++b,value:x}});return i(O,function(x,g){return u(x,g,m)})}return sy=d,sy}var uy,HP;function vq(){if(HP)return uy;HP=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,KP;function mq(){if(KP)return ly;KP=1;var e=vq(),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,QP;function xq(){if(QP)return hy;QP=1;var e=gq(),t=bq(),r=t(e);return hy=r,hy}var vy,ZP;function wq(){if(ZP)return vy;ZP=1;var e=Po(),t=mq(),r=xq();function n(i,o){return r(t(i,o,e),i+"")}return vy=n,vy}var my,JP;function qf(){if(JP)return my;JP=1;var e=db(),t=ju(),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,eE;function Sq(){if(eE)return yy;eE=1;var e=Rk(),t=hq(),r=wq(),n=qf(),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 Oq=Sq();const Cb=Ue(Oq);function Ws(e){"@babel/helpers - typeof";return Ws=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},Ws(e)}function Ug(){return Ug=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 Lq(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 Bq(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=nE({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:u.width,viewBox:f,viewBoxDimension:f.width}),p=nE({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:u.height,viewBox:f,viewBoxDimension:f.height}),d=Lq({translateX:v,translateY:p,useTranslate3d:l})):d=Iq,{cssProperties:d,cssClasses:Dq({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 iE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function aE(e){for(var t=1;toE||Math.abs(n.height-this.state.lastBoundingBox.height)>oE)&&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,E=i.viewBox,A=i.wrapperStyle,j=Bq({allowEscapeViewBox:u,coordinate:v,offsetTopLeft:b,position:O,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:E}),T=j.cssClasses,_=j.cssProperties,P=aE(aE({transition:m&&o?"transform ".concat(l,"ms ").concat(f):void 0},_),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&p?"visible":"hidden",position:"absolute",top:0,left:0},A);return D.createElement("div",{tabIndex:-1,className:T,style:P,ref:function(R){n.wrapperNode=R}},d)}}])})(C.PureComponent),Xq=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Zi={isSsr:Xq()};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 sE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uE(e){for(var t=1;t0;return D.createElement(Gq,{allowEscapeViewBox:u,animationDuration:l,animationEasing:f,isAnimationActive:m,active:o,coordinate:v,hasPayload:P,offset:b,position:g,reverseDirection:E,useTranslate3d:A,viewBox:j,wrapperStyle:T},az(d,uE(uE({},this.props),{},{payload:_})))}}])})(C.PureComponent);kb(qt,"displayName","Tooltip");kb(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,lE;function oz(){if(lE)return by;lE=1;var e=an(),t=function(){return e.Date.now()};return by=t,by}var xy,cE;function sz(){if(cE)return xy;cE=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,fE;function uz(){if(fE)return wy;fE=1;var e=sz(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return wy=r,wy}var Sy,dE;function qk(){if(dE)return Sy;dE=1;var e=uz(),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,pE;function lz(){if(pE)return Oy;pE=1;var e=pi(),t=oz(),r=qk(),n="Expected a function",i=Math.max,o=Math.min;function u(l,f,d){var v,p,m,b,O,x,g=0,E=!1,A=!1,j=!0;if(typeof l!="function")throw new TypeError(n);f=r(f)||0,e(d)&&(E=!!d.leading,A="maxWait"in d,m=A?i(r(d.maxWait)||0,f):m,j="trailing"in d?!!d.trailing:j);function T(W){var z=v,V=p;return v=p=void 0,g=W,b=l.apply(V,z),b}function _(W){return g=W,O=setTimeout(R,f),E?T(W):b}function P(W){var z=W-x,V=W-g,Y=f-z;return A?o(Y,m-V):Y}function N(W){var z=W-x,V=W-g;return x===void 0||z>=f||z<0||A&&V>=m}function R(){var W=t();if(N(W))return I(W);O=setTimeout(R,P(W))}function I(W){return O=void 0,j&&v?T(W):(v=p=void 0,b)}function U(){O!==void 0&&clearTimeout(O),g=0,v=x=p=O=void 0}function F(){return O===void 0?b:I(t())}function M(){var W=t(),z=N(W);if(v=arguments,p=this,x=W,z){if(O===void 0)return _(x);if(A)return clearTimeout(O),O=setTimeout(R,f),T(x)}return O===void 0&&(O=setTimeout(R,f)),b}return M.cancel=U,M.flush=F,M}return Oy=u,Oy}var _y,hE;function cz(){if(hE)return _y;hE=1;var e=lz(),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 fz=cz();const zk=Ue(fz);function Ks(e){"@babel/helpers - typeof";return Ks=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},Ks(e)}function vE(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 Zl(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(W=zk(W,x,{trailing:!0,leading:!1}));var z=new ResizeObserver(W),V=_.current.getBoundingClientRect(),Y=V.width,J=V.height;return F(Y,J),z.observe(_.current),function(){z.disconnect()}},[F,x]);var M=C.useMemo(function(){var W=I.containerWidth,z=I.containerHeight;if(W<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)?W: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,Zl({width:V,height:Y},J?{style:Zl({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",E),style:Zl(Zl({},T),{},{width:u,height:f,minWidth:v,minHeight:p,maxHeight:m}),ref:_},M)}),zf=function(t){return null};zf.displayName="Cell";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 yE(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 Vg(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Zi.isSsr)return{width:0,height:0};var n=Pz(r),i=JSON.stringify({text:t,copyStyle:n});if(Ta.widthCache[i])return Ta.widthCache[i];try{var o=document.getElementById(gE);o||(o=document.createElement("span"),o.setAttribute("id",gE),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var u=Vg(Vg({},_z),n);Object.assign(o.style,u),o.textContent="".concat(t);var l=o.getBoundingClientRect(),f={width:l.width,height:l.height};return Ta.widthCache[i]=f,++Ta.cacheCount>Oz&&(Ta.cacheCount=0,Ta.widthCache={}),f}catch{return{width:0,height:0}}},Ez=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Gs(e){"@babel/helpers - typeof";return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(e)}function Ec(e,t){return Cz(e)||Tz(e,t)||jz(e,t)||Az()}function Az(){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 jz(e,t){if(e){if(typeof e=="string")return bE(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 bE(e,t)}}function bE(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 Wz(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 PE(e,t){return Gz(e)||Vz(e,t)||Kz(e,t)||Hz()}function Hz(){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 EE(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 EE(e,t)}}function EE(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=Kk({breakAll:d,style:f,children:Y+x}).wordsWithComputedWidth,K=m(J),ee=K.length>u||O(K).width>Number(i);return[ee,K]},E=0,A=p.length-1,j=0,T;E<=A&&j<=p.length-1;){var _=Math.floor((E+A)/2),P=_-1,N=g(P),R=PE(N,2),I=R[0],U=R[1],F=g(_),M=PE(F,1),W=M[0];if(!I&&!W&&(E=_+1),I&&W&&(A=_-1),!I&&W){T=U;break}j++}return T||b},AE=function(t){var r=ke(t)?[]:t.toString().split(Hk);return[{words:r}]},Yz=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=Kk({breakAll:u,children:i,style:o});if(v){var p=v.wordsWithComputedWidth,m=v.spaceWidth;f=p,d=m}else return AE(i);return Xz({breakAll:u,children:i,maxLines:l,style:o},f,d,r,n)}return AE(i)},jE="#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,E=g===void 0?jE:g,A=_E(t,zz),j=C.useMemo(function(){return Yz({breakAll:A.breakAll,children:A.children,maxLines:A.maxLines,scaleToFit:p,style:A.style,width:A.width})},[A.breakAll,A.children,A.maxLines,p,A.style,A.width]),T=A.dx,_=A.dy,P=A.angle,N=A.className,R=A.breakAll,I=_E(A,Uz);if(!wt(n)||!wt(o))return null;var U=n+(le(T)?T:0),F=o+(le(_)?_:0),M;switch(x){case"start":M=Py("calc(".concat(d,")"));break;case"middle":M=Py("calc(".concat((j.length-1)/2," * -").concat(l," + (").concat(d," / 2))"));break;default:M=Py("calc(".concat(j.length-1," * -").concat(l,")"));break}var W=[];if(p){var z=j[0].width,V=A.width;W.push("scale(".concat((le(V)?V/z:1)/z,")"))}return P&&W.push("rotate(".concat(P,", ").concat(U,", ").concat(F,")")),W.length&&(I.transform=W.join(" ")),D.createElement("text",Gg({},Se(I,!0),{x:U,y:F,className:Me("recharts-text",N),textAnchor:b,fill:E.includes("url")?jE:E}),j.map(function(Y,J){var K=Y.words.join(R?"":" ");return D.createElement("tspan",{x:U,dy:J===0?M:l,key:"".concat(K,"-").concat(J)},K)}))};function ci(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function Qz(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Nb(e){let t,r,n;e.length!==2?(t=ci,r=(l,f)=>ci(e(l),f),n=(l,f)=>e(l)-f):(t=e===ci||e===Qz?e:Zz,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 Zz(){return 0}function Vk(e){return e===null?NaN:+e}function*Jz(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const eU=Nb(ci),Tu=eU.right;Nb(Vk).center;class TE extends Map{constructor(t,r=nU){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(CE(this,t))}has(t){return super.has(CE(this,t))}set(t,r){return super.set(tU(this,t),r)}delete(t){return super.delete(rU(this,t))}}function CE({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function tU({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function rU({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function nU(e){return e!==null&&typeof e=="object"?e.valueOf():e}function iU(e=ci){if(e===ci)return Gk;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 Gk(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const aU=Math.sqrt(50),oU=Math.sqrt(10),sU=Math.sqrt(2);function Ac(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>=aU?10:o>=oU?5:o>=sU?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 NE(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Xk(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?Gk:iU(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));Xk(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 uU(e,t,r){if(e=Float64Array.from(Jz(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return NE(e);if(t>=1)return kE(e);var n,i=(n-1)*t,o=Math.floor(i),u=kE(Xk(e,o).subarray(0,o+1)),l=NE(e.subarray(o+1));return u+(l-u)*(i-o)}}function lU(e,t,r=Vk){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 cU(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?ec(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ec(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=dU.exec(e))?new Zt(t[1],t[2],t[3],1):(t=pU.exec(e))?new Zt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=hU.exec(e))?ec(t[1],t[2],t[3],t[4]):(t=vU.exec(e))?ec(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mU.exec(e))?BE(t[1],t[2]/100,t[3]/100,1):(t=yU.exec(e))?BE(t[1],t[2]/100,t[3]/100,t[4]):RE.hasOwnProperty(e)?IE(RE[e]):e==="transparent"?new Zt(NaN,NaN,NaN,0):null}function IE(e){return new Zt(e>>16&255,e>>8&255,e&255,1)}function ec(e,t,r,n){return n<=0&&(e=t=r=NaN),new Zt(e,t,r,n)}function xU(e){return e instanceof Cu||(e=Zs(e)),e?(e=e.rgb(),new Zt(e.r,e.g,e.b,e.opacity)):new Zt}function Jg(e,t,r,n){return arguments.length===1?xU(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,Jg,Qk(Cu,{brighter(e){return e=e==null?jc:Math.pow(jc,e),new Zt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ys:Math.pow(Ys,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),Tc(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:DE,formatHex:DE,formatHex8:wU,formatRgb:LE,toString:LE}));function DE(){return`#${Bi(this.r)}${Bi(this.g)}${Bi(this.b)}`}function wU(){return`#${Bi(this.r)}${Bi(this.g)}${Bi(this.b)}${Bi((isNaN(this.opacity)?1:this.opacity)*255)}`}function LE(){const e=Tc(this.opacity);return`${e===1?"rgb(":"rgba("}${zi(this.r)}, ${zi(this.g)}, ${zi(this.b)}${e===1?")":`, ${e})`}`}function Tc(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 BE(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 Zk(e){if(e instanceof Br)return new Br(e.h,e.s,e.l,e.opacity);if(e instanceof Cu||(e=Zs(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 SU(e,t,r,n){return arguments.length===1?Zk(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,SU,Qk(Cu,{brighter(e){return e=e==null?jc:Math.pow(jc,e),new Br(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ys:Math.pow(Ys,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(Ey(e>=240?e-240:e+120,i,n),Ey(e,i,n),Ey(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Br(FE(this.h),tc(this.s),tc(this.l),Tc(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=Tc(this.opacity);return`${e===1?"hsl(":"hsla("}${FE(this.h)}, ${tc(this.s)*100}%, ${tc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FE(e){return e=(e||0)%360,e<0?e+360:e}function tc(e){return Math.max(0,Math.min(1,e||0))}function Ey(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 $b=e=>()=>e;function OU(e,t){return function(r){return e+r*t}}function _U(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 PU(e){return(e=+e)==1?Jk:function(t,r){return r-t?_U(t,r,e):$b(isNaN(t)?r:t)}}function Jk(e,t){var r=t-e;return r?OU(e,r):$b(isNaN(e)?t:e)}const qE=(function e(t){var r=PU(t);function n(i,o){var u=r((i=Jg(i)).r,(o=Jg(o)).r),l=r(i.g,o.g),f=r(i.b,o.b),d=Jk(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 EU(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:Cc(n,i)})),r=Ay.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function DU(e,t,r){var n=e[0],i=e[1],o=t[0],u=t[1];return i2?LU:DU,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),Cc)))(m)))},p.domain=function(m){return arguments.length?(e=Array.from(m,kc),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=Ib,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 Db(){return Uf()(Wt,Wt)}function BU(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Nc(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=Nc(Math.abs(e)),e?e[1]:NaN}function FU(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 qU(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var zU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Js(e){if(!(t=zU.exec(e)))throw new Error("invalid format: "+e);var t;return new Lb({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]})}Js.prototype=Lb.prototype;function Lb(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+""}Lb.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 UU(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 Rc;function WU(e,t){var r=Nc(e,t);if(!r)return Rc=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(Rc=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")+Nc(e,Math.max(0,t+o-1))[0]}function UE(e,t){var r=Nc(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 WE={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:BU,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)=>UE(e*100,t),r:UE,s:WU,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function HE(e){return e}var KE=Array.prototype.map,VE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function HU(e){var t=e.grouping===void 0||e.thousands===void 0?HE:FU(KE.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?HE:qU(KE.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=Js(p);var b=p.fill,O=p.align,x=p.sign,g=p.symbol,E=p.zero,A=p.width,j=p.comma,T=p.precision,_=p.trim,P=p.type;P==="n"?(j=!0,P="g"):WE[P]||(T===void 0&&(T=12),_=!0,P="g"),(E||b==="0"&&O==="=")&&(E=!0,b="0",O="=");var N=(m&&m.prefix!==void 0?m.prefix:"")+(g==="$"?r:g==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():""),R=(g==="$"?n:/[%p]/.test(P)?u:"")+(m&&m.suffix!==void 0?m.suffix:""),I=WE[P],U=/[defgprs%]/.test(P);T=T===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function F(M){var W=N,z=R,V,Y,J;if(P==="c")z=I(M)+z,M="";else{M=+M;var K=M<0||1/M<0;if(M=isNaN(M)?f:I(Math.abs(M),T),_&&(M=UU(M)),K&&+M==0&&x!=="+"&&(K=!1),W=(K?x==="("?x:l:x==="-"||x==="("?"":x)+W,z=(P==="s"&&!isNaN(M)&&Rc!==void 0?VE[8+Rc/3]:"")+z+(K&&x==="("?")":""),U){for(V=-1,Y=M.length;++VJ||J>57){z=(J===46?i+M.slice(V+1):M.slice(V))+z,M=M.slice(0,V);break}}}j&&!E&&(M=t(M,1/0));var ee=W.length+M.length+z.length,Z=ee>1)+W+M+z+Z.slice(ee);break;default:M=Z+W+M+z;break}return o(M)}return F.toString=function(){return p+""},F}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=Js(p),p.type="f",p),{suffix:VE[8+b/3]});return function(g){return x(O*g)}}return{format:d,formatPrefix:v}}var rc,Bb,eN;KU({thousands:",",grouping:[3],currency:["$",""]});function KU(e){return rc=HU(e),Bb=rc.format,eN=rc.formatPrefix,rc}function VU(e){return Math.max(0,-Za(Math.abs(e)))}function GU(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Za(t)/3)))*3-Za(Math.abs(e)))}function XU(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Za(t)-Za(e))+1}function tN(e,t,r,n){var i=Qg(e,t,r),o;switch(n=Js(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=GU(i,u))&&(n.precision=o),eN(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=XU(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=VU(i))&&(n.precision=o-(n.type==="%")*2);break}}return Bb(n)}function hi(e){var t=e.domain;return e.ticks=function(r){var n=t();return Xg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return tN(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=Yg(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 Mc(){var e=Db();return e.copy=function(){return ku(e,Mc())},Pr.apply(e,arguments),hi(e)}function rN(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,kc),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return rN(e).unknown(t)},e=arguments.length?Array.from(e,kc):[0,1],hi(r)}function nN(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 e4(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 YE(e){return(t,r)=>-e(-t,r)}function Fb(e){const t=e(GE,XE),r=t.domain;let n=10,i,o;function u(){return i=e4(n),o=JU(n),r()[0]<0?(i=YE(i),o=YE(o),e(YU,QU)):e(GE,XE),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;E.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;E.push(x)}E.length*2{if(l==null&&(l=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Js(f)).precision==null&&(f.trim=!0),f=Bb(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(nN(r(),{floor:l=>o(Math.floor(i(l))),ceil:l=>o(Math.ceil(i(l)))})),t}function iN(){const e=Fb(Uf()).domain([1,10]);return e.copy=()=>ku(e,iN()).base(e.base()),Pr.apply(e,arguments),e}function QE(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ZE(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function qb(e){var t=1,r=e(QE(t),ZE(t));return r.constant=function(n){return arguments.length?e(QE(t=+n),ZE(t)):t},hi(r)}function aN(){var e=qb(Uf());return e.copy=function(){return ku(e,aN()).constant(e.constant())},Pr.apply(e,arguments)}function JE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function t4(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function r4(e){return e<0?-e*e:e*e}function zb(e){var t=e(Wt,Wt),r=1;function n(){return r===1?e(Wt,Wt):r===.5?e(t4,r4):e(JE(r),JE(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},hi(t)}function Ub(){var e=zb(Uf());return e.copy=function(){return ku(e,Ub()).exponent(e.exponent())},Pr.apply(e,arguments),e}function n4(){return Ub.apply(null,arguments).exponent(.5)}function eA(e){return Math.sign(e)*e*e}function i4(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function oN(){var e=Db(),t=[0,1],r=!1,n;function i(o){var u=i4(e(o));return isNaN(u)?n:r?Math.round(u):u}return i.invert=function(o){return e.invert(eA(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,kc)).map(eA)),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 oN(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Pr.apply(i,arguments),hi(i)}function sN(){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 uN().domain([e,t]).range(i).unknown(o)},Pr.apply(hi(u),arguments)}function lN(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[Tu(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 lN().domain(e).range(t).unknown(r)},Pr.apply(i,arguments)}const jy=new Date,Ty=new Date;function St(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(dSt(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)=>(jy.setTime(+o),Ty.setTime(+u),e(jy),e(Ty),Math.floor(r(jy,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 $c=St(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$c.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?St(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):$c);$c.range;const xn=1e3,Or=xn*60,wn=Or*60,Tn=wn*24,Wb=Tn*7,tA=Tn*30,Cy=Tn*365,Fi=St(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*xn)},(e,t)=>(t-e)/xn,e=>e.getUTCSeconds());Fi.range;const Hb=St(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xn)},(e,t)=>{e.setTime(+e+t*Or)},(e,t)=>(t-e)/Or,e=>e.getMinutes());Hb.range;const Kb=St(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Or)},(e,t)=>(t-e)/Or,e=>e.getUTCMinutes());Kb.range;const Vb=St(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xn-e.getMinutes()*Or)},(e,t)=>{e.setTime(+e+t*wn)},(e,t)=>(t-e)/wn,e=>e.getHours());Vb.range;const Gb=St(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*wn)},(e,t)=>(t-e)/wn,e=>e.getUTCHours());Gb.range;const Nu=St(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Or)/Tn,e=>e.getDate()-1);Nu.range;const Wf=St(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Tn,e=>e.getUTCDate()-1);Wf.range;const cN=St(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Tn,e=>Math.floor(e/Tn));cN.range;function Ji(e){return St(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())*Or)/Wb)}const Hf=Ji(0),Ic=Ji(1),a4=Ji(2),o4=Ji(3),Ja=Ji(4),s4=Ji(5),u4=Ji(6);Hf.range;Ic.range;a4.range;o4.range;Ja.range;s4.range;u4.range;function ea(e){return St(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)/Wb)}const Kf=ea(0),Dc=ea(1),l4=ea(2),c4=ea(3),eo=ea(4),f4=ea(5),d4=ea(6);Kf.range;Dc.range;l4.range;c4.range;eo.range;f4.range;d4.range;const Xb=St(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());Xb.range;const Yb=St(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());Yb.range;const Cn=St(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());Cn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:St(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)});Cn.range;const kn=St(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());kn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:St(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)});kn.range;function fN(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,Or],[o,5,5*Or],[o,15,15*Or],[o,30,30*Or],[i,1,wn],[i,3,3*wn],[i,6,6*wn],[i,12,12*wn],[n,1,Tn],[n,2,2*Tn],[r,1,Wb],[t,1,tA],[t,3,3*tA],[e,1,Cy]];function l(d,v,p){const m=vg).right(u,m);if(b===u.length)return e.every(Qg(d/Cy,v/Cy,p));if(b===0)return $c.every(Math.max(Qg(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?Dc.ceil(Ne):Dc(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?Ic.ceil(Ne):Ic(Ne),Ne=Nu.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=_[Je in rA?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 U(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 F(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 M(ae,ge,Te){var ne=E.exec(ge.slice(Te));return ne?(ae.m=A.get(ne[0].toLowerCase()),Te+ne[0].length):-1}function W(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 je(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var ge=P(ae+="",j);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=P(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 rA={"-":"",_:" ",0:"0"},jt=/^\s*\d+/,g4=/^%/,b4=/[\\^$*+?|[\]().{}]/g;function ze(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[t.toLowerCase(),r]))}function w4(e,t,r){var n=jt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function S4(e,t,r){var n=jt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function O4(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function _4(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function P4(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function nA(e,t,r){var n=jt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function iA(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function E4(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 A4(e,t,r){var n=jt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function j4(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function aA(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function T4(e,t,r){var n=jt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function oA(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function C4(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function k4(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function N4(e,t,r){var n=jt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function R4(e,t,r){var n=jt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function M4(e,t,r){var n=g4.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function $4(e,t,r){var n=jt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function I4(e,t,r){var n=jt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function sA(e,t){return ze(e.getDate(),t,2)}function D4(e,t){return ze(e.getHours(),t,2)}function L4(e,t){return ze(e.getHours()%12||12,t,2)}function B4(e,t){return ze(1+Nu.count(Cn(e),e),t,3)}function dN(e,t){return ze(e.getMilliseconds(),t,3)}function F4(e,t){return dN(e,t)+"000"}function q4(e,t){return ze(e.getMonth()+1,t,2)}function z4(e,t){return ze(e.getMinutes(),t,2)}function U4(e,t){return ze(e.getSeconds(),t,2)}function W4(e){var t=e.getDay();return t===0?7:t}function H4(e,t){return ze(Hf.count(Cn(e)-1,e),t,2)}function pN(e){var t=e.getDay();return t>=4||t===0?Ja(e):Ja.ceil(e)}function K4(e,t){return e=pN(e),ze(Ja.count(Cn(e),e)+(Cn(e).getDay()===4),t,2)}function V4(e){return e.getDay()}function G4(e,t){return ze(Ic.count(Cn(e)-1,e),t,2)}function X4(e,t){return ze(e.getFullYear()%100,t,2)}function Y4(e,t){return e=pN(e),ze(e.getFullYear()%100,t,2)}function Q4(e,t){return ze(e.getFullYear()%1e4,t,4)}function Z4(e,t){var r=e.getDay();return e=r>=4||r===0?Ja(e):Ja.ceil(e),ze(e.getFullYear()%1e4,t,4)}function J4(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ze(t/60|0,"0",2)+ze(t%60,"0",2)}function uA(e,t){return ze(e.getUTCDate(),t,2)}function e8(e,t){return ze(e.getUTCHours(),t,2)}function t8(e,t){return ze(e.getUTCHours()%12||12,t,2)}function r8(e,t){return ze(1+Wf.count(kn(e),e),t,3)}function hN(e,t){return ze(e.getUTCMilliseconds(),t,3)}function n8(e,t){return hN(e,t)+"000"}function i8(e,t){return ze(e.getUTCMonth()+1,t,2)}function a8(e,t){return ze(e.getUTCMinutes(),t,2)}function o8(e,t){return ze(e.getUTCSeconds(),t,2)}function s8(e){var t=e.getUTCDay();return t===0?7:t}function u8(e,t){return ze(Kf.count(kn(e)-1,e),t,2)}function vN(e){var t=e.getUTCDay();return t>=4||t===0?eo(e):eo.ceil(e)}function l8(e,t){return e=vN(e),ze(eo.count(kn(e),e)+(kn(e).getUTCDay()===4),t,2)}function c8(e){return e.getUTCDay()}function f8(e,t){return ze(Dc.count(kn(e)-1,e),t,2)}function d8(e,t){return ze(e.getUTCFullYear()%100,t,2)}function p8(e,t){return e=vN(e),ze(e.getUTCFullYear()%100,t,2)}function h8(e,t){return ze(e.getUTCFullYear()%1e4,t,4)}function v8(e,t){var r=e.getUTCDay();return e=r>=4||r===0?eo(e):eo.ceil(e),ze(e.getUTCFullYear()%1e4,t,4)}function m8(){return"+0000"}function lA(){return"%"}function cA(e){return+e}function fA(e){return Math.floor(+e/1e3)}var Ca,mN,yN;y8({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 y8(e){return Ca=y4(e),mN=Ca.format,Ca.parse,yN=Ca.utcFormat,Ca.utcParse,Ca}function g8(e){return new Date(e)}function b8(e){return e instanceof Date?+e:+new Date(+e)}function Qb(e,t,r,n,i,o,u,l,f,d){var v=Db(),p=v.invert,m=v.domain,b=d(".%L"),O=d(":%S"),x=d("%I:%M"),g=d("%I %p"),E=d("%a %d"),A=d("%b %d"),j=d("%B"),T=d("%Y");function _(P){return(f(P)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>uU(e,o/n))},r.copy=function(){return wN(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 My=e,My}var $y,vA;function _8(){if(vA)return $y;vA=1;var e=Xf(),t=PN(),r=Po();function n(i){return i&&i.length?e(i,r,t):void 0}return $y=n,$y}var P8=_8();const Yf=Ue(P8);var Iy,mA;function EN(){if(mA)return Iy;mA=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 En(this,new this.constructor(e))};pe.dividedToIntegerBy=pe.idiv=function(e){var t=this,r=t.constructor;return Ge(En(t,new r(e),0,1),r.precision)};pe.equals=pe.eq=function(e){return!this.cmp(e)};pe.exponent=function(){return vt(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(_r+"NaN");if(r.s<1)throw Error(_r+(r.s?"NaN":"-Infinity"));return r.eq(lr)?new n(0):(it=!1,t=En(eu(r,o),eu(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?CN(t,e):jN(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(_r+"NaN");return r.s?(it=!1,t=En(r,e,0,1).times(e),it=!0,r.minus(t)):Ge(new n(r),i)};pe.naturalExponential=pe.exp=function(){return TN(this)};pe.naturalLogarithm=pe.ln=function(){return eu(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?jN(t,e):CN(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=vt(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(_r+"NaN")}for(e=vt(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=jo((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(En(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:(tn(e,0,Ao),t===void 0?t=n.rounding:tn(t,0,8),Ge(r,e+vt(r)+1,t))};pe.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Vi(n,!0):(tn(e,0,Ao),t===void 0?t=i.rounding:tn(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):(tn(e,0,Ao),t===void 0?t=o.rounding:tn(t,0,8),n=Ge(new o(i),e+vt(i)+1,t),r=Vi(n.abs(),!1,e+vt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};pe.toInteger=pe.toint=function(){var e=this,t=e.constructor;return Ge(new t(e),vt(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(_r+"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)<=AN){for(i=new f(lr),t=Math.ceil(n/rt+4),it=!1;r%2&&(i=i.times(l),SA(i.d,t)),r=jo(r/2),r!==0;)l=l.times(l),SA(l.d,t);return it=!0,e.s<0?new f(lr).div(i):Ge(i,n)}}else if(o<0)throw Error(_r+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,it=!1,i=e.times(eu(l,n+d)),it=!0,i=TN(i),i.s=o,i};pe.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=vt(i),n=Vi(i,r<=o.toExpNeg||r>=o.toExpPos)):(tn(e,1,Ao),t===void 0?t=o.rounding:tn(t,0,8),i=Ge(new o(i),e,t),r=vt(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):(tn(e,1,Ao),t===void 0?t=n.rounding:tn(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=vt(e),r=e.constructor;return Vi(e,t<=r.toExpNeg||t>=r.toExpPos)};function jN(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 tn(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,E,A,j,T,_,P,N,R,I=n.constructor,U=n.s==i.s?1:-1,F=n.d,M=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(_r+"Division by zero");for(f=n.e-i.e,N=M.length,_=F.length,b=new I(U),O=b.d=[],d=0;M[d]==(F[d]||0);)++d;if(M[d]>(F[d]||0)&&--f,o==null?A=o=I.precision:u?A=o+(vt(n)-vt(i))+1:A=o,A<0)return new I(0);if(A=A/rt+2|0,d=0,N==1)for(v=0,M=M[0],A++;(d<_||v)&&A--;d++)j=v*Et+(F[d]||0),O[d]=j/M|0,v=j%M|0;else{for(v=Et/(M[0]+1)|0,v>1&&(M=e(M,v),F=e(F,v),N=M.length,_=F.length),T=N,x=F.slice(0,N),g=x.length;g=Et/2&&++P;do v=0,l=t(M,x,N,g),l<0?(E=x[0],N!=g&&(E=E*Et+(x[1]||0)),v=E/P|0,v>1?(v>=Et&&(v=Et-1),p=e(M,v),m=p.length,g=x.length,l=t(p,x,m,g),l==1&&(v--,r(p,N16)throw Error(ex+vt(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(En(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 vt(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(_r+"LN10 precision limit exceeded");return Ge(new e(e.LN10),t)}function ai(e){for(var t="";e--;)t+="0";return t}function eu(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(_r+(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=vt(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=vt(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=eu(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=En(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(En(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=En(l,new x(p),d),x.precision=g,t==null?(it=!0,Ge(l,g)):l;l=f,i+=2}}function wA(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=jo(r/rt),e.d=[],n=(r+1)%rt,r<0&&(n+=rt),nLc||e.e<-Lc))throw Error(ex+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=vt(e),p.length=1,t=t-o-1,p[0]=Ii(10,(rt-t%rt)%rt),e.e=jo(-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>Lc||e.e<-Lc))throw Error(ex+vt(e));return e}function CN(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)+ai(n):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ai(-i-1)+o,r&&(n=r-u)>0&&(o+=ai(n))):i>=u?(o+=ai(i+1-u),r&&(n=r-i-1)>0&&(o=o+"."+ai(n))):((n=i+1)0&&(i+1===u&&(o+="."),o+=ai(n))),e.s<0?"-"+o:o}function SA(e,t){if(e.length>t)return e.length=t,!0}function kN(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 wA(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,$8.test(o))wA(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=kN,i.config=i.set=I8,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 tx=kN(M8);lr=new tx(1);const Ve=tx;function D8(e){return q8(e)||F8(e)||B8(e)||L8()}function L8(){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 B8(e,t){if(e){if(typeof e=="string")return r0(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 r0(e,t)}}function F8(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function q8(e){if(Array.isArray(e))return r0(e)}function r0(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,OA(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 r6(e){if(Array.isArray(e))return e}function IN(e){var t=tu(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]}function DN(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 n6(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=H8(W8(function(f){return i.add(new Ve(f-u).mul(n)).toNumber()}),n0);return l(0,t)}function LN(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=DN(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?LN(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 i6(e){var t=tu(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=IN([r,n]),f=tu(l,2),d=f[0],v=f[1];if(d===-1/0||v===1/0){var p=v===1/0?[d].concat(a0(n0(0,i-1).map(function(){return 1/0}))):[].concat(a0(n0(0,i-1).map(function(){return-1/0})),[v]);return r>n?i0(p):p}if(d===v)return n6(d,i,o);var m=LN(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?i0(g):g}function a6(e,t){var r=tu(e,2),n=r[0],i=r[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=IN([n,i]),l=tu(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=DN(new Ve(d).sub(f).div(v-1),o,0),m=[].concat(a0(Jf.rangeStep(new Ve(f),new Ve(d).sub(new Ve(.99).mul(p)),p)),[d]);return n>i?i0(m):m}var o6=MN(i6),s6=MN(a6),u6="Invariant failed";function Gi(e,t){throw new Error(u6)}var l6=["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 Bc(){return Bc=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 m6(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 y6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g6(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 E=[Math.min(p,(b+p)/2),Math.max(p,(b+p)/2)];if(t>E[0]&&t<=E[1]||t>=O[0]&&t<=O[1]){u=i[d].index;break}}else{var A=Math.min(v,m),j=Math.max(v,m);if(t>(A+p)/2&&t<=(j+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},rx=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},$6=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(E&&E.length){var A=E[0].type.defaultProps,j=A!==void 0?lt(lt({},A),E[0].props):E[0].props,T=j.barSize,_=j[g];u[_]||(u[_]=[]);var P=ke(T)?r:T;u[_].push({item:E[0],stackList:E.slice(1),barSize:ke(P)?void 0:Ut(P,n,0)})}}return u},I6=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,_){return T+_.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,_){var P={item:_.item,position:{offset:g.offset+g.size+d,size:m?b:_.barSize}},N=[].concat(EA(T),[P]);return g=N[N.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(R){N.push({item:R,position:g})}),N},p)}else{var E=Ut(n,i,0,!0);i-2*E-(f-1)*d<=0&&(d=0);var A=(i-2*E-(f-1)*d)/f;A>1&&(A>>=0);var j=l===+l?Math.min(A,l):A;v=u.reduce(function(T,_,P){var N=[].concat(EA(T),[{item:_.item,position:{offset:E+(A+d)*P+(A-j)/2,size:j}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(R){N.push({item:R,position:N[N.length-1].position})}),N},p)}return v},D6=function(t,r,n,i){var o=n.children,u=n.width,l=n.margin,f=u-(l.left||0)-(l.right||0),d=zN({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),{},Wa({},b,t[b]+(p||0)));if((x==="horizontal"||x==="vertical"&&b==="center")&&O!=="middle"&&le(t[O]))return lt(lt({},t),{},Wa({},O,t[O]+(m||0)))}return t},L6=function(t,r,n){return ke(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},UN=function(t,r,n,i,o){var u=r.props.children,l=fr(u,Mu).filter(function(d){return L6(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=xt(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=xt(v,x,0),E=m[0]-Math.abs(Array.isArray(g)?g[0]:g),A=m[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(E,O[0]),Math.max(A,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},B6=function(t,r,n,i,o){var u=r.map(function(l){return UN(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},WN=function(t,r,n,i,o){var u=r.map(function(f){var d=f.props.dataKey;return n==="number"&&d&&UN(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!Au(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,nc=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},VN=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:Xs(),realScaleType:"band"}:u==="radial"&&l==="angleAxis"?{scale:Mc(),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:Xs(),realScaleType:"band"}:{scale:Mc(),realScaleType:"linear"};if(Wi(i)){var f="scale".concat($f(i));return{scale:(dA[f]||Ns)(),realScaleType:dA[f]?f:"point"}}return Ae(i)?{scale:i}:{scale:Ns(),realScaleType:"point"}},jA=1e-4,GN=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])-jA,u=Math.max(i[0],i[1])+jA,l=t(r[0]),f=t(r[n-1]);(lu||fu)&&t.domain([r[0],r[n-1]])}},F6=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])}},U6=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)}},W6={sign:z6,expand:k3,none:Va,silhouette:N3,wiggle:R3,positive:U6},H6=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),o=W6[n],u=C3().keys(i).value(function(l,f){return+xt(l,f,0)}).order(Lg).offset(o);return u(t)},K6=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 E=O[n],A=p[E]||{hasStack:!1,stackGroups:{}};if(wt(x)){var j=A.stackGroups[x]||{numericAxisId:n,cateAxisId:i,items:[]};j.items.push(m),A.hasStack=!0,A.stackGroups[x]=j}else A.stackGroups[_o("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[m]};return lt(lt({},p),{},Wa({},E,A))},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 E=b.stackGroups[g];return lt(lt({},x),{},Wa({},g,{numericAxisId:n,cateAxisId:i,items:E.items,stackedData:H6(t,E.items,o)}))},O)}return lt(lt({},p),{},Wa({},m,b))},v)},XN=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=o6(d,o,l);return t.domain([Qf(v),Yf(v)]),{niceTicks:v}}if(o&&i==="number"){var p=t.domain(),m=s6(p,o,l);return{niceTicks:m}}return null};function TA(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=vc(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var f=xt(i,ke(u)?t.dataKey:u);return ke(f)?null:t.scale(f)}var CA=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=xt(u,r.dataKey,r.domain[l]);return ke(f)?null:r.scale(f)-o/2+i},V6=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]},G6=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(wt(o)){var u=r[o];if(u){var l=u.items.indexOf(t);return l>=0?u.stackedData[l]:null}}return null},X6=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])},YN=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=X6(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})},kA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,NA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,l0=function(t,r,n){if(Ae(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(kA.test(t[0])){var o=+kA.exec(t[0])[1];i[0]=r[0]-o}else Ae(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(NA.test(t[1])){var u=+NA.exec(t[1])[1];i[1]=r[1]+u}else Ae(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},qc=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=Cb(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},i5=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=JN(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,E){var A=r[E],j=A.domain,T=A.reversed,_;if(ke(A.range))i==="angleAxis"?_=[f,d]:i==="radiusAxis"&&(_=[b,O]),T&&(_=[_[1],_[0]]);else{_=A.range;var P=_,N=Z6(P,2);f=N[0],d=N[1]}var R=VN(A,o),I=R.realScaleType,U=R.scale;U.domain(j).range(_),GN(U);var F=XN(U,mn(mn({},A),{},{realScaleType:I})),M=mn(mn(mn({},A),F),{},{range:_,radius:O,realScaleType:I,scale:U,cx:v,cy:p,innerRadius:b,outerRadius:O,startAngle:f,endAngle:d});return mn(mn({},g),{},ZN({},E,M))},{})},a5=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))},o5=function(t,r){var n=t.x,i=t.y,o=r.cx,u=r.cy,l=a5({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:n5(d),angleInRadian:d}},s5=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}},u5=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},IA=function(t,r){var n=t.x,i=t.y,o=o5({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=s5(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?mn(mn({},r),{},{radius:u,angle:u5(b,r)}):null},eR=function(t){return!C.isValidElement(t)&&!Ae(t)&&typeof t!="boolean"?t.className:""};function au(e){"@babel/helpers - typeof";return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(e)}var l5=["offset"];function c5(e){return h5(e)||p5(e)||d5(e)||f5()}function f5(){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 d5(e,t){if(e){if(typeof e=="string")return c0(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 c0(e,t)}}function p5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function h5(e){if(Array.isArray(e))return c0(e)}function c0(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 m5(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 DA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t=0?1:-1,j,T;i==="insideStart"?(j=b+A*u,T=x):i==="insideEnd"?(j=O-A*u,T=!x):i==="end"&&(j=O+A*u,T=x),T=E<=0?T:!T;var _=Ze(d,v,g,j),P=Ze(d,v,g,j+(T?1:-1)*359),N="M".concat(_.x,",").concat(_.y,` A`).concat(g,",").concat(g,",0,1,").concat(T?0:1,`, `).concat(P.x,",").concat(P.y),R=ke(t.id)?_o("recharts-radial-line-"):t.id;return D.createElement("text",ou({},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))},O5=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,E=Ze(u,l,g,m),A=E.x,j=E.y;return{x:A,y:j,textAnchor:"middle",verticalAnchor:"middle"}},_5=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,E=x>0?"end":"start",A=x>0?"start":"end";if(o==="top"){var j={x:l+d/2,y:f-p*i,textAnchor:"middle",verticalAnchor:b};return bt(bt({},j),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 bt(bt({},T),n?{height:Math.max(n.y+n.height-(f+v),0),width:d}:{})}if(o==="left"){var _={x:l-g,y:f+v/2,textAnchor:E,verticalAnchor:"middle"};return bt(bt({},_),n?{width:Math.max(_.x-n.x,0),height:v}:{})}if(o==="right"){var P={x:l+d+g,y:f+v/2,textAnchor:A,verticalAnchor:"middle"};return bt(bt({},P),n?{width:Math.max(n.x+n.width-P.x,0),height:v}:{})}var N=n?{width:d,height:v}:{};return o==="insideLeft"?bt({x:l+g,y:f+v/2,textAnchor:A,verticalAnchor:"middle"},N):o==="insideRight"?bt({x:l+d-g,y:f+v/2,textAnchor:E,verticalAnchor:"middle"},N):o==="insideTop"?bt({x:l+d/2,y:f+m,textAnchor:"middle",verticalAnchor:O},N):o==="insideBottom"?bt({x:l+d/2,y:f+v-m,textAnchor:"middle",verticalAnchor:b},N):o==="insideTopLeft"?bt({x:l+g,y:f+m,textAnchor:A,verticalAnchor:O},N):o==="insideTopRight"?bt({x:l+d-g,y:f+m,textAnchor:E,verticalAnchor:O},N):o==="insideBottomLeft"?bt({x:l+g,y:f+v-m,textAnchor:A,verticalAnchor:b},N):o==="insideBottomRight"?bt({x:l+d-g,y:f+v-m,textAnchor:E,verticalAnchor:b},N):Oo(o)&&(le(o.x)||Li(o.x))&&(le(o.y)||Li(o.y))?bt({x:l+Ut(o.x,d),y:f+Ut(o.y,v),textAnchor:"end",verticalAnchor:"end"},N):bt({x:l+d/2,y:f+v/2,textAnchor:"middle",verticalAnchor:"middle"},N)},P5=function(t){return"cx"in t&&le(t.cx)};function At(e){var t=e.offset,r=t===void 0?5:t,n=v5(e,l5),i=bt({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)&&!Ae(d))return null;if(C.isValidElement(d))return C.cloneElement(d,i);var b;if(Ae(d)){if(b=C.createElement(d,i),C.isValidElement(b))return b}else b=x5(i);var O=P5(o),x=Se(i,!0);if(O&&(u==="insideStart"||u==="insideEnd"||u==="end"))return S5(i,b,x);var g=O?O5(i):_5(i);return D.createElement(Ki,ou({className:Me("recharts-label",p)},x,g,{breakAll:m}),b)}At.displayName="Label";var tR=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,E=t.clockWise,A=t.labelViewBox;if(A)return A;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:E}:t.viewBox?t.viewBox:{}},E5=function(t,r){return t?t===!0?D.createElement(At,{key:"label-implicit",viewBox:r}):wt(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}):Ae(t)?D.createElement(At,{key:"label-implicit",content:t,viewBox:r}):Oo(t)?D.createElement(At,ou({viewBox:r},t,{key:"label-implicit"})):null:null},A5=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=tR(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=E5(t.label,r||o);return[l].concat(c5(u))};At.parseViewBox=tR;At.renderCallByParent=A5;var Uy,LA;function j5(){if(LA)return Uy;LA=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Uy=e,Uy}var T5=j5();const C5=Ue(T5);function su(e){"@babel/helpers - typeof";return su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},su(e)}var k5=["valueAccessor"],N5=["data","dataKey","clockWise","id","textBreakAll"];function R5(e){return D5(e)||I5(e)||$5(e)||M5()}function M5(){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 $5(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 I5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function D5(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 q5(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 z5=function(t){return Array.isArray(t.value)?C5(t.value):t.value};function An(e){var t=e.valueAccessor,r=t===void 0?z5:t,n=qA(e,k5),i=n.data,o=n.dataKey,u=n.clockWise,l=n.id,f=n.textBreakAll,d=qA(n,N5);return!i||!i.length?null:D.createElement(qe,{className:"recharts-label-list"},i.map(function(v,p){var m=ke(o)?r(v,p):xt(v&&v.payload,o),b=ke(l)?{}:{id:"".concat(l,"-").concat(p)};return D.createElement(At,Uc({},Se(v,!0),d,b,{parentViewBox:v.parentViewBox,value:m,textBreakAll:f,viewBox:At.parseViewBox(ke(u)?v:FA(FA({},v),{},{clockWise:u})),key:"label-".concat(p),index:p}))}))}An.displayName="LabelList";function U5(e,t){return e?e===!0?D.createElement(An,{key:"labelList-implicit",data:t}):D.isValidElement(e)||Ae(e)?D.createElement(An,{key:"labelList-implicit",data:t,content:e}):Oo(e)?D.createElement(An,Uc({data:t},e,{key:"labelList-implicit"})):null:null}function W5(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,An).map(function(u,l){return C.cloneElement(u,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var o=U5(e.label,t);return[o].concat(R5(i))}An.renderCallByParent=W5;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)}function d0(){return d0=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},X5=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=ic({cx:r,cy:n,radius:o,angle:d,sign:p,cornerRadius:u,cornerIsExternal:f}),b=m.circleTangency,O=m.lineTangency,x=m.theta,g=ic({cx:r,cy:n,radius:o,angle:v,sign:-p,cornerRadius:u,cornerIsExternal:f}),E=g.circleTangency,A=g.lineTangency,j=g.theta,T=f?Math.abs(d-v):Math.abs(d-v)-x-j;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 `):rR({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:d,endAngle:v});var _="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(E.x,",").concat(E.y,` A`).concat(u,",").concat(u,",0,0,").concat(+(p<0),",").concat(A.x,",").concat(A.y,` `);if(i>0){var P=ic({cx:r,cy:n,radius:i,angle:d,sign:p,isExternal:!0,cornerRadius:u,cornerIsExternal:f}),N=P.circleTangency,R=P.lineTangency,I=P.theta,U=ic({cx:r,cy:n,radius:i,angle:v,sign:-p,isExternal:!0,cornerRadius:u,cornerIsExternal:f}),F=U.circleTangency,M=U.lineTangency,W=U.theta,z=f?Math.abs(d-v):Math.abs(d-v)-I-W;if(z<0&&u===0)return"".concat(_,"L").concat(r,",").concat(n,"Z");_+="L".concat(M.x,",").concat(M.y,` A`).concat(u,",").concat(u,",0,0,").concat(+(p<0),",").concat(F.x,",").concat(F.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 _+="L".concat(r,",").concat(n,"Z");return _},Y5={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},nR=function(t){var r=UA(UA({},Y5),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=X5({cx:n,cy:i,innerRadius:o,outerRadius:u,cornerRadius:Math.min(x,O/2),forceCornerRadius:f,cornerIsExternal:d,startAngle:v,endAngle:p}):g=rR({cx:n,cy:i,innerRadius:o,outerRadius:u,startAngle:v,endAngle:p}),D.createElement("path",d0({},Se(r,!0),{className:b,d:g,role:"img"}))};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;tiW.call(e,t));function ta(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const sW="__v",uW="__o",lW="_owner",{getOwnPropertyDescriptor:GA,keys:XA}=Object;function cW(e,t){return e.byteLength===t.byteLength&&Hc(new Uint8Array(e),new Uint8Array(t))}function fW(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 dW(e,t){return e.byteLength===t.byteLength&&Hc(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function pW(e,t){return ta(e.getTime(),t.getTime())}function hW(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function vW(e,t){return e===t}function YA(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 mW=ta;function yW(e,t,r){const n=XA(e);let i=n.length;if(XA(t).length!==i)return!1;for(;i-- >0;)if(!iR(e,t,r,n[i]))return!1;return!0}function Ps(e,t,r){const n=VA(e);let i=n.length;if(VA(t).length!==i)return!1;let o,u,l;for(;i-- >0;)if(o=n[i],!iR(e,t,r,o)||(u=GA(e,o),l=GA(t,o),(u||l)&&(!u||!l||u.configurable!==l.configurable||u.enumerable!==l.enumerable||u.writable!==l.writable)))return!1;return!0}function gW(e,t){return ta(e.valueOf(),t.valueOf())}function bW(e,t){return e.source===t.source&&e.flags===t.flags}function QA(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 Hc(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 xW(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 iR(e,t,r,n){return(n===lW||n===uW||n===sW)&&(e.$$typeof||t.$$typeof)?!0:oW(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const wW="[object ArrayBuffer]",SW="[object Arguments]",OW="[object Boolean]",_W="[object DataView]",PW="[object Date]",EW="[object Error]",AW="[object Map]",jW="[object Number]",TW="[object Object]",CW="[object RegExp]",kW="[object Set]",NW="[object String]",RW={"[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},MW="[object URL]",$W=Object.prototype.toString;function IW({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,E,A){if(g===E)return!0;if(g==null||E==null)return!1;const j=typeof g;if(j!==typeof E)return!1;if(j!=="object")return j==="number"?l(g,E,A):j==="function"?o(g,E,A):!1;const T=g.constructor;if(T!==E.constructor)return!1;if(T===Object)return f(g,E,A);if(Array.isArray(g))return t(g,E,A);if(T===Date)return n(g,E,A);if(T===RegExp)return v(g,E,A);if(T===Map)return u(g,E,A);if(T===Set)return p(g,E,A);const _=$W.call(g);if(_===PW)return n(g,E,A);if(_===CW)return v(g,E,A);if(_===AW)return u(g,E,A);if(_===kW)return p(g,E,A);if(_===TW)return typeof g.then!="function"&&typeof E.then!="function"&&f(g,E,A);if(_===MW)return b(g,E,A);if(_===EW)return i(g,E,A);if(_===SW)return f(g,E,A);if(RW[_])return m(g,E,A);if(_===wW)return e(g,E,A);if(_===_W)return r(g,E,A);if(_===OW||_===jW||_===NW)return d(g,E,A);if(O){let P=O[_];if(!P){const N=aW(g);N&&(P=O[N])}if(P)return P(g,E,A)}return!1}}function DW({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:cW,areArraysEqual:r?Ps:fW,areDataViewsEqual:dW,areDatesEqual:pW,areErrorsEqual:hW,areFunctionsEqual:vW,areMapsEqual:r?Wy(YA,Ps):YA,areNumbersEqual:mW,areObjectsEqual:r?Ps:yW,arePrimitiveWrappersEqual:gW,areRegExpsEqual:bW,areSetsEqual:r?Wy(QA,Ps):QA,areTypedArraysEqual:r?Wy(Hc,Ps):Hc,areUrlsEqual:xW,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=oc(n.areArraysEqual),o=oc(n.areMapsEqual),u=oc(n.areObjectsEqual),l=oc(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:u,areSetsEqual:l})}return n}function LW(e){return function(t,r,n,i,o,u,l){return e(t,r,l)}}function BW({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 FW=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=DW(e),u=IW(o),l=r?r(u):LW(u);return BW({circular:t,comparator:u,createState:n,equals:l,strict:i})}function qW(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function ZA(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):qW(i)};requestAnimationFrame(n)}function h0(e){"@babel/helpers - typeof";return h0=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},h0(e)}function zW(e){return KW(e)||HW(e)||WW(e)||UW()}function UW(){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 WW(e,t){if(e){if(typeof e=="string")return JA(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 JA(e,t)}}function JA(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:E<0?0:E},x=function(E){for(var A=E>1?1:E,j=A,T=0;T<8;++T){var _=p(j)-A,P=b(j);if(Math.abs(_-A)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 OH(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 AH(e)||EH(e)||PH(e)||_H()}function _H(){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 PH(e,t){if(e){if(typeof e=="string")return b0(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 b0(e,t)}}function EH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AH(e){if(Array.isArray(e))return b0(e)}function b0(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 Gc(e){return Gc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gc(e)}var rn=(function(e){NH(r,e);var t=RH(r);function r(n,i){var o;jH(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(S0(o)),o.changeStyle=o.changeStyle.bind(S0(o)),!l||b<=0)return o.state={style:{}},typeof m=="function"&&(o.state={style:v}),w0(o);if(p&&p.length)o.state={style:p[0].style};else if(d){if(typeof m=="function")return o.state={style:d},w0(o);o.state={style:f?Cs({},f,d):d}}else o.state={style:{}};return o}return CH(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(!(FW(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=xH(u,l,lH(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,E){if(E===0)return x;var A=g.duration,j=g.easing,T=j===void 0?"ease":j,_=g.style,P=g.properties,N=g.onAnimationEnd,R=E>0?u[E-1]:g,I=P||Object.keys(_);if(typeof T=="function"||T==="spring")return[].concat(Hy(x),[o.runJSAnimation.bind(o,{from:R.style,to:_,duration:A,easing:T}),A]);var U=rj(I,A,T),F=$r($r($r({},R.style),_),{},{transition:U});return[].concat(Hy(x),[F,A,N]).filter(QW)};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=VW());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=rj(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=SH(i,wH),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,E=O.className,A=C.cloneElement(b,$r($r({},f),{},{style:$r($r({},g),v),className:E}));return A};return d===1?p(C.Children.only(o)):D.createElement("div",null,C.Children.map(o,function(m){return p(m)}))}}]),r})(C.PureComponent);rn.displayName="Animate";rn.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};rn.propTypes={from:$e.oneOfType([$e.object,$e.string]),to:$e.oneOfType([$e.object,$e.string]),attributeName:$e.string,duration:$e.number,begin:$e.number,easing:$e.oneOfType([$e.string,$e.func]),steps:$e.arrayOf($e.shape({duration:$e.number.isRequired,style:$e.object.isRequired,easing:$e.oneOfType([$e.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),$e.func]),properties:$e.arrayOf("string"),onAnimationEnd:$e.func})),children:$e.oneOfType([$e.node,$e.func]),isActive:$e.bool,canBegin:$e.bool,onAnimationEnd:$e.func,shouldReAnimate:$e.bool,onAnimationStart:$e.func,onAnimationReStart:$e.func};function du(e){"@babel/helpers - typeof";return du=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},du(e)}function Xc(){return Xc=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},UH=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},WH={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},nx=function(t){var r=cj(cj({},WH),t),n=C.useRef(),i=C.useState(-1),o=$H(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,E=r.isAnimationActive,A=r.isUpdateAnimationActive;if(f!==+f||d!==+d||v!==+v||p!==+p||v===0||p===0)return null;var j=Me("recharts-rectangle",b);return A?D.createElement(rn,{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:A},function(T){var _=T.width,P=T.height,N=T.x,R=T.y;return D.createElement(rn,{canBegin:u>0,from:"0px ".concat(u===-1?1:u,"px"),to:"".concat(u,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:x,isActive:E,easing:O},D.createElement("path",Xc({},Se(r,!0),{className:j,d:fj(N,R,_,P,m),ref:n})))}):D.createElement("path",Xc({},Se(r,!0),{className:j,d:fj(f,d,v,p,m)}))},HH=["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 VH(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 dj(e){return QH(e)||YH(e)||XH(e)||GH()}function GH(){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 XH(e,t){if(e){if(typeof e=="string")return O0(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 O0(e,t)}}function YH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QH(e){if(Array.isArray(e))return O0(e)}function O0(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){pj(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),pj(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},$s=function(t,r){var n=ZH(t);r&&(n=[n.reduce(function(o,u){return[].concat(dj(o),dj(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},JH=function(t,r,n){var i=$s(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat($s(r.reverse(),n).slice(1))},eK=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,o=t.connectNulls,u=KH(t,HH);if(!r||!r.length)return null;var l=Me("recharts-polygon",n);if(i&&i.length){var f=u.stroke&&u.stroke!=="none",d=JH(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:$s(r,o)})):null,f?D.createElement("path",Da({},Se(u,!0),{fill:"none",d:$s(i,o)})):null)}var v=$s(r,o);return D.createElement("path",Da({},Se(u,!0),{fill:v.slice(-1)==="Z"?u.fill:"none",className:l,d:v}))};function _0(){return _0=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 sK(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 uK=function(t,r,n,i,o,u){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(u,",").concat(r,"h").concat(n)},lK=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=oK(t,tK),g=rK({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",P0({},Se(g,!0),{className:Me("recharts-cross",O),d:uK(n,o,p,b,l,d)}))},Ky,vj;function cK(){if(vj)return Ky;vj=1;var e=Xf(),t=PN(),r=on();function n(i,o){return i&&i.length?e(i,r(o,2),t):void 0}return Ky=n,Ky}var fK=cK();const dK=Ue(fK);var Vy,mj;function pK(){if(mj)return Vy;mj=1;var e=Xf(),t=on(),r=EN();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return Vy=n,Vy}var hK=pK();const vK=Ue(hK);var mK=["cx","cy","angle","ticks","axisLine"],yK=["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 gK(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 bK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bj(e,t){for(var r=0;rSj?u=i==="outer"?"start":"end":o<-Sj?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(eK,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),E=n.getTickTextAnchor(O),A=Ni(Ni(Ni({textAnchor:E},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",eR(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,A,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):Ae(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,Oj;function MK(){if(Oj)return Gy;Oj=1;var e=Pk(),t=e(Object.getPrototypeOf,Object);return Gy=t,Gy}var Xy,_j;function $K(){if(_j)return Xy;_j=1;var e=$n(),t=MK(),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 IK=$K();const DK=Ue(IK);var Yy,Pj;function LK(){if(Pj)return Yy;Pj=1;var e=$n(),t=In(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return Yy=n,Yy}var BK=LK();const FK=Ue(BK);function hu(e){"@babel/helpers - typeof";return hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(e)}function Zc(){return Zc=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:E},function(j){var T=j.upperWidth,_=j.lowerWidth,P=j.height,N=j.x,R=j.y;return D.createElement(rn,{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",Zc({},Se(r,!0),{className:A,d:Tj(N,R,T,_,P),ref:n})))}):D.createElement("g",null,D.createElement("path",Zc({},Se(r,!0),{className:A,d:Tj(f,d,v,p,m)})))},QK=["option","shapeType","propTransformer","activeClassName","isActive"];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 ZK(e,t){if(e==null)return{};var r=JK(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 JK(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 Cj(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 Jc(e){for(var t=1;t0?cr(j,"paddingAngle",0):0;if(_){var N=sr(_.endAngle-_.startAngle,j.endAngle-j.startAngle),R=Ye(Ye({},j),{},{startAngle:A+P,endAngle:A+N(x)+P});g.push(R),A=R.endAngle}else{var I=j.endAngle,U=j.startAngle,F=sr(0,I-U),M=F(x),W=Ye(Ye({},j),{},{startAngle:A+P,endAngle:A+M+P});g.push(W),A=W.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||!Ru(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(E){n.pieRef=E}},this.renderSectors(),f&&this.renderLabels(u),At.renderCallByParent(this.props,null,!1),(!b||O)&&An.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?A:A-1)*f,T=g-A*b-j,_=i.reduce(function(R,I){var U=xt(I,E,0);return R+(le(U)?U:0)},0),P;if(_>0){var N;P=i.map(function(R,I){var U=xt(R,E,0),F=xt(R,v,I),M=(le(U)?U:0)/_,W;I?W=N.endAngle+zt(x)*f*(U!==0?1:0):W=u;var z=W+zt(x)*((U!==0?b:0)+M*T),V=(W+z)/2,Y=(O.innerRadius+O.outerRadius)/2,J=[{name:F,value:U,payload:R,dataKey:E,type:m}],K=Ze(O.cx,O.cy,Y,V);return N=Ye(Ye(Ye({percent:M,cornerRadius:o,name:F,tooltipPayload:J,midAngle:V,middleRadius:Y,tooltipPosition:K},R),O),{},{value:xt(R,E),startAngle:W,endAngle:z,payload:R,paddingAngle:zt(x)*f}),N})}return Ye(Ye({},O),{},{sectors:P,data:i})});var Qy,Mj;function x9(){if(Mj)return Qy;Mj=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,$j;function gR(){if($j)return Zy;$j=1;var e=qk(),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,Ij;function w9(){if(Ij)return Jy;Ij=1;var e=x9(),t=qf(),r=gR();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=zj(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 R9(t,e),T9(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=xt(o[n],l,n);return Ae(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=zj(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,E={startX:this.state.startX,endX:this.state.endX},A=n.pageX-o;A>0?A=Math.min(A,p+m-b-d):A<0&&(A=Math.max(A,p-d)),E[u]=d+A;var j=this.getIndex(E),T=j.startIndex,_=j.endIndex,P=function(){var R=g.length-1;return u==="startX"&&(l>f?T%x===0:_%x===0)||lf?_%x===0:T%x===0)||l>f&&_===R};this.setState(ar(ar({},u,d+A),"brushMoveStartX",n.pageX),function(){O&&P()&&O(j)})}},{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,E=Math.max(n,this.props.x),A=tg(tg({},Se(this.props,!1)),{},{x:E,y:d,width:v,height:p}),j=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":j,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(_){["ArrowLeft","ArrowRight"].includes(_.key)&&(_.preventDefault(),_.stopPropagation(),l.handleTravellerMoveKeyboard(_.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(m,A))}},{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,rf({textAnchor:"end",verticalAnchor:"middle",x:Math.min(p,m)-b,y:u+l/2},O),this.getTextOfTick(i)),D.createElement(Ki,rf({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,E=m.isTravellerMoving,A=m.isTravellerFocused;if(!i||!i.length||!le(l)||!le(f)||!le(d)||!le(v)||d<=0||v<=0)return null;var j=Me("recharts-brush",o),T=D.Children.count(u)===1,_=A9("userSelect","none");return D.createElement(qe,{className:j,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(b,O),this.renderTravellerLayer(b,"startX"),this.renderTravellerLayer(O,"endX"),(x||g||E||A||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):Ae(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?$9({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,Uj;function I9(){if(Uj)return rg;Uj=1;var e=Tb();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,Wj;function D9(){if(Wj)return ng;Wj=1;var e=gk(),t=on(),r=I9(),n=Jt(),i=qf();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 L9=D9();const B9=Ue(L9);var Jr=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},ig,Hj;function F9(){if(Hj)return ig;Hj=1;var e=Ik();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,Kj;function q9(){if(Kj)return ag;Kj=1;var e=F9(),t=Mk(),r=on();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 z9=q9();const U9=Ue(z9);var og,Vj;function W9(){if(Vj)return og;Vj=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 J9(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 eV(e,t){var r=e.x,n=e.y,i=Z9(e,G9),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 Es(Es(Es(Es(Es({},t),i),u?{x:u}:{}),f?{y:f}:{}),{},{height:v,width:m,name:t.name,radius:t.radius})}function Qj(e){return D.createElement(vR,C0({shapeType:"rectangle",propTransformer:eV,activeClassName:"recharts-active-bar"},e))}var tV=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)||PB(n);return o?t(n,i):(o||Gi(),r)}},rV=["value","background"],OR;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 nV(e,t){if(e==null)return{};var r=iV(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 iV(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 af(){return af=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(V)0&&Math.abs(z)0&&(W=Math.min((ce||0)-(z[me-1]||0),W))}),Number.isFinite(W)){var V=W/M,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+(j.left||0)+(N||0),n.left+n.width-(j.right||0)-(N||0)]:i==="yAxis"?R=f==="horizontal"?[n.top+n.height-(j.bottom||0),n.top+(j.top||0)]:[n.top+(j.top||0)+(N||0),n.top+n.height-(j.bottom||0)-(N||0)]:R=x.range,_&&(R=[R[1],R[0]]);var ee=VN(x,o,m),Z=ee.scale,L=ee.realScaleType;Z.domain(E).range(R),GN(Z);var H=XN(Z,Ir(Ir({},x),{},{realScaleType:L}));i==="xAxis"?(F=g==="top"&&!T||g==="bottom"&&T,I=n.left,U=p[P]-F*x.height):i==="yAxis"&&(F=g==="left"&&!T||g==="right"&&T,I=p[P]-F*x.width,U=n.top);var oe=Ir(Ir(Ir({},x),H),{},{realScaleType:L,x:I,y:U,scale:Z,width:i==="xAxis"?n.width:x.width,height:i==="yAxis"?n.height:x.height});return oe.bandSize=qc(oe,H),!x.hide&&i==="xAxis"?p[P]+=(F?-1:1)*oe.height:x.hide||(p[P]+=(F?-1:1)*oe.width),Ir(Ir({},b),{},sd({},O,oe))},{})},jR=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)}},vV=function(t){var r=t.x1,n=t.y1,i=t.x2,o=t.y2;return jR({x:r,y:n},{x:i,y:o})},TR=(function(){function e(t){dV(this,e),this.scale=t}return pV(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(TR,"EPS",1e-4);var ix=function(t){var r=Object.keys(t).reduce(function(n,i){return Ir(Ir({},n),{},sd({},i,TR.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 U9(i,function(f,d){return r[d].apply(f,{bandAware:u,position:l})})},isInRange:function(i){return SR(i,function(o,u){return r[u].isInRange(o)})}})};function mV(e){return(e%180+180)%180}var yV=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=mV(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,nT;function bV(){if(nT)return cg;nT=1;var e=gR();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return cg=t,cg}var fg,iT;function xV(){if(iT)return fg;iT=1;var e=Tk(),t=on(),r=bV(),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,aT;function wV(){if(aT)return dg;aT=1;var e=gV(),t=xV(),r=e(t);return dg=r,dg}var SV=wV();const OV=Ue(SV);var _V=HC();const PV=Ue(_V);var EV=PV(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("")}),ax=C.createContext(void 0),ox=C.createContext(void 0),CR=C.createContext(void 0),kR=C.createContext({}),NR=C.createContext(void 0),RR=C.createContext(0),MR=C.createContext(0),oT=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=EV(o);return D.createElement(ax.Provider,{value:n},D.createElement(ox.Provider,{value:i},D.createElement(kR.Provider,{value:o},D.createElement(CR.Provider,{value:v},D.createElement(NR.Provider,{value:u},D.createElement(RR.Provider,{value:d},D.createElement(MR.Provider,{value:f},l)))))))},AV=function(){return C.useContext(NR)},$R=function(t){var r=C.useContext(ax);r==null&&Gi();var n=r[t];return n==null&&Gi(),n},jV=function(){var t=C.useContext(ax);return oi(t)},TV=function(){var t=C.useContext(ox),r=OV(t,function(n){return SR(n.domain,Number.isFinite)});return r||oi(t)},IR=function(t){var r=C.useContext(ox);r==null&&Gi();var n=r[t];return n==null&&Gi(),n},CV=function(){var t=C.useContext(CR);return t},kV=function(){return C.useContext(kR)},sx=function(){return C.useContext(MR)},ux=function(){return C.useContext(RR)};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 NV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RV(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 hG(e,t){return UR(e,t+1)}function vG(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:UR(n,d)};var x=f,g,E=function(){return g===void 0&&(g=r(O,x)),g},A=O.coordinate,j=f===0||cf(e,A,E,v,l);j||(f=0,v=u,d+=1),j&&(v=A+e*(E()/2+i),f+=d)},m;d<=o.length;)if(m=p(),m)return m.v;return[]}function xu(e){"@babel/helpers - typeof";return xu=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},xu(e)}function hT(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 It(e){for(var t=1;t0?b.coordinate-g*e:b.coordinate})}else o[m]=b=It(It({},b),{},{tickCoord:b.coordinate});var E=cf(e,b.tickCoord,x,l,f);E&&(f=b.tickCoord-e*(x()/2+i),o[m]=It(It({},b),{},{isShow:!0}))},v=u-1;v>=0;v--)d(v);return o}function xG(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=It(It({},v),{},{tickCoord:m>0?v.coordinate-m*e:v.coordinate});var b=cf(e,v.tickCoord,function(){return p},f,d);b&&(d=v.tickCoord-e*(p/2+i),u[l-1]=It(It({},v),{},{isShow:!0}))}for(var O=o?l-1:l,x=function(A){var j=u[A],T,_=function(){return T===void 0&&(T=r(j,A)),T};if(A===0){var P=e*(j.coordinate-e*_()/2-f);u[A]=j=It(It({},j),{},{tickCoord:P<0?j.coordinate-P*e:j.coordinate})}else u[A]=j=It(It({},j),{},{tickCoord:j.coordinate});var N=cf(e,j.tickCoord,_,f,d);N&&(f=j.tickCoord+e*(_()/2+i),u[A]=It(It({},j),{},{isShow:!0}))},g=0;g=2?zt(i[1].coordinate-i[0].coordinate):1,E=pG(o,g,b);return f==="equidistantPreserveStart"?vG(g,E,x,i,u):(f==="preserveStart"||f==="preserveStartEnd"?m=xG(g,E,x,i,u,f==="preserveStartEnd"):m=bG(g,E,x,i,u),m.filter(function(A){return A.isShow}))}var wG=["viewBox"],SG=["viewBox"],OG=["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 _G(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 PG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mT(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,gt(gt({},i),{},{className:l})):Ae(n)?u=n(gt(gt({},i),{},{className:l})):u=D.createElement(Ki,Ba({},i,{className:"recharts-cartesian-axis-tick-value"}),o),u}}])})(C.Component);dx(To,"displayName","CartesianAxis");dx(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 NG=["x1","y1","x2","y2","key"],RG=["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 yT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DG(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 LG=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 KR(e,t){var r;if(D.isValidElement(e))r=D.cloneElement(e,t);else if(Ae(e))r=e(t);else{var n=t.x1,i=t.y1,o=t.x2,u=t.y2,l=t.key,f=gT(t,NG),d=Se(f,!1);d.offset;var v=gT(d,RG);r=D.createElement("line",qi({},v,{x1:n,y1:i,x2:o,y2:u,fill:"none",key:l}))}return r}function BG(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 KR(i,d)});return D.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function FG(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 KR(i,d)});return D.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function qG(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 zG(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 UG=function(t,r){var n=t.xAxis,i=t.width,o=t.height,u=t.offset;return KN(fx(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)},WG=function(t,r){var n=t.yAxis,i=t.width,o=t.height,u=t.offset;return KN(fx(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)},ka={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Ha(e){var t,r,n,i,o,u,l=sx(),f=ux(),d=kV(),v=Lt(Lt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:ka.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:ka.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:ka.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:ka.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:ka.vertical,verticalFill:(u=e.verticalFill)!==null&&u!==void 0?u:ka.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,E=v.verticalValues,A=jV(),j=TV();if(!le(b)||b<=0||!le(O)||O<=0||!le(p)||p!==+p||!le(m)||m!==+m)return null;var T=v.verticalCoordinatesGenerator||UG,_=v.horizontalCoordinatesGenerator||WG,P=v.horizontalPoints,N=v.verticalPoints;if((!P||!P.length)&&Ae(_)){var R=g&&g.length,I=_({yAxis:j?Lt(Lt({},j),{},{ticks:R?g:j.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)&&(P=I)}if((!N||!N.length)&&Ae(T)){var U=E&&E.length,F=T({xAxis:A?Lt(Lt({},A),{},{ticks:U?E:A.ticks}):void 0,width:l,height:f,offset:d},U?!0:x);qr(Array.isArray(F),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Xi(F),"]")),Array.isArray(F)&&(N=F)}return D.createElement("g",{className:"recharts-cartesian-grid"},D.createElement(LG,{fill:v.fill,fillOpacity:v.fillOpacity,x:v.x,y:v.y,width:v.width,height:v.height,ry:v.ry}),D.createElement(BG,qi({},v,{offset:d,horizontalPoints:P,xAxis:A,yAxis:j})),D.createElement(FG,qi({},v,{offset:d,verticalPoints:N,xAxis:A,yAxis:j})),D.createElement(qG,qi({},v,{horizontalPoints:P})),D.createElement(zG,qi({},v,{verticalPoints:N})))}Ha.displayName="CartesianGrid";var HG=["type","layout","connectNulls","ref"],KG=["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 bT(e,t){if(e==null)return{};var r=VG(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 VG(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(Na(f.slice(0,O)),[p-x]);break}var g=b.length%2===0?[0,m]:[m];return[].concat(Na(t.repeat(f,v)),Na(b),g).map(function(E){return"".concat(E,"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 n7(t,e),JG(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,Mu);if(!p)return null;var m=function(x,g){return{x:x.x,y:x.y,value:x.value,errorVal:xt(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 E=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,E)}),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=bT(l,HG),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(Wc,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,E=this.state,A=E.prevPoints,j=E.totalLength;return D.createElement(rn,{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 _=T.t;if(A){var P=A.length/l.length,N=l.map(function(M,W){var z=Math.floor(W*P);if(A[z]){var V=A[z],Y=sr(V.x,M.x),J=sr(V.y,M.y);return ir(ir({},M),{},{x:Y(_),y:J(_)})}if(O){var K=sr(x*2,M.x),ee=sr(g/2,M.y);return ir(ir({},M),{},{x:K(_),y:ee(_)})}return ir(ir({},M),{},{x:M.x,y:M.y})});return o.renderCurveStatically(N,n,i)}var R=sr(0,j),I=R(_),U;if(f){var F="".concat(f).split(/[,\s]+/gim).map(function(M){return parseFloat(M)});U=o.getStrokeDasharray(I,j,F)}else U=o.generateSimpleStrokeDasharray(j,I);return o.renderCurveStatically(l,n,i,{strokeDasharray:U})})}},{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||!Ru(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 E=this.state.isAnimationFinished,A=l.length===1,j=Me("recharts-line",f),T=d&&d.allowDataOverflow,_=v&&v.allowDataOverflow,P=T||_,N=ke(g)?this.id:g,R=(n=Se(u,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},I=R.r,U=I===void 0?3:I,F=R.strokeWidth,M=F===void 0?2:F,W=DB(u)?u:{},z=W.clipDot,V=z===void 0?!0:z,Y=U*2+M;return D.createElement(qe,{className:j},T||_?D.createElement("defs",null,D.createElement("clipPath",{id:"clipPath-".concat(N)},D.createElement("rect",{x:T?m:m-b/2,y:_?p:p-O/2,width:T?b:b*2,height:_?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,!A&&this.renderCurve(P,N),this.renderErrorBar(P,N),(A||u)&&this.renderDots(P,V,N),(!x||E)&&An.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(Na(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 V7(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 G7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X7(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 sM(e){return e==="number"?[0,"auto"]:void 0}var X0=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=vc(b,u.dataKey,i)}else m=p&&p[n]||l[n];return m?[].concat(go(f),[QN(d,m)]):f},[])},jT=function(t,r,n,i){var o=i||{x:t.chartX,y:t.chartY},u=sX(o,n),l=t.orderedTooltipTicks,f=t.tooltipAxis,d=t.tooltipTicks,v=M6(u,l,d,f);if(v>=0&&d){var p=d[v]&&d[v].value,m=X0(t,r,v,p),b=uX(n,l,v,o);return{activeTooltipIndex:v,activeLabel:p,activePayload:m,activeCoordinate:b}}return null},lX=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=HN(v,o);return n.reduce(function(O,x){var g,E=x.type.defaultProps!==void 0?te(te({},x.type.defaultProps),x.props):x.props,A=E.type,j=E.dataKey,T=E.allowDataOverflow,_=E.allowDuplicatedCategory,P=E.scale,N=E.ticks,R=E.includeHidden,I=E[u];if(O[I])return O;var U=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}),F=U.length,M,W,z;$7(E.domain,T,A)&&(M=l0(E.domain,null,T),b&&(A==="number"||P!=="auto")&&(z=Rs(U,j,"category")));var V=sM(A);if(!M||M.length===0){var Y,J=(Y=E.domain)!==null&&Y!==void 0?Y:V;if(j){if(M=Rs(U,j,A),A==="category"&&b){var K=AB(M);_&&K?(W=M,M=tf(0,F)):_||(M=RA(J,M,x).reduce(function(H,oe){return H.indexOf(oe)>=0?H:[].concat(go(H),[oe])},[]))}else if(A==="category")_?M=M.filter(function(H){return H!==""&&!ke(H)}):M=RA(J,M,x).reduce(function(H,oe){return H.indexOf(oe)>=0||oe===""||ke(oe)?H:[].concat(go(H),[oe])},[]);else if(A==="number"){var ee=B6(U,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)}),j,o,v);ee&&(M=ee)}b&&(A==="number"||P!=="auto")&&(z=Rs(U,j,"category"))}else b?M=tf(0,F):l&&l[I]&&l[I].hasStack&&A==="number"?M=m==="expand"?[0,1]:YN(l[I].stackGroups,f,d):M=WN(U,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)}),A,v,!0);if(A==="number")M=K0(p,M,I,o,N),J&&(M=l0(J,M,T));else if(A==="category"&&J){var Z=J,L=M.every(function(H){return Z.indexOf(H)>=0});L&&(M=Z)}}return te(te({},O),{},_e({},I,te(te({},E),{},{axisType:o,domain:M,categoricalDomain:z,duplicateDomain:W,originalDomain:(g=E.domain)!==null&&g!==void 0?g:V,isCategorical:b,layout:v})))},{})},cX=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=HN(v,o),x=-1;return n.reduce(function(g,E){var A=E.type.defaultProps!==void 0?te(te({},E.type.defaultProps),E.props):E.props,j=A[u],T=sM("number");if(!g[j]){x++;var _;return O?_=tf(0,b):l&&l[j]&&l[j].hasStack?(_=YN(l[j].stackGroups,f,d),_=K0(p,_,j,o)):(_=l0(T,WN(m,n.filter(function(P){var N,R,I=u in P.props?P.props[u]:(N=P.type.defaultProps)===null||N===void 0?void 0:N[u],U="hide"in P.props?P.props.hide:(R=P.type.defaultProps)===null||R===void 0?void 0:R.hide;return I===j&&!U}),"number",v),i.defaultProps.allowDataOverflow),_=K0(p,_,j,o)),te(te({},g),{},_e({},j,te(te({axisType:o},i.defaultProps),{},{hide:!0,orientation:cr(aX,"".concat(o,".").concat(x%2),null),domain:_,originalDomain:T,isCategorical:O,layout:v})))}return g},{})},fX=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=lX(t,{axes:m,graphicalItems:u,axisType:i,axisIdKey:p,stackGroups:l,dataStartIndex:f,dataEndIndex:d}):u&&u.length&&(b=cX(t,{Axis:o,graphicalItems:u,axisType:i,axisIdKey:p,stackGroups:l,dataStartIndex:f,dataEndIndex:d})),b},dX=function(t){var r=oi(t),n=Sn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Cb(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:qc(r,n)}},TT=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}},pX=function(t){return!t||!t.length?!1:t.some(function(r){var n=_n(r&&r.type);return n&&n.indexOf("Bar")>=0})},CT=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"}},hX=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[P],R=N.orientation;return!N.mirror&&!N.hide?te(te({},_),{},_e({},R,_[R]+N.width)):_},{left:m.left||0,right:m.right||0}),g=Object.keys(u).reduce(function(_,P){var N=u[P],R=N.orientation;return!N.mirror&&!N.hide?te(te({},_),{},_e({},R,cr(_,"".concat(R))+N.height)):_},{top:m.top||0,bottom:m.bottom||0}),E=te(te({},g),x),A=E.bottom;b&&(E.bottom+=b.props.height||so.defaultProps.height),O&&r&&(E=D6(E,i,n,r));var j=d-E.left-E.right,T=v-E.top-E.bottom;return te(te({brushBottom:A},E),{},{width:Math.max(j,0),height:Math.max(T,0)})},vX=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},px=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(E,A){var j=A.graphicalItems,T=A.stackGroups,_=A.offset,P=A.updateId,N=A.dataStartIndex,R=A.dataEndIndex,I=E.barSize,U=E.layout,F=E.barGap,M=E.barCategoryGap,W=E.maxBarSize,z=CT(U),V=z.numericAxisName,Y=z.cateAxisName,J=pX(j),K=[];return j.forEach(function(ee,Z){var L=dd(E.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={},je=f.reduce(function(Ht,Ar){var ra=A["".concat(Ar.axisType,"Map")],Co=H["".concat(Ar.axisType,"Id")];ra&&ra[Co]||Ar.axisType==="zAxis"||Gi();var ko=ra[Co];return te(te({},Ht),{},_e(_e({},Ar.axisType,ko),"".concat(Ar.axisType,"Ticks"),Sn(ko)))},Le),ae=je[Y],ge=je["".concat(Y,"Ticks")],Te=T&&T[me]&&T[me].hasStack&&G6(ee,T[me].stackGroups),ne=_n(ee.type).indexOf("Bar")>=0,We=qc(ae,ge),Ne=[],Ce=J&&$6({barSize:I,stackGroups:T,totalSize:vX(je,Y)});if(ne){var Je,st,Er=ke(ce)?W:ce,Wr=(Je=(st=qc(ae,ge,!0))!==null&&st!==void 0?st:Er)!==null&&Je!==void 0?Je:0;Ne=I6({barGap:F,barCategoryGap:M,bandSize:Wr!==We?Wr:We,sizeList:Ce[Pe],maxBarSize:Er}),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({},je),{},{displayedData:L,props:E,dataKey:oe,item:ee,bandSize:We,barPosition:Ne,offset:_,stackedData:Te,layout:U,dataStartIndex:N,dataEndIndex:R}))),{},_e(_e(_e({key:ee.key||"item-".concat(Z)},V,je[V]),Y,je[Y]),"animationId",P)),childIndex:FB(ee,E.children),item:ee})}),K},b=function(E,A){var j=E.props,T=E.dataStartIndex,_=E.dataEndIndex,P=E.updateId;if(!VO({props:j}))return null;var N=j.children,R=j.layout,I=j.stackOffset,U=j.data,F=j.reverseStackOrder,M=CT(R),W=M.numericAxisName,z=M.cateAxisName,V=fr(N,n),Y=K6(U,V,"".concat(W,"Id"),"".concat(z,"Id"),I,F),J=f.reduce(function(H,oe){var ce="".concat(oe.axisType,"Map");return te(te({},H),{},_e({},ce,fX(j,te(te({},oe),{},{graphicalItems:V,stackGroups:oe.axisType===W&&Y,dataStartIndex:T,dataEndIndex:_}))))},{}),K=hX(te(te({},J),{},{props:j,graphicalItems:V}),A==null?void 0:A.legendBBox);Object.keys(J).forEach(function(H){J[H]=v(j,J[H],K,H.replace("Map",""),r)});var ee=J["".concat(z,"Map")],Z=dX(ee),L=m(j,te(te({},J),{},{dataStartIndex:T,dataEndIndex:_,updateId:P,graphicalItems:V,stackGroups:Y,offset:K}));return te(te({formattedGraphicalItems:L,graphicalItems:V,offset:K,stackGroups:Y},Z),J)},O=(function(g){function E(A){var j,T,_;return G7(this,E),_=Q7(this,E,[A]),_e(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),_e(_,"accessibilityManager",new M7),_e(_,"handleLegendBBoxUpdate",function(P){if(P){var N=_.state,R=N.dataStartIndex,I=N.dataEndIndex,U=N.updateId;_.setState(te({legendBBox:P},b({props:_.props,dataStartIndex:R,dataEndIndex:I,updateId:U},te(te({},_.state),{},{legendBBox:P}))))}}),_e(_,"handleReceiveSyncEvent",function(P,N,R){if(_.props.syncId===P){if(R===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(N)}}),_e(_,"handleBrushChange",function(P){var N=P.startIndex,R=P.endIndex;if(N!==_.state.dataStartIndex||R!==_.state.dataEndIndex){var I=_.state.updateId;_.setState(function(){return te({dataStartIndex:N,dataEndIndex:R},b({props:_.props,dataStartIndex:N,dataEndIndex:R,updateId:I},_.state))}),_.triggerSyncEvent({dataStartIndex:N,dataEndIndex:R})}}),_e(_,"handleMouseEnter",function(P){var N=_.getMouseInfo(P);if(N){var R=te(te({},N),{},{isTooltipActive:!0});_.setState(R),_.triggerSyncEvent(R);var I=_.props.onMouseEnter;Ae(I)&&I(R,P)}}),_e(_,"triggeredAfterMouseMove",function(P){var N=_.getMouseInfo(P),R=N?te(te({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(R),_.triggerSyncEvent(R);var I=_.props.onMouseMove;Ae(I)&&I(R,P)}),_e(_,"handleItemMouseEnter",function(P){_.setState(function(){return{isTooltipActive:!0,activeItem:P,activePayload:P.tooltipPayload,activeCoordinate:P.tooltipPosition||{x:P.cx,y:P.cy}}})}),_e(_,"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),_e(_,"handleMouseMove",function(P){P.persist(),_.throttleTriggeredAfterMouseMove(P)}),_e(_,"handleMouseLeave",function(P){_.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};_.setState(N),_.triggerSyncEvent(N);var R=_.props.onMouseLeave;Ae(R)&&R(N,P)}),_e(_,"handleOuterEvent",function(P){var N=BB(P),R=cr(_.props,"".concat(N));if(N&&Ae(R)){var I,U;/.*touch.*/i.test(N)?U=_.getMouseInfo(P.changedTouches[0]):U=_.getMouseInfo(P),R((I=U)!==null&&I!==void 0?I:{},P)}}),_e(_,"handleClick",function(P){var N=_.getMouseInfo(P);if(N){var R=te(te({},N),{},{isTooltipActive:!0});_.setState(R),_.triggerSyncEvent(R);var I=_.props.onClick;Ae(I)&&I(R,P)}}),_e(_,"handleMouseDown",function(P){var N=_.props.onMouseDown;if(Ae(N)){var R=_.getMouseInfo(P);N(R,P)}}),_e(_,"handleMouseUp",function(P){var N=_.props.onMouseUp;if(Ae(N)){var R=_.getMouseInfo(P);N(R,P)}}),_e(_,"handleTouchMove",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(P.changedTouches[0])}),_e(_,"handleTouchStart",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&_.handleMouseDown(P.changedTouches[0])}),_e(_,"handleTouchEnd",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&_.handleMouseUp(P.changedTouches[0])}),_e(_,"handleDoubleClick",function(P){var N=_.props.onDoubleClick;if(Ae(N)){var R=_.getMouseInfo(P);N(R,P)}}),_e(_,"handleContextMenu",function(P){var N=_.props.onContextMenu;if(Ae(N)){var R=_.getMouseInfo(P);N(R,P)}}),_e(_,"triggerSyncEvent",function(P){_.props.syncId!==void 0&&vg.emit(mg,_.props.syncId,P,_.eventEmitterSymbol)}),_e(_,"applySyncEvent",function(P){var N=_.props,R=N.layout,I=N.syncMethod,U=_.state.updateId,F=P.dataStartIndex,M=P.dataEndIndex;if(P.dataStartIndex!==void 0||P.dataEndIndex!==void 0)_.setState(te({dataStartIndex:F,dataEndIndex:M},b({props:_.props,dataStartIndex:F,dataEndIndex:M,updateId:U},_.state)));else if(P.activeTooltipIndex!==void 0){var W=P.chartX,z=P.chartY,V=P.activeTooltipIndex,Y=_.state,J=Y.offset,K=Y.tooltipTicks;if(!J)return;if(typeof I=="function")V=I(K,P);else if(I==="value"){V=-1;for(var ee=0;ee=0){var Te,ne;if(W.dataKey&&!W.allowDuplicatedCategory){var We=typeof W.dataKey=="function"?ge:"payload.".concat(W.dataKey.toString());Te=vc(ee,We,V),ne=Z&&L&&vc(L,We,V)}else Te=ee==null?void 0:ee[z],ne=Z&&L&&L[z];if(Pe||me){var Ne=P.props.activeIndex!==void 0?P.props.activeIndex:z;return[C.cloneElement(P,te(te(te({},I.props),je),{},{activeIndex:Ne})),null,null]}if(!ke(Te))return[ae].concat(go(_.renderActivePoints({item:I,activePoint:Te,basePoint:ne,childIndex:z,isRange:Z})))}else{var Ce,Je=(Ce=_.getItemByXY(_.state.activeCoordinate))!==null&&Ce!==void 0?Ce:{graphicalItem:ae},st=Je.graphicalItem,Er=st.item,Wr=Er===void 0?P:Er,Hr=st.childIndex,Ht=te(te(te({},I.props),je),{},{activeIndex:Hr});return[C.cloneElement(Wr,Ht),null,null]}return Z?[ae,null,null]:[ae,null]}),_e(_,"renderCustomized",function(P,N,R){return C.cloneElement(P,te(te({key:"recharts-customized-".concat(R)},_.props),_.state))}),_e(_,"renderMap",{CartesianGrid:{handler:uc,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:uc},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:uc},YAxis:{handler:uc},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((j=A.id)!==null&&j!==void 0?j:_o("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=zk(_.triggeredAfterMouseMove,(T=A.throttleDelay)!==null&&T!==void 0?T:1e3/60),_.state={},_}return eX(E,g),Y7(E,[{key:"componentDidMount",value:function(){var j,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j: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 j=this.props,T=j.children,_=j.data,P=j.height,N=j.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 U=this.state.tooltipTicks[I]&&this.state.tooltipTicks[I].value,F=X0(this.state,_,I,U),M=this.state.tooltipTicks[I].coordinate,W=(this.state.offset.top+P)/2,z=N==="horizontal",V=z?{x:M,y:W}:{y:M,x:W},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),F=Y.props.points[I].tooltipPayload);var J={activeTooltipIndex:I,isTooltipActive:!0,activeLabel:U,activePayload:F,activeCoordinate:V};this.setState(J),this.renderCursor(R),this.accessibilityManager.setIndex(I)}}}},{key:"getSnapshotBeforeUpdate",value:function(j,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==j.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==j.margin){var _,P;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0}})}return null}},{key:"componentDidUpdate",value:function(j){kg([or(j.children,qt)],[or(this.props.children,qt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var j=or(this.props.children,qt);if(j&&typeof j.props.shared=="boolean"){var T=j.props.shared?"axis":"item";return l.indexOf(T)>=0?T:o}return o}},{key:"getMouseInfo",value:function(j){if(!this.container)return null;var T=this.container,_=T.getBoundingClientRect(),P=Ez(_),N={chartX:Math.round(j.pageX-P.left),chartY:Math.round(j.pageY-P.top)},R=_.width/T.offsetWidth||1,I=this.inRange(N.chartX,N.chartY,R);if(!I)return null;var U=this.state,F=U.xAxisMap,M=U.yAxisMap,W=this.getTooltipEventType(),z=jT(this.state,this.props.data,this.props.layout,I);if(W!=="axis"&&F&&M){var V=oi(F).scale,Y=oi(M).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(j,T){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,P=this.props.layout,N=j/_,R=T/_;if(P==="horizontal"||P==="vertical"){var I=this.state.offset,U=N>=I.left&&N<=I.left+I.width&&R>=I.top&&R<=I.top+I.height;return U?{x:N,y:R}:null}var F=this.state,M=F.angleAxisMap,W=F.radiusAxisMap;if(M&&W){var z=oi(M);return IA({x:N,y:R},z)}return null}},{key:"parseEventsOfWrapper",value:function(){var j=this.props.children,T=this.getTooltipEventType(),_=or(j,qt),P={};_&&T==="axis"&&(_.props.trigger==="click"?P={onClick:this.handleClick}:P={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=mc(this.props,this.handleOuterEvent);return te(te({},N),P)}},{key:"addListener",value:function(){vg.on(mg,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){vg.removeListener(mg,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(j,T,_){for(var P=this.state.formattedGraphicalItems,N=0,R=P.length;N{r[i.sessionTypeAsInt]=(r[i.sessionTypeAsInt]||0)+1});const n=Object.entries(r).map(([i,o])=>({name:LL[Number(i)]||`Type ${i}`,value:o,color:FC[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(za,{width:"100%",height:300,children:w.jsxs(mX,{children:[w.jsx(Ln,{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(zf,{fill:i.color},o))}),w.jsx(qt,{contentStyle:{backgroundColor:"#1a1a2e",border:"1px solid #333"}}),w.jsx(Pn,{})]})})}function gX({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(za,{width:"100%",height:300,children:w.jsxs(uM,{data:r,children:[w.jsx(Ha,{strokeDasharray:"3 3",stroke:"#333"}),w.jsx(jn,{dataKey:"month",stroke:"#888"}),w.jsx(en,{stroke:"#888",allowDecimals:!1}),w.jsx(qt,{contentStyle:{backgroundColor:"#1a1a2e",border:"1px solid #333"}}),w.jsx(Fr,{dataKey:"sessions",fill:"#4a90d9",name:"Sessions"})]})})}function bX(e){const t=Math.floor(e/60),r=Math.floor(e%60);return`${t}m ${r}s`}function xX(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 wX(){const{t:e,lang:t}=zr(),r=_u(),[n,i]=C.useState([]),[o,u]=C.useState([]),[l,f]=C.useState(!0);if(C.useEffect(()=>{Promise.all([LC(),BC()]).then(([x,g])=>{i(x),u(g)}).finally(()=>f(!1))},[]),l)return w.jsx(Pu,{});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(De,{xs:6,md:3,children:w.jsx(Dt,{title:e("dashboard.totalSessions"),value:d,color:"#4a90d9",onClick:()=>r("/sessions")})}),w.jsx(De,{xs:6,md:3,children:w.jsx(Dt,{title:e("dashboard.totalUsers"),value:v,color:"#9b59b6",onClick:()=>r("/users")})}),w.jsx(De,{xs:6,md:3,children:w.jsx(Dt,{title:e("dashboard.successRate"),value:`${p}%`,color:"#27ae60"})}),w.jsx(De,{xs:6,md:3,children:w.jsx(Dt,{title:e("dashboard.avgPrecision"),value:m.toFixed(1),color:"#f39c12"})})]}),w.jsxs(ur,{className:"mb-4 g-3",children:[w.jsx(De,{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(yX,{sessions:n,onSliceClick:x=>r(`/sessions?type=${x}`)})]})})}),w.jsx(De,{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(gX,{sessions:n})]})})})]}),w.jsxs(ur,{className:"g-3",children:[w.jsx(De,{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(bn,{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:xX(x.sessionDateAsString,t)}),w.jsx("td",{children:w.jsx(qs,{typeId:x.sessionTypeAsInt})}),w.jsx("td",{children:x.scenarioName||"-"}),w.jsx("td",{children:x.score}),w.jsx("td",{children:bX(x.timeToFinish)}),w.jsx("td",{children:w.jsx(Tf,{success:x.success})})]},x.id))})]})]})})}),w.jsx(De,{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(bn,{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 SX={type:$e.string,tooltip:$e.bool,as:$e.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=SX;const Nn=C.createContext({}),hx=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")})});hx.displayName="FormCheckInput";const mf=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)})});mf.displayName="FormCheckLabel";function OX(e,t){let r=0;return C.Children.map(e,n=>C.isValidElement(n)?t(n,r++):n)}function _X(e,t){return C.Children.toArray(e).some(r=>C.isValidElement(r)&&r.type===t)}const lM=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:E="input",...A},j)=>{t=Re(t,"form-check"),r=Re(r,"form-switch");const{controlId:T}=C.useContext(Nn),_=C.useMemo(()=>({controlId:e||T}),[T,e]),P=!g&&x!=null&&x!==!1||_X(g,mf),N=w.jsx(hx,{...A,type:O==="switch"?"checkbox":O,ref:j,isValid:u,isInvalid:l,disabled:o,as:E});return w.jsx(Nn.Provider,{value:_,children:w.jsx("div",{style:m,className:Oe(p,P&&t,n&&`${t}-inline`,i&&`${t}-reverse`,O==="switch"&&r),children:g||w.jsxs(w.Fragment,{children:[N,P&&w.jsx(mf,{title:b,children:x}),d&&w.jsx(pd,{type:v,tooltip:f,children:d})]})})})});lM.displayName="FormCheck";const yf=Object.assign(lM,{Input:hx,Label:mf}),cM=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")})});cM.displayName="FormControl";const PX=Object.assign(cM,{Feedback:pd}),fM=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})));fM.displayName="FormFloating";const vx=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})})});vx.displayName="FormGroup";const dM=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(De,{ref:l,as:"label",className:v,htmlFor:o,...u}):w.jsx(e,{ref:l,className:v,htmlFor:o,...u})});dM.displayName="FormLabel";const pM=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})});pM.displayName="FormRange";const hM=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})});hM.displayName="FormSelect";const vM=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")})));vM.displayName="FormText";const mM=C.forwardRef((e,t)=>w.jsx(yf,{...e,ref:t,type:"switch"}));mM.displayName="Switch";const EX=Object.assign(mM,{Input:yf.Input,Label:yf.Label}),yM=C.forwardRef(({bsPrefix:e,className:t,children:r,controlId:n,label:i,...o},u)=>(e=Re(e,"form-floating"),w.jsxs(vx,{ref:u,className:Oe(t,e),controlId:n,...o,children:[r,w.jsx("label",{htmlFor:n,children:i})]})));yM.displayName="FloatingLabel";const AX={_ref:$e.any,validated:$e.bool,as:$e.elementType},mx=C.forwardRef(({className:e,validated:t,as:r="form",...n},i)=>w.jsx(r,{...n,ref:i,className:Oe(e,t&&"was-validated")}));mx.displayName="Form";mx.propTypes=AX;const wr=Object.assign(mx,{Group:vx,Control:PX,Floating:fM,Check:yf,Switch:EX,Label:dM,Text:vM,Range:pM,Select:hM,FloatingLabel:yM}),yx=C.forwardRef(({active:e=!1,disabled:t=!1,className:r,style:n,activeLabel:i="(current)",children:o,linkStyle:u,linkClassName:l,as:f=sb,...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})]})})});yx.displayName="PageItem";function $u(e,t,r=e){const n=C.forwardRef(({children:i,...o},u)=>w.jsxs(yx,{...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 jX=$u("First","«"),TX=$u("Prev","‹","Previous"),CX=$u("Ellipsis","…","More"),kX=$u("Next","›"),NX=$u("Last","»"),gM=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}`)})});gM.displayName="Pagination";const Ra=Object.assign(gM,{First:jX,Prev:TX,Ellipsis:CX,Item:yx,Next:kX,Last:NX}),RX="/ProserveReport/",MX=`${RX}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:MX,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 $X(e){const t=Math.floor(e/60),r=Math.floor(e%60);return`${t}m ${r}s`}function IX(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 DX(){const{t:e,lang:t}=zr(),r=_u(),[n,i]=M2(),[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,E]=C.useState("sessionDateAsString"),[A,j]=C.useState("desc"),[T,_]=C.useState(1);C.useEffect(()=>{LC().then(u).finally(()=>f(!1))},[]);const P=C.useMemo(()=>{let M=o;if(v>=0&&(M=M.filter(W=>W.sessionTypeAsInt===v)),m==="success"?M=M.filter(W=>W.success):m==="failed"&&(M=M.filter(W=>!W.success)),O.trim()){const W=O.toLowerCase();M=M.filter(z=>z.scenarioName.toLowerCase().includes(W)||z.mapName.toLowerCase().includes(W)||z.sessionName.toLowerCase().includes(W))}return[...M].sort((W,z)=>{const V=W[g],Y=z[g];return typeof V=="string"&&typeof Y=="string"?A==="asc"?V.localeCompare(Y):Y.localeCompare(V):A==="asc"?Number(V)-Number(Y):Number(Y)-Number(V)})},[o,v,m,O,g,A]),N=Math.ceil(P.length/gg),R=P.slice((T-1)*gg,T*gg);function I(M){g===M?j(A==="asc"?"desc":"asc"):(E(M),j("desc"))}function U(M){return g!==M?"":A==="asc"?" ▲":" ▼"}if(l)return w.jsx(Pu,{});const F=[...new Set(o.map(M=>M.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")," (",P.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(De,{md:3,children:w.jsxs(wr.Group,{children:[w.jsx(wr.Label,{className:"text-muted-custom",children:e("sessions.sessionType")}),w.jsxs(wr.Select,{value:v,onChange:M=>{const W=Number(M.target.value);p(W),_(1),W>=0?i({type:String(W)}):i({})},className:"filter-select",children:[w.jsx("option",{value:-1,children:e("sessions.allTypes")}),F.map(M=>w.jsx("option",{value:M,children:e(`sessionType.${M}`)},M))]})]})}),w.jsx(De,{md:3,children:w.jsxs(wr.Group,{children:[w.jsx(wr.Label,{className:"text-muted-custom",children:e("sessions.result")}),w.jsxs(wr.Select,{value:m,onChange:M=>{b(M.target.value),_(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(De,{md:6,children:w.jsxs(wr.Group,{children:[w.jsx(wr.Label,{className:"text-muted-custom",children:e("sessions.search")}),w.jsx(wr.Control,{type:"text",placeholder:e("sessions.search"),value:O,onChange:M=>{x(M.target.value),_(1)},className:"filter-input"})]})})]})})}),w.jsx(be,{className:"data-card",children:w.jsx(be.Body,{className:"p-0",children:w.jsxs(bn,{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"),U("sessionDateAsString")]}),w.jsxs("th",{className:"sortable",onClick:()=>I("sessionTypeAsInt"),children:[e("table.type"),U("sessionTypeAsInt")]}),w.jsxs("th",{className:"sortable",onClick:()=>I("scenarioName"),children:[e("table.scenario"),U("scenarioName")]}),w.jsx("th",{children:e("table.map")}),w.jsxs("th",{className:"sortable",onClick:()=>I("score"),children:[e("table.score"),U("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"),U("timeToFinish")]}),w.jsx("th",{children:e("table.result")})]})}),w.jsxs("tbody",{children:[R.map(M=>w.jsxs("tr",{className:"clickable-row",onClick:()=>r(`/sessions/${M.id}`),children:[w.jsx("td",{children:IX(M.sessionDateAsString,t)}),w.jsx("td",{children:w.jsx(qs,{typeId:M.sessionTypeAsInt})}),w.jsx("td",{children:M.scenarioName||"-"}),w.jsx("td",{children:M.mapName||"-"}),w.jsx("td",{className:"fw-bold",children:M.score}),w.jsx("td",{children:M.nbEnemyHit}),w.jsx("td",{className:M.nbCivilsHit>0?"text-danger":"",children:M.nbCivilsHit}),w.jsx("td",{children:$X(M.timeToFinish)}),w.jsx("td",{children:w.jsx(Tf,{success:M.success})})]},M.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(Ra,{className:"custom-pagination",children:[w.jsx(Ra.First,{onClick:()=>_(1),disabled:T===1}),w.jsx(Ra.Prev,{onClick:()=>_(T-1),disabled:T===1}),Array.from({length:Math.min(N,5)},(M,W)=>{const V=Math.max(1,Math.min(T-2,N-4))+W;return V>N?null:w.jsx(Ra.Item,{active:V===T,onClick:()=>_(V),children:V},V)}),w.jsx(Ra.Next,{onClick:()=>_(T+1),disabled:T===N}),w.jsx(Ra.Last,{onClick:()=>_(N),disabled:T===N})]})})]})}const kT=1e3;function LX(e,t,r){const n=(e-t)/(r-t)*100;return Math.round(n*kT)/kT}function NT({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:`${LX(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 bM=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 NT(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?OX(O,g=>C.cloneElement(g,{isChild:!0})):NT({min:i,now:o,max:u,label:l,visuallyHidden:f,striped:d,animated:v,bsPrefix:p,variant:m},r)})});bM.displayName="ProgressBar";const BX={human:{image:"HumanTarget.png",ratio:.7183098591549296,maxW:320},longRange:{image:"longRangeTarget.PNG",ratio:1,maxW:480}};function FX({shots:e,variant:t="human"}){const{image:r,ratio:n,maxW:i}=BX[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 RT(e){const t=Math.floor(e/60),r=Math.floor(e%60);return`${t}m ${r}s`}function qX(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 zX(){const{id:e}=WT(),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),[g,E]=C.useState(-1);if(C.useEffect(()=>{t&&Promise.all([kL(t).catch(()=>null),RL(t).catch(()=>[]),ML(t).catch(()=>[]),IL(t).catch(()=>null)]).then(([P,N,R,I])=>{o(P);const U=N;l(U),U.length===1&&E(U[0].id),d(R),p(I),P&&$L(t,-1,P.sessionTypeAsInt).then(b)}).finally(()=>x(!1))},[t]),O)return w.jsx(Pu,{});if(!i)return w.jsx("p",{className:"text-center text-muted-custom py-5",children:r("session.notFound")});let A=null;if(v!=null&&v.resultsAsString)try{A=JSON.parse(v.resultsAsString)}catch{}const j=new Map(u.map(P=>[P.id,P])),T=i.sessionTypeAsInt===Ma.FireRange||i.sessionTypeAsInt===Ma.Challenge||i.sessionTypeAsInt===Ma.LongRange,_=i.sessionTypeAsInt===Ma.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(dc,{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(De,{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(qs,{typeId:i.sessionTypeAsInt}),w.jsx("span",{className:"text-muted-custom",children:qX(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(De,{style:{minWidth:200,maxWidth:300},children:[w.jsx("div",{className:"mb-1 fw-bold",children:r("session.participants")}),w.jsxs(wr.Select,{size:"sm",value:g,onChange:P=>E(Number(P.target.value)),style:{backgroundColor:"#1a1a2e",color:"#e0e0e0",borderColor:"#333"},children:[w.jsx("option",{value:-1,children:r("session.global")}),u.map(P=>w.jsx("option",{value:P.id,children:P.firstName&&P.lastName?`${P.firstName} ${P.lastName}`:P.username},P.id))]})]}),w.jsx(De,{xs:"auto",children:w.jsx(Tf,{success:i.success})})]})})}),!T&&(()=>{const P=g===-1?f:f.filter(U=>U.userId===g),N=U=>P.reduce((F,M)=>F+(Number(M[U])||0),0),R=P.length>0?P.reduce((U,F)=>U+(F.averagePrecision||0),0)/P.length:0,I=f.map(U=>{const F=j.get(U.userId);return{name:F?F.firstName||F.username:`#${U.userId}`,[r("hitType.enemy")]:U.nbEnemyHitsByUser,[r("hitType.civilian")]:U.nbCivilHitsByUser,[r("hitType.police")]:U.nbPoliceHitsByUser,[r("session.missed")]:U.nbMissedShotsByUser}});return w.jsxs(ur,{className:"mb-4 g-3",children:[w.jsxs(De,{lg:4,children:[w.jsx(be,{className:"data-card mb-3",children:w.jsxs(be.Body,{className:"py-2 px-3",children:[w.jsx("div",{className:"mb-2",style:{fontSize:"0.85rem",color:"#999"},children:r("session.duration")}),w.jsx("div",{style:{fontSize:"1.2rem",fontWeight:"bold"},children:RT(i.timeToFinish)})]})}),w.jsx(be,{className:"data-card mb-3",children:w.jsxs(be.Body,{className:"py-2 px-3",children:[w.jsx("h6",{className:"mb-2",children:r("session.personalStats")}),w.jsx("table",{className:"w-100",style:{fontSize:"0.85rem"},children:w.jsxs("tbody",{children:[w.jsxs("tr",{children:[w.jsx("td",{className:"text-muted-custom py-1",children:r("firerange.shotsFired")}),w.jsx("td",{className:"text-end fw-bold",children:N("nbFiredShotsByUser")})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"text-muted-custom py-1",children:r("firerange.shotsMissed")}),w.jsx("td",{className:"text-end fw-bold",children:N("nbMissedShotsByUser")})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"py-1",style:{color:"#27ae60"},children:r("session.enemiesHit")}),w.jsx("td",{className:"text-end fw-bold",children:N("nbEnemyHitsByUser")})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"py-1",style:{color:"#e74c3c"},children:r("session.civiliansHit")}),w.jsx("td",{className:"text-end fw-bold",children:N("nbCivilHitsByUser")})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"py-1",style:{color:"#1abc9c"},children:r("session.friendlyFire")}),w.jsx("td",{className:"text-end fw-bold",children:N("nbPoliceHitsByUser")})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"py-1",style:{color:"#f39c12"},children:r("session.hitsReceived")}),w.jsx("td",{className:"text-end fw-bold",children:N("nbReceivedHitsFromEnemyIA")+N("nbReceivedHitsFromEnemyUser")+N("nbReceivedHitsFromPoliceUser")})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"text-muted-custom py-1",children:r("firerange.avgPrecision")}),w.jsx("td",{className:"text-end fw-bold",children:R>0?`${(R*100).toFixed(2)}%`:"-"})]})]})})]})}),w.jsx(be,{className:"data-card",children:w.jsxs(be.Body,{className:"py-2 px-3",children:[w.jsx("h6",{className:"mb-2",children:r("session.globalStats")}),w.jsx("table",{className:"w-100",style:{fontSize:"0.85rem"},children:w.jsxs("tbody",{children:[w.jsxs("tr",{children:[w.jsx("td",{className:"py-1",style:{color:"#27ae60"},children:r("stats.enemiesKilled")}),w.jsx("td",{className:"text-end fw-bold",children:N("totalEnemyKilled")})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"py-1",style:{color:"#e74c3c"},children:r("stats.civiliansKilled")}),w.jsx("td",{className:"text-end fw-bold",children:N("totalCivilKilled")})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"py-1",style:{color:"#1abc9c"},children:r("stats.policeKilled")}),w.jsx("td",{className:"text-end fw-bold",children:N("totalPoliceKilled")})]})]})})]})})]}),w.jsx(De,{lg:8,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("session.shotsInSession")}),w.jsx("div",{className:"d-flex flex-grow-1 align-items-center",children:w.jsx(za,{width:"100%",height:350,children:w.jsxs(uM,{data:I,margin:{top:10,right:20,left:10,bottom:5},children:[w.jsx(Ha,{strokeDasharray:"3 3",stroke:"#333"}),w.jsx(jn,{dataKey:"name",stroke:"#999"}),w.jsx(en,{stroke:"#999"}),w.jsx(qt,{contentStyle:{backgroundColor:"#1a1a2e",border:"1px solid #333"}}),w.jsx(Pn,{}),w.jsx(Fr,{dataKey:r("hitType.enemy"),fill:"#ff6b8a"}),w.jsx(Fr,{dataKey:r("hitType.civilian"),fill:"#f39c12"}),w.jsx(Fr,{dataKey:r("hitType.police"),fill:"#1abc9c"}),w.jsx(Fr,{dataKey:r("session.missed"),fill:"#ff9ec4"})]})})})]})})})]})})(),T&&m.length>0&&(()=>{const P=(z,...V)=>{for(const Y of V)if(z[Y]!=null)return z[Y];return 0},N=m.filter(z=>P(z,"ReactId","reactId")>=0),R=m.filter(z=>P(z,"ReactId","reactId")<0).length,I=N.length===0?"-":`${(N.reduce((V,Y)=>V+P(Y,"HitPrecision","hitPrecision"),0)/N.length*100).toFixed(1)}%`,U=(()=>{const z=m.filter(Y=>P(Y,"ReactionTime","reactionTime")>0);return z.length===0?"-":`${(z.reduce((Y,J)=>Y+P(J,"ReactionTime","reactionTime"),0)/z.length/1e3).toFixed(3)} s`})(),F=m.map(z=>({shot:P(z,"ShotIndex","shotIndex"),precision:P(z,"ReactId","reactId")>=0?Math.round(P(z,"HitPrecision","hitPrecision")*100):0})),M=N.filter(z=>P(z,"ReactionTime","reactionTime")>0).map(z=>({shot:P(z,"ShotIndex","shotIndex"),reaction:Math.round(P(z,"ReactionTime","reactionTime"))})),W=N.map(z=>({index:P(z,"ShotIndex","shotIndex"),x:P(z,"HitLocationX","hitLocationX"),y:P(z,"HitLocationY","hitLocationY"),precision:P(z,"HitPrecision","hitPrecision")}));return w.jsxs(ur,{className:"mb-4 g-3",children:[w.jsx(De,{lg:3,children:w.jsxs(ur,{className:"g-3",children:[w.jsx(De,{xs:6,lg:_?6:12,children:w.jsx(Dt,{title:r("session.duration"),value:RT(i.timeToFinish),color:"#9b59b6"})}),w.jsx(De,{xs:6,lg:_?6:12,children:w.jsx(Dt,{title:r("firerange.shotsFired"),value:m.length,color:"#1abc9c"})}),_&&w.jsx(De,{xs:6,lg:6,children:w.jsx(Dt,{title:r("firerange.targetsHit"),value:N.length,color:"#4a90d9"})}),w.jsx(De,{xs:6,lg:_?6:12,children:w.jsx(Dt,{title:r("firerange.shotsMissed"),value:R,color:"#e74c3c"})}),w.jsx(De,{xs:6,lg:_?6:12,children:w.jsx(Dt,{title:r("firerange.avgPrecision"),value:I,color:"#27ae60"})}),_&&w.jsx(De,{xs:6,lg:6,children:w.jsx(Dt,{title:r("firerange.avgReaction"),value:U,color:"#f39c12"})})]})}),!_&&w.jsx(De,{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(FX,{shots:W,variant:i.sessionTypeAsInt===Ma.LongRange?"longRange":"human"})})]})})}),w.jsx(De,{lg:_?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(_?"firerange.reactionChart":"firerange.precisionChart")}),w.jsx("div",{className:"d-flex flex-grow-1 align-items-center",children:_?w.jsx(za,{width:"100%",height:250,children:w.jsxs(Y0,{data:M,margin:{top:10,right:20,left:10,bottom:5},children:[w.jsx(Ha,{strokeDasharray:"3 3",stroke:"#333"}),w.jsx(jn,{dataKey:"shot",stroke:"#999"}),w.jsx(en,{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(fi,{type:"linear",dataKey:"reaction",stroke:"#f39c12",strokeWidth:2,dot:{fill:"#f39c12",r:4},activeDot:{r:6}})]})}):w.jsx(za,{width:"100%",height:250,children:w.jsxs(Y0,{data:F,margin:{top:10,right:20,left:10,bottom:5},children:[w.jsx(Ha,{strokeDasharray:"3 3",stroke:"#333"}),w.jsx(jn,{dataKey:"shot",stroke:"#999"}),w.jsx(en,{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(fi,{type:"linear",dataKey:"precision",stroke:"#ff6b8a",strokeWidth:2,dot:{fill:"#ff6b8a",r:4},activeDot:{r:6}})]})})})]})})})]})})(),A&&!T&&w.jsx(ur,{className:"mb-4 g-3",children:w.jsx(De,{md:12,children:w.jsx(be,{className:"data-card",children:w.jsxs(be.Body,{children:[w.jsx(be.Title,{children:r("session.objectives")}),Object.entries(A).map(([P,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.${P}`)}),w.jsxs("span",{children:[N.score,"/",N.maxScore,N.success!==void 0&&w.jsx(jf,{bg:N.success?"success":"danger",className:"ms-2",children:N.success?"OK":"X"})]})]}),w.jsx(bM,{now:R,variant:N.success?"success":"danger",className:"objective-bar"})]},P)})]})})})})]})}function UX(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 WX(){const{t:e,lang:t}=zr(),r=_u(),[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(()=>{BC().then(i).finally(()=>u(!1))},[]);const b=C.useMemo(()=>{let g=n;if(l.trim()){const E=l.toLowerCase();g=g.filter(A=>A.username.toLowerCase().includes(E)||A.firstName.toLowerCase().includes(E)||A.lastName.toLowerCase().includes(E))}return[...g].sort((E,A)=>{const j=E[d],T=A[d];return typeof j=="string"&&typeof T=="string"?p==="asc"?j.localeCompare(T):T.localeCompare(j):p==="asc"?Number(j)-Number(T):Number(T)-Number(j)})},[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(Pu,{}):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(wr.Group,{children:w.jsx(wr.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(bn,{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:UX(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 HX({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(za,{width:"100%",height:300,children:w.jsxs(Y0,{data:i,children:[w.jsx(Ha,{strokeDasharray:"3 3",stroke:"#333"}),w.jsx(jn,{dataKey:"dateLabel",stroke:"#888"}),w.jsx(en,{yAxisId:"left",stroke:"#4a90d9"}),w.jsx(en,{yAxisId:"right",orientation:"right",stroke:"#f39c12"}),w.jsx(qt,{contentStyle:{backgroundColor:"#1a1a2e",border:"1px solid #333"},labelFormatter:o=>o}),w.jsx(Pn,{}),w.jsx(fi,{yAxisId:"left",type:"monotone",dataKey:"precision",stroke:"#4a90d9",name:t("chart.precision"),strokeWidth:2,dot:{r:3}}),w.jsx(fi,{yAxisId:"right",type:"monotone",dataKey:"reactionTime",stroke:"#f39c12",name:t("chart.reactionTime"),strokeWidth:2,dot:{r:3}})]})})}function MT(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 KX(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 VX(){const{id:e}=WT(),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([NL(t).catch(()=>null),CL(t).catch(()=>[]),DL(t,!0).catch(()=>null)]).then(([x,g,E])=>{o(x),l(g),d(E)}).finally(()=>p(!1))},[t]),v)return w.jsx(Pu,{});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(dc,{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(De,{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(De,{xs:6,md:2,children:w.jsx(Dt,{title:r("user.sessions"),value:(f==null?void 0:f.nbSessions)||u.length,color:"#4a90d9"})}),w.jsx(De,{xs:6,md:2,children:w.jsx(Dt,{title:r("user.totalTime"),value:MT((f==null?void 0:f.totalDuration)||0),color:"#9b59b6"})}),w.jsx(De,{xs:6,md:2,children:w.jsx(Dt,{title:r("user.avgPrecision"),value:i.avgPrecision!=null?i.avgPrecision.toFixed(1):"-",color:"#27ae60"})}),w.jsx(De,{xs:6,md:2,children:w.jsx(Dt,{title:r("user.avgReaction"),value:i.avgReaction!=null&&i.avgReaction>0?`${i.avgReaction.toFixed(0)}ms`:"-",color:"#f39c12"})}),w.jsx(De,{xs:6,md:2,children:w.jsx(Dt,{title:r("user.shotsFired"),value:(b==null?void 0:b.nbFiredShotsByUser)||0,color:"#1abc9c"})}),w.jsx(De,{xs:6,md:2,children:w.jsx(Dt,{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(De,{md:4,children:[w.jsx("h6",{className:"text-muted-custom",children:r("user.shots")}),w.jsx(bn,{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(De,{md:4,children:[w.jsx("h6",{className:"text-muted-custom",children:r("user.hitsReceived")}),w.jsx(bn,{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(De,{md:4,children:[w.jsx("h6",{className:"text-muted-custom",children:r("user.eliminations")}),w.jsx(bn,{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(HX,{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(qs,{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(bn,{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(dc,{to:`/sessions/${x.id}`,className:"table-link",children:KX(x.sessionDateAsString,n)})}),w.jsx("td",{children:w.jsx(qs,{typeId:x.sessionTypeAsInt})}),w.jsx("td",{children:x.scenarioName||"-"}),w.jsx("td",{className:"fw-bold",children:x.score}),w.jsx("td",{children:MT(x.timeToFinish)}),w.jsx("td",{children:w.jsx(Tf,{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 GX(){return w.jsx(x2,{children:w.jsxs(Ri,{element:w.jsx(PL,{}),children:[w.jsx(Ri,{path:"/",element:w.jsx(wX,{})}),w.jsx(Ri,{path:"/sessions",element:w.jsx(DX,{})}),w.jsx(Ri,{path:"/sessions/:id",element:w.jsx(zX,{})}),w.jsx(Ri,{path:"/users",element:w.jsx(WX,{})}),w.jsx(Ri,{path:"/users/:id",element:w.jsx(VX,{})})]})})}EI.createRoot(document.getElementById("root")).render(w.jsx(D.StrictMode,{children:w.jsx(D2,{children:w.jsx(T2,{children:w.jsx(GX,{})})})}));